UNPKG

78.2 kBJavaScriptView Raw
1import { ar as defaultConfig, s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, C as setDiagramTitle, D as getDiagramTitle, c as getConfig, l as log, A as utils, E as clear$1, f as common, j as d3select } from "./mermaid-dcacb631.js";
2var parser = function() {
3 var o = function(k, v, o2, l) {
4 for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
5 ;
6 return o2;
7 }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $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, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [8, 9, 10, 11, 29, 42, 44, 46, 48, 50, 52, 54, 56, 58, 61, 63, 65, 66, 68, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 42, 58, 73, 81, 82, 83, 84, 85, 86, 87, 102, 106, 108, 111, 112, 113], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109];
8 var parser2 = {
9 trace: function trace() {
10 },
11 yy: {},
12 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, "link": 39, "node": 40, "styledVertex": 41, "AMP": 42, "vertex": 43, "STYLE_SEPARATOR": 44, "idString": 45, "DOUBLECIRCLESTART": 46, "DOUBLECIRCLEEND": 47, "PS": 48, "PE": 49, "(-": 50, "-)": 51, "STADIUMSTART": 52, "STADIUMEND": 53, "SUBROUTINESTART": 54, "SUBROUTINEEND": 55, "VERTEX_WITH_PROPS_START": 56, "NODE_STRING[field]": 57, "COLON": 58, "NODE_STRING[value]": 59, "PIPE": 60, "CYLINDERSTART": 61, "CYLINDEREND": 62, "DIAMOND_START": 63, "DIAMOND_STOP": 64, "TAGEND": 65, "TRAPSTART": 66, "TRAPEND": 67, "INVTRAPSTART": 68, "INVTRAPEND": 69, "linkStatement": 70, "arrowText": 71, "TESTSTR": 72, "START_LINK": 73, "edgeText": 74, "LINK": 75, "edgeTextToken": 76, "STR": 77, "MD_STR": 78, "textToken": 79, "keywords": 80, "STYLE": 81, "LINKSTYLE": 82, "CLASSDEF": 83, "CLASS": 84, "CLICK": 85, "DOWN": 86, "UP": 87, "textNoTagsToken": 88, "stylesOpt": 89, "idString[vertex]": 90, "idString[class]": 91, "CALLBACKNAME": 92, "CALLBACKARGS": 93, "HREF": 94, "LINK_TARGET": 95, "STR[link]": 96, "STR[tooltip]": 97, "alphaNum": 98, "DEFAULT": 99, "numList": 100, "INTERPOLATE": 101, "NUM": 102, "COMMA": 103, "style": 104, "styleComponent": 105, "NODE_STRING": 106, "UNIT": 107, "BRKT": 108, "PCT": 109, "idStringToken": 110, "MINUS": 111, "MULT": 112, "UNICODE_TEXT": 113, "TEXT": 114, "TAGSTART": 115, "EDGE_TEXT": 116, "alphaNumToken": 117, "direction_tb": 118, "direction_bt": 119, "direction_rl": 120, "direction_lr": 121, "$accept": 0, "$end": 1 },
13 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", 42: "AMP", 44: "STYLE_SEPARATOR", 46: "DOUBLECIRCLESTART", 47: "DOUBLECIRCLEEND", 48: "PS", 49: "PE", 50: "(-", 51: "-)", 52: "STADIUMSTART", 53: "STADIUMEND", 54: "SUBROUTINESTART", 55: "SUBROUTINEEND", 56: "VERTEX_WITH_PROPS_START", 57: "NODE_STRING[field]", 58: "COLON", 59: "NODE_STRING[value]", 60: "PIPE", 61: "CYLINDERSTART", 62: "CYLINDEREND", 63: "DIAMOND_START", 64: "DIAMOND_STOP", 65: "TAGEND", 66: "TRAPSTART", 67: "TRAPEND", 68: "INVTRAPSTART", 69: "INVTRAPEND", 72: "TESTSTR", 73: "START_LINK", 75: "LINK", 77: "STR", 78: "MD_STR", 81: "STYLE", 82: "LINKSTYLE", 83: "CLASSDEF", 84: "CLASS", 85: "CLICK", 86: "DOWN", 87: "UP", 90: "idString[vertex]", 91: "idString[class]", 92: "CALLBACKNAME", 93: "CALLBACKARGS", 94: "HREF", 95: "LINK_TARGET", 96: "STR[link]", 97: "STR[tooltip]", 99: "DEFAULT", 101: "INTERPOLATE", 102: "NUM", 103: "COMMA", 106: "NODE_STRING", 107: "UNIT", 108: "BRKT", 109: "PCT", 111: "MINUS", 112: "MULT", 113: "UNICODE_TEXT", 114: "TEXT", 115: "TAGSTART", 116: "EDGE_TEXT", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr" },
14 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], [20, 3], [20, 4], [20, 2], [20, 1], [40, 1], [40, 5], [41, 1], [41, 3], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 8], [43, 4], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 4], [43, 4], [43, 1], [39, 2], [39, 3], [39, 3], [39, 1], [39, 3], [74, 1], [74, 2], [74, 1], [74, 1], [70, 1], [71, 3], [30, 1], [30, 2], [30, 1], [30, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 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], [100, 1], [100, 3], [89, 1], [89, 3], [104, 1], [104, 2], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [79, 1], [79, 1], [79, 1], [79, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [76, 1], [76, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [45, 1], [45, 2], [98, 1], [98, 2], [33, 1], [33, 1], [33, 1], [33, 1]],
15 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
16 var $0 = $$.length - 1;
17 switch (yystate) {
18 case 2:
19 this.$ = [];
20 break;
21 case 3:
22 if (!Array.isArray($$[$0]) || $$[$0].length > 0) {
23 $$[$0 - 1].push($$[$0]);
24 }
25 this.$ = $$[$0 - 1];
26 break;
27 case 4:
28 case 176:
29 this.$ = $$[$0];
30 break;
31 case 11:
32 yy.setDirection("TB");
33 this.$ = "TB";
34 break;
35 case 12:
36 yy.setDirection($$[$0 - 1]);
37 this.$ = $$[$0 - 1];
38 break;
39 case 27:
40 this.$ = $$[$0 - 1].nodes;
41 break;
42 case 28:
43 case 29:
44 case 30:
45 case 31:
46 case 32:
47 this.$ = [];
48 break;
49 case 33:
50 this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);
51 break;
52 case 34:
53 this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);
54 break;
55 case 35:
56 this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0);
57 break;
58 case 37:
59 this.$ = $$[$0].trim();
60 yy.setAccTitle(this.$);
61 break;
62 case 38:
63 case 39:
64 this.$ = $$[$0].trim();
65 yy.setAccDescription(this.$);
66 break;
67 case 43:
68 yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]);
69 this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) };
70 break;
71 case 44:
72 yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
73 this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
74 break;
75 case 45:
76 this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] };
77 break;
78 case 46:
79 this.$ = { stmt: $$[$0], nodes: $$[$0] };
80 break;
81 case 47:
82 this.$ = [$$[$0]];
83 break;
84 case 48:
85 this.$ = $$[$0 - 4].concat($$[$0]);
86 break;
87 case 49:
88 this.$ = $$[$0];
89 break;
90 case 50:
91 this.$ = $$[$0 - 2];
92 yy.setClass($$[$0 - 2], $$[$0]);
93 break;
94 case 51:
95 this.$ = $$[$0 - 3];
96 yy.addVertex($$[$0 - 3], $$[$0 - 1], "square");
97 break;
98 case 52:
99 this.$ = $$[$0 - 3];
100 yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle");
101 break;
102 case 53:
103 this.$ = $$[$0 - 5];
104 yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle");
105 break;
106 case 54:
107 this.$ = $$[$0 - 3];
108 yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse");
109 break;
110 case 55:
111 this.$ = $$[$0 - 3];
112 yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium");
113 break;
114 case 56:
115 this.$ = $$[$0 - 3];
116 yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine");
117 break;
118 case 57:
119 this.$ = $$[$0 - 7];
120 yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]]));
121 break;
122 case 58:
123 this.$ = $$[$0 - 3];
124 yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder");
125 break;
126 case 59:
127 this.$ = $$[$0 - 3];
128 yy.addVertex($$[$0 - 3], $$[$0 - 1], "round");
129 break;
130 case 60:
131 this.$ = $$[$0 - 3];
132 yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond");
133 break;
134 case 61:
135 this.$ = $$[$0 - 5];
136 yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon");
137 break;
138 case 62:
139 this.$ = $$[$0 - 3];
140 yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd");
141 break;
142 case 63:
143 this.$ = $$[$0 - 3];
144 yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid");
145 break;
146 case 64:
147 this.$ = $$[$0 - 3];
148 yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid");
149 break;
150 case 65:
151 this.$ = $$[$0 - 3];
152 yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right");
153 break;
154 case 66:
155 this.$ = $$[$0 - 3];
156 yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left");
157 break;
158 case 67:
159 this.$ = $$[$0];
160 yy.addVertex($$[$0]);
161 break;
162 case 68:
163 $$[$0 - 1].text = $$[$0];
164 this.$ = $$[$0 - 1];
165 break;
166 case 69:
167 case 70:
168 $$[$0 - 2].text = $$[$0 - 1];
169 this.$ = $$[$0 - 2];
170 break;
171 case 71:
172 this.$ = $$[$0];
173 break;
174 case 72:
175 var inf = yy.destructLink($$[$0], $$[$0 - 2]);
176 this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] };
177 break;
178 case 73:
179 this.$ = { text: $$[$0], type: "text" };
180 break;
181 case 74:
182 this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
183 break;
184 case 75:
185 this.$ = { text: $$[$0], type: "string" };
186 break;
187 case 76:
188 this.$ = { text: $$[$0], type: "markdown" };
189 break;
190 case 77:
191 var inf = yy.destructLink($$[$0]);
192 this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length };
193 break;
194 case 78:
195 this.$ = $$[$0 - 1];
196 break;
197 case 79:
198 this.$ = { text: $$[$0], type: "text" };
199 break;
200 case 80:
201 this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
202 break;
203 case 81:
204 this.$ = { text: $$[$0], type: "string" };
205 break;
206 case 82:
207 case 97:
208 this.$ = { text: $$[$0], type: "markdown" };
209 break;
210 case 94:
211 this.$ = { text: $$[$0], type: "text" };
212 break;
213 case 95:
214 this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
215 break;
216 case 96:
217 this.$ = { text: $$[$0], type: "text" };
218 break;
219 case 98:
220 this.$ = $$[$0 - 4];
221 yy.addClass($$[$0 - 2], $$[$0]);
222 break;
223 case 99:
224 this.$ = $$[$0 - 4];
225 yy.setClass($$[$0 - 2], $$[$0]);
226 break;
227 case 100:
228 case 108:
229 this.$ = $$[$0 - 1];
230 yy.setClickEvent($$[$0 - 1], $$[$0]);
231 break;
232 case 101:
233 case 109:
234 this.$ = $$[$0 - 3];
235 yy.setClickEvent($$[$0 - 3], $$[$0 - 2]);
236 yy.setTooltip($$[$0 - 3], $$[$0]);
237 break;
238 case 102:
239 this.$ = $$[$0 - 2];
240 yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
241 break;
242 case 103:
243 this.$ = $$[$0 - 4];
244 yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]);
245 yy.setTooltip($$[$0 - 4], $$[$0]);
246 break;
247 case 104:
248 this.$ = $$[$0 - 2];
249 yy.setLink($$[$0 - 2], $$[$0]);
250 break;
251 case 105:
252 this.$ = $$[$0 - 4];
253 yy.setLink($$[$0 - 4], $$[$0 - 2]);
254 yy.setTooltip($$[$0 - 4], $$[$0]);
255 break;
256 case 106:
257 this.$ = $$[$0 - 4];
258 yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
259 break;
260 case 107:
261 this.$ = $$[$0 - 6];
262 yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]);
263 yy.setTooltip($$[$0 - 6], $$[$0 - 2]);
264 break;
265 case 110:
266 this.$ = $$[$0 - 1];
267 yy.setLink($$[$0 - 1], $$[$0]);
268 break;
269 case 111:
270 this.$ = $$[$0 - 3];
271 yy.setLink($$[$0 - 3], $$[$0 - 2]);
272 yy.setTooltip($$[$0 - 3], $$[$0]);
273 break;
274 case 112:
275 this.$ = $$[$0 - 3];
276 yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
277 break;
278 case 113:
279 this.$ = $$[$0 - 5];
280 yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]);
281 yy.setTooltip($$[$0 - 5], $$[$0 - 2]);
282 break;
283 case 114:
284 this.$ = $$[$0 - 4];
285 yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]);
286 break;
287 case 115:
288 this.$ = $$[$0 - 4];
289 yy.updateLink([$$[$0 - 2]], $$[$0]);
290 break;
291 case 116:
292 this.$ = $$[$0 - 4];
293 yy.updateLink($$[$0 - 2], $$[$0]);
294 break;
295 case 117:
296 this.$ = $$[$0 - 8];
297 yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);
298 yy.updateLink([$$[$0 - 6]], $$[$0]);
299 break;
300 case 118:
301 this.$ = $$[$0 - 8];
302 yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);
303 yy.updateLink($$[$0 - 6], $$[$0]);
304 break;
305 case 119:
306 this.$ = $$[$0 - 6];
307 yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);
308 break;
309 case 120:
310 this.$ = $$[$0 - 6];
311 yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
312 break;
313 case 121:
314 case 123:
315 this.$ = [$$[$0]];
316 break;
317 case 122:
318 case 124:
319 $$[$0 - 2].push($$[$0]);
320 this.$ = $$[$0 - 2];
321 break;
322 case 126:
323 this.$ = $$[$0 - 1] + $$[$0];
324 break;
325 case 174:
326 this.$ = $$[$0];
327 break;
328 case 175:
329 this.$ = $$[$0 - 1] + "" + $$[$0];
330 break;
331 case 177:
332 this.$ = $$[$0 - 1] + "" + $$[$0];
333 break;
334 case 178:
335 this.$ = { stmt: "dir", value: "TB" };
336 break;
337 case 179:
338 this.$ = { stmt: "dir", value: "BT" };
339 break;
340 case 180:
341 this.$ = { stmt: "dir", value: "RL" };
342 break;
343 case 181:
344 this.$ = { stmt: "dir", value: "LR" };
345 break;
346 }
347 },
348 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, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 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, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 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, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 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, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })],
349 defaultActions: {},
350 parseError: function parseError(str, hash) {
351 if (hash.recoverable) {
352 this.trace(str);
353 } else {
354 var error = new Error(str);
355 error.hash = hash;
356 throw error;
357 }
358 },
359 parse: function parse(input) {
360 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
361 var args = lstack.slice.call(arguments, 1);
362 var lexer2 = Object.create(this.lexer);
363 var sharedState = { yy: {} };
364 for (var k in this.yy) {
365 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
366 sharedState.yy[k] = this.yy[k];
367 }
368 }
369 lexer2.setInput(input, sharedState.yy);
370 sharedState.yy.lexer = lexer2;
371 sharedState.yy.parser = this;
372 if (typeof lexer2.yylloc == "undefined") {
373 lexer2.yylloc = {};
374 }
375 var yyloc = lexer2.yylloc;
376 lstack.push(yyloc);
377 var ranges = lexer2.options && lexer2.options.ranges;
378 if (typeof sharedState.yy.parseError === "function") {
379 this.parseError = sharedState.yy.parseError;
380 } else {
381 this.parseError = Object.getPrototypeOf(this).parseError;
382 }
383 function lex2() {
384 var token;
385 token = tstack.pop() || lexer2.lex() || EOF;
386 if (typeof token !== "number") {
387 if (token instanceof Array) {
388 tstack = token;
389 token = tstack.pop();
390 }
391 token = self.symbols_[token] || token;
392 }
393 return token;
394 }
395 var symbol, state, action, r, yyval = {}, p, len, newState, expected;
396 while (true) {
397 state = stack[stack.length - 1];
398 if (this.defaultActions[state]) {
399 action = this.defaultActions[state];
400 } else {
401 if (symbol === null || typeof symbol == "undefined") {
402 symbol = lex2();
403 }
404 action = table[state] && table[state][symbol];
405 }
406 if (typeof action === "undefined" || !action.length || !action[0]) {
407 var errStr = "";
408 expected = [];
409 for (p in table[state]) {
410 if (this.terminals_[p] && p > TERROR) {
411 expected.push("'" + this.terminals_[p] + "'");
412 }
413 }
414 if (lexer2.showPosition) {
415 errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
416 } else {
417 errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
418 }
419 this.parseError(errStr, {
420 text: lexer2.match,
421 token: this.terminals_[symbol] || symbol,
422 line: lexer2.yylineno,
423 loc: yyloc,
424 expected
425 });
426 }
427 if (action[0] instanceof Array && action.length > 1) {
428 throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
429 }
430 switch (action[0]) {
431 case 1:
432 stack.push(symbol);
433 vstack.push(lexer2.yytext);
434 lstack.push(lexer2.yylloc);
435 stack.push(action[1]);
436 symbol = null;
437 {
438 yyleng = lexer2.yyleng;
439 yytext = lexer2.yytext;
440 yylineno = lexer2.yylineno;
441 yyloc = lexer2.yylloc;
442 }
443 break;
444 case 2:
445 len = this.productions_[action[1]][1];
446 yyval.$ = vstack[vstack.length - len];
447 yyval._$ = {
448 first_line: lstack[lstack.length - (len || 1)].first_line,
449 last_line: lstack[lstack.length - 1].last_line,
450 first_column: lstack[lstack.length - (len || 1)].first_column,
451 last_column: lstack[lstack.length - 1].last_column
452 };
453 if (ranges) {
454 yyval._$.range = [
455 lstack[lstack.length - (len || 1)].range[0],
456 lstack[lstack.length - 1].range[1]
457 ];
458 }
459 r = this.performAction.apply(yyval, [
460 yytext,
461 yyleng,
462 yylineno,
463 sharedState.yy,
464 action[1],
465 vstack,
466 lstack
467 ].concat(args));
468 if (typeof r !== "undefined") {
469 return r;
470 }
471 if (len) {
472 stack = stack.slice(0, -1 * len * 2);
473 vstack = vstack.slice(0, -1 * len);
474 lstack = lstack.slice(0, -1 * len);
475 }
476 stack.push(this.productions_[action[1]][0]);
477 vstack.push(yyval.$);
478 lstack.push(yyval._$);
479 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
480 stack.push(newState);
481 break;
482 case 3:
483 return true;
484 }
485 }
486 return true;
487 }
488 };
489 var lexer = function() {
490 var lexer2 = {
491 EOF: 1,
492 parseError: function parseError(str, hash) {
493 if (this.yy.parser) {
494 this.yy.parser.parseError(str, hash);
495 } else {
496 throw new Error(str);
497 }
498 },
499 // resets the lexer, sets new input
500 setInput: function(input, yy) {
501 this.yy = yy || this.yy || {};
502 this._input = input;
503 this._more = this._backtrack = this.done = false;
504 this.yylineno = this.yyleng = 0;
505 this.yytext = this.matched = this.match = "";
506 this.conditionStack = ["INITIAL"];
507 this.yylloc = {
508 first_line: 1,
509 first_column: 0,
510 last_line: 1,
511 last_column: 0
512 };
513 if (this.options.ranges) {
514 this.yylloc.range = [0, 0];
515 }
516 this.offset = 0;
517 return this;
518 },
519 // consumes and returns one char from the input
520 input: function() {
521 var ch = this._input[0];
522 this.yytext += ch;
523 this.yyleng++;
524 this.offset++;
525 this.match += ch;
526 this.matched += ch;
527 var lines = ch.match(/(?:\r\n?|\n).*/g);
528 if (lines) {
529 this.yylineno++;
530 this.yylloc.last_line++;
531 } else {
532 this.yylloc.last_column++;
533 }
534 if (this.options.ranges) {
535 this.yylloc.range[1]++;
536 }
537 this._input = this._input.slice(1);
538 return ch;
539 },
540 // unshifts one char (or a string) into the input
541 unput: function(ch) {
542 var len = ch.length;
543 var lines = ch.split(/(?:\r\n?|\n)/g);
544 this._input = ch + this._input;
545 this.yytext = this.yytext.substr(0, this.yytext.length - len);
546 this.offset -= len;
547 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
548 this.match = this.match.substr(0, this.match.length - 1);
549 this.matched = this.matched.substr(0, this.matched.length - 1);
550 if (lines.length - 1) {
551 this.yylineno -= lines.length - 1;
552 }
553 var r = this.yylloc.range;
554 this.yylloc = {
555 first_line: this.yylloc.first_line,
556 last_line: this.yylineno + 1,
557 first_column: this.yylloc.first_column,
558 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
559 };
560 if (this.options.ranges) {
561 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
562 }
563 this.yyleng = this.yytext.length;
564 return this;
565 },
566 // When called from action, caches matched text and appends it on next action
567 more: function() {
568 this._more = true;
569 return this;
570 },
571 // 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.
572 reject: function() {
573 if (this.options.backtrack_lexer) {
574 this._backtrack = true;
575 } else {
576 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(), {
577 text: "",
578 token: null,
579 line: this.yylineno
580 });
581 }
582 return this;
583 },
584 // retain first n characters of the match
585 less: function(n) {
586 this.unput(this.match.slice(n));
587 },
588 // displays already matched input, i.e. for error messages
589 pastInput: function() {
590 var past = this.matched.substr(0, this.matched.length - this.match.length);
591 return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
592 },
593 // displays upcoming input, i.e. for error messages
594 upcomingInput: function() {
595 var next = this.match;
596 if (next.length < 20) {
597 next += this._input.substr(0, 20 - next.length);
598 }
599 return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
600 },
601 // displays the character position where the lexing error occurred, i.e. for error messages
602 showPosition: function() {
603 var pre = this.pastInput();
604 var c = new Array(pre.length + 1).join("-");
605 return pre + this.upcomingInput() + "\n" + c + "^";
606 },
607 // test the lexed token: return FALSE when not a match, otherwise return token
608 test_match: function(match, indexed_rule) {
609 var token, lines, backup;
610 if (this.options.backtrack_lexer) {
611 backup = {
612 yylineno: this.yylineno,
613 yylloc: {
614 first_line: this.yylloc.first_line,
615 last_line: this.last_line,
616 first_column: this.yylloc.first_column,
617 last_column: this.yylloc.last_column
618 },
619 yytext: this.yytext,
620 match: this.match,
621 matches: this.matches,
622 matched: this.matched,
623 yyleng: this.yyleng,
624 offset: this.offset,
625 _more: this._more,
626 _input: this._input,
627 yy: this.yy,
628 conditionStack: this.conditionStack.slice(0),
629 done: this.done
630 };
631 if (this.options.ranges) {
632 backup.yylloc.range = this.yylloc.range.slice(0);
633 }
634 }
635 lines = match[0].match(/(?:\r\n?|\n).*/g);
636 if (lines) {
637 this.yylineno += lines.length;
638 }
639 this.yylloc = {
640 first_line: this.yylloc.last_line,
641 last_line: this.yylineno + 1,
642 first_column: this.yylloc.last_column,
643 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
644 };
645 this.yytext += match[0];
646 this.match += match[0];
647 this.matches = match;
648 this.yyleng = this.yytext.length;
649 if (this.options.ranges) {
650 this.yylloc.range = [this.offset, this.offset += this.yyleng];
651 }
652 this._more = false;
653 this._backtrack = false;
654 this._input = this._input.slice(match[0].length);
655 this.matched += match[0];
656 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
657 if (this.done && this._input) {
658 this.done = false;
659 }
660 if (token) {
661 return token;
662 } else if (this._backtrack) {
663 for (var k in backup) {
664 this[k] = backup[k];
665 }
666 return false;
667 }
668 return false;
669 },
670 // return next match in input
671 next: function() {
672 if (this.done) {
673 return this.EOF;
674 }
675 if (!this._input) {
676 this.done = true;
677 }
678 var token, match, tempMatch, index;
679 if (!this._more) {
680 this.yytext = "";
681 this.match = "";
682 }
683 var rules = this._currentRules();
684 for (var i = 0; i < rules.length; i++) {
685 tempMatch = this._input.match(this.rules[rules[i]]);
686 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
687 match = tempMatch;
688 index = i;
689 if (this.options.backtrack_lexer) {
690 token = this.test_match(tempMatch, rules[i]);
691 if (token !== false) {
692 return token;
693 } else if (this._backtrack) {
694 match = false;
695 continue;
696 } else {
697 return false;
698 }
699 } else if (!this.options.flex) {
700 break;
701 }
702 }
703 }
704 if (match) {
705 token = this.test_match(match, rules[index]);
706 if (token !== false) {
707 return token;
708 }
709 return false;
710 }
711 if (this._input === "") {
712 return this.EOF;
713 } else {
714 return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
715 text: "",
716 token: null,
717 line: this.yylineno
718 });
719 }
720 },
721 // return next match that has a token
722 lex: function lex2() {
723 var r = this.next();
724 if (r) {
725 return r;
726 } else {
727 return this.lex();
728 }
729 },
730 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
731 begin: function begin(condition) {
732 this.conditionStack.push(condition);
733 },
734 // pop the previously active lexer condition state off the condition stack
735 popState: function popState() {
736 var n = this.conditionStack.length - 1;
737 if (n > 0) {
738 return this.conditionStack.pop();
739 } else {
740 return this.conditionStack[0];
741 }
742 },
743 // produce the lexer rule set which is active for the currently active lexer condition state
744 _currentRules: function _currentRules() {
745 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
746 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
747 } else {
748 return this.conditions["INITIAL"].rules;
749 }
750 },
751 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
752 topState: function topState(n) {
753 n = this.conditionStack.length - 1 - Math.abs(n || 0);
754 if (n >= 0) {
755 return this.conditionStack[n];
756 } else {
757 return "INITIAL";
758 }
759 },
760 // alias for begin(condition)
761 pushState: function pushState(condition) {
762 this.begin(condition);
763 },
764 // return the number of states currently on the stack
765 stateStackSize: function stateStackSize() {
766 return this.conditionStack.length;
767 },
768 options: {},
769 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
770 switch ($avoiding_name_collisions) {
771 case 0:
772 this.begin("acc_title");
773 return 34;
774 case 1:
775 this.popState();
776 return "acc_title_value";
777 case 2:
778 this.begin("acc_descr");
779 return 36;
780 case 3:
781 this.popState();
782 return "acc_descr_value";
783 case 4:
784 this.begin("acc_descr_multiline");
785 break;
786 case 5:
787 this.popState();
788 break;
789 case 6:
790 return "acc_descr_multiline_value";
791 case 7:
792 this.begin("callbackname");
793 break;
794 case 8:
795 this.popState();
796 break;
797 case 9:
798 this.popState();
799 this.begin("callbackargs");
800 break;
801 case 10:
802 return 92;
803 case 11:
804 this.popState();
805 break;
806 case 12:
807 return 93;
808 case 13:
809 return "MD_STR";
810 case 14:
811 this.popState();
812 break;
813 case 15:
814 this.begin("md_string");
815 break;
816 case 16:
817 return "STR";
818 case 17:
819 this.popState();
820 break;
821 case 18:
822 this.pushState("string");
823 break;
824 case 19:
825 return 81;
826 case 20:
827 return 99;
828 case 21:
829 return 82;
830 case 22:
831 return 101;
832 case 23:
833 return 83;
834 case 24:
835 return 84;
836 case 25:
837 return 94;
838 case 26:
839 this.begin("click");
840 break;
841 case 27:
842 this.popState();
843 break;
844 case 28:
845 return 85;
846 case 29:
847 if (yy.lex.firstGraph()) {
848 this.begin("dir");
849 }
850 return 12;
851 case 30:
852 if (yy.lex.firstGraph()) {
853 this.begin("dir");
854 }
855 return 12;
856 case 31:
857 if (yy.lex.firstGraph()) {
858 this.begin("dir");
859 }
860 return 12;
861 case 32:
862 return 27;
863 case 33:
864 return 32;
865 case 34:
866 return 95;
867 case 35:
868 return 95;
869 case 36:
870 return 95;
871 case 37:
872 return 95;
873 case 38:
874 this.popState();
875 return 13;
876 case 39:
877 this.popState();
878 return 14;
879 case 40:
880 this.popState();
881 return 14;
882 case 41:
883 this.popState();
884 return 14;
885 case 42:
886 this.popState();
887 return 14;
888 case 43:
889 this.popState();
890 return 14;
891 case 44:
892 this.popState();
893 return 14;
894 case 45:
895 this.popState();
896 return 14;
897 case 46:
898 this.popState();
899 return 14;
900 case 47:
901 this.popState();
902 return 14;
903 case 48:
904 this.popState();
905 return 14;
906 case 49:
907 return 118;
908 case 50:
909 return 119;
910 case 51:
911 return 120;
912 case 52:
913 return 121;
914 case 53:
915 return 102;
916 case 54:
917 return 108;
918 case 55:
919 return 44;
920 case 56:
921 return 58;
922 case 57:
923 return 42;
924 case 58:
925 return 8;
926 case 59:
927 return 103;
928 case 60:
929 return 112;
930 case 61:
931 this.popState();
932 return 75;
933 case 62:
934 this.pushState("edgeText");
935 return 73;
936 case 63:
937 return 116;
938 case 64:
939 this.popState();
940 return 75;
941 case 65:
942 this.pushState("thickEdgeText");
943 return 73;
944 case 66:
945 return 116;
946 case 67:
947 this.popState();
948 return 75;
949 case 68:
950 this.pushState("dottedEdgeText");
951 return 73;
952 case 69:
953 return 116;
954 case 70:
955 return 75;
956 case 71:
957 this.popState();
958 return 51;
959 case 72:
960 return "TEXT";
961 case 73:
962 this.pushState("ellipseText");
963 return 50;
964 case 74:
965 this.popState();
966 return 53;
967 case 75:
968 this.pushState("text");
969 return 52;
970 case 76:
971 this.popState();
972 return 55;
973 case 77:
974 this.pushState("text");
975 return 54;
976 case 78:
977 return 56;
978 case 79:
979 this.pushState("text");
980 return 65;
981 case 80:
982 this.popState();
983 return 62;
984 case 81:
985 this.pushState("text");
986 return 61;
987 case 82:
988 this.popState();
989 return 47;
990 case 83:
991 this.pushState("text");
992 return 46;
993 case 84:
994 this.popState();
995 return 67;
996 case 85:
997 this.popState();
998 return 69;
999 case 86:
1000 return 114;
1001 case 87:
1002 this.pushState("trapText");
1003 return 66;
1004 case 88:
1005 this.pushState("trapText");
1006 return 68;
1007 case 89:
1008 return 115;
1009 case 90:
1010 return 65;
1011 case 91:
1012 return 87;
1013 case 92:
1014 return "SEP";
1015 case 93:
1016 return 86;
1017 case 94:
1018 return 112;
1019 case 95:
1020 return 108;
1021 case 96:
1022 return 42;
1023 case 97:
1024 return 106;
1025 case 98:
1026 return 111;
1027 case 99:
1028 return 113;
1029 case 100:
1030 this.popState();
1031 return 60;
1032 case 101:
1033 this.pushState("text");
1034 return 60;
1035 case 102:
1036 this.popState();
1037 return 49;
1038 case 103:
1039 this.pushState("text");
1040 return 48;
1041 case 104:
1042 this.popState();
1043 return 31;
1044 case 105:
1045 this.pushState("text");
1046 return 29;
1047 case 106:
1048 this.popState();
1049 return 64;
1050 case 107:
1051 this.pushState("text");
1052 return 63;
1053 case 108:
1054 return "TEXT";
1055 case 109:
1056 return "QUOTE";
1057 case 110:
1058 return 9;
1059 case 111:
1060 return 10;
1061 case 112:
1062 return 11;
1063 }
1064 },
1065 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)/, /^(?: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]*)/, /^(?:[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)/, /^(?:$)/],
1066 conditions: { "callbackargs": { "rules": [11, 12, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "text": { "rules": [15, 18, 70, 73, 74, 75, 76, 77, 80, 81, 82, 83, 87, 88, 100, 101, 102, 103, 104, 105, 106, 107, 108], "inclusive": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dir": { "rules": [15, 18, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 67, 68, 70, 73, 75, 77, 78, 79, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 110, 111, 112], "inclusive": true } }
1067 };
1068 return lexer2;
1069 }();
1070 parser2.lexer = lexer;
1071 function Parser() {
1072 this.yy = {};
1073 }
1074 Parser.prototype = parser2;
1075 parser2.Parser = Parser;
1076 return new Parser();
1077}();
1078parser.parser = parser;
1079const parser$1 = parser;
1080const MERMAID_DOM_ID_PREFIX = "flowchart-";
1081let vertexCounter = 0;
1082let config = getConfig();
1083let vertices = {};
1084let edges = [];
1085let classes = {};
1086let subGraphs = [];
1087let subGraphLookup = {};
1088let tooltips = {};
1089let subCount = 0;
1090let firstGraphFlag = true;
1091let direction;
1092let version;
1093let funs = [];
1094const sanitizeText = (txt) => common.sanitizeText(txt, config);
1095const lookUpDomId = function(id) {
1096 const vertexKeys = Object.keys(vertices);
1097 for (const vertexKey of vertexKeys) {
1098 if (vertices[vertexKey].id === id) {
1099 return vertices[vertexKey].domId;
1100 }
1101 }
1102 return id;
1103};
1104const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) {
1105 let txt;
1106 let id = _id;
1107 if (id === void 0) {
1108 return;
1109 }
1110 if (id.trim().length === 0) {
1111 return;
1112 }
1113 if (vertices[id] === void 0) {
1114 vertices[id] = {
1115 id,
1116 labelType: "text",
1117 domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter,
1118 styles: [],
1119 classes: []
1120 };
1121 }
1122 vertexCounter++;
1123 if (textObj !== void 0) {
1124 config = getConfig();
1125 txt = sanitizeText(textObj.text.trim());
1126 vertices[id].labelType = textObj.type;
1127 if (txt[0] === '"' && txt[txt.length - 1] === '"') {
1128 txt = txt.substring(1, txt.length - 1);
1129 }
1130 vertices[id].text = txt;
1131 } else {
1132 if (vertices[id].text === void 0) {
1133 vertices[id].text = _id;
1134 }
1135 }
1136 if (type !== void 0) {
1137 vertices[id].type = type;
1138 }
1139 if (style !== void 0 && style !== null) {
1140 style.forEach(function(s) {
1141 vertices[id].styles.push(s);
1142 });
1143 }
1144 if (classes2 !== void 0 && classes2 !== null) {
1145 classes2.forEach(function(s) {
1146 vertices[id].classes.push(s);
1147 });
1148 }
1149 if (dir !== void 0) {
1150 vertices[id].dir = dir;
1151 }
1152 if (vertices[id].props === void 0) {
1153 vertices[id].props = props;
1154 } else if (props !== void 0) {
1155 Object.assign(vertices[id].props, props);
1156 }
1157};
1158const addSingleLink = function(_start, _end, type) {
1159 let start = _start;
1160 let end = _end;
1161 const edge = { start, end, type: void 0, text: "", labelType: "text" };
1162 log.info("abc78 Got edge...", edge);
1163 const linkTextObj = type.text;
1164 if (linkTextObj !== void 0) {
1165 edge.text = sanitizeText(linkTextObj.text.trim());
1166 if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') {
1167 edge.text = edge.text.substring(1, edge.text.length - 1);
1168 }
1169 edge.labelType = linkTextObj.type;
1170 }
1171 if (type !== void 0) {
1172 edge.type = type.type;
1173 edge.stroke = type.stroke;
1174 edge.length = type.length;
1175 }
1176 if ((edge == null ? void 0 : edge.length) > 10) {
1177 edge.length = 10;
1178 }
1179 if (edges.length < (config.maxEdges ?? 500)) {
1180 log.info("abc78 pushing edge...");
1181 edges.push(edge);
1182 } else {
1183 throw new Error(
1184 `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}.
1185
1186Initialize mermaid with maxEdges set to a higher number to allow more edges.
1187You cannot set this config via configuration inside the diagram as it is a secure config.
1188You have to call mermaid.initialize.`
1189 );
1190 }
1191};
1192const addLink = function(_start, _end, type) {
1193 log.info("addLink (abc78)", _start, _end, type);
1194 let i, j;
1195 for (i = 0; i < _start.length; i++) {
1196 for (j = 0; j < _end.length; j++) {
1197 addSingleLink(_start[i], _end[j], type);
1198 }
1199 }
1200};
1201const updateLinkInterpolate = function(positions, interp) {
1202 positions.forEach(function(pos) {
1203 if (pos === "default") {
1204 edges.defaultInterpolate = interp;
1205 } else {
1206 edges[pos].interpolate = interp;
1207 }
1208 });
1209};
1210const updateLink = function(positions, style) {
1211 positions.forEach(function(pos) {
1212 if (pos >= edges.length) {
1213 throw new Error(
1214 `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)`
1215 );
1216 }
1217 if (pos === "default") {
1218 edges.defaultStyle = style;
1219 } else {
1220 if (utils.isSubstringInArray("fill", style) === -1) {
1221 style.push("fill:none");
1222 }
1223 edges[pos].style = style;
1224 }
1225 });
1226};
1227const addClass = function(ids, style) {
1228 ids.split(",").forEach(function(id) {
1229 if (classes[id] === void 0) {
1230 classes[id] = { id, styles: [], textStyles: [] };
1231 }
1232 if (style !== void 0 && style !== null) {
1233 style.forEach(function(s) {
1234 if (s.match("color")) {
1235 const newStyle = s.replace("fill", "bgFill").replace("color", "fill");
1236 classes[id].textStyles.push(newStyle);
1237 }
1238 classes[id].styles.push(s);
1239 });
1240 }
1241 });
1242};
1243const setDirection = function(dir) {
1244 direction = dir;
1245 if (direction.match(/.*</)) {
1246 direction = "RL";
1247 }
1248 if (direction.match(/.*\^/)) {
1249 direction = "BT";
1250 }
1251 if (direction.match(/.*>/)) {
1252 direction = "LR";
1253 }
1254 if (direction.match(/.*v/)) {
1255 direction = "TB";
1256 }
1257 if (direction === "TD") {
1258 direction = "TB";
1259 }
1260};
1261const setClass = function(ids, className) {
1262 ids.split(",").forEach(function(_id) {
1263 let id = _id;
1264 if (vertices[id] !== void 0) {
1265 vertices[id].classes.push(className);
1266 }
1267 if (subGraphLookup[id] !== void 0) {
1268 subGraphLookup[id].classes.push(className);
1269 }
1270 });
1271};
1272const setTooltip = function(ids, tooltip) {
1273 ids.split(",").forEach(function(id) {
1274 if (tooltip !== void 0) {
1275 tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip);
1276 }
1277 });
1278};
1279const setClickFun = function(id, functionName, functionArgs) {
1280 let domId = lookUpDomId(id);
1281 if (getConfig().securityLevel !== "loose") {
1282 return;
1283 }
1284 if (functionName === void 0) {
1285 return;
1286 }
1287 let argList = [];
1288 if (typeof functionArgs === "string") {
1289 argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1290 for (let i = 0; i < argList.length; i++) {
1291 let item = argList[i].trim();
1292 if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
1293 item = item.substr(1, item.length - 2);
1294 }
1295 argList[i] = item;
1296 }
1297 }
1298 if (argList.length === 0) {
1299 argList.push(id);
1300 }
1301 if (vertices[id] !== void 0) {
1302 vertices[id].haveCallback = true;
1303 funs.push(function() {
1304 const elem = document.querySelector(`[id="${domId}"]`);
1305 if (elem !== null) {
1306 elem.addEventListener(
1307 "click",
1308 function() {
1309 utils.runFunc(functionName, ...argList);
1310 },
1311 false
1312 );
1313 }
1314 });
1315 }
1316};
1317const setLink = function(ids, linkStr, target) {
1318 ids.split(",").forEach(function(id) {
1319 if (vertices[id] !== void 0) {
1320 vertices[id].link = utils.formatUrl(linkStr, config);
1321 vertices[id].linkTarget = target;
1322 }
1323 });
1324 setClass(ids, "clickable");
1325};
1326const getTooltip = function(id) {
1327 if (tooltips.hasOwnProperty(id)) {
1328 return tooltips[id];
1329 }
1330 return void 0;
1331};
1332const setClickEvent = function(ids, functionName, functionArgs) {
1333 ids.split(",").forEach(function(id) {
1334 setClickFun(id, functionName, functionArgs);
1335 });
1336 setClass(ids, "clickable");
1337};
1338const bindFunctions = function(element) {
1339 funs.forEach(function(fun) {
1340 fun(element);
1341 });
1342};
1343const getDirection = function() {
1344 return direction.trim();
1345};
1346const getVertices = function() {
1347 return vertices;
1348};
1349const getEdges = function() {
1350 return edges;
1351};
1352const getClasses = function() {
1353 return classes;
1354};
1355const setupToolTips = function(element) {
1356 let tooltipElem = d3select(".mermaidTooltip");
1357 if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
1358 tooltipElem = d3select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0);
1359 }
1360 const svg = d3select(element).select("svg");
1361 const nodes = svg.selectAll("g.node");
1362 nodes.on("mouseover", function() {
1363 const el = d3select(this);
1364 const title = el.attr("title");
1365 if (title === null) {
1366 return;
1367 }
1368 const rect = this.getBoundingClientRect();
1369 tooltipElem.transition().duration(200).style("opacity", ".9");
1370 tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px");
1371 tooltipElem.html(tooltipElem.html().replace(/&lt;br\/&gt;/g, "<br/>"));
1372 el.classed("hover", true);
1373 }).on("mouseout", function() {
1374 tooltipElem.transition().duration(500).style("opacity", 0);
1375 const el = d3select(this);
1376 el.classed("hover", false);
1377 });
1378};
1379funs.push(setupToolTips);
1380const clear = function(ver = "gen-1") {
1381 vertices = {};
1382 classes = {};
1383 edges = [];
1384 funs = [setupToolTips];
1385 subGraphs = [];
1386 subGraphLookup = {};
1387 subCount = 0;
1388 tooltips = {};
1389 firstGraphFlag = true;
1390 version = ver;
1391 config = getConfig();
1392 clear$1();
1393};
1394const setGen = (ver) => {
1395 version = ver || "gen-2";
1396};
1397const defaultStyle = function() {
1398 return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
1399};
1400const addSubGraph = function(_id, list, _title) {
1401 let id = _id.text.trim();
1402 let title = _title.text;
1403 if (_id === _title && _title.text.match(/\s/)) {
1404 id = void 0;
1405 }
1406 function uniq(a) {
1407 const prims = { boolean: {}, number: {}, string: {} };
1408 const objs = [];
1409 let dir2;
1410 const nodeList2 = a.filter(function(item) {
1411 const type = typeof item;
1412 if (item.stmt && item.stmt === "dir") {
1413 dir2 = item.value;
1414 return false;
1415 }
1416 if (item.trim() === "") {
1417 return false;
1418 }
1419 if (type in prims) {
1420 return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
1421 } else {
1422 return objs.includes(item) ? false : objs.push(item);
1423 }
1424 });
1425 return { nodeList: nodeList2, dir: dir2 };
1426 }
1427 let nodeList = [];
1428 const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list));
1429 nodeList = nl;
1430 if (version === "gen-1") {
1431 for (let i = 0; i < nodeList.length; i++) {
1432 nodeList[i] = lookUpDomId(nodeList[i]);
1433 }
1434 }
1435 id = id || "subGraph" + subCount;
1436 title = title || "";
1437 title = sanitizeText(title);
1438 subCount = subCount + 1;
1439 const subGraph = {
1440 id,
1441 nodes: nodeList,
1442 title: title.trim(),
1443 classes: [],
1444 dir,
1445 labelType: _title.type
1446 };
1447 log.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir);
1448 subGraph.nodes = makeUniq(subGraph, subGraphs).nodes;
1449 subGraphs.push(subGraph);
1450 subGraphLookup[id] = subGraph;
1451 return id;
1452};
1453const getPosForId = function(id) {
1454 for (const [i, subGraph] of subGraphs.entries()) {
1455 if (subGraph.id === id) {
1456 return i;
1457 }
1458 }
1459 return -1;
1460};
1461let secCount = -1;
1462const posCrossRef = [];
1463const indexNodes2 = function(id, pos) {
1464 const nodes = subGraphs[pos].nodes;
1465 secCount = secCount + 1;
1466 if (secCount > 2e3) {
1467 return;
1468 }
1469 posCrossRef[secCount] = pos;
1470 if (subGraphs[pos].id === id) {
1471 return {
1472 result: true,
1473 count: 0
1474 };
1475 }
1476 let count = 0;
1477 let posCount = 1;
1478 while (count < nodes.length) {
1479 const childPos = getPosForId(nodes[count]);
1480 if (childPos >= 0) {
1481 const res = indexNodes2(id, childPos);
1482 if (res.result) {
1483 return {
1484 result: true,
1485 count: posCount + res.count
1486 };
1487 } else {
1488 posCount = posCount + res.count;
1489 }
1490 }
1491 count = count + 1;
1492 }
1493 return {
1494 result: false,
1495 count: posCount
1496 };
1497};
1498const getDepthFirstPos = function(pos) {
1499 return posCrossRef[pos];
1500};
1501const indexNodes = function() {
1502 secCount = -1;
1503 if (subGraphs.length > 0) {
1504 indexNodes2("none", subGraphs.length - 1);
1505 }
1506};
1507const getSubGraphs = function() {
1508 return subGraphs;
1509};
1510const firstGraph = () => {
1511 if (firstGraphFlag) {
1512 firstGraphFlag = false;
1513 return true;
1514 }
1515 return false;
1516};
1517const destructStartLink = (_str) => {
1518 let str = _str.trim();
1519 let type = "arrow_open";
1520 switch (str[0]) {
1521 case "<":
1522 type = "arrow_point";
1523 str = str.slice(1);
1524 break;
1525 case "x":
1526 type = "arrow_cross";
1527 str = str.slice(1);
1528 break;
1529 case "o":
1530 type = "arrow_circle";
1531 str = str.slice(1);
1532 break;
1533 }
1534 let stroke = "normal";
1535 if (str.includes("=")) {
1536 stroke = "thick";
1537 }
1538 if (str.includes(".")) {
1539 stroke = "dotted";
1540 }
1541 return { type, stroke };
1542};
1543const countChar = (char, str) => {
1544 const length = str.length;
1545 let count = 0;
1546 for (let i = 0; i < length; ++i) {
1547 if (str[i] === char) {
1548 ++count;
1549 }
1550 }
1551 return count;
1552};
1553const destructEndLink = (_str) => {
1554 const str = _str.trim();
1555 let line = str.slice(0, -1);
1556 let type = "arrow_open";
1557 switch (str.slice(-1)) {
1558 case "x":
1559 type = "arrow_cross";
1560 if (str[0] === "x") {
1561 type = "double_" + type;
1562 line = line.slice(1);
1563 }
1564 break;
1565 case ">":
1566 type = "arrow_point";
1567 if (str[0] === "<") {
1568 type = "double_" + type;
1569 line = line.slice(1);
1570 }
1571 break;
1572 case "o":
1573 type = "arrow_circle";
1574 if (str[0] === "o") {
1575 type = "double_" + type;
1576 line = line.slice(1);
1577 }
1578 break;
1579 }
1580 let stroke = "normal";
1581 let length = line.length - 1;
1582 if (line[0] === "=") {
1583 stroke = "thick";
1584 }
1585 if (line[0] === "~") {
1586 stroke = "invisible";
1587 }
1588 let dots = countChar(".", line);
1589 if (dots) {
1590 stroke = "dotted";
1591 length = dots;
1592 }
1593 return { type, stroke, length };
1594};
1595const destructLink = (_str, _startStr) => {
1596 const info = destructEndLink(_str);
1597 let startInfo;
1598 if (_startStr) {
1599 startInfo = destructStartLink(_startStr);
1600 if (startInfo.stroke !== info.stroke) {
1601 return { type: "INVALID", stroke: "INVALID" };
1602 }
1603 if (startInfo.type === "arrow_open") {
1604 startInfo.type = info.type;
1605 } else {
1606 if (startInfo.type !== info.type) {
1607 return { type: "INVALID", stroke: "INVALID" };
1608 }
1609 startInfo.type = "double_" + startInfo.type;
1610 }
1611 if (startInfo.type === "double_arrow") {
1612 startInfo.type = "double_arrow_point";
1613 }
1614 startInfo.length = info.length;
1615 return startInfo;
1616 }
1617 return info;
1618};
1619const exists = (allSgs, _id) => {
1620 let res = false;
1621 allSgs.forEach((sg) => {
1622 const pos = sg.nodes.indexOf(_id);
1623 if (pos >= 0) {
1624 res = true;
1625 }
1626 });
1627 return res;
1628};
1629const makeUniq = (sg, allSubgraphs) => {
1630 const res = [];
1631 sg.nodes.forEach((_id, pos) => {
1632 if (!exists(allSubgraphs, _id)) {
1633 res.push(sg.nodes[pos]);
1634 }
1635 });
1636 return { nodes: res };
1637};
1638const lex = {
1639 firstGraph
1640};
1641const flowDb = {
1642 defaultConfig: () => defaultConfig.flowchart,
1643 setAccTitle,
1644 getAccTitle,
1645 getAccDescription,
1646 setAccDescription,
1647 addVertex,
1648 lookUpDomId,
1649 addLink,
1650 updateLinkInterpolate,
1651 updateLink,
1652 addClass,
1653 setDirection,
1654 setClass,
1655 setTooltip,
1656 getTooltip,
1657 setClickEvent,
1658 setLink,
1659 bindFunctions,
1660 getDirection,
1661 getVertices,
1662 getEdges,
1663 getClasses,
1664 clear,
1665 setGen,
1666 defaultStyle,
1667 addSubGraph,
1668 getDepthFirstPos,
1669 indexNodes,
1670 getSubGraphs,
1671 destructLink,
1672 lex,
1673 exists,
1674 makeUniq,
1675 setDiagramTitle,
1676 getDiagramTitle
1677};
1678const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1679 __proto__: null,
1680 addClass,
1681 addLink,
1682 addSingleLink,
1683 addSubGraph,
1684 addVertex,
1685 bindFunctions,
1686 clear,
1687 default: flowDb,
1688 defaultStyle,
1689 destructLink,
1690 firstGraph,
1691 getClasses,
1692 getDepthFirstPos,
1693 getDirection,
1694 getEdges,
1695 getSubGraphs,
1696 getTooltip,
1697 getVertices,
1698 indexNodes,
1699 lex,
1700 lookUpDomId,
1701 setClass,
1702 setClickEvent,
1703 setDirection,
1704 setGen,
1705 setLink,
1706 updateLink,
1707 updateLinkInterpolate
1708}, Symbol.toStringTag, { value: "Module" }));
1709export {
1710 db as d,
1711 flowDb as f,
1712 parser$1 as p
1713};