1 | import { select } from "d3";
|
2 | import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, r as setDiagramTitle, t as getDiagramTitle, m as mermaidAPI, v as clear$1, l as log, e as common, u as utils } from "./mermaid-a953d906.js";
|
3 | var parser = function() {
|
4 | var o = function(k, v, o2, l) {
|
5 | for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
|
6 | ;
|
7 | return o2;
|
8 | }, $V0 = [1, 34], $V1 = [1, 35], $V2 = [1, 36], $V3 = [1, 37], $V4 = [1, 9], $V5 = [1, 8], $V6 = [1, 19], $V7 = [1, 20], $V8 = [1, 21], $V9 = [1, 40], $Va = [1, 41], $Vb = [1, 27], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 32], $Vf = [1, 33], $Vg = [1, 28], $Vh = [1, 29], $Vi = [1, 30], $Vj = [1, 31], $Vk = [1, 45], $Vl = [1, 42], $Vm = [1, 43], $Vn = [1, 44], $Vo = [1, 46], $Vp = [1, 24], $Vq = [1, 16, 24], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 64], $Vw = [1, 65], $Vx = [1, 66], $Vy = [1, 16, 24, 52], $Vz = [1, 77], $VA = [1, 16, 24, 27, 28, 36, 50, 52, 55, 68, 69, 70, 71, 72, 73, 74, 79, 81], $VB = [1, 16, 24, 27, 28, 34, 36, 50, 52, 55, 59, 68, 69, 70, 71, 72, 73, 74, 79, 81, 94, 96, 97, 98, 99], $VC = [1, 86], $VD = [28, 94, 96, 97, 98, 99], $VE = [28, 73, 74, 94, 96, 97, 98, 99], $VF = [28, 68, 69, 70, 71, 72, 94, 96, 97, 98, 99], $VG = [1, 99], $VH = [1, 16, 24, 50, 52, 55], $VI = [1, 16, 24, 36], $VJ = [8, 9, 10, 11, 19, 23, 44, 46, 48, 53, 57, 58, 60, 61, 63, 65, 75, 76, 78, 82, 94, 96, 97, 98, 99];
|
9 | var parser2 = {
|
10 | trace: function trace() {
|
11 | },
|
12 | yy: {},
|
13 | symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "directive": 5, "statements": 6, "direction": 7, "direction_tb": 8, "direction_bt": 9, "direction_rl": 10, "direction_lr": 11, "graphConfig": 12, "openDirective": 13, "typeDirective": 14, "closeDirective": 15, "NEWLINE": 16, ":": 17, "argDirective": 18, "open_directive": 19, "type_directive": 20, "arg_directive": 21, "close_directive": 22, "CLASS_DIAGRAM": 23, "EOF": 24, "statement": 25, "classLabel": 26, "SQS": 27, "STR": 28, "SQE": 29, "namespaceName": 30, "alphaNumToken": 31, "className": 32, "classLiteralName": 33, "GENERICTYPE": 34, "relationStatement": 35, "LABEL": 36, "namespaceStatement": 37, "classStatement": 38, "methodStatement": 39, "annotationStatement": 40, "clickStatement": 41, "cssClassStatement": 42, "noteStatement": 43, "acc_title": 44, "acc_title_value": 45, "acc_descr": 46, "acc_descr_value": 47, "acc_descr_multiline_value": 48, "namespaceIdentifier": 49, "STRUCT_START": 50, "classStatements": 51, "STRUCT_STOP": 52, "NAMESPACE": 53, "classIdentifier": 54, "STYLE_SEPARATOR": 55, "members": 56, "CLASS": 57, "ANNOTATION_START": 58, "ANNOTATION_END": 59, "MEMBER": 60, "SEPARATOR": 61, "relation": 62, "NOTE_FOR": 63, "noteText": 64, "NOTE": 65, "relationType": 66, "lineType": 67, "AGGREGATION": 68, "EXTENSION": 69, "COMPOSITION": 70, "DEPENDENCY": 71, "LOLLIPOP": 72, "LINE": 73, "DOTTED_LINE": 74, "CALLBACK": 75, "LINK": 76, "LINK_TARGET": 77, "CLICK": 78, "CALLBACK_NAME": 79, "CALLBACK_ARGS": 80, "HREF": 81, "CSSCLASS": 82, "commentToken": 83, "textToken": 84, "graphCodeTokens": 85, "textNoTagsToken": 86, "TAGSTART": 87, "TAGEND": 88, "==": 89, "--": 90, "PCT": 91, "DEFAULT": 92, "SPACE": 93, "MINUS": 94, "keywords": 95, "UNICODE_TEXT": 96, "NUM": 97, "ALPHA": 98, "BQUOTE_STR": 99, "$accept": 0, "$end": 1 },
|
14 | terminals_: { 2: "error", 8: "direction_tb", 9: "direction_bt", 10: "direction_rl", 11: "direction_lr", 16: "NEWLINE", 17: ":", 19: "open_directive", 20: "type_directive", 21: "arg_directive", 22: "close_directive", 23: "CLASS_DIAGRAM", 24: "EOF", 27: "SQS", 28: "STR", 29: "SQE", 34: "GENERICTYPE", 36: "LABEL", 44: "acc_title", 45: "acc_title_value", 46: "acc_descr", 47: "acc_descr_value", 48: "acc_descr_multiline_value", 50: "STRUCT_START", 52: "STRUCT_STOP", 53: "NAMESPACE", 55: "STYLE_SEPARATOR", 57: "CLASS", 58: "ANNOTATION_START", 59: "ANNOTATION_END", 60: "MEMBER", 61: "SEPARATOR", 63: "NOTE_FOR", 65: "NOTE", 68: "AGGREGATION", 69: "EXTENSION", 70: "COMPOSITION", 71: "DEPENDENCY", 72: "LOLLIPOP", 73: "LINE", 74: "DOTTED_LINE", 75: "CALLBACK", 76: "LINK", 77: "LINK_TARGET", 78: "CLICK", 79: "CALLBACK_NAME", 80: "CALLBACK_ARGS", 81: "HREF", 82: "CSSCLASS", 85: "graphCodeTokens", 87: "TAGSTART", 88: "TAGEND", 89: "==", 90: "--", 91: "PCT", 92: "DEFAULT", 93: "SPACE", 94: "MINUS", 95: "keywords", 96: "UNICODE_TEXT", 97: "NUM", 98: "ALPHA", 99: "BQUOTE_STR" },
|
15 | productions_: [0, [3, 1], [3, 2], [3, 1], [7, 1], [7, 1], [7, 1], [7, 1], [4, 1], [5, 4], [5, 6], [13, 1], [14, 1], [18, 1], [15, 1], [12, 4], [6, 1], [6, 2], [6, 3], [26, 3], [30, 1], [30, 2], [32, 1], [32, 1], [32, 2], [32, 2], [32, 2], [25, 1], [25, 2], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 2], [25, 2], [25, 1], [37, 4], [37, 5], [49, 2], [51, 1], [51, 2], [51, 3], [38, 1], [38, 3], [38, 4], [38, 6], [54, 2], [54, 3], [40, 4], [56, 1], [56, 2], [39, 1], [39, 2], [39, 1], [39, 1], [35, 3], [35, 4], [35, 4], [35, 5], [43, 3], [43, 2], [62, 3], [62, 2], [62, 2], [62, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [67, 1], [67, 1], [41, 3], [41, 4], [41, 3], [41, 4], [41, 4], [41, 5], [41, 3], [41, 4], [41, 4], [41, 5], [41, 3], [41, 4], [41, 4], [41, 5], [42, 3], [83, 1], [83, 1], [84, 1], [84, 1], [84, 1], [84, 1], [84, 1], [84, 1], [84, 1], [86, 1], [86, 1], [86, 1], [86, 1], [31, 1], [31, 1], [31, 1], [31, 1], [33, 1], [64, 1]],
|
16 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
17 | var $0 = $$.length - 1;
|
18 | switch (yystate) {
|
19 | case 4:
|
20 | yy.setDirection("TB");
|
21 | break;
|
22 | case 5:
|
23 | yy.setDirection("BT");
|
24 | break;
|
25 | case 6:
|
26 | yy.setDirection("RL");
|
27 | break;
|
28 | case 7:
|
29 | yy.setDirection("LR");
|
30 | break;
|
31 | case 11:
|
32 | yy.parseDirective("%%{", "open_directive");
|
33 | break;
|
34 | case 12:
|
35 | yy.parseDirective($$[$0], "type_directive");
|
36 | break;
|
37 | case 13:
|
38 | $$[$0] = $$[$0].trim().replace(/'/g, '"');
|
39 | yy.parseDirective($$[$0], "arg_directive");
|
40 | break;
|
41 | case 14:
|
42 | yy.parseDirective("}%%", "close_directive", "class");
|
43 | break;
|
44 | case 19:
|
45 | this.$ = $$[$0 - 1];
|
46 | break;
|
47 | case 20:
|
48 | case 22:
|
49 | case 23:
|
50 | this.$ = $$[$0];
|
51 | break;
|
52 | case 21:
|
53 | case 24:
|
54 | this.$ = $$[$0 - 1] + $$[$0];
|
55 | break;
|
56 | case 25:
|
57 | case 26:
|
58 | this.$ = $$[$0 - 1] + "~" + $$[$0] + "~";
|
59 | break;
|
60 | case 27:
|
61 | yy.addRelation($$[$0]);
|
62 | break;
|
63 | case 28:
|
64 | $$[$0 - 1].title = yy.cleanupLabel($$[$0]);
|
65 | yy.addRelation($$[$0 - 1]);
|
66 | break;
|
67 | case 37:
|
68 | this.$ = $$[$0].trim();
|
69 | yy.setAccTitle(this.$);
|
70 | break;
|
71 | case 38:
|
72 | case 39:
|
73 | this.$ = $$[$0].trim();
|
74 | yy.setAccDescription(this.$);
|
75 | break;
|
76 | case 40:
|
77 | yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]);
|
78 | break;
|
79 | case 41:
|
80 | yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]);
|
81 | break;
|
82 | case 42:
|
83 | this.$ = $$[$0];
|
84 | yy.addNamespace($$[$0]);
|
85 | break;
|
86 | case 43:
|
87 | this.$ = [$$[$0]];
|
88 | break;
|
89 | case 44:
|
90 | this.$ = [$$[$0 - 1]];
|
91 | break;
|
92 | case 45:
|
93 | $$[$0].unshift($$[$0 - 2]);
|
94 | this.$ = $$[$0];
|
95 | break;
|
96 | case 47:
|
97 | yy.setCssClass($$[$0 - 2], $$[$0]);
|
98 | break;
|
99 | case 48:
|
100 | yy.addMembers($$[$0 - 3], $$[$0 - 1]);
|
101 | break;
|
102 | case 49:
|
103 | yy.setCssClass($$[$0 - 5], $$[$0 - 3]);
|
104 | yy.addMembers($$[$0 - 5], $$[$0 - 1]);
|
105 | break;
|
106 | case 50:
|
107 | this.$ = $$[$0];
|
108 | yy.addClass($$[$0]);
|
109 | break;
|
110 | case 51:
|
111 | this.$ = $$[$0 - 1];
|
112 | yy.addClass($$[$0 - 1]);
|
113 | yy.setClassLabel($$[$0 - 1], $$[$0]);
|
114 | break;
|
115 | case 52:
|
116 | yy.addAnnotation($$[$0], $$[$0 - 2]);
|
117 | break;
|
118 | case 53:
|
119 | this.$ = [$$[$0]];
|
120 | break;
|
121 | case 54:
|
122 | $$[$0].push($$[$0 - 1]);
|
123 | this.$ = $$[$0];
|
124 | break;
|
125 | case 55:
|
126 | break;
|
127 | case 56:
|
128 | yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));
|
129 | break;
|
130 | case 57:
|
131 | break;
|
132 | case 58:
|
133 | break;
|
134 | case 59:
|
135 | this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" };
|
136 | break;
|
137 | case 60:
|
138 | this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" };
|
139 | break;
|
140 | case 61:
|
141 | this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] };
|
142 | break;
|
143 | case 62:
|
144 | this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] };
|
145 | break;
|
146 | case 63:
|
147 | yy.addNote($$[$0], $$[$0 - 1]);
|
148 | break;
|
149 | case 64:
|
150 | yy.addNote($$[$0]);
|
151 | break;
|
152 | case 65:
|
153 | this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] };
|
154 | break;
|
155 | case 66:
|
156 | this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] };
|
157 | break;
|
158 | case 67:
|
159 | this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] };
|
160 | break;
|
161 | case 68:
|
162 | this.$ = { type1: "none", type2: "none", lineType: $$[$0] };
|
163 | break;
|
164 | case 69:
|
165 | this.$ = yy.relationType.AGGREGATION;
|
166 | break;
|
167 | case 70:
|
168 | this.$ = yy.relationType.EXTENSION;
|
169 | break;
|
170 | case 71:
|
171 | this.$ = yy.relationType.COMPOSITION;
|
172 | break;
|
173 | case 72:
|
174 | this.$ = yy.relationType.DEPENDENCY;
|
175 | break;
|
176 | case 73:
|
177 | this.$ = yy.relationType.LOLLIPOP;
|
178 | break;
|
179 | case 74:
|
180 | this.$ = yy.lineType.LINE;
|
181 | break;
|
182 | case 75:
|
183 | this.$ = yy.lineType.DOTTED_LINE;
|
184 | break;
|
185 | case 76:
|
186 | case 82:
|
187 | this.$ = $$[$0 - 2];
|
188 | yy.setClickEvent($$[$0 - 1], $$[$0]);
|
189 | break;
|
190 | case 77:
|
191 | case 83:
|
192 | this.$ = $$[$0 - 3];
|
193 | yy.setClickEvent($$[$0 - 2], $$[$0 - 1]);
|
194 | yy.setTooltip($$[$0 - 2], $$[$0]);
|
195 | break;
|
196 | case 78:
|
197 | case 86:
|
198 | this.$ = $$[$0 - 2];
|
199 | yy.setLink($$[$0 - 1], $$[$0]);
|
200 | break;
|
201 | case 79:
|
202 | this.$ = $$[$0 - 3];
|
203 | yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);
|
204 | break;
|
205 | case 80:
|
206 | case 88:
|
207 | this.$ = $$[$0 - 3];
|
208 | yy.setLink($$[$0 - 2], $$[$0 - 1]);
|
209 | yy.setTooltip($$[$0 - 2], $$[$0]);
|
210 | break;
|
211 | case 81:
|
212 | case 89:
|
213 | this.$ = $$[$0 - 4];
|
214 | yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
|
215 | yy.setTooltip($$[$0 - 3], $$[$0 - 1]);
|
216 | break;
|
217 | case 84:
|
218 | this.$ = $$[$0 - 3];
|
219 | yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
|
220 | break;
|
221 | case 85:
|
222 | this.$ = $$[$0 - 4];
|
223 | yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
|
224 | yy.setTooltip($$[$0 - 3], $$[$0]);
|
225 | break;
|
226 | case 87:
|
227 | this.$ = $$[$0 - 3];
|
228 | yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);
|
229 | break;
|
230 | case 90:
|
231 | yy.setCssClass($$[$0 - 1], $$[$0]);
|
232 | break;
|
233 | }
|
234 | },
|
235 | table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: 18, 8: $V0, 9: $V1, 10: $V2, 11: $V3, 12: 5, 13: 6, 19: $V4, 23: $V5, 25: 7, 31: 38, 32: 22, 33: 39, 35: 10, 37: 11, 38: 12, 39: 13, 40: 14, 41: 15, 42: 16, 43: 17, 44: $V6, 46: $V7, 48: $V8, 49: 23, 53: $V9, 54: 24, 57: $Va, 58: $Vb, 60: $Vc, 61: $Vd, 63: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 1: [3] }, { 1: [2, 1] }, { 3: 47, 4: 2, 5: 3, 6: 4, 7: 18, 8: $V0, 9: $V1, 10: $V2, 11: $V3, 12: 5, 13: 6, 19: $V4, 23: $V5, 25: 7, 31: 38, 32: 22, 33: 39, 35: 10, 37: 11, 38: 12, 39: 13, 40: 14, 41: 15, 42: 16, 43: 17, 44: $V6, 46: $V7, 48: $V8, 49: 23, 53: $V9, 54: 24, 57: $Va, 58: $Vb, 60: $Vc, 61: $Vd, 63: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 1: [2, 3] }, { 1: [2, 8] }, { 14: 48, 20: [1, 49] }, o($Vp, [2, 16], { 16: [1, 50] }), { 16: [1, 51] }, { 20: [2, 11] }, o($Vq, [2, 27], { 36: [1, 52] }), o($Vq, [2, 29]), o($Vq, [2, 30]), o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), { 45: [1, 53] }, { 47: [1, 54] }, o($Vq, [2, 39]), o($Vq, [2, 55], { 62: 55, 66: 58, 67: 59, 28: [1, 56], 36: [1, 57], 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }), { 50: [1, 67] }, o($Vy, [2, 46], { 50: [1, 69], 55: [1, 68] }), o($Vq, [2, 57]), o($Vq, [2, 58]), { 31: 70, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, { 31: 38, 32: 71, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 31: 38, 32: 72, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 31: 38, 32: 73, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 28: [1, 74] }, { 31: 38, 32: 75, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 28: $Vz, 64: 76 }, o($Vq, [2, 4]), o($Vq, [2, 5]), o($Vq, [2, 6]), o($Vq, [2, 7]), o($VA, [2, 22], { 31: 38, 33: 39, 32: 78, 34: [1, 79], 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }), o($VA, [2, 23], { 34: [1, 80] }), { 30: 81, 31: 82, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, { 31: 38, 32: 83, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($VB, [2, 104]), o($VB, [2, 105]), o($VB, [2, 106]), o($VB, [2, 107]), o([1, 16, 24, 27, 28, 34, 36, 50, 52, 55, 68, 69, 70, 71, 72, 73, 74, 79, 81], [2, 108]), { 1: [2, 2] }, { 15: 84, 17: [1, 85], 22: $VC }, o([17, 22], [2, 12]), o($Vp, [2, 17], { 25: 7, 35: 10, 37: 11, 38: 12, 39: 13, 40: 14, 41: 15, 42: 16, 43: 17, 7: 18, 32: 22, 49: 23, 54: 24, 31: 38, 33: 39, 6: 87, 8: $V0, 9: $V1, 10: $V2, 11: $V3, 44: $V6, 46: $V7, 48: $V8, 53: $V9, 57: $Va, 58: $Vb, 60: $Vc, 61: $Vd, 63: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }), { 6: 88, 7: 18, 8: $V0, 9: $V1, 10: $V2, 11: $V3, 25: 7, 31: 38, 32: 22, 33: 39, 35: 10, 37: 11, 38: 12, 39: 13, 40: 14, 41: 15, 42: 16, 43: 17, 44: $V6, 46: $V7, 48: $V8, 49: 23, 53: $V9, 54: 24, 57: $Va, 58: $Vb, 60: $Vc, 61: $Vd, 63: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($Vq, [2, 28]), o($Vq, [2, 37]), o($Vq, [2, 38]), { 28: [1, 90], 31: 38, 32: 89, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 62: 91, 66: 58, 67: 59, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }, o($Vq, [2, 56]), { 67: 92, 73: $Vw, 74: $Vx }, o($VD, [2, 68], { 66: 93, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VE, [2, 69]), o($VE, [2, 70]), o($VE, [2, 71]), o($VE, [2, 72]), o($VE, [2, 73]), o($VF, [2, 74]), o($VF, [2, 75]), { 16: [1, 95], 38: 96, 51: 94, 54: 24, 57: $Va }, { 31: 97, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, { 56: 98, 60: $VG }, { 59: [1, 100] }, { 28: [1, 101] }, { 28: [1, 102] }, { 79: [1, 103], 81: [1, 104] }, { 31: 105, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, { 28: $Vz, 64: 106 }, o($Vq, [2, 64]), o($Vq, [2, 109]), o($VA, [2, 24]), o($VA, [2, 25]), o($VA, [2, 26]), { 50: [2, 42] }, { 30: 107, 31: 82, 50: [2, 20], 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, o($VH, [2, 50], { 26: 108, 27: [1, 109] }), { 16: [1, 110] }, { 18: 111, 21: [1, 112] }, { 16: [2, 14] }, o($Vp, [2, 18]), { 24: [1, 113] }, o($VI, [2, 59]), { 31: 38, 32: 114, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 28: [1, 116], 31: 38, 32: 115, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($VD, [2, 67], { 66: 117, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VD, [2, 66]), { 52: [1, 118] }, { 38: 96, 51: 119, 54: 24, 57: $Va }, { 16: [1, 120], 52: [2, 43] }, o($Vy, [2, 47], { 50: [1, 121] }), { 52: [1, 122] }, { 52: [2, 53], 56: 123, 60: $VG }, { 31: 38, 32: 124, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($Vq, [2, 76], { 28: [1, 125] }), o($Vq, [2, 78], { 28: [1, 127], 77: [1, 126] }), o($Vq, [2, 82], { 28: [1, 128], 80: [1, 129] }), o($Vq, [2, 86], { 28: [1, 131], 77: [1, 130] }), o($Vq, [2, 90]), o($Vq, [2, 63]), { 50: [2, 21] }, o($VH, [2, 51]), { 28: [1, 132] }, o($VJ, [2, 9]), { 15: 133, 22: $VC }, { 22: [2, 13] }, { 1: [2, 15] }, o($VI, [2, 61]), o($VI, [2, 60]), { 31: 38, 32: 134, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($VD, [2, 65]), o($Vq, [2, 40]), { 52: [1, 135] }, { 38: 96, 51: 136, 52: [2, 44], 54: 24, 57: $Va }, { 56: 137, 60: $VG }, o($Vy, [2, 48]), { 52: [2, 54] }, o($Vq, [2, 52]), o($Vq, [2, 77]), o($Vq, [2, 79]), o($Vq, [2, 80], { 77: [1, 138] }), o($Vq, [2, 83]), o($Vq, [2, 84], { 28: [1, 139] }), o($Vq, [2, 87]), o($Vq, [2, 88], { 77: [1, 140] }), { 29: [1, 141] }, { 16: [1, 142] }, o($VI, [2, 62]), o($Vq, [2, 41]), { 52: [2, 45] }, { 52: [1, 143] }, o($Vq, [2, 81]), o($Vq, [2, 85]), o($Vq, [2, 89]), o($VH, [2, 19]), o($VJ, [2, 10]), o($Vy, [2, 49])],
|
236 | defaultActions: { 2: [2, 1], 4: [2, 3], 5: [2, 8], 9: [2, 11], 47: [2, 2], 81: [2, 42], 86: [2, 14], 107: [2, 21], 112: [2, 13], 113: [2, 15], 123: [2, 54], 136: [2, 45] },
|
237 | parseError: function parseError(str, hash) {
|
238 | if (hash.recoverable) {
|
239 | this.trace(str);
|
240 | } else {
|
241 | var error = new Error(str);
|
242 | error.hash = hash;
|
243 | throw error;
|
244 | }
|
245 | },
|
246 | parse: function parse(input) {
|
247 | var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
248 | var args = lstack.slice.call(arguments, 1);
|
249 | var lexer2 = Object.create(this.lexer);
|
250 | var sharedState = { yy: {} };
|
251 | for (var k in this.yy) {
|
252 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
253 | sharedState.yy[k] = this.yy[k];
|
254 | }
|
255 | }
|
256 | lexer2.setInput(input, sharedState.yy);
|
257 | sharedState.yy.lexer = lexer2;
|
258 | sharedState.yy.parser = this;
|
259 | if (typeof lexer2.yylloc == "undefined") {
|
260 | lexer2.yylloc = {};
|
261 | }
|
262 | var yyloc = lexer2.yylloc;
|
263 | lstack.push(yyloc);
|
264 | var ranges = lexer2.options && lexer2.options.ranges;
|
265 | if (typeof sharedState.yy.parseError === "function") {
|
266 | this.parseError = sharedState.yy.parseError;
|
267 | } else {
|
268 | this.parseError = Object.getPrototypeOf(this).parseError;
|
269 | }
|
270 | function lex() {
|
271 | var token;
|
272 | token = tstack.pop() || lexer2.lex() || EOF;
|
273 | if (typeof token !== "number") {
|
274 | if (token instanceof Array) {
|
275 | tstack = token;
|
276 | token = tstack.pop();
|
277 | }
|
278 | token = self.symbols_[token] || token;
|
279 | }
|
280 | return token;
|
281 | }
|
282 | var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
283 | while (true) {
|
284 | state = stack[stack.length - 1];
|
285 | if (this.defaultActions[state]) {
|
286 | action = this.defaultActions[state];
|
287 | } else {
|
288 | if (symbol === null || typeof symbol == "undefined") {
|
289 | symbol = lex();
|
290 | }
|
291 | action = table[state] && table[state][symbol];
|
292 | }
|
293 | if (typeof action === "undefined" || !action.length || !action[0]) {
|
294 | var errStr = "";
|
295 | expected = [];
|
296 | for (p in table[state]) {
|
297 | if (this.terminals_[p] && p > TERROR) {
|
298 | expected.push("'" + this.terminals_[p] + "'");
|
299 | }
|
300 | }
|
301 | if (lexer2.showPosition) {
|
302 | errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
303 | } else {
|
304 | errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
305 | }
|
306 | this.parseError(errStr, {
|
307 | text: lexer2.match,
|
308 | token: this.terminals_[symbol] || symbol,
|
309 | line: lexer2.yylineno,
|
310 | loc: yyloc,
|
311 | expected
|
312 | });
|
313 | }
|
314 | if (action[0] instanceof Array && action.length > 1) {
|
315 | throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
316 | }
|
317 | switch (action[0]) {
|
318 | case 1:
|
319 | stack.push(symbol);
|
320 | vstack.push(lexer2.yytext);
|
321 | lstack.push(lexer2.yylloc);
|
322 | stack.push(action[1]);
|
323 | symbol = null;
|
324 | {
|
325 | yyleng = lexer2.yyleng;
|
326 | yytext = lexer2.yytext;
|
327 | yylineno = lexer2.yylineno;
|
328 | yyloc = lexer2.yylloc;
|
329 | }
|
330 | break;
|
331 | case 2:
|
332 | len = this.productions_[action[1]][1];
|
333 | yyval.$ = vstack[vstack.length - len];
|
334 | yyval._$ = {
|
335 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
336 | last_line: lstack[lstack.length - 1].last_line,
|
337 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
338 | last_column: lstack[lstack.length - 1].last_column
|
339 | };
|
340 | if (ranges) {
|
341 | yyval._$.range = [
|
342 | lstack[lstack.length - (len || 1)].range[0],
|
343 | lstack[lstack.length - 1].range[1]
|
344 | ];
|
345 | }
|
346 | r = this.performAction.apply(yyval, [
|
347 | yytext,
|
348 | yyleng,
|
349 | yylineno,
|
350 | sharedState.yy,
|
351 | action[1],
|
352 | vstack,
|
353 | lstack
|
354 | ].concat(args));
|
355 | if (typeof r !== "undefined") {
|
356 | return r;
|
357 | }
|
358 | if (len) {
|
359 | stack = stack.slice(0, -1 * len * 2);
|
360 | vstack = vstack.slice(0, -1 * len);
|
361 | lstack = lstack.slice(0, -1 * len);
|
362 | }
|
363 | stack.push(this.productions_[action[1]][0]);
|
364 | vstack.push(yyval.$);
|
365 | lstack.push(yyval._$);
|
366 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
367 | stack.push(newState);
|
368 | break;
|
369 | case 3:
|
370 | return true;
|
371 | }
|
372 | }
|
373 | return true;
|
374 | }
|
375 | };
|
376 | var lexer = function() {
|
377 | var lexer2 = {
|
378 | EOF: 1,
|
379 | parseError: function parseError(str, hash) {
|
380 | if (this.yy.parser) {
|
381 | this.yy.parser.parseError(str, hash);
|
382 | } else {
|
383 | throw new Error(str);
|
384 | }
|
385 | },
|
386 |
|
387 | setInput: function(input, yy) {
|
388 | this.yy = yy || this.yy || {};
|
389 | this._input = input;
|
390 | this._more = this._backtrack = this.done = false;
|
391 | this.yylineno = this.yyleng = 0;
|
392 | this.yytext = this.matched = this.match = "";
|
393 | this.conditionStack = ["INITIAL"];
|
394 | this.yylloc = {
|
395 | first_line: 1,
|
396 | first_column: 0,
|
397 | last_line: 1,
|
398 | last_column: 0
|
399 | };
|
400 | if (this.options.ranges) {
|
401 | this.yylloc.range = [0, 0];
|
402 | }
|
403 | this.offset = 0;
|
404 | return this;
|
405 | },
|
406 |
|
407 | input: function() {
|
408 | var ch = this._input[0];
|
409 | this.yytext += ch;
|
410 | this.yyleng++;
|
411 | this.offset++;
|
412 | this.match += ch;
|
413 | this.matched += ch;
|
414 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
415 | if (lines) {
|
416 | this.yylineno++;
|
417 | this.yylloc.last_line++;
|
418 | } else {
|
419 | this.yylloc.last_column++;
|
420 | }
|
421 | if (this.options.ranges) {
|
422 | this.yylloc.range[1]++;
|
423 | }
|
424 | this._input = this._input.slice(1);
|
425 | return ch;
|
426 | },
|
427 |
|
428 | unput: function(ch) {
|
429 | var len = ch.length;
|
430 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
431 | this._input = ch + this._input;
|
432 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
433 | this.offset -= len;
|
434 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
435 | this.match = this.match.substr(0, this.match.length - 1);
|
436 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
437 | if (lines.length - 1) {
|
438 | this.yylineno -= lines.length - 1;
|
439 | }
|
440 | var r = this.yylloc.range;
|
441 | this.yylloc = {
|
442 | first_line: this.yylloc.first_line,
|
443 | last_line: this.yylineno + 1,
|
444 | first_column: this.yylloc.first_column,
|
445 | 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
|
446 | };
|
447 | if (this.options.ranges) {
|
448 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
449 | }
|
450 | this.yyleng = this.yytext.length;
|
451 | return this;
|
452 | },
|
453 |
|
454 | more: function() {
|
455 | this._more = true;
|
456 | return this;
|
457 | },
|
458 |
|
459 | reject: function() {
|
460 | if (this.options.backtrack_lexer) {
|
461 | this._backtrack = true;
|
462 | } else {
|
463 | 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(), {
|
464 | text: "",
|
465 | token: null,
|
466 | line: this.yylineno
|
467 | });
|
468 | }
|
469 | return this;
|
470 | },
|
471 |
|
472 | less: function(n) {
|
473 | this.unput(this.match.slice(n));
|
474 | },
|
475 |
|
476 | pastInput: function() {
|
477 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
478 | return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
479 | },
|
480 |
|
481 | upcomingInput: function() {
|
482 | var next = this.match;
|
483 | if (next.length < 20) {
|
484 | next += this._input.substr(0, 20 - next.length);
|
485 | }
|
486 | return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
487 | },
|
488 |
|
489 | showPosition: function() {
|
490 | var pre = this.pastInput();
|
491 | var c = new Array(pre.length + 1).join("-");
|
492 | return pre + this.upcomingInput() + "\n" + c + "^";
|
493 | },
|
494 |
|
495 | test_match: function(match, indexed_rule) {
|
496 | var token, lines, backup;
|
497 | if (this.options.backtrack_lexer) {
|
498 | backup = {
|
499 | yylineno: this.yylineno,
|
500 | yylloc: {
|
501 | first_line: this.yylloc.first_line,
|
502 | last_line: this.last_line,
|
503 | first_column: this.yylloc.first_column,
|
504 | last_column: this.yylloc.last_column
|
505 | },
|
506 | yytext: this.yytext,
|
507 | match: this.match,
|
508 | matches: this.matches,
|
509 | matched: this.matched,
|
510 | yyleng: this.yyleng,
|
511 | offset: this.offset,
|
512 | _more: this._more,
|
513 | _input: this._input,
|
514 | yy: this.yy,
|
515 | conditionStack: this.conditionStack.slice(0),
|
516 | done: this.done
|
517 | };
|
518 | if (this.options.ranges) {
|
519 | backup.yylloc.range = this.yylloc.range.slice(0);
|
520 | }
|
521 | }
|
522 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
523 | if (lines) {
|
524 | this.yylineno += lines.length;
|
525 | }
|
526 | this.yylloc = {
|
527 | first_line: this.yylloc.last_line,
|
528 | last_line: this.yylineno + 1,
|
529 | first_column: this.yylloc.last_column,
|
530 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
531 | };
|
532 | this.yytext += match[0];
|
533 | this.match += match[0];
|
534 | this.matches = match;
|
535 | this.yyleng = this.yytext.length;
|
536 | if (this.options.ranges) {
|
537 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
538 | }
|
539 | this._more = false;
|
540 | this._backtrack = false;
|
541 | this._input = this._input.slice(match[0].length);
|
542 | this.matched += match[0];
|
543 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
544 | if (this.done && this._input) {
|
545 | this.done = false;
|
546 | }
|
547 | if (token) {
|
548 | return token;
|
549 | } else if (this._backtrack) {
|
550 | for (var k in backup) {
|
551 | this[k] = backup[k];
|
552 | }
|
553 | return false;
|
554 | }
|
555 | return false;
|
556 | },
|
557 |
|
558 | next: function() {
|
559 | if (this.done) {
|
560 | return this.EOF;
|
561 | }
|
562 | if (!this._input) {
|
563 | this.done = true;
|
564 | }
|
565 | var token, match, tempMatch, index;
|
566 | if (!this._more) {
|
567 | this.yytext = "";
|
568 | this.match = "";
|
569 | }
|
570 | var rules = this._currentRules();
|
571 | for (var i = 0; i < rules.length; i++) {
|
572 | tempMatch = this._input.match(this.rules[rules[i]]);
|
573 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
574 | match = tempMatch;
|
575 | index = i;
|
576 | if (this.options.backtrack_lexer) {
|
577 | token = this.test_match(tempMatch, rules[i]);
|
578 | if (token !== false) {
|
579 | return token;
|
580 | } else if (this._backtrack) {
|
581 | match = false;
|
582 | continue;
|
583 | } else {
|
584 | return false;
|
585 | }
|
586 | } else if (!this.options.flex) {
|
587 | break;
|
588 | }
|
589 | }
|
590 | }
|
591 | if (match) {
|
592 | token = this.test_match(match, rules[index]);
|
593 | if (token !== false) {
|
594 | return token;
|
595 | }
|
596 | return false;
|
597 | }
|
598 | if (this._input === "") {
|
599 | return this.EOF;
|
600 | } else {
|
601 | return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
602 | text: "",
|
603 | token: null,
|
604 | line: this.yylineno
|
605 | });
|
606 | }
|
607 | },
|
608 |
|
609 | lex: function lex() {
|
610 | var r = this.next();
|
611 | if (r) {
|
612 | return r;
|
613 | } else {
|
614 | return this.lex();
|
615 | }
|
616 | },
|
617 |
|
618 | begin: function begin(condition) {
|
619 | this.conditionStack.push(condition);
|
620 | },
|
621 |
|
622 | popState: function popState() {
|
623 | var n = this.conditionStack.length - 1;
|
624 | if (n > 0) {
|
625 | return this.conditionStack.pop();
|
626 | } else {
|
627 | return this.conditionStack[0];
|
628 | }
|
629 | },
|
630 |
|
631 | _currentRules: function _currentRules() {
|
632 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
633 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
634 | } else {
|
635 | return this.conditions["INITIAL"].rules;
|
636 | }
|
637 | },
|
638 |
|
639 | topState: function topState(n) {
|
640 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
641 | if (n >= 0) {
|
642 | return this.conditionStack[n];
|
643 | } else {
|
644 | return "INITIAL";
|
645 | }
|
646 | },
|
647 |
|
648 | pushState: function pushState(condition) {
|
649 | this.begin(condition);
|
650 | },
|
651 |
|
652 | stateStackSize: function stateStackSize() {
|
653 | return this.conditionStack.length;
|
654 | },
|
655 | options: {},
|
656 | performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
657 | switch ($avoiding_name_collisions) {
|
658 | case 0:
|
659 | this.begin("open_directive");
|
660 | return 19;
|
661 | case 1:
|
662 | return 8;
|
663 | case 2:
|
664 | return 9;
|
665 | case 3:
|
666 | return 10;
|
667 | case 4:
|
668 | return 11;
|
669 | case 5:
|
670 | this.begin("type_directive");
|
671 | return 20;
|
672 | case 6:
|
673 | this.popState();
|
674 | this.begin("arg_directive");
|
675 | return 17;
|
676 | case 7:
|
677 | this.popState();
|
678 | this.popState();
|
679 | return 22;
|
680 | case 8:
|
681 | return 21;
|
682 | case 9:
|
683 | break;
|
684 | case 10:
|
685 | break;
|
686 | case 11:
|
687 | this.begin("acc_title");
|
688 | return 44;
|
689 | case 12:
|
690 | this.popState();
|
691 | return "acc_title_value";
|
692 | case 13:
|
693 | this.begin("acc_descr");
|
694 | return 46;
|
695 | case 14:
|
696 | this.popState();
|
697 | return "acc_descr_value";
|
698 | case 15:
|
699 | this.begin("acc_descr_multiline");
|
700 | break;
|
701 | case 16:
|
702 | this.popState();
|
703 | break;
|
704 | case 17:
|
705 | return "acc_descr_multiline_value";
|
706 | case 18:
|
707 | return 16;
|
708 | case 19:
|
709 | break;
|
710 | case 20:
|
711 | return 23;
|
712 | case 21:
|
713 | return 23;
|
714 | case 22:
|
715 | return "EDGE_STATE";
|
716 | case 23:
|
717 | this.begin("namespace");
|
718 | return 53;
|
719 | case 24:
|
720 | this.popState();
|
721 | return 16;
|
722 | case 25:
|
723 | break;
|
724 | case 26:
|
725 | this.begin("namespace-body");
|
726 | return 50;
|
727 | case 27:
|
728 | this.popState();
|
729 | return 52;
|
730 | case 28:
|
731 | return "EOF_IN_STRUCT";
|
732 | case 29:
|
733 | return 16;
|
734 | case 30:
|
735 | break;
|
736 | case 31:
|
737 | return "EDGE_STATE";
|
738 | case 32:
|
739 | this.begin("class");
|
740 | return 57;
|
741 | case 33:
|
742 | this.popState();
|
743 | return 16;
|
744 | case 34:
|
745 | break;
|
746 | case 35:
|
747 | this.popState();
|
748 | this.popState();
|
749 | return 52;
|
750 | case 36:
|
751 | this.begin("class-body");
|
752 | return 50;
|
753 | case 37:
|
754 | this.popState();
|
755 | return 52;
|
756 | case 38:
|
757 | return "EOF_IN_STRUCT";
|
758 | case 39:
|
759 | return "EDGE_STATE";
|
760 | case 40:
|
761 | return "OPEN_IN_STRUCT";
|
762 | case 41:
|
763 | break;
|
764 | case 42:
|
765 | return "MEMBER";
|
766 | case 43:
|
767 | return 82;
|
768 | case 44:
|
769 | return 75;
|
770 | case 45:
|
771 | return 76;
|
772 | case 46:
|
773 | return 78;
|
774 | case 47:
|
775 | return 63;
|
776 | case 48:
|
777 | return 65;
|
778 | case 49:
|
779 | return 58;
|
780 | case 50:
|
781 | return 59;
|
782 | case 51:
|
783 | this.begin("href");
|
784 | break;
|
785 | case 52:
|
786 | this.popState();
|
787 | break;
|
788 | case 53:
|
789 | return 81;
|
790 | case 54:
|
791 | this.begin("callback_name");
|
792 | break;
|
793 | case 55:
|
794 | this.popState();
|
795 | break;
|
796 | case 56:
|
797 | this.popState();
|
798 | this.begin("callback_args");
|
799 | break;
|
800 | case 57:
|
801 | return 79;
|
802 | case 58:
|
803 | this.popState();
|
804 | break;
|
805 | case 59:
|
806 | return 80;
|
807 | case 60:
|
808 | this.popState();
|
809 | break;
|
810 | case 61:
|
811 | return "GENERICTYPE";
|
812 | case 62:
|
813 | this.begin("generic");
|
814 | break;
|
815 | case 63:
|
816 | this.popState();
|
817 | break;
|
818 | case 64:
|
819 | return "STR";
|
820 | case 65:
|
821 | this.begin("string");
|
822 | break;
|
823 | case 66:
|
824 | this.popState();
|
825 | break;
|
826 | case 67:
|
827 | return "BQUOTE_STR";
|
828 | case 68:
|
829 | this.begin("bqstring");
|
830 | break;
|
831 | case 69:
|
832 | return 77;
|
833 | case 70:
|
834 | return 77;
|
835 | case 71:
|
836 | return 77;
|
837 | case 72:
|
838 | return 77;
|
839 | case 73:
|
840 | return 69;
|
841 | case 74:
|
842 | return 69;
|
843 | case 75:
|
844 | return 71;
|
845 | case 76:
|
846 | return 71;
|
847 | case 77:
|
848 | return 70;
|
849 | case 78:
|
850 | return 68;
|
851 | case 79:
|
852 | return 72;
|
853 | case 80:
|
854 | return 73;
|
855 | case 81:
|
856 | return 74;
|
857 | case 82:
|
858 | return 36;
|
859 | case 83:
|
860 | return 55;
|
861 | case 84:
|
862 | return 94;
|
863 | case 85:
|
864 | return "DOT";
|
865 | case 86:
|
866 | return "PLUS";
|
867 | case 87:
|
868 | return 91;
|
869 | case 88:
|
870 | return "EQUALS";
|
871 | case 89:
|
872 | return "EQUALS";
|
873 | case 90:
|
874 | return 98;
|
875 | case 91:
|
876 | return 27;
|
877 | case 92:
|
878 | return 29;
|
879 | case 93:
|
880 | return "PUNCTUATION";
|
881 | case 94:
|
882 | return 97;
|
883 | case 95:
|
884 | return 96;
|
885 | case 96:
|
886 | return 93;
|
887 | case 97:
|
888 | return 24;
|
889 | }
|
890 | },
|
891 | rules: [/^(?:%%\{)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href[\s]+["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:[~])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-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])/, /^(?:\s)/, /^(?:$)/],
|
892 | conditions: { "namespace-body": { "rules": [27, 28, 29, 30, 31, 32, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "namespace": { "rules": [23, 24, 25, 26, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "class-body": { "rules": [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "class": { "rules": [33, 34, 35, 36, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "acc_descr_multiline": { "rules": [16, 17, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "acc_descr": { "rules": [14, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "acc_title": { "rules": [12, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "arg_directive": { "rules": [7, 8, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "type_directive": { "rules": [6, 7, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "open_directive": { "rules": [5, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "callback_args": { "rules": [43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 58, 59, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "callback_name": { "rules": [43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "href": { "rules": [43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "struct": { "rules": [43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "generic": { "rules": [43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 60, 61, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "bqstring": { "rules": [43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "string": { "rules": [43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 63, 64, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 9, 10, 11, 13, 15, 18, 19, 20, 21, 22, 23, 32, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": true } }
|
893 | };
|
894 | return lexer2;
|
895 | }();
|
896 | parser2.lexer = lexer;
|
897 | function Parser() {
|
898 | this.yy = {};
|
899 | }
|
900 | Parser.prototype = parser2;
|
901 | parser2.Parser = Parser;
|
902 | return new Parser();
|
903 | }();
|
904 | parser.parser = parser;
|
905 | const parser$1 = parser;
|
906 | const MERMAID_DOM_ID_PREFIX = "classId-";
|
907 | let relations = [];
|
908 | let classes = {};
|
909 | let notes = [];
|
910 | let classCounter = 0;
|
911 | let namespaces = {};
|
912 | let namespaceCounter = 0;
|
913 | let functions = [];
|
914 | const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
|
915 | const parseDirective = function(statement, context, type) {
|
916 | mermaidAPI.parseDirective(this, statement, context, type);
|
917 | };
|
918 | const splitClassNameAndType = function(id) {
|
919 | let genericType = "";
|
920 | let className = id;
|
921 | if (id.indexOf("~") > 0) {
|
922 | const split = id.split("~");
|
923 | className = sanitizeText(split[0]);
|
924 | genericType = sanitizeText(split[1]);
|
925 | }
|
926 | return { className, type: genericType };
|
927 | };
|
928 | const setClassLabel = function(id, label) {
|
929 | if (label) {
|
930 | label = sanitizeText(label);
|
931 | }
|
932 | const { className } = splitClassNameAndType(id);
|
933 | classes[className].label = label;
|
934 | };
|
935 | const addClass = function(id) {
|
936 | const classId = splitClassNameAndType(id);
|
937 | if (classes[classId.className] !== void 0) {
|
938 | return;
|
939 | }
|
940 | classes[classId.className] = {
|
941 | id: classId.className,
|
942 | type: classId.type,
|
943 | label: classId.className,
|
944 | cssClasses: [],
|
945 | methods: [],
|
946 | members: [],
|
947 | annotations: [],
|
948 | domId: MERMAID_DOM_ID_PREFIX + classId.className + "-" + classCounter
|
949 | };
|
950 | classCounter++;
|
951 | };
|
952 | const lookUpDomId = function(id) {
|
953 | if (id in classes) {
|
954 | return classes[id].domId;
|
955 | }
|
956 | throw new Error("Class not found: " + id);
|
957 | };
|
958 | const clear = function() {
|
959 | relations = [];
|
960 | classes = {};
|
961 | notes = [];
|
962 | functions = [];
|
963 | functions.push(setupToolTips);
|
964 | namespaces = {};
|
965 | namespaceCounter = 0;
|
966 | clear$1();
|
967 | };
|
968 | const getClass = function(id) {
|
969 | return classes[id];
|
970 | };
|
971 | const getClasses = function() {
|
972 | return classes;
|
973 | };
|
974 | const getRelations = function() {
|
975 | return relations;
|
976 | };
|
977 | const getNotes = function() {
|
978 | return notes;
|
979 | };
|
980 | const addRelation = function(relation) {
|
981 | log.debug("Adding relation: " + JSON.stringify(relation));
|
982 | addClass(relation.id1);
|
983 | addClass(relation.id2);
|
984 | relation.id1 = splitClassNameAndType(relation.id1).className;
|
985 | relation.id2 = splitClassNameAndType(relation.id2).className;
|
986 | relation.relationTitle1 = common.sanitizeText(
|
987 | relation.relationTitle1.trim(),
|
988 | getConfig()
|
989 | );
|
990 | relation.relationTitle2 = common.sanitizeText(
|
991 | relation.relationTitle2.trim(),
|
992 | getConfig()
|
993 | );
|
994 | relations.push(relation);
|
995 | };
|
996 | const addAnnotation = function(className, annotation) {
|
997 | const validatedClassName = splitClassNameAndType(className).className;
|
998 | classes[validatedClassName].annotations.push(annotation);
|
999 | };
|
1000 | const addMember = function(className, member) {
|
1001 | const validatedClassName = splitClassNameAndType(className).className;
|
1002 | const theClass = classes[validatedClassName];
|
1003 | if (typeof member === "string") {
|
1004 | const memberString = member.trim();
|
1005 | if (memberString.startsWith("<<") && memberString.endsWith(">>")) {
|
1006 | theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2)));
|
1007 | } else if (memberString.indexOf(")") > 0) {
|
1008 | theClass.methods.push(sanitizeText(memberString));
|
1009 | } else if (memberString) {
|
1010 | theClass.members.push(sanitizeText(memberString));
|
1011 | }
|
1012 | }
|
1013 | };
|
1014 | const addMembers = function(className, members) {
|
1015 | if (Array.isArray(members)) {
|
1016 | members.reverse();
|
1017 | members.forEach((member) => addMember(className, member));
|
1018 | }
|
1019 | };
|
1020 | const addNote = function(text, className) {
|
1021 | const note = {
|
1022 | id: `note${notes.length}`,
|
1023 | class: className,
|
1024 | text
|
1025 | };
|
1026 | notes.push(note);
|
1027 | };
|
1028 | const cleanupLabel = function(label) {
|
1029 | if (label.startsWith(":")) {
|
1030 | label = label.substring(1);
|
1031 | }
|
1032 | return sanitizeText(label.trim());
|
1033 | };
|
1034 | const setCssClass = function(ids, className) {
|
1035 | ids.split(",").forEach(function(_id) {
|
1036 | let id = _id;
|
1037 | if (_id[0].match(/\d/)) {
|
1038 | id = MERMAID_DOM_ID_PREFIX + id;
|
1039 | }
|
1040 | if (classes[id] !== void 0) {
|
1041 | classes[id].cssClasses.push(className);
|
1042 | }
|
1043 | });
|
1044 | };
|
1045 | const setTooltip = function(ids, tooltip) {
|
1046 | ids.split(",").forEach(function(id) {
|
1047 | if (tooltip !== void 0) {
|
1048 | classes[id].tooltip = sanitizeText(tooltip);
|
1049 | }
|
1050 | });
|
1051 | };
|
1052 | const getTooltip = function(id, namespace) {
|
1053 | if (namespace) {
|
1054 | return namespaces[namespace].classes[id].tooltip;
|
1055 | }
|
1056 | return classes[id].tooltip;
|
1057 | };
|
1058 | const setLink = function(ids, linkStr, target) {
|
1059 | const config = getConfig();
|
1060 | ids.split(",").forEach(function(_id) {
|
1061 | let id = _id;
|
1062 | if (_id[0].match(/\d/)) {
|
1063 | id = MERMAID_DOM_ID_PREFIX + id;
|
1064 | }
|
1065 | if (classes[id] !== void 0) {
|
1066 | classes[id].link = utils.formatUrl(linkStr, config);
|
1067 | if (config.securityLevel === "sandbox") {
|
1068 | classes[id].linkTarget = "_top";
|
1069 | } else if (typeof target === "string") {
|
1070 | classes[id].linkTarget = sanitizeText(target);
|
1071 | } else {
|
1072 | classes[id].linkTarget = "_blank";
|
1073 | }
|
1074 | }
|
1075 | });
|
1076 | setCssClass(ids, "clickable");
|
1077 | };
|
1078 | const setClickEvent = function(ids, functionName, functionArgs) {
|
1079 | ids.split(",").forEach(function(id) {
|
1080 | setClickFunc(id, functionName, functionArgs);
|
1081 | classes[id].haveCallback = true;
|
1082 | });
|
1083 | setCssClass(ids, "clickable");
|
1084 | };
|
1085 | const setClickFunc = function(domId, functionName, functionArgs) {
|
1086 | const config = getConfig();
|
1087 | if (config.securityLevel !== "loose") {
|
1088 | return;
|
1089 | }
|
1090 | if (functionName === void 0) {
|
1091 | return;
|
1092 | }
|
1093 | const id = domId;
|
1094 | if (classes[id] !== void 0) {
|
1095 | const elemId = lookUpDomId(id);
|
1096 | let argList = [];
|
1097 | if (typeof functionArgs === "string") {
|
1098 | argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
1099 | for (let i = 0; i < argList.length; i++) {
|
1100 | let item = argList[i].trim();
|
1101 | if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
|
1102 | item = item.substr(1, item.length - 2);
|
1103 | }
|
1104 | argList[i] = item;
|
1105 | }
|
1106 | }
|
1107 | if (argList.length === 0) {
|
1108 | argList.push(elemId);
|
1109 | }
|
1110 | functions.push(function() {
|
1111 | const elem = document.querySelector(`[id="${elemId}"]`);
|
1112 | if (elem !== null) {
|
1113 | elem.addEventListener(
|
1114 | "click",
|
1115 | function() {
|
1116 | utils.runFunc(functionName, ...argList);
|
1117 | },
|
1118 | false
|
1119 | );
|
1120 | }
|
1121 | });
|
1122 | }
|
1123 | };
|
1124 | const bindFunctions = function(element) {
|
1125 | functions.forEach(function(fun) {
|
1126 | fun(element);
|
1127 | });
|
1128 | };
|
1129 | const lineType = {
|
1130 | LINE: 0,
|
1131 | DOTTED_LINE: 1
|
1132 | };
|
1133 | const relationType = {
|
1134 | AGGREGATION: 0,
|
1135 | EXTENSION: 1,
|
1136 | COMPOSITION: 2,
|
1137 | DEPENDENCY: 3,
|
1138 | LOLLIPOP: 4
|
1139 | };
|
1140 | const setupToolTips = function(element) {
|
1141 | let tooltipElem = select(".mermaidTooltip");
|
1142 | if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
|
1143 | tooltipElem = select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0);
|
1144 | }
|
1145 | const svg = select(element).select("svg");
|
1146 | const nodes = svg.selectAll("g.node");
|
1147 | nodes.on("mouseover", function() {
|
1148 | const el = select(this);
|
1149 | const title = el.attr("title");
|
1150 | if (title === null) {
|
1151 | return;
|
1152 | }
|
1153 | const rect = this.getBoundingClientRect();
|
1154 | tooltipElem.transition().duration(200).style("opacity", ".9");
|
1155 | tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px");
|
1156 | tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "<br/>"));
|
1157 | el.classed("hover", true);
|
1158 | }).on("mouseout", function() {
|
1159 | tooltipElem.transition().duration(500).style("opacity", 0);
|
1160 | const el = select(this);
|
1161 | el.classed("hover", false);
|
1162 | });
|
1163 | };
|
1164 | functions.push(setupToolTips);
|
1165 | let direction = "TB";
|
1166 | const getDirection = () => direction;
|
1167 | const setDirection = (dir) => {
|
1168 | direction = dir;
|
1169 | };
|
1170 | const addNamespace = function(id) {
|
1171 | if (namespaces[id] !== void 0) {
|
1172 | return;
|
1173 | }
|
1174 | namespaces[id] = {
|
1175 | id,
|
1176 | classes: {},
|
1177 | children: {},
|
1178 | domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter
|
1179 | };
|
1180 | namespaceCounter++;
|
1181 | };
|
1182 | const getNamespace = function(name) {
|
1183 | return namespaces[name];
|
1184 | };
|
1185 | const getNamespaces = function() {
|
1186 | return namespaces;
|
1187 | };
|
1188 | const addClassesToNamespace = function(id, classNames) {
|
1189 | if (namespaces[id] !== void 0) {
|
1190 | classNames.map((className) => {
|
1191 | namespaces[id].classes[className] = classes[className];
|
1192 | delete classes[className];
|
1193 | classCounter--;
|
1194 | });
|
1195 | }
|
1196 | };
|
1197 | const db = {
|
1198 | parseDirective,
|
1199 | setAccTitle,
|
1200 | getAccTitle,
|
1201 | getAccDescription,
|
1202 | setAccDescription,
|
1203 | getConfig: () => getConfig().class,
|
1204 | addClass,
|
1205 | bindFunctions,
|
1206 | clear,
|
1207 | getClass,
|
1208 | getClasses,
|
1209 | getNotes,
|
1210 | addAnnotation,
|
1211 | addNote,
|
1212 | getRelations,
|
1213 | addRelation,
|
1214 | getDirection,
|
1215 | setDirection,
|
1216 | addMember,
|
1217 | addMembers,
|
1218 | cleanupLabel,
|
1219 | lineType,
|
1220 | relationType,
|
1221 | setClickEvent,
|
1222 | setCssClass,
|
1223 | setLink,
|
1224 | getTooltip,
|
1225 | setTooltip,
|
1226 | lookUpDomId,
|
1227 | setDiagramTitle,
|
1228 | getDiagramTitle,
|
1229 | setClassLabel,
|
1230 | addNamespace,
|
1231 | addClassesToNamespace,
|
1232 | getNamespace,
|
1233 | getNamespaces
|
1234 | };
|
1235 | const getStyles = (options) => `g.classGroup text {
|
1236 | fill: ${options.nodeBorder};
|
1237 | fill: ${options.classText};
|
1238 | stroke: none;
|
1239 | font-family: ${options.fontFamily};
|
1240 | font-size: 10px;
|
1241 |
|
1242 | .title {
|
1243 | font-weight: bolder;
|
1244 | }
|
1245 |
|
1246 | }
|
1247 |
|
1248 | .nodeLabel, .edgeLabel {
|
1249 | color: ${options.classText};
|
1250 | }
|
1251 | .edgeLabel .label rect {
|
1252 | fill: ${options.mainBkg};
|
1253 | }
|
1254 | .label text {
|
1255 | fill: ${options.classText};
|
1256 | }
|
1257 | .edgeLabel .label span {
|
1258 | background: ${options.mainBkg};
|
1259 | }
|
1260 |
|
1261 | .classTitle {
|
1262 | font-weight: bolder;
|
1263 | }
|
1264 | .node rect,
|
1265 | .node circle,
|
1266 | .node ellipse,
|
1267 | .node polygon,
|
1268 | .node path {
|
1269 | fill: ${options.mainBkg};
|
1270 | stroke: ${options.nodeBorder};
|
1271 | stroke-width: 1px;
|
1272 | }
|
1273 |
|
1274 |
|
1275 | .divider {
|
1276 | stroke: ${options.nodeBorder};
|
1277 | stroke-width: 1;
|
1278 | }
|
1279 |
|
1280 | g.clickable {
|
1281 | cursor: pointer;
|
1282 | }
|
1283 |
|
1284 | g.classGroup rect {
|
1285 | fill: ${options.mainBkg};
|
1286 | stroke: ${options.nodeBorder};
|
1287 | }
|
1288 |
|
1289 | g.classGroup line {
|
1290 | stroke: ${options.nodeBorder};
|
1291 | stroke-width: 1;
|
1292 | }
|
1293 |
|
1294 | .classLabel .box {
|
1295 | stroke: none;
|
1296 | stroke-width: 0;
|
1297 | fill: ${options.mainBkg};
|
1298 | opacity: 0.5;
|
1299 | }
|
1300 |
|
1301 | .classLabel .label {
|
1302 | fill: ${options.nodeBorder};
|
1303 | font-size: 10px;
|
1304 | }
|
1305 |
|
1306 | .relation {
|
1307 | stroke: ${options.lineColor};
|
1308 | stroke-width: 1;
|
1309 | fill: none;
|
1310 | }
|
1311 |
|
1312 | .dashed-line{
|
1313 | stroke-dasharray: 3;
|
1314 | }
|
1315 |
|
1316 | .dotted-line{
|
1317 | stroke-dasharray: 1 2;
|
1318 | }
|
1319 |
|
1320 | #compositionStart, .composition {
|
1321 | fill: ${options.lineColor} !important;
|
1322 | stroke: ${options.lineColor} !important;
|
1323 | stroke-width: 1;
|
1324 | }
|
1325 |
|
1326 | #compositionEnd, .composition {
|
1327 | fill: ${options.lineColor} !important;
|
1328 | stroke: ${options.lineColor} !important;
|
1329 | stroke-width: 1;
|
1330 | }
|
1331 |
|
1332 | #dependencyStart, .dependency {
|
1333 | fill: ${options.lineColor} !important;
|
1334 | stroke: ${options.lineColor} !important;
|
1335 | stroke-width: 1;
|
1336 | }
|
1337 |
|
1338 | #dependencyStart, .dependency {
|
1339 | fill: ${options.lineColor} !important;
|
1340 | stroke: ${options.lineColor} !important;
|
1341 | stroke-width: 1;
|
1342 | }
|
1343 |
|
1344 | #extensionStart, .extension {
|
1345 | fill: ${options.mainBkg} !important;
|
1346 | stroke: ${options.lineColor} !important;
|
1347 | stroke-width: 1;
|
1348 | }
|
1349 |
|
1350 | #extensionEnd, .extension {
|
1351 | fill: ${options.mainBkg} !important;
|
1352 | stroke: ${options.lineColor} !important;
|
1353 | stroke-width: 1;
|
1354 | }
|
1355 |
|
1356 | #aggregationStart, .aggregation {
|
1357 | fill: ${options.mainBkg} !important;
|
1358 | stroke: ${options.lineColor} !important;
|
1359 | stroke-width: 1;
|
1360 | }
|
1361 |
|
1362 | #aggregationEnd, .aggregation {
|
1363 | fill: ${options.mainBkg} !important;
|
1364 | stroke: ${options.lineColor} !important;
|
1365 | stroke-width: 1;
|
1366 | }
|
1367 |
|
1368 | #lollipopStart, .lollipop {
|
1369 | fill: ${options.mainBkg} !important;
|
1370 | stroke: ${options.lineColor} !important;
|
1371 | stroke-width: 1;
|
1372 | }
|
1373 |
|
1374 | #lollipopEnd, .lollipop {
|
1375 | fill: ${options.mainBkg} !important;
|
1376 | stroke: ${options.lineColor} !important;
|
1377 | stroke-width: 1;
|
1378 | }
|
1379 |
|
1380 | .edgeTerminals {
|
1381 | font-size: 11px;
|
1382 | }
|
1383 |
|
1384 | .classTitleText {
|
1385 | text-anchor: middle;
|
1386 | font-size: 18px;
|
1387 | fill: ${options.textColor};
|
1388 | }
|
1389 | `;
|
1390 | const styles = getStyles;
|
1391 | export {
|
1392 | db as d,
|
1393 | parser$1 as p,
|
1394 | styles as s
|
1395 | };
|