@schmitech/chatbot-widget 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/_basePickBy-C3-QE0dl-5eQ6L29l.js +152 -0
  2. package/dist/_baseUniq-CstiM9Lp-AFR_Ns0a.js +615 -0
  3. package/dist/arc-W3NKKXLI-DHbDwLx0.js +84 -0
  4. package/dist/architecture-U656AL7Q-fn9wJZsH-BLoGjtkP.js +6 -0
  5. package/dist/architectureDiagram-VXUJARFQ-zzJsgPC6-C4OfUE0m.js +4667 -0
  6. package/dist/blockDiagram-VD42YOAC-D-In4h7h-BYXdRmeG.js +2266 -0
  7. package/dist/c4Diagram-YG6GDRKO-DBs8r9gh-BdLuHgPT.js +1582 -0
  8. package/dist/channel-RBWQyMSg-Cx0HUumY.js +6 -0
  9. package/dist/chatbot-widget.bundle.js +4473 -1556
  10. package/dist/chatbot-widget.css +1 -1
  11. package/dist/chatbot-widget.es.js +12 -63659
  12. package/dist/chatbot-widget.umd.js +4472 -1555
  13. package/dist/chunk-4BX2VUAB-BqD7w0AR-CbA2613c.js +10 -0
  14. package/dist/chunk-55IACEB6-D8pvDVEJ-DrL4SJSR.js +9 -0
  15. package/dist/chunk-B4BG7PRW-Dwma1pSy-BWjG5dc6.js +1375 -0
  16. package/dist/chunk-DI55MBZ5-BY2XXvZz-DbAvz3Pq.js +1383 -0
  17. package/dist/chunk-FMBD7UC4-BeiLbQ8U-BNaZTCv4.js +20 -0
  18. package/dist/chunk-QN33PNHL-BkO3hOeq-DkU1EzGA.js +21 -0
  19. package/dist/chunk-QZHKN3VN-Cwlo2qTG-DMmeZmp5.js +16 -0
  20. package/dist/chunk-TZMSLE5B-BnXK-OiF-RfzVsOBe.js +65 -0
  21. package/dist/classDiagram-2ON5EDUG-Crd6O69V-kCZrFOLN.js +17 -0
  22. package/dist/classDiagram-v2-WZHVMYZB-Crd6O69V-kCZrFOLN.js +17 -0
  23. package/dist/clone-CfLgyC8S-DsDOh4B4.js +9 -0
  24. package/dist/config/index.d.ts +4 -2
  25. package/dist/cose-bilkent-S5V4N54A-DKeVcPDK-de_7nZTY.js +2609 -0
  26. package/dist/cytoscape.esm-CjI2IsL8-Be2K4mI6.js +18723 -0
  27. package/dist/dagre-6UL2VRFP-BPf604Df-BhZs6zCq.js +448 -0
  28. package/dist/diagram-PSM6KHXK-DeLcpEV3-qb4rujeN.js +532 -0
  29. package/dist/diagram-QEK2KX5R-C_5RR1NJ-C5kZWmRl.js +222 -0
  30. package/dist/diagram-S2PKOQOG-DVx43aon-4nlw6iDz.js +144 -0
  31. package/dist/erDiagram-Q2GNP2WA-DgUeO5_h-DHc9Yphl.js +841 -0
  32. package/dist/flowDiagram-NV44I4VS-C5HQUzU9-DHjbmAtJ.js +1628 -0
  33. package/dist/ganttDiagram-JELNMOA3-DgSZ1ixF-C3hJs_k9.js +1936 -0
  34. package/dist/gitGraph-F6HP7TQM-UL7-Bx1s-Cog5rj3j.js +6 -0
  35. package/dist/gitGraphDiagram-NY62KEGX-DY5loT9K-CEcKQNrM.js +713 -0
  36. package/dist/graph-BfwqPHx6-DErF9dBN.js +248 -0
  37. package/dist/index-B5s_uaP2.js +124168 -0
  38. package/dist/index-BAOVR-xx-thst7Pu6.js +13251 -0
  39. package/dist/info-NVLQJR56-BsqQ0RXQ-BcYgZCCY.js +6 -0
  40. package/dist/infoDiagram-WHAUD3N6-DIqQ6vCk-BuiAAMSH.js +25 -0
  41. package/dist/journeyDiagram-XKPGCS4Q-DXjg3S3r-Byi_TGXs.js +835 -0
  42. package/dist/kanban-definition-3W4ZIXB7-Uxt7Am6n-jy96nA-g.js +721 -0
  43. package/dist/layout-CSfkE668-BjigbqJL.js +1333 -0
  44. package/dist/mermaid-parser.core-LjuO4CL3-BLqmPe8-.js +12891 -0
  45. package/dist/mindmap-definition-VGOIOE7T-DXwVuAPE-SK4e1Sse.js +787 -0
  46. package/dist/packet-BFZMPI3H-DJWkrKrV-BamBev9S.js +6 -0
  47. package/dist/pie-7BOR55EZ-DC8hTFwn-D1bcIQbR.js +6 -0
  48. package/dist/pieDiagram-ADFJNKIX-Cj0EHHtj-Dbr09c-S.js +161 -0
  49. package/dist/quadrantDiagram-AYHSOK5B-CnLDz007-Ci0DQl2T.js +1024 -0
  50. package/dist/radar-NHE76QYJ-Bijk-Fk9-9nAmDCMr.js +6 -0
  51. package/dist/requirementDiagram-UZGBJVZJ-rDaI-8Be-CSEc4S33.js +851 -0
  52. package/dist/sankeyDiagram-TZEHDZUN-A0YO8ixs-Zj8Z0j0n.js +810 -0
  53. package/dist/sequenceDiagram-WL72ISMW-BFF7TtP7-Dcofckjv.js +2519 -0
  54. package/dist/shared/styles.d.ts +1 -1
  55. package/dist/stateDiagram-FKZM4ZOC-ofFsB7HJ-BJBX12rE.js +264 -0
  56. package/dist/stateDiagram-v2-4FDKWEC3-CEZFbksU-BywmU88h.js +17 -0
  57. package/dist/timeline-definition-IT6M3QCI-5W361ZNm-MP_ufVe7.js +800 -0
  58. package/dist/treemap-KMMF4GRG-pGRoYcSn-BeZ7sXgP.js +6 -0
  59. package/dist/ui/Message.d.ts +1 -5
  60. package/dist/ui/MessagesList.d.ts +1 -5
  61. package/dist/utils/contentFiltering.d.ts +12 -0
  62. package/dist/xychartDiagram-PRI3JC2R-CSr0GxaP-DBgCtplP.js +1297 -0
  63. package/package.json +3 -3
  64. package/dist/ui/TypingEffect.d.ts +0 -18
