@digipair/skill-web-chatbot 0.91.0-0 → 0.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/SAP-icons.cjs.js +2489 -0
  2. package/SAP-icons.cjs2.js +2489 -0
  3. package/SAP-icons.esm.js +2482 -0
  4. package/SAP-icons.esm2.js +2482 -0
  5. package/Tableau10-558cc280.cjs.js +9 -0
  6. package/Tableau10-558cc280.esm.js +7 -0
  7. package/arc-d1f6357e.cjs.js +88 -0
  8. package/arc-d1f6357e.esm.js +86 -0
  9. package/array-2ff2c7a6.cjs.js +7 -0
  10. package/array-2ff2c7a6.esm.js +5 -0
  11. package/blockDiagram-5dc23a45.cjs.js +2921 -0
  12. package/blockDiagram-5dc23a45.esm.js +2919 -0
  13. package/c4Diagram-1e775db3.cjs.js +4387 -0
  14. package/c4Diagram-1e775db3.esm.js +4385 -0
  15. package/channel-ebbc4130.cjs.js +9 -0
  16. package/channel-ebbc4130.esm.js +7 -0
  17. package/classDiagram-f52caa06.cjs.js +209 -0
  18. package/classDiagram-f52caa06.esm.js +207 -0
  19. package/classDiagram-v2-640c694e.cjs.js +401 -0
  20. package/classDiagram-v2-640c694e.esm.js +399 -0
  21. package/clone-afc2f047.cjs.js +10 -0
  22. package/clone-afc2f047.esm.js +8 -0
  23. package/createText-03b82060.cjs.js +2936 -0
  24. package/createText-03b82060.esm.js +2933 -0
  25. package/edges-16357fde.cjs.js +1998 -0
  26. package/edges-16357fde.esm.js +1981 -0
  27. package/erDiagram-c7ff1bec.cjs.js +1807 -0
  28. package/erDiagram-c7ff1bec.esm.js +1805 -0
  29. package/flowDb-9a89ea33.cjs.js +5542 -0
  30. package/flowDb-9a89ea33.esm.js +5538 -0
  31. package/flowDiagram-aadb13b0.cjs.js +1351 -0
  32. package/flowDiagram-aadb13b0.esm.js +1349 -0
  33. package/flowDiagram-v2-f2119625.cjs.js +31 -0
  34. package/flowDiagram-v2-f2119625.esm.js +29 -0
  35. package/flowchart-elk-definition-cf813a97.cjs.js +50257 -0
  36. package/flowchart-elk-definition-cf813a97.esm.js +50255 -0
  37. package/ganttDiagram-3c2fde2b.cjs.js +3710 -0
  38. package/ganttDiagram-3c2fde2b.esm.js +3708 -0
  39. package/gitGraphDiagram-c3a0619c.cjs.js +3820 -0
  40. package/gitGraphDiagram-c3a0619c.esm.js +3818 -0
  41. package/graph-0ee63739.cjs.js +961 -0
  42. package/graph-0ee63739.esm.js +938 -0
  43. package/index-bb6d8841.cjs.js +648 -0
  44. package/index-bb6d8841.esm.js +646 -0
  45. package/index.cjs.d.ts +1 -0
  46. package/index.cjs.js +17 -0
  47. package/index.cjs2.js +60723 -0
  48. package/index.esm.js +1 -0
  49. package/index.esm2.js +60574 -0
  50. package/infoDiagram-2f5c50c0.cjs.js +460 -0
  51. package/infoDiagram-2f5c50c0.esm.js +458 -0
  52. package/init-f9637058.cjs.js +17 -0
  53. package/init-f9637058.esm.js +15 -0
  54. package/journeyDiagram-14fe341a.cjs.js +1061 -0
  55. package/journeyDiagram-14fe341a.esm.js +1059 -0
  56. package/katex-d90b6d29.cjs.js +25690 -0
  57. package/katex-d90b6d29.esm.js +25688 -0
  58. package/layout-fd473db2.cjs.js +1626 -0
  59. package/layout-fd473db2.esm.js +1619 -0
  60. package/libs/engine/src/index.d.ts +2 -0
  61. package/libs/engine/src/lib/alias.interface.d.ts +9 -0
  62. package/libs/engine/src/lib/engine.d.ts +13 -0
  63. package/libs/engine/src/lib/pins-settings.interface.d.ts +15 -0
  64. package/libs/skill-web-chatbot/src/lib/chat.element.d.ts +28 -0
  65. package/libs/skill-web-chatbot/src/lib/common.data.d.ts +1 -0
  66. package/libs/skill-web-chatbot/src/lib/config.d.ts +9 -0
  67. package/libs/skill-web-chatbot/src/lib/digipair-full.data.d.ts +1 -0
  68. package/libs/skill-web-chatbot/src/lib/digipair-full.element.d.ts +36 -0
  69. package/libs/skill-web-chatbot/src/lib/digipair.data.d.ts +1 -0
  70. package/libs/skill-web-chatbot/src/lib/digipair.element.d.ts +44 -0
  71. package/libs/skill-web-chatbot/src/lib/inputs.element.d.ts +10 -0
  72. package/libs/skill-web-chatbot/src/lib/message.interface.d.ts +10 -0
  73. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +1 -0
  74. package/libs/skill-web-chatbot/src/lib/tools/css-selector.d.ts +1 -0
  75. package/line-24d93f1b.cjs.js +34 -0
  76. package/line-24d93f1b.esm.js +32 -0
  77. package/linear-9bcf74c4.cjs.js +537 -0
  78. package/linear-9bcf74c4.esm.js +531 -0
  79. package/mindmap-definition-9399c7e6.cjs.js +20489 -0
  80. package/mindmap-definition-9399c7e6.esm.js +20487 -0
  81. package/ordinal-5695958c.cjs.js +331 -0
  82. package/ordinal-5695958c.esm.js +329 -0
  83. package/package.json +7 -22
  84. package/path-428ebac9.cjs.js +317 -0
  85. package/path-428ebac9.esm.js +314 -0
  86. package/pieDiagram-828dae43.cjs.js +951 -0
  87. package/pieDiagram-828dae43.esm.js +949 -0
  88. package/quadrantDiagram-5fa00455.cjs.js +2410 -0
  89. package/quadrantDiagram-5fa00455.esm.js +2408 -0
  90. package/requirementDiagram-03163dc4.cjs.js +2267 -0
  91. package/requirementDiagram-03163dc4.esm.js +2265 -0
  92. package/sankeyDiagram-52ec8976.cjs.js +1848 -0
  93. package/sankeyDiagram-52ec8976.esm.js +1846 -0
  94. package/sequenceDiagram-b517d154.cjs.js +5949 -0
  95. package/sequenceDiagram-b517d154.esm.js +5947 -0
  96. package/stateDiagram-fca82b5b.cjs.js +283 -0
  97. package/stateDiagram-fca82b5b.esm.js +281 -0
  98. package/stateDiagram-v2-ed04200a.cjs.js +373 -0
  99. package/stateDiagram-v2-ed04200a.esm.js +371 -0
  100. package/styles-11e81fdd.cjs.js +3944 -0
  101. package/styles-11e81fdd.esm.js +3940 -0
  102. package/styles-cacbff60.cjs.js +2120 -0
  103. package/styles-cacbff60.esm.js +2111 -0
  104. package/styles-e75131e4.cjs.js +671 -0
  105. package/styles-e75131e4.esm.js +661 -0
  106. package/svgDrawCommon-ecc5f780.cjs.js +68 -0
  107. package/svgDrawCommon-ecc5f780.esm.js +60 -0
  108. package/timeline-definition-4ee9bff4.cjs.js +1161 -0
  109. package/timeline-definition-4ee9bff4.esm.js +1159 -0
  110. package/xychartDiagram-e5e6b652.cjs.js +3150 -0
  111. package/xychartDiagram-e5e6b652.esm.js +3148 -0
  112. package/.swcrc +0 -28
  113. package/README.md +0 -7
  114. package/eslint.config.mjs +0 -22
  115. package/rollup.config.cjs +0 -28
  116. package/src/digipair__engine.d.ts +0 -2
  117. package/src/handlebars.d.ts +0 -1
  118. package/src/index.html +0 -18
  119. package/src/lib/chat.element.ts +0 -603
  120. package/src/lib/common.data.ts +0 -1
  121. package/src/lib/config.ts +0 -30
  122. package/src/lib/digipair-full.data.ts +0 -101
  123. package/src/lib/digipair-full.element.ts +0 -358
  124. package/src/lib/digipair.data.ts +0 -103
  125. package/src/lib/digipair.element.ts +0 -446
  126. package/src/lib/inputs.element.ts +0 -46
  127. package/src/lib/mermaid.d.ts +0 -1
  128. package/src/lib/message.interface.ts +0 -10
  129. package/src/lib/pins/chatbot.actions.ts +0 -32
  130. package/src/lib/tools/css-selector.ts +0 -12
  131. package/tsconfig.json +0 -13
  132. package/tsconfig.lib.json +0 -19
  133. /package/{src/index.d.ts → index.d.ts} +0 -0
  134. /package/{src/index.ts → libs/skill-web-chatbot/src/index.d.ts} +0 -0
  135. /package/{src/schema.fr.json → schema.fr.json} +0 -0
  136. /package/{src/schema.json → schema.json} +0 -0
