@qwen-code/web-shell 0.27.1 → 0.27.2

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 (158) hide show
  1. package/NOTICES.txt +10721 -958
  2. package/dist/{PierreFilePreview-BT_JRIvF.js → PierreFilePreview-CVi_Wsf-.js} +1 -1
  3. package/dist/SpreadsheetPreview-CTyYrLmD.js +379 -0
  4. package/dist/{WorkspaceFileBrowser-G1yA2eBf.js → WorkspaceFileBrowser-DkQgnDFv.js} +2 -2
  5. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  6. package/dist/abnfDiagram-VCTEODGH-CQWhk3bg.js +87 -0
  7. package/dist/abnfDiagram-VCTEODGH-DXK3iWaN.js +87 -0
  8. package/dist/{agents-route-bkxyBAkN.js → agents-route-ZD8W2lTb.js} +2 -2
  9. package/dist/arc-BcP3aO-G.js +83 -0
  10. package/dist/arc-DkZAOzaU.js +83 -0
  11. package/dist/architectureDiagram-5GKGNRK7-DhcVEkLQ.js +4775 -0
  12. package/dist/architectureDiagram-5GKGNRK7-DusU8ybk.js +4776 -0
  13. package/dist/blockDiagram-NRAW4CY4-BMOuo5wl.js +1414 -0
  14. package/dist/blockDiagram-NRAW4CY4-YciA8-8I.js +1414 -0
  15. package/dist/c4Diagram-UCG6FXSJ-BJxpHO4v.js +1508 -0
  16. package/dist/c4Diagram-UCG6FXSJ-DNpq-cdF.js +1508 -0
  17. package/dist/channel-CfhQTpjX.js +5 -0
  18. package/dist/channel-QZAYPfF8.js +5 -0
  19. package/dist/chunk-2Q5K7J3B-EGbMOnEe.js +15 -0
  20. package/dist/chunk-2Q5K7J3B-mtpkChaF.js +15 -0
  21. package/dist/chunk-5VM5RSS4-CP4Q2W8n.js +19 -0
  22. package/dist/chunk-5VM5RSS4-CucJ3wyB.js +19 -0
  23. package/dist/chunk-F27PBJKO-CS9kzvAx.js +68 -0
  24. package/dist/chunk-F27PBJKO-Cfw_29T-.js +68 -0
  25. package/dist/chunk-G27WJ6UU-BZzmQ8FW.js +1408 -0
  26. package/dist/chunk-G27WJ6UU-DdeEiwmL.js +1408 -0
  27. package/dist/chunk-JWPE2WC7-BL_hjRLf.js +8 -0
  28. package/dist/chunk-JWPE2WC7-C03UDQBx.js +8 -0
  29. package/dist/chunk-LCL6LL3I-CNn3XyuL.js +1533 -0
  30. package/dist/chunk-LCL6LL3I-CR-IGGIM.js +1533 -0
  31. package/dist/chunk-POPQ4Y6H-BVQbxVHz.js +19 -0
  32. package/dist/chunk-POPQ4Y6H-UJK1fYGP.js +19 -0
  33. package/dist/chunk-SVP7TREG-B-E-xFG8.js +664 -0
  34. package/dist/chunk-SVP7TREG-BUmyTmov.js +664 -0
  35. package/dist/chunk-XXDRQBXY-BDcf4DQz.js +8 -0
  36. package/dist/chunk-XXDRQBXY-BHAq0mtL.js +8 -0
  37. package/dist/classDiagram-DTDB5LWJ-CVA3J-EH.js +16 -0
  38. package/dist/classDiagram-DTDB5LWJ-Dh121Rlt.js +16 -0
  39. package/dist/classDiagram-v2-JRS7N3AN-CVA3J-EH.js +16 -0
  40. package/dist/classDiagram-v2-JRS7N3AN-Dh121Rlt.js +16 -0
  41. package/dist/cose-bilkent-JH36ORCC-CLe0kcHa.js +2605 -0
  42. package/dist/cose-bilkent-JH36ORCC-DpMM48hA.js +2606 -0
  43. package/dist/cynefin-OW5HDTMX-CyO3b088.js +23750 -0
  44. package/dist/cynefinDiagram-5FMLGOSQ-C5xaWeuA.js +299 -0
  45. package/dist/cynefinDiagram-5FMLGOSQ-mLaK-3R3.js +299 -0
  46. package/dist/cytoscape.esm-DCrf4dL8.js +18782 -0
  47. package/dist/daemon-react-sdk.js +1 -1
  48. package/dist/dagre-3AP2YEHR-CmNFrtW9.js +456 -0
  49. package/dist/dagre-3AP2YEHR-zDm3fBQq.js +456 -0
  50. package/dist/defaultLocale-BgPVtth8.js +171 -0
  51. package/dist/diagram-S7CK7UJ4-BQtgRcGU.js +346 -0
  52. package/dist/diagram-S7CK7UJ4-Clojnf04.js +346 -0
  53. package/dist/diagram-UQ7AKVKN-B3Ll3rB4.js +219 -0
  54. package/dist/diagram-UQ7AKVKN-CTn4O0fd.js +219 -0
  55. package/dist/diagram-VSXAHHWV-BeYXDVEh.js +463 -0
  56. package/dist/diagram-VSXAHHWV-mdxkNEZP.js +463 -0
  57. package/dist/diagram-VX7I27RA-C3bzQYLd.js +529 -0
  58. package/dist/diagram-VX7I27RA-DaPLIQOr.js +529 -0
  59. package/dist/diagram-Z3DM3KII-BImvaL3c.js +142 -0
  60. package/dist/diagram-Z3DM3KII-CkkdGhWO.js +142 -0
  61. package/dist/{docx-preview-BucJeYCm.js → docx-preview-BfV4m8Qp.js} +503 -506
  62. package/dist/ebnfDiagram-PWID7BFC-C8RUggbp.js +109 -0
  63. package/dist/ebnfDiagram-PWID7BFC-gJHJx-lt.js +109 -0
  64. package/dist/erDiagram-SSCWMZ5O-CKFzjLCd.js +1059 -0
  65. package/dist/erDiagram-SSCWMZ5O-DLJjXFG9.js +1059 -0
  66. package/dist/flowDiagram-A5DVABFB-BHAeEzG1.js +1689 -0
  67. package/dist/flowDiagram-A5DVABFB-BOdsfJ-4.js +1689 -0
  68. package/dist/ganttDiagram-EL5Y4UJY-CtL6LAbW.js +2703 -0
  69. package/dist/ganttDiagram-EL5Y4UJY-D0hNphpF.js +2704 -0
  70. package/dist/gitGraphDiagram-WWUBYQGX-8XcPnT4w.js +815 -0
  71. package/dist/gitGraphDiagram-WWUBYQGX-DxHtQ0ba.js +815 -0
  72. package/dist/{index-B6wNHUaX.js → index-BGsppGgG.js} +69284 -64504
  73. package/dist/index.js +3 -3
  74. package/dist/infoDiagram-RXCK75RN-B-Ds06LN.js +24 -0
  75. package/dist/infoDiagram-RXCK75RN-Dhirg4if.js +24 -0
  76. package/dist/init-DjUOC4st.js +16 -0
  77. package/dist/ishikawaDiagram-5VMMS53U-BJPKneVd.js +621 -0
  78. package/dist/ishikawaDiagram-5VMMS53U-CsttzTkq.js +621 -0
  79. package/dist/journeyDiagram-EYS64GPL-BBAEhOQ9.js +836 -0
  80. package/dist/journeyDiagram-EYS64GPL-DfXS6tI_.js +836 -0
  81. package/dist/kanban-definition-3QL26DDD-Bh1Jz01C.js +723 -0
  82. package/dist/kanban-definition-3QL26DDD-C8yOTG02.js +723 -0
  83. package/dist/layout-Dxab-q-T.js +1704 -0
  84. package/dist/layout-sTbo9v3C.js +1704 -0
  85. package/dist/linear-BhTDfwHZ.js +259 -0
  86. package/dist/linear-CjDL9r_e.js +259 -0
  87. package/dist/mermaid.core-CFV16zMl.js +19742 -0
  88. package/dist/mermaid.core-DBp8atac.js +19747 -0
  89. package/dist/mindmap-definition-FBJOCRG2-KPo1Z4it.js +826 -0
  90. package/dist/mindmap-definition-FBJOCRG2-vau9OLMK.js +826 -0
  91. package/dist/ordinal-DfAQgscy.js +61 -0
  92. package/dist/pegDiagram-XKGWAZYB-CFjH6RoO.js +95 -0
  93. package/dist/pegDiagram-XKGWAZYB-EeXt14MX.js +95 -0
  94. package/dist/pieDiagram-E7YTZNPT-CJa9GbCV.js +208 -0
  95. package/dist/pieDiagram-E7YTZNPT-JyO_8fWF.js +208 -0
  96. package/dist/quadrantDiagram-AXDQQJYC-B7tyPD89.js +1023 -0
  97. package/dist/quadrantDiagram-AXDQQJYC-G9wAekw0.js +1023 -0
  98. package/dist/railroadDiagram-O6MQD6OU-3-cuTnqH.js +77 -0
  99. package/dist/railroadDiagram-O6MQD6OU-SyM4QCMp.js +77 -0
  100. package/dist/requirementDiagram-EFPCY7ZU-BJal3W63.js +882 -0
  101. package/dist/requirementDiagram-EFPCY7ZU-bMW72Av_.js +882 -0
  102. package/dist/sankeyDiagram-P5KCCOFB-BKP8fccK.js +847 -0
  103. package/dist/sankeyDiagram-P5KCCOFB-C4KDi8Ty.js +847 -0
  104. package/dist/sequenceDiagram-WJ2MYXX4-DFvbPjPG.js +2888 -0
  105. package/dist/sequenceDiagram-WJ2MYXX4-DvgRoXFL.js +2888 -0
  106. package/dist/sizeCapture-X5ZJPWSS-DPkvpCxM.js +46 -0
  107. package/dist/sizeCapture-X5ZJPWSS-DU4nf5aV.js +46 -0
  108. package/dist/stateDiagram-HBIQ2CUA-CWp0mOcF.js +262 -0
  109. package/dist/stateDiagram-HBIQ2CUA-DkN3hNFV.js +262 -0
  110. package/dist/stateDiagram-v2-4QOOHH4V-Bh7H2ZBJ.js +16 -0
  111. package/dist/stateDiagram-v2-4QOOHH4V-DX-OvV9U.js +16 -0
  112. package/dist/sw.js +1 -1
  113. package/dist/swimlanes-XN3QIQJK-2s4fbN8J.js +5219 -0
  114. package/dist/swimlanes-XN3QIQJK-CI3ENZQA.js +5219 -0
  115. package/dist/swimlanesDiagram-VK2B7HYN-BEjeqDmx.js +13 -0
  116. package/dist/swimlanesDiagram-VK2B7HYN-DWJY6BGD.js +13 -0
  117. package/dist/timeline-definition-24CTP7MA-C_tZHri9.js +1057 -0
  118. package/dist/timeline-definition-24CTP7MA-DYXEracn.js +1057 -0
  119. package/dist/transcript.js +14564 -11549
  120. package/dist/types/App.d.ts +10 -1
  121. package/dist/types/components/ComposerUsageStats.d.ts +34 -0
  122. package/dist/types/components/WelcomeHeader.d.ts +8 -0
  123. package/dist/types/components/artifacts/tokenUsageTotals.d.ts +36 -0
  124. package/dist/types/components/channels/ChannelEditorDialog.d.ts +10 -1
  125. package/dist/types/components/channels/ChannelQrLogin.d.ts +13 -0
  126. package/dist/types/components/channels/WeixinLoginPanel.d.ts +17 -0
  127. package/dist/types/components/channels/channel-editor-state.d.ts +8 -1
  128. package/dist/types/components/channels/channel-platform.d.ts +2 -1
  129. package/dist/types/components/channels/weixin-auth-api.d.ts +32 -0
  130. package/dist/types/components/managed/ManagedRuntimeSkillsImporter.d.ts +10 -0
  131. package/dist/types/components/managed/ManagedSideQueryPanel.d.ts +5 -0
  132. package/dist/types/components/managed/WorkspaceBindingCreator.d.ts +26 -1
  133. package/dist/types/components/managed/generated/managed-agent-api.d.ts +605 -0
  134. package/dist/types/components/managed/java-managed-agent-client.d.ts +122 -1
  135. package/dist/types/components/managed/managed-agent-provider.d.ts +14 -1
  136. package/dist/types/components/managed/managed-diagnostics-messages.d.ts +14 -1
  137. package/dist/types/components/managed/managed-extension-install.d.ts +5 -2
  138. package/dist/types/components/managed/managed-extension-messages.d.ts +7 -0
  139. package/dist/types/components/managed/managed-extension-types.d.ts +4 -0
  140. package/dist/types/components/managed/managed-session-storage.d.ts +35 -0
  141. package/dist/types/components/managed/managed-side-query-command.d.ts +5 -0
  142. package/dist/types/components/managed/managed-side-query-types.d.ts +21 -0
  143. package/dist/types/components/managed/managed-side-query.test-fixtures.d.ts +3 -0
  144. package/dist/types/components/managed/use-managed-side-queries.d.ts +26 -0
  145. package/dist/types/customization.d.ts +31 -0
  146. package/dist/types/daemon/workspace/hooks/useDaemonChannels.d.ts +2 -1
  147. package/dist/types/daemon/workspace/types.d.ts +8 -1
  148. package/dist/types/index.d.ts +1 -0
  149. package/dist/{useDaemonMidTurnInjected-tBzI77Ar.js → useDaemonMidTurnInjected-B7dPEdqk.js} +2040 -1825
  150. package/dist/vennDiagram-4TSXK5OY-Bi3e_aHN.js +1578 -0
  151. package/dist/vennDiagram-4TSXK5OY-DZCe1Ffi.js +1578 -0
  152. package/dist/wardleyDiagram-VM6X3IG4-BNV5jzew.js +675 -0
  153. package/dist/wardleyDiagram-VM6X3IG4-DqFJHRmt.js +675 -0
  154. package/dist/xychartDiagram-S5SC5T6Z-BVIJ86ch.js +1492 -0
  155. package/dist/xychartDiagram-S5SC5T6Z-J8xP-hcH.js +1492 -0
  156. package/package.json +19 -9
  157. package/dist/SpreadsheetPreview-d5XL70Ho.js +0 -379
  158. package/dist/types/components/artifacts/excel-preview-parser.d.ts +0 -5
