@ucap-llm/ai-ui 1.1.13 → 1.1.15

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 (111) hide show
  1. package/_basePickBy-DMehTBs0-8955b30b.mjs +151 -0
  2. package/_basePickBy-e7598e72.mjs +153 -0
  3. package/{_baseUniq-2bcae05e.mjs → _baseUniq-8cd7fbc4.mjs} +150 -150
  4. package/_baseUniq-DPnX6tpB-5eb6efbd.mjs +615 -0
  5. package/ai-ui.es.js +9 -8
  6. package/ai-ui.umd.js +3425 -923
  7. package/arc-8909f880.mjs +85 -0
  8. package/arc-qimaJRLH-591a6072.mjs +85 -0
  9. package/architecture-4AB2E3PP-DFmEpUnA-62fe65dd.mjs +10 -0
  10. package/architecture-4AB2E3PP-b04ae9dd.mjs +10 -0
  11. package/{architectureDiagram-IEHRJDOE-e4684ef3.mjs → architectureDiagram-IEHRJDOE-1ccc2c64.mjs} +123 -123
  12. package/architectureDiagram-IEHRJDOE-BRVAVUEE-c068faae.mjs +4641 -0
  13. package/{blockDiagram-JOT3LUYC-504ee31e.mjs → blockDiagram-JOT3LUYC-63569de5.mjs} +5 -5
  14. package/blockDiagram-JOT3LUYC-Cs4tSRey-54d8e29b.mjs +2251 -0
  15. package/{c4Diagram-VJAJSXHY-c5ba6af4.mjs → c4Diagram-VJAJSXHY-355a4170.mjs} +23 -23
  16. package/c4Diagram-VJAJSXHY-C3F9fO0L-0df97cd8.mjs +1583 -0
  17. package/channel-CuHzivgY-bb3d765a.mjs +5 -0
  18. package/channel-a1f4f18c.mjs +5 -0
  19. package/{chunk-4BMEZGHF-8d9a2e4f.mjs → chunk-4BMEZGHF-705995af.mjs} +1 -1
  20. package/chunk-4BMEZGHF-btTOjzEX-c9c5432c.mjs +9 -0
  21. package/{chunk-A2AXSNBT-41ae29f2.mjs → chunk-A2AXSNBT-3a857566.mjs} +10 -10
  22. package/chunk-A2AXSNBT-CPBZRsS7-a80df701.mjs +1373 -0
  23. package/{chunk-AEK57VVT-69e121d6.mjs → chunk-AEK57VVT-6c60e1ee.mjs} +45 -45
  24. package/chunk-AEK57VVT-D62Iwyam-238a3d85.mjs +1361 -0
  25. package/{chunk-D6G4REZN-472adc5b.mjs → chunk-D6G4REZN-11c52918.mjs} +5 -5
  26. package/chunk-D6G4REZN-HlFmQTJy-20704636.mjs +64 -0
  27. package/chunk-RZ5BOZE2-DIFgOqDt-495bec03.mjs +24 -0
  28. package/{chunk-RZ5BOZE2-b7d5d4f5.mjs → chunk-RZ5BOZE2-d6db8103.mjs} +9 -9
  29. package/chunk-XZIHB7SX-CCrbsG0u-f30e4124.mjs +15 -0
  30. package/{chunk-XZIHB7SX-56c08d07.mjs → chunk-XZIHB7SX-fafd3ca2.mjs} +1 -1
  31. package/classDiagram-GIVACNV2-Bv5U0XPL-622b22ed.mjs +18 -0
  32. package/{classDiagram-v2-COTLJTTW-1deea5cc.mjs → classDiagram-GIVACNV2-eca9aeb6.mjs} +5 -5
  33. package/classDiagram-v2-COTLJTTW-Bv5U0XPL-622b22ed.mjs +18 -0
  34. package/{classDiagram-GIVACNV2-1deea5cc.mjs → classDiagram-v2-COTLJTTW-eca9aeb6.mjs} +5 -5
  35. package/{clone-1f18a17f.mjs → clone-327a1426.mjs} +1 -1
  36. package/clone-Csc9uFbU-6c4f28bd.mjs +8 -0
  37. package/cytoscape.esm-Swd9B-1A-3101f241.mjs +18730 -0
  38. package/{dagre-OKDRZEBW-74e73dcf.mjs → dagre-OKDRZEBW-9059bb36.mjs} +81 -81
  39. package/dagre-OKDRZEBW-CoMQYlxF-96274fb0.mjs +448 -0
  40. package/{diagram-SSKATNLV-1a562cb0.mjs → diagram-SSKATNLV-70f68e72.mjs} +34 -34
  41. package/diagram-SSKATNLV-CPuZUaGP-50edcaa0.mjs +225 -0
  42. package/{diagram-VNBRO52H-b765e46f.mjs → diagram-VNBRO52H-39273710.mjs} +35 -35
  43. package/diagram-VNBRO52H-DIIZ-Sll-969266e6.mjs +130 -0
  44. package/{erDiagram-Q7BY3M3F-022c4343.mjs → erDiagram-Q7BY3M3F-96ba3906.mjs} +3 -3
  45. package/erDiagram-Q7BY3M3F-ZKWAM_uE-41c0350d.mjs +843 -0
  46. package/{flowDiagram-4HSFHLVR-6036e284.mjs → flowDiagram-4HSFHLVR-795e3830.mjs} +29 -29
  47. package/flowDiagram-4HSFHLVR-CUJXGEG3-801dde13.mjs +1624 -0
  48. package/{ganttDiagram-APWFNJXF-be871387.mjs → ganttDiagram-APWFNJXF-736e67b6.mjs} +398 -398
  49. package/ganttDiagram-APWFNJXF-C1pgubbs-20beffc3.mjs +2527 -0
  50. package/gitGraph-O2Q2CXLX-00465db9.mjs +10 -0
  51. package/gitGraph-O2Q2CXLX-BYavwGzs-e5f1990e.mjs +10 -0
  52. package/{gitGraphDiagram-7IBYFJ6S-da63c888.mjs → gitGraphDiagram-7IBYFJ6S-115329ab.mjs} +88 -88
  53. package/gitGraphDiagram-7IBYFJ6S-CndxirR4-b39d4089.mjs +716 -0
  54. package/{graph-e71f0e3e.mjs → graph-9e073c5f.mjs} +8 -8
  55. package/graph-DOmtxVvg-727f4e14.mjs +247 -0
  56. package/index-433e2395.mjs +168385 -0
  57. package/info-4N47QTOZ-688db415.mjs +10 -0
  58. package/info-4N47QTOZ-DPyDFN1Z-821cf2f7.mjs +10 -0
  59. package/{infoDiagram-PH2N3AL5-3e1c1c1f.mjs → infoDiagram-PH2N3AL5-29e9585a.mjs} +9 -9
  60. package/infoDiagram-PH2N3AL5-BkSS3vpU-ef4bf66d.mjs +26 -0
  61. package/init-DjUOC4st-87c930f1.mjs +16 -0
  62. package/{journeyDiagram-U35MCT3I-6d29748d.mjs → journeyDiagram-U35MCT3I-7c5644d1.mjs} +41 -41
  63. package/journeyDiagram-U35MCT3I-BN-kCDeJ-ac350902.mjs +811 -0
  64. package/{kanban-definition-NDS4AKOZ-c231ae4c.mjs → kanban-definition-NDS4AKOZ-eff441f9.mjs} +47 -47
  65. package/kanban-definition-NDS4AKOZ-gaDUOiKt-efdba942.mjs +720 -0
  66. package/{layout-b9b9e407.mjs → layout-501d22f0.mjs} +19 -19
  67. package/layout-8X5HiOVA-b6e13cf9.mjs +1323 -0
  68. package/linear-BgV5F0PU-8137edad.mjs +447 -0
  69. package/{linear-99040ddc.mjs → linear-fd3cd932.mjs} +56 -56
  70. package/{mermaid-parser.core-55f134dc.mjs → mermaid-parser.core-6eb44241.mjs} +160 -160
  71. package/mermaid-parser.core-BTS3sfcL-8c80284a.mjs +12810 -0
  72. package/{mindmap-definition-ALO5MXBD-938e2e65.mjs → mindmap-definition-ALO5MXBD-2fe3c748.mjs} +1 -1
  73. package/mindmap-definition-ALO5MXBD-B8q_1sIj-c3599d3c.mjs +3225 -0
  74. package/ordinal-DfAQgscy-1c8e46a9.mjs +65 -0
  75. package/package.json +2 -2
  76. package/packet-KVYON367-DcfdOX-U-afac932a.mjs +10 -0
  77. package/packet-KVYON367-c82af3fe.mjs +10 -0
  78. package/pie-R6RNRRYF-DKruFncB-d07f60c2.mjs +10 -0
  79. package/pie-R6RNRRYF-eb27797b.mjs +10 -0
  80. package/pieDiagram-IB7DONF6-Bijui6_Q-db9fdf3a.mjs +166 -0
  81. package/{pieDiagram-IB7DONF6-6a11673b.mjs → pieDiagram-IB7DONF6-e6863984.mjs} +36 -36
  82. package/{quadrantDiagram-7GDLP6J5-a4a4d9ac.mjs → quadrantDiagram-7GDLP6J5-88df12c2.mjs} +15 -15
  83. package/quadrantDiagram-7GDLP6J5-DzIzViUj-b13add98.mjs +1027 -0
  84. package/radar-MK3ICKWK-723229d0.mjs +10 -0
  85. package/radar-MK3ICKWK-D8wbkmr5-3165faf6.mjs +10 -0
  86. package/{requirementDiagram-KVF5MWMF-a7093c74.mjs → requirementDiagram-KVF5MWMF-7228051c.mjs} +50 -50
  87. package/requirementDiagram-KVF5MWMF-Hqsbdpfq-23374f24.mjs +853 -0
  88. package/{sankeyDiagram-QLVOVGJD-f4bcbb2d.mjs → sankeyDiagram-QLVOVGJD-00a31a99.mjs} +87 -87
  89. package/sankeyDiagram-QLVOVGJD-DGCeusqJ-8ca7e64d.mjs +826 -0
  90. package/{sequenceDiagram-X6HHIX6F-9071cfff.mjs → sequenceDiagram-X6HHIX6F-de203309.mjs} +3 -3
  91. package/sequenceDiagram-X6HHIX6F-kuEE9wSd-5f0ec5cd.mjs +2283 -0
  92. package/{stateDiagram-DGXRK772-fb22a7a5.mjs → stateDiagram-DGXRK772-2341237a.mjs} +48 -48
  93. package/stateDiagram-DGXRK772-Cq-Ce3WP-266efa7f.mjs +274 -0
  94. package/{stateDiagram-v2-YXO3MK2T-67326b76.mjs → stateDiagram-v2-YXO3MK2T-8c81deed.mjs} +5 -5
  95. package/stateDiagram-v2-YXO3MK2T-CplwFWn1-c0024e4e.mjs +18 -0
  96. package/style.css +10 -1
  97. package/timeline-definition-BDJGKUSR-USv5sZzx-22548912.mjs +806 -0
  98. package/{timeline-definition-BDJGKUSR-44f50d45.mjs → timeline-definition-BDJGKUSR-e615901b.mjs} +79 -79
  99. package/{xychartDiagram-VJFVF3MP-2df503f6.mjs → xychartDiagram-VJFVF3MP-9ad66a6b.mjs} +28 -28
  100. package/xychartDiagram-VJFVF3MP-CXCfFZBM-e5ca151e.mjs +1306 -0
  101. package/_basePickBy-12958109.mjs +0 -153
  102. package/arc-14f9a207.mjs +0 -85
  103. package/architecture-4AB2E3PP-bb512ddb.mjs +0 -10
  104. package/channel-7bd711b4.mjs +0 -5
  105. package/gitGraph-O2Q2CXLX-83cfcbef.mjs +0 -10
  106. package/index-f83d4b07.mjs +0 -97448
  107. package/info-4N47QTOZ-20cf90f5.mjs +0 -10
  108. package/katex-2e45926a.mjs +0 -11700
  109. package/packet-KVYON367-453a49e8.mjs +0 -10
  110. package/pie-R6RNRRYF-4d95c8dc.mjs +0 -10
  111. package/radar-MK3ICKWK-100e8fa4.mjs +0 -10
