@yorz/cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +119 -0
  3. package/dist/_commonjsHelpers-DyI1JsEH.js +34 -0
  4. package/dist/abnfDiagram-VRR7QNED-UQS77aUi.js +119 -0
  5. package/dist/api-DrYc_Ds_.js +129852 -0
  6. package/dist/arc-B1cAL3U1.js +132 -0
  7. package/dist/architectureDiagram-ZJ3FMSHR-CfWOhs-q.js +8816 -0
  8. package/dist/blockDiagram-677ZJIJ3-CLOAAFZa.js +3796 -0
  9. package/dist/c4Diagram-LMCZKHZV-BGdELGkb.js +2483 -0
  10. package/dist/certs-BeimSwB3.js +14071 -0
  11. package/dist/certs-C4t5lAmJ.js +14071 -0
  12. package/dist/certs-CLLngjpY.js +14071 -0
  13. package/dist/certs-D3fTB-0_.js +14071 -0
  14. package/dist/channel-_gQD3mZ8.js +8 -0
  15. package/dist/chunk-2Q5K7J3B-DIJkMPWD.js +20 -0
  16. package/dist/chunk-32BRIVSS-CIQb7-9I.js +117 -0
  17. package/dist/chunk-5VM5RSS4-DmlAsh6o.js +20 -0
  18. package/dist/chunk-EX3LRPZG-BEXyn5R-.js +1989 -0
  19. package/dist/chunk-JWPE2WC7-XiIefccF.js +17 -0
  20. package/dist/chunk-MOJQB5TN-CC5OBDWw.js +861 -0
  21. package/dist/chunk-RYQCIY6F-DQacsGpB.js +475 -0
  22. package/dist/chunk-V7JOEXUC-TLRsIUvf.js +2027 -0
  23. package/dist/chunk-VR4S4FIN-9AfN7RDF.js +25 -0
  24. package/dist/chunk-XXDRQBXY-DhWucSRr.js +14 -0
  25. package/dist/classDiagram-OUVF2IWQ-CN55rRkB.js +20 -0
  26. package/dist/classDiagram-v2-EOCWNBFH-CN55rRkB.js +20 -0
  27. package/dist/cli/index.js +5430 -0
  28. package/dist/cose-bilkent-JH36ORCC-8uGYe6_d.js +4944 -0
  29. package/dist/cynefin-VYW2F7L2-BwTeE-TI.js +32061 -0
  30. package/dist/cynefinDiagram-TSTJHNR4-DM7ixE-v.js +454 -0
  31. package/dist/cytoscape.esm-BTopYfIb.js +30347 -0
  32. package/dist/dagre-VKFMJZFB-blEDoYen.js +522 -0
  33. package/dist/defaultLocale-wHUL1xE2.js +207 -0
  34. package/dist/diagram-FQU43EPY-MEZlmmdi.js +633 -0
  35. package/dist/diagram-G47NLZAW-DZOZvHqp.js +857 -0
  36. package/dist/diagram-NH7WQ7WH-ChpmPbZz.js +213 -0
  37. package/dist/diagram-OA4YK3LP-oy4yvrnL.js +489 -0
  38. package/dist/diagram-WEI45ONY-B3nx1cYt.js +305 -0
  39. package/dist/ebnfDiagram-CCIWWBDH-BASj7BoO.js +139 -0
  40. package/dist/erDiagram-Q63AITRT-lujHq-S9.js +1239 -0
  41. package/dist/flowDiagram-23GEKE2U-BdsAVPgU.js +2349 -0
  42. package/dist/ganttDiagram-NO4QXBWP-DUUP4lsu.js +3733 -0
  43. package/dist/gitGraphDiagram-IHSO6WYX-BdIPAtb0.js +1374 -0
  44. package/dist/graph-CE8jV7cI.js +2043 -0
  45. package/dist/gui/assets/abnfDiagram-VRR7QNED-DE_Lwnyj.js +1 -0
  46. package/dist/gui/assets/arc-0XKFeKL1.js +1 -0
  47. package/dist/gui/assets/architectureDiagram-ZJ3FMSHR-WVMr6CTB.js +36 -0
  48. package/dist/gui/assets/blockDiagram-677ZJIJ3-JmkelTQ6.js +132 -0
  49. package/dist/gui/assets/c4Diagram-LMCZKHZV-BYvSE_vv.js +10 -0
  50. package/dist/gui/assets/channel-BhMtSKKb.js +1 -0
  51. package/dist/gui/assets/chunk-2Q5K7J3B-cgJ3ifz_.js +1 -0
  52. package/dist/gui/assets/chunk-32BRIVSS-DR-AYVVA.js +1 -0
  53. package/dist/gui/assets/chunk-5VM5RSS4-Di4z9gEz.js +15 -0
  54. package/dist/gui/assets/chunk-EX3LRPZG-CtCaJMGG.js +231 -0
  55. package/dist/gui/assets/chunk-JWPE2WC7-EjoKlGne.js +1 -0
  56. package/dist/gui/assets/chunk-MOJQB5TN-ndMzM7-f.js +88 -0
  57. package/dist/gui/assets/chunk-RYQCIY6F-CDdJsSDv.js +1 -0
  58. package/dist/gui/assets/chunk-V7JOEXUC-BptnbB4R.js +206 -0
  59. package/dist/gui/assets/chunk-VR4S4FIN-CF8Dsx8K.js +1 -0
  60. package/dist/gui/assets/chunk-XXDRQBXY-CgGWri-V.js +1 -0
  61. package/dist/gui/assets/classDiagram-OUVF2IWQ-DiPaZ7LY.js +1 -0
  62. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-DiPaZ7LY.js +1 -0
  63. package/dist/gui/assets/cose-bilkent-JH36ORCC-Bm9uE-P8.js +1 -0
  64. package/dist/gui/assets/cynefin-VYW2F7L2-Dd-Apprt.js +178 -0
  65. package/dist/gui/assets/cynefinDiagram-TSTJHNR4-DpGBOFX2.js +62 -0
  66. package/dist/gui/assets/cytoscape.esm-OyMbaexL.js +331 -0
  67. package/dist/gui/assets/dagre-VKFMJZFB-DmKBW-UB.js +4 -0
  68. package/dist/gui/assets/defaultLocale-DX6XiGOO.js +1 -0
  69. package/dist/gui/assets/diagram-FQU43EPY-CYuUGN7Z.js +3 -0
  70. package/dist/gui/assets/diagram-G47NLZAW-BZ-zUUWn.js +24 -0
  71. package/dist/gui/assets/diagram-NH7WQ7WH-D2qb5dA_.js +24 -0
  72. package/dist/gui/assets/diagram-OA4YK3LP-BSy8-VUz.js +30 -0
  73. package/dist/gui/assets/diagram-WEI45ONY-B-vTVzM8.js +41 -0
  74. package/dist/gui/assets/ebnfDiagram-CCIWWBDH-cKb33glS.js +1 -0
  75. package/dist/gui/assets/erDiagram-Q63AITRT-DvWEFI1U.js +85 -0
  76. package/dist/gui/assets/flowDiagram-23GEKE2U-CfvFgLP2.js +156 -0
  77. package/dist/gui/assets/ganttDiagram-NO4QXBWP-BnDujV-k.js +292 -0
  78. package/dist/gui/assets/gitGraphDiagram-IHSO6WYX-Sv91FaB5.js +106 -0
  79. package/dist/gui/assets/graph-DOmOIIwC.js +1 -0
  80. package/dist/gui/assets/index-Bp9JnkhK.css +1 -0
  81. package/dist/gui/assets/index-Do-LzYBw.js +21 -0
  82. package/dist/gui/assets/infoDiagram-FWYZ7A6U-BE3WS_us.js +2 -0
  83. package/dist/gui/assets/init-Gi6I4Gst.js +1 -0
  84. package/dist/gui/assets/ishikawaDiagram-FXEZZL3T-FObQPAd_.js +70 -0
  85. package/dist/gui/assets/journeyDiagram-5HDEW3XC-D3RAFL7x.js +139 -0
  86. package/dist/gui/assets/kanban-definition-HUTT4EX6-Bx1DS2KG.js +89 -0
  87. package/dist/gui/assets/katex-HP8lGamR.js +257 -0
  88. package/dist/gui/assets/layout-D-LzfAck.js +1 -0
  89. package/dist/gui/assets/linear-oevdTPQK.js +1 -0
  90. package/dist/gui/assets/map-DxJ2ADlA.js +1 -0
  91. package/dist/gui/assets/mermaid.core-jn1Xktvs.js +314 -0
  92. package/dist/gui/assets/mindmap-definition-LN4V7U3C-xLT5IJki.js +96 -0
  93. package/dist/gui/assets/ordinal-Cboi1Yqb.js +1 -0
  94. package/dist/gui/assets/pegDiagram-2B236MQR-DToAMrXG.js +1 -0
  95. package/dist/gui/assets/pieDiagram-ENE6RG2P-Cw6tv4YJ.js +39 -0
  96. package/dist/gui/assets/quadrantDiagram-ABIIQ3AL-GW5Knopm.js +7 -0
  97. package/dist/gui/assets/railroadDiagram-RFXS5EU6-CuP1sa-2.js +1 -0
  98. package/dist/gui/assets/requirementDiagram-TGXJPOKE-D8IcCo1X.js +84 -0
  99. package/dist/gui/assets/sankeyDiagram-HTMAVEWB-CfT_C9uh.js +40 -0
  100. package/dist/gui/assets/sequenceDiagram-DBY2YBRQ-BwUwWFYe.js +162 -0
  101. package/dist/gui/assets/sizeCapture-X5ZJPWSS-DyBlcl4H.js +1 -0
  102. package/dist/gui/assets/stateDiagram-2N3HPSRC-yv8DkbvF.js +1 -0
  103. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-BspjtPpt.js +1 -0
  104. package/dist/gui/assets/swimlanes-5IMT3BWC-BnOmKdmr.js +2 -0
  105. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-BgPC3dJX.js +8 -0
  106. package/dist/gui/assets/timeline-definition-FHXFAJF6-C6_-GVjE.js +120 -0
  107. package/dist/gui/assets/vennDiagram-L72KCM5P-D_N0uLk2.js +34 -0
  108. package/dist/gui/assets/wardleyDiagram-EHGQE667-CnNoxFYY.js +78 -0
  109. package/dist/gui/assets/xychartDiagram-FW5EYKEG-CloORw9z.js +7 -0
  110. package/dist/gui/index.html +13 -0
  111. package/dist/index--GoVvfUP.js +5447 -0
  112. package/dist/index-3-WDiDAh.js +5466 -0
  113. package/dist/index-CHBXZAxg.js +5460 -0
  114. package/dist/index-DeCq8xn7.js +5460 -0
  115. package/dist/infoDiagram-FWYZ7A6U-D9wo93kg.js +32 -0
  116. package/dist/init-DDGa2CQM.js +17 -0
  117. package/dist/ishikawaDiagram-FXEZZL3T-DZh3_kt2.js +968 -0
  118. package/dist/journeyDiagram-5HDEW3XC-C8RWHIn0.js +1256 -0
  119. package/dist/kanban-definition-HUTT4EX6-B7qQtB5a.js +1053 -0
  120. package/dist/katex-WjDlQEfU.js +14500 -0
  121. package/dist/layout-DQAYh_L7.js +2360 -0
  122. package/dist/linear-C_kZRZXS.js +341 -0
  123. package/dist/map-BElV7BMC.js +299 -0
  124. package/dist/mermaid.core-Dy_tFRs7.js +26495 -0
  125. package/dist/mindmap-definition-LN4V7U3C-BzHCd5Ab.js +1181 -0
  126. package/dist/ordinal-C2kkg180.js +77 -0
  127. package/dist/pegDiagram-2B236MQR-B046bQWM.js +127 -0
  128. package/dist/pieDiagram-ENE6RG2P-B5_W2CZy.js +316 -0
  129. package/dist/quadrantDiagram-ABIIQ3AL-Bbpt496h.js +1342 -0
  130. package/dist/railroadDiagram-RFXS5EU6-10XIH3X0.js +93 -0
  131. package/dist/requirementDiagram-TGXJPOKE-Dt1QyccY.js +1205 -0
  132. package/dist/sankeyDiagram-HTMAVEWB-CnqRAq7M.js +1274 -0
  133. package/dist/sequenceDiagram-DBY2YBRQ-DtJLSXoz.js +4515 -0
  134. package/dist/sizeCapture-X5ZJPWSS-DUl5ZEo3.js +63 -0
  135. package/dist/stateDiagram-2N3HPSRC-b-qzcVNj.js +449 -0
  136. package/dist/stateDiagram-v2-6OUMAXLB-KjDlRfc7.js +20 -0
  137. package/dist/swimlanes-5IMT3BWC-CAjGnQLa.js +8553 -0
  138. package/dist/swimlanesDiagram-G3AALYLV-DiOi9bzU.js +16 -0
  139. package/dist/timeline-definition-FHXFAJF6-Bme2FWbh.js +1597 -0
  140. package/dist/vennDiagram-L72KCM5P-BUQgnZDB.js +2516 -0
  141. package/dist/wardleyDiagram-EHGQE667-DHR2Avlu.js +976 -0
  142. package/dist/xychartDiagram-FW5EYKEG-V4K5eBMS.js +2000 -0
  143. package/package.json +73 -0