@@ -0,0 +1,826 @@
1
+ import { g as ae } from "./chunk-XXDRQBXY-BDcf4DQz.js";
2
+ import { s as ce } from "./chunk-POPQ4Y6H-BVQbxVHz.js";
3
+ import { _ as h, l as I, x as le, y as he, A as de, E as j, c as P, i as G, b4 as ge, ac as ue, ad as pe, ae as fe } from "./mermaid.core-CFV16zMl.js";
4
+ const _ = [];
5
+ for (let t = 0; t < 256; ++t)
6
+ _.push((t + 256).toString(16).slice(1));
7
+ function me(t, e = 0) {
8
+ return (_[t[e + 0]] + _[t[e + 1]] + _[t[e + 2]] + _[t[e + 3]] + "-" + _[t[e + 4]] + _[t[e + 5]] + "-" + _[t[e + 6]] + _[t[e + 7]] + "-" + _[t[e + 8]] + _[t[e + 9]] + "-" + _[t[e + 10]] + _[t[e + 11]] + _[t[e + 12]] + _[t[e + 13]] + _[t[e + 14]] + _[t[e + 15]]).toLowerCase();
9
+ }
10
+ const ye = new Uint8Array(16);
11
+ function Ee() {
12
+ return crypto.getRandomValues(ye);
13
+ }
14
+ function _e(t, e, a) {
15
+ return crypto.randomUUID ? crypto.randomUUID() : be(t);
16
+ }
17
+ function be(t, e, a) {
18
+ t = t || {};
19
+ const l = t.random ?? t.rng?.() ?? Ee();
20
+ if (l.length < 16)
21
+ throw new Error("Random bytes length must be >= 16");
22
+ return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, me(l);
23
+ }
24
+ var q = function() {
25
+ var t = /* @__PURE__ */ h(function(L, s, i, o) {
26
+ for (i = i || {}, o = L.length; o--; i[L[o]] = s) ;
27
+ return i;
28
+ }, "o"), e = [1, 4], a = [1, 13], l = [1, 12], n = [1, 15], d = [1, 16], f = [1, 20], y = [1, 19], E = [6, 7, 8], b = [1, 26], v = [1, 24], R = [1, 25], g = [6, 7, 11], A = [1, 6, 13, 15, 16, 19, 22], J = [1, 33], K = [1, 34], $ = [1, 6, 7, 11, 13, 15, 16, 19, 22], H = {
29
+ trace: /* @__PURE__ */ h(function() {
30
+ }, "trace"),
31
+ yy: {},
32
+ symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
33
+ terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
34
+ productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
35
+ performAction: /* @__PURE__ */ h(function(s, i, o, c, p, r, B) {
36
+ var u = r.length - 1;
37
+ switch (p) {
38
+ case 6:
39
+ case 7:
40
+ return c;
41
+ case 8:
42
+ c.getLogger().trace("Stop NL ");
43
+ break;
44
+ case 9:
45
+ c.getLogger().trace("Stop EOF ");
46
+ break;
47
+ case 11:
48
+ c.getLogger().trace("Stop NL2 ");
49
+ break;
50
+ case 12:
51
+ c.getLogger().trace("Stop EOF2 ");
52
+ break;
53
+ case 15:
54
+ c.getLogger().info("Node: ", r[u].id), c.addNode(r[u - 1].length, r[u].id, r[u].descr, r[u].type);
55
+ break;
56
+ case 16:
57
+ c.getLogger().trace("Icon: ", r[u]), c.decorateNode({ icon: r[u] });
58
+ break;
59
+ case 17:
60
+ case 21:
61
+ c.decorateNode({ class: r[u] });
62
+ break;
63
+ case 18:
64
+ c.getLogger().trace("SPACELIST");
65
+ break;
66
+ case 19:
67
+ c.getLogger().trace("Node: ", r[u].id), c.addNode(0, r[u].id, r[u].descr, r[u].type);
68
+ break;
69
+ case 20:
70
+ c.decorateNode({ icon: r[u] });
71
+ break;
72
+ case 25:
73
+ c.getLogger().trace("node found ..", r[u - 2]), this.$ = { id: r[u - 1], descr: r[u - 1], type: c.getType(r[u - 2], r[u]) };
74
+ break;
75
+ case 26:
76
+ this.$ = { id: r[u], descr: r[u], type: c.nodeType.DEFAULT };
77
+ break;
78
+ case 27:
79
+ c.getLogger().trace("node found ..", r[u - 3]), this.$ = { id: r[u - 3], descr: r[u - 1], type: c.getType(r[u - 2], r[u]) };
80
+ break;
81
+ }
82
+ }, "anonymous"),
83
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: e }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: e }, { 6: a, 7: [1, 10], 9: 9, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, t(E, [2, 3]), { 1: [2, 2] }, t(E, [2, 4]), t(E, [2, 5]), { 1: [2, 6], 6: a, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, { 6: a, 9: 22, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, { 6: b, 7: v, 10: 23, 11: R }, t(g, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: f, 22: y }), t(g, [2, 18]), t(g, [2, 19]), t(g, [2, 20]), t(g, [2, 21]), t(g, [2, 23]), t(g, [2, 24]), t(g, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: b, 7: v, 10: 32, 11: R }, { 1: [2, 7], 6: a, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, t(A, [2, 14], { 7: J, 11: K }), t($, [2, 8]), t($, [2, 9]), t($, [2, 10]), t(g, [2, 15]), t(g, [2, 16]), t(g, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, t(A, [2, 13], { 7: J, 11: K }), t($, [2, 11]), t($, [2, 12]), { 21: [1, 37] }, t(g, [2, 25]), t(g, [2, 27])],
84
+ defaultActions: { 2: [2, 1], 6: [2, 2] },
85
+ parseError: /* @__PURE__ */ h(function(s, i) {
86
+ if (i.recoverable)
87
+ this.trace(s);
88
+ else {
89
+ var o = new Error(s);
90
+ throw o.hash = i, o;
91
+ }
92
+ }, "parseError"),
93
+ parse: /* @__PURE__ */ h(function(s) {
94
+ var i = this, o = [0], c = [], p = [null], r = [], B = this.table, u = "", U = 0, Q = 0, ie = 2, Z = 1, se = r.slice.call(arguments, 1), m = Object.create(this.lexer), T = { yy: {} };
95
+ for (var W in this.yy)
96
+ Object.prototype.hasOwnProperty.call(this.yy, W) && (T.yy[W] = this.yy[W]);
97
+ m.setInput(s, T.yy), T.yy.lexer = m, T.yy.parser = this, typeof m.yylloc > "u" && (m.yylloc = {});
98
+ var z = m.yylloc;
99
+ r.push(z);
100
+ var re = m.options && m.options.ranges;
101
+ typeof T.yy.parseError == "function" ? this.parseError = T.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
102
+ function oe(S) {
103
+ o.length = o.length - 2 * S, p.length = p.length - S, r.length = r.length - S;
104
+ }
105
+ h(oe, "popStack");
106
+ function ee() {
107
+ var S;
108
+ return S = c.pop() || m.lex() || Z, typeof S != "number" && (S instanceof Array && (c = S, S = c.pop()), S = i.symbols_[S] || S), S;
109
+ }
110
+ h(ee, "lex");
111
+ for (var k, O, x, X, C = {}, V, N, te, F; ; ) {
112
+ if (O = o[o.length - 1], this.defaultActions[O] ? x = this.defaultActions[O] : ((k === null || typeof k > "u") && (k = ee()), x = B[O] && B[O][k]), typeof x > "u" || !x.length || !x[0]) {
113
+ var Y = "";
114
+ F = [];
115
+ for (V in B[O])
116
+ this.terminals_[V] && V > ie && F.push("'" + this.terminals_[V] + "'");
117
+ m.showPosition ? Y = "Parse error on line " + (U + 1) + `:
118
+ ` + m.showPosition() + `
119
+ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[k] || k) + "'" : Y = "Parse error on line " + (U + 1) + ": Unexpected " + (k == Z ? "end of input" : "'" + (this.terminals_[k] || k) + "'"), this.parseError(Y, {
120
+ text: m.match,
121
+ token: this.terminals_[k] || k,
122
+ line: m.yylineno,
123
+ loc: z,
124
+ expected: F
125
+ });
126
+ }
127
+ if (x[0] instanceof Array && x.length > 1)
128
+ throw new Error("Parse Error: multiple actions possible at state: " + O + ", token: " + k);
129
+ switch (x[0]) {
130
+ case 1:
131
+ o.push(k), p.push(m.yytext), r.push(m.yylloc), o.push(x[1]), k = null, Q = m.yyleng, u = m.yytext, U = m.yylineno, z = m.yylloc;
132
+ break;
133
+ case 2:
134
+ if (N = this.productions_[x[1]][1], C.$ = p[p.length - N], C._$ = {
135
+ first_line: r[r.length - (N || 1)].first_line,
136
+ last_line: r[r.length - 1].last_line,
137
+ first_column: r[r.length - (N || 1)].first_column,
138
+ last_column: r[r.length - 1].last_column
139
+ }, re && (C._$.range = [
140
+ r[r.length - (N || 1)].range[0],
141
+ r[r.length - 1].range[1]
142
+ ]), X = this.performAction.apply(C, [
143
+ u,
144
+ Q,
145
+ U,
146
+ T.yy,
147
+ x[1],
148
+ p,
149
+ r
150
+ ].concat(se)), typeof X < "u")
151
+ return X;
152
+ N && (o = o.slice(0, -1 * N * 2), p = p.slice(0, -1 * N), r = r.slice(0, -1 * N)), o.push(this.productions_[x[1]][0]), p.push(C.$), r.push(C._$), te = B[o[o.length - 2]][o[o.length - 1]], o.push(te);
153
+ break;
154
+ case 3:
155
+ return !0;
156
+ }
157
+ }
158
+ return !0;
159
+ }, "parse")
160
+ }, ne = /* @__PURE__ */ function() {
161
+ var L = {
162
+ EOF: 1,
163
+ parseError: /* @__PURE__ */ h(function(i, o) {
164
+ if (this.yy.parser)
165
+ this.yy.parser.parseError(i, o);
166
+ else
167
+ throw new Error(i);
168
+ }, "parseError"),
169
+ // resets the lexer, sets new input
170
+ setInput: /* @__PURE__ */ h(function(s, i) {
171
+ return this.yy = i || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
172
+ first_line: 1,
173
+ first_column: 0,
174
+ last_line: 1,
175
+ last_column: 0
176
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
177
+ }, "setInput"),
178
+ // consumes and returns one char from the input
179
+ input: /* @__PURE__ */ h(function() {
180
+ var s = this._input[0];
181
+ this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
182
+ var i = s.match(/(?:\r\n?|\n).*/g);
183
+ return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
184
+ }, "input"),
185
+ // unshifts one char (or a string) into the input
186
+ unput: /* @__PURE__ */ h(function(s) {
187
+ var i = s.length, o = s.split(/(?:\r\n?|\n)/g);
188
+ this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
189
+ var c = this.match.split(/(?:\r\n?|\n)/g);
190
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1);
191
+ var p = this.yylloc.range;
192
+ return this.yylloc = {
193
+ first_line: this.yylloc.first_line,
194
+ last_line: this.yylineno + 1,
195
+ first_column: this.yylloc.first_column,
196
+ last_column: o ? (o.length === c.length ? this.yylloc.first_column : 0) + c[c.length - o.length].length - o[0].length : this.yylloc.first_column - i
197
+ }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
198
+ }, "unput"),
199
+ // When called from action, caches matched text and appends it on next action
200
+ more: /* @__PURE__ */ h(function() {
201
+ return this._more = !0, this;
202
+ }, "more"),
203
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
204
+ reject: /* @__PURE__ */ h(function() {
205
+ if (this.options.backtrack_lexer)
206
+ this._backtrack = !0;
207
+ else
208
+ 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).
209
+ ` + this.showPosition(), {
210
+ text: "",
211
+ token: null,
212
+ line: this.yylineno
213
+ });
214
+ return this;
215
+ }, "reject"),
216
+ // retain first n characters of the match
217
+ less: /* @__PURE__ */ h(function(s) {
218
+ this.unput(this.match.slice(s));
219
+ }, "less"),
220
+ // displays already matched input, i.e. for error messages
221
+ pastInput: /* @__PURE__ */ h(function() {
222
+ var s = this.matched.substr(0, this.matched.length - this.match.length);
223
+ return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
224
+ }, "pastInput"),
225
+ // displays upcoming input, i.e. for error messages
226
+ upcomingInput: /* @__PURE__ */ h(function() {
227
+ var s = this.match;
228
+ return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
229
+ }, "upcomingInput"),
230
+ // displays the character position where the lexing error occurred, i.e. for error messages
231
+ showPosition: /* @__PURE__ */ h(function() {
232
+ var s = this.pastInput(), i = new Array(s.length + 1).join("-");
233
+ return s + this.upcomingInput() + `
234
+ ` + i + "^";
235
+ }, "showPosition"),
236
+ // test the lexed token: return FALSE when not a match, otherwise return token
237
+ test_match: /* @__PURE__ */ h(function(s, i) {
238
+ var o, c, p;
239
+ if (this.options.backtrack_lexer && (p = {
240
+ yylineno: this.yylineno,
241
+ yylloc: {
242
+ first_line: this.yylloc.first_line,
243
+ last_line: this.last_line,
244
+ first_column: this.yylloc.first_column,
245
+ last_column: this.yylloc.last_column
246
+ },
247
+ yytext: this.yytext,
248
+ match: this.match,
249
+ matches: this.matches,
250
+ matched: this.matched,
251
+ yyleng: this.yyleng,
252
+ offset: this.offset,
253
+ _more: this._more,
254
+ _input: this._input,
255
+ yy: this.yy,
256
+ conditionStack: this.conditionStack.slice(0),
257
+ done: this.done
258
+ }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), c = s[0].match(/(?:\r\n?|\n).*/g), c && (this.yylineno += c.length), this.yylloc = {
259
+ first_line: this.yylloc.last_line,
260
+ last_line: this.yylineno + 1,
261
+ first_column: this.yylloc.last_column,
262
+ last_column: c ? c[c.length - 1].length - c[c.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
263
+ }, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], o = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o)
264
+ return o;
265
+ if (this._backtrack) {
266
+ for (var r in p)
267
+ this[r] = p[r];
268
+ return !1;
269
+ }
270
+ return !1;
271
+ }, "test_match"),
272
+ // return next match in input
273
+ next: /* @__PURE__ */ h(function() {
274
+ if (this.done)
275
+ return this.EOF;
276
+ this._input || (this.done = !0);
277
+ var s, i, o, c;
278
+ this._more || (this.yytext = "", this.match = "");
279
+ for (var p = this._currentRules(), r = 0; r < p.length; r++)
280
+ if (o = this._input.match(this.rules[p[r]]), o && (!i || o[0].length > i[0].length)) {
281
+ if (i = o, c = r, this.options.backtrack_lexer) {
282
+ if (s = this.test_match(o, p[r]), s !== !1)
283
+ return s;
284
+ if (this._backtrack) {
285
+ i = !1;
286
+ continue;
287
+ } else
288
+ return !1;
289
+ } else if (!this.options.flex)
290
+ break;
291
+ }
292
+ return i ? (s = this.test_match(i, p[c]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
293
+ ` + this.showPosition(), {
294
+ text: "",
295
+ token: null,
296
+ line: this.yylineno
297
+ });
298
+ }, "next"),
299
+ // return next match that has a token
300
+ lex: /* @__PURE__ */ h(function() {
301
+ var i = this.next();
302
+ return i || this.lex();
303
+ }, "lex"),
304
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
305
+ begin: /* @__PURE__ */ h(function(i) {
306
+ this.conditionStack.push(i);
307
+ }, "begin"),
308
+ // pop the previously active lexer condition state off the condition stack
309
+ popState: /* @__PURE__ */ h(function() {
310
+ var i = this.conditionStack.length - 1;
311
+ return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
312
+ }, "popState"),
313
+ // produce the lexer rule set which is active for the currently active lexer condition state
314
+ _currentRules: /* @__PURE__ */ h(function() {
315
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
316
+ }, "_currentRules"),
317
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
318
+ topState: /* @__PURE__ */ h(function(i) {
319
+ return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
320
+ }, "topState"),
321
+ // alias for begin(condition)
322
+ pushState: /* @__PURE__ */ h(function(i) {
323
+ this.begin(i);
324
+ }, "pushState"),
325
+ // return the number of states currently on the stack
326
+ stateStackSize: /* @__PURE__ */ h(function() {
327
+ return this.conditionStack.length;
328
+ }, "stateStackSize"),
329
+ options: { "case-insensitive": !0 },
330
+ performAction: /* @__PURE__ */ h(function(i, o, c, p) {
331
+ switch (c) {
332
+ case 0:
333
+ return i.getLogger().trace("Found comment", o.yytext), 6;
334
+ case 1:
335
+ return 8;
336
+ case 2:
337
+ this.begin("CLASS");
338
+ break;
339
+ case 3:
340
+ return this.popState(), 16;
341
+ case 4:
342
+ this.popState();
343
+ break;
344
+ case 5:
345
+ i.getLogger().trace("Begin icon"), this.begin("ICON");
346
+ break;
347
+ case 6:
348
+ return i.getLogger().trace("SPACELINE"), 6;
349
+ case 7:
350
+ return 7;
351
+ case 8:
352
+ return 15;
353
+ case 9:
354
+ i.getLogger().trace("end icon"), this.popState();
355
+ break;
356
+ case 10:
357
+ return i.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
358
+ case 11:
359
+ return i.getLogger().trace("Cloud"), this.begin("NODE"), 19;
360
+ case 12:
361
+ return i.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
362
+ case 13:
363
+ return i.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
364
+ case 14:
365
+ return this.begin("NODE"), 19;
366
+ case 15:
367
+ return this.begin("NODE"), 19;
368
+ case 16:
369
+ return this.begin("NODE"), 19;
370
+ case 17:
371
+ return this.begin("NODE"), 19;
372
+ case 18:
373
+ return 13;
374
+ case 19:
375
+ return 22;
376
+ case 20:
377
+ return 11;
378
+ case 21:
379
+ this.begin("NSTR2");
380
+ break;
381
+ case 22:
382
+ return "NODE_DESCR";
383
+ case 23:
384
+ this.popState();
385
+ break;
386
+ case 24:
387
+ i.getLogger().trace("Starting NSTR"), this.begin("NSTR");
388
+ break;
389
+ case 25:
390
+ return i.getLogger().trace("description:", o.yytext), "NODE_DESCR";
391
+ case 26:
392
+ this.popState();
393
+ break;
394
+ case 27:
395
+ return this.popState(), i.getLogger().trace("node end ))"), "NODE_DEND";
396
+ case 28:
397
+ return this.popState(), i.getLogger().trace("node end )"), "NODE_DEND";
398
+ case 29:
399
+ return this.popState(), i.getLogger().trace("node end ...", o.yytext), "NODE_DEND";
400
+ case 30:
401
+ return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
402
+ case 31:
403
+ return this.popState(), i.getLogger().trace("node end (-"), "NODE_DEND";
404
+ case 32:
405
+ return this.popState(), i.getLogger().trace("node end (-"), "NODE_DEND";
406
+ case 33:
407
+ return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
408
+ case 34:
409
+ return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
410
+ case 35:
411
+ return i.getLogger().trace("Long description:", o.yytext), 20;
412
+ case 36:
413
+ return i.getLogger().trace("Long description:", o.yytext), 20;
414
+ }
415
+ }, "anonymous"),
416
+ rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
417
+ conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
418
+ };
419
+ return L;
420
+ }();
421
+ H.lexer = ne;
422
+ function M() {
423
+ this.yy = {};
424
+ }
425
+ return h(M, "Parser"), M.prototype = H, H.Parser = M, new M();
426
+ }();
427
+ q.parser = q;
428
+ var ke = q, Se = 12, D = {
429
+ DEFAULT: 0,
430
+ NO_BORDER: 0,
431
+ ROUNDED_RECT: 1,
432
+ RECT: 2,
433
+ CIRCLE: 3,
434
+ CLOUD: 4,
435
+ BANG: 5,
436
+ HEXAGON: 6
437
+ }, w, xe = (w = class {
438
+ constructor() {
439
+ this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = D, 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);
440
+ }
441
+ clear() {
442
+ this.nodes = [], this.count = 0, this.elements = {}, this.baseLevel = void 0;
443
+ }
444
+ getParent(e) {
445
+ for (let a = this.nodes.length - 1; a >= 0; a--)
446
+ if (this.nodes[a].level < e)
447
+ return this.nodes[a];
448
+ return null;
449
+ }
450
+ getMindmap() {
451
+ return this.nodes.length > 0 ? this.nodes[0] : null;
452
+ }
453
+ addNode(e, a, l, n) {
454
+ I.info("addNode", e, a, l, n);
455
+ let d = !1;
456
+ this.nodes.length === 0 ? (this.baseLevel = e, e = 0, d = !0) : this.baseLevel !== void 0 && (e = e - this.baseLevel, d = !1);
457
+ const f = P();
458
+ let y = f.mindmap?.padding ?? j.mindmap.padding;
459
+ switch (n) {
460
+ case this.nodeType.ROUNDED_RECT:
461
+ case this.nodeType.RECT:
462
+ case this.nodeType.HEXAGON:
463
+ y *= 2;
464
+ break;
465
+ }
466
+ const E = {
467
+ id: this.count++,
468
+ nodeId: G(a, f),
469
+ level: e,
470
+ descr: G(l, f),
471
+ type: n,
472
+ children: [],
473
+ width: f.mindmap?.maxNodeWidth ?? j.mindmap.maxNodeWidth,
474
+ padding: y,
475
+ isRoot: d
476
+ }, b = this.getParent(e);
477
+ if (b)
478
+ b.children.push(E), this.nodes.push(E);
479
+ else if (d)
480
+ this.nodes.push(E);
481
+ else
482
+ throw new Error(
483
+ `There can be only one root. No parent could be found for ("${E.descr}")`
484
+ );
485
+ }
486
+ getType(e, a) {
487
+ switch (I.debug("In get type", e, a), e) {
488
+ case "[":
489
+ return this.nodeType.RECT;
490
+ case "(":
491
+ return a === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
492
+ case "((":
493
+ return this.nodeType.CIRCLE;
494
+ case ")":
495
+ return this.nodeType.CLOUD;
496
+ case "))":
497
+ return this.nodeType.BANG;
498
+ case "{{":
499
+ return this.nodeType.HEXAGON;
500
+ default:
501
+ return this.nodeType.DEFAULT;
502
+ }
503
+ }
504
+ setElementForId(e, a) {
505
+ this.elements[e] = a;
506
+ }
507
+ getElementById(e) {
508
+ return this.elements[e];
509
+ }
510
+ decorateNode(e) {
511
+ if (!e)
512
+ return;
513
+ const a = P(), l = this.nodes[this.nodes.length - 1];
514
+ e.icon && (l.icon = G(e.icon, a)), e.class && (l.class = G(e.class, a));
515
+ }
516
+ type2Str(e) {
517
+ switch (e) {
518
+ case this.nodeType.DEFAULT:
519
+ return "no-border";
520
+ case this.nodeType.RECT:
521
+ return "rect";
522
+ case this.nodeType.ROUNDED_RECT:
523
+ return "rounded-rect";
524
+ case this.nodeType.CIRCLE:
525
+ return "circle";
526
+ case this.nodeType.CLOUD:
527
+ return "cloud";
528
+ case this.nodeType.BANG:
529
+ return "bang";
530
+ case this.nodeType.HEXAGON:
531
+ return "hexgon";
532
+ default:
533
+ return "no-border";
534
+ }
535
+ }
536
+ /**
537
+ * Assign section numbers to nodes based on their position relative to root
538
+ * @param node - The mindmap node to process
539
+ * @param sectionNumber - The section number to assign (undefined for root)
540
+ */
541
+ assignSections(e, a) {
542
+ if (e.level === 0 ? e.section = void 0 : e.section = a, e.children)
543
+ for (const [l, n] of e.children.entries()) {
544
+ const d = e.level === 0 ? l % (Se - 1) : a;
545
+ this.assignSections(n, d);
546
+ }
547
+ }
548
+ /**
549
+ * Convert mindmap tree structure to flat array of nodes
550
+ * @param node - The mindmap node to process
551
+ * @param processedNodes - Array to collect processed nodes
552
+ */
553
+ flattenNodes(e, a) {
554
+ const l = P(), n = ["mindmap-node"];
555
+ e.isRoot === !0 ? n.push("section-root", "section--1") : e.section !== void 0 && n.push(`section-${e.section}`), e.class && n.push(e.class);
556
+ const d = n.join(" "), f = /* @__PURE__ */ h((E) => {
557
+ const v = (l.theme?.toLowerCase() ?? "").includes("redux");
558
+ switch (E) {
559
+ case D.CIRCLE:
560
+ return "mindmapCircle";
561
+ case D.RECT:
562
+ return "rect";
563
+ case D.ROUNDED_RECT:
564
+ return "rounded";
565
+ case D.CLOUD:
566
+ return "cloud";
567
+ case D.BANG:
568
+ return "bang";
569
+ case D.HEXAGON:
570
+ return "hexagon";
571
+ case D.DEFAULT:
572
+ return v ? "rounded" : "defaultMindmapNode";
573
+ case D.NO_BORDER:
574
+ default:
575
+ return "rect";
576
+ }
577
+ }, "getShapeFromType"), y = {
578
+ id: e.id.toString(),
579
+ domId: "node_" + e.id.toString(),
580
+ label: e.descr,
581
+ labelType: "markdown",
582
+ isGroup: !1,
583
+ shape: f(e.type),
584
+ width: e.width,
585
+ height: e.height ?? 0,
586
+ padding: e.padding,
587
+ cssClasses: d,
588
+ cssStyles: [],
589
+ look: l.look,
590
+ icon: e.icon,
591
+ x: e.x,
592
+ y: e.y,
593
+ // Mindmap-specific properties
594
+ level: e.level,
595
+ nodeId: e.nodeId,
596
+ type: e.type,
597
+ section: e.section
598
+ };
599
+ if (a.push(y), e.children)
600
+ for (const E of e.children)
601
+ this.flattenNodes(E, a);
602
+ }
603
+ /**
604
+ * Generate edges from parent-child relationships in mindmap tree
605
+ * @param node - The mindmap node to process
606
+ * @param edges - Array to collect edges
607
+ */
608
+ generateEdges(e, a) {
609
+ if (!e.children)
610
+ return;
611
+ const l = P();
612
+ for (const n of e.children) {
613
+ let d = "edge";
614
+ n.section !== void 0 && (d += ` section-edge-${n.section}`);
615
+ const f = e.level + 1;
616
+ d += ` edge-depth-${f}`;
617
+ const y = {
618
+ id: `edge_${e.id}_${n.id}`,
619
+ start: e.id.toString(),
620
+ end: n.id.toString(),
621
+ type: "normal",
622
+ curve: "basis",
623
+ thickness: "normal",
624
+ look: l.look,
625
+ classes: d,
626
+ // Store mindmap-specific data
627
+ depth: e.level,
628
+ section: n.section
629
+ };
630
+ a.push(y), this.generateEdges(n, a);
631
+ }
632
+ }
633
+ /**
634
+ * Get structured data for layout algorithms
635
+ * Following the pattern established by ER diagrams
636
+ * @returns Structured data containing nodes, edges, and config
637
+ */
638
+ getData() {
639
+ const e = this.getMindmap(), a = P(), n = ge().layout !== void 0, d = a;
640
+ if (n || (d.layout = "cose-bilkent"), !e)
641
+ return {
642
+ nodes: [],
643
+ edges: [],
644
+ config: d
645
+ };
646
+ I.debug("getData: mindmapRoot", e, a), this.assignSections(e);
647
+ const f = [], y = [];
648
+ this.flattenNodes(e, f), this.generateEdges(e, y), I.debug(
649
+ `getData: processed ${f.length} nodes and ${y.length} edges`
650
+ );
651
+ const E = /* @__PURE__ */ new Map();
652
+ for (const b of f)
653
+ E.set(b.id, {
654
+ shape: b.shape,
655
+ width: b.width,
656
+ height: b.height,
657
+ padding: b.padding
658
+ });
659
+ return {
660
+ nodes: f,
661
+ edges: y,
662
+ config: d,
663
+ // Store the root node for mindmap-specific layout algorithms
664
+ rootNode: e,
665
+ // Properties required by dagre layout algorithm
666
+ markers: ["point"],
667
+ // Mindmaps don't use markers
668
+ direction: "TB",
669
+ // Top-to-bottom direction for mindmaps
670
+ nodeSpacing: 50,
671
+ // Default spacing between nodes
672
+ rankSpacing: 50,
673
+ // Default spacing between ranks
674
+ // Add shapes for ELK compatibility
675
+ shapes: Object.fromEntries(E),
676
+ // Additional properties that layout algorithms might expect
677
+ type: "mindmap",
678
+ diagramId: "mindmap-" + _e()
679
+ };
680
+ }
681
+ // Expose logger to grammar
682
+ getLogger() {
683
+ return I;
684
+ }
685
+ }, h(w, "MindmapDB"), w), Ne = /* @__PURE__ */ h(async (t, e, a, l) => {
686
+ I.debug(`Rendering mindmap diagram
687
+ ` + t);
688
+ const n = l.db, d = n.getData(), f = ae(e, d.config.securityLevel);
689
+ if (d.type = l.type, d.layoutAlgorithm = le(d.config.layout, {
690
+ fallback: "cose-bilkent"
691
+ }), d.diagramId = e, !n.getMindmap())
692
+ return;
693
+ d.nodes.forEach((g) => {
694
+ g.shape === "rounded" ? (g.radius = 15, g.taper = 15, g.stroke = "none", g.width = 0, g.padding = 15) : g.shape === "circle" ? g.padding = 10 : g.shape === "rect" ? (g.width = 0, g.padding = 10) : g.shape === "hexagon" && (g.width = 0, g.height = 0);
695
+ }), await he(d, f);
696
+ const { themeVariables: E } = de(), { useGradient: b, gradientStart: v, gradientStop: R } = E;
697
+ if (b && v && R) {
698
+ const g = f.attr("id"), A = f.append("defs").append("linearGradient").attr("id", `${g}-gradient`).attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
699
+ A.append("stop").attr("offset", "0%").attr("stop-color", v).attr("stop-opacity", 1), A.append("stop").attr("offset", "100%").attr("stop-color", R).attr("stop-opacity", 1);
700
+ }
701
+ ce(
702
+ f,
703
+ d.config.mindmap?.padding ?? j.mindmap.padding,
704
+ "mindmapDiagram",
705
+ d.config.mindmap?.useMaxWidth ?? j.mindmap.useMaxWidth
706
+ );
707
+ }, "draw"), De = {
708
+ draw: Ne
709
+ }, Le = /* @__PURE__ */ h((t) => {
710
+ const { theme: e, look: a } = t;
711
+ let l = "";
712
+ for (let n = 0; n < t.THEME_COLOR_LIMIT; n++)
713
+ t["lineColor" + n] = t["lineColor" + n] || t["cScaleInv" + n], ue(t["lineColor" + n]) ? t["lineColor" + n] = pe(t["lineColor" + n], 20) : t["lineColor" + n] = fe(t["lineColor" + n], 20);
714
+ for (let n = 0; n < t.THEME_COLOR_LIMIT; n++) {
715
+ const d = "" + (a === "neo" ? Math.max(10 - (n - 1) * 2, 2) : 17 - 3 * n);
716
+ l += `
717
+ .section-${n - 1} rect, .section-${n - 1} path, .section-${n - 1} circle, .section-${n - 1} polygon, .section-${n - 1} path {
718
+ fill: ${t["cScale" + n]};
719
+ }
720
+ .section-${n - 1} text {
721
+ fill: ${t["cScaleLabel" + n]};
722
+ }
723
+ .section-${n - 1} span {
724
+ color: ${t["cScaleLabel" + n]};
725
+ }
726
+ .node-icon-${n - 1} {
727
+ font-size: 40px;
728
+ color: ${t["cScaleLabel" + n]};
729
+ }
730
+ .section-edge-${n - 1}{
731
+ stroke: ${t["cScale" + n]};
732
+ }
733
+ .edge-depth-${n - 1}{
734
+ stroke-width: ${d};
735
+ }
736
+ .section-${n - 1} line {
737
+ stroke: ${t["cScaleInv" + n]} ;
738
+ stroke-width: 3;
739
+ }
740
+
741
+ .disabled, .disabled circle, .disabled text {
742
+ fill: lightgray;
743
+ }
744
+ .disabled text {
745
+ fill: #efefef;
746
+ }
747
+ [data-look="neo"].mindmap-node.section-${n - 1} rect, [data-look="neo"].mindmap-node.section-${n - 1} path, [data-look="neo"].mindmap-node.section-${n - 1} circle, [data-look="neo"].mindmap-node.section-${n - 1} polygon {
748
+ fill: ${e === "redux" || e === "redux-dark" || e === "neutral" ? t.mainBkg : t["cScale" + n]};
749
+ stroke: ${e === "redux" || e === "redux-dark" ? t.nodeBorder : t["cScale" + n]};
750
+ stroke-width: ${t.strokeWidth ?? 2}px;
751
+ }
752
+ [data-look="neo"].section-edge-${n - 1}{
753
+ stroke: ${e?.includes("redux") || e === "neo-dark" ? t.nodeBorder : t["cScale" + n]};
754
+ }
755
+ [data-look="neo"].mindmap-node.section-${n - 1} text {
756
+ fill: ${e === "redux" || e === "redux-dark" ? t.nodeBorder : t["cScaleLabel" + (e === "neutral" ? 1 : n)]};
757
+ }
758
+ `;
759
+ }
760
+ return l;
761
+ }, "genSections"), ve = /* @__PURE__ */ h((t, e, a) => {
762
+ let l = "";
763
+ for (let n = 0; n < t; n++)
764
+ l += `
765
+ [data-look="neo"].mindmap-node.section-${n - 1} rect, [data-look="neo"].mindmap-node.section-${n - 1} path, [data-look="neo"].mindmap-node.section-${n - 1} circle, [data-look="neo"].mindmap-node.section-${n - 1} polygon {
766
+ stroke: url(${e}-gradient);
767
+ fill: ${a};
768
+ }
769
+ .section-${n - 1} line {
770
+ stroke-width: 0;
771
+ }`;
772
+ return l;
773
+ }, "genGradient"), Te = /* @__PURE__ */ h((t) => {
774
+ const { theme: e } = t, a = t.svgId, l = t.dropShadow ? t.dropShadow.replace("url(#drop-shadow)", `url(${a}-drop-shadow)`) : "none";
775
+ return `
776
+ .edge {
777
+ stroke-width: 3;
778
+ }
779
+ ${Le(t)}
780
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
781
+ fill: ${t.git0};
782
+ }
783
+ .section-root text {
784
+ fill: ${t.gitBranchLabel0};
785
+ }
786
+ .section-root span {
787
+ color: ${e?.includes("redux") ? t.nodeBorder : t.gitBranchLabel0};
788
+ }
789
+ .icon-container {
790
+ height:100%;
791
+ display: flex;
792
+ justify-content: center;
793
+ align-items: center;
794
+ }
795
+ .edge {
796
+ fill: none;
797
+ }
798
+ .mindmap-node-label {
799
+ dy: 1em;
800
+ alignment-baseline: middle;
801
+ text-anchor: middle;
802
+ dominant-baseline: middle;
803
+ text-align: center;
804
+ }
805
+ [data-look="neo"].mindmap-node {
806
+ filter: ${l};
807
+ }
808
+ [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 {
809
+ fill: ${e?.includes("redux") ? t.mainBkg : t.git0};
810
+ }
811
+ [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
812
+ fill: ${e?.includes("redux") ? t.nodeBorder : t["cScaleLabel" + (e === "neutral" ? 1 : 0)]};
813
+ }
814
+ ${t.useGradient && a && t.mainBkg ? ve(t.THEME_COLOR_LIMIT, a, t.mainBkg) : ""}
815
+ `;
816
+ }, "getStyles"), Oe = Te, Re = {
817
+ get db() {
818
+ return new xe();
819
+ },
820
+ renderer: De,
821
+ parser: ke,
822
+ styles: Oe
823
+ };
824
+ export {
825
+ Re as diagram
826
+ };