@@ -0,0 +1,1159 @@
1
+ import { b5 as $_, j as B_, V as Vn, c as L, b as bt, k as k_, b6 as mi, b7 as F$1, b8 as E } from './index.esm2.js';
2
+ import { v as vn } from './arc-d1f6357e.esm.js';
3
+ import './path-428ebac9.esm.js';
4
+
5
+ function _array_like_to_array(arr, len) {
6
+ if (len == null || len > arr.length) len = arr.length;
7
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
8
+ return arr2;
9
+ }
10
+ function _array_with_holes(arr) {
11
+ if (Array.isArray(arr)) return arr;
12
+ }
13
+ function _array_without_holes(arr) {
14
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
15
+ }
16
+ function _instanceof(left, right) {
17
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
18
+ return !!right[Symbol.hasInstance](left);
19
+ } else {
20
+ return left instanceof right;
21
+ }
22
+ }
23
+ function _iterable_to_array(iter) {
24
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
25
+ }
26
+ function _iterable_to_array_limit(arr, i) {
27
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
28
+ if (_i == null) return;
29
+ var _arr = [];
30
+ var _n = true;
31
+ var _d = false;
32
+ var _s, _e;
33
+ try {
34
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
35
+ _arr.push(_s.value);
36
+ if (i && _arr.length === i) break;
37
+ }
38
+ } catch (err) {
39
+ _d = true;
40
+ _e = err;
41
+ } finally{
42
+ try {
43
+ if (!_n && _i["return"] != null) _i["return"]();
44
+ } finally{
45
+ if (_d) throw _e;
46
+ }
47
+ }
48
+ return _arr;
49
+ }
50
+ function _non_iterable_rest() {
51
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52
+ }
53
+ function _non_iterable_spread() {
54
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
55
+ }
56
+ function _sliced_to_array(arr, i) {
57
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
58
+ }
59
+ function _to_consumable_array(arr) {
60
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
61
+ }
62
+ function _type_of(obj) {
63
+ "@swc/helpers - typeof";
64
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
65
+ }
66
+ function _unsupported_iterable_to_array(o, minLen) {
67
+ if (!o) return;
68
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
69
+ var n = Object.prototype.toString.call(o).slice(8, -1);
70
+ if (n === "Object" && o.constructor) n = o.constructor.name;
71
+ if (n === "Map" || n === "Set") return Array.from(n);
72
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
73
+ }
74
+ var K = function() {
75
+ var n = function n(f, i, r, h) {
76
+ for(r = r || {}, h = f.length; h--; r[f[h]] = i);
77
+ return r;
78
+ }, t = [
79
+ 6,
80
+ 8,
81
+ 10,
82
+ 11,
83
+ 12,
84
+ 14,
85
+ 16,
86
+ 17,
87
+ 20,
88
+ 21
89
+ ], e = [
90
+ 1,
91
+ 9
92
+ ], a = [
93
+ 1,
94
+ 10
95
+ ], s = [
96
+ 1,
97
+ 11
98
+ ], c = [
99
+ 1,
100
+ 12
101
+ ], o = [
102
+ 1,
103
+ 13
104
+ ], y = [
105
+ 1,
106
+ 16
107
+ ], g = [
108
+ 1,
109
+ 17
110
+ ], u = {
111
+ trace: function trace() {},
112
+ yy: {},
113
+ symbols_: {
114
+ error: 2,
115
+ start: 3,
116
+ timeline: 4,
117
+ document: 5,
118
+ EOF: 6,
119
+ line: 7,
120
+ SPACE: 8,
121
+ statement: 9,
122
+ NEWLINE: 10,
123
+ title: 11,
124
+ acc_title: 12,
125
+ acc_title_value: 13,
126
+ acc_descr: 14,
127
+ acc_descr_value: 15,
128
+ acc_descr_multiline_value: 16,
129
+ section: 17,
130
+ period_statement: 18,
131
+ event_statement: 19,
132
+ period: 20,
133
+ event: 21,
134
+ $accept: 0,
135
+ $end: 1
136
+ },
137
+ terminals_: {
138
+ 2: "error",
139
+ 4: "timeline",
140
+ 6: "EOF",
141
+ 8: "SPACE",
142
+ 10: "NEWLINE",
143
+ 11: "title",
144
+ 12: "acc_title",
145
+ 13: "acc_title_value",
146
+ 14: "acc_descr",
147
+ 15: "acc_descr_value",
148
+ 16: "acc_descr_multiline_value",
149
+ 17: "section",
150
+ 20: "period",
151
+ 21: "event"
152
+ },
153
+ productions_: [
154
+ 0,
155
+ [
156
+ 3,
157
+ 3
158
+ ],
159
+ [
160
+ 5,
161
+ 0
162
+ ],
163
+ [
164
+ 5,
165
+ 2
166
+ ],
167
+ [
168
+ 7,
169
+ 2
170
+ ],
171
+ [
172
+ 7,
173
+ 1
174
+ ],
175
+ [
176
+ 7,
177
+ 1
178
+ ],
179
+ [
180
+ 7,
181
+ 1
182
+ ],
183
+ [
184
+ 9,
185
+ 1
186
+ ],
187
+ [
188
+ 9,
189
+ 2
190
+ ],
191
+ [
192
+ 9,
193
+ 2
194
+ ],
195
+ [
196
+ 9,
197
+ 1
198
+ ],
199
+ [
200
+ 9,
201
+ 1
202
+ ],
203
+ [
204
+ 9,
205
+ 1
206
+ ],
207
+ [
208
+ 9,
209
+ 1
210
+ ],
211
+ [
212
+ 18,
213
+ 1
214
+ ],
215
+ [
216
+ 19,
217
+ 1
218
+ ]
219
+ ],
220
+ performAction: function performAction(i, r, h, d, p, l, w) {
221
+ var x = l.length - 1;
222
+ switch(p){
223
+ case 1:
224
+ return l[x - 1];
225
+ case 2:
226
+ this.$ = [];
227
+ break;
228
+ case 3:
229
+ l[x - 1].push(l[x]), this.$ = l[x - 1];
230
+ break;
231
+ case 4:
232
+ case 5:
233
+ this.$ = l[x];
234
+ break;
235
+ case 6:
236
+ case 7:
237
+ this.$ = [];
238
+ break;
239
+ case 8:
240
+ d.getCommonDb().setDiagramTitle(l[x].substr(6)), this.$ = l[x].substr(6);
241
+ break;
242
+ case 9:
243
+ this.$ = l[x].trim(), d.getCommonDb().setAccTitle(this.$);
244
+ break;
245
+ case 10:
246
+ case 11:
247
+ this.$ = l[x].trim(), d.getCommonDb().setAccDescription(this.$);
248
+ break;
249
+ case 12:
250
+ d.addSection(l[x].substr(8)), this.$ = l[x].substr(8);
251
+ break;
252
+ case 15:
253
+ d.addTask(l[x], 0, ""), this.$ = l[x];
254
+ break;
255
+ case 16:
256
+ d.addEvent(l[x].substr(2)), this.$ = l[x];
257
+ break;
258
+ }
259
+ },
260
+ table: [
261
+ {
262
+ 3: 1,
263
+ 4: [
264
+ 1,
265
+ 2
266
+ ]
267
+ },
268
+ {
269
+ 1: [
270
+ 3
271
+ ]
272
+ },
273
+ n(t, [
274
+ 2,
275
+ 2
276
+ ], {
277
+ 5: 3
278
+ }),
279
+ {
280
+ 6: [
281
+ 1,
282
+ 4
283
+ ],
284
+ 7: 5,
285
+ 8: [
286
+ 1,
287
+ 6
288
+ ],
289
+ 9: 7,
290
+ 10: [
291
+ 1,
292
+ 8
293
+ ],
294
+ 11: e,
295
+ 12: a,
296
+ 14: s,
297
+ 16: c,
298
+ 17: o,
299
+ 18: 14,
300
+ 19: 15,
301
+ 20: y,
302
+ 21: g
303
+ },
304
+ n(t, [
305
+ 2,
306
+ 7
307
+ ], {
308
+ 1: [
309
+ 2,
310
+ 1
311
+ ]
312
+ }),
313
+ n(t, [
314
+ 2,
315
+ 3
316
+ ]),
317
+ {
318
+ 9: 18,
319
+ 11: e,
320
+ 12: a,
321
+ 14: s,
322
+ 16: c,
323
+ 17: o,
324
+ 18: 14,
325
+ 19: 15,
326
+ 20: y,
327
+ 21: g
328
+ },
329
+ n(t, [
330
+ 2,
331
+ 5
332
+ ]),
333
+ n(t, [
334
+ 2,
335
+ 6
336
+ ]),
337
+ n(t, [
338
+ 2,
339
+ 8
340
+ ]),
341
+ {
342
+ 13: [
343
+ 1,
344
+ 19
345
+ ]
346
+ },
347
+ {
348
+ 15: [
349
+ 1,
350
+ 20
351
+ ]
352
+ },
353
+ n(t, [
354
+ 2,
355
+ 11
356
+ ]),
357
+ n(t, [
358
+ 2,
359
+ 12
360
+ ]),
361
+ n(t, [
362
+ 2,
363
+ 13
364
+ ]),
365
+ n(t, [
366
+ 2,
367
+ 14
368
+ ]),
369
+ n(t, [
370
+ 2,
371
+ 15
372
+ ]),
373
+ n(t, [
374
+ 2,
375
+ 16
376
+ ]),
377
+ n(t, [
378
+ 2,
379
+ 4
380
+ ]),
381
+ n(t, [
382
+ 2,
383
+ 9
384
+ ]),
385
+ n(t, [
386
+ 2,
387
+ 10
388
+ ])
389
+ ],
390
+ defaultActions: {},
391
+ parseError: function parseError(i, r) {
392
+ if (r.recoverable) this.trace(i);
393
+ else {
394
+ var h = new Error(i);
395
+ throw h.hash = r, h;
396
+ }
397
+ },
398
+ parse: function parse(i) {
399
+ var r = this, h = [
400
+ 0
401
+ ], d = [], p = [
402
+ null
403
+ ], l = [], w = this.table, x = "", N = 0, A = 0, V = 2, U = 1, W = l.slice.call(arguments, 1), b = Object.create(this.lexer), S = {
404
+ yy: {}
405
+ };
406
+ for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy, _) && (S.yy[_] = this.yy[_]);
407
+ b.setInput(i, S.yy), S.yy.lexer = b, S.yy.parser = this, _type_of(b.yylloc) > "u" && (b.yylloc = {});
408
+ var I = b.yylloc;
409
+ l.push(I);
410
+ var P = b.options && b.options.ranges;
411
+ typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
412
+ function C() {
413
+ var M;
414
+ return M = d.pop() || b.lex() || U, typeof M != "number" && (_instanceof(M, Array) && (d = M, M = d.pop()), M = r.symbols_[M] || M), M;
415
+ }
416
+ for(var k, L, E, Z, z = {}, B, $, Y, O;;){
417
+ if (L = h[h.length - 1], this.defaultActions[L] ? E = this.defaultActions[L] : ((k === null || (typeof k === "undefined" ? "undefined" : _type_of(k)) > "u") && (k = C()), E = w[L] && w[L][k]), (typeof E === "undefined" ? "undefined" : _type_of(E)) > "u" || !E.length || !E[0]) {
418
+ var J = "";
419
+ O = [];
420
+ for(B in w[L])this.terminals_[B] && B > V && O.push("'" + this.terminals_[B] + "'");
421
+ b.showPosition ? J = "Parse error on line " + (N + 1) + ":\n" + b.showPosition() + "\nExpecting " + O.join(", ") + ", got '" + (this.terminals_[k] || k) + "'" : J = "Parse error on line " + (N + 1) + ": Unexpected " + (k == U ? "end of input" : "'" + (this.terminals_[k] || k) + "'"), this.parseError(J, {
422
+ text: b.match,
423
+ token: this.terminals_[k] || k,
424
+ line: b.yylineno,
425
+ loc: I,
426
+ expected: O
427
+ });
428
+ }
429
+ if (_instanceof(E[0], Array) && E.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + k);
430
+ switch(E[0]){
431
+ case 1:
432
+ h.push(k), p.push(b.yytext), l.push(b.yylloc), h.push(E[1]), k = null, A = b.yyleng, x = b.yytext, N = b.yylineno, I = b.yylloc;
433
+ break;
434
+ case 2:
435
+ if ($ = this.productions_[E[1]][1], z.$ = p[p.length - $], z._$ = {
436
+ first_line: l[l.length - ($ || 1)].first_line,
437
+ last_line: l[l.length - 1].last_line,
438
+ first_column: l[l.length - ($ || 1)].first_column,
439
+ last_column: l[l.length - 1].last_column
440
+ }, P && (z._$.range = [
441
+ l[l.length - ($ || 1)].range[0],
442
+ l[l.length - 1].range[1]
443
+ ]), Z = this.performAction.apply(z, [
444
+ x,
445
+ A,
446
+ N,
447
+ S.yy,
448
+ E[1],
449
+ p,
450
+ l
451
+ ].concat(W)), (typeof Z === "undefined" ? "undefined" : _type_of(Z)) < "u") return Z;
452
+ $ && (h = h.slice(0, -1 * $ * 2), p = p.slice(0, -1 * $), l = l.slice(0, -1 * $)), h.push(this.productions_[E[1]][0]), p.push(z.$), l.push(z._$), Y = w[h[h.length - 2]][h[h.length - 1]], h.push(Y);
453
+ break;
454
+ case 3:
455
+ return !0;
456
+ }
457
+ }
458
+ return !0;
459
+ }
460
+ }, m = function() {
461
+ var f = {
462
+ EOF: 1,
463
+ parseError: function parseError(r, h) {
464
+ if (this.yy.parser) this.yy.parser.parseError(r, h);
465
+ else throw new Error(r);
466
+ },
467
+ // resets the lexer, sets new input
468
+ setInput: function setInput(i, r) {
469
+ return this.yy = r || 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 = [
470
+ "INITIAL"
471
+ ], this.yylloc = {
472
+ first_line: 1,
473
+ first_column: 0,
474
+ last_line: 1,
475
+ last_column: 0
476
+ }, this.options.ranges && (this.yylloc.range = [
477
+ 0,
478
+ 0
479
+ ]), this.offset = 0, this;
480
+ },
481
+ // consumes and returns one char from the input
482
+ input: function input() {
483
+ var i = this._input[0];
484
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
485
+ var r = i.match(/(?:\r\n?|\n).*/g);
486
+ return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
487
+ },
488
+ // unshifts one char (or a string) into the input
489
+ unput: function unput(i) {
490
+ var r = i.length, h = i.split(/(?:\r\n?|\n)/g);
491
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
492
+ var d = this.match.split(/(?:\r\n?|\n)/g);
493
+ 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);
494
+ var p = this.yylloc.range;
495
+ return this.yylloc = {
496
+ first_line: this.yylloc.first_line,
497
+ last_line: this.yylineno + 1,
498
+ first_column: this.yylloc.first_column,
499
+ 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 - r
500
+ }, this.options.ranges && (this.yylloc.range = [
501
+ p[0],
502
+ p[0] + this.yyleng - r
503
+ ]), this.yyleng = this.yytext.length, this;
504
+ },
505
+ // When called from action, caches matched text and appends it on next action
506
+ more: function more() {
507
+ return this._more = !0, this;
508
+ },
509
+ // 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.
510
+ reject: function reject() {
511
+ if (this.options.backtrack_lexer) this._backtrack = !0;
512
+ else 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).\n" + this.showPosition(), {
513
+ text: "",
514
+ token: null,
515
+ line: this.yylineno
516
+ });
517
+ return this;
518
+ },
519
+ // retain first n characters of the match
520
+ less: function less(i) {
521
+ this.unput(this.match.slice(i));
522
+ },
523
+ // displays already matched input, i.e. for error messages
524
+ pastInput: function pastInput() {
525
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
526
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
527
+ },
528
+ // displays upcoming input, i.e. for error messages
529
+ upcomingInput: function upcomingInput() {
530
+ var i = this.match;
531
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
532
+ },
533
+ // displays the character position where the lexing error occurred, i.e. for error messages
534
+ showPosition: function showPosition() {
535
+ var i = this.pastInput(), r = new Array(i.length + 1).join("-");
536
+ return i + this.upcomingInput() + "\n" + r + "^";
537
+ },
538
+ // test the lexed token: return FALSE when not a match, otherwise return token
539
+ test_match: function test_match(i, r) {
540
+ var h, d, p;
541
+ if (this.options.backtrack_lexer && (p = {
542
+ yylineno: this.yylineno,
543
+ yylloc: {
544
+ first_line: this.yylloc.first_line,
545
+ last_line: this.last_line,
546
+ first_column: this.yylloc.first_column,
547
+ last_column: this.yylloc.last_column
548
+ },
549
+ yytext: this.yytext,
550
+ match: this.match,
551
+ matches: this.matches,
552
+ matched: this.matched,
553
+ yyleng: this.yyleng,
554
+ offset: this.offset,
555
+ _more: this._more,
556
+ _input: this._input,
557
+ yy: this.yy,
558
+ conditionStack: this.conditionStack.slice(0),
559
+ done: this.done
560
+ }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
561
+ first_line: this.yylloc.last_line,
562
+ last_line: this.yylineno + 1,
563
+ first_column: this.yylloc.last_column,
564
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
565
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [
566
+ this.offset,
567
+ this.offset += this.yyleng
568
+ ]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(i[0].length), this.matched += i[0], h = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h) return h;
569
+ if (this._backtrack) {
570
+ for(var l in p)this[l] = p[l];
571
+ return !1;
572
+ }
573
+ return !1;
574
+ },
575
+ // return next match in input
576
+ next: function next() {
577
+ if (this.done) return this.EOF;
578
+ this._input || (this.done = !0);
579
+ var i, r, h, d;
580
+ this._more || (this.yytext = "", this.match = "");
581
+ for(var p = this._currentRules(), l = 0; l < p.length; l++)if (h = this._input.match(this.rules[p[l]]), h && (!r || h[0].length > r[0].length)) {
582
+ if (r = h, d = l, this.options.backtrack_lexer) {
583
+ if (i = this.test_match(h, p[l]), i !== !1) return i;
584
+ if (this._backtrack) {
585
+ r = !1;
586
+ continue;
587
+ } else return !1;
588
+ } else if (!this.options.flex) break;
589
+ }
590
+ return r ? (i = this.test_match(r, p[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
591
+ text: "",
592
+ token: null,
593
+ line: this.yylineno
594
+ });
595
+ },
596
+ // return next match that has a token
597
+ lex: function lex() {
598
+ var r = this.next();
599
+ return r || this.lex();
600
+ },
601
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
602
+ begin: function begin(r) {
603
+ this.conditionStack.push(r);
604
+ },
605
+ // pop the previously active lexer condition state off the condition stack
606
+ popState: function popState() {
607
+ var r = this.conditionStack.length - 1;
608
+ return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
609
+ },
610
+ // produce the lexer rule set which is active for the currently active lexer condition state
611
+ _currentRules: function _currentRules() {
612
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
613
+ },
614
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
615
+ topState: function topState(r) {
616
+ return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
617
+ },
618
+ // alias for begin(condition)
619
+ pushState: function pushState(r) {
620
+ this.begin(r);
621
+ },
622
+ // return the number of states currently on the stack
623
+ stateStackSize: function stateStackSize() {
624
+ return this.conditionStack.length;
625
+ },
626
+ options: {
627
+ "case-insensitive": !0
628
+ },
629
+ performAction: function performAction(r, h, d, p) {
630
+ switch(d){
631
+ case 0:
632
+ break;
633
+ case 1:
634
+ break;
635
+ case 2:
636
+ return 10;
637
+ case 3:
638
+ break;
639
+ case 4:
640
+ break;
641
+ case 5:
642
+ return 4;
643
+ case 6:
644
+ return 11;
645
+ case 7:
646
+ return this.begin("acc_title"), 12;
647
+ case 8:
648
+ return this.popState(), "acc_title_value";
649
+ case 9:
650
+ return this.begin("acc_descr"), 14;
651
+ case 10:
652
+ return this.popState(), "acc_descr_value";
653
+ case 11:
654
+ this.begin("acc_descr_multiline");
655
+ break;
656
+ case 12:
657
+ this.popState();
658
+ break;
659
+ case 13:
660
+ return "acc_descr_multiline_value";
661
+ case 14:
662
+ return 17;
663
+ case 15:
664
+ return 21;
665
+ case 16:
666
+ return 20;
667
+ case 17:
668
+ return 6;
669
+ case 18:
670
+ return "INVALID";
671
+ }
672
+ },
673
+ rules: [
674
+ /^(?:%(?!\{)[^\n]*)/i,
675
+ /^(?:[^\}]%%[^\n]*)/i,
676
+ /^(?:[\n]+)/i,
677
+ /^(?:\s+)/i,
678
+ /^(?:#[^\n]*)/i,
679
+ /^(?:timeline\b)/i,
680
+ /^(?:title\s[^#\n;]+)/i,
681
+ /^(?:accTitle\s*:\s*)/i,
682
+ /^(?:(?!\n||)*[^\n]*)/i,
683
+ /^(?:accDescr\s*:\s*)/i,
684
+ /^(?:(?!\n||)*[^\n]*)/i,
685
+ /^(?:accDescr\s*\{\s*)/i,
686
+ /^(?:[\}])/i,
687
+ /^(?:[^\}]*)/i,
688
+ /^(?:section\s[^#:\n;]+)/i,
689
+ /^(?::\s[^#:\n;]+)/i,
690
+ /^(?:[^#:\n;]+)/i,
691
+ /^(?:$)/i,
692
+ /^(?:.)/i
693
+ ],
694
+ conditions: {
695
+ acc_descr_multiline: {
696
+ rules: [
697
+ 12,
698
+ 13
699
+ ],
700
+ inclusive: !1
701
+ },
702
+ acc_descr: {
703
+ rules: [
704
+ 10
705
+ ],
706
+ inclusive: !1
707
+ },
708
+ acc_title: {
709
+ rules: [
710
+ 8
711
+ ],
712
+ inclusive: !1
713
+ },
714
+ INITIAL: {
715
+ rules: [
716
+ 0,
717
+ 1,
718
+ 2,
719
+ 3,
720
+ 4,
721
+ 5,
722
+ 6,
723
+ 7,
724
+ 9,
725
+ 11,
726
+ 14,
727
+ 15,
728
+ 16,
729
+ 17,
730
+ 18
731
+ ],
732
+ inclusive: !0
733
+ }
734
+ }
735
+ };
736
+ return f;
737
+ }();
738
+ u.lexer = m;
739
+ function v() {
740
+ this.yy = {};
741
+ }
742
+ return v.prototype = u, u.Parser = v, new v();
743
+ }();
744
+ K.parser = K;
745
+ var vt = K;
746
+ var R = "", st = 0;
747
+ var Q = [], G = [], F = [], it = function() {
748
+ return $_;
749
+ }, rt = function rt() {
750
+ Q.length = 0, G.length = 0, R = "", F.length = 0, B_();
751
+ }, at = function at(n) {
752
+ R = n, Q.push(n);
753
+ }, lt = function lt() {
754
+ return Q;
755
+ }, ot = function ot() {
756
+ var _G;
757
+ var n = tt();
758
+ var t = 100;
759
+ var e = 0;
760
+ for(; !n && e < t;)n = tt(), e++;
761
+ return (_G = G).push.apply(_G, _to_consumable_array(F)), G;
762
+ }, ct = function ct(n, t, e) {
763
+ var a = {
764
+ id: st++,
765
+ section: R,
766
+ type: R,
767
+ task: n,
768
+ score: t || 0,
769
+ //if event is defined, then add it the events array
770
+ events: e ? [
771
+ e
772
+ ] : []
773
+ };
774
+ F.push(a);
775
+ }, ht = function ht(n) {
776
+ F.find(function(e) {
777
+ return e.id === st - 1;
778
+ }).events.push(n);
779
+ }, dt = function dt(n) {
780
+ var t = {
781
+ section: R,
782
+ type: R,
783
+ description: n,
784
+ task: n,
785
+ classes: []
786
+ };
787
+ G.push(t);
788
+ }, tt = function tt() {
789
+ var n = function n(e) {
790
+ return F[e].processed;
791
+ };
792
+ var t = !0;
793
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
794
+ try {
795
+ for(var _iterator = F.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
796
+ var _step_value = _sliced_to_array(_step.value, 2), e = _step_value[0], a = _step_value[1];
797
+ n(e), t = t && a.processed;
798
+ }
799
+ } catch (err) {
800
+ _didIteratorError = true;
801
+ _iteratorError = err;
802
+ } finally{
803
+ try {
804
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
805
+ _iterator.return();
806
+ }
807
+ } finally{
808
+ if (_didIteratorError) {
809
+ throw _iteratorError;
810
+ }
811
+ }
812
+ }
813
+ return t;
814
+ }, wt = {
815
+ clear: rt,
816
+ getCommonDb: it,
817
+ addSection: at,
818
+ getSections: lt,
819
+ getTasks: ot,
820
+ addTask: ct,
821
+ addTaskOrg: dt,
822
+ addEvent: ht
823
+ }, St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
824
+ __proto__: null,
825
+ addEvent: ht,
826
+ addSection: at,
827
+ addTask: ct,
828
+ addTaskOrg: dt,
829
+ clear: rt,
830
+ default: wt,
831
+ getCommonDb: it,
832
+ getSections: lt,
833
+ getTasks: ot
834
+ }, Symbol.toStringTag, {
835
+ value: "Module"
836
+ })), Et = 12, q = function q(n, t) {
837
+ var e = n.append("rect");
838
+ 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;
839
+ }, Tt = function Tt(n, t) {
840
+ var a = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), s = n.append("g");
841
+ s.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"), s.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");
842
+ function c(g) {
843
+ var u = vn().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
844
+ g.append("path").attr("class", "mouth").attr("d", u).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
845
+ }
846
+ function o(g) {
847
+ var u = vn().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
848
+ g.append("path").attr("class", "mouth").attr("d", u).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
849
+ }
850
+ function y(g) {
851
+ g.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");
852
+ }
853
+ return t.score > 3 ? c(s) : t.score < 3 ? o(s) : y(s), a;
854
+ }, It = function It(n, t) {
855
+ var e = n.append("circle");
856
+ 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;
857
+ }, ut = function ut(n, t) {
858
+ var e = t.text.replace(/<br\s*\/?>/gi, " "), a = n.append("text");
859
+ 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);
860
+ var s = a.append("tspan");
861
+ return s.attr("x", t.x + t.textMargin * 2), s.text(e), a;
862
+ }, Nt = function Nt(n, t) {
863
+ function e(s, c, o, y, g) {
864
+ return s + "," + c + " " + (s + o) + "," + c + " " + (s + o) + "," + (c + y - g) + " " + (s + o - g * 1.2) + "," + (c + y) + " " + s + "," + (c + y);
865
+ }
866
+ var a = n.append("polygon");
867
+ 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, ut(n, t);
868
+ }, $t = function $t(n, t, e) {
869
+ var a = n.append("g"), s = X();
870
+ 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, q(a, s), pt(e)(t.text, a, s.x, s.y, s.width, s.height, {
871
+ class: "journey-section section-type-" + t.num
872
+ }, e, t.colour);
873
+ };
874
+ var et = -1;
875
+ var Mt = function Mt(n, t, e) {
876
+ var a = t.x + e.width / 2, s = n.append("g");
877
+ et++;
878
+ var c = 300 + 5 * 30;
879
+ s.append("line").attr("id", "task" + et).attr("x1", a).attr("y1", t.y).attr("x2", a).attr("y2", c).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Tt(s, {
880
+ cx: a,
881
+ cy: 300 + (5 - t.score) * 30,
882
+ score: t.score
883
+ });
884
+ var o = X();
885
+ 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, q(s, o), t.x + 14, pt(e)(t.task, s, o.x, o.y, o.width, o.height, {
886
+ class: "task"
887
+ }, e, t.colour);
888
+ }, Lt = function Lt(n, t) {
889
+ q(n, {
890
+ x: t.startx,
891
+ y: t.starty,
892
+ width: t.stopx - t.startx,
893
+ height: t.stopy - t.starty,
894
+ fill: t.fill,
895
+ class: "rect"
896
+ }).lower();
897
+ }, At = function At() {
898
+ return {
899
+ x: 0,
900
+ y: 0,
901
+ fill: void 0,
902
+ "text-anchor": "start",
903
+ width: 100,
904
+ height: 100,
905
+ textMargin: 0,
906
+ rx: 0,
907
+ ry: 0
908
+ };
909
+ }, X = function X() {
910
+ return {
911
+ x: 0,
912
+ y: 0,
913
+ width: 100,
914
+ anchor: "start",
915
+ height: 100,
916
+ rx: 0,
917
+ ry: 0
918
+ };
919
+ }, pt = function() {
920
+ function n(s, c, o, y, g, u, m, v) {
921
+ var f = c.append("text").attr("x", o + g / 2).attr("y", y + u / 2 + 5).style("font-color", v).style("text-anchor", "middle").text(s);
922
+ a(f, m);
923
+ }
924
+ function t(s, c, o, y, g, u, m, v, f) {
925
+ var i = v.taskFontSize, r = v.taskFontFamily, h = s.split(/<br\s*\/?>/gi);
926
+ for(var d = 0; d < h.length; d++){
927
+ var p = d * i - i * (h.length - 1) / 2, l = c.append("text").attr("x", o + g / 2).attr("y", y).attr("fill", f).style("text-anchor", "middle").style("font-size", i).style("font-family", r);
928
+ l.append("tspan").attr("x", o + g / 2).attr("dy", p).text(h[d]), l.attr("y", y + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(l, m);
929
+ }
930
+ }
931
+ function e(s, c, o, y, g, u, m, v) {
932
+ var f = c.append("switch"), r = f.append("foreignObject").attr("x", o).attr("y", y).attr("width", g).attr("height", u).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
933
+ r.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), t(s, f, o, y, g, u, m, v), a(r, m);
934
+ }
935
+ function a(s, c) {
936
+ for(var o in c)o in c && s.attr(o, c[o]);
937
+ }
938
+ return function(s) {
939
+ return s.textPlacement === "fo" ? e : s.textPlacement === "old" ? n : t;
940
+ };
941
+ }(), Pt = function Pt(n) {
942
+ 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");
943
+ };
944
+ function yt(n, t) {
945
+ n.each(function() {
946
+ var e = bt(this), a = e.text().split(/(\s+|<br>)/).reverse(), s, c = [], o = 1.1, y = e.attr("y"), g = parseFloat(e.attr("dy")), u = e.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", g + "em");
947
+ for(var m = 0; m < a.length; m++)s = a[a.length - 1 - m], c.push(s), u.text(c.join(" ").trim()), (u.node().getComputedTextLength() > t || s === "<br>") && (c.pop(), u.text(c.join(" ").trim()), s === "<br>" ? c = [
948
+ ""
949
+ ] : c = [
950
+ s
951
+ ], u = e.append("tspan").attr("x", 0).attr("y", y).attr("dy", o + "em").text(s));
952
+ });
953
+ }
954
+ var Ht = function Ht(n, t, e, a) {
955
+ var s = e % Et - 1, c = n.append("g");
956
+ t.section = s, c.attr("class", (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + s));
957
+ var o = c.append("g"), y = c.append("g"), u = y.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), m = a.fontSize && a.fontSize.replace ? a.fontSize.replace("px", "") : a.fontSize;
958
+ return t.height = u.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 + ")"), zt(o, t, s), t;
959
+ }, Ct = function Ct(n, t, e) {
960
+ var a = n.append("g"), c = a.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), o = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize;
961
+ return a.remove(), c.height + o * 1.1 * 0.5 + t.padding;
962
+ }, zt = function zt(n, t, e) {
963
+ n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr("d", "M0 ".concat(t.height - 5, " v").concat(-t.height + 2 * 5, " q0,-5 5,-5 h").concat(t.width - 2 * 5, " q5,0 5,5 v").concat(t.height - 5, " H0 Z")), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
964
+ }, H = {
965
+ drawRect: q,
966
+ drawCircle: It,
967
+ drawSection: $t,
968
+ drawText: ut,
969
+ drawLabel: Nt,
970
+ drawTask: Mt,
971
+ drawBackgroundRect: Lt,
972
+ getTextObj: At,
973
+ getNoteRect: X,
974
+ initGraphics: Pt,
975
+ drawNode: Ht,
976
+ getVirtualNodeHeight: Ct
977
+ }, Rt = function Rt(n, t, e, a) {
978
+ var W, b;
979
+ var _s_leftMargin;
980
+ var s = Vn(), c = (_s_leftMargin = s.leftMargin) !== null && _s_leftMargin !== void 0 ? _s_leftMargin : 50;
981
+ L.debug("timeline", a.db);
982
+ var o = s.securityLevel;
983
+ var y;
984
+ o === "sandbox" && (y = bt("#i" + t));
985
+ var u = (o === "sandbox" ? bt(y.nodes()[0].contentDocument.body) : bt("body")).select("#" + t);
986
+ u.append("g");
987
+ var m = a.db.getTasks(), v = a.db.getCommonDb().getDiagramTitle();
988
+ L.debug("task", m), H.initGraphics(u);
989
+ var f = a.db.getSections();
990
+ L.debug("sections", f);
991
+ var i = 0, r = 0, h = 0, d = 0, p = 50 + c, l = 50;
992
+ d = 50;
993
+ var w = 0, x = !0;
994
+ f.forEach(function(S) {
995
+ var _ = {
996
+ number: w,
997
+ descr: S,
998
+ section: w,
999
+ width: 150,
1000
+ padding: 20,
1001
+ maxHeight: i
1002
+ }, I = H.getVirtualNodeHeight(u, _, s);
1003
+ L.debug("sectionHeight before draw", I), i = Math.max(i, I + 20);
1004
+ });
1005
+ var N = 0, A = 0;
1006
+ L.debug("tasks.length", m.length);
1007
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1008
+ try {
1009
+ for(var _iterator = m.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1010
+ var _step_value = _sliced_to_array(_step.value, 2), S = _step_value[0], _ = _step_value[1];
1011
+ var I = {
1012
+ number: S,
1013
+ descr: _,
1014
+ section: _.section,
1015
+ width: 150,
1016
+ padding: 20,
1017
+ maxHeight: r
1018
+ }, P = H.getVirtualNodeHeight(u, I, s);
1019
+ L.debug("taskHeight before draw", P), r = Math.max(r, P + 20), N = Math.max(N, _.events.length);
1020
+ var C = 0;
1021
+ for(var k = 0; k < _.events.length; k++){
1022
+ var E = {
1023
+ descr: _.events[k],
1024
+ section: _.section,
1025
+ number: _.section,
1026
+ width: 150,
1027
+ padding: 20,
1028
+ maxHeight: 50
1029
+ };
1030
+ C += H.getVirtualNodeHeight(u, E, s);
1031
+ }
1032
+ A = Math.max(A, C);
1033
+ }
1034
+ } catch (err) {
1035
+ _didIteratorError = true;
1036
+ _iteratorError = err;
1037
+ } finally{
1038
+ try {
1039
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1040
+ _iterator.return();
1041
+ }
1042
+ } finally{
1043
+ if (_didIteratorError) {
1044
+ throw _iteratorError;
1045
+ }
1046
+ }
1047
+ }
1048
+ L.debug("maxSectionHeight before draw", i), L.debug("maxTaskHeight before draw", r), f && f.length > 0 ? f.forEach(function(S) {
1049
+ var _ = m.filter(function(k) {
1050
+ return k.section === S;
1051
+ }), I = {
1052
+ number: w,
1053
+ descr: S,
1054
+ section: w,
1055
+ width: 200 * Math.max(_.length, 1) - 50,
1056
+ padding: 20,
1057
+ maxHeight: i
1058
+ };
1059
+ L.debug("sectionNode", I);
1060
+ var P = u.append("g"), C = H.drawNode(P, I, w, s);
1061
+ L.debug("sectionNode output", C), P.attr("transform", "translate(".concat(p, ", ").concat(d, ")")), l += i + 50, _.length > 0 && nt(u, _, w, p, l, r, s, N, A, i, !1), p += 200 * Math.max(_.length, 1), l = d, w++;
1062
+ }) : (x = !1, nt(u, m, w, p, l, r, s, N, A, i, !0));
1063
+ var V = u.node().getBBox();
1064
+ var _ref, _ref1;
1065
+ L.debug("bounds", V), v && u.append("text").text(v).attr("x", V.width / 2 - c).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), h = x ? i + r + 150 : r + 100, u.append("g").attr("class", "lineWrapper").append("line").attr("x1", c).attr("y1", h).attr("x2", V.width + 3 * c).attr("y2", h).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), k_(void 0, u, (_ref = (W = s.timeline) == null ? void 0 : W.padding) !== null && _ref !== void 0 ? _ref : 50, (_ref1 = (b = s.timeline) == null ? void 0 : b.useMaxWidth) !== null && _ref1 !== void 0 ? _ref1 : !1);
1066
+ }, nt = function nt(n, t, e, a, s, c, o, y, g, u, m) {
1067
+ var v;
1068
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1069
+ try {
1070
+ for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1071
+ var f = _step.value;
1072
+ var i = {
1073
+ descr: f.task,
1074
+ section: e,
1075
+ number: e,
1076
+ width: 150,
1077
+ padding: 20,
1078
+ maxHeight: c
1079
+ };
1080
+ L.debug("taskNode", i);
1081
+ var r = n.append("g").attr("class", "taskWrapper"), d = H.drawNode(r, i, e, o).height;
1082
+ if (L.debug("taskHeight after draw", d), r.attr("transform", "translate(".concat(a, ", ").concat(s, ")")), c = Math.max(c, d), f.events) {
1083
+ var p = n.append("g").attr("class", "lineWrapper");
1084
+ var l = c;
1085
+ s += 100, l = l + Ft(n, f.events, e, a, s, o), s -= 100, p.append("line").attr("x1", a + 190 / 2).attr("y1", s + c).attr("x2", a + 190 / 2).attr("y2", s + c + (m ? c : u) + g + 120).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
1086
+ }
1087
+ a = a + 200, m && !((v = o.timeline) != null && v.disableMulticolor) && e++;
1088
+ }
1089
+ } catch (err) {
1090
+ _didIteratorError = true;
1091
+ _iteratorError = err;
1092
+ } finally{
1093
+ try {
1094
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1095
+ _iterator.return();
1096
+ }
1097
+ } finally{
1098
+ if (_didIteratorError) {
1099
+ throw _iteratorError;
1100
+ }
1101
+ }
1102
+ }
1103
+ s = s - 10;
1104
+ }, Ft = function Ft(n, t, e, a, s, c) {
1105
+ var o = 0;
1106
+ var y = s;
1107
+ s = s + 100;
1108
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1109
+ try {
1110
+ for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1111
+ var g = _step.value;
1112
+ var u = {
1113
+ descr: g,
1114
+ section: e,
1115
+ number: e,
1116
+ width: 150,
1117
+ padding: 20,
1118
+ maxHeight: 50
1119
+ };
1120
+ L.debug("eventNode", u);
1121
+ var m = n.append("g").attr("class", "eventWrapper"), f = H.drawNode(m, u, e, c).height;
1122
+ o = o + f, m.attr("transform", "translate(".concat(a, ", ").concat(s, ")")), s = s + 10 + f;
1123
+ }
1124
+ } catch (err) {
1125
+ _didIteratorError = true;
1126
+ _iteratorError = err;
1127
+ } finally{
1128
+ try {
1129
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1130
+ _iterator.return();
1131
+ }
1132
+ } finally{
1133
+ if (_didIteratorError) {
1134
+ throw _iteratorError;
1135
+ }
1136
+ }
1137
+ }
1138
+ return s = y, o;
1139
+ }, Vt = {
1140
+ setConf: function() {},
1141
+ draw: Rt
1142
+ }, Wt = function(n) {
1143
+ var t = "";
1144
+ for(var e = 0; e < n.THEME_COLOR_LIMIT; e++)n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], mi(n["lineColor" + e]) ? n["lineColor" + e] = F$1(n["lineColor" + e], 20) : n["lineColor" + e] = E(n["lineColor" + e], 20);
1145
+ for(var e1 = 0; e1 < n.THEME_COLOR_LIMIT; e1++){
1146
+ var a = "" + (17 - 3 * e1);
1147
+ t += "\n .section-".concat(e1 - 1, " rect, .section-").concat(e1 - 1, " path, .section-").concat(e1 - 1, " circle, .section-").concat(e1 - 1, " path {\n fill: ").concat(n["cScale" + e1], ";\n }\n .section-").concat(e1 - 1, " text {\n fill: ").concat(n["cScaleLabel" + e1], ";\n }\n .node-icon-").concat(e1 - 1, " {\n font-size: 40px;\n color: ").concat(n["cScaleLabel" + e1], ";\n }\n .section-edge-").concat(e1 - 1, "{\n stroke: ").concat(n["cScale" + e1], ";\n }\n .edge-depth-").concat(e1 - 1, "{\n stroke-width: ").concat(a, ";\n }\n .section-").concat(e1 - 1, " line {\n stroke: ").concat(n["cScaleInv" + e1], " ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ").concat(n["cScaleLabel" + e1], " ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n ");
1148
+ }
1149
+ return t;
1150
+ }, Bt = function(n) {
1151
+ return "\n .edge {\n stroke-width: 3;\n }\n ".concat(Wt(n), "\n .section-root rect, .section-root path, .section-root circle {\n fill: ").concat(n.git0, ";\n }\n .section-root text {\n fill: ").concat(n.gitBranchLabel0, ";\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n");
1152
+ }, Ot = Bt, Ut = {
1153
+ db: St,
1154
+ renderer: Vt,
1155
+ parser: vt,
1156
+ styles: Ot
1157
+ };
1158
+
1159
+ export { Ut as diagram };