@@ -0,0 +1,2349 @@
1
+ #!/usr/bin/env node
2
+ import { g as getIconStyles } from "./chunk-5VM5RSS4-DmlAsh6o.js";
3
+ import { g as getDiagramElement } from "./chunk-XXDRQBXY-DhWucSRr.js";
4
+ import { s as setupViewPortForSVG } from "./chunk-VR4S4FIN-9AfN7RDF.js";
5
+ import { _ as __name, b6 as getUserDefinedConfig, F as setConfig2, l as log, c as getConfig2, u as getRegisteredLayoutAlgorithm, v as render, x as utils_default, b as setAccTitle, s as setAccDescription, n as setDiagramTitle, a as getAccTitle, g as getAccDescription, o as getDiagramTitle, k as common_default, G as load, J as JSON_SCHEMA, bo as isValidShape, q as getEdgeId, d as select, N as purify, p as clear, b8 as defaultConfig2, r as rgba } from "./mermaid.core-Dy_tFRs7.js";
6
+ import { f as createTooltip } from "./chunk-32BRIVSS-CIQb7-9I.js";
7
+ import { c as channel } from "./channel-_gQD3mZ8.js";
8
+ var MERMAID_DOM_ID_PREFIX = "flowchart-";
9
+ var FlowDB = class {
10
+ // cspell:ignore funs
11
+ constructor() {
12
+ this.vertexCounter = 0;
13
+ this.config = getConfig2();
14
+ this.diagramId = "";
15
+ this.vertices = /* @__PURE__ */ new Map();
16
+ this.edges = [];
17
+ this.classes = /* @__PURE__ */ new Map();
18
+ this.subGraphs = [];
19
+ this.subGraphLookup = /* @__PURE__ */ new Map();
20
+ this.tooltips = /* @__PURE__ */ new Map();
21
+ this.subCount = 0;
22
+ this.firstGraphFlag = true;
23
+ this.secCount = -1;
24
+ this.posCrossRef = [];
25
+ this.funs = [];
26
+ this.setAccTitle = setAccTitle;
27
+ this.setAccDescription = setAccDescription;
28
+ this.setDiagramTitle = setDiagramTitle;
29
+ this.getAccTitle = getAccTitle;
30
+ this.getAccDescription = getAccDescription;
31
+ this.getDiagramTitle = getDiagramTitle;
32
+ this.funs.push(this.setupToolTips.bind(this));
33
+ this.addVertex = this.addVertex.bind(this);
34
+ this.firstGraph = this.firstGraph.bind(this);
35
+ this.setDirection = this.setDirection.bind(this);
36
+ this.addSubGraph = this.addSubGraph.bind(this);
37
+ this.addLink = this.addLink.bind(this);
38
+ this.setLink = this.setLink.bind(this);
39
+ this.updateLink = this.updateLink.bind(this);
40
+ this.addClass = this.addClass.bind(this);
41
+ this.setClass = this.setClass.bind(this);
42
+ this.destructLink = this.destructLink.bind(this);
43
+ this.setClickEvent = this.setClickEvent.bind(this);
44
+ this.setTooltip = this.setTooltip.bind(this);
45
+ this.updateLinkInterpolate = this.updateLinkInterpolate.bind(this);
46
+ this.setClickFun = this.setClickFun.bind(this);
47
+ this.bindFunctions = this.bindFunctions.bind(this);
48
+ this.lex = {
49
+ firstGraph: this.firstGraph.bind(this)
50
+ };
51
+ this.clear();
52
+ this.setGen("gen-2");
53
+ }
54
+ static {
55
+ __name(this, "FlowDB");
56
+ }
57
+ sanitizeText(txt) {
58
+ return common_default.sanitizeText(txt, this.config);
59
+ }
60
+ sanitizeNodeLabelType(labelType) {
61
+ switch (labelType) {
62
+ case "markdown":
63
+ case "string":
64
+ case "text":
65
+ return labelType;
66
+ default:
67
+ return "markdown";
68
+ }
69
+ }
70
+ /**
71
+ * Sets the diagram's SVG element ID, used to prefix domIds for uniqueness
72
+ * across multiple diagrams on the same page.
73
+ */
74
+ setDiagramId(svgElementId) {
75
+ this.diagramId = svgElementId;
76
+ }
77
+ /**
78
+ * Function to lookup domId from id in the graph definition.
79
+ * When diagramId is set, returns the prefixed version for DOM uniqueness.
80
+ *
81
+ * @param id - id of the node
82
+ */
83
+ lookUpDomId(id) {
84
+ for (const vertex of this.vertices.values()) {
85
+ if (vertex.id === id) {
86
+ return this.diagramId ? `${this.diagramId}-${vertex.domId}` : vertex.domId;
87
+ }
88
+ }
89
+ return this.diagramId ? `${this.diagramId}-${id}` : id;
90
+ }
91
+ /**
92
+ * Function called by parser when a node definition has been found
93
+ */
94
+ addVertex(id, textObj, type, style, classes, dir, props = {}, metadata) {
95
+ if (!id || id.trim().length === 0) {
96
+ return;
97
+ }
98
+ let doc;
99
+ if (metadata !== void 0) {
100
+ let yamlData;
101
+ if (!metadata.includes("\n")) {
102
+ yamlData = "{\n" + metadata + "\n}";
103
+ } else {
104
+ yamlData = metadata + "\n";
105
+ }
106
+ doc = load(yamlData, { schema: JSON_SCHEMA });
107
+ }
108
+ const edge = this.edges.find((e) => e.id === id);
109
+ if (edge) {
110
+ const edgeDoc = doc;
111
+ if (edgeDoc?.animate !== void 0) {
112
+ edge.animate = edgeDoc.animate;
113
+ }
114
+ if (edgeDoc?.animation !== void 0) {
115
+ edge.animation = edgeDoc.animation;
116
+ }
117
+ if (edgeDoc?.curve !== void 0) {
118
+ edge.interpolate = edgeDoc.curve;
119
+ }
120
+ return;
121
+ }
122
+ let txt;
123
+ let vertex = this.vertices.get(id);
124
+ if (vertex === void 0) {
125
+ if (textObj === void 0 && type === void 0 && style !== void 0 && style !== null) {
126
+ log.warn(
127
+ `Style applied to unknown node "${id}". This may indicate a typo. The node will be created automatically.`
128
+ );
129
+ }
130
+ vertex = {
131
+ id,
132
+ labelType: "text",
133
+ domId: MERMAID_DOM_ID_PREFIX + id + "-" + this.vertexCounter,
134
+ styles: [],
135
+ classes: []
136
+ };
137
+ this.vertices.set(id, vertex);
138
+ }
139
+ this.vertexCounter++;
140
+ if (textObj !== void 0) {
141
+ this.config = getConfig2();
142
+ txt = this.sanitizeText(textObj.text.trim());
143
+ vertex.labelType = textObj.type;
144
+ if (txt.startsWith('"') && txt.endsWith('"')) {
145
+ txt = txt.substring(1, txt.length - 1);
146
+ }
147
+ vertex.text = txt;
148
+ } else {
149
+ if (vertex.text === void 0) {
150
+ vertex.text = id;
151
+ }
152
+ }
153
+ if (type !== void 0) {
154
+ vertex.type = type;
155
+ }
156
+ if (style !== void 0 && style !== null) {
157
+ style.forEach((s) => {
158
+ vertex.styles.push(s);
159
+ });
160
+ }
161
+ if (classes !== void 0 && classes !== null) {
162
+ classes.forEach((s) => {
163
+ vertex.classes.push(s);
164
+ });
165
+ }
166
+ if (dir !== void 0) {
167
+ vertex.dir = dir;
168
+ }
169
+ if (vertex.props === void 0) {
170
+ vertex.props = props;
171
+ } else if (props !== void 0) {
172
+ Object.assign(vertex.props, props);
173
+ }
174
+ if (doc !== void 0) {
175
+ if (doc.shape) {
176
+ if (doc.shape !== doc.shape.toLowerCase() || doc.shape.includes("_")) {
177
+ throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);
178
+ } else if (!isValidShape(doc.shape)) {
179
+ throw new Error(`No such shape: ${doc.shape}.`);
180
+ }
181
+ vertex.type = doc?.shape;
182
+ }
183
+ if (doc?.label) {
184
+ vertex.text = doc?.label;
185
+ vertex.labelType = this.sanitizeNodeLabelType(doc?.labelType);
186
+ }
187
+ if (doc?.icon) {
188
+ vertex.icon = doc?.icon;
189
+ if (!doc.label?.trim() && vertex.text === id) {
190
+ vertex.text = "";
191
+ }
192
+ }
193
+ if (doc?.form) {
194
+ vertex.form = doc?.form;
195
+ }
196
+ if (doc?.pos) {
197
+ vertex.pos = doc?.pos;
198
+ }
199
+ if (doc?.img) {
200
+ vertex.img = doc?.img;
201
+ if (!doc.label?.trim() && vertex.text === id) {
202
+ vertex.text = "";
203
+ }
204
+ }
205
+ if (doc?.constraint) {
206
+ vertex.constraint = doc.constraint;
207
+ }
208
+ if (doc.w) {
209
+ vertex.assetWidth = Number(doc.w);
210
+ }
211
+ if (doc.h) {
212
+ vertex.assetHeight = Number(doc.h);
213
+ }
214
+ }
215
+ }
216
+ /**
217
+ * Function called by parser when a link/edge definition has been found
218
+ *
219
+ */
220
+ addSingleLink(_start, _end, type, id) {
221
+ const start = _start;
222
+ const end = _end;
223
+ const edge = {
224
+ start,
225
+ end,
226
+ type: void 0,
227
+ text: "",
228
+ labelType: "text",
229
+ classes: [],
230
+ isUserDefinedId: false,
231
+ interpolate: this.edges.defaultInterpolate
232
+ };
233
+ log.info("abc78 Got edge...", edge);
234
+ const linkTextObj = type.text;
235
+ if (linkTextObj !== void 0) {
236
+ edge.text = this.sanitizeText(linkTextObj.text.trim());
237
+ if (edge.text.startsWith('"') && edge.text.endsWith('"')) {
238
+ edge.text = edge.text.substring(1, edge.text.length - 1);
239
+ }
240
+ edge.labelType = this.sanitizeNodeLabelType(linkTextObj.type);
241
+ }
242
+ if (type !== void 0) {
243
+ edge.type = type.type;
244
+ edge.stroke = type.stroke;
245
+ edge.length = type.length > 10 ? 10 : type.length;
246
+ }
247
+ if (id && !this.edges.some((e) => e.id === id)) {
248
+ edge.id = id;
249
+ edge.isUserDefinedId = true;
250
+ } else {
251
+ const existingLinks = this.edges.filter((e) => e.start === edge.start && e.end === edge.end);
252
+ if (existingLinks.length === 0) {
253
+ edge.id = getEdgeId(edge.start, edge.end, { counter: 0, prefix: "L" });
254
+ } else {
255
+ edge.id = getEdgeId(edge.start, edge.end, {
256
+ counter: existingLinks.length + 1,
257
+ prefix: "L"
258
+ });
259
+ }
260
+ }
261
+ if (this.edges.length < (this.config.maxEdges ?? 500)) {
262
+ log.info("Pushing edge...");
263
+ this.edges.push(edge);
264
+ } else {
265
+ throw new Error(
266
+ `Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
267
+
268
+ Initialize mermaid with maxEdges set to a higher number to allow more edges.
269
+ You cannot set this config via configuration inside the diagram as it is a secure config.
270
+ You have to call mermaid.initialize.`
271
+ );
272
+ }
273
+ }
274
+ isLinkData(value) {
275
+ return value !== null && typeof value === "object" && "id" in value && typeof value.id === "string";
276
+ }
277
+ addLink(_start, _end, linkData) {
278
+ const id = this.isLinkData(linkData) ? linkData.id.replace("@", "") : void 0;
279
+ log.info("addLink", _start, _end, id);
280
+ for (const start of _start) {
281
+ for (const end of _end) {
282
+ const isLastStart = start === _start[_start.length - 1];
283
+ const isFirstEnd = end === _end[0];
284
+ if (isLastStart && isFirstEnd) {
285
+ this.addSingleLink(start, end, linkData, id);
286
+ } else {
287
+ this.addSingleLink(start, end, linkData, void 0);
288
+ }
289
+ }
290
+ }
291
+ }
292
+ /**
293
+ * Updates a link's line interpolation algorithm
294
+ */
295
+ updateLinkInterpolate(positions, interpolate) {
296
+ positions.forEach((pos) => {
297
+ if (pos === "default") {
298
+ this.edges.defaultInterpolate = interpolate;
299
+ } else {
300
+ this.edges[pos].interpolate = interpolate;
301
+ }
302
+ });
303
+ }
304
+ /**
305
+ * Updates a link with a style
306
+ *
307
+ */
308
+ updateLink(positions, style) {
309
+ positions.forEach((pos) => {
310
+ if (typeof pos === "number" && pos >= this.edges.length) {
311
+ throw new Error(
312
+ `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)`
313
+ );
314
+ }
315
+ if (pos === "default") {
316
+ this.edges.defaultStyle = style;
317
+ } else {
318
+ this.edges[pos].style = style;
319
+ if ((this.edges[pos]?.style?.length ?? 0) > 0 && !this.edges[pos]?.style?.some((s) => s?.startsWith("fill"))) {
320
+ this.edges[pos]?.style?.push("fill:none");
321
+ }
322
+ }
323
+ });
324
+ }
325
+ addClass(ids, _style) {
326
+ const style = _style.join().replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
327
+ ids.split(",").forEach((id) => {
328
+ let classNode = this.classes.get(id);
329
+ if (classNode === void 0) {
330
+ classNode = { id, styles: [], textStyles: [] };
331
+ this.classes.set(id, classNode);
332
+ }
333
+ if (style !== void 0 && style !== null) {
334
+ style.forEach((s) => {
335
+ if (/color/.exec(s)) {
336
+ const newStyle = s.replace("fill", "bgFill");
337
+ classNode.textStyles.push(newStyle);
338
+ }
339
+ classNode.styles.push(s);
340
+ });
341
+ }
342
+ });
343
+ }
344
+ /**
345
+ * Called by parser when a graph definition is found, stores the direction of the chart.
346
+ *
347
+ */
348
+ setDirection(dir) {
349
+ this.direction = dir.trim();
350
+ if (/.*</.exec(this.direction)) {
351
+ this.direction = "RL";
352
+ }
353
+ if (/.*\^/.exec(this.direction)) {
354
+ this.direction = "BT";
355
+ }
356
+ if (/.*>/.exec(this.direction)) {
357
+ this.direction = "LR";
358
+ }
359
+ if (/.*v/.exec(this.direction)) {
360
+ this.direction = "TB";
361
+ }
362
+ if (this.direction === "TD") {
363
+ this.direction = "TB";
364
+ }
365
+ }
366
+ /**
367
+ * Called by parser when a special node is found, e.g. a clickable element.
368
+ *
369
+ * @param ids - Comma separated list of ids
370
+ * @param className - Class to add
371
+ */
372
+ setClass(ids, className) {
373
+ for (const id of ids.split(",")) {
374
+ const vertex = this.vertices.get(id);
375
+ if (vertex) {
376
+ vertex.classes.push(className);
377
+ }
378
+ const edge = this.edges.find((e) => e.id === id);
379
+ if (edge) {
380
+ edge.classes.push(className);
381
+ }
382
+ const subGraph = this.subGraphLookup.get(id);
383
+ if (subGraph) {
384
+ subGraph.classes.push(className);
385
+ }
386
+ }
387
+ }
388
+ setTooltip(ids, tooltip) {
389
+ if (tooltip === void 0) {
390
+ return;
391
+ }
392
+ tooltip = this.sanitizeText(tooltip);
393
+ for (const id of ids.split(",")) {
394
+ this.tooltips.set(this.version === "gen-1" ? this.lookUpDomId(id) : id, tooltip);
395
+ }
396
+ }
397
+ setClickFun(id, functionName, functionArgs) {
398
+ if (getConfig2().securityLevel !== "loose") {
399
+ return;
400
+ }
401
+ if (functionName === void 0) {
402
+ return;
403
+ }
404
+ let argList = [];
405
+ if (typeof functionArgs === "string") {
406
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
407
+ for (let i = 0; i < argList.length; i++) {
408
+ let item = argList[i].trim();
409
+ if (item.startsWith('"') && item.endsWith('"')) {
410
+ item = item.substr(1, item.length - 2);
411
+ }
412
+ argList[i] = item;
413
+ }
414
+ }
415
+ if (argList.length === 0) {
416
+ argList.push(id);
417
+ }
418
+ const vertex = this.vertices.get(id);
419
+ if (vertex) {
420
+ vertex.haveCallback = true;
421
+ this.funs.push(() => {
422
+ const domId = this.lookUpDomId(id);
423
+ const elem = document.querySelector(`[id="${domId}"]`);
424
+ if (elem !== null) {
425
+ elem.addEventListener(
426
+ "click",
427
+ () => {
428
+ utils_default.runFunc(functionName, ...argList);
429
+ },
430
+ false
431
+ );
432
+ }
433
+ });
434
+ }
435
+ }
436
+ /**
437
+ * Called by parser when a link is found. Adds the URL to the vertex data.
438
+ *
439
+ * @param ids - Comma separated list of ids
440
+ * @param linkStr - URL to create a link for
441
+ * @param target - Target attribute for the link
442
+ */
443
+ setLink(ids, linkStr, target) {
444
+ ids.split(",").forEach((id) => {
445
+ const vertex = this.vertices.get(id);
446
+ if (vertex !== void 0) {
447
+ vertex.link = utils_default.formatUrl(linkStr, this.config);
448
+ vertex.linkTarget = target;
449
+ }
450
+ });
451
+ this.setClass(ids, "clickable");
452
+ }
453
+ getTooltip(id) {
454
+ return this.tooltips.get(id);
455
+ }
456
+ /**
457
+ * Called by parser when a click definition is found. Registers an event handler.
458
+ *
459
+ * @param ids - Comma separated list of ids
460
+ * @param functionName - Function to be called on click
461
+ * @param functionArgs - Arguments to be passed to the function
462
+ */
463
+ setClickEvent(ids, functionName, functionArgs) {
464
+ ids.split(",").forEach((id) => {
465
+ this.setClickFun(id, functionName, functionArgs);
466
+ });
467
+ this.setClass(ids, "clickable");
468
+ }
469
+ bindFunctions(element) {
470
+ this.funs.forEach((fun) => {
471
+ fun(element);
472
+ });
473
+ }
474
+ getDirection() {
475
+ return this.direction?.trim();
476
+ }
477
+ /**
478
+ * Retrieval function for fetching the found nodes after parsing has completed.
479
+ *
480
+ */
481
+ getVertices() {
482
+ return this.vertices;
483
+ }
484
+ /**
485
+ * Retrieval function for fetching the found links after parsing has completed.
486
+ *
487
+ */
488
+ getEdges() {
489
+ return this.edges;
490
+ }
491
+ /**
492
+ * Retrieval function for fetching the found class definitions after parsing has completed.
493
+ *
494
+ */
495
+ getClasses() {
496
+ return this.classes;
497
+ }
498
+ setupToolTips(element) {
499
+ const tooltipElem = createTooltip();
500
+ const svg = select(element).select("svg");
501
+ const nodes = svg.selectAll("g.node");
502
+ nodes.on("mouseover", (e) => {
503
+ const el = select(e.currentTarget);
504
+ const title = el.attr("title");
505
+ if (title === null) {
506
+ return;
507
+ }
508
+ const rect = e.currentTarget?.getBoundingClientRect();
509
+ tooltipElem.transition().duration(200).style("opacity", ".9");
510
+ tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px");
511
+ tooltipElem.html(purify.sanitize(title));
512
+ el.classed("hover", true);
513
+ }).on("mouseout", (e) => {
514
+ tooltipElem.transition().duration(500).style("opacity", 0);
515
+ const el = select(e.currentTarget);
516
+ el.classed("hover", false);
517
+ });
518
+ }
519
+ /**
520
+ * Clears the internal graph db so that a new graph can be parsed.
521
+ *
522
+ */
523
+ clear(ver = "gen-2") {
524
+ this.vertices = /* @__PURE__ */ new Map();
525
+ this.classes = /* @__PURE__ */ new Map();
526
+ this.edges = [];
527
+ this.funs = [this.setupToolTips.bind(this)];
528
+ this.diagramId = "";
529
+ this.subGraphs = [];
530
+ this.subGraphLookup = /* @__PURE__ */ new Map();
531
+ this.subCount = 0;
532
+ this.tooltips = /* @__PURE__ */ new Map();
533
+ this.firstGraphFlag = true;
534
+ this.version = ver;
535
+ this.config = getConfig2();
536
+ clear();
537
+ }
538
+ setGen(ver) {
539
+ this.version = ver || "gen-2";
540
+ }
541
+ defaultStyle() {
542
+ return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
543
+ }
544
+ addSubGraph(_id, list, _title) {
545
+ let id = _id.text.trim();
546
+ let title = _title.text;
547
+ if (_id === _title && /\s/.exec(_title.text)) {
548
+ id = void 0;
549
+ }
550
+ const uniq = /* @__PURE__ */ __name((a) => {
551
+ const prims = { boolean: {}, number: {}, string: {} };
552
+ const objs = [];
553
+ let dir2;
554
+ const nodeList2 = a.filter(function(item) {
555
+ const type = typeof item;
556
+ if (item.stmt && item.stmt === "dir") {
557
+ dir2 = item.value;
558
+ return false;
559
+ }
560
+ if (item.trim() === "") {
561
+ return false;
562
+ }
563
+ if (type in prims) {
564
+ return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
565
+ } else {
566
+ return objs.includes(item) ? false : objs.push(item);
567
+ }
568
+ });
569
+ return { nodeList: nodeList2, dir: dir2 };
570
+ }, "uniq");
571
+ const result = uniq(list.flat());
572
+ const nodeList = result.nodeList;
573
+ const rawDir = result.dir;
574
+ const hasExplicitDir = rawDir !== void 0;
575
+ const flowchartConfig = getConfig2().flowchart ?? {};
576
+ const dir = rawDir ?? (flowchartConfig.inheritDir ? this.getDirection() ?? getConfig2().direction ?? void 0 : void 0);
577
+ if (this.version === "gen-1") {
578
+ for (let i = 0; i < nodeList.length; i++) {
579
+ nodeList[i] = this.lookUpDomId(nodeList[i]);
580
+ }
581
+ }
582
+ id = id ?? "subGraph" + this.subCount;
583
+ title = title || "";
584
+ title = this.sanitizeText(title);
585
+ this.subCount = this.subCount + 1;
586
+ const subGraph = {
587
+ id,
588
+ nodes: nodeList,
589
+ title: title.trim(),
590
+ classes: [],
591
+ dir,
592
+ hasExplicitDir,
593
+ labelType: this.sanitizeNodeLabelType(_title?.type)
594
+ };
595
+ log.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir);
596
+ subGraph.nodes = this.makeUniq(subGraph, this.subGraphs).nodes;
597
+ this.subGraphs.push(subGraph);
598
+ this.subGraphLookup.set(id, subGraph);
599
+ return id;
600
+ }
601
+ getPosForId(id) {
602
+ for (const [i, subGraph] of this.subGraphs.entries()) {
603
+ if (subGraph.id === id) {
604
+ return i;
605
+ }
606
+ }
607
+ return -1;
608
+ }
609
+ indexNodes2(id, pos) {
610
+ const nodes = this.subGraphs[pos].nodes;
611
+ this.secCount = this.secCount + 1;
612
+ if (this.secCount > 2e3) {
613
+ return {
614
+ result: false,
615
+ count: 0
616
+ };
617
+ }
618
+ this.posCrossRef[this.secCount] = pos;
619
+ if (this.subGraphs[pos].id === id) {
620
+ return {
621
+ result: true,
622
+ count: 0
623
+ };
624
+ }
625
+ let count = 0;
626
+ let posCount = 1;
627
+ while (count < nodes.length) {
628
+ const childPos = this.getPosForId(nodes[count]);
629
+ if (childPos >= 0) {
630
+ const res = this.indexNodes2(id, childPos);
631
+ if (res.result) {
632
+ return {
633
+ result: true,
634
+ count: posCount + res.count
635
+ };
636
+ } else {
637
+ posCount = posCount + res.count;
638
+ }
639
+ }
640
+ count = count + 1;
641
+ }
642
+ return {
643
+ result: false,
644
+ count: posCount
645
+ };
646
+ }
647
+ getDepthFirstPos(pos) {
648
+ return this.posCrossRef[pos];
649
+ }
650
+ indexNodes() {
651
+ this.secCount = -1;
652
+ if (this.subGraphs.length > 0) {
653
+ this.indexNodes2("none", this.subGraphs.length - 1);
654
+ }
655
+ }
656
+ getSubGraphs() {
657
+ return this.subGraphs;
658
+ }
659
+ firstGraph() {
660
+ if (this.firstGraphFlag) {
661
+ this.firstGraphFlag = false;
662
+ return true;
663
+ }
664
+ return false;
665
+ }
666
+ destructStartLink(_str) {
667
+ let str = _str.trim();
668
+ let type = "arrow_open";
669
+ switch (str[0]) {
670
+ case "<":
671
+ type = "arrow_point";
672
+ str = str.slice(1);
673
+ break;
674
+ case "x":
675
+ type = "arrow_cross";
676
+ str = str.slice(1);
677
+ break;
678
+ case "o":
679
+ type = "arrow_circle";
680
+ str = str.slice(1);
681
+ break;
682
+ }
683
+ let stroke = "normal";
684
+ if (str.includes("=")) {
685
+ stroke = "thick";
686
+ }
687
+ if (str.includes(".")) {
688
+ stroke = "dotted";
689
+ }
690
+ return { type, stroke };
691
+ }
692
+ countChar(char, str) {
693
+ const length = str.length;
694
+ let count = 0;
695
+ for (let i = 0; i < length; ++i) {
696
+ if (str[i] === char) {
697
+ ++count;
698
+ }
699
+ }
700
+ return count;
701
+ }
702
+ destructEndLink(_str) {
703
+ const str = _str.trim();
704
+ let line = str.slice(0, -1);
705
+ let type = "arrow_open";
706
+ switch (str.slice(-1)) {
707
+ case "x":
708
+ type = "arrow_cross";
709
+ if (str.startsWith("x")) {
710
+ type = "double_" + type;
711
+ line = line.slice(1);
712
+ }
713
+ break;
714
+ case ">":
715
+ type = "arrow_point";
716
+ if (str.startsWith("<")) {
717
+ type = "double_" + type;
718
+ line = line.slice(1);
719
+ }
720
+ break;
721
+ case "o":
722
+ type = "arrow_circle";
723
+ if (str.startsWith("o")) {
724
+ type = "double_" + type;
725
+ line = line.slice(1);
726
+ }
727
+ break;
728
+ }
729
+ let stroke = "normal";
730
+ let length = line.length - 1;
731
+ if (line.startsWith("=")) {
732
+ stroke = "thick";
733
+ }
734
+ if (line.startsWith("~")) {
735
+ stroke = "invisible";
736
+ }
737
+ const dots = this.countChar(".", line);
738
+ if (dots) {
739
+ stroke = "dotted";
740
+ length = dots;
741
+ }
742
+ return { type, stroke, length };
743
+ }
744
+ destructLink(_str, _startStr) {
745
+ const info = this.destructEndLink(_str);
746
+ let startInfo;
747
+ if (_startStr) {
748
+ startInfo = this.destructStartLink(_startStr);
749
+ if (startInfo.stroke !== info.stroke) {
750
+ return { type: "INVALID", stroke: "INVALID" };
751
+ }
752
+ if (startInfo.type === "arrow_open") {
753
+ startInfo.type = info.type;
754
+ } else {
755
+ if (startInfo.type !== info.type) {
756
+ return { type: "INVALID", stroke: "INVALID" };
757
+ }
758
+ startInfo.type = "double_" + startInfo.type;
759
+ }
760
+ if (startInfo.type === "double_arrow") {
761
+ startInfo.type = "double_arrow_point";
762
+ }
763
+ startInfo.length = info.length;
764
+ return startInfo;
765
+ }
766
+ return info;
767
+ }
768
+ // Todo optimizer this by caching existing nodes
769
+ exists(allSgs, _id) {
770
+ for (const sg of allSgs) {
771
+ if (sg.nodes.includes(_id)) {
772
+ return true;
773
+ }
774
+ }
775
+ return false;
776
+ }
777
+ /**
778
+ * Deletes an id from all subgraphs
779
+ *
780
+ */
781
+ makeUniq(sg, allSubgraphs) {
782
+ const res = [];
783
+ sg.nodes.forEach((_id, pos) => {
784
+ if (!this.exists(allSubgraphs, _id)) {
785
+ res.push(sg.nodes[pos]);
786
+ }
787
+ });
788
+ return { nodes: res };
789
+ }
790
+ getTypeFromVertex(vertex) {
791
+ if (vertex.img) {
792
+ return "imageSquare";
793
+ }
794
+ if (vertex.icon) {
795
+ if (vertex.form === "circle") {
796
+ return "iconCircle";
797
+ }
798
+ if (vertex.form === "square") {
799
+ return "iconSquare";
800
+ }
801
+ if (vertex.form === "rounded") {
802
+ return "iconRounded";
803
+ }
804
+ return "icon";
805
+ }
806
+ switch (vertex.type) {
807
+ case "square":
808
+ case void 0:
809
+ return "squareRect";
810
+ case "round":
811
+ return "roundedRect";
812
+ case "ellipse":
813
+ return "ellipse";
814
+ default:
815
+ return vertex.type;
816
+ }
817
+ }
818
+ findNode(nodes, id) {
819
+ return nodes.find((node) => node.id === id);
820
+ }
821
+ destructEdgeType(type) {
822
+ let arrowTypeStart = "none";
823
+ let arrowTypeEnd = "arrow_point";
824
+ switch (type) {
825
+ case "arrow_point":
826
+ case "arrow_circle":
827
+ case "arrow_cross":
828
+ arrowTypeEnd = type;
829
+ break;
830
+ case "double_arrow_point":
831
+ case "double_arrow_circle":
832
+ case "double_arrow_cross":
833
+ arrowTypeStart = type.replace("double_", "");
834
+ arrowTypeEnd = arrowTypeStart;
835
+ break;
836
+ }
837
+ return { arrowTypeStart, arrowTypeEnd };
838
+ }
839
+ addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, look) {
840
+ const parentId = parentDB.get(vertex.id);
841
+ const isGroup = subGraphDB.get(vertex.id) ?? false;
842
+ const node = this.findNode(nodes, vertex.id);
843
+ if (node) {
844
+ node.cssStyles = vertex.styles;
845
+ node.cssCompiledStyles = this.getCompiledStyles(vertex.classes);
846
+ node.cssClasses = vertex.classes.join(" ");
847
+ } else {
848
+ const baseNode = {
849
+ id: vertex.id,
850
+ label: vertex.text,
851
+ labelType: vertex.labelType,
852
+ labelStyle: "",
853
+ parentId,
854
+ padding: config.flowchart?.padding || 8,
855
+ cssStyles: vertex.styles,
856
+ cssCompiledStyles: this.getCompiledStyles(["default", "node", ...vertex.classes]),
857
+ cssClasses: "default " + vertex.classes.join(" "),
858
+ dir: vertex.dir,
859
+ domId: vertex.domId,
860
+ look,
861
+ link: vertex.link,
862
+ linkTarget: vertex.linkTarget,
863
+ tooltip: this.getTooltip(vertex.id),
864
+ icon: vertex.icon,
865
+ pos: vertex.pos,
866
+ img: vertex.img,
867
+ assetWidth: vertex.assetWidth,
868
+ assetHeight: vertex.assetHeight,
869
+ constraint: vertex.constraint
870
+ };
871
+ if (isGroup) {
872
+ nodes.push({
873
+ ...baseNode,
874
+ isGroup: true,
875
+ shape: "rect"
876
+ });
877
+ } else {
878
+ nodes.push({
879
+ ...baseNode,
880
+ isGroup: false,
881
+ shape: this.getTypeFromVertex(vertex)
882
+ });
883
+ }
884
+ }
885
+ }
886
+ getCompiledStyles(classDefs) {
887
+ let compiledStyles = [];
888
+ for (const customClass of classDefs) {
889
+ const cssClass = this.classes.get(customClass);
890
+ if (cssClass?.styles) {
891
+ compiledStyles = [...compiledStyles, ...cssClass.styles ?? []].map((s) => s.trim());
892
+ }
893
+ if (cssClass?.textStyles) {
894
+ compiledStyles = [...compiledStyles, ...cssClass.textStyles ?? []].map((s) => s.trim());
895
+ }
896
+ }
897
+ return compiledStyles;
898
+ }
899
+ getData() {
900
+ const config = getConfig2();
901
+ const nodes = [];
902
+ const edges = [];
903
+ const subGraphs = this.getSubGraphs();
904
+ const parentDB = /* @__PURE__ */ new Map();
905
+ const subGraphDB = /* @__PURE__ */ new Map();
906
+ for (let i = subGraphs.length - 1; i >= 0; i--) {
907
+ const subGraph = subGraphs[i];
908
+ if (subGraph.nodes.length > 0) {
909
+ subGraphDB.set(subGraph.id, true);
910
+ }
911
+ for (const id of subGraph.nodes) {
912
+ parentDB.set(id, subGraph.id);
913
+ }
914
+ }
915
+ for (let i = subGraphs.length - 1; i >= 0; i--) {
916
+ const subGraph = subGraphs[i];
917
+ nodes.push({
918
+ id: subGraph.id,
919
+ label: subGraph.title,
920
+ labelStyle: "",
921
+ labelType: subGraph.labelType,
922
+ parentId: parentDB.get(subGraph.id),
923
+ padding: 8,
924
+ cssCompiledStyles: this.getCompiledStyles(subGraph.classes),
925
+ cssClasses: subGraph.classes.join(" "),
926
+ shape: "rect",
927
+ dir: subGraph.dir === "TD" ? "TB" : subGraph.dir,
928
+ // normalize TD→TB for dagre
929
+ explicitDir: subGraph.hasExplicitDir,
930
+ // true only when the user wrote an explicit 'direction X' keyword
931
+ isGroup: true,
932
+ look: config.look
933
+ });
934
+ }
935
+ const n = this.getVertices();
936
+ n.forEach((vertex) => {
937
+ this.addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look || "classic");
938
+ });
939
+ const e = this.getEdges();
940
+ e.forEach((rawEdge, index) => {
941
+ const { arrowTypeStart, arrowTypeEnd } = this.destructEdgeType(rawEdge.type);
942
+ const styles = [...e.defaultStyle ?? []];
943
+ if (rawEdge.style) {
944
+ styles.push(...rawEdge.style);
945
+ }
946
+ const edge = {
947
+ id: getEdgeId(rawEdge.start, rawEdge.end, { counter: index, prefix: "L" }, rawEdge.id),
948
+ isUserDefinedId: rawEdge.isUserDefinedId,
949
+ start: rawEdge.start,
950
+ end: rawEdge.end,
951
+ type: rawEdge.type ?? "normal",
952
+ label: rawEdge.text,
953
+ labelType: rawEdge.labelType,
954
+ labelpos: "c",
955
+ thickness: rawEdge.stroke,
956
+ minlen: rawEdge.length,
957
+ classes: rawEdge?.stroke === "invisible" ? "" : "edge-thickness-normal edge-pattern-solid flowchart-link",
958
+ arrowTypeStart: rawEdge?.stroke === "invisible" || rawEdge?.type === "arrow_open" ? "none" : arrowTypeStart,
959
+ arrowTypeEnd: rawEdge?.stroke === "invisible" || rawEdge?.type === "arrow_open" ? "none" : arrowTypeEnd,
960
+ arrowheadStyle: "fill: #333",
961
+ cssCompiledStyles: this.getCompiledStyles(rawEdge.classes),
962
+ labelStyle: styles,
963
+ style: styles,
964
+ pattern: rawEdge.stroke,
965
+ look: config.look,
966
+ animate: rawEdge.animate,
967
+ animation: rawEdge.animation,
968
+ curve: rawEdge.interpolate || this.edges.defaultInterpolate || config.flowchart?.curve
969
+ };
970
+ edges.push(edge);
971
+ });
972
+ return { nodes, edges, other: {}, config };
973
+ }
974
+ defaultConfig() {
975
+ return defaultConfig2.flowchart;
976
+ }
977
+ };
978
+ var getClasses = /* @__PURE__ */ __name(function(text, diagramObj) {
979
+ return diagramObj.db.getClasses();
980
+ }, "getClasses");
981
+ var draw = /* @__PURE__ */ __name(async function(text, id, _version, diag, positions) {
982
+ log.info("REF0:");
983
+ log.info("Drawing state diagram (v2)", id);
984
+ const { securityLevel, flowchart: conf, layout } = getConfig2();
985
+ diag.db.setDiagramId(id);
986
+ log.debug("Before getData: ");
987
+ const data4Layout = diag.db.getData();
988
+ log.debug("Data: ", data4Layout);
989
+ const svg = getDiagramElement(id, securityLevel);
990
+ const direction = diag.db.getDirection();
991
+ data4Layout.type = diag.type;
992
+ data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);
993
+ if (data4Layout.layoutAlgorithm === "dagre" && layout === "elk") {
994
+ log.warn(
995
+ "flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."
996
+ );
997
+ }
998
+ data4Layout.direction = direction;
999
+ data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
1000
+ data4Layout.rankSpacing = conf?.rankSpacing || 50;
1001
+ data4Layout.markers = ["point", "circle", "cross"];
1002
+ data4Layout.diagramId = id;
1003
+ log.debug("REF1:", data4Layout);
1004
+ await render(data4Layout, svg, positions);
1005
+ const padding = data4Layout.config.flowchart?.diagramPadding ?? 8;
1006
+ utils_default.insertTitle(
1007
+ svg,
1008
+ "flowchartTitleText",
1009
+ conf?.titleTopMargin || 0,
1010
+ diag.db.getDiagramTitle()
1011
+ );
1012
+ setupViewPortForSVG(svg, padding, "flowchart", conf?.useMaxWidth || false);
1013
+ }, "draw");
1014
+ var flowRenderer_v3_unified_default = {
1015
+ getClasses,
1016
+ draw
1017
+ };
1018
+ var parser = (function() {
1019
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
1020
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
1021
+ return o2;
1022
+ }, "o"), $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124, 125], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 50], $Ve = [1, 49], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 45], $Vl = [1, 47], $Vm = [1, 43], $Vn = [1, 48], $Vo = [1, 44], $Vp = [1, 51], $Vq = [1, 46], $Vr = [1, 52], $Vs = [1, 53], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 38], $Vy = [1, 58], $Vz = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124, 125], $VA = [1, 62], $VB = [1, 61], $VC = [1, 63], $VD = [8, 9, 11, 75, 77, 78], $VE = [1, 79], $VF = [1, 92], $VG = [1, 97], $VH = [1, 96], $VI = [1, 93], $VJ = [1, 89], $VK = [1, 95], $VL = [1, 91], $VM = [1, 98], $VN = [1, 94], $VO = [1, 99], $VP = [1, 90], $VQ = [8, 9, 10, 11, 40, 75, 77, 78], $VR = [8, 9, 10, 11, 40, 46, 75, 77, 78], $VS = [8, 9, 10, 11, 29, 40, 44, 46, 48, 50, 52, 54, 56, 58, 60, 63, 65, 67, 68, 70, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VT = [8, 9, 11, 44, 60, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VU = [44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VV = [1, 122], $VW = [1, 123], $VX = [1, 125], $VY = [1, 124], $VZ = [44, 60, 62, 74, 89, 102, 105, 106, 109, 111, 114, 115, 116], $V_ = [1, 134], $V$ = [1, 148], $V01 = [1, 149], $V11 = [1, 150], $V21 = [1, 151], $V31 = [1, 136], $V41 = [1, 138], $V51 = [1, 142], $V61 = [1, 143], $V71 = [1, 144], $V81 = [1, 145], $V91 = [1, 146], $Va1 = [1, 147], $Vb1 = [1, 152], $Vc1 = [1, 153], $Vd1 = [1, 132], $Ve1 = [1, 133], $Vf1 = [1, 140], $Vg1 = [1, 135], $Vh1 = [1, 139], $Vi1 = [1, 137], $Vj1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124, 125], $Vk1 = [1, 155], $Vl1 = [1, 157], $Vm1 = [8, 9, 11], $Vn1 = [8, 9, 10, 11, 14, 44, 60, 89, 105, 106, 109, 111, 114, 115, 116], $Vo1 = [1, 177], $Vp1 = [1, 173], $Vq1 = [1, 174], $Vr1 = [1, 178], $Vs1 = [1, 175], $Vt1 = [1, 176], $Vu1 = [77, 116, 119], $Vv1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 44, 60, 75, 84, 85, 86, 87, 88, 89, 90, 105, 109, 111, 114, 115, 116], $Vw1 = [10, 106], $Vx1 = [31, 49, 51, 53, 55, 57, 62, 64, 66, 67, 69, 71, 116, 117, 118], $Vy1 = [1, 248], $Vz1 = [1, 246], $VA1 = [1, 250], $VB1 = [1, 244], $VC1 = [1, 245], $VD1 = [1, 247], $VE1 = [1, 249], $VF1 = [1, 251], $VG1 = [1, 269], $VH1 = [8, 9, 11, 106], $VI1 = [8, 9, 10, 11, 60, 84, 105, 106, 109, 110, 111, 112];
1023
+ var parser2 = {
1024
+ trace: /* @__PURE__ */ __name(function trace() {
1025
+ }, "trace"),
1026
+ yy: {},
1027
+ symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeparator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "vertexStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "shapeData": 39, "SHAPE_DATA": 40, "link": 41, "node": 42, "styledVertex": 43, "AMP": 44, "vertex": 45, "STYLE_SEPARATOR": 46, "idString": 47, "DOUBLECIRCLESTART": 48, "DOUBLECIRCLEEND": 49, "PS": 50, "PE": 51, "(-": 52, "-)": 53, "STADIUMSTART": 54, "STADIUMEND": 55, "SUBROUTINESTART": 56, "SUBROUTINEEND": 57, "VERTEX_WITH_PROPS_START": 58, "NODE_STRING[field]": 59, "COLON": 60, "NODE_STRING[value]": 61, "PIPE": 62, "CYLINDERSTART": 63, "CYLINDEREND": 64, "DIAMOND_START": 65, "DIAMOND_STOP": 66, "TAGEND": 67, "TRAPSTART": 68, "TRAPEND": 69, "INVTRAPSTART": 70, "INVTRAPEND": 71, "linkStatement": 72, "arrowText": 73, "TESTSTR": 74, "START_LINK": 75, "edgeText": 76, "LINK": 77, "LINK_ID": 78, "edgeTextToken": 79, "STR": 80, "MD_STR": 81, "textToken": 82, "keywords": 83, "STYLE": 84, "LINKSTYLE": 85, "CLASSDEF": 86, "CLASS": 87, "CLICK": 88, "DOWN": 89, "UP": 90, "textNoTagsToken": 91, "stylesOpt": 92, "idString[vertex]": 93, "idString[class]": 94, "CALLBACKNAME": 95, "CALLBACKARGS": 96, "HREF": 97, "LINK_TARGET": 98, "STR[link]": 99, "STR[tooltip]": 100, "alphaNum": 101, "DEFAULT": 102, "numList": 103, "INTERPOLATE": 104, "NUM": 105, "COMMA": 106, "style": 107, "styleComponent": 108, "NODE_STRING": 109, "UNIT": 110, "BRKT": 111, "PCT": 112, "idStringToken": 113, "MINUS": 114, "MULT": 115, "UNICODE_TEXT": 116, "TEXT": 117, "TAGSTART": 118, "EDGE_TEXT": 119, "alphaNumToken": 120, "direction_tb": 121, "direction_bt": 122, "direction_rl": 123, "direction_lr": 124, "direction_td": 125, "$accept": 0, "$end": 1 },
1028
+ terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 40: "SHAPE_DATA", 44: "AMP", 46: "STYLE_SEPARATOR", 48: "DOUBLECIRCLESTART", 49: "DOUBLECIRCLEEND", 50: "PS", 51: "PE", 52: "(-", 53: "-)", 54: "STADIUMSTART", 55: "STADIUMEND", 56: "SUBROUTINESTART", 57: "SUBROUTINEEND", 58: "VERTEX_WITH_PROPS_START", 59: "NODE_STRING[field]", 60: "COLON", 61: "NODE_STRING[value]", 62: "PIPE", 63: "CYLINDERSTART", 64: "CYLINDEREND", 65: "DIAMOND_START", 66: "DIAMOND_STOP", 67: "TAGEND", 68: "TRAPSTART", 69: "TRAPEND", 70: "INVTRAPSTART", 71: "INVTRAPEND", 74: "TESTSTR", 75: "START_LINK", 77: "LINK", 78: "LINK_ID", 80: "STR", 81: "MD_STR", 84: "STYLE", 85: "LINKSTYLE", 86: "CLASSDEF", 87: "CLASS", 88: "CLICK", 89: "DOWN", 90: "UP", 93: "idString[vertex]", 94: "idString[class]", 95: "CALLBACKNAME", 96: "CALLBACKARGS", 97: "HREF", 98: "LINK_TARGET", 99: "STR[link]", 100: "STR[tooltip]", 102: "DEFAULT", 104: "INTERPOLATE", 105: "NUM", 106: "COMMA", 109: "NODE_STRING", 110: "UNIT", 111: "BRKT", 112: "PCT", 114: "MINUS", 115: "MULT", 116: "UNICODE_TEXT", 117: "TEXT", 118: "TAGSTART", 119: "EDGE_TEXT", 121: "direction_tb", 122: "direction_bt", 123: "direction_rl", 124: "direction_lr", 125: "direction_td" },
1029
+ productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [39, 2], [39, 1], [20, 4], [20, 3], [20, 4], [20, 2], [20, 2], [20, 1], [42, 1], [42, 6], [42, 5], [43, 1], [43, 3], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 8], [45, 4], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 4], [45, 4], [45, 1], [41, 2], [41, 3], [41, 3], [41, 1], [41, 3], [41, 4], [76, 1], [76, 2], [76, 1], [76, 1], [72, 1], [72, 2], [73, 3], [30, 1], [30, 2], [30, 1], [30, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [103, 1], [103, 3], [92, 1], [92, 3], [107, 1], [107, 2], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [82, 1], [82, 1], [82, 1], [82, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [79, 1], [79, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [47, 1], [47, 2], [101, 1], [101, 2], [33, 1], [33, 1], [33, 1], [33, 1], [33, 1]],
1030
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
1031
+ var $0 = $$.length - 1;
1032
+ switch (yystate) {
1033
+ case 2:
1034
+ this.$ = [];
1035
+ break;
1036
+ case 3:
1037
+ if (!Array.isArray($$[$0]) || $$[$0].length > 0) {
1038
+ $$[$0 - 1].push($$[$0]);
1039
+ }
1040
+ this.$ = $$[$0 - 1];
1041
+ break;
1042
+ case 4:
1043
+ case 183:
1044
+ this.$ = $$[$0];
1045
+ break;
1046
+ case 11:
1047
+ yy.setDirection("TB");
1048
+ this.$ = "TB";
1049
+ break;
1050
+ case 12:
1051
+ yy.setDirection($$[$0 - 1]);
1052
+ this.$ = $$[$0 - 1];
1053
+ break;
1054
+ case 27:
1055
+ this.$ = $$[$0 - 1].nodes;
1056
+ break;
1057
+ case 28:
1058
+ case 29:
1059
+ case 30:
1060
+ case 31:
1061
+ case 32:
1062
+ this.$ = [];
1063
+ break;
1064
+ case 33:
1065
+ this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);
1066
+ break;
1067
+ case 34:
1068
+ this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);
1069
+ break;
1070
+ case 35:
1071
+ this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0);
1072
+ break;
1073
+ case 37:
1074
+ this.$ = $$[$0].trim();
1075
+ yy.setAccTitle(this.$);
1076
+ break;
1077
+ case 38:
1078
+ case 39:
1079
+ this.$ = $$[$0].trim();
1080
+ yy.setAccDescription(this.$);
1081
+ break;
1082
+ case 43:
1083
+ this.$ = $$[$0 - 1] + $$[$0];
1084
+ break;
1085
+ case 44:
1086
+ this.$ = $$[$0];
1087
+ break;
1088
+ case 45:
1089
+ yy.addVertex($$[$0 - 1][$$[$0 - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0]);
1090
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
1091
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
1092
+ break;
1093
+ case 46:
1094
+ yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]);
1095
+ this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) };
1096
+ break;
1097
+ case 47:
1098
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
1099
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
1100
+ break;
1101
+ case 48:
1102
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] };
1103
+ break;
1104
+ case 49:
1105
+ yy.addVertex($$[$0 - 1][$$[$0 - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0]);
1106
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1], shapeData: $$[$0] };
1107
+ break;
1108
+ case 50:
1109
+ this.$ = { stmt: $$[$0], nodes: $$[$0] };
1110
+ break;
1111
+ case 51:
1112
+ this.$ = [$$[$0]];
1113
+ break;
1114
+ case 52:
1115
+ yy.addVertex($$[$0 - 5][$$[$0 - 5].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0 - 4]);
1116
+ this.$ = $$[$0 - 5].concat($$[$0]);
1117
+ break;
1118
+ case 53:
1119
+ this.$ = $$[$0 - 4].concat($$[$0]);
1120
+ break;
1121
+ case 54:
1122
+ this.$ = $$[$0];
1123
+ break;
1124
+ case 55:
1125
+ this.$ = $$[$0 - 2];
1126
+ yy.setClass($$[$0 - 2], $$[$0]);
1127
+ break;
1128
+ case 56:
1129
+ this.$ = $$[$0 - 3];
1130
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "square");
1131
+ break;
1132
+ case 57:
1133
+ this.$ = $$[$0 - 3];
1134
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle");
1135
+ break;
1136
+ case 58:
1137
+ this.$ = $$[$0 - 5];
1138
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle");
1139
+ break;
1140
+ case 59:
1141
+ this.$ = $$[$0 - 3];
1142
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse");
1143
+ break;
1144
+ case 60:
1145
+ this.$ = $$[$0 - 3];
1146
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium");
1147
+ break;
1148
+ case 61:
1149
+ this.$ = $$[$0 - 3];
1150
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine");
1151
+ break;
1152
+ case 62:
1153
+ this.$ = $$[$0 - 7];
1154
+ yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]]));
1155
+ break;
1156
+ case 63:
1157
+ this.$ = $$[$0 - 3];
1158
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder");
1159
+ break;
1160
+ case 64:
1161
+ this.$ = $$[$0 - 3];
1162
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "round");
1163
+ break;
1164
+ case 65:
1165
+ this.$ = $$[$0 - 3];
1166
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond");
1167
+ break;
1168
+ case 66:
1169
+ this.$ = $$[$0 - 5];
1170
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon");
1171
+ break;
1172
+ case 67:
1173
+ this.$ = $$[$0 - 3];
1174
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd");
1175
+ break;
1176
+ case 68:
1177
+ this.$ = $$[$0 - 3];
1178
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid");
1179
+ break;
1180
+ case 69:
1181
+ this.$ = $$[$0 - 3];
1182
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid");
1183
+ break;
1184
+ case 70:
1185
+ this.$ = $$[$0 - 3];
1186
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right");
1187
+ break;
1188
+ case 71:
1189
+ this.$ = $$[$0 - 3];
1190
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left");
1191
+ break;
1192
+ case 72:
1193
+ this.$ = $$[$0];
1194
+ yy.addVertex($$[$0]);
1195
+ break;
1196
+ case 73:
1197
+ $$[$0 - 1].text = $$[$0];
1198
+ this.$ = $$[$0 - 1];
1199
+ break;
1200
+ case 74:
1201
+ case 75:
1202
+ $$[$0 - 2].text = $$[$0 - 1];
1203
+ this.$ = $$[$0 - 2];
1204
+ break;
1205
+ case 76:
1206
+ this.$ = $$[$0];
1207
+ break;
1208
+ case 77:
1209
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
1210
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] };
1211
+ break;
1212
+ case 78:
1213
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
1214
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1], "id": $$[$0 - 3] };
1215
+ break;
1216
+ case 79:
1217
+ this.$ = { text: $$[$0], type: "text" };
1218
+ break;
1219
+ case 80:
1220
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1221
+ break;
1222
+ case 81:
1223
+ this.$ = { text: $$[$0], type: "string" };
1224
+ break;
1225
+ case 82:
1226
+ this.$ = { text: $$[$0], type: "markdown" };
1227
+ break;
1228
+ case 83:
1229
+ var inf = yy.destructLink($$[$0]);
1230
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length };
1231
+ break;
1232
+ case 84:
1233
+ var inf = yy.destructLink($$[$0]);
1234
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "id": $$[$0 - 1] };
1235
+ break;
1236
+ case 85:
1237
+ this.$ = $$[$0 - 1];
1238
+ break;
1239
+ case 86:
1240
+ this.$ = { text: $$[$0], type: "text" };
1241
+ break;
1242
+ case 87:
1243
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1244
+ break;
1245
+ case 88:
1246
+ this.$ = { text: $$[$0], type: "string" };
1247
+ break;
1248
+ case 89:
1249
+ case 104:
1250
+ this.$ = { text: $$[$0], type: "markdown" };
1251
+ break;
1252
+ case 101:
1253
+ this.$ = { text: $$[$0], type: "text" };
1254
+ break;
1255
+ case 102:
1256
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1257
+ break;
1258
+ case 103:
1259
+ this.$ = { text: $$[$0], type: "text" };
1260
+ break;
1261
+ case 105:
1262
+ this.$ = $$[$0 - 4];
1263
+ yy.addClass($$[$0 - 2], $$[$0]);
1264
+ break;
1265
+ case 106:
1266
+ this.$ = $$[$0 - 4];
1267
+ yy.setClass($$[$0 - 2], $$[$0]);
1268
+ break;
1269
+ case 107:
1270
+ case 115:
1271
+ this.$ = $$[$0 - 1];
1272
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
1273
+ break;
1274
+ case 108:
1275
+ case 116:
1276
+ this.$ = $$[$0 - 3];
1277
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2]);
1278
+ yy.setTooltip($$[$0 - 3], $$[$0]);
1279
+ break;
1280
+ case 109:
1281
+ this.$ = $$[$0 - 2];
1282
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
1283
+ break;
1284
+ case 110:
1285
+ this.$ = $$[$0 - 4];
1286
+ yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]);
1287
+ yy.setTooltip($$[$0 - 4], $$[$0]);
1288
+ break;
1289
+ case 111:
1290
+ this.$ = $$[$0 - 2];
1291
+ yy.setLink($$[$0 - 2], $$[$0]);
1292
+ break;
1293
+ case 112:
1294
+ this.$ = $$[$0 - 4];
1295
+ yy.setLink($$[$0 - 4], $$[$0 - 2]);
1296
+ yy.setTooltip($$[$0 - 4], $$[$0]);
1297
+ break;
1298
+ case 113:
1299
+ this.$ = $$[$0 - 4];
1300
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
1301
+ break;
1302
+ case 114:
1303
+ this.$ = $$[$0 - 6];
1304
+ yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]);
1305
+ yy.setTooltip($$[$0 - 6], $$[$0 - 2]);
1306
+ break;
1307
+ case 117:
1308
+ this.$ = $$[$0 - 1];
1309
+ yy.setLink($$[$0 - 1], $$[$0]);
1310
+ break;
1311
+ case 118:
1312
+ this.$ = $$[$0 - 3];
1313
+ yy.setLink($$[$0 - 3], $$[$0 - 2]);
1314
+ yy.setTooltip($$[$0 - 3], $$[$0]);
1315
+ break;
1316
+ case 119:
1317
+ this.$ = $$[$0 - 3];
1318
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
1319
+ break;
1320
+ case 120:
1321
+ this.$ = $$[$0 - 5];
1322
+ yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]);
1323
+ yy.setTooltip($$[$0 - 5], $$[$0 - 2]);
1324
+ break;
1325
+ case 121:
1326
+ this.$ = $$[$0 - 4];
1327
+ yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]);
1328
+ break;
1329
+ case 122:
1330
+ this.$ = $$[$0 - 4];
1331
+ yy.updateLink([$$[$0 - 2]], $$[$0]);
1332
+ break;
1333
+ case 123:
1334
+ this.$ = $$[$0 - 4];
1335
+ yy.updateLink($$[$0 - 2], $$[$0]);
1336
+ break;
1337
+ case 124:
1338
+ this.$ = $$[$0 - 8];
1339
+ yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);
1340
+ yy.updateLink([$$[$0 - 6]], $$[$0]);
1341
+ break;
1342
+ case 125:
1343
+ this.$ = $$[$0 - 8];
1344
+ yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);
1345
+ yy.updateLink($$[$0 - 6], $$[$0]);
1346
+ break;
1347
+ case 126:
1348
+ this.$ = $$[$0 - 6];
1349
+ yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);
1350
+ break;
1351
+ case 127:
1352
+ this.$ = $$[$0 - 6];
1353
+ yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
1354
+ break;
1355
+ case 128:
1356
+ case 130:
1357
+ this.$ = [$$[$0]];
1358
+ break;
1359
+ case 129:
1360
+ case 131:
1361
+ $$[$0 - 2].push($$[$0]);
1362
+ this.$ = $$[$0 - 2];
1363
+ break;
1364
+ case 133:
1365
+ this.$ = $$[$0 - 1] + $$[$0];
1366
+ break;
1367
+ case 181:
1368
+ this.$ = $$[$0];
1369
+ break;
1370
+ case 182:
1371
+ this.$ = $$[$0 - 1] + "" + $$[$0];
1372
+ break;
1373
+ case 184:
1374
+ this.$ = $$[$0 - 1] + "" + $$[$0];
1375
+ break;
1376
+ case 185:
1377
+ this.$ = { stmt: "dir", value: "TB" };
1378
+ break;
1379
+ case 186:
1380
+ this.$ = { stmt: "dir", value: "BT" };
1381
+ break;
1382
+ case 187:
1383
+ this.$ = { stmt: "dir", value: "RL" };
1384
+ break;
1385
+ case 188:
1386
+ this.$ = { stmt: "dir", value: "LR" };
1387
+ break;
1388
+ case 189:
1389
+ this.$ = { stmt: "dir", value: "TD" };
1390
+ break;
1391
+ }
1392
+ }, "anonymous"),
1393
+ table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw, 125: $Vx }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 55], 9: [1, 56], 10: $Vy, 15: 54, 18: 57 }, o($Vz, [2, 3]), o($Vz, [2, 4]), o($Vz, [2, 5]), o($Vz, [2, 6]), o($Vz, [2, 7]), o($Vz, [2, 8]), { 8: $VA, 9: $VB, 11: $VC, 21: 59, 41: 60, 72: 64, 75: [1, 65], 77: [1, 67], 78: [1, 66] }, { 8: $VA, 9: $VB, 11: $VC, 21: 68 }, { 8: $VA, 9: $VB, 11: $VC, 21: 69 }, { 8: $VA, 9: $VB, 11: $VC, 21: 70 }, { 8: $VA, 9: $VB, 11: $VC, 21: 71 }, { 8: $VA, 9: $VB, 11: $VC, 21: 72 }, { 8: $VA, 9: $VB, 10: [1, 73], 11: $VC, 21: 74 }, o($Vz, [2, 36]), { 35: [1, 75] }, { 37: [1, 76] }, o($Vz, [2, 39]), o($VD, [2, 50], { 18: 77, 39: 78, 10: $Vy, 40: $VE }), { 10: [1, 80] }, { 10: [1, 81] }, { 10: [1, 82] }, { 10: [1, 83] }, { 14: $VF, 44: $VG, 60: $VH, 80: [1, 87], 89: $VI, 95: [1, 84], 97: [1, 85], 101: 86, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP, 120: 88 }, o($Vz, [2, 185]), o($Vz, [2, 186]), o($Vz, [2, 187]), o($Vz, [2, 188]), o($Vz, [2, 189]), o($VQ, [2, 51]), o($VQ, [2, 54], { 46: [1, 100] }), o($VR, [2, 72], { 113: 113, 29: [1, 101], 44: $Vd, 48: [1, 102], 50: [1, 103], 52: [1, 104], 54: [1, 105], 56: [1, 106], 58: [1, 107], 60: $Ve, 63: [1, 108], 65: [1, 109], 67: [1, 110], 68: [1, 111], 70: [1, 112], 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 114: $Vq, 115: $Vr, 116: $Vs }), o($VS, [2, 181]), o($VS, [2, 142]), o($VS, [2, 143]), o($VS, [2, 144]), o($VS, [2, 145]), o($VS, [2, 146]), o($VS, [2, 147]), o($VS, [2, 148]), o($VS, [2, 149]), o($VS, [2, 150]), o($VS, [2, 151]), o($VS, [2, 152]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 114] }, o($VT, [2, 26], { 18: 115, 10: $Vy }), o($Vz, [2, 27]), { 42: 116, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vz, [2, 40]), o($Vz, [2, 41]), o($Vz, [2, 42]), o($VU, [2, 76], { 73: 117, 62: [1, 119], 74: [1, 118] }), { 76: 120, 79: 121, 80: $VV, 81: $VW, 116: $VX, 119: $VY }, { 75: [1, 126], 77: [1, 127] }, o($VZ, [2, 83]), o($Vz, [2, 28]), o($Vz, [2, 29]), o($Vz, [2, 30]), o($Vz, [2, 31]), o($Vz, [2, 32]), { 10: $V_, 12: $V$, 14: $V01, 27: $V11, 28: 128, 32: $V21, 44: $V31, 60: $V41, 75: $V51, 80: [1, 130], 81: [1, 131], 83: 141, 84: $V61, 85: $V71, 86: $V81, 87: $V91, 88: $Va1, 89: $Vb1, 90: $Vc1, 91: 129, 105: $Vd1, 109: $Ve1, 111: $Vf1, 114: $Vg1, 115: $Vh1, 116: $Vi1 }, o($Vj1, $V4, { 5: 154 }), o($Vz, [2, 37]), o($Vz, [2, 38]), o($VD, [2, 48], { 44: $Vk1 }), o($VD, [2, 49], { 18: 156, 10: $Vy, 40: $Vl1 }), o($VQ, [2, 44]), { 44: $Vd, 47: 158, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, { 102: [1, 159], 103: 160, 105: [1, 161] }, { 44: $Vd, 47: 162, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, { 44: $Vd, 47: 163, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vm1, [2, 107], { 10: [1, 164], 96: [1, 165] }), { 80: [1, 166] }, o($Vm1, [2, 115], { 120: 168, 10: [1, 167], 14: $VF, 44: $VG, 60: $VH, 89: $VI, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP }), o($Vm1, [2, 117], { 10: [1, 169] }), o($Vn1, [2, 183]), o($Vn1, [2, 170]), o($Vn1, [2, 171]), o($Vn1, [2, 172]), o($Vn1, [2, 173]), o($Vn1, [2, 174]), o($Vn1, [2, 175]), o($Vn1, [2, 176]), o($Vn1, [2, 177]), o($Vn1, [2, 178]), o($Vn1, [2, 179]), o($Vn1, [2, 180]), { 44: $Vd, 47: 170, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, { 30: 171, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 179, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 181, 50: [1, 180], 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 182, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 183, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 184, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 109: [1, 185] }, { 30: 186, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 187, 65: [1, 188], 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 189, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 190, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 191, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VS, [2, 182]), o($V3, [2, 20]), o($VT, [2, 25]), o($VD, [2, 46], { 39: 192, 18: 193, 10: $Vy, 40: $VE }), o($VU, [2, 73], { 10: [1, 194] }), { 10: [1, 195] }, { 30: 196, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 77: [1, 197], 79: 198, 116: $VX, 119: $VY }, o($Vu1, [2, 79]), o($Vu1, [2, 81]), o($Vu1, [2, 82]), o($Vu1, [2, 168]), o($Vu1, [2, 169]), { 76: 199, 79: 121, 80: $VV, 81: $VW, 116: $VX, 119: $VY }, o($VZ, [2, 84]), { 8: $VA, 9: $VB, 10: $V_, 11: $VC, 12: $V$, 14: $V01, 21: 201, 27: $V11, 29: [1, 200], 32: $V21, 44: $V31, 60: $V41, 75: $V51, 83: 141, 84: $V61, 85: $V71, 86: $V81, 87: $V91, 88: $Va1, 89: $Vb1, 90: $Vc1, 91: 202, 105: $Vd1, 109: $Ve1, 111: $Vf1, 114: $Vg1, 115: $Vh1, 116: $Vi1 }, o($Vv1, [2, 101]), o($Vv1, [2, 103]), o($Vv1, [2, 104]), o($Vv1, [2, 157]), o($Vv1, [2, 158]), o($Vv1, [2, 159]), o($Vv1, [2, 160]), o($Vv1, [2, 161]), o($Vv1, [2, 162]), o($Vv1, [2, 163]), o($Vv1, [2, 164]), o($Vv1, [2, 165]), o($Vv1, [2, 166]), o($Vv1, [2, 167]), o($Vv1, [2, 90]), o($Vv1, [2, 91]), o($Vv1, [2, 92]), o($Vv1, [2, 93]), o($Vv1, [2, 94]), o($Vv1, [2, 95]), o($Vv1, [2, 96]), o($Vv1, [2, 97]), o($Vv1, [2, 98]), o($Vv1, [2, 99]), o($Vv1, [2, 100]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 203], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw, 125: $Vx }, { 10: $Vy, 18: 204 }, { 44: [1, 205] }, o($VQ, [2, 43]), { 10: [1, 206], 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 113, 114: $Vq, 115: $Vr, 116: $Vs }, { 10: [1, 207] }, { 10: [1, 208], 106: [1, 209] }, o($Vw1, [2, 128]), { 10: [1, 210], 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 113, 114: $Vq, 115: $Vr, 116: $Vs }, { 10: [1, 211], 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 113, 114: $Vq, 115: $Vr, 116: $Vs }, { 80: [1, 212] }, o($Vm1, [2, 109], { 10: [1, 213] }), o($Vm1, [2, 111], { 10: [1, 214] }), { 80: [1, 215] }, o($Vn1, [2, 184]), { 80: [1, 216], 98: [1, 217] }, o($VQ, [2, 55], { 113: 113, 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 114: $Vq, 115: $Vr, 116: $Vs }), { 31: [1, 218], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($Vx1, [2, 86]), o($Vx1, [2, 88]), o($Vx1, [2, 89]), o($Vx1, [2, 153]), o($Vx1, [2, 154]), o($Vx1, [2, 155]), o($Vx1, [2, 156]), { 49: [1, 220], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 221, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 51: [1, 222], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 53: [1, 223], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 55: [1, 224], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 57: [1, 225], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 60: [1, 226] }, { 64: [1, 227], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 66: [1, 228], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 30: 229, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 31: [1, 230], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 67: $Vo1, 69: [1, 231], 71: [1, 232], 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 67: $Vo1, 69: [1, 234], 71: [1, 233], 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VD, [2, 45], { 18: 156, 10: $Vy, 40: $Vl1 }), o($VD, [2, 47], { 44: $Vk1 }), o($VU, [2, 75]), o($VU, [2, 74]), { 62: [1, 235], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VU, [2, 77]), o($Vu1, [2, 80]), { 77: [1, 236], 79: 198, 116: $VX, 119: $VY }, { 30: 237, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($Vj1, $V4, { 5: 238 }), o($Vv1, [2, 102]), o($Vz, [2, 35]), { 43: 239, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, { 10: $Vy, 18: 240 }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 241, 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 252, 104: [1, 253], 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 254, 104: [1, 255], 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 105: [1, 256] }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 257, 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 44: $Vd, 47: 258, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vm1, [2, 108]), { 80: [1, 259] }, { 80: [1, 260], 98: [1, 261] }, o($Vm1, [2, 116]), o($Vm1, [2, 118], { 10: [1, 262] }), o($Vm1, [2, 119]), o($VR, [2, 56]), o($Vx1, [2, 87]), o($VR, [2, 57]), { 51: [1, 263], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VR, [2, 64]), o($VR, [2, 59]), o($VR, [2, 60]), o($VR, [2, 61]), { 109: [1, 264] }, o($VR, [2, 63]), o($VR, [2, 65]), { 66: [1, 265], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VR, [2, 67]), o($VR, [2, 68]), o($VR, [2, 70]), o($VR, [2, 69]), o($VR, [2, 71]), o([10, 44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], [2, 85]), o($VU, [2, 78]), { 31: [1, 266], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 267], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw, 125: $Vx }, o($VQ, [2, 53]), { 43: 268, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vm1, [2, 121], { 106: $VG1 }), o($VH1, [2, 130], { 108: 270, 10: $Vy1, 60: $Vz1, 84: $VA1, 105: $VB1, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }), o($VI1, [2, 132]), o($VI1, [2, 134]), o($VI1, [2, 135]), o($VI1, [2, 136]), o($VI1, [2, 137]), o($VI1, [2, 138]), o($VI1, [2, 139]), o($VI1, [2, 140]), o($VI1, [2, 141]), o($Vm1, [2, 122], { 106: $VG1 }), { 10: [1, 271] }, o($Vm1, [2, 123], { 106: $VG1 }), { 10: [1, 272] }, o($Vw1, [2, 129]), o($Vm1, [2, 105], { 106: $VG1 }), o($Vm1, [2, 106], { 113: 113, 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 114: $Vq, 115: $Vr, 116: $Vs }), o($Vm1, [2, 110]), o($Vm1, [2, 112], { 10: [1, 273] }), o($Vm1, [2, 113]), { 98: [1, 274] }, { 51: [1, 275] }, { 62: [1, 276] }, { 66: [1, 277] }, { 8: $VA, 9: $VB, 11: $VC, 21: 278 }, o($Vz, [2, 34]), o($VQ, [2, 52]), { 10: $Vy1, 60: $Vz1, 84: $VA1, 105: $VB1, 107: 279, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, o($VI1, [2, 133]), { 14: $VF, 44: $VG, 60: $VH, 89: $VI, 101: 280, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP, 120: 88 }, { 14: $VF, 44: $VG, 60: $VH, 89: $VI, 101: 281, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP, 120: 88 }, { 98: [1, 282] }, o($Vm1, [2, 120]), o($VR, [2, 58]), { 30: 283, 67: $Vo1, 80: $Vp1, 81: $Vq1, 82: 172, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, o($VR, [2, 66]), o($Vj1, $V4, { 5: 284 }), o($VH1, [2, 131], { 108: 270, 10: $Vy1, 60: $Vz1, 84: $VA1, 105: $VB1, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }), o($Vm1, [2, 126], { 120: 168, 10: [1, 285], 14: $VF, 44: $VG, 60: $VH, 89: $VI, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP }), o($Vm1, [2, 127], { 120: 168, 10: [1, 286], 14: $VF, 44: $VG, 60: $VH, 89: $VI, 105: $VJ, 106: $VK, 109: $VL, 111: $VM, 114: $VN, 115: $VO, 116: $VP }), o($Vm1, [2, 114]), { 31: [1, 287], 67: $Vo1, 82: 219, 116: $Vr1, 117: $Vs1, 118: $Vt1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 288], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 39, 44: $Vd, 45: 40, 47: 41, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 42, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw, 125: $Vx }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 289, 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, { 10: $Vy1, 60: $Vz1, 84: $VA1, 92: 290, 105: $VB1, 107: 242, 108: 243, 109: $VC1, 110: $VD1, 111: $VE1, 112: $VF1 }, o($VR, [2, 62]), o($Vz, [2, 33]), o($Vm1, [2, 124], { 106: $VG1 }), o($Vm1, [2, 125], { 106: $VG1 })],
1394
+ defaultActions: {},
1395
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1396
+ if (hash.recoverable) {
1397
+ this.trace(str);
1398
+ } else {
1399
+ var error = new Error(str);
1400
+ error.hash = hash;
1401
+ throw error;
1402
+ }
1403
+ }, "parseError"),
1404
+ parse: /* @__PURE__ */ __name(function parse(input) {
1405
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
1406
+ var args = lstack.slice.call(arguments, 1);
1407
+ var lexer2 = Object.create(this.lexer);
1408
+ var sharedState = { yy: {} };
1409
+ for (var k in this.yy) {
1410
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
1411
+ sharedState.yy[k] = this.yy[k];
1412
+ }
1413
+ }
1414
+ lexer2.setInput(input, sharedState.yy);
1415
+ sharedState.yy.lexer = lexer2;
1416
+ sharedState.yy.parser = this;
1417
+ if (typeof lexer2.yylloc == "undefined") {
1418
+ lexer2.yylloc = {};
1419
+ }
1420
+ var yyloc = lexer2.yylloc;
1421
+ lstack.push(yyloc);
1422
+ var ranges = lexer2.options && lexer2.options.ranges;
1423
+ if (typeof sharedState.yy.parseError === "function") {
1424
+ this.parseError = sharedState.yy.parseError;
1425
+ } else {
1426
+ this.parseError = Object.getPrototypeOf(this).parseError;
1427
+ }
1428
+ function popStack(n) {
1429
+ stack.length = stack.length - 2 * n;
1430
+ vstack.length = vstack.length - n;
1431
+ lstack.length = lstack.length - n;
1432
+ }
1433
+ __name(popStack, "popStack");
1434
+ function lex() {
1435
+ var token;
1436
+ token = tstack.pop() || lexer2.lex() || EOF;
1437
+ if (typeof token !== "number") {
1438
+ if (token instanceof Array) {
1439
+ tstack = token;
1440
+ token = tstack.pop();
1441
+ }
1442
+ token = self.symbols_[token] || token;
1443
+ }
1444
+ return token;
1445
+ }
1446
+ __name(lex, "lex");
1447
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
1448
+ while (true) {
1449
+ state = stack[stack.length - 1];
1450
+ if (this.defaultActions[state]) {
1451
+ action = this.defaultActions[state];
1452
+ } else {
1453
+ if (symbol === null || typeof symbol == "undefined") {
1454
+ symbol = lex();
1455
+ }
1456
+ action = table[state] && table[state][symbol];
1457
+ }
1458
+ if (typeof action === "undefined" || !action.length || !action[0]) {
1459
+ var errStr = "";
1460
+ expected = [];
1461
+ for (p in table[state]) {
1462
+ if (this.terminals_[p] && p > TERROR) {
1463
+ expected.push("'" + this.terminals_[p] + "'");
1464
+ }
1465
+ }
1466
+ if (lexer2.showPosition) {
1467
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
1468
+ } else {
1469
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
1470
+ }
1471
+ this.parseError(errStr, {
1472
+ text: lexer2.match,
1473
+ token: this.terminals_[symbol] || symbol,
1474
+ line: lexer2.yylineno,
1475
+ loc: yyloc,
1476
+ expected
1477
+ });
1478
+ }
1479
+ if (action[0] instanceof Array && action.length > 1) {
1480
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
1481
+ }
1482
+ switch (action[0]) {
1483
+ case 1:
1484
+ stack.push(symbol);
1485
+ vstack.push(lexer2.yytext);
1486
+ lstack.push(lexer2.yylloc);
1487
+ stack.push(action[1]);
1488
+ symbol = null;
1489
+ {
1490
+ yyleng = lexer2.yyleng;
1491
+ yytext = lexer2.yytext;
1492
+ yylineno = lexer2.yylineno;
1493
+ yyloc = lexer2.yylloc;
1494
+ }
1495
+ break;
1496
+ case 2:
1497
+ len = this.productions_[action[1]][1];
1498
+ yyval.$ = vstack[vstack.length - len];
1499
+ yyval._$ = {
1500
+ first_line: lstack[lstack.length - (len || 1)].first_line,
1501
+ last_line: lstack[lstack.length - 1].last_line,
1502
+ first_column: lstack[lstack.length - (len || 1)].first_column,
1503
+ last_column: lstack[lstack.length - 1].last_column
1504
+ };
1505
+ if (ranges) {
1506
+ yyval._$.range = [
1507
+ lstack[lstack.length - (len || 1)].range[0],
1508
+ lstack[lstack.length - 1].range[1]
1509
+ ];
1510
+ }
1511
+ r = this.performAction.apply(yyval, [
1512
+ yytext,
1513
+ yyleng,
1514
+ yylineno,
1515
+ sharedState.yy,
1516
+ action[1],
1517
+ vstack,
1518
+ lstack
1519
+ ].concat(args));
1520
+ if (typeof r !== "undefined") {
1521
+ return r;
1522
+ }
1523
+ if (len) {
1524
+ stack = stack.slice(0, -1 * len * 2);
1525
+ vstack = vstack.slice(0, -1 * len);
1526
+ lstack = lstack.slice(0, -1 * len);
1527
+ }
1528
+ stack.push(this.productions_[action[1]][0]);
1529
+ vstack.push(yyval.$);
1530
+ lstack.push(yyval._$);
1531
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1532
+ stack.push(newState);
1533
+ break;
1534
+ case 3:
1535
+ return true;
1536
+ }
1537
+ }
1538
+ return true;
1539
+ }, "parse")
1540
+ };
1541
+ var lexer = /* @__PURE__ */ (function() {
1542
+ var lexer2 = {
1543
+ EOF: 1,
1544
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1545
+ if (this.yy.parser) {
1546
+ this.yy.parser.parseError(str, hash);
1547
+ } else {
1548
+ throw new Error(str);
1549
+ }
1550
+ }, "parseError"),
1551
+ // resets the lexer, sets new input
1552
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
1553
+ this.yy = yy || this.yy || {};
1554
+ this._input = input;
1555
+ this._more = this._backtrack = this.done = false;
1556
+ this.yylineno = this.yyleng = 0;
1557
+ this.yytext = this.matched = this.match = "";
1558
+ this.conditionStack = ["INITIAL"];
1559
+ this.yylloc = {
1560
+ first_line: 1,
1561
+ first_column: 0,
1562
+ last_line: 1,
1563
+ last_column: 0
1564
+ };
1565
+ if (this.options.ranges) {
1566
+ this.yylloc.range = [0, 0];
1567
+ }
1568
+ this.offset = 0;
1569
+ return this;
1570
+ }, "setInput"),
1571
+ // consumes and returns one char from the input
1572
+ input: /* @__PURE__ */ __name(function() {
1573
+ var ch = this._input[0];
1574
+ this.yytext += ch;
1575
+ this.yyleng++;
1576
+ this.offset++;
1577
+ this.match += ch;
1578
+ this.matched += ch;
1579
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
1580
+ if (lines) {
1581
+ this.yylineno++;
1582
+ this.yylloc.last_line++;
1583
+ } else {
1584
+ this.yylloc.last_column++;
1585
+ }
1586
+ if (this.options.ranges) {
1587
+ this.yylloc.range[1]++;
1588
+ }
1589
+ this._input = this._input.slice(1);
1590
+ return ch;
1591
+ }, "input"),
1592
+ // unshifts one char (or a string) into the input
1593
+ unput: /* @__PURE__ */ __name(function(ch) {
1594
+ var len = ch.length;
1595
+ var lines = ch.split(/(?:\r\n?|\n)/g);
1596
+ this._input = ch + this._input;
1597
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
1598
+ this.offset -= len;
1599
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1600
+ this.match = this.match.substr(0, this.match.length - 1);
1601
+ this.matched = this.matched.substr(0, this.matched.length - 1);
1602
+ if (lines.length - 1) {
1603
+ this.yylineno -= lines.length - 1;
1604
+ }
1605
+ var r = this.yylloc.range;
1606
+ this.yylloc = {
1607
+ first_line: this.yylloc.first_line,
1608
+ last_line: this.yylineno + 1,
1609
+ first_column: this.yylloc.first_column,
1610
+ 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
1611
+ };
1612
+ if (this.options.ranges) {
1613
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1614
+ }
1615
+ this.yyleng = this.yytext.length;
1616
+ return this;
1617
+ }, "unput"),
1618
+ // When called from action, caches matched text and appends it on next action
1619
+ more: /* @__PURE__ */ __name(function() {
1620
+ this._more = true;
1621
+ return this;
1622
+ }, "more"),
1623
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
1624
+ reject: /* @__PURE__ */ __name(function() {
1625
+ if (this.options.backtrack_lexer) {
1626
+ this._backtrack = true;
1627
+ } else {
1628
+ 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(), {
1629
+ text: "",
1630
+ token: null,
1631
+ line: this.yylineno
1632
+ });
1633
+ }
1634
+ return this;
1635
+ }, "reject"),
1636
+ // retain first n characters of the match
1637
+ less: /* @__PURE__ */ __name(function(n) {
1638
+ this.unput(this.match.slice(n));
1639
+ }, "less"),
1640
+ // displays already matched input, i.e. for error messages
1641
+ pastInput: /* @__PURE__ */ __name(function() {
1642
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
1643
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
1644
+ }, "pastInput"),
1645
+ // displays upcoming input, i.e. for error messages
1646
+ upcomingInput: /* @__PURE__ */ __name(function() {
1647
+ var next = this.match;
1648
+ if (next.length < 20) {
1649
+ next += this._input.substr(0, 20 - next.length);
1650
+ }
1651
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
1652
+ }, "upcomingInput"),
1653
+ // displays the character position where the lexing error occurred, i.e. for error messages
1654
+ showPosition: /* @__PURE__ */ __name(function() {
1655
+ var pre = this.pastInput();
1656
+ var c = new Array(pre.length + 1).join("-");
1657
+ return pre + this.upcomingInput() + "\n" + c + "^";
1658
+ }, "showPosition"),
1659
+ // test the lexed token: return FALSE when not a match, otherwise return token
1660
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
1661
+ var token, lines, backup;
1662
+ if (this.options.backtrack_lexer) {
1663
+ backup = {
1664
+ yylineno: this.yylineno,
1665
+ yylloc: {
1666
+ first_line: this.yylloc.first_line,
1667
+ last_line: this.last_line,
1668
+ first_column: this.yylloc.first_column,
1669
+ last_column: this.yylloc.last_column
1670
+ },
1671
+ yytext: this.yytext,
1672
+ match: this.match,
1673
+ matches: this.matches,
1674
+ matched: this.matched,
1675
+ yyleng: this.yyleng,
1676
+ offset: this.offset,
1677
+ _more: this._more,
1678
+ _input: this._input,
1679
+ yy: this.yy,
1680
+ conditionStack: this.conditionStack.slice(0),
1681
+ done: this.done
1682
+ };
1683
+ if (this.options.ranges) {
1684
+ backup.yylloc.range = this.yylloc.range.slice(0);
1685
+ }
1686
+ }
1687
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
1688
+ if (lines) {
1689
+ this.yylineno += lines.length;
1690
+ }
1691
+ this.yylloc = {
1692
+ first_line: this.yylloc.last_line,
1693
+ last_line: this.yylineno + 1,
1694
+ first_column: this.yylloc.last_column,
1695
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
1696
+ };
1697
+ this.yytext += match[0];
1698
+ this.match += match[0];
1699
+ this.matches = match;
1700
+ this.yyleng = this.yytext.length;
1701
+ if (this.options.ranges) {
1702
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
1703
+ }
1704
+ this._more = false;
1705
+ this._backtrack = false;
1706
+ this._input = this._input.slice(match[0].length);
1707
+ this.matched += match[0];
1708
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
1709
+ if (this.done && this._input) {
1710
+ this.done = false;
1711
+ }
1712
+ if (token) {
1713
+ return token;
1714
+ } else if (this._backtrack) {
1715
+ for (var k in backup) {
1716
+ this[k] = backup[k];
1717
+ }
1718
+ return false;
1719
+ }
1720
+ return false;
1721
+ }, "test_match"),
1722
+ // return next match in input
1723
+ next: /* @__PURE__ */ __name(function() {
1724
+ if (this.done) {
1725
+ return this.EOF;
1726
+ }
1727
+ if (!this._input) {
1728
+ this.done = true;
1729
+ }
1730
+ var token, match, tempMatch, index;
1731
+ if (!this._more) {
1732
+ this.yytext = "";
1733
+ this.match = "";
1734
+ }
1735
+ var rules = this._currentRules();
1736
+ for (var i = 0; i < rules.length; i++) {
1737
+ tempMatch = this._input.match(this.rules[rules[i]]);
1738
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
1739
+ match = tempMatch;
1740
+ index = i;
1741
+ if (this.options.backtrack_lexer) {
1742
+ token = this.test_match(tempMatch, rules[i]);
1743
+ if (token !== false) {
1744
+ return token;
1745
+ } else if (this._backtrack) {
1746
+ match = false;
1747
+ continue;
1748
+ } else {
1749
+ return false;
1750
+ }
1751
+ } else if (!this.options.flex) {
1752
+ break;
1753
+ }
1754
+ }
1755
+ }
1756
+ if (match) {
1757
+ token = this.test_match(match, rules[index]);
1758
+ if (token !== false) {
1759
+ return token;
1760
+ }
1761
+ return false;
1762
+ }
1763
+ if (this._input === "") {
1764
+ return this.EOF;
1765
+ } else {
1766
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1767
+ text: "",
1768
+ token: null,
1769
+ line: this.yylineno
1770
+ });
1771
+ }
1772
+ }, "next"),
1773
+ // return next match that has a token
1774
+ lex: /* @__PURE__ */ __name(function lex() {
1775
+ var r = this.next();
1776
+ if (r) {
1777
+ return r;
1778
+ } else {
1779
+ return this.lex();
1780
+ }
1781
+ }, "lex"),
1782
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1783
+ begin: /* @__PURE__ */ __name(function begin(condition) {
1784
+ this.conditionStack.push(condition);
1785
+ }, "begin"),
1786
+ // pop the previously active lexer condition state off the condition stack
1787
+ popState: /* @__PURE__ */ __name(function popState() {
1788
+ var n = this.conditionStack.length - 1;
1789
+ if (n > 0) {
1790
+ return this.conditionStack.pop();
1791
+ } else {
1792
+ return this.conditionStack[0];
1793
+ }
1794
+ }, "popState"),
1795
+ // produce the lexer rule set which is active for the currently active lexer condition state
1796
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
1797
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
1798
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
1799
+ } else {
1800
+ return this.conditions["INITIAL"].rules;
1801
+ }
1802
+ }, "_currentRules"),
1803
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1804
+ topState: /* @__PURE__ */ __name(function topState(n) {
1805
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
1806
+ if (n >= 0) {
1807
+ return this.conditionStack[n];
1808
+ } else {
1809
+ return "INITIAL";
1810
+ }
1811
+ }, "topState"),
1812
+ // alias for begin(condition)
1813
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
1814
+ this.begin(condition);
1815
+ }, "pushState"),
1816
+ // return the number of states currently on the stack
1817
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
1818
+ return this.conditionStack.length;
1819
+ }, "stateStackSize"),
1820
+ options: {},
1821
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1822
+ switch ($avoiding_name_collisions) {
1823
+ case 0:
1824
+ this.begin("acc_title");
1825
+ return 34;
1826
+ case 1:
1827
+ this.popState();
1828
+ return "acc_title_value";
1829
+ case 2:
1830
+ this.begin("acc_descr");
1831
+ return 36;
1832
+ case 3:
1833
+ this.popState();
1834
+ return "acc_descr_value";
1835
+ case 4:
1836
+ this.begin("acc_descr_multiline");
1837
+ break;
1838
+ case 5:
1839
+ this.popState();
1840
+ break;
1841
+ case 6:
1842
+ return "acc_descr_multiline_value";
1843
+ case 7:
1844
+ this.pushState("shapeData");
1845
+ yy_.yytext = "";
1846
+ return 40;
1847
+ case 8:
1848
+ this.pushState("shapeDataStr");
1849
+ return 40;
1850
+ case 9:
1851
+ this.popState();
1852
+ return 40;
1853
+ case 10:
1854
+ const re = /\n\s*/g;
1855
+ yy_.yytext = yy_.yytext.replace(re, "<br/>");
1856
+ return 40;
1857
+ case 11:
1858
+ return 40;
1859
+ case 12:
1860
+ this.popState();
1861
+ break;
1862
+ case 13:
1863
+ this.begin("callbackname");
1864
+ break;
1865
+ case 14:
1866
+ this.popState();
1867
+ break;
1868
+ case 15:
1869
+ this.popState();
1870
+ this.begin("callbackargs");
1871
+ break;
1872
+ case 16:
1873
+ return 95;
1874
+ case 17:
1875
+ this.popState();
1876
+ break;
1877
+ case 18:
1878
+ return 96;
1879
+ case 19:
1880
+ return "MD_STR";
1881
+ case 20:
1882
+ this.popState();
1883
+ break;
1884
+ case 21:
1885
+ this.begin("md_string");
1886
+ break;
1887
+ case 22:
1888
+ return "STR";
1889
+ case 23:
1890
+ this.popState();
1891
+ break;
1892
+ case 24:
1893
+ this.pushState("string");
1894
+ break;
1895
+ case 25:
1896
+ return 84;
1897
+ case 26:
1898
+ return 102;
1899
+ case 27:
1900
+ return 85;
1901
+ case 28:
1902
+ return 104;
1903
+ case 29:
1904
+ return 86;
1905
+ case 30:
1906
+ return 87;
1907
+ case 31:
1908
+ return 97;
1909
+ case 32:
1910
+ this.begin("click");
1911
+ break;
1912
+ case 33:
1913
+ this.popState();
1914
+ break;
1915
+ case 34:
1916
+ return 88;
1917
+ case 35:
1918
+ if (yy.lex.firstGraph()) {
1919
+ this.begin("dir");
1920
+ }
1921
+ return 12;
1922
+ case 36:
1923
+ if (yy.lex.firstGraph()) {
1924
+ this.begin("dir");
1925
+ }
1926
+ return 12;
1927
+ case 37:
1928
+ if (yy.lex.firstGraph()) {
1929
+ this.begin("dir");
1930
+ }
1931
+ return 12;
1932
+ case 38:
1933
+ if (yy.lex.firstGraph()) {
1934
+ this.begin("dir");
1935
+ }
1936
+ return 12;
1937
+ case 39:
1938
+ return 27;
1939
+ case 40:
1940
+ return 32;
1941
+ case 41:
1942
+ return 98;
1943
+ case 42:
1944
+ return 98;
1945
+ case 43:
1946
+ return 98;
1947
+ case 44:
1948
+ return 98;
1949
+ case 45:
1950
+ this.popState();
1951
+ return 13;
1952
+ case 46:
1953
+ this.popState();
1954
+ return 14;
1955
+ case 47:
1956
+ this.popState();
1957
+ return 14;
1958
+ case 48:
1959
+ this.popState();
1960
+ return 14;
1961
+ case 49:
1962
+ this.popState();
1963
+ return 14;
1964
+ case 50:
1965
+ this.popState();
1966
+ return 14;
1967
+ case 51:
1968
+ this.popState();
1969
+ return 14;
1970
+ case 52:
1971
+ this.popState();
1972
+ return 14;
1973
+ case 53:
1974
+ this.popState();
1975
+ return 14;
1976
+ case 54:
1977
+ this.popState();
1978
+ return 14;
1979
+ case 55:
1980
+ this.popState();
1981
+ return 14;
1982
+ case 56:
1983
+ return 121;
1984
+ case 57:
1985
+ return 122;
1986
+ case 58:
1987
+ return 123;
1988
+ case 59:
1989
+ return 124;
1990
+ case 60:
1991
+ return 125;
1992
+ case 61:
1993
+ return 78;
1994
+ case 62:
1995
+ return 105;
1996
+ case 63:
1997
+ return 111;
1998
+ case 64:
1999
+ return 46;
2000
+ case 65:
2001
+ return 60;
2002
+ case 66:
2003
+ return 44;
2004
+ case 67:
2005
+ return 8;
2006
+ case 68:
2007
+ return 106;
2008
+ case 69:
2009
+ return 115;
2010
+ case 70:
2011
+ this.popState();
2012
+ return 77;
2013
+ case 71:
2014
+ this.pushState("edgeText");
2015
+ return 75;
2016
+ case 72:
2017
+ return 119;
2018
+ case 73:
2019
+ this.popState();
2020
+ return 77;
2021
+ case 74:
2022
+ this.pushState("thickEdgeText");
2023
+ return 75;
2024
+ case 75:
2025
+ return 119;
2026
+ case 76:
2027
+ this.popState();
2028
+ return 77;
2029
+ case 77:
2030
+ this.pushState("dottedEdgeText");
2031
+ return 75;
2032
+ case 78:
2033
+ return 119;
2034
+ case 79:
2035
+ return 77;
2036
+ case 80:
2037
+ this.popState();
2038
+ return 53;
2039
+ case 81:
2040
+ return "TEXT";
2041
+ case 82:
2042
+ this.pushState("ellipseText");
2043
+ return 52;
2044
+ case 83:
2045
+ this.popState();
2046
+ return 55;
2047
+ case 84:
2048
+ this.pushState("text");
2049
+ return 54;
2050
+ case 85:
2051
+ this.popState();
2052
+ return 57;
2053
+ case 86:
2054
+ this.pushState("text");
2055
+ return 56;
2056
+ case 87:
2057
+ return 58;
2058
+ case 88:
2059
+ this.pushState("text");
2060
+ return 67;
2061
+ case 89:
2062
+ this.popState();
2063
+ return 64;
2064
+ case 90:
2065
+ this.pushState("text");
2066
+ return 63;
2067
+ case 91:
2068
+ this.popState();
2069
+ return 49;
2070
+ case 92:
2071
+ this.pushState("text");
2072
+ return 48;
2073
+ case 93:
2074
+ this.popState();
2075
+ return 69;
2076
+ case 94:
2077
+ this.popState();
2078
+ return 71;
2079
+ case 95:
2080
+ return 117;
2081
+ case 96:
2082
+ this.pushState("trapText");
2083
+ return 68;
2084
+ case 97:
2085
+ this.pushState("trapText");
2086
+ return 70;
2087
+ case 98:
2088
+ return 118;
2089
+ case 99:
2090
+ return 67;
2091
+ case 100:
2092
+ return 90;
2093
+ case 101:
2094
+ return "SEP";
2095
+ case 102:
2096
+ return 89;
2097
+ case 103:
2098
+ return 115;
2099
+ case 104:
2100
+ return 111;
2101
+ case 105:
2102
+ return 44;
2103
+ case 106:
2104
+ return 109;
2105
+ case 107:
2106
+ return 114;
2107
+ case 108:
2108
+ return 116;
2109
+ case 109:
2110
+ this.popState();
2111
+ return 62;
2112
+ case 110:
2113
+ this.pushState("text");
2114
+ return 62;
2115
+ case 111:
2116
+ this.popState();
2117
+ return 51;
2118
+ case 112:
2119
+ this.pushState("text");
2120
+ return 50;
2121
+ case 113:
2122
+ this.popState();
2123
+ return 31;
2124
+ case 114:
2125
+ this.pushState("text");
2126
+ return 29;
2127
+ case 115:
2128
+ this.popState();
2129
+ return 66;
2130
+ case 116:
2131
+ this.pushState("text");
2132
+ return 65;
2133
+ case 117:
2134
+ return "TEXT";
2135
+ case 118:
2136
+ return "QUOTE";
2137
+ case 119:
2138
+ return 9;
2139
+ case 120:
2140
+ return 10;
2141
+ case 121:
2142
+ return 11;
2143
+ }
2144
+ }, "anonymous"),
2145
+ rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:@\{)/, /^(?:["])/, /^(?:["])/, /^(?:[^\"]+)/, /^(?:[^}^"]+)/, /^(?:\})/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:swimlane-beta\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:.*direction\s+TD[^\n]*)/, /^(?:[^\s\"]+@(?=[^\{\"]))/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|!\)+)/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/],
2146
+ conditions: { "shapeDataEndBracket": { "rules": [21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "shapeDataStr": { "rules": [9, 10, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "shapeData": { "rules": [8, 11, 12, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "callbackargs": { "rules": [17, 18, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "callbackname": { "rules": [14, 15, 16, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "href": { "rules": [21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "click": { "rules": [21, 24, 33, 34, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "dottedEdgeText": { "rules": [21, 24, 76, 78, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "thickEdgeText": { "rules": [21, 24, 73, 75, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "edgeText": { "rules": [21, 24, 70, 72, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "trapText": { "rules": [21, 24, 79, 82, 84, 86, 90, 92, 93, 94, 95, 96, 97, 110, 112, 114, 116], "inclusive": false }, "ellipseText": { "rules": [21, 24, 79, 80, 81, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "text": { "rules": [21, 24, 79, 82, 83, 84, 85, 86, 89, 90, 91, 92, 96, 97, 109, 110, 111, 112, 113, 114, 115, 116, 117], "inclusive": false }, "vertex": { "rules": [21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "dir": { "rules": [21, 24, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "acc_descr": { "rules": [3, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "acc_title": { "rules": [1, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "md_string": { "rules": [19, 20, 21, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "string": { "rules": [21, 22, 23, 24, 79, 82, 84, 86, 90, 92, 96, 97, 110, 112, 114, 116], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 13, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 76, 77, 79, 82, 84, 86, 87, 88, 90, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 112, 114, 116, 118, 119, 120, 121], "inclusive": true } }
2147
+ };
2148
+ return lexer2;
2149
+ })();
2150
+ parser2.lexer = lexer;
2151
+ function Parser() {
2152
+ this.yy = {};
2153
+ }
2154
+ __name(Parser, "Parser");
2155
+ Parser.prototype = parser2;
2156
+ parser2.Parser = Parser;
2157
+ return new Parser();
2158
+ })();
2159
+ parser.parser = parser;
2160
+ var flow_default = parser;
2161
+ var newParser = Object.assign({}, flow_default);
2162
+ newParser.parse = (src) => {
2163
+ const newSrc = src.replace(/}\s*\n/g, "}\n");
2164
+ return flow_default.parse(newSrc);
2165
+ };
2166
+ var flowParser_default = newParser;
2167
+ var fade = /* @__PURE__ */ __name((color, opacity) => {
2168
+ const channel2 = channel;
2169
+ const r = channel2(color, "r");
2170
+ const g = channel2(color, "g");
2171
+ const b = channel2(color, "b");
2172
+ return rgba(r, g, b, opacity);
2173
+ }, "fade");
2174
+ var getStyles = /* @__PURE__ */ __name((options) => `.label {
2175
+ font-family: ${options.fontFamily};
2176
+ color: ${options.nodeTextColor || options.textColor};
2177
+ }
2178
+ .cluster-label text {
2179
+ fill: ${options.titleColor};
2180
+ }
2181
+ .cluster-label span {
2182
+ color: ${options.titleColor};
2183
+ }
2184
+ .cluster-label span p {
2185
+ background-color: transparent;
2186
+ }
2187
+
2188
+ .label text,span {
2189
+ fill: ${options.nodeTextColor || options.textColor};
2190
+ color: ${options.nodeTextColor || options.textColor};
2191
+ }
2192
+
2193
+ .node rect,
2194
+ .node circle,
2195
+ .node ellipse,
2196
+ .node polygon,
2197
+ .node path {
2198
+ fill: ${options.mainBkg};
2199
+ stroke: ${options.nodeBorder};
2200
+ stroke-width: ${options.strokeWidth ?? 1}px;
2201
+ }
2202
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
2203
+ text-anchor: middle;
2204
+ }
2205
+
2206
+ .node .katex path {
2207
+ fill: #000;
2208
+ stroke: #000;
2209
+ stroke-width: 1px;
2210
+ }
2211
+
2212
+ .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
2213
+ text-align: center;
2214
+ }
2215
+ .node.clickable {
2216
+ cursor: pointer;
2217
+ }
2218
+
2219
+
2220
+ .root .anchor path {
2221
+ fill: ${options.lineColor} !important;
2222
+ stroke-width: 0;
2223
+ stroke: ${options.lineColor};
2224
+ }
2225
+
2226
+ .arrowheadPath {
2227
+ fill: ${options.arrowheadColor};
2228
+ }
2229
+
2230
+ .edgePath .path {
2231
+ stroke: ${options.lineColor};
2232
+ stroke-width: ${options.strokeWidth ?? 2}px;
2233
+ }
2234
+
2235
+ .flowchart-link {
2236
+ stroke: ${options.lineColor};
2237
+ fill: none;
2238
+ }
2239
+
2240
+ .edgeLabel {
2241
+ background-color: ${options.edgeLabelBackground};
2242
+ p {
2243
+ background-color: ${options.edgeLabelBackground};
2244
+ }
2245
+ rect {
2246
+ opacity: 0.5;
2247
+ background-color: ${options.edgeLabelBackground};
2248
+ fill: ${options.edgeLabelBackground};
2249
+ }
2250
+ text-align: center;
2251
+ }
2252
+
2253
+ /* For html labels only */
2254
+ .labelBkg {
2255
+ background-color: ${fade(options.edgeLabelBackground, 0.5)};
2256
+ // background-color:
2257
+ }
2258
+
2259
+ .cluster rect {
2260
+ fill: ${options.clusterBkg};
2261
+ stroke: ${options.clusterBorder};
2262
+ stroke-width: 1px;
2263
+ }
2264
+
2265
+ .cluster text {
2266
+ fill: ${options.titleColor};
2267
+ }
2268
+
2269
+ .cluster span {
2270
+ color: ${options.titleColor};
2271
+ }
2272
+ /* .cluster div {
2273
+ color: ${options.titleColor};
2274
+ } */
2275
+
2276
+ div.mermaidTooltip {
2277
+ position: absolute;
2278
+ text-align: center;
2279
+ max-width: 200px;
2280
+ padding: 2px;
2281
+ font-family: ${options.fontFamily};
2282
+ font-size: 12px;
2283
+ background: ${options.tertiaryColor};
2284
+ border: 1px solid ${options.border2};
2285
+ border-radius: 2px;
2286
+ pointer-events: none;
2287
+ z-index: 100;
2288
+ }
2289
+
2290
+ .flowchartTitleText {
2291
+ text-anchor: middle;
2292
+ font-size: 18px;
2293
+ fill: ${options.textColor};
2294
+ }
2295
+
2296
+ rect.text {
2297
+ fill: none;
2298
+ stroke-width: 0;
2299
+ }
2300
+
2301
+ .icon-shape, .image-shape {
2302
+ background-color: ${options.edgeLabelBackground};
2303
+ p {
2304
+ background-color: ${options.edgeLabelBackground};
2305
+ padding: 2px;
2306
+ }
2307
+ .label rect {
2308
+ opacity: 0.5;
2309
+ background-color: ${options.edgeLabelBackground};
2310
+ fill: ${options.edgeLabelBackground};
2311
+ }
2312
+ text-align: center;
2313
+ }
2314
+ ${getIconStyles()}
2315
+ `, "getStyles");
2316
+ var styles_default = getStyles;
2317
+ var createFlowDiagram = /* @__PURE__ */ __name(({
2318
+ defaultLayout,
2319
+ styles = styles_default
2320
+ } = {}) => ({
2321
+ parser: flowParser_default,
2322
+ get db() {
2323
+ return new FlowDB();
2324
+ },
2325
+ renderer: flowRenderer_v3_unified_default,
2326
+ styles,
2327
+ init: /* @__PURE__ */ __name((cnf) => {
2328
+ if (!cnf.flowchart) {
2329
+ cnf.flowchart = {};
2330
+ }
2331
+ const layout = getUserDefinedConfig().layout ?? defaultLayout ?? cnf.layout;
2332
+ if (layout) {
2333
+ setConfig2({ layout });
2334
+ }
2335
+ cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
2336
+ setConfig2({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
2337
+ }, "init")
2338
+ }), "createFlowDiagram");
2339
+ var diagram = createFlowDiagram();
2340
+ const flowDiagram23GEKE2U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2341
+ __proto__: null,
2342
+ createFlowDiagram,
2343
+ diagram
2344
+ }, Symbol.toStringTag, { value: "Module" }));
2345
+ export {
2346
+ createFlowDiagram as c,
2347
+ flowDiagram23GEKE2U as f,
2348
+ styles_default as s
2349
+ };