@intent-hq/web 2.310.1 → 2.310.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/{DiagramPresentation.fimBl1wP.css → DiagramPresentation.Bfi3xHm0.css} +1 -1
  3. package/web/app/immutable/chunks/-xK_vQQs.js +1 -0
  4. package/web/app/immutable/chunks/{CQe4IdgR.js → 189zCzpy.js} +1 -1
  5. package/web/app/immutable/chunks/6XLvYn_R.js +4 -0
  6. package/web/app/immutable/chunks/{BIxkRFIj.js → 7LPFBi2V.js} +2 -2
  7. package/web/app/immutable/chunks/{D81gRUjY.js → 9Al7uANH.js} +1 -1
  8. package/web/app/immutable/chunks/{xMirTl3q.js → 9Ax53qRD.js} +2 -2
  9. package/web/app/immutable/chunks/{DQEBW0YT.js → 9U2m-KE4.js} +1 -1
  10. package/web/app/immutable/chunks/{t9id1Dgw.js → B08PB3d6.js} +1 -1
  11. package/web/app/immutable/chunks/B1wLVJWc.js +7 -0
  12. package/web/app/immutable/chunks/B1zCpBoo.js +217 -0
  13. package/web/app/immutable/chunks/{CsYRAdgB.js → B2-LFLJm.js} +1 -1
  14. package/web/app/immutable/chunks/{B4dTn6xv.js → B3NZDdp-.js} +1 -1
  15. package/web/app/immutable/chunks/{r1_PrlQL.js → B3u9yhMd.js} +1 -1
  16. package/web/app/immutable/chunks/{DzvQOT8_.js → B6ACa1PM.js} +1 -1
  17. package/web/app/immutable/chunks/{DXOCO_oS.js → B7VxeONz.js} +1 -1
  18. package/web/app/immutable/chunks/{CEdLQlJ6.js → BGOzArFr.js} +6 -6
  19. package/web/app/immutable/chunks/{Bfkn2BGM.js → BGSgFd0R.js} +1 -1
  20. package/web/app/immutable/chunks/{C7oH1dbI.js → BHMk19Fd.js} +1 -1
  21. package/web/app/immutable/chunks/{DUkegami.js → BRp0P9cF.js} +1 -1
  22. package/web/app/immutable/chunks/{BtHVXttl.js → BS3KKa6i.js} +5 -5
  23. package/web/app/immutable/chunks/{Bhcwd2SW.js → BSN7-Qxa.js} +4 -4
  24. package/web/app/immutable/chunks/{CnmCWFKQ.js → BU1SD4F5.js} +2 -2
  25. package/web/app/immutable/chunks/BUvLOETw.js +8 -0
  26. package/web/app/immutable/chunks/{CwH3s3Sg.js → B_CxKeY9.js} +1 -1
  27. package/web/app/immutable/chunks/{CsASRGy9.js → B_F8B07u.js} +5 -5
  28. package/web/app/immutable/chunks/{D-9LH0ah.js → B_u6ph9g.js} +1 -1
  29. package/web/app/immutable/chunks/{CHH2PtZ7.js → BbajLcMi.js} +1 -1
  30. package/web/app/immutable/chunks/{TQIai6Ne.js → BcGA_XKM.js} +79 -79
  31. package/web/app/immutable/chunks/Bdj20t_M.js +200 -0
  32. package/web/app/immutable/chunks/{Si43_nYW.js → BfVF2I5Q.js} +3 -3
  33. package/web/app/immutable/chunks/{B20hJMKp.js → BgjzIHmr.js} +2 -2
  34. package/web/app/immutable/chunks/BhFdeIZl.js +1 -0
  35. package/web/app/immutable/chunks/{CeEeQIAV.js → BjS3bCVA.js} +1 -1
  36. package/web/app/immutable/chunks/Bl1SUWQK.js +1 -0
  37. package/web/app/immutable/chunks/BtFywNMt.js +40 -0
  38. package/web/app/immutable/chunks/{B_D0NLtg.js → BwThkZnv.js} +1 -1
  39. package/web/app/immutable/chunks/ByGoYv9M.js +1 -0
  40. package/web/app/immutable/chunks/Bz2AaX7v.js +38 -0
  41. package/web/app/immutable/chunks/{j0ThtFJc.js → BzqKIdEP.js} +1 -1
  42. package/web/app/immutable/chunks/{BV9p4X5I.js → C-27EQSK.js} +6 -6
  43. package/web/app/immutable/chunks/C2FKcF8a.js +99 -0
  44. package/web/app/immutable/chunks/{D04E4MVv.js → C2ypXh8V.js} +4 -4
  45. package/web/app/immutable/chunks/{DaEQgqyy.js → C5bjHjx4.js} +1 -1
  46. package/web/app/immutable/chunks/{C-Mmob1s.js → C64YVcCh.js} +1 -1
  47. package/web/app/immutable/chunks/{BV7dztYI.js → C7-VQsLR.js} +1 -1
  48. package/web/app/immutable/chunks/C7ldC6zu.js +41 -0
  49. package/web/app/immutable/chunks/{CgAIOmc3.js → C7xfOFNZ.js} +4 -4
  50. package/web/app/immutable/chunks/{phowbgF-.js → CAt8c0ls.js} +1 -1
  51. package/web/app/immutable/chunks/CC-vc0Sh.js +2 -0
  52. package/web/app/immutable/chunks/{DjEB6QMF.js → CDmxeAFz.js} +1 -1
  53. package/web/app/immutable/chunks/{DevHtnbn.js → CLUug_7o.js} +1 -1
  54. package/web/app/immutable/chunks/{CPvhRhlk.js → CLyqqizl.js} +11 -11
  55. package/web/app/immutable/chunks/{DQulsXJ7.js → CO5Qz17e.js} +1 -1
  56. package/web/app/immutable/chunks/{B9r0JXjW.js → COBtdbv4.js} +1 -1
  57. package/web/app/immutable/chunks/COZ8XMYr.js +2 -0
  58. package/web/app/immutable/chunks/{qMHHnffV.js → CQK97B3l.js} +1 -1
  59. package/web/app/immutable/chunks/{CQf-fH5v.js → CYTBw0CY.js} +1 -1
  60. package/web/app/immutable/chunks/{CUvX4uDB.js → CZLMJ41d.js} +3 -3
  61. package/web/app/immutable/chunks/{Cuozo7M1.js → CZqaUHhn.js} +1 -1
  62. package/web/app/immutable/chunks/CeVWos-t.js +1 -0
  63. package/web/app/immutable/chunks/CepoDpYW.js +1 -0
  64. package/web/app/immutable/chunks/{DdAxykhC.js → CiBABzvX.js} +1 -1
  65. package/web/app/immutable/chunks/{D8SVxzqF.js → CjcP6chv.js} +1 -1
  66. package/web/app/immutable/chunks/{EZw3rvya.js → CkactGV1.js} +30 -30
  67. package/web/app/immutable/chunks/ClebXGIM.js +141 -0
  68. package/web/app/immutable/chunks/{BCm8Gasf.js → CnfDI0G9.js} +1 -1
  69. package/web/app/immutable/chunks/{BEhoKnQT.js → CoiqgZqV.js} +1 -1
  70. package/web/app/immutable/chunks/{DRMT9vvq.js → CpQksukT.js} +1 -1
  71. package/web/app/immutable/chunks/CrX2GQl1.js +1 -0
  72. package/web/app/immutable/chunks/{DCeW9_0X.js → CtDXgUYh.js} +2 -2
  73. package/web/app/immutable/chunks/CvEzUeZj.js +39 -0
  74. package/web/app/immutable/chunks/{CCIGQjYf.js → CxP8jrn2.js} +1 -1
  75. package/web/app/immutable/chunks/{D411lQkp.js → D2XAsGw-.js} +1 -1
  76. package/web/app/immutable/chunks/D3in5AGo.js +34 -0
  77. package/web/app/immutable/chunks/D3ma4MWK.js +84 -0
  78. package/web/app/immutable/chunks/{_F3xl3RI.js → D3p4HGPq.js} +1 -1
  79. package/web/app/immutable/chunks/D57k4GEE.js +344 -0
  80. package/web/app/immutable/chunks/{BUSwtV99.js → D5mZ2XGM.js} +1 -1
  81. package/web/app/immutable/chunks/{D_9AVJm5.js → DE1vhlzN.js} +1 -1
  82. package/web/app/immutable/chunks/{CWyh7Yhz.js → DI-WSiIl.js} +1 -1
  83. package/web/app/immutable/chunks/DMfS3QUv.js +213 -0
  84. package/web/app/immutable/chunks/DMmGJ3th.js +140 -0
  85. package/web/app/immutable/chunks/DPADHNob.js +3 -0
  86. package/web/app/immutable/chunks/DPcySxOl.js +24 -0
  87. package/web/app/immutable/chunks/{ejL3HmTG.js → DQNwUygY.js} +3 -3
  88. package/web/app/immutable/chunks/{BGLkcG6I.js → DR3ukAe9.js} +2 -2
  89. package/web/app/immutable/chunks/{BmDskjjc.js → DRKyy5zo.js} +1 -1
  90. package/web/app/immutable/chunks/DTpCNXVX.js +62 -0
  91. package/web/app/immutable/chunks/DW02E8JU.js +291 -0
  92. package/web/app/immutable/chunks/{BKY64haD.js → DbnaPZDp.js} +6 -6
  93. package/web/app/immutable/chunks/Dhhgf7-r.js +36 -0
  94. package/web/app/immutable/chunks/{C8CCN24q.js → DjaKy3j_.js} +1 -1
  95. package/web/app/immutable/chunks/{C0DDaBnV.js → Dk4znOdW.js} +1 -1
  96. package/web/app/immutable/chunks/{R7gFhaG_.js → Dl1xcl6N.js} +1 -1
  97. package/web/app/immutable/chunks/Dmv_LV6R.js +106 -0
  98. package/web/app/immutable/chunks/{BNg3GOxL.js → Dr28se2A.js} +2 -2
  99. package/web/app/immutable/chunks/Dr_BXnmT.js +169 -0
  100. package/web/app/immutable/chunks/{ByGsJxdn.js → Dvt2xumc.js} +1 -1
  101. package/web/app/immutable/chunks/DxHqMweQ.js +27 -0
  102. package/web/app/immutable/chunks/Dyv7eW7r.js +1 -0
  103. package/web/app/immutable/chunks/{CBHPIqXg.js → DzDnAGVP.js} +1 -1
  104. package/web/app/immutable/chunks/{C0Yks_oS.js → IIWxUL8F.js} +1 -1
  105. package/web/app/immutable/chunks/IjQ_akx8.js +24 -0
  106. package/web/app/immutable/chunks/{DeopB2f-.js → JFNcUgqI.js} +3 -3
  107. package/web/app/immutable/chunks/{dtB9lR1B.js → JvGvDA7z.js} +1 -1
  108. package/web/app/immutable/chunks/{BsP5G0Fo.js → LXPDKlyI.js} +1 -1
  109. package/web/app/immutable/chunks/{zXW6V5sa.js → M5rEGvXZ.js} +1 -1
  110. package/web/app/immutable/chunks/{DOVnLHFz.js → O55LMojB.js} +1 -1
  111. package/web/app/immutable/chunks/{t3bi-ExW.js → O86272iX.js} +2 -2
  112. package/web/app/immutable/chunks/{D-o9b0Cd.js → PW60rHG1.js} +2 -2
  113. package/web/app/immutable/chunks/{fULl8IO9.js → UzQ5fjmd.js} +7 -7
  114. package/web/app/immutable/chunks/VmPClZ6P.js +98 -0
  115. package/web/app/immutable/chunks/WKN7DEK1.js +292 -0
  116. package/web/app/immutable/chunks/{7KTbkf4W.js → YuniekLU.js} +2 -2
  117. package/web/app/immutable/chunks/{DxlwMmI8.js → _Q4NEhG2.js} +1 -1
  118. package/web/app/immutable/chunks/{DMGAuSgb.js → _sFm91KN.js} +4 -4
  119. package/web/app/immutable/chunks/{Drg52kVf.js → cF0DaKkd.js} +1 -1
  120. package/web/app/immutable/chunks/{DOHtPCK9.js → d9OF_ecy.js} +1 -1
  121. package/web/app/immutable/chunks/eHLf0w_s.js +1 -0
  122. package/web/app/immutable/chunks/ey5Fwige.js +1 -0
  123. package/web/app/immutable/chunks/gq2RHuUM.js +120 -0
  124. package/web/app/immutable/chunks/{BKGPkCRs.js → hJG5qV93.js} +1 -1
  125. package/web/app/immutable/chunks/jfltPaLX.js +370 -0
  126. package/web/app/immutable/chunks/{BBTS8ZOM.js → l0v05b1J.js} +3 -3
  127. package/web/app/immutable/chunks/{CnszEr0a.js → le8iLKoG.js} +1 -1
  128. package/web/app/immutable/chunks/{CoeuT-m3.js → mCGfnSaU.js} +1 -1
  129. package/web/app/immutable/chunks/{B0X6Qy4e.js → mNrkfPcL.js} +1 -1
  130. package/web/app/immutable/chunks/{DLm51UIm.js → tzNFwvLY.js} +1 -1
  131. package/web/app/immutable/chunks/{Coy9jSf1.js → xL2Hl8pt.js} +1 -1
  132. package/web/app/immutable/chunks/{qOCErwrn.js → yEkT96At.js} +1 -1
  133. package/web/app/immutable/chunks/{DhdMM_zt.js → yGxUPrAb.js} +14 -14
  134. package/web/app/immutable/entry/{app.DlF41taB.js → app.CWgSMPHo.js} +2 -2
  135. package/web/app/immutable/entry/start.DRM4Ek1S.js +1 -0
  136. package/web/app/immutable/nodes/{0.BLjNhnkb.js → 0.DsHcmAxw.js} +1 -1
  137. package/web/app/immutable/nodes/{1.DaghOy3j.js → 1.CkY-7ake.js} +1 -1
  138. package/web/app/immutable/nodes/{10.CbV_flkh.js → 10.CdTsXOpX.js} +1 -1
  139. package/web/app/immutable/nodes/{14.N_oC1pv5.js → 14.juvATfIp.js} +1 -1
  140. package/web/app/immutable/nodes/{16.Cn0uYbJe.js → 16.DuXLhJX1.js} +2 -2
  141. package/web/app/immutable/nodes/{2.CMERPJYK.js → 2.DL0H4Ehj.js} +8 -8
  142. package/web/app/immutable/nodes/{3.Dk5w9XeG.js → 3.CsarMzm8.js} +1 -1
  143. package/web/app/immutable/nodes/{4.CvLiKH0B.js → 4.DOKXGcKD.js} +1 -1
  144. package/web/app/immutable/nodes/{5.BL5oLCOi.js → 5.5nmYhZgy.js} +1 -1
  145. package/web/app/immutable/nodes/{6.DiKzgiKt.js → 6.BMO8vjvw.js} +1 -1
  146. package/web/app/immutable/nodes/{7.CM-hNW3A.js → 7.Rmoc-ypk.js} +1 -1
  147. package/web/app/immutable/nodes/{8.BThIGSQR.js → 8.Dy5AT1iw.js} +2 -2
  148. package/web/app/immutable/nodes/{9.D70tN3NX.js → 9.Dtv2dSUT.js} +18 -18
  149. package/web/app/version.json +1 -1
  150. package/web/index.html +9 -9
  151. package/web/app/immutable/chunks/-SL67XKV.js +0 -1
  152. package/web/app/immutable/chunks/351KaJp_.js +0 -24
  153. package/web/app/immutable/chunks/7Iuyw4Ow.js +0 -106
  154. package/web/app/immutable/chunks/9ySBq1wF.js +0 -36
  155. package/web/app/immutable/chunks/B2safKX4.js +0 -1
  156. package/web/app/immutable/chunks/B8QrskMI.js +0 -139
  157. package/web/app/immutable/chunks/BCO4VeSA.js +0 -1
  158. package/web/app/immutable/chunks/BCaDoF8Y.js +0 -1
  159. package/web/app/immutable/chunks/BEdJCn-8.js +0 -1
  160. package/web/app/immutable/chunks/BGBb6fI-.js +0 -120
  161. package/web/app/immutable/chunks/BGQ3htf5.js +0 -1
  162. package/web/app/immutable/chunks/BKLEAopb.js +0 -7
  163. package/web/app/immutable/chunks/BKSgn5w-.js +0 -1
  164. package/web/app/immutable/chunks/BOXqfDS_.js +0 -40
  165. package/web/app/immutable/chunks/BP_ooGOd.js +0 -24
  166. package/web/app/immutable/chunks/BQApP15C.js +0 -99
  167. package/web/app/immutable/chunks/BS6cE8e9.js +0 -231
  168. package/web/app/immutable/chunks/BTXk2yGf.js +0 -96
  169. package/web/app/immutable/chunks/BVrOGXf1.js +0 -78
  170. package/web/app/immutable/chunks/BZoKWA-r.js +0 -96
  171. package/web/app/immutable/chunks/BbiXTFqz.js +0 -1
  172. package/web/app/immutable/chunks/BgmKjqUX.js +0 -1
  173. package/web/app/immutable/chunks/Bk7xBWHf.js +0 -34
  174. package/web/app/immutable/chunks/BoiNnj2h.js +0 -1
  175. package/web/app/immutable/chunks/BrVvVCxw.js +0 -1
  176. package/web/app/immutable/chunks/ByM2DIOs.js +0 -1
  177. package/web/app/immutable/chunks/ByzYvvQp.js +0 -70
  178. package/web/app/immutable/chunks/Bz0SnIMO.js +0 -1
  179. package/web/app/immutable/chunks/C1IwSyrV.js +0 -99
  180. package/web/app/immutable/chunks/C9gL5x04.js +0 -39
  181. package/web/app/immutable/chunks/C9nyJoiB.js +0 -41
  182. package/web/app/immutable/chunks/CBV2Z_QZ.js +0 -89
  183. package/web/app/immutable/chunks/CDHds8o_.js +0 -3
  184. package/web/app/immutable/chunks/CHIHAnR-.js +0 -1
  185. package/web/app/immutable/chunks/CHj2oCmD.js +0 -39
  186. package/web/app/immutable/chunks/CIXNMjfT.js +0 -206
  187. package/web/app/immutable/chunks/CKFDW9cI.js +0 -24
  188. package/web/app/immutable/chunks/CKQlE_M1.js +0 -88
  189. package/web/app/immutable/chunks/CSBhPNbN.js +0 -206
  190. package/web/app/immutable/chunks/CSLTsum9.js +0 -38
  191. package/web/app/immutable/chunks/CSbiiZpm.js +0 -354
  192. package/web/app/immutable/chunks/CToDhNW4.js +0 -1
  193. package/web/app/immutable/chunks/CYFK9YEX.js +0 -168
  194. package/web/app/immutable/chunks/CcGF51wP.js +0 -1
  195. package/web/app/immutable/chunks/Cd5vVJw4.js +0 -292
  196. package/web/app/immutable/chunks/CgjSMAIJ.js +0 -120
  197. package/web/app/immutable/chunks/Ck7B90Kr.js +0 -38
  198. package/web/app/immutable/chunks/CkAILno9.js +0 -62
  199. package/web/app/immutable/chunks/CkawHIFZ.js +0 -1
  200. package/web/app/immutable/chunks/ClXr1b-t.js +0 -8
  201. package/web/app/immutable/chunks/CmWBRPmR.js +0 -24
  202. package/web/app/immutable/chunks/Cmo-9vFV.js +0 -1
  203. package/web/app/immutable/chunks/CoFCa7Mb.js +0 -231
  204. package/web/app/immutable/chunks/CrcLvVto.js +0 -84
  205. package/web/app/immutable/chunks/Cs_Q6mos.js +0 -1
  206. package/web/app/immutable/chunks/CsnLwu9F.js +0 -2
  207. package/web/app/immutable/chunks/CuYeKLE8.js +0 -8
  208. package/web/app/immutable/chunks/CvOaoHrI.js +0 -1
  209. package/web/app/immutable/chunks/CvYzv8kf.js +0 -1
  210. package/web/app/immutable/chunks/CxRm1vYn.js +0 -342
  211. package/web/app/immutable/chunks/CyfBUrNA.js +0 -1
  212. package/web/app/immutable/chunks/D1QKDDLH.js +0 -1
  213. package/web/app/immutable/chunks/D61DwhDw.js +0 -3
  214. package/web/app/immutable/chunks/DBAJPVI_.js +0 -1
  215. package/web/app/immutable/chunks/DBt8jmEX.js +0 -40
  216. package/web/app/immutable/chunks/DD-T_Om0.js +0 -178
  217. package/web/app/immutable/chunks/DEOiJZFa.js +0 -168
  218. package/web/app/immutable/chunks/DHW4IXFj.js +0 -36
  219. package/web/app/immutable/chunks/DJ0w8Oax.js +0 -129
  220. package/web/app/immutable/chunks/DJ52BT20.js +0 -1
  221. package/web/app/immutable/chunks/DK1048Bw.js +0 -129
  222. package/web/app/immutable/chunks/DZ0nrC9W.js +0 -162
  223. package/web/app/immutable/chunks/DeRneTJF.js +0 -106
  224. package/web/app/immutable/chunks/Df6EnPla.js +0 -4
  225. package/web/app/immutable/chunks/DfMKUxMU.js +0 -30
  226. package/web/app/immutable/chunks/DkH3yb1j.js +0 -34
  227. package/web/app/immutable/chunks/Doxgswr3.js +0 -4
  228. package/web/app/immutable/chunks/Dt53cexP.js +0 -1
  229. package/web/app/immutable/chunks/Dx6eBL0x.js +0 -1
  230. package/web/app/immutable/chunks/HP7Asd0t.js +0 -2
  231. package/web/app/immutable/chunks/HP8lGamR.js +0 -257
  232. package/web/app/immutable/chunks/HzpfURmp.js +0 -84
  233. package/web/app/immutable/chunks/PJfe_iA1.js +0 -1
  234. package/web/app/immutable/chunks/PXMyYXQv.js +0 -1
  235. package/web/app/immutable/chunks/Qi3HrsAm.js +0 -1
  236. package/web/app/immutable/chunks/S1FanOB0.js +0 -162
  237. package/web/app/immutable/chunks/SuMU9B9i.js +0 -1
  238. package/web/app/immutable/chunks/UaGv-ChR.js +0 -257
  239. package/web/app/immutable/chunks/YqyEOqRv.js +0 -178
  240. package/web/app/immutable/chunks/_MGNV7ZN.js +0 -338
  241. package/web/app/immutable/chunks/_lZu5Dth.js +0 -292
  242. package/web/app/immutable/chunks/gzjZWAx8.js +0 -62
  243. package/web/app/immutable/chunks/hqSEunOk.js +0 -15
  244. package/web/app/immutable/chunks/nGCCQCpO.js +0 -1
  245. package/web/app/immutable/chunks/o-kBqlaj.js +0 -7
  246. package/web/app/immutable/chunks/opO2fBQB.js +0 -1
  247. package/web/app/immutable/chunks/pdFamTTi.js +0 -7
  248. package/web/app/immutable/chunks/rEI8JpP3.js +0 -1
  249. package/web/app/immutable/chunks/s5P9UVzf.js +0 -1
  250. package/web/app/immutable/chunks/sIHUXgeh.js +0 -41
  251. package/web/app/immutable/entry/start.CCtO40vu.js +0 -1
