@digipair/skill-web-chatbot 0.8.37 → 0.8.40

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 (129) hide show
  1. package/Tableau10-558cc280.cjs.js +9 -0
  2. package/Tableau10-558cc280.esm.js +7 -0
  3. package/arc-d1f6357e.cjs.js +88 -0
  4. package/arc-d1f6357e.esm.js +86 -0
  5. package/blockDiagram-5dc23a45.cjs.js +2921 -0
  6. package/blockDiagram-5dc23a45.esm.js +2919 -0
  7. package/{c4Diagram-1bdb45a8.cjs.js → c4Diagram-1e775db3.cjs.js} +1904 -2130
  8. package/{c4Diagram-1bdb45a8.esm.js → c4Diagram-1e775db3.esm.js} +1906 -2132
  9. package/channel-ebbc4130.cjs.js +9 -0
  10. package/channel-ebbc4130.esm.js +7 -0
  11. package/classDiagram-f52caa06.cjs.js +209 -0
  12. package/classDiagram-f52caa06.esm.js +207 -0
  13. package/{classDiagram-v2-6dc3b9c3.cjs.js → classDiagram-v2-640c694e.cjs.js} +74 -76
  14. package/{classDiagram-v2-6dc3b9c3.esm.js → classDiagram-v2-640c694e.esm.js} +75 -77
  15. package/clone-afc2f047.cjs.js +10 -0
  16. package/clone-afc2f047.esm.js +8 -0
  17. package/createText-03b82060.cjs.js +2936 -0
  18. package/createText-03b82060.esm.js +2933 -0
  19. package/edges-16357fde.cjs.js +1998 -0
  20. package/edges-16357fde.esm.js +1981 -0
  21. package/erDiagram-c7ff1bec.cjs.js +1807 -0
  22. package/erDiagram-c7ff1bec.esm.js +1805 -0
  23. package/flowDb-9a89ea33.cjs.js +5542 -0
  24. package/flowDb-9a89ea33.esm.js +5538 -0
  25. package/flowDiagram-aadb13b0.cjs.js +1351 -0
  26. package/flowDiagram-aadb13b0.esm.js +1349 -0
  27. package/flowDiagram-v2-f2119625.cjs.js +31 -0
  28. package/flowDiagram-v2-f2119625.esm.js +29 -0
  29. package/flowchart-elk-definition-cf813a97.cjs.js +50257 -0
  30. package/flowchart-elk-definition-cf813a97.esm.js +50255 -0
  31. package/ganttDiagram-3c2fde2b.cjs.js +3710 -0
  32. package/ganttDiagram-3c2fde2b.esm.js +3708 -0
  33. package/{gitGraphDiagram-c3fe571f.cjs.js → gitGraphDiagram-c3a0619c.cjs.js} +1608 -1651
  34. package/{gitGraphDiagram-c3fe571f.esm.js → gitGraphDiagram-c3a0619c.esm.js} +1609 -1652
  35. package/graph-0ee63739.cjs.js +961 -0
  36. package/graph-0ee63739.esm.js +938 -0
  37. package/index-bb6d8841.cjs.js +648 -0
  38. package/index-bb6d8841.esm.js +646 -0
  39. package/index.cjs2.js +5410 -4623
  40. package/index.esm.js +1 -1
  41. package/index.esm2.js +5291 -4527
  42. package/{infoDiagram-9c10eab1.cjs.js → infoDiagram-2f5c50c0.cjs.js} +63 -70
  43. package/{infoDiagram-9c10eab1.esm.js → infoDiagram-2f5c50c0.esm.js} +64 -71
  44. package/journeyDiagram-14fe341a.cjs.js +1061 -0
  45. package/journeyDiagram-14fe341a.esm.js +1059 -0
  46. package/katex-d90b6d29.cjs.js +25690 -0
  47. package/katex-d90b6d29.esm.js +25688 -0
  48. package/layout-fd473db2.cjs.js +1626 -0
  49. package/layout-fd473db2.esm.js +1619 -0
  50. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +0 -2
  51. package/line-24d93f1b.cjs.js +34 -0
  52. package/line-24d93f1b.esm.js +32 -0
  53. package/linear-9bcf74c4.cjs.js +537 -0
  54. package/linear-9bcf74c4.esm.js +531 -0
  55. package/{mindmap-definition-a9d0f378.cjs.js → mindmap-definition-9399c7e6.cjs.js} +7874 -7610
  56. package/{mindmap-definition-a9d0f378.esm.js → mindmap-definition-9399c7e6.esm.js} +7875 -7611
  57. package/package.json +1 -1
  58. package/path-428ebac9.cjs.js +317 -0
  59. package/path-428ebac9.esm.js +314 -0
  60. package/pieDiagram-828dae43.cjs.js +951 -0
  61. package/pieDiagram-828dae43.esm.js +949 -0
  62. package/{quadrantDiagram-1763608a.cjs.js → quadrantDiagram-5fa00455.cjs.js} +1117 -1340
  63. package/{quadrantDiagram-1763608a.esm.js → quadrantDiagram-5fa00455.esm.js} +1118 -1341
  64. package/{requirementDiagram-779d93b3.cjs.js → requirementDiagram-03163dc4.cjs.js} +1044 -1228
  65. package/{requirementDiagram-779d93b3.esm.js → requirementDiagram-03163dc4.esm.js} +1045 -1229
  66. package/{sankeyDiagram-86a66bae.cjs.js → sankeyDiagram-52ec8976.cjs.js} +337 -339
  67. package/{sankeyDiagram-86a66bae.esm.js → sankeyDiagram-52ec8976.esm.js} +338 -340
  68. package/sequenceDiagram-b517d154.cjs.js +5949 -0
  69. package/sequenceDiagram-b517d154.esm.js +5947 -0
  70. package/{stateDiagram-6f4bb19d.cjs.js → stateDiagram-fca82b5b.cjs.js} +62 -61
  71. package/{stateDiagram-6f4bb19d.esm.js → stateDiagram-fca82b5b.esm.js} +65 -64
  72. package/{stateDiagram-v2-d72c79bd.cjs.js → stateDiagram-v2-ed04200a.cjs.js} +96 -100
  73. package/{stateDiagram-v2-d72c79bd.esm.js → stateDiagram-v2-ed04200a.esm.js} +98 -102
  74. package/{styles-659d7242.cjs.js → styles-11e81fdd.cjs.js} +1990 -1965
  75. package/{styles-659d7242.esm.js → styles-11e81fdd.esm.js} +1989 -1964
  76. package/{styles-3fb7b9cf.cjs.js → styles-cacbff60.cjs.js} +935 -1192
  77. package/{styles-3fb7b9cf.esm.js → styles-cacbff60.esm.js} +929 -1186
  78. package/styles-e75131e4.cjs.js +671 -0
  79. package/styles-e75131e4.esm.js +661 -0
  80. package/svgDrawCommon-ecc5f780.cjs.js +68 -0
  81. package/svgDrawCommon-ecc5f780.esm.js +60 -0
  82. package/timeline-definition-4ee9bff4.cjs.js +1161 -0
  83. package/timeline-definition-4ee9bff4.esm.js +1159 -0
  84. package/xychartDiagram-e5e6b652.cjs.js +3150 -0
  85. package/xychartDiagram-e5e6b652.esm.js +3148 -0
  86. package/arc-da8fd8d8.cjs.js +0 -88
  87. package/arc-da8fd8d8.esm.js +0 -86
  88. package/classDiagram-185c1a10.cjs.js +0 -96
  89. package/classDiagram-185c1a10.esm.js +0 -94
  90. package/constant-2fe7eae5.cjs.js +0 -58
  91. package/constant-2fe7eae5.esm.js +0 -55
  92. package/createText-94e3ebbf.cjs.js +0 -2775
  93. package/createText-94e3ebbf.esm.js +0 -2773
  94. package/edges-558884ee.cjs.js +0 -1450
  95. package/edges-558884ee.esm.js +0 -1436
  96. package/erDiagram-97139f44.cjs.js +0 -1949
  97. package/erDiagram-97139f44.esm.js +0 -1947
  98. package/flowDb-a4faf166.cjs.js +0 -6918
  99. package/flowDb-a4faf166.esm.js +0 -6914
  100. package/flowDiagram-ccbbb58d.cjs.js +0 -999
  101. package/flowDiagram-ccbbb58d.esm.js +0 -997
  102. package/flowDiagram-v2-79ccd6da.cjs.js +0 -29
  103. package/flowDiagram-v2-79ccd6da.esm.js +0 -27
  104. package/flowchart-elk-definition-7863a61f.cjs.js +0 -48577
  105. package/flowchart-elk-definition-7863a61f.esm.js +0 -48575
  106. package/ganttDiagram-3eff0dd8.cjs.js +0 -3855
  107. package/ganttDiagram-3eff0dd8.esm.js +0 -3853
  108. package/index-d0b453e2.cjs.js +0 -609
  109. package/index-d0b453e2.esm.js +0 -607
  110. package/journeyDiagram-b6904cec.cjs.js +0 -1292
  111. package/journeyDiagram-b6904cec.esm.js +0 -1290
  112. package/layout-c5a37d74.cjs.js +0 -2808
  113. package/layout-c5a37d74.esm.js +0 -2795
  114. package/line-ce5d1152.cjs.js +0 -34
  115. package/line-ce5d1152.esm.js +0 -32
  116. package/linear-db016d0c.cjs.js +0 -485
  117. package/linear-db016d0c.esm.js +0 -479
  118. package/pieDiagram-fd367f1f.cjs.js +0 -1157
  119. package/pieDiagram-fd367f1f.esm.js +0 -1155
  120. package/sequenceDiagram-169f11ec.cjs.js +0 -4805
  121. package/sequenceDiagram-169f11ec.esm.js +0 -4803
  122. package/styles-3814544c.cjs.js +0 -534
  123. package/styles-3814544c.esm.js +0 -524
  124. package/svgDraw-af99a425.cjs.js +0 -144
  125. package/svgDraw-af99a425.esm.js +0 -141
  126. package/svgDrawCommon-ebe6c236.cjs.js +0 -70
  127. package/svgDrawCommon-ebe6c236.esm.js +0 -62
  128. package/timeline-definition-65183566.cjs.js +0 -1394
  129. package/timeline-definition-65183566.esm.js +0 -1392
