@peasant-labs/fairtrade 0.0.48 → 0.0.49

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 (118) hide show
  1. package/dist/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +89 -0
  2. package/dist/lib/{adapter-DnCl_ddK.js → adapter-CVKibszh.js} +136 -126
  3. package/dist/lib/arc-1xTxsoRi.js +80 -0
  4. package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +3 -0
  5. package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +4145 -0
  6. package/dist/lib/array-CApNbSU9.js +6 -0
  7. package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +1946 -0
  8. package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +2990 -0
  9. package/dist/lib/channel-DagAO2vE.js +5 -0
  10. package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +490 -0
  11. package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +15 -0
  12. package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +236 -0
  13. package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +61 -0
  14. package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +5 -0
  15. package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +1373 -0
  16. package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +1847 -0
  17. package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +4044 -0
  18. package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +10 -0
  19. package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +75 -0
  20. package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +4487 -0
  21. package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +363 -0
  22. package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +12 -0
  23. package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +8 -0
  24. package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +1513 -0
  25. package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +19774 -0
  26. package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +4258 -0
  27. package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +10 -0
  28. package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +67 -0
  29. package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +26 -0
  30. package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +693 -0
  31. package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +9 -0
  32. package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +12 -0
  33. package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +275 -0
  34. package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +37 -0
  35. package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +349 -0
  36. package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +3397 -0
  37. package/dist/lib/commons.js +729 -729
  38. package/dist/lib/components.css +1 -1
  39. package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +2250 -0
  40. package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +3 -0
  41. package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +349 -0
  42. package/dist/lib/cytoscape.esm-0ojxgO9x.js +18161 -0
  43. package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +2356 -0
  44. package/dist/lib/defaultLocale-BbgDuMnp.js +201 -0
  45. package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +525 -0
  46. package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +134 -0
  47. package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +301 -0
  48. package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +447 -0
  49. package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +214 -0
  50. package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +5084 -0
  51. package/dist/lib/dist-AMlsjiDX.js +59 -0
  52. package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +100 -0
  53. package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +47944 -0
  54. package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +1970 -0
  55. package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +3 -0
  56. package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +17 -0
  57. package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +3094 -0
  58. package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +3 -0
  59. package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +729 -0
  60. package/dist/lib/graphlib-Dndp26xU.js +1267 -0
  61. package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +3 -0
  62. package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +20 -0
  63. package/dist/lib/init-Bwwdo3M6.js +15 -0
  64. package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +719 -0
  65. package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +884 -0
  66. package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +976 -0
  67. package/dist/lib/katex-Dw0PnoPU.js +21850 -0
  68. package/dist/lib/line-C9krU3Sv.js +34 -0
  69. package/dist/lib/linear-Cvilv3OA.js +289 -0
  70. package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +638 -0
  71. package/dist/lib/mermaid.core-UNHMAbBP.js +1126 -0
  72. package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +1011 -0
  73. package/dist/lib/ordinal-C55HfHHp.js +65 -0
  74. package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +3 -0
  75. package/dist/lib/path-DNvJyUE8.js +85 -0
  76. package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +94 -0
  77. package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +3 -0
  78. package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +205 -0
  79. package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +2001 -0
  80. package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +3 -0
  81. package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +3 -0
  82. package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +3 -0
  83. package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +3 -0
  84. package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +3 -0
  85. package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +76 -0
  86. package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +2228 -0
  87. package/dist/lib/rough.esm-a8mysczE.js +1352 -0
  88. package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +970 -0
  89. package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +4253 -0
  90. package/dist/lib/share.js +1 -1
  91. package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +46 -0
  92. package/dist/lib/src-Dcy0zUZH.js +2153 -0
  93. package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +2143 -0
  94. package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +4764 -0
  95. package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +28 -0
  96. package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +1073 -0
  97. package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +3 -0
  98. package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +3 -0
  99. package/dist/lib/types/AppSidebar.d.ts +14 -1
  100. package/dist/lib/types/transcript/MermaidBlock.d.ts +3 -0
  101. package/dist/lib/types/transcript/TranscriptViewer.d.ts +1 -1
  102. package/dist/lib/types/transcript/UnverifiedPullRequests.d.ts +12 -0
  103. package/dist/lib/types/transcript/index.d.ts +1 -0
  104. package/dist/lib/types/transcript/mermaidSource.d.ts +2 -0
  105. package/dist/lib/types/transcript/mermaidSvg.d.ts +1 -0
  106. package/dist/lib/types/transcript/state-capabilities.d.ts +28 -8
  107. package/dist/lib/types/transcript/tool-state-key.d.ts +2 -0
  108. package/dist/lib/types/transcript/useReaderWidthAnchor.d.ts +20 -0
  109. package/dist/lib/types/transcript/view-model.d.ts +14 -0
  110. package/dist/lib/types/ui/transcript/view-model.d.ts +14 -0
  111. package/dist/lib/{ui-BLiaBlAK.js → ui-Beoq-HpN.js} +4875 -4130
  112. package/dist/lib/ui.js +6 -6
  113. package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +7190 -0
  114. package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +1880 -0
  115. package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +3 -0
  116. package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +645 -0
  117. package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +2218 -0
  118. package/package.json +3 -2
