hub-ui-x 0.0.1

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 (65) hide show
  1. package/README.md +5 -0
  2. package/dist/_basePickBy-C1WsytTM.js +151 -0
  3. package/dist/_baseUniq-CGQBVjq6.js +614 -0
  4. package/dist/arc-CfWEFjh8.js +84 -0
  5. package/dist/architecture-4AB2E3PP-DcT_AgQk.js +5 -0
  6. package/dist/architectureDiagram-IEHRJDOE-HOxolPJX.js +4635 -0
  7. package/dist/blockDiagram-JOT3LUYC-DOUpbN2x.js +2248 -0
  8. package/dist/c4Diagram-VJAJSXHY-BFAcC0i5.js +1582 -0
  9. package/dist/channel-Cu0z2gst.js +5 -0
  10. package/dist/chart-CJ_SRNKN.js +9241 -0
  11. package/dist/chunk-4BMEZGHF-BBaiA8MA.js +9 -0
  12. package/dist/chunk-A2AXSNBT-BWpKSYi4.js +1373 -0
  13. package/dist/chunk-AEK57VVT-doTsaHuQ.js +1415 -0
  14. package/dist/chunk-D6G4REZN-B6Iq6yid.js +64 -0
  15. package/dist/chunk-RZ5BOZE2-OspkSZtw.js +25 -0
  16. package/dist/chunk-XZIHB7SX-BTYIr8g5.js +15 -0
  17. package/dist/classDiagram-GIVACNV2-B_ES2mS7.js +17 -0
  18. package/dist/classDiagram-v2-COTLJTTW-B_ES2mS7.js +17 -0
  19. package/dist/clone-BZBtMp_G.js +8 -0
  20. package/dist/colors-BD7LS4qt.js +7 -0
  21. package/dist/cytoscape.esm-Swd9B-1A.js +18633 -0
  22. package/dist/dagre-OKDRZEBW-qXmKnSET.js +447 -0
  23. package/dist/diagram-SSKATNLV-D9zp03W0.js +221 -0
  24. package/dist/diagram-VNBRO52H-CBXg8AYQ.js +126 -0
  25. package/dist/download-B6Cbg_6N.js +39 -0
  26. package/dist/echarts-CvKQD1G1.js +44028 -0
  27. package/dist/erDiagram-Q7BY3M3F-BOJJGO7u.js +842 -0
  28. package/dist/flowDiagram-4HSFHLVR-jSArwKHg.js +1623 -0
  29. package/dist/ganttDiagram-APWFNJXF-DlkSU7D9.js +2472 -0
  30. package/dist/gitGraph-O2Q2CXLX-BKCeQqs8.js +5 -0
  31. package/dist/gitGraphDiagram-7IBYFJ6S-DUvZEq_S.js +713 -0
  32. package/dist/graph-zFu0gYaZ.js +247 -0
  33. package/dist/helper-C5NlRbA2.js +13 -0
  34. package/dist/hub-ui-x.css +1 -0
  35. package/dist/hub-ui-x.es.ts +5 -0
  36. package/dist/hub-ui-x.umd.ts +3258 -0
  37. package/dist/index-evjDGH2n.js +62533 -0
  38. package/dist/info-4N47QTOZ-BYDGL7Ae.js +5 -0
  39. package/dist/infoDiagram-PH2N3AL5-DJvDYk-t.js +22 -0
  40. package/dist/init-DjUOC4st.js +16 -0
  41. package/dist/journeyDiagram-U35MCT3I---dClVe4.js +810 -0
  42. package/dist/kanban-definition-NDS4AKOZ-DPL_aBPT.js +719 -0
  43. package/dist/katex-9tX9hjoM.js +11692 -0
  44. package/dist/layout-BqSq5ofg.js +1324 -0
  45. package/dist/linear-fJjgKrP9.js +423 -0
  46. package/dist/mermaid-CZvYCPmi.js +14243 -0
  47. package/dist/mermaid-parser.core-Bz7ADZ88.js +12835 -0
  48. package/dist/min-DLf0xQMm.js +28 -0
  49. package/dist/mindmap-definition-ALO5MXBD-CzxIzyQv.js +3222 -0
  50. package/dist/mindmap-r94UHoYv.js +21909 -0
  51. package/dist/ordinal-DfAQgscy.js +61 -0
  52. package/dist/packet-KVYON367-D4di2cz5.js +5 -0
  53. package/dist/pie-R6RNRRYF-CcxAsT3F.js +5 -0
  54. package/dist/pieDiagram-IB7DONF6-B5HBkGlO.js +162 -0
  55. package/dist/quadrantDiagram-7GDLP6J5-BS5bmqKW.js +1025 -0
  56. package/dist/radar-MK3ICKWK-CVYy5goT.js +5 -0
  57. package/dist/requirementDiagram-KVF5MWMF-Cr8GcN4Y.js +851 -0
  58. package/dist/sankeyDiagram-QLVOVGJD-Bhq9k8_q.js +806 -0
  59. package/dist/sequenceDiagram-X6HHIX6F-CCmFoYyv.js +2282 -0
  60. package/dist/stateDiagram-DGXRK772-JkIqKyGq.js +271 -0
  61. package/dist/stateDiagram-v2-YXO3MK2T-DMxAxUZ1.js +17 -0
  62. package/dist/timeline-definition-BDJGKUSR-Bi42udQn.js +805 -0
  63. package/dist/transform-Bsa6BTXX.js +1834 -0
  64. package/dist/xychartDiagram-VJFVF3MP-BI97ppBM.js +1305 -0
  65. package/package.json +55 -0
