lowcoder-comps 0.0.21 → 0.0.23

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 (58) hide show
  1. package/060799f2.js +960 -0
  2. package/1012bc4d.js +804 -0
  3. package/{b38c288b.js → 13094807.js} +10 -12
  4. package/{54511d22.js → 17eec513.js} +73 -76
  5. package/3581323b.js +1055 -0
  6. package/{f576ac90.js → 39041099.js} +97 -109
  7. package/43aa9013.js +218 -0
  8. package/4835e2da.js +2501 -0
  9. package/4ac12b61.js +915 -0
  10. package/52f00270.js +932 -0
  11. package/53ac8761.js +1235 -0
  12. package/53c41f32.js +1116 -0
  13. package/6b0ac243.js +64 -0
  14. package/6b615aa6.js +365 -0
  15. package/{9f3281b9.js → 6ddb6f97.js} +48410 -35551
  16. package/6fa8963b.js +2396 -0
  17. package/{ba44e76c.js → 7958ae6b.js} +4257 -4221
  18. package/{7c62ef63.js → 7b5e16e2.js} +1 -1
  19. package/83aee898.js +825 -0
  20. package/{31b1cdd2.js → 877dfc2d.js} +29 -30
  21. package/92e85b65.js +65 -0
  22. package/9f3e59b9.js +796 -0
  23. package/{a6e7fb9e.js → 9fadb810.js} +64 -71
  24. package/a8fa2c8f.js +1284 -0
  25. package/{8219433d.js → af05a28a.js} +7038 -6859
  26. package/{450c6bd6.js → ba9c56f6.js} +44 -44
  27. package/{2768fdea.js → bd004c35.js} +89 -97
  28. package/{fb09e069.js → bfe4f54a.js} +598 -622
  29. package/d0baa7b9.js +86 -0
  30. package/dcf6bbc3.js +768 -0
  31. package/e21892cc.js +2966 -0
  32. package/e52f46f3.js +2192 -0
  33. package/{3bd738e9.js → eaef549d.js} +58 -64
  34. package/fc7a026c.js +502 -0
  35. package/fcffa471.js +1000 -0
  36. package/index.js +2 -2
  37. package/package.json +7 -8
  38. package/04ea1009.js +0 -985
  39. package/0a1968f4.js +0 -832
  40. package/3087113d.js +0 -1032
  41. package/39f71758.js +0 -849
  42. package/4d1cf087.js +0 -2679
  43. package/59cbb8ee.js +0 -2456
  44. package/62c916e0.js +0 -86
  45. package/74645131.js +0 -1246
  46. package/75095038.js +0 -159
  47. package/86a4a706.js +0 -1118
  48. package/88c87bf8.js +0 -943
  49. package/8d8e98a7.js +0 -365
  50. package/9200edf7.js +0 -70
  51. package/acdad8f2.js +0 -7
  52. package/cbee3d44.js +0 -607
  53. package/cc0f1351.js +0 -793
  54. package/e614be0d.js +0 -91
  55. package/f40ee59a.js +0 -940
  56. package/fc5c5300.js +0 -2103
  57. package/fe636892.js +0 -823
  58. package/fea654db.js +0 -2827