@@ -0,0 +1,1011 @@
1
+ import { m as e } from "./src-Dcy0zUZH.js";
2
+ import { n as t } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
3
+ import { O as n, b as r, f as i, it as a, nt as o, tt as s, y as c, z as l } from "./chunk-DSNLSHJZ-CpA9d2CJ.js";
4
+ import "./chunk-7S6XSTFO-CMt_p-O6.js";
5
+ import "./chunk-YZO67HFG-D1jKt78p.js";
6
+ import "./chunk-AQDTSKZB-DrZccIQa.js";
7
+ import "./chunk-UHW7PFBP-CLrOaA0y.js";
8
+ import "./chunk-HAGFOTED-DMU2JNZM.js";
9
+ import "./chunk-ZAUX2LTX-7XO0Yj1z.js";
10
+ import "./chunk-WQQL4CDK-DFtyhYZq.js";
11
+ import { t as u } from "./chunk-XXDRQBXY-uzyNBbgx.js";
12
+ import { t as d } from "./chunk-VQ5W62QI-_ZR3gKe4.js";
13
+ import "./chunk-HNE4Q36P-BIA0n2gA.js";
14
+ import { r as f, t as p } from "./chunk-EJLWFMJV-B30MNYvY.js";
15
+ //#region node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/rng.js
16
+ var m = /* @__PURE__ */ new Uint8Array(16);
17
+ function h() {
18
+ return crypto.getRandomValues(m);
19
+ }
20
+ //#endregion
21
+ //#region node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/stringify.js
22
+ var g = [];
23
+ for (let e = 0; e < 256; ++e) g.push((e + 256).toString(16).slice(1));
24
+ function _(e, t = 0) {
25
+ return (g[e[t + 0]] + g[e[t + 1]] + g[e[t + 2]] + g[e[t + 3]] + "-" + g[e[t + 4]] + g[e[t + 5]] + "-" + g[e[t + 6]] + g[e[t + 7]] + "-" + g[e[t + 8]] + g[e[t + 9]] + "-" + g[e[t + 10]] + g[e[t + 11]] + g[e[t + 12]] + g[e[t + 13]] + g[e[t + 14]] + g[e[t + 15]]).toLowerCase();
26
+ }
27
+ //#endregion
28
+ //#region node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/v4.js
29
+ function v(e, t, n) {
30
+ return !t && !e && crypto.randomUUID ? crypto.randomUUID() : y(e, t, n);
31
+ }
32
+ function y(e, t, n) {
33
+ e ||= {};
34
+ let r = e.random ?? e.rng?.() ?? h();
35
+ if (r.length < 16) throw Error("Random bytes length must be >= 16");
36
+ if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
37
+ if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
38
+ for (let e = 0; e < 16; ++e) t[n + e] = r[e];
39
+ return t;
40
+ }
41
+ return _(r);
42
+ }
43
+ //#endregion
44
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-6OY57UG3.mjs
45
+ var b = (function() {
46
+ var e = /* @__PURE__ */ t(function(e, t, n, r) {
47
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
48
+ return n;
49
+ }, "o"), n = [1, 4], r = [1, 13], i = [1, 12], a = [1, 15], o = [1, 16], s = [1, 20], c = [1, 19], l = [
50
+ 6,
51
+ 7,
52
+ 8
53
+ ], u = [1, 26], d = [1, 24], f = [1, 25], p = [
54
+ 6,
55
+ 7,
56
+ 11
57
+ ], m = [
58
+ 1,
59
+ 6,
60
+ 13,
61
+ 15,
62
+ 16,
63
+ 19,
64
+ 22
65
+ ], h = [1, 33], g = [1, 34], _ = [
66
+ 1,
67
+ 6,
68
+ 7,
69
+ 11,
70
+ 13,
71
+ 15,
72
+ 16,
73
+ 19,
74
+ 22
75
+ ], v = {
76
+ trace: /* @__PURE__ */ t(function() {}, "trace"),
77
+ yy: {},
78
+ symbols_: {
79
+ error: 2,
80
+ start: 3,
81
+ mindMap: 4,
82
+ spaceLines: 5,
83
+ SPACELINE: 6,
84
+ NL: 7,
85
+ MINDMAP: 8,
86
+ document: 9,
87
+ stop: 10,
88
+ EOF: 11,
89
+ statement: 12,
90
+ SPACELIST: 13,
91
+ node: 14,
92
+ ICON: 15,
93
+ CLASS: 16,
94
+ nodeWithId: 17,
95
+ nodeWithoutId: 18,
96
+ NODE_DSTART: 19,
97
+ NODE_DESCR: 20,
98
+ NODE_DEND: 21,
99
+ NODE_ID: 22,
100
+ $accept: 0,
101
+ $end: 1
102
+ },
103
+ terminals_: {
104
+ 2: "error",
105
+ 6: "SPACELINE",
106
+ 7: "NL",
107
+ 8: "MINDMAP",
108
+ 11: "EOF",
109
+ 13: "SPACELIST",
110
+ 15: "ICON",
111
+ 16: "CLASS",
112
+ 19: "NODE_DSTART",
113
+ 20: "NODE_DESCR",
114
+ 21: "NODE_DEND",
115
+ 22: "NODE_ID"
116
+ },
117
+ productions_: [
118
+ 0,
119
+ [3, 1],
120
+ [3, 2],
121
+ [5, 1],
122
+ [5, 2],
123
+ [5, 2],
124
+ [4, 2],
125
+ [4, 3],
126
+ [10, 1],
127
+ [10, 1],
128
+ [10, 1],
129
+ [10, 2],
130
+ [10, 2],
131
+ [9, 3],
132
+ [9, 2],
133
+ [12, 2],
134
+ [12, 2],
135
+ [12, 2],
136
+ [12, 1],
137
+ [12, 1],
138
+ [12, 1],
139
+ [12, 1],
140
+ [12, 1],
141
+ [14, 1],
142
+ [14, 1],
143
+ [18, 3],
144
+ [17, 1],
145
+ [17, 4]
146
+ ],
147
+ performAction: /* @__PURE__ */ t(function(e, t, n, r, i, a, o) {
148
+ var s = a.length - 1;
149
+ switch (i) {
150
+ case 6:
151
+ case 7: return r;
152
+ case 8:
153
+ r.getLogger().trace("Stop NL ");
154
+ break;
155
+ case 9:
156
+ r.getLogger().trace("Stop EOF ");
157
+ break;
158
+ case 11:
159
+ r.getLogger().trace("Stop NL2 ");
160
+ break;
161
+ case 12:
162
+ r.getLogger().trace("Stop EOF2 ");
163
+ break;
164
+ case 15:
165
+ r.getLogger().info("Node: ", a[s].id), r.addNode(a[s - 1].length, a[s].id, a[s].descr, a[s].type);
166
+ break;
167
+ case 16:
168
+ r.getLogger().trace("Icon: ", a[s]), r.decorateNode({ icon: a[s] });
169
+ break;
170
+ case 17:
171
+ case 21:
172
+ r.decorateNode({ class: a[s] });
173
+ break;
174
+ case 18:
175
+ r.getLogger().trace("SPACELIST");
176
+ break;
177
+ case 19:
178
+ r.getLogger().trace("Node: ", a[s].id), r.addNode(0, a[s].id, a[s].descr, a[s].type);
179
+ break;
180
+ case 20:
181
+ r.decorateNode({ icon: a[s] });
182
+ break;
183
+ case 25:
184
+ r.getLogger().trace("node found ..", a[s - 2]), this.$ = {
185
+ id: a[s - 1],
186
+ descr: a[s - 1],
187
+ type: r.getType(a[s - 2], a[s])
188
+ };
189
+ break;
190
+ case 26:
191
+ this.$ = {
192
+ id: a[s],
193
+ descr: a[s],
194
+ type: r.nodeType.DEFAULT
195
+ };
196
+ break;
197
+ case 27:
198
+ r.getLogger().trace("node found ..", a[s - 3]), this.$ = {
199
+ id: a[s - 3],
200
+ descr: a[s - 1],
201
+ type: r.getType(a[s - 2], a[s])
202
+ };
203
+ break;
204
+ }
205
+ }, "anonymous"),
206
+ table: [
207
+ {
208
+ 3: 1,
209
+ 4: 2,
210
+ 5: 3,
211
+ 6: [1, 5],
212
+ 8: n
213
+ },
214
+ { 1: [3] },
215
+ { 1: [2, 1] },
216
+ {
217
+ 4: 6,
218
+ 6: [1, 7],
219
+ 7: [1, 8],
220
+ 8: n
221
+ },
222
+ {
223
+ 6: r,
224
+ 7: [1, 10],
225
+ 9: 9,
226
+ 12: 11,
227
+ 13: i,
228
+ 14: 14,
229
+ 15: a,
230
+ 16: o,
231
+ 17: 17,
232
+ 18: 18,
233
+ 19: s,
234
+ 22: c
235
+ },
236
+ e(l, [2, 3]),
237
+ { 1: [2, 2] },
238
+ e(l, [2, 4]),
239
+ e(l, [2, 5]),
240
+ {
241
+ 1: [2, 6],
242
+ 6: r,
243
+ 12: 21,
244
+ 13: i,
245
+ 14: 14,
246
+ 15: a,
247
+ 16: o,
248
+ 17: 17,
249
+ 18: 18,
250
+ 19: s,
251
+ 22: c
252
+ },
253
+ {
254
+ 6: r,
255
+ 9: 22,
256
+ 12: 11,
257
+ 13: i,
258
+ 14: 14,
259
+ 15: a,
260
+ 16: o,
261
+ 17: 17,
262
+ 18: 18,
263
+ 19: s,
264
+ 22: c
265
+ },
266
+ {
267
+ 6: u,
268
+ 7: d,
269
+ 10: 23,
270
+ 11: f
271
+ },
272
+ e(p, [2, 22], {
273
+ 17: 17,
274
+ 18: 18,
275
+ 14: 27,
276
+ 15: [1, 28],
277
+ 16: [1, 29],
278
+ 19: s,
279
+ 22: c
280
+ }),
281
+ e(p, [2, 18]),
282
+ e(p, [2, 19]),
283
+ e(p, [2, 20]),
284
+ e(p, [2, 21]),
285
+ e(p, [2, 23]),
286
+ e(p, [2, 24]),
287
+ e(p, [2, 26], { 19: [1, 30] }),
288
+ { 20: [1, 31] },
289
+ {
290
+ 6: u,
291
+ 7: d,
292
+ 10: 32,
293
+ 11: f
294
+ },
295
+ {
296
+ 1: [2, 7],
297
+ 6: r,
298
+ 12: 21,
299
+ 13: i,
300
+ 14: 14,
301
+ 15: a,
302
+ 16: o,
303
+ 17: 17,
304
+ 18: 18,
305
+ 19: s,
306
+ 22: c
307
+ },
308
+ e(m, [2, 14], {
309
+ 7: h,
310
+ 11: g
311
+ }),
312
+ e(_, [2, 8]),
313
+ e(_, [2, 9]),
314
+ e(_, [2, 10]),
315
+ e(p, [2, 15]),
316
+ e(p, [2, 16]),
317
+ e(p, [2, 17]),
318
+ { 20: [1, 35] },
319
+ { 21: [1, 36] },
320
+ e(m, [2, 13], {
321
+ 7: h,
322
+ 11: g
323
+ }),
324
+ e(_, [2, 11]),
325
+ e(_, [2, 12]),
326
+ { 21: [1, 37] },
327
+ e(p, [2, 25]),
328
+ e(p, [2, 27])
329
+ ],
330
+ defaultActions: {
331
+ 2: [2, 1],
332
+ 6: [2, 2]
333
+ },
334
+ parseError: /* @__PURE__ */ t(function(e, t) {
335
+ if (t.recoverable) this.trace(e);
336
+ else {
337
+ var n = Error(e);
338
+ throw n.hash = t, n;
339
+ }
340
+ }, "parseError"),
341
+ parse: /* @__PURE__ */ t(function(e) {
342
+ var n = 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: {} };
343
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
344
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
345
+ var v = h.yylloc;
346
+ o.push(v);
347
+ var y = h.options && h.options.ranges;
348
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
349
+ function b(e) {
350
+ r.length -= 2 * e, a.length -= e, o.length -= e;
351
+ }
352
+ t(b, "popStack");
353
+ function x() {
354
+ var e = i.pop() || h.lex() || p;
355
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
356
+ }
357
+ t(x, "lex");
358
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
359
+ 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]) {
360
+ var M = "";
361
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
362
+ 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, {
363
+ text: h.match,
364
+ token: this.terminals_[S] || S,
365
+ line: h.yylineno,
366
+ loc: v,
367
+ expected: j
368
+ });
369
+ }
370
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
371
+ switch (T[0]) {
372
+ case 1:
373
+ 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--);
374
+ break;
375
+ case 2:
376
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
377
+ first_line: o[o.length - (k || 1)].first_line,
378
+ last_line: o[o.length - 1].last_line,
379
+ first_column: o[o.length - (k || 1)].first_column,
380
+ last_column: o[o.length - 1].last_column
381
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
382
+ c,
383
+ u,
384
+ l,
385
+ g.yy,
386
+ T[1],
387
+ a,
388
+ o
389
+ ].concat(m)), E !== void 0) return E;
390
+ 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);
391
+ break;
392
+ case 3: return !0;
393
+ }
394
+ }
395
+ return !0;
396
+ }, "parse")
397
+ };
398
+ v.lexer = /* @__PURE__ */ (function() {
399
+ return {
400
+ EOF: 1,
401
+ parseError: /* @__PURE__ */ t(function(e, t) {
402
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
403
+ else throw Error(e);
404
+ }, "parseError"),
405
+ setInput: /* @__PURE__ */ t(function(e, t) {
406
+ 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 = {
407
+ first_line: 1,
408
+ first_column: 0,
409
+ last_line: 1,
410
+ last_column: 0
411
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
412
+ }, "setInput"),
413
+ input: /* @__PURE__ */ t(function() {
414
+ var e = this._input[0];
415
+ 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;
416
+ }, "input"),
417
+ unput: /* @__PURE__ */ t(function(e) {
418
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
419
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
420
+ var r = this.match.split(/(?:\r\n?|\n)/g);
421
+ 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);
422
+ var i = this.yylloc.range;
423
+ return this.yylloc = {
424
+ first_line: this.yylloc.first_line,
425
+ last_line: this.yylineno + 1,
426
+ first_column: this.yylloc.first_column,
427
+ 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
428
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
429
+ }, "unput"),
430
+ more: /* @__PURE__ */ t(function() {
431
+ return this._more = !0, this;
432
+ }, "more"),
433
+ reject: /* @__PURE__ */ t(function() {
434
+ if (this.options.backtrack_lexer) this._backtrack = !0;
435
+ 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(), {
436
+ text: "",
437
+ token: null,
438
+ line: this.yylineno
439
+ });
440
+ return this;
441
+ }, "reject"),
442
+ less: /* @__PURE__ */ t(function(e) {
443
+ this.unput(this.match.slice(e));
444
+ }, "less"),
445
+ pastInput: /* @__PURE__ */ t(function() {
446
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
447
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
448
+ }, "pastInput"),
449
+ upcomingInput: /* @__PURE__ */ t(function() {
450
+ var e = this.match;
451
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
452
+ }, "upcomingInput"),
453
+ showPosition: /* @__PURE__ */ t(function() {
454
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
455
+ return e + this.upcomingInput() + "\n" + t + "^";
456
+ }, "showPosition"),
457
+ test_match: /* @__PURE__ */ t(function(e, t) {
458
+ var n, r, i;
459
+ if (this.options.backtrack_lexer && (i = {
460
+ yylineno: this.yylineno,
461
+ yylloc: {
462
+ first_line: this.yylloc.first_line,
463
+ last_line: this.last_line,
464
+ first_column: this.yylloc.first_column,
465
+ last_column: this.yylloc.last_column
466
+ },
467
+ yytext: this.yytext,
468
+ match: this.match,
469
+ matches: this.matches,
470
+ matched: this.matched,
471
+ yyleng: this.yyleng,
472
+ offset: this.offset,
473
+ _more: this._more,
474
+ _input: this._input,
475
+ yy: this.yy,
476
+ conditionStack: this.conditionStack.slice(0),
477
+ done: this.done
478
+ }, 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 = {
479
+ first_line: this.yylloc.last_line,
480
+ last_line: this.yylineno + 1,
481
+ first_column: this.yylloc.last_column,
482
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
483
+ }, 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;
484
+ if (this._backtrack) {
485
+ for (var a in i) this[a] = i[a];
486
+ return !1;
487
+ }
488
+ return !1;
489
+ }, "test_match"),
490
+ next: /* @__PURE__ */ t(function() {
491
+ if (this.done) return this.EOF;
492
+ this._input || (this.done = !0);
493
+ var e, t, n, r;
494
+ this._more || (this.yytext = "", this.match = "");
495
+ 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)) {
496
+ if (t = n, r = a, this.options.backtrack_lexer) {
497
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
498
+ if (this._backtrack) {
499
+ t = !1;
500
+ continue;
501
+ } else return !1;
502
+ } else if (!this.options.flex) break;
503
+ }
504
+ 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(), {
505
+ text: "",
506
+ token: null,
507
+ line: this.yylineno
508
+ });
509
+ }, "next"),
510
+ lex: /* @__PURE__ */ t(function() {
511
+ return this.next() || this.lex();
512
+ }, "lex"),
513
+ begin: /* @__PURE__ */ t(function(e) {
514
+ this.conditionStack.push(e);
515
+ }, "begin"),
516
+ popState: /* @__PURE__ */ t(function() {
517
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
518
+ }, "popState"),
519
+ _currentRules: /* @__PURE__ */ t(function() {
520
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
521
+ }, "_currentRules"),
522
+ topState: /* @__PURE__ */ t(function(e) {
523
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
524
+ }, "topState"),
525
+ pushState: /* @__PURE__ */ t(function(e) {
526
+ this.begin(e);
527
+ }, "pushState"),
528
+ stateStackSize: /* @__PURE__ */ t(function() {
529
+ return this.conditionStack.length;
530
+ }, "stateStackSize"),
531
+ options: { "case-insensitive": !0 },
532
+ performAction: /* @__PURE__ */ t(function(e, t, n, r) {
533
+ switch (n) {
534
+ case 0: return e.getLogger().trace("Found comment", t.yytext), 6;
535
+ case 1: return 8;
536
+ case 2:
537
+ this.begin("CLASS");
538
+ break;
539
+ case 3: return this.popState(), 16;
540
+ case 4:
541
+ this.popState();
542
+ break;
543
+ case 5:
544
+ e.getLogger().trace("Begin icon"), this.begin("ICON");
545
+ break;
546
+ case 6: return e.getLogger().trace("SPACELINE"), 6;
547
+ case 7: return 7;
548
+ case 8: return 15;
549
+ case 9:
550
+ e.getLogger().trace("end icon"), this.popState();
551
+ break;
552
+ case 10: return e.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
553
+ case 11: return e.getLogger().trace("Cloud"), this.begin("NODE"), 19;
554
+ case 12: return e.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
555
+ case 13: return e.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
556
+ case 14: return this.begin("NODE"), 19;
557
+ case 15: return this.begin("NODE"), 19;
558
+ case 16: return this.begin("NODE"), 19;
559
+ case 17: return this.begin("NODE"), 19;
560
+ case 18: return 13;
561
+ case 19: return 22;
562
+ case 20: return 11;
563
+ case 21:
564
+ this.begin("NSTR2");
565
+ break;
566
+ case 22: return "NODE_DESCR";
567
+ case 23:
568
+ this.popState();
569
+ break;
570
+ case 24:
571
+ e.getLogger().trace("Starting NSTR"), this.begin("NSTR");
572
+ break;
573
+ case 25: return e.getLogger().trace("description:", t.yytext), "NODE_DESCR";
574
+ case 26:
575
+ this.popState();
576
+ break;
577
+ case 27: return this.popState(), e.getLogger().trace("node end ))"), "NODE_DEND";
578
+ case 28: return this.popState(), e.getLogger().trace("node end )"), "NODE_DEND";
579
+ case 29: return this.popState(), e.getLogger().trace("node end ...", t.yytext), "NODE_DEND";
580
+ case 30: return this.popState(), e.getLogger().trace("node end (("), "NODE_DEND";
581
+ case 31: return this.popState(), e.getLogger().trace("node end (-"), "NODE_DEND";
582
+ case 32: return this.popState(), e.getLogger().trace("node end (-"), "NODE_DEND";
583
+ case 33: return this.popState(), e.getLogger().trace("node end (("), "NODE_DEND";
584
+ case 34: return this.popState(), e.getLogger().trace("node end (("), "NODE_DEND";
585
+ case 35: return e.getLogger().trace("Long description:", t.yytext), 20;
586
+ case 36: return e.getLogger().trace("Long description:", t.yytext), 20;
587
+ }
588
+ }, "anonymous"),
589
+ rules: [
590
+ /^(?:\s*%%.*)/i,
591
+ /^(?:mindmap\b)/i,
592
+ /^(?::::)/i,
593
+ /^(?:.+)/i,
594
+ /^(?:\n)/i,
595
+ /^(?:::icon\()/i,
596
+ /^(?:[\s]+[\n])/i,
597
+ /^(?:[\n]+)/i,
598
+ /^(?:[^\)]+)/i,
599
+ /^(?:\))/i,
600
+ /^(?:-\))/i,
601
+ /^(?:\(-)/i,
602
+ /^(?:\)\))/i,
603
+ /^(?:\))/i,
604
+ /^(?:\(\()/i,
605
+ /^(?:\{\{)/i,
606
+ /^(?:\()/i,
607
+ /^(?:\[)/i,
608
+ /^(?:[\s]+)/i,
609
+ /^(?:[^\(\[\n\)\{\}]+)/i,
610
+ /^(?:$)/i,
611
+ /^(?:["][`])/i,
612
+ /^(?:[^`"]+)/i,
613
+ /^(?:[`]["])/i,
614
+ /^(?:["])/i,
615
+ /^(?:[^"]+)/i,
616
+ /^(?:["])/i,
617
+ /^(?:[\)]\))/i,
618
+ /^(?:[\)])/i,
619
+ /^(?:[\]])/i,
620
+ /^(?:\}\})/i,
621
+ /^(?:\(-)/i,
622
+ /^(?:-\))/i,
623
+ /^(?:\(\()/i,
624
+ /^(?:\()/i,
625
+ /^(?:[^\)\]\(\}]+)/i,
626
+ /^(?:.+(?!\(\())/i
627
+ ],
628
+ conditions: {
629
+ CLASS: {
630
+ rules: [3, 4],
631
+ inclusive: !1
632
+ },
633
+ ICON: {
634
+ rules: [8, 9],
635
+ inclusive: !1
636
+ },
637
+ NSTR2: {
638
+ rules: [22, 23],
639
+ inclusive: !1
640
+ },
641
+ NSTR: {
642
+ rules: [25, 26],
643
+ inclusive: !1
644
+ },
645
+ NODE: {
646
+ rules: [
647
+ 21,
648
+ 24,
649
+ 27,
650
+ 28,
651
+ 29,
652
+ 30,
653
+ 31,
654
+ 32,
655
+ 33,
656
+ 34,
657
+ 35,
658
+ 36
659
+ ],
660
+ inclusive: !1
661
+ },
662
+ INITIAL: {
663
+ rules: [
664
+ 0,
665
+ 1,
666
+ 2,
667
+ 5,
668
+ 6,
669
+ 7,
670
+ 10,
671
+ 11,
672
+ 12,
673
+ 13,
674
+ 14,
675
+ 15,
676
+ 16,
677
+ 17,
678
+ 18,
679
+ 19,
680
+ 20
681
+ ],
682
+ inclusive: !0
683
+ }
684
+ }
685
+ };
686
+ })();
687
+ function y() {
688
+ this.yy = {};
689
+ }
690
+ return t(y, "Parser"), y.prototype = v, v.Parser = y, new y();
691
+ })();
692
+ b.parser = b;
693
+ var x = b, S = 12, C = {
694
+ DEFAULT: 0,
695
+ NO_BORDER: 0,
696
+ ROUNDED_RECT: 1,
697
+ RECT: 2,
698
+ CIRCLE: 3,
699
+ CLOUD: 4,
700
+ BANG: 5,
701
+ HEXAGON: 6
702
+ }, w = class {
703
+ constructor() {
704
+ this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = C, this.clear(), this.getType = this.getType.bind(this), this.getElementById = this.getElementById.bind(this), this.getParent = this.getParent.bind(this), this.getMindmap = this.getMindmap.bind(this), this.addNode = this.addNode.bind(this), this.decorateNode = this.decorateNode.bind(this);
705
+ }
706
+ static {
707
+ t(this, "MindmapDB");
708
+ }
709
+ clear() {
710
+ this.nodes = [], this.count = 0, this.elements = {}, this.baseLevel = void 0;
711
+ }
712
+ getParent(e) {
713
+ for (let t = this.nodes.length - 1; t >= 0; t--) if (this.nodes[t].level < e) return this.nodes[t];
714
+ return null;
715
+ }
716
+ getMindmap() {
717
+ return this.nodes.length > 0 ? this.nodes[0] : null;
718
+ }
719
+ addNode(t, n, a, o) {
720
+ e.info("addNode", t, n, a, o);
721
+ let s = !1;
722
+ this.nodes.length === 0 ? (this.baseLevel = t, t = 0, s = !0) : this.baseLevel !== void 0 && (t -= this.baseLevel, s = !1);
723
+ let c = r(), u = c.mindmap?.padding ?? i.mindmap.padding;
724
+ switch (o) {
725
+ case this.nodeType.ROUNDED_RECT:
726
+ case this.nodeType.RECT:
727
+ case this.nodeType.HEXAGON:
728
+ u *= 2;
729
+ break;
730
+ }
731
+ let d = {
732
+ id: this.count++,
733
+ nodeId: l(n, c),
734
+ level: t,
735
+ descr: l(a, c),
736
+ type: o,
737
+ children: [],
738
+ width: c.mindmap?.maxNodeWidth ?? i.mindmap.maxNodeWidth,
739
+ padding: u,
740
+ isRoot: s
741
+ }, f = this.getParent(t);
742
+ if (f) f.children.push(d), this.nodes.push(d);
743
+ else if (s) this.nodes.push(d);
744
+ else throw Error(`There can be only one root. No parent could be found for ("${d.descr}")`);
745
+ }
746
+ getType(t, n) {
747
+ switch (e.debug("In get type", t, n), t) {
748
+ case "[": return this.nodeType.RECT;
749
+ case "(": return n === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
750
+ case "((": return this.nodeType.CIRCLE;
751
+ case ")": return this.nodeType.CLOUD;
752
+ case "))": return this.nodeType.BANG;
753
+ case "{{": return this.nodeType.HEXAGON;
754
+ default: return this.nodeType.DEFAULT;
755
+ }
756
+ }
757
+ setElementForId(e, t) {
758
+ this.elements[e] = t;
759
+ }
760
+ getElementById(e) {
761
+ return this.elements[e];
762
+ }
763
+ decorateNode(e) {
764
+ if (!e) return;
765
+ let t = r(), n = this.nodes[this.nodes.length - 1];
766
+ e.icon && (n.icon = l(e.icon, t)), e.class && (n.class = l(e.class, t));
767
+ }
768
+ type2Str(e) {
769
+ switch (e) {
770
+ case this.nodeType.DEFAULT: return "no-border";
771
+ case this.nodeType.RECT: return "rect";
772
+ case this.nodeType.ROUNDED_RECT: return "rounded-rect";
773
+ case this.nodeType.CIRCLE: return "circle";
774
+ case this.nodeType.CLOUD: return "cloud";
775
+ case this.nodeType.BANG: return "bang";
776
+ case this.nodeType.HEXAGON: return "hexgon";
777
+ default: return "no-border";
778
+ }
779
+ }
780
+ assignSections(e, t, n = 0, r = !1) {
781
+ if (e.level === 0 ? e.section = void 0 : e.section = r ? (n - 1) % (S - 1) : t, e.children) for (let [i, a] of e.children.entries()) {
782
+ let o = e.level === 0 ? i % (S - 1) : t;
783
+ this.assignSections(a, o, n + 1, r);
784
+ }
785
+ }
786
+ flattenNodes(e, n) {
787
+ let i = r(), a = ["mindmap-node"];
788
+ e.isRoot === !0 ? a.push("section-root", "section--1") : e.section !== void 0 && a.push(`section-${e.section}`), e.class && a.push(e.class);
789
+ let o = a.join(" "), s = /* @__PURE__ */ t((e) => {
790
+ let t = (i.theme?.toLowerCase() ?? "").includes("redux");
791
+ switch (e) {
792
+ case C.CIRCLE: return "mindmapCircle";
793
+ case C.RECT: return "rect";
794
+ case C.ROUNDED_RECT: return "rounded";
795
+ case C.CLOUD: return "cloud";
796
+ case C.BANG: return "bang";
797
+ case C.HEXAGON: return "hexagon";
798
+ case C.DEFAULT: return t ? "rounded" : "defaultMindmapNode";
799
+ case C.NO_BORDER:
800
+ default: return "rect";
801
+ }
802
+ }, "getShapeFromType"), c = {
803
+ id: e.id.toString(),
804
+ domId: "node_" + e.id.toString(),
805
+ label: e.descr,
806
+ labelType: "markdown",
807
+ isGroup: !1,
808
+ shape: s(e.type),
809
+ width: e.width,
810
+ height: e.height ?? 0,
811
+ padding: e.padding,
812
+ cssClasses: o,
813
+ cssStyles: [],
814
+ centerLabel: !0,
815
+ look: i.look,
816
+ icon: e.icon,
817
+ x: e.x,
818
+ y: e.y,
819
+ level: e.level,
820
+ nodeId: e.nodeId,
821
+ type: e.type,
822
+ section: e.section
823
+ };
824
+ if (n.push(c), e.children) for (let t of e.children) this.flattenNodes(t, n);
825
+ }
826
+ generateEdges(e, t) {
827
+ if (!e.children) return;
828
+ let n = r();
829
+ for (let r of e.children) {
830
+ let i = "edge";
831
+ r.section !== void 0 && (i += ` section-edge-${r.section}`);
832
+ let a = e.level + 1;
833
+ i += ` edge-depth-${a}`;
834
+ let o = {
835
+ id: `edge_${e.id}_${r.id}`,
836
+ start: e.id.toString(),
837
+ end: r.id.toString(),
838
+ type: "normal",
839
+ curve: "basis",
840
+ thickness: "normal",
841
+ look: n.look,
842
+ classes: i,
843
+ depth: e.level,
844
+ section: r.section
845
+ };
846
+ t.push(o), this.generateEdges(r, t);
847
+ }
848
+ }
849
+ getData() {
850
+ let t = this.getMindmap(), i = r(), a = n().layout !== void 0, o = i;
851
+ if (a || (o.layout = "cose-bilkent"), !t) return {
852
+ nodes: [],
853
+ edges: [],
854
+ config: o
855
+ };
856
+ e.debug("getData: mindmapRoot", t, i), this.assignSections(t, void 0, 0, i.mindmap?.colorBy === "depth");
857
+ let s = [], c = [];
858
+ this.flattenNodes(t, s), this.generateEdges(t, c), e.debug(`getData: processed ${s.length} nodes and ${c.length} edges`);
859
+ let l = /* @__PURE__ */ new Map();
860
+ for (let e of s) l.set(e.id, {
861
+ shape: e.shape,
862
+ width: e.width,
863
+ height: e.height,
864
+ padding: e.padding
865
+ });
866
+ return {
867
+ nodes: s,
868
+ edges: c,
869
+ config: o,
870
+ rootNode: t,
871
+ markers: ["point"],
872
+ direction: "TB",
873
+ nodeSpacing: 50,
874
+ rankSpacing: 50,
875
+ shapes: Object.fromEntries(l),
876
+ type: "mindmap",
877
+ diagramId: "mindmap-" + v()
878
+ };
879
+ }
880
+ getLogger() {
881
+ return e;
882
+ }
883
+ }, T = { draw: /* @__PURE__ */ t(async (t, n, r, a) => {
884
+ e.debug("Rendering mindmap diagram\n" + t);
885
+ let o = a.db, s = o.getData(), l = u(n, s.config.securityLevel);
886
+ if (s.type = a.type, s.layoutAlgorithm = p(s.config.layout, { fallback: "cose-bilkent" }), s.diagramId = n, !o.getMindmap()) return;
887
+ s.nodes.forEach((e) => {
888
+ e.shape === "rounded" ? (e.radius = 15, e.taper = 15, e.stroke = "none", e.width = 0, e.padding = 15) : e.shape === "circle" ? e.padding = 10 : e.shape === "rect" ? (e.width = 0, e.padding = 10) : e.shape === "hexagon" && (e.width = 0, e.height = 0);
889
+ }), await f(s, l);
890
+ let { themeVariables: m } = c(), { useGradient: h, gradientStart: g, gradientStop: _ } = m;
891
+ if (h && g && _) {
892
+ let e = l.attr("id"), t = l.append("defs").append("linearGradient").attr("id", `${e}-gradient`).attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
893
+ t.append("stop").attr("offset", "0%").attr("stop-color", g).attr("stop-opacity", 1), t.append("stop").attr("offset", "100%").attr("stop-color", _).attr("stop-opacity", 1);
894
+ }
895
+ d(l, s.config.mindmap?.padding ?? i.mindmap.padding, "mindmapDiagram", s.config.mindmap?.useMaxWidth ?? i.mindmap.useMaxWidth);
896
+ }, "draw") }, E = /* @__PURE__ */ t((e) => {
897
+ let { theme: t, look: n } = e, r = "";
898
+ for (let t = 0; t < e.THEME_COLOR_LIMIT; t++) e["lineColor" + t] = e["lineColor" + t] || e["cScaleInv" + t], a(e["lineColor" + t]) ? e["lineColor" + t] = o(e["lineColor" + t], 20) : e["lineColor" + t] = s(e["lineColor" + t], 20);
899
+ for (let i = 0; i < e.THEME_COLOR_LIMIT; i++) {
900
+ let a = "" + (n === "neo" ? Math.max(10 - (i - 1) * 2, 2) : 17 - 3 * i), o = t === "redux" || t === "redux-dark" ? e.nodeBorder : e["cScaleLabel" + (t === "neutral" ? 1 : i)];
901
+ r += `
902
+ .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
903
+ fill: ${e["cScale" + i]};
904
+ }
905
+ .section-${i - 1} text {
906
+ fill: ${e["cScaleLabel" + i]};
907
+ }
908
+ .section-${i - 1} span {
909
+ color: ${e["cScaleLabel" + i]};
910
+ }
911
+ .node-icon-${i - 1} {
912
+ font-size: 40px;
913
+ color: ${e["cScaleLabel" + i]};
914
+ }
915
+ .section-edge-${i - 1}{
916
+ stroke: ${e["cScale" + i]};
917
+ }
918
+ .edge-depth-${i - 1}{
919
+ stroke-width: ${a};
920
+ }
921
+ .section-${i - 1} line {
922
+ stroke: ${e["cScaleInv" + i]} ;
923
+ stroke-width: 3;
924
+ }
925
+
926
+ .disabled, .disabled circle, .disabled text {
927
+ fill: lightgray;
928
+ }
929
+ .disabled text {
930
+ fill: #efefef;
931
+ }
932
+ [data-look="neo"].mindmap-node.section-${i - 1} rect, [data-look="neo"].mindmap-node.section-${i - 1} path, [data-look="neo"].mindmap-node.section-${i - 1} circle, [data-look="neo"].mindmap-node.section-${i - 1} polygon {
933
+ fill: ${t === "redux" || t === "redux-dark" || t === "neutral" ? e.mainBkg : e["cScale" + i]};
934
+ stroke: ${t === "redux" || t === "redux-dark" ? e.nodeBorder : e["cScale" + i]};
935
+ stroke-width: ${e.strokeWidth ?? 2}px;
936
+ }
937
+ [data-look="neo"].section-edge-${i - 1}{
938
+ stroke: ${t?.includes("redux") || t === "neo-dark" ? e.nodeBorder : e["cScale" + i]};
939
+ }
940
+ [data-look="neo"].mindmap-node.section-${i - 1} text, [data-look="neo"].mindmap-node.section-${i - 1} span {
941
+ fill: ${o};
942
+ color: ${o};
943
+ }
944
+ `;
945
+ }
946
+ return r;
947
+ }, "genSections"), D = /* @__PURE__ */ t((e, t, n) => {
948
+ let r = "";
949
+ for (let i = 0; i < e; i++) r += `
950
+ [data-look="neo"].mindmap-node.section-${i - 1} rect, [data-look="neo"].mindmap-node.section-${i - 1} path, [data-look="neo"].mindmap-node.section-${i - 1} circle, [data-look="neo"].mindmap-node.section-${i - 1} polygon {
951
+ stroke: url(${t}-gradient);
952
+ fill: ${n};
953
+ }
954
+ .section-${i - 1} line {
955
+ stroke-width: 0;
956
+ }`;
957
+ return r;
958
+ }, "genGradient"), O = {
959
+ get db() {
960
+ return new w();
961
+ },
962
+ renderer: T,
963
+ parser: x,
964
+ styles: /* @__PURE__ */ t((e) => {
965
+ let { theme: t } = e, n = e.svgId, r = t?.includes("redux") ? e.nodeBorder : e["cScaleLabel" + +(t === "neutral")], i = e.dropShadow ? e.dropShadow.replace("url(#drop-shadow)", `url(${n}-drop-shadow)`) : "none";
966
+ return `
967
+ .edge {
968
+ stroke-width: 3;
969
+ }
970
+ ${E(e)}
971
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
972
+ fill: ${e.git0};
973
+ }
974
+ .section-root text {
975
+ fill: ${e.gitBranchLabel0};
976
+ }
977
+ .section-root span {
978
+ color: ${t?.includes("redux") ? e.nodeBorder : e.gitBranchLabel0};
979
+ }
980
+ .icon-container {
981
+ height:100%;
982
+ display: flex;
983
+ justify-content: center;
984
+ align-items: center;
985
+ }
986
+ .edge {
987
+ fill: none;
988
+ }
989
+ .mindmap-node-label {
990
+ dy: 1em;
991
+ alignment-baseline: middle;
992
+ text-anchor: middle;
993
+ dominant-baseline: middle;
994
+ text-align: center;
995
+ }
996
+ [data-look="neo"].mindmap-node {
997
+ filter: ${i};
998
+ }
999
+ [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
1000
+ fill: ${t?.includes("redux") ? e.mainBkg : e.git0};
1001
+ }
1002
+ [data-look="neo"].mindmap-node.section-root .text-inner-tspan, [data-look="neo"].mindmap-node.section-root span {
1003
+ fill: ${r};
1004
+ color: ${r};
1005
+ }
1006
+ ${e.useGradient && n && e.mainBkg ? D(e.THEME_COLOR_LIMIT, n, e.mainBkg) : ""}
1007
+ `;
1008
+ }, "getStyles")
1009
+ };
1010
+ //#endregion
1011
+ export { O as diagram };