smart-chat-asp 2.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +364 -0
  2. package/README.zh.md +367 -0
  3. package/lib/Tableau10-2ff7471d.mjs +9 -0
  4. package/lib/arc-33fcfaff.mjs +86 -0
  5. package/lib/array-2ff2c7a6.mjs +6 -0
  6. package/lib/blockDiagram-38ab4fdb-3c912e88.mjs +1230 -0
  7. package/lib/c4Diagram-3d4e48cf-49908d37.mjs +1580 -0
  8. package/lib/channel-890a888a.mjs +5 -0
  9. package/lib/classDiagram-70f12bd4-ace7b178.mjs +221 -0
  10. package/lib/classDiagram-v2-f2320105-5848085d.mjs +207 -0
  11. package/lib/clone-59a3b16a.mjs +8 -0
  12. package/lib/createText-2e5e7dd3-898a4de3.mjs +2966 -0
  13. package/lib/edges-e0da2a9e-91b210e9.mjs +1083 -0
  14. package/lib/erDiagram-9861fffd-c13b7611.mjs +933 -0
  15. package/lib/favicon.ico +0 -0
  16. package/lib/favicon.svg +1 -0
  17. package/lib/flowDb-956e92f1-56fdcb20.mjs +1126 -0
  18. package/lib/flowDiagram-66a62f08-4023035a.mjs +798 -0
  19. package/lib/flowDiagram-v2-96b9c2cf-d28d8b17.mjs +26 -0
  20. package/lib/flowchart-elk-definition-4a651766-ab5b1391.mjs +48407 -0
  21. package/lib/ganttDiagram-c361ad54-ae59a5e3.mjs +2504 -0
  22. package/lib/gitGraphDiagram-72cf32ee-5bdf46bb.mjs +1265 -0
  23. package/lib/graph-9ea4e80a.mjs +512 -0
  24. package/lib/index-3862675e-b7177fa1.mjs +373 -0
  25. package/lib/index-958a220b.mjs +1470 -0
  26. package/lib/index-c42b0ff4.mjs +40 -0
  27. package/lib/index-f76d9453.mjs +28 -0
  28. package/lib/infoDiagram-f8f76790-5f3835f9.mjs +320 -0
  29. package/lib/init-f9637058.mjs +16 -0
  30. package/lib/journeyDiagram-49397b02-df06b21d.mjs +805 -0
  31. package/lib/layout-d3bc02b9.mjs +1495 -0
  32. package/lib/line-b044df13.mjs +34 -0
  33. package/lib/linear-e60140ad.mjs +447 -0
  34. package/lib/main-740da2e1.mjs +117801 -0
  35. package/lib/mindmap-definition-fc14e90a-3bfaf2a6.mjs +19384 -0
  36. package/lib/ordinal-980380c7.mjs +65 -0
  37. package/lib/path-428ebac9.mjs +91 -0
  38. package/lib/pieDiagram-8a3498a8-a8359c54.mjs +503 -0
  39. package/lib/pwa-192x192.png +0 -0
  40. package/lib/pwa-512x512.png +0 -0
  41. package/lib/quadrantDiagram-120e2f19-367eeae7.mjs +905 -0
  42. package/lib/requirementDiagram-deff3bca-27d1e96b.mjs +770 -0
  43. package/lib/sankeyDiagram-04a897e0-a9e993ee.mjs +818 -0
  44. package/lib/sequenceDiagram-704730f1-05f9d7b1.mjs +2235 -0
  45. package/lib/smart-chat.es.js +5 -0
  46. package/lib/smart-chat.umd.js +5444 -0
  47. package/lib/stateDiagram-587899a1-f3e4a81e.mjs +269 -0
  48. package/lib/stateDiagram-v2-d93cdb3a-763ad0ff.mjs +191 -0
  49. package/lib/style.css +1 -0
  50. package/lib/styles-6aaf32cf-e32ec570.mjs +960 -0
  51. package/lib/styles-9a916d00-18b5fd0d.mjs +1089 -0
  52. package/lib/styles-c10674c1-134300a0.mjs +433 -0
  53. package/lib/svgDrawCommon-08f97a94-f04d54dc.mjs +64 -0
  54. package/lib/timeline-definition-85554ec2-1989252c.mjs +796 -0
  55. package/lib/xychartDiagram-e933f94c-f7d5a550.mjs +1285 -0
  56. package/license +21 -0
  57. package/package.json +79 -0
