@ucap-llm/ai-ui 1.1.6 → 1.1.7

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 (55) hide show
  1. package/_basePickBy-7d00d05e.mjs +153 -0
  2. package/_baseUniq-1876be04.mjs +440 -0
  3. package/ai-ui.es.js +11 -78207
  4. package/ai-ui.umd.js +2701 -143
  5. package/arc-bb1e7b28.mjs +85 -0
  6. package/architecture-4AB2E3PP-26f07d27.mjs +10 -0
  7. package/architectureDiagram-IEHRJDOE-535e4958.mjs +4640 -0
  8. package/blockDiagram-JOT3LUYC-e5536854.mjs +2251 -0
  9. package/c4Diagram-VJAJSXHY-311741c3.mjs +1583 -0
  10. package/channel-5d097975.mjs +5 -0
  11. package/chunk-4BMEZGHF-55420838.mjs +9 -0
  12. package/chunk-A2AXSNBT-5f9de039.mjs +1373 -0
  13. package/chunk-AEK57VVT-bd6e836f.mjs +1416 -0
  14. package/chunk-D6G4REZN-69cf348a.mjs +64 -0
  15. package/chunk-RZ5BOZE2-ebe3985e.mjs +24 -0
  16. package/chunk-XZIHB7SX-ed9a9d65.mjs +15 -0
  17. package/classDiagram-GIVACNV2-4d61f06d.mjs +18 -0
  18. package/classDiagram-v2-COTLJTTW-4d61f06d.mjs +18 -0
  19. package/clone-44064c55.mjs +8 -0
  20. package/cytoscape.esm-bb479f88.mjs +18232 -0
  21. package/dagre-OKDRZEBW-0574359b.mjs +448 -0
  22. package/diagram-SSKATNLV-f4dd04b2.mjs +225 -0
  23. package/diagram-VNBRO52H-f77f925a.mjs +130 -0
  24. package/erDiagram-Q7BY3M3F-8213684f.mjs +843 -0
  25. package/flowDiagram-4HSFHLVR-1decdff6.mjs +1624 -0
  26. package/ganttDiagram-APWFNJXF-461381a5.mjs +2521 -0
  27. package/gitGraph-O2Q2CXLX-d961db16.mjs +10 -0
  28. package/gitGraphDiagram-7IBYFJ6S-be6c39c3.mjs +716 -0
  29. package/graph-7ba79f74.mjs +249 -0
  30. package/index-f5aac161.mjs +93487 -0
  31. package/info-4N47QTOZ-615527c9.mjs +10 -0
  32. package/infoDiagram-PH2N3AL5-064df479.mjs +26 -0
  33. package/init-f9637058.mjs +16 -0
  34. package/journeyDiagram-U35MCT3I-94c54b39.mjs +811 -0
  35. package/kanban-definition-NDS4AKOZ-58a05db1.mjs +720 -0
  36. package/katex-2e45926a.mjs +11700 -0
  37. package/layout-c953b0e7.mjs +1344 -0
  38. package/linear-3c81794f.mjs +447 -0
  39. package/mermaid-parser.core-7afd2b2f.mjs +12845 -0
  40. package/mindmap-definition-ALO5MXBD-60e68e28.mjs +3222 -0
  41. package/ordinal-980380c7.mjs +65 -0
  42. package/package.json +1 -1
  43. package/packet-KVYON367-4b5a305e.mjs +10 -0
  44. package/pie-R6RNRRYF-0f27d16d.mjs +10 -0
  45. package/pieDiagram-IB7DONF6-66cebf11.mjs +167 -0
  46. package/quadrantDiagram-7GDLP6J5-f2cbfc79.mjs +1027 -0
  47. package/radar-MK3ICKWK-9e1913d7.mjs +10 -0
  48. package/requirementDiagram-KVF5MWMF-36d316c2.mjs +853 -0
  49. package/sankeyDiagram-QLVOVGJD-76245efb.mjs +826 -0
  50. package/sequenceDiagram-X6HHIX6F-a0ec0021.mjs +2283 -0
  51. package/stateDiagram-DGXRK772-e6387816.mjs +274 -0
  52. package/stateDiagram-v2-YXO3MK2T-f011ada4.mjs +18 -0
  53. package/style.css +1 -1
  54. package/timeline-definition-BDJGKUSR-a62514a7.mjs +806 -0
  55. package/xychartDiagram-VJFVF3MP-1b807048.mjs +1306 -0
