@peasant-labs/fairtrade 0.0.51 → 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 (116) hide show
  1. package/dist/lib/commons.js +544 -522
  2. package/dist/lib/components.css +1 -1
  3. package/dist/lib/share.js +2 -2
  4. package/dist/lib/tokens.css +2 -2
  5. package/dist/lib/tokens.json +2 -2
  6. package/dist/lib/types/AppSidebar.d.ts +9 -11
  7. package/dist/lib/types/Avatar.d.ts +2 -2
  8. package/dist/lib/types/Dialog.d.ts +1 -1
  9. package/dist/lib/types/Input.d.ts +3 -3
  10. package/dist/lib/types/OverflowList.d.ts +1 -1
  11. package/dist/lib/types/RepoPicker.d.ts +3 -1
  12. package/dist/lib/types/Switch.d.ts +1 -1
  13. package/dist/lib/types/commons/Explore.d.ts +1 -1
  14. package/dist/lib/types/commons/types.d.ts +12 -0
  15. package/dist/lib/{ui-Do7A_I-0.js → ui-BVkbnMN5.js} +1637 -1597
  16. package/dist/lib/ui.js +1 -1
  17. package/package.json +1 -1
  18. package/dist/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +0 -89
  19. package/dist/lib/arc-1xTxsoRi.js +0 -80
  20. package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +0 -3
  21. package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +0 -4145
  22. package/dist/lib/array-CApNbSU9.js +0 -6
  23. package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +0 -1946
  24. package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +0 -2990
  25. package/dist/lib/channel-DagAO2vE.js +0 -5
  26. package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +0 -490
  27. package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +0 -15
  28. package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +0 -236
  29. package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +0 -61
  30. package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +0 -5
  31. package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +0 -1373
  32. package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +0 -1847
  33. package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +0 -4044
  34. package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +0 -10
  35. package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +0 -75
  36. package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +0 -4487
  37. package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +0 -363
  38. package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +0 -12
  39. package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +0 -8
  40. package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +0 -1513
  41. package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +0 -19774
  42. package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +0 -4258
  43. package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +0 -10
  44. package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +0 -67
  45. package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +0 -26
  46. package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +0 -693
  47. package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +0 -9
  48. package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +0 -12
  49. package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +0 -275
  50. package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +0 -37
  51. package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +0 -349
  52. package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +0 -3397
  53. package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +0 -2250
  54. package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +0 -3
  55. package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +0 -349
  56. package/dist/lib/cytoscape.esm-0ojxgO9x.js +0 -18161
  57. package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +0 -2356
  58. package/dist/lib/defaultLocale-BbgDuMnp.js +0 -201
  59. package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +0 -525
  60. package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +0 -134
  61. package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +0 -301
  62. package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +0 -447
  63. package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +0 -214
  64. package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +0 -5084
  65. package/dist/lib/dist-AMlsjiDX.js +0 -59
  66. package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +0 -100
  67. package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +0 -47944
  68. package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +0 -1970
  69. package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +0 -3
  70. package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +0 -17
  71. package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +0 -3094
  72. package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +0 -3
  73. package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +0 -729
  74. package/dist/lib/graphlib-Dndp26xU.js +0 -1267
  75. package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +0 -3
  76. package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +0 -20
  77. package/dist/lib/init-Bwwdo3M6.js +0 -15
  78. package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +0 -719
  79. package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +0 -884
  80. package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +0 -976
  81. package/dist/lib/katex-Dw0PnoPU.js +0 -21850
  82. package/dist/lib/line-C9krU3Sv.js +0 -34
  83. package/dist/lib/linear-Cvilv3OA.js +0 -289
  84. package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +0 -638
  85. package/dist/lib/mermaid.core-UNHMAbBP.js +0 -1126
  86. package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +0 -1011
  87. package/dist/lib/ordinal-C55HfHHp.js +0 -65
  88. package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +0 -3
  89. package/dist/lib/path-DNvJyUE8.js +0 -85
  90. package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +0 -94
  91. package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +0 -3
  92. package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +0 -205
  93. package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +0 -2001
  94. package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +0 -3
  95. package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +0 -3
  96. package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +0 -3
  97. package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +0 -3
  98. package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +0 -3
  99. package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +0 -76
  100. package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +0 -2228
  101. package/dist/lib/rough.esm-a8mysczE.js +0 -1352
  102. package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +0 -970
  103. package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +0 -4253
  104. package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +0 -46
  105. package/dist/lib/src-Dcy0zUZH.js +0 -2153
  106. package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +0 -2143
  107. package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +0 -4764
  108. package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +0 -28
  109. package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +0 -1073
  110. package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +0 -3
  111. package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +0 -3
  112. package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +0 -7190
  113. package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +0 -1880
  114. package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +0 -3
  115. package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +0 -645
  116. package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +0 -2218
