@sourcegraph/amp 0.0.1749571294-gef5aa3 → 0.0.1749600114-g5c00b8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amp.js +3 -3
- package/dist/architectureDiagram-RWNHDUBN-1v8WgxdD.js +4635 -0
- package/dist/blockDiagram-XZSR5OGQ-XFBYN-jB.js +2243 -0
- package/dist/c4Diagram-6R2MQUNL-B0L0pltn.js +1587 -0
- package/dist/chunk-COUQ6RZ3-qd4eG6tc.js +17852 -0
- package/dist/chunk-CRQPXCKQ-yjI467Bq.js +65 -0
- package/dist/chunk-EFPBJHX4-DdHmqd0M.js +1378 -0
- package/dist/chunk-EOAU2GW5-CpRNAcjo.js +253 -0
- package/dist/chunk-IHYUGLNO-DJcRQIf7.js +1365 -0
- package/dist/chunk-K2ZEYYM2-CbqHhUqy.js +9 -0
- package/dist/chunk-Q7VUVKE6-gBSSbdjU.js +24 -0
- package/dist/chunk-T2M37SMK-Br8mK30k.js +1411 -0
- package/dist/chunk-TGZYFRKZ-BYBLXoJz.js +1331 -0
- package/dist/chunk-YJGJQOYZ-BGiSkWF0.js +19 -0
- package/dist/classDiagram-LB37KKQG-DhFsEyDS.js +17 -0
- package/dist/classDiagram-v2-KFQJBC22-DhFsEyDS.js +17 -0
- package/dist/{client-C1WG2nEf.js → client-D-YAg8x6.js} +6 -6
- package/dist/{console-DK0gDzNQ.js → console-CoE5Qzyz.js} +41106 -22971
- package/dist/create_file.node-Co0Uh1F3.js +21 -0
- package/dist/dagre-CMTPJJKG-UDPzd9Iy.js +446 -0
- package/dist/diagram-BIPOGRU5-B7TV59-n.js +128 -0
- package/dist/diagram-YF4VECWA-LsAZsciQ.js +219 -0
- package/dist/{edit_file.node-BH524GkF.js → edit_file.node-CmTZeBc2.js} +11 -11
- package/dist/erDiagram-AK44R45H-BWpeEu7D.js +843 -0
- package/dist/{executable-5cBRGrsC.js → executable-BE7tfoX5.js} +1 -1
- package/dist/{files-CybxYgbE.js → files-DqpRf5q4.js} +10 -10
- package/dist/flowDiagram-XARHJDSH-DzpV02UB.js +1618 -0
- package/dist/ganttDiagram-H5QQZTZ5-C0BhJTzn.js +1605 -0
- package/dist/gitGraphDiagram-XHLTLO3W-0EiOmv44.js +701 -0
- package/dist/{glob.node-C6HbLuPt.js → glob.node-DNei8bFS.js} +11 -11
- package/dist/{index-C2wo7rRZ.js → index-BcjxaWOc.js} +31 -31
- package/dist/infoDiagram-TP2HPDHO-CQX5a0Fc.js +24 -0
- package/dist/journeyDiagram-VHRN44N3-C82dEe4G.js +809 -0
- package/dist/kanban-definition-K5J3OUUV-xilJcrom.js +718 -0
- package/dist/katex-5N2NCDMP-CAsrnb6_.js +11703 -0
- package/dist/{list_directory.node-ZQscizpi.js → list_directory.node-CMiNNbXP.js} +1 -1
- package/dist/{load-profile-BbmyxO_7.js → load-profile-Cg8XaTx6.js} +1 -1
- package/dist/{main-BVP_XL7v.js → main-Dy2VZM_S.js} +15 -15
- package/dist/mindmap-definition-TI5ONXTW-BNaRba4R.js +3221 -0
- package/dist/{node-DvmQAW7h.js → node-BtG1o_DD.js} +2 -2
- package/dist/{node-syWQvN9a.js → node-BulbxvrV.js} +58 -58
- package/dist/{node-Cpbjmhrj.js → node-Cp3D7_hw.js} +71 -71
- package/dist/{node-Cye82yIV.js → node-CtoBdTQT.js} +3 -3
- package/dist/{node-CiFAW-F3.js → node-Ctw1i0nl.js} +12 -12
- package/dist/{node-CgVq0JJ9.js → node-D1zxOCuN.js} +1 -1
- package/dist/pieDiagram-FPR3CNQC-_30_tQz0.js +120 -0
- package/dist/quadrantDiagram-RLP5YTJ2-CTD43GTk.js +1028 -0
- package/dist/radar-MK3ICKWK-55CS4JTO-afihMdR4.js +14398 -0
- package/dist/{read_file.node-CIdAFiJ6.js → read_file.node-QZ0VCmB2.js} +1 -1
- package/dist/requirementDiagram-P5NVWGNK-Sd2_6g8e.js +853 -0
- package/dist/sankeyDiagram-C6NZRJHT-D1EcCYaw.js +864 -0
- package/dist/sequenceDiagram-6SLVIXKN-CghQTpGf.js +2283 -0
- package/dist/stateDiagram-WI5ZVJ5I-Bv21MlSK.js +272 -0
- package/dist/stateDiagram-v2-KVDSFUFK-BgP0D8xL.js +17 -0
- package/dist/{stdio-DNCc59wT.js → stdio-CCCGI3C7.js} +8 -8
- package/dist/storybook.js +7 -7
- package/dist/timeline-definition-65575674-BUqRZdJ-.js +800 -0
- package/dist/{undo_edit.node-VYuTxRwd.js → undo_edit.node-BkletvTZ.js} +5 -5
- package/dist/xychartDiagram-674MFTBU-DjBabATx.js +1291 -0
- package/package.json +1 -1
- package/dist/create_file.node-DtVTaHj5.js +0 -21
@@ -0,0 +1,843 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
import { g as Ct, s as Dt } from "./chunk-Q7VUVKE6-gBSSbdjU.js";
|
3
|
+
import { _ as o, x as wt, w as Vt, u as Lt, v as Mt, T as Bt, U as Ft, y as $, A as D, Z as Yt, Y as Pt, a0 as zt, a1 as Gt, a2 as Kt, Q as Zt, R as Ut, z as jt, S as Wt } from "./console-CoE5Qzyz.js";
|
4
|
+
var ut = function() {
|
5
|
+
var e = /* @__PURE__ */ o(function(N, n, a, c) {
|
6
|
+
for (a = a || {}, c = N.length; c--; a[N[c]] = n) ;
|
7
|
+
return a;
|
8
|
+
}, "o"), i = [6, 8, 10, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50], d = [1, 10], l = [1, 11], h = [1, 12], p = [1, 13], R = [1, 20], g = [1, 21], m = [1, 22], w = [1, 23], K = [1, 24], k = [1, 19], tt = [1, 25], Z = [1, 26], S = [1, 18], V = [1, 33], et = [1, 34], st = [1, 35], it = [1, 36], rt = [1, 37], dt = [6, 8, 10, 13, 15, 17, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50, 63, 64, 65, 66, 67], T = [1, 42], O = [1, 43], L = [1, 52], M = [40, 50, 68, 69], B = [1, 63], F = [1, 61], A = [1, 58], Y = [1, 62], P = [1, 64], U = [6, 8, 10, 13, 17, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 48, 49, 50, 63, 64, 65, 66, 67], pt = [63, 64, 65, 66, 67], ft = [1, 81], yt = [1, 80], _t = [1, 78], gt = [1, 79], bt = [6, 10, 42, 47], v = [6, 10, 13, 41, 42, 47, 48, 49], j = [1, 89], W = [1, 88], Q = [1, 87], z = [19, 56], mt = [1, 98], Et = [1, 97], nt = [19, 56, 58, 60], at = {
|
9
|
+
trace: /* @__PURE__ */ o(function() {
|
10
|
+
}, "trace"),
|
11
|
+
yy: {},
|
12
|
+
symbols_: { error: 2, start: 3, ER_DIAGRAM: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, entityName: 11, relSpec: 12, COLON: 13, role: 14, STYLE_SEPARATOR: 15, idList: 16, BLOCK_START: 17, attributes: 18, BLOCK_STOP: 19, SQS: 20, SQE: 21, title: 22, title_value: 23, acc_title: 24, acc_title_value: 25, acc_descr: 26, acc_descr_value: 27, acc_descr_multiline_value: 28, direction: 29, classDefStatement: 30, classStatement: 31, styleStatement: 32, direction_tb: 33, direction_bt: 34, direction_rl: 35, direction_lr: 36, CLASSDEF: 37, stylesOpt: 38, separator: 39, UNICODE_TEXT: 40, STYLE_TEXT: 41, COMMA: 42, CLASS: 43, STYLE: 44, style: 45, styleComponent: 46, SEMI: 47, NUM: 48, BRKT: 49, ENTITY_NAME: 50, attribute: 51, attributeType: 52, attributeName: 53, attributeKeyTypeList: 54, attributeComment: 55, ATTRIBUTE_WORD: 56, attributeKeyType: 57, ",": 58, ATTRIBUTE_KEY: 59, COMMENT: 60, cardinality: 61, relType: 62, ZERO_OR_ONE: 63, ZERO_OR_MORE: 64, ONE_OR_MORE: 65, ONLY_ONE: 66, MD_PARENT: 67, NON_IDENTIFYING: 68, IDENTIFYING: 69, WORD: 70, $accept: 0, $end: 1 },
|
13
|
+
terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: "COLON", 15: "STYLE_SEPARATOR", 17: "BLOCK_START", 19: "BLOCK_STOP", 20: "SQS", 21: "SQE", 22: "title", 23: "title_value", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "direction_tb", 34: "direction_bt", 35: "direction_rl", 36: "direction_lr", 37: "CLASSDEF", 40: "UNICODE_TEXT", 41: "STYLE_TEXT", 42: "COMMA", 43: "CLASS", 44: "STYLE", 47: "SEMI", 48: "NUM", 49: "BRKT", 50: "ENTITY_NAME", 56: "ATTRIBUTE_WORD", 58: ",", 59: "ATTRIBUTE_KEY", 60: "COMMENT", 63: "ZERO_OR_ONE", 64: "ZERO_OR_MORE", 65: "ONE_OR_MORE", 66: "ONLY_ONE", 67: "MD_PARENT", 68: "NON_IDENTIFYING", 69: "IDENTIFYING", 70: "WORD" },
|
14
|
+
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 9], [9, 7], [9, 7], [9, 4], [9, 6], [9, 3], [9, 5], [9, 1], [9, 3], [9, 7], [9, 9], [9, 6], [9, 8], [9, 4], [9, 6], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [29, 1], [29, 1], [29, 1], [29, 1], [30, 4], [16, 1], [16, 1], [16, 3], [16, 3], [31, 3], [32, 4], [38, 1], [38, 3], [45, 1], [45, 2], [39, 1], [39, 1], [39, 1], [46, 1], [46, 1], [46, 1], [46, 1], [11, 1], [11, 1], [18, 1], [18, 2], [51, 2], [51, 3], [51, 3], [51, 4], [52, 1], [53, 1], [54, 1], [54, 3], [57, 1], [55, 1], [12, 3], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [62, 1], [62, 1], [14, 1], [14, 1], [14, 1]],
|
15
|
+
performAction: /* @__PURE__ */ o(function(n, a, c, r, u, t, G) {
|
16
|
+
var s = t.length - 1;
|
17
|
+
switch (u) {
|
18
|
+
case 1:
|
19
|
+
break;
|
20
|
+
case 2:
|
21
|
+
this.$ = [];
|
22
|
+
break;
|
23
|
+
case 3:
|
24
|
+
t[s - 1].push(t[s]), this.$ = t[s - 1];
|
25
|
+
break;
|
26
|
+
case 4:
|
27
|
+
case 5:
|
28
|
+
this.$ = t[s];
|
29
|
+
break;
|
30
|
+
case 6:
|
31
|
+
case 7:
|
32
|
+
this.$ = [];
|
33
|
+
break;
|
34
|
+
case 8:
|
35
|
+
r.addEntity(t[s - 4]), r.addEntity(t[s - 2]), r.addRelationship(t[s - 4], t[s], t[s - 2], t[s - 3]);
|
36
|
+
break;
|
37
|
+
case 9:
|
38
|
+
r.addEntity(t[s - 8]), r.addEntity(t[s - 4]), r.addRelationship(t[s - 8], t[s], t[s - 4], t[s - 5]), r.setClass([t[s - 8]], t[s - 6]), r.setClass([t[s - 4]], t[s - 2]);
|
39
|
+
break;
|
40
|
+
case 10:
|
41
|
+
r.addEntity(t[s - 6]), r.addEntity(t[s - 2]), r.addRelationship(t[s - 6], t[s], t[s - 2], t[s - 3]), r.setClass([t[s - 6]], t[s - 4]);
|
42
|
+
break;
|
43
|
+
case 11:
|
44
|
+
r.addEntity(t[s - 6]), r.addEntity(t[s - 4]), r.addRelationship(t[s - 6], t[s], t[s - 4], t[s - 5]), r.setClass([t[s - 4]], t[s - 2]);
|
45
|
+
break;
|
46
|
+
case 12:
|
47
|
+
r.addEntity(t[s - 3]), r.addAttributes(t[s - 3], t[s - 1]);
|
48
|
+
break;
|
49
|
+
case 13:
|
50
|
+
r.addEntity(t[s - 5]), r.addAttributes(t[s - 5], t[s - 1]), r.setClass([t[s - 5]], t[s - 3]);
|
51
|
+
break;
|
52
|
+
case 14:
|
53
|
+
r.addEntity(t[s - 2]);
|
54
|
+
break;
|
55
|
+
case 15:
|
56
|
+
r.addEntity(t[s - 4]), r.setClass([t[s - 4]], t[s - 2]);
|
57
|
+
break;
|
58
|
+
case 16:
|
59
|
+
r.addEntity(t[s]);
|
60
|
+
break;
|
61
|
+
case 17:
|
62
|
+
r.addEntity(t[s - 2]), r.setClass([t[s - 2]], t[s]);
|
63
|
+
break;
|
64
|
+
case 18:
|
65
|
+
r.addEntity(t[s - 6], t[s - 4]), r.addAttributes(t[s - 6], t[s - 1]);
|
66
|
+
break;
|
67
|
+
case 19:
|
68
|
+
r.addEntity(t[s - 8], t[s - 6]), r.addAttributes(t[s - 8], t[s - 1]), r.setClass([t[s - 8]], t[s - 3]);
|
69
|
+
break;
|
70
|
+
case 20:
|
71
|
+
r.addEntity(t[s - 5], t[s - 3]);
|
72
|
+
break;
|
73
|
+
case 21:
|
74
|
+
r.addEntity(t[s - 7], t[s - 5]), r.setClass([t[s - 7]], t[s - 2]);
|
75
|
+
break;
|
76
|
+
case 22:
|
77
|
+
r.addEntity(t[s - 3], t[s - 1]);
|
78
|
+
break;
|
79
|
+
case 23:
|
80
|
+
r.addEntity(t[s - 5], t[s - 3]), r.setClass([t[s - 5]], t[s]);
|
81
|
+
break;
|
82
|
+
case 24:
|
83
|
+
case 25:
|
84
|
+
this.$ = t[s].trim(), r.setAccTitle(this.$);
|
85
|
+
break;
|
86
|
+
case 26:
|
87
|
+
case 27:
|
88
|
+
this.$ = t[s].trim(), r.setAccDescription(this.$);
|
89
|
+
break;
|
90
|
+
case 32:
|
91
|
+
r.setDirection("TB");
|
92
|
+
break;
|
93
|
+
case 33:
|
94
|
+
r.setDirection("BT");
|
95
|
+
break;
|
96
|
+
case 34:
|
97
|
+
r.setDirection("RL");
|
98
|
+
break;
|
99
|
+
case 35:
|
100
|
+
r.setDirection("LR");
|
101
|
+
break;
|
102
|
+
case 36:
|
103
|
+
this.$ = t[s - 3], r.addClass(t[s - 2], t[s - 1]);
|
104
|
+
break;
|
105
|
+
case 37:
|
106
|
+
case 38:
|
107
|
+
case 56:
|
108
|
+
case 64:
|
109
|
+
this.$ = [t[s]];
|
110
|
+
break;
|
111
|
+
case 39:
|
112
|
+
case 40:
|
113
|
+
this.$ = t[s - 2].concat([t[s]]);
|
114
|
+
break;
|
115
|
+
case 41:
|
116
|
+
this.$ = t[s - 2], r.setClass(t[s - 1], t[s]);
|
117
|
+
break;
|
118
|
+
case 42:
|
119
|
+
this.$ = t[s - 3], r.addCssStyles(t[s - 2], t[s - 1]);
|
120
|
+
break;
|
121
|
+
case 43:
|
122
|
+
this.$ = [t[s]];
|
123
|
+
break;
|
124
|
+
case 44:
|
125
|
+
t[s - 2].push(t[s]), this.$ = t[s - 2];
|
126
|
+
break;
|
127
|
+
case 46:
|
128
|
+
this.$ = t[s - 1] + t[s];
|
129
|
+
break;
|
130
|
+
case 54:
|
131
|
+
case 76:
|
132
|
+
case 77:
|
133
|
+
this.$ = t[s].replace(/"/g, "");
|
134
|
+
break;
|
135
|
+
case 55:
|
136
|
+
case 78:
|
137
|
+
this.$ = t[s];
|
138
|
+
break;
|
139
|
+
case 57:
|
140
|
+
t[s].push(t[s - 1]), this.$ = t[s];
|
141
|
+
break;
|
142
|
+
case 58:
|
143
|
+
this.$ = { type: t[s - 1], name: t[s] };
|
144
|
+
break;
|
145
|
+
case 59:
|
146
|
+
this.$ = { type: t[s - 2], name: t[s - 1], keys: t[s] };
|
147
|
+
break;
|
148
|
+
case 60:
|
149
|
+
this.$ = { type: t[s - 2], name: t[s - 1], comment: t[s] };
|
150
|
+
break;
|
151
|
+
case 61:
|
152
|
+
this.$ = { type: t[s - 3], name: t[s - 2], keys: t[s - 1], comment: t[s] };
|
153
|
+
break;
|
154
|
+
case 62:
|
155
|
+
case 63:
|
156
|
+
case 66:
|
157
|
+
this.$ = t[s];
|
158
|
+
break;
|
159
|
+
case 65:
|
160
|
+
t[s - 2].push(t[s]), this.$ = t[s - 2];
|
161
|
+
break;
|
162
|
+
case 67:
|
163
|
+
this.$ = t[s].replace(/"/g, "");
|
164
|
+
break;
|
165
|
+
case 68:
|
166
|
+
this.$ = { cardA: t[s], relType: t[s - 1], cardB: t[s - 2] };
|
167
|
+
break;
|
168
|
+
case 69:
|
169
|
+
this.$ = r.Cardinality.ZERO_OR_ONE;
|
170
|
+
break;
|
171
|
+
case 70:
|
172
|
+
this.$ = r.Cardinality.ZERO_OR_MORE;
|
173
|
+
break;
|
174
|
+
case 71:
|
175
|
+
this.$ = r.Cardinality.ONE_OR_MORE;
|
176
|
+
break;
|
177
|
+
case 72:
|
178
|
+
this.$ = r.Cardinality.ONLY_ONE;
|
179
|
+
break;
|
180
|
+
case 73:
|
181
|
+
this.$ = r.Cardinality.MD_PARENT;
|
182
|
+
break;
|
183
|
+
case 74:
|
184
|
+
this.$ = r.Identification.NON_IDENTIFYING;
|
185
|
+
break;
|
186
|
+
case 75:
|
187
|
+
this.$ = r.Identification.IDENTIFYING;
|
188
|
+
break;
|
189
|
+
}
|
190
|
+
}, "anonymous"),
|
191
|
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, e(i, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 22: d, 24: l, 26: h, 28: p, 29: 14, 30: 15, 31: 16, 32: 17, 33: R, 34: g, 35: m, 36: w, 37: K, 40: k, 43: tt, 44: Z, 50: S }, e(i, [2, 7], { 1: [2, 1] }), e(i, [2, 3]), { 9: 27, 11: 9, 22: d, 24: l, 26: h, 28: p, 29: 14, 30: 15, 31: 16, 32: 17, 33: R, 34: g, 35: m, 36: w, 37: K, 40: k, 43: tt, 44: Z, 50: S }, e(i, [2, 5]), e(i, [2, 6]), e(i, [2, 16], { 12: 28, 61: 32, 15: [1, 29], 17: [1, 30], 20: [1, 31], 63: V, 64: et, 65: st, 66: it, 67: rt }), { 23: [1, 38] }, { 25: [1, 39] }, { 27: [1, 40] }, e(i, [2, 27]), e(i, [2, 28]), e(i, [2, 29]), e(i, [2, 30]), e(i, [2, 31]), e(dt, [2, 54]), e(dt, [2, 55]), e(i, [2, 32]), e(i, [2, 33]), e(i, [2, 34]), e(i, [2, 35]), { 16: 41, 40: T, 41: O }, { 16: 44, 40: T, 41: O }, { 16: 45, 40: T, 41: O }, e(i, [2, 4]), { 11: 46, 40: k, 50: S }, { 16: 47, 40: T, 41: O }, { 18: 48, 19: [1, 49], 51: 50, 52: 51, 56: L }, { 11: 53, 40: k, 50: S }, { 62: 54, 68: [1, 55], 69: [1, 56] }, e(M, [2, 69]), e(M, [2, 70]), e(M, [2, 71]), e(M, [2, 72]), e(M, [2, 73]), e(i, [2, 24]), e(i, [2, 25]), e(i, [2, 26]), { 13: B, 38: 57, 41: F, 42: A, 45: 59, 46: 60, 48: Y, 49: P }, e(U, [2, 37]), e(U, [2, 38]), { 16: 65, 40: T, 41: O, 42: A }, { 13: B, 38: 66, 41: F, 42: A, 45: 59, 46: 60, 48: Y, 49: P }, { 13: [1, 67], 15: [1, 68] }, e(i, [2, 17], { 61: 32, 12: 69, 17: [1, 70], 42: A, 63: V, 64: et, 65: st, 66: it, 67: rt }), { 19: [1, 71] }, e(i, [2, 14]), { 18: 72, 19: [2, 56], 51: 50, 52: 51, 56: L }, { 53: 73, 56: [1, 74] }, { 56: [2, 62] }, { 21: [1, 75] }, { 61: 76, 63: V, 64: et, 65: st, 66: it, 67: rt }, e(pt, [2, 74]), e(pt, [2, 75]), { 6: ft, 10: yt, 39: 77, 42: _t, 47: gt }, { 40: [1, 82], 41: [1, 83] }, e(bt, [2, 43], { 46: 84, 13: B, 41: F, 48: Y, 49: P }), e(v, [2, 45]), e(v, [2, 50]), e(v, [2, 51]), e(v, [2, 52]), e(v, [2, 53]), e(i, [2, 41], { 42: A }), { 6: ft, 10: yt, 39: 85, 42: _t, 47: gt }, { 14: 86, 40: j, 50: W, 70: Q }, { 16: 90, 40: T, 41: O }, { 11: 91, 40: k, 50: S }, { 18: 92, 19: [1, 93], 51: 50, 52: 51, 56: L }, e(i, [2, 12]), { 19: [2, 57] }, e(z, [2, 58], { 54: 94, 55: 95, 57: 96, 59: mt, 60: Et }), e([19, 56, 59, 60], [2, 63]), e(i, [2, 22], { 15: [1, 100], 17: [1, 99] }), e([40, 50], [2, 68]), e(i, [2, 36]), { 13: B, 41: F, 45: 101, 46: 60, 48: Y, 49: P }, e(i, [2, 47]), e(i, [2, 48]), e(i, [2, 49]), e(U, [2, 39]), e(U, [2, 40]), e(v, [2, 46]), e(i, [2, 42]), e(i, [2, 8]), e(i, [2, 76]), e(i, [2, 77]), e(i, [2, 78]), { 13: [1, 102], 42: A }, { 13: [1, 104], 15: [1, 103] }, { 19: [1, 105] }, e(i, [2, 15]), e(z, [2, 59], { 55: 106, 58: [1, 107], 60: Et }), e(z, [2, 60]), e(nt, [2, 64]), e(z, [2, 67]), e(nt, [2, 66]), { 18: 108, 19: [1, 109], 51: 50, 52: 51, 56: L }, { 16: 110, 40: T, 41: O }, e(bt, [2, 44], { 46: 84, 13: B, 41: F, 48: Y, 49: P }), { 14: 111, 40: j, 50: W, 70: Q }, { 16: 112, 40: T, 41: O }, { 14: 113, 40: j, 50: W, 70: Q }, e(i, [2, 13]), e(z, [2, 61]), { 57: 114, 59: mt }, { 19: [1, 115] }, e(i, [2, 20]), e(i, [2, 23], { 17: [1, 116], 42: A }), e(i, [2, 11]), { 13: [1, 117], 42: A }, e(i, [2, 10]), e(nt, [2, 65]), e(i, [2, 18]), { 18: 118, 19: [1, 119], 51: 50, 52: 51, 56: L }, { 14: 120, 40: j, 50: W, 70: Q }, { 19: [1, 121] }, e(i, [2, 21]), e(i, [2, 9]), e(i, [2, 19])],
|
192
|
+
defaultActions: { 52: [2, 62], 72: [2, 57] },
|
193
|
+
parseError: /* @__PURE__ */ o(function(n, a) {
|
194
|
+
if (a.recoverable)
|
195
|
+
this.trace(n);
|
196
|
+
else {
|
197
|
+
var c = new Error(n);
|
198
|
+
throw c.hash = a, c;
|
199
|
+
}
|
200
|
+
}, "parseError"),
|
201
|
+
parse: /* @__PURE__ */ o(function(n) {
|
202
|
+
var a = this, c = [0], r = [], u = [null], t = [], G = this.table, s = "", q = 0, kt = 0, Rt = 2, St = 1, xt = t.slice.call(arguments, 1), f = Object.create(this.lexer), x = { yy: {} };
|
203
|
+
for (var ct in this.yy)
|
204
|
+
Object.prototype.hasOwnProperty.call(this.yy, ct) && (x.yy[ct] = this.yy[ct]);
|
205
|
+
f.setInput(n, x.yy), x.yy.lexer = f, x.yy.parser = this, typeof f.yylloc > "u" && (f.yylloc = {});
|
206
|
+
var lt = f.yylloc;
|
207
|
+
t.push(lt);
|
208
|
+
var It = f.options && f.options.ranges;
|
209
|
+
typeof x.yy.parseError == "function" ? this.parseError = x.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
210
|
+
function vt(_) {
|
211
|
+
c.length = c.length - 2 * _, u.length = u.length - _, t.length = t.length - _;
|
212
|
+
}
|
213
|
+
o(vt, "popStack");
|
214
|
+
function Tt() {
|
215
|
+
var _;
|
216
|
+
return _ = r.pop() || f.lex() || St, typeof _ != "number" && (_ instanceof Array && (r = _, _ = r.pop()), _ = a.symbols_[_] || _), _;
|
217
|
+
}
|
218
|
+
o(Tt, "lex");
|
219
|
+
for (var y, I, b, ot, C = {}, H, E, Ot, J; ; ) {
|
220
|
+
if (I = c[c.length - 1], this.defaultActions[I] ? b = this.defaultActions[I] : ((y === null || typeof y > "u") && (y = Tt()), b = G[I] && G[I][y]), typeof b > "u" || !b.length || !b[0]) {
|
221
|
+
var ht = "";
|
222
|
+
J = [];
|
223
|
+
for (H in G[I])
|
224
|
+
this.terminals_[H] && H > Rt && J.push("'" + this.terminals_[H] + "'");
|
225
|
+
f.showPosition ? ht = "Parse error on line " + (q + 1) + `:
|
226
|
+
` + f.showPosition() + `
|
227
|
+
Expecting ` + J.join(", ") + ", got '" + (this.terminals_[y] || y) + "'" : ht = "Parse error on line " + (q + 1) + ": Unexpected " + (y == St ? "end of input" : "'" + (this.terminals_[y] || y) + "'"), this.parseError(ht, {
|
228
|
+
text: f.match,
|
229
|
+
token: this.terminals_[y] || y,
|
230
|
+
line: f.yylineno,
|
231
|
+
loc: lt,
|
232
|
+
expected: J
|
233
|
+
});
|
234
|
+
}
|
235
|
+
if (b[0] instanceof Array && b.length > 1)
|
236
|
+
throw new Error("Parse Error: multiple actions possible at state: " + I + ", token: " + y);
|
237
|
+
switch (b[0]) {
|
238
|
+
case 1:
|
239
|
+
c.push(y), u.push(f.yytext), t.push(f.yylloc), c.push(b[1]), y = null, kt = f.yyleng, s = f.yytext, q = f.yylineno, lt = f.yylloc;
|
240
|
+
break;
|
241
|
+
case 2:
|
242
|
+
if (E = this.productions_[b[1]][1], C.$ = u[u.length - E], C._$ = {
|
243
|
+
first_line: t[t.length - (E || 1)].first_line,
|
244
|
+
last_line: t[t.length - 1].last_line,
|
245
|
+
first_column: t[t.length - (E || 1)].first_column,
|
246
|
+
last_column: t[t.length - 1].last_column
|
247
|
+
}, It && (C._$.range = [
|
248
|
+
t[t.length - (E || 1)].range[0],
|
249
|
+
t[t.length - 1].range[1]
|
250
|
+
]), ot = this.performAction.apply(C, [
|
251
|
+
s,
|
252
|
+
kt,
|
253
|
+
q,
|
254
|
+
x.yy,
|
255
|
+
b[1],
|
256
|
+
u,
|
257
|
+
t
|
258
|
+
].concat(xt)), typeof ot < "u")
|
259
|
+
return ot;
|
260
|
+
E && (c = c.slice(0, -1 * E * 2), u = u.slice(0, -1 * E), t = t.slice(0, -1 * E)), c.push(this.productions_[b[1]][0]), u.push(C.$), t.push(C._$), Ot = G[c[c.length - 2]][c[c.length - 1]], c.push(Ot);
|
261
|
+
break;
|
262
|
+
case 3:
|
263
|
+
return !0;
|
264
|
+
}
|
265
|
+
}
|
266
|
+
return !0;
|
267
|
+
}, "parse")
|
268
|
+
}, Nt = /* @__PURE__ */ function() {
|
269
|
+
var N = {
|
270
|
+
EOF: 1,
|
271
|
+
parseError: /* @__PURE__ */ o(function(a, c) {
|
272
|
+
if (this.yy.parser)
|
273
|
+
this.yy.parser.parseError(a, c);
|
274
|
+
else
|
275
|
+
throw new Error(a);
|
276
|
+
}, "parseError"),
|
277
|
+
// resets the lexer, sets new input
|
278
|
+
setInput: /* @__PURE__ */ o(function(n, a) {
|
279
|
+
return this.yy = a || this.yy || {}, this._input = n, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
280
|
+
first_line: 1,
|
281
|
+
first_column: 0,
|
282
|
+
last_line: 1,
|
283
|
+
last_column: 0
|
284
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
285
|
+
}, "setInput"),
|
286
|
+
// consumes and returns one char from the input
|
287
|
+
input: /* @__PURE__ */ o(function() {
|
288
|
+
var n = this._input[0];
|
289
|
+
this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n;
|
290
|
+
var a = n.match(/(?:\r\n?|\n).*/g);
|
291
|
+
return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), n;
|
292
|
+
}, "input"),
|
293
|
+
// unshifts one char (or a string) into the input
|
294
|
+
unput: /* @__PURE__ */ o(function(n) {
|
295
|
+
var a = n.length, c = n.split(/(?:\r\n?|\n)/g);
|
296
|
+
this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
|
297
|
+
var r = this.match.split(/(?:\r\n?|\n)/g);
|
298
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
|
299
|
+
var u = this.yylloc.range;
|
300
|
+
return this.yylloc = {
|
301
|
+
first_line: this.yylloc.first_line,
|
302
|
+
last_line: this.yylineno + 1,
|
303
|
+
first_column: this.yylloc.first_column,
|
304
|
+
last_column: c ? (c.length === r.length ? this.yylloc.first_column : 0) + r[r.length - c.length].length - c[0].length : this.yylloc.first_column - a
|
305
|
+
}, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
|
306
|
+
}, "unput"),
|
307
|
+
// When called from action, caches matched text and appends it on next action
|
308
|
+
more: /* @__PURE__ */ o(function() {
|
309
|
+
return this._more = !0, this;
|
310
|
+
}, "more"),
|
311
|
+
// 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.
|
312
|
+
reject: /* @__PURE__ */ o(function() {
|
313
|
+
if (this.options.backtrack_lexer)
|
314
|
+
this._backtrack = !0;
|
315
|
+
else
|
316
|
+
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).
|
317
|
+
` + this.showPosition(), {
|
318
|
+
text: "",
|
319
|
+
token: null,
|
320
|
+
line: this.yylineno
|
321
|
+
});
|
322
|
+
return this;
|
323
|
+
}, "reject"),
|
324
|
+
// retain first n characters of the match
|
325
|
+
less: /* @__PURE__ */ o(function(n) {
|
326
|
+
this.unput(this.match.slice(n));
|
327
|
+
}, "less"),
|
328
|
+
// displays already matched input, i.e. for error messages
|
329
|
+
pastInput: /* @__PURE__ */ o(function() {
|
330
|
+
var n = this.matched.substr(0, this.matched.length - this.match.length);
|
331
|
+
return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, "");
|
332
|
+
}, "pastInput"),
|
333
|
+
// displays upcoming input, i.e. for error messages
|
334
|
+
upcomingInput: /* @__PURE__ */ o(function() {
|
335
|
+
var n = this.match;
|
336
|
+
return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, "");
|
337
|
+
}, "upcomingInput"),
|
338
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
339
|
+
showPosition: /* @__PURE__ */ o(function() {
|
340
|
+
var n = this.pastInput(), a = new Array(n.length + 1).join("-");
|
341
|
+
return n + this.upcomingInput() + `
|
342
|
+
` + a + "^";
|
343
|
+
}, "showPosition"),
|
344
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
345
|
+
test_match: /* @__PURE__ */ o(function(n, a) {
|
346
|
+
var c, r, u;
|
347
|
+
if (this.options.backtrack_lexer && (u = {
|
348
|
+
yylineno: this.yylineno,
|
349
|
+
yylloc: {
|
350
|
+
first_line: this.yylloc.first_line,
|
351
|
+
last_line: this.last_line,
|
352
|
+
first_column: this.yylloc.first_column,
|
353
|
+
last_column: this.yylloc.last_column
|
354
|
+
},
|
355
|
+
yytext: this.yytext,
|
356
|
+
match: this.match,
|
357
|
+
matches: this.matches,
|
358
|
+
matched: this.matched,
|
359
|
+
yyleng: this.yyleng,
|
360
|
+
offset: this.offset,
|
361
|
+
_more: this._more,
|
362
|
+
_input: this._input,
|
363
|
+
yy: this.yy,
|
364
|
+
conditionStack: this.conditionStack.slice(0),
|
365
|
+
done: this.done
|
366
|
+
}, this.options.ranges && (u.yylloc.range = this.yylloc.range.slice(0))), r = n[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
|
367
|
+
first_line: this.yylloc.last_line,
|
368
|
+
last_line: this.yylineno + 1,
|
369
|
+
first_column: this.yylloc.last_column,
|
370
|
+
last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length
|
371
|
+
}, this.yytext += n[0], this.match += n[0], this.matches = n, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(n[0].length), this.matched += n[0], c = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
|
372
|
+
return c;
|
373
|
+
if (this._backtrack) {
|
374
|
+
for (var t in u)
|
375
|
+
this[t] = u[t];
|
376
|
+
return !1;
|
377
|
+
}
|
378
|
+
return !1;
|
379
|
+
}, "test_match"),
|
380
|
+
// return next match in input
|
381
|
+
next: /* @__PURE__ */ o(function() {
|
382
|
+
if (this.done)
|
383
|
+
return this.EOF;
|
384
|
+
this._input || (this.done = !0);
|
385
|
+
var n, a, c, r;
|
386
|
+
this._more || (this.yytext = "", this.match = "");
|
387
|
+
for (var u = this._currentRules(), t = 0; t < u.length; t++)
|
388
|
+
if (c = this._input.match(this.rules[u[t]]), c && (!a || c[0].length > a[0].length)) {
|
389
|
+
if (a = c, r = t, this.options.backtrack_lexer) {
|
390
|
+
if (n = this.test_match(c, u[t]), n !== !1)
|
391
|
+
return n;
|
392
|
+
if (this._backtrack) {
|
393
|
+
a = !1;
|
394
|
+
continue;
|
395
|
+
} else
|
396
|
+
return !1;
|
397
|
+
} else if (!this.options.flex)
|
398
|
+
break;
|
399
|
+
}
|
400
|
+
return a ? (n = this.test_match(a, u[r]), n !== !1 ? n : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
401
|
+
` + this.showPosition(), {
|
402
|
+
text: "",
|
403
|
+
token: null,
|
404
|
+
line: this.yylineno
|
405
|
+
});
|
406
|
+
}, "next"),
|
407
|
+
// return next match that has a token
|
408
|
+
lex: /* @__PURE__ */ o(function() {
|
409
|
+
var a = this.next();
|
410
|
+
return a || this.lex();
|
411
|
+
}, "lex"),
|
412
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
413
|
+
begin: /* @__PURE__ */ o(function(a) {
|
414
|
+
this.conditionStack.push(a);
|
415
|
+
}, "begin"),
|
416
|
+
// pop the previously active lexer condition state off the condition stack
|
417
|
+
popState: /* @__PURE__ */ o(function() {
|
418
|
+
var a = this.conditionStack.length - 1;
|
419
|
+
return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
420
|
+
}, "popState"),
|
421
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
422
|
+
_currentRules: /* @__PURE__ */ o(function() {
|
423
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
424
|
+
}, "_currentRules"),
|
425
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
426
|
+
topState: /* @__PURE__ */ o(function(a) {
|
427
|
+
return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
|
428
|
+
}, "topState"),
|
429
|
+
// alias for begin(condition)
|
430
|
+
pushState: /* @__PURE__ */ o(function(a) {
|
431
|
+
this.begin(a);
|
432
|
+
}, "pushState"),
|
433
|
+
// return the number of states currently on the stack
|
434
|
+
stateStackSize: /* @__PURE__ */ o(function() {
|
435
|
+
return this.conditionStack.length;
|
436
|
+
}, "stateStackSize"),
|
437
|
+
options: { "case-insensitive": !0 },
|
438
|
+
performAction: /* @__PURE__ */ o(function(a, c, r, u) {
|
439
|
+
switch (r) {
|
440
|
+
case 0:
|
441
|
+
return this.begin("acc_title"), 24;
|
442
|
+
case 1:
|
443
|
+
return this.popState(), "acc_title_value";
|
444
|
+
case 2:
|
445
|
+
return this.begin("acc_descr"), 26;
|
446
|
+
case 3:
|
447
|
+
return this.popState(), "acc_descr_value";
|
448
|
+
case 4:
|
449
|
+
this.begin("acc_descr_multiline");
|
450
|
+
break;
|
451
|
+
case 5:
|
452
|
+
this.popState();
|
453
|
+
break;
|
454
|
+
case 6:
|
455
|
+
return "acc_descr_multiline_value";
|
456
|
+
case 7:
|
457
|
+
return 33;
|
458
|
+
case 8:
|
459
|
+
return 34;
|
460
|
+
case 9:
|
461
|
+
return 35;
|
462
|
+
case 10:
|
463
|
+
return 36;
|
464
|
+
case 11:
|
465
|
+
return 10;
|
466
|
+
case 12:
|
467
|
+
break;
|
468
|
+
case 13:
|
469
|
+
return 8;
|
470
|
+
case 14:
|
471
|
+
return 50;
|
472
|
+
case 15:
|
473
|
+
return 70;
|
474
|
+
case 16:
|
475
|
+
return 4;
|
476
|
+
case 17:
|
477
|
+
return this.begin("block"), 17;
|
478
|
+
case 18:
|
479
|
+
return 49;
|
480
|
+
case 19:
|
481
|
+
return 49;
|
482
|
+
case 20:
|
483
|
+
return 42;
|
484
|
+
case 21:
|
485
|
+
return 15;
|
486
|
+
case 22:
|
487
|
+
return 13;
|
488
|
+
case 23:
|
489
|
+
break;
|
490
|
+
case 24:
|
491
|
+
return 59;
|
492
|
+
case 25:
|
493
|
+
return 56;
|
494
|
+
case 26:
|
495
|
+
return 56;
|
496
|
+
case 27:
|
497
|
+
return 60;
|
498
|
+
case 28:
|
499
|
+
break;
|
500
|
+
case 29:
|
501
|
+
return this.popState(), 19;
|
502
|
+
case 30:
|
503
|
+
return c.yytext[0];
|
504
|
+
case 31:
|
505
|
+
return 20;
|
506
|
+
case 32:
|
507
|
+
return 21;
|
508
|
+
case 33:
|
509
|
+
return this.begin("style"), 44;
|
510
|
+
case 34:
|
511
|
+
return this.popState(), 10;
|
512
|
+
case 35:
|
513
|
+
break;
|
514
|
+
case 36:
|
515
|
+
return 13;
|
516
|
+
case 37:
|
517
|
+
return 42;
|
518
|
+
case 38:
|
519
|
+
return 49;
|
520
|
+
case 39:
|
521
|
+
return this.begin("style"), 37;
|
522
|
+
case 40:
|
523
|
+
return 43;
|
524
|
+
case 41:
|
525
|
+
return 63;
|
526
|
+
case 42:
|
527
|
+
return 65;
|
528
|
+
case 43:
|
529
|
+
return 65;
|
530
|
+
case 44:
|
531
|
+
return 65;
|
532
|
+
case 45:
|
533
|
+
return 63;
|
534
|
+
case 46:
|
535
|
+
return 63;
|
536
|
+
case 47:
|
537
|
+
return 64;
|
538
|
+
case 48:
|
539
|
+
return 64;
|
540
|
+
case 49:
|
541
|
+
return 64;
|
542
|
+
case 50:
|
543
|
+
return 64;
|
544
|
+
case 51:
|
545
|
+
return 64;
|
546
|
+
case 52:
|
547
|
+
return 65;
|
548
|
+
case 53:
|
549
|
+
return 64;
|
550
|
+
case 54:
|
551
|
+
return 65;
|
552
|
+
case 55:
|
553
|
+
return 66;
|
554
|
+
case 56:
|
555
|
+
return 66;
|
556
|
+
case 57:
|
557
|
+
return 66;
|
558
|
+
case 58:
|
559
|
+
return 66;
|
560
|
+
case 59:
|
561
|
+
return 63;
|
562
|
+
case 60:
|
563
|
+
return 64;
|
564
|
+
case 61:
|
565
|
+
return 65;
|
566
|
+
case 62:
|
567
|
+
return 67;
|
568
|
+
case 63:
|
569
|
+
return 68;
|
570
|
+
case 64:
|
571
|
+
return 69;
|
572
|
+
case 65:
|
573
|
+
return 69;
|
574
|
+
case 66:
|
575
|
+
return 68;
|
576
|
+
case 67:
|
577
|
+
return 68;
|
578
|
+
case 68:
|
579
|
+
return 68;
|
580
|
+
case 69:
|
581
|
+
return 41;
|
582
|
+
case 70:
|
583
|
+
return 47;
|
584
|
+
case 71:
|
585
|
+
return 40;
|
586
|
+
case 72:
|
587
|
+
return 48;
|
588
|
+
case 73:
|
589
|
+
return c.yytext[0];
|
590
|
+
case 74:
|
591
|
+
return 6;
|
592
|
+
}
|
593
|
+
}, "anonymous"),
|
594
|
+
rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:#)/i, /^(?:#)/i, /^(?:,)/i, /^(?::::)/i, /^(?::)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:([^\s]*)[~].*[~]([^\s]*))/i, /^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:style\b)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?::)/i, /^(?:,)/i, /^(?:#)/i, /^(?:classDef\b)/i, /^(?:class\b)/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:;)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:[0-9])/i, /^(?:.)/i, /^(?:$)/i],
|
595
|
+
conditions: { style: { rules: [34, 35, 36, 37, 38, 69, 70], inclusive: !1 }, acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, block: { rules: [23, 24, 25, 26, 27, 28, 29, 30], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 31, 32, 33, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74], inclusive: !0 } }
|
596
|
+
};
|
597
|
+
return N;
|
598
|
+
}();
|
599
|
+
at.lexer = Nt;
|
600
|
+
function X() {
|
601
|
+
this.yy = {};
|
602
|
+
}
|
603
|
+
return o(X, "Parser"), X.prototype = at, at.Parser = X, new X();
|
604
|
+
}();
|
605
|
+
ut.parser = ut;
|
606
|
+
var Qt = ut, Xt = class {
|
607
|
+
constructor() {
|
608
|
+
this.entities = /* @__PURE__ */ new Map(), this.relationships = [], this.classes = /* @__PURE__ */ new Map(), this.direction = "TB", this.Cardinality = {
|
609
|
+
ZERO_OR_ONE: "ZERO_OR_ONE",
|
610
|
+
ZERO_OR_MORE: "ZERO_OR_MORE",
|
611
|
+
ONE_OR_MORE: "ONE_OR_MORE",
|
612
|
+
ONLY_ONE: "ONLY_ONE",
|
613
|
+
MD_PARENT: "MD_PARENT"
|
614
|
+
}, this.Identification = {
|
615
|
+
NON_IDENTIFYING: "NON_IDENTIFYING",
|
616
|
+
IDENTIFYING: "IDENTIFYING"
|
617
|
+
}, this.setAccTitle = wt, this.getAccTitle = Vt, this.setAccDescription = Lt, this.getAccDescription = Mt, this.setDiagramTitle = Bt, this.getDiagramTitle = Ft, this.getConfig = /* @__PURE__ */ o(() => $().er, "getConfig"), this.clear(), this.addEntity = this.addEntity.bind(this), this.addAttributes = this.addAttributes.bind(this), this.addRelationship = this.addRelationship.bind(this), this.setDirection = this.setDirection.bind(this), this.addCssStyles = this.addCssStyles.bind(this), this.addClass = this.addClass.bind(this), this.setClass = this.setClass.bind(this), this.setAccTitle = this.setAccTitle.bind(this), this.setAccDescription = this.setAccDescription.bind(this);
|
618
|
+
}
|
619
|
+
static {
|
620
|
+
o(this, "ErDB");
|
621
|
+
}
|
622
|
+
/**
|
623
|
+
* Add entity
|
624
|
+
* @param name - The name of the entity
|
625
|
+
* @param alias - The alias of the entity
|
626
|
+
*/
|
627
|
+
addEntity(e, i = "") {
|
628
|
+
return this.entities.has(e) ? !this.entities.get(e)?.alias && i && (this.entities.get(e).alias = i, D.info(`Add alias '${i}' to entity '${e}'`)) : (this.entities.set(e, {
|
629
|
+
id: `entity-${e}-${this.entities.size}`,
|
630
|
+
label: e,
|
631
|
+
attributes: [],
|
632
|
+
alias: i,
|
633
|
+
shape: "erBox",
|
634
|
+
look: $().look ?? "default",
|
635
|
+
cssClasses: "default",
|
636
|
+
cssStyles: []
|
637
|
+
}), D.info("Added new entity :", e)), this.entities.get(e);
|
638
|
+
}
|
639
|
+
getEntity(e) {
|
640
|
+
return this.entities.get(e);
|
641
|
+
}
|
642
|
+
getEntities() {
|
643
|
+
return this.entities;
|
644
|
+
}
|
645
|
+
getClasses() {
|
646
|
+
return this.classes;
|
647
|
+
}
|
648
|
+
addAttributes(e, i) {
|
649
|
+
const d = this.addEntity(e);
|
650
|
+
let l;
|
651
|
+
for (l = i.length - 1; l >= 0; l--)
|
652
|
+
i[l].keys || (i[l].keys = []), i[l].comment || (i[l].comment = ""), d.attributes.push(i[l]), D.debug("Added attribute ", i[l].name);
|
653
|
+
}
|
654
|
+
/**
|
655
|
+
* Add a relationship
|
656
|
+
*
|
657
|
+
* @param entA - The first entity in the relationship
|
658
|
+
* @param rolA - The role played by the first entity in relation to the second
|
659
|
+
* @param entB - The second entity in the relationship
|
660
|
+
* @param rSpec - The details of the relationship between the two entities
|
661
|
+
*/
|
662
|
+
addRelationship(e, i, d, l) {
|
663
|
+
const h = this.entities.get(e), p = this.entities.get(d);
|
664
|
+
if (!h || !p)
|
665
|
+
return;
|
666
|
+
const R = {
|
667
|
+
entityA: h.id,
|
668
|
+
roleA: i,
|
669
|
+
entityB: p.id,
|
670
|
+
relSpec: l
|
671
|
+
};
|
672
|
+
this.relationships.push(R), D.debug("Added new relationship :", R);
|
673
|
+
}
|
674
|
+
getRelationships() {
|
675
|
+
return this.relationships;
|
676
|
+
}
|
677
|
+
getDirection() {
|
678
|
+
return this.direction;
|
679
|
+
}
|
680
|
+
setDirection(e) {
|
681
|
+
this.direction = e;
|
682
|
+
}
|
683
|
+
getCompiledStyles(e) {
|
684
|
+
let i = [];
|
685
|
+
for (const d of e) {
|
686
|
+
const l = this.classes.get(d);
|
687
|
+
l?.styles && (i = [...i, ...l.styles ?? []].map((h) => h.trim())), l?.textStyles && (i = [...i, ...l.textStyles ?? []].map((h) => h.trim()));
|
688
|
+
}
|
689
|
+
return i;
|
690
|
+
}
|
691
|
+
addCssStyles(e, i) {
|
692
|
+
for (const d of e) {
|
693
|
+
const l = this.entities.get(d);
|
694
|
+
if (!i || !l)
|
695
|
+
return;
|
696
|
+
for (const h of i)
|
697
|
+
l.cssStyles.push(h);
|
698
|
+
}
|
699
|
+
}
|
700
|
+
addClass(e, i) {
|
701
|
+
e.forEach((d) => {
|
702
|
+
let l = this.classes.get(d);
|
703
|
+
l === void 0 && (l = { id: d, styles: [], textStyles: [] }, this.classes.set(d, l)), i && i.forEach(function(h) {
|
704
|
+
if (/color/.exec(h)) {
|
705
|
+
const p = h.replace("fill", "bgFill");
|
706
|
+
l.textStyles.push(p);
|
707
|
+
}
|
708
|
+
l.styles.push(h);
|
709
|
+
});
|
710
|
+
});
|
711
|
+
}
|
712
|
+
setClass(e, i) {
|
713
|
+
for (const d of e) {
|
714
|
+
const l = this.entities.get(d);
|
715
|
+
if (l)
|
716
|
+
for (const h of i)
|
717
|
+
l.cssClasses += " " + h;
|
718
|
+
}
|
719
|
+
}
|
720
|
+
clear() {
|
721
|
+
this.entities = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.relationships = [], Yt();
|
722
|
+
}
|
723
|
+
getData() {
|
724
|
+
const e = [], i = [], d = $();
|
725
|
+
for (const h of this.entities.keys()) {
|
726
|
+
const p = this.entities.get(h);
|
727
|
+
p && (p.cssCompiledStyles = this.getCompiledStyles(p.cssClasses.split(" ")), e.push(p));
|
728
|
+
}
|
729
|
+
let l = 0;
|
730
|
+
for (const h of this.relationships) {
|
731
|
+
const p = {
|
732
|
+
id: Pt(h.entityA, h.entityB, {
|
733
|
+
prefix: "id",
|
734
|
+
counter: l++
|
735
|
+
}),
|
736
|
+
type: "normal",
|
737
|
+
curve: "basis",
|
738
|
+
start: h.entityA,
|
739
|
+
end: h.entityB,
|
740
|
+
label: h.roleA,
|
741
|
+
labelpos: "c",
|
742
|
+
thickness: "normal",
|
743
|
+
classes: "relationshipLine",
|
744
|
+
arrowTypeStart: h.relSpec.cardB.toLowerCase(),
|
745
|
+
arrowTypeEnd: h.relSpec.cardA.toLowerCase(),
|
746
|
+
pattern: h.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
|
747
|
+
look: d.look
|
748
|
+
};
|
749
|
+
i.push(p);
|
750
|
+
}
|
751
|
+
return { nodes: e, edges: i, other: {}, config: d, direction: "TB" };
|
752
|
+
}
|
753
|
+
}, At = {};
|
754
|
+
Kt(At, {
|
755
|
+
draw: () => qt
|
756
|
+
});
|
757
|
+
var qt = /* @__PURE__ */ o(async function(e, i, d, l) {
|
758
|
+
D.info("REF0:"), D.info("Drawing er diagram (unified)", i);
|
759
|
+
const { securityLevel: h, er: p, layout: R } = $(), g = l.db.getData(), m = Ct(i, h);
|
760
|
+
g.type = l.type, g.layoutAlgorithm = Zt(R), g.config.flowchart.nodeSpacing = p?.nodeSpacing || 140, g.config.flowchart.rankSpacing = p?.rankSpacing || 80, g.direction = l.db.getDirection(), g.markers = ["only_one", "zero_or_one", "one_or_more", "zero_or_more"], g.diagramId = i, await Ut(g, m), g.layoutAlgorithm === "elk" && m.select(".edges").lower();
|
761
|
+
const w = m.selectAll('[id*="-background"]');
|
762
|
+
Array.from(w).length > 0 && w.each(function() {
|
763
|
+
const k = jt(this), Z = k.attr("id").replace("-background", ""), S = m.select(`#${CSS.escape(Z)}`);
|
764
|
+
if (!S.empty()) {
|
765
|
+
const V = S.attr("transform");
|
766
|
+
k.attr("transform", V);
|
767
|
+
}
|
768
|
+
});
|
769
|
+
const K = 8;
|
770
|
+
Wt.insertTitle(
|
771
|
+
m,
|
772
|
+
"erDiagramTitleText",
|
773
|
+
p?.titleTopMargin ?? 25,
|
774
|
+
l.db.getDiagramTitle()
|
775
|
+
), Dt(m, K, "erDiagram", p?.useMaxWidth ?? !0);
|
776
|
+
}, "draw"), Ht = /* @__PURE__ */ o((e, i) => {
|
777
|
+
const d = zt, l = d(e, "r"), h = d(e, "g"), p = d(e, "b");
|
778
|
+
return Gt(l, h, p, i);
|
779
|
+
}, "fade"), Jt = /* @__PURE__ */ o((e) => `
|
780
|
+
.entityBox {
|
781
|
+
fill: ${e.mainBkg};
|
782
|
+
stroke: ${e.nodeBorder};
|
783
|
+
}
|
784
|
+
|
785
|
+
.relationshipLabelBox {
|
786
|
+
fill: ${e.tertiaryColor};
|
787
|
+
opacity: 0.7;
|
788
|
+
background-color: ${e.tertiaryColor};
|
789
|
+
rect {
|
790
|
+
opacity: 0.5;
|
791
|
+
}
|
792
|
+
}
|
793
|
+
|
794
|
+
.labelBkg {
|
795
|
+
background-color: ${Ht(e.tertiaryColor, 0.5)};
|
796
|
+
}
|
797
|
+
|
798
|
+
.edgeLabel .label {
|
799
|
+
fill: ${e.nodeBorder};
|
800
|
+
font-size: 14px;
|
801
|
+
}
|
802
|
+
|
803
|
+
.label {
|
804
|
+
font-family: ${e.fontFamily};
|
805
|
+
color: ${e.nodeTextColor || e.textColor};
|
806
|
+
}
|
807
|
+
|
808
|
+
.edge-pattern-dashed {
|
809
|
+
stroke-dasharray: 8,8;
|
810
|
+
}
|
811
|
+
|
812
|
+
.node rect,
|
813
|
+
.node circle,
|
814
|
+
.node ellipse,
|
815
|
+
.node polygon
|
816
|
+
{
|
817
|
+
fill: ${e.mainBkg};
|
818
|
+
stroke: ${e.nodeBorder};
|
819
|
+
stroke-width: 1px;
|
820
|
+
}
|
821
|
+
|
822
|
+
.relationshipLine {
|
823
|
+
stroke: ${e.lineColor};
|
824
|
+
stroke-width: 1;
|
825
|
+
fill: none;
|
826
|
+
}
|
827
|
+
|
828
|
+
.marker {
|
829
|
+
fill: none !important;
|
830
|
+
stroke: ${e.lineColor} !important;
|
831
|
+
stroke-width: 1;
|
832
|
+
}
|
833
|
+
`, "getStyles"), $t = Jt, se = {
|
834
|
+
parser: Qt,
|
835
|
+
get db() {
|
836
|
+
return new Xt();
|
837
|
+
},
|
838
|
+
renderer: At,
|
839
|
+
styles: $t
|
840
|
+
};
|
841
|
+
export {
|
842
|
+
se as diagram
|
843
|
+
};
|