@umami/shiso 1.12.0 → 1.13.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.
- package/dist/chunks/App.js +76 -49
- package/dist/chunks/abnfDiagram-VCTEODGH.js +109 -0
- package/dist/chunks/arc.js +130 -0
- package/dist/chunks/architecture-7GRP2DOG.js +4 -0
- package/dist/chunks/architectureDiagram-5GKGNRK7.js +7466 -0
- package/dist/chunks/array.js +8 -0
- package/dist/chunks/blockDiagram-I7D4REHJ.js +2546 -0
- package/dist/chunks/c4Diagram-7LVT6UL2.js +3654 -0
- package/dist/chunks/channel.js +9 -0
- package/dist/chunks/chunk-2Q5K7J3B.js +21 -0
- package/dist/chunks/chunk-4HAMMTFA.js +6106 -0
- package/dist/chunks/chunk-5VM5RSS4.js +21 -0
- package/dist/chunks/chunk-75Z2AOVW.js +2185 -0
- package/dist/chunks/chunk-DU6HZSFF.js +8729 -0
- package/dist/chunks/chunk-F27PBJKO.js +95 -0
- package/dist/chunks/chunk-FOHPRMQF.js +27162 -0
- package/dist/chunks/chunk-GMAD6QVW.js +2369 -0
- package/dist/chunks/chunk-GVQU2GXP.js +58 -0
- package/dist/chunks/chunk-IMKFNOWR.js +2593 -0
- package/dist/chunks/chunk-JWPE2WC7.js +12 -0
- package/dist/chunks/chunk-L3NEJ4N5.js +420 -0
- package/dist/chunks/chunk-OSK3NFVY.js +1029 -0
- package/dist/chunks/chunk-P2QGCYS3.js +95 -0
- package/dist/chunks/chunk-POPQ4Y6H.js +33 -0
- package/dist/chunks/chunk-PWAF6VOD.js +467 -0
- package/dist/chunks/chunk-SHT3W25Y.js +4813 -0
- package/dist/chunks/chunk-SVP7TREG.js +686 -0
- package/dist/chunks/chunk-TICWLB2K.js +3800 -0
- package/dist/chunks/chunk-XXDRQBXY.js +12 -0
- package/dist/chunks/chunk-Y2CYZVJY.js +15 -0
- package/dist/chunks/classDiagram-ZZMXUADV.js +33 -0
- package/dist/chunks/classDiagram-v2-VYDZK3BY.js +33 -0
- package/dist/chunks/cose-bilkent-JH36ORCC.js +4268 -0
- package/dist/chunks/cynefin-OW5HDTMX.js +4 -0
- package/dist/chunks/cynefinDiagram-5FMLGOSQ.js +482 -0
- package/dist/chunks/cytoscape.esm.js +28282 -0
- package/dist/chunks/dagre-GXQ25YYZ.js +583 -0
- package/dist/chunks/dagre.js +4235 -0
- package/dist/chunks/defaultLocale.js +246 -0
- package/dist/chunks/diagram-S7CK7UJ4.js +402 -0
- package/dist/chunks/diagram-UQ7AKVKN.js +291 -0
- package/dist/chunks/diagram-VSXAHHWV.js +553 -0
- package/dist/chunks/diagram-VX7I27RA.js +798 -0
- package/dist/chunks/diagram-Z3DM3KII.js +186 -0
- package/dist/chunks/dist.js +92 -0
- package/dist/chunks/docs.js +987 -91
- package/dist/chunks/ebnfDiagram-PWID7BFC.js +123 -0
- package/dist/chunks/erDiagram-RLTQ6QDP.js +2295 -0
- package/dist/chunks/eventmodeling-NTZA5JFV.js +4 -0
- package/dist/chunks/flowDiagram-HODETNUW.js +17 -0
- package/dist/chunks/ganttDiagram-EL5Y4UJY.js +3928 -0
- package/dist/chunks/gitGraph-4MIJSDKK.js +4 -0
- package/dist/chunks/gitGraphDiagram-WWUBYQGX.js +1153 -0
- package/dist/chunks/graphlib.js +4194 -0
- package/dist/chunks/info-A6RAGUB7.js +4 -0
- package/dist/chunks/infoDiagram-27XIBGKW.js +25 -0
- package/dist/chunks/init.js +14 -0
- package/dist/chunks/ishikawaDiagram-5VMMS53U.js +971 -0
- package/dist/chunks/journeyDiagram-3NMN7TZE.js +1226 -0
- package/dist/chunks/kanban-definition-UXKFOSKX.js +1241 -0
- package/dist/chunks/katex.js +26463 -0
- package/dist/chunks/line.js +48 -0
- package/dist/chunks/linear.js +391 -0
- package/dist/chunks/mermaid-parser.core.js +754 -0
- package/dist/chunks/mermaid.core.js +4898 -0
- package/dist/chunks/mindmap-definition-YA3MSWOX.js +1309 -0
- package/dist/chunks/ordinal.js +84 -0
- package/dist/chunks/packet-AYTQ26CC.js +4 -0
- package/dist/chunks/path.js +106 -0
- package/dist/chunks/pegDiagram-XKGWAZYB.js +115 -0
- package/dist/chunks/pie-WAS4IAKB.js +4 -0
- package/dist/chunks/pieDiagram-E7YTZNPT.js +297 -0
- package/dist/chunks/quadrantDiagram-AXDQQJYC.js +2234 -0
- package/dist/chunks/radar-RG4KPBEZ.js +4 -0
- package/dist/chunks/railroad-74A4TZTK.js +4 -0
- package/dist/chunks/railroad-abnf-HS5TGJTU.js +4 -0
- package/dist/chunks/railroad-ebnf-LZEXJU2U.js +4 -0
- package/dist/chunks/railroad-peg-WCYAUIDC.js +4 -0
- package/dist/chunks/railroadDiagram-O6MQD6OU.js +89 -0
- package/dist/chunks/requirementDiagram-BXWQKSXE.js +2464 -0
- package/dist/chunks/rough.esm.js +1396 -0
- package/dist/chunks/sankeyDiagram-P5KCCOFB.js +1308 -0
- package/dist/chunks/sequenceDiagram-WJ2MYXX4.js +5445 -0
- package/dist/chunks/sizeCapture-INFHLROL.js +56 -0
- package/dist/chunks/src.js +2653 -0
- package/dist/chunks/stateDiagram-D77RDMKH.js +368 -0
- package/dist/chunks/stateDiagram-v2-MP3YSRHH.js +33 -0
- package/dist/chunks/swimlanes-42K2YHIH.js +6925 -0
- package/dist/chunks/swimlanesDiagram-VR7AAH4N.js +32 -0
- package/dist/chunks/timeline-definition-24CTP7MA.js +1507 -0
- package/dist/chunks/treeView-Q6P3EWNA.js +4 -0
- package/dist/chunks/treemap-WGGIJYW6.js +4 -0
- package/dist/chunks/vennDiagram-4TSXK5OY.js +2803 -0
- package/dist/chunks/wardley-WFR3VGLG.js +4 -0
- package/dist/chunks/wardleyDiagram-VM6X3IG4.js +877 -0
- package/dist/chunks/xychartDiagram-S5SC5T6Z.js +2698 -0
- package/dist/components.js +2 -2
- package/dist/entry-client.js +1 -1
- package/dist/entry-server.js +1 -1
- package/docs.schema.json +1 -1
- package/package.json +2 -1
- package/scripts/expand-navigation-globs.mjs +77 -8
- package/src/components/CodeBlock.tsx +36 -0
- package/src/components/Docs.tsx +44 -21
- package/src/components/OpenApiOperation.tsx +28 -20
- package/src/components/SideNav.tsx +8 -3
- package/src/components/docs/Changelog.tsx +163 -0
- package/src/components/docs/Mermaid.tsx +164 -0
- package/src/components/docs/Panel.tsx +23 -0
- package/src/components/docs/ParamField.tsx +17 -5
- package/src/components/docs/PropertiesTable.tsx +2 -2
- package/src/components/docs/ResponseField.tsx +17 -5
- package/src/components/docs/Tiles.tsx +59 -0
- package/src/components/docs/Tree.tsx +359 -0
- package/src/components/docs/Update.tsx +72 -0
- package/src/components/docs/index.ts +7 -0
- package/src/components/docs/panel-context.tsx +25 -0
- package/src/components/docs/styles.ts +49 -0
- package/src/components/icons/index.ts +4 -0
- package/src/lib/rehype-shiki.ts +18 -1
- package/types/components.d.ts +79 -0
|
@@ -0,0 +1,2593 @@
|
|
|
1
|
+
import { n as __name } from "./chunk-Y2CYZVJY.js";
|
|
2
|
+
import { m as log, p as select_default } from "./src.js";
|
|
3
|
+
import { $ as purify, H as setAccDescription, K as setDiagramTitle, U as setAccTitle, a as clear, s as common_default, v as getAccDescription, w as getDiagramTitle, x as getConfig2, y as getAccTitle } from "./chunk-DU6HZSFF.js";
|
|
4
|
+
import { g as utils_default, s as generateId } from "./chunk-75Z2AOVW.js";
|
|
5
|
+
import { t as createTooltip } from "./chunk-F27PBJKO.js";
|
|
6
|
+
import { t as getDiagramElement } from "./chunk-XXDRQBXY.js";
|
|
7
|
+
import { t as setupViewPortForSVG } from "./chunk-POPQ4Y6H.js";
|
|
8
|
+
import { d as render } from "./mermaid.core.js";
|
|
9
|
+
|
|
10
|
+
//#region ../../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/chunk-IMKFNOWR.mjs
|
|
11
|
+
var parser = (function() {
|
|
12
|
+
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
13
|
+
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v);
|
|
14
|
+
return o2;
|
|
15
|
+
}, "o"), $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 16], $V7 = [1, 17], $V8 = [1, 18], $V9 = [1, 19], $Va = [1, 33], $Vb = [1, 20], $Vc = [1, 21], $Vd = [1, 22], $Ve = [1, 23], $Vf = [1, 24], $Vg = [1, 26], $Vh = [1, 27], $Vi = [1, 28], $Vj = [1, 29], $Vk = [1, 30], $Vl = [1, 31], $Vm = [1, 32], $Vn = [1, 35], $Vo = [1, 36], $Vp = [1, 37], $Vq = [1, 38], $Vr = [1, 34], $Vs = [
|
|
16
|
+
1,
|
|
17
|
+
4,
|
|
18
|
+
5,
|
|
19
|
+
16,
|
|
20
|
+
17,
|
|
21
|
+
19,
|
|
22
|
+
21,
|
|
23
|
+
22,
|
|
24
|
+
24,
|
|
25
|
+
25,
|
|
26
|
+
26,
|
|
27
|
+
27,
|
|
28
|
+
28,
|
|
29
|
+
29,
|
|
30
|
+
33,
|
|
31
|
+
35,
|
|
32
|
+
37,
|
|
33
|
+
38,
|
|
34
|
+
41,
|
|
35
|
+
45,
|
|
36
|
+
48,
|
|
37
|
+
51,
|
|
38
|
+
52,
|
|
39
|
+
53,
|
|
40
|
+
54,
|
|
41
|
+
57
|
|
42
|
+
], $Vt = [
|
|
43
|
+
1,
|
|
44
|
+
4,
|
|
45
|
+
5,
|
|
46
|
+
14,
|
|
47
|
+
15,
|
|
48
|
+
16,
|
|
49
|
+
17,
|
|
50
|
+
19,
|
|
51
|
+
21,
|
|
52
|
+
22,
|
|
53
|
+
24,
|
|
54
|
+
25,
|
|
55
|
+
26,
|
|
56
|
+
27,
|
|
57
|
+
28,
|
|
58
|
+
29,
|
|
59
|
+
33,
|
|
60
|
+
35,
|
|
61
|
+
37,
|
|
62
|
+
38,
|
|
63
|
+
39,
|
|
64
|
+
40,
|
|
65
|
+
41,
|
|
66
|
+
45,
|
|
67
|
+
48,
|
|
68
|
+
51,
|
|
69
|
+
52,
|
|
70
|
+
53,
|
|
71
|
+
54,
|
|
72
|
+
57
|
|
73
|
+
], $Vu = [
|
|
74
|
+
4,
|
|
75
|
+
5,
|
|
76
|
+
16,
|
|
77
|
+
17,
|
|
78
|
+
19,
|
|
79
|
+
21,
|
|
80
|
+
22,
|
|
81
|
+
24,
|
|
82
|
+
25,
|
|
83
|
+
26,
|
|
84
|
+
27,
|
|
85
|
+
28,
|
|
86
|
+
29,
|
|
87
|
+
33,
|
|
88
|
+
35,
|
|
89
|
+
37,
|
|
90
|
+
38,
|
|
91
|
+
41,
|
|
92
|
+
45,
|
|
93
|
+
48,
|
|
94
|
+
51,
|
|
95
|
+
52,
|
|
96
|
+
53,
|
|
97
|
+
54,
|
|
98
|
+
57
|
|
99
|
+
];
|
|
100
|
+
var parser2 = {
|
|
101
|
+
trace: /* @__PURE__ */ __name(function trace() {}, "trace"),
|
|
102
|
+
yy: {},
|
|
103
|
+
symbols_: {
|
|
104
|
+
"error": 2,
|
|
105
|
+
"start": 3,
|
|
106
|
+
"SPACE": 4,
|
|
107
|
+
"NL": 5,
|
|
108
|
+
"SD": 6,
|
|
109
|
+
"document": 7,
|
|
110
|
+
"line": 8,
|
|
111
|
+
"statement": 9,
|
|
112
|
+
"classDefStatement": 10,
|
|
113
|
+
"styleStatement": 11,
|
|
114
|
+
"cssClassStatement": 12,
|
|
115
|
+
"idStatement": 13,
|
|
116
|
+
"DESCR": 14,
|
|
117
|
+
"-->": 15,
|
|
118
|
+
"HIDE_EMPTY": 16,
|
|
119
|
+
"scale": 17,
|
|
120
|
+
"WIDTH": 18,
|
|
121
|
+
"COMPOSIT_STATE": 19,
|
|
122
|
+
"STRUCT_START": 20,
|
|
123
|
+
"STRUCT_STOP": 21,
|
|
124
|
+
"STATE_DESCR": 22,
|
|
125
|
+
"AS": 23,
|
|
126
|
+
"ID": 24,
|
|
127
|
+
"FORK": 25,
|
|
128
|
+
"JOIN": 26,
|
|
129
|
+
"CHOICE": 27,
|
|
130
|
+
"CONCURRENT": 28,
|
|
131
|
+
"note": 29,
|
|
132
|
+
"notePosition": 30,
|
|
133
|
+
"NOTE_TEXT": 31,
|
|
134
|
+
"direction": 32,
|
|
135
|
+
"acc_title": 33,
|
|
136
|
+
"acc_title_value": 34,
|
|
137
|
+
"acc_descr": 35,
|
|
138
|
+
"acc_descr_value": 36,
|
|
139
|
+
"acc_descr_multiline_value": 37,
|
|
140
|
+
"CLICK": 38,
|
|
141
|
+
"STRING": 39,
|
|
142
|
+
"HREF": 40,
|
|
143
|
+
"classDef": 41,
|
|
144
|
+
"CLASSDEF_ID": 42,
|
|
145
|
+
"CLASSDEF_STYLEOPTS": 43,
|
|
146
|
+
"DEFAULT": 44,
|
|
147
|
+
"style": 45,
|
|
148
|
+
"STYLE_IDS": 46,
|
|
149
|
+
"STYLEDEF_STYLEOPTS": 47,
|
|
150
|
+
"class": 48,
|
|
151
|
+
"CLASSENTITY_IDS": 49,
|
|
152
|
+
"STYLECLASS": 50,
|
|
153
|
+
"direction_tb": 51,
|
|
154
|
+
"direction_bt": 52,
|
|
155
|
+
"direction_rl": 53,
|
|
156
|
+
"direction_lr": 54,
|
|
157
|
+
"eol": 55,
|
|
158
|
+
";": 56,
|
|
159
|
+
"EDGE_STATE": 57,
|
|
160
|
+
"STYLE_SEPARATOR": 58,
|
|
161
|
+
"left_of": 59,
|
|
162
|
+
"right_of": 60,
|
|
163
|
+
"$accept": 0,
|
|
164
|
+
"$end": 1
|
|
165
|
+
},
|
|
166
|
+
terminals_: {
|
|
167
|
+
2: "error",
|
|
168
|
+
4: "SPACE",
|
|
169
|
+
5: "NL",
|
|
170
|
+
6: "SD",
|
|
171
|
+
14: "DESCR",
|
|
172
|
+
15: "-->",
|
|
173
|
+
16: "HIDE_EMPTY",
|
|
174
|
+
17: "scale",
|
|
175
|
+
18: "WIDTH",
|
|
176
|
+
19: "COMPOSIT_STATE",
|
|
177
|
+
20: "STRUCT_START",
|
|
178
|
+
21: "STRUCT_STOP",
|
|
179
|
+
22: "STATE_DESCR",
|
|
180
|
+
23: "AS",
|
|
181
|
+
24: "ID",
|
|
182
|
+
25: "FORK",
|
|
183
|
+
26: "JOIN",
|
|
184
|
+
27: "CHOICE",
|
|
185
|
+
28: "CONCURRENT",
|
|
186
|
+
29: "note",
|
|
187
|
+
31: "NOTE_TEXT",
|
|
188
|
+
33: "acc_title",
|
|
189
|
+
34: "acc_title_value",
|
|
190
|
+
35: "acc_descr",
|
|
191
|
+
36: "acc_descr_value",
|
|
192
|
+
37: "acc_descr_multiline_value",
|
|
193
|
+
38: "CLICK",
|
|
194
|
+
39: "STRING",
|
|
195
|
+
40: "HREF",
|
|
196
|
+
41: "classDef",
|
|
197
|
+
42: "CLASSDEF_ID",
|
|
198
|
+
43: "CLASSDEF_STYLEOPTS",
|
|
199
|
+
44: "DEFAULT",
|
|
200
|
+
45: "style",
|
|
201
|
+
46: "STYLE_IDS",
|
|
202
|
+
47: "STYLEDEF_STYLEOPTS",
|
|
203
|
+
48: "class",
|
|
204
|
+
49: "CLASSENTITY_IDS",
|
|
205
|
+
50: "STYLECLASS",
|
|
206
|
+
51: "direction_tb",
|
|
207
|
+
52: "direction_bt",
|
|
208
|
+
53: "direction_rl",
|
|
209
|
+
54: "direction_lr",
|
|
210
|
+
56: ";",
|
|
211
|
+
57: "EDGE_STATE",
|
|
212
|
+
58: "STYLE_SEPARATOR",
|
|
213
|
+
59: "left_of",
|
|
214
|
+
60: "right_of"
|
|
215
|
+
},
|
|
216
|
+
productions_: [
|
|
217
|
+
0,
|
|
218
|
+
[3, 2],
|
|
219
|
+
[3, 2],
|
|
220
|
+
[3, 2],
|
|
221
|
+
[7, 0],
|
|
222
|
+
[7, 2],
|
|
223
|
+
[8, 2],
|
|
224
|
+
[8, 1],
|
|
225
|
+
[8, 1],
|
|
226
|
+
[9, 1],
|
|
227
|
+
[9, 1],
|
|
228
|
+
[9, 1],
|
|
229
|
+
[9, 1],
|
|
230
|
+
[9, 2],
|
|
231
|
+
[9, 3],
|
|
232
|
+
[9, 4],
|
|
233
|
+
[9, 1],
|
|
234
|
+
[9, 2],
|
|
235
|
+
[9, 1],
|
|
236
|
+
[9, 4],
|
|
237
|
+
[9, 3],
|
|
238
|
+
[9, 6],
|
|
239
|
+
[9, 1],
|
|
240
|
+
[9, 1],
|
|
241
|
+
[9, 1],
|
|
242
|
+
[9, 1],
|
|
243
|
+
[9, 4],
|
|
244
|
+
[9, 4],
|
|
245
|
+
[9, 1],
|
|
246
|
+
[9, 2],
|
|
247
|
+
[9, 2],
|
|
248
|
+
[9, 1],
|
|
249
|
+
[9, 5],
|
|
250
|
+
[9, 5],
|
|
251
|
+
[10, 3],
|
|
252
|
+
[10, 3],
|
|
253
|
+
[11, 3],
|
|
254
|
+
[12, 3],
|
|
255
|
+
[32, 1],
|
|
256
|
+
[32, 1],
|
|
257
|
+
[32, 1],
|
|
258
|
+
[32, 1],
|
|
259
|
+
[55, 1],
|
|
260
|
+
[55, 1],
|
|
261
|
+
[13, 1],
|
|
262
|
+
[13, 1],
|
|
263
|
+
[13, 3],
|
|
264
|
+
[13, 3],
|
|
265
|
+
[30, 1],
|
|
266
|
+
[30, 1]
|
|
267
|
+
],
|
|
268
|
+
performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
269
|
+
var $0 = $$.length - 1;
|
|
270
|
+
switch (yystate) {
|
|
271
|
+
case 3:
|
|
272
|
+
yy.setRootDoc($$[$0]);
|
|
273
|
+
return $$[$0];
|
|
274
|
+
case 4:
|
|
275
|
+
this.$ = [];
|
|
276
|
+
break;
|
|
277
|
+
case 5:
|
|
278
|
+
if ($$[$0] != "nl") {
|
|
279
|
+
$$[$0 - 1].push($$[$0]);
|
|
280
|
+
this.$ = $$[$0 - 1];
|
|
281
|
+
}
|
|
282
|
+
break;
|
|
283
|
+
case 6:
|
|
284
|
+
case 7:
|
|
285
|
+
this.$ = $$[$0];
|
|
286
|
+
break;
|
|
287
|
+
case 8:
|
|
288
|
+
this.$ = "nl";
|
|
289
|
+
break;
|
|
290
|
+
case 12:
|
|
291
|
+
this.$ = $$[$0];
|
|
292
|
+
break;
|
|
293
|
+
case 13:
|
|
294
|
+
const stateStmt = $$[$0 - 1];
|
|
295
|
+
stateStmt.description = yy.trimColon($$[$0]);
|
|
296
|
+
this.$ = stateStmt;
|
|
297
|
+
break;
|
|
298
|
+
case 14:
|
|
299
|
+
this.$ = {
|
|
300
|
+
stmt: "relation",
|
|
301
|
+
state1: $$[$0 - 2],
|
|
302
|
+
state2: $$[$0]
|
|
303
|
+
};
|
|
304
|
+
break;
|
|
305
|
+
case 15:
|
|
306
|
+
const relDescription = yy.trimColon($$[$0]);
|
|
307
|
+
this.$ = {
|
|
308
|
+
stmt: "relation",
|
|
309
|
+
state1: $$[$0 - 3],
|
|
310
|
+
state2: $$[$0 - 1],
|
|
311
|
+
description: relDescription
|
|
312
|
+
};
|
|
313
|
+
break;
|
|
314
|
+
case 19:
|
|
315
|
+
this.$ = {
|
|
316
|
+
stmt: "state",
|
|
317
|
+
id: $$[$0 - 3],
|
|
318
|
+
type: "default",
|
|
319
|
+
description: "",
|
|
320
|
+
doc: $$[$0 - 1]
|
|
321
|
+
};
|
|
322
|
+
break;
|
|
323
|
+
case 20:
|
|
324
|
+
var id = $$[$0];
|
|
325
|
+
var description = $$[$0 - 2].trim();
|
|
326
|
+
if ($$[$0].match(":")) {
|
|
327
|
+
var parts = $$[$0].split(":");
|
|
328
|
+
id = parts[0];
|
|
329
|
+
description = [description, parts[1]];
|
|
330
|
+
}
|
|
331
|
+
this.$ = {
|
|
332
|
+
stmt: "state",
|
|
333
|
+
id,
|
|
334
|
+
type: "default",
|
|
335
|
+
description
|
|
336
|
+
};
|
|
337
|
+
break;
|
|
338
|
+
case 21:
|
|
339
|
+
this.$ = {
|
|
340
|
+
stmt: "state",
|
|
341
|
+
id: $$[$0 - 3],
|
|
342
|
+
type: "default",
|
|
343
|
+
description: $$[$0 - 5],
|
|
344
|
+
doc: $$[$0 - 1]
|
|
345
|
+
};
|
|
346
|
+
break;
|
|
347
|
+
case 22:
|
|
348
|
+
this.$ = {
|
|
349
|
+
stmt: "state",
|
|
350
|
+
id: $$[$0],
|
|
351
|
+
type: "fork"
|
|
352
|
+
};
|
|
353
|
+
break;
|
|
354
|
+
case 23:
|
|
355
|
+
this.$ = {
|
|
356
|
+
stmt: "state",
|
|
357
|
+
id: $$[$0],
|
|
358
|
+
type: "join"
|
|
359
|
+
};
|
|
360
|
+
break;
|
|
361
|
+
case 24:
|
|
362
|
+
this.$ = {
|
|
363
|
+
stmt: "state",
|
|
364
|
+
id: $$[$0],
|
|
365
|
+
type: "choice"
|
|
366
|
+
};
|
|
367
|
+
break;
|
|
368
|
+
case 25:
|
|
369
|
+
this.$ = {
|
|
370
|
+
stmt: "state",
|
|
371
|
+
id: yy.getDividerId(),
|
|
372
|
+
type: "divider"
|
|
373
|
+
};
|
|
374
|
+
break;
|
|
375
|
+
case 26:
|
|
376
|
+
this.$ = {
|
|
377
|
+
stmt: "state",
|
|
378
|
+
id: $$[$0 - 1].trim(),
|
|
379
|
+
note: {
|
|
380
|
+
position: $$[$0 - 2].trim(),
|
|
381
|
+
text: $$[$0].trim()
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
break;
|
|
385
|
+
case 29:
|
|
386
|
+
this.$ = $$[$0].trim();
|
|
387
|
+
yy.setAccTitle(this.$);
|
|
388
|
+
break;
|
|
389
|
+
case 30:
|
|
390
|
+
case 31:
|
|
391
|
+
this.$ = $$[$0].trim();
|
|
392
|
+
yy.setAccDescription(this.$);
|
|
393
|
+
break;
|
|
394
|
+
case 32:
|
|
395
|
+
this.$ = {
|
|
396
|
+
stmt: "click",
|
|
397
|
+
id: $$[$0 - 3],
|
|
398
|
+
url: $$[$0 - 2],
|
|
399
|
+
tooltip: $$[$0 - 1]
|
|
400
|
+
};
|
|
401
|
+
break;
|
|
402
|
+
case 33:
|
|
403
|
+
this.$ = {
|
|
404
|
+
stmt: "click",
|
|
405
|
+
id: $$[$0 - 3],
|
|
406
|
+
url: $$[$0 - 1],
|
|
407
|
+
tooltip: ""
|
|
408
|
+
};
|
|
409
|
+
break;
|
|
410
|
+
case 34:
|
|
411
|
+
case 35:
|
|
412
|
+
this.$ = {
|
|
413
|
+
stmt: "classDef",
|
|
414
|
+
id: $$[$0 - 1].trim(),
|
|
415
|
+
classes: $$[$0].trim()
|
|
416
|
+
};
|
|
417
|
+
break;
|
|
418
|
+
case 36:
|
|
419
|
+
this.$ = {
|
|
420
|
+
stmt: "style",
|
|
421
|
+
id: $$[$0 - 1].trim(),
|
|
422
|
+
styleClass: $$[$0].trim()
|
|
423
|
+
};
|
|
424
|
+
break;
|
|
425
|
+
case 37:
|
|
426
|
+
this.$ = {
|
|
427
|
+
stmt: "applyClass",
|
|
428
|
+
id: $$[$0 - 1].trim(),
|
|
429
|
+
styleClass: $$[$0].trim()
|
|
430
|
+
};
|
|
431
|
+
break;
|
|
432
|
+
case 38:
|
|
433
|
+
yy.setDirection("TB");
|
|
434
|
+
this.$ = {
|
|
435
|
+
stmt: "dir",
|
|
436
|
+
value: "TB"
|
|
437
|
+
};
|
|
438
|
+
break;
|
|
439
|
+
case 39:
|
|
440
|
+
yy.setDirection("BT");
|
|
441
|
+
this.$ = {
|
|
442
|
+
stmt: "dir",
|
|
443
|
+
value: "BT"
|
|
444
|
+
};
|
|
445
|
+
break;
|
|
446
|
+
case 40:
|
|
447
|
+
yy.setDirection("RL");
|
|
448
|
+
this.$ = {
|
|
449
|
+
stmt: "dir",
|
|
450
|
+
value: "RL"
|
|
451
|
+
};
|
|
452
|
+
break;
|
|
453
|
+
case 41:
|
|
454
|
+
yy.setDirection("LR");
|
|
455
|
+
this.$ = {
|
|
456
|
+
stmt: "dir",
|
|
457
|
+
value: "LR"
|
|
458
|
+
};
|
|
459
|
+
break;
|
|
460
|
+
case 44:
|
|
461
|
+
case 45:
|
|
462
|
+
this.$ = {
|
|
463
|
+
stmt: "state",
|
|
464
|
+
id: $$[$0].trim(),
|
|
465
|
+
type: "default",
|
|
466
|
+
description: ""
|
|
467
|
+
};
|
|
468
|
+
break;
|
|
469
|
+
case 46:
|
|
470
|
+
this.$ = {
|
|
471
|
+
stmt: "state",
|
|
472
|
+
id: $$[$0 - 2].trim(),
|
|
473
|
+
classes: [$$[$0].trim()],
|
|
474
|
+
type: "default",
|
|
475
|
+
description: ""
|
|
476
|
+
};
|
|
477
|
+
break;
|
|
478
|
+
case 47: this.$ = {
|
|
479
|
+
stmt: "state",
|
|
480
|
+
id: $$[$0 - 2].trim(),
|
|
481
|
+
classes: [$$[$0].trim()],
|
|
482
|
+
type: "default",
|
|
483
|
+
description: ""
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
}, "anonymous"),
|
|
487
|
+
table: [
|
|
488
|
+
{
|
|
489
|
+
3: 1,
|
|
490
|
+
4: $V0,
|
|
491
|
+
5: $V1,
|
|
492
|
+
6: $V2
|
|
493
|
+
},
|
|
494
|
+
{ 1: [3] },
|
|
495
|
+
{
|
|
496
|
+
3: 5,
|
|
497
|
+
4: $V0,
|
|
498
|
+
5: $V1,
|
|
499
|
+
6: $V2
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
3: 6,
|
|
503
|
+
4: $V0,
|
|
504
|
+
5: $V1,
|
|
505
|
+
6: $V2
|
|
506
|
+
},
|
|
507
|
+
o([
|
|
508
|
+
1,
|
|
509
|
+
4,
|
|
510
|
+
5,
|
|
511
|
+
16,
|
|
512
|
+
17,
|
|
513
|
+
19,
|
|
514
|
+
22,
|
|
515
|
+
24,
|
|
516
|
+
25,
|
|
517
|
+
26,
|
|
518
|
+
27,
|
|
519
|
+
28,
|
|
520
|
+
29,
|
|
521
|
+
33,
|
|
522
|
+
35,
|
|
523
|
+
37,
|
|
524
|
+
38,
|
|
525
|
+
41,
|
|
526
|
+
45,
|
|
527
|
+
48,
|
|
528
|
+
51,
|
|
529
|
+
52,
|
|
530
|
+
53,
|
|
531
|
+
54,
|
|
532
|
+
57
|
|
533
|
+
], $V3, { 7: 7 }),
|
|
534
|
+
{ 1: [2, 1] },
|
|
535
|
+
{ 1: [2, 2] },
|
|
536
|
+
{
|
|
537
|
+
1: [2, 3],
|
|
538
|
+
4: $V4,
|
|
539
|
+
5: $V5,
|
|
540
|
+
8: 8,
|
|
541
|
+
9: 10,
|
|
542
|
+
10: 12,
|
|
543
|
+
11: 13,
|
|
544
|
+
12: 14,
|
|
545
|
+
13: 15,
|
|
546
|
+
16: $V6,
|
|
547
|
+
17: $V7,
|
|
548
|
+
19: $V8,
|
|
549
|
+
22: $V9,
|
|
550
|
+
24: $Va,
|
|
551
|
+
25: $Vb,
|
|
552
|
+
26: $Vc,
|
|
553
|
+
27: $Vd,
|
|
554
|
+
28: $Ve,
|
|
555
|
+
29: $Vf,
|
|
556
|
+
32: 25,
|
|
557
|
+
33: $Vg,
|
|
558
|
+
35: $Vh,
|
|
559
|
+
37: $Vi,
|
|
560
|
+
38: $Vj,
|
|
561
|
+
41: $Vk,
|
|
562
|
+
45: $Vl,
|
|
563
|
+
48: $Vm,
|
|
564
|
+
51: $Vn,
|
|
565
|
+
52: $Vo,
|
|
566
|
+
53: $Vp,
|
|
567
|
+
54: $Vq,
|
|
568
|
+
57: $Vr
|
|
569
|
+
},
|
|
570
|
+
o($Vs, [2, 5]),
|
|
571
|
+
{
|
|
572
|
+
9: 39,
|
|
573
|
+
10: 12,
|
|
574
|
+
11: 13,
|
|
575
|
+
12: 14,
|
|
576
|
+
13: 15,
|
|
577
|
+
16: $V6,
|
|
578
|
+
17: $V7,
|
|
579
|
+
19: $V8,
|
|
580
|
+
22: $V9,
|
|
581
|
+
24: $Va,
|
|
582
|
+
25: $Vb,
|
|
583
|
+
26: $Vc,
|
|
584
|
+
27: $Vd,
|
|
585
|
+
28: $Ve,
|
|
586
|
+
29: $Vf,
|
|
587
|
+
32: 25,
|
|
588
|
+
33: $Vg,
|
|
589
|
+
35: $Vh,
|
|
590
|
+
37: $Vi,
|
|
591
|
+
38: $Vj,
|
|
592
|
+
41: $Vk,
|
|
593
|
+
45: $Vl,
|
|
594
|
+
48: $Vm,
|
|
595
|
+
51: $Vn,
|
|
596
|
+
52: $Vo,
|
|
597
|
+
53: $Vp,
|
|
598
|
+
54: $Vq,
|
|
599
|
+
57: $Vr
|
|
600
|
+
},
|
|
601
|
+
o($Vs, [2, 7]),
|
|
602
|
+
o($Vs, [2, 8]),
|
|
603
|
+
o($Vs, [2, 9]),
|
|
604
|
+
o($Vs, [2, 10]),
|
|
605
|
+
o($Vs, [2, 11]),
|
|
606
|
+
o($Vs, [2, 12], {
|
|
607
|
+
14: [1, 40],
|
|
608
|
+
15: [1, 41]
|
|
609
|
+
}),
|
|
610
|
+
o($Vs, [2, 16]),
|
|
611
|
+
{ 18: [1, 42] },
|
|
612
|
+
o($Vs, [2, 18], { 20: [1, 43] }),
|
|
613
|
+
{ 23: [1, 44] },
|
|
614
|
+
o($Vs, [2, 22]),
|
|
615
|
+
o($Vs, [2, 23]),
|
|
616
|
+
o($Vs, [2, 24]),
|
|
617
|
+
o($Vs, [2, 25]),
|
|
618
|
+
{
|
|
619
|
+
30: 45,
|
|
620
|
+
31: [1, 46],
|
|
621
|
+
59: [1, 47],
|
|
622
|
+
60: [1, 48]
|
|
623
|
+
},
|
|
624
|
+
o($Vs, [2, 28]),
|
|
625
|
+
{ 34: [1, 49] },
|
|
626
|
+
{ 36: [1, 50] },
|
|
627
|
+
o($Vs, [2, 31]),
|
|
628
|
+
{
|
|
629
|
+
13: 51,
|
|
630
|
+
24: $Va,
|
|
631
|
+
57: $Vr
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
42: [1, 52],
|
|
635
|
+
44: [1, 53]
|
|
636
|
+
},
|
|
637
|
+
{ 46: [1, 54] },
|
|
638
|
+
{ 49: [1, 55] },
|
|
639
|
+
o($Vt, [2, 44], { 58: [1, 56] }),
|
|
640
|
+
o($Vt, [2, 45], { 58: [1, 57] }),
|
|
641
|
+
o($Vs, [2, 38]),
|
|
642
|
+
o($Vs, [2, 39]),
|
|
643
|
+
o($Vs, [2, 40]),
|
|
644
|
+
o($Vs, [2, 41]),
|
|
645
|
+
o($Vs, [2, 6]),
|
|
646
|
+
o($Vs, [2, 13]),
|
|
647
|
+
{
|
|
648
|
+
13: 58,
|
|
649
|
+
24: $Va,
|
|
650
|
+
57: $Vr
|
|
651
|
+
},
|
|
652
|
+
o($Vs, [2, 17]),
|
|
653
|
+
o($Vu, $V3, { 7: 59 }),
|
|
654
|
+
{ 24: [1, 60] },
|
|
655
|
+
{ 24: [1, 61] },
|
|
656
|
+
{ 23: [1, 62] },
|
|
657
|
+
{ 24: [2, 48] },
|
|
658
|
+
{ 24: [2, 49] },
|
|
659
|
+
o($Vs, [2, 29]),
|
|
660
|
+
o($Vs, [2, 30]),
|
|
661
|
+
{
|
|
662
|
+
39: [1, 63],
|
|
663
|
+
40: [1, 64]
|
|
664
|
+
},
|
|
665
|
+
{ 43: [1, 65] },
|
|
666
|
+
{ 43: [1, 66] },
|
|
667
|
+
{ 47: [1, 67] },
|
|
668
|
+
{ 50: [1, 68] },
|
|
669
|
+
{ 24: [1, 69] },
|
|
670
|
+
{ 24: [1, 70] },
|
|
671
|
+
o($Vs, [2, 14], { 14: [1, 71] }),
|
|
672
|
+
{
|
|
673
|
+
4: $V4,
|
|
674
|
+
5: $V5,
|
|
675
|
+
8: 8,
|
|
676
|
+
9: 10,
|
|
677
|
+
10: 12,
|
|
678
|
+
11: 13,
|
|
679
|
+
12: 14,
|
|
680
|
+
13: 15,
|
|
681
|
+
16: $V6,
|
|
682
|
+
17: $V7,
|
|
683
|
+
19: $V8,
|
|
684
|
+
21: [1, 72],
|
|
685
|
+
22: $V9,
|
|
686
|
+
24: $Va,
|
|
687
|
+
25: $Vb,
|
|
688
|
+
26: $Vc,
|
|
689
|
+
27: $Vd,
|
|
690
|
+
28: $Ve,
|
|
691
|
+
29: $Vf,
|
|
692
|
+
32: 25,
|
|
693
|
+
33: $Vg,
|
|
694
|
+
35: $Vh,
|
|
695
|
+
37: $Vi,
|
|
696
|
+
38: $Vj,
|
|
697
|
+
41: $Vk,
|
|
698
|
+
45: $Vl,
|
|
699
|
+
48: $Vm,
|
|
700
|
+
51: $Vn,
|
|
701
|
+
52: $Vo,
|
|
702
|
+
53: $Vp,
|
|
703
|
+
54: $Vq,
|
|
704
|
+
57: $Vr
|
|
705
|
+
},
|
|
706
|
+
o($Vs, [2, 20], { 20: [1, 73] }),
|
|
707
|
+
{ 31: [1, 74] },
|
|
708
|
+
{ 24: [1, 75] },
|
|
709
|
+
{ 39: [1, 76] },
|
|
710
|
+
{ 39: [1, 77] },
|
|
711
|
+
o($Vs, [2, 34]),
|
|
712
|
+
o($Vs, [2, 35]),
|
|
713
|
+
o($Vs, [2, 36]),
|
|
714
|
+
o($Vs, [2, 37]),
|
|
715
|
+
o($Vt, [2, 46]),
|
|
716
|
+
o($Vt, [2, 47]),
|
|
717
|
+
o($Vs, [2, 15]),
|
|
718
|
+
o($Vs, [2, 19]),
|
|
719
|
+
o($Vu, $V3, { 7: 78 }),
|
|
720
|
+
o($Vs, [2, 26]),
|
|
721
|
+
o($Vs, [2, 27]),
|
|
722
|
+
{ 5: [1, 79] },
|
|
723
|
+
{ 5: [1, 80] },
|
|
724
|
+
{
|
|
725
|
+
4: $V4,
|
|
726
|
+
5: $V5,
|
|
727
|
+
8: 8,
|
|
728
|
+
9: 10,
|
|
729
|
+
10: 12,
|
|
730
|
+
11: 13,
|
|
731
|
+
12: 14,
|
|
732
|
+
13: 15,
|
|
733
|
+
16: $V6,
|
|
734
|
+
17: $V7,
|
|
735
|
+
19: $V8,
|
|
736
|
+
21: [1, 81],
|
|
737
|
+
22: $V9,
|
|
738
|
+
24: $Va,
|
|
739
|
+
25: $Vb,
|
|
740
|
+
26: $Vc,
|
|
741
|
+
27: $Vd,
|
|
742
|
+
28: $Ve,
|
|
743
|
+
29: $Vf,
|
|
744
|
+
32: 25,
|
|
745
|
+
33: $Vg,
|
|
746
|
+
35: $Vh,
|
|
747
|
+
37: $Vi,
|
|
748
|
+
38: $Vj,
|
|
749
|
+
41: $Vk,
|
|
750
|
+
45: $Vl,
|
|
751
|
+
48: $Vm,
|
|
752
|
+
51: $Vn,
|
|
753
|
+
52: $Vo,
|
|
754
|
+
53: $Vp,
|
|
755
|
+
54: $Vq,
|
|
756
|
+
57: $Vr
|
|
757
|
+
},
|
|
758
|
+
o($Vs, [2, 32]),
|
|
759
|
+
o($Vs, [2, 33]),
|
|
760
|
+
o($Vs, [2, 21])
|
|
761
|
+
],
|
|
762
|
+
defaultActions: {
|
|
763
|
+
5: [2, 1],
|
|
764
|
+
6: [2, 2],
|
|
765
|
+
47: [2, 48],
|
|
766
|
+
48: [2, 49]
|
|
767
|
+
},
|
|
768
|
+
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
769
|
+
if (hash.recoverable) this.trace(str);
|
|
770
|
+
else {
|
|
771
|
+
var error = new Error(str);
|
|
772
|
+
error.hash = hash;
|
|
773
|
+
throw error;
|
|
774
|
+
}
|
|
775
|
+
}, "parseError"),
|
|
776
|
+
parse: /* @__PURE__ */ __name(function parse(input) {
|
|
777
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
|
778
|
+
var args = lstack.slice.call(arguments, 1);
|
|
779
|
+
var lexer2 = Object.create(this.lexer);
|
|
780
|
+
var sharedState = { yy: {} };
|
|
781
|
+
for (var k in this.yy) if (Object.prototype.hasOwnProperty.call(this.yy, k)) sharedState.yy[k] = this.yy[k];
|
|
782
|
+
lexer2.setInput(input, sharedState.yy);
|
|
783
|
+
sharedState.yy.lexer = lexer2;
|
|
784
|
+
sharedState.yy.parser = this;
|
|
785
|
+
if (typeof lexer2.yylloc == "undefined") lexer2.yylloc = {};
|
|
786
|
+
var yyloc = lexer2.yylloc;
|
|
787
|
+
lstack.push(yyloc);
|
|
788
|
+
var ranges = lexer2.options && lexer2.options.ranges;
|
|
789
|
+
if (typeof sharedState.yy.parseError === "function") this.parseError = sharedState.yy.parseError;
|
|
790
|
+
else this.parseError = Object.getPrototypeOf(this).parseError;
|
|
791
|
+
function popStack(n) {
|
|
792
|
+
stack.length = stack.length - 2 * n;
|
|
793
|
+
vstack.length = vstack.length - n;
|
|
794
|
+
lstack.length = lstack.length - n;
|
|
795
|
+
}
|
|
796
|
+
__name(popStack, "popStack");
|
|
797
|
+
function lex() {
|
|
798
|
+
var token = tstack.pop() || lexer2.lex() || EOF;
|
|
799
|
+
if (typeof token !== "number") {
|
|
800
|
+
if (token instanceof Array) {
|
|
801
|
+
tstack = token;
|
|
802
|
+
token = tstack.pop();
|
|
803
|
+
}
|
|
804
|
+
token = self.symbols_[token] || token;
|
|
805
|
+
}
|
|
806
|
+
return token;
|
|
807
|
+
}
|
|
808
|
+
__name(lex, "lex");
|
|
809
|
+
var symbol, preErrorSymbol, state, action, r, yyval = {}, p, len, newState, expected;
|
|
810
|
+
while (true) {
|
|
811
|
+
state = stack[stack.length - 1];
|
|
812
|
+
if (this.defaultActions[state]) action = this.defaultActions[state];
|
|
813
|
+
else {
|
|
814
|
+
if (symbol === null || typeof symbol == "undefined") symbol = lex();
|
|
815
|
+
action = table[state] && table[state][symbol];
|
|
816
|
+
}
|
|
817
|
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
818
|
+
var errStr = "";
|
|
819
|
+
expected = [];
|
|
820
|
+
for (p in table[state]) if (this.terminals_[p] && p > TERROR) expected.push("'" + this.terminals_[p] + "'");
|
|
821
|
+
if (lexer2.showPosition) errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
822
|
+
else errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
823
|
+
this.parseError(errStr, {
|
|
824
|
+
text: lexer2.match,
|
|
825
|
+
token: this.terminals_[symbol] || symbol,
|
|
826
|
+
line: lexer2.yylineno,
|
|
827
|
+
loc: yyloc,
|
|
828
|
+
expected
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
if (action[0] instanceof Array && action.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
832
|
+
switch (action[0]) {
|
|
833
|
+
case 1:
|
|
834
|
+
stack.push(symbol);
|
|
835
|
+
vstack.push(lexer2.yytext);
|
|
836
|
+
lstack.push(lexer2.yylloc);
|
|
837
|
+
stack.push(action[1]);
|
|
838
|
+
symbol = null;
|
|
839
|
+
if (!preErrorSymbol) {
|
|
840
|
+
yyleng = lexer2.yyleng;
|
|
841
|
+
yytext = lexer2.yytext;
|
|
842
|
+
yylineno = lexer2.yylineno;
|
|
843
|
+
yyloc = lexer2.yylloc;
|
|
844
|
+
if (recovering > 0) recovering--;
|
|
845
|
+
} else {
|
|
846
|
+
symbol = preErrorSymbol;
|
|
847
|
+
preErrorSymbol = null;
|
|
848
|
+
}
|
|
849
|
+
break;
|
|
850
|
+
case 2:
|
|
851
|
+
len = this.productions_[action[1]][1];
|
|
852
|
+
yyval.$ = vstack[vstack.length - len];
|
|
853
|
+
yyval._$ = {
|
|
854
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
855
|
+
last_line: lstack[lstack.length - 1].last_line,
|
|
856
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
857
|
+
last_column: lstack[lstack.length - 1].last_column
|
|
858
|
+
};
|
|
859
|
+
if (ranges) yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
|
860
|
+
r = this.performAction.apply(yyval, [
|
|
861
|
+
yytext,
|
|
862
|
+
yyleng,
|
|
863
|
+
yylineno,
|
|
864
|
+
sharedState.yy,
|
|
865
|
+
action[1],
|
|
866
|
+
vstack,
|
|
867
|
+
lstack
|
|
868
|
+
].concat(args));
|
|
869
|
+
if (typeof r !== "undefined") return r;
|
|
870
|
+
if (len) {
|
|
871
|
+
stack = stack.slice(0, -1 * len * 2);
|
|
872
|
+
vstack = vstack.slice(0, -1 * len);
|
|
873
|
+
lstack = lstack.slice(0, -1 * len);
|
|
874
|
+
}
|
|
875
|
+
stack.push(this.productions_[action[1]][0]);
|
|
876
|
+
vstack.push(yyval.$);
|
|
877
|
+
lstack.push(yyval._$);
|
|
878
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
879
|
+
stack.push(newState);
|
|
880
|
+
break;
|
|
881
|
+
case 3: return true;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
return true;
|
|
885
|
+
}, "parse")
|
|
886
|
+
};
|
|
887
|
+
parser2.lexer = /* @__PURE__ */ (function() {
|
|
888
|
+
return {
|
|
889
|
+
EOF: 1,
|
|
890
|
+
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
891
|
+
if (this.yy.parser) this.yy.parser.parseError(str, hash);
|
|
892
|
+
else throw new Error(str);
|
|
893
|
+
}, "parseError"),
|
|
894
|
+
setInput: /* @__PURE__ */ __name(function(input, yy) {
|
|
895
|
+
this.yy = yy || this.yy || {};
|
|
896
|
+
this._input = input;
|
|
897
|
+
this._more = this._backtrack = this.done = false;
|
|
898
|
+
this.yylineno = this.yyleng = 0;
|
|
899
|
+
this.yytext = this.matched = this.match = "";
|
|
900
|
+
this.conditionStack = ["INITIAL"];
|
|
901
|
+
this.yylloc = {
|
|
902
|
+
first_line: 1,
|
|
903
|
+
first_column: 0,
|
|
904
|
+
last_line: 1,
|
|
905
|
+
last_column: 0
|
|
906
|
+
};
|
|
907
|
+
if (this.options.ranges) this.yylloc.range = [0, 0];
|
|
908
|
+
this.offset = 0;
|
|
909
|
+
return this;
|
|
910
|
+
}, "setInput"),
|
|
911
|
+
input: /* @__PURE__ */ __name(function() {
|
|
912
|
+
var ch = this._input[0];
|
|
913
|
+
this.yytext += ch;
|
|
914
|
+
this.yyleng++;
|
|
915
|
+
this.offset++;
|
|
916
|
+
this.match += ch;
|
|
917
|
+
this.matched += ch;
|
|
918
|
+
if (ch.match(/(?:\r\n?|\n).*/g)) {
|
|
919
|
+
this.yylineno++;
|
|
920
|
+
this.yylloc.last_line++;
|
|
921
|
+
} else this.yylloc.last_column++;
|
|
922
|
+
if (this.options.ranges) this.yylloc.range[1]++;
|
|
923
|
+
this._input = this._input.slice(1);
|
|
924
|
+
return ch;
|
|
925
|
+
}, "input"),
|
|
926
|
+
unput: /* @__PURE__ */ __name(function(ch) {
|
|
927
|
+
var len = ch.length;
|
|
928
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
929
|
+
this._input = ch + this._input;
|
|
930
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
931
|
+
this.offset -= len;
|
|
932
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
933
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
|
934
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
935
|
+
if (lines.length - 1) this.yylineno -= lines.length - 1;
|
|
936
|
+
var r = this.yylloc.range;
|
|
937
|
+
this.yylloc = {
|
|
938
|
+
first_line: this.yylloc.first_line,
|
|
939
|
+
last_line: this.yylineno + 1,
|
|
940
|
+
first_column: this.yylloc.first_column,
|
|
941
|
+
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
942
|
+
};
|
|
943
|
+
if (this.options.ranges) this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
944
|
+
this.yyleng = this.yytext.length;
|
|
945
|
+
return this;
|
|
946
|
+
}, "unput"),
|
|
947
|
+
more: /* @__PURE__ */ __name(function() {
|
|
948
|
+
this._more = true;
|
|
949
|
+
return this;
|
|
950
|
+
}, "more"),
|
|
951
|
+
reject: /* @__PURE__ */ __name(function() {
|
|
952
|
+
if (this.options.backtrack_lexer) this._backtrack = true;
|
|
953
|
+
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(), {
|
|
954
|
+
text: "",
|
|
955
|
+
token: null,
|
|
956
|
+
line: this.yylineno
|
|
957
|
+
});
|
|
958
|
+
return this;
|
|
959
|
+
}, "reject"),
|
|
960
|
+
less: /* @__PURE__ */ __name(function(n) {
|
|
961
|
+
this.unput(this.match.slice(n));
|
|
962
|
+
}, "less"),
|
|
963
|
+
pastInput: /* @__PURE__ */ __name(function() {
|
|
964
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
965
|
+
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
966
|
+
}, "pastInput"),
|
|
967
|
+
upcomingInput: /* @__PURE__ */ __name(function() {
|
|
968
|
+
var next = this.match;
|
|
969
|
+
if (next.length < 20) next += this._input.substr(0, 20 - next.length);
|
|
970
|
+
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
971
|
+
}, "upcomingInput"),
|
|
972
|
+
showPosition: /* @__PURE__ */ __name(function() {
|
|
973
|
+
var pre = this.pastInput();
|
|
974
|
+
var c = new Array(pre.length + 1).join("-");
|
|
975
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
976
|
+
}, "showPosition"),
|
|
977
|
+
test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
|
|
978
|
+
var token, lines, backup;
|
|
979
|
+
if (this.options.backtrack_lexer) {
|
|
980
|
+
backup = {
|
|
981
|
+
yylineno: this.yylineno,
|
|
982
|
+
yylloc: {
|
|
983
|
+
first_line: this.yylloc.first_line,
|
|
984
|
+
last_line: this.last_line,
|
|
985
|
+
first_column: this.yylloc.first_column,
|
|
986
|
+
last_column: this.yylloc.last_column
|
|
987
|
+
},
|
|
988
|
+
yytext: this.yytext,
|
|
989
|
+
match: this.match,
|
|
990
|
+
matches: this.matches,
|
|
991
|
+
matched: this.matched,
|
|
992
|
+
yyleng: this.yyleng,
|
|
993
|
+
offset: this.offset,
|
|
994
|
+
_more: this._more,
|
|
995
|
+
_input: this._input,
|
|
996
|
+
yy: this.yy,
|
|
997
|
+
conditionStack: this.conditionStack.slice(0),
|
|
998
|
+
done: this.done
|
|
999
|
+
};
|
|
1000
|
+
if (this.options.ranges) backup.yylloc.range = this.yylloc.range.slice(0);
|
|
1001
|
+
}
|
|
1002
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
1003
|
+
if (lines) this.yylineno += lines.length;
|
|
1004
|
+
this.yylloc = {
|
|
1005
|
+
first_line: this.yylloc.last_line,
|
|
1006
|
+
last_line: this.yylineno + 1,
|
|
1007
|
+
first_column: this.yylloc.last_column,
|
|
1008
|
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
1009
|
+
};
|
|
1010
|
+
this.yytext += match[0];
|
|
1011
|
+
this.match += match[0];
|
|
1012
|
+
this.matches = match;
|
|
1013
|
+
this.yyleng = this.yytext.length;
|
|
1014
|
+
if (this.options.ranges) this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
1015
|
+
this._more = false;
|
|
1016
|
+
this._backtrack = false;
|
|
1017
|
+
this._input = this._input.slice(match[0].length);
|
|
1018
|
+
this.matched += match[0];
|
|
1019
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
1020
|
+
if (this.done && this._input) this.done = false;
|
|
1021
|
+
if (token) return token;
|
|
1022
|
+
else if (this._backtrack) {
|
|
1023
|
+
for (var k in backup) this[k] = backup[k];
|
|
1024
|
+
return false;
|
|
1025
|
+
}
|
|
1026
|
+
return false;
|
|
1027
|
+
}, "test_match"),
|
|
1028
|
+
next: /* @__PURE__ */ __name(function() {
|
|
1029
|
+
if (this.done) return this.EOF;
|
|
1030
|
+
if (!this._input) this.done = true;
|
|
1031
|
+
var token, match, tempMatch, index;
|
|
1032
|
+
if (!this._more) {
|
|
1033
|
+
this.yytext = "";
|
|
1034
|
+
this.match = "";
|
|
1035
|
+
}
|
|
1036
|
+
var rules = this._currentRules();
|
|
1037
|
+
for (var i = 0; i < rules.length; i++) {
|
|
1038
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
1039
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
1040
|
+
match = tempMatch;
|
|
1041
|
+
index = i;
|
|
1042
|
+
if (this.options.backtrack_lexer) {
|
|
1043
|
+
token = this.test_match(tempMatch, rules[i]);
|
|
1044
|
+
if (token !== false) return token;
|
|
1045
|
+
else if (this._backtrack) {
|
|
1046
|
+
match = false;
|
|
1047
|
+
continue;
|
|
1048
|
+
} else return false;
|
|
1049
|
+
} else if (!this.options.flex) break;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
if (match) {
|
|
1053
|
+
token = this.test_match(match, rules[index]);
|
|
1054
|
+
if (token !== false) return token;
|
|
1055
|
+
return false;
|
|
1056
|
+
}
|
|
1057
|
+
if (this._input === "") return this.EOF;
|
|
1058
|
+
else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
1059
|
+
text: "",
|
|
1060
|
+
token: null,
|
|
1061
|
+
line: this.yylineno
|
|
1062
|
+
});
|
|
1063
|
+
}, "next"),
|
|
1064
|
+
lex: /* @__PURE__ */ __name(function lex() {
|
|
1065
|
+
var r = this.next();
|
|
1066
|
+
if (r) return r;
|
|
1067
|
+
else return this.lex();
|
|
1068
|
+
}, "lex"),
|
|
1069
|
+
begin: /* @__PURE__ */ __name(function begin(condition) {
|
|
1070
|
+
this.conditionStack.push(condition);
|
|
1071
|
+
}, "begin"),
|
|
1072
|
+
popState: /* @__PURE__ */ __name(function popState() {
|
|
1073
|
+
if (this.conditionStack.length - 1 > 0) return this.conditionStack.pop();
|
|
1074
|
+
else return this.conditionStack[0];
|
|
1075
|
+
}, "popState"),
|
|
1076
|
+
_currentRules: /* @__PURE__ */ __name(function _currentRules() {
|
|
1077
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
1078
|
+
else return this.conditions["INITIAL"].rules;
|
|
1079
|
+
}, "_currentRules"),
|
|
1080
|
+
topState: /* @__PURE__ */ __name(function topState(n) {
|
|
1081
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
1082
|
+
if (n >= 0) return this.conditionStack[n];
|
|
1083
|
+
else return "INITIAL";
|
|
1084
|
+
}, "topState"),
|
|
1085
|
+
pushState: /* @__PURE__ */ __name(function pushState(condition) {
|
|
1086
|
+
this.begin(condition);
|
|
1087
|
+
}, "pushState"),
|
|
1088
|
+
stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
|
|
1089
|
+
return this.conditionStack.length;
|
|
1090
|
+
}, "stateStackSize"),
|
|
1091
|
+
options: { "case-insensitive": true },
|
|
1092
|
+
performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
1093
|
+
function processId() {
|
|
1094
|
+
const idx = yy_.yytext.indexOf("%%");
|
|
1095
|
+
if (idx === 0) return false;
|
|
1096
|
+
if (idx > 0) {
|
|
1097
|
+
const before = yy_.yytext.slice(0, idx);
|
|
1098
|
+
const after = yy_.yytext.slice(idx);
|
|
1099
|
+
if (after) yy.lexer.unput(after);
|
|
1100
|
+
yy_.yytext = before;
|
|
1101
|
+
}
|
|
1102
|
+
return true;
|
|
1103
|
+
}
|
|
1104
|
+
__name(processId, "processId");
|
|
1105
|
+
switch ($avoiding_name_collisions) {
|
|
1106
|
+
case 0: return 38;
|
|
1107
|
+
case 1: return 40;
|
|
1108
|
+
case 2: return 39;
|
|
1109
|
+
case 3: return 44;
|
|
1110
|
+
case 4: return 51;
|
|
1111
|
+
case 5: return 52;
|
|
1112
|
+
case 6: return 53;
|
|
1113
|
+
case 7: return 54;
|
|
1114
|
+
case 8: return 5;
|
|
1115
|
+
case 9: break;
|
|
1116
|
+
case 10: break;
|
|
1117
|
+
case 11: break;
|
|
1118
|
+
case 12: break;
|
|
1119
|
+
case 13:
|
|
1120
|
+
this.pushState("SCALE");
|
|
1121
|
+
return 17;
|
|
1122
|
+
case 14: return 18;
|
|
1123
|
+
case 15:
|
|
1124
|
+
this.popState();
|
|
1125
|
+
break;
|
|
1126
|
+
case 16:
|
|
1127
|
+
this.begin("acc_title");
|
|
1128
|
+
return 33;
|
|
1129
|
+
case 17:
|
|
1130
|
+
this.popState();
|
|
1131
|
+
return "acc_title_value";
|
|
1132
|
+
case 18:
|
|
1133
|
+
this.begin("acc_descr");
|
|
1134
|
+
return 35;
|
|
1135
|
+
case 19:
|
|
1136
|
+
this.popState();
|
|
1137
|
+
return "acc_descr_value";
|
|
1138
|
+
case 20:
|
|
1139
|
+
this.begin("acc_descr_multiline");
|
|
1140
|
+
break;
|
|
1141
|
+
case 21:
|
|
1142
|
+
this.popState();
|
|
1143
|
+
break;
|
|
1144
|
+
case 22: return "acc_descr_multiline_value";
|
|
1145
|
+
case 23:
|
|
1146
|
+
this.pushState("CLASSDEF");
|
|
1147
|
+
return 41;
|
|
1148
|
+
case 24:
|
|
1149
|
+
this.popState();
|
|
1150
|
+
this.pushState("CLASSDEFID");
|
|
1151
|
+
return "DEFAULT_CLASSDEF_ID";
|
|
1152
|
+
case 25:
|
|
1153
|
+
this.popState();
|
|
1154
|
+
this.pushState("CLASSDEFID");
|
|
1155
|
+
return 42;
|
|
1156
|
+
case 26:
|
|
1157
|
+
this.popState();
|
|
1158
|
+
return 43;
|
|
1159
|
+
case 27:
|
|
1160
|
+
this.pushState("CLASS");
|
|
1161
|
+
return 48;
|
|
1162
|
+
case 28:
|
|
1163
|
+
this.popState();
|
|
1164
|
+
this.pushState("CLASS_STYLE");
|
|
1165
|
+
return 49;
|
|
1166
|
+
case 29:
|
|
1167
|
+
this.popState();
|
|
1168
|
+
return 50;
|
|
1169
|
+
case 30:
|
|
1170
|
+
this.pushState("STYLE");
|
|
1171
|
+
return 45;
|
|
1172
|
+
case 31:
|
|
1173
|
+
this.popState();
|
|
1174
|
+
this.pushState("STYLEDEF_STYLES");
|
|
1175
|
+
return 46;
|
|
1176
|
+
case 32:
|
|
1177
|
+
this.popState();
|
|
1178
|
+
return 47;
|
|
1179
|
+
case 33:
|
|
1180
|
+
this.pushState("SCALE");
|
|
1181
|
+
return 17;
|
|
1182
|
+
case 34: return 18;
|
|
1183
|
+
case 35:
|
|
1184
|
+
this.popState();
|
|
1185
|
+
break;
|
|
1186
|
+
case 36:
|
|
1187
|
+
this.pushState("STATE");
|
|
1188
|
+
break;
|
|
1189
|
+
case 37:
|
|
1190
|
+
this.popState();
|
|
1191
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
1192
|
+
return 25;
|
|
1193
|
+
case 38:
|
|
1194
|
+
this.popState();
|
|
1195
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
1196
|
+
return 26;
|
|
1197
|
+
case 39:
|
|
1198
|
+
this.popState();
|
|
1199
|
+
yy_.yytext = yy_.yytext.slice(0, -10).trim();
|
|
1200
|
+
return 27;
|
|
1201
|
+
case 40:
|
|
1202
|
+
this.popState();
|
|
1203
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
1204
|
+
return 25;
|
|
1205
|
+
case 41:
|
|
1206
|
+
this.popState();
|
|
1207
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
1208
|
+
return 26;
|
|
1209
|
+
case 42:
|
|
1210
|
+
this.popState();
|
|
1211
|
+
yy_.yytext = yy_.yytext.slice(0, -10).trim();
|
|
1212
|
+
return 27;
|
|
1213
|
+
case 43: return 51;
|
|
1214
|
+
case 44: return 52;
|
|
1215
|
+
case 45: return 53;
|
|
1216
|
+
case 46: return 54;
|
|
1217
|
+
case 47:
|
|
1218
|
+
this.pushState("STATE_STRING");
|
|
1219
|
+
break;
|
|
1220
|
+
case 48:
|
|
1221
|
+
this.pushState("STATE_ID");
|
|
1222
|
+
return "AS";
|
|
1223
|
+
case 49:
|
|
1224
|
+
if (!processId()) return;
|
|
1225
|
+
this.popState();
|
|
1226
|
+
return "ID";
|
|
1227
|
+
case 50:
|
|
1228
|
+
this.popState();
|
|
1229
|
+
break;
|
|
1230
|
+
case 51: return "STATE_DESCR";
|
|
1231
|
+
case 52: throw new Error("Error: State name must be a single word. Found: \"" + yy_.yytext.trim() + "\"");
|
|
1232
|
+
case 53: return 19;
|
|
1233
|
+
case 54:
|
|
1234
|
+
this.popState();
|
|
1235
|
+
break;
|
|
1236
|
+
case 55:
|
|
1237
|
+
this.popState();
|
|
1238
|
+
this.pushState("struct");
|
|
1239
|
+
return 20;
|
|
1240
|
+
case 56:
|
|
1241
|
+
this.popState();
|
|
1242
|
+
return 21;
|
|
1243
|
+
case 57: break;
|
|
1244
|
+
case 58:
|
|
1245
|
+
this.begin("NOTE");
|
|
1246
|
+
return 29;
|
|
1247
|
+
case 59:
|
|
1248
|
+
this.popState();
|
|
1249
|
+
this.pushState("NOTE_ID");
|
|
1250
|
+
return 59;
|
|
1251
|
+
case 60:
|
|
1252
|
+
this.popState();
|
|
1253
|
+
this.pushState("NOTE_ID");
|
|
1254
|
+
return 60;
|
|
1255
|
+
case 61:
|
|
1256
|
+
this.popState();
|
|
1257
|
+
this.pushState("FLOATING_NOTE");
|
|
1258
|
+
break;
|
|
1259
|
+
case 62:
|
|
1260
|
+
this.popState();
|
|
1261
|
+
this.pushState("FLOATING_NOTE_ID");
|
|
1262
|
+
return "AS";
|
|
1263
|
+
case 63: break;
|
|
1264
|
+
case 64: return "NOTE_TEXT";
|
|
1265
|
+
case 65:
|
|
1266
|
+
if (!processId()) return;
|
|
1267
|
+
this.popState();
|
|
1268
|
+
return "ID";
|
|
1269
|
+
case 66:
|
|
1270
|
+
if (!processId()) return;
|
|
1271
|
+
this.popState();
|
|
1272
|
+
this.pushState("NOTE_TEXT");
|
|
1273
|
+
return 24;
|
|
1274
|
+
case 67:
|
|
1275
|
+
this.popState();
|
|
1276
|
+
yy_.yytext = yy_.yytext.substr(2).trim();
|
|
1277
|
+
return 31;
|
|
1278
|
+
case 68:
|
|
1279
|
+
this.popState();
|
|
1280
|
+
yy_.yytext = yy_.yytext.slice(0, -8).trim();
|
|
1281
|
+
return 31;
|
|
1282
|
+
case 69: return 6;
|
|
1283
|
+
case 70: return 6;
|
|
1284
|
+
case 71: return 16;
|
|
1285
|
+
case 72: return 57;
|
|
1286
|
+
case 73:
|
|
1287
|
+
if (!processId()) return;
|
|
1288
|
+
return 24;
|
|
1289
|
+
case 74:
|
|
1290
|
+
yy_.yytext = yy_.yytext.trim();
|
|
1291
|
+
return 14;
|
|
1292
|
+
case 75: return 15;
|
|
1293
|
+
case 76: return 28;
|
|
1294
|
+
case 77: return 58;
|
|
1295
|
+
case 78: return 5;
|
|
1296
|
+
case 79: return "INVALID";
|
|
1297
|
+
}
|
|
1298
|
+
}, "anonymous"),
|
|
1299
|
+
rules: [
|
|
1300
|
+
/^(?:click\b)/i,
|
|
1301
|
+
/^(?:href\b)/i,
|
|
1302
|
+
/^(?:"[^"]*")/i,
|
|
1303
|
+
/^(?:default\b)/i,
|
|
1304
|
+
/^(?:.*direction\s+TB[^\n]*)/i,
|
|
1305
|
+
/^(?:.*direction\s+BT[^\n]*)/i,
|
|
1306
|
+
/^(?:.*direction\s+RL[^\n]*)/i,
|
|
1307
|
+
/^(?:.*direction\s+LR[^\n]*)/i,
|
|
1308
|
+
/^(?:[\n]+)/i,
|
|
1309
|
+
/^(?:[\s]+)/i,
|
|
1310
|
+
/^(?:((?!\n)\s)+)/i,
|
|
1311
|
+
/^(?:#[^\n]*)/i,
|
|
1312
|
+
/^(?:%%(?!\{)[^\n]*)/i,
|
|
1313
|
+
/^(?:scale\s+)/i,
|
|
1314
|
+
/^(?:\d+)/i,
|
|
1315
|
+
/^(?:\s+width\b)/i,
|
|
1316
|
+
/^(?:accTitle\s*:\s*)/i,
|
|
1317
|
+
/^(?:(?!\n||)*[^\n]*)/i,
|
|
1318
|
+
/^(?:accDescr\s*:\s*)/i,
|
|
1319
|
+
/^(?:(?!\n||)*[^\n]*)/i,
|
|
1320
|
+
/^(?:accDescr\s*\{\s*)/i,
|
|
1321
|
+
/^(?:[\}])/i,
|
|
1322
|
+
/^(?:[^\}]*)/i,
|
|
1323
|
+
/^(?:classDef\s+)/i,
|
|
1324
|
+
/^(?:DEFAULT\s+)/i,
|
|
1325
|
+
/^(?:\w+\s+)/i,
|
|
1326
|
+
/^(?:[^\n]*)/i,
|
|
1327
|
+
/^(?:class\s+)/i,
|
|
1328
|
+
/^(?:(\w+)+((,\s*\w+)*))/i,
|
|
1329
|
+
/^(?:[^\n]*)/i,
|
|
1330
|
+
/^(?:style\s+)/i,
|
|
1331
|
+
/^(?:[\w,]+\s+)/i,
|
|
1332
|
+
/^(?:[^\n]*)/i,
|
|
1333
|
+
/^(?:scale\s+)/i,
|
|
1334
|
+
/^(?:\d+)/i,
|
|
1335
|
+
/^(?:\s+width\b)/i,
|
|
1336
|
+
/^(?:state\s+)/i,
|
|
1337
|
+
/^(?:.*<<fork>>)/i,
|
|
1338
|
+
/^(?:.*<<join>>)/i,
|
|
1339
|
+
/^(?:.*<<choice>>)/i,
|
|
1340
|
+
/^(?:.*\[\[fork\]\])/i,
|
|
1341
|
+
/^(?:.*\[\[join\]\])/i,
|
|
1342
|
+
/^(?:.*\[\[choice\]\])/i,
|
|
1343
|
+
/^(?:.*direction\s+TB[^\n]*)/i,
|
|
1344
|
+
/^(?:.*direction\s+BT[^\n]*)/i,
|
|
1345
|
+
/^(?:.*direction\s+RL[^\n]*)/i,
|
|
1346
|
+
/^(?:.*direction\s+LR[^\n]*)/i,
|
|
1347
|
+
/^(?:["])/i,
|
|
1348
|
+
/^(?:\s*as\s+)/i,
|
|
1349
|
+
/^(?:[^\n\{]*)/i,
|
|
1350
|
+
/^(?:["])/i,
|
|
1351
|
+
/^(?:[^"]*)/i,
|
|
1352
|
+
/^(?:\w+\s+\w+.*?\{)/i,
|
|
1353
|
+
/^(?:[^\n\s\{]+)/i,
|
|
1354
|
+
/^(?:\n)/i,
|
|
1355
|
+
/^(?:\{)/i,
|
|
1356
|
+
/^(?:\})/i,
|
|
1357
|
+
/^(?:[\n])/i,
|
|
1358
|
+
/^(?:note\s+)/i,
|
|
1359
|
+
/^(?:left of\b)/i,
|
|
1360
|
+
/^(?:right of\b)/i,
|
|
1361
|
+
/^(?:")/i,
|
|
1362
|
+
/^(?:\s*as\s*)/i,
|
|
1363
|
+
/^(?:["])/i,
|
|
1364
|
+
/^(?:[^"]*)/i,
|
|
1365
|
+
/^(?:[^\n]*)/i,
|
|
1366
|
+
/^(?:\s*[^:\n\s\-]+)/i,
|
|
1367
|
+
/^(?:\s*:[^:\n;]+)/i,
|
|
1368
|
+
/^(?:[\s\S]*?\n\s*end note\b)/i,
|
|
1369
|
+
/^(?:stateDiagram\s+)/i,
|
|
1370
|
+
/^(?:stateDiagram-v2\s+)/i,
|
|
1371
|
+
/^(?:hide empty description\b)/i,
|
|
1372
|
+
/^(?:\[\*\])/i,
|
|
1373
|
+
/^(?:[^:\n\s\-\{]+)/i,
|
|
1374
|
+
/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,
|
|
1375
|
+
/^(?:-->)/i,
|
|
1376
|
+
/^(?:--)/i,
|
|
1377
|
+
/^(?::::)/i,
|
|
1378
|
+
/^(?:$)/i,
|
|
1379
|
+
/^(?:.)/i
|
|
1380
|
+
],
|
|
1381
|
+
conditions: {
|
|
1382
|
+
"LINE": {
|
|
1383
|
+
"rules": [
|
|
1384
|
+
10,
|
|
1385
|
+
11,
|
|
1386
|
+
12
|
|
1387
|
+
],
|
|
1388
|
+
"inclusive": false
|
|
1389
|
+
},
|
|
1390
|
+
"struct": {
|
|
1391
|
+
"rules": [
|
|
1392
|
+
10,
|
|
1393
|
+
11,
|
|
1394
|
+
12,
|
|
1395
|
+
23,
|
|
1396
|
+
27,
|
|
1397
|
+
30,
|
|
1398
|
+
36,
|
|
1399
|
+
43,
|
|
1400
|
+
44,
|
|
1401
|
+
45,
|
|
1402
|
+
46,
|
|
1403
|
+
56,
|
|
1404
|
+
57,
|
|
1405
|
+
58,
|
|
1406
|
+
72,
|
|
1407
|
+
73,
|
|
1408
|
+
74,
|
|
1409
|
+
75,
|
|
1410
|
+
76,
|
|
1411
|
+
77
|
|
1412
|
+
],
|
|
1413
|
+
"inclusive": false
|
|
1414
|
+
},
|
|
1415
|
+
"FLOATING_NOTE_ID": {
|
|
1416
|
+
"rules": [65],
|
|
1417
|
+
"inclusive": false
|
|
1418
|
+
},
|
|
1419
|
+
"FLOATING_NOTE": {
|
|
1420
|
+
"rules": [
|
|
1421
|
+
62,
|
|
1422
|
+
63,
|
|
1423
|
+
64
|
|
1424
|
+
],
|
|
1425
|
+
"inclusive": false
|
|
1426
|
+
},
|
|
1427
|
+
"NOTE_TEXT": {
|
|
1428
|
+
"rules": [67, 68],
|
|
1429
|
+
"inclusive": false
|
|
1430
|
+
},
|
|
1431
|
+
"NOTE_ID": {
|
|
1432
|
+
"rules": [66],
|
|
1433
|
+
"inclusive": false
|
|
1434
|
+
},
|
|
1435
|
+
"NOTE": {
|
|
1436
|
+
"rules": [
|
|
1437
|
+
59,
|
|
1438
|
+
60,
|
|
1439
|
+
61
|
|
1440
|
+
],
|
|
1441
|
+
"inclusive": false
|
|
1442
|
+
},
|
|
1443
|
+
"STYLEDEF_STYLEOPTS": {
|
|
1444
|
+
"rules": [],
|
|
1445
|
+
"inclusive": false
|
|
1446
|
+
},
|
|
1447
|
+
"STYLEDEF_STYLES": {
|
|
1448
|
+
"rules": [32],
|
|
1449
|
+
"inclusive": false
|
|
1450
|
+
},
|
|
1451
|
+
"STYLE_IDS": {
|
|
1452
|
+
"rules": [],
|
|
1453
|
+
"inclusive": false
|
|
1454
|
+
},
|
|
1455
|
+
"STYLE": {
|
|
1456
|
+
"rules": [31],
|
|
1457
|
+
"inclusive": false
|
|
1458
|
+
},
|
|
1459
|
+
"CLASS_STYLE": {
|
|
1460
|
+
"rules": [29],
|
|
1461
|
+
"inclusive": false
|
|
1462
|
+
},
|
|
1463
|
+
"CLASS": {
|
|
1464
|
+
"rules": [28],
|
|
1465
|
+
"inclusive": false
|
|
1466
|
+
},
|
|
1467
|
+
"CLASSDEFID": {
|
|
1468
|
+
"rules": [26],
|
|
1469
|
+
"inclusive": false
|
|
1470
|
+
},
|
|
1471
|
+
"CLASSDEF": {
|
|
1472
|
+
"rules": [24, 25],
|
|
1473
|
+
"inclusive": false
|
|
1474
|
+
},
|
|
1475
|
+
"acc_descr_multiline": {
|
|
1476
|
+
"rules": [21, 22],
|
|
1477
|
+
"inclusive": false
|
|
1478
|
+
},
|
|
1479
|
+
"acc_descr": {
|
|
1480
|
+
"rules": [19],
|
|
1481
|
+
"inclusive": false
|
|
1482
|
+
},
|
|
1483
|
+
"acc_title": {
|
|
1484
|
+
"rules": [17],
|
|
1485
|
+
"inclusive": false
|
|
1486
|
+
},
|
|
1487
|
+
"SCALE": {
|
|
1488
|
+
"rules": [
|
|
1489
|
+
14,
|
|
1490
|
+
15,
|
|
1491
|
+
34,
|
|
1492
|
+
35
|
|
1493
|
+
],
|
|
1494
|
+
"inclusive": false
|
|
1495
|
+
},
|
|
1496
|
+
"ALIAS": {
|
|
1497
|
+
"rules": [],
|
|
1498
|
+
"inclusive": false
|
|
1499
|
+
},
|
|
1500
|
+
"STATE_ID": {
|
|
1501
|
+
"rules": [49],
|
|
1502
|
+
"inclusive": false
|
|
1503
|
+
},
|
|
1504
|
+
"STATE_STRING": {
|
|
1505
|
+
"rules": [50, 51],
|
|
1506
|
+
"inclusive": false
|
|
1507
|
+
},
|
|
1508
|
+
"FORK_STATE": {
|
|
1509
|
+
"rules": [],
|
|
1510
|
+
"inclusive": false
|
|
1511
|
+
},
|
|
1512
|
+
"STATE": {
|
|
1513
|
+
"rules": [
|
|
1514
|
+
10,
|
|
1515
|
+
11,
|
|
1516
|
+
12,
|
|
1517
|
+
37,
|
|
1518
|
+
38,
|
|
1519
|
+
39,
|
|
1520
|
+
40,
|
|
1521
|
+
41,
|
|
1522
|
+
42,
|
|
1523
|
+
47,
|
|
1524
|
+
48,
|
|
1525
|
+
52,
|
|
1526
|
+
53,
|
|
1527
|
+
54,
|
|
1528
|
+
55
|
|
1529
|
+
],
|
|
1530
|
+
"inclusive": false
|
|
1531
|
+
},
|
|
1532
|
+
"ID": {
|
|
1533
|
+
"rules": [
|
|
1534
|
+
10,
|
|
1535
|
+
11,
|
|
1536
|
+
12
|
|
1537
|
+
],
|
|
1538
|
+
"inclusive": false
|
|
1539
|
+
},
|
|
1540
|
+
"INITIAL": {
|
|
1541
|
+
"rules": [
|
|
1542
|
+
0,
|
|
1543
|
+
1,
|
|
1544
|
+
2,
|
|
1545
|
+
3,
|
|
1546
|
+
4,
|
|
1547
|
+
5,
|
|
1548
|
+
6,
|
|
1549
|
+
7,
|
|
1550
|
+
8,
|
|
1551
|
+
9,
|
|
1552
|
+
11,
|
|
1553
|
+
12,
|
|
1554
|
+
13,
|
|
1555
|
+
16,
|
|
1556
|
+
18,
|
|
1557
|
+
20,
|
|
1558
|
+
23,
|
|
1559
|
+
27,
|
|
1560
|
+
30,
|
|
1561
|
+
33,
|
|
1562
|
+
36,
|
|
1563
|
+
55,
|
|
1564
|
+
58,
|
|
1565
|
+
69,
|
|
1566
|
+
70,
|
|
1567
|
+
71,
|
|
1568
|
+
72,
|
|
1569
|
+
73,
|
|
1570
|
+
74,
|
|
1571
|
+
75,
|
|
1572
|
+
77,
|
|
1573
|
+
78,
|
|
1574
|
+
79
|
|
1575
|
+
],
|
|
1576
|
+
"inclusive": true
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
};
|
|
1580
|
+
})();
|
|
1581
|
+
function Parser() {
|
|
1582
|
+
this.yy = {};
|
|
1583
|
+
}
|
|
1584
|
+
__name(Parser, "Parser");
|
|
1585
|
+
Parser.prototype = parser2;
|
|
1586
|
+
parser2.Parser = Parser;
|
|
1587
|
+
return new Parser();
|
|
1588
|
+
})();
|
|
1589
|
+
parser.parser = parser;
|
|
1590
|
+
var stateDiagram_default = parser;
|
|
1591
|
+
var DEFAULT_DIAGRAM_DIRECTION = "TB";
|
|
1592
|
+
var DEFAULT_NESTED_DOC_DIR = "TB";
|
|
1593
|
+
var STMT_DIRECTION = "dir";
|
|
1594
|
+
var STMT_STATE = "state";
|
|
1595
|
+
var STMT_ROOT = "root";
|
|
1596
|
+
var STMT_RELATION = "relation";
|
|
1597
|
+
var STMT_CLASSDEF = "classDef";
|
|
1598
|
+
var STMT_STYLEDEF = "style";
|
|
1599
|
+
var STMT_APPLYCLASS = "applyClass";
|
|
1600
|
+
var DEFAULT_STATE_TYPE = "default";
|
|
1601
|
+
var DIVIDER_TYPE = "divider";
|
|
1602
|
+
var G_EDGE_STYLE = "fill:none";
|
|
1603
|
+
var G_EDGE_ARROWHEADSTYLE = "fill: #333";
|
|
1604
|
+
var G_EDGE_LABELPOS = "c";
|
|
1605
|
+
var G_EDGE_LABELTYPE = "markdown";
|
|
1606
|
+
var G_EDGE_THICKNESS = "normal";
|
|
1607
|
+
var SHAPE_STATE = "rect";
|
|
1608
|
+
var SHAPE_STATE_WITH_DESC = "rectWithTitle";
|
|
1609
|
+
var SHAPE_START = "stateStart";
|
|
1610
|
+
var SHAPE_END = "stateEnd";
|
|
1611
|
+
var SHAPE_DIVIDER = "divider";
|
|
1612
|
+
var SHAPE_GROUP = "roundedWithTitle";
|
|
1613
|
+
var SHAPE_NOTE = "note";
|
|
1614
|
+
var SHAPE_NOTEGROUP = "noteGroup";
|
|
1615
|
+
var CSS_DIAGRAM = "statediagram";
|
|
1616
|
+
var CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-state`;
|
|
1617
|
+
var CSS_EDGE = "transition";
|
|
1618
|
+
var CSS_NOTE = "note";
|
|
1619
|
+
var CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} note-edge`;
|
|
1620
|
+
var CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`;
|
|
1621
|
+
var CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-cluster`;
|
|
1622
|
+
var CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-cluster-alt`;
|
|
1623
|
+
var PARENT = "parent";
|
|
1624
|
+
var NOTE = "note";
|
|
1625
|
+
var DOMID_STATE = "state";
|
|
1626
|
+
var DOMID_TYPE_SPACER = "----";
|
|
1627
|
+
var NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`;
|
|
1628
|
+
var PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`;
|
|
1629
|
+
var getDir = /* @__PURE__ */ __name((parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {
|
|
1630
|
+
if (!parsedItem.doc) return defaultDir;
|
|
1631
|
+
let dir = defaultDir;
|
|
1632
|
+
for (const parsedItemDoc of parsedItem.doc) if (parsedItemDoc.stmt === "dir") dir = parsedItemDoc.value;
|
|
1633
|
+
return dir;
|
|
1634
|
+
}, "getDir");
|
|
1635
|
+
var stateRenderer_v3_unified_default = {
|
|
1636
|
+
getClasses: /* @__PURE__ */ __name(function(text, diagramObj) {
|
|
1637
|
+
return diagramObj.db.getClasses();
|
|
1638
|
+
}, "getClasses"),
|
|
1639
|
+
draw: /* @__PURE__ */ __name(async function(text, id, _version, diag) {
|
|
1640
|
+
log.info("REF0:");
|
|
1641
|
+
log.info("Drawing state diagram (v2)", id);
|
|
1642
|
+
const { securityLevel, state: conf, layout } = getConfig2();
|
|
1643
|
+
diag.db.extract(diag.db.getRootDocV2());
|
|
1644
|
+
const data4Layout = diag.db.getData();
|
|
1645
|
+
const svg = getDiagramElement(id, securityLevel);
|
|
1646
|
+
data4Layout.type = diag.type;
|
|
1647
|
+
data4Layout.layoutAlgorithm = layout;
|
|
1648
|
+
data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
|
|
1649
|
+
data4Layout.rankSpacing = conf?.rankSpacing || 50;
|
|
1650
|
+
if (getConfig2().look === "neo") data4Layout.markers = ["barbNeo"];
|
|
1651
|
+
else data4Layout.markers = ["barb"];
|
|
1652
|
+
data4Layout.diagramId = id;
|
|
1653
|
+
await render(data4Layout, svg);
|
|
1654
|
+
const padding = 8;
|
|
1655
|
+
try {
|
|
1656
|
+
(typeof diag.db.getLinks === "function" ? diag.db.getLinks() : /* @__PURE__ */ new Map()).forEach((linkInfo, key) => {
|
|
1657
|
+
const stateId = typeof key === "string" ? key : typeof key?.id === "string" ? key.id : "";
|
|
1658
|
+
const stateNode = data4Layout.nodes.find((node) => node.id === stateId);
|
|
1659
|
+
if (!stateId) {
|
|
1660
|
+
log.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(key));
|
|
1661
|
+
return;
|
|
1662
|
+
}
|
|
1663
|
+
const allNodes = svg.node()?.querySelectorAll("g.node, g.rough-node");
|
|
1664
|
+
let matchedElem;
|
|
1665
|
+
allNodes?.forEach((g) => {
|
|
1666
|
+
const text2 = g.textContent?.trim();
|
|
1667
|
+
if (g.id === stateNode?.domId || text2 === stateId) matchedElem = g;
|
|
1668
|
+
});
|
|
1669
|
+
if (!matchedElem) {
|
|
1670
|
+
log.warn("⚠️ Could not find node matching text:", stateId);
|
|
1671
|
+
return;
|
|
1672
|
+
}
|
|
1673
|
+
const parent = matchedElem.parentNode;
|
|
1674
|
+
if (!parent) {
|
|
1675
|
+
log.warn("⚠️ Node has no parent, cannot wrap:", stateId);
|
|
1676
|
+
return;
|
|
1677
|
+
}
|
|
1678
|
+
const a = document.createElementNS("http://www.w3.org/2000/svg", "a");
|
|
1679
|
+
const cleanedUrl = linkInfo.url.replace(/^"+|"+$/g, "");
|
|
1680
|
+
a.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", cleanedUrl);
|
|
1681
|
+
a.setAttribute("target", "_blank");
|
|
1682
|
+
if (linkInfo.tooltip) {
|
|
1683
|
+
const tooltip = linkInfo.tooltip.replace(/^"+|"+$/g, "");
|
|
1684
|
+
a.setAttribute("title", tooltip);
|
|
1685
|
+
matchedElem.setAttribute("title", tooltip);
|
|
1686
|
+
}
|
|
1687
|
+
parent.replaceChild(a, matchedElem);
|
|
1688
|
+
a.appendChild(matchedElem);
|
|
1689
|
+
log.info("🔗 Wrapped node in <a> tag for:", stateId, linkInfo.url);
|
|
1690
|
+
});
|
|
1691
|
+
} catch (err) {
|
|
1692
|
+
log.error("❌ Error injecting clickable links:", err);
|
|
1693
|
+
}
|
|
1694
|
+
utils_default.insertTitle(svg, "statediagramTitleText", conf?.titleTopMargin ?? 25, diag.db.getDiagramTitle());
|
|
1695
|
+
setupViewPortForSVG(svg, padding, CSS_DIAGRAM, conf?.useMaxWidth ?? true);
|
|
1696
|
+
}, "draw"),
|
|
1697
|
+
getDir
|
|
1698
|
+
};
|
|
1699
|
+
var nodeDb = /* @__PURE__ */ new Map();
|
|
1700
|
+
var graphItemCount = 0;
|
|
1701
|
+
function stateDomId(itemId = "", counter = 0, type = "", typeSpacer = DOMID_TYPE_SPACER) {
|
|
1702
|
+
return `${DOMID_STATE}-${itemId}${type !== null && type.length > 0 ? `${typeSpacer}${type}` : ""}-${counter}`;
|
|
1703
|
+
}
|
|
1704
|
+
__name(stateDomId, "stateDomId");
|
|
1705
|
+
var setupDoc = /* @__PURE__ */ __name((parentParsedItem, doc, diagramStates, nodes, edges, altFlag, look, classes) => {
|
|
1706
|
+
log.trace("items", doc);
|
|
1707
|
+
doc.forEach((item) => {
|
|
1708
|
+
switch (item.stmt) {
|
|
1709
|
+
case STMT_STATE:
|
|
1710
|
+
dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look, classes);
|
|
1711
|
+
break;
|
|
1712
|
+
case DEFAULT_STATE_TYPE:
|
|
1713
|
+
dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look, classes);
|
|
1714
|
+
break;
|
|
1715
|
+
case STMT_RELATION: {
|
|
1716
|
+
dataFetcher(parentParsedItem, item.state1, diagramStates, nodes, edges, altFlag, look, classes);
|
|
1717
|
+
dataFetcher(parentParsedItem, item.state2, diagramStates, nodes, edges, altFlag, look, classes);
|
|
1718
|
+
const isNeo = look === "neo";
|
|
1719
|
+
const edgeData = {
|
|
1720
|
+
id: "edge" + graphItemCount,
|
|
1721
|
+
start: item.state1.id,
|
|
1722
|
+
end: item.state2.id,
|
|
1723
|
+
arrowhead: "normal",
|
|
1724
|
+
arrowTypeEnd: isNeo ? "arrow_barb_neo" : "arrow_barb",
|
|
1725
|
+
style: G_EDGE_STYLE,
|
|
1726
|
+
labelStyle: "",
|
|
1727
|
+
label: common_default.sanitizeText(item.description ?? "", getConfig2()),
|
|
1728
|
+
arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
|
|
1729
|
+
labelpos: G_EDGE_LABELPOS,
|
|
1730
|
+
labelType: G_EDGE_LABELTYPE,
|
|
1731
|
+
thickness: G_EDGE_THICKNESS,
|
|
1732
|
+
classes: CSS_EDGE,
|
|
1733
|
+
look
|
|
1734
|
+
};
|
|
1735
|
+
edges.push(edgeData);
|
|
1736
|
+
graphItemCount++;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
});
|
|
1740
|
+
}, "setupDoc");
|
|
1741
|
+
var getDir2 = /* @__PURE__ */ __name((parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {
|
|
1742
|
+
let dir = defaultDir;
|
|
1743
|
+
if (parsedItem.doc) {
|
|
1744
|
+
for (const parsedItemDoc of parsedItem.doc) if (parsedItemDoc.stmt === "dir") dir = parsedItemDoc.value;
|
|
1745
|
+
}
|
|
1746
|
+
return dir;
|
|
1747
|
+
}, "getDir");
|
|
1748
|
+
function insertOrUpdateNode(nodes, nodeData, classes) {
|
|
1749
|
+
if (!nodeData.id || nodeData.id === "</join></fork>" || nodeData.id === "</choice>") return;
|
|
1750
|
+
if (nodeData.cssClasses) {
|
|
1751
|
+
if (!Array.isArray(nodeData.cssCompiledStyles)) nodeData.cssCompiledStyles = [];
|
|
1752
|
+
nodeData.cssClasses.split(" ").forEach((cssClass) => {
|
|
1753
|
+
const classDef = classes.get(cssClass);
|
|
1754
|
+
if (classDef) nodeData.cssCompiledStyles = [...nodeData.cssCompiledStyles ?? [], ...classDef.styles];
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
const existingNodeData = nodes.find((node) => node.id === nodeData.id);
|
|
1758
|
+
if (existingNodeData) Object.assign(existingNodeData, nodeData);
|
|
1759
|
+
else nodes.push(nodeData);
|
|
1760
|
+
}
|
|
1761
|
+
__name(insertOrUpdateNode, "insertOrUpdateNode");
|
|
1762
|
+
function getClassesFromDbInfo(dbInfoItem) {
|
|
1763
|
+
return dbInfoItem?.classes?.join(" ") ?? "";
|
|
1764
|
+
}
|
|
1765
|
+
__name(getClassesFromDbInfo, "getClassesFromDbInfo");
|
|
1766
|
+
function getStylesFromDbInfo(dbInfoItem) {
|
|
1767
|
+
return dbInfoItem?.styles ?? [];
|
|
1768
|
+
}
|
|
1769
|
+
__name(getStylesFromDbInfo, "getStylesFromDbInfo");
|
|
1770
|
+
var dataFetcher = /* @__PURE__ */ __name((parent, parsedItem, diagramStates, nodes, edges, altFlag, look, classes) => {
|
|
1771
|
+
const itemId = parsedItem.id;
|
|
1772
|
+
const dbState = diagramStates.get(itemId);
|
|
1773
|
+
const classStr = getClassesFromDbInfo(dbState);
|
|
1774
|
+
const style = getStylesFromDbInfo(dbState);
|
|
1775
|
+
const config = getConfig2();
|
|
1776
|
+
log.info("dataFetcher parsedItem", parsedItem, dbState, style);
|
|
1777
|
+
if (itemId !== "root") {
|
|
1778
|
+
let shape = SHAPE_STATE;
|
|
1779
|
+
if (parsedItem.start === true) shape = SHAPE_START;
|
|
1780
|
+
else if (parsedItem.start === false) shape = SHAPE_END;
|
|
1781
|
+
if (parsedItem.type !== DEFAULT_STATE_TYPE) shape = parsedItem.type;
|
|
1782
|
+
if (!nodeDb.get(itemId)) nodeDb.set(itemId, {
|
|
1783
|
+
id: itemId,
|
|
1784
|
+
shape,
|
|
1785
|
+
description: common_default.sanitizeText(itemId, config),
|
|
1786
|
+
cssClasses: `${classStr} ${CSS_DIAGRAM_STATE}`,
|
|
1787
|
+
cssStyles: style
|
|
1788
|
+
});
|
|
1789
|
+
const newNode = nodeDb.get(itemId);
|
|
1790
|
+
if (parsedItem.description) {
|
|
1791
|
+
if (Array.isArray(newNode.description)) {
|
|
1792
|
+
newNode.shape = SHAPE_STATE_WITH_DESC;
|
|
1793
|
+
newNode.description.push(parsedItem.description);
|
|
1794
|
+
} else if (newNode.description?.length && newNode.description.length > 0) {
|
|
1795
|
+
newNode.shape = SHAPE_STATE_WITH_DESC;
|
|
1796
|
+
if (newNode.description === itemId) newNode.description = [parsedItem.description];
|
|
1797
|
+
else newNode.description = [newNode.description, parsedItem.description];
|
|
1798
|
+
} else {
|
|
1799
|
+
newNode.shape = SHAPE_STATE;
|
|
1800
|
+
newNode.description = parsedItem.description;
|
|
1801
|
+
}
|
|
1802
|
+
newNode.description = common_default.sanitizeTextOrArray(newNode.description, config);
|
|
1803
|
+
}
|
|
1804
|
+
if (newNode.description?.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) if (newNode.type === "group") newNode.shape = SHAPE_GROUP;
|
|
1805
|
+
else newNode.shape = SHAPE_STATE;
|
|
1806
|
+
if (!newNode.type && parsedItem.doc) {
|
|
1807
|
+
log.info("Setting cluster for XCX", itemId, getDir2(parsedItem));
|
|
1808
|
+
newNode.type = "group";
|
|
1809
|
+
newNode.isGroup = true;
|
|
1810
|
+
newNode.dir = getDir2(parsedItem);
|
|
1811
|
+
newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP;
|
|
1812
|
+
newNode.cssClasses = `${newNode.cssClasses} ${CSS_DIAGRAM_CLUSTER} ${altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ""}`;
|
|
1813
|
+
}
|
|
1814
|
+
const nodeData = {
|
|
1815
|
+
labelStyle: "",
|
|
1816
|
+
shape: newNode.shape,
|
|
1817
|
+
label: newNode.description,
|
|
1818
|
+
cssClasses: newNode.cssClasses,
|
|
1819
|
+
cssCompiledStyles: [],
|
|
1820
|
+
cssStyles: newNode.cssStyles,
|
|
1821
|
+
id: itemId,
|
|
1822
|
+
dir: newNode.dir,
|
|
1823
|
+
domId: stateDomId(itemId, graphItemCount),
|
|
1824
|
+
type: newNode.type,
|
|
1825
|
+
isGroup: newNode.type === "group",
|
|
1826
|
+
padding: 8,
|
|
1827
|
+
rx: 10,
|
|
1828
|
+
ry: 10,
|
|
1829
|
+
look,
|
|
1830
|
+
labelType: "markdown"
|
|
1831
|
+
};
|
|
1832
|
+
if (nodeData.shape === SHAPE_DIVIDER) nodeData.label = "";
|
|
1833
|
+
if (parent && parent.id !== "root") {
|
|
1834
|
+
log.trace("Setting node ", itemId, " to be child of its parent ", parent.id);
|
|
1835
|
+
nodeData.parentId = parent.id;
|
|
1836
|
+
}
|
|
1837
|
+
nodeData.centerLabel = true;
|
|
1838
|
+
if (parsedItem.note) {
|
|
1839
|
+
const noteData = {
|
|
1840
|
+
labelStyle: "",
|
|
1841
|
+
shape: SHAPE_NOTE,
|
|
1842
|
+
label: parsedItem.note.text,
|
|
1843
|
+
labelType: "markdown",
|
|
1844
|
+
cssClasses: CSS_DIAGRAM_NOTE,
|
|
1845
|
+
cssStyles: [],
|
|
1846
|
+
cssCompiledStyles: [],
|
|
1847
|
+
id: itemId + NOTE_ID + "-" + graphItemCount,
|
|
1848
|
+
domId: stateDomId(itemId, graphItemCount, NOTE),
|
|
1849
|
+
type: newNode.type,
|
|
1850
|
+
isGroup: newNode.type === "group",
|
|
1851
|
+
padding: config.flowchart?.padding,
|
|
1852
|
+
look,
|
|
1853
|
+
position: parsedItem.note.position
|
|
1854
|
+
};
|
|
1855
|
+
const parentNodeId = itemId + PARENT_ID;
|
|
1856
|
+
const groupData = {
|
|
1857
|
+
labelStyle: "",
|
|
1858
|
+
shape: SHAPE_NOTEGROUP,
|
|
1859
|
+
label: parsedItem.note.text,
|
|
1860
|
+
cssClasses: newNode.cssClasses,
|
|
1861
|
+
cssStyles: [],
|
|
1862
|
+
id: itemId + PARENT_ID,
|
|
1863
|
+
domId: stateDomId(itemId, graphItemCount, PARENT),
|
|
1864
|
+
type: "group",
|
|
1865
|
+
isGroup: true,
|
|
1866
|
+
padding: 16,
|
|
1867
|
+
look,
|
|
1868
|
+
position: parsedItem.note.position
|
|
1869
|
+
};
|
|
1870
|
+
graphItemCount++;
|
|
1871
|
+
groupData.id = parentNodeId;
|
|
1872
|
+
noteData.parentId = parentNodeId;
|
|
1873
|
+
insertOrUpdateNode(nodes, groupData, classes);
|
|
1874
|
+
insertOrUpdateNode(nodes, noteData, classes);
|
|
1875
|
+
insertOrUpdateNode(nodes, nodeData, classes);
|
|
1876
|
+
let from = itemId;
|
|
1877
|
+
let to = noteData.id;
|
|
1878
|
+
if (parsedItem.note.position === "left of") {
|
|
1879
|
+
from = noteData.id;
|
|
1880
|
+
to = itemId;
|
|
1881
|
+
}
|
|
1882
|
+
edges.push({
|
|
1883
|
+
id: from + "-" + to,
|
|
1884
|
+
start: from,
|
|
1885
|
+
end: to,
|
|
1886
|
+
arrowhead: "none",
|
|
1887
|
+
arrowTypeEnd: "",
|
|
1888
|
+
style: G_EDGE_STYLE,
|
|
1889
|
+
labelStyle: "",
|
|
1890
|
+
classes: CSS_EDGE_NOTE_EDGE,
|
|
1891
|
+
arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
|
|
1892
|
+
labelpos: G_EDGE_LABELPOS,
|
|
1893
|
+
labelType: G_EDGE_LABELTYPE,
|
|
1894
|
+
thickness: G_EDGE_THICKNESS,
|
|
1895
|
+
look
|
|
1896
|
+
});
|
|
1897
|
+
} else insertOrUpdateNode(nodes, nodeData, classes);
|
|
1898
|
+
}
|
|
1899
|
+
if (parsedItem.doc) {
|
|
1900
|
+
log.trace("Adding nodes children ");
|
|
1901
|
+
setupDoc(parsedItem, parsedItem.doc, diagramStates, nodes, edges, !altFlag, look, classes);
|
|
1902
|
+
}
|
|
1903
|
+
}, "dataFetcher");
|
|
1904
|
+
var reset = /* @__PURE__ */ __name(() => {
|
|
1905
|
+
nodeDb.clear();
|
|
1906
|
+
graphItemCount = 0;
|
|
1907
|
+
}, "reset");
|
|
1908
|
+
var CONSTANTS = {
|
|
1909
|
+
START_NODE: "[*]",
|
|
1910
|
+
START_TYPE: "start",
|
|
1911
|
+
END_NODE: "[*]",
|
|
1912
|
+
END_TYPE: "end",
|
|
1913
|
+
COLOR_KEYWORD: "color",
|
|
1914
|
+
FILL_KEYWORD: "fill",
|
|
1915
|
+
BG_FILL: "bgFill",
|
|
1916
|
+
STYLECLASS_SEP: ","
|
|
1917
|
+
};
|
|
1918
|
+
var newClassesList = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Map(), "newClassesList");
|
|
1919
|
+
var newDoc = /* @__PURE__ */ __name(() => ({
|
|
1920
|
+
relations: [],
|
|
1921
|
+
states: /* @__PURE__ */ new Map(),
|
|
1922
|
+
documents: {}
|
|
1923
|
+
}), "newDoc");
|
|
1924
|
+
var clone = /* @__PURE__ */ __name((o) => JSON.parse(JSON.stringify(o)), "clone");
|
|
1925
|
+
var StateDB = class {
|
|
1926
|
+
constructor(version) {
|
|
1927
|
+
this.version = version;
|
|
1928
|
+
this.nodes = [];
|
|
1929
|
+
this.edges = [];
|
|
1930
|
+
this.rootDoc = [];
|
|
1931
|
+
this.classes = newClassesList();
|
|
1932
|
+
this.documents = { root: newDoc() };
|
|
1933
|
+
this.currentDocument = this.documents.root;
|
|
1934
|
+
this.startEndCount = 0;
|
|
1935
|
+
this.dividerCnt = 0;
|
|
1936
|
+
this.links = /* @__PURE__ */ new Map();
|
|
1937
|
+
this.funs = [];
|
|
1938
|
+
this.getAccTitle = getAccTitle;
|
|
1939
|
+
this.setAccTitle = setAccTitle;
|
|
1940
|
+
this.getAccDescription = getAccDescription;
|
|
1941
|
+
this.setAccDescription = setAccDescription;
|
|
1942
|
+
this.setDiagramTitle = setDiagramTitle;
|
|
1943
|
+
this.getDiagramTitle = getDiagramTitle;
|
|
1944
|
+
this.clear();
|
|
1945
|
+
this.setRootDoc = this.setRootDoc.bind(this);
|
|
1946
|
+
this.getDividerId = this.getDividerId.bind(this);
|
|
1947
|
+
this.setDirection = this.setDirection.bind(this);
|
|
1948
|
+
this.trimColon = this.trimColon.bind(this);
|
|
1949
|
+
this.bindFunctions = this.bindFunctions.bind(this);
|
|
1950
|
+
}
|
|
1951
|
+
static {
|
|
1952
|
+
__name(this, "StateDB");
|
|
1953
|
+
}
|
|
1954
|
+
static {
|
|
1955
|
+
this.relationType = {
|
|
1956
|
+
AGGREGATION: 0,
|
|
1957
|
+
EXTENSION: 1,
|
|
1958
|
+
COMPOSITION: 2,
|
|
1959
|
+
DEPENDENCY: 3
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1962
|
+
/**
|
|
1963
|
+
* Convert all of the statements (stmts) that were parsed into states and relationships.
|
|
1964
|
+
* This is done because a state diagram may have nested sections,
|
|
1965
|
+
* where each section is a 'document' and has its own set of statements.
|
|
1966
|
+
* Ex: the section within a fork has its own statements, and incoming and outgoing statements
|
|
1967
|
+
* refer to the fork as a whole (document).
|
|
1968
|
+
* See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
|
|
1969
|
+
* This will push the statement into the list of statements for the current document.
|
|
1970
|
+
*/
|
|
1971
|
+
extract(statements) {
|
|
1972
|
+
this.clear(true);
|
|
1973
|
+
for (const item of Array.isArray(statements) ? statements : statements.doc) switch (item.stmt) {
|
|
1974
|
+
case STMT_STATE:
|
|
1975
|
+
this.addState(item.id.trim(), item.type, item.doc, item.description, item.note);
|
|
1976
|
+
break;
|
|
1977
|
+
case STMT_RELATION:
|
|
1978
|
+
this.addRelation(item.state1, item.state2, item.description);
|
|
1979
|
+
break;
|
|
1980
|
+
case STMT_CLASSDEF:
|
|
1981
|
+
this.addStyleClass(item.id.trim(), item.classes);
|
|
1982
|
+
break;
|
|
1983
|
+
case STMT_STYLEDEF:
|
|
1984
|
+
this.handleStyleDef(item);
|
|
1985
|
+
break;
|
|
1986
|
+
case STMT_APPLYCLASS:
|
|
1987
|
+
this.setCssClass(item.id.trim(), item.styleClass);
|
|
1988
|
+
break;
|
|
1989
|
+
case "click": this.addLink(item.id, item.url, item.tooltip);
|
|
1990
|
+
}
|
|
1991
|
+
const diagramStates = this.getStates();
|
|
1992
|
+
const config = getConfig2();
|
|
1993
|
+
reset();
|
|
1994
|
+
dataFetcher(void 0, this.getRootDocV2(), diagramStates, this.nodes, this.edges, true, config.look, this.classes);
|
|
1995
|
+
for (const node of this.nodes) {
|
|
1996
|
+
if (!Array.isArray(node.label)) continue;
|
|
1997
|
+
node.description = node.label.slice(1);
|
|
1998
|
+
if (node.isGroup && node.description.length > 0) throw new Error(`Group nodes can only have label. Remove the additional description for node [${node.id}]`);
|
|
1999
|
+
node.label = node.label[0];
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
handleStyleDef(item) {
|
|
2003
|
+
const ids = item.id.trim().split(",");
|
|
2004
|
+
const styles = item.styleClass.split(",");
|
|
2005
|
+
for (const id of ids) {
|
|
2006
|
+
let state = this.getState(id);
|
|
2007
|
+
if (!state) {
|
|
2008
|
+
const trimmedId = id.trim();
|
|
2009
|
+
this.addState(trimmedId);
|
|
2010
|
+
state = this.getState(trimmedId);
|
|
2011
|
+
}
|
|
2012
|
+
if (state) state.styles = styles.map((s) => s.replace(/;/g, "")?.trim());
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
setRootDoc(o) {
|
|
2016
|
+
log.info("Setting root doc", o);
|
|
2017
|
+
this.rootDoc = o;
|
|
2018
|
+
if (this.version === 1) this.extract(o);
|
|
2019
|
+
else this.extract(this.getRootDocV2());
|
|
2020
|
+
}
|
|
2021
|
+
docTranslator(parent, node, first) {
|
|
2022
|
+
if (node.stmt === STMT_RELATION) {
|
|
2023
|
+
this.docTranslator(parent, node.state1, true);
|
|
2024
|
+
this.docTranslator(parent, node.state2, false);
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
2027
|
+
if (node.stmt === STMT_STATE) if (node.id === CONSTANTS.START_NODE) {
|
|
2028
|
+
node.id = parent.id + (first ? "_start" : "_end");
|
|
2029
|
+
node.start = first;
|
|
2030
|
+
} else node.id = node.id.trim();
|
|
2031
|
+
if (node.stmt !== STMT_ROOT && node.stmt !== STMT_STATE || !node.doc) return;
|
|
2032
|
+
const doc = [];
|
|
2033
|
+
let currentDoc = [];
|
|
2034
|
+
for (const stmt of node.doc) if (stmt.type === DIVIDER_TYPE) {
|
|
2035
|
+
const newNode = clone(stmt);
|
|
2036
|
+
newNode.doc = clone(currentDoc);
|
|
2037
|
+
doc.push(newNode);
|
|
2038
|
+
currentDoc = [];
|
|
2039
|
+
} else currentDoc.push(stmt);
|
|
2040
|
+
if (doc.length > 0 && currentDoc.length > 0) {
|
|
2041
|
+
const newNode = {
|
|
2042
|
+
stmt: STMT_STATE,
|
|
2043
|
+
id: generateId(),
|
|
2044
|
+
type: "divider",
|
|
2045
|
+
doc: clone(currentDoc)
|
|
2046
|
+
};
|
|
2047
|
+
doc.push(clone(newNode));
|
|
2048
|
+
node.doc = doc;
|
|
2049
|
+
}
|
|
2050
|
+
node.doc.forEach((docNode) => this.docTranslator(node, docNode, true));
|
|
2051
|
+
}
|
|
2052
|
+
getRootDocV2() {
|
|
2053
|
+
this.docTranslator({
|
|
2054
|
+
id: STMT_ROOT,
|
|
2055
|
+
stmt: STMT_ROOT
|
|
2056
|
+
}, {
|
|
2057
|
+
id: STMT_ROOT,
|
|
2058
|
+
stmt: STMT_ROOT,
|
|
2059
|
+
doc: this.rootDoc
|
|
2060
|
+
}, true);
|
|
2061
|
+
return {
|
|
2062
|
+
id: STMT_ROOT,
|
|
2063
|
+
doc: this.rootDoc
|
|
2064
|
+
};
|
|
2065
|
+
}
|
|
2066
|
+
/**
|
|
2067
|
+
* Function called by parser when a node definition has been found.
|
|
2068
|
+
*
|
|
2069
|
+
* @param descr - description for the state. Can be a string or a list or strings
|
|
2070
|
+
* @param classes - class styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 class, convert it to an array of that 1 class.
|
|
2071
|
+
* @param styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.
|
|
2072
|
+
* @param textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.
|
|
2073
|
+
*/
|
|
2074
|
+
addState(id, type = DEFAULT_STATE_TYPE, doc = void 0, descr = void 0, note = void 0, classes = void 0, styles = void 0, textStyles = void 0) {
|
|
2075
|
+
const trimmedId = id?.trim();
|
|
2076
|
+
if (!this.currentDocument.states.has(trimmedId)) {
|
|
2077
|
+
log.info("Adding state ", trimmedId, descr);
|
|
2078
|
+
this.currentDocument.states.set(trimmedId, {
|
|
2079
|
+
stmt: STMT_STATE,
|
|
2080
|
+
id: trimmedId,
|
|
2081
|
+
descriptions: [],
|
|
2082
|
+
type,
|
|
2083
|
+
doc,
|
|
2084
|
+
note,
|
|
2085
|
+
classes: [],
|
|
2086
|
+
styles: [],
|
|
2087
|
+
textStyles: []
|
|
2088
|
+
});
|
|
2089
|
+
} else {
|
|
2090
|
+
const state = this.currentDocument.states.get(trimmedId);
|
|
2091
|
+
if (!state) throw new Error(`State not found: ${trimmedId}`);
|
|
2092
|
+
if (!state.doc) state.doc = doc;
|
|
2093
|
+
if (!state.type) state.type = type;
|
|
2094
|
+
}
|
|
2095
|
+
if (descr) {
|
|
2096
|
+
log.info("Setting state description", trimmedId, descr);
|
|
2097
|
+
(Array.isArray(descr) ? descr : [descr]).forEach((des) => this.addDescription(trimmedId, des.trim()));
|
|
2098
|
+
}
|
|
2099
|
+
if (note) {
|
|
2100
|
+
const doc2 = this.currentDocument.states.get(trimmedId);
|
|
2101
|
+
if (!doc2) throw new Error(`State not found: ${trimmedId}`);
|
|
2102
|
+
doc2.note = note;
|
|
2103
|
+
doc2.note.text = common_default.sanitizeText(doc2.note.text, getConfig2());
|
|
2104
|
+
}
|
|
2105
|
+
if (classes) {
|
|
2106
|
+
log.info("Setting state classes", trimmedId, classes);
|
|
2107
|
+
(Array.isArray(classes) ? classes : [classes]).forEach((cssClass) => this.setCssClass(trimmedId, cssClass.trim()));
|
|
2108
|
+
}
|
|
2109
|
+
if (styles) {
|
|
2110
|
+
log.info("Setting state styles", trimmedId, styles);
|
|
2111
|
+
(Array.isArray(styles) ? styles : [styles]).forEach((style) => this.setStyle(trimmedId, style.trim()));
|
|
2112
|
+
}
|
|
2113
|
+
if (textStyles) {
|
|
2114
|
+
log.info("Setting state styles", trimmedId, styles);
|
|
2115
|
+
(Array.isArray(textStyles) ? textStyles : [textStyles]).forEach((textStyle) => this.setTextStyle(trimmedId, textStyle.trim()));
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
clear(saveCommon) {
|
|
2119
|
+
this.nodes = [];
|
|
2120
|
+
this.edges = [];
|
|
2121
|
+
this.funs = [this.setupToolTips.bind(this)];
|
|
2122
|
+
this.documents = { root: newDoc() };
|
|
2123
|
+
this.currentDocument = this.documents.root;
|
|
2124
|
+
this.startEndCount = 0;
|
|
2125
|
+
this.classes = newClassesList();
|
|
2126
|
+
if (!saveCommon) {
|
|
2127
|
+
this.links = /* @__PURE__ */ new Map();
|
|
2128
|
+
clear();
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
getState(id) {
|
|
2132
|
+
return this.currentDocument.states.get(id);
|
|
2133
|
+
}
|
|
2134
|
+
getStates() {
|
|
2135
|
+
return this.currentDocument.states;
|
|
2136
|
+
}
|
|
2137
|
+
logDocuments() {
|
|
2138
|
+
log.info("Documents = ", this.documents);
|
|
2139
|
+
}
|
|
2140
|
+
getRelations() {
|
|
2141
|
+
return this.currentDocument.relations;
|
|
2142
|
+
}
|
|
2143
|
+
/**
|
|
2144
|
+
* Adds a clickable link to a state.
|
|
2145
|
+
*/
|
|
2146
|
+
addLink(stateId, url, tooltip) {
|
|
2147
|
+
this.links.set(stateId, {
|
|
2148
|
+
url,
|
|
2149
|
+
tooltip
|
|
2150
|
+
});
|
|
2151
|
+
log.warn("Adding link", stateId, url, tooltip);
|
|
2152
|
+
}
|
|
2153
|
+
/**
|
|
2154
|
+
* Get all registered links.
|
|
2155
|
+
*/
|
|
2156
|
+
getLinks() {
|
|
2157
|
+
return this.links;
|
|
2158
|
+
}
|
|
2159
|
+
/**
|
|
2160
|
+
* If the id is a start node ( [*] ), then return a new id constructed from
|
|
2161
|
+
* the start node name and the current start node count.
|
|
2162
|
+
* else return the given id
|
|
2163
|
+
*/
|
|
2164
|
+
startIdIfNeeded(id = "") {
|
|
2165
|
+
if (id === CONSTANTS.START_NODE) {
|
|
2166
|
+
this.startEndCount++;
|
|
2167
|
+
return `${CONSTANTS.START_TYPE}${this.startEndCount}`;
|
|
2168
|
+
}
|
|
2169
|
+
return id;
|
|
2170
|
+
}
|
|
2171
|
+
/**
|
|
2172
|
+
* If the id is a start node ( [*] ), then return the start type ('start')
|
|
2173
|
+
* else return the given type
|
|
2174
|
+
*/
|
|
2175
|
+
startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) {
|
|
2176
|
+
return id === CONSTANTS.START_NODE ? CONSTANTS.START_TYPE : type;
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* If the id is an end node ( [*] ), then return a new id constructed from
|
|
2180
|
+
* the end node name and the current start_end node count.
|
|
2181
|
+
* else return the given id
|
|
2182
|
+
*/
|
|
2183
|
+
endIdIfNeeded(id = "") {
|
|
2184
|
+
if (id === CONSTANTS.END_NODE) {
|
|
2185
|
+
this.startEndCount++;
|
|
2186
|
+
return `${CONSTANTS.END_TYPE}${this.startEndCount}`;
|
|
2187
|
+
}
|
|
2188
|
+
return id;
|
|
2189
|
+
}
|
|
2190
|
+
/**
|
|
2191
|
+
* If the id is an end node ( [*] ), then return the end type
|
|
2192
|
+
* else return the given type
|
|
2193
|
+
*
|
|
2194
|
+
*/
|
|
2195
|
+
endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) {
|
|
2196
|
+
return id === CONSTANTS.END_NODE ? CONSTANTS.END_TYPE : type;
|
|
2197
|
+
}
|
|
2198
|
+
addRelationObjs(item1, item2, relationTitle = "") {
|
|
2199
|
+
const id1 = this.startIdIfNeeded(item1.id.trim());
|
|
2200
|
+
const type1 = this.startTypeIfNeeded(item1.id.trim(), item1.type);
|
|
2201
|
+
const id2 = this.startIdIfNeeded(item2.id.trim());
|
|
2202
|
+
const type2 = this.startTypeIfNeeded(item2.id.trim(), item2.type);
|
|
2203
|
+
this.addState(id1, type1, item1.doc, item1.description, item1.note, item1.classes, item1.styles, item1.textStyles);
|
|
2204
|
+
this.addState(id2, type2, item2.doc, item2.description, item2.note, item2.classes, item2.styles, item2.textStyles);
|
|
2205
|
+
this.currentDocument.relations.push({
|
|
2206
|
+
id1,
|
|
2207
|
+
id2,
|
|
2208
|
+
relationTitle: common_default.sanitizeText(relationTitle, getConfig2())
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
/**
|
|
2212
|
+
* Add a relation between two items. The items may be full objects or just the string id of a state.
|
|
2213
|
+
*/
|
|
2214
|
+
addRelation(item1, item2, title) {
|
|
2215
|
+
if (typeof item1 === "object" && typeof item2 === "object") this.addRelationObjs(item1, item2, title);
|
|
2216
|
+
else if (typeof item1 === "string" && typeof item2 === "string") {
|
|
2217
|
+
const id1 = this.startIdIfNeeded(item1.trim());
|
|
2218
|
+
const type1 = this.startTypeIfNeeded(item1);
|
|
2219
|
+
const id2 = this.endIdIfNeeded(item2.trim());
|
|
2220
|
+
const type2 = this.endTypeIfNeeded(item2);
|
|
2221
|
+
this.addState(id1, type1);
|
|
2222
|
+
this.addState(id2, type2);
|
|
2223
|
+
this.currentDocument.relations.push({
|
|
2224
|
+
id1,
|
|
2225
|
+
id2,
|
|
2226
|
+
relationTitle: title ? common_default.sanitizeText(title, getConfig2()) : void 0
|
|
2227
|
+
});
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
addDescription(id, descr) {
|
|
2231
|
+
const theState = this.currentDocument.states.get(id);
|
|
2232
|
+
const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr;
|
|
2233
|
+
theState?.descriptions?.push(common_default.sanitizeText(_descr, getConfig2()));
|
|
2234
|
+
}
|
|
2235
|
+
cleanupLabel(label) {
|
|
2236
|
+
return label.startsWith(":") ? label.slice(2).trim() : label.trim();
|
|
2237
|
+
}
|
|
2238
|
+
getDividerId() {
|
|
2239
|
+
this.dividerCnt++;
|
|
2240
|
+
return `divider-id-${this.dividerCnt}`;
|
|
2241
|
+
}
|
|
2242
|
+
/**
|
|
2243
|
+
* Called when the parser comes across a (style) class definition
|
|
2244
|
+
* @example classDef my-style fill:#f96;
|
|
2245
|
+
*
|
|
2246
|
+
* @param id - the id of this (style) class
|
|
2247
|
+
* @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
|
|
2248
|
+
*/
|
|
2249
|
+
addStyleClass(id, styleAttributes = "") {
|
|
2250
|
+
if (!this.classes.has(id)) this.classes.set(id, {
|
|
2251
|
+
id,
|
|
2252
|
+
styles: [],
|
|
2253
|
+
textStyles: []
|
|
2254
|
+
});
|
|
2255
|
+
const foundClass = this.classes.get(id);
|
|
2256
|
+
if (styleAttributes && foundClass) styleAttributes.split(CONSTANTS.STYLECLASS_SEP).forEach((attrib) => {
|
|
2257
|
+
const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim();
|
|
2258
|
+
if (RegExp(CONSTANTS.COLOR_KEYWORD).exec(attrib)) {
|
|
2259
|
+
const newStyle2 = fixedAttrib.replace(CONSTANTS.FILL_KEYWORD, CONSTANTS.BG_FILL).replace(CONSTANTS.COLOR_KEYWORD, CONSTANTS.FILL_KEYWORD);
|
|
2260
|
+
foundClass.textStyles.push(newStyle2);
|
|
2261
|
+
}
|
|
2262
|
+
foundClass.styles.push(fixedAttrib);
|
|
2263
|
+
});
|
|
2264
|
+
}
|
|
2265
|
+
getClasses() {
|
|
2266
|
+
return this.classes;
|
|
2267
|
+
}
|
|
2268
|
+
setupToolTips(element) {
|
|
2269
|
+
const tooltipElem = createTooltip();
|
|
2270
|
+
select_default(element).select("svg").selectAll("g.node, g.rough-node").on("mouseover", (e) => {
|
|
2271
|
+
const el = select_default(e.currentTarget);
|
|
2272
|
+
const title = el.attr("title");
|
|
2273
|
+
if (title === null) return;
|
|
2274
|
+
const rect = e.currentTarget?.getBoundingClientRect();
|
|
2275
|
+
tooltipElem.transition().duration(200).style("opacity", ".9");
|
|
2276
|
+
tooltipElem.style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px");
|
|
2277
|
+
tooltipElem.html(purify.sanitize(title));
|
|
2278
|
+
el.classed("hover", true);
|
|
2279
|
+
}).on("mouseout", (e) => {
|
|
2280
|
+
tooltipElem.transition().duration(500).style("opacity", 0);
|
|
2281
|
+
select_default(e.currentTarget).classed("hover", false);
|
|
2282
|
+
});
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* Add a (style) class or css class to a state with the given id.
|
|
2286
|
+
* If the state isn't already in the list of known states, add it.
|
|
2287
|
+
* Might be called by parser when a style class or CSS class should be applied to a state
|
|
2288
|
+
*
|
|
2289
|
+
* @param itemIds - The id or a list of ids of the item(s) to apply the css class to
|
|
2290
|
+
* @param cssClassName - CSS class name
|
|
2291
|
+
*/
|
|
2292
|
+
setCssClass(itemIds, cssClassName) {
|
|
2293
|
+
itemIds.split(",").forEach((id) => {
|
|
2294
|
+
let foundState = this.getState(id);
|
|
2295
|
+
if (!foundState) {
|
|
2296
|
+
const trimmedId = id.trim();
|
|
2297
|
+
this.addState(trimmedId);
|
|
2298
|
+
foundState = this.getState(trimmedId);
|
|
2299
|
+
}
|
|
2300
|
+
foundState?.classes?.push(cssClassName);
|
|
2301
|
+
});
|
|
2302
|
+
}
|
|
2303
|
+
/**
|
|
2304
|
+
* Add a style to a state with the given id.
|
|
2305
|
+
* @example style stateId fill:#f9f,stroke:#333,stroke-width:4px
|
|
2306
|
+
* where 'style' is the keyword
|
|
2307
|
+
* stateId is the id of a state
|
|
2308
|
+
* the rest of the string is the styleText (all of the attributes to be applied to the state)
|
|
2309
|
+
*
|
|
2310
|
+
* @param itemId - The id of item to apply the style to
|
|
2311
|
+
* @param styleText - the text of the attributes for the style
|
|
2312
|
+
*/
|
|
2313
|
+
setStyle(itemId, styleText) {
|
|
2314
|
+
this.getState(itemId)?.styles?.push(styleText);
|
|
2315
|
+
}
|
|
2316
|
+
/**
|
|
2317
|
+
* Add a text style to a state with the given id
|
|
2318
|
+
*
|
|
2319
|
+
* @param itemId - The id of item to apply the css class to
|
|
2320
|
+
* @param cssClassName - CSS class name
|
|
2321
|
+
*/
|
|
2322
|
+
setTextStyle(itemId, cssClassName) {
|
|
2323
|
+
this.getState(itemId)?.textStyles?.push(cssClassName);
|
|
2324
|
+
}
|
|
2325
|
+
bindFunctions(element) {
|
|
2326
|
+
this.funs.forEach((fun) => {
|
|
2327
|
+
fun(element);
|
|
2328
|
+
});
|
|
2329
|
+
}
|
|
2330
|
+
/**
|
|
2331
|
+
* Finds the direction statement in the root document.
|
|
2332
|
+
* @returns the direction statement if present
|
|
2333
|
+
*/
|
|
2334
|
+
getDirectionStatement() {
|
|
2335
|
+
return this.rootDoc.find((doc) => doc.stmt === STMT_DIRECTION);
|
|
2336
|
+
}
|
|
2337
|
+
getDirection() {
|
|
2338
|
+
return this.getDirectionStatement()?.value ?? DEFAULT_DIAGRAM_DIRECTION;
|
|
2339
|
+
}
|
|
2340
|
+
setDirection(dir) {
|
|
2341
|
+
const doc = this.getDirectionStatement();
|
|
2342
|
+
if (doc) doc.value = dir;
|
|
2343
|
+
else this.rootDoc.unshift({
|
|
2344
|
+
stmt: STMT_DIRECTION,
|
|
2345
|
+
value: dir
|
|
2346
|
+
});
|
|
2347
|
+
}
|
|
2348
|
+
trimColon(str) {
|
|
2349
|
+
return str.startsWith(":") ? str.slice(1).trim() : str.trim();
|
|
2350
|
+
}
|
|
2351
|
+
getData() {
|
|
2352
|
+
const config = getConfig2();
|
|
2353
|
+
return {
|
|
2354
|
+
nodes: this.nodes,
|
|
2355
|
+
edges: this.edges,
|
|
2356
|
+
other: {},
|
|
2357
|
+
config,
|
|
2358
|
+
direction: getDir(this.getRootDocV2())
|
|
2359
|
+
};
|
|
2360
|
+
}
|
|
2361
|
+
getConfig() {
|
|
2362
|
+
return getConfig2().state;
|
|
2363
|
+
}
|
|
2364
|
+
};
|
|
2365
|
+
var styles_default = /* @__PURE__ */ __name((options) => `
|
|
2366
|
+
defs [id$="-barbEnd"] {
|
|
2367
|
+
fill: ${options.transitionColor};
|
|
2368
|
+
stroke: ${options.transitionColor};
|
|
2369
|
+
}
|
|
2370
|
+
g.stateGroup text {
|
|
2371
|
+
fill: ${options.nodeBorder};
|
|
2372
|
+
stroke: none;
|
|
2373
|
+
font-size: 10px;
|
|
2374
|
+
}
|
|
2375
|
+
g.stateGroup text {
|
|
2376
|
+
fill: ${options.textColor};
|
|
2377
|
+
stroke: none;
|
|
2378
|
+
font-size: 10px;
|
|
2379
|
+
|
|
2380
|
+
}
|
|
2381
|
+
g.stateGroup .state-title {
|
|
2382
|
+
font-weight: bolder;
|
|
2383
|
+
fill: ${options.stateLabelColor};
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
g.stateGroup rect {
|
|
2387
|
+
fill: ${options.mainBkg};
|
|
2388
|
+
stroke: ${options.nodeBorder};
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
g.stateGroup line {
|
|
2392
|
+
stroke: ${options.lineColor};
|
|
2393
|
+
stroke-width: ${options.strokeWidth || 1};
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
.transition {
|
|
2397
|
+
stroke: ${options.transitionColor};
|
|
2398
|
+
stroke-width: ${options.strokeWidth || 1};
|
|
2399
|
+
fill: none;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
.stateGroup .composit {
|
|
2403
|
+
fill: ${options.background};
|
|
2404
|
+
border-bottom: 1px
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
.stateGroup .alt-composit {
|
|
2408
|
+
fill: #e0e0e0;
|
|
2409
|
+
border-bottom: 1px
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
.state-note {
|
|
2413
|
+
stroke: ${options.noteBorderColor};
|
|
2414
|
+
fill: ${options.noteBkgColor};
|
|
2415
|
+
|
|
2416
|
+
text {
|
|
2417
|
+
fill: ${options.noteTextColor};
|
|
2418
|
+
stroke: none;
|
|
2419
|
+
font-size: 10px;
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.stateLabel .box {
|
|
2424
|
+
stroke: none;
|
|
2425
|
+
stroke-width: 0;
|
|
2426
|
+
fill: ${options.mainBkg};
|
|
2427
|
+
opacity: 0.5;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
.edgeLabel .label rect {
|
|
2431
|
+
fill: ${options.labelBackgroundColor};
|
|
2432
|
+
opacity: 0.5;
|
|
2433
|
+
}
|
|
2434
|
+
.edgeLabel {
|
|
2435
|
+
background-color: ${options.edgeLabelBackground};
|
|
2436
|
+
p {
|
|
2437
|
+
background-color: ${options.edgeLabelBackground};
|
|
2438
|
+
}
|
|
2439
|
+
rect {
|
|
2440
|
+
opacity: 0.5;
|
|
2441
|
+
background-color: ${options.edgeLabelBackground};
|
|
2442
|
+
fill: ${options.edgeLabelBackground};
|
|
2443
|
+
}
|
|
2444
|
+
text-align: center;
|
|
2445
|
+
}
|
|
2446
|
+
.edgeLabel .label text {
|
|
2447
|
+
fill: ${options.transitionLabelColor || options.tertiaryTextColor};
|
|
2448
|
+
}
|
|
2449
|
+
.label div .edgeLabel {
|
|
2450
|
+
color: ${options.transitionLabelColor || options.tertiaryTextColor};
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
.stateLabel text {
|
|
2454
|
+
fill: ${options.stateLabelColor};
|
|
2455
|
+
font-size: 10px;
|
|
2456
|
+
font-weight: bold;
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
.node circle.state-start {
|
|
2460
|
+
fill: ${options.specialStateColor};
|
|
2461
|
+
stroke: ${options.specialStateColor};
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
.node .fork-join {
|
|
2465
|
+
fill: ${options.specialStateColor};
|
|
2466
|
+
stroke: ${options.specialStateColor};
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
.node circle.state-end {
|
|
2470
|
+
fill: ${options.innerEndBackground};
|
|
2471
|
+
stroke: ${options.background};
|
|
2472
|
+
stroke-width: 1.5
|
|
2473
|
+
}
|
|
2474
|
+
.end-state-inner {
|
|
2475
|
+
fill: ${options.compositeBackground || options.background};
|
|
2476
|
+
// stroke: ${options.background};
|
|
2477
|
+
stroke-width: 1.5
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
.node rect {
|
|
2481
|
+
fill: ${options.stateBkg || options.mainBkg};
|
|
2482
|
+
stroke: ${options.stateBorder || options.nodeBorder};
|
|
2483
|
+
stroke-width: ${options.strokeWidth || 1}px;
|
|
2484
|
+
}
|
|
2485
|
+
.node polygon {
|
|
2486
|
+
fill: ${options.mainBkg};
|
|
2487
|
+
stroke: ${options.stateBorder || options.nodeBorder};;
|
|
2488
|
+
stroke-width: ${options.strokeWidth || 1}px;
|
|
2489
|
+
}
|
|
2490
|
+
[id$="-barbEnd"] {
|
|
2491
|
+
fill: ${options.lineColor};
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
.statediagram-cluster rect {
|
|
2495
|
+
fill: ${options.compositeTitleBackground};
|
|
2496
|
+
stroke: ${options.stateBorder || options.nodeBorder};
|
|
2497
|
+
stroke-width: ${options.strokeWidth || 1}px;
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
.cluster-label, .nodeLabel {
|
|
2501
|
+
color: ${options.stateLabelColor};
|
|
2502
|
+
// line-height: 1;
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
.statediagram-cluster rect.outer {
|
|
2506
|
+
rx: 5px;
|
|
2507
|
+
ry: 5px;
|
|
2508
|
+
}
|
|
2509
|
+
.statediagram-state .divider {
|
|
2510
|
+
stroke: ${options.stateBorder || options.nodeBorder};
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
.statediagram-state .title-state {
|
|
2514
|
+
rx: 5px;
|
|
2515
|
+
ry: 5px;
|
|
2516
|
+
}
|
|
2517
|
+
.statediagram-cluster.statediagram-cluster .inner {
|
|
2518
|
+
fill: ${options.compositeBackground || options.background};
|
|
2519
|
+
}
|
|
2520
|
+
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
2521
|
+
fill: ${options.altBackground ? options.altBackground : "#efefef"};
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
.statediagram-cluster .inner {
|
|
2525
|
+
rx:0;
|
|
2526
|
+
ry:0;
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
.statediagram-state rect.basic {
|
|
2530
|
+
rx: 5px;
|
|
2531
|
+
ry: 5px;
|
|
2532
|
+
}
|
|
2533
|
+
.statediagram-state rect.divider {
|
|
2534
|
+
stroke-dasharray: 10,10;
|
|
2535
|
+
fill: ${options.altBackground ? options.altBackground : "#efefef"};
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
.note-edge {
|
|
2539
|
+
stroke-dasharray: 5;
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
.statediagram-note rect {
|
|
2543
|
+
fill: ${options.noteBkgColor};
|
|
2544
|
+
stroke: ${options.noteBorderColor};
|
|
2545
|
+
stroke-width: 1px;
|
|
2546
|
+
rx: 0;
|
|
2547
|
+
ry: 0;
|
|
2548
|
+
}
|
|
2549
|
+
.statediagram-note rect {
|
|
2550
|
+
fill: ${options.noteBkgColor};
|
|
2551
|
+
stroke: ${options.noteBorderColor};
|
|
2552
|
+
stroke-width: 1px;
|
|
2553
|
+
rx: 0;
|
|
2554
|
+
ry: 0;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
.statediagram-note text {
|
|
2558
|
+
fill: ${options.noteTextColor};
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
.statediagram-note .nodeLabel {
|
|
2562
|
+
color: ${options.noteTextColor};
|
|
2563
|
+
}
|
|
2564
|
+
.statediagram .edgeLabel {
|
|
2565
|
+
color: red; // ${options.noteTextColor};
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
[id$="-dependencyStart"], [id$="-dependencyEnd"] {
|
|
2569
|
+
fill: ${options.lineColor};
|
|
2570
|
+
stroke: ${options.lineColor};
|
|
2571
|
+
stroke-width: ${options.strokeWidth || 1};
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
.statediagramTitleText {
|
|
2575
|
+
text-anchor: middle;
|
|
2576
|
+
font-size: 18px;
|
|
2577
|
+
fill: ${options.textColor};
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
[data-look="neo"].statediagram-cluster rect {
|
|
2581
|
+
fill: ${options.mainBkg};
|
|
2582
|
+
stroke: ${options.useGradient ? "url(" + options.svgId + "-gradient)" : options.stateBorder || options.nodeBorder};
|
|
2583
|
+
stroke-width: ${options.strokeWidth ?? 1};
|
|
2584
|
+
}
|
|
2585
|
+
[data-look="neo"].statediagram-cluster rect.outer {
|
|
2586
|
+
rx: ${options.radius}px;
|
|
2587
|
+
ry: ${options.radius}px;
|
|
2588
|
+
filter: ${options.dropShadow ? options.dropShadow.replace("url(#drop-shadow)", `url(${options.svgId}-drop-shadow)`) : "none"}
|
|
2589
|
+
}
|
|
2590
|
+
`, "getStyles");
|
|
2591
|
+
|
|
2592
|
+
//#endregion
|
|
2593
|
+
export { styles_default as i, stateDiagram_default as n, stateRenderer_v3_unified_default as r, StateDB as t };
|