@blueking/ai-blueking 2.0.0-dev.1 → 2.0.0-dev.3

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 (183) hide show
  1. package/dist/vue2/_baseFor-DAbrc8SN.js +309 -0
  2. package/dist/vue2/arc-BqlAOiZb.js +78 -0
  3. package/dist/vue2/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
  4. package/dist/vue2/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
  5. package/dist/vue2/array-TB8zN_HT.js +5 -0
  6. package/dist/vue2/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
  7. package/dist/vue2/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
  8. package/dist/vue2/channel-edTl5mpN.js +3 -0
  9. package/dist/vue2/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
  10. package/dist/vue2/chunk-55IACEB6-CTzuTcHv.js +6 -0
  11. package/dist/vue2/chunk-76Q3JFCE-BrJX66ha.js +19 -0
  12. package/dist/vue2/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
  13. package/dist/vue2/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
  14. package/dist/vue2/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
  15. package/dist/vue2/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
  16. package/dist/vue2/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
  17. package/dist/vue2/chunk-DNh5sLlG.js +18 -0
  18. package/dist/vue2/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
  19. package/dist/vue2/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
  20. package/dist/vue2/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
  21. package/dist/vue2/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
  22. package/dist/vue2/chunk-HN2XXSSU-DueSY85P.js +74 -0
  23. package/dist/vue2/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
  24. package/dist/vue2/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
  25. package/dist/vue2/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
  26. package/dist/vue2/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
  27. package/dist/vue2/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
  28. package/dist/vue2/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
  29. package/dist/vue2/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
  30. package/dist/vue2/chunk-QN33PNHL-DsC-XeM9.js +23 -0
  31. package/dist/vue2/chunk-QXUST7PY-DxFRymyS.js +486 -0
  32. package/dist/vue2/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
  33. package/dist/vue2/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
  34. package/dist/vue2/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
  35. package/dist/vue2/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
  36. package/dist/vue2/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
  37. package/dist/vue2/chunk-XAJISQIX-XsDvU4jW.js +135 -0
  38. package/dist/vue2/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
  39. package/dist/vue2/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
  40. package/dist/vue2/clone-Bbr3WSpg.js +7 -0
  41. package/dist/vue2/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
  42. package/dist/vue2/cytoscape.esm-nrcriBSO.js +18100 -0
  43. package/dist/vue2/dagre-6UL2VRFP-CTl_U96l.js +298 -0
  44. package/dist/vue2/dagre-DUjlMe_B.js +1496 -0
  45. package/dist/vue2/defaultLocale-BLATqOV5.js +177 -0
  46. package/dist/vue2/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
  47. package/dist/vue2/diagram-QEK2KX5R-CAeywSxy.js +226 -0
  48. package/dist/vue2/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
  49. package/dist/vue2/dist-xWJvauxf.js +49 -0
  50. package/dist/vue2/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
  51. package/dist/vue2/flatten-CfPhNHUL.js +34 -0
  52. package/dist/vue2/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
  53. package/dist/vue2/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
  54. package/dist/vue2/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
  55. package/dist/vue2/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
  56. package/dist/vue2/graphlib-KDKEjVHX.js +344 -0
  57. package/dist/vue2/index.es.min.js +26703 -786
  58. package/dist/vue2/index.umd.min.js +2796 -9
  59. package/dist/vue2/info-NVLQJR56-DBsOnIKy.js +7 -0
  60. package/dist/vue2/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
  61. package/dist/vue2/init-hAkIK9Bd.js +13 -0
  62. package/dist/vue2/isEmpty-z27q3o-D.js +32 -0
  63. package/dist/vue2/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
  64. package/dist/vue2/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
  65. package/dist/vue2/katex-CEAw-xiA.js +22097 -0
  66. package/dist/vue2/katex-D8o5-F7C.js +2 -0
  67. package/dist/vue2/line-wvheYP7S.js +30 -0
  68. package/dist/vue2/linear-STTevhnH.js +250 -0
  69. package/dist/vue2/math-DF_v6dOl.js +8 -0
  70. package/dist/vue2/mermaid-parser.core-VAa8Vi1g.js +48 -0
  71. package/dist/vue2/mermaid.core-vqI6KB9k.js +895 -0
  72. package/dist/vue2/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
  73. package/dist/vue2/ordinal-DOM6Fa9P.js +61 -0
  74. package/dist/vue2/packet-BFZMPI3H-CG049KmZ.js +7 -0
  75. package/dist/vue2/path-CW_-_Ti7.js +79 -0
  76. package/dist/vue2/pie-7BOR55EZ-BHq0KcLP.js +7 -0
  77. package/dist/vue2/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
  78. package/dist/vue2/purify.es-Cm_tUMzZ.js +547 -0
  79. package/dist/vue2/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
  80. package/dist/vue2/radar-NHE76QYJ-CUoVtrAx.js +7 -0
  81. package/dist/vue2/reduce-BFKSG9Rs.js +451 -0
  82. package/dist/vue2/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
  83. package/dist/vue2/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
  84. package/dist/vue2/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
  85. package/dist/vue2/src-VlKYSsxJ.js +1975 -0
  86. package/dist/vue2/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
  87. package/dist/vue2/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
  88. package/dist/vue2/style.css +1 -1
  89. package/dist/vue2/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
  90. package/dist/vue2/treemap-KMMF4GRG--FdijCcy.js +7 -0
  91. package/dist/vue2/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
  92. package/dist/vue3/_baseFor-DAbrc8SN.js +309 -0
  93. package/dist/vue3/arc-BqlAOiZb.js +78 -0
  94. package/dist/vue3/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
  95. package/dist/vue3/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
  96. package/dist/vue3/array-TB8zN_HT.js +5 -0
  97. package/dist/vue3/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
  98. package/dist/vue3/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
  99. package/dist/vue3/channel-edTl5mpN.js +3 -0
  100. package/dist/vue3/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
  101. package/dist/vue3/chunk-55IACEB6-CTzuTcHv.js +6 -0
  102. package/dist/vue3/chunk-76Q3JFCE-BrJX66ha.js +19 -0
  103. package/dist/vue3/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
  104. package/dist/vue3/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
  105. package/dist/vue3/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
  106. package/dist/vue3/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
  107. package/dist/vue3/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
  108. package/dist/vue3/chunk-DNh5sLlG.js +18 -0
  109. package/dist/vue3/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
  110. package/dist/vue3/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
  111. package/dist/vue3/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
  112. package/dist/vue3/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
  113. package/dist/vue3/chunk-HN2XXSSU-DueSY85P.js +74 -0
  114. package/dist/vue3/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
  115. package/dist/vue3/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
  116. package/dist/vue3/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
  117. package/dist/vue3/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
  118. package/dist/vue3/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
  119. package/dist/vue3/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
  120. package/dist/vue3/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
  121. package/dist/vue3/chunk-QN33PNHL-DsC-XeM9.js +23 -0
  122. package/dist/vue3/chunk-QXUST7PY-DxFRymyS.js +486 -0
  123. package/dist/vue3/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
  124. package/dist/vue3/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
  125. package/dist/vue3/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
  126. package/dist/vue3/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
  127. package/dist/vue3/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
  128. package/dist/vue3/chunk-XAJISQIX-XsDvU4jW.js +135 -0
  129. package/dist/vue3/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
  130. package/dist/vue3/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
  131. package/dist/vue3/clone-Bbr3WSpg.js +7 -0
  132. package/dist/vue3/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
  133. package/dist/vue3/cytoscape.esm-nrcriBSO.js +18100 -0
  134. package/dist/vue3/dagre-6UL2VRFP-CTl_U96l.js +298 -0
  135. package/dist/vue3/dagre-DUjlMe_B.js +1496 -0
  136. package/dist/vue3/defaultLocale-BLATqOV5.js +177 -0
  137. package/dist/vue3/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
  138. package/dist/vue3/diagram-QEK2KX5R-CAeywSxy.js +226 -0
  139. package/dist/vue3/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
  140. package/dist/vue3/dist-xWJvauxf.js +49 -0
  141. package/dist/vue3/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
  142. package/dist/vue3/flatten-CfPhNHUL.js +34 -0
  143. package/dist/vue3/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
  144. package/dist/vue3/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
  145. package/dist/vue3/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
  146. package/dist/vue3/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
  147. package/dist/vue3/graphlib-KDKEjVHX.js +344 -0
  148. package/dist/vue3/index.es.min.js +26730 -813
  149. package/dist/vue3/index.umd.min.js +2796 -9
  150. package/dist/vue3/info-NVLQJR56-DBsOnIKy.js +7 -0
  151. package/dist/vue3/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
  152. package/dist/vue3/init-hAkIK9Bd.js +13 -0
  153. package/dist/vue3/isEmpty-z27q3o-D.js +32 -0
  154. package/dist/vue3/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
  155. package/dist/vue3/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
  156. package/dist/vue3/katex-CEAw-xiA.js +22097 -0
  157. package/dist/vue3/katex-D8o5-F7C.js +2 -0
  158. package/dist/vue3/line-wvheYP7S.js +30 -0
  159. package/dist/vue3/linear-STTevhnH.js +250 -0
  160. package/dist/vue3/math-DF_v6dOl.js +8 -0
  161. package/dist/vue3/mermaid-parser.core-VAa8Vi1g.js +48 -0
  162. package/dist/vue3/mermaid.core-vqI6KB9k.js +895 -0
  163. package/dist/vue3/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
  164. package/dist/vue3/ordinal-DOM6Fa9P.js +61 -0
  165. package/dist/vue3/packet-BFZMPI3H-CG049KmZ.js +7 -0
  166. package/dist/vue3/path-CW_-_Ti7.js +79 -0
  167. package/dist/vue3/pie-7BOR55EZ-BHq0KcLP.js +7 -0
  168. package/dist/vue3/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
  169. package/dist/vue3/purify.es-Cm_tUMzZ.js +547 -0
  170. package/dist/vue3/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
  171. package/dist/vue3/radar-NHE76QYJ-CUoVtrAx.js +7 -0
  172. package/dist/vue3/reduce-BFKSG9Rs.js +451 -0
  173. package/dist/vue3/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
  174. package/dist/vue3/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
  175. package/dist/vue3/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
  176. package/dist/vue3/src-VlKYSsxJ.js +1975 -0
  177. package/dist/vue3/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
  178. package/dist/vue3/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
  179. package/dist/vue3/style.css +1 -1
  180. package/dist/vue3/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
  181. package/dist/vue3/treemap-KMMF4GRG--FdijCcy.js +7 -0
  182. package/dist/vue3/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
  183. package/package.json +3 -3
