@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.
- package/dist/_basePickBy-C3-QE0dl-5eQ6L29l.js +152 -0
- package/dist/_baseUniq-CstiM9Lp-AFR_Ns0a.js +615 -0
- package/dist/arc-W3NKKXLI-DHbDwLx0.js +84 -0
- package/dist/architecture-U656AL7Q-fn9wJZsH-BLoGjtkP.js +6 -0
- package/dist/architectureDiagram-VXUJARFQ-zzJsgPC6-C4OfUE0m.js +4667 -0
- package/dist/blockDiagram-VD42YOAC-D-In4h7h-BYXdRmeG.js +2266 -0
- package/dist/c4Diagram-YG6GDRKO-DBs8r9gh-BdLuHgPT.js +1582 -0
- package/dist/channel-RBWQyMSg-Cx0HUumY.js +6 -0
- package/dist/chatbot-widget.bundle.js +4473 -1556
- package/dist/chatbot-widget.css +1 -1
- package/dist/chatbot-widget.es.js +12 -63659
- package/dist/chatbot-widget.umd.js +4472 -1555
- package/dist/chunk-4BX2VUAB-BqD7w0AR-CbA2613c.js +10 -0
- package/dist/chunk-55IACEB6-D8pvDVEJ-DrL4SJSR.js +9 -0
- package/dist/chunk-B4BG7PRW-Dwma1pSy-BWjG5dc6.js +1375 -0
- package/dist/chunk-DI55MBZ5-BY2XXvZz-DbAvz3Pq.js +1383 -0
- package/dist/chunk-FMBD7UC4-BeiLbQ8U-BNaZTCv4.js +20 -0
- package/dist/chunk-QN33PNHL-BkO3hOeq-DkU1EzGA.js +21 -0
- package/dist/chunk-QZHKN3VN-Cwlo2qTG-DMmeZmp5.js +16 -0
- package/dist/chunk-TZMSLE5B-BnXK-OiF-RfzVsOBe.js +65 -0
- package/dist/classDiagram-2ON5EDUG-Crd6O69V-kCZrFOLN.js +17 -0
- package/dist/classDiagram-v2-WZHVMYZB-Crd6O69V-kCZrFOLN.js +17 -0
- package/dist/clone-CfLgyC8S-DsDOh4B4.js +9 -0
- package/dist/config/index.d.ts +4 -2
- package/dist/cose-bilkent-S5V4N54A-DKeVcPDK-de_7nZTY.js +2609 -0
- package/dist/cytoscape.esm-CjI2IsL8-Be2K4mI6.js +18723 -0
- package/dist/dagre-6UL2VRFP-BPf604Df-BhZs6zCq.js +448 -0
- package/dist/diagram-PSM6KHXK-DeLcpEV3-qb4rujeN.js +532 -0
- package/dist/diagram-QEK2KX5R-C_5RR1NJ-C5kZWmRl.js +222 -0
- package/dist/diagram-S2PKOQOG-DVx43aon-4nlw6iDz.js +144 -0
- package/dist/erDiagram-Q2GNP2WA-DgUeO5_h-DHc9Yphl.js +841 -0
- package/dist/flowDiagram-NV44I4VS-C5HQUzU9-DHjbmAtJ.js +1628 -0
- package/dist/ganttDiagram-JELNMOA3-DgSZ1ixF-C3hJs_k9.js +1936 -0
- package/dist/gitGraph-F6HP7TQM-UL7-Bx1s-Cog5rj3j.js +6 -0
- package/dist/gitGraphDiagram-NY62KEGX-DY5loT9K-CEcKQNrM.js +713 -0
- package/dist/graph-BfwqPHx6-DErF9dBN.js +248 -0
- package/dist/index-B5s_uaP2.js +124168 -0
- package/dist/index-BAOVR-xx-thst7Pu6.js +13251 -0
- package/dist/info-NVLQJR56-BsqQ0RXQ-BcYgZCCY.js +6 -0
- package/dist/infoDiagram-WHAUD3N6-DIqQ6vCk-BuiAAMSH.js +25 -0
- package/dist/journeyDiagram-XKPGCS4Q-DXjg3S3r-Byi_TGXs.js +835 -0
- package/dist/kanban-definition-3W4ZIXB7-Uxt7Am6n-jy96nA-g.js +721 -0
- package/dist/layout-CSfkE668-BjigbqJL.js +1333 -0
- package/dist/mermaid-parser.core-LjuO4CL3-BLqmPe8-.js +12891 -0
- package/dist/mindmap-definition-VGOIOE7T-DXwVuAPE-SK4e1Sse.js +787 -0
- package/dist/packet-BFZMPI3H-DJWkrKrV-BamBev9S.js +6 -0
- package/dist/pie-7BOR55EZ-DC8hTFwn-D1bcIQbR.js +6 -0
- package/dist/pieDiagram-ADFJNKIX-Cj0EHHtj-Dbr09c-S.js +161 -0
- package/dist/quadrantDiagram-AYHSOK5B-CnLDz007-Ci0DQl2T.js +1024 -0
- package/dist/radar-NHE76QYJ-Bijk-Fk9-9nAmDCMr.js +6 -0
- package/dist/requirementDiagram-UZGBJVZJ-rDaI-8Be-CSEc4S33.js +851 -0
- package/dist/sankeyDiagram-TZEHDZUN-A0YO8ixs-Zj8Z0j0n.js +810 -0
- package/dist/sequenceDiagram-WL72ISMW-BFF7TtP7-Dcofckjv.js +2519 -0
- package/dist/shared/styles.d.ts +1 -1
- package/dist/stateDiagram-FKZM4ZOC-ofFsB7HJ-BJBX12rE.js +264 -0
- package/dist/stateDiagram-v2-4FDKWEC3-CEZFbksU-BywmU88h.js +17 -0
- package/dist/timeline-definition-IT6M3QCI-5W361ZNm-MP_ufVe7.js +800 -0
- package/dist/treemap-KMMF4GRG-pGRoYcSn-BeZ7sXgP.js +6 -0
- package/dist/ui/Message.d.ts +1 -5
- package/dist/ui/MessagesList.d.ts +1 -5
- package/dist/utils/contentFiltering.d.ts +12 -0
- package/dist/xychartDiagram-PRI3JC2R-CSr0GxaP-DBgCtplP.js +1297 -0
- package/package.json +3 -3
- package/dist/ui/TypingEffect.d.ts +0 -18
|
@@ -0,0 +1,800 @@
|
|
|
1
|
+
import { x as r, p as mt, a as $, f as q, aS as xt, aT as bt, aU as kt, aV as _t, N as vt, aW as wt, L as St } from "./index-B5s_uaP2.js";
|
|
2
|
+
import { h as et } from "./arc-W3NKKXLI-DHbDwLx0.js";
|
|
3
|
+
typeof window < "u" && (window.global = window);
|
|
4
|
+
var X = function() {
|
|
5
|
+
var n = /* @__PURE__ */ r(function(f, s, l, h) {
|
|
6
|
+
for (l = l || {}, h = f.length; h--; l[f[h]] = s) ;
|
|
7
|
+
return l;
|
|
8
|
+
}, "o"), t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], a = [1, 10], i = [1, 11], o = [1, 12], u = [1, 13], p = [1, 16], y = [1, 17], m = {
|
|
9
|
+
trace: /* @__PURE__ */ r(function() {
|
|
10
|
+
}, "trace"),
|
|
11
|
+
yy: {},
|
|
12
|
+
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 },
|
|
13
|
+
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" },
|
|
14
|
+
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]],
|
|
15
|
+
performAction: /* @__PURE__ */ r(function(f, s, l, h, d, c, k) {
|
|
16
|
+
var x = c.length - 1;
|
|
17
|
+
switch (d) {
|
|
18
|
+
case 1:
|
|
19
|
+
return c[x - 1];
|
|
20
|
+
case 2:
|
|
21
|
+
this.$ = [];
|
|
22
|
+
break;
|
|
23
|
+
case 3:
|
|
24
|
+
c[x - 1].push(c[x]), this.$ = c[x - 1];
|
|
25
|
+
break;
|
|
26
|
+
case 4:
|
|
27
|
+
case 5:
|
|
28
|
+
this.$ = c[x];
|
|
29
|
+
break;
|
|
30
|
+
case 6:
|
|
31
|
+
case 7:
|
|
32
|
+
this.$ = [];
|
|
33
|
+
break;
|
|
34
|
+
case 8:
|
|
35
|
+
h.getCommonDb().setDiagramTitle(c[x].substr(6)), this.$ = c[x].substr(6);
|
|
36
|
+
break;
|
|
37
|
+
case 9:
|
|
38
|
+
this.$ = c[x].trim(), h.getCommonDb().setAccTitle(this.$);
|
|
39
|
+
break;
|
|
40
|
+
case 10:
|
|
41
|
+
case 11:
|
|
42
|
+
this.$ = c[x].trim(), h.getCommonDb().setAccDescription(this.$);
|
|
43
|
+
break;
|
|
44
|
+
case 12:
|
|
45
|
+
h.addSection(c[x].substr(8)), this.$ = c[x].substr(8);
|
|
46
|
+
break;
|
|
47
|
+
case 15:
|
|
48
|
+
h.addTask(c[x], 0, ""), this.$ = c[x];
|
|
49
|
+
break;
|
|
50
|
+
case 16:
|
|
51
|
+
h.addEvent(c[x].substr(2)), this.$ = c[x];
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}, "anonymous"),
|
|
55
|
+
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: i, 16: o, 17: u, 18: 14, 19: 15, 20: p, 21: y }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: a, 14: i, 16: o, 17: u, 18: 14, 19: 15, 20: p, 21: y }, 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])],
|
|
56
|
+
defaultActions: {},
|
|
57
|
+
parseError: /* @__PURE__ */ r(function(f, s) {
|
|
58
|
+
if (s.recoverable)
|
|
59
|
+
this.trace(f);
|
|
60
|
+
else {
|
|
61
|
+
var l = new Error(f);
|
|
62
|
+
throw l.hash = s, l;
|
|
63
|
+
}
|
|
64
|
+
}, "parseError"),
|
|
65
|
+
parse: /* @__PURE__ */ r(function(f) {
|
|
66
|
+
var s = this, l = [0], h = [], d = [null], c = [], k = this.table, x = "", N = 0, M = 0, W = 2, I = 1, D = c.slice.call(arguments, 1), _ = Object.create(this.lexer), S = { yy: {} };
|
|
67
|
+
for (var v in this.yy)
|
|
68
|
+
Object.prototype.hasOwnProperty.call(this.yy, v) && (S.yy[v] = this.yy[v]);
|
|
69
|
+
_.setInput(f, S.yy), S.yy.lexer = _, S.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
|
|
70
|
+
var A = _.yylloc;
|
|
71
|
+
c.push(A);
|
|
72
|
+
var O = _.options && _.options.ranges;
|
|
73
|
+
typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
74
|
+
function L(E) {
|
|
75
|
+
l.length = l.length - 2 * E, d.length = d.length - E, c.length = c.length - E;
|
|
76
|
+
}
|
|
77
|
+
r(L, "popStack");
|
|
78
|
+
function P() {
|
|
79
|
+
var E;
|
|
80
|
+
return E = h.pop() || _.lex() || I, typeof E != "number" && (E instanceof Array && (h = E, E = h.pop()), E = s.symbols_[E] || E), E;
|
|
81
|
+
}
|
|
82
|
+
r(P, "lex");
|
|
83
|
+
for (var w, R, T, Z, j = {}, V, C, tt, z; ; ) {
|
|
84
|
+
if (R = l[l.length - 1], this.defaultActions[R] ? T = this.defaultActions[R] : ((w === null || typeof w > "u") && (w = P()), T = k[R] && k[R][w]), typeof T > "u" || !T.length || !T[0]) {
|
|
85
|
+
var J = "";
|
|
86
|
+
z = [];
|
|
87
|
+
for (V in k[R])
|
|
88
|
+
this.terminals_[V] && V > W && z.push("'" + this.terminals_[V] + "'");
|
|
89
|
+
_.showPosition ? J = "Parse error on line " + (N + 1) + `:
|
|
90
|
+
` + _.showPosition() + `
|
|
91
|
+
Expecting ` + z.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : J = "Parse error on line " + (N + 1) + ": Unexpected " + (w == I ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(J, {
|
|
92
|
+
text: _.match,
|
|
93
|
+
token: this.terminals_[w] || w,
|
|
94
|
+
line: _.yylineno,
|
|
95
|
+
loc: A,
|
|
96
|
+
expected: z
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (T[0] instanceof Array && T.length > 1)
|
|
100
|
+
throw new Error("Parse Error: multiple actions possible at state: " + R + ", token: " + w);
|
|
101
|
+
switch (T[0]) {
|
|
102
|
+
case 1:
|
|
103
|
+
l.push(w), d.push(_.yytext), c.push(_.yylloc), l.push(T[1]), w = null, M = _.yyleng, x = _.yytext, N = _.yylineno, A = _.yylloc;
|
|
104
|
+
break;
|
|
105
|
+
case 2:
|
|
106
|
+
if (C = this.productions_[T[1]][1], j.$ = d[d.length - C], j._$ = {
|
|
107
|
+
first_line: c[c.length - (C || 1)].first_line,
|
|
108
|
+
last_line: c[c.length - 1].last_line,
|
|
109
|
+
first_column: c[c.length - (C || 1)].first_column,
|
|
110
|
+
last_column: c[c.length - 1].last_column
|
|
111
|
+
}, O && (j._$.range = [
|
|
112
|
+
c[c.length - (C || 1)].range[0],
|
|
113
|
+
c[c.length - 1].range[1]
|
|
114
|
+
]), Z = this.performAction.apply(j, [
|
|
115
|
+
x,
|
|
116
|
+
M,
|
|
117
|
+
N,
|
|
118
|
+
S.yy,
|
|
119
|
+
T[1],
|
|
120
|
+
d,
|
|
121
|
+
c
|
|
122
|
+
].concat(D)), typeof Z < "u")
|
|
123
|
+
return Z;
|
|
124
|
+
C && (l = l.slice(0, -1 * C * 2), d = d.slice(0, -1 * C), c = c.slice(0, -1 * C)), l.push(this.productions_[T[1]][0]), d.push(j.$), c.push(j._$), tt = k[l[l.length - 2]][l[l.length - 1]], l.push(tt);
|
|
125
|
+
break;
|
|
126
|
+
case 3:
|
|
127
|
+
return !0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return !0;
|
|
131
|
+
}, "parse")
|
|
132
|
+
}, b = /* @__PURE__ */ function() {
|
|
133
|
+
var f = {
|
|
134
|
+
EOF: 1,
|
|
135
|
+
parseError: /* @__PURE__ */ r(function(s, l) {
|
|
136
|
+
if (this.yy.parser)
|
|
137
|
+
this.yy.parser.parseError(s, l);
|
|
138
|
+
else
|
|
139
|
+
throw new Error(s);
|
|
140
|
+
}, "parseError"),
|
|
141
|
+
// resets the lexer, sets new input
|
|
142
|
+
setInput: /* @__PURE__ */ r(function(s, l) {
|
|
143
|
+
return this.yy = l || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
144
|
+
first_line: 1,
|
|
145
|
+
first_column: 0,
|
|
146
|
+
last_line: 1,
|
|
147
|
+
last_column: 0
|
|
148
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
149
|
+
}, "setInput"),
|
|
150
|
+
// consumes and returns one char from the input
|
|
151
|
+
input: /* @__PURE__ */ r(function() {
|
|
152
|
+
var s = this._input[0];
|
|
153
|
+
this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
|
|
154
|
+
var l = s.match(/(?:\r\n?|\n).*/g);
|
|
155
|
+
return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
|
|
156
|
+
}, "input"),
|
|
157
|
+
// unshifts one char (or a string) into the input
|
|
158
|
+
unput: /* @__PURE__ */ r(function(s) {
|
|
159
|
+
var l = s.length, h = s.split(/(?:\r\n?|\n)/g);
|
|
160
|
+
this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
|
|
161
|
+
var d = this.match.split(/(?:\r\n?|\n)/g);
|
|
162
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), h.length - 1 && (this.yylineno -= h.length - 1);
|
|
163
|
+
var c = this.yylloc.range;
|
|
164
|
+
return this.yylloc = {
|
|
165
|
+
first_line: this.yylloc.first_line,
|
|
166
|
+
last_line: this.yylineno + 1,
|
|
167
|
+
first_column: this.yylloc.first_column,
|
|
168
|
+
last_column: h ? (h.length === d.length ? this.yylloc.first_column : 0) + d[d.length - h.length].length - h[0].length : this.yylloc.first_column - l
|
|
169
|
+
}, this.options.ranges && (this.yylloc.range = [c[0], c[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
|
|
170
|
+
}, "unput"),
|
|
171
|
+
// When called from action, caches matched text and appends it on next action
|
|
172
|
+
more: /* @__PURE__ */ r(function() {
|
|
173
|
+
return this._more = !0, this;
|
|
174
|
+
}, "more"),
|
|
175
|
+
// 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.
|
|
176
|
+
reject: /* @__PURE__ */ r(function() {
|
|
177
|
+
if (this.options.backtrack_lexer)
|
|
178
|
+
this._backtrack = !0;
|
|
179
|
+
else
|
|
180
|
+
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).
|
|
181
|
+
` + this.showPosition(), {
|
|
182
|
+
text: "",
|
|
183
|
+
token: null,
|
|
184
|
+
line: this.yylineno
|
|
185
|
+
});
|
|
186
|
+
return this;
|
|
187
|
+
}, "reject"),
|
|
188
|
+
// retain first n characters of the match
|
|
189
|
+
less: /* @__PURE__ */ r(function(s) {
|
|
190
|
+
this.unput(this.match.slice(s));
|
|
191
|
+
}, "less"),
|
|
192
|
+
// displays already matched input, i.e. for error messages
|
|
193
|
+
pastInput: /* @__PURE__ */ r(function() {
|
|
194
|
+
var s = this.matched.substr(0, this.matched.length - this.match.length);
|
|
195
|
+
return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
|
|
196
|
+
}, "pastInput"),
|
|
197
|
+
// displays upcoming input, i.e. for error messages
|
|
198
|
+
upcomingInput: /* @__PURE__ */ r(function() {
|
|
199
|
+
var s = this.match;
|
|
200
|
+
return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
201
|
+
}, "upcomingInput"),
|
|
202
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
203
|
+
showPosition: /* @__PURE__ */ r(function() {
|
|
204
|
+
var s = this.pastInput(), l = new Array(s.length + 1).join("-");
|
|
205
|
+
return s + this.upcomingInput() + `
|
|
206
|
+
` + l + "^";
|
|
207
|
+
}, "showPosition"),
|
|
208
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
209
|
+
test_match: /* @__PURE__ */ r(function(s, l) {
|
|
210
|
+
var h, d, c;
|
|
211
|
+
if (this.options.backtrack_lexer && (c = {
|
|
212
|
+
yylineno: this.yylineno,
|
|
213
|
+
yylloc: {
|
|
214
|
+
first_line: this.yylloc.first_line,
|
|
215
|
+
last_line: this.last_line,
|
|
216
|
+
first_column: this.yylloc.first_column,
|
|
217
|
+
last_column: this.yylloc.last_column
|
|
218
|
+
},
|
|
219
|
+
yytext: this.yytext,
|
|
220
|
+
match: this.match,
|
|
221
|
+
matches: this.matches,
|
|
222
|
+
matched: this.matched,
|
|
223
|
+
yyleng: this.yyleng,
|
|
224
|
+
offset: this.offset,
|
|
225
|
+
_more: this._more,
|
|
226
|
+
_input: this._input,
|
|
227
|
+
yy: this.yy,
|
|
228
|
+
conditionStack: this.conditionStack.slice(0),
|
|
229
|
+
done: this.done
|
|
230
|
+
}, this.options.ranges && (c.yylloc.range = this.yylloc.range.slice(0))), d = s[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
|
|
231
|
+
first_line: this.yylloc.last_line,
|
|
232
|
+
last_line: this.yylineno + 1,
|
|
233
|
+
first_column: this.yylloc.last_column,
|
|
234
|
+
last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
|
|
235
|
+
}, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], h = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h)
|
|
236
|
+
return h;
|
|
237
|
+
if (this._backtrack) {
|
|
238
|
+
for (var k in c)
|
|
239
|
+
this[k] = c[k];
|
|
240
|
+
return !1;
|
|
241
|
+
}
|
|
242
|
+
return !1;
|
|
243
|
+
}, "test_match"),
|
|
244
|
+
// return next match in input
|
|
245
|
+
next: /* @__PURE__ */ r(function() {
|
|
246
|
+
if (this.done)
|
|
247
|
+
return this.EOF;
|
|
248
|
+
this._input || (this.done = !0);
|
|
249
|
+
var s, l, h, d;
|
|
250
|
+
this._more || (this.yytext = "", this.match = "");
|
|
251
|
+
for (var c = this._currentRules(), k = 0; k < c.length; k++)
|
|
252
|
+
if (h = this._input.match(this.rules[c[k]]), h && (!l || h[0].length > l[0].length)) {
|
|
253
|
+
if (l = h, d = k, this.options.backtrack_lexer) {
|
|
254
|
+
if (s = this.test_match(h, c[k]), s !== !1)
|
|
255
|
+
return s;
|
|
256
|
+
if (this._backtrack) {
|
|
257
|
+
l = !1;
|
|
258
|
+
continue;
|
|
259
|
+
} else
|
|
260
|
+
return !1;
|
|
261
|
+
} else if (!this.options.flex)
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
return l ? (s = this.test_match(l, c[d]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
265
|
+
` + this.showPosition(), {
|
|
266
|
+
text: "",
|
|
267
|
+
token: null,
|
|
268
|
+
line: this.yylineno
|
|
269
|
+
});
|
|
270
|
+
}, "next"),
|
|
271
|
+
// return next match that has a token
|
|
272
|
+
lex: /* @__PURE__ */ r(function() {
|
|
273
|
+
var s = this.next();
|
|
274
|
+
return s || this.lex();
|
|
275
|
+
}, "lex"),
|
|
276
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
277
|
+
begin: /* @__PURE__ */ r(function(s) {
|
|
278
|
+
this.conditionStack.push(s);
|
|
279
|
+
}, "begin"),
|
|
280
|
+
// pop the previously active lexer condition state off the condition stack
|
|
281
|
+
popState: /* @__PURE__ */ r(function() {
|
|
282
|
+
var s = this.conditionStack.length - 1;
|
|
283
|
+
return s > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
284
|
+
}, "popState"),
|
|
285
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
286
|
+
_currentRules: /* @__PURE__ */ r(function() {
|
|
287
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
288
|
+
}, "_currentRules"),
|
|
289
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
290
|
+
topState: /* @__PURE__ */ r(function(s) {
|
|
291
|
+
return s = this.conditionStack.length - 1 - Math.abs(s || 0), s >= 0 ? this.conditionStack[s] : "INITIAL";
|
|
292
|
+
}, "topState"),
|
|
293
|
+
// alias for begin(condition)
|
|
294
|
+
pushState: /* @__PURE__ */ r(function(s) {
|
|
295
|
+
this.begin(s);
|
|
296
|
+
}, "pushState"),
|
|
297
|
+
// return the number of states currently on the stack
|
|
298
|
+
stateStackSize: /* @__PURE__ */ r(function() {
|
|
299
|
+
return this.conditionStack.length;
|
|
300
|
+
}, "stateStackSize"),
|
|
301
|
+
options: { "case-insensitive": !0 },
|
|
302
|
+
performAction: /* @__PURE__ */ r(function(s, l, h, d) {
|
|
303
|
+
switch (h) {
|
|
304
|
+
case 0:
|
|
305
|
+
break;
|
|
306
|
+
case 1:
|
|
307
|
+
break;
|
|
308
|
+
case 2:
|
|
309
|
+
return 10;
|
|
310
|
+
case 3:
|
|
311
|
+
break;
|
|
312
|
+
case 4:
|
|
313
|
+
break;
|
|
314
|
+
case 5:
|
|
315
|
+
return 4;
|
|
316
|
+
case 6:
|
|
317
|
+
return 11;
|
|
318
|
+
case 7:
|
|
319
|
+
return this.begin("acc_title"), 12;
|
|
320
|
+
case 8:
|
|
321
|
+
return this.popState(), "acc_title_value";
|
|
322
|
+
case 9:
|
|
323
|
+
return this.begin("acc_descr"), 14;
|
|
324
|
+
case 10:
|
|
325
|
+
return this.popState(), "acc_descr_value";
|
|
326
|
+
case 11:
|
|
327
|
+
this.begin("acc_descr_multiline");
|
|
328
|
+
break;
|
|
329
|
+
case 12:
|
|
330
|
+
this.popState();
|
|
331
|
+
break;
|
|
332
|
+
case 13:
|
|
333
|
+
return "acc_descr_multiline_value";
|
|
334
|
+
case 14:
|
|
335
|
+
return 17;
|
|
336
|
+
case 15:
|
|
337
|
+
return 21;
|
|
338
|
+
case 16:
|
|
339
|
+
return 20;
|
|
340
|
+
case 17:
|
|
341
|
+
return 6;
|
|
342
|
+
case 18:
|
|
343
|
+
return "INVALID";
|
|
344
|
+
}
|
|
345
|
+
}, "anonymous"),
|
|
346
|
+
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]|:(?!\s))+)/i, /^(?:[^#:\n]+)/i, /^(?:$)/i, /^(?:.)/i],
|
|
347
|
+
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 } }
|
|
348
|
+
};
|
|
349
|
+
return f;
|
|
350
|
+
}();
|
|
351
|
+
m.lexer = b;
|
|
352
|
+
function g() {
|
|
353
|
+
this.yy = {};
|
|
354
|
+
}
|
|
355
|
+
return r(g, "Parser"), g.prototype = m, m.Parser = g, new g();
|
|
356
|
+
}();
|
|
357
|
+
X.parser = X;
|
|
358
|
+
var $t = X, rt = {};
|
|
359
|
+
vt(rt, {
|
|
360
|
+
addEvent: () => pt,
|
|
361
|
+
addSection: () => lt,
|
|
362
|
+
addTask: () => ut,
|
|
363
|
+
addTaskOrg: () => yt,
|
|
364
|
+
clear: () => ct,
|
|
365
|
+
default: () => Et,
|
|
366
|
+
getCommonDb: () => ot,
|
|
367
|
+
getSections: () => ht,
|
|
368
|
+
getTasks: () => dt
|
|
369
|
+
});
|
|
370
|
+
var B = "", at = 0, G = [], U = [], F = [], ot = /* @__PURE__ */ r(() => wt, "getCommonDb"), ct = /* @__PURE__ */ r(function() {
|
|
371
|
+
G.length = 0, U.length = 0, B = "", F.length = 0, St();
|
|
372
|
+
}, "clear"), lt = /* @__PURE__ */ r(function(n) {
|
|
373
|
+
B = n, G.push(n);
|
|
374
|
+
}, "addSection"), ht = /* @__PURE__ */ r(function() {
|
|
375
|
+
return G;
|
|
376
|
+
}, "getSections"), dt = /* @__PURE__ */ r(function() {
|
|
377
|
+
let n = nt();
|
|
378
|
+
const t = 100;
|
|
379
|
+
let e = 0;
|
|
380
|
+
for (; !n && e < t; )
|
|
381
|
+
n = nt(), e++;
|
|
382
|
+
return U.push(...F), U;
|
|
383
|
+
}, "getTasks"), ut = /* @__PURE__ */ r(function(n, t, e) {
|
|
384
|
+
const a = {
|
|
385
|
+
id: at++,
|
|
386
|
+
section: B,
|
|
387
|
+
type: B,
|
|
388
|
+
task: n,
|
|
389
|
+
score: t || 0,
|
|
390
|
+
//if event is defined, then add it the events array
|
|
391
|
+
events: e ? [e] : []
|
|
392
|
+
};
|
|
393
|
+
F.push(a);
|
|
394
|
+
}, "addTask"), pt = /* @__PURE__ */ r(function(n) {
|
|
395
|
+
F.find((t) => t.id === at - 1).events.push(n);
|
|
396
|
+
}, "addEvent"), yt = /* @__PURE__ */ r(function(n) {
|
|
397
|
+
const t = {
|
|
398
|
+
section: B,
|
|
399
|
+
type: B,
|
|
400
|
+
description: n,
|
|
401
|
+
task: n,
|
|
402
|
+
classes: []
|
|
403
|
+
};
|
|
404
|
+
U.push(t);
|
|
405
|
+
}, "addTaskOrg"), nt = /* @__PURE__ */ r(function() {
|
|
406
|
+
const n = /* @__PURE__ */ r(function(e) {
|
|
407
|
+
return F[e].processed;
|
|
408
|
+
}, "compileTask");
|
|
409
|
+
let t = !0;
|
|
410
|
+
for (const [e, a] of F.entries())
|
|
411
|
+
n(e), t = t && a.processed;
|
|
412
|
+
return t;
|
|
413
|
+
}, "compileTasks"), Et = {
|
|
414
|
+
clear: ct,
|
|
415
|
+
getCommonDb: ot,
|
|
416
|
+
addSection: lt,
|
|
417
|
+
getSections: ht,
|
|
418
|
+
getTasks: dt,
|
|
419
|
+
addTask: ut,
|
|
420
|
+
addTaskOrg: yt,
|
|
421
|
+
addEvent: pt
|
|
422
|
+
}, Tt = 12, Y = /* @__PURE__ */ r(function(n, t) {
|
|
423
|
+
const e = n.append("rect");
|
|
424
|
+
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;
|
|
425
|
+
}, "drawRect"), Mt = /* @__PURE__ */ r(function(n, t) {
|
|
426
|
+
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");
|
|
427
|
+
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");
|
|
428
|
+
function i(p) {
|
|
429
|
+
const y = et().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
430
|
+
p.append("path").attr("class", "mouth").attr("d", y).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
|
|
431
|
+
}
|
|
432
|
+
r(i, "smile");
|
|
433
|
+
function o(p) {
|
|
434
|
+
const y = et().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
435
|
+
p.append("path").attr("class", "mouth").attr("d", y).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
|
|
436
|
+
}
|
|
437
|
+
r(o, "sad");
|
|
438
|
+
function u(p) {
|
|
439
|
+
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");
|
|
440
|
+
}
|
|
441
|
+
return r(u, "ambivalent"), t.score > 3 ? i(a) : t.score < 3 ? o(a) : u(a), e;
|
|
442
|
+
}, "drawFace"), At = /* @__PURE__ */ r(function(n, t) {
|
|
443
|
+
const e = n.append("circle");
|
|
444
|
+
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;
|
|
445
|
+
}, "drawCircle"), gt = /* @__PURE__ */ r(function(n, t) {
|
|
446
|
+
const e = t.text.replace(/<br\s*\/?>/gi, " "), a = n.append("text");
|
|
447
|
+
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);
|
|
448
|
+
const i = a.append("tspan");
|
|
449
|
+
return i.attr("x", t.x + t.textMargin * 2), i.text(e), a;
|
|
450
|
+
}, "drawText"), Nt = /* @__PURE__ */ r(function(n, t) {
|
|
451
|
+
function e(i, o, u, p, y) {
|
|
452
|
+
return i + "," + o + " " + (i + u) + "," + o + " " + (i + u) + "," + (o + p - y) + " " + (i + u - y * 1.2) + "," + (o + p) + " " + i + "," + (o + p);
|
|
453
|
+
}
|
|
454
|
+
r(e, "genPoints");
|
|
455
|
+
const a = n.append("polygon");
|
|
456
|
+
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);
|
|
457
|
+
}, "drawLabel"), Ct = /* @__PURE__ */ r(function(n, t, e) {
|
|
458
|
+
const a = n.append("g"), i = K();
|
|
459
|
+
i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = e.width, i.height = e.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, Y(a, i), ft(e)(
|
|
460
|
+
t.text,
|
|
461
|
+
a,
|
|
462
|
+
i.x,
|
|
463
|
+
i.y,
|
|
464
|
+
i.width,
|
|
465
|
+
i.height,
|
|
466
|
+
{ class: "journey-section section-type-" + t.num },
|
|
467
|
+
e,
|
|
468
|
+
t.colour
|
|
469
|
+
);
|
|
470
|
+
}, "drawSection"), it = -1, It = /* @__PURE__ */ r(function(n, t, e) {
|
|
471
|
+
const a = t.x + e.width / 2, i = n.append("g");
|
|
472
|
+
it++, i.append("line").attr("id", "task" + it).attr("x1", a).attr("y1", t.y).attr("x2", a).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Mt(i, {
|
|
473
|
+
cx: a,
|
|
474
|
+
cy: 300 + (5 - t.score) * 30,
|
|
475
|
+
score: t.score
|
|
476
|
+
});
|
|
477
|
+
const o = K();
|
|
478
|
+
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, Y(i, o), ft(e)(
|
|
479
|
+
t.task,
|
|
480
|
+
i,
|
|
481
|
+
o.x,
|
|
482
|
+
o.y,
|
|
483
|
+
o.width,
|
|
484
|
+
o.height,
|
|
485
|
+
{ class: "task" },
|
|
486
|
+
e,
|
|
487
|
+
t.colour
|
|
488
|
+
);
|
|
489
|
+
}, "drawTask"), Ot = /* @__PURE__ */ r(function(n, t) {
|
|
490
|
+
Y(n, {
|
|
491
|
+
x: t.startx,
|
|
492
|
+
y: t.starty,
|
|
493
|
+
width: t.stopx - t.startx,
|
|
494
|
+
height: t.stopy - t.starty,
|
|
495
|
+
fill: t.fill,
|
|
496
|
+
class: "rect"
|
|
497
|
+
}).lower();
|
|
498
|
+
}, "drawBackgroundRect"), Lt = /* @__PURE__ */ r(function() {
|
|
499
|
+
return {
|
|
500
|
+
x: 0,
|
|
501
|
+
y: 0,
|
|
502
|
+
fill: void 0,
|
|
503
|
+
"text-anchor": "start",
|
|
504
|
+
width: 100,
|
|
505
|
+
height: 100,
|
|
506
|
+
textMargin: 0,
|
|
507
|
+
rx: 0,
|
|
508
|
+
ry: 0
|
|
509
|
+
};
|
|
510
|
+
}, "getTextObj"), K = /* @__PURE__ */ r(function() {
|
|
511
|
+
return {
|
|
512
|
+
x: 0,
|
|
513
|
+
y: 0,
|
|
514
|
+
width: 100,
|
|
515
|
+
anchor: "start",
|
|
516
|
+
height: 100,
|
|
517
|
+
rx: 0,
|
|
518
|
+
ry: 0
|
|
519
|
+
};
|
|
520
|
+
}, "getNoteRect"), ft = /* @__PURE__ */ function() {
|
|
521
|
+
function n(i, o, u, p, y, m, b, g) {
|
|
522
|
+
const f = o.append("text").attr("x", u + y / 2).attr("y", p + m / 2 + 5).style("font-color", g).style("text-anchor", "middle").text(i);
|
|
523
|
+
a(f, b);
|
|
524
|
+
}
|
|
525
|
+
r(n, "byText");
|
|
526
|
+
function t(i, o, u, p, y, m, b, g, f) {
|
|
527
|
+
const { taskFontSize: s, taskFontFamily: l } = g, h = i.split(/<br\s*\/?>/gi);
|
|
528
|
+
for (let d = 0; d < h.length; d++) {
|
|
529
|
+
const c = d * s - s * (h.length - 1) / 2, k = o.append("text").attr("x", u + y / 2).attr("y", p).attr("fill", f).style("text-anchor", "middle").style("font-size", s).style("font-family", l);
|
|
530
|
+
k.append("tspan").attr("x", u + y / 2).attr("dy", c).text(h[d]), k.attr("y", p + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(k, b);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
r(t, "byTspan");
|
|
534
|
+
function e(i, o, u, p, y, m, b, g) {
|
|
535
|
+
const f = o.append("switch"), s = f.append("foreignObject").attr("x", u).attr("y", p).attr("width", y).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
536
|
+
s.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, f, u, p, y, m, b, g), a(s, b);
|
|
537
|
+
}
|
|
538
|
+
r(e, "byFo");
|
|
539
|
+
function a(i, o) {
|
|
540
|
+
for (const u in o)
|
|
541
|
+
u in o && i.attr(u, o[u]);
|
|
542
|
+
}
|
|
543
|
+
return r(a, "_setTextAttrs"), function(i) {
|
|
544
|
+
return i.textPlacement === "fo" ? e : i.textPlacement === "old" ? n : t;
|
|
545
|
+
};
|
|
546
|
+
}(), Rt = /* @__PURE__ */ r(function(n) {
|
|
547
|
+
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");
|
|
548
|
+
}, "initGraphics");
|
|
549
|
+
function Q(n, t) {
|
|
550
|
+
n.each(function() {
|
|
551
|
+
var e = q(this), a = e.text().split(/(\s+|<br>)/).reverse(), i, o = [], u = 1.1, p = e.attr("y"), y = parseFloat(e.attr("dy")), m = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", y + "em");
|
|
552
|
+
for (let b = 0; b < a.length; b++)
|
|
553
|
+
i = a[a.length - 1 - b], o.push(i), m.text(o.join(" ").trim()), (m.node().getComputedTextLength() > t || i === "<br>") && (o.pop(), m.text(o.join(" ").trim()), i === "<br>" ? o = [""] : o = [i], m = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", u + "em").text(i));
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
r(Q, "wrap");
|
|
557
|
+
var Ht = /* @__PURE__ */ r(function(n, t, e, a) {
|
|
558
|
+
var i;
|
|
559
|
+
const o = e % Tt - 1, u = n.append("g");
|
|
560
|
+
t.section = o, u.attr(
|
|
561
|
+
"class",
|
|
562
|
+
(t.class ? t.class + " " : "") + "timeline-node " + ("section-" + o)
|
|
563
|
+
);
|
|
564
|
+
const p = u.append("g"), y = u.append("g"), m = y.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(), b = (i = a.fontSize) != null && i.replace ? a.fontSize.replace("px", "") : a.fontSize;
|
|
565
|
+
return t.height = m.height + b * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, y.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), Pt(p, t, o, a), t;
|
|
566
|
+
}, "drawNode"), Dt = /* @__PURE__ */ r(function(n, t, e) {
|
|
567
|
+
var a;
|
|
568
|
+
const i = n.append("g"), o = i.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(), u = (a = e.fontSize) != null && a.replace ? e.fontSize.replace("px", "") : e.fontSize;
|
|
569
|
+
return i.remove(), o.height + u * 1.1 * 0.5 + t.padding;
|
|
570
|
+
}, "getVirtualNodeHeight"), Pt = /* @__PURE__ */ r(function(n, t, e) {
|
|
571
|
+
n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
|
|
572
|
+
"d",
|
|
573
|
+
`M0 ${t.height - 5} v${-t.height + 10} q0,-5 5,-5 h${t.width - 10} q5,0 5,5 v${t.height - 5} H0 Z`
|
|
574
|
+
), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
|
|
575
|
+
}, "defaultBkg"), H = {
|
|
576
|
+
drawRect: Y,
|
|
577
|
+
drawCircle: At,
|
|
578
|
+
drawSection: Ct,
|
|
579
|
+
drawText: gt,
|
|
580
|
+
drawLabel: Nt,
|
|
581
|
+
drawTask: It,
|
|
582
|
+
drawBackgroundRect: Ot,
|
|
583
|
+
getTextObj: Lt,
|
|
584
|
+
getNoteRect: K,
|
|
585
|
+
initGraphics: Rt,
|
|
586
|
+
drawNode: Ht,
|
|
587
|
+
getVirtualNodeHeight: Dt
|
|
588
|
+
}, jt = /* @__PURE__ */ r(function(n, t, e, a) {
|
|
589
|
+
var i, o, u;
|
|
590
|
+
const p = mt(), y = ((i = p.timeline) == null ? void 0 : i.leftMargin) ?? 50;
|
|
591
|
+
$.debug("timeline", a.db);
|
|
592
|
+
const m = p.securityLevel;
|
|
593
|
+
let b;
|
|
594
|
+
m === "sandbox" && (b = q("#i" + t));
|
|
595
|
+
const g = (m === "sandbox" ? q(b.nodes()[0].contentDocument.body) : q("body")).select("#" + t);
|
|
596
|
+
g.append("g");
|
|
597
|
+
const f = a.db.getTasks(), s = a.db.getCommonDb().getDiagramTitle();
|
|
598
|
+
$.debug("task", f), H.initGraphics(g);
|
|
599
|
+
const l = a.db.getSections();
|
|
600
|
+
$.debug("sections", l);
|
|
601
|
+
let h = 0, d = 0, c = 0, k = 0, x = 50 + y, N = 50;
|
|
602
|
+
k = 50;
|
|
603
|
+
let M = 0, W = !0;
|
|
604
|
+
l.forEach(function(S) {
|
|
605
|
+
const v = {
|
|
606
|
+
number: M,
|
|
607
|
+
descr: S,
|
|
608
|
+
section: M,
|
|
609
|
+
width: 150,
|
|
610
|
+
padding: 20,
|
|
611
|
+
maxHeight: h
|
|
612
|
+
}, A = H.getVirtualNodeHeight(g, v, p);
|
|
613
|
+
$.debug("sectionHeight before draw", A), h = Math.max(h, A + 20);
|
|
614
|
+
});
|
|
615
|
+
let I = 0, D = 0;
|
|
616
|
+
$.debug("tasks.length", f.length);
|
|
617
|
+
for (const [S, v] of f.entries()) {
|
|
618
|
+
const A = {
|
|
619
|
+
number: S,
|
|
620
|
+
descr: v,
|
|
621
|
+
section: v.section,
|
|
622
|
+
width: 150,
|
|
623
|
+
padding: 20,
|
|
624
|
+
maxHeight: d
|
|
625
|
+
}, O = H.getVirtualNodeHeight(g, A, p);
|
|
626
|
+
$.debug("taskHeight before draw", O), d = Math.max(d, O + 20), I = Math.max(I, v.events.length);
|
|
627
|
+
let L = 0;
|
|
628
|
+
for (const P of v.events) {
|
|
629
|
+
const w = {
|
|
630
|
+
descr: P,
|
|
631
|
+
section: v.section,
|
|
632
|
+
number: v.section,
|
|
633
|
+
width: 150,
|
|
634
|
+
padding: 20,
|
|
635
|
+
maxHeight: 50
|
|
636
|
+
};
|
|
637
|
+
L += H.getVirtualNodeHeight(g, w, p);
|
|
638
|
+
}
|
|
639
|
+
v.events.length > 0 && (L += (v.events.length - 1) * 10), D = Math.max(D, L);
|
|
640
|
+
}
|
|
641
|
+
$.debug("maxSectionHeight before draw", h), $.debug("maxTaskHeight before draw", d), l && l.length > 0 ? l.forEach((S) => {
|
|
642
|
+
const v = f.filter((P) => P.section === S), A = {
|
|
643
|
+
number: M,
|
|
644
|
+
descr: S,
|
|
645
|
+
section: M,
|
|
646
|
+
width: 200 * Math.max(v.length, 1) - 50,
|
|
647
|
+
padding: 20,
|
|
648
|
+
maxHeight: h
|
|
649
|
+
};
|
|
650
|
+
$.debug("sectionNode", A);
|
|
651
|
+
const O = g.append("g"), L = H.drawNode(O, A, M, p);
|
|
652
|
+
$.debug("sectionNode output", L), O.attr("transform", `translate(${x}, ${k})`), N += h + 50, v.length > 0 && st(
|
|
653
|
+
g,
|
|
654
|
+
v,
|
|
655
|
+
M,
|
|
656
|
+
x,
|
|
657
|
+
N,
|
|
658
|
+
d,
|
|
659
|
+
p,
|
|
660
|
+
I,
|
|
661
|
+
D,
|
|
662
|
+
h,
|
|
663
|
+
!1
|
|
664
|
+
), x += 200 * Math.max(v.length, 1), N = k, M++;
|
|
665
|
+
}) : (W = !1, st(
|
|
666
|
+
g,
|
|
667
|
+
f,
|
|
668
|
+
M,
|
|
669
|
+
x,
|
|
670
|
+
N,
|
|
671
|
+
d,
|
|
672
|
+
p,
|
|
673
|
+
I,
|
|
674
|
+
D,
|
|
675
|
+
h,
|
|
676
|
+
!0
|
|
677
|
+
));
|
|
678
|
+
const _ = g.node().getBBox();
|
|
679
|
+
$.debug("bounds", _), s && g.append("text").text(s).attr("x", _.width / 2 - y).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), c = W ? h + d + 150 : d + 100, g.append("g").attr("class", "lineWrapper").append("line").attr("x1", y).attr("y1", c).attr("x2", _.width + 3 * y).attr("y2", c).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), xt(
|
|
680
|
+
void 0,
|
|
681
|
+
g,
|
|
682
|
+
((o = p.timeline) == null ? void 0 : o.padding) ?? 50,
|
|
683
|
+
((u = p.timeline) == null ? void 0 : u.useMaxWidth) ?? !1
|
|
684
|
+
);
|
|
685
|
+
}, "draw"), st = /* @__PURE__ */ r(function(n, t, e, a, i, o, u, p, y, m, b) {
|
|
686
|
+
var g;
|
|
687
|
+
for (const f of t) {
|
|
688
|
+
const s = {
|
|
689
|
+
descr: f.task,
|
|
690
|
+
section: e,
|
|
691
|
+
number: e,
|
|
692
|
+
width: 150,
|
|
693
|
+
padding: 20,
|
|
694
|
+
maxHeight: o
|
|
695
|
+
};
|
|
696
|
+
$.debug("taskNode", s);
|
|
697
|
+
const l = n.append("g").attr("class", "taskWrapper"), h = H.drawNode(l, s, e, u).height;
|
|
698
|
+
if ($.debug("taskHeight after draw", h), l.attr("transform", `translate(${a}, ${i})`), o = Math.max(o, h), f.events) {
|
|
699
|
+
const d = n.append("g").attr("class", "lineWrapper");
|
|
700
|
+
let c = o;
|
|
701
|
+
i += 100, c = c + Bt(n, f.events, e, a, i, u), i -= 100, d.append("line").attr("x1", a + 190 / 2).attr("y1", i + o).attr("x2", a + 190 / 2).attr("y2", i + o + 100 + y + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
|
|
702
|
+
}
|
|
703
|
+
a = a + 200, b && !((g = u.timeline) != null && g.disableMulticolor) && e++;
|
|
704
|
+
}
|
|
705
|
+
i = i - 10;
|
|
706
|
+
}, "drawTasks"), Bt = /* @__PURE__ */ r(function(n, t, e, a, i, o) {
|
|
707
|
+
let u = 0;
|
|
708
|
+
const p = i;
|
|
709
|
+
i = i + 100;
|
|
710
|
+
for (const y of t) {
|
|
711
|
+
const m = {
|
|
712
|
+
descr: y,
|
|
713
|
+
section: e,
|
|
714
|
+
number: e,
|
|
715
|
+
width: 150,
|
|
716
|
+
padding: 20,
|
|
717
|
+
maxHeight: 50
|
|
718
|
+
};
|
|
719
|
+
$.debug("eventNode", m);
|
|
720
|
+
const b = n.append("g").attr("class", "eventWrapper"), g = H.drawNode(b, m, e, o).height;
|
|
721
|
+
u = u + g, b.attr("transform", `translate(${a}, ${i})`), i = i + 10 + g;
|
|
722
|
+
}
|
|
723
|
+
return i = p, u;
|
|
724
|
+
}, "drawEvents"), Ft = {
|
|
725
|
+
setConf: /* @__PURE__ */ r(() => {
|
|
726
|
+
}, "setConf"),
|
|
727
|
+
draw: jt
|
|
728
|
+
}, Wt = /* @__PURE__ */ r((n) => {
|
|
729
|
+
let t = "";
|
|
730
|
+
for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
|
|
731
|
+
n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], bt(n["lineColor" + e]) ? n["lineColor" + e] = kt(n["lineColor" + e], 20) : n["lineColor" + e] = _t(n["lineColor" + e], 20);
|
|
732
|
+
for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
|
|
733
|
+
const a = "" + (17 - 3 * e);
|
|
734
|
+
t += `
|
|
735
|
+
.section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
|
|
736
|
+
fill: ${n["cScale" + e]};
|
|
737
|
+
}
|
|
738
|
+
.section-${e - 1} text {
|
|
739
|
+
fill: ${n["cScaleLabel" + e]};
|
|
740
|
+
}
|
|
741
|
+
.node-icon-${e - 1} {
|
|
742
|
+
font-size: 40px;
|
|
743
|
+
color: ${n["cScaleLabel" + e]};
|
|
744
|
+
}
|
|
745
|
+
.section-edge-${e - 1}{
|
|
746
|
+
stroke: ${n["cScale" + e]};
|
|
747
|
+
}
|
|
748
|
+
.edge-depth-${e - 1}{
|
|
749
|
+
stroke-width: ${a};
|
|
750
|
+
}
|
|
751
|
+
.section-${e - 1} line {
|
|
752
|
+
stroke: ${n["cScaleInv" + e]} ;
|
|
753
|
+
stroke-width: 3;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.lineWrapper line{
|
|
757
|
+
stroke: ${n["cScaleLabel" + e]} ;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.disabled, .disabled circle, .disabled text {
|
|
761
|
+
fill: lightgray;
|
|
762
|
+
}
|
|
763
|
+
.disabled text {
|
|
764
|
+
fill: #efefef;
|
|
765
|
+
}
|
|
766
|
+
`;
|
|
767
|
+
}
|
|
768
|
+
return t;
|
|
769
|
+
}, "genSections"), Vt = /* @__PURE__ */ r((n) => `
|
|
770
|
+
.edge {
|
|
771
|
+
stroke-width: 3;
|
|
772
|
+
}
|
|
773
|
+
${Wt(n)}
|
|
774
|
+
.section-root rect, .section-root path, .section-root circle {
|
|
775
|
+
fill: ${n.git0};
|
|
776
|
+
}
|
|
777
|
+
.section-root text {
|
|
778
|
+
fill: ${n.gitBranchLabel0};
|
|
779
|
+
}
|
|
780
|
+
.icon-container {
|
|
781
|
+
height:100%;
|
|
782
|
+
display: flex;
|
|
783
|
+
justify-content: center;
|
|
784
|
+
align-items: center;
|
|
785
|
+
}
|
|
786
|
+
.edge {
|
|
787
|
+
fill: none;
|
|
788
|
+
}
|
|
789
|
+
.eventWrapper {
|
|
790
|
+
filter: brightness(120%);
|
|
791
|
+
}
|
|
792
|
+
`, "getStyles"), zt = Vt, Yt = {
|
|
793
|
+
db: rt,
|
|
794
|
+
renderer: Ft,
|
|
795
|
+
parser: $t,
|
|
796
|
+
styles: zt
|
|
797
|
+
};
|
|
798
|
+
export {
|
|
799
|
+
Yt as diagram
|
|
800
|
+
};
|