@peasant-labs/fairtrade 0.0.50 → 0.0.52

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 (126) hide show
  1. package/dist/lib/{adapter-CVKibszh.js → adapter-VlAohr64.js} +107 -102
  2. package/dist/lib/commons.js +544 -522
  3. package/dist/lib/components.css +1 -1
  4. package/dist/lib/share.js +3 -3
  5. package/dist/lib/tokens.css +2 -2
  6. package/dist/lib/tokens.json +2 -2
  7. package/dist/lib/types/AppSidebar.d.ts +9 -11
  8. package/dist/lib/types/Avatar.d.ts +2 -2
  9. package/dist/lib/types/Dialog.d.ts +1 -1
  10. package/dist/lib/types/Input.d.ts +3 -3
  11. package/dist/lib/types/OverflowList.d.ts +1 -1
  12. package/dist/lib/types/RepoPicker.d.ts +3 -1
  13. package/dist/lib/types/Switch.d.ts +1 -1
  14. package/dist/lib/types/commons/Explore.d.ts +1 -1
  15. package/dist/lib/types/commons/types.d.ts +12 -0
  16. package/dist/lib/types/transcript/IntegrityBadge.d.ts +21 -0
  17. package/dist/lib/types/transcript/TranscriptViewer.d.ts +1 -1
  18. package/dist/lib/types/transcript/TurnCard.d.ts +7 -1
  19. package/dist/lib/types/transcript/WorkGroup.d.ts +3 -1
  20. package/dist/lib/types/transcript/integrity.d.ts +36 -0
  21. package/dist/lib/types/transcript/state-capabilities.d.ts +12 -0
  22. package/dist/lib/types/transcript/view-model.d.ts +4 -0
  23. package/dist/lib/types/transcript/work-summary.d.ts +9 -0
  24. package/dist/lib/types/ui/transcript/view-model.d.ts +4 -0
  25. package/dist/lib/{ui-BOGaFxV-.js → ui-BVkbnMN5.js} +2573 -2341
  26. package/dist/lib/ui.js +2 -2
  27. package/package.json +8 -4
  28. package/dist/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +0 -89
  29. package/dist/lib/arc-1xTxsoRi.js +0 -80
  30. package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +0 -3
  31. package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +0 -4145
  32. package/dist/lib/array-CApNbSU9.js +0 -6
  33. package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +0 -1946
  34. package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +0 -2990
  35. package/dist/lib/channel-DagAO2vE.js +0 -5
  36. package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +0 -490
  37. package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +0 -15
  38. package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +0 -236
  39. package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +0 -61
  40. package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +0 -5
  41. package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +0 -1373
  42. package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +0 -1847
  43. package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +0 -4044
  44. package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +0 -10
  45. package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +0 -75
  46. package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +0 -4487
  47. package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +0 -363
  48. package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +0 -12
  49. package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +0 -8
  50. package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +0 -1513
  51. package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +0 -19774
  52. package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +0 -4258
  53. package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +0 -10
  54. package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +0 -67
  55. package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +0 -26
  56. package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +0 -693
  57. package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +0 -9
  58. package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +0 -12
  59. package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +0 -275
  60. package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +0 -37
  61. package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +0 -349
  62. package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +0 -3397
  63. package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +0 -2250
  64. package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +0 -3
  65. package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +0 -349
  66. package/dist/lib/cytoscape.esm-0ojxgO9x.js +0 -18161
  67. package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +0 -2356
  68. package/dist/lib/defaultLocale-BbgDuMnp.js +0 -201
  69. package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +0 -525
  70. package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +0 -134
  71. package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +0 -301
  72. package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +0 -447
  73. package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +0 -214
  74. package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +0 -5084
  75. package/dist/lib/dist-AMlsjiDX.js +0 -59
  76. package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +0 -100
  77. package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +0 -47944
  78. package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +0 -1970
  79. package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +0 -3
  80. package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +0 -17
  81. package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +0 -3094
  82. package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +0 -3
  83. package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +0 -729
  84. package/dist/lib/graphlib-Dndp26xU.js +0 -1267
  85. package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +0 -3
  86. package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +0 -20
  87. package/dist/lib/init-Bwwdo3M6.js +0 -15
  88. package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +0 -719
  89. package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +0 -884
  90. package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +0 -976
  91. package/dist/lib/katex-Dw0PnoPU.js +0 -21850
  92. package/dist/lib/line-C9krU3Sv.js +0 -34
  93. package/dist/lib/linear-Cvilv3OA.js +0 -289
  94. package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +0 -638
  95. package/dist/lib/mermaid.core-UNHMAbBP.js +0 -1126
  96. package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +0 -1011
  97. package/dist/lib/ordinal-C55HfHHp.js +0 -65
  98. package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +0 -3
  99. package/dist/lib/path-DNvJyUE8.js +0 -85
  100. package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +0 -94
  101. package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +0 -3
  102. package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +0 -205
  103. package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +0 -2001
  104. package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +0 -3
  105. package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +0 -3
  106. package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +0 -3
  107. package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +0 -3
  108. package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +0 -3
  109. package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +0 -76
  110. package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +0 -2228
  111. package/dist/lib/rough.esm-a8mysczE.js +0 -1352
  112. package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +0 -970
  113. package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +0 -4253
  114. package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +0 -46
  115. package/dist/lib/src-Dcy0zUZH.js +0 -2153
  116. package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +0 -2143
  117. package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +0 -4764
  118. package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +0 -28
  119. package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +0 -1073
  120. package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +0 -3
  121. package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +0 -3
  122. package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +0 -7190
  123. package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +0 -1880
  124. package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +0 -3
  125. package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +0 -645
  126. package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +0 -2218
