@aggroot-team/aggroot 1.9.8 → 1.9.9

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 (176) hide show
  1. package/dist/index.cjs +944 -941
  2. package/dist/native/better_sqlite3.node +0 -0
  3. package/package.json +2 -2
  4. package/scripts/build-all.mjs +7 -7
  5. package/share/web/dist/assets/{arc-C6mmQI6r.js → arc-vAbfGHI4.js} +1 -1
  6. package/share/web/dist/assets/architectureDiagram-3BPJPVTR-Beofs4Vr.js +36 -0
  7. package/share/web/dist/assets/blockDiagram-GPEHLZMM-BHald0vJ.js +132 -0
  8. package/share/web/dist/assets/c4Diagram-AAUBKEIU-DdheLyDg.js +10 -0
  9. package/share/web/dist/assets/channel-RUPVcLbL.js +1 -0
  10. package/share/web/dist/assets/chunk-2J33WTMH-CqifXJHr.js +1 -0
  11. package/share/web/dist/assets/chunk-4BX2VUAB-Ct0wiv5k.js +1 -0
  12. package/share/web/dist/assets/{chunk-55IACEB6-CR3JEwA1.js → chunk-55IACEB6-C3ZOlIck.js} +1 -1
  13. package/share/web/dist/assets/chunk-727SXJPM-D_-n9Kx7.js +206 -0
  14. package/share/web/dist/assets/chunk-AQP2D5EJ-Cs0Pzu6B.js +231 -0
  15. package/share/web/dist/assets/{chunk-FMBD7UC4-C9iK_zJ6.js → chunk-FMBD7UC4-BqU9GOt6.js} +1 -1
  16. package/share/web/dist/assets/{chunk-ND2GUHAM-Cf0-DaOM.js → chunk-ND2GUHAM-C4XXXRHx.js} +1 -1
  17. package/share/web/dist/assets/{chunk-QZHKN3VN-BdStKhsc.js → chunk-QZHKN3VN-BQx_T-pw.js} +1 -1
  18. package/share/web/dist/assets/classDiagram-4FO5ZUOK-BpLeHiQl.js +1 -0
  19. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-BpLeHiQl.js +1 -0
  20. package/share/web/dist/assets/cose-bilkent-S5V4N54A-Dg4UBnML.js +1 -0
  21. package/share/web/dist/assets/cytoscape.esm-LDYqcvCF.js +331 -0
  22. package/share/web/dist/assets/dagre-BM42HDAG-BJ-Bl03N.js +4 -0
  23. package/share/web/dist/assets/diagram-2AECGRRQ-Copnlt_p.js +43 -0
  24. package/share/web/dist/assets/{diagram-5GNKFQAL-DCqIh_mb.js → diagram-5GNKFQAL-CMy5CqNk.js} +1 -1
  25. package/share/web/dist/assets/diagram-KO2AKTUF-AZ4G-26n.js +3 -0
  26. package/share/web/dist/assets/diagram-LMA3HP47-DdD4VMzH.js +24 -0
  27. package/share/web/dist/assets/diagram-OG6HWLK6-jDgNtQLg.js +24 -0
  28. package/share/web/dist/assets/{erDiagram-TEJ5UH35-DWrRY3pY.js → erDiagram-TEJ5UH35-BRKRSsvs.js} +18 -18
  29. package/share/web/dist/assets/flowDiagram-I6XJVG4X-B-y9L8Rr.js +162 -0
  30. package/share/web/dist/assets/{ganttDiagram-6RSMTGT7-DnFfa4-K.js → ganttDiagram-6RSMTGT7-9HFj_Xfu.js} +1 -1
  31. package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-BeEiyKwE.js +106 -0
  32. package/share/web/dist/assets/graph-BEmEBUp_.js +1 -0
  33. package/share/web/dist/assets/index-BGVEOJln.js +462 -0
  34. package/share/web/dist/assets/{infoDiagram-5YYISTIA-BY07mlm3.js → infoDiagram-5YYISTIA-B_xf2BO8.js} +1 -1
  35. package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-CnkHvVMc.js +70 -0
  36. package/share/web/dist/assets/{journeyDiagram-JHISSGLW-DUTH5iJA.js → journeyDiagram-JHISSGLW-BhCKF-L6.js} +1 -1
  37. package/share/web/dist/assets/kanban-definition-UN3LZRKU-f3ghgA-_.js +89 -0
  38. package/share/web/dist/assets/{katex-HP8lGamR.js → katex-C5jXJg4s.js} +1 -1
  39. package/share/web/dist/assets/{layout-UJbxhwF7.js → layout-Bw0msyOw.js} +1 -1
  40. package/share/web/dist/assets/{linear-C1DMihRv.js → linear-CxTWz0e9.js} +1 -1
  41. package/share/web/dist/assets/mindmap-definition-RKZ34NQL-AT8F9pYs.js +96 -0
  42. package/share/web/dist/assets/pieDiagram-4H26LBE5-DdmWKttq.js +30 -0
  43. package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-CO1Ivpei.js +7 -0
  44. package/share/web/dist/assets/{requirementDiagram-4Y6WPE33-DNohf4JY.js → requirementDiagram-4Y6WPE33-D6vgvFtL.js} +13 -13
  45. package/share/web/dist/assets/{sankeyDiagram-5OEKKPKP-C8GlIWqD.js → sankeyDiagram-5OEKKPKP-CzpA03NF.js} +7 -7
  46. package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-D9p7JlcE.js +162 -0
  47. package/share/web/dist/assets/{stateDiagram-AJRCARHV-D7KEcCai.js → stateDiagram-AJRCARHV-D5WeiPVB.js} +1 -1
  48. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-DhUy5VW5.js +1 -0
  49. package/share/web/dist/assets/timeline-definition-PNZ67QCA-c8ZcxVVs.js +120 -0
  50. package/share/web/dist/assets/vennDiagram-CIIHVFJN-Chtw87Kc.js +34 -0
  51. package/share/web/dist/assets/wardley-L42UT6IY-BU-MTDCS.js +173 -0
  52. package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-DphjJCYS.js +78 -0
  53. package/share/web/dist/assets/{xychartDiagram-2RQKCTM6-Bi2JpQ7J.js → xychartDiagram-2RQKCTM6-DcJv_8WS.js} +1 -1
  54. package/share/web/dist/index.html +1 -1
  55. package/share/web/dist/assets/arc-MoXg1d0p.js +0 -1
  56. package/share/web/dist/assets/arc-foVguWzs.js +0 -1
  57. package/share/web/dist/assets/architectureDiagram-3BPJPVTR-BZ3BmMWb.js +0 -36
  58. package/share/web/dist/assets/architectureDiagram-3BPJPVTR-DOSLjLkp.js +0 -36
  59. package/share/web/dist/assets/architectureDiagram-3BPJPVTR-POoFbIwD.js +0 -36
  60. package/share/web/dist/assets/blockDiagram-GPEHLZMM-2SlCtuS9.js +0 -132
  61. package/share/web/dist/assets/blockDiagram-GPEHLZMM-C2gUhwLv.js +0 -132
  62. package/share/web/dist/assets/blockDiagram-GPEHLZMM-DGI0e92G.js +0 -132
  63. package/share/web/dist/assets/c4Diagram-AAUBKEIU-BUzmmhxG.js +0 -10
  64. package/share/web/dist/assets/c4Diagram-AAUBKEIU-Dc9JtzPS.js +0 -10
  65. package/share/web/dist/assets/c4Diagram-AAUBKEIU-Du9NVD3C.js +0 -10
  66. package/share/web/dist/assets/channel-C2ua6c7e.js +0 -1
  67. package/share/web/dist/assets/channel-RhuWyCOn.js +0 -1
  68. package/share/web/dist/assets/channel-kDWigw7H.js +0 -1
  69. package/share/web/dist/assets/chunk-2J33WTMH-564mo_tM.js +0 -1
  70. package/share/web/dist/assets/chunk-2J33WTMH-BMg4ExGP.js +0 -1
  71. package/share/web/dist/assets/chunk-2J33WTMH-Ci30owWm.js +0 -1
  72. package/share/web/dist/assets/chunk-4BX2VUAB-B9jaG_QE.js +0 -1
  73. package/share/web/dist/assets/chunk-4BX2VUAB-BTkmuMjL.js +0 -1
  74. package/share/web/dist/assets/chunk-4BX2VUAB-ClCdFzK4.js +0 -1
  75. package/share/web/dist/assets/chunk-55IACEB6-Dul_8Xx4.js +0 -1
  76. package/share/web/dist/assets/chunk-55IACEB6-Dx0fiG9q.js +0 -1
  77. package/share/web/dist/assets/chunk-727SXJPM-0IWOks3B.js +0 -206
  78. package/share/web/dist/assets/chunk-727SXJPM-BmSdyEyO.js +0 -206
  79. package/share/web/dist/assets/chunk-727SXJPM-zLYsaIFD.js +0 -206
  80. package/share/web/dist/assets/chunk-AQP2D5EJ-CKL53_sC.js +0 -231
  81. package/share/web/dist/assets/chunk-AQP2D5EJ-CPGjYv1S.js +0 -231
  82. package/share/web/dist/assets/chunk-AQP2D5EJ-DyXBBZBO.js +0 -231
  83. package/share/web/dist/assets/chunk-FMBD7UC4-CKqn3QTP.js +0 -15
  84. package/share/web/dist/assets/chunk-FMBD7UC4-relLrlnf.js +0 -15
  85. package/share/web/dist/assets/chunk-ND2GUHAM-D-YV3DlT.js +0 -1
  86. package/share/web/dist/assets/chunk-ND2GUHAM-DIK8aiyH.js +0 -1
  87. package/share/web/dist/assets/chunk-QZHKN3VN-CNOTwrb0.js +0 -1
  88. package/share/web/dist/assets/chunk-QZHKN3VN-GToMNcRQ.js +0 -1
  89. package/share/web/dist/assets/classDiagram-4FO5ZUOK-BpIpZpbS.js +0 -1
  90. package/share/web/dist/assets/classDiagram-4FO5ZUOK-BwfLgb5V.js +0 -1
  91. package/share/web/dist/assets/classDiagram-4FO5ZUOK-iYw5Cpy-.js +0 -1
  92. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-BpIpZpbS.js +0 -1
  93. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-BwfLgb5V.js +0 -1
  94. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-iYw5Cpy-.js +0 -1
  95. package/share/web/dist/assets/cose-bilkent-S5V4N54A-CPXDOhe6.js +0 -1
  96. package/share/web/dist/assets/cose-bilkent-S5V4N54A-Cz_EEjbJ.js +0 -1
  97. package/share/web/dist/assets/cose-bilkent-S5V4N54A-DoyDfnRN.js +0 -1
  98. package/share/web/dist/assets/cytoscape.esm-CkSuTymj.js +0 -321
  99. package/share/web/dist/assets/dagre-BM42HDAG-BF-TF-Yz.js +0 -4
  100. package/share/web/dist/assets/dagre-BM42HDAG-D8k98yee.js +0 -4
  101. package/share/web/dist/assets/dagre-BM42HDAG-dY4nCbRX.js +0 -4
  102. package/share/web/dist/assets/diagram-2AECGRRQ-C-3swK4g.js +0 -43
  103. package/share/web/dist/assets/diagram-2AECGRRQ-D1bMaK6f.js +0 -43
  104. package/share/web/dist/assets/diagram-2AECGRRQ-Drlj1z6K.js +0 -43
  105. package/share/web/dist/assets/diagram-5GNKFQAL-DUyqaydI.js +0 -10
  106. package/share/web/dist/assets/diagram-5GNKFQAL-m7JaaKf6.js +0 -10
  107. package/share/web/dist/assets/diagram-KO2AKTUF-DOLM9GVq.js +0 -3
  108. package/share/web/dist/assets/diagram-KO2AKTUF-D_dEKcS6.js +0 -3
  109. package/share/web/dist/assets/diagram-KO2AKTUF-DiNHmwOH.js +0 -3
  110. package/share/web/dist/assets/diagram-LMA3HP47-BVlz_lgN.js +0 -24
  111. package/share/web/dist/assets/diagram-LMA3HP47-CWxd-6HZ.js +0 -24
  112. package/share/web/dist/assets/diagram-LMA3HP47-DQjh05P_.js +0 -24
  113. package/share/web/dist/assets/diagram-OG6HWLK6-C395J901.js +0 -24
  114. package/share/web/dist/assets/diagram-OG6HWLK6-CyAuKYvH.js +0 -24
  115. package/share/web/dist/assets/diagram-OG6HWLK6-cbK4GNYr.js +0 -24
  116. package/share/web/dist/assets/erDiagram-TEJ5UH35-D6xjxZ49.js +0 -85
  117. package/share/web/dist/assets/erDiagram-TEJ5UH35-DvJvvZeG.js +0 -85
  118. package/share/web/dist/assets/flowDiagram-I6XJVG4X-BQTG7YDk.js +0 -162
  119. package/share/web/dist/assets/flowDiagram-I6XJVG4X-C-kXeUBi.js +0 -162
  120. package/share/web/dist/assets/flowDiagram-I6XJVG4X-Uk0pqh1I.js +0 -162
  121. package/share/web/dist/assets/ganttDiagram-6RSMTGT7-CiAw7QqE.js +0 -292
  122. package/share/web/dist/assets/ganttDiagram-6RSMTGT7-x6PvlGL2.js +0 -292
  123. package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-BtfWDOi9.js +0 -106
  124. package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-CWneBdAY.js +0 -106
  125. package/share/web/dist/assets/gitGraphDiagram-PVQCEYII-DKTp_HiB.js +0 -106
  126. package/share/web/dist/assets/graph-D2o_JWn5.js +0 -1
  127. package/share/web/dist/assets/index-BCGYoU3m.js +0 -407
  128. package/share/web/dist/assets/index-BvC6gdHx.js +0 -407
  129. package/share/web/dist/assets/index-DywDZDjz.js +0 -407
  130. package/share/web/dist/assets/infoDiagram-5YYISTIA-CfjN-5kB.js +0 -2
  131. package/share/web/dist/assets/infoDiagram-5YYISTIA-Xkl7BU3j.js +0 -2
  132. package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-BZE9KXo2.js +0 -70
  133. package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-CGr69Mhu.js +0 -70
  134. package/share/web/dist/assets/ishikawaDiagram-YF4QCWOH-ChhTQzaW.js +0 -70
  135. package/share/web/dist/assets/journeyDiagram-JHISSGLW-CI2nhO51.js +0 -139
  136. package/share/web/dist/assets/journeyDiagram-JHISSGLW-DjzjP2Ja.js +0 -139
  137. package/share/web/dist/assets/kanban-definition-UN3LZRKU-Bs1OUTN5.js +0 -89
  138. package/share/web/dist/assets/kanban-definition-UN3LZRKU-CsWF2VYE.js +0 -89
  139. package/share/web/dist/assets/kanban-definition-UN3LZRKU-DtbIxWlr.js +0 -89
  140. package/share/web/dist/assets/linear-DBgBtQqi.js +0 -1
  141. package/share/web/dist/assets/linear-vEfB30Tw.js +0 -1
  142. package/share/web/dist/assets/mindmap-definition-RKZ34NQL-BhesMLkS.js +0 -96
  143. package/share/web/dist/assets/mindmap-definition-RKZ34NQL-CVMntWDi.js +0 -96
  144. package/share/web/dist/assets/mindmap-definition-RKZ34NQL-DR2HYGT4.js +0 -96
  145. package/share/web/dist/assets/pieDiagram-4H26LBE5-CIkAn0kq.js +0 -30
  146. package/share/web/dist/assets/pieDiagram-4H26LBE5-CRoZ3DSq.js +0 -30
  147. package/share/web/dist/assets/pieDiagram-4H26LBE5-CfNAD9xR.js +0 -30
  148. package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-CplSe1Rw.js +0 -7
  149. package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-UYoPSWi7.js +0 -7
  150. package/share/web/dist/assets/quadrantDiagram-W4KKPZXB-tSrUuZ0o.js +0 -7
  151. package/share/web/dist/assets/requirementDiagram-4Y6WPE33-BOhPb8Hp.js +0 -84
  152. package/share/web/dist/assets/requirementDiagram-4Y6WPE33-DsvsUutE.js +0 -84
  153. package/share/web/dist/assets/sankeyDiagram-5OEKKPKP-BjF2FKFT.js +0 -40
  154. package/share/web/dist/assets/sankeyDiagram-5OEKKPKP-CUs-AFSb.js +0 -40
  155. package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-CHXHwLsz.js +0 -162
  156. package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-UMs1OM2D.js +0 -162
  157. package/share/web/dist/assets/sequenceDiagram-3UESZ5HK-g3R6luwj.js +0 -162
  158. package/share/web/dist/assets/stateDiagram-AJRCARHV-D1MALm7c.js +0 -1
  159. package/share/web/dist/assets/stateDiagram-AJRCARHV-DueaHzu3.js +0 -1
  160. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-ByTV1cZj.js +0 -1
  161. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-CccWwklg.js +0 -1
  162. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-DQ_K88f1.js +0 -1
  163. package/share/web/dist/assets/timeline-definition-PNZ67QCA-CiE-WEg8.js +0 -120
  164. package/share/web/dist/assets/timeline-definition-PNZ67QCA-E8d8s4V0.js +0 -120
  165. package/share/web/dist/assets/timeline-definition-PNZ67QCA-UU-dHr26.js +0 -120
  166. package/share/web/dist/assets/vennDiagram-CIIHVFJN-B7_olhnb.js +0 -34
  167. package/share/web/dist/assets/vennDiagram-CIIHVFJN-CBO1JMsg.js +0 -34
  168. package/share/web/dist/assets/vennDiagram-CIIHVFJN-DXMfudVV.js +0 -34
  169. package/share/web/dist/assets/wardley-L42UT6IY-CRpCqUkS.js +0 -161
  170. package/share/web/dist/assets/wardley-L42UT6IY-CUHy5aYw.js +0 -161
  171. package/share/web/dist/assets/wardley-L42UT6IY-mTSjCdTo.js +0 -161
  172. package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-C434ayTK.js +0 -78
  173. package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-C59oFP6u.js +0 -78
  174. package/share/web/dist/assets/wardleyDiagram-YWT4CUSO-DS2y4CHZ.js +0 -78
  175. package/share/web/dist/assets/xychartDiagram-2RQKCTM6-BHpgRwpt.js +0 -7
  176. package/share/web/dist/assets/xychartDiagram-2RQKCTM6-CZfuL4ig.js +0 -7