@@ -0,0 +1,1230 @@
1
+ import { Y as he, aJ as se, a1 as H, a3 as ye, a2 as S, ao as Ee, al as we, a5 as De, a9 as ve } from "./main-740da2e1.mjs";
2
+ import { c as Ne } from "./clone-59a3b16a.mjs";
3
+ import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./edges-e0da2a9e-91b210e9.mjs";
4
+ import { G as Ce } from "./graph-9ea4e80a.mjs";
5
+ import { o as Ae } from "./ordinal-980380c7.mjs";
6
+ import { s as Re } from "./Tableau10-2ff7471d.mjs";
7
+ import { c as Be } from "./channel-890a888a.mjs";
8
+ import "vue";
9
+ import "./createText-2e5e7dd3-898a4de3.mjs";
10
+ import "./line-b044df13.mjs";
11
+ import "./array-2ff2c7a6.mjs";
12
+ import "./path-428ebac9.mjs";
13
+ import "./init-f9637058.mjs";
14
+ var le, oe, ee = function() {
15
+ var e = function(D, o, s, i) {
16
+ for (s = s || {}, i = D.length; i--; s[D[i]] = o)
17
+ ;
18
+ return s;
19
+ }, a = [1, 7], d = [1, 13], c = [1, 14], n = [1, 15], g = [1, 19], l = [1, 16], f = [1, 17], b = [1, 18], p = [8, 30], x = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], y = [1, 23], T = [1, 24], v = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], N = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], E = [1, 49], L = {
20
+ trace: function() {
21
+ },
22
+ yy: {},
23
+ symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, block: 31, NODE_ID: 32, nodeShapeNLabel: 33, dirList: 34, DIR: 35, NODE_DSTART: 36, NODE_DEND: 37, BLOCK_ARROW_START: 38, BLOCK_ARROW_END: 39, classDef: 40, CLASSDEF_ID: 41, CLASSDEF_STYLEOPTS: 42, DEFAULT: 43, class: 44, CLASSENTITY_IDS: 45, STYLECLASS: 46, style: 47, STYLE_ENTITY_IDS: 48, STYLE_DEFINITION_DATA: 49, $accept: 0, $end: 1 },
24
+ terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "block", 32: "NODE_ID", 35: "DIR", 36: "NODE_DSTART", 37: "NODE_DEND", 38: "BLOCK_ARROW_START", 39: "BLOCK_ARROW_END", 40: "classDef", 41: "CLASSDEF_ID", 42: "CLASSDEF_STYLEOPTS", 43: "DEFAULT", 44: "class", 45: "CLASSENTITY_IDS", 46: "STYLECLASS", 47: "style", 48: "STYLE_ENTITY_IDS", 49: "STYLE_DEFINITION_DATA" },
25
+ productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [34, 1], [34, 2], [33, 3], [33, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
26
+ performAction: function(o, s, i, u, h, t, m) {
27
+ var r = t.length - 1;
28
+ switch (h) {
29
+ case 4:
30
+ u.getLogger().debug("Rule: separator (NL) ");
31
+ break;
32
+ case 5:
33
+ u.getLogger().debug("Rule: separator (Space) ");
34
+ break;
35
+ case 6:
36
+ u.getLogger().debug("Rule: separator (EOF) ");
37
+ break;
38
+ case 7:
39
+ u.getLogger().debug("Rule: hierarchy: ", t[r - 1]), u.setHierarchy(t[r - 1]);
40
+ break;
41
+ case 8:
42
+ u.getLogger().debug("Stop NL ");
43
+ break;
44
+ case 9:
45
+ u.getLogger().debug("Stop EOF ");
46
+ break;
47
+ case 10:
48
+ u.getLogger().debug("Stop NL2 ");
49
+ break;
50
+ case 11:
51
+ u.getLogger().debug("Stop EOF2 ");
52
+ break;
53
+ case 12:
54
+ u.getLogger().debug("Rule: statement: ", t[r]), typeof t[r].length == "number" ? this.$ = t[r] : this.$ = [t[r]];
55
+ break;
56
+ case 13:
57
+ u.getLogger().debug("Rule: statement #2: ", t[r - 1]), this.$ = [t[r - 1]].concat(t[r]);
58
+ break;
59
+ case 14:
60
+ u.getLogger().debug("Rule: link: ", t[r], o), this.$ = { edgeTypeStr: t[r], label: "" };
61
+ break;
62
+ case 15:
63
+ u.getLogger().debug("Rule: LABEL link: ", t[r - 3], t[r - 1], t[r]), this.$ = { edgeTypeStr: t[r], label: t[r - 1] };
64
+ break;
65
+ case 18:
66
+ const R = parseInt(t[r]), Y = u.generateId();
67
+ this.$ = { id: Y, type: "space", label: "", width: R, children: [] };
68
+ break;
69
+ case 23:
70
+ u.getLogger().debug("Rule: (nodeStatement link node) ", t[r - 2], t[r - 1], t[r], " typestr: ", t[r - 1].edgeTypeStr);
71
+ const F = u.edgeStrToEdgeData(t[r - 1].edgeTypeStr);
72
+ this.$ = [
73
+ { id: t[r - 2].id, label: t[r - 2].label, type: t[r - 2].type, directions: t[r - 2].directions },
74
+ { id: t[r - 2].id + "-" + t[r].id, start: t[r - 2].id, end: t[r].id, label: t[r - 1].label, type: "edge", directions: t[r].directions, arrowTypeEnd: F, arrowTypeStart: "arrow_open" },
75
+ { id: t[r].id, label: t[r].label, type: u.typeStr2Type(t[r].typeStr), directions: t[r].directions }
76
+ ];
77
+ break;
78
+ case 24:
79
+ u.getLogger().debug("Rule: nodeStatement (abc88 node size) ", t[r - 1], t[r]), this.$ = { id: t[r - 1].id, label: t[r - 1].label, type: u.typeStr2Type(t[r - 1].typeStr), directions: t[r - 1].directions, widthInColumns: parseInt(t[r], 10) };
80
+ break;
81
+ case 25:
82
+ u.getLogger().debug("Rule: nodeStatement (node) ", t[r]), this.$ = { id: t[r].id, label: t[r].label, type: u.typeStr2Type(t[r].typeStr), directions: t[r].directions, widthInColumns: 1 };
83
+ break;
84
+ case 26:
85
+ u.getLogger().debug("APA123", this ? this : "na"), u.getLogger().debug("COLUMNS: ", t[r]), this.$ = { type: "column-setting", columns: t[r] === "auto" ? -1 : parseInt(t[r]) };
86
+ break;
87
+ case 27:
88
+ u.getLogger().debug("Rule: id-block statement : ", t[r - 2], t[r - 1]), u.generateId(), this.$ = { ...t[r - 2], type: "composite", children: t[r - 1] };
89
+ break;
90
+ case 28:
91
+ u.getLogger().debug("Rule: blockStatement : ", t[r - 2], t[r - 1], t[r]);
92
+ const C = u.generateId();
93
+ this.$ = { id: C, type: "composite", label: "", children: t[r - 1] };
94
+ break;
95
+ case 29:
96
+ u.getLogger().debug("Rule: node (NODE_ID separator): ", t[r]), this.$ = { id: t[r] };
97
+ break;
98
+ case 30:
99
+ u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", t[r - 1], t[r]), this.$ = { id: t[r - 1], label: t[r].label, typeStr: t[r].typeStr, directions: t[r].directions };
100
+ break;
101
+ case 31:
102
+ u.getLogger().debug("Rule: dirList: ", t[r]), this.$ = [t[r]];
103
+ break;
104
+ case 32:
105
+ u.getLogger().debug("Rule: dirList: ", t[r - 1], t[r]), this.$ = [t[r - 1]].concat(t[r]);
106
+ break;
107
+ case 33:
108
+ u.getLogger().debug("Rule: nodeShapeNLabel: ", t[r - 2], t[r - 1], t[r]), this.$ = { typeStr: t[r - 2] + t[r], label: t[r - 1] };
109
+ break;
110
+ case 34:
111
+ u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", t[r - 3], t[r - 2], " #3:", t[r - 1], t[r]), this.$ = { typeStr: t[r - 3] + t[r], label: t[r - 2], directions: t[r - 1] };
112
+ break;
113
+ case 35:
114
+ case 36:
115
+ this.$ = { type: "classDef", id: t[r - 1].trim(), css: t[r].trim() };
116
+ break;
117
+ case 37:
118
+ this.$ = { type: "applyClass", id: t[r - 1].trim(), styleClass: t[r].trim() };
119
+ break;
120
+ case 38:
121
+ this.$ = { type: "applyStyles", id: t[r - 1].trim(), stylesStr: t[r].trim() };
122
+ break;
123
+ }
124
+ },
125
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 8: [1, 20] }, e(p, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: a, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }), e(x, [2, 16], { 14: 22, 15: y, 16: T }), e(x, [2, 17]), e(x, [2, 18]), e(x, [2, 19]), e(x, [2, 20]), e(x, [2, 21]), e(x, [2, 22]), e(v, [2, 25], { 27: [1, 25] }), e(x, [2, 26]), { 19: 26, 26: 12, 32: g }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(N, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(p, [2, 13]), { 26: 35, 32: g }, { 32: [2, 14] }, { 17: [1, 36] }, e(v, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: y, 16: T, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(N, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(v, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(x, [2, 28]), e(x, [2, 35]), e(x, [2, 36]), e(x, [2, 37]), e(x, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: E }, { 15: [1, 50] }, e(x, [2, 27]), e(N, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: E, 39: [2, 31] }, { 32: [2, 15] }, e(N, [2, 34]), { 39: [2, 32] }],
126
+ defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
127
+ parseError: function(o, s) {
128
+ if (s.recoverable)
129
+ this.trace(o);
130
+ else {
131
+ var i = new Error(o);
132
+ throw i.hash = s, i;
133
+ }
134
+ },
135
+ parse: function(o) {
136
+ var s = this, i = [0], u = [], h = [null], t = [], m = this.table, r = "", R = 0, Y = 0, F = 2, C = 1, Le = t.slice.call(arguments, 1), w = Object.create(this.lexer), K = { yy: {} };
137
+ for (var J in this.yy)
138
+ Object.prototype.hasOwnProperty.call(this.yy, J) && (K.yy[J] = this.yy[J]);
139
+ w.setInput(o, K.yy), K.yy.lexer = w, K.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
140
+ var Z = w.yylloc;
141
+ t.push(Z);
142
+ var me = w.options && w.options.ranges;
143
+ typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
144
+ function _e() {
145
+ var P;
146
+ return P = u.pop() || w.lex() || C, typeof P != "number" && (P instanceof Array && (u = P, P = u.pop()), P = s.symbols_[P] || P), P;
147
+ }
148
+ for (var I, M, z, Q, W = {}, X, B, ae, G; ; ) {
149
+ if (M = i[i.length - 1], this.defaultActions[M] ? z = this.defaultActions[M] : ((I === null || typeof I > "u") && (I = _e()), z = m[M] && m[M][I]), typeof z > "u" || !z.length || !z[0]) {
150
+ var $ = "";
151
+ G = [];
152
+ for (X in m[M])
153
+ this.terminals_[X] && X > F && G.push("'" + this.terminals_[X] + "'");
154
+ w.showPosition ? $ = "Parse error on line " + (R + 1) + `:
155
+ ` + w.showPosition() + `
156
+ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : $ = "Parse error on line " + (R + 1) + ": Unexpected " + (I == C ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError($, {
157
+ text: w.match,
158
+ token: this.terminals_[I] || I,
159
+ line: w.yylineno,
160
+ loc: Z,
161
+ expected: G
162
+ });
163
+ }
164
+ if (z[0] instanceof Array && z.length > 1)
165
+ throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + I);
166
+ switch (z[0]) {
167
+ case 1:
168
+ i.push(I), h.push(w.yytext), t.push(w.yylloc), i.push(z[1]), I = null, Y = w.yyleng, r = w.yytext, R = w.yylineno, Z = w.yylloc;
169
+ break;
170
+ case 2:
171
+ if (B = this.productions_[z[1]][1], W.$ = h[h.length - B], W._$ = {
172
+ first_line: t[t.length - (B || 1)].first_line,
173
+ last_line: t[t.length - 1].last_line,
174
+ first_column: t[t.length - (B || 1)].first_column,
175
+ last_column: t[t.length - 1].last_column
176
+ }, me && (W._$.range = [
177
+ t[t.length - (B || 1)].range[0],
178
+ t[t.length - 1].range[1]
179
+ ]), Q = this.performAction.apply(W, [
180
+ r,
181
+ Y,
182
+ R,
183
+ K.yy,
184
+ z[1],
185
+ h,
186
+ t
187
+ ].concat(Le)), typeof Q < "u")
188
+ return Q;
189
+ B && (i = i.slice(0, -1 * B * 2), h = h.slice(0, -1 * B), t = t.slice(0, -1 * B)), i.push(this.productions_[z[1]][0]), h.push(W.$), t.push(W._$), ae = m[i[i.length - 2]][i[i.length - 1]], i.push(ae);
190
+ break;
191
+ case 3:
192
+ return !0;
193
+ }
194
+ }
195
+ return !0;
196
+ }
197
+ }, A = function() {
198
+ var D = {
199
+ EOF: 1,
200
+ parseError: function(s, i) {
201
+ if (this.yy.parser)
202
+ this.yy.parser.parseError(s, i);
203
+ else
204
+ throw new Error(s);
205
+ },
206
+ // resets the lexer, sets new input
207
+ setInput: function(o, s) {
208
+ return this.yy = s || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
209
+ first_line: 1,
210
+ first_column: 0,
211
+ last_line: 1,
212
+ last_column: 0
213
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
214
+ },
215
+ // consumes and returns one char from the input
216
+ input: function() {
217
+ var o = this._input[0];
218
+ this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
219
+ var s = o.match(/(?:\r\n?|\n).*/g);
220
+ return s ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
221
+ },
222
+ // unshifts one char (or a string) into the input
223
+ unput: function(o) {
224
+ var s = o.length, i = o.split(/(?:\r\n?|\n)/g);
225
+ this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - s), this.offset -= s;
226
+ var u = this.match.split(/(?:\r\n?|\n)/g);
227
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), i.length - 1 && (this.yylineno -= i.length - 1);
228
+ var h = this.yylloc.range;
229
+ return this.yylloc = {
230
+ first_line: this.yylloc.first_line,
231
+ last_line: this.yylineno + 1,
232
+ first_column: this.yylloc.first_column,
233
+ last_column: i ? (i.length === u.length ? this.yylloc.first_column : 0) + u[u.length - i.length].length - i[0].length : this.yylloc.first_column - s
234
+ }, this.options.ranges && (this.yylloc.range = [h[0], h[0] + this.yyleng - s]), this.yyleng = this.yytext.length, this;
235
+ },
236
+ // When called from action, caches matched text and appends it on next action
237
+ more: function() {
238
+ return this._more = !0, this;
239
+ },
240
+ // 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.
241
+ reject: function() {
242
+ if (this.options.backtrack_lexer)
243
+ this._backtrack = !0;
244
+ else
245
+ 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).
246
+ ` + this.showPosition(), {
247
+ text: "",
248
+ token: null,
249
+ line: this.yylineno
250
+ });
251
+ return this;
252
+ },
253
+ // retain first n characters of the match
254
+ less: function(o) {
255
+ this.unput(this.match.slice(o));
256
+ },
257
+ // displays already matched input, i.e. for error messages
258
+ pastInput: function() {
259
+ var o = this.matched.substr(0, this.matched.length - this.match.length);
260
+ return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
261
+ },
262
+ // displays upcoming input, i.e. for error messages
263
+ upcomingInput: function() {
264
+ var o = this.match;
265
+ return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
266
+ },
267
+ // displays the character position where the lexing error occurred, i.e. for error messages
268
+ showPosition: function() {
269
+ var o = this.pastInput(), s = new Array(o.length + 1).join("-");
270
+ return o + this.upcomingInput() + `
271
+ ` + s + "^";
272
+ },
273
+ // test the lexed token: return FALSE when not a match, otherwise return token
274
+ test_match: function(o, s) {
275
+ var i, u, h;
276
+ if (this.options.backtrack_lexer && (h = {
277
+ yylineno: this.yylineno,
278
+ yylloc: {
279
+ first_line: this.yylloc.first_line,
280
+ last_line: this.last_line,
281
+ first_column: this.yylloc.first_column,
282
+ last_column: this.yylloc.last_column
283
+ },
284
+ yytext: this.yytext,
285
+ match: this.match,
286
+ matches: this.matches,
287
+ matched: this.matched,
288
+ yyleng: this.yyleng,
289
+ offset: this.offset,
290
+ _more: this._more,
291
+ _input: this._input,
292
+ yy: this.yy,
293
+ conditionStack: this.conditionStack.slice(0),
294
+ done: this.done
295
+ }, this.options.ranges && (h.yylloc.range = this.yylloc.range.slice(0))), u = o[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
296
+ first_line: this.yylloc.last_line,
297
+ last_line: this.yylineno + 1,
298
+ first_column: this.yylloc.last_column,
299
+ last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
300
+ }, this.yytext += o[0], this.match += o[0], this.matches = o, 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(o[0].length), this.matched += o[0], i = this.performAction.call(this, this.yy, this, s, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), i)
301
+ return i;
302
+ if (this._backtrack) {
303
+ for (var t in h)
304
+ this[t] = h[t];
305
+ return !1;
306
+ }
307
+ return !1;
308
+ },
309
+ // return next match in input
310
+ next: function() {
311
+ if (this.done)
312
+ return this.EOF;
313
+ this._input || (this.done = !0);
314
+ var o, s, i, u;
315
+ this._more || (this.yytext = "", this.match = "");
316
+ for (var h = this._currentRules(), t = 0; t < h.length; t++)
317
+ if (i = this._input.match(this.rules[h[t]]), i && (!s || i[0].length > s[0].length)) {
318
+ if (s = i, u = t, this.options.backtrack_lexer) {
319
+ if (o = this.test_match(i, h[t]), o !== !1)
320
+ return o;
321
+ if (this._backtrack) {
322
+ s = !1;
323
+ continue;
324
+ } else
325
+ return !1;
326
+ } else if (!this.options.flex)
327
+ break;
328
+ }
329
+ return s ? (o = this.test_match(s, h[u]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
330
+ ` + this.showPosition(), {
331
+ text: "",
332
+ token: null,
333
+ line: this.yylineno
334
+ });
335
+ },
336
+ // return next match that has a token
337
+ lex: function() {
338
+ var s = this.next();
339
+ return s || this.lex();
340
+ },
341
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
342
+ begin: function(s) {
343
+ this.conditionStack.push(s);
344
+ },
345
+ // pop the previously active lexer condition state off the condition stack
346
+ popState: function() {
347
+ var s = this.conditionStack.length - 1;
348
+ return s > 0 ? this.conditionStack.pop() : this.conditionStack[0];
349
+ },
350
+ // produce the lexer rule set which is active for the currently active lexer condition state
351
+ _currentRules: function() {
352
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
353
+ },
354
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
355
+ topState: function(s) {
356
+ return s = this.conditionStack.length - 1 - Math.abs(s || 0), s >= 0 ? this.conditionStack[s] : "INITIAL";
357
+ },
358
+ // alias for begin(condition)
359
+ pushState: function(s) {
360
+ this.begin(s);
361
+ },
362
+ // return the number of states currently on the stack
363
+ stateStackSize: function() {
364
+ return this.conditionStack.length;
365
+ },
366
+ options: {},
367
+ performAction: function(s, i, u, h) {
368
+ switch (u) {
369
+ case 0:
370
+ return 10;
371
+ case 1:
372
+ return s.getLogger().debug("Found space-block"), 31;
373
+ case 2:
374
+ return s.getLogger().debug("Found nl-block"), 31;
375
+ case 3:
376
+ return s.getLogger().debug("Found space-block"), 29;
377
+ case 4:
378
+ s.getLogger().debug(".", i.yytext);
379
+ break;
380
+ case 5:
381
+ s.getLogger().debug("_", i.yytext);
382
+ break;
383
+ case 6:
384
+ return 5;
385
+ case 7:
386
+ return i.yytext = -1, 28;
387
+ case 8:
388
+ return i.yytext = i.yytext.replace(/columns\s+/, ""), s.getLogger().debug("COLUMNS (LEX)", i.yytext), 28;
389
+ case 9:
390
+ this.pushState("md_string");
391
+ break;
392
+ case 10:
393
+ return "MD_STR";
394
+ case 11:
395
+ this.popState();
396
+ break;
397
+ case 12:
398
+ this.pushState("string");
399
+ break;
400
+ case 13:
401
+ s.getLogger().debug("LEX: POPPING STR:", i.yytext), this.popState();
402
+ break;
403
+ case 14:
404
+ return s.getLogger().debug("LEX: STR end:", i.yytext), "STR";
405
+ case 15:
406
+ return i.yytext = i.yytext.replace(/space\:/, ""), s.getLogger().debug("SPACE NUM (LEX)", i.yytext), 21;
407
+ case 16:
408
+ return i.yytext = "1", s.getLogger().debug("COLUMNS (LEX)", i.yytext), 21;
409
+ case 17:
410
+ return 43;
411
+ case 18:
412
+ return "LINKSTYLE";
413
+ case 19:
414
+ return "INTERPOLATE";
415
+ case 20:
416
+ return this.pushState("CLASSDEF"), 40;
417
+ case 21:
418
+ return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
419
+ case 22:
420
+ return this.popState(), this.pushState("CLASSDEFID"), 41;
421
+ case 23:
422
+ return this.popState(), 42;
423
+ case 24:
424
+ return this.pushState("CLASS"), 44;
425
+ case 25:
426
+ return this.popState(), this.pushState("CLASS_STYLE"), 45;
427
+ case 26:
428
+ return this.popState(), 46;
429
+ case 27:
430
+ return this.pushState("STYLE_STMNT"), 47;
431
+ case 28:
432
+ return this.popState(), this.pushState("STYLE_DEFINITION"), 48;
433
+ case 29:
434
+ return this.popState(), 49;
435
+ case 30:
436
+ return this.pushState("acc_title"), "acc_title";
437
+ case 31:
438
+ return this.popState(), "acc_title_value";
439
+ case 32:
440
+ return this.pushState("acc_descr"), "acc_descr";
441
+ case 33:
442
+ return this.popState(), "acc_descr_value";
443
+ case 34:
444
+ this.pushState("acc_descr_multiline");
445
+ break;
446
+ case 35:
447
+ this.popState();
448
+ break;
449
+ case 36:
450
+ return "acc_descr_multiline_value";
451
+ case 37:
452
+ return 30;
453
+ case 38:
454
+ return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
455
+ case 39:
456
+ return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
457
+ case 40:
458
+ return this.popState(), s.getLogger().debug("Lex: ))"), "NODE_DEND";
459
+ case 41:
460
+ return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
461
+ case 42:
462
+ return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
463
+ case 43:
464
+ return this.popState(), s.getLogger().debug("Lex: (-"), "NODE_DEND";
465
+ case 44:
466
+ return this.popState(), s.getLogger().debug("Lex: -)"), "NODE_DEND";
467
+ case 45:
468
+ return this.popState(), s.getLogger().debug("Lex: (("), "NODE_DEND";
469
+ case 46:
470
+ return this.popState(), s.getLogger().debug("Lex: ]]"), "NODE_DEND";
471
+ case 47:
472
+ return this.popState(), s.getLogger().debug("Lex: ("), "NODE_DEND";
473
+ case 48:
474
+ return this.popState(), s.getLogger().debug("Lex: ])"), "NODE_DEND";
475
+ case 49:
476
+ return this.popState(), s.getLogger().debug("Lex: /]"), "NODE_DEND";
477
+ case 50:
478
+ return this.popState(), s.getLogger().debug("Lex: /]"), "NODE_DEND";
479
+ case 51:
480
+ return this.popState(), s.getLogger().debug("Lex: )]"), "NODE_DEND";
481
+ case 52:
482
+ return this.popState(), s.getLogger().debug("Lex: )"), "NODE_DEND";
483
+ case 53:
484
+ return this.popState(), s.getLogger().debug("Lex: ]>"), "NODE_DEND";
485
+ case 54:
486
+ return this.popState(), s.getLogger().debug("Lex: ]"), "NODE_DEND";
487
+ case 55:
488
+ return s.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 36;
489
+ case 56:
490
+ return s.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 36;
491
+ case 57:
492
+ return s.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 36;
493
+ case 58:
494
+ return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
495
+ case 59:
496
+ return s.getLogger().debug("Lex: ((("), this.pushState("NODE"), 36;
497
+ case 60:
498
+ return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
499
+ case 61:
500
+ return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
501
+ case 62:
502
+ return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
503
+ case 63:
504
+ return s.getLogger().debug("Lexc: >"), this.pushState("NODE"), 36;
505
+ case 64:
506
+ return s.getLogger().debug("Lexa: (["), this.pushState("NODE"), 36;
507
+ case 65:
508
+ return s.getLogger().debug("Lexa: )"), this.pushState("NODE"), 36;
509
+ case 66:
510
+ return this.pushState("NODE"), 36;
511
+ case 67:
512
+ return this.pushState("NODE"), 36;
513
+ case 68:
514
+ return this.pushState("NODE"), 36;
515
+ case 69:
516
+ return this.pushState("NODE"), 36;
517
+ case 70:
518
+ return this.pushState("NODE"), 36;
519
+ case 71:
520
+ return this.pushState("NODE"), 36;
521
+ case 72:
522
+ return this.pushState("NODE"), 36;
523
+ case 73:
524
+ return s.getLogger().debug("Lexa: ["), this.pushState("NODE"), 36;
525
+ case 74:
526
+ return this.pushState("BLOCK_ARROW"), s.getLogger().debug("LEX ARR START"), 38;
527
+ case 75:
528
+ return s.getLogger().debug("Lex: NODE_ID", i.yytext), 32;
529
+ case 76:
530
+ return s.getLogger().debug("Lex: EOF", i.yytext), 8;
531
+ case 77:
532
+ this.pushState("md_string");
533
+ break;
534
+ case 78:
535
+ this.pushState("md_string");
536
+ break;
537
+ case 79:
538
+ return "NODE_DESCR";
539
+ case 80:
540
+ this.popState();
541
+ break;
542
+ case 81:
543
+ s.getLogger().debug("Lex: Starting string"), this.pushState("string");
544
+ break;
545
+ case 82:
546
+ s.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
547
+ break;
548
+ case 83:
549
+ return s.getLogger().debug("LEX: NODE_DESCR:", i.yytext), "NODE_DESCR";
550
+ case 84:
551
+ s.getLogger().debug("LEX POPPING"), this.popState();
552
+ break;
553
+ case 85:
554
+ s.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
555
+ break;
556
+ case 86:
557
+ return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (right): dir:", i.yytext), "DIR";
558
+ case 87:
559
+ return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (left):", i.yytext), "DIR";
560
+ case 88:
561
+ return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (x):", i.yytext), "DIR";
562
+ case 89:
563
+ return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (y):", i.yytext), "DIR";
564
+ case 90:
565
+ return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (up):", i.yytext), "DIR";
566
+ case 91:
567
+ return i.yytext = i.yytext.replace(/^,\s*/, ""), s.getLogger().debug("Lex (down):", i.yytext), "DIR";
568
+ case 92:
569
+ return i.yytext = "]>", s.getLogger().debug("Lex (ARROW_DIR end):", i.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
570
+ case 93:
571
+ return s.getLogger().debug("Lex: LINK", "#" + i.yytext + "#"), 15;
572
+ case 94:
573
+ return s.getLogger().debug("Lex: LINK", i.yytext), 15;
574
+ case 95:
575
+ return s.getLogger().debug("Lex: LINK", i.yytext), 15;
576
+ case 96:
577
+ return s.getLogger().debug("Lex: LINK", i.yytext), 15;
578
+ case 97:
579
+ return s.getLogger().debug("Lex: START_LINK", i.yytext), this.pushState("LLABEL"), 16;
580
+ case 98:
581
+ return s.getLogger().debug("Lex: START_LINK", i.yytext), this.pushState("LLABEL"), 16;
582
+ case 99:
583
+ return s.getLogger().debug("Lex: START_LINK", i.yytext), this.pushState("LLABEL"), 16;
584
+ case 100:
585
+ this.pushState("md_string");
586
+ break;
587
+ case 101:
588
+ return s.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
589
+ case 102:
590
+ return this.popState(), s.getLogger().debug("Lex: LINK", "#" + i.yytext + "#"), 15;
591
+ case 103:
592
+ return this.popState(), s.getLogger().debug("Lex: LINK", i.yytext), 15;
593
+ case 104:
594
+ return this.popState(), s.getLogger().debug("Lex: LINK", i.yytext), 15;
595
+ case 105:
596
+ return s.getLogger().debug("Lex: COLON", i.yytext), i.yytext = i.yytext.slice(1), 27;
597
+ }
598
+ },
599
+ rules: [/^(?:block-beta\b)/, /^(?:block\s+)/, /^(?:block\n+)/, /^(?:block:)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
600
+ conditions: { STYLE_DEFINITION: { rules: [29], inclusive: !1 }, STYLE_STMNT: { rules: [28], inclusive: !1 }, CLASSDEFID: { rules: [23], inclusive: !1 }, CLASSDEF: { rules: [21, 22], inclusive: !1 }, CLASS_STYLE: { rules: [26], inclusive: !1 }, CLASS: { rules: [25], inclusive: !1 }, LLABEL: { rules: [100, 101, 102, 103, 104], inclusive: !1 }, ARROW_DIR: { rules: [86, 87, 88, 89, 90, 91, 92], inclusive: !1 }, BLOCK_ARROW: { rules: [77, 82, 85], inclusive: !1 }, NODE: { rules: [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 78, 81], inclusive: !1 }, md_string: { rules: [10, 11, 79, 80], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [13, 14, 83, 84], inclusive: !1 }, acc_descr_multiline: { rules: [35, 36], inclusive: !1 }, acc_descr: { rules: [33], inclusive: !1 }, acc_title: { rules: [31], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 16, 17, 18, 19, 20, 24, 27, 30, 32, 34, 37, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 93, 94, 95, 96, 97, 98, 99, 105], inclusive: !0 } }
601
+ };
602
+ return D;
603
+ }();
604
+ L.lexer = A;
605
+ function k() {
606
+ this.yy = {};
607
+ }
608
+ return k.prototype = L, L.Parser = k, new k();
609
+ }();
610
+ ee.parser = ee;
611
+ const Pe = ee;
612
+ let O = {}, ie = [], V = {};
613
+ const ce = "color", ue = "fill", Fe = "bgFill", pe = ",", Ke = he();
614
+ let j = {};
615
+ const Me = (e) => De.sanitizeText(e, Ke), Ye = function(e, a = "") {
616
+ j[e] === void 0 && (j[e] = { id: e, styles: [], textStyles: [] });
617
+ const d = j[e];
618
+ a != null && a.split(pe).forEach((c) => {
619
+ const n = c.replace(/([^;]*);/, "$1").trim();
620
+ if (c.match(ce)) {
621
+ const l = n.replace(ue, Fe).replace(ce, ue);
622
+ d.textStyles.push(l);
623
+ }
624
+ d.styles.push(n);
625
+ });
626
+ }, We = function(e, a = "") {
627
+ const d = O[e];
628
+ a != null && (d.styles = a.split(pe));
629
+ }, Ve = function(e, a) {
630
+ e.split(",").forEach(function(d) {
631
+ let c = O[d];
632
+ if (c === void 0) {
633
+ const n = d.trim();
634
+ O[n] = { id: n, type: "na", children: [] }, c = O[n];
635
+ }
636
+ c.classes || (c.classes = []), c.classes.push(a);
637
+ });
638
+ }, fe = (e, a) => {
639
+ const d = e.flat(), c = [];
640
+ for (const n of d) {
641
+ if (n.label && (n.label = Me(n.label)), n.type === "classDef") {
642
+ Ye(n.id, n.css);
643
+ continue;
644
+ }
645
+ if (n.type === "applyClass") {
646
+ Ve(n.id, (n == null ? void 0 : n.styleClass) || "");
647
+ continue;
648
+ }
649
+ if (n.type === "applyStyles") {
650
+ n != null && n.stylesStr && We(n.id, n == null ? void 0 : n.stylesStr);
651
+ continue;
652
+ }
653
+ if (n.type === "column-setting")
654
+ a.columns = n.columns || -1;
655
+ else if (n.type === "edge")
656
+ V[n.id] ? V[n.id]++ : V[n.id] = 1, n.id = V[n.id] + "-" + n.id, ie.push(n);
657
+ else {
658
+ n.label || (n.type === "composite" ? n.label = "" : n.label = n.id);
659
+ const g = !O[n.id];
660
+ if (g ? O[n.id] = n : (n.type !== "na" && (O[n.id].type = n.type), n.label !== n.id && (O[n.id].label = n.label)), n.children && fe(n.children, n), n.type === "space") {
661
+ const l = n.width || 1;
662
+ for (let f = 0; f < l; f++) {
663
+ const b = Ne(n);
664
+ b.id = b.id + "-" + f, O[b.id] = b, c.push(b);
665
+ }
666
+ } else
667
+ g && c.push(n);
668
+ }
669
+ }
670
+ a.children = c;
671
+ };
672
+ let re = [], U = { id: "root", type: "composite", children: [], columns: -1 };
673
+ const je = () => {
674
+ S.debug("Clear called"), Ee(), U = { id: "root", type: "composite", children: [], columns: -1 }, O = { root: U }, re = [], j = {}, ie = [], V = {};
675
+ };
676
+ function Ue(e) {
677
+ switch (S.debug("typeStr2Type", e), e) {
678
+ case "[]":
679
+ return "square";
680
+ case "()":
681
+ return S.debug("we have a round"), "round";
682
+ case "(())":
683
+ return "circle";
684
+ case ">]":
685
+ return "rect_left_inv_arrow";
686
+ case "{}":
687
+ return "diamond";
688
+ case "{{}}":
689
+ return "hexagon";
690
+ case "([])":
691
+ return "stadium";
692
+ case "[[]]":
693
+ return "subroutine";
694
+ case "[()]":
695
+ return "cylinder";
696
+ case "((()))":
697
+ return "doublecircle";
698
+ case "[//]":
699
+ return "lean_right";
700
+ case "[\\\\]":
701
+ return "lean_left";
702
+ case "[/\\]":
703
+ return "trapezoid";
704
+ case "[\\/]":
705
+ return "inv_trapezoid";
706
+ case "<[]>":
707
+ return "block_arrow";
708
+ default:
709
+ return "na";
710
+ }
711
+ }
712
+ function Xe(e) {
713
+ switch (S.debug("typeStr2Type", e), e) {
714
+ case "==":
715
+ return "thick";
716
+ default:
717
+ return "normal";
718
+ }
719
+ }
720
+ function Ge(e) {
721
+ switch (e.trim()) {
722
+ case "--x":
723
+ return "arrow_cross";
724
+ case "--o":
725
+ return "arrow_circle";
726
+ default:
727
+ return "arrow_point";
728
+ }
729
+ }
730
+ let de = 0;
731
+ const He = () => (de++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + de), qe = (e) => {
732
+ U.children = e, fe(e, U), re = U.children;
733
+ }, Je = (e) => {
734
+ const a = O[e];
735
+ return a ? a.columns ? a.columns : a.children ? a.children.length : -1 : -1;
736
+ }, Ze = () => [...Object.values(O)], Qe = () => re || [], $e = () => ie, et = (e) => O[e], tt = (e) => {
737
+ O[e.id] = e;
738
+ }, st = () => console, it = function() {
739
+ return j;
740
+ }, rt = {
741
+ getConfig: () => se().block,
742
+ typeStr2Type: Ue,
743
+ edgeTypeStr2Type: Xe,
744
+ edgeStrToEdgeData: Ge,
745
+ getLogger: st,
746
+ getBlocksFlat: Ze,
747
+ getBlocks: Qe,
748
+ getEdges: $e,
749
+ setHierarchy: qe,
750
+ getBlock: et,
751
+ setBlock: tt,
752
+ getColumns: Je,
753
+ getClasses: it,
754
+ clear: je,
755
+ generateId: He
756
+ }, nt = rt, q = (e, a) => {
757
+ const d = Be, c = d(e, "r"), n = d(e, "g"), g = d(e, "b");
758
+ return we(c, n, g, a);
759
+ }, at = (e) => `.label {
760
+ font-family: ${e.fontFamily};
761
+ color: ${e.nodeTextColor || e.textColor};
762
+ }
763
+ .cluster-label text {
764
+ fill: ${e.titleColor};
765
+ }
766
+ .cluster-label span,p {
767
+ color: ${e.titleColor};
768
+ }
769
+
770
+
771
+
772
+ .label text,span,p {
773
+ fill: ${e.nodeTextColor || e.textColor};
774
+ color: ${e.nodeTextColor || e.textColor};
775
+ }
776
+
777
+ .node rect,
778
+ .node circle,
779
+ .node ellipse,
780
+ .node polygon,
781
+ .node path {
782
+ fill: ${e.mainBkg};
783
+ stroke: ${e.nodeBorder};
784
+ stroke-width: 1px;
785
+ }
786
+ .flowchart-label text {
787
+ text-anchor: middle;
788
+ }
789
+ // .flowchart-label .text-outer-tspan {
790
+ // text-anchor: middle;
791
+ // }
792
+ // .flowchart-label .text-inner-tspan {
793
+ // text-anchor: start;
794
+ // }
795
+
796
+ .node .label {
797
+ text-align: center;
798
+ }
799
+ .node.clickable {
800
+ cursor: pointer;
801
+ }
802
+
803
+ .arrowheadPath {
804
+ fill: ${e.arrowheadColor};
805
+ }
806
+
807
+ .edgePath .path {
808
+ stroke: ${e.lineColor};
809
+ stroke-width: 2.0px;
810
+ }
811
+
812
+ .flowchart-link {
813
+ stroke: ${e.lineColor};
814
+ fill: none;
815
+ }
816
+
817
+ .edgeLabel {
818
+ background-color: ${e.edgeLabelBackground};
819
+ rect {
820
+ opacity: 0.5;
821
+ background-color: ${e.edgeLabelBackground};
822
+ fill: ${e.edgeLabelBackground};
823
+ }
824
+ text-align: center;
825
+ }
826
+
827
+ /* For html labels only */
828
+ .labelBkg {
829
+ background-color: ${q(e.edgeLabelBackground, 0.5)};
830
+ // background-color:
831
+ }
832
+
833
+ .node .cluster {
834
+ // fill: ${q(e.mainBkg, 0.5)};
835
+ fill: ${q(e.clusterBkg, 0.5)};
836
+ stroke: ${q(e.clusterBorder, 0.2)};
837
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
838
+ stroke-width: 1px;
839
+ }
840
+
841
+ .cluster text {
842
+ fill: ${e.titleColor};
843
+ }
844
+
845
+ .cluster span,p {
846
+ color: ${e.titleColor};
847
+ }
848
+ /* .cluster div {
849
+ color: ${e.titleColor};
850
+ } */
851
+
852
+ div.mermaidTooltip {
853
+ position: absolute;
854
+ text-align: center;
855
+ max-width: 200px;
856
+ padding: 2px;
857
+ font-family: ${e.fontFamily};
858
+ font-size: 12px;
859
+ background: ${e.tertiaryColor};
860
+ border: 1px solid ${e.border2};
861
+ border-radius: 2px;
862
+ pointer-events: none;
863
+ z-index: 100;
864
+ }
865
+
866
+ .flowchartTitleText {
867
+ text-anchor: middle;
868
+ font-size: 18px;
869
+ fill: ${e.textColor};
870
+ }
871
+ `, lt = at;
872
+ function be(e, a, d = !1) {
873
+ var c, n, g;
874
+ const l = e;
875
+ let f = "default";
876
+ (((c = l == null ? void 0 : l.classes) == null ? void 0 : c.length) || 0) > 0 && (f = ((l == null ? void 0 : l.classes) || []).join(" ")), f = f + " flowchart-label";
877
+ let b = 0, p = "", x;
878
+ switch (l.type) {
879
+ case "round":
880
+ b = 5, p = "rect";
881
+ break;
882
+ case "composite":
883
+ b = 0, p = "composite", x = 0;
884
+ break;
885
+ case "square":
886
+ p = "rect";
887
+ break;
888
+ case "diamond":
889
+ p = "question";
890
+ break;
891
+ case "hexagon":
892
+ p = "hexagon";
893
+ break;
894
+ case "block_arrow":
895
+ p = "block_arrow";
896
+ break;
897
+ case "odd":
898
+ p = "rect_left_inv_arrow";
899
+ break;
900
+ case "lean_right":
901
+ p = "lean_right";
902
+ break;
903
+ case "lean_left":
904
+ p = "lean_left";
905
+ break;
906
+ case "trapezoid":
907
+ p = "trapezoid";
908
+ break;
909
+ case "inv_trapezoid":
910
+ p = "inv_trapezoid";
911
+ break;
912
+ case "rect_left_inv_arrow":
913
+ p = "rect_left_inv_arrow";
914
+ break;
915
+ case "circle":
916
+ p = "circle";
917
+ break;
918
+ case "ellipse":
919
+ p = "ellipse";
920
+ break;
921
+ case "stadium":
922
+ p = "stadium";
923
+ break;
924
+ case "subroutine":
925
+ p = "subroutine";
926
+ break;
927
+ case "cylinder":
928
+ p = "cylinder";
929
+ break;
930
+ case "group":
931
+ p = "rect";
932
+ break;
933
+ case "doublecircle":
934
+ p = "doublecircle";
935
+ break;
936
+ default:
937
+ p = "rect";
938
+ }
939
+ const y = ve((l == null ? void 0 : l.styles) || []), T = l.label, v = l.size || { width: 0, height: 0, x: 0, y: 0 };
940
+ return {
941
+ labelStyle: y.labelStyle,
942
+ shape: p,
943
+ labelText: T,
944
+ rx: b,
945
+ ry: b,
946
+ class: f,
947
+ style: y.style,
948
+ id: l.id,
949
+ directions: l.directions,
950
+ width: v.width,
951
+ height: v.height,
952
+ x: v.x,
953
+ y: v.y,
954
+ positioned: d,
955
+ intersect: void 0,
956
+ type: l.type,
957
+ padding: x ?? (((g = (n = se()) == null ? void 0 : n.block) == null ? void 0 : g.padding) || 0)
958
+ };
959
+ }
960
+ async function ot(e, a, d) {
961
+ const c = be(a, d, !1);
962
+ if (c.type === "group")
963
+ return;
964
+ const n = await ge(e, c), g = n.node().getBBox(), l = d.getBlock(c.id);
965
+ l.size = { width: g.width, height: g.height, x: 0, y: 0, node: n }, d.setBlock(l), n.remove();
966
+ }
967
+ async function ct(e, a, d) {
968
+ const c = be(a, d, !0);
969
+ d.getBlock(c.id).type !== "space" && (await ge(e, c), a.intersect = c == null ? void 0 : c.intersect, ze(c));
970
+ }
971
+ async function ne(e, a, d, c) {
972
+ for (const n of a)
973
+ await c(e, n, d), n.children && await ne(e, n.children, d, c);
974
+ }
975
+ async function ut(e, a, d) {
976
+ await ne(e, a, d, ot);
977
+ }
978
+ async function dt(e, a, d) {
979
+ await ne(e, a, d, ct);
980
+ }
981
+ async function ht(e, a, d, c, n) {
982
+ const g = new Ce({
983
+ multigraph: !0,
984
+ compound: !0
985
+ });
986
+ g.setGraph({
987
+ rankdir: "TB",
988
+ nodesep: 10,
989
+ ranksep: 10,
990
+ marginx: 8,
991
+ marginy: 8
992
+ });
993
+ for (const l of d)
994
+ l.size && g.setNode(l.id, {
995
+ width: l.size.width,
996
+ height: l.size.height,
997
+ intersect: l.intersect
998
+ });
999
+ for (const l of a)
1000
+ if (l.start && l.end) {
1001
+ const f = c.getBlock(l.start), b = c.getBlock(l.end);
1002
+ if (f != null && f.size && (b != null && b.size)) {
1003
+ const p = f.size, x = b.size, y = [
1004
+ { x: p.x, y: p.y },
1005
+ { x: p.x + (x.x - p.x) / 2, y: p.y + (x.y - p.y) / 2 },
1006
+ { x: x.x, y: x.y }
1007
+ ];
1008
+ await Ie(
1009
+ e,
1010
+ { v: l.start, w: l.end, name: l.id },
1011
+ {
1012
+ ...l,
1013
+ arrowTypeEnd: l.arrowTypeEnd,
1014
+ arrowTypeStart: l.arrowTypeStart,
1015
+ points: y,
1016
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
1017
+ },
1018
+ void 0,
1019
+ "block",
1020
+ g,
1021
+ n
1022
+ ), l.label && (await Oe(e, {
1023
+ ...l,
1024
+ label: l.label,
1025
+ labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
1026
+ arrowTypeEnd: l.arrowTypeEnd,
1027
+ arrowTypeStart: l.arrowTypeStart,
1028
+ points: y,
1029
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
1030
+ }), await Te(
1031
+ { ...l, x: y[1].x, y: y[1].y },
1032
+ {
1033
+ originalPath: y
1034
+ }
1035
+ ));
1036
+ }
1037
+ }
1038
+ }
1039
+ const _ = ((oe = (le = he()) == null ? void 0 : le.block) == null ? void 0 : oe.padding) || 8;
1040
+ function gt(e, a) {
1041
+ if (e === 0 || !Number.isInteger(e))
1042
+ throw new Error("Columns must be an integer !== 0.");
1043
+ if (a < 0 || !Number.isInteger(a))
1044
+ throw new Error("Position must be a non-negative integer." + a);
1045
+ if (e < 0)
1046
+ return { px: a, py: 0 };
1047
+ if (e === 1)
1048
+ return { px: 0, py: a };
1049
+ const d = a % e, c = Math.floor(a / e);
1050
+ return { px: d, py: c };
1051
+ }
1052
+ const pt = (e) => {
1053
+ let a = 0, d = 0;
1054
+ for (const c of e.children) {
1055
+ const { width: n, height: g, x: l, y: f } = c.size || { width: 0, height: 0, x: 0, y: 0 };
1056
+ S.debug(
1057
+ "getMaxChildSize abc95 child:",
1058
+ c.id,
1059
+ "width:",
1060
+ n,
1061
+ "height:",
1062
+ g,
1063
+ "x:",
1064
+ l,
1065
+ "y:",
1066
+ f,
1067
+ c.type
1068
+ ), c.type !== "space" && (n > a && (a = n / (e.widthInColumns || 1)), g > d && (d = g));
1069
+ }
1070
+ return { width: a, height: d };
1071
+ };
1072
+ function te(e, a, d = 0, c = 0) {
1073
+ var n, g, l, f, b, p, x, y, T, v, N;
1074
+ S.debug(
1075
+ "setBlockSizes abc95 (start)",
1076
+ e.id,
1077
+ (n = e == null ? void 0 : e.size) == null ? void 0 : n.x,
1078
+ "block width =",
1079
+ e == null ? void 0 : e.size,
1080
+ "sieblingWidth",
1081
+ d
1082
+ ), (g = e == null ? void 0 : e.size) != null && g.width || (e.size = {
1083
+ width: d,
1084
+ height: c,
1085
+ x: 0,
1086
+ y: 0
1087
+ });
1088
+ let E = 0, L = 0;
1089
+ if (((l = e.children) == null ? void 0 : l.length) > 0) {
1090
+ for (const h of e.children)
1091
+ te(h, a);
1092
+ const A = pt(e);
1093
+ E = A.width, L = A.height, S.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", E, L);
1094
+ for (const h of e.children)
1095
+ h.size && (S.debug(
1096
+ `abc95 Setting size of children of ${e.id} id=${h.id} ${E} ${L} ${h.size}`
1097
+ ), h.size.width = E * (h.widthInColumns || 1) + _ * ((h.widthInColumns || 1) - 1), h.size.height = L, h.size.x = 0, h.size.y = 0, S.debug(
1098
+ `abc95 updating size of ${e.id} children child:${h.id} maxWidth:${E} maxHeight:${L}`
1099
+ ));
1100
+ for (const h of e.children)
1101
+ te(h, a, E, L);
1102
+ const k = e.columns || -1;
1103
+ let D = 0;
1104
+ for (const h of e.children)
1105
+ D += h.widthInColumns || 1;
1106
+ let o = e.children.length;
1107
+ k > 0 && k < D && (o = k), e.widthInColumns;
1108
+ const s = Math.ceil(D / o);
1109
+ let i = o * (E + _) + _, u = s * (L + _) + _;
1110
+ if (i < d) {
1111
+ S.debug(
1112
+ `Detected to small siebling: abc95 ${e.id} sieblingWidth ${d} sieblingHeight ${c} width ${i}`
1113
+ ), i = d, u = c;
1114
+ const h = (d - o * _ - _) / o, t = (c - s * _ - _) / s;
1115
+ S.debug("Size indata abc88", e.id, "childWidth", h, "maxWidth", E), S.debug("Size indata abc88", e.id, "childHeight", t, "maxHeight", L), S.debug("Size indata abc88 xSize", o, "padding", _);
1116
+ for (const m of e.children)
1117
+ m.size && (m.size.width = h, m.size.height = t, m.size.x = 0, m.size.y = 0);
1118
+ }
1119
+ if (S.debug(
1120
+ `abc95 (finale calc) ${e.id} xSize ${o} ySize ${s} columns ${k}${e.children.length} width=${Math.max(i, ((f = e.size) == null ? void 0 : f.width) || 0)}`
1121
+ ), i < (((b = e == null ? void 0 : e.size) == null ? void 0 : b.width) || 0)) {
1122
+ i = ((p = e == null ? void 0 : e.size) == null ? void 0 : p.width) || 0;
1123
+ const h = k > 0 ? Math.min(e.children.length, k) : e.children.length;
1124
+ if (h > 0) {
1125
+ const t = (i - h * _ - _) / h;
1126
+ S.debug("abc95 (growing to fit) width", e.id, i, (x = e.size) == null ? void 0 : x.width, t);
1127
+ for (const m of e.children)
1128
+ m.size && (m.size.width = t);
1129
+ }
1130
+ }
1131
+ e.size = {
1132
+ width: i,
1133
+ height: u,
1134
+ x: 0,
1135
+ y: 0
1136
+ };
1137
+ }
1138
+ S.debug(
1139
+ "setBlockSizes abc94 (done)",
1140
+ e.id,
1141
+ (y = e == null ? void 0 : e.size) == null ? void 0 : y.x,
1142
+ (T = e == null ? void 0 : e.size) == null ? void 0 : T.width,
1143
+ (v = e == null ? void 0 : e.size) == null ? void 0 : v.y,
1144
+ (N = e == null ? void 0 : e.size) == null ? void 0 : N.height
1145
+ );
1146
+ }
1147
+ function xe(e, a) {
1148
+ var d, c, n, g, l, f, b, p, x, y, T, v, N, E, L, A, k;
1149
+ S.debug(
1150
+ `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(d = e == null ? void 0 : e.size) == null ? void 0 : d.x} y: ${(c = e == null ? void 0 : e.size) == null ? void 0 : c.y} width: ${(n = e == null ? void 0 : e.size) == null ? void 0 : n.width}`
1151
+ );
1152
+ const D = e.columns || -1;
1153
+ if (S.debug("layoutBlocks columns abc95", e.id, "=>", D, e), e.children && // find max width of children
1154
+ e.children.length > 0) {
1155
+ const o = ((l = (g = e == null ? void 0 : e.children[0]) == null ? void 0 : g.size) == null ? void 0 : l.width) || 0, s = e.children.length * o + (e.children.length - 1) * _;
1156
+ S.debug("widthOfChildren 88", s, "posX");
1157
+ let i = 0;
1158
+ S.debug("abc91 block?.size?.x", e.id, (f = e == null ? void 0 : e.size) == null ? void 0 : f.x);
1159
+ let u = (b = e == null ? void 0 : e.size) != null && b.x ? ((p = e == null ? void 0 : e.size) == null ? void 0 : p.x) + (-((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) / 2 || 0) : -_, h = 0;
1160
+ for (const t of e.children) {
1161
+ const m = e;
1162
+ if (!t.size)
1163
+ continue;
1164
+ const { width: r, height: R } = t.size, { px: Y, py: F } = gt(D, i);
1165
+ if (F != h && (h = F, u = (y = e == null ? void 0 : e.size) != null && y.x ? ((T = e == null ? void 0 : e.size) == null ? void 0 : T.x) + (-((v = e == null ? void 0 : e.size) == null ? void 0 : v.width) / 2 || 0) : -_, S.debug("New row in layout for block", e.id, " and child ", t.id, h)), S.debug(
1166
+ `abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${Y},${F} (${(N = m == null ? void 0 : m.size) == null ? void 0 : N.x},${(E = m == null ? void 0 : m.size) == null ? void 0 : E.y}) parent: ${m.id} width: ${r}${_}`
1167
+ ), m.size) {
1168
+ const C = r / 2;
1169
+ t.size.x = u + _ + C, S.debug(
1170
+ `abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${u} new startingPosX${t.size.x} ${C} padding=${_} width=${r} halfWidth=${C} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${r * ((t == null ? void 0 : t.widthInColumns) || 1) / 2}`
1171
+ ), u = t.size.x + C, t.size.y = m.size.y - m.size.height / 2 + F * (R + _) + R / 2 + _, S.debug(
1172
+ `abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${u}${_}${C}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${r * ((t == null ? void 0 : t.widthInColumns) || 1) / 2}`
1173
+ );
1174
+ }
1175
+ t.children && xe(t), i += (t == null ? void 0 : t.widthInColumns) || 1, S.debug("abc88 columnsPos", t, i);
1176
+ }
1177
+ }
1178
+ S.debug(
1179
+ `layout blocks (<==layoutBlocks) ${e.id} x: ${(L = e == null ? void 0 : e.size) == null ? void 0 : L.x} y: ${(A = e == null ? void 0 : e.size) == null ? void 0 : A.y} width: ${(k = e == null ? void 0 : e.size) == null ? void 0 : k.width}`
1180
+ );
1181
+ }
1182
+ function Se(e, { minX: a, minY: d, maxX: c, maxY: n } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1183
+ if (e.size && e.id !== "root") {
1184
+ const { x: g, y: l, width: f, height: b } = e.size;
1185
+ g - f / 2 < a && (a = g - f / 2), l - b / 2 < d && (d = l - b / 2), g + f / 2 > c && (c = g + f / 2), l + b / 2 > n && (n = l + b / 2);
1186
+ }
1187
+ if (e.children)
1188
+ for (const g of e.children)
1189
+ ({ minX: a, minY: d, maxX: c, maxY: n } = Se(g, { minX: a, minY: d, maxX: c, maxY: n }));
1190
+ return { minX: a, minY: d, maxX: c, maxY: n };
1191
+ }
1192
+ function ft(e) {
1193
+ const a = e.getBlock("root");
1194
+ if (!a)
1195
+ return;
1196
+ te(a, e, 0, 0), xe(a), S.debug("getBlocks", JSON.stringify(a, null, 2));
1197
+ const { minX: d, minY: c, maxX: n, maxY: g } = Se(a), l = g - c, f = n - d;
1198
+ return { x: d, y: c, width: f, height: l };
1199
+ }
1200
+ const bt = function(e, a) {
1201
+ return a.db.getClasses();
1202
+ }, xt = async function(e, a, d, c) {
1203
+ const { securityLevel: n, block: g } = se(), l = c.db;
1204
+ let f;
1205
+ n === "sandbox" && (f = H("#i" + a));
1206
+ const b = n === "sandbox" ? H(f.nodes()[0].contentDocument.body) : H("body"), p = n === "sandbox" ? b.select(`[id="${a}"]`) : H(`[id="${a}"]`);
1207
+ ke(p, ["point", "circle", "cross"], c.type, a);
1208
+ const y = l.getBlocks(), T = l.getBlocksFlat(), v = l.getEdges(), N = p.insert("g").attr("class", "block");
1209
+ await ut(N, y, l);
1210
+ const E = ft(l);
1211
+ if (await dt(N, y, l), await ht(N, v, T, l, a), E) {
1212
+ const L = E, A = Math.max(1, Math.round(0.125 * (L.width / L.height))), k = L.height + A + 10, D = L.width + 10, { useMaxWidth: o } = g;
1213
+ ye(p, k, D, !!o), S.debug("Here Bounds", E, L), p.attr(
1214
+ "viewBox",
1215
+ `${L.x - 5} ${L.y - 5} ${L.width + 10} ${L.height + 10}`
1216
+ );
1217
+ }
1218
+ Ae(Re);
1219
+ }, St = {
1220
+ draw: xt,
1221
+ getClasses: bt
1222
+ }, zt = {
1223
+ parser: Pe,
1224
+ db: nt,
1225
+ renderer: St,
1226
+ styles: lt
1227
+ };
1228
+ export {
1229
+ zt as diagram
1230
+ };