package/fe636892.js DELETED
@@ -1,823 +0,0 @@
1
- import { aw as bt, ax as vt, B as kt, c as wt, l as I, h as J, t as St, ay as Et, az as Tt, aA as It } from "./9f3281b9.js";
2
- import { a as it } from "./62c916e0.js";
3
- import "./256b619e.js";
4
- var D = function() {
5
- var n = function(_, r, a, h) {
6
- for (a = a || {}, h = _.length; h--; a[_[h]] = r)
7
- ;
8
- return a;
9
- }, t = [1, 2], e = [1, 5], s = [6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28], i = [1, 15], o = [1, 16], l = [1, 17], y = [1, 18], d = [1, 19], p = [1, 23], m = [1, 24], S = [1, 27], w = [4, 6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28], x = {
10
- trace: function() {
11
- },
12
- yy: {},
13
- symbols_: { error: 2, start: 3, timeline: 4, document: 5, EOF: 6, directive: 7, line: 8, SPACE: 9, statement: 10, NEWLINE: 11, openDirective: 12, typeDirective: 13, closeDirective: 14, ":": 15, argDirective: 16, title: 17, acc_title: 18, acc_title_value: 19, acc_descr: 20, acc_descr_value: 21, acc_descr_multiline_value: 22, section: 23, period_statement: 24, event_statement: 25, period: 26, event: 27, open_directive: 28, type_directive: 29, arg_directive: 30, close_directive: 31, $accept: 0, $end: 1 },
14
- terminals_: { 2: "error", 4: "timeline", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 17: "title", 18: "acc_title", 19: "acc_title_value", 20: "acc_descr", 21: "acc_descr_value", 22: "acc_descr_multiline_value", 23: "section", 26: "period", 27: "event", 28: "open_directive", 29: "type_directive", 30: "arg_directive", 31: "close_directive" },
15
- productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [24, 1], [25, 1], [12, 1], [13, 1], [16, 1], [14, 1]],
16
- performAction: function(r, a, h, u, g, c, T) {
17
- var f = c.length - 1;
18
- switch (g) {
19
- case 1:
20
- return c[f - 1];
21
- case 3:
22
- this.$ = [];
23
- break;
24
- case 4:
25
- c[f - 1].push(c[f]), this.$ = c[f - 1];
26
- break;
27
- case 5:
28
- case 6:
29
- this.$ = c[f];
30
- break;
31
- case 7:
32
- case 8:
33
- this.$ = [];
34
- break;
35
- case 11:
36
- u.getCommonDb().setDiagramTitle(c[f].substr(6)), this.$ = c[f].substr(6);
37
- break;
38
- case 12:
39
- this.$ = c[f].trim(), u.getCommonDb().setAccTitle(this.$);
40
- break;
41
- case 13:
42
- case 14:
43
- this.$ = c[f].trim(), u.getCommonDb().setAccDescription(this.$);
44
- break;
45
- case 15:
46
- u.addSection(c[f].substr(8)), this.$ = c[f].substr(8);
47
- break;
48
- case 19:
49
- u.addTask(c[f], 0, ""), this.$ = c[f];
50
- break;
51
- case 20:
52
- u.addEvent(c[f].substr(2)), this.$ = c[f];
53
- break;
54
- case 21:
55
- u.parseDirective("%%{", "open_directive");
56
- break;
57
- case 22:
58
- u.parseDirective(c[f], "type_directive");
59
- break;
60
- case 23:
61
- c[f] = c[f].trim().replace(/'/g, '"'), u.parseDirective(c[f], "arg_directive");
62
- break;
63
- case 24:
64
- u.parseDirective("}%%", "close_directive", "timeline");
65
- break;
66
- }
67
- },
68
- table: [{ 3: 1, 4: t, 7: 3, 12: 4, 28: e }, { 1: [3] }, n(s, [2, 3], { 5: 6 }), { 3: 7, 4: t, 7: 3, 12: 4, 28: e }, { 13: 8, 29: [1, 9] }, { 29: [2, 21] }, { 6: [1, 10], 7: 22, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: i, 18: o, 20: l, 22: y, 23: d, 24: 20, 25: 21, 26: p, 27: m, 28: e }, { 1: [2, 2] }, { 14: 25, 15: [1, 26], 31: S }, n([15, 31], [2, 22]), n(s, [2, 8], { 1: [2, 1] }), n(s, [2, 4]), { 7: 22, 10: 28, 12: 4, 17: i, 18: o, 20: l, 22: y, 23: d, 24: 20, 25: 21, 26: p, 27: m, 28: e }, n(s, [2, 6]), n(s, [2, 7]), n(s, [2, 11]), { 19: [1, 29] }, { 21: [1, 30] }, n(s, [2, 14]), n(s, [2, 15]), n(s, [2, 16]), n(s, [2, 17]), n(s, [2, 18]), n(s, [2, 19]), n(s, [2, 20]), { 11: [1, 31] }, { 16: 32, 30: [1, 33] }, { 11: [2, 24] }, n(s, [2, 5]), n(s, [2, 12]), n(s, [2, 13]), n(w, [2, 9]), { 14: 34, 31: S }, { 31: [2, 23] }, { 11: [1, 35] }, n(w, [2, 10])],
69
- defaultActions: { 5: [2, 21], 7: [2, 2], 27: [2, 24], 33: [2, 23] },
70
- parseError: function(r, a) {
71
- if (a.recoverable)
72
- this.trace(r);
73
- else {
74
- var h = new Error(r);
75
- throw h.hash = a, h;
76
- }
77
- },
78
- parse: function(r) {
79
- var a = this, h = [0], u = [], g = [null], c = [], T = this.table, f = "", P = 0, V = 0, j = 2, X = 1, q = c.slice.call(arguments, 1), b = Object.create(this.lexer), L = { yy: {} };
80
- for (var A in this.yy)
81
- Object.prototype.hasOwnProperty.call(this.yy, A) && (L.yy[A] = this.yy[A]);
82
- b.setInput(r, L.yy), L.yy.lexer = b, L.yy.parser = this, typeof b.yylloc == "undefined" && (b.yylloc = {});
83
- var k = b.yylloc;
84
- c.push(k);
85
- var H = b.options && b.options.ranges;
86
- typeof L.yy.parseError == "function" ? this.parseError = L.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
87
- function R() {
88
- var z;
89
- return z = u.pop() || b.lex() || X, typeof z != "number" && (z instanceof Array && (u = z, z = u.pop()), z = a.symbols_[z] || z), z;
90
- }
91
- for (var v, $, N, G, W = {}, U, C, nt, Z; ; ) {
92
- if ($ = h[h.length - 1], this.defaultActions[$] ? N = this.defaultActions[$] : ((v === null || typeof v == "undefined") && (v = R()), N = T[$] && T[$][v]), typeof N == "undefined" || !N.length || !N[0]) {
93
- var Y = "";
94
- Z = [];
95
- for (U in T[$])
96
- this.terminals_[U] && U > j && Z.push("'" + this.terminals_[U] + "'");
97
- b.showPosition ? Y = "Parse error on line " + (P + 1) + `:
98
- ` + b.showPosition() + `
99
- Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[v] || v) + "'" : Y = "Parse error on line " + (P + 1) + ": Unexpected " + (v == X ? "end of input" : "'" + (this.terminals_[v] || v) + "'"), this.parseError(Y, {
100
- text: b.match,
101
- token: this.terminals_[v] || v,
102
- line: b.yylineno,
103
- loc: k,
104
- expected: Z
105
- });
106
- }
107
- if (N[0] instanceof Array && N.length > 1)
108
- throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + v);
109
- switch (N[0]) {
110
- case 1:
111
- h.push(v), g.push(b.yytext), c.push(b.yylloc), h.push(N[1]), v = null, V = b.yyleng, f = b.yytext, P = b.yylineno, k = b.yylloc;
112
- break;
113
- case 2:
114
- if (C = this.productions_[N[1]][1], W.$ = g[g.length - C], W._$ = {
115
- first_line: c[c.length - (C || 1)].first_line,
116
- last_line: c[c.length - 1].last_line,
117
- first_column: c[c.length - (C || 1)].first_column,
118
- last_column: c[c.length - 1].last_column
119
- }, H && (W._$.range = [
120
- c[c.length - (C || 1)].range[0],
121
- c[c.length - 1].range[1]
122
- ]), G = this.performAction.apply(W, [
123
- f,
124
- V,
125
- P,
126
- L.yy,
127
- N[1],
128
- g,
129
- c
130
- ].concat(q)), typeof G != "undefined")
131
- return G;
132
- C && (h = h.slice(0, -1 * C * 2), g = g.slice(0, -1 * C), c = c.slice(0, -1 * C)), h.push(this.productions_[N[1]][0]), g.push(W.$), c.push(W._$), nt = T[h[h.length - 2]][h[h.length - 1]], h.push(nt);
133
- break;
134
- case 3:
135
- return !0;
136
- }
137
- }
138
- return !0;
139
- }
140
- }, E = function() {
141
- var _ = {
142
- EOF: 1,
143
- parseError: function(a, h) {
144
- if (this.yy.parser)
145
- this.yy.parser.parseError(a, h);
146
- else
147
- throw new Error(a);
148
- },
149
- // resets the lexer, sets new input
150
- setInput: function(r, a) {
151
- return this.yy = a || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
152
- first_line: 1,
153
- first_column: 0,
154
- last_line: 1,
155
- last_column: 0
156
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
157
- },
158
- // consumes and returns one char from the input
159
- input: function() {
160
- var r = this._input[0];
161
- this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
162
- var a = r.match(/(?:\r\n?|\n).*/g);
163
- 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), r;
164
- },
165
- // unshifts one char (or a string) into the input
166
- unput: function(r) {
167
- var a = r.length, h = r.split(/(?:\r\n?|\n)/g);
168
- this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
169
- var u = this.match.split(/(?:\r\n?|\n)/g);
170
- 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);
171
- var g = this.yylloc.range;
172
- return this.yylloc = {
173
- first_line: this.yylloc.first_line,
174
- last_line: this.yylineno + 1,
175
- first_column: this.yylloc.first_column,
176
- last_column: h ? (h.length === u.length ? this.yylloc.first_column : 0) + u[u.length - h.length].length - h[0].length : this.yylloc.first_column - a
177
- }, this.options.ranges && (this.yylloc.range = [g[0], g[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
178
- },
179
- // When called from action, caches matched text and appends it on next action
180
- more: function() {
181
- return this._more = !0, this;
182
- },
183
- // 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.
184
- reject: function() {
185
- if (this.options.backtrack_lexer)
186
- this._backtrack = !0;
187
- else
188
- 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).
189
- ` + this.showPosition(), {
190
- text: "",
191
- token: null,
192
- line: this.yylineno
193
- });
194
- return this;
195
- },
196
- // retain first n characters of the match
197
- less: function(r) {
198
- this.unput(this.match.slice(r));
199
- },
200
- // displays already matched input, i.e. for error messages
201
- pastInput: function() {
202
- var r = this.matched.substr(0, this.matched.length - this.match.length);
203
- return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
204
- },
205
- // displays upcoming input, i.e. for error messages
206
- upcomingInput: function() {
207
- var r = this.match;
208
- return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
209
- },
210
- // displays the character position where the lexing error occurred, i.e. for error messages
211
- showPosition: function() {
212
- var r = this.pastInput(), a = new Array(r.length + 1).join("-");
213
- return r + this.upcomingInput() + `
214
- ` + a + "^";
215
- },
216
- // test the lexed token: return FALSE when not a match, otherwise return token
217
- test_match: function(r, a) {
218
- var h, u, g;
219
- if (this.options.backtrack_lexer && (g = {
220
- yylineno: this.yylineno,
221
- yylloc: {
222
- first_line: this.yylloc.first_line,
223
- last_line: this.last_line,
224
- first_column: this.yylloc.first_column,
225
- last_column: this.yylloc.last_column
226
- },
227
- yytext: this.yytext,
228
- match: this.match,
229
- matches: this.matches,
230
- matched: this.matched,
231
- yyleng: this.yyleng,
232
- offset: this.offset,
233
- _more: this._more,
234
- _input: this._input,
235
- yy: this.yy,
236
- conditionStack: this.conditionStack.slice(0),
237
- done: this.done
238
- }, this.options.ranges && (g.yylloc.range = this.yylloc.range.slice(0))), u = r[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
239
- first_line: this.yylloc.last_line,
240
- last_line: this.yylineno + 1,
241
- first_column: this.yylloc.last_column,
242
- last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
243
- }, this.yytext += r[0], this.match += r[0], this.matches = r, 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(r[0].length), this.matched += r[0], h = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h)
244
- return h;
245
- if (this._backtrack) {
246
- for (var c in g)
247
- this[c] = g[c];
248
- return !1;
249
- }
250
- return !1;
251
- },
252
- // return next match in input
253
- next: function() {
254
- if (this.done)
255
- return this.EOF;
256
- this._input || (this.done = !0);
257
- var r, a, h, u;
258
- this._more || (this.yytext = "", this.match = "");
259
- for (var g = this._currentRules(), c = 0; c < g.length; c++)
260
- if (h = this._input.match(this.rules[g[c]]), h && (!a || h[0].length > a[0].length)) {
261
- if (a = h, u = c, this.options.backtrack_lexer) {
262
- if (r = this.test_match(h, g[c]), r !== !1)
263
- return r;
264
- if (this._backtrack) {
265
- a = !1;
266
- continue;
267
- } else
268
- return !1;
269
- } else if (!this.options.flex)
270
- break;
271
- }
272
- return a ? (r = this.test_match(a, g[u]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
273
- ` + this.showPosition(), {
274
- text: "",
275
- token: null,
276
- line: this.yylineno
277
- });
278
- },
279
- // return next match that has a token
280
- lex: function() {
281
- var a = this.next();
282
- return a || this.lex();
283
- },
284
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
285
- begin: function(a) {
286
- this.conditionStack.push(a);
287
- },
288
- // pop the previously active lexer condition state off the condition stack
289
- popState: function() {
290
- var a = this.conditionStack.length - 1;
291
- return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
292
- },
293
- // produce the lexer rule set which is active for the currently active lexer condition state
294
- _currentRules: function() {
295
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
296
- },
297
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
298
- topState: function(a) {
299
- return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
300
- },
301
- // alias for begin(condition)
302
- pushState: function(a) {
303
- this.begin(a);
304
- },
305
- // return the number of states currently on the stack
306
- stateStackSize: function() {
307
- return this.conditionStack.length;
308
- },
309
- options: { "case-insensitive": !0 },
310
- performAction: function(a, h, u, g) {
311
- switch (u) {
312
- case 0:
313
- return this.begin("open_directive"), 28;
314
- case 1:
315
- return this.begin("type_directive"), 29;
316
- case 2:
317
- return this.popState(), this.begin("arg_directive"), 15;
318
- case 3:
319
- return this.popState(), this.popState(), 31;
320
- case 4:
321
- return 30;
322
- case 5:
323
- break;
324
- case 6:
325
- break;
326
- case 7:
327
- return 11;
328
- case 8:
329
- break;
330
- case 9:
331
- break;
332
- case 10:
333
- return 4;
334
- case 11:
335
- return 17;
336
- case 12:
337
- return this.begin("acc_title"), 18;
338
- case 13:
339
- return this.popState(), "acc_title_value";
340
- case 14:
341
- return this.begin("acc_descr"), 20;
342
- case 15:
343
- return this.popState(), "acc_descr_value";
344
- case 16:
345
- this.begin("acc_descr_multiline");
346
- break;
347
- case 17:
348
- this.popState();
349
- break;
350
- case 18:
351
- return "acc_descr_multiline_value";
352
- case 19:
353
- return 23;
354
- case 20:
355
- return 27;
356
- case 21:
357
- return 26;
358
- case 22:
359
- return 6;
360
- case 23:
361
- return "INVALID";
362
- }
363
- },
364
- rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\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],
365
- conditions: { open_directive: { rules: [1], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, acc_descr_multiline: { rules: [17, 18], inclusive: !1 }, acc_descr: { rules: [15], inclusive: !1 }, acc_title: { rules: [13], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 20, 21, 22, 23], inclusive: !0 } }
366
- };
367
- return _;
368
- }();
369
- x.lexer = E;
370
- function M() {
371
- this.yy = {};
372
- }
373
- return M.prototype = x, x.Parser = M, new M();
374
- }();
375
- D.parser = D;
376
- const $t = D;
377
- let B = "", ct = 0;
378
- const tt = [], K = [], O = [], lt = () => bt, ot = (n, t, e) => {
379
- vt(globalThis, n, t, e);
380
- }, ht = function() {
381
- tt.length = 0, K.length = 0, B = "", O.length = 0, kt();
382
- }, dt = function(n) {
383
- B = n, tt.push(n);
384
- }, ut = function() {
385
- return tt;
386
- }, pt = function() {
387
- let n = st();
388
- const t = 100;
389
- let e = 0;
390
- for (; !n && e < t; )
391
- n = st(), e++;
392
- return K.push(...O), K;
393
- }, yt = function(n, t, e) {
394
- const s = {
395
- id: ct++,
396
- section: B,
397
- type: B,
398
- task: n,
399
- score: t || 0,
400
- //if event is defined, then add it the events array
401
- events: e ? [e] : []
402
- };
403
- O.push(s);
404
- }, gt = function(n) {
405
- O.find((e) => e.id === ct - 1).events.push(n);
406
- }, ft = function(n) {
407
- const t = {
408
- section: B,
409
- type: B,
410
- description: n,
411
- task: n,
412
- classes: []
413
- };
414
- K.push(t);
415
- }, st = function() {
416
- const n = function(e) {
417
- return O[e].processed;
418
- };
419
- let t = !0;
420
- for (const [e, s] of O.entries())
421
- n(e), t = t && s.processed;
422
- return t;
423
- }, Nt = {
424
- clear: ht,
425
- getCommonDb: lt,
426
- addSection: dt,
427
- getSections: ut,
428
- getTasks: pt,
429
- addTask: yt,
430
- addTaskOrg: ft,
431
- addEvent: gt,
432
- parseDirective: ot
433
- }, Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
434
- __proto__: null,
435
- addEvent: gt,
436
- addSection: dt,
437
- addTask: yt,
438
- addTaskOrg: ft,
439
- clear: ht,
440
- default: Nt,
441
- getCommonDb: lt,
442
- getSections: ut,
443
- getTasks: pt,
444
- parseDirective: ot
445
- }, Symbol.toStringTag, { value: "Module" })), Lt = 12, Q = function(n, t) {
446
- const e = n.append("rect");
447
- 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;
448
- }, At = function(n, t) {
449
- const s = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), i = n.append("g");
450
- i.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"), i.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");
451
- function o(d) {
452
- const p = it().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
453
- d.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
454
- }
455
- function l(d) {
456
- const p = it().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
457
- d.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
458
- }
459
- function y(d) {
460
- d.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");
461
- }
462
- return t.score > 3 ? o(i) : t.score < 3 ? l(i) : y(i), s;
463
- }, Pt = function(n, t) {
464
- const e = n.append("circle");
465
- 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;
466
- }, mt = function(n, t) {
467
- const e = t.text.replace(/<br\s*\/?>/gi, " "), s = n.append("text");
468
- s.attr("x", t.x), s.attr("y", t.y), s.attr("class", "legend"), s.style("text-anchor", t.anchor), t.class !== void 0 && s.attr("class", t.class);
469
- const i = s.append("tspan");
470
- return i.attr("x", t.x + t.textMargin * 2), i.text(e), s;
471
- }, Ht = function(n, t) {
472
- function e(i, o, l, y, d) {
473
- return i + "," + o + " " + (i + l) + "," + o + " " + (i + l) + "," + (o + y - d) + " " + (i + l - d * 1.2) + "," + (o + y) + " " + i + "," + (o + y);
474
- }
475
- const s = n.append("polygon");
476
- s.attr("points", e(t.x, t.y, 50, 20, 7)), s.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, mt(n, t);
477
- }, Ct = function(n, t, e) {
478
- const s = n.append("g"), i = et();
479
- 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, Q(s, i), xt(e)(
480
- t.text,
481
- s,
482
- i.x,
483
- i.y,
484
- i.width,
485
- i.height,
486
- { class: "journey-section section-type-" + t.num },
487
- e,
488
- t.colour
489
- );
490
- };
491
- let rt = -1;
492
- const zt = function(n, t, e) {
493
- const s = t.x + e.width / 2, i = n.append("g");
494
- rt++;
495
- const o = 300 + 5 * 30;
496
- i.append("line").attr("id", "task" + rt).attr("x1", s).attr("y1", t.y).attr("x2", s).attr("y2", o).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), At(i, {
497
- cx: s,
498
- cy: 300 + (5 - t.score) * 30,
499
- score: t.score
500
- });
501
- const l = et();
502
- l.x = t.x, l.y = t.y, l.fill = t.fill, l.width = e.width, l.height = e.height, l.class = "task task-type-" + t.num, l.rx = 3, l.ry = 3, Q(i, l), t.x + 14, xt(e)(
503
- t.task,
504
- i,
505
- l.x,
506
- l.y,
507
- l.width,
508
- l.height,
509
- { class: "task" },
510
- e,
511
- t.colour
512
- );
513
- }, Vt = function(n, t) {
514
- Q(n, {
515
- x: t.startx,
516
- y: t.starty,
517
- width: t.stopx - t.startx,
518
- height: t.stopy - t.starty,
519
- fill: t.fill,
520
- class: "rect"
521
- }).lower();
522
- }, Rt = function() {
523
- return {
524
- x: 0,
525
- y: 0,
526
- fill: void 0,
527
- "text-anchor": "start",
528
- width: 100,
529
- height: 100,
530
- textMargin: 0,
531
- rx: 0,
532
- ry: 0
533
- };
534
- }, et = function() {
535
- return {
536
- x: 0,
537
- y: 0,
538
- width: 100,
539
- anchor: "start",
540
- height: 100,
541
- rx: 0,
542
- ry: 0
543
- };
544
- }, xt = function() {
545
- function n(i, o, l, y, d, p, m, S) {
546
- const w = o.append("text").attr("x", l + d / 2).attr("y", y + p / 2 + 5).style("font-color", S).style("text-anchor", "middle").text(i);
547
- s(w, m);
548
- }
549
- function t(i, o, l, y, d, p, m, S, w) {
550
- const { taskFontSize: x, taskFontFamily: E } = S, M = i.split(/<br\s*\/?>/gi);
551
- for (let _ = 0; _ < M.length; _++) {
552
- const r = _ * x - x * (M.length - 1) / 2, a = o.append("text").attr("x", l + d / 2).attr("y", y).attr("fill", w).style("text-anchor", "middle").style("font-size", x).style("font-family", E);
553
- a.append("tspan").attr("x", l + d / 2).attr("dy", r).text(M[_]), a.attr("y", y + p / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(a, m);
554
- }
555
- }
556
- function e(i, o, l, y, d, p, m, S) {
557
- const w = o.append("switch"), E = w.append("foreignObject").attr("x", l).attr("y", y).attr("width", d).attr("height", p).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
558
- E.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, w, l, y, d, p, m, S), s(E, m);
559
- }
560
- function s(i, o) {
561
- for (const l in o)
562
- l in o && i.attr(l, o[l]);
563
- }
564
- return function(i) {
565
- return i.textPlacement === "fo" ? e : i.textPlacement === "old" ? n : t;
566
- };
567
- }(), Ft = function(n) {
568
- 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");
569
- };
570
- function _t(n, t) {
571
- n.each(function() {
572
- var e = J(this), s = e.text().split(/(\s+|<br>)/).reverse(), i, o = [], l = 1.1, y = e.attr("y"), d = parseFloat(e.attr("dy")), p = e.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", d + "em");
573
- for (let m = 0; m < s.length; m++)
574
- i = s[s.length - 1 - m], o.push(i), p.text(o.join(" ").trim()), (p.node().getComputedTextLength() > t || i === "<br>") && (o.pop(), p.text(o.join(" ").trim()), i === "<br>" ? o = [""] : o = [i], p = e.append("tspan").attr("x", 0).attr("y", y).attr("dy", l + "em").text(i));
575
- });
576
- }
577
- const Wt = function(n, t, e, s) {
578
- const i = e % Lt - 1, o = n.append("g");
579
- t.section = i, o.attr(
580
- "class",
581
- (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + i)
582
- );
583
- const l = o.append("g"), y = o.append("g"), p = y.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(_t, t.width).node().getBBox(), m = s.fontSize && s.fontSize.replace ? s.fontSize.replace("px", "") : s.fontSize;
584
- return t.height = p.height + m * 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 + ")"), Ot(l, t, i), t;
585
- }, Bt = function(n, t, e) {
586
- const s = n.append("g"), o = s.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(_t, t.width).node().getBBox(), l = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize;
587
- return s.remove(), o.height + l * 1.1 * 0.5 + t.padding;
588
- }, Ot = function(n, t, e) {
589
- n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
590
- "d",
591
- `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`
592
- ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
593
- }, F = {
594
- drawRect: Q,
595
- drawCircle: Pt,
596
- drawSection: Ct,
597
- drawText: mt,
598
- drawLabel: Ht,
599
- drawTask: zt,
600
- drawBackgroundRect: Vt,
601
- getTextObj: Rt,
602
- getNoteRect: et,
603
- initGraphics: Ft,
604
- drawNode: Wt,
605
- getVirtualNodeHeight: Bt
606
- }, jt = function(n, t, e, s) {
607
- var q, b, L;
608
- var i, o, l, y;
609
- const d = wt(), p = (q = d.leftMargin) != null ? q : 50;
610
- (o = (i = s.db).clear) == null || o.call(i), s.parser.parse(n + `
611
- `), I.debug("timeline", s.db);
612
- const m = d.securityLevel;
613
- let S;
614
- m === "sandbox" && (S = J("#i" + t));
615
- const x = (m === "sandbox" ? J(S.nodes()[0].contentDocument.body) : J("body")).select("#" + t);
616
- x.append("g");
617
- const E = s.db.getTasks(), M = s.db.getCommonDb().getDiagramTitle();
618
- I.debug("task", E), F.initGraphics(x);
619
- const _ = s.db.getSections();
620
- I.debug("sections", _);
621
- let r = 0, a = 0, h = 0, u = 0, g = 50 + p, c = 50;
622
- u = 50;
623
- let T = 0, f = !0;
624
- _.forEach(function(A) {
625
- const k = {
626
- number: T,
627
- descr: A,
628
- section: T,
629
- width: 150,
630
- padding: 20,
631
- maxHeight: r
632
- }, H = F.getVirtualNodeHeight(x, k, d);
633
- I.debug("sectionHeight before draw", H), r = Math.max(r, H + 20);
634
- });
635
- let P = 0, V = 0;
636
- I.debug("tasks.length", E.length);
637
- for (const [A, k] of E.entries()) {
638
- const H = {
639
- number: A,
640
- descr: k,
641
- section: k.section,
642
- width: 150,
643
- padding: 20,
644
- maxHeight: a
645
- }, R = F.getVirtualNodeHeight(x, H, d);
646
- I.debug("taskHeight before draw", R), a = Math.max(a, R + 20), P = Math.max(P, k.events.length);
647
- let v = 0;
648
- for (let $ = 0; $ < k.events.length; $++) {
649
- const G = {
650
- descr: k.events[$],
651
- section: k.section,
652
- number: k.section,
653
- width: 150,
654
- padding: 20,
655
- maxHeight: 50
656
- };
657
- v += F.getVirtualNodeHeight(x, G, d);
658
- }
659
- V = Math.max(V, v);
660
- }
661
- I.debug("maxSectionHeight before draw", r), I.debug("maxTaskHeight before draw", a), _ && _.length > 0 ? _.forEach((A) => {
662
- const k = E.filter(($) => $.section === A), H = {
663
- number: T,
664
- descr: A,
665
- section: T,
666
- width: 200 * Math.max(k.length, 1) - 50,
667
- padding: 20,
668
- maxHeight: r
669
- };
670
- I.debug("sectionNode", H);
671
- const R = x.append("g"), v = F.drawNode(R, H, T, d);
672
- I.debug("sectionNode output", v), R.attr("transform", `translate(${g}, ${u})`), c += r + 50, k.length > 0 && at(
673
- x,
674
- k,
675
- T,
676
- g,
677
- c,
678
- a,
679
- d,
680
- P,
681
- V,
682
- r,
683
- !1
684
- ), g += 200 * Math.max(k.length, 1), c = u, T++;
685
- }) : (f = !1, at(
686
- x,
687
- E,
688
- T,
689
- g,
690
- c,
691
- a,
692
- d,
693
- P,
694
- V,
695
- r,
696
- !0
697
- ));
698
- const j = x.node().getBBox();
699
- I.debug("bounds", j), M && x.append("text").text(M).attr("x", j.width / 2 - p).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), h = f ? r + a + 150 : a + 100, x.append("g").attr("class", "lineWrapper").append("line").attr("x1", p).attr("y1", h).attr("x2", j.width + 3 * p).attr("y2", h).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), St(
700
- void 0,
701
- x,
702
- (b = (l = d.timeline) == null ? void 0 : l.padding) != null ? b : 50,
703
- (L = (y = d.timeline) == null ? void 0 : y.useMaxWidth) != null ? L : !1
704
- );
705
- }, at = function(n, t, e, s, i, o, l, y, d, p, m) {
706
- var S;
707
- for (const w of t) {
708
- const x = {
709
- descr: w.task,
710
- section: e,
711
- number: e,
712
- width: 150,
713
- padding: 20,
714
- maxHeight: o
715
- };
716
- I.debug("taskNode", x);
717
- const E = n.append("g").attr("class", "taskWrapper"), _ = F.drawNode(E, x, e, l).height;
718
- if (I.debug("taskHeight after draw", _), E.attr("transform", `translate(${s}, ${i})`), o = Math.max(o, _), w.events) {
719
- const r = n.append("g").attr("class", "lineWrapper");
720
- let a = o;
721
- i += 100, a = a + Gt(n, w.events, e, s, i, l), i -= 100, r.append("line").attr("x1", s + 190 / 2).attr("y1", i + o).attr("x2", s + 190 / 2).attr(
722
- "y2",
723
- i + o + (m ? o : p) + d + 120
724
- ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
725
- }
726
- s = s + 200, m && !((S = l.timeline) != null && S.disableMulticolor) && e++;
727
- }
728
- i = i - 10;
729
- }, Gt = function(n, t, e, s, i, o) {
730
- let l = 0;
731
- const y = i;
732
- i = i + 100;
733
- for (const d of t) {
734
- const p = {
735
- descr: d,
736
- section: e,
737
- number: e,
738
- width: 150,
739
- padding: 20,
740
- maxHeight: 50
741
- };
742
- I.debug("eventNode", p);
743
- const m = n.append("g").attr("class", "eventWrapper"), w = F.drawNode(m, p, e, o).height;
744
- l = l + w, m.attr("transform", `translate(${s}, ${i})`), i = i + 10 + w;
745
- }
746
- return i = y, l;
747
- }, qt = {
748
- setConf: () => {
749
- },
750
- draw: jt
751
- }, Ut = (n) => {
752
- let t = "";
753
- for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
754
- n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], Et(n["lineColor" + e]) ? n["lineColor" + e] = Tt(n["lineColor" + e], 20) : n["lineColor" + e] = It(n["lineColor" + e], 20);
755
- for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
756
- const s = "" + (17 - 3 * e);
757
- t += `
758
- .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
759
- fill: ${n["cScale" + e]};
760
- }
761
- .section-${e - 1} text {
762
- fill: ${n["cScaleLabel" + e]};
763
- }
764
- .node-icon-${e - 1} {
765
- font-size: 40px;
766
- color: ${n["cScaleLabel" + e]};
767
- }
768
- .section-edge-${e - 1}{
769
- stroke: ${n["cScale" + e]};
770
- }
771
- .edge-depth-${e - 1}{
772
- stroke-width: ${s};
773
- }
774
- .section-${e - 1} line {
775
- stroke: ${n["cScaleInv" + e]} ;
776
- stroke-width: 3;
777
- }
778
-
779
- .lineWrapper line{
780
- stroke: ${n["cScaleLabel" + e]} ;
781
- }
782
-
783
- .disabled, .disabled circle, .disabled text {
784
- fill: lightgray;
785
- }
786
- .disabled text {
787
- fill: #efefef;
788
- }
789
- `;
790
- }
791
- return t;
792
- }, Zt = (n) => `
793
- .edge {
794
- stroke-width: 3;
795
- }
796
- ${Ut(n)}
797
- .section-root rect, .section-root path, .section-root circle {
798
- fill: ${n.git0};
799
- }
800
- .section-root text {
801
- fill: ${n.gitBranchLabel0};
802
- }
803
- .icon-container {
804
- height:100%;
805
- display: flex;
806
- justify-content: center;
807
- align-items: center;
808
- }
809
- .edge {
810
- fill: none;
811
- }
812
- .eventWrapper {
813
- filter: brightness(120%);
814
- }
815
- `, Jt = Zt, Yt = {
816
- db: Mt,
817
- renderer: qt,
818
- parser: $t,
819
- styles: Jt
820
- };
821
- export {
822
- Yt as diagram
823
- };