@@ -1,1073 +0,0 @@
1
- import { m as e, p as t } from "./src-Dcy0zUZH.js";
2
- import { n, t as r } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
3
- import { Y as i, a, b as o, it as s, nt as c, o as l, tt as u, y as d } from "./chunk-DSNLSHJZ-CpA9d2CJ.js";
4
- import { t as f } from "./arc-1xTxsoRi.js";
5
- import { m as p } from "./chunk-7S6XSTFO-CMt_p-O6.js";
6
- import { t as m } from "./chunk-OYAV6JZA-B1yICcbU.js";
7
- import { i as h, n as g } from "./chunk-J5ZVWO5B-CA_-jk8G.js";
8
- //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-JXYKGLGB.mjs
9
- var _ = (function() {
10
- var e = /* @__PURE__ */ n(function(e, t, n, r) {
11
- for (n ||= {}, r = e.length; r--; n[e[r]] = t);
12
- return n;
13
- }, "o"), t = [
14
- 6,
15
- 11,
16
- 13,
17
- 14,
18
- 15,
19
- 17,
20
- 19,
21
- 20,
22
- 23,
23
- 24
24
- ], r = [1, 12], i = [1, 13], a = [1, 14], o = [1, 15], s = [1, 16], c = [1, 19], l = [1, 20], u = {
25
- trace: /* @__PURE__ */ n(function() {}, "trace"),
26
- yy: {},
27
- symbols_: {
28
- error: 2,
29
- start: 3,
30
- timeline_header: 4,
31
- document: 5,
32
- EOF: 6,
33
- timeline: 7,
34
- timeline_lr: 8,
35
- timeline_td: 9,
36
- line: 10,
37
- SPACE: 11,
38
- statement: 12,
39
- NEWLINE: 13,
40
- title: 14,
41
- acc_title: 15,
42
- acc_title_value: 16,
43
- acc_descr: 17,
44
- acc_descr_value: 18,
45
- acc_descr_multiline_value: 19,
46
- section: 20,
47
- period_statement: 21,
48
- event_statement: 22,
49
- period: 23,
50
- event: 24,
51
- $accept: 0,
52
- $end: 1
53
- },
54
- terminals_: {
55
- 2: "error",
56
- 6: "EOF",
57
- 7: "timeline",
58
- 8: "timeline_lr",
59
- 9: "timeline_td",
60
- 11: "SPACE",
61
- 13: "NEWLINE",
62
- 14: "title",
63
- 15: "acc_title",
64
- 16: "acc_title_value",
65
- 17: "acc_descr",
66
- 18: "acc_descr_value",
67
- 19: "acc_descr_multiline_value",
68
- 20: "section",
69
- 23: "period",
70
- 24: "event"
71
- },
72
- productions_: [
73
- 0,
74
- [3, 3],
75
- [4, 1],
76
- [4, 1],
77
- [4, 1],
78
- [5, 0],
79
- [5, 2],
80
- [10, 2],
81
- [10, 1],
82
- [10, 1],
83
- [10, 1],
84
- [12, 1],
85
- [12, 2],
86
- [12, 2],
87
- [12, 1],
88
- [12, 1],
89
- [12, 1],
90
- [12, 1],
91
- [21, 1],
92
- [22, 1]
93
- ],
94
- performAction: /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
95
- var s = a.length - 1;
96
- switch (i) {
97
- case 1: return a[s - 1];
98
- case 3:
99
- r.setDirection("LR");
100
- break;
101
- case 4:
102
- r.setDirection("TD");
103
- break;
104
- case 5:
105
- this.$ = [];
106
- break;
107
- case 6:
108
- a[s - 1].push(a[s]), this.$ = a[s - 1];
109
- break;
110
- case 7:
111
- case 8:
112
- this.$ = a[s];
113
- break;
114
- case 9:
115
- case 10:
116
- this.$ = [];
117
- break;
118
- case 11:
119
- r.getCommonDb().setDiagramTitle(a[s].substr(6)), this.$ = a[s].substr(6);
120
- break;
121
- case 12:
122
- this.$ = a[s].trim(), r.getCommonDb().setAccTitle(this.$);
123
- break;
124
- case 13:
125
- case 14:
126
- this.$ = a[s].trim(), r.getCommonDb().setAccDescription(this.$);
127
- break;
128
- case 15:
129
- r.addSection(a[s].substr(8)), this.$ = a[s].substr(8);
130
- break;
131
- case 18:
132
- r.addTask(a[s], 0, ""), this.$ = a[s];
133
- break;
134
- case 19:
135
- r.addEvent(a[s].substr(2)), this.$ = a[s];
136
- break;
137
- }
138
- }, "anonymous"),
139
- table: [
140
- {
141
- 3: 1,
142
- 4: 2,
143
- 7: [1, 3],
144
- 8: [1, 4],
145
- 9: [1, 5]
146
- },
147
- { 1: [3] },
148
- e(t, [2, 5], { 5: 6 }),
149
- e(t, [2, 2]),
150
- e(t, [2, 3]),
151
- e(t, [2, 4]),
152
- {
153
- 6: [1, 7],
154
- 10: 8,
155
- 11: [1, 9],
156
- 12: 10,
157
- 13: [1, 11],
158
- 14: r,
159
- 15: i,
160
- 17: a,
161
- 19: o,
162
- 20: s,
163
- 21: 17,
164
- 22: 18,
165
- 23: c,
166
- 24: l
167
- },
168
- e(t, [2, 10], { 1: [2, 1] }),
169
- e(t, [2, 6]),
170
- {
171
- 12: 21,
172
- 14: r,
173
- 15: i,
174
- 17: a,
175
- 19: o,
176
- 20: s,
177
- 21: 17,
178
- 22: 18,
179
- 23: c,
180
- 24: l
181
- },
182
- e(t, [2, 8]),
183
- e(t, [2, 9]),
184
- e(t, [2, 11]),
185
- { 16: [1, 22] },
186
- { 18: [1, 23] },
187
- e(t, [2, 14]),
188
- e(t, [2, 15]),
189
- e(t, [2, 16]),
190
- e(t, [2, 17]),
191
- e(t, [2, 18]),
192
- e(t, [2, 19]),
193
- e(t, [2, 7]),
194
- e(t, [2, 12]),
195
- e(t, [2, 13])
196
- ],
197
- defaultActions: {},
198
- parseError: /* @__PURE__ */ n(function(e, t) {
199
- if (t.recoverable) this.trace(e);
200
- else {
201
- var n = Error(e);
202
- throw n.hash = t, n;
203
- }
204
- }, "parseError"),
205
- parse: /* @__PURE__ */ n(function(e) {
206
- var t = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
207
- for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
208
- h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
209
- var v = h.yylloc;
210
- o.push(v);
211
- var y = h.options && h.options.ranges;
212
- typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
213
- function b(e) {
214
- r.length -= 2 * e, a.length -= e, o.length -= e;
215
- }
216
- n(b, "popStack");
217
- function x() {
218
- var e = i.pop() || h.lex() || p;
219
- return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
220
- }
221
- n(x, "lex");
222
- for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
223
- if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
224
- var M = "";
225
- for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
226
- M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
227
- text: h.match,
228
- token: this.terminals_[S] || S,
229
- line: h.yylineno,
230
- loc: v,
231
- expected: j
232
- });
233
- }
234
- if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
235
- switch (T[0]) {
236
- case 1:
237
- r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
238
- break;
239
- case 2:
240
- if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
241
- first_line: o[o.length - (k || 1)].first_line,
242
- last_line: o[o.length - 1].last_line,
243
- first_column: o[o.length - (k || 1)].first_column,
244
- last_column: o[o.length - 1].last_column
245
- }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
246
- c,
247
- u,
248
- l,
249
- g.yy,
250
- T[1],
251
- a,
252
- o
253
- ].concat(m)), E !== void 0) return E;
254
- k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
255
- break;
256
- case 3: return !0;
257
- }
258
- }
259
- return !0;
260
- }, "parse")
261
- };
262
- u.lexer = /* @__PURE__ */ (function() {
263
- return {
264
- EOF: 1,
265
- parseError: /* @__PURE__ */ n(function(e, t) {
266
- if (this.yy.parser) this.yy.parser.parseError(e, t);
267
- else throw Error(e);
268
- }, "parseError"),
269
- setInput: /* @__PURE__ */ n(function(e, t) {
270
- return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
271
- first_line: 1,
272
- first_column: 0,
273
- last_line: 1,
274
- last_column: 0
275
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
276
- }, "setInput"),
277
- input: /* @__PURE__ */ n(function() {
278
- var e = this._input[0];
279
- return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
280
- }, "input"),
281
- unput: /* @__PURE__ */ n(function(e) {
282
- var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
283
- this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
284
- var r = this.match.split(/(?:\r\n?|\n)/g);
285
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
286
- var i = this.yylloc.range;
287
- return this.yylloc = {
288
- first_line: this.yylloc.first_line,
289
- last_line: this.yylineno + 1,
290
- first_column: this.yylloc.first_column,
291
- last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
292
- }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
293
- }, "unput"),
294
- more: /* @__PURE__ */ n(function() {
295
- return this._more = !0, this;
296
- }, "more"),
297
- reject: /* @__PURE__ */ n(function() {
298
- if (this.options.backtrack_lexer) this._backtrack = !0;
299
- 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(), {
300
- text: "",
301
- token: null,
302
- line: this.yylineno
303
- });
304
- return this;
305
- }, "reject"),
306
- less: /* @__PURE__ */ n(function(e) {
307
- this.unput(this.match.slice(e));
308
- }, "less"),
309
- pastInput: /* @__PURE__ */ n(function() {
310
- var e = this.matched.substr(0, this.matched.length - this.match.length);
311
- return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
312
- }, "pastInput"),
313
- upcomingInput: /* @__PURE__ */ n(function() {
314
- var e = this.match;
315
- return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
316
- }, "upcomingInput"),
317
- showPosition: /* @__PURE__ */ n(function() {
318
- var e = this.pastInput(), t = Array(e.length + 1).join("-");
319
- return e + this.upcomingInput() + "\n" + t + "^";
320
- }, "showPosition"),
321
- test_match: /* @__PURE__ */ n(function(e, t) {
322
- var n, r, i;
323
- if (this.options.backtrack_lexer && (i = {
324
- yylineno: this.yylineno,
325
- yylloc: {
326
- first_line: this.yylloc.first_line,
327
- last_line: this.last_line,
328
- first_column: this.yylloc.first_column,
329
- last_column: this.yylloc.last_column
330
- },
331
- yytext: this.yytext,
332
- match: this.match,
333
- matches: this.matches,
334
- matched: this.matched,
335
- yyleng: this.yyleng,
336
- offset: this.offset,
337
- _more: this._more,
338
- _input: this._input,
339
- yy: this.yy,
340
- conditionStack: this.conditionStack.slice(0),
341
- done: this.done
342
- }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
343
- first_line: this.yylloc.last_line,
344
- last_line: this.yylineno + 1,
345
- first_column: this.yylloc.last_column,
346
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
347
- }, this.yytext += e[0], this.match += e[0], this.matches = e, 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(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
348
- if (this._backtrack) {
349
- for (var a in i) this[a] = i[a];
350
- return !1;
351
- }
352
- return !1;
353
- }, "test_match"),
354
- next: /* @__PURE__ */ n(function() {
355
- if (this.done) return this.EOF;
356
- this._input || (this.done = !0);
357
- var e, t, n, r;
358
- this._more || (this.yytext = "", this.match = "");
359
- for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
360
- if (t = n, r = a, this.options.backtrack_lexer) {
361
- if (e = this.test_match(n, i[a]), e !== !1) return e;
362
- if (this._backtrack) {
363
- t = !1;
364
- continue;
365
- } else return !1;
366
- } else if (!this.options.flex) break;
367
- }
368
- return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
369
- text: "",
370
- token: null,
371
- line: this.yylineno
372
- });
373
- }, "next"),
374
- lex: /* @__PURE__ */ n(function() {
375
- return this.next() || this.lex();
376
- }, "lex"),
377
- begin: /* @__PURE__ */ n(function(e) {
378
- this.conditionStack.push(e);
379
- }, "begin"),
380
- popState: /* @__PURE__ */ n(function() {
381
- return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
382
- }, "popState"),
383
- _currentRules: /* @__PURE__ */ n(function() {
384
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
385
- }, "_currentRules"),
386
- topState: /* @__PURE__ */ n(function(e) {
387
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
388
- }, "topState"),
389
- pushState: /* @__PURE__ */ n(function(e) {
390
- this.begin(e);
391
- }, "pushState"),
392
- stateStackSize: /* @__PURE__ */ n(function() {
393
- return this.conditionStack.length;
394
- }, "stateStackSize"),
395
- options: { "case-insensitive": !0 },
396
- performAction: /* @__PURE__ */ n(function(e, t, n, r) {
397
- switch (n) {
398
- case 0: break;
399
- case 1: break;
400
- case 2: return 13;
401
- case 3: break;
402
- case 4: break;
403
- case 5: return 8;
404
- case 6: return 9;
405
- case 7: return 7;
406
- case 8: return 14;
407
- case 9: return this.begin("acc_title"), 15;
408
- case 10: return this.popState(), "acc_title_value";
409
- case 11: return this.begin("acc_descr"), 17;
410
- case 12: return this.popState(), "acc_descr_value";
411
- case 13:
412
- this.begin("acc_descr_multiline");
413
- break;
414
- case 14:
415
- this.popState();
416
- break;
417
- case 15: return "acc_descr_multiline_value";
418
- case 16: return 20;
419
- case 17: return 24;
420
- case 18: return 23;
421
- case 19: return 6;
422
- case 20: return "INVALID";
423
- }
424
- }, "anonymous"),
425
- rules: [
426
- /^(?:%(?!\{)[^\n]*)/i,
427
- /^(?:[^\}]%%[^\n]*)/i,
428
- /^(?:[\n]+)/i,
429
- /^(?:\s+)/i,
430
- /^(?:#[^\n]*)/i,
431
- /^(?:timeline[ \t]+LR\b)/i,
432
- /^(?:timeline[ \t]+TD\b)/i,
433
- /^(?:timeline\b)/i,
434
- /^(?:title\s[^\n]+)/i,
435
- /^(?:accTitle\s*:\s*)/i,
436
- /^(?:(?!\n||)*[^\n]*)/i,
437
- /^(?:accDescr\s*:\s*)/i,
438
- /^(?:(?!\n||)*[^\n]*)/i,
439
- /^(?:accDescr\s*\{\s*)/i,
440
- /^(?:[\}])/i,
441
- /^(?:[^\}]*)/i,
442
- /^(?:section\s[^:\n]+)/i,
443
- /^(?::\s(?:[^:\n]|:(?!\s))+)/i,
444
- /^(?:[^#:\n]+)/i,
445
- /^(?:$)/i,
446
- /^(?:.)/i
447
- ],
448
- conditions: {
449
- acc_descr_multiline: {
450
- rules: [14, 15],
451
- inclusive: !1
452
- },
453
- acc_descr: {
454
- rules: [12],
455
- inclusive: !1
456
- },
457
- acc_title: {
458
- rules: [10],
459
- inclusive: !1
460
- },
461
- INITIAL: {
462
- rules: [
463
- 0,
464
- 1,
465
- 2,
466
- 3,
467
- 4,
468
- 5,
469
- 6,
470
- 7,
471
- 8,
472
- 9,
473
- 11,
474
- 13,
475
- 16,
476
- 17,
477
- 18,
478
- 19,
479
- 20
480
- ],
481
- inclusive: !0
482
- }
483
- }
484
- };
485
- })();
486
- function d() {
487
- this.yy = {};
488
- }
489
- return n(d, "Parser"), d.prototype = u, u.Parser = d, new d();
490
- })();
491
- _.parser = _;
492
- var v = _, y = {};
493
- r(y, {
494
- addEvent: () => P,
495
- addSection: () => A,
496
- addTask: () => N,
497
- addTaskOrg: () => F,
498
- clear: () => D,
499
- default: () => ee,
500
- getCommonDb: () => E,
501
- getDirection: () => k,
502
- getSections: () => j,
503
- getTasks: () => M,
504
- setDirection: () => O
505
- });
506
- var b = "", x = 0, S = "LR", C = [], w = [], T = [], E = /* @__PURE__ */ n(() => l, "getCommonDb"), D = /* @__PURE__ */ n(function() {
507
- C.length = 0, w.length = 0, b = "", T.length = 0, S = "LR", a();
508
- }, "clear"), O = /* @__PURE__ */ n(function(e) {
509
- S = e;
510
- }, "setDirection"), k = /* @__PURE__ */ n(function() {
511
- return S;
512
- }, "getDirection"), A = /* @__PURE__ */ n(function(e) {
513
- b = e, C.push(e);
514
- }, "addSection"), j = /* @__PURE__ */ n(function() {
515
- return C;
516
- }, "getSections"), M = /* @__PURE__ */ n(function() {
517
- let e = I(), t = 0;
518
- for (; !e && t < 100;) e = I(), t++;
519
- return w.push(...T), w;
520
- }, "getTasks"), N = /* @__PURE__ */ n(function(e, t, n) {
521
- let r = {
522
- id: x++,
523
- section: b,
524
- type: b,
525
- task: e,
526
- score: t || 0,
527
- events: n ? [n] : []
528
- };
529
- T.push(r);
530
- }, "addTask"), P = /* @__PURE__ */ n(function(e) {
531
- T.find((e) => e.id === x - 1).events.push(e);
532
- }, "addEvent"), F = /* @__PURE__ */ n(function(e) {
533
- let t = {
534
- section: b,
535
- type: b,
536
- description: e,
537
- task: e,
538
- classes: []
539
- };
540
- w.push(t);
541
- }, "addTaskOrg"), I = /* @__PURE__ */ n(function() {
542
- let e = /* @__PURE__ */ n(function(e) {
543
- return T[e].processed;
544
- }, "compileTask"), t = !0;
545
- for (let [n, r] of T.entries()) e(n), t &&= r.processed;
546
- return t;
547
- }, "compileTasks"), ee = {
548
- clear: D,
549
- getCommonDb: E,
550
- getDirection: k,
551
- setDirection: O,
552
- addSection: A,
553
- getSections: j,
554
- getTasks: M,
555
- addTask: N,
556
- addTaskOrg: F,
557
- addEvent: P
558
- }, L = 0, R = /* @__PURE__ */ n(function(e, t) {
559
- let n = e.append("rect");
560
- return n.attr("x", t.x), n.attr("y", t.y), n.attr("fill", t.fill), n.attr("stroke", t.stroke), n.attr("width", t.width), n.attr("height", t.height), n.attr("rx", t.rx), n.attr("ry", t.ry), t.class !== void 0 && n.attr("class", t.class), n;
561
- }, "drawRect"), te = /* @__PURE__ */ n(function(e, t) {
562
- let r = e.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), i = e.append("g");
563
- i.append("circle").attr("cx", t.cx - 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), i.append("circle").attr("cx", t.cx + 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
564
- function a(e) {
565
- let n = f().startAngle(Math.PI / 2).endAngle(Math.PI / 2 * 3).innerRadius(15 / 2).outerRadius(15 / 2.2);
566
- e.append("path").attr("class", "mouth").attr("d", n).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
567
- }
568
- n(a, "smile");
569
- function o(e) {
570
- let n = f().startAngle(3 * Math.PI / 2).endAngle(Math.PI / 2 * 5).innerRadius(15 / 2).outerRadius(15 / 2.2);
571
- e.append("path").attr("class", "mouth").attr("d", n).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
572
- }
573
- n(o, "sad");
574
- function s(e) {
575
- e.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");
576
- }
577
- return n(s, "ambivalent"), t.score > 3 ? a(i) : t.score < 3 ? o(i) : s(i), r;
578
- }, "drawFace"), ne = /* @__PURE__ */ n(function(e, t) {
579
- let n = e.append("circle");
580
- return n.attr("cx", t.cx), n.attr("cy", t.cy), n.attr("class", "actor-" + t.pos), n.attr("fill", t.fill), n.attr("stroke", t.stroke), n.attr("r", t.r), n.class !== void 0 && n.attr("class", n.class), t.title !== void 0 && n.append("title").text(t.title), n;
581
- }, "drawCircle"), z = /* @__PURE__ */ n(function(e, t) {
582
- let n = t.text.replace(/<br\s*\/?>/gi, " "), r = e.append("text");
583
- r.attr("x", t.x), r.attr("y", t.y), r.attr("class", "legend"), r.style("text-anchor", t.anchor), t.class !== void 0 && r.attr("class", t.class);
584
- let i = r.append("tspan");
585
- return i.attr("x", t.x + t.textMargin * 2), i.text(n), r;
586
- }, "drawText"), re = /* @__PURE__ */ n(function(e, t) {
587
- function r(e, t, n, r, i) {
588
- return e + "," + t + " " + (e + n) + "," + t + " " + (e + n) + "," + (t + r - i) + " " + (e + n - i * 1.2) + "," + (t + r) + " " + e + "," + (t + r);
589
- }
590
- n(r, "genPoints");
591
- let i = e.append("polygon");
592
- i.attr("points", r(t.x, t.y, 50, 20, 7)), i.attr("class", "labelBox"), t.y += t.labelMargin, t.x += .5 * t.labelMargin, z(e, t);
593
- }, "drawLabel"), ie = /* @__PURE__ */ n(function(e, t, n) {
594
- let r = e.append("g"), i = V();
595
- i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = n.width, i.height = n.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, R(r, i), H(n)(t.text, r, i.x, i.y, i.width, i.height, { class: "journey-section section-type-" + t.num }, n, t.colour);
596
- }, "drawSection"), B = -1, ae = /* @__PURE__ */ n(function(e, t, n, r) {
597
- let i = t.x + n.width / 2, a = e.append("g");
598
- B++, a.append("line").attr("id", r + "-task" + B).attr("x1", i).attr("y1", t.y).attr("x2", i).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), te(a, {
599
- cx: i,
600
- cy: 300 + (5 - t.score) * 30,
601
- score: t.score
602
- });
603
- let o = V();
604
- o.x = t.x, o.y = t.y, o.fill = t.fill, o.width = n.width, o.height = n.height, o.class = "task task-type-" + t.num, o.rx = 3, o.ry = 3, R(a, o), H(n)(t.task, a, o.x, o.y, o.width, o.height, { class: "task" }, n, t.colour);
605
- }, "drawTask"), oe = /* @__PURE__ */ n(function(e, t) {
606
- R(e, {
607
- x: t.startx,
608
- y: t.starty,
609
- width: t.stopx - t.startx,
610
- height: t.stopy - t.starty,
611
- fill: t.fill,
612
- class: "rect"
613
- }).lower();
614
- }, "drawBackgroundRect"), se = /* @__PURE__ */ n(function() {
615
- return {
616
- x: 0,
617
- y: 0,
618
- fill: void 0,
619
- "text-anchor": "start",
620
- width: 100,
621
- height: 100,
622
- textMargin: 0,
623
- rx: 0,
624
- ry: 0
625
- };
626
- }, "getTextObj"), V = /* @__PURE__ */ n(function() {
627
- return {
628
- x: 0,
629
- y: 0,
630
- width: 100,
631
- anchor: "start",
632
- height: 100,
633
- rx: 0,
634
- ry: 0
635
- };
636
- }, "getNoteRect"), H = /* @__PURE__ */ (function() {
637
- function e(e, t, n, r, a, o, s, c) {
638
- i(t.append("text").attr("x", n + a / 2).attr("y", r + o / 2 + 5).style("font-color", c).style("text-anchor", "middle").text(e), s);
639
- }
640
- n(e, "byText");
641
- function t(e, t, n, r, a, o, s, c, l) {
642
- let { taskFontSize: u, taskFontFamily: d } = c, f = e.split(/<br\s*\/?>/gi);
643
- for (let e = 0; e < f.length; e++) {
644
- let c = e * u - u * (f.length - 1) / 2, p = t.append("text").attr("x", n + a / 2).attr("y", r).attr("fill", l).style("text-anchor", "middle").style("font-size", u).style("font-family", d);
645
- p.append("tspan").attr("x", n + a / 2).attr("dy", c).text(f[e]), p.attr("y", r + o / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(p, s);
646
- }
647
- }
648
- n(t, "byTspan");
649
- function r(e, n, r, a, o, s, c, l) {
650
- let u = n.append("switch"), d = u.append("foreignObject").attr("x", r).attr("y", a).attr("width", o).attr("height", s).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
651
- d.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, u, r, a, o, s, c, l), i(d, c);
652
- }
653
- n(r, "byFo");
654
- function i(e, t) {
655
- for (let n in t) n in t && e.attr(n, t[n]);
656
- }
657
- return n(i, "_setTextAttrs"), function(n) {
658
- return n.textPlacement === "fo" ? r : n.textPlacement === "old" ? e : t;
659
- };
660
- })(), ce = /* @__PURE__ */ n(function(e, t) {
661
- L = 0, B = -1, e.append("defs").append("marker").attr("id", t + "-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");
662
- }, "initGraphics");
663
- function U(e, n) {
664
- e.each(function() {
665
- var e = t(this), r = e.text().split(/(\s+|<br>)/).reverse(), i, a = [], o = 1.1, s = e.attr("y"), c = parseFloat(e.attr("dy")), l = e.text(null).append("tspan").attr("x", 0).attr("y", s).attr("dy", c + "em");
666
- for (let t = 0; t < r.length; t++) i = r[r.length - 1 - t], a.push(i), l.text(a.join(" ").trim()), (l.node().getComputedTextLength() > n || i === "<br>") && (a.pop(), l.text(a.join(" ").trim()), a = i === "<br>" ? [""] : [i], l = e.append("tspan").attr("x", 0).attr("y", s).attr("dy", o + "em").text(i));
667
- });
668
- }
669
- n(U, "wrap");
670
- var le = /* @__PURE__ */ n(function(e, n, r, i, a, o = !1) {
671
- let { theme: s, look: c } = i, l = s?.includes("redux"), u = r % (i?.themeVariables?.THEME_COLOR_LIMIT ?? 12) - 1, d = e.append("g");
672
- n.section = u, d.attr("class", (n.class ? n.class + " " : "") + "timeline-node " + ("section-" + u));
673
- let f = d.append("g"), p = d.append("g"), m = p.append("text").text(n.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(U, n.width).node().getBBox(), h = i.fontSize?.replace ? i.fontSize.replace("px", "") : i.fontSize;
674
- if (n.height = m.height + h * 1.1 * .5 + n.padding, n.height = Math.max(n.height, n.maxHeight), n.width += 2 * n.padding, p.attr("transform", "translate(" + n.width / 2 + ", " + n.padding / 2 + ")"), l && p.attr("transform", `translate(${n.width / 2}, ${o ? n.padding / 2 + 3 : n.padding})`), de(f, n, u, a, i), c === "neo" && (d.attr("data-look", "neo"), l)) {
675
- let n = s.includes("dark"), r = t(e.node()?.ownerSVGElement ?? e.node()), i = r.attr("id") ?? "", a = i ? `${i}-drop-shadow` : "drop-shadow";
676
- if (r.select(`#${a}`).empty()) {
677
- let e = r.select("defs");
678
- (e.empty() ? r.append("defs") : e).append("filter").attr("id", a).attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", n ? "0.2" : "0.06").attr("flood-color", n ? "#FFFFFF" : "#000000");
679
- }
680
- }
681
- return n;
682
- }, "drawNode"), ue = /* @__PURE__ */ n(function(e, t, n) {
683
- let r = e.append("g"), i = r.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(U, t.width).node().getBBox(), a = n.fontSize?.replace ? n.fontSize.replace("px", "") : n.fontSize;
684
- return r.remove(), i.height + a * 1.1 * .5 + t.padding;
685
- }, "getVirtualNodeHeight"), de = /* @__PURE__ */ n(function(e, t, n, r, i) {
686
- let { theme: a } = i, o = a?.includes("redux") ? 0 : 5, s = o > 0 ? `M0 ${t.height - 5} v${-t.height + 10} q0,-${o},${o},-${o} h${t.width - 10} q${o},0,${o},${o} v${t.height - 5} H0 Z` : `M0 ${t.height - 5} v${-(t.height - 5)} h${t.width} v${t.height} H0 Z`;
687
- e.append("path").attr("id", r + "-node-" + L++).attr("class", "node-bkg node-" + t.type).attr("d", s), a?.includes("redux") || e.append("line").attr("class", "node-line-" + n).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
688
- }, "defaultBkg"), W = {
689
- drawRect: R,
690
- drawCircle: ne,
691
- drawSection: ie,
692
- drawText: z,
693
- drawLabel: re,
694
- drawTask: ae,
695
- drawBackgroundRect: oe,
696
- getTextObj: se,
697
- getNoteRect: V,
698
- initGraphics: ce,
699
- drawNode: le,
700
- getVirtualNodeHeight: ue
701
- }, fe = /* @__PURE__ */ n(function(n, r, a, s) {
702
- let c = o(), { look: l, theme: u, themeVariables: d } = c, { useGradient: f, gradientStart: p, gradientStop: m } = d, h = c.timeline?.leftMargin ?? 50;
703
- e.debug("timeline", s.db);
704
- let g = c.securityLevel, _;
705
- g === "sandbox" && (_ = t("#i" + r));
706
- let v = t(g === "sandbox" ? _.nodes()[0].contentDocument.body : "body").select("#" + r);
707
- v.append("g");
708
- let y = s.db.getTasks(), b = s.db.getCommonDb().getDiagramTitle();
709
- e.debug("task", y), W.initGraphics(v, r);
710
- let x = s.db.getSections();
711
- e.debug("sections", x);
712
- let S = 0, C = 0, w = 0, T = 0, E = 50 + h, D = 50;
713
- T = 50;
714
- let O = 0, k = !0;
715
- x.forEach(function(t) {
716
- let n = {
717
- number: O,
718
- descr: t,
719
- section: O,
720
- width: 150,
721
- padding: 20,
722
- maxHeight: S
723
- }, r = W.getVirtualNodeHeight(v, n, c);
724
- e.debug("sectionHeight before draw", r), S = Math.max(S, r + 20);
725
- });
726
- let A = 0, j = 0;
727
- e.debug("tasks.length", y.length);
728
- for (let [t, n] of y.entries()) {
729
- let r = {
730
- number: t,
731
- descr: n,
732
- section: n.section,
733
- width: 150,
734
- padding: 20,
735
- maxHeight: C
736
- }, i = W.getVirtualNodeHeight(v, r, c);
737
- e.debug("taskHeight before draw", i), C = Math.max(C, i + 20), A = Math.max(A, n.events.length);
738
- let a = 0;
739
- for (let e of n.events) {
740
- let t = {
741
- descr: e,
742
- section: n.section,
743
- number: n.section,
744
- width: 150,
745
- padding: 20,
746
- maxHeight: 50
747
- };
748
- a += W.getVirtualNodeHeight(v, t, c);
749
- }
750
- n.events.length > 0 && (a += (n.events.length - 1) * 10), j = Math.max(j, a);
751
- }
752
- e.debug("maxSectionHeight before draw", S), e.debug("maxTaskHeight before draw", C), x && x.length > 0 ? x.forEach((t) => {
753
- let n = y.filter((e) => e.section === t), i = {
754
- number: O,
755
- descr: t,
756
- section: O,
757
- width: 200 * Math.max(n.length, 1) - 50,
758
- padding: 20,
759
- maxHeight: S
760
- };
761
- e.debug("sectionNode", i);
762
- let a = v.append("g"), o = W.drawNode(a, i, O, c, r);
763
- e.debug("sectionNode output", o), a.attr("transform", `translate(${E}, ${T})`), D += S + 50, n.length > 0 && G(v, n, O, E, D, C, c, A, j, S, !1, r), E += 200 * Math.max(n.length, 1), D = T, O++;
764
- }) : (k = !1, G(v, y, O, E, D, C, c, A, j, S, !0, r));
765
- let M = v.node().getBBox();
766
- if (e.debug("bounds", M), b && v.append("text").text(b).attr("x", l === "neo" ? M.x * 2 + h : M.width / 2 - h).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), w = k ? S + C + 150 : C + 100, v.append("g").attr("class", "lineWrapper").append("line").attr("x1", h).attr("y1", w).attr("x2", M.width + 3 * h).attr("y2", w).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", `url(#${r}-arrowhead)`), l === "neo" && f && u !== "neutral") {
767
- let e = v.select("defs"), t = (e.empty() ? v.append("defs") : e).append("linearGradient").attr("id", v.attr("id") + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
768
- t.append("stop").attr("offset", "0%").attr("stop-color", p).attr("stop-opacity", 1), t.append("stop").attr("offset", "100%").attr("stop-color", m).attr("stop-opacity", 1);
769
- }
770
- i(void 0, v, c.timeline?.padding ?? 50, c.timeline?.useMaxWidth ?? !1);
771
- }, "draw"), G = /* @__PURE__ */ n(function(t, n, r, i, a, o, s, c, l, u, d, f) {
772
- for (let c of n) {
773
- let n = {
774
- descr: c.task,
775
- section: r,
776
- number: r,
777
- width: 150,
778
- padding: 20,
779
- maxHeight: o
780
- };
781
- e.debug("taskNode", n);
782
- let u = t.append("g").attr("class", "taskWrapper"), p = W.drawNode(u, n, r, s, f).height;
783
- if (e.debug("taskHeight after draw", p), u.attr("transform", `translate(${i}, ${a})`), o = Math.max(o, p), c.events) {
784
- let e = t.append("g").attr("class", "lineWrapper"), n = o;
785
- a += 100, n += pe(t, c.events, r, i, a, s, f), a -= 100, e.append("line").attr("x1", i + 190 / 2).attr("y1", a + o).attr("x2", i + 190 / 2).attr("y2", a + o + 100 + l + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", `url(#${f}-arrowhead)`).attr("stroke-dasharray", "5,5");
786
- }
787
- i += 200, d && !s.timeline?.disableMulticolor && r++;
788
- }
789
- a -= 10;
790
- }, "drawTasks"), pe = /* @__PURE__ */ n(function(t, n, r, i, a, o, s) {
791
- let c = 0, l = a;
792
- a += 100;
793
- for (let l of n) {
794
- let n = {
795
- descr: l,
796
- section: r,
797
- number: r,
798
- width: 150,
799
- padding: 20,
800
- maxHeight: 50
801
- };
802
- e.debug("eventNode", n);
803
- let u = t.append("g").attr("class", "eventWrapper"), d = W.drawNode(u, n, r, o, s, !0).height;
804
- c += d, u.attr("transform", `translate(${i}, ${a})`), a = a + 10 + d;
805
- }
806
- return a = l, c;
807
- }, "drawEvents"), me = {
808
- setConf: /* @__PURE__ */ n(() => {}, "setConf"),
809
- draw: fe
810
- }, K = 200, q = 5, he = K + q * 2, J = K + 100, ge = J + q * 2, Y = 10, _e = 0, X = 20, Z = 20, Q = 30, $ = 50, ve = /* @__PURE__ */ n(function(t, n, r, a) {
811
- let s = o(), c = s.timeline?.leftMargin ?? 50;
812
- e.debug("timeline", a.db);
813
- let l = m(n);
814
- l.append("g");
815
- let u = a.db.getTasks(), d = a.db.getCommonDb().getDiagramTitle();
816
- e.debug("task", u), W.initGraphics(l);
817
- let f = a.db.getSections();
818
- e.debug("sections", f);
819
- let h = 0, g = 0, _ = 50 + c, v = 50, y = v, b = _, x = he + Z, S = ge + $, C = b + x, w = 0, T = f && f.length > 0, E = T ? C : _ + x, D = Math.max(50, x + S - q * 2);
820
- f.forEach(function(t) {
821
- let n = {
822
- number: w,
823
- descr: t,
824
- section: w,
825
- width: D,
826
- padding: q,
827
- maxHeight: h
828
- }, r = W.getVirtualNodeHeight(l, n, s);
829
- e.debug("sectionHeight before draw", r), h = Math.max(h, r);
830
- });
831
- let O = 0;
832
- e.debug("tasks.length", u.length);
833
- for (let [t, n] of u.entries()) {
834
- let r = {
835
- number: t,
836
- descr: n,
837
- section: n.section,
838
- width: K,
839
- padding: q,
840
- maxHeight: g
841
- }, i = W.getVirtualNodeHeight(l, r, s);
842
- e.debug("taskHeight before draw", i), g = Math.max(g, i);
843
- let a = 0;
844
- for (let e of n.events) {
845
- let t = {
846
- descr: e,
847
- section: n.section,
848
- number: n.section,
849
- width: J,
850
- padding: q,
851
- maxHeight: 50
852
- };
853
- a += W.getVirtualNodeHeight(l, t, s);
854
- }
855
- n.events.length > 0 && (a += (n.events.length - 1) * Y), O = Math.max(O, a) + _e;
856
- }
857
- e.debug("maxSectionHeight before draw", h), e.debug("maxTaskHeight before draw", g);
858
- let k = Math.max(g, O) + Q;
859
- T ? f.forEach((t) => {
860
- let n = u.filter((e) => e.section === t), r = {
861
- number: w,
862
- descr: t,
863
- section: w,
864
- width: D,
865
- padding: q,
866
- maxHeight: h
867
- };
868
- e.debug("sectionNode", r);
869
- let i = l.append("g"), a = W.drawNode(i, r, w, s);
870
- e.debug("sectionNode output", a);
871
- let o = E - x;
872
- i.attr("transform", `translate(${o}, ${v})`);
873
- let c = v + a.height + X;
874
- n.length > 0 && ye(l, n, w, E, c, g, s, k, !1);
875
- let d = n.length, f = a.height + X + k * Math.max(d, 1) - (d > 0 ? Q * 2 : 0);
876
- v += f, w++;
877
- }) : ye(l, u, w, E, v, g, s, k, !0);
878
- let A = l.node()?.getBBox();
879
- if (!A) throw Error("bbox not found");
880
- if (e.debug("bounds", A), d) {
881
- if (l.append("text").text(d).attr("x", A.width / 2 - c).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), A = l.node()?.getBBox(), !A) throw Error("bbox not found");
882
- e.debug("bounds after title", A);
883
- }
884
- let [j] = p(s.fontSize), M = (j ?? 16) * 2, N = (j ?? 16) * .5 + 20, P = l.append("g").attr("class", "lineWrapper");
885
- P.append("line").attr("x1", E).attr("y1", y - M).attr("x2", E).attr("y2", A.y + A.height + N).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), P.lower(), i(void 0, l, s.timeline?.padding ?? 50, s.timeline?.useMaxWidth ?? !1);
886
- }, "draw"), ye = /* @__PURE__ */ n(function(t, n, r, i, a, o, s, c, l) {
887
- for (let u of n) {
888
- let n = {
889
- descr: u.task,
890
- section: r,
891
- number: r,
892
- width: K,
893
- padding: q,
894
- maxHeight: o
895
- };
896
- e.debug("taskNode", n);
897
- let d = t.append("g").attr("class", "taskWrapper"), f = W.drawNode(d, n, r, s), p = f.height;
898
- e.debug("taskHeight after draw", p);
899
- let m = i - Z - f.width;
900
- if (d.attr("transform", `translate(${m}, ${a})`), o = Math.max(o, p), u.events && u.events.length > 0) {
901
- let e = a, n = i + $;
902
- be(t, u.events, r, i, n, e, s);
903
- }
904
- a += c, l && !s.timeline?.disableMulticolor && r++;
905
- }
906
- }, "drawTasks"), be = /* @__PURE__ */ n(function(t, n, r, i, a, o, s) {
907
- let c = o;
908
- for (let o of n) {
909
- let n = {
910
- descr: o,
911
- section: r,
912
- number: r,
913
- width: J,
914
- padding: q,
915
- maxHeight: 0
916
- };
917
- e.debug("eventNode", n);
918
- let l = t.append("g").attr("class", "eventWrapper"), u = W.drawNode(l, n, r, s).height;
919
- l.attr("transform", `translate(${a}, ${c})`);
920
- let d = t.append("g").attr("class", "lineWrapper"), f = c + u / 2;
921
- d.append("line").attr("x1", i).attr("y1", f).attr("x2", a).attr("y2", f).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"), c = c + u + Y;
922
- }
923
- return c - o;
924
- }, "drawEvents"), xe = {
925
- setConf: /* @__PURE__ */ n(() => {}, "setConf"),
926
- draw: ve
927
- }, Se = /* @__PURE__ */ n((e) => {
928
- let { theme: t } = d(), n = t?.includes("dark"), r = h(t, e.borderColorArray), i = e.svgId?.replace(/^#/, "") ?? "", a = i ? `url(#${i}-drop-shadow)` : e.dropShadow ?? "none", o = "";
929
- for (let t = 0; t < g(e.THEME_COLOR_LIMIT); t++) {
930
- let i = `${17 - 3 * t}`, s = r ? e.borderColorArray[t % e.borderColorArray.length] : void 0, c = s ?? e.mainBkg, l = s ?? e.nodeBorder;
931
- o += `
932
- .section-${t - 1} rect,
933
- .section-${t - 1} path,
934
- .section-${t - 1} circle {
935
- fill: ${n && r ? e.mainBkg : c};
936
- stroke: ${l};
937
- stroke-width: ${e.strokeWidth};
938
- filter: ${a};
939
- }
940
-
941
- .section-${t - 1} text {
942
- fill: ${e.nodeBorder};
943
- font-weight: ${e.fontWeight}
944
- }
945
-
946
- .node-icon-${t - 1} {
947
- font-size: 40px;
948
- color: ${e["cScaleLabel" + t]};
949
- }
950
-
951
- .section-edge-${t - 1} {
952
- stroke: ${e["cScale" + t]};
953
- }
954
-
955
- .edge-depth-${t - 1} {
956
- stroke-width: ${i};
957
- }
958
-
959
- .section-${t - 1} line {
960
- stroke: ${e["cScaleInv" + t]};
961
- stroke-width: 3;
962
- }
963
-
964
- .lineWrapper line {
965
- stroke: ${e.nodeBorder};
966
- stroke-width:${e.strokeWidth}
967
- }
968
-
969
- .disabled,
970
- .disabled circle,
971
- .disabled text {
972
- fill: ${e.tertiaryColor ?? "lightgray"};
973
- }
974
-
975
- .disabled text {
976
- fill: ${e.clusterBorder ?? "#efefef"};
977
- }
978
- `;
979
- }
980
- return o;
981
- }, "genReduxSections"), Ce = /* @__PURE__ */ n((e) => {
982
- let t = "", n = g(e.THEME_COLOR_LIMIT);
983
- for (let t = 0; t < n; t++) e["lineColor" + t] = e["lineColor" + t] ?? e["cScaleInv" + t], s(e["lineColor" + t]) ? e["lineColor" + t] = c(e["lineColor" + t], 20) : e["lineColor" + t] = u(e["lineColor" + t], 20);
984
- for (let r = 0; r < n; r++) {
985
- let n = "" + (17 - 3 * r);
986
- t += `
987
- .section-${r - 1} rect, .section-${r - 1} path, .section-${r - 1} circle, .section-${r - 1} path {
988
- fill: ${e["cScale" + r]};
989
- }
990
- .section-${r - 1} text {
991
- fill: ${e["cScaleLabel" + r]};
992
- }
993
- .node-icon-${r - 1} {
994
- font-size: 40px;
995
- color: ${e["cScaleLabel" + r]};
996
- }
997
- .section-edge-${r - 1}{
998
- stroke: ${e["cScale" + r]};
999
- }
1000
- .edge-depth-${r - 1}{
1001
- stroke-width: ${n};
1002
- }
1003
- .section-${r - 1} line {
1004
- stroke: ${e["cScaleInv" + r]} ;
1005
- stroke-width: 3;
1006
- }
1007
-
1008
- .lineWrapper line{
1009
- stroke: ${e["cScaleLabel" + r]} ;
1010
- }
1011
-
1012
- .disabled, .disabled circle, .disabled text {
1013
- fill: ${e.tertiaryColor ?? "lightgray"};
1014
- }
1015
- .disabled text {
1016
- fill: ${e.clusterBorder ?? "#efefef"};
1017
- }
1018
- `;
1019
- }
1020
- return t;
1021
- }, "genSections"), we = {
1022
- db: y,
1023
- renderer: {
1024
- setConf: /* @__PURE__ */ n(() => {}, "setConf"),
1025
- draw: /* @__PURE__ */ n((e, t, n, r) => (r?.db?.getDirection?.() ?? "LR") === "TD" ? xe.draw(e, t, n, r) : me.draw(e, t, n, r), "draw")
1026
- },
1027
- parser: v,
1028
- styles: /* @__PURE__ */ n((e) => {
1029
- let { theme: t } = d(), n = t?.includes("redux"), r = t === "neutral", i = e.svgId?.replace(/^#/, "") ?? "", a = "";
1030
- if (e.useGradient && i && e.THEME_COLOR_LIMIT && !r) {
1031
- let t = g(e.THEME_COLOR_LIMIT);
1032
- for (let n = 0; n < t; n++) a += `
1033
- .section-${n - 1}[data-look="neo"] rect,
1034
- .section-${n - 1}[data-look="neo"] path,
1035
- .section-${n - 1}[data-look="neo"] circle {
1036
- fill: ${e.mainBkg};
1037
- stroke: url(#${i}-gradient);
1038
- stroke-width: 2;
1039
- }
1040
- .section-${n - 1}[data-look="neo"] line {
1041
- stroke: url(#${i}-gradient);
1042
- stroke-width: 2;
1043
- }`;
1044
- }
1045
- return `
1046
- .edge {
1047
- stroke-width: 3;
1048
- }
1049
- ${n ? Se(e) : Ce(e)}
1050
- ${a}
1051
- .section-root rect, .section-root path, .section-root circle {
1052
- fill: ${e.git0};
1053
- }
1054
- .section-root text {
1055
- fill: ${e.gitBranchLabel0};
1056
- }
1057
- .icon-container {
1058
- height:100%;
1059
- display: flex;
1060
- justify-content: center;
1061
- align-items: center;
1062
- }
1063
- .edge {
1064
- fill: none;
1065
- }
1066
- .eventWrapper {
1067
- filter: brightness(120%);
1068
- }
1069
- `;
1070
- }, "getStyles")
1071
- };
1072
- //#endregion
1073
- export { we as diagram };