@@ -0,0 +1,1061 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index.cjs2.js');
4
+ var svgDrawCommonEcc5f780 = require('./svgDrawCommon-ecc5f780.cjs.js');
5
+ var arcD1f6357e = require('./arc-d1f6357e.cjs.js');
6
+ require('./path-428ebac9.cjs.js');
7
+
8
+ function _array_like_to_array(arr, len) {
9
+ if (len == null || len > arr.length) len = arr.length;
10
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11
+ return arr2;
12
+ }
13
+ function _array_with_holes(arr) {
14
+ if (Array.isArray(arr)) return arr;
15
+ }
16
+ function _array_without_holes(arr) {
17
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
18
+ }
19
+ function _instanceof(left, right) {
20
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
21
+ return !!right[Symbol.hasInstance](left);
22
+ } else {
23
+ return left instanceof right;
24
+ }
25
+ }
26
+ function _iterable_to_array(iter) {
27
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
28
+ }
29
+ function _iterable_to_array_limit(arr, i) {
30
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
31
+ if (_i == null) return;
32
+ var _arr = [];
33
+ var _n = true;
34
+ var _d = false;
35
+ var _s, _e;
36
+ try {
37
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
38
+ _arr.push(_s.value);
39
+ if (i && _arr.length === i) break;
40
+ }
41
+ } catch (err) {
42
+ _d = true;
43
+ _e = err;
44
+ } finally{
45
+ try {
46
+ if (!_n && _i["return"] != null) _i["return"]();
47
+ } finally{
48
+ if (_d) throw _e;
49
+ }
50
+ }
51
+ return _arr;
52
+ }
53
+ function _non_iterable_rest() {
54
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
55
+ }
56
+ function _non_iterable_spread() {
57
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
58
+ }
59
+ function _sliced_to_array(arr, i) {
60
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
61
+ }
62
+ function _to_consumable_array(arr) {
63
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
64
+ }
65
+ function _type_of(obj) {
66
+ "@swc/helpers - typeof";
67
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
68
+ }
69
+ function _unsupported_iterable_to_array(o, minLen) {
70
+ if (!o) return;
71
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
72
+ var n = Object.prototype.toString.call(o).slice(8, -1);
73
+ if (n === "Object" && o.constructor) n = o.constructor.name;
74
+ if (n === "Map" || n === "Set") return Array.from(n);
75
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
76
+ }
77
+ var G = function() {
78
+ var t = function t(p, s, r, a) {
79
+ for(r = r || {}, a = p.length; a--; r[p[a]] = s);
80
+ return r;
81
+ }, e = [
82
+ 6,
83
+ 8,
84
+ 10,
85
+ 11,
86
+ 12,
87
+ 14,
88
+ 16,
89
+ 17,
90
+ 18
91
+ ], i = [
92
+ 1,
93
+ 9
94
+ ], o = [
95
+ 1,
96
+ 10
97
+ ], n = [
98
+ 1,
99
+ 11
100
+ ], h = [
101
+ 1,
102
+ 12
103
+ ], c = [
104
+ 1,
105
+ 13
106
+ ], d = [
107
+ 1,
108
+ 14
109
+ ], y = {
110
+ trace: function trace() {},
111
+ yy: {},
112
+ symbols_: {
113
+ error: 2,
114
+ start: 3,
115
+ journey: 4,
116
+ document: 5,
117
+ EOF: 6,
118
+ line: 7,
119
+ SPACE: 8,
120
+ statement: 9,
121
+ NEWLINE: 10,
122
+ title: 11,
123
+ acc_title: 12,
124
+ acc_title_value: 13,
125
+ acc_descr: 14,
126
+ acc_descr_value: 15,
127
+ acc_descr_multiline_value: 16,
128
+ section: 17,
129
+ taskName: 18,
130
+ taskData: 19,
131
+ $accept: 0,
132
+ $end: 1
133
+ },
134
+ terminals_: {
135
+ 2: "error",
136
+ 4: "journey",
137
+ 6: "EOF",
138
+ 8: "SPACE",
139
+ 10: "NEWLINE",
140
+ 11: "title",
141
+ 12: "acc_title",
142
+ 13: "acc_title_value",
143
+ 14: "acc_descr",
144
+ 15: "acc_descr_value",
145
+ 16: "acc_descr_multiline_value",
146
+ 17: "section",
147
+ 18: "taskName",
148
+ 19: "taskData"
149
+ },
150
+ productions_: [
151
+ 0,
152
+ [
153
+ 3,
154
+ 3
155
+ ],
156
+ [
157
+ 5,
158
+ 0
159
+ ],
160
+ [
161
+ 5,
162
+ 2
163
+ ],
164
+ [
165
+ 7,
166
+ 2
167
+ ],
168
+ [
169
+ 7,
170
+ 1
171
+ ],
172
+ [
173
+ 7,
174
+ 1
175
+ ],
176
+ [
177
+ 7,
178
+ 1
179
+ ],
180
+ [
181
+ 9,
182
+ 1
183
+ ],
184
+ [
185
+ 9,
186
+ 2
187
+ ],
188
+ [
189
+ 9,
190
+ 2
191
+ ],
192
+ [
193
+ 9,
194
+ 1
195
+ ],
196
+ [
197
+ 9,
198
+ 1
199
+ ],
200
+ [
201
+ 9,
202
+ 2
203
+ ]
204
+ ],
205
+ performAction: function performAction(s, r, a, u, f, l, w) {
206
+ var k = l.length - 1;
207
+ switch(f){
208
+ case 1:
209
+ return l[k - 1];
210
+ case 2:
211
+ this.$ = [];
212
+ break;
213
+ case 3:
214
+ l[k - 1].push(l[k]), this.$ = l[k - 1];
215
+ break;
216
+ case 4:
217
+ case 5:
218
+ this.$ = l[k];
219
+ break;
220
+ case 6:
221
+ case 7:
222
+ this.$ = [];
223
+ break;
224
+ case 8:
225
+ u.setDiagramTitle(l[k].substr(6)), this.$ = l[k].substr(6);
226
+ break;
227
+ case 9:
228
+ this.$ = l[k].trim(), u.setAccTitle(this.$);
229
+ break;
230
+ case 10:
231
+ case 11:
232
+ this.$ = l[k].trim(), u.setAccDescription(this.$);
233
+ break;
234
+ case 12:
235
+ u.addSection(l[k].substr(8)), this.$ = l[k].substr(8);
236
+ break;
237
+ case 13:
238
+ u.addTask(l[k - 1], l[k]), this.$ = "task";
239
+ break;
240
+ }
241
+ },
242
+ table: [
243
+ {
244
+ 3: 1,
245
+ 4: [
246
+ 1,
247
+ 2
248
+ ]
249
+ },
250
+ {
251
+ 1: [
252
+ 3
253
+ ]
254
+ },
255
+ t(e, [
256
+ 2,
257
+ 2
258
+ ], {
259
+ 5: 3
260
+ }),
261
+ {
262
+ 6: [
263
+ 1,
264
+ 4
265
+ ],
266
+ 7: 5,
267
+ 8: [
268
+ 1,
269
+ 6
270
+ ],
271
+ 9: 7,
272
+ 10: [
273
+ 1,
274
+ 8
275
+ ],
276
+ 11: i,
277
+ 12: o,
278
+ 14: n,
279
+ 16: h,
280
+ 17: c,
281
+ 18: d
282
+ },
283
+ t(e, [
284
+ 2,
285
+ 7
286
+ ], {
287
+ 1: [
288
+ 2,
289
+ 1
290
+ ]
291
+ }),
292
+ t(e, [
293
+ 2,
294
+ 3
295
+ ]),
296
+ {
297
+ 9: 15,
298
+ 11: i,
299
+ 12: o,
300
+ 14: n,
301
+ 16: h,
302
+ 17: c,
303
+ 18: d
304
+ },
305
+ t(e, [
306
+ 2,
307
+ 5
308
+ ]),
309
+ t(e, [
310
+ 2,
311
+ 6
312
+ ]),
313
+ t(e, [
314
+ 2,
315
+ 8
316
+ ]),
317
+ {
318
+ 13: [
319
+ 1,
320
+ 16
321
+ ]
322
+ },
323
+ {
324
+ 15: [
325
+ 1,
326
+ 17
327
+ ]
328
+ },
329
+ t(e, [
330
+ 2,
331
+ 11
332
+ ]),
333
+ t(e, [
334
+ 2,
335
+ 12
336
+ ]),
337
+ {
338
+ 19: [
339
+ 1,
340
+ 18
341
+ ]
342
+ },
343
+ t(e, [
344
+ 2,
345
+ 4
346
+ ]),
347
+ t(e, [
348
+ 2,
349
+ 9
350
+ ]),
351
+ t(e, [
352
+ 2,
353
+ 10
354
+ ]),
355
+ t(e, [
356
+ 2,
357
+ 13
358
+ ])
359
+ ],
360
+ defaultActions: {},
361
+ parseError: function parseError(s, r) {
362
+ if (r.recoverable) this.trace(s);
363
+ else {
364
+ var a = new Error(s);
365
+ throw a.hash = r, a;
366
+ }
367
+ },
368
+ parse: function parse(s) {
369
+ var r = this, a = [
370
+ 0
371
+ ], u = [], f = [
372
+ null
373
+ ], l = [], w = this.table, k = "", R = 0, Z = 0, ot = 2, J = 1, ct = l.slice.call(arguments, 1), x = Object.create(this.lexer), S = {
374
+ yy: {}
375
+ };
376
+ for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy, z) && (S.yy[z] = this.yy[z]);
377
+ x.setInput(s, S.yy), S.yy.lexer = x, S.yy.parser = this, _type_of(x.yylloc) > "u" && (x.yylloc = {});
378
+ var Y = x.yylloc;
379
+ l.push(Y);
380
+ var ht = x.options && x.options.ranges;
381
+ typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
382
+ function ut() {
383
+ var $;
384
+ return $ = u.pop() || x.lex() || J, typeof $ != "number" && (_instanceof($, Array) && (u = $, $ = u.pop()), $ = r.symbols_[$] || $), $;
385
+ }
386
+ for(var _, E, b, O, I = {}, N, T, K, B;;){
387
+ if (E = a[a.length - 1], this.defaultActions[E] ? b = this.defaultActions[E] : ((_ === null || (typeof _ === "undefined" ? "undefined" : _type_of(_)) > "u") && (_ = ut()), b = w[E] && w[E][_]), (typeof b === "undefined" ? "undefined" : _type_of(b)) > "u" || !b.length || !b[0]) {
388
+ var q = "";
389
+ B = [];
390
+ for(N in w[E])this.terminals_[N] && N > ot && B.push("'" + this.terminals_[N] + "'");
391
+ x.showPosition ? q = "Parse error on line " + (R + 1) + ":\n" + x.showPosition() + "\nExpecting " + B.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : q = "Parse error on line " + (R + 1) + ": Unexpected " + (_ == J ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(q, {
392
+ text: x.match,
393
+ token: this.terminals_[_] || _,
394
+ line: x.yylineno,
395
+ loc: Y,
396
+ expected: B
397
+ });
398
+ }
399
+ if (_instanceof(b[0], Array) && b.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + E + ", token: " + _);
400
+ switch(b[0]){
401
+ case 1:
402
+ a.push(_), f.push(x.yytext), l.push(x.yylloc), a.push(b[1]), _ = null, Z = x.yyleng, k = x.yytext, R = x.yylineno, Y = x.yylloc;
403
+ break;
404
+ case 2:
405
+ if (T = this.productions_[b[1]][1], I.$ = f[f.length - T], I._$ = {
406
+ first_line: l[l.length - (T || 1)].first_line,
407
+ last_line: l[l.length - 1].last_line,
408
+ first_column: l[l.length - (T || 1)].first_column,
409
+ last_column: l[l.length - 1].last_column
410
+ }, ht && (I._$.range = [
411
+ l[l.length - (T || 1)].range[0],
412
+ l[l.length - 1].range[1]
413
+ ]), O = this.performAction.apply(I, [
414
+ k,
415
+ Z,
416
+ R,
417
+ S.yy,
418
+ b[1],
419
+ f,
420
+ l
421
+ ].concat(ct)), (typeof O === "undefined" ? "undefined" : _type_of(O)) < "u") return O;
422
+ T && (a = a.slice(0, -1 * T * 2), f = f.slice(0, -1 * T), l = l.slice(0, -1 * T)), a.push(this.productions_[b[1]][0]), f.push(I.$), l.push(I._$), K = w[a[a.length - 2]][a[a.length - 1]], a.push(K);
423
+ break;
424
+ case 3:
425
+ return !0;
426
+ }
427
+ }
428
+ return !0;
429
+ }
430
+ }, m = function() {
431
+ var p = {
432
+ EOF: 1,
433
+ parseError: function parseError(r, a) {
434
+ if (this.yy.parser) this.yy.parser.parseError(r, a);
435
+ else throw new Error(r);
436
+ },
437
+ // resets the lexer, sets new input
438
+ setInput: function setInput(s, r) {
439
+ return this.yy = r || 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 = [
440
+ "INITIAL"
441
+ ], this.yylloc = {
442
+ first_line: 1,
443
+ first_column: 0,
444
+ last_line: 1,
445
+ last_column: 0
446
+ }, this.options.ranges && (this.yylloc.range = [
447
+ 0,
448
+ 0
449
+ ]), this.offset = 0, this;
450
+ },
451
+ // consumes and returns one char from the input
452
+ input: function input() {
453
+ var s = this._input[0];
454
+ this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
455
+ var r = s.match(/(?:\r\n?|\n).*/g);
456
+ 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), s;
457
+ },
458
+ // unshifts one char (or a string) into the input
459
+ unput: function unput(s) {
460
+ var r = s.length, a = s.split(/(?:\r\n?|\n)/g);
461
+ this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
462
+ var u = this.match.split(/(?:\r\n?|\n)/g);
463
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1);
464
+ var f = this.yylloc.range;
465
+ return this.yylloc = {
466
+ first_line: this.yylloc.first_line,
467
+ last_line: this.yylineno + 1,
468
+ first_column: this.yylloc.first_column,
469
+ last_column: a ? (a.length === u.length ? this.yylloc.first_column : 0) + u[u.length - a.length].length - a[0].length : this.yylloc.first_column - r
470
+ }, this.options.ranges && (this.yylloc.range = [
471
+ f[0],
472
+ f[0] + this.yyleng - r
473
+ ]), this.yyleng = this.yytext.length, this;
474
+ },
475
+ // When called from action, caches matched text and appends it on next action
476
+ more: function more() {
477
+ return this._more = !0, this;
478
+ },
479
+ // 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.
480
+ reject: function reject() {
481
+ if (this.options.backtrack_lexer) this._backtrack = !0;
482
+ 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(), {
483
+ text: "",
484
+ token: null,
485
+ line: this.yylineno
486
+ });
487
+ return this;
488
+ },
489
+ // retain first n characters of the match
490
+ less: function less(s) {
491
+ this.unput(this.match.slice(s));
492
+ },
493
+ // displays already matched input, i.e. for error messages
494
+ pastInput: function pastInput() {
495
+ var s = this.matched.substr(0, this.matched.length - this.match.length);
496
+ return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
497
+ },
498
+ // displays upcoming input, i.e. for error messages
499
+ upcomingInput: function upcomingInput() {
500
+ var s = this.match;
501
+ return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
502
+ },
503
+ // displays the character position where the lexing error occurred, i.e. for error messages
504
+ showPosition: function showPosition() {
505
+ var s = this.pastInput(), r = new Array(s.length + 1).join("-");
506
+ return s + this.upcomingInput() + "\n" + r + "^";
507
+ },
508
+ // test the lexed token: return FALSE when not a match, otherwise return token
509
+ test_match: function test_match(s, r) {
510
+ var a, u, f;
511
+ if (this.options.backtrack_lexer && (f = {
512
+ yylineno: this.yylineno,
513
+ yylloc: {
514
+ first_line: this.yylloc.first_line,
515
+ last_line: this.last_line,
516
+ first_column: this.yylloc.first_column,
517
+ last_column: this.yylloc.last_column
518
+ },
519
+ yytext: this.yytext,
520
+ match: this.match,
521
+ matches: this.matches,
522
+ matched: this.matched,
523
+ yyleng: this.yyleng,
524
+ offset: this.offset,
525
+ _more: this._more,
526
+ _input: this._input,
527
+ yy: this.yy,
528
+ conditionStack: this.conditionStack.slice(0),
529
+ done: this.done
530
+ }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), u = s[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
531
+ first_line: this.yylloc.last_line,
532
+ last_line: this.yylineno + 1,
533
+ first_column: this.yylloc.last_column,
534
+ last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
535
+ }, this.yytext += s[0], this.match += s[0], this.matches = s, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [
536
+ this.offset,
537
+ this.offset += this.yyleng
538
+ ]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(s[0].length), this.matched += s[0], a = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a) return a;
539
+ if (this._backtrack) {
540
+ for(var l in f)this[l] = f[l];
541
+ return !1;
542
+ }
543
+ return !1;
544
+ },
545
+ // return next match in input
546
+ next: function next() {
547
+ if (this.done) return this.EOF;
548
+ this._input || (this.done = !0);
549
+ var s, r, a, u;
550
+ this._more || (this.yytext = "", this.match = "");
551
+ for(var f = this._currentRules(), l = 0; l < f.length; l++)if (a = this._input.match(this.rules[f[l]]), a && (!r || a[0].length > r[0].length)) {
552
+ if (r = a, u = l, this.options.backtrack_lexer) {
553
+ if (s = this.test_match(a, f[l]), s !== !1) return s;
554
+ if (this._backtrack) {
555
+ r = !1;
556
+ continue;
557
+ } else return !1;
558
+ } else if (!this.options.flex) break;
559
+ }
560
+ return r ? (s = this.test_match(r, f[u]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
561
+ text: "",
562
+ token: null,
563
+ line: this.yylineno
564
+ });
565
+ },
566
+ // return next match that has a token
567
+ lex: function lex() {
568
+ var r = this.next();
569
+ return r || this.lex();
570
+ },
571
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
572
+ begin: function begin(r) {
573
+ this.conditionStack.push(r);
574
+ },
575
+ // pop the previously active lexer condition state off the condition stack
576
+ popState: function popState() {
577
+ var r = this.conditionStack.length - 1;
578
+ return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
579
+ },
580
+ // produce the lexer rule set which is active for the currently active lexer condition state
581
+ _currentRules: function _currentRules() {
582
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
583
+ },
584
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
585
+ topState: function topState(r) {
586
+ return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
587
+ },
588
+ // alias for begin(condition)
589
+ pushState: function pushState(r) {
590
+ this.begin(r);
591
+ },
592
+ // return the number of states currently on the stack
593
+ stateStackSize: function stateStackSize() {
594
+ return this.conditionStack.length;
595
+ },
596
+ options: {
597
+ "case-insensitive": !0
598
+ },
599
+ performAction: function performAction(r, a, u, f) {
600
+ switch(u){
601
+ case 0:
602
+ break;
603
+ case 1:
604
+ break;
605
+ case 2:
606
+ return 10;
607
+ case 3:
608
+ break;
609
+ case 4:
610
+ break;
611
+ case 5:
612
+ return 4;
613
+ case 6:
614
+ return 11;
615
+ case 7:
616
+ return this.begin("acc_title"), 12;
617
+ case 8:
618
+ return this.popState(), "acc_title_value";
619
+ case 9:
620
+ return this.begin("acc_descr"), 14;
621
+ case 10:
622
+ return this.popState(), "acc_descr_value";
623
+ case 11:
624
+ this.begin("acc_descr_multiline");
625
+ break;
626
+ case 12:
627
+ this.popState();
628
+ break;
629
+ case 13:
630
+ return "acc_descr_multiline_value";
631
+ case 14:
632
+ return 17;
633
+ case 15:
634
+ return 18;
635
+ case 16:
636
+ return 19;
637
+ case 17:
638
+ return ":";
639
+ case 18:
640
+ return 6;
641
+ case 19:
642
+ return "INVALID";
643
+ }
644
+ },
645
+ rules: [
646
+ /^(?:%(?!\{)[^\n]*)/i,
647
+ /^(?:[^\}]%%[^\n]*)/i,
648
+ /^(?:[\n]+)/i,
649
+ /^(?:\s+)/i,
650
+ /^(?:#[^\n]*)/i,
651
+ /^(?:journey\b)/i,
652
+ /^(?:title\s[^#\n;]+)/i,
653
+ /^(?:accTitle\s*:\s*)/i,
654
+ /^(?:(?!\n||)*[^\n]*)/i,
655
+ /^(?:accDescr\s*:\s*)/i,
656
+ /^(?:(?!\n||)*[^\n]*)/i,
657
+ /^(?:accDescr\s*\{\s*)/i,
658
+ /^(?:[\}])/i,
659
+ /^(?:[^\}]*)/i,
660
+ /^(?:section\s[^#:\n;]+)/i,
661
+ /^(?:[^#:\n;]+)/i,
662
+ /^(?::[^#\n;]+)/i,
663
+ /^(?::)/i,
664
+ /^(?:$)/i,
665
+ /^(?:.)/i
666
+ ],
667
+ conditions: {
668
+ acc_descr_multiline: {
669
+ rules: [
670
+ 12,
671
+ 13
672
+ ],
673
+ inclusive: !1
674
+ },
675
+ acc_descr: {
676
+ rules: [
677
+ 10
678
+ ],
679
+ inclusive: !1
680
+ },
681
+ acc_title: {
682
+ rules: [
683
+ 8
684
+ ],
685
+ inclusive: !1
686
+ },
687
+ INITIAL: {
688
+ rules: [
689
+ 0,
690
+ 1,
691
+ 2,
692
+ 3,
693
+ 4,
694
+ 5,
695
+ 6,
696
+ 7,
697
+ 9,
698
+ 11,
699
+ 14,
700
+ 15,
701
+ 16,
702
+ 17,
703
+ 18,
704
+ 19
705
+ ],
706
+ inclusive: !0
707
+ }
708
+ }
709
+ };
710
+ return p;
711
+ }();
712
+ y.lexer = m;
713
+ function g() {
714
+ this.yy = {};
715
+ }
716
+ return g.prototype = y, y.Parser = g, new g();
717
+ }();
718
+ G.parser = G;
719
+ var wt = G;
720
+ var A = "";
721
+ var H = [], V = [], F = [], Tt = function Tt() {
722
+ H.length = 0, V.length = 0, A = "", F.length = 0, index.B_();
723
+ }, $t = function $t(t) {
724
+ A = t, H.push(t);
725
+ }, Mt = function Mt() {
726
+ return H;
727
+ }, St = function St() {
728
+ var _V;
729
+ var t = D();
730
+ var e = 100;
731
+ var i = 0;
732
+ for(; !t && i < e;)t = D(), i++;
733
+ return (_V = V).push.apply(_V, _to_consumable_array(F)), V;
734
+ }, Et = function Et() {
735
+ var t = [];
736
+ return V.forEach(function(i) {
737
+ var _t;
738
+ i.people && (_t = t).push.apply(_t, _to_consumable_array(i.people));
739
+ }), _to_consumable_array(new Set(t)).sort();
740
+ }, Pt = function Pt(t, e) {
741
+ var i = e.substr(1).split(":");
742
+ var o = 0, n = [];
743
+ i.length === 1 ? (o = Number(i[0]), n = []) : (o = Number(i[0]), n = i[1].split(","));
744
+ var h = n.map(function(d) {
745
+ return d.trim();
746
+ }), c = {
747
+ section: A,
748
+ type: A,
749
+ people: h,
750
+ task: t,
751
+ score: o
752
+ };
753
+ F.push(c);
754
+ }, Ct = function Ct(t) {
755
+ var e = {
756
+ section: A,
757
+ type: A,
758
+ description: t,
759
+ task: t,
760
+ classes: []
761
+ };
762
+ V.push(e);
763
+ }, D = function D() {
764
+ var t = function t(i) {
765
+ return F[i].processed;
766
+ };
767
+ var e = !0;
768
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
769
+ try {
770
+ for(var _iterator = F.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
771
+ var _step_value = _sliced_to_array(_step.value, 2), i = _step_value[0], o = _step_value[1];
772
+ t(i), e = e && o.processed;
773
+ }
774
+ } catch (err) {
775
+ _didIteratorError = true;
776
+ _iteratorError = err;
777
+ } finally{
778
+ try {
779
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
780
+ _iterator.return();
781
+ }
782
+ } finally{
783
+ if (_didIteratorError) {
784
+ throw _iteratorError;
785
+ }
786
+ }
787
+ }
788
+ return e;
789
+ }, It = function It() {
790
+ return Et();
791
+ }, tt = {
792
+ getConfig: function() {
793
+ return index.Vn().journey;
794
+ },
795
+ clear: Tt,
796
+ setDiagramTitle: index.M_,
797
+ getDiagramTitle: index.O_,
798
+ setAccTitle: index.F_,
799
+ getAccTitle: index.A_,
800
+ setAccDescription: index.L_,
801
+ getAccDescription: index.E_,
802
+ addSection: $t,
803
+ getSections: Mt,
804
+ getTasks: St,
805
+ addTask: Pt,
806
+ addTaskOrg: Ct,
807
+ getActors: It
808
+ }, At = function(t) {
809
+ return ".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor, ";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor, "\n }\n\n .legend {\n fill: ").concat(t.textColor, ";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor, "\n }\n\n .face {\n ").concat(t.faceColor ? "fill: ".concat(t.faceColor) : "fill: #FFF8DC", ";\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg, ";\n stroke: ").concat(t.nodeBorder, ";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor, ";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor, ";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor, ";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor, ";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor, ";\n border: 1px solid ").concat(t.border2, ";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0 ? "fill: ".concat(t.fillType0) : "", ";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0 ? "fill: ".concat(t.fillType1) : "", ";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0 ? "fill: ".concat(t.fillType2) : "", ";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0 ? "fill: ".concat(t.fillType3) : "", ";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0 ? "fill: ".concat(t.fillType4) : "", ";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0 ? "fill: ".concat(t.fillType5) : "", ";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0 ? "fill: ".concat(t.fillType6) : "", ";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0 ? "fill: ".concat(t.fillType7) : "", ";\n }\n\n .actor-0 {\n ").concat(t.actor0 ? "fill: ".concat(t.actor0) : "", ";\n }\n .actor-1 {\n ").concat(t.actor1 ? "fill: ".concat(t.actor1) : "", ";\n }\n .actor-2 {\n ").concat(t.actor2 ? "fill: ".concat(t.actor2) : "", ";\n }\n .actor-3 {\n ").concat(t.actor3 ? "fill: ".concat(t.actor3) : "", ";\n }\n .actor-4 {\n ").concat(t.actor4 ? "fill: ".concat(t.actor4) : "", ";\n }\n .actor-5 {\n ").concat(t.actor5 ? "fill: ".concat(t.actor5) : "", ";\n }\n");
810
+ }, Vt = At, U = function U(t, e) {
811
+ return svgDrawCommonEcc5f780.l(t, e);
812
+ }, Ft = function Ft(t, e) {
813
+ var o = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), n = t.append("g");
814
+ n.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), n.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
815
+ function h(y) {
816
+ var m = arcD1f6357e.vn().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
817
+ y.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
818
+ }
819
+ function c(y) {
820
+ var m = arcD1f6357e.vn().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
821
+ y.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
822
+ }
823
+ function d(y) {
824
+ y.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
825
+ }
826
+ return e.score > 3 ? h(n) : e.score < 3 ? c(n) : d(n), o;
827
+ }, rt = function rt(t, e) {
828
+ var i = t.append("circle");
829
+ return i.attr("cx", e.cx), i.attr("cy", e.cy), i.attr("class", "actor-" + e.pos), i.attr("fill", e.fill), i.attr("stroke", e.stroke), i.attr("r", e.r), i.class !== void 0 && i.attr("class", i.class), e.title !== void 0 && i.append("title").text(e.title), i;
830
+ }, at = function at(t, e) {
831
+ return svgDrawCommonEcc5f780.d(t, e);
832
+ }, Lt = function Lt(t, e) {
833
+ function i(n, h, c, d, y) {
834
+ return n + "," + h + " " + (n + c) + "," + h + " " + (n + c) + "," + (h + d - y) + " " + (n + c - y * 1.2) + "," + (h + d) + " " + n + "," + (h + d);
835
+ }
836
+ var o = t.append("polygon");
837
+ o.attr("points", i(e.x, e.y, 50, 20, 7)), o.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, at(t, e);
838
+ }, Rt = function Rt(t, e, i) {
839
+ var o = t.append("g"), n = svgDrawCommonEcc5f780.g();
840
+ n.x = e.x, n.y = e.y, n.fill = e.fill, n.width = i.width * e.taskCount + // width of the tasks
841
+ i.diagramMarginX * (e.taskCount - 1), n.height = i.height, n.class = "journey-section section-type-" + e.num, n.rx = 3, n.ry = 3, U(o, n), lt(i)(e.text, o, n.x, n.y, n.width, n.height, {
842
+ class: "journey-section section-type-" + e.num
843
+ }, i, e.colour);
844
+ };
845
+ var et = -1;
846
+ var Nt = function Nt(t, e, i) {
847
+ var o = e.x + i.width / 2, n = t.append("g");
848
+ et++;
849
+ var h = 300 + 5 * 30;
850
+ n.append("line").attr("id", "task" + et).attr("x1", o).attr("y1", e.y).attr("x2", o).attr("y2", h).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Ft(n, {
851
+ cx: o,
852
+ cy: 300 + (5 - e.score) * 30,
853
+ score: e.score
854
+ });
855
+ var c = svgDrawCommonEcc5f780.g();
856
+ c.x = e.x, c.y = e.y, c.fill = e.fill, c.width = i.width, c.height = i.height, c.class = "task task-type-" + e.num, c.rx = 3, c.ry = 3, U(n, c);
857
+ var d = e.x + 14;
858
+ e.people.forEach(function(y) {
859
+ var m = e.actors[y].color, g = {
860
+ cx: d,
861
+ cy: e.y,
862
+ r: 7,
863
+ fill: m,
864
+ stroke: "#000",
865
+ title: y,
866
+ pos: e.actors[y].position
867
+ };
868
+ rt(n, g), d += 10;
869
+ }), lt(i)(e.task, n, c.x, c.y, c.width, c.height, {
870
+ class: "task"
871
+ }, i, e.colour);
872
+ }, Bt = function Bt(t, e) {
873
+ svgDrawCommonEcc5f780.x(t, e);
874
+ }, lt = function() {
875
+ function t(n, h, c, d, y, m, g, p) {
876
+ var s = h.append("text").attr("x", c + y / 2).attr("y", d + m / 2 + 5).style("font-color", p).style("text-anchor", "middle").text(n);
877
+ o(s, g);
878
+ }
879
+ function e(n, h, c, d, y, m, g, p, s) {
880
+ var r = p.taskFontSize, a = p.taskFontFamily, u = n.split(/<br\s*\/?>/gi);
881
+ for(var f = 0; f < u.length; f++){
882
+ var l = f * r - r * (u.length - 1) / 2, w = h.append("text").attr("x", c + y / 2).attr("y", d).attr("fill", s).style("text-anchor", "middle").style("font-size", r).style("font-family", a);
883
+ w.append("tspan").attr("x", c + y / 2).attr("dy", l).text(u[f]), w.attr("y", d + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), o(w, g);
884
+ }
885
+ }
886
+ function i(n, h, c, d, y, m, g, p) {
887
+ var s = h.append("switch"), a = s.append("foreignObject").attr("x", c).attr("y", d).attr("width", y).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
888
+ a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), e(n, s, c, d, y, m, g, p), o(a, g);
889
+ }
890
+ function o(n, h) {
891
+ for(var c in h)c in h && n.attr(c, h[c]);
892
+ }
893
+ return function(n) {
894
+ return n.textPlacement === "fo" ? i : n.textPlacement === "old" ? t : e;
895
+ };
896
+ }(), jt = function jt(t) {
897
+ t.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");
898
+ }, L = {
899
+ drawRect: U,
900
+ drawCircle: rt,
901
+ drawSection: Rt,
902
+ drawText: at,
903
+ drawLabel: Lt,
904
+ drawTask: Nt,
905
+ drawBackgroundRect: Bt,
906
+ initGraphics: jt
907
+ }, zt = function zt(t) {
908
+ Object.keys(t).forEach(function(i) {
909
+ j[i] = t[i];
910
+ });
911
+ }, M = {};
912
+ function Yt(t) {
913
+ var e = index.Vn().journey;
914
+ var i = 60;
915
+ Object.keys(M).forEach(function(o) {
916
+ var n = M[o].color, h = {
917
+ cx: 20,
918
+ cy: i,
919
+ r: 7,
920
+ fill: n,
921
+ stroke: "#000",
922
+ pos: M[o].position
923
+ };
924
+ L.drawCircle(t, h);
925
+ var c = {
926
+ x: 40,
927
+ y: i + 7,
928
+ fill: "#666",
929
+ text: o,
930
+ textMargin: e.boxTextMargin | 5
931
+ };
932
+ L.drawText(t, c), i += 20;
933
+ });
934
+ }
935
+ var j = index.Vn().journey, P = j.leftMargin, Ot = function Ot(t, e, i, o) {
936
+ var n = index.Vn().journey, h = index.Vn().securityLevel;
937
+ var c;
938
+ h === "sandbox" && (c = index.bt("#i" + e));
939
+ var d = h === "sandbox" ? index.bt(c.nodes()[0].contentDocument.body) : index.bt("body");
940
+ v.init();
941
+ var y = d.select("#" + e);
942
+ L.initGraphics(y);
943
+ var m = o.db.getTasks(), g = o.db.getDiagramTitle(), p = o.db.getActors();
944
+ for(var l in M)delete M[l];
945
+ var s = 0;
946
+ p.forEach(function(l) {
947
+ M[l] = {
948
+ color: n.actorColours[s % n.actorColours.length],
949
+ position: s
950
+ }, s++;
951
+ }), Yt(y), v.insert(0, 0, P, Object.keys(M).length * 50), qt(y, m, 0);
952
+ var r = v.getBounds();
953
+ g && y.append("text").text(g).attr("x", P).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
954
+ var a = r.stopy - r.starty + 2 * n.diagramMarginY, u = P + r.stopx + 2 * n.diagramMarginX;
955
+ index.Ol(y, a, u, n.useMaxWidth), y.append("line").attr("x1", P).attr("y1", n.height * 4).attr("x2", u - P - 4).attr("y2", n.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
956
+ var f = g ? 70 : 0;
957
+ y.attr("viewBox", "".concat(r.startx, " -25 ").concat(u, " ").concat(a + f)), y.attr("preserveAspectRatio", "xMinYMin meet"), y.attr("height", a + f + 25);
958
+ }, v = {
959
+ data: {
960
+ startx: void 0,
961
+ stopx: void 0,
962
+ starty: void 0,
963
+ stopy: void 0
964
+ },
965
+ verticalPos: 0,
966
+ sequenceItems: [],
967
+ init: function init() {
968
+ this.sequenceItems = [], this.data = {
969
+ startx: void 0,
970
+ stopx: void 0,
971
+ starty: void 0,
972
+ stopy: void 0
973
+ }, this.verticalPos = 0;
974
+ },
975
+ updateVal: function updateVal(t, e, i, o) {
976
+ t[e] === void 0 ? t[e] = i : t[e] = o(i, t[e]);
977
+ },
978
+ updateBounds: function updateBounds(t, e, i, o) {
979
+ var n = index.Vn().journey, h = this;
980
+ var c = 0;
981
+ function d(y) {
982
+ return function(g) {
983
+ c++;
984
+ var p = h.sequenceItems.length - c + 1;
985
+ h.updateVal(g, "starty", e - p * n.boxMargin, Math.min), h.updateVal(g, "stopy", o + p * n.boxMargin, Math.max), h.updateVal(v.data, "startx", t - p * n.boxMargin, Math.min), h.updateVal(v.data, "stopx", i + p * n.boxMargin, Math.max), y !== "activation" && (h.updateVal(g, "startx", t - p * n.boxMargin, Math.min), h.updateVal(g, "stopx", i + p * n.boxMargin, Math.max), h.updateVal(v.data, "starty", e - p * n.boxMargin, Math.min), h.updateVal(v.data, "stopy", o + p * n.boxMargin, Math.max));
986
+ };
987
+ }
988
+ this.sequenceItems.forEach(d());
989
+ },
990
+ insert: function insert(t, e, i, o) {
991
+ var n = Math.min(t, i), h = Math.max(t, i), c = Math.min(e, o), d = Math.max(e, o);
992
+ this.updateVal(v.data, "startx", n, Math.min), this.updateVal(v.data, "starty", c, Math.min), this.updateVal(v.data, "stopx", h, Math.max), this.updateVal(v.data, "stopy", d, Math.max), this.updateBounds(n, c, h, d);
993
+ },
994
+ bumpVerticalPos: function bumpVerticalPos(t) {
995
+ this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
996
+ },
997
+ getVerticalPos: function getVerticalPos() {
998
+ return this.verticalPos;
999
+ },
1000
+ getBounds: function getBounds() {
1001
+ return this.data;
1002
+ }
1003
+ }, X = j.sectionFills, st = j.sectionColours, qt = function qt(t, e, i) {
1004
+ var o = index.Vn().journey;
1005
+ var n = "";
1006
+ var h = o.height * 2 + o.diagramMarginY, c = i + h;
1007
+ var d = 0, y = "#CCC", m = "black", g = 0;
1008
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1009
+ try {
1010
+ var _loop = function() {
1011
+ var _step_value = _sliced_to_array(_step.value, 2), p = _step_value[0], s = _step_value[1];
1012
+ if (n !== s.section) {
1013
+ y = X[d % X.length], g = d % X.length, m = st[d % st.length];
1014
+ var a = 0;
1015
+ var u = s.section;
1016
+ for(var l = p; l < e.length && e[l].section == u; l++)a = a + 1;
1017
+ var f = {
1018
+ x: p * o.taskMargin + p * o.width + P,
1019
+ y: 50,
1020
+ text: s.section,
1021
+ fill: y,
1022
+ num: g,
1023
+ colour: m,
1024
+ taskCount: a
1025
+ };
1026
+ L.drawSection(t, f, o), n = s.section, d++;
1027
+ }
1028
+ var r = s.people.reduce(function(a, u) {
1029
+ return M[u] && (a[u] = M[u]), a;
1030
+ }, {});
1031
+ s.x = p * o.taskMargin + p * o.width + P, s.y = c, s.width = o.diagramMarginX, s.height = o.diagramMarginY, s.colour = m, s.fill = y, s.num = g, s.actors = r, L.drawTask(t, s, o), v.insert(s.x, s.y, s.x + s.width + o.taskMargin, 300 + 5 * 30);
1032
+ };
1033
+ for(var _iterator = e.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
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
+ }, nt = {
1049
+ setConf: zt,
1050
+ draw: Ot
1051
+ }, Ut = {
1052
+ parser: wt,
1053
+ db: tt,
1054
+ renderer: nt,
1055
+ styles: Vt,
1056
+ init: function(t) {
1057
+ nt.setConf(t.journey), tt.clear();
1058
+ }
1059
+ };
1060
+
1061
+ exports.diagram = Ut;