@@ -1,1946 +0,0 @@
1
- import { m as e, p as t } from "./src-Dcy0zUZH.js";
2
- import { n } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
3
- import { a as r, at as i, b as a, c as o, s, y as c } from "./chunk-DSNLSHJZ-CpA9d2CJ.js";
4
- import { t as l } from "./channel-DagAO2vE.js";
5
- import { A as u, B as d, C as f, D as p, E as m, F as h, G as g, H as _, I as v, K as y, L as b, M as x, N as S, O as C, P as w, R as T, S as E, T as D, U as O, V as k, W as A, j, k as M, u as ee, w as te, z as ne } from "./chunk-7S6XSTFO-CMt_p-O6.js";
6
- import "./chunk-YZO67HFG-D1jKt78p.js";
7
- import "./chunk-AQDTSKZB-DrZccIQa.js";
8
- import { t as re } from "./chunk-5VM5RSS4-BAQ-46g4.js";
9
- import { t as ie } from "./chunk-DUW6YSOI-C-tN4Kiv.js";
10
- import "./chunk-UHW7PFBP-CLrOaA0y.js";
11
- import { i as ae, n as oe, o as se, r as ce, s as le } from "./chunk-J5ZVWO5B-CA_-jk8G.js";
12
- import "./chunk-HAGFOTED-DMU2JNZM.js";
13
- import { i as ue, r as de } from "./chunk-ZAUX2LTX-7XO0Yj1z.js";
14
- import { a as fe, c as pe, i as me, l as he } from "./chunk-WQQL4CDK-DFtyhYZq.js";
15
- import { t as ge } from "./graphlib-Dndp26xU.js";
16
- //#region node_modules/.pnpm/es-toolkit@1.48.1/node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
17
- function _e(e) {
18
- return Array.isArray(e);
19
- }
20
- //#endregion
21
- //#region node_modules/.pnpm/es-toolkit@1.48.1/node_modules/es-toolkit/dist/compat/object/clone.mjs
22
- function ve(e) {
23
- if (y(e)) return e;
24
- let t = g(e);
25
- if (!ye(e)) return {};
26
- if (_e(e)) {
27
- let t = Array.from(e);
28
- return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (t.index = e.index, t.input = e.input), t;
29
- }
30
- if (E(e)) {
31
- let t = e, n = t.constructor;
32
- return new n(t.buffer, t.byteOffset, t.length);
33
- }
34
- if (t === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
35
- if (t === "[object DataView]") {
36
- let t = e, n = t.buffer, r = t.byteOffset, i = t.byteLength, a = new ArrayBuffer(i), o = new Uint8Array(n, r, i);
37
- return new Uint8Array(a).set(o), new DataView(a);
38
- }
39
- if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
40
- let n = e.constructor, r = new n(e.valueOf());
41
- return t === "[object String]" ? xe(r, e) : N(r, e), r;
42
- }
43
- if (t === "[object Date]") return new Date(Number(e));
44
- if (t === "[object RegExp]") {
45
- let t = e, n = new RegExp(t.source, t.flags);
46
- return n.lastIndex = t.lastIndex, n;
47
- }
48
- if (t === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
49
- if (t === "[object Map]") {
50
- let t = e, n = /* @__PURE__ */ new Map();
51
- return t.forEach((e, t) => {
52
- n.set(t, e);
53
- }), n;
54
- }
55
- if (t === "[object Set]") {
56
- let t = e, n = /* @__PURE__ */ new Set();
57
- return t.forEach((e) => {
58
- n.add(e);
59
- }), n;
60
- }
61
- if (t === "[object Arguments]") {
62
- let t = e, n = {};
63
- return N(n, t), n.length = t.length, n[Symbol.iterator] = t[Symbol.iterator], n;
64
- }
65
- let n = {};
66
- return Se(n, e), N(n, e), be(n, e), n;
67
- }
68
- function ye(e) {
69
- switch (g(e)) {
70
- case f:
71
- case D:
72
- case te:
73
- case p:
74
- case m:
75
- case C:
76
- case M:
77
- case u:
78
- case S:
79
- case j:
80
- case x:
81
- case w:
82
- case h:
83
- case v:
84
- case b:
85
- case T:
86
- case ne:
87
- case d:
88
- case O:
89
- case A:
90
- case k:
91
- case _: return !0;
92
- default: return !1;
93
- }
94
- }
95
- function N(e, t) {
96
- for (let n in t) Object.hasOwn(t, n) && (e[n] = t[n]);
97
- }
98
- function be(e, t) {
99
- let n = Object.getOwnPropertySymbols(t);
100
- for (let r = 0; r < n.length; r++) {
101
- let i = n[r];
102
- Object.prototype.propertyIsEnumerable.call(t, i) && (e[i] = t[i]);
103
- }
104
- }
105
- function xe(e, t) {
106
- let n = t.valueOf().length;
107
- for (let r in t) Object.hasOwn(t, r) && (Number.isNaN(Number(r)) || Number(r) >= n) && (e[r] = t[r]);
108
- }
109
- function Se(e, t) {
110
- let n = Object.getPrototypeOf(t);
111
- n !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, n);
112
- }
113
- //#endregion
114
- //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-RJAE7QA3.mjs
115
- var P = (function() {
116
- var e = /* @__PURE__ */ n(function(e, t, n, r) {
117
- for (n ||= {}, r = e.length; r--; n[e[r]] = t);
118
- return n;
119
- }, "o"), t = [1, 15], r = [1, 7], i = [1, 13], a = [1, 14], o = [1, 19], s = [1, 16], c = [1, 17], l = [1, 18], u = [8, 30], d = [
120
- 8,
121
- 10,
122
- 21,
123
- 28,
124
- 29,
125
- 30,
126
- 31,
127
- 39,
128
- 43,
129
- 46
130
- ], f = [1, 23], p = [1, 24], m = [
131
- 8,
132
- 10,
133
- 15,
134
- 16,
135
- 21,
136
- 28,
137
- 29,
138
- 30,
139
- 31,
140
- 39,
141
- 43,
142
- 46
143
- ], h = [
144
- 8,
145
- 10,
146
- 15,
147
- 16,
148
- 21,
149
- 27,
150
- 28,
151
- 29,
152
- 30,
153
- 31,
154
- 39,
155
- 43,
156
- 46
157
- ], g = [1, 49], _ = {
158
- trace: /* @__PURE__ */ n(function() {}, "trace"),
159
- yy: {},
160
- symbols_: {
161
- error: 2,
162
- spaceLines: 3,
163
- SPACELINE: 4,
164
- NL: 5,
165
- separator: 6,
166
- SPACE: 7,
167
- EOF: 8,
168
- start: 9,
169
- BLOCK_DIAGRAM_KEY: 10,
170
- document: 11,
171
- stop: 12,
172
- statement: 13,
173
- link: 14,
174
- LINK: 15,
175
- START_LINK: 16,
176
- LINK_LABEL: 17,
177
- STR: 18,
178
- nodeStatement: 19,
179
- columnsStatement: 20,
180
- SPACE_BLOCK: 21,
181
- blockStatement: 22,
182
- classDefStatement: 23,
183
- cssClassStatement: 24,
184
- styleStatement: 25,
185
- node: 26,
186
- SIZE: 27,
187
- COLUMNS: 28,
188
- "id-block": 29,
189
- end: 30,
190
- NODE_ID: 31,
191
- nodeShapeNLabel: 32,
192
- dirList: 33,
193
- DIR: 34,
194
- NODE_DSTART: 35,
195
- NODE_DEND: 36,
196
- BLOCK_ARROW_START: 37,
197
- BLOCK_ARROW_END: 38,
198
- classDef: 39,
199
- CLASSDEF_ID: 40,
200
- CLASSDEF_STYLEOPTS: 41,
201
- DEFAULT: 42,
202
- class: 43,
203
- CLASSENTITY_IDS: 44,
204
- STYLECLASS: 45,
205
- style: 46,
206
- STYLE_ENTITY_IDS: 47,
207
- STYLE_DEFINITION_DATA: 48,
208
- $accept: 0,
209
- $end: 1
210
- },
211
- terminals_: {
212
- 2: "error",
213
- 4: "SPACELINE",
214
- 5: "NL",
215
- 7: "SPACE",
216
- 8: "EOF",
217
- 10: "BLOCK_DIAGRAM_KEY",
218
- 15: "LINK",
219
- 16: "START_LINK",
220
- 17: "LINK_LABEL",
221
- 18: "STR",
222
- 21: "SPACE_BLOCK",
223
- 27: "SIZE",
224
- 28: "COLUMNS",
225
- 29: "id-block",
226
- 30: "end",
227
- 31: "NODE_ID",
228
- 34: "DIR",
229
- 35: "NODE_DSTART",
230
- 36: "NODE_DEND",
231
- 37: "BLOCK_ARROW_START",
232
- 38: "BLOCK_ARROW_END",
233
- 39: "classDef",
234
- 40: "CLASSDEF_ID",
235
- 41: "CLASSDEF_STYLEOPTS",
236
- 42: "DEFAULT",
237
- 43: "class",
238
- 44: "CLASSENTITY_IDS",
239
- 45: "STYLECLASS",
240
- 46: "style",
241
- 47: "STYLE_ENTITY_IDS",
242
- 48: "STYLE_DEFINITION_DATA"
243
- },
244
- productions_: [
245
- 0,
246
- [3, 1],
247
- [3, 2],
248
- [3, 2],
249
- [6, 1],
250
- [6, 1],
251
- [6, 1],
252
- [9, 3],
253
- [12, 1],
254
- [12, 1],
255
- [12, 2],
256
- [12, 2],
257
- [11, 1],
258
- [11, 2],
259
- [14, 1],
260
- [14, 4],
261
- [13, 1],
262
- [13, 1],
263
- [13, 1],
264
- [13, 1],
265
- [13, 1],
266
- [13, 1],
267
- [13, 1],
268
- [19, 3],
269
- [19, 2],
270
- [19, 1],
271
- [20, 1],
272
- [22, 4],
273
- [22, 3],
274
- [26, 1],
275
- [26, 2],
276
- [33, 1],
277
- [33, 2],
278
- [32, 3],
279
- [32, 4],
280
- [23, 3],
281
- [23, 3],
282
- [24, 3],
283
- [25, 3]
284
- ],
285
- performAction: /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
286
- var s = a.length - 1;
287
- switch (i) {
288
- case 4:
289
- r.getLogger().debug("Rule: separator (NL) ");
290
- break;
291
- case 5:
292
- r.getLogger().debug("Rule: separator (Space) ");
293
- break;
294
- case 6:
295
- r.getLogger().debug("Rule: separator (EOF) ");
296
- break;
297
- case 7:
298
- r.getLogger().debug("Rule: hierarchy: ", a[s - 1]), r.setHierarchy(a[s - 1]);
299
- break;
300
- case 8:
301
- r.getLogger().debug("Stop NL ");
302
- break;
303
- case 9:
304
- r.getLogger().debug("Stop EOF ");
305
- break;
306
- case 10:
307
- r.getLogger().debug("Stop NL2 ");
308
- break;
309
- case 11:
310
- r.getLogger().debug("Stop EOF2 ");
311
- break;
312
- case 12:
313
- r.getLogger().debug("Rule: statement: ", a[s]), typeof a[s].length == "number" ? this.$ = a[s] : this.$ = [a[s]];
314
- break;
315
- case 13:
316
- r.getLogger().debug("Rule: statement #2: ", a[s - 1]), this.$ = [a[s - 1]].concat(a[s]);
317
- break;
318
- case 14:
319
- r.getLogger().debug("Rule: link: ", a[s], e), this.$ = {
320
- edgeTypeStr: a[s],
321
- label: ""
322
- };
323
- break;
324
- case 15:
325
- r.getLogger().debug("Rule: LABEL link: ", a[s - 3], a[s - 1], a[s]), this.$ = {
326
- edgeTypeStr: a[s],
327
- label: a[s - 1]
328
- };
329
- break;
330
- case 18:
331
- let t = parseInt(a[s]), n = r.generateId();
332
- this.$ = {
333
- id: n,
334
- type: "space",
335
- label: "",
336
- width: t,
337
- children: []
338
- };
339
- break;
340
- case 23:
341
- r.getLogger().debug("Rule: (nodeStatement link node) ", a[s - 2], a[s - 1], a[s], " typestr: ", a[s - 1].edgeTypeStr);
342
- let i = r.edgeStrToEdgeData(a[s - 1].edgeTypeStr), o = r.edgeStrToEdgeStartData(a[s - 1].edgeTypeStr), c = r.edgeStrToThickness(a[s - 1].edgeTypeStr), l = r.edgeStrToPattern(a[s - 1].edgeTypeStr);
343
- this.$ = [
344
- {
345
- id: a[s - 2].id,
346
- label: a[s - 2].label,
347
- type: a[s - 2].type,
348
- directions: a[s - 2].directions
349
- },
350
- {
351
- id: a[s - 2].id + "-" + a[s].id,
352
- start: a[s - 2].id,
353
- end: a[s].id,
354
- label: a[s - 1].label,
355
- type: "edge",
356
- thickness: c,
357
- pattern: l,
358
- directions: a[s].directions,
359
- arrowTypeEnd: i,
360
- arrowTypeStart: o
361
- },
362
- {
363
- id: a[s].id,
364
- label: a[s].label,
365
- type: r.typeStr2Type(a[s].typeStr),
366
- directions: a[s].directions
367
- }
368
- ];
369
- break;
370
- case 24:
371
- r.getLogger().debug("Rule: nodeStatement (abc88 node size) ", a[s - 1], a[s]), this.$ = {
372
- id: a[s - 1].id,
373
- label: a[s - 1].label,
374
- type: r.typeStr2Type(a[s - 1].typeStr),
375
- directions: a[s - 1].directions,
376
- widthInColumns: parseInt(a[s], 10)
377
- };
378
- break;
379
- case 25:
380
- r.getLogger().debug("Rule: nodeStatement (node) ", a[s]), this.$ = {
381
- id: a[s].id,
382
- label: a[s].label,
383
- type: r.typeStr2Type(a[s].typeStr),
384
- directions: a[s].directions,
385
- widthInColumns: 1
386
- };
387
- break;
388
- case 26:
389
- r.getLogger().debug("APA123", this ? this : "na"), r.getLogger().debug("COLUMNS: ", a[s]), this.$ = {
390
- type: "column-setting",
391
- columns: a[s] === "auto" ? -1 : parseInt(a[s])
392
- };
393
- break;
394
- case 27:
395
- r.getLogger().debug("Rule: id-block statement : ", a[s - 2], a[s - 1]), r.generateId(), this.$ = {
396
- ...a[s - 2],
397
- type: "composite",
398
- children: a[s - 1]
399
- };
400
- break;
401
- case 28:
402
- r.getLogger().debug("Rule: blockStatement : ", a[s - 2], a[s - 1], a[s]);
403
- let u = r.generateId();
404
- this.$ = {
405
- id: u,
406
- type: "composite",
407
- label: "",
408
- children: a[s - 1]
409
- };
410
- break;
411
- case 29:
412
- r.getLogger().debug("Rule: node (NODE_ID separator): ", a[s]), this.$ = { id: a[s] };
413
- break;
414
- case 30:
415
- r.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", a[s - 1], a[s]), this.$ = {
416
- id: a[s - 1],
417
- label: a[s].label,
418
- typeStr: a[s].typeStr,
419
- directions: a[s].directions
420
- };
421
- break;
422
- case 31:
423
- r.getLogger().debug("Rule: dirList: ", a[s]), this.$ = [a[s]];
424
- break;
425
- case 32:
426
- r.getLogger().debug("Rule: dirList: ", a[s - 1], a[s]), this.$ = [a[s - 1]].concat(a[s]);
427
- break;
428
- case 33:
429
- r.getLogger().debug("Rule: nodeShapeNLabel: ", a[s - 2], a[s - 1], a[s]), this.$ = {
430
- typeStr: a[s - 2] + a[s],
431
- label: a[s - 1]
432
- };
433
- break;
434
- case 34:
435
- r.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", a[s - 3], a[s - 2], " #3:", a[s - 1], a[s]), this.$ = {
436
- typeStr: a[s - 3] + a[s],
437
- label: a[s - 2],
438
- directions: a[s - 1]
439
- };
440
- break;
441
- case 35:
442
- case 36:
443
- this.$ = {
444
- type: "classDef",
445
- id: a[s - 1].trim(),
446
- css: a[s].trim()
447
- };
448
- break;
449
- case 37:
450
- this.$ = {
451
- type: "applyClass",
452
- id: a[s - 1].trim(),
453
- styleClass: a[s].trim()
454
- };
455
- break;
456
- case 38:
457
- this.$ = {
458
- type: "applyStyles",
459
- id: a[s - 1].trim(),
460
- stylesStr: a[s].trim()
461
- };
462
- break;
463
- }
464
- }, "anonymous"),
465
- table: [
466
- {
467
- 9: 1,
468
- 10: [1, 2]
469
- },
470
- { 1: [3] },
471
- {
472
- 10: t,
473
- 11: 3,
474
- 13: 4,
475
- 19: 5,
476
- 20: 6,
477
- 21: r,
478
- 22: 8,
479
- 23: 9,
480
- 24: 10,
481
- 25: 11,
482
- 26: 12,
483
- 28: i,
484
- 29: a,
485
- 31: o,
486
- 39: s,
487
- 43: c,
488
- 46: l
489
- },
490
- { 8: [1, 20] },
491
- e(u, [2, 12], {
492
- 13: 4,
493
- 19: 5,
494
- 20: 6,
495
- 22: 8,
496
- 23: 9,
497
- 24: 10,
498
- 25: 11,
499
- 26: 12,
500
- 11: 21,
501
- 10: t,
502
- 21: r,
503
- 28: i,
504
- 29: a,
505
- 31: o,
506
- 39: s,
507
- 43: c,
508
- 46: l
509
- }),
510
- e(d, [2, 16], {
511
- 14: 22,
512
- 15: f,
513
- 16: p
514
- }),
515
- e(d, [2, 17]),
516
- e(d, [2, 18]),
517
- e(d, [2, 19]),
518
- e(d, [2, 20]),
519
- e(d, [2, 21]),
520
- e(d, [2, 22]),
521
- e(m, [2, 25], { 27: [1, 25] }),
522
- e(d, [2, 26]),
523
- {
524
- 19: 26,
525
- 26: 12,
526
- 31: o
527
- },
528
- {
529
- 10: t,
530
- 11: 27,
531
- 13: 4,
532
- 19: 5,
533
- 20: 6,
534
- 21: r,
535
- 22: 8,
536
- 23: 9,
537
- 24: 10,
538
- 25: 11,
539
- 26: 12,
540
- 28: i,
541
- 29: a,
542
- 31: o,
543
- 39: s,
544
- 43: c,
545
- 46: l
546
- },
547
- {
548
- 40: [1, 28],
549
- 42: [1, 29]
550
- },
551
- { 44: [1, 30] },
552
- { 47: [1, 31] },
553
- e(h, [2, 29], {
554
- 32: 32,
555
- 35: [1, 33],
556
- 37: [1, 34]
557
- }),
558
- { 1: [2, 7] },
559
- e(u, [2, 13]),
560
- {
561
- 26: 35,
562
- 31: o
563
- },
564
- { 31: [2, 14] },
565
- { 17: [1, 36] },
566
- e(m, [2, 24]),
567
- {
568
- 10: t,
569
- 11: 37,
570
- 13: 4,
571
- 14: 22,
572
- 15: f,
573
- 16: p,
574
- 19: 5,
575
- 20: 6,
576
- 21: r,
577
- 22: 8,
578
- 23: 9,
579
- 24: 10,
580
- 25: 11,
581
- 26: 12,
582
- 28: i,
583
- 29: a,
584
- 31: o,
585
- 39: s,
586
- 43: c,
587
- 46: l
588
- },
589
- { 30: [1, 38] },
590
- { 41: [1, 39] },
591
- { 41: [1, 40] },
592
- { 45: [1, 41] },
593
- { 48: [1, 42] },
594
- e(h, [2, 30]),
595
- { 18: [1, 43] },
596
- { 18: [1, 44] },
597
- e(m, [2, 23]),
598
- { 18: [1, 45] },
599
- { 30: [1, 46] },
600
- e(d, [2, 28]),
601
- e(d, [2, 35]),
602
- e(d, [2, 36]),
603
- e(d, [2, 37]),
604
- e(d, [2, 38]),
605
- { 36: [1, 47] },
606
- {
607
- 33: 48,
608
- 34: g
609
- },
610
- { 15: [1, 50] },
611
- e(d, [2, 27]),
612
- e(h, [2, 33]),
613
- { 38: [1, 51] },
614
- {
615
- 33: 52,
616
- 34: g,
617
- 38: [2, 31]
618
- },
619
- { 31: [2, 15] },
620
- e(h, [2, 34]),
621
- { 38: [2, 32] }
622
- ],
623
- defaultActions: {
624
- 20: [2, 7],
625
- 23: [2, 14],
626
- 50: [2, 15],
627
- 52: [2, 32]
628
- },
629
- parseError: /* @__PURE__ */ n(function(e, t) {
630
- if (t.recoverable) this.trace(e);
631
- else {
632
- var n = Error(e);
633
- throw n.hash = t, n;
634
- }
635
- }, "parseError"),
636
- parse: /* @__PURE__ */ n(function(e) {
637
- 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: {} };
638
- for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
639
- h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
640
- var v = h.yylloc;
641
- o.push(v);
642
- var y = h.options && h.options.ranges;
643
- typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
644
- function b(e) {
645
- r.length -= 2 * e, a.length -= e, o.length -= e;
646
- }
647
- n(b, "popStack");
648
- function x() {
649
- var e = i.pop() || h.lex() || p;
650
- return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
651
- }
652
- n(x, "lex");
653
- for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
654
- 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]) {
655
- var M = "";
656
- for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
657
- 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, {
658
- text: h.match,
659
- token: this.terminals_[S] || S,
660
- line: h.yylineno,
661
- loc: v,
662
- expected: j
663
- });
664
- }
665
- if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
666
- switch (T[0]) {
667
- case 1:
668
- 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--);
669
- break;
670
- case 2:
671
- if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
672
- first_line: o[o.length - (k || 1)].first_line,
673
- last_line: o[o.length - 1].last_line,
674
- first_column: o[o.length - (k || 1)].first_column,
675
- last_column: o[o.length - 1].last_column
676
- }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
677
- c,
678
- u,
679
- l,
680
- g.yy,
681
- T[1],
682
- a,
683
- o
684
- ].concat(m)), E !== void 0) return E;
685
- 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);
686
- break;
687
- case 3: return !0;
688
- }
689
- }
690
- return !0;
691
- }, "parse")
692
- };
693
- _.lexer = /* @__PURE__ */ (function() {
694
- return {
695
- EOF: 1,
696
- parseError: /* @__PURE__ */ n(function(e, t) {
697
- if (this.yy.parser) this.yy.parser.parseError(e, t);
698
- else throw Error(e);
699
- }, "parseError"),
700
- setInput: /* @__PURE__ */ n(function(e, t) {
701
- 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 = {
702
- first_line: 1,
703
- first_column: 0,
704
- last_line: 1,
705
- last_column: 0
706
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
707
- }, "setInput"),
708
- input: /* @__PURE__ */ n(function() {
709
- var e = this._input[0];
710
- 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;
711
- }, "input"),
712
- unput: /* @__PURE__ */ n(function(e) {
713
- var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
714
- this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
715
- var r = this.match.split(/(?:\r\n?|\n)/g);
716
- 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);
717
- var i = this.yylloc.range;
718
- return this.yylloc = {
719
- first_line: this.yylloc.first_line,
720
- last_line: this.yylineno + 1,
721
- first_column: this.yylloc.first_column,
722
- 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
723
- }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
724
- }, "unput"),
725
- more: /* @__PURE__ */ n(function() {
726
- return this._more = !0, this;
727
- }, "more"),
728
- reject: /* @__PURE__ */ n(function() {
729
- if (this.options.backtrack_lexer) this._backtrack = !0;
730
- 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(), {
731
- text: "",
732
- token: null,
733
- line: this.yylineno
734
- });
735
- return this;
736
- }, "reject"),
737
- less: /* @__PURE__ */ n(function(e) {
738
- this.unput(this.match.slice(e));
739
- }, "less"),
740
- pastInput: /* @__PURE__ */ n(function() {
741
- var e = this.matched.substr(0, this.matched.length - this.match.length);
742
- return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
743
- }, "pastInput"),
744
- upcomingInput: /* @__PURE__ */ n(function() {
745
- var e = this.match;
746
- return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
747
- }, "upcomingInput"),
748
- showPosition: /* @__PURE__ */ n(function() {
749
- var e = this.pastInput(), t = Array(e.length + 1).join("-");
750
- return e + this.upcomingInput() + "\n" + t + "^";
751
- }, "showPosition"),
752
- test_match: /* @__PURE__ */ n(function(e, t) {
753
- var n, r, i;
754
- if (this.options.backtrack_lexer && (i = {
755
- yylineno: this.yylineno,
756
- yylloc: {
757
- first_line: this.yylloc.first_line,
758
- last_line: this.last_line,
759
- first_column: this.yylloc.first_column,
760
- last_column: this.yylloc.last_column
761
- },
762
- yytext: this.yytext,
763
- match: this.match,
764
- matches: this.matches,
765
- matched: this.matched,
766
- yyleng: this.yyleng,
767
- offset: this.offset,
768
- _more: this._more,
769
- _input: this._input,
770
- yy: this.yy,
771
- conditionStack: this.conditionStack.slice(0),
772
- done: this.done
773
- }, 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 = {
774
- first_line: this.yylloc.last_line,
775
- last_line: this.yylineno + 1,
776
- first_column: this.yylloc.last_column,
777
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
778
- }, 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;
779
- if (this._backtrack) {
780
- for (var a in i) this[a] = i[a];
781
- return !1;
782
- }
783
- return !1;
784
- }, "test_match"),
785
- next: /* @__PURE__ */ n(function() {
786
- if (this.done) return this.EOF;
787
- this._input || (this.done = !0);
788
- var e, t, n, r;
789
- this._more || (this.yytext = "", this.match = "");
790
- 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)) {
791
- if (t = n, r = a, this.options.backtrack_lexer) {
792
- if (e = this.test_match(n, i[a]), e !== !1) return e;
793
- if (this._backtrack) {
794
- t = !1;
795
- continue;
796
- } else return !1;
797
- } else if (!this.options.flex) break;
798
- }
799
- 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(), {
800
- text: "",
801
- token: null,
802
- line: this.yylineno
803
- });
804
- }, "next"),
805
- lex: /* @__PURE__ */ n(function() {
806
- return this.next() || this.lex();
807
- }, "lex"),
808
- begin: /* @__PURE__ */ n(function(e) {
809
- this.conditionStack.push(e);
810
- }, "begin"),
811
- popState: /* @__PURE__ */ n(function() {
812
- return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
813
- }, "popState"),
814
- _currentRules: /* @__PURE__ */ n(function() {
815
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
816
- }, "_currentRules"),
817
- topState: /* @__PURE__ */ n(function(e) {
818
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
819
- }, "topState"),
820
- pushState: /* @__PURE__ */ n(function(e) {
821
- this.begin(e);
822
- }, "pushState"),
823
- stateStackSize: /* @__PURE__ */ n(function() {
824
- return this.conditionStack.length;
825
- }, "stateStackSize"),
826
- options: {},
827
- performAction: /* @__PURE__ */ n(function(e, t, n, r) {
828
- switch (n) {
829
- case 0: return e.getLogger().debug("Found block-beta"), 10;
830
- case 1: return e.getLogger().debug("Found id-block"), 29;
831
- case 2: return e.getLogger().debug("Found block"), 10;
832
- case 3:
833
- e.getLogger().debug(".", t.yytext);
834
- break;
835
- case 4:
836
- e.getLogger().debug("_", t.yytext);
837
- break;
838
- case 5: return 5;
839
- case 6: return t.yytext = -1, 28;
840
- case 7: return t.yytext = t.yytext.replace(/columns\s+/, ""), e.getLogger().debug("COLUMNS (LEX)", t.yytext), 28;
841
- case 8:
842
- this.pushState("md_string");
843
- break;
844
- case 9: return "MD_STR";
845
- case 10:
846
- this.popState();
847
- break;
848
- case 11:
849
- this.pushState("string");
850
- break;
851
- case 12:
852
- e.getLogger().debug("LEX: POPPING STR:", t.yytext), this.popState();
853
- break;
854
- case 13: return e.getLogger().debug("LEX: STR end:", t.yytext), "STR";
855
- case 14: return t.yytext = t.yytext.replace(/space\:/, ""), e.getLogger().debug("SPACE NUM (LEX)", t.yytext), 21;
856
- case 15: return t.yytext = "1", e.getLogger().debug("COLUMNS (LEX)", t.yytext), 21;
857
- case 16: return 42;
858
- case 17: return "LINKSTYLE";
859
- case 18: return "INTERPOLATE";
860
- case 19: return this.pushState("CLASSDEF"), 39;
861
- case 20: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
862
- case 21: return this.popState(), this.pushState("CLASSDEFID"), 40;
863
- case 22: return this.popState(), 41;
864
- case 23: return this.pushState("CLASS"), 43;
865
- case 24: return this.popState(), this.pushState("CLASS_STYLE"), 44;
866
- case 25: return this.popState(), 45;
867
- case 26: return this.pushState("STYLE_STMNT"), 46;
868
- case 27: return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
869
- case 28: return this.popState(), 48;
870
- case 29: return this.pushState("acc_title"), "acc_title";
871
- case 30: return this.popState(), "acc_title_value";
872
- case 31: return this.pushState("acc_descr"), "acc_descr";
873
- case 32: return this.popState(), "acc_descr_value";
874
- case 33:
875
- this.pushState("acc_descr_multiline");
876
- break;
877
- case 34:
878
- this.popState();
879
- break;
880
- case 35: return "acc_descr_multiline_value";
881
- case 36: return 30;
882
- case 37: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
883
- case 38: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
884
- case 39: return this.popState(), e.getLogger().debug("Lex: ))"), "NODE_DEND";
885
- case 40: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
886
- case 41: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
887
- case 42: return this.popState(), e.getLogger().debug("Lex: (-"), "NODE_DEND";
888
- case 43: return this.popState(), e.getLogger().debug("Lex: -)"), "NODE_DEND";
889
- case 44: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
890
- case 45: return this.popState(), e.getLogger().debug("Lex: ]]"), "NODE_DEND";
891
- case 46: return this.popState(), e.getLogger().debug("Lex: ("), "NODE_DEND";
892
- case 47: return this.popState(), e.getLogger().debug("Lex: ])"), "NODE_DEND";
893
- case 48: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
894
- case 49: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
895
- case 50: return this.popState(), e.getLogger().debug("Lex: )]"), "NODE_DEND";
896
- case 51: return this.popState(), e.getLogger().debug("Lex: )"), "NODE_DEND";
897
- case 52: return this.popState(), e.getLogger().debug("Lex: ]>"), "NODE_DEND";
898
- case 53: return this.popState(), e.getLogger().debug("Lex: ]"), "NODE_DEND";
899
- case 54: return e.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
900
- case 55: return e.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
901
- case 56: return e.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
902
- case 57: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
903
- case 58: return e.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
904
- case 59: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
905
- case 60: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
906
- case 61: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
907
- case 62: return e.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
908
- case 63: return e.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
909
- case 64: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
910
- case 65: return this.pushState("NODE"), 35;
911
- case 66: return this.pushState("NODE"), 35;
912
- case 67: return this.pushState("NODE"), 35;
913
- case 68: return this.pushState("NODE"), 35;
914
- case 69: return this.pushState("NODE"), 35;
915
- case 70: return this.pushState("NODE"), 35;
916
- case 71: return this.pushState("NODE"), 35;
917
- case 72: return e.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
918
- case 73: return this.pushState("BLOCK_ARROW"), e.getLogger().debug("LEX ARR START"), 37;
919
- case 74: return e.getLogger().debug("Lex: NODE_ID", t.yytext), 31;
920
- case 75: return e.getLogger().debug("Lex: EOF", t.yytext), 8;
921
- case 76:
922
- this.pushState("md_string");
923
- break;
924
- case 77:
925
- this.pushState("md_string");
926
- break;
927
- case 78: return "NODE_DESCR";
928
- case 79:
929
- this.popState();
930
- break;
931
- case 80:
932
- e.getLogger().debug("Lex: Starting string"), this.pushState("string");
933
- break;
934
- case 81:
935
- e.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
936
- break;
937
- case 82: return e.getLogger().debug("LEX: NODE_DESCR:", t.yytext), "NODE_DESCR";
938
- case 83:
939
- e.getLogger().debug("LEX POPPING"), this.popState();
940
- break;
941
- case 84:
942
- e.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
943
- break;
944
- case 85: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (right): dir:", t.yytext), "DIR";
945
- case 86: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (left):", t.yytext), "DIR";
946
- case 87: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (x):", t.yytext), "DIR";
947
- case 88: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (y):", t.yytext), "DIR";
948
- case 89: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (up):", t.yytext), "DIR";
949
- case 90: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (down):", t.yytext), "DIR";
950
- case 91: return t.yytext = "]>", e.getLogger().debug("Lex (ARROW_DIR end):", t.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
951
- case 92: return e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
952
- case 93: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
953
- case 94: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
954
- case 95: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
955
- case 96: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
956
- case 97: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
957
- case 98: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
958
- case 99:
959
- this.pushState("md_string");
960
- break;
961
- case 100: return e.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
962
- case 101: return this.popState(), e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
963
- case 102: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
964
- case 103: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
965
- case 104: return e.getLogger().debug("Lex: COLON", t.yytext), t.yytext = t.yytext.slice(1), 27;
966
- }
967
- }, "anonymous"),
968
- rules: [
969
- /^(?:block-beta\b)/,
970
- /^(?:block:)/,
971
- /^(?:block\b)/,
972
- /^(?:[\s]+)/,
973
- /^(?:[\n]+)/,
974
- /^(?:((\u000D\u000A)|(\u000A)))/,
975
- /^(?:columns\s+auto\b)/,
976
- /^(?:columns\s+[\d]+)/,
977
- /^(?:["][`])/,
978
- /^(?:[^`"]+)/,
979
- /^(?:[`]["])/,
980
- /^(?:["])/,
981
- /^(?:["])/,
982
- /^(?:[^"]*)/,
983
- /^(?:space[:]\d+)/,
984
- /^(?:space\b)/,
985
- /^(?:default\b)/,
986
- /^(?:linkStyle\b)/,
987
- /^(?:interpolate\b)/,
988
- /^(?:classDef\s+)/,
989
- /^(?:DEFAULT\s+)/,
990
- /^(?:\w+\s+)/,
991
- /^(?:[^\n]*)/,
992
- /^(?:class\s+)/,
993
- /^(?:(\w+)+((,\s*\w+)*))/,
994
- /^(?:[^\n]*)/,
995
- /^(?:style\s+)/,
996
- /^(?:(\w+)+((,\s*\w+)*))/,
997
- /^(?:[^\n]*)/,
998
- /^(?:accTitle\s*:\s*)/,
999
- /^(?:(?!\n||)*[^\n]*)/,
1000
- /^(?:accDescr\s*:\s*)/,
1001
- /^(?:(?!\n||)*[^\n]*)/,
1002
- /^(?:accDescr\s*\{\s*)/,
1003
- /^(?:[\}])/,
1004
- /^(?:[^\}]*)/,
1005
- /^(?:end\b\s*)/,
1006
- /^(?:\(\(\()/,
1007
- /^(?:\)\)\))/,
1008
- /^(?:[\)]\))/,
1009
- /^(?:\}\})/,
1010
- /^(?:\})/,
1011
- /^(?:\(-)/,
1012
- /^(?:-\))/,
1013
- /^(?:\(\()/,
1014
- /^(?:\]\])/,
1015
- /^(?:\()/,
1016
- /^(?:\]\))/,
1017
- /^(?:\\\])/,
1018
- /^(?:\/\])/,
1019
- /^(?:\)\])/,
1020
- /^(?:[\)])/,
1021
- /^(?:\]>)/,
1022
- /^(?:[\]])/,
1023
- /^(?:-\))/,
1024
- /^(?:\(-)/,
1025
- /^(?:\)\))/,
1026
- /^(?:\))/,
1027
- /^(?:\(\(\()/,
1028
- /^(?:\(\()/,
1029
- /^(?:\{\{)/,
1030
- /^(?:\{)/,
1031
- /^(?:>)/,
1032
- /^(?:\(\[)/,
1033
- /^(?:\()/,
1034
- /^(?:\[\[)/,
1035
- /^(?:\[\|)/,
1036
- /^(?:\[\()/,
1037
- /^(?:\)\)\))/,
1038
- /^(?:\[\\)/,
1039
- /^(?:\[\/)/,
1040
- /^(?:\[\\)/,
1041
- /^(?:\[)/,
1042
- /^(?:<\[)/,
1043
- /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
1044
- /^(?:$)/,
1045
- /^(?:["][`])/,
1046
- /^(?:["][`])/,
1047
- /^(?:[^`"]+)/,
1048
- /^(?:[`]["])/,
1049
- /^(?:["])/,
1050
- /^(?:["])/,
1051
- /^(?:[^"]+)/,
1052
- /^(?:["])/,
1053
- /^(?:\]>\s*\()/,
1054
- /^(?:,?\s*right\s*)/,
1055
- /^(?:,?\s*left\s*)/,
1056
- /^(?:,?\s*x\s*)/,
1057
- /^(?:,?\s*y\s*)/,
1058
- /^(?:,?\s*up\s*)/,
1059
- /^(?:,?\s*down\s*)/,
1060
- /^(?:\)\s*)/,
1061
- /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1062
- /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1063
- /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1064
- /^(?:\s*~~[\~]+\s*)/,
1065
- /^(?:\s*[xo<]?--\s*)/,
1066
- /^(?:\s*[xo<]?==\s*)/,
1067
- /^(?:\s*[xo<]?-\.\s*)/,
1068
- /^(?:["][`])/,
1069
- /^(?:["])/,
1070
- /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1071
- /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1072
- /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1073
- /^(?::\d+)/
1074
- ],
1075
- conditions: {
1076
- STYLE_DEFINITION: {
1077
- rules: [28],
1078
- inclusive: !1
1079
- },
1080
- STYLE_STMNT: {
1081
- rules: [27],
1082
- inclusive: !1
1083
- },
1084
- CLASSDEFID: {
1085
- rules: [22],
1086
- inclusive: !1
1087
- },
1088
- CLASSDEF: {
1089
- rules: [20, 21],
1090
- inclusive: !1
1091
- },
1092
- CLASS_STYLE: {
1093
- rules: [25],
1094
- inclusive: !1
1095
- },
1096
- CLASS: {
1097
- rules: [24],
1098
- inclusive: !1
1099
- },
1100
- LLABEL: {
1101
- rules: [
1102
- 99,
1103
- 100,
1104
- 101,
1105
- 102,
1106
- 103
1107
- ],
1108
- inclusive: !1
1109
- },
1110
- ARROW_DIR: {
1111
- rules: [
1112
- 85,
1113
- 86,
1114
- 87,
1115
- 88,
1116
- 89,
1117
- 90,
1118
- 91
1119
- ],
1120
- inclusive: !1
1121
- },
1122
- BLOCK_ARROW: {
1123
- rules: [
1124
- 76,
1125
- 81,
1126
- 84
1127
- ],
1128
- inclusive: !1
1129
- },
1130
- NODE: {
1131
- rules: [
1132
- 37,
1133
- 38,
1134
- 39,
1135
- 40,
1136
- 41,
1137
- 42,
1138
- 43,
1139
- 44,
1140
- 45,
1141
- 46,
1142
- 47,
1143
- 48,
1144
- 49,
1145
- 50,
1146
- 51,
1147
- 52,
1148
- 53,
1149
- 77,
1150
- 80
1151
- ],
1152
- inclusive: !1
1153
- },
1154
- md_string: {
1155
- rules: [
1156
- 9,
1157
- 10,
1158
- 78,
1159
- 79
1160
- ],
1161
- inclusive: !1
1162
- },
1163
- space: {
1164
- rules: [],
1165
- inclusive: !1
1166
- },
1167
- string: {
1168
- rules: [
1169
- 12,
1170
- 13,
1171
- 82,
1172
- 83
1173
- ],
1174
- inclusive: !1
1175
- },
1176
- acc_descr_multiline: {
1177
- rules: [34, 35],
1178
- inclusive: !1
1179
- },
1180
- acc_descr: {
1181
- rules: [32],
1182
- inclusive: !1
1183
- },
1184
- acc_title: {
1185
- rules: [30],
1186
- inclusive: !1
1187
- },
1188
- INITIAL: {
1189
- rules: [
1190
- 0,
1191
- 1,
1192
- 2,
1193
- 3,
1194
- 4,
1195
- 5,
1196
- 6,
1197
- 7,
1198
- 8,
1199
- 11,
1200
- 14,
1201
- 15,
1202
- 16,
1203
- 17,
1204
- 18,
1205
- 19,
1206
- 23,
1207
- 26,
1208
- 29,
1209
- 31,
1210
- 33,
1211
- 36,
1212
- 54,
1213
- 55,
1214
- 56,
1215
- 57,
1216
- 58,
1217
- 59,
1218
- 60,
1219
- 61,
1220
- 62,
1221
- 63,
1222
- 64,
1223
- 65,
1224
- 66,
1225
- 67,
1226
- 68,
1227
- 69,
1228
- 70,
1229
- 71,
1230
- 72,
1231
- 73,
1232
- 74,
1233
- 75,
1234
- 92,
1235
- 93,
1236
- 94,
1237
- 95,
1238
- 96,
1239
- 97,
1240
- 98,
1241
- 104
1242
- ],
1243
- inclusive: !0
1244
- }
1245
- }
1246
- };
1247
- })();
1248
- function v() {
1249
- this.yy = {};
1250
- }
1251
- return n(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1252
- })();
1253
- P.parser = P;
1254
- var Ce = P, F = /* @__PURE__ */ new Map(), I = [], L = /* @__PURE__ */ new Map(), R = "color", z = "fill", we = "bgFill", B = ",", V = /* @__PURE__ */ new Map(), H = "", Te = /* @__PURE__ */ n((e) => s.sanitizeText(e, a()), "sanitizeText"), Ee = /* @__PURE__ */ n(function(e, t = "") {
1255
- let n = V.get(e);
1256
- n || (n = {
1257
- id: e,
1258
- styles: [],
1259
- textStyles: []
1260
- }, V.set(e, n)), t?.split(B).forEach((e) => {
1261
- let t = e.replace(/([^;]*);/, "$1").trim();
1262
- if (RegExp(R).exec(e)) {
1263
- let e = t.replace(z, we).replace(R, z);
1264
- n.textStyles.push(e);
1265
- }
1266
- n.styles.push(t);
1267
- });
1268
- }, "addStyleClass"), De = /* @__PURE__ */ n(function(e, t = "") {
1269
- let n = F.get(e);
1270
- t != null && (n.styles = t.split(B));
1271
- }, "addStyle2Node"), Oe = /* @__PURE__ */ n(function(e, t) {
1272
- e.split(",").forEach(function(e) {
1273
- let n = F.get(e);
1274
- if (n === void 0) {
1275
- let t = e.trim();
1276
- n = {
1277
- id: t,
1278
- type: "na",
1279
- children: []
1280
- }, F.set(t, n);
1281
- }
1282
- n.classes ||= [], n.classes.push(t);
1283
- });
1284
- }, "setCssClass"), U = 0, ke = /* @__PURE__ */ n((t, n) => {
1285
- let r = t.flat(), i = [], a = r.find((e) => e?.type === "column-setting")?.columns ?? -1;
1286
- for (let t of r) {
1287
- if (typeof a == "number" && a > 0 && t.type !== "column-setting" && typeof t.widthInColumns == "number" && t.widthInColumns > a && e.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${a}`), t.label &&= Te(t.label), t.type === "classDef") {
1288
- Ee(t.id, t.css);
1289
- continue;
1290
- }
1291
- if (t.type === "applyClass") {
1292
- Oe(t.id, t?.styleClass ?? "");
1293
- continue;
1294
- }
1295
- if (t.type === "applyStyles") {
1296
- t?.stylesStr && De(t.id, t?.stylesStr);
1297
- continue;
1298
- }
1299
- if (t.type === "column-setting") n.columns = t.columns ?? -1;
1300
- else if (t.type === "edge") {
1301
- let e = (L.get(t.id) ?? 0) + 1;
1302
- L.set(t.id, e), t.id = e + "-" + t.id, I.push(t);
1303
- } else {
1304
- t.label || (t.type === "composite" ? t.label = "" : t.label = t.id);
1305
- let e = F.get(t.id);
1306
- if (e === void 0 ? (t.type === "composite" && (t.colorIndex = U++), F.set(t.id, t)) : (t.type !== "na" && (e.type = t.type), t.label !== t.id && (e.label = t.label)), t.children && ke(t.children, t), t.type === "space") {
1307
- let e = t.width ?? 1;
1308
- for (let n = 0; n < e; n++) {
1309
- let e = ve(t);
1310
- e.id = e.id + "-" + n, F.set(e.id, e), i.push(e);
1311
- }
1312
- } else e === void 0 && i.push(t);
1313
- }
1314
- }
1315
- n.children = i;
1316
- }, "populateBlockDatabase"), W = [], G = {
1317
- id: "root",
1318
- type: "composite",
1319
- children: [],
1320
- columns: -1
1321
- }, Ae = /* @__PURE__ */ n(() => {
1322
- e.debug("Clear called"), r(), G = {
1323
- id: "root",
1324
- type: "composite",
1325
- children: [],
1326
- columns: -1
1327
- }, F = /* @__PURE__ */ new Map([["root", G]]), W = [], V = /* @__PURE__ */ new Map(), I = [], L = /* @__PURE__ */ new Map(), H = "", U = 0;
1328
- }, "clear");
1329
- function je(t) {
1330
- switch (e.debug("typeStr2Type", t), t) {
1331
- case "[]": return "square";
1332
- case "()": return e.debug("we have a round"), "round";
1333
- case "(())": return "circle";
1334
- case ">]": return "rect_left_inv_arrow";
1335
- case "{}": return "diamond";
1336
- case "{{}}": return "hexagon";
1337
- case "([])": return "stadium";
1338
- case "[[]]": return "subroutine";
1339
- case "[()]": return "cylinder";
1340
- case "((()))": return "doublecircle";
1341
- case "[//]": return "lean_right";
1342
- case "[\\\\]": return "lean_left";
1343
- case "[/\\]": return "trapezoid";
1344
- case "[\\/]": return "inv_trapezoid";
1345
- case "<[]>": return "block_arrow";
1346
- default: return "na";
1347
- }
1348
- }
1349
- n(je, "typeStr2Type");
1350
- function Me(t) {
1351
- switch (e.debug("typeStr2Type", t), t) {
1352
- case "==": return "thick";
1353
- default: return "normal";
1354
- }
1355
- }
1356
- n(Me, "edgeTypeStr2Type");
1357
- function Ne(e) {
1358
- switch (e.trim().slice(-1)) {
1359
- case "x": return "arrow_cross";
1360
- case "o": return "arrow_circle";
1361
- case ">": return "arrow_point";
1362
- default: return "";
1363
- }
1364
- }
1365
- n(Ne, "edgeStrToEdgeData");
1366
- function Pe(e) {
1367
- switch (e.trim().charAt(0)) {
1368
- case "x": return "arrow_cross";
1369
- case "o": return "arrow_circle";
1370
- case "<": return "arrow_point";
1371
- default: return "arrow_open";
1372
- }
1373
- }
1374
- n(Pe, "edgeStrToEdgeStartData");
1375
- function Fe(e) {
1376
- return e.includes("==") ? "thick" : "normal";
1377
- }
1378
- n(Fe, "edgeStrToThickness");
1379
- function Ie(e) {
1380
- return e.includes(".-") ? "dotted" : "solid";
1381
- }
1382
- n(Ie, "edgeStrToPattern");
1383
- var Le = 0, Re = {
1384
- getConfig: /* @__PURE__ */ n(() => c().block, "getConfig"),
1385
- typeStr2Type: je,
1386
- edgeTypeStr2Type: Me,
1387
- edgeStrToEdgeData: Ne,
1388
- edgeStrToEdgeStartData: Pe,
1389
- edgeStrToThickness: Fe,
1390
- edgeStrToPattern: Ie,
1391
- getLogger: /* @__PURE__ */ n(() => e, "getLogger"),
1392
- getBlocksFlat: /* @__PURE__ */ n(() => [...F.values()], "getBlocksFlat"),
1393
- getBlocks: /* @__PURE__ */ n(() => W || [], "getBlocks"),
1394
- getEdges: /* @__PURE__ */ n(() => I, "getEdges"),
1395
- setHierarchy: /* @__PURE__ */ n((e) => {
1396
- G.children = e, ke(e, G), W = G.children;
1397
- }, "setHierarchy"),
1398
- getBlock: /* @__PURE__ */ n((e) => F.get(e), "getBlock"),
1399
- setBlock: /* @__PURE__ */ n((e) => {
1400
- F.set(e.id, e);
1401
- }, "setBlock"),
1402
- getColumns: /* @__PURE__ */ n((e) => {
1403
- let t = F.get(e);
1404
- return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1405
- }, "getColumns"),
1406
- getClasses: /* @__PURE__ */ n(function() {
1407
- return V;
1408
- }, "getClasses"),
1409
- clear: Ae,
1410
- generateId: /* @__PURE__ */ n(() => (Le++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Le), "generateId"),
1411
- setDiagramId: /* @__PURE__ */ n((e) => {
1412
- H = e;
1413
- }, "setDiagramId"),
1414
- getDiagramId: /* @__PURE__ */ n(() => H, "getDiagramId")
1415
- }, ze = /* @__PURE__ */ n((e) => {
1416
- let { theme: t, bkgColorArray: n, borderColorArray: r } = e;
1417
- if (!ae(t, r)) return "";
1418
- let i = se(e.look), a = ce(n), o = "";
1419
- for (let t = 0; t < oe(e.THEME_COLOR_LIMIT, r); t++) {
1420
- let e = r[t % r.length], s = a ? `fill: ${n[t % n.length]};` : "", c = `[data-look="${i}"][data-color-id="color-${t}"]`;
1421
- o += `
1422
-
1423
- ${c}.node rect.composite {
1424
- stroke: ${e};
1425
- ${s}
1426
- }
1427
- `;
1428
- }
1429
- return o;
1430
- }, "genColor"), K = /* @__PURE__ */ n((e, t) => {
1431
- let n = l;
1432
- return i(n(e, "r"), n(e, "g"), n(e, "b"), t);
1433
- }, "fade"), Be = /* @__PURE__ */ n((e) => `${ze(e)}
1434
- .label {
1435
- font-family: ${e.fontFamily};
1436
- color: ${e.nodeTextColor || e.textColor};
1437
- }
1438
- .cluster-label text {
1439
- fill: ${e.titleColor};
1440
- }
1441
- .cluster-label span {
1442
- color: ${e.titleColor};
1443
- }
1444
-
1445
-
1446
-
1447
- .label text,span {
1448
- fill: ${e.nodeTextColor || e.textColor};
1449
- color: ${e.nodeTextColor || e.textColor};
1450
- }
1451
-
1452
- .node rect,
1453
- .node circle,
1454
- .node ellipse,
1455
- .node polygon,
1456
- .node path {
1457
- fill: ${e.mainBkg};
1458
- stroke: ${e.nodeBorder};
1459
- /* From the theme, as every other diagram does. Pinned at 1px here, so block drew a
1460
- thinner border than an identical flowchart node under any theme asking for more --
1461
- the neo theme asks for 2. Nothing downstream corrected it: the neo rules set stroke
1462
- and filter, never stroke-width. */
1463
- stroke-width: ${e.strokeWidth ?? 1}px;
1464
- }
1465
- .flowchart-label text {
1466
- text-anchor: middle;
1467
- }
1468
- // .flowchart-label .text-outer-tspan {
1469
- // text-anchor: middle;
1470
- // }
1471
- // .flowchart-label .text-inner-tspan {
1472
- // text-anchor: start;
1473
- // }
1474
-
1475
- .node .label {
1476
- text-align: center;
1477
- }
1478
- .node.clickable {
1479
- cursor: pointer;
1480
- }
1481
-
1482
- .arrowheadPath {
1483
- fill: ${e.arrowheadColor};
1484
- }
1485
-
1486
- .edgePaths .path {
1487
- stroke: ${e.lineColor};
1488
- stroke-width: 2.0px;
1489
- }
1490
-
1491
- .flowchart-link {
1492
- stroke: ${e.lineColor};
1493
- fill: none;
1494
- }
1495
-
1496
- .edgeLabel {
1497
- background-color: ${e.edgeLabelBackground};
1498
- /*
1499
- * This is for backward compatibility with existing code that didn't
1500
- * add a \`<p>\` around edge labels.
1501
- *
1502
- * TODO: We should probably remove this in a future release.
1503
- */
1504
- p {
1505
- margin: 0;
1506
- padding: 0;
1507
- display: inline;
1508
- }
1509
- rect {
1510
- opacity: 0.5;
1511
- background-color: ${e.edgeLabelBackground};
1512
- fill: ${e.edgeLabelBackground};
1513
- }
1514
- text-align: center;
1515
- }
1516
-
1517
- /* For html labels only */
1518
- .labelBkg {
1519
- background-color: ${e.edgeLabelBackground};
1520
- }
1521
-
1522
- .node .cluster {
1523
- // fill: ${K(e.mainBkg, .5)};
1524
- fill: ${K(e.clusterBkg, .5)};
1525
- stroke: ${K(e.clusterBorder, .2)};
1526
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1527
- stroke-width: 1px;
1528
- }
1529
-
1530
- .cluster text {
1531
- fill: ${e.titleColor};
1532
- }
1533
-
1534
- .cluster span {
1535
- color: ${e.titleColor};
1536
- }
1537
- /* .cluster div {
1538
- color: ${e.titleColor};
1539
- } */
1540
-
1541
- div.mermaidTooltip {
1542
- position: absolute;
1543
- text-align: center;
1544
- max-width: 200px;
1545
- padding: 2px;
1546
- font-family: ${e.fontFamily};
1547
- font-size: 12px;
1548
- background: ${e.tertiaryColor};
1549
- border: 1px solid ${e.border2};
1550
- border-radius: 2px;
1551
- pointer-events: none;
1552
- z-index: 100;
1553
- }
1554
-
1555
- .flowchartTitleText {
1556
- text-anchor: middle;
1557
- font-size: 18px;
1558
- fill: ${e.textColor};
1559
- }
1560
- ${re()}
1561
- `, "getStyles");
1562
- function q(e, t) {
1563
- if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
1564
- if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
1565
- return e < 0 ? {
1566
- px: t,
1567
- py: 0
1568
- } : e === 1 ? {
1569
- px: 0,
1570
- py: t
1571
- } : {
1572
- px: t % e,
1573
- py: Math.floor(t / e)
1574
- };
1575
- }
1576
- n(q, "calculateBlockPosition");
1577
- var Ve = /* @__PURE__ */ n((t) => {
1578
- let n = 0, r = 0;
1579
- for (let i of t.children) {
1580
- let { width: t, height: a, x: o, y: s } = i.size ?? {
1581
- width: 0,
1582
- height: 0,
1583
- x: 0,
1584
- y: 0
1585
- };
1586
- if (e.debug("getMaxChildSize abc95 child:", i.id, "width:", t, "height:", a, "x:", o, "y:", s, i.type), i.type === "space") continue;
1587
- let c = t / (i.widthInColumns ?? 1);
1588
- c > n && (n = c), a > r && (r = a);
1589
- }
1590
- return {
1591
- width: n,
1592
- height: r
1593
- };
1594
- }, "getMaxChildSize");
1595
- function J(t, n, r = 0, i = 0, a = 8) {
1596
- e.debug("setBlockSizes abc95 (start)", t.id, t?.size?.x, "block width =", t?.size, "siblingWidth", r), t?.size?.width || (t.size = {
1597
- width: r,
1598
- height: i,
1599
- x: 0,
1600
- y: 0
1601
- });
1602
- let o = 0, s = 0;
1603
- if (t.children?.length > 0) {
1604
- for (let e of t.children) J(e, n, 0, 0, a);
1605
- let c = Ve(t);
1606
- o = c.width, s = c.height, e.debug("setBlockSizes abc95 maxWidth of", t.id, ":s children is ", o, s);
1607
- for (let n of t.children) n.size && (e.debug(`abc95 Setting size of children of ${t.id} id=${n.id} ${o} ${s} ${JSON.stringify(n.size)}`), n.size.width = o * (n.widthInColumns ?? 1) + a * ((n.widthInColumns ?? 1) - 1), n.size.height = s, n.size.x = 0, n.size.y = 0, e.debug(`abc95 updating size of ${t.id} children child:${n.id} maxWidth:${o} maxHeight:${s}`));
1608
- for (let e of t.children) J(e, n, o, s, a);
1609
- let l = t.columns ?? -1, u = 0;
1610
- for (let e of t.children) u += e.widthInColumns ?? 1;
1611
- let d = t.children.length;
1612
- l > 0 && l < u && (d = l);
1613
- let f = Math.ceil(u / d), p = d * (o + a) + a, m = f * (s + a) + a;
1614
- if (p < r) {
1615
- e.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${i} width ${p}`), p = r, m = i;
1616
- let n = (r - d * a - a) / d, c = (i - f * a - a) / f;
1617
- e.debug("Size indata abc88", t.id, "childWidth", n, "maxWidth", o), e.debug("Size indata abc88", t.id, "childHeight", c, "maxHeight", s), e.debug("Size indata abc88 xSize", d, "padding", a);
1618
- for (let e of t.children) e.size && (e.size.width = n, e.size.height = c, e.size.x = 0, e.size.y = 0);
1619
- }
1620
- if (e.debug(`abc95 (finale calc) ${t.id} xSize ${d} ySize ${f} columns ${l}${t.children.length} width=${Math.max(p, t.size?.width || 0)}`), p < (t?.size?.width || 0)) {
1621
- p = t?.size?.width || 0;
1622
- let n = l > 0 ? Math.min(t.children.length, l) : t.children.length;
1623
- if (n > 0) {
1624
- let r = (p - n * a - a) / n;
1625
- e.debug("abc95 (growing to fit) width", t.id, p, t.size?.width, r);
1626
- for (let e of t.children) e.size && (e.size.width = r);
1627
- }
1628
- }
1629
- t.size = {
1630
- width: p,
1631
- height: m,
1632
- x: 0,
1633
- y: 0
1634
- };
1635
- }
1636
- e.debug("setBlockSizes abc94 (done)", t.id, t?.size?.x, t?.size?.width, t?.size?.y, t?.size?.height);
1637
- }
1638
- n(J, "setBlockSizes");
1639
- function Y(t, n, r = 8) {
1640
- e.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1641
- let i = t.columns ?? -1;
1642
- if (e.debug("layoutBlocks columns abc95", t.id, "=>", i, t), t.children && t.children.length > 0) {
1643
- let a = t?.children[0]?.size?.width ?? 0, o = t.children.length * a + (t.children.length - 1) * r;
1644
- e.debug("widthOfChildren 88", o, "posX");
1645
- let s = /* @__PURE__ */ new Map();
1646
- {
1647
- let e = 0;
1648
- for (let n of t.children) {
1649
- if (!n.size) continue;
1650
- let { py: t } = q(i, e), r = s.get(t) ?? 0;
1651
- n.size.height > r && s.set(t, n.size.height);
1652
- let a = n?.widthInColumns ?? 1;
1653
- i > 0 && (a = Math.min(a, i - e % i)), e += a;
1654
- }
1655
- }
1656
- let c = /* @__PURE__ */ new Map();
1657
- {
1658
- let e = 0, t = [...s.keys()].sort((e, t) => e - t);
1659
- for (let n of t) c.set(n, e), e += (s.get(n) ?? 0) + r;
1660
- }
1661
- let l = 0;
1662
- e.debug("abc91 block?.size?.x", t.id, t?.size?.x);
1663
- let u = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -r, d = 0;
1664
- for (let a of t.children) {
1665
- let o = t;
1666
- if (!a.size) continue;
1667
- let { width: f, height: p } = a.size, { px: m, py: h } = q(i, l);
1668
- if (h != d && (d = h, u = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -r, e.debug("New row in layout for block", t.id, " and child ", a.id, d)), e.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${m},${h} (${o?.size?.x},${o?.size?.y}) parent: ${o.id} width: ${f}${r}`), o.size) {
1669
- let t = f / 2;
1670
- a.size.x = u + r + t, e.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${u} new startingPosX${a.size.x} ${t} padding=${r} width=${f} halfWidth=${t} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${f * (a?.widthInColumns ?? 1) / 2}`), u = a.size.x + t;
1671
- let n = c.get(h) ?? 0, i = s.get(h) ?? p;
1672
- a.size.y = o.size.y - o.size.height / 2 + n + i / 2 + r, e.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${u}${r}${t}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${f * (a?.widthInColumns ?? 1) / 2}`);
1673
- }
1674
- a.children && Y(a, n, r);
1675
- let g = a?.widthInColumns ?? 1;
1676
- i > 0 && (g = Math.min(g, i - l % i)), l += g, e.debug("abc88 columnsPos", a, l);
1677
- }
1678
- }
1679
- e.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1680
- }
1681
- n(Y, "layoutBlocks");
1682
- function X(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1683
- minX: 0,
1684
- minY: 0,
1685
- maxX: 0,
1686
- maxY: 0
1687
- }) {
1688
- if (e.size && e.id !== "root") {
1689
- let { x: a, y: o, width: s, height: c } = e.size;
1690
- a - s / 2 < t && (t = a - s / 2), o - c / 2 < n && (n = o - c / 2), a + s / 2 > r && (r = a + s / 2), o + c / 2 > i && (i = o + c / 2);
1691
- }
1692
- if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = X(a, {
1693
- minX: t,
1694
- minY: n,
1695
- maxX: r,
1696
- maxY: i
1697
- }));
1698
- return {
1699
- minX: t,
1700
- minY: n,
1701
- maxX: r,
1702
- maxY: i
1703
- };
1704
- }
1705
- n(X, "findBounds");
1706
- function He(t) {
1707
- let n = t.getBlock("root");
1708
- if (!n) return;
1709
- let r = a()?.block?.padding ?? 8;
1710
- J(n, t, 0, 0, r), Y(n, t, r), e.debug("getBlocks", JSON.stringify(n, null, 2));
1711
- let { minX: i, minY: o, maxX: s, maxY: c } = X(n), l = c - o;
1712
- return {
1713
- x: i,
1714
- y: o,
1715
- width: s - i,
1716
- height: l
1717
- };
1718
- }
1719
- n(He, "layout");
1720
- function Z(e, t, n = !1) {
1721
- let r = e, i = "default";
1722
- (r?.classes?.length || 0) > 0 && (i = (r?.classes ?? []).join(" ")), i += " flowchart-label";
1723
- let a = (r?.classes ?? []).flatMap((e) => t.getClasses().get(e)?.styles ?? []), o = 0, s = "rect", l;
1724
- switch (r.type) {
1725
- case "round":
1726
- o = 5, s = "rect";
1727
- break;
1728
- case "composite":
1729
- o = 0, s = "composite", l = 0;
1730
- break;
1731
- case "square":
1732
- s = "rect";
1733
- break;
1734
- case "diamond":
1735
- s = "question";
1736
- break;
1737
- case "hexagon":
1738
- s = "hexagon";
1739
- break;
1740
- case "block_arrow":
1741
- s = "block_arrow";
1742
- break;
1743
- case "odd":
1744
- s = "rect_left_inv_arrow";
1745
- break;
1746
- case "lean_right":
1747
- s = "lean_right";
1748
- break;
1749
- case "lean_left":
1750
- s = "lean_left";
1751
- break;
1752
- case "trapezoid":
1753
- s = "trapezoid";
1754
- break;
1755
- case "inv_trapezoid":
1756
- s = "inv_trapezoid";
1757
- break;
1758
- case "rect_left_inv_arrow":
1759
- s = "rect_left_inv_arrow";
1760
- break;
1761
- case "circle":
1762
- s = "circle";
1763
- break;
1764
- case "ellipse":
1765
- s = "ellipse";
1766
- break;
1767
- case "stadium":
1768
- s = "stadium";
1769
- break;
1770
- case "subroutine":
1771
- s = "subroutine";
1772
- break;
1773
- case "cylinder":
1774
- s = "cylinder";
1775
- break;
1776
- case "group":
1777
- s = "rect";
1778
- break;
1779
- case "doublecircle":
1780
- s = "doublecircle";
1781
- break;
1782
- default: s = "rect";
1783
- }
1784
- let u = ee(r?.styles ?? []), d = r.label, f = r.size ?? {
1785
- width: 0,
1786
- height: 0,
1787
- x: 0,
1788
- y: 0
1789
- }, p = t.getDiagramId();
1790
- return {
1791
- labelStyle: u.labelStyle,
1792
- shape: s,
1793
- label: d,
1794
- labelText: d,
1795
- rx: o,
1796
- ry: o,
1797
- class: i,
1798
- cssClasses: i,
1799
- cssStyles: r?.styles ?? [],
1800
- cssCompiledStyles: a,
1801
- style: u.style,
1802
- id: r.id,
1803
- domId: p ? `${p}-${r.id}` : r.id,
1804
- isGroup: !1,
1805
- directions: r.directions,
1806
- width: f.width || void 0,
1807
- height: f.height || void 0,
1808
- wrappingWidth: f.width || Infinity,
1809
- x: f.x,
1810
- y: f.y,
1811
- positioned: n,
1812
- intersect: void 0,
1813
- padding: l ?? c()?.block?.padding ?? 0,
1814
- widthInColumns: r.widthInColumns ?? 1,
1815
- colorIndex: r.colorIndex,
1816
- look: c().look
1817
- };
1818
- }
1819
- n(Z, "getNodeFromBlock");
1820
- async function Ue(e, t, n) {
1821
- let r = Z(t, n, !1);
1822
- if (t.type === "group") return;
1823
- let i = await de(e, r, { config: c() }), a = i.node()?.getBBox() ?? {
1824
- width: 0,
1825
- height: 0
1826
- }, o = n.getBlock(r.id);
1827
- o.size = {
1828
- width: a.width,
1829
- height: a.height,
1830
- x: 0,
1831
- y: 0,
1832
- node: i
1833
- }, n.setBlock(o), i.remove();
1834
- }
1835
- n(Ue, "calculateBlockSize");
1836
- async function We(e, t, n) {
1837
- let r = Z(t, n, !0);
1838
- if (n.getBlock(r.id).type !== "space") {
1839
- let n = c(), i = await de(e, r, { config: n });
1840
- r.colorIndex !== void 0 && le(i, r.colorIndex, n.theme, n.themeVariables?.borderColorArray), t.intersect = r?.intersect, ue(r);
1841
- }
1842
- }
1843
- n(We, "insertBlockPositioned");
1844
- async function Q(e, t, n, r) {
1845
- for (let i of t) await r(e, i, n), i.children && await Q(e, i.children, n, r);
1846
- }
1847
- n(Q, "performOperations");
1848
- async function Ge(e, t, n) {
1849
- await Q(e, t, n, Ue);
1850
- }
1851
- n(Ge, "calculateBlockSizes");
1852
- async function Ke(e, t, n) {
1853
- await Q(e, t, n, We);
1854
- }
1855
- n(Ke, "insertBlocks");
1856
- async function $(e, t, n, r, i) {
1857
- let a = new ge({
1858
- multigraph: !0,
1859
- compound: !0
1860
- });
1861
- a.setGraph({
1862
- rankdir: "TB",
1863
- nodesep: 10,
1864
- ranksep: 10,
1865
- marginx: 8,
1866
- marginy: 8
1867
- });
1868
- for (let e of n) e.size && a.setNode(e.id, {
1869
- width: e.size.width,
1870
- height: e.size.height,
1871
- intersect: e.intersect
1872
- });
1873
- for (let n of t) if (n.start && n.end) {
1874
- let t = r.getBlock(n.start), o = r.getBlock(n.end);
1875
- if (t?.size && o?.size) {
1876
- let r = t.size, s = o.size, c = [
1877
- {
1878
- x: r.x,
1879
- y: r.y
1880
- },
1881
- {
1882
- x: r.x + (s.x - r.x) / 2,
1883
- y: r.y + (s.y - r.y) / 2
1884
- },
1885
- {
1886
- x: s.x,
1887
- y: s.y
1888
- }
1889
- ], l = i ? `${i}-${n.id}` : n.id, u = `${n.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal"} ${n.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;
1890
- me(e, {
1891
- ...n,
1892
- id: l,
1893
- arrowTypeEnd: n.arrowTypeEnd,
1894
- arrowTypeStart: n.arrowTypeStart,
1895
- points: c,
1896
- classes: u
1897
- }, {}, "block", a.node(n.start), a.node(n.end), i), n.label && (await fe(e, {
1898
- ...n,
1899
- label: n.label,
1900
- labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
1901
- arrowTypeEnd: n.arrowTypeEnd,
1902
- arrowTypeStart: n.arrowTypeStart,
1903
- points: c,
1904
- classes: u
1905
- }), he({
1906
- ...n,
1907
- x: c[1].x,
1908
- y: c[1].y
1909
- }, { originalPath: c }));
1910
- }
1911
- }
1912
- }
1913
- n($, "insertEdges");
1914
- var qe = {
1915
- parser: Ce,
1916
- db: Re,
1917
- renderer: {
1918
- draw: /* @__PURE__ */ n(async function(n, r, i, a) {
1919
- let { securityLevel: s, block: l } = c(), u = a.db;
1920
- u.setDiagramId(r);
1921
- let d;
1922
- s === "sandbox" && (d = t("#i" + r));
1923
- let f = t(s === "sandbox" ? d.nodes()[0].contentDocument.body : "body"), p = s === "sandbox" ? f.select(`[id="${r}"]`) : t(`[id="${r}"]`);
1924
- ie(p, c()), pe(p, [
1925
- "point",
1926
- "circle",
1927
- "cross"
1928
- ], a.type, r);
1929
- let m = u.getBlocks(), h = u.getBlocksFlat(), g = u.getEdges(), _ = p.insert("g").attr("class", "block");
1930
- await Ge(_, m, u);
1931
- let v = He(u);
1932
- await Ke(_, m, u), await $(_, g, h, u, r);
1933
- let y = _.node()?.getBBox(), b = y && Number.isFinite(y.width) && Number.isFinite(y.height) ? y : v;
1934
- if (b) {
1935
- let t = Math.max(1, Math.round(.125 * (b.width / b.height))), n = b.height + t + 10, r = b.width + 10, { useMaxWidth: i } = l;
1936
- o(p, n, r, !!i), e.debug("Here Bounds", v, b), p.attr("viewBox", `${b.x - 5} ${b.y - 5} ${b.width + 10} ${b.height + 10}`);
1937
- }
1938
- }, "draw"),
1939
- getClasses: /* @__PURE__ */ n(function(e, t) {
1940
- return t.db.getClasses();
1941
- }, "getClasses")
1942
- },
1943
- styles: Be
1944
- };
1945
- //#endregion
1946
- export { qe as diagram };