@@ -0,0 +1,806 @@
1
+ import { v as r, x as mt, aC as xt, r as bt, e as V, l as kt, J as S, aD as _t, aE as vt, aF as wt, aG as St } from "./index-433e2395.mjs";
2
+ import { h as et } from "./arc-qimaJRLH-591a6072.mjs";
3
+ import "vue";
4
+ var G = function() {
5
+ var n = /* @__PURE__ */ r(function(x, i, c, d) {
6
+ for (c = c || {}, d = x.length; d--; c[x[d]] = i)
7
+ ;
8
+ return c;
9
+ }, "o"), t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], a = [1, 10], s = [1, 11], h = [1, 12], o = [1, 13], p = [1, 16], g = [1, 17], f = {
10
+ trace: /* @__PURE__ */ r(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__ */ r(function(x, i, c, d, u, l, b) {
17
+ var k = l.length - 1;
18
+ switch (u) {
19
+ case 1:
20
+ return l[k - 1];
21
+ case 2:
22
+ this.$ = [];
23
+ break;
24
+ case 3:
25
+ l[k - 1].push(l[k]), this.$ = l[k - 1];
26
+ break;
27
+ case 4:
28
+ case 5:
29
+ this.$ = l[k];
30
+ break;
31
+ case 6:
32
+ case 7:
33
+ this.$ = [];
34
+ break;
35
+ case 8:
36
+ d.getCommonDb().setDiagramTitle(l[k].substr(6)), this.$ = l[k].substr(6);
37
+ break;
38
+ case 9:
39
+ this.$ = l[k].trim(), d.getCommonDb().setAccTitle(this.$);
40
+ break;
41
+ case 10:
42
+ case 11:
43
+ this.$ = l[k].trim(), d.getCommonDb().setAccDescription(this.$);
44
+ break;
45
+ case 12:
46
+ d.addSection(l[k].substr(8)), this.$ = l[k].substr(8);
47
+ break;
48
+ case 15:
49
+ d.addTask(l[k], 0, ""), this.$ = l[k];
50
+ break;
51
+ case 16:
52
+ d.addEvent(l[k].substr(2)), this.$ = l[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: a, 14: s, 16: h, 17: o, 18: 14, 19: 15, 20: p, 21: g }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: a, 14: s, 16: h, 17: o, 18: 14, 19: 15, 20: p, 21: g }, 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__ */ r(function(x, i) {
59
+ if (i.recoverable)
60
+ this.trace(x);
61
+ else {
62
+ var c = new Error(x);
63
+ throw c.hash = i, c;
64
+ }
65
+ }, "parseError"),
66
+ parse: /* @__PURE__ */ r(function(x) {
67
+ var i = this, c = [0], d = [], u = [null], l = [], b = this.table, k = "", $ = 0, F = 0, O = 2, L = 1, N = l.slice.call(arguments, 1), m = Object.create(this.lexer), v = { yy: {} };
68
+ for (var I in this.yy)
69
+ Object.prototype.hasOwnProperty.call(this.yy, I) && (v.yy[I] = this.yy[I]);
70
+ m.setInput(x, v.yy), v.yy.lexer = m, v.yy.parser = this, typeof m.yylloc > "u" && (m.yylloc = {});
71
+ var A = m.yylloc;
72
+ l.push(A);
73
+ var C = m.options && m.options.ranges;
74
+ typeof v.yy.parseError == "function" ? this.parseError = v.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
75
+ function j(E) {
76
+ c.length = c.length - 2 * E, u.length = u.length - E, l.length = l.length - E;
77
+ }
78
+ r(j, "popStack");
79
+ function B() {
80
+ var E;
81
+ return E = d.pop() || m.lex() || L, typeof E != "number" && (E instanceof Array && (d = E, E = d.pop()), E = i.symbols_[E] || E), E;
82
+ }
83
+ r(B, "lex");
84
+ for (var w, P, T, U, R = {}, W, M, tt, q; ; ) {
85
+ if (P = c[c.length - 1], this.defaultActions[P] ? T = this.defaultActions[P] : ((w === null || typeof w > "u") && (w = B()), T = b[P] && b[P][w]), typeof T > "u" || !T.length || !T[0]) {
86
+ var Y = "";
87
+ q = [];
88
+ for (W in b[P])
89
+ this.terminals_[W] && W > O && q.push("'" + this.terminals_[W] + "'");
90
+ m.showPosition ? Y = "Parse error on line " + ($ + 1) + `:
91
+ ` + m.showPosition() + `
92
+ Expecting ` + q.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Y = "Parse error on line " + ($ + 1) + ": Unexpected " + (w == L ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Y, {
93
+ text: m.match,
94
+ token: this.terminals_[w] || w,
95
+ line: m.yylineno,
96
+ loc: A,
97
+ expected: q
98
+ });
99
+ }
100
+ if (T[0] instanceof Array && T.length > 1)
101
+ throw new Error("Parse Error: multiple actions possible at state: " + P + ", token: " + w);
102
+ switch (T[0]) {
103
+ case 1:
104
+ c.push(w), u.push(m.yytext), l.push(m.yylloc), c.push(T[1]), w = null, F = m.yyleng, k = m.yytext, $ = m.yylineno, A = m.yylloc;
105
+ break;
106
+ case 2:
107
+ if (M = this.productions_[T[1]][1], R.$ = u[u.length - M], R._$ = {
108
+ first_line: l[l.length - (M || 1)].first_line,
109
+ last_line: l[l.length - 1].last_line,
110
+ first_column: l[l.length - (M || 1)].first_column,
111
+ last_column: l[l.length - 1].last_column
112
+ }, C && (R._$.range = [
113
+ l[l.length - (M || 1)].range[0],
114
+ l[l.length - 1].range[1]
115
+ ]), U = this.performAction.apply(R, [
116
+ k,
117
+ F,
118
+ $,
119
+ v.yy,
120
+ T[1],
121
+ u,
122
+ l
123
+ ].concat(N)), typeof U < "u")
124
+ return U;
125
+ M && (c = c.slice(0, -1 * M * 2), u = u.slice(0, -1 * M), l = l.slice(0, -1 * M)), c.push(this.productions_[T[1]][0]), u.push(R.$), l.push(R._$), tt = b[c[c.length - 2]][c[c.length - 1]], c.push(tt);
126
+ break;
127
+ case 3:
128
+ return !0;
129
+ }
130
+ }
131
+ return !0;
132
+ }, "parse")
133
+ }, y = /* @__PURE__ */ function() {
134
+ var x = {
135
+ EOF: 1,
136
+ parseError: /* @__PURE__ */ r(function(i, c) {
137
+ if (this.yy.parser)
138
+ this.yy.parser.parseError(i, c);
139
+ else
140
+ throw new Error(i);
141
+ }, "parseError"),
142
+ // resets the lexer, sets new input
143
+ setInput: /* @__PURE__ */ r(function(i, c) {
144
+ return this.yy = c || 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__ */ r(function() {
153
+ var i = this._input[0];
154
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
155
+ var c = i.match(/(?:\r\n?|\n).*/g);
156
+ return c ? (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__ */ r(function(i) {
160
+ var c = i.length, d = i.split(/(?:\r\n?|\n)/g);
161
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - c), this.offset -= c;
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 l = 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 - c
170
+ }, this.options.ranges && (this.yylloc.range = [l[0], l[0] + this.yyleng - c]), 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__ */ r(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__ */ r(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__ */ r(function(i) {
191
+ this.unput(this.match.slice(i));
192
+ }, "less"),
193
+ // displays already matched input, i.e. for error messages
194
+ pastInput: /* @__PURE__ */ r(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__ */ r(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__ */ r(function() {
205
+ var i = this.pastInput(), c = new Array(i.length + 1).join("-");
206
+ return i + this.upcomingInput() + `
207
+ ` + c + "^";
208
+ }, "showPosition"),
209
+ // test the lexed token: return FALSE when not a match, otherwise return token
210
+ test_match: /* @__PURE__ */ r(function(i, c) {
211
+ var d, u, l;
212
+ if (this.options.backtrack_lexer && (l = {
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 && (l.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, c, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), d)
237
+ return d;
238
+ if (this._backtrack) {
239
+ for (var b in l)
240
+ this[b] = l[b];
241
+ return !1;
242
+ }
243
+ return !1;
244
+ }, "test_match"),
245
+ // return next match in input
246
+ next: /* @__PURE__ */ r(function() {
247
+ if (this.done)
248
+ return this.EOF;
249
+ this._input || (this.done = !0);
250
+ var i, c, d, u;
251
+ this._more || (this.yytext = "", this.match = "");
252
+ for (var l = this._currentRules(), b = 0; b < l.length; b++)
253
+ if (d = this._input.match(this.rules[l[b]]), d && (!c || d[0].length > c[0].length)) {
254
+ if (c = d, u = b, this.options.backtrack_lexer) {
255
+ if (i = this.test_match(d, l[b]), i !== !1)
256
+ return i;
257
+ if (this._backtrack) {
258
+ c = !1;
259
+ continue;
260
+ } else
261
+ return !1;
262
+ } else if (!this.options.flex)
263
+ break;
264
+ }
265
+ return c ? (i = this.test_match(c, l[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__ */ r(function() {
274
+ var i = this.next();
275
+ return i || this.lex();
276
+ }, "lex"),
277
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
278
+ begin: /* @__PURE__ */ r(function(i) {
279
+ this.conditionStack.push(i);
280
+ }, "begin"),
281
+ // pop the previously active lexer condition state off the condition stack
282
+ popState: /* @__PURE__ */ r(function() {
283
+ var i = this.conditionStack.length - 1;
284
+ return i > 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__ */ r(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__ */ r(function(i) {
292
+ return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
293
+ }, "topState"),
294
+ // alias for begin(condition)
295
+ pushState: /* @__PURE__ */ r(function(i) {
296
+ this.begin(i);
297
+ }, "pushState"),
298
+ // return the number of states currently on the stack
299
+ stateStackSize: /* @__PURE__ */ r(function() {
300
+ return this.conditionStack.length;
301
+ }, "stateStackSize"),
302
+ options: { "case-insensitive": !0 },
303
+ performAction: /* @__PURE__ */ r(function(i, c, d, u) {
304
+ switch (d) {
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 x;
351
+ }();
352
+ f.lexer = y;
353
+ function _() {
354
+ this.yy = {};
355
+ }
356
+ return r(_, "Parser"), _.prototype = f, f.Parser = _, new _();
357
+ }();
358
+ G.parser = G;
359
+ var $t = G, rt = {};
360
+ mt(rt, {
361
+ addEvent: () => pt,
362
+ addSection: () => lt,
363
+ addTask: () => ut,
364
+ addTaskOrg: () => yt,
365
+ clear: () => ct,
366
+ default: () => Et,
367
+ getCommonDb: () => ot,
368
+ getSections: () => ht,
369
+ getTasks: () => dt
370
+ });
371
+ var D = "", at = 0, X = [], Z = [], z = [], ot = /* @__PURE__ */ r(() => xt, "getCommonDb"), ct = /* @__PURE__ */ r(function() {
372
+ X.length = 0, Z.length = 0, D = "", z.length = 0, bt();
373
+ }, "clear"), lt = /* @__PURE__ */ r(function(n) {
374
+ D = n, X.push(n);
375
+ }, "addSection"), ht = /* @__PURE__ */ r(function() {
376
+ return X;
377
+ }, "getSections"), dt = /* @__PURE__ */ r(function() {
378
+ let n = nt();
379
+ const t = 100;
380
+ let e = 0;
381
+ for (; !n && e < t; )
382
+ n = nt(), e++;
383
+ return Z.push(...z), Z;
384
+ }, "getTasks"), ut = /* @__PURE__ */ r(function(n, t, e) {
385
+ const a = {
386
+ id: at++,
387
+ section: D,
388
+ type: D,
389
+ task: n,
390
+ score: t || 0,
391
+ //if event is defined, then add it the events array
392
+ events: e ? [e] : []
393
+ };
394
+ z.push(a);
395
+ }, "addTask"), pt = /* @__PURE__ */ r(function(n) {
396
+ z.find((t) => t.id === at - 1).events.push(n);
397
+ }, "addEvent"), yt = /* @__PURE__ */ r(function(n) {
398
+ const t = {
399
+ section: D,
400
+ type: D,
401
+ description: n,
402
+ task: n,
403
+ classes: []
404
+ };
405
+ Z.push(t);
406
+ }, "addTaskOrg"), nt = /* @__PURE__ */ r(function() {
407
+ const n = /* @__PURE__ */ r(function(e) {
408
+ return z[e].processed;
409
+ }, "compileTask");
410
+ let t = !0;
411
+ for (const [e, a] of z.entries())
412
+ n(e), t = t && a.processed;
413
+ return t;
414
+ }, "compileTasks"), Et = {
415
+ clear: ct,
416
+ getCommonDb: ot,
417
+ addSection: lt,
418
+ getSections: ht,
419
+ getTasks: dt,
420
+ addTask: ut,
421
+ addTaskOrg: yt,
422
+ addEvent: pt
423
+ }, Tt = 12, J = /* @__PURE__ */ r(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"), It = /* @__PURE__ */ r(function(n, t) {
427
+ const e = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), a = n.append("g");
428
+ a.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"), a.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 s(p) {
430
+ const g = et().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
431
+ p.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
432
+ }
433
+ r(s, "smile");
434
+ function h(p) {
435
+ const g = et().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
436
+ p.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
437
+ }
438
+ r(h, "sad");
439
+ function o(p) {
440
+ p.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 r(o, "ambivalent"), t.score > 3 ? s(a) : t.score < 3 ? h(a) : o(a), e;
443
+ }, "drawFace"), At = /* @__PURE__ */ r(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"), gt = /* @__PURE__ */ r(function(n, t) {
447
+ const e = t.text.replace(/<br\s*\/?>/gi, " "), a = n.append("text");
448
+ a.attr("x", t.x), a.attr("y", t.y), a.attr("class", "legend"), a.style("text-anchor", t.anchor), t.class !== void 0 && a.attr("class", t.class);
449
+ const s = a.append("tspan");
450
+ return s.attr("x", t.x + t.textMargin * 2), s.text(e), a;
451
+ }, "drawText"), Mt = /* @__PURE__ */ r(function(n, t) {
452
+ function e(s, h, o, p, g) {
453
+ return s + "," + h + " " + (s + o) + "," + h + " " + (s + o) + "," + (h + p - g) + " " + (s + o - g * 1.2) + "," + (h + p) + " " + s + "," + (h + p);
454
+ }
455
+ r(e, "genPoints");
456
+ const a = n.append("polygon");
457
+ a.attr("points", e(t.x, t.y, 50, 20, 7)), a.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, gt(n, t);
458
+ }, "drawLabel"), Lt = /* @__PURE__ */ r(function(n, t, e) {
459
+ const a = n.append("g"), s = K();
460
+ s.x = t.x, s.y = t.y, s.fill = t.fill, s.width = e.width, s.height = e.height, s.class = "journey-section section-type-" + t.num, s.rx = 3, s.ry = 3, J(a, s), ft(e)(
461
+ t.text,
462
+ a,
463
+ s.x,
464
+ s.y,
465
+ s.width,
466
+ s.height,
467
+ { class: "journey-section section-type-" + t.num },
468
+ e,
469
+ t.colour
470
+ );
471
+ }, "drawSection"), it = -1, Pt = /* @__PURE__ */ r(function(n, t, e) {
472
+ const a = t.x + e.width / 2, s = n.append("g");
473
+ it++;
474
+ const h = 300 + 5 * 30;
475
+ s.append("line").attr("id", "task" + it).attr("x1", a).attr("y1", t.y).attr("x2", a).attr("y2", h).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), It(s, {
476
+ cx: a,
477
+ cy: 300 + (5 - t.score) * 30,
478
+ score: t.score
479
+ });
480
+ const o = K();
481
+ o.x = t.x, o.y = t.y, o.fill = t.fill, o.width = e.width, o.height = e.height, o.class = "task task-type-" + t.num, o.rx = 3, o.ry = 3, J(s, o), ft(e)(
482
+ t.task,
483
+ s,
484
+ o.x,
485
+ o.y,
486
+ o.width,
487
+ o.height,
488
+ { class: "task" },
489
+ e,
490
+ t.colour
491
+ );
492
+ }, "drawTask"), Ht = /* @__PURE__ */ r(function(n, t) {
493
+ J(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"), Ot = /* @__PURE__ */ r(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"), K = /* @__PURE__ */ r(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"), ft = /* @__PURE__ */ function() {
524
+ function n(s, h, o, p, g, f, y, _) {
525
+ const x = h.append("text").attr("x", o + g / 2).attr("y", p + f / 2 + 5).style("font-color", _).style("text-anchor", "middle").text(s);
526
+ a(x, y);
527
+ }
528
+ r(n, "byText");
529
+ function t(s, h, o, p, g, f, y, _, x) {
530
+ const { taskFontSize: i, taskFontFamily: c } = _, d = s.split(/<br\s*\/?>/gi);
531
+ for (let u = 0; u < d.length; u++) {
532
+ const l = u * i - i * (d.length - 1) / 2, b = h.append("text").attr("x", o + g / 2).attr("y", p).attr("fill", x).style("text-anchor", "middle").style("font-size", i).style("font-family", c);
533
+ b.append("tspan").attr("x", o + g / 2).attr("dy", l).text(d[u]), b.attr("y", p + f / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(b, y);
534
+ }
535
+ }
536
+ r(t, "byTspan");
537
+ function e(s, h, o, p, g, f, y, _) {
538
+ const x = h.append("switch"), i = x.append("foreignObject").attr("x", o).attr("y", p).attr("width", g).attr("height", f).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
539
+ i.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), t(s, x, o, p, g, f, y, _), a(i, y);
540
+ }
541
+ r(e, "byFo");
542
+ function a(s, h) {
543
+ for (const o in h)
544
+ o in h && s.attr(o, h[o]);
545
+ }
546
+ return r(a, "_setTextAttrs"), function(s) {
547
+ return s.textPlacement === "fo" ? e : s.textPlacement === "old" ? n : t;
548
+ };
549
+ }(), Ct = /* @__PURE__ */ r(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 Q(n, t) {
553
+ n.each(function() {
554
+ var e = V(this), a = e.text().split(/(\s+|<br>)/).reverse(), s, h = [], o = 1.1, p = e.attr("y"), g = parseFloat(e.attr("dy")), f = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", g + "em");
555
+ for (let y = 0; y < a.length; y++)
556
+ s = a[a.length - 1 - y], h.push(s), f.text(h.join(" ").trim()), (f.node().getComputedTextLength() > t || s === "<br>") && (h.pop(), f.text(h.join(" ").trim()), s === "<br>" ? h = [""] : h = [s], f = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", o + "em").text(s));
557
+ });
558
+ }
559
+ r(Q, "wrap");
560
+ var Rt = /* @__PURE__ */ r(function(n, t, e, a) {
561
+ var s;
562
+ const h = e % Tt - 1, o = n.append("g");
563
+ t.section = h, o.attr(
564
+ "class",
565
+ (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + h)
566
+ );
567
+ const p = o.append("g"), g = o.append("g"), f = g.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(Q, t.width).node().getBBox(), y = (s = a.fontSize) != null && s.replace ? a.fontSize.replace("px", "") : a.fontSize;
568
+ return t.height = f.height + y * 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(p, t, h, a), t;
569
+ }, "drawNode"), Dt = /* @__PURE__ */ r(function(n, t, e) {
570
+ var a;
571
+ const s = n.append("g"), h = s.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(Q, t.width).node().getBBox(), o = (a = e.fontSize) != null && a.replace ? e.fontSize.replace("px", "") : e.fontSize;
572
+ return s.remove(), h.height + o * 1.1 * 0.5 + t.padding;
573
+ }, "getVirtualNodeHeight"), zt = /* @__PURE__ */ r(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: J,
580
+ drawCircle: At,
581
+ drawSection: Lt,
582
+ drawText: gt,
583
+ drawLabel: Mt,
584
+ drawTask: Pt,
585
+ drawBackgroundRect: Ht,
586
+ getTextObj: Ot,
587
+ getNoteRect: K,
588
+ initGraphics: Ct,
589
+ drawNode: Rt,
590
+ getVirtualNodeHeight: Dt
591
+ }, Ft = /* @__PURE__ */ r(function(n, t, e, a) {
592
+ var s, h;
593
+ const o = kt(), p = o.leftMargin ?? 50;
594
+ S.debug("timeline", a.db);
595
+ const g = o.securityLevel;
596
+ let f;
597
+ g === "sandbox" && (f = V("#i" + t));
598
+ const y = (g === "sandbox" ? V(f.nodes()[0].contentDocument.body) : V("body")).select("#" + t);
599
+ y.append("g");
600
+ const _ = a.db.getTasks(), x = a.db.getCommonDb().getDiagramTitle();
601
+ S.debug("task", _), H.initGraphics(y);
602
+ const i = a.db.getSections();
603
+ S.debug("sections", i);
604
+ let c = 0, d = 0, u = 0, l = 0, b = 50 + p, k = 50;
605
+ l = 50;
606
+ let $ = 0, F = !0;
607
+ i.forEach(function(m) {
608
+ const v = {
609
+ number: $,
610
+ descr: m,
611
+ section: $,
612
+ width: 150,
613
+ padding: 20,
614
+ maxHeight: c
615
+ }, I = H.getVirtualNodeHeight(y, v, o);
616
+ S.debug("sectionHeight before draw", I), c = Math.max(c, I + 20);
617
+ });
618
+ let O = 0, L = 0;
619
+ S.debug("tasks.length", _.length);
620
+ for (const [m, v] of _.entries()) {
621
+ const I = {
622
+ number: m,
623
+ descr: v,
624
+ section: v.section,
625
+ width: 150,
626
+ padding: 20,
627
+ maxHeight: d
628
+ }, A = H.getVirtualNodeHeight(y, I, o);
629
+ S.debug("taskHeight before draw", A), d = Math.max(d, A + 20), O = Math.max(O, v.events.length);
630
+ let C = 0;
631
+ for (const j of v.events) {
632
+ const B = {
633
+ descr: j,
634
+ section: v.section,
635
+ number: v.section,
636
+ width: 150,
637
+ padding: 20,
638
+ maxHeight: 50
639
+ };
640
+ C += H.getVirtualNodeHeight(y, B, o);
641
+ }
642
+ L = Math.max(L, C);
643
+ }
644
+ S.debug("maxSectionHeight before draw", c), S.debug("maxTaskHeight before draw", d), i && i.length > 0 ? i.forEach((m) => {
645
+ const v = _.filter((j) => j.section === m), I = {
646
+ number: $,
647
+ descr: m,
648
+ section: $,
649
+ width: 200 * Math.max(v.length, 1) - 50,
650
+ padding: 20,
651
+ maxHeight: c
652
+ };
653
+ S.debug("sectionNode", I);
654
+ const A = y.append("g"), C = H.drawNode(A, I, $, o);
655
+ S.debug("sectionNode output", C), A.attr("transform", `translate(${b}, ${l})`), k += c + 50, v.length > 0 && st(
656
+ y,
657
+ v,
658
+ $,
659
+ b,
660
+ k,
661
+ d,
662
+ o,
663
+ O,
664
+ L,
665
+ c,
666
+ !1
667
+ ), b += 200 * Math.max(v.length, 1), k = l, $++;
668
+ }) : (F = !1, st(
669
+ y,
670
+ _,
671
+ $,
672
+ b,
673
+ k,
674
+ d,
675
+ o,
676
+ O,
677
+ L,
678
+ c,
679
+ !0
680
+ ));
681
+ const N = y.node().getBBox();
682
+ S.debug("bounds", N), x && y.append("text").text(x).attr("x", N.width / 2 - p).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), u = F ? c + d + 150 : d + 100, y.append("g").attr("class", "lineWrapper").append("line").attr("x1", p).attr("y1", u).attr("x2", N.width + 3 * p).attr("y2", u).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), _t(
683
+ void 0,
684
+ y,
685
+ ((s = o.timeline) == null ? void 0 : s.padding) ?? 50,
686
+ ((h = o.timeline) == null ? void 0 : h.useMaxWidth) ?? !1
687
+ );
688
+ }, "draw"), st = /* @__PURE__ */ r(function(n, t, e, a, s, h, o, p, g, f, y) {
689
+ var _;
690
+ for (const x of t) {
691
+ const i = {
692
+ descr: x.task,
693
+ section: e,
694
+ number: e,
695
+ width: 150,
696
+ padding: 20,
697
+ maxHeight: h
698
+ };
699
+ S.debug("taskNode", i);
700
+ const c = n.append("g").attr("class", "taskWrapper"), d = H.drawNode(c, i, e, o).height;
701
+ if (S.debug("taskHeight after draw", d), c.attr("transform", `translate(${a}, ${s})`), h = Math.max(h, d), x.events) {
702
+ const u = n.append("g").attr("class", "lineWrapper");
703
+ let l = h;
704
+ s += 100, l = l + Nt(n, x.events, e, a, s, o), s -= 100, u.append("line").attr("x1", a + 190 / 2).attr("y1", s + h).attr("x2", a + 190 / 2).attr(
705
+ "y2",
706
+ s + h + (y ? h : f) + g + 120
707
+ ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
708
+ }
709
+ a = a + 200, y && !((_ = o.timeline) != null && _.disableMulticolor) && e++;
710
+ }
711
+ s = s - 10;
712
+ }, "drawTasks"), Nt = /* @__PURE__ */ r(function(n, t, e, a, s, h) {
713
+ let o = 0;
714
+ const p = s;
715
+ s = s + 100;
716
+ for (const g of t) {
717
+ const f = {
718
+ descr: g,
719
+ section: e,
720
+ number: e,
721
+ width: 150,
722
+ padding: 20,
723
+ maxHeight: 50
724
+ };
725
+ S.debug("eventNode", f);
726
+ const y = n.append("g").attr("class", "eventWrapper"), _ = H.drawNode(y, f, e, h).height;
727
+ o = o + _, y.attr("transform", `translate(${a}, ${s})`), s = s + 10 + _;
728
+ }
729
+ return s = p, o;
730
+ }, "drawEvents"), jt = {
731
+ setConf: /* @__PURE__ */ r(() => {
732
+ }, "setConf"),
733
+ draw: Ft
734
+ }, Bt = /* @__PURE__ */ r((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], vt(n["lineColor" + e]) ? n["lineColor" + e] = wt(n["lineColor" + e], 20) : n["lineColor" + e] = St(n["lineColor" + e], 20);
738
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
739
+ const a = "" + (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: ${a};
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"), Wt = /* @__PURE__ */ r((n) => `
776
+ .edge {
777
+ stroke-width: 3;
778
+ }
779
+ ${Bt(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"), qt = Wt, Ut = {
799
+ db: rt,
800
+ renderer: jt,
801
+ parser: $t,
802
+ styles: qt
803
+ };
804
+ export {
805
+ Ut as diagram
806
+ };