@@ -1,96 +0,0 @@
1
- import{g as le}from"./chunk-55IACEB6-Dx0fiG9q.js";import{s as he}from"./chunk-2J33WTMH-BMg4ExGP.js";import{b as h,aF as C,ac as de,aW as ge,a4 as ue,T as j,a5 as B,a_ as G,ai as pe,aw as fe,aB as me,M as ye}from"./index-BvC6gdHx.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function Ee(t,e=0){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()}let q;const _e=new Uint8Array(16);function be(){if(!q){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");q=crypto.getRandomValues.bind(crypto)}return q(_e)}const ke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ie={randomUUID:ke};function Se(t,e,a){t=t||{};const l=t.random??t.rng?.()??be();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,Ee(l)}function xe(t,e,a){return ie.randomUUID&&!t?ie.randomUUID():Se(t)}var J=(function(){var t=h(function(L,s,i,o){for(i=i||{},o=L.length;o--;i[L[o]]=s);return i},"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],K=[1,33],Q=[1,34],$=[1,6,7,11,13,15,16,19,22],H={trace:h(function(){},"trace"),yy:{},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},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"},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]],performAction:h(function(s,i,o,c,p,r,U){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25: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])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27: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])};break}},"anonymous"),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:K,11:Q}),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:K,11:Q}),t($,[2,11]),t($,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:h(function(s){var i=this,o=[0],c=[],p=[null],r=[],U=this.table,u="",P=0,Z=0,re=2,ee=1,oe=r.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(T.yy[W]=this.yy[W]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var z=m.yylloc;r.push(z);var ae=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(S){o.length=o.length-2*S,p.length=p.length-S,r.length=r.length-S}h(ce,"popStack");function te(){var S;return S=c.pop()||m.lex()||ee,typeof S!="number"&&(S instanceof Array&&(c=S,S=c.pop()),S=i.symbols_[S]||S),S}h(te,"lex");for(var k,O,x,X,I={},V,D,ne,F;;){if(O=o[o.length-1],this.defaultActions[O]?x=this.defaultActions[O]:((k===null||typeof k>"u")&&(k=te()),x=U[O]&&U[O][k]),typeof x>"u"||!x.length||!x[0]){var Y="";F=[];for(V in U[O])this.terminals_[V]&&V>re&&F.push("'"+this.terminals_[V]+"'");m.showPosition?Y="Parse error on line "+(P+1)+`:
2
- `+m.showPosition()+`
3
- Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Y="Parse error on line "+(P+1)+": Unexpected "+(k==ee?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Y,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:z,expected:F})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+k);switch(x[0]){case 1:o.push(k),p.push(m.yytext),r.push(m.yylloc),o.push(x[1]),k=null,Z=m.yyleng,u=m.yytext,P=m.yylineno,z=m.yylloc;break;case 2:if(D=this.productions_[x[1]][1],I.$=p[p.length-D],I._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},ae&&(I._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),X=this.performAction.apply(I,[u,Z,P,T.yy,x[1],p,r].concat(oe)),typeof X<"u")return X;D&&(o=o.slice(0,-1*D*2),p=p.slice(0,-1*D),r=r.slice(0,-1*D)),o.push(this.productions_[x[1]][0]),p.push(I.$),r.push(I._$),ne=U[o[o.length-2]][o[o.length-1]],o.push(ne);break;case 3:return!0}}return!0},"parse")},se=(function(){var L={EOF:1,parseError:h(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:h(function(s,i){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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);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},"input"),unput:h(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=this.match.split(/(?:\r\n?|\n)/g);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);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,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},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;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).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
- `+i+"^"},"showPosition"),test_match:h(function(s,i){var o,c,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},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={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},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)return o;if(this._backtrack){for(var r in p)this[r]=p[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,o,c;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),r=0;r<p.length;r++)if(o=this._input.match(this.rules[p[r]]),o&&(!i||o[0].length>i[0].length)){if(i=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,p[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}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.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var i=this.next();return i||this.lex()},"lex"),begin:h(function(i){this.conditionStack.push(i)},"begin"),popState:h(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:h(function(i){this.begin(i)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(i,o,c,p){switch(c){case 0:return i.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",o.yytext),20;case 36:return i.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),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],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}}};return L})();H.lexer=se;function M(){this.yy={}}return h(M,"Parser"),M.prototype=H,H.Parser=M,new M})();J.parser=J;var De=J,Ne=12,N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},w,Le=(w=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=N,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)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let a=this.nodes.length-1;a>=0;a--)if(this.nodes[a].level<e)return this.nodes[a];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,a,l,n){C.info("addNode",e,a,l,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const f=B();let y=f.mindmap?.padding??j.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const E={id:this.count++,nodeId:G(a,f),level:e,descr:G(l,f),type:n,children:[],width:f.mindmap?.maxNodeWidth??j.mindmap.maxNodeWidth,padding:y,isRoot:d},b=this.getParent(e);if(b)b.children.push(E),this.nodes.push(E);else if(d)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,a){switch(C.debug("In get type",e,a),e){case"[":return this.nodeType.RECT;case"(":return a===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,a){this.elements[e]=a}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const a=B(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=G(e.icon,a)),e.class&&(l.class=G(e.class,a))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,a){if(e.level===0?e.section=void 0:e.section=a,e.children)for(const[l,n]of e.children.entries()){const d=e.level===0?l%(Ne-1):a;this.assignSections(n,d)}}flattenNodes(e,a){const l=B(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),f=h(E=>{const v=(l.theme?.toLowerCase()??"").includes("redux");switch(E){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return v?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(a.push(y),e.children)for(const E of e.children)this.flattenNodes(E,a)}generateEdges(e,a){if(!e.children)return;const l=B();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const f=e.level+1;d+=` edge-depth-${f}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:d,depth:e.level,section:n.section};a.push(y),this.generateEdges(n,a)}}getData(){const e=this.getMindmap(),a=B(),n=pe().layout!==void 0,d=a;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};C.debug("getData: mindmapRoot",e,a),this.assignSections(e);const f=[],y=[];this.flattenNodes(e,f),this.generateEdges(e,y),C.debug(`getData: processed ${f.length} nodes and ${y.length} edges`);const E=new Map;for(const b of f)E.set(b.id,{shape:b.shape,width:b.width,height:b.height,padding:b.padding});return{nodes:f,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+xe()}}getLogger(){return C}},h(w,"MindmapDB"),w),ve=h(async(t,e,a,l)=>{C.debug(`Rendering mindmap diagram
7
- `+t);const n=l.db,d=n.getData(),f=le(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=de(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(g=>{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)}),await ge(d,f);const{themeVariables:E}=ue(),{useGradient:b,gradientStart:v,gradientStop:R}=E;if(b&&v&&R){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%");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)}he(f,d.config.mindmap?.padding??j.mindmap.padding,"mindmapDiagram",d.config.mindmap?.useMaxWidth??j.mindmap.useMaxWidth)},"draw"),Te={draw:ve},Oe=h(t=>{const{theme:e,look:a}=t;let l="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],fe(t["lineColor"+n])?t["lineColor"+n]=me(t["lineColor"+n],20):t["lineColor"+n]=ye(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const d=""+(a==="neo"?Math.max(10-(n-1)*2,2):17-3*n);l+=`
8
- .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
9
- fill: ${t["cScale"+n]};
10
- }
11
- .section-${n-1} text {
12
- fill: ${t["cScaleLabel"+n]};
13
- }
14
- .section-${n-1} span {
15
- color: ${t["cScaleLabel"+n]};
16
- }
17
- .node-icon-${n-1} {
18
- font-size: 40px;
19
- color: ${t["cScaleLabel"+n]};
20
- }
21
- .section-edge-${n-1}{
22
- stroke: ${t["cScale"+n]};
23
- }
24
- .edge-depth-${n-1}{
25
- stroke-width: ${d};
26
- }
27
- .section-${n-1} line {
28
- stroke: ${t["cScaleInv"+n]} ;
29
- stroke-width: 3;
30
- }
31
-
32
- .disabled, .disabled circle, .disabled text {
33
- fill: lightgray;
34
- }
35
- .disabled text {
36
- fill: #efefef;
37
- }
38
- [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 {
39
- fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?t.mainBkg:t["cScale"+n]};
40
- stroke: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScale"+n]};
41
- stroke-width: ${t.strokeWidth??2}px;
42
- }
43
- [data-look="neo"].section-edge-${n-1}{
44
- stroke: ${e?.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+n]};
45
- }
46
- [data-look="neo"].mindmap-node.section-${n-1} text {
47
- fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:n)]};
48
- }
49
- `}return l},"genSections"),Ie=h((t,e,a)=>{let l="";for(let n=0;n<t;n++)l+=`
50
- [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 {
51
- stroke: url(${e}-gradient);
52
- fill: ${a};
53
- }
54
- .section-${n-1} line {
55
- stroke-width: 0;
56
- }`;return l},"genGradient"),Ce=h(t=>{const{theme:e}=t,a=t.svgId,l=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none";return`
57
- .edge {
58
- stroke-width: 3;
59
- }
60
- ${Oe(t)}
61
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
62
- fill: ${t.git0};
63
- }
64
- .section-root text {
65
- fill: ${t.gitBranchLabel0};
66
- }
67
- .section-root span {
68
- color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0};
69
- }
70
- .icon-container {
71
- height:100%;
72
- display: flex;
73
- justify-content: center;
74
- align-items: center;
75
- }
76
- .edge {
77
- fill: none;
78
- }
79
- .mindmap-node-label {
80
- dy: 1em;
81
- alignment-baseline: middle;
82
- text-anchor: middle;
83
- dominant-baseline: middle;
84
- text-align: center;
85
- }
86
- [data-look="neo"].mindmap-node {
87
- filter: ${l};
88
- }
89
- [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 {
90
- fill: ${e?.includes("redux")?t.mainBkg:t.git0};
91
- }
92
- [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
93
- fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
94
- }
95
- ${t.useGradient&&a&&t.mainBkg?Ie(t.THEME_COLOR_LIMIT,a,t.mainBkg):""}
96
- `},"getStyles"),we=Ce,Ue={get db(){return new Le},renderer:Te,parser:De,styles:we};export{Ue as diagram};
@@ -1,96 +0,0 @@
1
- import{g as le}from"./chunk-55IACEB6-CR3JEwA1.js";import{s as he}from"./chunk-2J33WTMH-564mo_tM.js";import{b as h,aF as C,ac as de,aW as ge,a4 as ue,T as j,a5 as B,a_ as G,ai as pe,aw as fe,aB as me,M as ye}from"./index-DywDZDjz.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function Ee(t,e=0){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()}let q;const _e=new Uint8Array(16);function be(){if(!q){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");q=crypto.getRandomValues.bind(crypto)}return q(_e)}const ke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ie={randomUUID:ke};function Se(t,e,a){t=t||{};const l=t.random??t.rng?.()??be();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,Ee(l)}function xe(t,e,a){return ie.randomUUID&&!t?ie.randomUUID():Se(t)}var J=(function(){var t=h(function(L,s,i,o){for(i=i||{},o=L.length;o--;i[L[o]]=s);return i},"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],K=[1,33],Q=[1,34],$=[1,6,7,11,13,15,16,19,22],H={trace:h(function(){},"trace"),yy:{},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},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"},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]],performAction:h(function(s,i,o,c,p,r,U){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25: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])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27: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])};break}},"anonymous"),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:K,11:Q}),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:K,11:Q}),t($,[2,11]),t($,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:h(function(s){var i=this,o=[0],c=[],p=[null],r=[],U=this.table,u="",P=0,Z=0,re=2,ee=1,oe=r.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(T.yy[W]=this.yy[W]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var z=m.yylloc;r.push(z);var ae=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(S){o.length=o.length-2*S,p.length=p.length-S,r.length=r.length-S}h(ce,"popStack");function te(){var S;return S=c.pop()||m.lex()||ee,typeof S!="number"&&(S instanceof Array&&(c=S,S=c.pop()),S=i.symbols_[S]||S),S}h(te,"lex");for(var k,O,x,X,I={},V,D,ne,F;;){if(O=o[o.length-1],this.defaultActions[O]?x=this.defaultActions[O]:((k===null||typeof k>"u")&&(k=te()),x=U[O]&&U[O][k]),typeof x>"u"||!x.length||!x[0]){var Y="";F=[];for(V in U[O])this.terminals_[V]&&V>re&&F.push("'"+this.terminals_[V]+"'");m.showPosition?Y="Parse error on line "+(P+1)+`:
2
- `+m.showPosition()+`
3
- Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Y="Parse error on line "+(P+1)+": Unexpected "+(k==ee?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Y,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:z,expected:F})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+k);switch(x[0]){case 1:o.push(k),p.push(m.yytext),r.push(m.yylloc),o.push(x[1]),k=null,Z=m.yyleng,u=m.yytext,P=m.yylineno,z=m.yylloc;break;case 2:if(D=this.productions_[x[1]][1],I.$=p[p.length-D],I._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},ae&&(I._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),X=this.performAction.apply(I,[u,Z,P,T.yy,x[1],p,r].concat(oe)),typeof X<"u")return X;D&&(o=o.slice(0,-1*D*2),p=p.slice(0,-1*D),r=r.slice(0,-1*D)),o.push(this.productions_[x[1]][0]),p.push(I.$),r.push(I._$),ne=U[o[o.length-2]][o[o.length-1]],o.push(ne);break;case 3:return!0}}return!0},"parse")},se=(function(){var L={EOF:1,parseError:h(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:h(function(s,i){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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);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},"input"),unput:h(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=this.match.split(/(?:\r\n?|\n)/g);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);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,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},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;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).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
- `+i+"^"},"showPosition"),test_match:h(function(s,i){var o,c,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},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={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},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)return o;if(this._backtrack){for(var r in p)this[r]=p[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,o,c;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),r=0;r<p.length;r++)if(o=this._input.match(this.rules[p[r]]),o&&(!i||o[0].length>i[0].length)){if(i=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,p[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}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.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var i=this.next();return i||this.lex()},"lex"),begin:h(function(i){this.conditionStack.push(i)},"begin"),popState:h(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:h(function(i){this.begin(i)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(i,o,c,p){switch(c){case 0:return i.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",o.yytext),20;case 36:return i.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),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],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}}};return L})();H.lexer=se;function M(){this.yy={}}return h(M,"Parser"),M.prototype=H,H.Parser=M,new M})();J.parser=J;var De=J,Ne=12,N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},w,Le=(w=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=N,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)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let a=this.nodes.length-1;a>=0;a--)if(this.nodes[a].level<e)return this.nodes[a];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,a,l,n){C.info("addNode",e,a,l,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const f=B();let y=f.mindmap?.padding??j.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const E={id:this.count++,nodeId:G(a,f),level:e,descr:G(l,f),type:n,children:[],width:f.mindmap?.maxNodeWidth??j.mindmap.maxNodeWidth,padding:y,isRoot:d},b=this.getParent(e);if(b)b.children.push(E),this.nodes.push(E);else if(d)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,a){switch(C.debug("In get type",e,a),e){case"[":return this.nodeType.RECT;case"(":return a===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,a){this.elements[e]=a}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const a=B(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=G(e.icon,a)),e.class&&(l.class=G(e.class,a))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,a){if(e.level===0?e.section=void 0:e.section=a,e.children)for(const[l,n]of e.children.entries()){const d=e.level===0?l%(Ne-1):a;this.assignSections(n,d)}}flattenNodes(e,a){const l=B(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),f=h(E=>{const v=(l.theme?.toLowerCase()??"").includes("redux");switch(E){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return v?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(a.push(y),e.children)for(const E of e.children)this.flattenNodes(E,a)}generateEdges(e,a){if(!e.children)return;const l=B();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const f=e.level+1;d+=` edge-depth-${f}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:d,depth:e.level,section:n.section};a.push(y),this.generateEdges(n,a)}}getData(){const e=this.getMindmap(),a=B(),n=pe().layout!==void 0,d=a;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};C.debug("getData: mindmapRoot",e,a),this.assignSections(e);const f=[],y=[];this.flattenNodes(e,f),this.generateEdges(e,y),C.debug(`getData: processed ${f.length} nodes and ${y.length} edges`);const E=new Map;for(const b of f)E.set(b.id,{shape:b.shape,width:b.width,height:b.height,padding:b.padding});return{nodes:f,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+xe()}}getLogger(){return C}},h(w,"MindmapDB"),w),ve=h(async(t,e,a,l)=>{C.debug(`Rendering mindmap diagram
7
- `+t);const n=l.db,d=n.getData(),f=le(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=de(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(g=>{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)}),await ge(d,f);const{themeVariables:E}=ue(),{useGradient:b,gradientStart:v,gradientStop:R}=E;if(b&&v&&R){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%");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)}he(f,d.config.mindmap?.padding??j.mindmap.padding,"mindmapDiagram",d.config.mindmap?.useMaxWidth??j.mindmap.useMaxWidth)},"draw"),Te={draw:ve},Oe=h(t=>{const{theme:e,look:a}=t;let l="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],fe(t["lineColor"+n])?t["lineColor"+n]=me(t["lineColor"+n],20):t["lineColor"+n]=ye(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const d=""+(a==="neo"?Math.max(10-(n-1)*2,2):17-3*n);l+=`
8
- .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
9
- fill: ${t["cScale"+n]};
10
- }
11
- .section-${n-1} text {
12
- fill: ${t["cScaleLabel"+n]};
13
- }
14
- .section-${n-1} span {
15
- color: ${t["cScaleLabel"+n]};
16
- }
17
- .node-icon-${n-1} {
18
- font-size: 40px;
19
- color: ${t["cScaleLabel"+n]};
20
- }
21
- .section-edge-${n-1}{
22
- stroke: ${t["cScale"+n]};
23
- }
24
- .edge-depth-${n-1}{
25
- stroke-width: ${d};
26
- }
27
- .section-${n-1} line {
28
- stroke: ${t["cScaleInv"+n]} ;
29
- stroke-width: 3;
30
- }
31
-
32
- .disabled, .disabled circle, .disabled text {
33
- fill: lightgray;
34
- }
35
- .disabled text {
36
- fill: #efefef;
37
- }
38
- [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 {
39
- fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?t.mainBkg:t["cScale"+n]};
40
- stroke: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScale"+n]};
41
- stroke-width: ${t.strokeWidth??2}px;
42
- }
43
- [data-look="neo"].section-edge-${n-1}{
44
- stroke: ${e?.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+n]};
45
- }
46
- [data-look="neo"].mindmap-node.section-${n-1} text {
47
- fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:n)]};
48
- }
49
- `}return l},"genSections"),Ie=h((t,e,a)=>{let l="";for(let n=0;n<t;n++)l+=`
50
- [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 {
51
- stroke: url(${e}-gradient);
52
- fill: ${a};
53
- }
54
- .section-${n-1} line {
55
- stroke-width: 0;
56
- }`;return l},"genGradient"),Ce=h(t=>{const{theme:e}=t,a=t.svgId,l=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none";return`
57
- .edge {
58
- stroke-width: 3;
59
- }
60
- ${Oe(t)}
61
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
62
- fill: ${t.git0};
63
- }
64
- .section-root text {
65
- fill: ${t.gitBranchLabel0};
66
- }
67
- .section-root span {
68
- color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0};
69
- }
70
- .icon-container {
71
- height:100%;
72
- display: flex;
73
- justify-content: center;
74
- align-items: center;
75
- }
76
- .edge {
77
- fill: none;
78
- }
79
- .mindmap-node-label {
80
- dy: 1em;
81
- alignment-baseline: middle;
82
- text-anchor: middle;
83
- dominant-baseline: middle;
84
- text-align: center;
85
- }
86
- [data-look="neo"].mindmap-node {
87
- filter: ${l};
88
- }
89
- [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 {
90
- fill: ${e?.includes("redux")?t.mainBkg:t.git0};
91
- }
92
- [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
93
- fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
94
- }
95
- ${t.useGradient&&a&&t.mainBkg?Ie(t.THEME_COLOR_LIMIT,a,t.mainBkg):""}
96
- `},"getStyles"),we=Ce,Ue={get db(){return new Le},renderer:Te,parser:De,styles:we};export{Ue as diagram};
@@ -1,96 +0,0 @@
1
- import{g as le}from"./chunk-55IACEB6-Dul_8Xx4.js";import{s as he}from"./chunk-2J33WTMH-Ci30owWm.js";import{b as h,aF as C,ac as de,aW as ge,a4 as ue,T as j,a5 as B,a_ as G,ai as pe,aw as fe,aB as me,M as ye}from"./index-BCGYoU3m.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function Ee(t,e=0){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()}let q;const _e=new Uint8Array(16);function be(){if(!q){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");q=crypto.getRandomValues.bind(crypto)}return q(_e)}const ke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ie={randomUUID:ke};function Se(t,e,a){t=t||{};const l=t.random??t.rng?.()??be();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,Ee(l)}function xe(t,e,a){return ie.randomUUID&&!t?ie.randomUUID():Se(t)}var J=(function(){var t=h(function(L,s,i,o){for(i=i||{},o=L.length;o--;i[L[o]]=s);return i},"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],K=[1,33],Q=[1,34],$=[1,6,7,11,13,15,16,19,22],H={trace:h(function(){},"trace"),yy:{},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},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"},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]],performAction:h(function(s,i,o,c,p,r,U){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25: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])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27: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])};break}},"anonymous"),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:K,11:Q}),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:K,11:Q}),t($,[2,11]),t($,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:h(function(s){var i=this,o=[0],c=[],p=[null],r=[],U=this.table,u="",P=0,Z=0,re=2,ee=1,oe=r.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(T.yy[W]=this.yy[W]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var z=m.yylloc;r.push(z);var ae=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(S){o.length=o.length-2*S,p.length=p.length-S,r.length=r.length-S}h(ce,"popStack");function te(){var S;return S=c.pop()||m.lex()||ee,typeof S!="number"&&(S instanceof Array&&(c=S,S=c.pop()),S=i.symbols_[S]||S),S}h(te,"lex");for(var k,O,x,X,I={},V,D,ne,F;;){if(O=o[o.length-1],this.defaultActions[O]?x=this.defaultActions[O]:((k===null||typeof k>"u")&&(k=te()),x=U[O]&&U[O][k]),typeof x>"u"||!x.length||!x[0]){var Y="";F=[];for(V in U[O])this.terminals_[V]&&V>re&&F.push("'"+this.terminals_[V]+"'");m.showPosition?Y="Parse error on line "+(P+1)+`:
2
- `+m.showPosition()+`
3
- Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Y="Parse error on line "+(P+1)+": Unexpected "+(k==ee?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Y,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:z,expected:F})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+k);switch(x[0]){case 1:o.push(k),p.push(m.yytext),r.push(m.yylloc),o.push(x[1]),k=null,Z=m.yyleng,u=m.yytext,P=m.yylineno,z=m.yylloc;break;case 2:if(D=this.productions_[x[1]][1],I.$=p[p.length-D],I._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},ae&&(I._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),X=this.performAction.apply(I,[u,Z,P,T.yy,x[1],p,r].concat(oe)),typeof X<"u")return X;D&&(o=o.slice(0,-1*D*2),p=p.slice(0,-1*D),r=r.slice(0,-1*D)),o.push(this.productions_[x[1]][0]),p.push(I.$),r.push(I._$),ne=U[o[o.length-2]][o[o.length-1]],o.push(ne);break;case 3:return!0}}return!0},"parse")},se=(function(){var L={EOF:1,parseError:h(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:h(function(s,i){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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);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},"input"),unput:h(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=this.match.split(/(?:\r\n?|\n)/g);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);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,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},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;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).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
- `+i+"^"},"showPosition"),test_match:h(function(s,i){var o,c,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},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={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},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)return o;if(this._backtrack){for(var r in p)this[r]=p[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,o,c;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),r=0;r<p.length;r++)if(o=this._input.match(this.rules[p[r]]),o&&(!i||o[0].length>i[0].length)){if(i=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,p[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}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.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var i=this.next();return i||this.lex()},"lex"),begin:h(function(i){this.conditionStack.push(i)},"begin"),popState:h(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:h(function(i){this.begin(i)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(i,o,c,p){switch(c){case 0:return i.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",o.yytext),20;case 36:return i.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),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],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}}};return L})();H.lexer=se;function M(){this.yy={}}return h(M,"Parser"),M.prototype=H,H.Parser=M,new M})();J.parser=J;var De=J,Ne=12,N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},w,Le=(w=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=N,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)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let a=this.nodes.length-1;a>=0;a--)if(this.nodes[a].level<e)return this.nodes[a];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,a,l,n){C.info("addNode",e,a,l,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const f=B();let y=f.mindmap?.padding??j.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const E={id:this.count++,nodeId:G(a,f),level:e,descr:G(l,f),type:n,children:[],width:f.mindmap?.maxNodeWidth??j.mindmap.maxNodeWidth,padding:y,isRoot:d},b=this.getParent(e);if(b)b.children.push(E),this.nodes.push(E);else if(d)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,a){switch(C.debug("In get type",e,a),e){case"[":return this.nodeType.RECT;case"(":return a===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,a){this.elements[e]=a}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const a=B(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=G(e.icon,a)),e.class&&(l.class=G(e.class,a))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,a){if(e.level===0?e.section=void 0:e.section=a,e.children)for(const[l,n]of e.children.entries()){const d=e.level===0?l%(Ne-1):a;this.assignSections(n,d)}}flattenNodes(e,a){const l=B(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),f=h(E=>{const v=(l.theme?.toLowerCase()??"").includes("redux");switch(E){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return v?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(a.push(y),e.children)for(const E of e.children)this.flattenNodes(E,a)}generateEdges(e,a){if(!e.children)return;const l=B();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const f=e.level+1;d+=` edge-depth-${f}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:d,depth:e.level,section:n.section};a.push(y),this.generateEdges(n,a)}}getData(){const e=this.getMindmap(),a=B(),n=pe().layout!==void 0,d=a;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};C.debug("getData: mindmapRoot",e,a),this.assignSections(e);const f=[],y=[];this.flattenNodes(e,f),this.generateEdges(e,y),C.debug(`getData: processed ${f.length} nodes and ${y.length} edges`);const E=new Map;for(const b of f)E.set(b.id,{shape:b.shape,width:b.width,height:b.height,padding:b.padding});return{nodes:f,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+xe()}}getLogger(){return C}},h(w,"MindmapDB"),w),ve=h(async(t,e,a,l)=>{C.debug(`Rendering mindmap diagram
7
- `+t);const n=l.db,d=n.getData(),f=le(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=de(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(g=>{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)}),await ge(d,f);const{themeVariables:E}=ue(),{useGradient:b,gradientStart:v,gradientStop:R}=E;if(b&&v&&R){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%");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)}he(f,d.config.mindmap?.padding??j.mindmap.padding,"mindmapDiagram",d.config.mindmap?.useMaxWidth??j.mindmap.useMaxWidth)},"draw"),Te={draw:ve},Oe=h(t=>{const{theme:e,look:a}=t;let l="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],fe(t["lineColor"+n])?t["lineColor"+n]=me(t["lineColor"+n],20):t["lineColor"+n]=ye(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const d=""+(a==="neo"?Math.max(10-(n-1)*2,2):17-3*n);l+=`
8
- .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
9
- fill: ${t["cScale"+n]};
10
- }
11
- .section-${n-1} text {
12
- fill: ${t["cScaleLabel"+n]};
13
- }
14
- .section-${n-1} span {
15
- color: ${t["cScaleLabel"+n]};
16
- }
17
- .node-icon-${n-1} {
18
- font-size: 40px;
19
- color: ${t["cScaleLabel"+n]};
20
- }
21
- .section-edge-${n-1}{
22
- stroke: ${t["cScale"+n]};
23
- }
24
- .edge-depth-${n-1}{
25
- stroke-width: ${d};
26
- }
27
- .section-${n-1} line {
28
- stroke: ${t["cScaleInv"+n]} ;
29
- stroke-width: 3;
30
- }
31
-
32
- .disabled, .disabled circle, .disabled text {
33
- fill: lightgray;
34
- }
35
- .disabled text {
36
- fill: #efefef;
37
- }
38
- [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 {
39
- fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?t.mainBkg:t["cScale"+n]};
40
- stroke: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScale"+n]};
41
- stroke-width: ${t.strokeWidth??2}px;
42
- }
43
- [data-look="neo"].section-edge-${n-1}{
44
- stroke: ${e?.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+n]};
45
- }
46
- [data-look="neo"].mindmap-node.section-${n-1} text {
47
- fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:n)]};
48
- }
49
- `}return l},"genSections"),Ie=h((t,e,a)=>{let l="";for(let n=0;n<t;n++)l+=`
50
- [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 {
51
- stroke: url(${e}-gradient);
52
- fill: ${a};
53
- }
54
- .section-${n-1} line {
55
- stroke-width: 0;
56
- }`;return l},"genGradient"),Ce=h(t=>{const{theme:e}=t,a=t.svgId,l=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none";return`
57
- .edge {
58
- stroke-width: 3;
59
- }
60
- ${Oe(t)}
61
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
62
- fill: ${t.git0};
63
- }
64
- .section-root text {
65
- fill: ${t.gitBranchLabel0};
66
- }
67
- .section-root span {
68
- color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0};
69
- }
70
- .icon-container {
71
- height:100%;
72
- display: flex;
73
- justify-content: center;
74
- align-items: center;
75
- }
76
- .edge {
77
- fill: none;
78
- }
79
- .mindmap-node-label {
80
- dy: 1em;
81
- alignment-baseline: middle;
82
- text-anchor: middle;
83
- dominant-baseline: middle;
84
- text-align: center;
85
- }
86
- [data-look="neo"].mindmap-node {
87
- filter: ${l};
88
- }
89
- [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 {
90
- fill: ${e?.includes("redux")?t.mainBkg:t.git0};
91
- }
92
- [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
93
- fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
94
- }
95
- ${t.useGradient&&a&&t.mainBkg?Ie(t.THEME_COLOR_LIMIT,a,t.mainBkg):""}
96
- `},"getStyles"),we=Ce,Ue={get db(){return new Le},renderer:Te,parser:De,styles:we};export{Ue as diagram};
@@ -1,30 +0,0 @@
1
- import{G as S,be as F,h as K,a2 as Q,b1 as Y,a3 as tt,b2 as et,a7 as at,b4 as nt,b as d,aF as R,a5 as rt,t as it,b0 as st,aN as ot,F as lt,u as ct,T as ut}from"./index-BCGYoU3m.js";import{p as dt}from"./chunk-4BX2VUAB-BTkmuMjL.js";import{p as pt}from"./wardley-L42UT6IY-mTSjCdTo.js";import{d as I}from"./arc-foVguWzs.js";import{o as gt}from"./ordinal-Cboi1Yqb.js";import"./init-Gi6I4Gst.js";function ft(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function ht(t){return t}function mt(){var t=ht,a=ft,f=null,y=S(0),s=S(F),p=S(0);function o(e){var r,l=(e=K(e)).length,g,h,v=0,c=new Array(l),i=new Array(l),x=+y.apply(this,arguments),w=Math.min(F,Math.max(-F,s.apply(this,arguments)-x)),m,D=Math.min(Math.abs(w)/l,p.apply(this,arguments)),$=D*(w<0?-1:1),u;for(r=0;r<l;++r)(u=i[c[r]=r]=+t(e[r],r,e))>0&&(v+=u);for(a!=null?c.sort(function(A,C){return a(i[A],i[C])}):f!=null&&c.sort(function(A,C){return f(e[A],e[C])}),r=0,h=v?(w-l*$)/v:0;r<l;++r,x=m)g=c[r],u=i[g],m=x+(u>0?u*h:0)+$,i[g]={data:e[g],index:r,value:u,startAngle:x,endAngle:m,padAngle:D};return i}return o.value=function(e){return arguments.length?(t=typeof e=="function"?e:S(+e),o):t},o.sortValues=function(e){return arguments.length?(a=e,f=null,o):a},o.sort=function(e){return arguments.length?(f=e,a=null,o):f},o.startAngle=function(e){return arguments.length?(y=typeof e=="function"?e:S(+e),o):y},o.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:S(+e),o):s},o.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:S(+e),o):p},o}var vt=ut.pie,W={sections:new Map,showData:!1},T=W.sections,z=W.showData,xt=structuredClone(vt),St=d(()=>structuredClone(xt),"getConfig"),yt=d(()=>{T=new Map,z=W.showData,ct()},"clear"),wt=d(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),R.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),At=d(()=>T,"getSections"),Ct=d(t=>{z=t},"setShowData"),Dt=d(()=>z,"getShowData"),_={getConfig:St,clear:yt,setDiagramTitle:nt,getDiagramTitle:at,setAccTitle:et,getAccTitle:tt,setAccDescription:Y,getAccDescription:Q,addSection:wt,getSections:At,setShowData:Ct,getShowData:Dt},$t=d((t,a)=>{dt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:d(async t=>{const a=await pt("pie",t);R.debug(a),$t(a,_)},"parse")},bt=d(t=>`
2
- .pieCircle{
3
- stroke: ${t.pieStrokeColor};
4
- stroke-width : ${t.pieStrokeWidth};
5
- opacity : ${t.pieOpacity};
6
- }
7
- .pieOuterCircle{
8
- stroke: ${t.pieOuterStrokeColor};
9
- stroke-width: ${t.pieOuterStrokeWidth};
10
- fill: none;
11
- }
12
- .pieTitleText {
13
- text-anchor: middle;
14
- font-size: ${t.pieTitleTextSize};
15
- fill: ${t.pieTitleTextColor};
16
- font-family: ${t.fontFamily};
17
- }
18
- .slice {
19
- font-family: ${t.fontFamily};
20
- fill: ${t.pieSectionTextColor};
21
- font-size:${t.pieSectionTextSize};
22
- // fill: white;
23
- }
24
- .legend text {
25
- fill: ${t.pieLegendTextColor};
26
- font-family: ${t.fontFamily};
27
- font-size: ${t.pieLegendTextSize};
28
- }
29
- `,"getStyles"),kt=bt,Et=d(t=>{const a=[...t.values()].reduce((s,p)=>s+p,0),f=[...t.entries()].map(([s,p])=>({label:s,value:p})).filter(s=>s.value/a*100>=1);return mt().value(s=>s.value).sort(null)(f)},"createPieArcs"),Mt=d((t,a,f,y)=>{R.debug(`rendering pie chart
30
- `+t);const s=y.db,p=rt(),o=it(s.getConfig(),p.pie),e=40,r=18,l=4,g=450,h=g,v=st(a),c=v.append("g");c.attr("transform","translate("+h/2+","+g/2+")");const{themeVariables:i}=p;let[x]=ot(i.pieOuterStrokeWidth);x??=2;const w=o.textPosition,m=Math.min(h,g)/2-e,D=I().innerRadius(0).outerRadius(m),$=I().innerRadius(m*w).outerRadius(m*w);c.append("circle").attr("cx",0).attr("cy",0).attr("r",m+x/2).attr("class","pieOuterCircle");const u=s.getSections(),A=Et(u),C=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;u.forEach(n=>{b+=n});const G=A.filter(n=>(n.data.value/b*100).toFixed(0)!=="0"),k=gt(C).domain([...u.keys()]);c.selectAll("mySlices").data(G).enter().append("path").attr("d",D).attr("fill",n=>k(n.data.label)).attr("class","pieCircle"),c.selectAll("mySlices").data(G).enter().append("text").text(n=>(n.data.value/b*100).toFixed(0)+"%").attr("transform",n=>"translate("+$.centroid(n)+")").style("text-anchor","middle").attr("class","slice");const V=c.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),N=[...u.entries()].map(([n,M])=>({label:n,value:M})),E=c.selectAll(".legend").data(N).enter().append("g").attr("class","legend").attr("transform",(n,M)=>{const P=r+l,q=P*N.length/2,H=12*r,J=M*P-q;return"translate("+H+","+J+")"});E.append("rect").attr("width",r).attr("height",r).style("fill",n=>k(n.label)).style("stroke",n=>k(n.label)),E.append("text").attr("x",r+l).attr("y",r-l).text(n=>s.getShowData()?`${n.label} [${n.value}]`:n.label);const U=Math.max(...E.selectAll("text").nodes().map(n=>n?.getBoundingClientRect().width??0)),j=h+e+r+l+U,L=V.node()?.getBoundingClientRect().width??0,X=h/2-L/2,Z=h/2+L/2,B=Math.min(0,X),O=Math.max(j,Z)-B;v.attr("viewBox",`${B} 0 ${O} ${g}`),lt(v,g,O,o.useMaxWidth)},"draw"),Ft={draw:Mt},Ot={parser:Tt,db:_,renderer:Ft,styles:kt};export{Ot as diagram};
@@ -1,30 +0,0 @@
1
- import{G as S,be as F,h as K,a2 as Q,b1 as Y,a3 as tt,b2 as et,a7 as at,b4 as nt,b as d,aF as R,a5 as rt,t as it,b0 as st,aN as ot,F as lt,u as ct,T as ut}from"./index-BvC6gdHx.js";import{p as dt}from"./chunk-4BX2VUAB-ClCdFzK4.js";import{p as pt}from"./wardley-L42UT6IY-CRpCqUkS.js";import{d as I}from"./arc-MoXg1d0p.js";import{o as gt}from"./ordinal-Cboi1Yqb.js";import"./init-Gi6I4Gst.js";function ft(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function ht(t){return t}function mt(){var t=ht,a=ft,f=null,y=S(0),s=S(F),p=S(0);function o(e){var r,l=(e=K(e)).length,g,h,v=0,c=new Array(l),i=new Array(l),x=+y.apply(this,arguments),w=Math.min(F,Math.max(-F,s.apply(this,arguments)-x)),m,D=Math.min(Math.abs(w)/l,p.apply(this,arguments)),$=D*(w<0?-1:1),u;for(r=0;r<l;++r)(u=i[c[r]=r]=+t(e[r],r,e))>0&&(v+=u);for(a!=null?c.sort(function(A,C){return a(i[A],i[C])}):f!=null&&c.sort(function(A,C){return f(e[A],e[C])}),r=0,h=v?(w-l*$)/v:0;r<l;++r,x=m)g=c[r],u=i[g],m=x+(u>0?u*h:0)+$,i[g]={data:e[g],index:r,value:u,startAngle:x,endAngle:m,padAngle:D};return i}return o.value=function(e){return arguments.length?(t=typeof e=="function"?e:S(+e),o):t},o.sortValues=function(e){return arguments.length?(a=e,f=null,o):a},o.sort=function(e){return arguments.length?(f=e,a=null,o):f},o.startAngle=function(e){return arguments.length?(y=typeof e=="function"?e:S(+e),o):y},o.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:S(+e),o):s},o.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:S(+e),o):p},o}var vt=ut.pie,W={sections:new Map,showData:!1},T=W.sections,z=W.showData,xt=structuredClone(vt),St=d(()=>structuredClone(xt),"getConfig"),yt=d(()=>{T=new Map,z=W.showData,ct()},"clear"),wt=d(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),R.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),At=d(()=>T,"getSections"),Ct=d(t=>{z=t},"setShowData"),Dt=d(()=>z,"getShowData"),_={getConfig:St,clear:yt,setDiagramTitle:nt,getDiagramTitle:at,setAccTitle:et,getAccTitle:tt,setAccDescription:Y,getAccDescription:Q,addSection:wt,getSections:At,setShowData:Ct,getShowData:Dt},$t=d((t,a)=>{dt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:d(async t=>{const a=await pt("pie",t);R.debug(a),$t(a,_)},"parse")},bt=d(t=>`
2
- .pieCircle{
3
- stroke: ${t.pieStrokeColor};
4
- stroke-width : ${t.pieStrokeWidth};
5
- opacity : ${t.pieOpacity};
6
- }
7
- .pieOuterCircle{
8
- stroke: ${t.pieOuterStrokeColor};
9
- stroke-width: ${t.pieOuterStrokeWidth};
10
- fill: none;
11
- }
12
- .pieTitleText {
13
- text-anchor: middle;
14
- font-size: ${t.pieTitleTextSize};
15
- fill: ${t.pieTitleTextColor};
16
- font-family: ${t.fontFamily};
17
- }
18
- .slice {
19
- font-family: ${t.fontFamily};
20
- fill: ${t.pieSectionTextColor};
21
- font-size:${t.pieSectionTextSize};
22
- // fill: white;
23
- }
24
- .legend text {
25
- fill: ${t.pieLegendTextColor};
26
- font-family: ${t.fontFamily};
27
- font-size: ${t.pieLegendTextSize};
28
- }
29
- `,"getStyles"),kt=bt,Et=d(t=>{const a=[...t.values()].reduce((s,p)=>s+p,0),f=[...t.entries()].map(([s,p])=>({label:s,value:p})).filter(s=>s.value/a*100>=1);return mt().value(s=>s.value).sort(null)(f)},"createPieArcs"),Mt=d((t,a,f,y)=>{R.debug(`rendering pie chart
30
- `+t);const s=y.db,p=rt(),o=it(s.getConfig(),p.pie),e=40,r=18,l=4,g=450,h=g,v=st(a),c=v.append("g");c.attr("transform","translate("+h/2+","+g/2+")");const{themeVariables:i}=p;let[x]=ot(i.pieOuterStrokeWidth);x??=2;const w=o.textPosition,m=Math.min(h,g)/2-e,D=I().innerRadius(0).outerRadius(m),$=I().innerRadius(m*w).outerRadius(m*w);c.append("circle").attr("cx",0).attr("cy",0).attr("r",m+x/2).attr("class","pieOuterCircle");const u=s.getSections(),A=Et(u),C=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;u.forEach(n=>{b+=n});const G=A.filter(n=>(n.data.value/b*100).toFixed(0)!=="0"),k=gt(C).domain([...u.keys()]);c.selectAll("mySlices").data(G).enter().append("path").attr("d",D).attr("fill",n=>k(n.data.label)).attr("class","pieCircle"),c.selectAll("mySlices").data(G).enter().append("text").text(n=>(n.data.value/b*100).toFixed(0)+"%").attr("transform",n=>"translate("+$.centroid(n)+")").style("text-anchor","middle").attr("class","slice");const V=c.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),N=[...u.entries()].map(([n,M])=>({label:n,value:M})),E=c.selectAll(".legend").data(N).enter().append("g").attr("class","legend").attr("transform",(n,M)=>{const P=r+l,q=P*N.length/2,H=12*r,J=M*P-q;return"translate("+H+","+J+")"});E.append("rect").attr("width",r).attr("height",r).style("fill",n=>k(n.label)).style("stroke",n=>k(n.label)),E.append("text").attr("x",r+l).attr("y",r-l).text(n=>s.getShowData()?`${n.label} [${n.value}]`:n.label);const U=Math.max(...E.selectAll("text").nodes().map(n=>n?.getBoundingClientRect().width??0)),j=h+e+r+l+U,L=V.node()?.getBoundingClientRect().width??0,X=h/2-L/2,Z=h/2+L/2,B=Math.min(0,X),O=Math.max(j,Z)-B;v.attr("viewBox",`${B} 0 ${O} ${g}`),lt(v,g,O,o.useMaxWidth)},"draw"),Ft={draw:Mt},Ot={parser:Tt,db:_,renderer:Ft,styles:kt};export{Ot as diagram};
@@ -1,30 +0,0 @@
1
- import{G as S,be as F,h as K,a2 as Q,b1 as Y,a3 as tt,b2 as et,a7 as at,b4 as nt,b as d,aF as R,a5 as rt,t as it,b0 as st,aN as ot,F as lt,u as ct,T as ut}from"./index-DywDZDjz.js";import{p as dt}from"./chunk-4BX2VUAB-B9jaG_QE.js";import{p as pt}from"./wardley-L42UT6IY-CUHy5aYw.js";import{d as I}from"./arc-C6mmQI6r.js";import{o as gt}from"./ordinal-Cboi1Yqb.js";import"./init-Gi6I4Gst.js";function ft(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function ht(t){return t}function mt(){var t=ht,a=ft,f=null,y=S(0),s=S(F),p=S(0);function o(e){var r,l=(e=K(e)).length,g,h,v=0,c=new Array(l),i=new Array(l),x=+y.apply(this,arguments),w=Math.min(F,Math.max(-F,s.apply(this,arguments)-x)),m,D=Math.min(Math.abs(w)/l,p.apply(this,arguments)),$=D*(w<0?-1:1),u;for(r=0;r<l;++r)(u=i[c[r]=r]=+t(e[r],r,e))>0&&(v+=u);for(a!=null?c.sort(function(A,C){return a(i[A],i[C])}):f!=null&&c.sort(function(A,C){return f(e[A],e[C])}),r=0,h=v?(w-l*$)/v:0;r<l;++r,x=m)g=c[r],u=i[g],m=x+(u>0?u*h:0)+$,i[g]={data:e[g],index:r,value:u,startAngle:x,endAngle:m,padAngle:D};return i}return o.value=function(e){return arguments.length?(t=typeof e=="function"?e:S(+e),o):t},o.sortValues=function(e){return arguments.length?(a=e,f=null,o):a},o.sort=function(e){return arguments.length?(f=e,a=null,o):f},o.startAngle=function(e){return arguments.length?(y=typeof e=="function"?e:S(+e),o):y},o.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:S(+e),o):s},o.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:S(+e),o):p},o}var vt=ut.pie,W={sections:new Map,showData:!1},T=W.sections,z=W.showData,xt=structuredClone(vt),St=d(()=>structuredClone(xt),"getConfig"),yt=d(()=>{T=new Map,z=W.showData,ct()},"clear"),wt=d(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),R.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),At=d(()=>T,"getSections"),Ct=d(t=>{z=t},"setShowData"),Dt=d(()=>z,"getShowData"),_={getConfig:St,clear:yt,setDiagramTitle:nt,getDiagramTitle:at,setAccTitle:et,getAccTitle:tt,setAccDescription:Y,getAccDescription:Q,addSection:wt,getSections:At,setShowData:Ct,getShowData:Dt},$t=d((t,a)=>{dt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:d(async t=>{const a=await pt("pie",t);R.debug(a),$t(a,_)},"parse")},bt=d(t=>`
2
- .pieCircle{
3
- stroke: ${t.pieStrokeColor};
4
- stroke-width : ${t.pieStrokeWidth};
5
- opacity : ${t.pieOpacity};
6
- }
7
- .pieOuterCircle{
8
- stroke: ${t.pieOuterStrokeColor};
9
- stroke-width: ${t.pieOuterStrokeWidth};
10
- fill: none;
11
- }
12
- .pieTitleText {
13
- text-anchor: middle;
14
- font-size: ${t.pieTitleTextSize};
15
- fill: ${t.pieTitleTextColor};
16
- font-family: ${t.fontFamily};
17
- }
18
- .slice {
19
- font-family: ${t.fontFamily};
20
- fill: ${t.pieSectionTextColor};
21
- font-size:${t.pieSectionTextSize};
22
- // fill: white;
23
- }
24
- .legend text {
25
- fill: ${t.pieLegendTextColor};
26
- font-family: ${t.fontFamily};
27
- font-size: ${t.pieLegendTextSize};
28
- }
29
- `,"getStyles"),kt=bt,Et=d(t=>{const a=[...t.values()].reduce((s,p)=>s+p,0),f=[...t.entries()].map(([s,p])=>({label:s,value:p})).filter(s=>s.value/a*100>=1);return mt().value(s=>s.value).sort(null)(f)},"createPieArcs"),Mt=d((t,a,f,y)=>{R.debug(`rendering pie chart
30
- `+t);const s=y.db,p=rt(),o=it(s.getConfig(),p.pie),e=40,r=18,l=4,g=450,h=g,v=st(a),c=v.append("g");c.attr("transform","translate("+h/2+","+g/2+")");const{themeVariables:i}=p;let[x]=ot(i.pieOuterStrokeWidth);x??=2;const w=o.textPosition,m=Math.min(h,g)/2-e,D=I().innerRadius(0).outerRadius(m),$=I().innerRadius(m*w).outerRadius(m*w);c.append("circle").attr("cx",0).attr("cy",0).attr("r",m+x/2).attr("class","pieOuterCircle");const u=s.getSections(),A=Et(u),C=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;u.forEach(n=>{b+=n});const G=A.filter(n=>(n.data.value/b*100).toFixed(0)!=="0"),k=gt(C).domain([...u.keys()]);c.selectAll("mySlices").data(G).enter().append("path").attr("d",D).attr("fill",n=>k(n.data.label)).attr("class","pieCircle"),c.selectAll("mySlices").data(G).enter().append("text").text(n=>(n.data.value/b*100).toFixed(0)+"%").attr("transform",n=>"translate("+$.centroid(n)+")").style("text-anchor","middle").attr("class","slice");const V=c.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),N=[...u.entries()].map(([n,M])=>({label:n,value:M})),E=c.selectAll(".legend").data(N).enter().append("g").attr("class","legend").attr("transform",(n,M)=>{const P=r+l,q=P*N.length/2,H=12*r,J=M*P-q;return"translate("+H+","+J+")"});E.append("rect").attr("width",r).attr("height",r).style("fill",n=>k(n.label)).style("stroke",n=>k(n.label)),E.append("text").attr("x",r+l).attr("y",r-l).text(n=>s.getShowData()?`${n.label} [${n.value}]`:n.label);const U=Math.max(...E.selectAll("text").nodes().map(n=>n?.getBoundingClientRect().width??0)),j=h+e+r+l+U,L=V.node()?.getBoundingClientRect().width??0,X=h/2-L/2,Z=h/2+L/2,B=Math.min(0,X),O=Math.max(j,Z)-B;v.attr("viewBox",`${B} 0 ${O} ${g}`),lt(v,g,O,o.useMaxWidth)},"draw"),Ft={draw:Mt},Ot={parser:Tt,db:_,renderer:Ft,styles:kt};export{Ot as diagram};