@@ -0,0 +1,806 @@
1
+ import { _ as s, B as xt, U as kt, t as vt, j as U, d as _t, l as T, V as bt, W as wt, X as St, Y as Et } from "./index-f5aac161.mjs";
2
+ import { d as nt } from "./arc-bb1e7b28.mjs";
3
+ import "vue";
4
+ var X = function() {
5
+ var n = /* @__PURE__ */ s(function(f, i, a, d) {
6
+ for (a = a || {}, d = f.length; d--; a[f[d]] = i)
7
+ ;
8
+ return a;
9
+ }, "o"), t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], l = [1, 10], r = [1, 11], h = [1, 12], c = [1, 13], g = [1, 16], m = [1, 17], p = {
10
+ trace: /* @__PURE__ */ s(function() {
11
+ }, "trace"),
12
+ yy: {},
13
+ symbols_: { error: 2, start: 3, timeline: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, period_statement: 18, event_statement: 19, period: 20, event: 21, $accept: 0, $end: 1 },
14
+ terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" },
15
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]],
16
+ performAction: /* @__PURE__ */ s(function(i, a, d, u, y, o, S) {
17
+ var k = o.length - 1;
18
+ switch (y) {
19
+ case 1:
20
+ return o[k - 1];
21
+ case 2:
22
+ this.$ = [];
23
+ break;
24
+ case 3:
25
+ o[k - 1].push(o[k]), this.$ = o[k - 1];
26
+ break;
27
+ case 4:
28
+ case 5:
29
+ this.$ = o[k];
30
+ break;
31
+ case 6:
32
+ case 7:
33
+ this.$ = [];
34
+ break;
35
+ case 8:
36
+ u.getCommonDb().setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
37
+ break;
38
+ case 9:
39
+ this.$ = o[k].trim(), u.getCommonDb().setAccTitle(this.$);
40
+ break;
41
+ case 10:
42
+ case 11:
43
+ this.$ = o[k].trim(), u.getCommonDb().setAccDescription(this.$);
44
+ break;
45
+ case 12:
46
+ u.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
47
+ break;
48
+ case 15:
49
+ u.addTask(o[k], 0, ""), this.$ = o[k];
50
+ break;
51
+ case 16:
52
+ u.addEvent(o[k].substr(2)), this.$ = o[k];
53
+ break;
54
+ }
55
+ }, "anonymous"),
56
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, n(t, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: e, 12: l, 14: r, 16: h, 17: c, 18: 14, 19: 15, 20: g, 21: m }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: l, 14: r, 16: h, 17: c, 18: 14, 19: 15, 20: g, 21: m }, n(t, [2, 5]), n(t, [2, 6]), n(t, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, n(t, [2, 11]), n(t, [2, 12]), n(t, [2, 13]), n(t, [2, 14]), n(t, [2, 15]), n(t, [2, 16]), n(t, [2, 4]), n(t, [2, 9]), n(t, [2, 10])],
57
+ defaultActions: {},
58
+ parseError: /* @__PURE__ */ s(function(i, a) {
59
+ if (a.recoverable)
60
+ this.trace(i);
61
+ else {
62
+ var d = new Error(i);
63
+ throw d.hash = a, d;
64
+ }
65
+ }, "parseError"),
66
+ parse: /* @__PURE__ */ s(function(i) {
67
+ var a = this, d = [0], u = [], y = [null], o = [], S = this.table, k = "", M = 0, P = 0, B = 2, J = 1, O = o.slice.call(arguments, 1), v = Object.create(this.lexer), E = { yy: {} };
68
+ for (var b in this.yy)
69
+ Object.prototype.hasOwnProperty.call(this.yy, b) && (E.yy[b] = this.yy[b]);
70
+ v.setInput(i, E.yy), E.yy.lexer = v, E.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
71
+ var L = v.yylloc;
72
+ o.push(L);
73
+ var A = v.options && v.options.ranges;
74
+ typeof E.yy.parseError == "function" ? this.parseError = E.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
75
+ function R(I) {
76
+ d.length = d.length - 2 * I, y.length = y.length - I, o.length = o.length - I;
77
+ }
78
+ s(R, "popStack");
79
+ function F() {
80
+ var I;
81
+ return I = u.pop() || v.lex() || J, typeof I != "number" && (I instanceof Array && (u = I, I = u.pop()), I = a.symbols_[I] || I), I;
82
+ }
83
+ s(F, "lex");
84
+ for (var w, C, N, K, V = {}, j, $, et, G; ; ) {
85
+ if (C = d[d.length - 1], this.defaultActions[C] ? N = this.defaultActions[C] : ((w === null || typeof w > "u") && (w = F()), N = S[C] && S[C][w]), typeof N > "u" || !N.length || !N[0]) {
86
+ var Q = "";
87
+ G = [];
88
+ for (j in S[C])
89
+ this.terminals_[j] && j > B && G.push("'" + this.terminals_[j] + "'");
90
+ v.showPosition ? Q = "Parse error on line " + (M + 1) + `:
91
+ ` + v.showPosition() + `
92
+ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Q = "Parse error on line " + (M + 1) + ": Unexpected " + (w == J ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Q, {
93
+ text: v.match,
94
+ token: this.terminals_[w] || w,
95
+ line: v.yylineno,
96
+ loc: L,
97
+ expected: G
98
+ });
99
+ }
100
+ if (N[0] instanceof Array && N.length > 1)
101
+ throw new Error("Parse Error: multiple actions possible at state: " + C + ", token: " + w);
102
+ switch (N[0]) {
103
+ case 1:
104
+ d.push(w), y.push(v.yytext), o.push(v.yylloc), d.push(N[1]), w = null, P = v.yyleng, k = v.yytext, M = v.yylineno, L = v.yylloc;
105
+ break;
106
+ case 2:
107
+ if ($ = this.productions_[N[1]][1], V.$ = y[y.length - $], V._$ = {
108
+ first_line: o[o.length - ($ || 1)].first_line,
109
+ last_line: o[o.length - 1].last_line,
110
+ first_column: o[o.length - ($ || 1)].first_column,
111
+ last_column: o[o.length - 1].last_column
112
+ }, A && (V._$.range = [
113
+ o[o.length - ($ || 1)].range[0],
114
+ o[o.length - 1].range[1]
115
+ ]), K = this.performAction.apply(V, [
116
+ k,
117
+ P,
118
+ M,
119
+ E.yy,
120
+ N[1],
121
+ y,
122
+ o
123
+ ].concat(O)), typeof K < "u")
124
+ return K;
125
+ $ && (d = d.slice(0, -1 * $ * 2), y = y.slice(0, -1 * $), o = o.slice(0, -1 * $)), d.push(this.productions_[N[1]][0]), y.push(V.$), o.push(V._$), et = S[d[d.length - 2]][d[d.length - 1]], d.push(et);
126
+ break;
127
+ case 3:
128
+ return !0;
129
+ }
130
+ }
131
+ return !0;
132
+ }, "parse")
133
+ }, x = /* @__PURE__ */ function() {
134
+ var f = {
135
+ EOF: 1,
136
+ parseError: /* @__PURE__ */ s(function(a, d) {
137
+ if (this.yy.parser)
138
+ this.yy.parser.parseError(a, d);
139
+ else
140
+ throw new Error(a);
141
+ }, "parseError"),
142
+ // resets the lexer, sets new input
143
+ setInput: /* @__PURE__ */ s(function(i, a) {
144
+ return this.yy = a || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
145
+ first_line: 1,
146
+ first_column: 0,
147
+ last_line: 1,
148
+ last_column: 0
149
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
150
+ }, "setInput"),
151
+ // consumes and returns one char from the input
152
+ input: /* @__PURE__ */ s(function() {
153
+ var i = this._input[0];
154
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
155
+ var a = i.match(/(?:\r\n?|\n).*/g);
156
+ 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), i;
157
+ }, "input"),
158
+ // unshifts one char (or a string) into the input
159
+ unput: /* @__PURE__ */ s(function(i) {
160
+ var a = i.length, d = i.split(/(?:\r\n?|\n)/g);
161
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
162
+ var u = this.match.split(/(?:\r\n?|\n)/g);
163
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), d.length - 1 && (this.yylineno -= d.length - 1);
164
+ var y = this.yylloc.range;
165
+ return this.yylloc = {
166
+ first_line: this.yylloc.first_line,
167
+ last_line: this.yylineno + 1,
168
+ first_column: this.yylloc.first_column,
169
+ last_column: d ? (d.length === u.length ? this.yylloc.first_column : 0) + u[u.length - d.length].length - d[0].length : this.yylloc.first_column - a
170
+ }, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
171
+ }, "unput"),
172
+ // When called from action, caches matched text and appends it on next action
173
+ more: /* @__PURE__ */ s(function() {
174
+ return this._more = !0, this;
175
+ }, "more"),
176
+ // 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.
177
+ reject: /* @__PURE__ */ s(function() {
178
+ if (this.options.backtrack_lexer)
179
+ this._backtrack = !0;
180
+ else
181
+ 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).
182
+ ` + this.showPosition(), {
183
+ text: "",
184
+ token: null,
185
+ line: this.yylineno
186
+ });
187
+ return this;
188
+ }, "reject"),
189
+ // retain first n characters of the match
190
+ less: /* @__PURE__ */ s(function(i) {
191
+ this.unput(this.match.slice(i));
192
+ }, "less"),
193
+ // displays already matched input, i.e. for error messages
194
+ pastInput: /* @__PURE__ */ s(function() {
195
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
196
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
197
+ }, "pastInput"),
198
+ // displays upcoming input, i.e. for error messages
199
+ upcomingInput: /* @__PURE__ */ s(function() {
200
+ var i = this.match;
201
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
202
+ }, "upcomingInput"),
203
+ // displays the character position where the lexing error occurred, i.e. for error messages
204
+ showPosition: /* @__PURE__ */ s(function() {
205
+ var i = this.pastInput(), a = new Array(i.length + 1).join("-");
206
+ return i + this.upcomingInput() + `
207
+ ` + a + "^";
208
+ }, "showPosition"),
209
+ // test the lexed token: return FALSE when not a match, otherwise return token
210
+ test_match: /* @__PURE__ */ s(function(i, a) {
211
+ var d, u, y;
212
+ if (this.options.backtrack_lexer && (y = {
213
+ yylineno: this.yylineno,
214
+ yylloc: {
215
+ first_line: this.yylloc.first_line,
216
+ last_line: this.last_line,
217
+ first_column: this.yylloc.first_column,
218
+ last_column: this.yylloc.last_column
219
+ },
220
+ yytext: this.yytext,
221
+ match: this.match,
222
+ matches: this.matches,
223
+ matched: this.matched,
224
+ yyleng: this.yyleng,
225
+ offset: this.offset,
226
+ _more: this._more,
227
+ _input: this._input,
228
+ yy: this.yy,
229
+ conditionStack: this.conditionStack.slice(0),
230
+ done: this.done
231
+ }, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), u = i[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
232
+ first_line: this.yylloc.last_line,
233
+ last_line: this.yylineno + 1,
234
+ first_column: this.yylloc.last_column,
235
+ last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
236
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], d = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), d)
237
+ return d;
238
+ if (this._backtrack) {
239
+ for (var o in y)
240
+ this[o] = y[o];
241
+ return !1;
242
+ }
243
+ return !1;
244
+ }, "test_match"),
245
+ // return next match in input
246
+ next: /* @__PURE__ */ s(function() {
247
+ if (this.done)
248
+ return this.EOF;
249
+ this._input || (this.done = !0);
250
+ var i, a, d, u;
251
+ this._more || (this.yytext = "", this.match = "");
252
+ for (var y = this._currentRules(), o = 0; o < y.length; o++)
253
+ if (d = this._input.match(this.rules[y[o]]), d && (!a || d[0].length > a[0].length)) {
254
+ if (a = d, u = o, this.options.backtrack_lexer) {
255
+ if (i = this.test_match(d, y[o]), i !== !1)
256
+ return i;
257
+ if (this._backtrack) {
258
+ a = !1;
259
+ continue;
260
+ } else
261
+ return !1;
262
+ } else if (!this.options.flex)
263
+ break;
264
+ }
265
+ return a ? (i = this.test_match(a, y[u]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
266
+ ` + this.showPosition(), {
267
+ text: "",
268
+ token: null,
269
+ line: this.yylineno
270
+ });
271
+ }, "next"),
272
+ // return next match that has a token
273
+ lex: /* @__PURE__ */ s(function() {
274
+ var a = this.next();
275
+ return a || this.lex();
276
+ }, "lex"),
277
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
278
+ begin: /* @__PURE__ */ s(function(a) {
279
+ this.conditionStack.push(a);
280
+ }, "begin"),
281
+ // pop the previously active lexer condition state off the condition stack
282
+ popState: /* @__PURE__ */ s(function() {
283
+ var a = this.conditionStack.length - 1;
284
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
285
+ }, "popState"),
286
+ // produce the lexer rule set which is active for the currently active lexer condition state
287
+ _currentRules: /* @__PURE__ */ s(function() {
288
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
289
+ }, "_currentRules"),
290
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
291
+ topState: /* @__PURE__ */ s(function(a) {
292
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
293
+ }, "topState"),
294
+ // alias for begin(condition)
295
+ pushState: /* @__PURE__ */ s(function(a) {
296
+ this.begin(a);
297
+ }, "pushState"),
298
+ // return the number of states currently on the stack
299
+ stateStackSize: /* @__PURE__ */ s(function() {
300
+ return this.conditionStack.length;
301
+ }, "stateStackSize"),
302
+ options: { "case-insensitive": !0 },
303
+ performAction: /* @__PURE__ */ s(function(a, d, u, y) {
304
+ switch (u) {
305
+ case 0:
306
+ break;
307
+ case 1:
308
+ break;
309
+ case 2:
310
+ return 10;
311
+ case 3:
312
+ break;
313
+ case 4:
314
+ break;
315
+ case 5:
316
+ return 4;
317
+ case 6:
318
+ return 11;
319
+ case 7:
320
+ return this.begin("acc_title"), 12;
321
+ case 8:
322
+ return this.popState(), "acc_title_value";
323
+ case 9:
324
+ return this.begin("acc_descr"), 14;
325
+ case 10:
326
+ return this.popState(), "acc_descr_value";
327
+ case 11:
328
+ this.begin("acc_descr_multiline");
329
+ break;
330
+ case 12:
331
+ this.popState();
332
+ break;
333
+ case 13:
334
+ return "acc_descr_multiline_value";
335
+ case 14:
336
+ return 17;
337
+ case 15:
338
+ return 21;
339
+ case 16:
340
+ return 20;
341
+ case 17:
342
+ return 6;
343
+ case 18:
344
+ return "INVALID";
345
+ }
346
+ }, "anonymous"),
347
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^:\n]+)/i, /^(?::\s[^:\n]+)/i, /^(?:[^#:\n]+)/i, /^(?:$)/i, /^(?:.)/i],
348
+ conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], inclusive: !0 } }
349
+ };
350
+ return f;
351
+ }();
352
+ p.lexer = x;
353
+ function _() {
354
+ this.yy = {};
355
+ }
356
+ return s(_, "Parser"), _.prototype = p, p.Parser = _, new _();
357
+ }();
358
+ X.parser = X;
359
+ var Tt = X, at = {};
360
+ xt(at, {
361
+ addEvent: () => yt,
362
+ addSection: () => ht,
363
+ addTask: () => pt,
364
+ addTaskOrg: () => gt,
365
+ clear: () => ct,
366
+ default: () => It,
367
+ getCommonDb: () => ot,
368
+ getSections: () => dt,
369
+ getTasks: () => ut
370
+ });
371
+ var z = "", lt = 0, Y = [], q = [], W = [], ot = /* @__PURE__ */ s(() => kt, "getCommonDb"), ct = /* @__PURE__ */ s(function() {
372
+ Y.length = 0, q.length = 0, z = "", W.length = 0, vt();
373
+ }, "clear"), ht = /* @__PURE__ */ s(function(n) {
374
+ z = n, Y.push(n);
375
+ }, "addSection"), dt = /* @__PURE__ */ s(function() {
376
+ return Y;
377
+ }, "getSections"), ut = /* @__PURE__ */ s(function() {
378
+ let n = rt();
379
+ const t = 100;
380
+ let e = 0;
381
+ for (; !n && e < t; )
382
+ n = rt(), e++;
383
+ return q.push(...W), q;
384
+ }, "getTasks"), pt = /* @__PURE__ */ s(function(n, t, e) {
385
+ const l = {
386
+ id: lt++,
387
+ section: z,
388
+ type: z,
389
+ task: n,
390
+ score: t || 0,
391
+ //if event is defined, then add it the events array
392
+ events: e ? [e] : []
393
+ };
394
+ W.push(l);
395
+ }, "addTask"), yt = /* @__PURE__ */ s(function(n) {
396
+ W.find((e) => e.id === lt - 1).events.push(n);
397
+ }, "addEvent"), gt = /* @__PURE__ */ s(function(n) {
398
+ const t = {
399
+ section: z,
400
+ type: z,
401
+ description: n,
402
+ task: n,
403
+ classes: []
404
+ };
405
+ q.push(t);
406
+ }, "addTaskOrg"), rt = /* @__PURE__ */ s(function() {
407
+ const n = /* @__PURE__ */ s(function(e) {
408
+ return W[e].processed;
409
+ }, "compileTask");
410
+ let t = !0;
411
+ for (const [e, l] of W.entries())
412
+ n(e), t = t && l.processed;
413
+ return t;
414
+ }, "compileTasks"), It = {
415
+ clear: ct,
416
+ getCommonDb: ot,
417
+ addSection: ht,
418
+ getSections: dt,
419
+ getTasks: ut,
420
+ addTask: pt,
421
+ addTaskOrg: gt,
422
+ addEvent: yt
423
+ }, Nt = 12, Z = /* @__PURE__ */ s(function(n, t) {
424
+ const e = n.append("rect");
425
+ return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
426
+ }, "drawRect"), Lt = /* @__PURE__ */ s(function(n, t) {
427
+ const l = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), r = n.append("g");
428
+ r.append("circle").attr("cx", t.cx - 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), r.append("circle").attr("cx", t.cx + 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
429
+ function h(m) {
430
+ const p = nt().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
431
+ m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
432
+ }
433
+ s(h, "smile");
434
+ function c(m) {
435
+ const p = nt().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
436
+ m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
437
+ }
438
+ s(c, "sad");
439
+ function g(m) {
440
+ m.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", t.cx - 5).attr("y1", t.cy + 7).attr("x2", t.cx + 5).attr("y2", t.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
441
+ }
442
+ return s(g, "ambivalent"), t.score > 3 ? h(r) : t.score < 3 ? c(r) : g(r), l;
443
+ }, "drawFace"), Mt = /* @__PURE__ */ s(function(n, t) {
444
+ const e = n.append("circle");
445
+ return e.attr("cx", t.cx), e.attr("cy", t.cy), e.attr("class", "actor-" + t.pos), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("r", t.r), e.class !== void 0 && e.attr("class", e.class), t.title !== void 0 && e.append("title").text(t.title), e;
446
+ }, "drawCircle"), ft = /* @__PURE__ */ s(function(n, t) {
447
+ const e = t.text.replace(/<br\s*\/?>/gi, " "), l = n.append("text");
448
+ l.attr("x", t.x), l.attr("y", t.y), l.attr("class", "legend"), l.style("text-anchor", t.anchor), t.class !== void 0 && l.attr("class", t.class);
449
+ const r = l.append("tspan");
450
+ return r.attr("x", t.x + t.textMargin * 2), r.text(e), l;
451
+ }, "drawText"), $t = /* @__PURE__ */ s(function(n, t) {
452
+ function e(r, h, c, g, m) {
453
+ return r + "," + h + " " + (r + c) + "," + h + " " + (r + c) + "," + (h + g - m) + " " + (r + c - m * 1.2) + "," + (h + g) + " " + r + "," + (h + g);
454
+ }
455
+ s(e, "genPoints");
456
+ const l = n.append("polygon");
457
+ l.attr("points", e(t.x, t.y, 50, 20, 7)), l.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ft(n, t);
458
+ }, "drawLabel"), Pt = /* @__PURE__ */ s(function(n, t, e) {
459
+ const l = n.append("g"), r = D();
460
+ r.x = t.x, r.y = t.y, r.fill = t.fill, r.width = e.width, r.height = e.height, r.class = "journey-section section-type-" + t.num, r.rx = 3, r.ry = 3, Z(l, r), mt(e)(
461
+ t.text,
462
+ l,
463
+ r.x,
464
+ r.y,
465
+ r.width,
466
+ r.height,
467
+ { class: "journey-section section-type-" + t.num },
468
+ e,
469
+ t.colour
470
+ );
471
+ }, "drawSection"), it = -1, At = /* @__PURE__ */ s(function(n, t, e) {
472
+ const l = t.x + e.width / 2, r = n.append("g");
473
+ it++;
474
+ const h = 300 + 5 * 30;
475
+ r.append("line").attr("id", "task" + it).attr("x1", l).attr("y1", t.y).attr("x2", l).attr("y2", h).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Lt(r, {
476
+ cx: l,
477
+ cy: 300 + (5 - t.score) * 30,
478
+ score: t.score
479
+ });
480
+ const c = D();
481
+ c.x = t.x, c.y = t.y, c.fill = t.fill, c.width = e.width, c.height = e.height, c.class = "task task-type-" + t.num, c.rx = 3, c.ry = 3, Z(r, c), mt(e)(
482
+ t.task,
483
+ r,
484
+ c.x,
485
+ c.y,
486
+ c.width,
487
+ c.height,
488
+ { class: "task" },
489
+ e,
490
+ t.colour
491
+ );
492
+ }, "drawTask"), Ct = /* @__PURE__ */ s(function(n, t) {
493
+ Z(n, {
494
+ x: t.startx,
495
+ y: t.starty,
496
+ width: t.stopx - t.startx,
497
+ height: t.stopy - t.starty,
498
+ fill: t.fill,
499
+ class: "rect"
500
+ }).lower();
501
+ }, "drawBackgroundRect"), Ht = /* @__PURE__ */ s(function() {
502
+ return {
503
+ x: 0,
504
+ y: 0,
505
+ fill: void 0,
506
+ "text-anchor": "start",
507
+ width: 100,
508
+ height: 100,
509
+ textMargin: 0,
510
+ rx: 0,
511
+ ry: 0
512
+ };
513
+ }, "getTextObj"), D = /* @__PURE__ */ s(function() {
514
+ return {
515
+ x: 0,
516
+ y: 0,
517
+ width: 100,
518
+ anchor: "start",
519
+ height: 100,
520
+ rx: 0,
521
+ ry: 0
522
+ };
523
+ }, "getNoteRect"), mt = /* @__PURE__ */ function() {
524
+ function n(r, h, c, g, m, p, x, _) {
525
+ const f = h.append("text").attr("x", c + m / 2).attr("y", g + p / 2 + 5).style("font-color", _).style("text-anchor", "middle").text(r);
526
+ l(f, x);
527
+ }
528
+ s(n, "byText");
529
+ function t(r, h, c, g, m, p, x, _, f) {
530
+ const { taskFontSize: i, taskFontFamily: a } = _, d = r.split(/<br\s*\/?>/gi);
531
+ for (let u = 0; u < d.length; u++) {
532
+ const y = u * i - i * (d.length - 1) / 2, o = h.append("text").attr("x", c + m / 2).attr("y", g).attr("fill", f).style("text-anchor", "middle").style("font-size", i).style("font-family", a);
533
+ o.append("tspan").attr("x", c + m / 2).attr("dy", y).text(d[u]), o.attr("y", g + p / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(o, x);
534
+ }
535
+ }
536
+ s(t, "byTspan");
537
+ function e(r, h, c, g, m, p, x, _) {
538
+ const f = h.append("switch"), a = f.append("foreignObject").attr("x", c).attr("y", g).attr("width", m).attr("height", p).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
539
+ a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), t(r, f, c, g, m, p, x, _), l(a, x);
540
+ }
541
+ s(e, "byFo");
542
+ function l(r, h) {
543
+ for (const c in h)
544
+ c in h && r.attr(c, h[c]);
545
+ }
546
+ return s(l, "_setTextAttrs"), function(r) {
547
+ return r.textPlacement === "fo" ? e : r.textPlacement === "old" ? n : t;
548
+ };
549
+ }(), Rt = /* @__PURE__ */ s(function(n) {
550
+ n.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
551
+ }, "initGraphics");
552
+ function tt(n, t) {
553
+ n.each(function() {
554
+ var e = U(this), l = e.text().split(/(\s+|<br>)/).reverse(), r, h = [], c = 1.1, g = e.attr("y"), m = parseFloat(e.attr("dy")), p = e.text(null).append("tspan").attr("x", 0).attr("y", g).attr("dy", m + "em");
555
+ for (let x = 0; x < l.length; x++)
556
+ r = l[l.length - 1 - x], h.push(r), p.text(h.join(" ").trim()), (p.node().getComputedTextLength() > t || r === "<br>") && (h.pop(), p.text(h.join(" ").trim()), r === "<br>" ? h = [""] : h = [r], p = e.append("tspan").attr("x", 0).attr("y", g).attr("dy", c + "em").text(r));
557
+ });
558
+ }
559
+ s(tt, "wrap");
560
+ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
561
+ var _;
562
+ const r = e % Nt - 1, h = n.append("g");
563
+ t.section = r, h.attr(
564
+ "class",
565
+ (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + r)
566
+ );
567
+ const c = h.append("g"), g = h.append("g"), p = g.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), x = (_ = l.fontSize) != null && _.replace ? l.fontSize.replace("px", "") : l.fontSize;
568
+ return t.height = p.height + x * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, g.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), zt(c, t, r, l), t;
569
+ }, "drawNode"), Vt = /* @__PURE__ */ s(function(n, t, e) {
570
+ var g;
571
+ const l = n.append("g"), h = l.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), c = (g = e.fontSize) != null && g.replace ? e.fontSize.replace("px", "") : e.fontSize;
572
+ return l.remove(), h.height + c * 1.1 * 0.5 + t.padding;
573
+ }, "getVirtualNodeHeight"), zt = /* @__PURE__ */ s(function(n, t, e) {
574
+ n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
575
+ "d",
576
+ `M0 ${t.height - 5} v${-t.height + 2 * 5} q0,-5 5,-5 h${t.width - 2 * 5} q5,0 5,5 v${t.height - 5} H0 Z`
577
+ ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
578
+ }, "defaultBkg"), H = {
579
+ drawRect: Z,
580
+ drawCircle: Mt,
581
+ drawSection: Pt,
582
+ drawText: ft,
583
+ drawLabel: $t,
584
+ drawTask: At,
585
+ drawBackgroundRect: Ct,
586
+ getTextObj: Ht,
587
+ getNoteRect: D,
588
+ initGraphics: Rt,
589
+ drawNode: Ft,
590
+ getVirtualNodeHeight: Vt
591
+ }, Wt = /* @__PURE__ */ s(function(n, t, e, l) {
592
+ var O, v;
593
+ const r = _t(), h = r.leftMargin ?? 50;
594
+ T.debug("timeline", l.db);
595
+ const c = r.securityLevel;
596
+ let g;
597
+ c === "sandbox" && (g = U("#i" + t));
598
+ const p = (c === "sandbox" ? U(g.nodes()[0].contentDocument.body) : U("body")).select("#" + t);
599
+ p.append("g");
600
+ const x = l.db.getTasks(), _ = l.db.getCommonDb().getDiagramTitle();
601
+ T.debug("task", x), H.initGraphics(p);
602
+ const f = l.db.getSections();
603
+ T.debug("sections", f);
604
+ let i = 0, a = 0, d = 0, u = 0, y = 50 + h, o = 50;
605
+ u = 50;
606
+ let S = 0, k = !0;
607
+ f.forEach(function(E) {
608
+ const b = {
609
+ number: S,
610
+ descr: E,
611
+ section: S,
612
+ width: 150,
613
+ padding: 20,
614
+ maxHeight: i
615
+ }, L = H.getVirtualNodeHeight(p, b, r);
616
+ T.debug("sectionHeight before draw", L), i = Math.max(i, L + 20);
617
+ });
618
+ let M = 0, P = 0;
619
+ T.debug("tasks.length", x.length);
620
+ for (const [E, b] of x.entries()) {
621
+ const L = {
622
+ number: E,
623
+ descr: b,
624
+ section: b.section,
625
+ width: 150,
626
+ padding: 20,
627
+ maxHeight: a
628
+ }, A = H.getVirtualNodeHeight(p, L, r);
629
+ T.debug("taskHeight before draw", A), a = Math.max(a, A + 20), M = Math.max(M, b.events.length);
630
+ let R = 0;
631
+ for (const F of b.events) {
632
+ const w = {
633
+ descr: F,
634
+ section: b.section,
635
+ number: b.section,
636
+ width: 150,
637
+ padding: 20,
638
+ maxHeight: 50
639
+ };
640
+ R += H.getVirtualNodeHeight(p, w, r);
641
+ }
642
+ P = Math.max(P, R);
643
+ }
644
+ T.debug("maxSectionHeight before draw", i), T.debug("maxTaskHeight before draw", a), f && f.length > 0 ? f.forEach((E) => {
645
+ const b = x.filter((F) => F.section === E), L = {
646
+ number: S,
647
+ descr: E,
648
+ section: S,
649
+ width: 200 * Math.max(b.length, 1) - 50,
650
+ padding: 20,
651
+ maxHeight: i
652
+ };
653
+ T.debug("sectionNode", L);
654
+ const A = p.append("g"), R = H.drawNode(A, L, S, r);
655
+ T.debug("sectionNode output", R), A.attr("transform", `translate(${y}, ${u})`), o += i + 50, b.length > 0 && st(
656
+ p,
657
+ b,
658
+ S,
659
+ y,
660
+ o,
661
+ a,
662
+ r,
663
+ M,
664
+ P,
665
+ i,
666
+ !1
667
+ ), y += 200 * Math.max(b.length, 1), o = u, S++;
668
+ }) : (k = !1, st(
669
+ p,
670
+ x,
671
+ S,
672
+ y,
673
+ o,
674
+ a,
675
+ r,
676
+ M,
677
+ P,
678
+ i,
679
+ !0
680
+ ));
681
+ const B = p.node().getBBox();
682
+ T.debug("bounds", B), _ && p.append("text").text(_).attr("x", B.width / 2 - h).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), d = k ? i + a + 150 : a + 100, p.append("g").attr("class", "lineWrapper").append("line").attr("x1", h).attr("y1", d).attr("x2", B.width + 3 * h).attr("y2", d).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), bt(
683
+ void 0,
684
+ p,
685
+ ((O = r.timeline) == null ? void 0 : O.padding) ?? 50,
686
+ ((v = r.timeline) == null ? void 0 : v.useMaxWidth) ?? !1
687
+ );
688
+ }, "draw"), st = /* @__PURE__ */ s(function(n, t, e, l, r, h, c, g, m, p, x) {
689
+ var _;
690
+ for (const f of t) {
691
+ const i = {
692
+ descr: f.task,
693
+ section: e,
694
+ number: e,
695
+ width: 150,
696
+ padding: 20,
697
+ maxHeight: h
698
+ };
699
+ T.debug("taskNode", i);
700
+ const a = n.append("g").attr("class", "taskWrapper"), u = H.drawNode(a, i, e, c).height;
701
+ if (T.debug("taskHeight after draw", u), a.attr("transform", `translate(${l}, ${r})`), h = Math.max(h, u), f.events) {
702
+ const y = n.append("g").attr("class", "lineWrapper");
703
+ let o = h;
704
+ r += 100, o = o + Bt(n, f.events, e, l, r, c), r -= 100, y.append("line").attr("x1", l + 190 / 2).attr("y1", r + h).attr("x2", l + 190 / 2).attr(
705
+ "y2",
706
+ r + h + (x ? h : p) + m + 120
707
+ ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
708
+ }
709
+ l = l + 200, x && !((_ = c.timeline) != null && _.disableMulticolor) && e++;
710
+ }
711
+ r = r - 10;
712
+ }, "drawTasks"), Bt = /* @__PURE__ */ s(function(n, t, e, l, r, h) {
713
+ let c = 0;
714
+ const g = r;
715
+ r = r + 100;
716
+ for (const m of t) {
717
+ const p = {
718
+ descr: m,
719
+ section: e,
720
+ number: e,
721
+ width: 150,
722
+ padding: 20,
723
+ maxHeight: 50
724
+ };
725
+ T.debug("eventNode", p);
726
+ const x = n.append("g").attr("class", "eventWrapper"), f = H.drawNode(x, p, e, h).height;
727
+ c = c + f, x.attr("transform", `translate(${l}, ${r})`), r = r + 10 + f;
728
+ }
729
+ return r = g, c;
730
+ }, "drawEvents"), Ot = {
731
+ setConf: /* @__PURE__ */ s(() => {
732
+ }, "setConf"),
733
+ draw: Wt
734
+ }, jt = /* @__PURE__ */ s((n) => {
735
+ let t = "";
736
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
737
+ n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], wt(n["lineColor" + e]) ? n["lineColor" + e] = St(n["lineColor" + e], 20) : n["lineColor" + e] = Et(n["lineColor" + e], 20);
738
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
739
+ const l = "" + (17 - 3 * e);
740
+ t += `
741
+ .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
742
+ fill: ${n["cScale" + e]};
743
+ }
744
+ .section-${e - 1} text {
745
+ fill: ${n["cScaleLabel" + e]};
746
+ }
747
+ .node-icon-${e - 1} {
748
+ font-size: 40px;
749
+ color: ${n["cScaleLabel" + e]};
750
+ }
751
+ .section-edge-${e - 1}{
752
+ stroke: ${n["cScale" + e]};
753
+ }
754
+ .edge-depth-${e - 1}{
755
+ stroke-width: ${l};
756
+ }
757
+ .section-${e - 1} line {
758
+ stroke: ${n["cScaleInv" + e]} ;
759
+ stroke-width: 3;
760
+ }
761
+
762
+ .lineWrapper line{
763
+ stroke: ${n["cScaleLabel" + e]} ;
764
+ }
765
+
766
+ .disabled, .disabled circle, .disabled text {
767
+ fill: lightgray;
768
+ }
769
+ .disabled text {
770
+ fill: #efefef;
771
+ }
772
+ `;
773
+ }
774
+ return t;
775
+ }, "genSections"), Gt = /* @__PURE__ */ s((n) => `
776
+ .edge {
777
+ stroke-width: 3;
778
+ }
779
+ ${jt(n)}
780
+ .section-root rect, .section-root path, .section-root circle {
781
+ fill: ${n.git0};
782
+ }
783
+ .section-root text {
784
+ fill: ${n.gitBranchLabel0};
785
+ }
786
+ .icon-container {
787
+ height:100%;
788
+ display: flex;
789
+ justify-content: center;
790
+ align-items: center;
791
+ }
792
+ .edge {
793
+ fill: none;
794
+ }
795
+ .eventWrapper {
796
+ filter: brightness(120%);
797
+ }
798
+ `, "getStyles"), Ut = Gt, Kt = {
799
+ db: at,
800
+ renderer: Ot,
801
+ parser: Tt,
802
+ styles: Ut
803
+ };
804
+ export {
805
+ Kt as diagram
806
+ };