@@ -0,0 +1,787 @@
1
+ import { d as ce } from "./chunk-55IACEB6-D8pvDVEJ-DrL4SJSR.js";
2
+ import { d as he } from "./chunk-QN33PNHL-BkO3hOeq-DkU1EzGA.js";
3
+ import { x as a, a as I, r as le, t as de, T as M, p as X, y as P, b8 as ge, aT as ue, aU as pe, aV as ye } from "./index-B5s_uaP2.js";
4
+ typeof window < "u" && (window.global = window);
5
+ const m = [];
6
+ for (let e = 0; e < 256; ++e)
7
+ m.push((e + 256).toString(16).slice(1));
8
+ function fe(e, s = 0) {
9
+ return (m[e[s + 0]] + m[e[s + 1]] + m[e[s + 2]] + m[e[s + 3]] + "-" + m[e[s + 4]] + m[e[s + 5]] + "-" + m[e[s + 6]] + m[e[s + 7]] + "-" + m[e[s + 8]] + m[e[s + 9]] + "-" + m[e[s + 10]] + m[e[s + 11]] + m[e[s + 12]] + m[e[s + 13]] + m[e[s + 14]] + m[e[s + 15]]).toLowerCase();
10
+ }
11
+ let W;
12
+ const me = new Uint8Array(16);
13
+ function Ee() {
14
+ if (!W) {
15
+ if (typeof crypto > "u" || !crypto.getRandomValues)
16
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
17
+ W = crypto.getRandomValues.bind(crypto);
18
+ }
19
+ return W(me);
20
+ }
21
+ const _e = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ne = { randomUUID: _e };
22
+ function be(e, s, i) {
23
+ var c;
24
+ if (ne.randomUUID && !e)
25
+ return ne.randomUUID();
26
+ e = e || {};
27
+ const h = e.random ?? ((c = e.rng) == null ? void 0 : c.call(e)) ?? Ee();
28
+ if (h.length < 16)
29
+ throw new Error("Random bytes length must be >= 16");
30
+ return h[6] = h[6] & 15 | 64, h[8] = h[8] & 63 | 128, fe(h);
31
+ }
32
+ var J = function() {
33
+ var e = /* @__PURE__ */ a(function(S, t, r, o) {
34
+ for (r = r || {}, o = S.length; o--; r[S[o]] = t) ;
35
+ return r;
36
+ }, "o"), s = [1, 4], i = [1, 13], c = [1, 12], h = [1, 15], y = [1, 16], u = [1, 20], g = [1, 19], L = [6, 7, 8], p = [1, 26], C = [1, 24], Y = [1, 25], b = [6, 7, 11], q = [1, 6, 13, 15, 16, 19, 22], K = [1, 33], Q = [1, 34], w = [1, 6, 7, 11, 13, 15, 16, 19, 22], B = {
37
+ trace: /* @__PURE__ */ a(function() {
38
+ }, "trace"),
39
+ yy: {},
40
+ symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
41
+ terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
42
+ productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
43
+ performAction: /* @__PURE__ */ a(function(S, t, r, o, l, n, E) {
44
+ var d = n.length - 1;
45
+ switch (l) {
46
+ case 6:
47
+ case 7:
48
+ return o;
49
+ case 8:
50
+ o.getLogger().trace("Stop NL ");
51
+ break;
52
+ case 9:
53
+ o.getLogger().trace("Stop EOF ");
54
+ break;
55
+ case 11:
56
+ o.getLogger().trace("Stop NL2 ");
57
+ break;
58
+ case 12:
59
+ o.getLogger().trace("Stop EOF2 ");
60
+ break;
61
+ case 15:
62
+ o.getLogger().info("Node: ", n[d].id), o.addNode(n[d - 1].length, n[d].id, n[d].descr, n[d].type);
63
+ break;
64
+ case 16:
65
+ o.getLogger().trace("Icon: ", n[d]), o.decorateNode({ icon: n[d] });
66
+ break;
67
+ case 17:
68
+ case 21:
69
+ o.decorateNode({ class: n[d] });
70
+ break;
71
+ case 18:
72
+ o.getLogger().trace("SPACELIST");
73
+ break;
74
+ case 19:
75
+ o.getLogger().trace("Node: ", n[d].id), o.addNode(0, n[d].id, n[d].descr, n[d].type);
76
+ break;
77
+ case 20:
78
+ o.decorateNode({ icon: n[d] });
79
+ break;
80
+ case 25:
81
+ o.getLogger().trace("node found ..", n[d - 2]), this.$ = { id: n[d - 1], descr: n[d - 1], type: o.getType(n[d - 2], n[d]) };
82
+ break;
83
+ case 26:
84
+ this.$ = { id: n[d], descr: n[d], type: o.nodeType.DEFAULT };
85
+ break;
86
+ case 27:
87
+ o.getLogger().trace("node found ..", n[d - 3]), this.$ = { id: n[d - 3], descr: n[d - 1], type: o.getType(n[d - 2], n[d]) };
88
+ break;
89
+ }
90
+ }, "anonymous"),
91
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: s }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: s }, { 6: i, 7: [1, 10], 9: 9, 12: 11, 13: c, 14: 14, 15: h, 16: y, 17: 17, 18: 18, 19: u, 22: g }, e(L, [2, 3]), { 1: [2, 2] }, e(L, [2, 4]), e(L, [2, 5]), { 1: [2, 6], 6: i, 12: 21, 13: c, 14: 14, 15: h, 16: y, 17: 17, 18: 18, 19: u, 22: g }, { 6: i, 9: 22, 12: 11, 13: c, 14: 14, 15: h, 16: y, 17: 17, 18: 18, 19: u, 22: g }, { 6: p, 7: C, 10: 23, 11: Y }, e(b, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: u, 22: g }), e(b, [2, 18]), e(b, [2, 19]), e(b, [2, 20]), e(b, [2, 21]), e(b, [2, 23]), e(b, [2, 24]), e(b, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: p, 7: C, 10: 32, 11: Y }, { 1: [2, 7], 6: i, 12: 21, 13: c, 14: 14, 15: h, 16: y, 17: 17, 18: 18, 19: u, 22: g }, e(q, [2, 14], { 7: K, 11: Q }), e(w, [2, 8]), e(w, [2, 9]), e(w, [2, 10]), e(b, [2, 15]), e(b, [2, 16]), e(b, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, e(q, [2, 13], { 7: K, 11: Q }), e(w, [2, 11]), e(w, [2, 12]), { 21: [1, 37] }, e(b, [2, 25]), e(b, [2, 27])],
92
+ defaultActions: { 2: [2, 1], 6: [2, 2] },
93
+ parseError: /* @__PURE__ */ a(function(S, t) {
94
+ if (t.recoverable)
95
+ this.trace(S);
96
+ else {
97
+ var r = new Error(S);
98
+ throw r.hash = t, r;
99
+ }
100
+ }, "parseError"),
101
+ parse: /* @__PURE__ */ a(function(S) {
102
+ var t = this, r = [0], o = [], l = [null], n = [], E = this.table, d = "", A = 0, V = 0, se = 2, Z = 1, re = n.slice.call(arguments, 1), f = Object.create(this.lexer), v = { yy: {} };
103
+ for (var j in this.yy)
104
+ Object.prototype.hasOwnProperty.call(this.yy, j) && (v.yy[j] = this.yy[j]);
105
+ f.setInput(S, v.yy), v.yy.lexer = f, v.yy.parser = this, typeof f.yylloc > "u" && (f.yylloc = {});
106
+ var F = f.yylloc;
107
+ n.push(F);
108
+ var oe = f.options && f.options.ranges;
109
+ typeof v.yy.parseError == "function" ? this.parseError = v.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
110
+ function ae(N) {
111
+ r.length = r.length - 2 * N, l.length = l.length - N, n.length = n.length - N;
112
+ }
113
+ a(ae, "popStack");
114
+ function ee() {
115
+ var N;
116
+ return N = o.pop() || f.lex() || Z, typeof N != "number" && (N instanceof Array && (o = N, N = o.pop()), N = t.symbols_[N] || N), N;
117
+ }
118
+ a(ee, "lex");
119
+ for (var _, T, D, G, O = {}, $, k, te, U; ; ) {
120
+ if (T = r[r.length - 1], this.defaultActions[T] ? D = this.defaultActions[T] : ((_ === null || typeof _ > "u") && (_ = ee()), D = E[T] && E[T][_]), typeof D > "u" || !D.length || !D[0]) {
121
+ var H = "";
122
+ U = [];
123
+ for ($ in E[T])
124
+ this.terminals_[$] && $ > se && U.push("'" + this.terminals_[$] + "'");
125
+ f.showPosition ? H = "Parse error on line " + (A + 1) + `:
126
+ ` + f.showPosition() + `
127
+ Expecting ` + U.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : H = "Parse error on line " + (A + 1) + ": Unexpected " + (_ == Z ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(H, {
128
+ text: f.match,
129
+ token: this.terminals_[_] || _,
130
+ line: f.yylineno,
131
+ loc: F,
132
+ expected: U
133
+ });
134
+ }
135
+ if (D[0] instanceof Array && D.length > 1)
136
+ throw new Error("Parse Error: multiple actions possible at state: " + T + ", token: " + _);
137
+ switch (D[0]) {
138
+ case 1:
139
+ r.push(_), l.push(f.yytext), n.push(f.yylloc), r.push(D[1]), _ = null, V = f.yyleng, d = f.yytext, A = f.yylineno, F = f.yylloc;
140
+ break;
141
+ case 2:
142
+ if (k = this.productions_[D[1]][1], O.$ = l[l.length - k], O._$ = {
143
+ first_line: n[n.length - (k || 1)].first_line,
144
+ last_line: n[n.length - 1].last_line,
145
+ first_column: n[n.length - (k || 1)].first_column,
146
+ last_column: n[n.length - 1].last_column
147
+ }, oe && (O._$.range = [
148
+ n[n.length - (k || 1)].range[0],
149
+ n[n.length - 1].range[1]
150
+ ]), G = this.performAction.apply(O, [
151
+ d,
152
+ V,
153
+ A,
154
+ v.yy,
155
+ D[1],
156
+ l,
157
+ n
158
+ ].concat(re)), typeof G < "u")
159
+ return G;
160
+ k && (r = r.slice(0, -1 * k * 2), l = l.slice(0, -1 * k), n = n.slice(0, -1 * k)), r.push(this.productions_[D[1]][0]), l.push(O.$), n.push(O._$), te = E[r[r.length - 2]][r[r.length - 1]], r.push(te);
161
+ break;
162
+ case 3:
163
+ return !0;
164
+ }
165
+ }
166
+ return !0;
167
+ }, "parse")
168
+ }, ie = /* @__PURE__ */ function() {
169
+ var S = {
170
+ EOF: 1,
171
+ parseError: /* @__PURE__ */ a(function(t, r) {
172
+ if (this.yy.parser)
173
+ this.yy.parser.parseError(t, r);
174
+ else
175
+ throw new Error(t);
176
+ }, "parseError"),
177
+ // resets the lexer, sets new input
178
+ setInput: /* @__PURE__ */ a(function(t, r) {
179
+ return this.yy = r || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
180
+ first_line: 1,
181
+ first_column: 0,
182
+ last_line: 1,
183
+ last_column: 0
184
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
185
+ }, "setInput"),
186
+ // consumes and returns one char from the input
187
+ input: /* @__PURE__ */ a(function() {
188
+ var t = this._input[0];
189
+ this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
190
+ var r = t.match(/(?:\r\n?|\n).*/g);
191
+ return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
192
+ }, "input"),
193
+ // unshifts one char (or a string) into the input
194
+ unput: /* @__PURE__ */ a(function(t) {
195
+ var r = t.length, o = t.split(/(?:\r\n?|\n)/g);
196
+ this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
197
+ var l = this.match.split(/(?:\r\n?|\n)/g);
198
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1);
199
+ var n = this.yylloc.range;
200
+ return this.yylloc = {
201
+ first_line: this.yylloc.first_line,
202
+ last_line: this.yylineno + 1,
203
+ first_column: this.yylloc.first_column,
204
+ last_column: o ? (o.length === l.length ? this.yylloc.first_column : 0) + l[l.length - o.length].length - o[0].length : this.yylloc.first_column - r
205
+ }, this.options.ranges && (this.yylloc.range = [n[0], n[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
206
+ }, "unput"),
207
+ // When called from action, caches matched text and appends it on next action
208
+ more: /* @__PURE__ */ a(function() {
209
+ return this._more = !0, this;
210
+ }, "more"),
211
+ // 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.
212
+ reject: /* @__PURE__ */ a(function() {
213
+ if (this.options.backtrack_lexer)
214
+ this._backtrack = !0;
215
+ else
216
+ 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).
217
+ ` + this.showPosition(), {
218
+ text: "",
219
+ token: null,
220
+ line: this.yylineno
221
+ });
222
+ return this;
223
+ }, "reject"),
224
+ // retain first n characters of the match
225
+ less: /* @__PURE__ */ a(function(t) {
226
+ this.unput(this.match.slice(t));
227
+ }, "less"),
228
+ // displays already matched input, i.e. for error messages
229
+ pastInput: /* @__PURE__ */ a(function() {
230
+ var t = this.matched.substr(0, this.matched.length - this.match.length);
231
+ return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
232
+ }, "pastInput"),
233
+ // displays upcoming input, i.e. for error messages
234
+ upcomingInput: /* @__PURE__ */ a(function() {
235
+ var t = this.match;
236
+ return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
237
+ }, "upcomingInput"),
238
+ // displays the character position where the lexing error occurred, i.e. for error messages
239
+ showPosition: /* @__PURE__ */ a(function() {
240
+ var t = this.pastInput(), r = new Array(t.length + 1).join("-");
241
+ return t + this.upcomingInput() + `
242
+ ` + r + "^";
243
+ }, "showPosition"),
244
+ // test the lexed token: return FALSE when not a match, otherwise return token
245
+ test_match: /* @__PURE__ */ a(function(t, r) {
246
+ var o, l, n;
247
+ if (this.options.backtrack_lexer && (n = {
248
+ yylineno: this.yylineno,
249
+ yylloc: {
250
+ first_line: this.yylloc.first_line,
251
+ last_line: this.last_line,
252
+ first_column: this.yylloc.first_column,
253
+ last_column: this.yylloc.last_column
254
+ },
255
+ yytext: this.yytext,
256
+ match: this.match,
257
+ matches: this.matches,
258
+ matched: this.matched,
259
+ yyleng: this.yyleng,
260
+ offset: this.offset,
261
+ _more: this._more,
262
+ _input: this._input,
263
+ yy: this.yy,
264
+ conditionStack: this.conditionStack.slice(0),
265
+ done: this.done
266
+ }, this.options.ranges && (n.yylloc.range = this.yylloc.range.slice(0))), l = t[0].match(/(?:\r\n?|\n).*/g), l && (this.yylineno += l.length), this.yylloc = {
267
+ first_line: this.yylloc.last_line,
268
+ last_line: this.yylineno + 1,
269
+ first_column: this.yylloc.last_column,
270
+ last_column: l ? l[l.length - 1].length - l[l.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
271
+ }, this.yytext += t[0], this.match += t[0], this.matches = t, 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(t[0].length), this.matched += t[0], o = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o)
272
+ return o;
273
+ if (this._backtrack) {
274
+ for (var E in n)
275
+ this[E] = n[E];
276
+ return !1;
277
+ }
278
+ return !1;
279
+ }, "test_match"),
280
+ // return next match in input
281
+ next: /* @__PURE__ */ a(function() {
282
+ if (this.done)
283
+ return this.EOF;
284
+ this._input || (this.done = !0);
285
+ var t, r, o, l;
286
+ this._more || (this.yytext = "", this.match = "");
287
+ for (var n = this._currentRules(), E = 0; E < n.length; E++)
288
+ if (o = this._input.match(this.rules[n[E]]), o && (!r || o[0].length > r[0].length)) {
289
+ if (r = o, l = E, this.options.backtrack_lexer) {
290
+ if (t = this.test_match(o, n[E]), t !== !1)
291
+ return t;
292
+ if (this._backtrack) {
293
+ r = !1;
294
+ continue;
295
+ } else
296
+ return !1;
297
+ } else if (!this.options.flex)
298
+ break;
299
+ }
300
+ return r ? (t = this.test_match(r, n[l]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
301
+ ` + this.showPosition(), {
302
+ text: "",
303
+ token: null,
304
+ line: this.yylineno
305
+ });
306
+ }, "next"),
307
+ // return next match that has a token
308
+ lex: /* @__PURE__ */ a(function() {
309
+ var t = this.next();
310
+ return t || this.lex();
311
+ }, "lex"),
312
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
313
+ begin: /* @__PURE__ */ a(function(t) {
314
+ this.conditionStack.push(t);
315
+ }, "begin"),
316
+ // pop the previously active lexer condition state off the condition stack
317
+ popState: /* @__PURE__ */ a(function() {
318
+ var t = this.conditionStack.length - 1;
319
+ return t > 0 ? this.conditionStack.pop() : this.conditionStack[0];
320
+ }, "popState"),
321
+ // produce the lexer rule set which is active for the currently active lexer condition state
322
+ _currentRules: /* @__PURE__ */ a(function() {
323
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
324
+ }, "_currentRules"),
325
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
326
+ topState: /* @__PURE__ */ a(function(t) {
327
+ return t = this.conditionStack.length - 1 - Math.abs(t || 0), t >= 0 ? this.conditionStack[t] : "INITIAL";
328
+ }, "topState"),
329
+ // alias for begin(condition)
330
+ pushState: /* @__PURE__ */ a(function(t) {
331
+ this.begin(t);
332
+ }, "pushState"),
333
+ // return the number of states currently on the stack
334
+ stateStackSize: /* @__PURE__ */ a(function() {
335
+ return this.conditionStack.length;
336
+ }, "stateStackSize"),
337
+ options: { "case-insensitive": !0 },
338
+ performAction: /* @__PURE__ */ a(function(t, r, o, l) {
339
+ switch (o) {
340
+ case 0:
341
+ return t.getLogger().trace("Found comment", r.yytext), 6;
342
+ case 1:
343
+ return 8;
344
+ case 2:
345
+ this.begin("CLASS");
346
+ break;
347
+ case 3:
348
+ return this.popState(), 16;
349
+ case 4:
350
+ this.popState();
351
+ break;
352
+ case 5:
353
+ t.getLogger().trace("Begin icon"), this.begin("ICON");
354
+ break;
355
+ case 6:
356
+ return t.getLogger().trace("SPACELINE"), 6;
357
+ case 7:
358
+ return 7;
359
+ case 8:
360
+ return 15;
361
+ case 9:
362
+ t.getLogger().trace("end icon"), this.popState();
363
+ break;
364
+ case 10:
365
+ return t.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
366
+ case 11:
367
+ return t.getLogger().trace("Cloud"), this.begin("NODE"), 19;
368
+ case 12:
369
+ return t.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
370
+ case 13:
371
+ return t.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
372
+ case 14:
373
+ return this.begin("NODE"), 19;
374
+ case 15:
375
+ return this.begin("NODE"), 19;
376
+ case 16:
377
+ return this.begin("NODE"), 19;
378
+ case 17:
379
+ return this.begin("NODE"), 19;
380
+ case 18:
381
+ return 13;
382
+ case 19:
383
+ return 22;
384
+ case 20:
385
+ return 11;
386
+ case 21:
387
+ this.begin("NSTR2");
388
+ break;
389
+ case 22:
390
+ return "NODE_DESCR";
391
+ case 23:
392
+ this.popState();
393
+ break;
394
+ case 24:
395
+ t.getLogger().trace("Starting NSTR"), this.begin("NSTR");
396
+ break;
397
+ case 25:
398
+ return t.getLogger().trace("description:", r.yytext), "NODE_DESCR";
399
+ case 26:
400
+ this.popState();
401
+ break;
402
+ case 27:
403
+ return this.popState(), t.getLogger().trace("node end ))"), "NODE_DEND";
404
+ case 28:
405
+ return this.popState(), t.getLogger().trace("node end )"), "NODE_DEND";
406
+ case 29:
407
+ return this.popState(), t.getLogger().trace("node end ...", r.yytext), "NODE_DEND";
408
+ case 30:
409
+ return this.popState(), t.getLogger().trace("node end (("), "NODE_DEND";
410
+ case 31:
411
+ return this.popState(), t.getLogger().trace("node end (-"), "NODE_DEND";
412
+ case 32:
413
+ return this.popState(), t.getLogger().trace("node end (-"), "NODE_DEND";
414
+ case 33:
415
+ return this.popState(), t.getLogger().trace("node end (("), "NODE_DEND";
416
+ case 34:
417
+ return this.popState(), t.getLogger().trace("node end (("), "NODE_DEND";
418
+ case 35:
419
+ return t.getLogger().trace("Long description:", r.yytext), 20;
420
+ case 36:
421
+ return t.getLogger().trace("Long description:", r.yytext), 20;
422
+ }
423
+ }, "anonymous"),
424
+ rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
425
+ conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
426
+ };
427
+ return S;
428
+ }();
429
+ B.lexer = ie;
430
+ function R() {
431
+ this.yy = {};
432
+ }
433
+ return a(R, "Parser"), R.prototype = B, B.Parser = R, new R();
434
+ }();
435
+ J.parser = J;
436
+ var Ne = J, x = {
437
+ DEFAULT: 0,
438
+ NO_BORDER: 0,
439
+ ROUNDED_RECT: 1,
440
+ RECT: 2,
441
+ CIRCLE: 3,
442
+ CLOUD: 4,
443
+ BANG: 5,
444
+ HEXAGON: 6
445
+ }, z, De = (z = class {
446
+ constructor() {
447
+ this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = x, this.clear(), this.getType = this.getType.bind(this), this.getElementById = this.getElementById.bind(this), this.getParent = this.getParent.bind(this), this.getMindmap = this.getMindmap.bind(this), this.addNode = this.addNode.bind(this), this.decorateNode = this.decorateNode.bind(this);
448
+ }
449
+ clear() {
450
+ this.nodes = [], this.count = 0, this.elements = {}, this.baseLevel = void 0;
451
+ }
452
+ getParent(e) {
453
+ for (let s = this.nodes.length - 1; s >= 0; s--)
454
+ if (this.nodes[s].level < e)
455
+ return this.nodes[s];
456
+ return null;
457
+ }
458
+ getMindmap() {
459
+ return this.nodes.length > 0 ? this.nodes[0] : null;
460
+ }
461
+ addNode(e, s, i, c) {
462
+ var h, y;
463
+ I.info("addNode", e, s, i, c);
464
+ let u = !1;
465
+ this.nodes.length === 0 ? (this.baseLevel = e, e = 0, u = !0) : this.baseLevel !== void 0 && (e = e - this.baseLevel, u = !1);
466
+ const g = X();
467
+ let L = ((h = g.mindmap) == null ? void 0 : h.padding) ?? M.mindmap.padding;
468
+ switch (c) {
469
+ case this.nodeType.ROUNDED_RECT:
470
+ case this.nodeType.RECT:
471
+ case this.nodeType.HEXAGON:
472
+ L *= 2;
473
+ break;
474
+ }
475
+ const p = {
476
+ id: this.count++,
477
+ nodeId: P(s, g),
478
+ level: e,
479
+ descr: P(i, g),
480
+ type: c,
481
+ children: [],
482
+ width: ((y = g.mindmap) == null ? void 0 : y.maxNodeWidth) ?? M.mindmap.maxNodeWidth,
483
+ padding: L,
484
+ isRoot: u
485
+ }, C = this.getParent(e);
486
+ if (C)
487
+ C.children.push(p), this.nodes.push(p);
488
+ else if (u)
489
+ this.nodes.push(p);
490
+ else
491
+ throw new Error(
492
+ `There can be only one root. No parent could be found for ("${p.descr}")`
493
+ );
494
+ }
495
+ getType(e, s) {
496
+ switch (I.debug("In get type", e, s), e) {
497
+ case "[":
498
+ return this.nodeType.RECT;
499
+ case "(":
500
+ return s === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
501
+ case "((":
502
+ return this.nodeType.CIRCLE;
503
+ case ")":
504
+ return this.nodeType.CLOUD;
505
+ case "))":
506
+ return this.nodeType.BANG;
507
+ case "{{":
508
+ return this.nodeType.HEXAGON;
509
+ default:
510
+ return this.nodeType.DEFAULT;
511
+ }
512
+ }
513
+ setElementForId(e, s) {
514
+ this.elements[e] = s;
515
+ }
516
+ getElementById(e) {
517
+ return this.elements[e];
518
+ }
519
+ decorateNode(e) {
520
+ if (!e)
521
+ return;
522
+ const s = X(), i = this.nodes[this.nodes.length - 1];
523
+ e.icon && (i.icon = P(e.icon, s)), e.class && (i.class = P(e.class, s));
524
+ }
525
+ type2Str(e) {
526
+ switch (e) {
527
+ case this.nodeType.DEFAULT:
528
+ return "no-border";
529
+ case this.nodeType.RECT:
530
+ return "rect";
531
+ case this.nodeType.ROUNDED_RECT:
532
+ return "rounded-rect";
533
+ case this.nodeType.CIRCLE:
534
+ return "circle";
535
+ case this.nodeType.CLOUD:
536
+ return "cloud";
537
+ case this.nodeType.BANG:
538
+ return "bang";
539
+ case this.nodeType.HEXAGON:
540
+ return "hexgon";
541
+ default:
542
+ return "no-border";
543
+ }
544
+ }
545
+ /**
546
+ * Assign section numbers to nodes based on their position relative to root
547
+ * @param node - The mindmap node to process
548
+ * @param sectionNumber - The section number to assign (undefined for root)
549
+ */
550
+ assignSections(e, s) {
551
+ if (e.level === 0 ? e.section = void 0 : e.section = s, e.children)
552
+ for (const [i, c] of e.children.entries()) {
553
+ const h = e.level === 0 ? i : s;
554
+ this.assignSections(c, h);
555
+ }
556
+ }
557
+ /**
558
+ * Convert mindmap tree structure to flat array of nodes
559
+ * @param node - The mindmap node to process
560
+ * @param processedNodes - Array to collect processed nodes
561
+ */
562
+ flattenNodes(e, s) {
563
+ const i = ["mindmap-node"];
564
+ e.isRoot === !0 ? i.push("section-root", "section--1") : e.section !== void 0 && i.push(`section-${e.section}`), e.class && i.push(e.class);
565
+ const c = i.join(" "), h = /* @__PURE__ */ a((u) => {
566
+ switch (u) {
567
+ case x.CIRCLE:
568
+ return "mindmapCircle";
569
+ case x.RECT:
570
+ return "rect";
571
+ case x.ROUNDED_RECT:
572
+ return "rounded";
573
+ case x.CLOUD:
574
+ return "cloud";
575
+ case x.BANG:
576
+ return "bang";
577
+ case x.HEXAGON:
578
+ return "hexagon";
579
+ case x.DEFAULT:
580
+ return "defaultMindmapNode";
581
+ case x.NO_BORDER:
582
+ default:
583
+ return "rect";
584
+ }
585
+ }, "getShapeFromType"), y = {
586
+ id: e.id.toString(),
587
+ domId: "node_" + e.id.toString(),
588
+ label: e.descr,
589
+ isGroup: !1,
590
+ shape: h(e.type),
591
+ width: e.width,
592
+ height: e.height ?? 0,
593
+ padding: e.padding,
594
+ cssClasses: c,
595
+ cssStyles: [],
596
+ look: "default",
597
+ icon: e.icon,
598
+ x: e.x,
599
+ y: e.y,
600
+ // Mindmap-specific properties
601
+ level: e.level,
602
+ nodeId: e.nodeId,
603
+ type: e.type,
604
+ section: e.section
605
+ };
606
+ if (s.push(y), e.children)
607
+ for (const u of e.children)
608
+ this.flattenNodes(u, s);
609
+ }
610
+ /**
611
+ * Generate edges from parent-child relationships in mindmap tree
612
+ * @param node - The mindmap node to process
613
+ * @param edges - Array to collect edges
614
+ */
615
+ generateEdges(e, s) {
616
+ if (e.children)
617
+ for (const i of e.children) {
618
+ let c = "edge";
619
+ i.section !== void 0 && (c += ` section-edge-${i.section}`);
620
+ const h = e.level + 1;
621
+ c += ` edge-depth-${h}`;
622
+ const y = {
623
+ id: `edge_${e.id}_${i.id}`,
624
+ start: e.id.toString(),
625
+ end: i.id.toString(),
626
+ type: "normal",
627
+ curve: "basis",
628
+ thickness: "normal",
629
+ look: "default",
630
+ classes: c,
631
+ // Store mindmap-specific data
632
+ depth: e.level,
633
+ section: i.section
634
+ };
635
+ s.push(y), this.generateEdges(i, s);
636
+ }
637
+ }
638
+ /**
639
+ * Get structured data for layout algorithms
640
+ * Following the pattern established by ER diagrams
641
+ * @returns Structured data containing nodes, edges, and config
642
+ */
643
+ getData() {
644
+ const e = this.getMindmap(), s = X(), i = ge().layout !== void 0, c = s;
645
+ if (i || (c.layout = "cose-bilkent"), !e)
646
+ return {
647
+ nodes: [],
648
+ edges: [],
649
+ config: c
650
+ };
651
+ I.debug("getData: mindmapRoot", e, s), this.assignSections(e);
652
+ const h = [], y = [];
653
+ this.flattenNodes(e, h), this.generateEdges(e, y), I.debug(
654
+ `getData: processed ${h.length} nodes and ${y.length} edges`
655
+ );
656
+ const u = /* @__PURE__ */ new Map();
657
+ for (const g of h)
658
+ u.set(g.id, {
659
+ shape: g.shape,
660
+ width: g.width,
661
+ height: g.height,
662
+ padding: g.padding
663
+ });
664
+ return {
665
+ nodes: h,
666
+ edges: y,
667
+ config: c,
668
+ // Store the root node for mindmap-specific layout algorithms
669
+ rootNode: e,
670
+ // Properties required by dagre layout algorithm
671
+ markers: ["point"],
672
+ // Mindmaps don't use markers
673
+ direction: "TB",
674
+ // Top-to-bottom direction for mindmaps
675
+ nodeSpacing: 50,
676
+ // Default spacing between nodes
677
+ rankSpacing: 50,
678
+ // Default spacing between ranks
679
+ // Add shapes for ELK compatibility
680
+ shapes: Object.fromEntries(u),
681
+ // Additional properties that layout algorithms might expect
682
+ type: "mindmap",
683
+ diagramId: "mindmap-" + be()
684
+ };
685
+ }
686
+ // Expose logger to grammar
687
+ getLogger() {
688
+ return I;
689
+ }
690
+ }, a(z, "MindmapDB"), z), Se = /* @__PURE__ */ a(async (e, s, i, c) => {
691
+ var h, y;
692
+ I.debug(`Rendering mindmap diagram
693
+ ` + e);
694
+ const u = c.db, g = u.getData(), L = ce(s, g.config.securityLevel);
695
+ g.type = c.type, g.layoutAlgorithm = le(g.config.layout, {
696
+ fallback: "cose-bilkent"
697
+ }), g.diagramId = s, u.getMindmap() && (g.nodes.forEach((p) => {
698
+ p.shape === "rounded" ? (p.radius = 15, p.taper = 15, p.stroke = "none", p.width = 0, p.padding = 15) : p.shape === "circle" ? p.padding = 10 : p.shape === "rect" && (p.width = 0, p.padding = 10);
699
+ }), await de(g, L), he(
700
+ L,
701
+ ((h = g.config.mindmap) == null ? void 0 : h.padding) ?? M.mindmap.padding,
702
+ "mindmapDiagram",
703
+ ((y = g.config.mindmap) == null ? void 0 : y.useMaxWidth) ?? M.mindmap.useMaxWidth
704
+ ));
705
+ }, "draw"), Le = {
706
+ draw: Se
707
+ }, ke = /* @__PURE__ */ a((e) => {
708
+ let s = "";
709
+ for (let i = 0; i < e.THEME_COLOR_LIMIT; i++)
710
+ e["lineColor" + i] = e["lineColor" + i] || e["cScaleInv" + i], ue(e["lineColor" + i]) ? e["lineColor" + i] = pe(e["lineColor" + i], 20) : e["lineColor" + i] = ye(e["lineColor" + i], 20);
711
+ for (let i = 0; i < e.THEME_COLOR_LIMIT; i++) {
712
+ const c = "" + (17 - 3 * i);
713
+ s += `
714
+ .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
715
+ fill: ${e["cScale" + i]};
716
+ }
717
+ .section-${i - 1} text {
718
+ fill: ${e["cScaleLabel" + i]};
719
+ }
720
+ .node-icon-${i - 1} {
721
+ font-size: 40px;
722
+ color: ${e["cScaleLabel" + i]};
723
+ }
724
+ .section-edge-${i - 1}{
725
+ stroke: ${e["cScale" + i]};
726
+ }
727
+ .edge-depth-${i - 1}{
728
+ stroke-width: ${c};
729
+ }
730
+ .section-${i - 1} line {
731
+ stroke: ${e["cScaleInv" + i]} ;
732
+ stroke-width: 3;
733
+ }
734
+
735
+ .disabled, .disabled circle, .disabled text {
736
+ fill: lightgray;
737
+ }
738
+ .disabled text {
739
+ fill: #efefef;
740
+ }
741
+ `;
742
+ }
743
+ return s;
744
+ }, "genSections"), xe = /* @__PURE__ */ a((e) => `
745
+ .edge {
746
+ stroke-width: 3;
747
+ }
748
+ ${ke(e)}
749
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
750
+ fill: ${e.git0};
751
+ }
752
+ .section-root text {
753
+ fill: ${e.gitBranchLabel0};
754
+ }
755
+ .section-root span {
756
+ color: ${e.gitBranchLabel0};
757
+ }
758
+ .section-2 span {
759
+ color: ${e.gitBranchLabel0};
760
+ }
761
+ .icon-container {
762
+ height:100%;
763
+ display: flex;
764
+ justify-content: center;
765
+ align-items: center;
766
+ }
767
+ .edge {
768
+ fill: none;
769
+ }
770
+ .mindmap-node-label {
771
+ dy: 1em;
772
+ alignment-baseline: middle;
773
+ text-anchor: middle;
774
+ dominant-baseline: middle;
775
+ text-align: center;
776
+ }
777
+ `, "getStyles"), ve = xe, Ce = {
778
+ get db() {
779
+ return new De();
780
+ },
781
+ renderer: Le,
782
+ parser: Ne,
783
+ styles: ve
784
+ };
785
+ export {
786
+ Ce as diagram
787
+ };