@@ -0,0 +1,810 @@
1
+ import { a as ft, g as at, f as gt, d as mt } from "./chunk-D6G4REZN-B6Iq6yid.js";
2
+ import { _ as i, g as xt, s as kt, a as _t, b as vt, p as bt, o as wt, c as A, d as Tt, x as St } from "./mermaid-CZvYCPmi.js";
3
+ import { s as W } from "./transform-Bsa6BTXX.js";
4
+ import { d as tt } from "./arc-CfWEFjh8.js";
5
+ var H = function() {
6
+ var t = /* @__PURE__ */ i(function(g, r, a, l) {
7
+ for (a = a || {}, l = g.length; l--; a[g[l]] = r) ;
8
+ return a;
9
+ }, "o"), e = [6, 8, 10, 11, 12, 14, 16, 17, 18], n = [1, 9], c = [1, 10], s = [1, 11], u = [1, 12], h = [1, 13], p = [1, 14], d = {
10
+ trace: /* @__PURE__ */ i(function() {
11
+ }, "trace"),
12
+ yy: {},
13
+ symbols_: { error: 2, start: 3, journey: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, taskName: 18, taskData: 19, $accept: 0, $end: 1 },
14
+ terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" },
15
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]],
16
+ performAction: /* @__PURE__ */ i(function(r, a, l, y, f, o, S) {
17
+ var _ = o.length - 1;
18
+ switch (f) {
19
+ case 1:
20
+ return o[_ - 1];
21
+ case 2:
22
+ this.$ = [];
23
+ break;
24
+ case 3:
25
+ o[_ - 1].push(o[_]), this.$ = o[_ - 1];
26
+ break;
27
+ case 4:
28
+ case 5:
29
+ this.$ = o[_];
30
+ break;
31
+ case 6:
32
+ case 7:
33
+ this.$ = [];
34
+ break;
35
+ case 8:
36
+ y.setDiagramTitle(o[_].substr(6)), this.$ = o[_].substr(6);
37
+ break;
38
+ case 9:
39
+ this.$ = o[_].trim(), y.setAccTitle(this.$);
40
+ break;
41
+ case 10:
42
+ case 11:
43
+ this.$ = o[_].trim(), y.setAccDescription(this.$);
44
+ break;
45
+ case 12:
46
+ y.addSection(o[_].substr(8)), this.$ = o[_].substr(8);
47
+ break;
48
+ case 13:
49
+ y.addTask(o[_ - 1], o[_]), this.$ = "task";
50
+ break;
51
+ }
52
+ }, "anonymous"),
53
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: n, 12: c, 14: s, 16: u, 17: h, 18: p }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: n, 12: c, 14: s, 16: u, 17: h, 18: p }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, t(e, [2, 11]), t(e, [2, 12]), { 19: [1, 18] }, t(e, [2, 4]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 13])],
54
+ defaultActions: {},
55
+ parseError: /* @__PURE__ */ i(function(r, a) {
56
+ if (a.recoverable)
57
+ this.trace(r);
58
+ else {
59
+ var l = new Error(r);
60
+ throw l.hash = a, l;
61
+ }
62
+ }, "parseError"),
63
+ parse: /* @__PURE__ */ i(function(r) {
64
+ var a = this, l = [0], y = [], f = [null], o = [], S = this.table, _ = "", B = 0, J = 0, ut = 2, K = 1, yt = o.slice.call(arguments, 1), k = Object.create(this.lexer), E = { yy: {} };
65
+ for (var O in this.yy)
66
+ Object.prototype.hasOwnProperty.call(this.yy, O) && (E.yy[O] = this.yy[O]);
67
+ k.setInput(r, E.yy), E.yy.lexer = k, E.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
68
+ var Y = k.yylloc;
69
+ o.push(Y);
70
+ var dt = k.options && k.options.ranges;
71
+ typeof E.yy.parseError == "function" ? this.parseError = E.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
72
+ function pt(b) {
73
+ l.length = l.length - 2 * b, f.length = f.length - b, o.length = o.length - b;
74
+ }
75
+ i(pt, "popStack");
76
+ function Q() {
77
+ var b;
78
+ return b = y.pop() || k.lex() || K, typeof b != "number" && (b instanceof Array && (y = b, b = y.pop()), b = a.symbols_[b] || b), b;
79
+ }
80
+ i(Q, "lex");
81
+ for (var v, P, w, q, C = {}, N, $, D, j; ; ) {
82
+ if (P = l[l.length - 1], this.defaultActions[P] ? w = this.defaultActions[P] : ((v === null || typeof v > "u") && (v = Q()), w = S[P] && S[P][v]), typeof w > "u" || !w.length || !w[0]) {
83
+ var G = "";
84
+ j = [];
85
+ for (N in S[P])
86
+ this.terminals_[N] && N > ut && j.push("'" + this.terminals_[N] + "'");
87
+ k.showPosition ? G = "Parse error on line " + (B + 1) + `:
88
+ ` + k.showPosition() + `
89
+ Expecting ` + j.join(", ") + ", got '" + (this.terminals_[v] || v) + "'" : G = "Parse error on line " + (B + 1) + ": Unexpected " + (v == K ? "end of input" : "'" + (this.terminals_[v] || v) + "'"), this.parseError(G, {
90
+ text: k.match,
91
+ token: this.terminals_[v] || v,
92
+ line: k.yylineno,
93
+ loc: Y,
94
+ expected: j
95
+ });
96
+ }
97
+ if (w[0] instanceof Array && w.length > 1)
98
+ throw new Error("Parse Error: multiple actions possible at state: " + P + ", token: " + v);
99
+ switch (w[0]) {
100
+ case 1:
101
+ l.push(v), f.push(k.yytext), o.push(k.yylloc), l.push(w[1]), v = null, J = k.yyleng, _ = k.yytext, B = k.yylineno, Y = k.yylloc;
102
+ break;
103
+ case 2:
104
+ if ($ = this.productions_[w[1]][1], C.$ = f[f.length - $], C._$ = {
105
+ first_line: o[o.length - ($ || 1)].first_line,
106
+ last_line: o[o.length - 1].last_line,
107
+ first_column: o[o.length - ($ || 1)].first_column,
108
+ last_column: o[o.length - 1].last_column
109
+ }, dt && (C._$.range = [
110
+ o[o.length - ($ || 1)].range[0],
111
+ o[o.length - 1].range[1]
112
+ ]), q = this.performAction.apply(C, [
113
+ _,
114
+ J,
115
+ B,
116
+ E.yy,
117
+ w[1],
118
+ f,
119
+ o
120
+ ].concat(yt)), typeof q < "u")
121
+ return q;
122
+ $ && (l = l.slice(0, -1 * $ * 2), f = f.slice(0, -1 * $), o = o.slice(0, -1 * $)), l.push(this.productions_[w[1]][0]), f.push(C.$), o.push(C._$), D = S[l[l.length - 2]][l[l.length - 1]], l.push(D);
123
+ break;
124
+ case 3:
125
+ return !0;
126
+ }
127
+ }
128
+ return !0;
129
+ }, "parse")
130
+ }, x = /* @__PURE__ */ function() {
131
+ var g = {
132
+ EOF: 1,
133
+ parseError: /* @__PURE__ */ i(function(a, l) {
134
+ if (this.yy.parser)
135
+ this.yy.parser.parseError(a, l);
136
+ else
137
+ throw new Error(a);
138
+ }, "parseError"),
139
+ // resets the lexer, sets new input
140
+ setInput: /* @__PURE__ */ i(function(r, a) {
141
+ return this.yy = a || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
142
+ first_line: 1,
143
+ first_column: 0,
144
+ last_line: 1,
145
+ last_column: 0
146
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
147
+ }, "setInput"),
148
+ // consumes and returns one char from the input
149
+ input: /* @__PURE__ */ i(function() {
150
+ var r = this._input[0];
151
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
152
+ var a = r.match(/(?:\r\n?|\n).*/g);
153
+ return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
154
+ }, "input"),
155
+ // unshifts one char (or a string) into the input
156
+ unput: /* @__PURE__ */ i(function(r) {
157
+ var a = r.length, l = r.split(/(?:\r\n?|\n)/g);
158
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
159
+ var y = this.match.split(/(?:\r\n?|\n)/g);
160
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
161
+ var f = this.yylloc.range;
162
+ return this.yylloc = {
163
+ first_line: this.yylloc.first_line,
164
+ last_line: this.yylineno + 1,
165
+ first_column: this.yylloc.first_column,
166
+ last_column: l ? (l.length === y.length ? this.yylloc.first_column : 0) + y[y.length - l.length].length - l[0].length : this.yylloc.first_column - a
167
+ }, this.options.ranges && (this.yylloc.range = [f[0], f[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
168
+ }, "unput"),
169
+ // When called from action, caches matched text and appends it on next action
170
+ more: /* @__PURE__ */ i(function() {
171
+ return this._more = !0, this;
172
+ }, "more"),
173
+ // 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.
174
+ reject: /* @__PURE__ */ i(function() {
175
+ if (this.options.backtrack_lexer)
176
+ this._backtrack = !0;
177
+ else
178
+ 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).
179
+ ` + this.showPosition(), {
180
+ text: "",
181
+ token: null,
182
+ line: this.yylineno
183
+ });
184
+ return this;
185
+ }, "reject"),
186
+ // retain first n characters of the match
187
+ less: /* @__PURE__ */ i(function(r) {
188
+ this.unput(this.match.slice(r));
189
+ }, "less"),
190
+ // displays already matched input, i.e. for error messages
191
+ pastInput: /* @__PURE__ */ i(function() {
192
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
193
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
194
+ }, "pastInput"),
195
+ // displays upcoming input, i.e. for error messages
196
+ upcomingInput: /* @__PURE__ */ i(function() {
197
+ var r = this.match;
198
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
199
+ }, "upcomingInput"),
200
+ // displays the character position where the lexing error occurred, i.e. for error messages
201
+ showPosition: /* @__PURE__ */ i(function() {
202
+ var r = this.pastInput(), a = new Array(r.length + 1).join("-");
203
+ return r + this.upcomingInput() + `
204
+ ` + a + "^";
205
+ }, "showPosition"),
206
+ // test the lexed token: return FALSE when not a match, otherwise return token
207
+ test_match: /* @__PURE__ */ i(function(r, a) {
208
+ var l, y, f;
209
+ if (this.options.backtrack_lexer && (f = {
210
+ yylineno: this.yylineno,
211
+ yylloc: {
212
+ first_line: this.yylloc.first_line,
213
+ last_line: this.last_line,
214
+ first_column: this.yylloc.first_column,
215
+ last_column: this.yylloc.last_column
216
+ },
217
+ yytext: this.yytext,
218
+ match: this.match,
219
+ matches: this.matches,
220
+ matched: this.matched,
221
+ yyleng: this.yyleng,
222
+ offset: this.offset,
223
+ _more: this._more,
224
+ _input: this._input,
225
+ yy: this.yy,
226
+ conditionStack: this.conditionStack.slice(0),
227
+ done: this.done
228
+ }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), y = r[0].match(/(?:\r\n?|\n).*/g), y && (this.yylineno += y.length), this.yylloc = {
229
+ first_line: this.yylloc.last_line,
230
+ last_line: this.yylineno + 1,
231
+ first_column: this.yylloc.last_column,
232
+ last_column: y ? y[y.length - 1].length - y[y.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
233
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(r[0].length), this.matched += r[0], l = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
234
+ return l;
235
+ if (this._backtrack) {
236
+ for (var o in f)
237
+ this[o] = f[o];
238
+ return !1;
239
+ }
240
+ return !1;
241
+ }, "test_match"),
242
+ // return next match in input
243
+ next: /* @__PURE__ */ i(function() {
244
+ if (this.done)
245
+ return this.EOF;
246
+ this._input || (this.done = !0);
247
+ var r, a, l, y;
248
+ this._more || (this.yytext = "", this.match = "");
249
+ for (var f = this._currentRules(), o = 0; o < f.length; o++)
250
+ if (l = this._input.match(this.rules[f[o]]), l && (!a || l[0].length > a[0].length)) {
251
+ if (a = l, y = o, this.options.backtrack_lexer) {
252
+ if (r = this.test_match(l, f[o]), r !== !1)
253
+ return r;
254
+ if (this._backtrack) {
255
+ a = !1;
256
+ continue;
257
+ } else
258
+ return !1;
259
+ } else if (!this.options.flex)
260
+ break;
261
+ }
262
+ return a ? (r = this.test_match(a, f[y]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
263
+ ` + this.showPosition(), {
264
+ text: "",
265
+ token: null,
266
+ line: this.yylineno
267
+ });
268
+ }, "next"),
269
+ // return next match that has a token
270
+ lex: /* @__PURE__ */ i(function() {
271
+ var a = this.next();
272
+ return a || this.lex();
273
+ }, "lex"),
274
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
275
+ begin: /* @__PURE__ */ i(function(a) {
276
+ this.conditionStack.push(a);
277
+ }, "begin"),
278
+ // pop the previously active lexer condition state off the condition stack
279
+ popState: /* @__PURE__ */ i(function() {
280
+ var a = this.conditionStack.length - 1;
281
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
282
+ }, "popState"),
283
+ // produce the lexer rule set which is active for the currently active lexer condition state
284
+ _currentRules: /* @__PURE__ */ i(function() {
285
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
286
+ }, "_currentRules"),
287
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
288
+ topState: /* @__PURE__ */ i(function(a) {
289
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
290
+ }, "topState"),
291
+ // alias for begin(condition)
292
+ pushState: /* @__PURE__ */ i(function(a) {
293
+ this.begin(a);
294
+ }, "pushState"),
295
+ // return the number of states currently on the stack
296
+ stateStackSize: /* @__PURE__ */ i(function() {
297
+ return this.conditionStack.length;
298
+ }, "stateStackSize"),
299
+ options: { "case-insensitive": !0 },
300
+ performAction: /* @__PURE__ */ i(function(a, l, y, f) {
301
+ switch (y) {
302
+ case 0:
303
+ break;
304
+ case 1:
305
+ break;
306
+ case 2:
307
+ return 10;
308
+ case 3:
309
+ break;
310
+ case 4:
311
+ break;
312
+ case 5:
313
+ return 4;
314
+ case 6:
315
+ return 11;
316
+ case 7:
317
+ return this.begin("acc_title"), 12;
318
+ case 8:
319
+ return this.popState(), "acc_title_value";
320
+ case 9:
321
+ return this.begin("acc_descr"), 14;
322
+ case 10:
323
+ return this.popState(), "acc_descr_value";
324
+ case 11:
325
+ this.begin("acc_descr_multiline");
326
+ break;
327
+ case 12:
328
+ this.popState();
329
+ break;
330
+ case 13:
331
+ return "acc_descr_multiline_value";
332
+ case 14:
333
+ return 17;
334
+ case 15:
335
+ return 18;
336
+ case 16:
337
+ return 19;
338
+ case 17:
339
+ return ":";
340
+ case 18:
341
+ return 6;
342
+ case 19:
343
+ return "INVALID";
344
+ }
345
+ }, "anonymous"),
346
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
347
+ conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], inclusive: !0 } }
348
+ };
349
+ return g;
350
+ }();
351
+ d.lexer = x;
352
+ function m() {
353
+ this.yy = {};
354
+ }
355
+ return i(m, "Parser"), m.prototype = d, d.Parser = m, new m();
356
+ }();
357
+ H.parser = H;
358
+ var $t = H, V = "", U = [], F = [], R = [], Mt = /* @__PURE__ */ i(function() {
359
+ U.length = 0, F.length = 0, V = "", R.length = 0, St();
360
+ }, "clear"), Et = /* @__PURE__ */ i(function(t) {
361
+ V = t, U.push(t);
362
+ }, "addSection"), Pt = /* @__PURE__ */ i(function() {
363
+ return U;
364
+ }, "getSections"), It = /* @__PURE__ */ i(function() {
365
+ let t = et();
366
+ const e = 100;
367
+ let n = 0;
368
+ for (; !t && n < e; )
369
+ t = et(), n++;
370
+ return F.push(...R), F;
371
+ }, "getTasks"), At = /* @__PURE__ */ i(function() {
372
+ const t = [];
373
+ return F.forEach((n) => {
374
+ n.people && t.push(...n.people);
375
+ }), [...new Set(t)].sort();
376
+ }, "updateActors"), Ct = /* @__PURE__ */ i(function(t, e) {
377
+ const n = e.substr(1).split(":");
378
+ let c = 0, s = [];
379
+ n.length === 1 ? (c = Number(n[0]), s = []) : (c = Number(n[0]), s = n[1].split(","));
380
+ const u = s.map((p) => p.trim()), h = {
381
+ section: V,
382
+ type: V,
383
+ people: u,
384
+ task: t,
385
+ score: c
386
+ };
387
+ R.push(h);
388
+ }, "addTask"), Vt = /* @__PURE__ */ i(function(t) {
389
+ const e = {
390
+ section: V,
391
+ type: V,
392
+ description: t,
393
+ task: t,
394
+ classes: []
395
+ };
396
+ F.push(e);
397
+ }, "addTaskOrg"), et = /* @__PURE__ */ i(function() {
398
+ const t = /* @__PURE__ */ i(function(n) {
399
+ return R[n].processed;
400
+ }, "compileTask");
401
+ let e = !0;
402
+ for (const [n, c] of R.entries())
403
+ t(n), e = e && c.processed;
404
+ return e;
405
+ }, "compileTasks"), Ft = /* @__PURE__ */ i(function() {
406
+ return At();
407
+ }, "getActors"), rt = {
408
+ getConfig: /* @__PURE__ */ i(() => A().journey, "getConfig"),
409
+ clear: Mt,
410
+ setDiagramTitle: wt,
411
+ getDiagramTitle: bt,
412
+ setAccTitle: vt,
413
+ getAccTitle: _t,
414
+ setAccDescription: kt,
415
+ getAccDescription: xt,
416
+ addSection: Et,
417
+ getSections: Pt,
418
+ getTasks: It,
419
+ addTask: Ct,
420
+ addTaskOrg: Vt,
421
+ getActors: Ft
422
+ }, Rt = /* @__PURE__ */ i((t) => `.label {
423
+ font-family: ${t.fontFamily};
424
+ color: ${t.textColor};
425
+ }
426
+ .mouth {
427
+ stroke: #666;
428
+ }
429
+
430
+ line {
431
+ stroke: ${t.textColor}
432
+ }
433
+
434
+ .legend {
435
+ fill: ${t.textColor};
436
+ font-family: ${t.fontFamily};
437
+ }
438
+
439
+ .label text {
440
+ fill: #333;
441
+ }
442
+ .label {
443
+ color: ${t.textColor}
444
+ }
445
+
446
+ .face {
447
+ ${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
448
+ stroke: #999;
449
+ }
450
+
451
+ .node rect,
452
+ .node circle,
453
+ .node ellipse,
454
+ .node polygon,
455
+ .node path {
456
+ fill: ${t.mainBkg};
457
+ stroke: ${t.nodeBorder};
458
+ stroke-width: 1px;
459
+ }
460
+
461
+ .node .label {
462
+ text-align: center;
463
+ }
464
+ .node.clickable {
465
+ cursor: pointer;
466
+ }
467
+
468
+ .arrowheadPath {
469
+ fill: ${t.arrowheadColor};
470
+ }
471
+
472
+ .edgePath .path {
473
+ stroke: ${t.lineColor};
474
+ stroke-width: 1.5px;
475
+ }
476
+
477
+ .flowchart-link {
478
+ stroke: ${t.lineColor};
479
+ fill: none;
480
+ }
481
+
482
+ .edgeLabel {
483
+ background-color: ${t.edgeLabelBackground};
484
+ rect {
485
+ opacity: 0.5;
486
+ }
487
+ text-align: center;
488
+ }
489
+
490
+ .cluster rect {
491
+ }
492
+
493
+ .cluster text {
494
+ fill: ${t.titleColor};
495
+ }
496
+
497
+ div.mermaidTooltip {
498
+ position: absolute;
499
+ text-align: center;
500
+ max-width: 200px;
501
+ padding: 2px;
502
+ font-family: ${t.fontFamily};
503
+ font-size: 12px;
504
+ background: ${t.tertiaryColor};
505
+ border: 1px solid ${t.border2};
506
+ border-radius: 2px;
507
+ pointer-events: none;
508
+ z-index: 100;
509
+ }
510
+
511
+ .task-type-0, .section-type-0 {
512
+ ${t.fillType0 ? `fill: ${t.fillType0}` : ""};
513
+ }
514
+ .task-type-1, .section-type-1 {
515
+ ${t.fillType0 ? `fill: ${t.fillType1}` : ""};
516
+ }
517
+ .task-type-2, .section-type-2 {
518
+ ${t.fillType0 ? `fill: ${t.fillType2}` : ""};
519
+ }
520
+ .task-type-3, .section-type-3 {
521
+ ${t.fillType0 ? `fill: ${t.fillType3}` : ""};
522
+ }
523
+ .task-type-4, .section-type-4 {
524
+ ${t.fillType0 ? `fill: ${t.fillType4}` : ""};
525
+ }
526
+ .task-type-5, .section-type-5 {
527
+ ${t.fillType0 ? `fill: ${t.fillType5}` : ""};
528
+ }
529
+ .task-type-6, .section-type-6 {
530
+ ${t.fillType0 ? `fill: ${t.fillType6}` : ""};
531
+ }
532
+ .task-type-7, .section-type-7 {
533
+ ${t.fillType0 ? `fill: ${t.fillType7}` : ""};
534
+ }
535
+
536
+ .actor-0 {
537
+ ${t.actor0 ? `fill: ${t.actor0}` : ""};
538
+ }
539
+ .actor-1 {
540
+ ${t.actor1 ? `fill: ${t.actor1}` : ""};
541
+ }
542
+ .actor-2 {
543
+ ${t.actor2 ? `fill: ${t.actor2}` : ""};
544
+ }
545
+ .actor-3 {
546
+ ${t.actor3 ? `fill: ${t.actor3}` : ""};
547
+ }
548
+ .actor-4 {
549
+ ${t.actor4 ? `fill: ${t.actor4}` : ""};
550
+ }
551
+ .actor-5 {
552
+ ${t.actor5 ? `fill: ${t.actor5}` : ""};
553
+ }
554
+ `, "getStyles"), Lt = Rt, Z = /* @__PURE__ */ i(function(t, e) {
555
+ return mt(t, e);
556
+ }, "drawRect"), Bt = /* @__PURE__ */ i(function(t, e) {
557
+ const c = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), s = t.append("g");
558
+ s.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"), s.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");
559
+ function u(d) {
560
+ const x = tt().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
561
+ d.append("path").attr("class", "mouth").attr("d", x).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
562
+ }
563
+ i(u, "smile");
564
+ function h(d) {
565
+ const x = tt().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
566
+ d.append("path").attr("class", "mouth").attr("d", x).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
567
+ }
568
+ i(h, "sad");
569
+ function p(d) {
570
+ d.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");
571
+ }
572
+ return i(p, "ambivalent"), e.score > 3 ? u(s) : e.score < 3 ? h(s) : p(s), c;
573
+ }, "drawFace"), lt = /* @__PURE__ */ i(function(t, e) {
574
+ const n = t.append("circle");
575
+ return n.attr("cx", e.cx), n.attr("cy", e.cy), n.attr("class", "actor-" + e.pos), n.attr("fill", e.fill), n.attr("stroke", e.stroke), n.attr("r", e.r), n.class !== void 0 && n.attr("class", n.class), e.title !== void 0 && n.append("title").text(e.title), n;
576
+ }, "drawCircle"), ot = /* @__PURE__ */ i(function(t, e) {
577
+ return gt(t, e);
578
+ }, "drawText"), Nt = /* @__PURE__ */ i(function(t, e) {
579
+ function n(s, u, h, p, d) {
580
+ return s + "," + u + " " + (s + h) + "," + u + " " + (s + h) + "," + (u + p - d) + " " + (s + h - d * 1.2) + "," + (u + p) + " " + s + "," + (u + p);
581
+ }
582
+ i(n, "genPoints");
583
+ const c = t.append("polygon");
584
+ c.attr("points", n(e.x, e.y, 50, 20, 7)), c.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, ot(t, e);
585
+ }, "drawLabel"), jt = /* @__PURE__ */ i(function(t, e, n) {
586
+ const c = t.append("g"), s = at();
587
+ s.x = e.x, s.y = e.y, s.fill = e.fill, s.width = n.width * e.taskCount + // width of the tasks
588
+ n.diagramMarginX * (e.taskCount - 1), s.height = n.height, s.class = "journey-section section-type-" + e.num, s.rx = 3, s.ry = 3, Z(c, s), ct(n)(
589
+ e.text,
590
+ c,
591
+ s.x,
592
+ s.y,
593
+ s.width,
594
+ s.height,
595
+ { class: "journey-section section-type-" + e.num },
596
+ n,
597
+ e.colour
598
+ );
599
+ }, "drawSection"), st = -1, zt = /* @__PURE__ */ i(function(t, e, n) {
600
+ const c = e.x + n.width / 2, s = t.append("g");
601
+ st++;
602
+ const u = 300 + 5 * 30;
603
+ s.append("line").attr("id", "task" + st).attr("x1", c).attr("y1", e.y).attr("x2", c).attr("y2", u).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Bt(s, {
604
+ cx: c,
605
+ cy: 300 + (5 - e.score) * 30,
606
+ score: e.score
607
+ });
608
+ const h = at();
609
+ h.x = e.x, h.y = e.y, h.fill = e.fill, h.width = n.width, h.height = n.height, h.class = "task task-type-" + e.num, h.rx = 3, h.ry = 3, Z(s, h);
610
+ let p = e.x + 14;
611
+ e.people.forEach((d) => {
612
+ const x = e.actors[d].color, m = {
613
+ cx: p,
614
+ cy: e.y,
615
+ r: 7,
616
+ fill: x,
617
+ stroke: "#000",
618
+ title: d,
619
+ pos: e.actors[d].position
620
+ };
621
+ lt(s, m), p += 10;
622
+ }), ct(n)(
623
+ e.task,
624
+ s,
625
+ h.x,
626
+ h.y,
627
+ h.width,
628
+ h.height,
629
+ { class: "task" },
630
+ n,
631
+ e.colour
632
+ );
633
+ }, "drawTask"), Ot = /* @__PURE__ */ i(function(t, e) {
634
+ ft(t, e);
635
+ }, "drawBackgroundRect"), ct = /* @__PURE__ */ function() {
636
+ function t(s, u, h, p, d, x, m, g) {
637
+ const r = u.append("text").attr("x", h + d / 2).attr("y", p + x / 2 + 5).style("font-color", g).style("text-anchor", "middle").text(s);
638
+ c(r, m);
639
+ }
640
+ i(t, "byText");
641
+ function e(s, u, h, p, d, x, m, g, r) {
642
+ const { taskFontSize: a, taskFontFamily: l } = g, y = s.split(/<br\s*\/?>/gi);
643
+ for (let f = 0; f < y.length; f++) {
644
+ const o = f * a - a * (y.length - 1) / 2, S = u.append("text").attr("x", h + d / 2).attr("y", p).attr("fill", r).style("text-anchor", "middle").style("font-size", a).style("font-family", l);
645
+ S.append("tspan").attr("x", h + d / 2).attr("dy", o).text(y[f]), S.attr("y", p + x / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), c(S, m);
646
+ }
647
+ }
648
+ i(e, "byTspan");
649
+ function n(s, u, h, p, d, x, m, g) {
650
+ const r = u.append("switch"), l = r.append("foreignObject").attr("x", h).attr("y", p).attr("width", d).attr("height", x).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
651
+ l.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), e(s, r, h, p, d, x, m, g), c(l, m);
652
+ }
653
+ i(n, "byFo");
654
+ function c(s, u) {
655
+ for (const h in u)
656
+ h in u && s.attr(h, u[h]);
657
+ }
658
+ return i(c, "_setTextAttrs"), function(s) {
659
+ return s.textPlacement === "fo" ? n : s.textPlacement === "old" ? t : e;
660
+ };
661
+ }(), Yt = /* @__PURE__ */ i(function(t) {
662
+ 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");
663
+ }, "initGraphics"), L = {
664
+ drawRect: Z,
665
+ drawCircle: lt,
666
+ drawSection: jt,
667
+ drawText: ot,
668
+ drawLabel: Nt,
669
+ drawTask: zt,
670
+ drawBackgroundRect: Ot,
671
+ initGraphics: Yt
672
+ }, qt = /* @__PURE__ */ i(function(t) {
673
+ Object.keys(t).forEach(function(n) {
674
+ z[n] = t[n];
675
+ });
676
+ }, "setConf"), M = {};
677
+ function ht(t) {
678
+ const e = A().journey;
679
+ let n = 60;
680
+ Object.keys(M).forEach((c) => {
681
+ const s = M[c].color, u = {
682
+ cx: 20,
683
+ cy: n,
684
+ r: 7,
685
+ fill: s,
686
+ stroke: "#000",
687
+ pos: M[c].position
688
+ };
689
+ L.drawCircle(t, u);
690
+ const h = {
691
+ x: 40,
692
+ y: n + 7,
693
+ fill: "#666",
694
+ text: c,
695
+ textMargin: e.boxTextMargin | 5
696
+ };
697
+ L.drawText(t, h), n += 20;
698
+ });
699
+ }
700
+ i(ht, "drawActorLegend");
701
+ var z = A().journey, I = z.leftMargin, Gt = /* @__PURE__ */ i(function(t, e, n, c) {
702
+ const s = A().journey, u = A().securityLevel;
703
+ let h;
704
+ u === "sandbox" && (h = W("#i" + e));
705
+ const p = u === "sandbox" ? W(h.nodes()[0].contentDocument.body) : W("body");
706
+ T.init();
707
+ const d = p.select("#" + e);
708
+ L.initGraphics(d);
709
+ const x = c.db.getTasks(), m = c.db.getDiagramTitle(), g = c.db.getActors();
710
+ for (const o in M)
711
+ delete M[o];
712
+ let r = 0;
713
+ g.forEach((o) => {
714
+ M[o] = {
715
+ color: s.actorColours[r % s.actorColours.length],
716
+ position: r
717
+ }, r++;
718
+ }), ht(d), T.insert(0, 0, I, Object.keys(M).length * 50), Wt(d, x, 0);
719
+ const a = T.getBounds();
720
+ m && d.append("text").text(m).attr("x", I).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
721
+ const l = a.stopy - a.starty + 2 * s.diagramMarginY, y = I + a.stopx + 2 * s.diagramMarginX;
722
+ Tt(d, l, y, s.useMaxWidth), d.append("line").attr("x1", I).attr("y1", s.height * 4).attr("x2", y - I - 4).attr("y2", s.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
723
+ const f = m ? 70 : 0;
724
+ d.attr("viewBox", `${a.startx} -25 ${y} ${l + f}`), d.attr("preserveAspectRatio", "xMinYMin meet"), d.attr("height", l + f + 25);
725
+ }, "draw"), T = {
726
+ data: {
727
+ startx: void 0,
728
+ stopx: void 0,
729
+ starty: void 0,
730
+ stopy: void 0
731
+ },
732
+ verticalPos: 0,
733
+ sequenceItems: [],
734
+ init: /* @__PURE__ */ i(function() {
735
+ this.sequenceItems = [], this.data = {
736
+ startx: void 0,
737
+ stopx: void 0,
738
+ starty: void 0,
739
+ stopy: void 0
740
+ }, this.verticalPos = 0;
741
+ }, "init"),
742
+ updateVal: /* @__PURE__ */ i(function(t, e, n, c) {
743
+ t[e] === void 0 ? t[e] = n : t[e] = c(n, t[e]);
744
+ }, "updateVal"),
745
+ updateBounds: /* @__PURE__ */ i(function(t, e, n, c) {
746
+ const s = A().journey, u = this;
747
+ let h = 0;
748
+ function p(d) {
749
+ return /* @__PURE__ */ i(function(m) {
750
+ h++;
751
+ const g = u.sequenceItems.length - h + 1;
752
+ u.updateVal(m, "starty", e - g * s.boxMargin, Math.min), u.updateVal(m, "stopy", c + g * s.boxMargin, Math.max), u.updateVal(T.data, "startx", t - g * s.boxMargin, Math.min), u.updateVal(T.data, "stopx", n + g * s.boxMargin, Math.max), d !== "activation" && (u.updateVal(m, "startx", t - g * s.boxMargin, Math.min), u.updateVal(m, "stopx", n + g * s.boxMargin, Math.max), u.updateVal(T.data, "starty", e - g * s.boxMargin, Math.min), u.updateVal(T.data, "stopy", c + g * s.boxMargin, Math.max));
753
+ }, "updateItemBounds");
754
+ }
755
+ i(p, "updateFn"), this.sequenceItems.forEach(p());
756
+ }, "updateBounds"),
757
+ insert: /* @__PURE__ */ i(function(t, e, n, c) {
758
+ const s = Math.min(t, n), u = Math.max(t, n), h = Math.min(e, c), p = Math.max(e, c);
759
+ this.updateVal(T.data, "startx", s, Math.min), this.updateVal(T.data, "starty", h, Math.min), this.updateVal(T.data, "stopx", u, Math.max), this.updateVal(T.data, "stopy", p, Math.max), this.updateBounds(s, h, u, p);
760
+ }, "insert"),
761
+ bumpVerticalPos: /* @__PURE__ */ i(function(t) {
762
+ this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
763
+ }, "bumpVerticalPos"),
764
+ getVerticalPos: /* @__PURE__ */ i(function() {
765
+ return this.verticalPos;
766
+ }, "getVerticalPos"),
767
+ getBounds: /* @__PURE__ */ i(function() {
768
+ return this.data;
769
+ }, "getBounds")
770
+ }, X = z.sectionFills, it = z.sectionColours, Wt = /* @__PURE__ */ i(function(t, e, n) {
771
+ const c = A().journey;
772
+ let s = "";
773
+ const u = c.height * 2 + c.diagramMarginY, h = n + u;
774
+ let p = 0, d = "#CCC", x = "black", m = 0;
775
+ for (const [g, r] of e.entries()) {
776
+ if (s !== r.section) {
777
+ d = X[p % X.length], m = p % X.length, x = it[p % it.length];
778
+ let l = 0;
779
+ const y = r.section;
780
+ for (let o = g; o < e.length && e[o].section == y; o++)
781
+ l = l + 1;
782
+ const f = {
783
+ x: g * c.taskMargin + g * c.width + I,
784
+ y: 50,
785
+ text: r.section,
786
+ fill: d,
787
+ num: m,
788
+ colour: x,
789
+ taskCount: l
790
+ };
791
+ L.drawSection(t, f, c), s = r.section, p++;
792
+ }
793
+ const a = r.people.reduce((l, y) => (M[y] && (l[y] = M[y]), l), {});
794
+ r.x = g * c.taskMargin + g * c.width + I, r.y = h, r.width = c.diagramMarginX, r.height = c.diagramMarginY, r.colour = x, r.fill = d, r.num = m, r.actors = a, L.drawTask(t, r, c), T.insert(r.x, r.y, r.x + r.width + c.taskMargin, 300 + 5 * 30);
795
+ }
796
+ }, "drawTasks"), nt = {
797
+ setConf: qt,
798
+ draw: Gt
799
+ }, Jt = {
800
+ parser: $t,
801
+ db: rt,
802
+ renderer: nt,
803
+ styles: Lt,
804
+ init: /* @__PURE__ */ i((t) => {
805
+ nt.setConf(t.journey), rt.clear();
806
+ }, "init")
807
+ };
808
+ export {
809
+ Jt as diagram
810
+ };