@@ -0,0 +1,960 @@
1
+ import "./purify.es-Cm_tUMzZ.js";
2
+ import "./_baseFor-DAbrc8SN.js";
3
+ import { g as log, h as __name } from "./src-VlKYSsxJ.js";
4
+ import { D as getUserDefinedConfig, I as sanitizeText, Q as is_dark_default, X as darken_default, Z as lighten_default, b as getConfig2, d as defaultConfig_default } from "./chunk-ABZYJK2D-gsx40GnJ.js";
5
+ import "./path-CW_-_Ti7.js";
6
+ import "./math-DF_v6dOl.js";
7
+ import "./array-TB8zN_HT.js";
8
+ import "./chunk-S3R3BYOJ-Bs_r55Kk.js";
9
+ import "./line-wvheYP7S.js";
10
+ import "./dist-xWJvauxf.js";
11
+ import "./chunk-JA3XYJ7Z-CRet4f6a.js";
12
+ import "./chunk-HN2XXSSU-DueSY85P.js";
13
+ import "./chunk-CVBHYZKI-Cs8lCw3u.js";
14
+ import { t as getDiagramElement } from "./chunk-55IACEB6-CTzuTcHv.js";
15
+ import { t as setupViewPortForSVG } from "./chunk-QN33PNHL-DsC-XeM9.js";
16
+ import "./chunk-ATLVNIR6-CTTwtx-5.js";
17
+ import "./chunk-JZLCHNYA-Df0-MseJ.js";
18
+ import "./chunk-QXUST7PY-DxFRymyS.js";
19
+ import { r as render, t as getRegisteredLayoutAlgorithm } from "./chunk-N4CR4FBY-jNnt5D3v.js";
20
+ var byteToHex = [];
21
+ for (let e = 0; e < 256; ++e) byteToHex.push((e + 256).toString(16).slice(1));
22
+ function unsafeStringify(e, t = 0) {
23
+ return (byteToHex[e[t + 0]] + byteToHex[e[t + 1]] + byteToHex[e[t + 2]] + byteToHex[e[t + 3]] + "-" + byteToHex[e[t + 4]] + byteToHex[e[t + 5]] + "-" + byteToHex[e[t + 6]] + byteToHex[e[t + 7]] + "-" + byteToHex[e[t + 8]] + byteToHex[e[t + 9]] + "-" + byteToHex[e[t + 10]] + byteToHex[e[t + 11]] + byteToHex[e[t + 12]] + byteToHex[e[t + 13]] + byteToHex[e[t + 14]] + byteToHex[e[t + 15]]).toLowerCase();
24
+ }
25
+ var getRandomValues, rnds8 = new Uint8Array(16);
26
+ function rng() {
27
+ if (!getRandomValues) {
28
+ if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
29
+ getRandomValues = crypto.getRandomValues.bind(crypto);
30
+ }
31
+ return getRandomValues(rnds8);
32
+ }
33
+ var native_default = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
34
+ function v4(e, t, n) {
35
+ if (native_default.randomUUID && !t && !e) return native_default.randomUUID();
36
+ e ||= {};
37
+ let r = e.random ?? e.rng?.() ?? rng();
38
+ if (r.length < 16) throw Error("Random bytes length must be >= 16");
39
+ if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
40
+ if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
41
+ for (let e = 0; e < 16; ++e) t[n + e] = r[e];
42
+ return t;
43
+ }
44
+ return unsafeStringify(r);
45
+ }
46
+ var v4_default = v4, parser = (function() {
47
+ var e = /* @__PURE__ */ __name(function(e, t, n, r) {
48
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
49
+ return n;
50
+ }, "o"), n = [1, 4], r = [1, 13], i = [1, 12], a = [1, 15], o = [1, 16], s = [1, 20], c = [1, 19], l = [
51
+ 6,
52
+ 7,
53
+ 8
54
+ ], u = [1, 26], d = [1, 24], f = [1, 25], p = [
55
+ 6,
56
+ 7,
57
+ 11
58
+ ], m = [
59
+ 1,
60
+ 6,
61
+ 13,
62
+ 15,
63
+ 16,
64
+ 19,
65
+ 22
66
+ ], h = [1, 33], g = [1, 34], _ = [
67
+ 1,
68
+ 6,
69
+ 7,
70
+ 11,
71
+ 13,
72
+ 15,
73
+ 16,
74
+ 19,
75
+ 22
76
+ ], v = {
77
+ trace: /* @__PURE__ */ __name(function() {}, "trace"),
78
+ yy: {},
79
+ symbols_: {
80
+ error: 2,
81
+ start: 3,
82
+ mindMap: 4,
83
+ spaceLines: 5,
84
+ SPACELINE: 6,
85
+ NL: 7,
86
+ MINDMAP: 8,
87
+ document: 9,
88
+ stop: 10,
89
+ EOF: 11,
90
+ statement: 12,
91
+ SPACELIST: 13,
92
+ node: 14,
93
+ ICON: 15,
94
+ CLASS: 16,
95
+ nodeWithId: 17,
96
+ nodeWithoutId: 18,
97
+ NODE_DSTART: 19,
98
+ NODE_DESCR: 20,
99
+ NODE_DEND: 21,
100
+ NODE_ID: 22,
101
+ $accept: 0,
102
+ $end: 1
103
+ },
104
+ terminals_: {
105
+ 2: "error",
106
+ 6: "SPACELINE",
107
+ 7: "NL",
108
+ 8: "MINDMAP",
109
+ 11: "EOF",
110
+ 13: "SPACELIST",
111
+ 15: "ICON",
112
+ 16: "CLASS",
113
+ 19: "NODE_DSTART",
114
+ 20: "NODE_DESCR",
115
+ 21: "NODE_DEND",
116
+ 22: "NODE_ID"
117
+ },
118
+ productions_: [
119
+ 0,
120
+ [3, 1],
121
+ [3, 2],
122
+ [5, 1],
123
+ [5, 2],
124
+ [5, 2],
125
+ [4, 2],
126
+ [4, 3],
127
+ [10, 1],
128
+ [10, 1],
129
+ [10, 1],
130
+ [10, 2],
131
+ [10, 2],
132
+ [9, 3],
133
+ [9, 2],
134
+ [12, 2],
135
+ [12, 2],
136
+ [12, 2],
137
+ [12, 1],
138
+ [12, 1],
139
+ [12, 1],
140
+ [12, 1],
141
+ [12, 1],
142
+ [14, 1],
143
+ [14, 1],
144
+ [18, 3],
145
+ [17, 1],
146
+ [17, 4]
147
+ ],
148
+ performAction: /* @__PURE__ */ __name(function(e, t, n, r, i, a, o) {
149
+ var s = a.length - 1;
150
+ switch (i) {
151
+ case 6:
152
+ case 7: return r;
153
+ case 8:
154
+ r.getLogger().trace("Stop NL ");
155
+ break;
156
+ case 9:
157
+ r.getLogger().trace("Stop EOF ");
158
+ break;
159
+ case 11:
160
+ r.getLogger().trace("Stop NL2 ");
161
+ break;
162
+ case 12:
163
+ r.getLogger().trace("Stop EOF2 ");
164
+ break;
165
+ case 15:
166
+ r.getLogger().info("Node: ", a[s].id), r.addNode(a[s - 1].length, a[s].id, a[s].descr, a[s].type);
167
+ break;
168
+ case 16:
169
+ r.getLogger().trace("Icon: ", a[s]), r.decorateNode({ icon: a[s] });
170
+ break;
171
+ case 17:
172
+ case 21:
173
+ r.decorateNode({ class: a[s] });
174
+ break;
175
+ case 18:
176
+ r.getLogger().trace("SPACELIST");
177
+ break;
178
+ case 19:
179
+ r.getLogger().trace("Node: ", a[s].id), r.addNode(0, a[s].id, a[s].descr, a[s].type);
180
+ break;
181
+ case 20:
182
+ r.decorateNode({ icon: a[s] });
183
+ break;
184
+ case 25:
185
+ r.getLogger().trace("node found ..", a[s - 2]), this.$ = {
186
+ id: a[s - 1],
187
+ descr: a[s - 1],
188
+ type: r.getType(a[s - 2], a[s])
189
+ };
190
+ break;
191
+ case 26:
192
+ this.$ = {
193
+ id: a[s],
194
+ descr: a[s],
195
+ type: r.nodeType.DEFAULT
196
+ };
197
+ break;
198
+ case 27:
199
+ r.getLogger().trace("node found ..", a[s - 3]), this.$ = {
200
+ id: a[s - 3],
201
+ descr: a[s - 1],
202
+ type: r.getType(a[s - 2], a[s])
203
+ };
204
+ break;
205
+ }
206
+ }, "anonymous"),
207
+ table: [
208
+ {
209
+ 3: 1,
210
+ 4: 2,
211
+ 5: 3,
212
+ 6: [1, 5],
213
+ 8: n
214
+ },
215
+ { 1: [3] },
216
+ { 1: [2, 1] },
217
+ {
218
+ 4: 6,
219
+ 6: [1, 7],
220
+ 7: [1, 8],
221
+ 8: n
222
+ },
223
+ {
224
+ 6: r,
225
+ 7: [1, 10],
226
+ 9: 9,
227
+ 12: 11,
228
+ 13: i,
229
+ 14: 14,
230
+ 15: a,
231
+ 16: o,
232
+ 17: 17,
233
+ 18: 18,
234
+ 19: s,
235
+ 22: c
236
+ },
237
+ e(l, [2, 3]),
238
+ { 1: [2, 2] },
239
+ e(l, [2, 4]),
240
+ e(l, [2, 5]),
241
+ {
242
+ 1: [2, 6],
243
+ 6: r,
244
+ 12: 21,
245
+ 13: i,
246
+ 14: 14,
247
+ 15: a,
248
+ 16: o,
249
+ 17: 17,
250
+ 18: 18,
251
+ 19: s,
252
+ 22: c
253
+ },
254
+ {
255
+ 6: r,
256
+ 9: 22,
257
+ 12: 11,
258
+ 13: i,
259
+ 14: 14,
260
+ 15: a,
261
+ 16: o,
262
+ 17: 17,
263
+ 18: 18,
264
+ 19: s,
265
+ 22: c
266
+ },
267
+ {
268
+ 6: u,
269
+ 7: d,
270
+ 10: 23,
271
+ 11: f
272
+ },
273
+ e(p, [2, 22], {
274
+ 17: 17,
275
+ 18: 18,
276
+ 14: 27,
277
+ 15: [1, 28],
278
+ 16: [1, 29],
279
+ 19: s,
280
+ 22: c
281
+ }),
282
+ e(p, [2, 18]),
283
+ e(p, [2, 19]),
284
+ e(p, [2, 20]),
285
+ e(p, [2, 21]),
286
+ e(p, [2, 23]),
287
+ e(p, [2, 24]),
288
+ e(p, [2, 26], { 19: [1, 30] }),
289
+ { 20: [1, 31] },
290
+ {
291
+ 6: u,
292
+ 7: d,
293
+ 10: 32,
294
+ 11: f
295
+ },
296
+ {
297
+ 1: [2, 7],
298
+ 6: r,
299
+ 12: 21,
300
+ 13: i,
301
+ 14: 14,
302
+ 15: a,
303
+ 16: o,
304
+ 17: 17,
305
+ 18: 18,
306
+ 19: s,
307
+ 22: c
308
+ },
309
+ e(m, [2, 14], {
310
+ 7: h,
311
+ 11: g
312
+ }),
313
+ e(_, [2, 8]),
314
+ e(_, [2, 9]),
315
+ e(_, [2, 10]),
316
+ e(p, [2, 15]),
317
+ e(p, [2, 16]),
318
+ e(p, [2, 17]),
319
+ { 20: [1, 35] },
320
+ { 21: [1, 36] },
321
+ e(m, [2, 13], {
322
+ 7: h,
323
+ 11: g
324
+ }),
325
+ e(_, [2, 11]),
326
+ e(_, [2, 12]),
327
+ { 21: [1, 37] },
328
+ e(p, [2, 25]),
329
+ e(p, [2, 27])
330
+ ],
331
+ defaultActions: {
332
+ 2: [2, 1],
333
+ 6: [2, 2]
334
+ },
335
+ parseError: /* @__PURE__ */ __name(function(e, t) {
336
+ if (t.recoverable) this.trace(e);
337
+ else {
338
+ var n = Error(e);
339
+ throw n.hash = t, n;
340
+ }
341
+ }, "parseError"),
342
+ parse: /* @__PURE__ */ __name(function(e) {
343
+ 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: {} };
344
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
345
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
346
+ var v = h.yylloc;
347
+ o.push(v);
348
+ var y = h.options && h.options.ranges;
349
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
350
+ function b(e) {
351
+ r.length -= 2 * e, a.length -= e, o.length -= e;
352
+ }
353
+ __name(b, "popStack");
354
+ function x() {
355
+ var e = i.pop() || h.lex() || p;
356
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
357
+ }
358
+ __name(x, "lex");
359
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
360
+ 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]) {
361
+ var M = "";
362
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
363
+ 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, {
364
+ text: h.match,
365
+ token: this.terminals_[S] || S,
366
+ line: h.yylineno,
367
+ loc: v,
368
+ expected: j
369
+ });
370
+ }
371
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
372
+ switch (T[0]) {
373
+ case 1:
374
+ 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--);
375
+ break;
376
+ case 2:
377
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
378
+ first_line: o[o.length - (k || 1)].first_line,
379
+ last_line: o[o.length - 1].last_line,
380
+ first_column: o[o.length - (k || 1)].first_column,
381
+ last_column: o[o.length - 1].last_column
382
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
383
+ c,
384
+ u,
385
+ l,
386
+ g.yy,
387
+ T[1],
388
+ a,
389
+ o
390
+ ].concat(m)), E !== void 0) return E;
391
+ 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);
392
+ break;
393
+ case 3: return !0;
394
+ }
395
+ }
396
+ return !0;
397
+ }, "parse")
398
+ };
399
+ v.lexer = /* @__PURE__ */ (function() {
400
+ return {
401
+ EOF: 1,
402
+ parseError: /* @__PURE__ */ __name(function(e, t) {
403
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
404
+ else throw Error(e);
405
+ }, "parseError"),
406
+ setInput: /* @__PURE__ */ __name(function(e, t) {
407
+ 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 = {
408
+ first_line: 1,
409
+ first_column: 0,
410
+ last_line: 1,
411
+ last_column: 0
412
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
413
+ }, "setInput"),
414
+ input: /* @__PURE__ */ __name(function() {
415
+ var e = this._input[0];
416
+ 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;
417
+ }, "input"),
418
+ unput: /* @__PURE__ */ __name(function(e) {
419
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
420
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
421
+ var r = this.match.split(/(?:\r\n?|\n)/g);
422
+ 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);
423
+ var i = this.yylloc.range;
424
+ return this.yylloc = {
425
+ first_line: this.yylloc.first_line,
426
+ last_line: this.yylineno + 1,
427
+ first_column: this.yylloc.first_column,
428
+ 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
429
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
430
+ }, "unput"),
431
+ more: /* @__PURE__ */ __name(function() {
432
+ return this._more = !0, this;
433
+ }, "more"),
434
+ reject: /* @__PURE__ */ __name(function() {
435
+ if (this.options.backtrack_lexer) this._backtrack = !0;
436
+ 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(), {
437
+ text: "",
438
+ token: null,
439
+ line: this.yylineno
440
+ });
441
+ return this;
442
+ }, "reject"),
443
+ less: /* @__PURE__ */ __name(function(e) {
444
+ this.unput(this.match.slice(e));
445
+ }, "less"),
446
+ pastInput: /* @__PURE__ */ __name(function() {
447
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
448
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
449
+ }, "pastInput"),
450
+ upcomingInput: /* @__PURE__ */ __name(function() {
451
+ var e = this.match;
452
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
453
+ }, "upcomingInput"),
454
+ showPosition: /* @__PURE__ */ __name(function() {
455
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
456
+ return e + this.upcomingInput() + "\n" + t + "^";
457
+ }, "showPosition"),
458
+ test_match: /* @__PURE__ */ __name(function(e, t) {
459
+ var n, r, i;
460
+ if (this.options.backtrack_lexer && (i = {
461
+ yylineno: this.yylineno,
462
+ yylloc: {
463
+ first_line: this.yylloc.first_line,
464
+ last_line: this.last_line,
465
+ first_column: this.yylloc.first_column,
466
+ last_column: this.yylloc.last_column
467
+ },
468
+ yytext: this.yytext,
469
+ match: this.match,
470
+ matches: this.matches,
471
+ matched: this.matched,
472
+ yyleng: this.yyleng,
473
+ offset: this.offset,
474
+ _more: this._more,
475
+ _input: this._input,
476
+ yy: this.yy,
477
+ conditionStack: this.conditionStack.slice(0),
478
+ done: this.done
479
+ }, 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 = {
480
+ first_line: this.yylloc.last_line,
481
+ last_line: this.yylineno + 1,
482
+ first_column: this.yylloc.last_column,
483
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
484
+ }, 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;
485
+ if (this._backtrack) {
486
+ for (var a in i) this[a] = i[a];
487
+ return !1;
488
+ }
489
+ return !1;
490
+ }, "test_match"),
491
+ next: /* @__PURE__ */ __name(function() {
492
+ if (this.done) return this.EOF;
493
+ this._input || (this.done = !0);
494
+ var e, t, n, r;
495
+ this._more || (this.yytext = "", this.match = "");
496
+ 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)) {
497
+ if (t = n, r = a, this.options.backtrack_lexer) {
498
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
499
+ if (this._backtrack) {
500
+ t = !1;
501
+ continue;
502
+ } else return !1;
503
+ } else if (!this.options.flex) break;
504
+ }
505
+ 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(), {
506
+ text: "",
507
+ token: null,
508
+ line: this.yylineno
509
+ });
510
+ }, "next"),
511
+ lex: /* @__PURE__ */ __name(function() {
512
+ return this.next() || this.lex();
513
+ }, "lex"),
514
+ begin: /* @__PURE__ */ __name(function(e) {
515
+ this.conditionStack.push(e);
516
+ }, "begin"),
517
+ popState: /* @__PURE__ */ __name(function() {
518
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
519
+ }, "popState"),
520
+ _currentRules: /* @__PURE__ */ __name(function() {
521
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
522
+ }, "_currentRules"),
523
+ topState: /* @__PURE__ */ __name(function(e) {
524
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
525
+ }, "topState"),
526
+ pushState: /* @__PURE__ */ __name(function(e) {
527
+ this.begin(e);
528
+ }, "pushState"),
529
+ stateStackSize: /* @__PURE__ */ __name(function() {
530
+ return this.conditionStack.length;
531
+ }, "stateStackSize"),
532
+ options: { "case-insensitive": !0 },
533
+ performAction: /* @__PURE__ */ __name(function(e, t, n, r) {
534
+ switch (n) {
535
+ case 0: return e.getLogger().trace("Found comment", t.yytext), 6;
536
+ case 1: return 8;
537
+ case 2:
538
+ this.begin("CLASS");
539
+ break;
540
+ case 3: return this.popState(), 16;
541
+ case 4:
542
+ this.popState();
543
+ break;
544
+ case 5:
545
+ e.getLogger().trace("Begin icon"), this.begin("ICON");
546
+ break;
547
+ case 6: return e.getLogger().trace("SPACELINE"), 6;
548
+ case 7: return 7;
549
+ case 8: return 15;
550
+ case 9:
551
+ e.getLogger().trace("end icon"), this.popState();
552
+ break;
553
+ case 10: return e.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
554
+ case 11: return e.getLogger().trace("Cloud"), this.begin("NODE"), 19;
555
+ case 12: return e.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
556
+ case 13: return e.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
557
+ case 14: return this.begin("NODE"), 19;
558
+ case 15: return this.begin("NODE"), 19;
559
+ case 16: return this.begin("NODE"), 19;
560
+ case 17: return this.begin("NODE"), 19;
561
+ case 18: return 13;
562
+ case 19: return 22;
563
+ case 20: return 11;
564
+ case 21:
565
+ this.begin("NSTR2");
566
+ break;
567
+ case 22: return "NODE_DESCR";
568
+ case 23:
569
+ this.popState();
570
+ break;
571
+ case 24:
572
+ e.getLogger().trace("Starting NSTR"), this.begin("NSTR");
573
+ break;
574
+ case 25: return e.getLogger().trace("description:", t.yytext), "NODE_DESCR";
575
+ case 26:
576
+ this.popState();
577
+ break;
578
+ case 27: return this.popState(), e.getLogger().trace("node end ))"), "NODE_DEND";
579
+ case 28: return this.popState(), e.getLogger().trace("node end )"), "NODE_DEND";
580
+ case 29: return this.popState(), e.getLogger().trace("node end ...", t.yytext), "NODE_DEND";
581
+ case 30: return this.popState(), e.getLogger().trace("node end (("), "NODE_DEND";
582
+ case 31: return this.popState(), e.getLogger().trace("node end (-"), "NODE_DEND";
583
+ case 32: return this.popState(), e.getLogger().trace("node end (-"), "NODE_DEND";
584
+ case 33: return this.popState(), e.getLogger().trace("node end (("), "NODE_DEND";
585
+ case 34: return this.popState(), e.getLogger().trace("node end (("), "NODE_DEND";
586
+ case 35: return e.getLogger().trace("Long description:", t.yytext), 20;
587
+ case 36: return e.getLogger().trace("Long description:", t.yytext), 20;
588
+ }
589
+ }, "anonymous"),
590
+ rules: [
591
+ /^(?:\s*%%.*)/i,
592
+ /^(?:mindmap\b)/i,
593
+ /^(?::::)/i,
594
+ /^(?:.+)/i,
595
+ /^(?:\n)/i,
596
+ /^(?:::icon\()/i,
597
+ /^(?:[\s]+[\n])/i,
598
+ /^(?:[\n]+)/i,
599
+ /^(?:[^\)]+)/i,
600
+ /^(?:\))/i,
601
+ /^(?:-\))/i,
602
+ /^(?:\(-)/i,
603
+ /^(?:\)\))/i,
604
+ /^(?:\))/i,
605
+ /^(?:\(\()/i,
606
+ /^(?:\{\{)/i,
607
+ /^(?:\()/i,
608
+ /^(?:\[)/i,
609
+ /^(?:[\s]+)/i,
610
+ /^(?:[^\(\[\n\)\{\}]+)/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
+ /^(?:.+(?!\(\())/i
628
+ ],
629
+ conditions: {
630
+ CLASS: {
631
+ rules: [3, 4],
632
+ inclusive: !1
633
+ },
634
+ ICON: {
635
+ rules: [8, 9],
636
+ inclusive: !1
637
+ },
638
+ NSTR2: {
639
+ rules: [22, 23],
640
+ inclusive: !1
641
+ },
642
+ NSTR: {
643
+ rules: [25, 26],
644
+ inclusive: !1
645
+ },
646
+ NODE: {
647
+ rules: [
648
+ 21,
649
+ 24,
650
+ 27,
651
+ 28,
652
+ 29,
653
+ 30,
654
+ 31,
655
+ 32,
656
+ 33,
657
+ 34,
658
+ 35,
659
+ 36
660
+ ],
661
+ inclusive: !1
662
+ },
663
+ INITIAL: {
664
+ rules: [
665
+ 0,
666
+ 1,
667
+ 2,
668
+ 5,
669
+ 6,
670
+ 7,
671
+ 10,
672
+ 11,
673
+ 12,
674
+ 13,
675
+ 14,
676
+ 15,
677
+ 16,
678
+ 17,
679
+ 18,
680
+ 19,
681
+ 20
682
+ ],
683
+ inclusive: !0
684
+ }
685
+ }
686
+ };
687
+ })();
688
+ function y() {
689
+ this.yy = {};
690
+ }
691
+ return __name(y, "Parser"), y.prototype = v, v.Parser = y, new y();
692
+ })();
693
+ parser.parser = parser;
694
+ var mindmap_default = parser, nodeType = {
695
+ DEFAULT: 0,
696
+ NO_BORDER: 0,
697
+ ROUNDED_RECT: 1,
698
+ RECT: 2,
699
+ CIRCLE: 3,
700
+ CLOUD: 4,
701
+ BANG: 5,
702
+ HEXAGON: 6
703
+ }, MindmapDB = class {
704
+ constructor() {
705
+ this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = nodeType, 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);
706
+ }
707
+ static #e = __name(this, "MindmapDB");
708
+ clear() {
709
+ this.nodes = [], this.count = 0, this.elements = {}, this.baseLevel = void 0;
710
+ }
711
+ getParent(e) {
712
+ for (let t = this.nodes.length - 1; t >= 0; t--) if (this.nodes[t].level < e) return this.nodes[t];
713
+ return null;
714
+ }
715
+ getMindmap() {
716
+ return this.nodes.length > 0 ? this.nodes[0] : null;
717
+ }
718
+ addNode(t, n, i, a) {
719
+ log.info("addNode", t, n, i, a);
720
+ let o = !1;
721
+ this.nodes.length === 0 ? (this.baseLevel = t, t = 0, o = !0) : this.baseLevel !== void 0 && (t -= this.baseLevel, o = !1);
722
+ let l = getConfig2(), u = l.mindmap?.padding ?? defaultConfig_default.mindmap.padding;
723
+ switch (a) {
724
+ case this.nodeType.ROUNDED_RECT:
725
+ case this.nodeType.RECT:
726
+ case this.nodeType.HEXAGON:
727
+ u *= 2;
728
+ break;
729
+ }
730
+ let d = {
731
+ id: this.count++,
732
+ nodeId: sanitizeText(n, l),
733
+ level: t,
734
+ descr: sanitizeText(i, l),
735
+ type: a,
736
+ children: [],
737
+ width: l.mindmap?.maxNodeWidth ?? defaultConfig_default.mindmap.maxNodeWidth,
738
+ padding: u,
739
+ isRoot: o
740
+ }, f = this.getParent(t);
741
+ if (f) f.children.push(d), this.nodes.push(d);
742
+ else if (o) this.nodes.push(d);
743
+ else throw Error(`There can be only one root. No parent could be found for ("${d.descr}")`);
744
+ }
745
+ getType(t, n) {
746
+ switch (log.debug("In get type", t, n), t) {
747
+ case "[": return this.nodeType.RECT;
748
+ case "(": return n === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
749
+ case "((": return this.nodeType.CIRCLE;
750
+ case ")": return this.nodeType.CLOUD;
751
+ case "))": return this.nodeType.BANG;
752
+ case "{{": return this.nodeType.HEXAGON;
753
+ default: return this.nodeType.DEFAULT;
754
+ }
755
+ }
756
+ setElementForId(e, t) {
757
+ this.elements[e] = t;
758
+ }
759
+ getElementById(e) {
760
+ return this.elements[e];
761
+ }
762
+ decorateNode(e) {
763
+ if (!e) return;
764
+ let t = getConfig2(), n = this.nodes[this.nodes.length - 1];
765
+ e.icon && (n.icon = sanitizeText(e.icon, t)), e.class && (n.class = sanitizeText(e.class, t));
766
+ }
767
+ type2Str(e) {
768
+ switch (e) {
769
+ case this.nodeType.DEFAULT: return "no-border";
770
+ case this.nodeType.RECT: return "rect";
771
+ case this.nodeType.ROUNDED_RECT: return "rounded-rect";
772
+ case this.nodeType.CIRCLE: return "circle";
773
+ case this.nodeType.CLOUD: return "cloud";
774
+ case this.nodeType.BANG: return "bang";
775
+ case this.nodeType.HEXAGON: return "hexgon";
776
+ default: return "no-border";
777
+ }
778
+ }
779
+ assignSections(e, t) {
780
+ if (e.level === 0 ? e.section = void 0 : e.section = t, e.children) for (let [n, r] of e.children.entries()) {
781
+ let i = e.level === 0 ? n : t;
782
+ this.assignSections(r, i);
783
+ }
784
+ }
785
+ flattenNodes(e, n) {
786
+ let r = ["mindmap-node"];
787
+ e.isRoot === !0 ? r.push("section-root", "section--1") : e.section !== void 0 && r.push(`section-${e.section}`), e.class && r.push(e.class);
788
+ let i = r.join(" "), a = /* @__PURE__ */ __name((e) => {
789
+ switch (e) {
790
+ case nodeType.CIRCLE: return "mindmapCircle";
791
+ case nodeType.RECT: return "rect";
792
+ case nodeType.ROUNDED_RECT: return "rounded";
793
+ case nodeType.CLOUD: return "cloud";
794
+ case nodeType.BANG: return "bang";
795
+ case nodeType.HEXAGON: return "hexagon";
796
+ case nodeType.DEFAULT: return "defaultMindmapNode";
797
+ case nodeType.NO_BORDER:
798
+ default: return "rect";
799
+ }
800
+ }, "getShapeFromType"), o = {
801
+ id: e.id.toString(),
802
+ domId: "node_" + e.id.toString(),
803
+ label: e.descr,
804
+ isGroup: !1,
805
+ shape: a(e.type),
806
+ width: e.width,
807
+ height: e.height ?? 0,
808
+ padding: e.padding,
809
+ cssClasses: i,
810
+ cssStyles: [],
811
+ look: "default",
812
+ icon: e.icon,
813
+ x: e.x,
814
+ y: e.y,
815
+ level: e.level,
816
+ nodeId: e.nodeId,
817
+ type: e.type,
818
+ section: e.section
819
+ };
820
+ if (n.push(o), e.children) for (let t of e.children) this.flattenNodes(t, n);
821
+ }
822
+ generateEdges(e, t) {
823
+ if (e.children) for (let n of e.children) {
824
+ let r = "edge";
825
+ n.section !== void 0 && (r += ` section-edge-${n.section}`);
826
+ let i = e.level + 1;
827
+ r += ` edge-depth-${i}`;
828
+ let a = {
829
+ id: `edge_${e.id}_${n.id}`,
830
+ start: e.id.toString(),
831
+ end: n.id.toString(),
832
+ type: "normal",
833
+ curve: "basis",
834
+ thickness: "normal",
835
+ look: "default",
836
+ classes: r,
837
+ depth: e.level,
838
+ section: n.section
839
+ };
840
+ t.push(a), this.generateEdges(n, t);
841
+ }
842
+ }
843
+ getData() {
844
+ let t = this.getMindmap(), r = getConfig2(), i = getUserDefinedConfig().layout !== void 0, a = r;
845
+ if (i || (a.layout = "cose-bilkent"), !t) return {
846
+ nodes: [],
847
+ edges: [],
848
+ config: a
849
+ };
850
+ log.debug("getData: mindmapRoot", t, r), this.assignSections(t);
851
+ let o = [], c = [];
852
+ this.flattenNodes(t, o), this.generateEdges(t, c), log.debug(`getData: processed ${o.length} nodes and ${c.length} edges`);
853
+ let l = /* @__PURE__ */ new Map();
854
+ for (let e of o) l.set(e.id, {
855
+ shape: e.shape,
856
+ width: e.width,
857
+ height: e.height,
858
+ padding: e.padding
859
+ });
860
+ return {
861
+ nodes: o,
862
+ edges: c,
863
+ config: a,
864
+ rootNode: t,
865
+ markers: ["point"],
866
+ direction: "TB",
867
+ nodeSpacing: 50,
868
+ rankSpacing: 50,
869
+ shapes: Object.fromEntries(l),
870
+ type: "mindmap",
871
+ diagramId: "mindmap-" + v4_default()
872
+ };
873
+ }
874
+ getLogger() {
875
+ return log;
876
+ }
877
+ }, mindmapRenderer_default = { draw: /* @__PURE__ */ __name(async (t, n, r, i) => {
878
+ log.debug("Rendering mindmap diagram\n" + t);
879
+ let a = i.db, o = a.getData(), s = getDiagramElement(n, o.config.securityLevel);
880
+ o.type = i.type, o.layoutAlgorithm = getRegisteredLayoutAlgorithm(o.config.layout, { fallback: "cose-bilkent" }), o.diagramId = n, a.getMindmap() && (o.nodes.forEach((e) => {
881
+ 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);
882
+ }), await render(o, s), setupViewPortForSVG(s, o.config.mindmap?.padding ?? defaultConfig_default.mindmap.padding, "mindmapDiagram", o.config.mindmap?.useMaxWidth ?? defaultConfig_default.mindmap.useMaxWidth));
883
+ }, "draw") }, genSections = /* @__PURE__ */ __name((e) => {
884
+ let t = "";
885
+ for (let t = 0; t < e.THEME_COLOR_LIMIT; t++) e["lineColor" + t] = e["lineColor" + t] || e["cScaleInv" + t], is_dark_default(e["lineColor" + t]) ? e["lineColor" + t] = lighten_default(e["lineColor" + t], 20) : e["lineColor" + t] = darken_default(e["lineColor" + t], 20);
886
+ for (let n = 0; n < e.THEME_COLOR_LIMIT; n++) {
887
+ let r = "" + (17 - 3 * n);
888
+ t += `
889
+ .section-${n - 1} rect, .section-${n - 1} path, .section-${n - 1} circle, .section-${n - 1} polygon, .section-${n - 1} path {
890
+ fill: ${e["cScale" + n]};
891
+ }
892
+ .section-${n - 1} text {
893
+ fill: ${e["cScaleLabel" + n]};
894
+ }
895
+ .node-icon-${n - 1} {
896
+ font-size: 40px;
897
+ color: ${e["cScaleLabel" + n]};
898
+ }
899
+ .section-edge-${n - 1}{
900
+ stroke: ${e["cScale" + n]};
901
+ }
902
+ .edge-depth-${n - 1}{
903
+ stroke-width: ${r};
904
+ }
905
+ .section-${n - 1} line {
906
+ stroke: ${e["cScaleInv" + n]} ;
907
+ stroke-width: 3;
908
+ }
909
+
910
+ .disabled, .disabled circle, .disabled text {
911
+ fill: lightgray;
912
+ }
913
+ .disabled text {
914
+ fill: #efefef;
915
+ }
916
+ `;
917
+ }
918
+ return t;
919
+ }, "genSections"), diagram = {
920
+ get db() {
921
+ return new MindmapDB();
922
+ },
923
+ renderer: mindmapRenderer_default,
924
+ parser: mindmap_default,
925
+ styles: /* @__PURE__ */ __name((e) => `
926
+ .edge {
927
+ stroke-width: 3;
928
+ }
929
+ ${genSections(e)}
930
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
931
+ fill: ${e.git0};
932
+ }
933
+ .section-root text {
934
+ fill: ${e.gitBranchLabel0};
935
+ }
936
+ .section-root span {
937
+ color: ${e.gitBranchLabel0};
938
+ }
939
+ .section-2 span {
940
+ color: ${e.gitBranchLabel0};
941
+ }
942
+ .icon-container {
943
+ height:100%;
944
+ display: flex;
945
+ justify-content: center;
946
+ align-items: center;
947
+ }
948
+ .edge {
949
+ fill: none;
950
+ }
951
+ .mindmap-node-label {
952
+ dy: 1em;
953
+ alignment-baseline: middle;
954
+ text-anchor: middle;
955
+ dominant-baseline: middle;
956
+ text-align: center;
957
+ }
958
+ `, "getStyles")
959
+ };
960
+ export { diagram };