@@ -1,96 +0,0 @@
1
- import{g as ge}from"./CToDhNW4.js";import{a as h,ad as R,R as ue,ax as pe,M as fe,y as H,N as U,aD as j,W as me,a8 as ye,aa as _e,w as Ee}from"./CSbiiZpm.js";import{s as ke}from"./Cs_Q6mos.js";import{g as m}from"./CxRm1vYn.js";var k=[];for(let t=0;t<256;++t)k.push((t+256).toString(16).slice(1));function se(t,e=0){return(k[t[e+0]]+k[t[e+1]]+k[t[e+2]]+k[t[e+3]]+"-"+k[t[e+4]]+k[t[e+5]]+"-"+k[t[e+6]]+k[t[e+7]]+"-"+k[t[e+8]]+k[t[e+9]]+"-"+k[t[e+10]]+k[t[e+11]]+k[t[e+12]]+k[t[e+13]]+k[t[e+14]]+k[t[e+15]]).toLowerCase()}m(se,"unsafeStringify");var Se=new Uint8Array(16);function re(){return crypto.getRandomValues(Se)}m(re,"rng");function ae(t,e,a){return!e&&!t&&crypto.randomUUID?crypto.randomUUID():oe(t,e,a)}m(ae,"v4");function oe(t,e,a){t=t||{};const l=t.random??t.rng?.()??re();if(l.length<16)throw new Error("Random bytes length must be >= 16");if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,e){if(a=a||0,a<0||a+16>e.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let n=0;n<16;++n)e[a+n]=l[n];return e}return se(l)}m(oe,"_v4");var be=ae,K=(function(){var t=h(function(v,s,i,o){for(i=i||{},o=v.length;o--;i[v[o]]=s);return i},"o"),e=[1,4],a=[1,13],l=[1,12],n=[1,15],d=[1,16],f=[1,20],_=[1,19],E=[6,7,8],S=[1,26],T=[1,24],A=[1,25],g=[6,7,11],$=[1,6,13,15,16,19,22],Q=[1,33],Z=[1,34],B=[1,6,7,11,13,15,16,19,22],W={trace:h(m(function(){},"trace"),"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(m(function(s,i,o,c,p,r,P){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"),"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:_},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:_},{6:a,9:22,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:_},{6:S,7:T,10:23,11:A},t(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:_}),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:S,7:T,10:32,11:A},{1:[2,7],6:a,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:_},t($,[2,14],{7:Q,11:Z}),t(B,[2,8]),t(B,[2,9]),t(B,[2,10]),t(g,[2,15]),t(g,[2,16]),t(g,[2,17]),{20:[1,35]},{21:[1,36]},t($,[2,13],{7:Q,11:Z}),t(B,[2,11]),t(B,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(m(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),"parseError"),parse:h(m(function(s){var i=this,o=[0],c=[],p=[null],r=[],P=this.table,u="",V=0,ee=0,le=2,te=1,he=r.slice.call(arguments,1),y=Object.create(this.lexer),O={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(O.yy[z]=this.yy[z]);y.setInput(s,O.yy),O.yy.lexer=y,O.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var X=y.yylloc;r.push(X);var de=y.options&&y.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ne(N){o.length=o.length-2*N,p.length=p.length-N,r.length=r.length-N}m(ne,"popStack"),h(ne,"popStack");function Y(){var N;return N=c.pop()||y.lex()||te,typeof N!="number"&&(N instanceof Array&&(c=N,N=c.pop()),N=i.symbols_[N]||N),N}m(Y,"lex"),h(Y,"lex");for(var b,I,x,q,w={},F,D,ie,G;;){if(I=o[o.length-1],this.defaultActions[I]?x=this.defaultActions[I]:((b===null||typeof b>"u")&&(b=Y()),x=P[I]&&P[I][b]),typeof x>"u"||!x.length||!x[0]){var J="";G=[];for(F in P[I])this.terminals_[F]&&F>le&&G.push("'"+this.terminals_[F]+"'");y.showPosition?J="Parse error on line "+(V+1)+`:
2
- `+y.showPosition()+`
3
- Expecting `+G.join(", ")+", got '"+(this.terminals_[b]||b)+"'":J="Parse error on line "+(V+1)+": Unexpected "+(b==te?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(J,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:X,expected:G})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+b);switch(x[0]){case 1:o.push(b),p.push(y.yytext),r.push(y.yylloc),o.push(x[1]),b=null,ee=y.yyleng,u=y.yytext,V=y.yylineno,X=y.yylloc;break;case 2:if(D=this.productions_[x[1]][1],w.$=p[p.length-D],w._$={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},de&&(w._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),q=this.performAction.apply(w,[u,ee,V,O.yy,x[1],p,r].concat(he)),typeof q<"u")return q;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(w.$),r.push(w._$),ie=P[o[o.length-2]][o[o.length-1]],o.push(ie);break;case 3:return!0}}return!0},"parse"),"parse")},ce=(function(){var v={EOF:1,parseError:h(m(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),"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(m(function(){var i=this.next();return i||this.lex()},"lex"),"lex"),begin:h(m(function(i){this.conditionStack.push(i)},"begin"),"begin"),popState:h(m(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:h(m(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"),"_currentRules"),topState:h(m(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),"topState"),pushState:h(m(function(i){this.begin(i)},"pushState"),"pushState"),stateStackSize:h(m(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:h(m(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"),"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 v})();W.lexer=ce;function M(){this.yy={}}return m(M,"Parser"),h(M,"Parser"),M.prototype=W,W.Parser=M,new M})();K.parser=K;var Ne=K,xe=12,L={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},C,De=(C=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=L,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){R.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=U();let _=f.mindmap?.padding??H.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:_*=2;break}const E={id:this.count++,nodeId:j(a,f),level:e,descr:j(l,f),type:n,children:[],width:f.mindmap?.maxNodeWidth??H.mindmap.maxNodeWidth,padding:_,isRoot:d},S=this.getParent(e);if(S)S.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(R.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=U(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=j(e.icon,a)),e.class&&(l.class=j(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%(xe-1):a;this.assignSections(n,d)}}flattenNodes(e,a){const l=U(),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 T=(l.theme?.toLowerCase()??"").includes("redux");switch(E){case L.CIRCLE:return"mindmapCircle";case L.RECT:return"rect";case L.ROUNDED_RECT:return"rounded";case L.CLOUD:return"cloud";case L.BANG:return"bang";case L.HEXAGON:return"hexagon";case L.DEFAULT:return T?"rounded":"defaultMindmapNode";case L.NO_BORDER:default:return"rect"}},"getShapeFromType"),_={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(_),e.children)for(const E of e.children)this.flattenNodes(E,a)}generateEdges(e,a){if(!e.children)return;const l=U();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 _={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(_),this.generateEdges(n,a)}}getData(){const e=this.getMindmap(),a=U(),n=me().layout!==void 0,d=a;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};R.debug("getData: mindmapRoot",e,a),this.assignSections(e);const f=[],_=[];this.flattenNodes(e,f),this.generateEdges(e,_),R.debug(`getData: processed ${f.length} nodes and ${_.length} edges`);const E=new Map;for(const S of f)E.set(S.id,{shape:S.shape,width:S.width,height:S.height,padding:S.padding});return{nodes:f,edges:_,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+be()}}getLogger(){return R}},m(C,"MindmapDB"),h(C,"MindmapDB"),C),Le=h(async(t,e,a,l)=>{R.debug(`Rendering mindmap diagram
7
- `+t);const n=l.db,d=n.getData(),f=ge(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=ue(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 pe(d,f);const{themeVariables:E}=fe(),{useGradient:S,gradientStart:T,gradientStop:A}=E;if(S&&T&&A){const g=f.attr("id"),$=f.append("defs").append("linearGradient").attr("id",`${g}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");$.append("stop").attr("offset","0%").attr("stop-color",T).attr("stop-opacity",1),$.append("stop").attr("offset","100%").attr("stop-color",A).attr("stop-opacity",1)}ke(f,d.config.mindmap?.padding??H.mindmap.padding,"mindmapDiagram",d.config.mindmap?.useMaxWidth??H.mindmap.useMaxWidth)},"draw"),ve={draw:Le},Te=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],ye(t["lineColor"+n])?t["lineColor"+n]=_e(t["lineColor"+n],20):t["lineColor"+n]=Ee(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"),Oe=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"),Ie=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
- ${Te(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?Oe(t.THEME_COLOR_LIMIT,a,t.mainBkg):""}
96
- `},"getStyles"),Ce=Ie,Be={get db(){return new De},renderer:ve,parser:Ne,styles:Ce};export{Be as diagram};
@@ -1,78 +0,0 @@
1
- import{p as Nt}from"./CkawHIFZ.js";import{p as Lt}from"./DD-T_Om0.js";import{aF as zt,K as At,O as Tt,aI as Xt,L as Et,aG as Yt,a as u,U as It,M as Bt,j as gt,ad as ut,aE as Ft,r as Ot,k as Rt,N as V}from"./CSbiiZpm.js";import{g as k}from"./CxRm1vYn.js";var q=u((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),X=u((o,r,e)=>({x:q(r,`${e} evolution`),y:q(o,`${e} visibility`)}),"toCoordinates"),yt=u(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),Wt=u(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Dt=u((o,r)=>{if(Nt(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),h=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(o.anchors.forEach(e=>{const h=X(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),o.components.forEach(e=>{const h=X(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,w=e.decorator?.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",a,d,e.inertia,w)}),o.notes.forEach(e=>{const h=X(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),o.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const w=`${e.parent}_${d.name}`,S=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,R=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(w,d.name,R,a,"pipeline-component",S,g),r.addPipelineComponent(e.parent,w)})}),o.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=yt(e.fromPort)??yt(e.toPort);const{flow:d,label:w}=Wt(e.arrow);!a&&d&&(a=d);const S=e.linkLabel,g=w??S;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),h,g,a)}),o.evolves.forEach(e=>{const h=r.getNode(e.component);if(h?.y!==void 0){const a=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,h.y)}}),o.annotations.length>0){const e=o.annotations[0],h=X(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}o.annotation.forEach(e=>{const h=X(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),o.accelerators.forEach(e=>{const h=X(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),o.deaccelerators.forEach(e=>{const h=X(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),wt={parser:{yy:void 0},parse:u(async o=>{const r=await Lt("wardley",o);ut.debug(r);const e=wt.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Dt(r,e)},"parse")},E,Gt=(E=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,h]of this.nodes)if(h.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k(E,"WardleyBuilder"),u(E,"WardleyBuilder"),E),b=new Gt;function U(){return V()["wardley-beta"]}k(U,"getConfig3");u(U,"getConfig");function Z(o,r,e,h,a,d,w,S,g){b.addNode({id:o,label:r,x:e,y:h,className:a,labelOffsetX:d,labelOffsetY:w,inertia:S,sourceStrategy:g})}k(Z,"addNode");u(Z,"addNode");function K(o,r,e=!1,h,a){b.addLink({source:o,target:r,dashed:e,label:h,flow:a})}k(K,"addLink");u(K,"addLink");function J(o,r,e){b.addTrend({nodeId:o,targetX:r,targetY:e})}k(J,"addTrend");u(J,"addTrend");function Q(o,r,e){b.addAnnotation({number:o,coordinates:r,text:e})}k(Q,"addAnnotation");u(Q,"addAnnotation");function tt(o,r,e){b.addNote({text:o,x:r,y:e})}k(tt,"addNote");u(tt,"addNote");function et(o,r,e){b.addAccelerator({name:o,x:r,y:e})}k(et,"addAccelerator");u(et,"addAccelerator");function at(o,r,e){b.addDeaccelerator({name:o,x:r,y:e})}k(at,"addDeaccelerator");u(at,"addDeaccelerator");function rt(o,r){b.setAnnotationsBox(o,r)}k(rt,"setAnnotationsBox");u(rt,"setAnnotationsBox");function ot(o,r){b.setSize(o,r)}k(ot,"setSize");u(ot,"setSize");function nt(o){b.startPipeline(o)}k(nt,"startPipeline");u(nt,"startPipeline");function st(o,r){b.addPipelineComponent(o,r)}k(st,"addPipelineComponent");u(st,"addPipelineComponent");function it(o){b.setAxes(o)}k(it,"updateAxes");u(it,"updateAxes");function dt(o){return b.getNode(o)}k(dt,"getNode");u(dt,"getNode");function lt(o){return b.resolveNodeId(o)}k(lt,"resolveNodeId");u(lt,"resolveNodeId");function ct(){return b.build()}k(ct,"getWardleyData");u(ct,"getWardleyData");function pt(){b.clear(),Rt()}k(pt,"clear2");u(pt,"clear");var qt={getConfig:U,addNode:Z,addLink:K,addTrend:J,addAnnotation:Q,addNote:tt,addAccelerator:et,addDeaccelerator:at,setAnnotationsBox:rt,setSize:ot,startPipeline:nt,addPipelineComponent:st,updateAxes:it,getNode:dt,resolveNodeId:lt,getWardleyData:ct,clear:pt,setAccTitle:Yt,getAccTitle:Et,setDiagramTitle:Xt,getDiagramTitle:Tt,getAccDescription:At,setAccDescription:zt},Ht=["Genesis","Custom Built","Product","Commodity"],jt=u(()=>{const{themeVariables:o}=V();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),_t=u(()=>{const o=V()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),Vt=u((o,r,e,h)=>{ut.debug(`Rendering Wardley map
2
- `+o);const a=_t(),d=jt(),w=a.nodeRadius*1.6,S=h.db,g=S.getWardleyData(),R=S.getDiagramTitle(),M=g.size?.width??a.width,$=g.size?.height??a.height,I=Ft(r);I.selectAll("*").remove(),Ot(I,$,M,a.useMaxWidth),I.attr("viewBox",`0 0 ${M} ${$}`);const P=I.append("g").attr("class","wardley-map"),H=I.append("defs");H.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),P.append("rect").attr("class","wardley-background").attr("width",M).attr("height",$).attr("fill",d.backgroundColor);const B=M-a.padding*2,F=$-a.padding*2;R&&P.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(R);const z=u(t=>a.padding+t/100*B,"projectX"),A=u(t=>$-a.padding-t/100*F,"projectY"),W=P.append("g").attr("class","wardley-axes");W.append("line").attr("x1",a.padding).attr("x2",M-a.padding).attr("y1",$-a.padding).attr("y2",$-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),W.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",$-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const mt=g.axes.xLabel??"Evolution",kt=g.axes.yLabel??"Visibility";W.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+B/2).attr("y",$-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(mt),W.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+F/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+F/2})`).text(kt);const O=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Ht;if(O.length>0){const t=P.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,n=[];if(s&&s.length===O.length){let i=0;s.forEach(p=>{n.push({start:i,end:p}),i=p})}else{const i=1/O.length;O.forEach((p,l)=>{n.push({start:l*i,end:(l+1)*i})})}O.forEach((i,p)=>{const l=n[p],f=a.padding+l.start*B,x=a.padding+l.end*B,y=(f+x)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",$-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",$-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=P.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const n=s/4,i=a.padding+B*n;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",$-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",M-a.padding).attr("y1",$-a.padding-F*n).attr("y2",$-a.padding-F*n).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:A(t.y),node:t})}),g.pipelines.length>0){const t=P.append("g").attr("class","wardley-pipelines"),s=P.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(n=>{if(n.componentIds.length===0)return;const i=n.componentIds.map(x=>({id:x,pos:c.get(x),node:g.nodes.find(y=>y.id===x)})).filter(x=>x.pos&&x.node).sort((x,y)=>x.node.x-y.node.x);for(let x=0;x<i.length-1;x++){const y=i[x],m=i[x+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(n.componentIds.forEach(x=>{const y=c.get(x);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,C=c.get(n.nodeId);if(C){const L=(p+l)/2;C.x=L,C.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const ft=P.append("g").attr("class","wardley-links"),ht=new Map;g.pipelines.forEach(t=>{ht.set(t.nodeId,new Set(t.componentIds))});const xt=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||ht.get(t.target)?.has(t.source)));ft.selectAll("line").data(xt).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.x+l/x*p}).attr("y1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.y+f/x*p}).attr("x2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.x+l/x*p}).attr("y2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.y+f/x*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),ft.selectAll("text").data(xt.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=n.y-s.y,l=n.x-s.x,f=Math.sqrt(l*l+p*p),x=8,y=p/f;return i+y*x}).attr("y",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.y+n.y)/2,p=n.x-s.x,l=n.y-s.y,f=Math.sqrt(p*p+l*l),x=8,y=-p/f;return i+y*x}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=(s.y+n.y)/2,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f),y=8,m=f/x,C=-l/x,L=i+m*y,D=p+C*y;let Y=Math.atan2(f,l)*180/Math.PI;return(Y>90||Y<-90)&&(Y+=180),`rotate(${Y} ${L} ${D})`}).text(t=>t.label);const bt=P.append("g").attr("class","wardley-trends"),$t=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const n=z(t.targetX),i=A(t.targetY),p=n-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),x=a.nodeRadius+2,y=f>x?n-p/f*x:n,m=f>x?i-l/f*x:i;return{origin:s,targetX:n,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);bt.selectAll("line").data($t).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const N=P.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));N.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),N.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),N.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=N.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),N.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const j=a.nodeRadius*.7,v=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-v).attr("x2",t=>c.get(t.id).x-v*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-v*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+v*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+v*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-v).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-v).attr("r",j).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-v*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("r",j).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+v*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("r",j).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),N.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),N.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y1",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y-n/2}).attr("x2",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y2",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y+n/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),N.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let n=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(n+=10);const i=t.labelOffsetX??n;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let n=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(n-=10);const i=t.labelOffsetY??n;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=P.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const n=s.coordinates.map(i=>({x:z(i.x),y:A(i.y)}));if(n.length>1)for(let i=0;i<n.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",n[i].x).attr("y1",n[i].y).attr("x2",n[i+1].x).attr("y2",n[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),n=A(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),x=[...g.annotations].filter(m=>m.text).sort((m,C)=>m.number-C.number),y=[];if(x.forEach((m,C)=>{const L=f.append("text").attr("x",s+i).attr("y",n+i+(C+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(L)}),y.length>0){let m=0,C=0;y.forEach(_=>{const G=_.node(),St=G.getComputedTextLength();m=Math.max(m,St);const Mt=G.getBBox();C=Math.max(C,Mt.height)});const L=m+i*2+105,D=x.length*p+i*2+C/2,Y=a.padding,vt=M-a.padding-L,Pt=a.padding,Ct=$-a.padding-D;s=Math.max(Y,Math.min(s,vt)),n=Math.max(Pt,Math.min(n,Ct)),y.forEach((_,G)=>{_.attr("x",s+i).attr("y",n+i+(G+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",n).attr("width",L).attr("height",D).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=P.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const n=z(s.x),i=A(s.y);t.append("text").attr("x",n).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=P.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const n=z(s.x),i=A(s.y),p=60,l=30,f=20,x=`
3
- M ${n} ${i-l/2}
4
- L ${n+p-f} ${i-l/2}
5
- L ${n+p-f} ${i-l/2-8}
6
- L ${n+p} ${i}
7
- L ${n+p-f} ${i+l/2+8}
8
- L ${n+p-f} ${i+l/2}
9
- L ${n} ${i+l/2}
10
- Z
11
- `;t.append("path").attr("d",x).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",n+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.name)})}if(g.deaccelerators.length>0){const t=P.append("g").attr("class","wardley-deaccelerators");g.deaccelerators.forEach(s=>{const n=z(s.x),i=A(s.y),p=60,l=30,f=20,x=`
12
- M ${n+p} ${i-l/2}
13
- L ${n+f} ${i-l/2}
14
- L ${n+f} ${i-l/2-8}
15
- L ${n} ${i}
16
- L ${n+f} ${i+l/2+8}
17
- L ${n+f} ${i+l/2}
18
- L ${n+p} ${i+l/2}
19
- Z
20
- `;t.append("path").attr("d",x).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",n+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.name)})}},"draw"),Ut={draw:Vt},Zt=u(({wardley:o}={})=>{const r=It(),e=Bt(),h=gt(r,e.themeVariables),a=gt(h.wardley,o);return`
21
- .wardley-background {
22
- fill: ${a.backgroundColor};
23
- }
24
- .wardley-axes line, .wardley-axes path {
25
- stroke: ${a.axisColor};
26
- }
27
- .wardley-axis-label {
28
- fill: ${a.axisTextColor};
29
- }
30
- .wardley-stage-label {
31
- fill: ${a.axisTextColor};
32
- }
33
- .wardley-grid line {
34
- stroke: ${a.gridColor};
35
- }
36
- .wardley-node circle {
37
- fill: ${a.componentFill};
38
- stroke: ${a.componentStroke};
39
- }
40
- .wardley-node-label {
41
- fill: ${a.componentLabelColor};
42
- }
43
- .wardley-link {
44
- stroke: ${a.linkStroke};
45
- }
46
- .wardley-link--dashed {
47
- stroke-dasharray: 4 4;
48
- }
49
- .wardley-link-label {
50
- fill: ${a.axisTextColor};
51
- }
52
- .wardley-trend line {
53
- stroke: ${a.evolutionStroke};
54
- }
55
- .wardley-annotation-line {
56
- stroke: ${a.annotationStroke};
57
- }
58
- .wardley-annotation circle {
59
- fill: ${a.annotationFill};
60
- stroke: ${a.annotationStroke};
61
- }
62
- .wardley-annotation text {
63
- fill: ${a.annotationTextColor};
64
- }
65
- .wardley-annotations-box rect {
66
- fill: ${a.annotationFill};
67
- stroke: ${a.annotationStroke};
68
- }
69
- .wardley-annotations-box text {
70
- fill: ${a.annotationTextColor};
71
- }
72
- .wardley-pipeline-box {
73
- stroke: ${a.componentStroke};
74
- }
75
- .wardley-notes text {
76
- fill: ${a.axisTextColor};
77
- }
78
- `},"styles"),ae={parser:wt,db:qt,renderer:Ut,styles:Zt};export{ae as diagram};
@@ -1,96 +0,0 @@
1
- import{g as ae}from"./j0ThtFJc.js";import{s as oe}from"./nGCCQCpO.js";import{f as l,bC as C,aS as ce,bZ as le,aN as he,ax as G,aO as B,c2 as F,aZ as de,bk as ge,by as ue,as as pe}from"./CxRm1vYn.js";import{cS as fe}from"./TQIai6Ne.js";var Y=(function(){var i=l(function(D,s,n,a){for(n=n||{},a=D.length;a--;n[D[a]]=s);return n},"o"),e=[1,4],o=[1,13],g=[1,12],t=[1,15],h=[1,16],f=[1,20],y=[1,19],E=[6,7,8],_=[1,26],L=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],Z=[1,33],q=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(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:l(function(s,n,a,c,p,r,$){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:o,7:[1,10],9:9,12:11,13:g,14:14,15:t,16:h,17:17,18:18,19:f,22:y},i(E,[2,3]),{1:[2,2]},i(E,[2,4]),i(E,[2,5]),{1:[2,6],6:o,12:21,13:g,14:14,15:t,16:h,17:17,18:18,19:f,22:y},{6:o,9:22,12:11,13:g,14:14,15:t,16:h,17:17,18:18,19:f,22:y},{6:_,7:L,10:23,11:w},i(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:y}),i(d,[2,18]),i(d,[2,19]),i(d,[2,20]),i(d,[2,21]),i(d,[2,23]),i(d,[2,24]),i(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:_,7:L,10:32,11:w},{1:[2,7],6:o,12:21,13:g,14:14,15:t,16:h,17:17,18:18,19:f,22:y},i(R,[2,14],{7:Z,11:q}),i(A,[2,8]),i(A,[2,9]),i(A,[2,10]),i(d,[2,15]),i(d,[2,16]),i(d,[2,17]),{20:[1,35]},{21:[1,36]},i(R,[2,13],{7:Z,11:q}),i(A,[2,11]),i(A,[2,12]),{21:[1,37]},i(d,[2,25]),i(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:l(function(s){var n=this,a=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,J=0,ie=2,K=1,ne=r.slice.call(arguments,1),m=Object.create(this.lexer),v={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(v.yy[H]=this.yy[H]);m.setInput(s,v.yy),v.yy.lexer=m,v.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var W=m.yylloc;r.push(W);var se=m.options&&m.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(b){a.length=a.length-2*b,p.length=p.length-b,r.length=r.length-b}l(re,"popStack");function Q(){var b;return b=c.pop()||m.lex()||K,typeof b!="number"&&(b instanceof Array&&(c=b,b=c.pop()),b=n.symbols_[b]||b),b}l(Q,"lex");for(var k,T,S,z,O={},U,N,ee,V;;){if(T=a[a.length-1],this.defaultActions[T]?S=this.defaultActions[T]:((k===null||typeof k>"u")&&(k=Q()),S=$[T]&&$[T][k]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[T])this.terminals_[U]&&U>ie&&V.push("'"+this.terminals_[U]+"'");m.showPosition?X="Parse error on line "+(M+1)+`:
2
- `+m.showPosition()+`
3
- Expecting `+V.join(", ")+", got '"+(this.terminals_[k]||k)+"'":X="Parse error on line "+(M+1)+": Unexpected "+(k==K?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(X,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:W,expected:V})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(S[0]){case 1:a.push(k),p.push(m.yytext),r.push(m.yylloc),a.push(S[1]),k=null,J=m.yyleng,u=m.yytext,M=m.yylineno,W=m.yylloc;break;case 2:if(N=this.productions_[S[1]][1],O.$=p[p.length-N],O._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},se&&(O._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),z=this.performAction.apply(O,[u,J,M,v.yy,S[1],p,r].concat(ne)),typeof z<"u")return z;N&&(a=a.slice(0,-1*N*2),p=p.slice(0,-1*N),r=r.slice(0,-1*N)),a.push(this.productions_[S[1]][0]),p.push(O.$),r.push(O._$),ee=$[a[a.length-2]][a[a.length-1]],a.push(ee);break;case 3:return!0}}return!0},"parse")},te=(function(){var D={EOF:1,parseError:l(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:l(function(s,n){return this.yy=n||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:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(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:l(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),a.length-1&&(this.yylineno-=a.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:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(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:l(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:l(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
- `+n+"^"},"showPosition"),test_match:l(function(s,n){var a,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],a=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var r in p)this[r]=p[r];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,a,c;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),r=0;r<p.length;r++)if(a=this._input.match(this.rules[p[r]]),a&&(!n||a[0].length>n[0].length)){if(n=a,c=r,this.options.backtrack_lexer){if(s=this.test_match(a,p[r]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,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:l(function(){var n=this.next();return n||this.lex()},"lex"),begin:l(function(n){this.conditionStack.push(n)},"begin"),popState:l(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:l(function(n){this.begin(n)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(n,a,c,p){switch(c){case 0:return n.getLogger().trace("Found comment",a.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:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return n.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:n.getLogger().trace("end icon"),this.popState();break;case 10:return n.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return n.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return n.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:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return n.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),n.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 30:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 35:return n.getLogger().trace("Long description:",a.yytext),20;case 36:return n.getLogger().trace("Long description:",a.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 D})();j.lexer=te;function P(){this.yy={}}return l(P,"Parser"),P.prototype=j,j.Parser=P,new P})();Y.parser=Y;var me=Y,ye=12,x={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I,Ee=(I=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=x,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 o=this.nodes.length-1;o>=0;o--)if(this.nodes[o].level<e)return this.nodes[o];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,o,g,t){C.info("addNode",e,o,g,t);let h=!1;this.nodes.length===0?(this.baseLevel=e,e=0,h=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,h=!1);const f=B();let y=f.mindmap?.padding??G.mindmap.padding;switch(t){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const E={id:this.count++,nodeId:F(o,f),level:e,descr:F(g,f),type:t,children:[],width:f.mindmap?.maxNodeWidth??G.mindmap.maxNodeWidth,padding:y,isRoot:h},_=this.getParent(e);if(_)_.children.push(E),this.nodes.push(E);else if(h)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,o){switch(C.debug("In get type",e,o),e){case"[":return this.nodeType.RECT;case"(":return o===")"?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,o){this.elements[e]=o}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const o=B(),g=this.nodes[this.nodes.length-1];e.icon&&(g.icon=F(e.icon,o)),e.class&&(g.class=F(e.class,o))}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,o){if(e.level===0?e.section=void 0:e.section=o,e.children)for(const[g,t]of e.children.entries()){const h=e.level===0?g%(ye-1):o;this.assignSections(t,h)}}flattenNodes(e,o){const g=B(),t=["mindmap-node"];e.isRoot===!0?t.push("section-root","section--1"):e.section!==void 0&&t.push(`section-${e.section}`),e.class&&t.push(e.class);const h=t.join(" "),f=l(E=>{const L=(g.theme?.toLowerCase()??"").includes("redux");switch(E){case x.CIRCLE:return"mindmapCircle";case x.RECT:return"rect";case x.ROUNDED_RECT:return"rounded";case x.CLOUD:return"cloud";case x.BANG:return"bang";case x.HEXAGON:return"hexagon";case x.DEFAULT:return L?"rounded":"defaultMindmapNode";case x.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:h,cssStyles:[],look:g.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(o.push(y),e.children)for(const E of e.children)this.flattenNodes(E,o)}generateEdges(e,o){if(!e.children)return;const g=B();for(const t of e.children){let h="edge";t.section!==void 0&&(h+=` section-edge-${t.section}`);const f=e.level+1;h+=` edge-depth-${f}`;const y={id:`edge_${e.id}_${t.id}`,start:e.id.toString(),end:t.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:g.look,classes:h,depth:e.level,section:t.section};o.push(y),this.generateEdges(t,o)}}getData(){const e=this.getMindmap(),o=B(),t=de().layout!==void 0,h=o;if(t||(h.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:h};C.debug("getData: mindmapRoot",e,o),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 _ of f)E.set(_.id,{shape:_.shape,width:_.width,height:_.height,padding:_.padding});return{nodes:f,edges:y,config:h,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+fe()}}getLogger(){return C}},l(I,"MindmapDB"),I),_e=l(async(i,e,o,g)=>{C.debug(`Rendering mindmap diagram
7
- `+i);const t=g.db,h=t.getData(),f=ae(e,h.config.securityLevel);if(h.type=g.type,h.layoutAlgorithm=ce(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e,!t.getMindmap())return;h.nodes.forEach(d=>{d.shape==="rounded"?(d.radius=15,d.taper=15,d.stroke="none",d.width=0,d.padding=15):d.shape==="circle"?d.padding=10:d.shape==="rect"?(d.width=0,d.padding=10):d.shape==="hexagon"&&(d.width=0,d.height=0)}),await le(h,f);const{themeVariables:E}=he(),{useGradient:_,gradientStart:L,gradientStop:w}=E;if(_&&L&&w){const d=f.attr("id"),R=f.append("defs").append("linearGradient").attr("id",`${d}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");R.append("stop").attr("offset","0%").attr("stop-color",L).attr("stop-opacity",1),R.append("stop").attr("offset","100%").attr("stop-color",w).attr("stop-opacity",1)}oe(f,h.config.mindmap?.padding??G.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??G.mindmap.useMaxWidth)},"draw"),ke={draw:_e},be=l(i=>{const{theme:e,look:o}=i;let g="";for(let t=0;t<i.THEME_COLOR_LIMIT;t++)i["lineColor"+t]=i["lineColor"+t]||i["cScaleInv"+t],ge(i["lineColor"+t])?i["lineColor"+t]=ue(i["lineColor"+t],20):i["lineColor"+t]=pe(i["lineColor"+t],20);for(let t=0;t<i.THEME_COLOR_LIMIT;t++){const h=""+(o==="neo"?Math.max(10-(t-1)*2,2):17-3*t);g+=`
8
- .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {
9
- fill: ${i["cScale"+t]};
10
- }
11
- .section-${t-1} text {
12
- fill: ${i["cScaleLabel"+t]};
13
- }
14
- .section-${t-1} span {
15
- color: ${i["cScaleLabel"+t]};
16
- }
17
- .node-icon-${t-1} {
18
- font-size: 40px;
19
- color: ${i["cScaleLabel"+t]};
20
- }
21
- .section-edge-${t-1}{
22
- stroke: ${i["cScale"+t]};
23
- }
24
- .edge-depth-${t-1}{
25
- stroke-width: ${h};
26
- }
27
- .section-${t-1} line {
28
- stroke: ${i["cScaleInv"+t]} ;
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-${t-1} rect, [data-look="neo"].mindmap-node.section-${t-1} path, [data-look="neo"].mindmap-node.section-${t-1} circle, [data-look="neo"].mindmap-node.section-${t-1} polygon {
39
- fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?i.mainBkg:i["cScale"+t]};
40
- stroke: ${e==="redux"||e==="redux-dark"?i.nodeBorder:i["cScale"+t]};
41
- stroke-width: ${i.strokeWidth??2}px;
42
- }
43
- [data-look="neo"].section-edge-${t-1}{
44
- stroke: ${e?.includes("redux")||e==="neo-dark"?i.nodeBorder:i["cScale"+t]};
45
- }
46
- [data-look="neo"].mindmap-node.section-${t-1} text {
47
- fill: ${e==="redux"||e==="redux-dark"?i.nodeBorder:i["cScaleLabel"+(e==="neutral"?1:t)]};
48
- }
49
- `}return g},"genSections"),Se=l((i,e,o)=>{let g="";for(let t=0;t<i;t++)g+=`
50
- [data-look="neo"].mindmap-node.section-${t-1} rect, [data-look="neo"].mindmap-node.section-${t-1} path, [data-look="neo"].mindmap-node.section-${t-1} circle, [data-look="neo"].mindmap-node.section-${t-1} polygon {
51
- stroke: url(${e}-gradient);
52
- fill: ${o};
53
- }
54
- .section-${t-1} line {
55
- stroke-width: 0;
56
- }`;return g},"genGradient"),Ne=l(i=>{const{theme:e}=i,o=i.svgId,g=i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none";return`
57
- .edge {
58
- stroke-width: 3;
59
- }
60
- ${be(i)}
61
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
62
- fill: ${i.git0};
63
- }
64
- .section-root text {
65
- fill: ${i.gitBranchLabel0};
66
- }
67
- .section-root span {
68
- color: ${e?.includes("redux")?i.nodeBorder:i.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: ${g};
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")?i.mainBkg:i.git0};
91
- }
92
- [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
93
- fill: ${e?.includes("redux")?i.nodeBorder:i["cScaleLabel"+(e==="neutral"?1:0)]};
94
- }
95
- ${i.useGradient&&o&&i.mainBkg?Se(i.THEME_COLOR_LIMIT,o,i.mainBkg):""}
96
- `},"getStyles"),xe=Ne,Oe={get db(){return new Ee},renderer:ke,parser:me,styles:xe};export{Oe as diagram};
@@ -1 +0,0 @@
1
- import{b as R,s as W,S as N}from"./CoFCa7Mb.js";import{f,aO as t,c3 as H,bC as S,a6 as P,G as C,a4 as z,bz as U,ae as _,aY as F,cx as O}from"./CxRm1vYn.js";import{l as J}from"./BoiNnj2h.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),Y=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),D=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,b,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(b);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const B=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return B.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const b=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-b.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",b.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",b.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const B of a){const x=B.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&Y(n),i.type==="default"&&i.descriptions.length===0&&D(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(_),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=F(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:B,y:x}=O.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const b=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",B).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,B,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),b.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;b.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",B-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),m,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){m=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const B=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(B,x,void 0,!1,p,a,c);const g=m.padding,o=s.node().getBBox(),b=o.width+g*2,y=o.height+g*2,v=b*1.75;P(s,y,v,m.useMaxWidth),s.attr("viewBox",`${o.x-m.padding} ${o.y-m.padding} `+b+" "+y)},"draw"),at=f(e=>e?e.length*m.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new C({compound:!0,multigraph:!0});let s,B=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){B=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:B?1:m.edgeLengthFactor,nodeSep:B?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:B?1:m.edgeLengthFactor,nodeSep:B?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+m.padding/2,T[u.id]={y:m.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let b=0;g.forEach(function(r){b++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:m.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+b)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*m.padding,k.height=v.height+2*m.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},dt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{dt as diagram};
@@ -1 +0,0 @@
1
- import{b as t,a,s as r,S as s}from"./BS6cE8e9.js";import{a as i}from"./CSbiiZpm.js";import"./CxRm1vYn.js";import"./BEdJCn-8.js";var u={parser:r,get db(){return new s(2)},renderer:a,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{u as diagram};
@@ -1,34 +0,0 @@
1
- import{aF as ue,K as fe,O as he,aI as de,L as ge,aG as ye,a as _,M as Kt,aE as xe,d as pe,a8 as me,aR as Gt,aa as be,w as ve,r as Se,k as Ie,j as Me,y as ke}from"./CSbiiZpm.js";import{c3 as yt,g as v}from"./CxRm1vYn.js";var qt=1e-10;function it(t,n){const s=Wt(t),e=s.filter(l=>Ut(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=vt(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const x={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],k=Math.atan2(a.x-p.x,a.y-p.y),z=Math.atan2(f.x-p.x,f.y-p.y);let T=z-k;T<0&&(T+=2*Math.PI);const w=z-T/2;let g=K(x,{x:p.x+p.radius*Math.sin(w),y:p.y+p.radius*Math.cos(w)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=at(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(K(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-qt,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}v(it,"intersectionArea");function Ut(t,n){return n.every(s=>K(t,s)<s.radius+qt)}v(Ut,"containedInCircles");function Wt(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=bt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}v(Wt,"getIntersectionPoints");function at(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}v(at,"circleArea");function K(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}v(K,"distance");function dt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return at(t,e)+at(n,i)}v(dt,"circleOverlap");function bt(t,n){const s=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}v(bt,"circleCircleIntersection");function vt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}v(vt,"getCenter");function Ht(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,x=t(a);if(x*r>=0&&(n=a),Math.abs(f)<o||x===0)return a}return n+f}v(Ht,"bisect");function lt(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}v(lt,"zeros");function xt(t,n){return lt(t).map(()=>lt(n))}v(xt,"zerosM");function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}v(tt,"dot");function ct(t){return Math.sqrt(tt(t,t))}v(ct,"norm2");function ut(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}v(ut,"scale");function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}v(Z,"weightedSum");function St(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,x=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let S=0;S<b;++S){const c=n.slice();c[S]=c[S]?c[S]*i:o,p[S+1]=c,p[S+1].fx=t(c),p[S+1].id=S+1}function k(S){for(let c=0;c<S.length;c++)p[b][c]=S[c];p[b].fx=S.fx}v(k,"updateSimplex");const z=v((S,c)=>S.fx-c.fx,"sortOrder"),T=n.slice(),w=n.slice(),g=n.slice(),m=n.slice();for(let S=0;S<e;++S){if(p.sort(z),s.history){const y=p.map(d=>{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});y.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:y})}h=0;for(let y=0;y<b;++y)h=Math.max(h,Math.abs(p[0][y]-p[1][y]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let y=0;y<b;++y){T[y]=0;for(let d=0;d<b;++d)T[y]+=p[d][y];T[y]/=b}const c=p[b];if(Z(w,1+f,T,-f,c),w.fx=t(w),w.fx<p[0].fx)Z(m,1+u,T,-u,c),m.fx=t(m),m.fx<w.fx?k(m):k(w);else if(w.fx>=p[b-1].fx){let y=!1;if(w.fx>c.fx?(Z(g,1+a,T,-a,c),g.fx=t(g),g.fx<c.fx?k(g):y=!0):(Z(g,1-a*f,T,a*f,c),g.fx=t(g),g.fx<w.fx?k(g):y=!0),y){if(x>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-x,p[0],x,p[d]),p[d].fx=t(p[d])}}else k(w)}return p.sort(z),{fx:p[0].fx,x:p[0]}}v(St,"nelderMead");function Yt(t,n,s,e,i,o,r){const l=s.fx,f=tt(s.fxprime,n);let u=l,a=l,x=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,k,z){for(let T=0;T<16;++T)if(i=(p+k)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||u>=z)k=i;else{if(Math.abs(x)<=-r*f)return i;x*(k-p)>=0&&(k=p),p=i,z=u}return 0}v(b,"zoom");for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(x)<=-r*f)return i;if(x>=0)return b(i,h,u);a=u,h=i,i*=2}return i}v(Yt,"wolfeLineSearch");function Xt(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ut(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=Yt(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ut(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const x=tt(e.fxprime,e.fxprime),h=Math.max(0,tt(o,i.fxprime)/x);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ct(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}v(Xt,"conjugateGradient");function It(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||te,e=n.lossFunction||et,i=Jt(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=St(a=>{const x={};for(let h=0;h<r.length;++h){const b=r[h];x[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(x,i)},l,n).x;for(let a=0;a<r.length;++a){const x=r[a];o[x].x=u[2*a],o[x].y=u[2*a+1]}return o}v(It,"venn");var Zt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Zt?Math.abs(t-n):Ht(e=>dt(t,n,e)-s,0,t+n)}v(ft,"distanceFromIntersectArea");function Jt(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(v(i,"toKey"),s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let x=u+1;x<f.sets.length;x++){const h=String(f.sets[x]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}v(Jt,"addMissingAreas");function Qt(t,n,s){const e=xt(n.length,n.length),i=xt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(f,u,o.size);e[r][l]=e[l][r]=a;let x=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?x=1:o.size<=1e-10&&(x=-1),i[r][l]=i[l][r]=x}),{distances:e,constraints:i}}v(Qt,"getDistanceMatrices");function $t(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],x=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),k=b-x*x;h>0&&p<=x||h<0&&p>=x||(i+=2*k*k,n[2*o]+=4*k*(r-u),n[2*o+1]+=4*k*(l-a),n[2*f]+=4*k*(u-r),n[2*f+1]+=4*k*(a-l))}}return i}v($t,"constrainedMDSGradient");function te(t,n={}){let s=ne(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ee(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}v(te,"bestInitialLayout");function ee(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=Qt(t,e,i);const l=ct(o.map(ct))/o.length;o=o.map(h=>h.map(b=>b/l));const f=v((h,b)=>$t(h,b,o,r),"obj");let u=null;for(let h=0;h<s;++h){const b=lt(o.length*2).map(Math.random),p=Xt(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,x={};for(let h=0;h<e.length;++h){const b=e[h];x[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ut(h.x,l);return x}v(ee,"constrainedMDSLayout");function ne(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const x of t)if(x.sets.length===1){const h=x.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:x.size,radius:Math.sqrt(x.size/Math.PI)},i[h]=[]}t=t.filter(x=>x.sets.length===2);for(const x of t){let h=x.weight!=null?x.weight:1;const b=x.sets[0],p=x.sets[1];x.size+Zt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:x.size,weight:h}),i[p].push({set:b,size:x.size,weight:h})}const o=[];Object.keys(i).forEach(x=>{let h=0;for(let b=0;b<i[x].length;++b)h+=i[x][b].size*i[x][b].weight;o.push({set:x,size:h})});function r(x,h){return h.size-x.size}v(r,"sortOrder"),o.sort(r);const l={};function f(x){return x.set in l}v(f,"isPositioned");function u(x,h){e[h].x=x.x,e[h].y=x.y,l[h]=!0}v(u,"positionSet"),u({x:0,y:0},o[0].set);for(let x=1;x<o.length;++x){const h=o[x].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const k=[];for(var a=0;a<b.length;++a){const w=e[b[a].set],g=ft(p.radius,w.radius,b[a].size);k.push({x:w.x+g,y:w.y}),k.push({x:w.x-g,y:w.y}),k.push({y:w.y+g,x:w.x}),k.push({y:w.y-g,x:w.x});for(let m=a+1;m<b.length;++m){const S=e[b[m].set],c=ft(p.radius,S.radius,b[m].size),y=bt({x:w.x,y:w.y,radius:g},{x:S.x,y:S.y,radius:c});k.push(...y)}}let z=1e50,T=k[0];for(const w of k){e[h].x=w.x,e[h].y=w.y;const g=s(e,t);g<z&&(z=g,T=w)}u(T,h)}return e}v(ne,"greedyLayout");function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=dt(r.radius,l.radius,K(r,l))}else i=it(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}v(et,"lossFunction");function Mt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=dt(l.radius,f.radius,K(l,f))}else i=it(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}v(Mt,"logRatioLossFunction");function se(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&K(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}v(se,"orientateCircles");function ie(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}v(n,"find");function s(i,o){const r=n(i),l=n(o);r.parent=l}v(s,"union");for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;K(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}v(ie,"disjointCluster");function ht(t){const n=v(s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}},"minMax");return{xRange:n("x"),yRange:n("y")}}v(ht,"getBoundingBox");function kt(t,n,s){n==null&&(n=Math.PI/2);let e=Tt(t).map(u=>Object.assign({},u));const i=ie(e);for(const u of i){se(u,n,s);const a=ht(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,x){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const k=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;k<0&&(b+=k)}if(x)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const k=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;k<0&&(p+=k)}for(const k of u)k.x+=b,k.y+=p,e.push(k)}v(l,"addCluster");let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=ht(e);return _t(e)}v(kt,"normalizeSolution");function wt(t,n,s,e,i){const o=Tt(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=ht(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),x=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return _t(o.map(b=>({radius:a*b.radius,x:e+x+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}v(wt,"scaleSolution");function _t(t){const n={};for(const s of t)n[s.setid]=s;return n}v(_t,"toObjectNotation");function Tt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}v(Tt,"fromObjectNotation");function oe(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,x=null,h=null,b=!1,p=null,k=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,z={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=v(function(y){if(y in z)return z[y];var d=z[y]=T[w];return w+=1,w>=T.length&&(w=0),d},"colours"),m=It,S=et;function c(y){let d=y.datum();const D=new Set;d.forEach(M=>{M.size==0&&M.sets.length==1&&D.add(M.sets[0])}),d=d.filter(M=>!M.sets.some(F=>D.has(F)));let I={},O={};if(d.length>0){let M=m(d,{lossFunction:S,distinct:b});l&&(M=kt(M,r,h)),I=wt(M,s,e,i,f),O=zt(I,d,k)}const U={};d.forEach(M=>{M.label&&(U[M.sets]=M.label)});function B(M){if(M.sets in U)return U[M.sets];if(M.sets.length==1)return""+M.sets[0]}v(B,"label"),y.selectAll("svg").data([I]).enter().append("svg");const P=y.select("svg");n?P.attr("viewBox",`0 0 ${s} ${e}`):P.attr("width",s).attr("height",e);const R={};let E=!1;P.selectAll(".venn-area path").each(function(M){const F=this.getAttribute("d");M.sets.length==1&&F&&!b&&(E=!0,R[M.sets[0]]=le(F))});function C(M){return F=>{const Y=M.sets.map(nt=>{let X=R[nt],Q=I[nt];return X||(X={x:s/2,y:e/2,radius:1}),Q||(Q={x:s/2,y:e/2,radius:1}),{x:X.x*(1-F)+Q.x*F,y:X.y*(1-F)+Q.y*F,radius:X.radius*(1-F)+Q.radius*F}});return pt(Y,p)}}v(C,"pathTween");const W=P.selectAll(".venn-area").data(d,M=>M.sets),V=W.enter().append("g").attr("class",M=>`venn-area venn-${M.sets.length==1?"circle":"intersection"}${M.colour||M.color?" venn-coloured":""}`).attr("data-venn-sets",M=>M.sets.join("_")),G=V.append("path"),j=V.append("text").attr("class","label").text(M=>B(M)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(G.style("fill-opacity","0").filter(M=>M.sets.length==1).style("fill",M=>M.colour?M.colour:M.color?M.color:g(M.sets)).style("fill-opacity",".25"),j.style("fill",M=>M.colour||M.color?"#FFF":t.textFill?t.textFill:M.sets.length==1?g(M.sets):"#444"));function q(M){return typeof M.transition=="function"?M.transition("venn").duration(o):M}v(q,"asTransition");let A=y;E&&typeof A.transition=="function"?(A=q(y),A.selectAll("path").attrTween("d",C)):A.selectAll("path").attr("d",M=>pt(M.sets.map(F=>I[F])),p);const N=A.selectAll("text").filter(M=>M.sets in O).text(M=>B(M)).attr("x",M=>Math.floor(O[M.sets].x)).attr("y",M=>Math.floor(O[M.sets].y));u&&(E?"on"in N?N.on("end",ot(I,B)):N.each("end",ot(I,B)):N.each(ot(I,B)));const L=q(W.exit()).remove();typeof W.transition=="function"&&L.selectAll("path").attrTween("d",C);const J=L.selectAll("text").attr("x",s/2).attr("y",e/2);return x!==null&&(j.style("font-size","0px"),N.style("font-size",x),J.style("font-size","0px")),{circles:I,textCentres:O,nodes:W,enter:V,update:A,exit:L}}return v(c,"chart"),c.wrap=function(y){return arguments.length?(u=y,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(y){return arguments.length?(s=y,c):s},c.height=function(y){return arguments.length?(e=y,c):e},c.padding=function(y){return arguments.length?(i=y,c):i},c.distinct=function(y){return arguments.length?(b=y,c):b},c.colours=function(y){return arguments.length?(g=y,c):g},c.colors=function(y){return arguments.length?(g=y,c):g},c.fontSize=function(y){return arguments.length?(x=y,c):x},c.round=function(y){return arguments.length?(p=y,c):p},c.duration=function(y){return arguments.length?(o=y,c):o},c.layoutFunction=function(y){return arguments.length?(m=y,c):m},c.normalize=function(y){return arguments.length?(l=y,c):l},c.scaleToFit=function(y){return arguments.length?(f=y,c):f},c.styled=function(y){return arguments.length?(a=y,c):a},c.orientation=function(y){return arguments.length?(r=y,c):r},c.orientationOrder=function(y){return arguments.length?(h=y,c):h},c.lossFunction=function(y){return arguments.length?(S=y==="default"?et:y==="logRatio"?Mt:y,c):S},c}v(oe,"VennDiagram");function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],x=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}v(p,"append");let k=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");k.textContent=g,g.length>f&&k.getComputedTextLength()>i&&(a.pop(),k.textContent=a.join(" "),a=[u],k=p(u),x++)}const z=.35-x*h/2,T=e.getAttribute("x"),w=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${z+m*h}em`)})}}v(ot,"wrapText");function rt(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-K(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=K(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}v(rt,"circleMargin");function Et(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=rt(e[0],t,n);for(let a=1;a<e.length;++a){const x=rt(e[a],t,n);x>=o&&(i=e[a],o=x)}const r=St(a=>-1*rt({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(K(l,a)>a.radius){f=!1;break}for(const a of n)if(K(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return it(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Et(t,[]):vt(u.arcs.map(a=>a.p1))}v(Et,"computeTextCentre");function re(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=K(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}v(re,"getOverlappingCircles");function zt(t,n,s){const e={},i=re(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const x=Et(u,a,s);e[r]=x,x.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}v(zt,"computeTextCentres");function ae(t,n,s){const e=[];return e.push(`
2
- M`,t,n),e.push(`
3
- m`,-s,0),e.push(`
4
- a`,s,s,0,1,0,s*2,0),e.push(`
5
- a`,s,s,0,1,0,-s*2,0),e.join(" ")}v(ae,"circlePath");function le(t){const n=t.split(" ");return{x:Number.parseFloat(n[1]),y:Number.parseFloat(n[2]),radius:-Number.parseFloat(n[4])}}v(le,"circleFromPath");function At(t){if(t.length===0)return[];const n={};return it(t,n),n.arcs}v(At,"intersectionAreaArcs");function Ct(t,n){if(t.length===0)return"M 0 0";const s=Math.pow(10,n||0),e=n!=null?o=>Math.round(o*s)/s:o=>o;if(t.length==1){const o=t[0].circle;return ae(e(o.x),e(o.y),e(o.radius))}const i=[`
6
- M`,e(t[0].p2.x),e(t[0].p2.y)];for(const o of t){const r=e(o.circle.radius);i.push(`
7
- A`,r,r,0,o.large?1:0,o.sweep?1:0,e(o.p1.x),e(o.p1.y))}return i.join(" ")}v(Ct,"arcsToPath");function pt(t,n){return Ct(At(t),n)}v(pt,"intersectionAreaPath");function ce(t,n={}){const{lossFunction:s,layoutFunction:e=It,normalize:i=!0,orientation:o=Math.PI/2,orientationOrder:r,width:l=600,height:f=350,padding:u=15,scaleToFit:a=!1,symmetricalTextCentre:x=!1,distinct:h,round:b=2}=n;let p=e(t,{lossFunction:s==="default"||!s?et:s==="logRatio"?Mt:s,distinct:h});i&&(p=kt(p,o,r));const k=wt(p,l,f,u,a),z=zt(k,t,x),T=new Map(Object.keys(k).map(m=>[m,{set:m,x:k[m].x,y:k[m].y,radius:k[m].radius}])),w=t.map(m=>{const S=m.sets.map(d=>T.get(d)),c=At(S),y=Ct(c,b);return{circles:S,arcs:c,path:y,area:m,has:new Set(m.sets)}});function g(m){let S="";for(const c of w)c.has.size>m.length&&m.every(y=>c.has.has(y))&&(S+=" "+c.path);return S}return v(g,"genDistinctPath"),w.map(({circles:m,arcs:S,path:c,area:y})=>({data:y,text:z[y.sets],circles:m,arcs:S,path:c,distinctPath:c+g(y.sets)}))}v(ce,"layout");var mt=(function(){var t=_(function(w,g,m,S){for(m=m||{},S=w.length;S--;m[w[S]]=g);return m},"o"),n=[5,8],s=[7,8,11,12,17,19,22,24],e=[1,17],i=[1,18],o=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],r=[1,31],l=[1,39],f=[7,8,11,12,17,19,22,24,27],u=[1,57],a=[1,56],x=[1,58],h=[1,59],b=[1,60],p=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],k={trace:_(v(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:_(v(function(g,m,S,c,y,d,D){var I=d.length-1;switch(y){case 1:return d[I-1];case 2:case 3:case 4:this.$=[];break;case 5:d[I-1].push(d[I]),this.$=d[I-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=d[I];break;case 8:c.setDiagramTitle(d[I].substr(6)),this.$=d[I].substr(6);break;case 9:c.addSubsetData([d[I]],void 0,void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 10:c.addSubsetData([d[I-1]],d[I],void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 11:c.addSubsetData([d[I-2]],void 0,parseFloat(d[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 12:c.addSubsetData([d[I-3]],d[I-2],parseFloat(d[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 13:if(d[I].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(d[I]),c.addSubsetData(d[I],void 0,void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 14:if(d[I-1].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(d[I-1]),c.addSubsetData(d[I-1],d[I],void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 15:if(d[I-2].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(d[I-2]),c.addSubsetData(d[I-2],void 0,parseFloat(d[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 16:if(d[I-3].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(d[I-3]),c.addSubsetData(d[I-3],d[I-2],parseFloat(d[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 17:case 18:case 19:c.addTextData(d[I-1],d[I],void 0);break;case 20:case 21:c.addTextData(d[I-2],d[I-1],d[I]);break;case 23:c.addStyleData(d[I-1],d[I]);break;case 24:case 25:case 26:var O=c.getCurrentSets();if(!O)throw new Error("text requires set");c.addTextData(O,d[I],void 0);break;case 27:case 28:var O=c.getCurrentSets();if(!O)throw new Error("text requires set");c.addTextData(O,d[I-1],d[I]);break;case 29:case 41:this.$=[d[I]];break;case 30:case 42:this.$=[...d[I-2],d[I]];break;case 31:this.$=[d[I-2],d[I]];break;case 33:this.$=d[I].join(" ");break;case 34:this.$=[d[I]];break;case 35:d[I-1].push(d[I]),this.$=d[I-1];break;case 43:case 44:this.$=d[I];break}},"anonymous"),"anonymous"),table:[t(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(s,[2,4],{6:5}),t(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(s,[2,5]),t(s,[2,6]),t(s,[2,7]),t(s,[2,8]),{13:16,20:e,21:i},{13:20,18:19,20:e,21:i},{13:20,18:21,20:e,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:e,21:i},t(s,[2,9],{14:[1,27],15:[1,28]}),t(o,[2,43]),t(o,[2,44]),t(s,[2,13],{14:[1,29],15:[1,30],27:r}),t(o,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:r},t(s,[2,22]),t(s,[2,24],{14:[1,35]}),t(s,[2,25],{14:[1,36]}),t(s,[2,26]),{20:l,25:37,26:38,27:r},t(s,[2,10],{15:[1,40]}),{16:[1,41]},t(s,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:e,21:i},t(s,[2,17],{14:[1,45]}),t(s,[2,18],{14:[1,46]}),t(s,[2,19]),t(s,[2,27]),t(s,[2,28]),t(s,[2,23],{27:[1,47]}),t(f,[2,29]),{15:[1,48]},{16:[1,49]},t(s,[2,11]),{16:[1,50]},t(s,[2,15]),t(o,[2,42]),t(s,[2,20]),t(s,[2,21]),{20:l,26:51},{16:u,20:a,21:[1,53],28:52,29:54,30:55,31:x,32:h,33:b},t(s,[2,12]),t(s,[2,16]),t(f,[2,30]),t(f,[2,31]),t(f,[2,32]),t(f,[2,33],{30:61,16:u,20:a,31:x,32:h,33:b}),t(p,[2,34]),t(p,[2,36]),t(p,[2,37]),t(p,[2,38]),t(p,[2,39]),t(p,[2,40]),t(p,[2,35])],defaultActions:{6:[2,1]},parseError:_(v(function(g,m){if(m.recoverable)this.trace(g);else{var S=new Error(g);throw S.hash=m,S}},"parseError"),"parseError"),parse:_(v(function(g){var m=this,S=[0],c=[],y=[null],d=[],D=this.table,I="",O=0,U=0,B=2,P=1,R=d.slice.call(arguments,1),E=Object.create(this.lexer),C={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(C.yy[W]=this.yy[W]);E.setInput(g,C.yy),C.yy.lexer=E,C.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var V=E.yylloc;d.push(V);var G=E.options&&E.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(H){S.length=S.length-2*H,y.length=y.length-H,d.length=d.length-H}v(j,"popStack"),_(j,"popStack");function q(){var H;return H=c.pop()||E.lex()||P,typeof H!="number"&&(H instanceof Array&&(c=H,H=c.pop()),H=m.symbols_[H]||H),H}v(q,"lex"),_(q,"lex");for(var A,N,L,J,M={},F,Y,nt,X;;){if(N=S[S.length-1],this.defaultActions[N]?L=this.defaultActions[N]:((A===null||typeof A>"u")&&(A=q()),L=D[N]&&D[N][A]),typeof L>"u"||!L.length||!L[0]){var Q="";X=[];for(F in D[N])this.terminals_[F]&&F>B&&X.push("'"+this.terminals_[F]+"'");E.showPosition?Q="Parse error on line "+(O+1)+`:
8
- `+E.showPosition()+`
9
- Expecting `+X.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(O+1)+": Unexpected "+(A==P?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Q,{text:E.match,token:this.terminals_[A]||A,line:E.yylineno,loc:V,expected:X})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+A);switch(L[0]){case 1:S.push(A),y.push(E.yytext),d.push(E.yylloc),S.push(L[1]),A=null,U=E.yyleng,I=E.yytext,O=E.yylineno,V=E.yylloc;break;case 2:if(Y=this.productions_[L[1]][1],M.$=y[y.length-Y],M._$={first_line:d[d.length-(Y||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(Y||1)].first_column,last_column:d[d.length-1].last_column},G&&(M._$.range=[d[d.length-(Y||1)].range[0],d[d.length-1].range[1]]),J=this.performAction.apply(M,[I,U,O,C.yy,L[1],y,d].concat(R)),typeof J<"u")return J;Y&&(S=S.slice(0,-1*Y*2),y=y.slice(0,-1*Y),d=d.slice(0,-1*Y)),S.push(this.productions_[L[1]][0]),y.push(M.$),d.push(M._$),nt=D[S[S.length-2]][S[S.length-1]],S.push(nt);break;case 3:return!0}}return!0},"parse"),"parse")},z=(function(){var w={EOF:1,parseError:_(v(function(m,S){if(this.yy.parser)this.yy.parser.parseError(m,S);else throw new Error(m)},"parseError"),"parseError"),setInput:_(function(g,m){return this.yy=m||this.yy||{},this._input=g,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:_(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var m=g.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:_(function(g){var m=g.length,S=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;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),S.length-1&&(this.yylineno-=S.length-1);var y=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:S?(S.length===c.length?this.yylloc.first_column:0)+c[c.length-S.length].length-S[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(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).
10
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(g){this.unput(this.match.slice(g))},"less"),pastInput:_(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var g=this.pastInput(),m=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
11
- `+m+"^"},"showPosition"),test_match:_(function(g,m){var S,c,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),c=g[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+g[0].length},this.yytext+=g[0],this.match+=g[0],this.matches=g,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(g[0].length),this.matched+=g[0],S=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var d in y)this[d]=y[d];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var g,m,S,c;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),d=0;d<y.length;d++)if(S=this._input.match(this.rules[y[d]]),S&&(!m||S[0].length>m[0].length)){if(m=S,c=d,this.options.backtrack_lexer){if(g=this.test_match(S,y[d]),g!==!1)return g;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(g=this.test_match(m,y[c]),g!==!1?g:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
12
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(v(function(){var m=this.next();return m||this.lex()},"lex"),"lex"),begin:_(v(function(m){this.conditionStack.push(m)},"begin"),"begin"),popState:_(v(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(v(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"),"_currentRules"),topState:_(v(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),"topState"),pushState:_(v(function(m){this.begin(m)},"pushState"),"pushState"),stateStackSize:_(v(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(v(function(m,S,c,y){switch(c){case 0:break;case 1:break;case 2:break;case 3:if(m.getIndentMode&&m.getIndentMode())return m.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:m.setIndentMode&&m.setIndentMode(!1),this.begin("INITIAL"),this.unput(S.yytext);break;case 6:return this.begin("bol"),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(m.consumeIndentText)m.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return S.yytext=S.yytext.slice(2,-2),14;case 17:return S.yytext=S.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return w})();k.lexer=z;function T(){this.yy={}}return v(T,"Parser"),_(T,"Parser"),T.prototype=k,k.Parser=T,new T})();mt.parser=mt;var we=mt,Rt=[],Dt=[],Ot=[],Nt=new Set,Pt,Ft=!1,_e=_((t,n,s)=>{const e=gt(t).sort(),i=s??10/Math.pow(t.length,2);Pt=e,e.length===1&&Nt.add(e[0]),Rt.push({sets:e,size:i,label:n?st(n):void 0})},"addSubsetData"),Te=_(()=>Rt,"getSubsetData"),st=_(t=>{const n=t.trim();return n.length>=2&&n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):n},"normalizeText"),Ee=_(t=>t&&st(t),"normalizeStyleValue"),ze=_((t,n,s)=>{const e=st(n);Dt.push({sets:gt(t).sort(),id:e,label:s?st(s):void 0})},"addTextData"),Ae=_((t,n)=>{const s=gt(t).sort(),e={};for(const[i,o]of n)e[i]=Ee(o)??o;Ot.push({targets:s,styles:e})},"addStyleData"),Ce=_(()=>Ot,"getStyleData"),gt=_(t=>t.map(n=>st(n)),"normalizeIdentifierList"),Re=_(t=>{const s=gt(t).filter(e=>!Nt.has(e));if(s.length>0)throw new Error(`unknown set identifier: ${s.join(", ")}`)},"validateUnionIdentifiers"),De=_(()=>Dt,"getTextData"),Oe=_(()=>Pt,"getCurrentSets"),Ne=_(()=>Ft,"getIndentMode"),Pe=_(t=>{Ft=t},"setIndentMode"),Fe=ke.venn;function jt(){return Me(Fe,Kt().venn)}v(jt,"getConfig2");_(jt,"getConfig");var je=_(()=>{Ie(),Rt.length=0,Dt.length=0,Ot.length=0,Nt.clear(),Pt=void 0,Ft=!1},"customClear"),Le={getConfig:jt,clear:je,setAccTitle:ye,getAccTitle:ge,setDiagramTitle:de,getDiagramTitle:he,getAccDescription:fe,setAccDescription:ue,addSubsetData:_e,getSubsetData:Te,addTextData:ze,addStyleData:Ae,validateUnionIdentifiers:Re,getTextData:De,getStyleData:Ce,getCurrentSets:Oe,getIndentMode:Ne,setIndentMode:Pe},Be=_(t=>`
13
- .venn-title {
14
- font-size: 32px;
15
- fill: ${t.vennTitleTextColor};
16
- font-family: ${t.fontFamily};
17
- }
18
-
19
- .venn-circle text {
20
- font-size: 48px;
21
- font-family: ${t.fontFamily};
22
- }
23
-
24
- .venn-intersection text {
25
- font-size: 48px;
26
- fill: ${t.vennSetTextColor};
27
- font-family: ${t.fontFamily};
28
- }
29
-
30
- .venn-text-node {
31
- font-family: ${t.fontFamily};
32
- color: ${t.vennSetTextColor};
33
- }
34
- `,"getStyles"),Ve=Be;function Lt(t){const n=new Map;for(const s of t){const e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}v(Lt,"buildStyleByKey");_(Lt,"buildStyleByKey");var Ge=_((t,n,s,e)=>{const i=e.db,o=i.getConfig?.(),{themeVariables:r,look:l,handDrawnSeed:f}=Kt(),u=l==="handDrawn",a=[r.venn1,r.venn2,r.venn3,r.venn4,r.venn5,r.venn6,r.venn7,r.venn8].filter(Boolean),x=i.getDiagramTitle?.(),h=i.getSubsetData(),b=i.getTextData(),p=Lt(i.getStyleData()),k=Vt(h),z=o?.width??800,T=o?.height??450,g=z/1600,m=x?48*g:0,S=r.primaryTextColor??r.textColor,c=xe(n);c.attr("viewBox",`0 0 ${z} ${T}`),x&&c.append("text").text(x).attr("class","venn-title").attr("font-size",`${32*g}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*g).style("fill",r.vennTitleTextColor||r.titleColor);const y=yt(document.createElement("div")),d=oe().width(z).height(T-m);y.datum(k).call(d);const D=u?pe.svg(y.select("svg").node()):void 0,I=ce(k,{width:z,height:T-m,padding:o?.padding??15}),O=new Map;for(const R of I){const E=$([...R.data.sets].sort());O.set(E,R)}b.length>0&&Bt(o,O,y,b,g,p);const U=me(r.background||"#f4f4f4");y.selectAll(".venn-circle").each(function(R,E){const C=yt(this),V=$([...R.sets].sort()),G=p.get(V),j=G?.fill||a[E%a.length]||r.primaryColor;C.classed(`venn-set-${E%8}`,!0);const q=G?.["fill-opacity"]??.1,A=G?.stroke||j,N=G?.["stroke-width"]||`${5*g}`;if(u&&D){const J=O.get(V);if(J&&J.circles.length>0){const M=J.circles[0],F=D.circle(M.x,M.y,M.radius*2,{roughness:.7,seed:f,fill:Gt(j,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+E*60,stroke:A,strokeWidth:parseFloat(String(N))});C.select("path").remove(),C.node()?.insertBefore(F,C.select("text").node())}}else C.select("path").style("fill",j).style("fill-opacity",q).style("stroke",A).style("stroke-width",N).style("stroke-opacity",.95);const L=G?.color||(U?be(j,30):ve(j,30));C.select("text").style("font-size",`${48*g}px`).style("fill",L)}),u&&D?y.selectAll(".venn-intersection").each(function(R){const E=yt(this),W=$([...R.sets].sort()),V=p.get(W),G=V?.fill;if(G){const j=E.select("path"),q=j.attr("d");if(q){const A=D.path(q,{roughness:.7,seed:f,fill:Gt(G,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),N=j.node();N?.parentNode?.insertBefore(A,N),j.remove()}}else E.select("path").style("fill-opacity",0);E.select("text").style("font-size",`${48*g}px`).style("fill",V?.color??r.vennSetTextColor??S)}):(y.selectAll(".venn-intersection text").style("font-size",`${48*g}px`).style("fill",R=>{const C=$([...R.sets].sort());return p.get(C)?.color??r.vennSetTextColor??S}),y.selectAll(".venn-intersection path").style("fill-opacity",R=>{const C=$([...R.sets].sort());return p.get(C)?.fill?1:0}).style("fill",R=>{const C=$([...R.sets].sort());return p.get(C)?.fill??"transparent"}));const B=c.append("g").attr("transform",`translate(0, ${m})`),P=y.select("svg").node();if(P&&"childNodes"in P)for(const R of[...P.childNodes])B.node()?.appendChild(R);Se(c,T,z,o?.useMaxWidth??!0)},"draw");function $(t){return t.join("|")}v($,"stableSetsKey");_($,"stableSetsKey");function Bt(t,n,s,e,i,o){const r=t?.useDebugLayout??!1,f=s.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(const a of e){const x=$(a.sets),h=u.get(x);h?h.push(a):u.set(x,[a])}for(const[a,x]of u.entries()){const h=n.get(a);if(!h?.text)continue;const b=h.text.x,p=h.text.y,k=Math.min(...h.circles.map(P=>P.radius)),z=Math.min(...h.circles.map(P=>P.radius-Math.hypot(b-P.x,p-P.y)));let T=Number.isFinite(z)?Math.max(0,z):0;T===0&&Number.isFinite(k)&&(T=k*.6);const w=f.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);r&&w.append("circle").attr("class","venn-text-debug-circle").attr("cx",b).attr("cy",p).attr("r",T).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const g=Math.max(80*i,T*2*.95),m=Math.max(60*i,T*2*.95),y=(h.data.label&&h.data.label.length>0?Math.min(32*i,T*.25):0)+(x.length<=2?30*i:0),d=b-g/2,D=p-m/2+y,I=Math.max(1,Math.ceil(Math.sqrt(x.length))),O=Math.max(1,Math.ceil(x.length/I)),U=g/I,B=m/O;for(const[P,R]of x.entries()){const E=P%I,C=Math.floor(P/I),W=d+U*(E+.5),V=D+B*(C+.5);r&&w.append("rect").attr("class","venn-text-debug-cell").attr("x",d+U*E).attr("y",D+B*C).attr("width",U).attr("height",B).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const G=U*.9,j=B*.9,q=w.append("foreignObject").attr("class","venn-text-node-fo").attr("width",G).attr("height",j).attr("x",W-G/2).attr("y",V-j/2).attr("overflow","visible"),A=o.get(R.id)?.color,N=q.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(R.label??R.id);A&&N.style("color",A)}}}v(Bt,"renderTextNodes");_(Bt,"renderTextNodes");function Vt(t){const n=new Set(t.map(i=>[...i.sets].sort().join("|"))),s=new Map(t.filter(i=>i.sets.length===1&&i.size!==void 0).map(i=>[i.sets[0],i.size])),e=[];for(const i of t){if(i.sets.length<3)continue;const o=[...i.sets].sort();for(let r=0;r<o.length-1;r++)for(let l=r+1;l<o.length;l++){const f=[o[r],o[l]],u=f.join("|");if(!n.has(u)){n.add(u);const a=s.get(f[0]),x=s.get(f[1]),h=a!==void 0&&x!==void 0?Math.min(a,x)/4:2.5;e.push({sets:f,size:h,label:""})}}}return e.length>0?[...t,...e]:t}v(Vt,"ensurePairwiseSubsets");_(Vt,"ensurePairwiseSubsets");var Ke={draw:Ge},We={parser:we,db:Le,renderer:Ke,styles:Ve};export{We as diagram};