folderview 0.0.0-stage → 0.2.1

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 (450) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +282 -2
  3. package/dist/cli.js +115 -0
  4. package/dist/client/assets/app.css +1 -0
  5. package/dist/client/assets/chunks/abap-EINPUMCJ.js +1 -0
  6. package/dist/client/assets/chunks/abnfDiagram-S7VZAUFO-W2CM2W6D.js +1 -0
  7. package/dist/client/assets/chunks/actionscript-3-O776AQUO.js +1 -0
  8. package/dist/client/assets/chunks/ada-WLOTXRTV.js +1 -0
  9. package/dist/client/assets/chunks/ahk-EF37A2DY.js +1 -0
  10. package/dist/client/assets/chunks/ahk2-FH4K3CKT.js +1 -0
  11. package/dist/client/assets/chunks/angular-html-ZALQFV2H.js +1 -0
  12. package/dist/client/assets/chunks/angular-ts-4IWMF7QO.js +1 -0
  13. package/dist/client/assets/chunks/apache-44AYOEWM.js +1 -0
  14. package/dist/client/assets/chunks/apex-XRYPID42.js +1 -0
  15. package/dist/client/assets/chunks/apl-5HBALFOI.js +1 -0
  16. package/dist/client/assets/chunks/applescript-2DZEHZEC.js +1 -0
  17. package/dist/client/assets/chunks/ara-ZGZQBLXL.js +1 -0
  18. package/dist/client/assets/chunks/architecture-WOLXFQ4H-EJGENNRL.js +1 -0
  19. package/dist/client/assets/chunks/architectureDiagram-YGSQEFNW-2VHWSKO6.js +36 -0
  20. package/dist/client/assets/chunks/asciidoc-GSQAKCPO.js +1 -0
  21. package/dist/client/assets/chunks/asm-BFURM5BK.js +1 -0
  22. package/dist/client/assets/chunks/astro-VJORWDZJ.js +1 -0
  23. package/dist/client/assets/chunks/awk-BSHTWXXX.js +1 -0
  24. package/dist/client/assets/chunks/ballerina-HAOQJ4B2.js +1 -0
  25. package/dist/client/assets/chunks/bat-OSH45EOF.js +1 -0
  26. package/dist/client/assets/chunks/beancount-RBATIHOV.js +1 -0
  27. package/dist/client/assets/chunks/berry-CZUIOUM4.js +1 -0
  28. package/dist/client/assets/chunks/bibtex-KCL2UWHE.js +1 -0
  29. package/dist/client/assets/chunks/bicep-SZJZB3SG.js +1 -0
  30. package/dist/client/assets/chunks/bird2-XBF5YQQV.js +1 -0
  31. package/dist/client/assets/chunks/blade-Q24LEVFC.js +1 -0
  32. package/dist/client/assets/chunks/blockDiagram-APKKGZFW-53LXSOOT.js +140 -0
  33. package/dist/client/assets/chunks/bpmnIcons-APHXDYXF-FMBRQNTY.js +1 -0
  34. package/dist/client/assets/chunks/bsl-TI44NWFB.js +1 -0
  35. package/dist/client/assets/chunks/c-NLHY4Y4N.js +1 -0
  36. package/dist/client/assets/chunks/c3-BUTEM6PO.js +1 -0
  37. package/dist/client/assets/chunks/c4Diagram-KJ2TOQU5-O53G4GQH.js +38 -0
  38. package/dist/client/assets/chunks/cadence-JIRTEU64.js +1 -0
  39. package/dist/client/assets/chunks/cairo-3W6NVDNW.js +1 -0
  40. package/dist/client/assets/chunks/chapel-BPBJ2E7K.js +1 -0
  41. package/dist/client/assets/chunks/chunk-25KVF5ZE.js +1 -0
  42. package/dist/client/assets/chunks/chunk-2CJKSQOI.js +1 -0
  43. package/dist/client/assets/chunks/chunk-2QIJRTWR.js +1 -0
  44. package/dist/client/assets/chunks/chunk-2ZCRJZGF.js +2 -0
  45. package/dist/client/assets/chunks/chunk-3ILNDZNY.js +213 -0
  46. package/dist/client/assets/chunks/chunk-3M2OOQ7S.js +1 -0
  47. package/dist/client/assets/chunks/chunk-3M57NTNK.js +1 -0
  48. package/dist/client/assets/chunks/chunk-3MR6DCZJ.js +1 -0
  49. package/dist/client/assets/chunks/chunk-3WGHS7F7.js +1 -0
  50. package/dist/client/assets/chunks/chunk-4JK75V33.js +1 -0
  51. package/dist/client/assets/chunks/chunk-4NXNVEWK.js +1 -0
  52. package/dist/client/assets/chunks/chunk-4RNNBDFQ.js +1 -0
  53. package/dist/client/assets/chunks/chunk-4T4NVH7V.js +1 -0
  54. package/dist/client/assets/chunks/chunk-4TFFBC35.js +1 -0
  55. package/dist/client/assets/chunks/chunk-4WYBE67P.js +1 -0
  56. package/dist/client/assets/chunks/chunk-56ITEUFA.js +1 -0
  57. package/dist/client/assets/chunks/chunk-5DXRE7IH.js +1 -0
  58. package/dist/client/assets/chunks/chunk-5IMADCNU.js +1 -0
  59. package/dist/client/assets/chunks/chunk-5XZPGKN4.js +1 -0
  60. package/dist/client/assets/chunks/chunk-6O32UKSP.js +1 -0
  61. package/dist/client/assets/chunks/chunk-7BAEB64Q.js +1 -0
  62. package/dist/client/assets/chunks/chunk-7FMWBHZO.js +1 -0
  63. package/dist/client/assets/chunks/chunk-7GFDITUT.js +1 -0
  64. package/dist/client/assets/chunks/chunk-7H4MLBHI.js +1 -0
  65. package/dist/client/assets/chunks/chunk-7OJ4MEEB.js +1 -0
  66. package/dist/client/assets/chunks/chunk-7RSEISFE.js +1 -0
  67. package/dist/client/assets/chunks/chunk-7YNZZQVT.js +1 -0
  68. package/dist/client/assets/chunks/chunk-AB7TIL2G.js +1 -0
  69. package/dist/client/assets/chunks/chunk-ADDF76FL.js +1 -0
  70. package/dist/client/assets/chunks/chunk-AF6UTCD4.js +321 -0
  71. package/dist/client/assets/chunks/chunk-AJ2K6ASU.js +1 -0
  72. package/dist/client/assets/chunks/chunk-AUBAENQZ.js +1 -0
  73. package/dist/client/assets/chunks/chunk-BJEYVZ65.js +1 -0
  74. package/dist/client/assets/chunks/chunk-BLRM6LXA.js +1 -0
  75. package/dist/client/assets/chunks/chunk-BOCTYCDZ.js +1 -0
  76. package/dist/client/assets/chunks/chunk-BU4VRYN7.js +1 -0
  77. package/dist/client/assets/chunks/chunk-CALYHV7D.js +1 -0
  78. package/dist/client/assets/chunks/chunk-CF4W3RZ4.js +1 -0
  79. package/dist/client/assets/chunks/chunk-DCZ2OBSL.js +1 -0
  80. package/dist/client/assets/chunks/chunk-DUFPBTHD.js +1 -0
  81. package/dist/client/assets/chunks/chunk-DUICIQBC.js +88 -0
  82. package/dist/client/assets/chunks/chunk-EH2N475V.js +1 -0
  83. package/dist/client/assets/chunks/chunk-EHLLNPZT.js +1 -0
  84. package/dist/client/assets/chunks/chunk-EIBFAW37.js +1 -0
  85. package/dist/client/assets/chunks/chunk-EO3ER3GN.js +1 -0
  86. package/dist/client/assets/chunks/chunk-FH24BIIA.js +1 -0
  87. package/dist/client/assets/chunks/chunk-FNOXGAL5.js +2 -0
  88. package/dist/client/assets/chunks/chunk-FTY6WLQF.js +3 -0
  89. package/dist/client/assets/chunks/chunk-FZFME6UK.js +1 -0
  90. package/dist/client/assets/chunks/chunk-FZJZZYYO.js +1 -0
  91. package/dist/client/assets/chunks/chunk-G4Z6L7OO.js +1 -0
  92. package/dist/client/assets/chunks/chunk-GNCEAN2B.js +1 -0
  93. package/dist/client/assets/chunks/chunk-GQJIKV3T.js +1 -0
  94. package/dist/client/assets/chunks/chunk-GUMNOKT2.js +1 -0
  95. package/dist/client/assets/chunks/chunk-GXRORAF3.js +1 -0
  96. package/dist/client/assets/chunks/chunk-H36ABDKY.js +1 -0
  97. package/dist/client/assets/chunks/chunk-HAR5NYVW.js +1 -0
  98. package/dist/client/assets/chunks/chunk-HIGPS4L2.js +1 -0
  99. package/dist/client/assets/chunks/chunk-HMOBGTME.js +1 -0
  100. package/dist/client/assets/chunks/chunk-HNO6SQ7M.js +1 -0
  101. package/dist/client/assets/chunks/chunk-HYVZ3GYN.js +1 -0
  102. package/dist/client/assets/chunks/chunk-I6TGFOQS.js +1 -0
  103. package/dist/client/assets/chunks/chunk-IHIOJK7I.js +1 -0
  104. package/dist/client/assets/chunks/chunk-IHJNUMSC.js +1 -0
  105. package/dist/client/assets/chunks/chunk-IP7PB2OC.js +1 -0
  106. package/dist/client/assets/chunks/chunk-ISDTMH2Y.js +1 -0
  107. package/dist/client/assets/chunks/chunk-J65M2LNT.js +1 -0
  108. package/dist/client/assets/chunks/chunk-JCWYZ7X2.js +62 -0
  109. package/dist/client/assets/chunks/chunk-JENWYTLI.js +1 -0
  110. package/dist/client/assets/chunks/chunk-JJ6YWJQS.js +1 -0
  111. package/dist/client/assets/chunks/chunk-JMUVGGX7.js +32 -0
  112. package/dist/client/assets/chunks/chunk-JNQUFMM4.js +1 -0
  113. package/dist/client/assets/chunks/chunk-JPTECOAL.js +1 -0
  114. package/dist/client/assets/chunks/chunk-JZNK4LKS.js +1 -0
  115. package/dist/client/assets/chunks/chunk-KPNXJBIW.js +1 -0
  116. package/dist/client/assets/chunks/chunk-KZO2GZL7.js +1 -0
  117. package/dist/client/assets/chunks/chunk-L2REESOQ.js +1 -0
  118. package/dist/client/assets/chunks/chunk-LJPJXR7R.js +1 -0
  119. package/dist/client/assets/chunks/chunk-LOEZMLCI.js +1 -0
  120. package/dist/client/assets/chunks/chunk-MLYC6FSE.js +1 -0
  121. package/dist/client/assets/chunks/chunk-MMDGEZYU.js +1 -0
  122. package/dist/client/assets/chunks/chunk-MYXE7CGE.js +1 -0
  123. package/dist/client/assets/chunks/chunk-NBH7YOBD.js +15 -0
  124. package/dist/client/assets/chunks/chunk-NCOVM3YF.js +1 -0
  125. package/dist/client/assets/chunks/chunk-NCWOBVU7.js +1 -0
  126. package/dist/client/assets/chunks/chunk-NLRIHHEH.js +1 -0
  127. package/dist/client/assets/chunks/chunk-NUPEOYK6.js +1 -0
  128. package/dist/client/assets/chunks/chunk-O4MVOA7X.js +1 -0
  129. package/dist/client/assets/chunks/chunk-OBHQQZ4H.js +1 -0
  130. package/dist/client/assets/chunks/chunk-OKPNJIIR.js +1 -0
  131. package/dist/client/assets/chunks/chunk-OLMPB57R.js +1 -0
  132. package/dist/client/assets/chunks/chunk-P2FYOAEV.js +1 -0
  133. package/dist/client/assets/chunks/chunk-PI3SNP4C.js +1 -0
  134. package/dist/client/assets/chunks/chunk-PRDTEROB.js +1 -0
  135. package/dist/client/assets/chunks/chunk-PZELHD2H.js +136 -0
  136. package/dist/client/assets/chunks/chunk-QR2Q34LM.js +1 -0
  137. package/dist/client/assets/chunks/chunk-R4GIXL6S.js +1 -0
  138. package/dist/client/assets/chunks/chunk-RORF4F5V.js +1 -0
  139. package/dist/client/assets/chunks/chunk-S73BYTLL.js +1 -0
  140. package/dist/client/assets/chunks/chunk-SFC5MRYR.js +1 -0
  141. package/dist/client/assets/chunks/chunk-SVM2H22K.js +2 -0
  142. package/dist/client/assets/chunks/chunk-SZ6UCGVD.js +1 -0
  143. package/dist/client/assets/chunks/chunk-SZYM6GIJ.js +127 -0
  144. package/dist/client/assets/chunks/chunk-TT5KJZKM.js +1 -0
  145. package/dist/client/assets/chunks/chunk-UFBKUYNH.js +1 -0
  146. package/dist/client/assets/chunks/chunk-UL57AD4T.js +1 -0
  147. package/dist/client/assets/chunks/chunk-UNEI7LMM.js +1 -0
  148. package/dist/client/assets/chunks/chunk-VNQBBFIY.js +1 -0
  149. package/dist/client/assets/chunks/chunk-WGVITPII.js +1 -0
  150. package/dist/client/assets/chunks/chunk-WRA6KJHX.js +10 -0
  151. package/dist/client/assets/chunks/chunk-WS5EHW43.js +1 -0
  152. package/dist/client/assets/chunks/chunk-XE6SLBBE.js +3 -0
  153. package/dist/client/assets/chunks/chunk-XF5T2P7U.js +72 -0
  154. package/dist/client/assets/chunks/chunk-XFRY5WKO.js +1 -0
  155. package/dist/client/assets/chunks/chunk-XWYV4OPA.js +1 -0
  156. package/dist/client/assets/chunks/chunk-YCE5ECKY.js +1 -0
  157. package/dist/client/assets/chunks/chunk-YIN5CSIF.js +1 -0
  158. package/dist/client/assets/chunks/chunk-YLFUX6XH.js +1 -0
  159. package/dist/client/assets/chunks/chunk-YNXJICZM.js +1 -0
  160. package/dist/client/assets/chunks/chunk-YOHF7NGD.js +1 -0
  161. package/dist/client/assets/chunks/chunk-YORIST7Z.js +1 -0
  162. package/dist/client/assets/chunks/chunk-YUL7CG4R.js +1 -0
  163. package/dist/client/assets/chunks/chunk-YUN7JSFJ.js +2 -0
  164. package/dist/client/assets/chunks/chunk-YZ7D2IT7.js +1 -0
  165. package/dist/client/assets/chunks/chunk-Z7LAPMFJ.js +1 -0
  166. package/dist/client/assets/chunks/chunk-ZE325LPC.js +1 -0
  167. package/dist/client/assets/chunks/chunk-ZN7TN6PO.js +1 -0
  168. package/dist/client/assets/chunks/chunk-ZST3EVPO.js +1 -0
  169. package/dist/client/assets/chunks/chunk-ZZHMDDZN.js +1 -0
  170. package/dist/client/assets/chunks/clarity-RKRYQ7WF.js +1 -0
  171. package/dist/client/assets/chunks/classDiagram-v2-L25IHNXF-Y67HVDZV.js +217 -0
  172. package/dist/client/assets/chunks/clojure-2X2DQECJ.js +1 -0
  173. package/dist/client/assets/chunks/cmake-LH5524XE.js +1 -0
  174. package/dist/client/assets/chunks/cobol-7DALQF3W.js +1 -0
  175. package/dist/client/assets/chunks/codeowners-52SZU5P5.js +1 -0
  176. package/dist/client/assets/chunks/codeql-EISH3KUP.js +1 -0
  177. package/dist/client/assets/chunks/coffee-VAWSGA7Y.js +1 -0
  178. package/dist/client/assets/chunks/common-lisp-4MVK2AN6.js +1 -0
  179. package/dist/client/assets/chunks/coq-4VRYZRZV.js +1 -0
  180. package/dist/client/assets/chunks/core-BRBMZSD2.js +12 -0
  181. package/dist/client/assets/chunks/cose-bilkent-JH36ORCC-BIOOHSAA.js +1 -0
  182. package/dist/client/assets/chunks/cpp-RFECMSKD.js +1 -0
  183. package/dist/client/assets/chunks/crystal-ZBGGFAOI.js +1 -0
  184. package/dist/client/assets/chunks/csharp-BZDPMKKW.js +1 -0
  185. package/dist/client/assets/chunks/css-3WWGM6UD.js +1 -0
  186. package/dist/client/assets/chunks/csv-AB4GNWSB.js +1 -0
  187. package/dist/client/assets/chunks/cue-2E46MZP2.js +1 -0
  188. package/dist/client/assets/chunks/cynefin-EF2NZ3EQ-TLFQLWUN.js +1 -0
  189. package/dist/client/assets/chunks/cynefinDiagram-L36ESFBY-FLPXCSSG.js +62 -0
  190. package/dist/client/assets/chunks/cypher-HR3ILFOL.js +1 -0
  191. package/dist/client/assets/chunks/d-TARSZPOL.js +1 -0
  192. package/dist/client/assets/chunks/dagre-SPEB5RXH-7EGEINJ2.js +4 -0
  193. package/dist/client/assets/chunks/dart-SALLJHVI.js +1 -0
  194. package/dist/client/assets/chunks/dax-WYMRGMXC.js +1 -0
  195. package/dist/client/assets/chunks/desktop-ND5CGLLJ.js +1 -0
  196. package/dist/client/assets/chunks/diagram-3B7GL73J-6USY4HZX.js +200 -0
  197. package/dist/client/assets/chunks/diagram-DNEMPZML-BNSOC4VW.js +24 -0
  198. package/dist/client/assets/chunks/diagram-L3MUGCDN-5V5FZYIG.js +41 -0
  199. package/dist/client/assets/chunks/diagram-LA4NIPWU-25VLY2CO.js +24 -0
  200. package/dist/client/assets/chunks/diagram-MHCOC4E2-G2LFP3JU.js +3 -0
  201. package/dist/client/assets/chunks/diagram-XPFHEONP-E6HBBIBV.js +30 -0
  202. package/dist/client/assets/chunks/diff-PWYGPM7B.js +1 -0
  203. package/dist/client/assets/chunks/docker-A4D7DT7W.js +1 -0
  204. package/dist/client/assets/chunks/dotenv-VWQWV2DY.js +1 -0
  205. package/dist/client/assets/chunks/dream-maker-M5YDQS35.js +1 -0
  206. package/dist/client/assets/chunks/ebnfDiagram-UZSYDL2S-BMXXZZPI.js +1 -0
  207. package/dist/client/assets/chunks/edge-3QXIDJHI.js +1 -0
  208. package/dist/client/assets/chunks/elixir-3OX2UHIZ.js +1 -0
  209. package/dist/client/assets/chunks/elk-XV6XMXQE-IPR65FON.js +27 -0
  210. package/dist/client/assets/chunks/elm-CTS65NCT.js +1 -0
  211. package/dist/client/assets/chunks/emacs-lisp-HHS2IDO7.js +1 -0
  212. package/dist/client/assets/chunks/engine-javascript-DNHSF67B.js +141 -0
  213. package/dist/client/assets/chunks/erDiagram-EYBAPDEH-3GEHFWHG.js +99 -0
  214. package/dist/client/assets/chunks/erb-ICYWK6HS.js +1 -0
  215. package/dist/client/assets/chunks/erlang-BDQPNCKX.js +1 -0
  216. package/dist/client/assets/chunks/eventmodeling-K75KTNOO-B27BJTZL.js +1 -0
  217. package/dist/client/assets/chunks/fennel-4ONBA2PH.js +1 -0
  218. package/dist/client/assets/chunks/fish-ATLPBZSD.js +1 -0
  219. package/dist/client/assets/chunks/flowDiagram-MALGAFMO-5PCLR4AE.js +1 -0
  220. package/dist/client/assets/chunks/fluent-GGMONBVW.js +1 -0
  221. package/dist/client/assets/chunks/fortran-fixed-form-5MSBDRWQ.js +1 -0
  222. package/dist/client/assets/chunks/fortran-free-form-TT3RBL75.js +1 -0
  223. package/dist/client/assets/chunks/fsharp-PAGHNW4O.js +1 -0
  224. package/dist/client/assets/chunks/ganttDiagram-23REXITY-VE5MVBTO.js +292 -0
  225. package/dist/client/assets/chunks/gdresource-5OTP326D.js +1 -0
  226. package/dist/client/assets/chunks/gdscript-VPWHSCLF.js +1 -0
  227. package/dist/client/assets/chunks/gdshader-FYLPXFE5.js +1 -0
  228. package/dist/client/assets/chunks/genie-UYMEEMA2.js +1 -0
  229. package/dist/client/assets/chunks/gherkin-SU7D5DMY.js +1 -0
  230. package/dist/client/assets/chunks/git-commit-5CF5QAG7.js +1 -0
  231. package/dist/client/assets/chunks/git-rebase-X72BAUZI.js +1 -0
  232. package/dist/client/assets/chunks/gitGraph-VSP46ZUC-J6CJ5YZF.js +1 -0
  233. package/dist/client/assets/chunks/gitGraphDiagram-STJD7YCW-7YJGT6ZP.js +106 -0
  234. package/dist/client/assets/chunks/gleam-LR42YRKO.js +1 -0
  235. package/dist/client/assets/chunks/glimmer-js-JPF67FJU.js +1 -0
  236. package/dist/client/assets/chunks/glimmer-ts-BYPAVIZT.js +1 -0
  237. package/dist/client/assets/chunks/glsl-GTGUULBN.js +1 -0
  238. package/dist/client/assets/chunks/gn-NMDQA4K3.js +1 -0
  239. package/dist/client/assets/chunks/gnuplot-UUAMYBCZ.js +1 -0
  240. package/dist/client/assets/chunks/go-4RERSTNP.js +1 -0
  241. package/dist/client/assets/chunks/graphql-5A6RK6YF.js +1 -0
  242. package/dist/client/assets/chunks/groovy-O7BJONCU.js +1 -0
  243. package/dist/client/assets/chunks/hack-7QGTNPDP.js +1 -0
  244. package/dist/client/assets/chunks/haml-ON5GAWN4.js +1 -0
  245. package/dist/client/assets/chunks/handlebars-6UOQSUBP.js +1 -0
  246. package/dist/client/assets/chunks/haskell-OIZXZ26Y.js +1 -0
  247. package/dist/client/assets/chunks/haxe-7FFVS4FO.js +1 -0
  248. package/dist/client/assets/chunks/hcl-XFUFQJHV.js +1 -0
  249. package/dist/client/assets/chunks/hjson-QDBHMTD5.js +1 -0
  250. package/dist/client/assets/chunks/hlsl-4LP25FFN.js +1 -0
  251. package/dist/client/assets/chunks/html-7RNQXAAV.js +1 -0
  252. package/dist/client/assets/chunks/html-derivative-ESOY72Q2.js +1 -0
  253. package/dist/client/assets/chunks/http-SAD4PMBD.js +1 -0
  254. package/dist/client/assets/chunks/hurl-ZSJJXPQH.js +1 -0
  255. package/dist/client/assets/chunks/hxml-HJCC37RK.js +1 -0
  256. package/dist/client/assets/chunks/hy-CLDE3P4K.js +1 -0
  257. package/dist/client/assets/chunks/imba-REB34U5V.js +1 -0
  258. package/dist/client/assets/chunks/info-OHQRW6UA-EQQKXR77.js +1 -0
  259. package/dist/client/assets/chunks/infoDiagram-KBXO4MBG-F6KGZCGS.js +2 -0
  260. package/dist/client/assets/chunks/ini-PDFEMGRA.js +1 -0
  261. package/dist/client/assets/chunks/ishikawaDiagram-M35NCXHK-5D6ZOZ34.js +70 -0
  262. package/dist/client/assets/chunks/java-KB6XENAD.js +1 -0
  263. package/dist/client/assets/chunks/javascript-3JX5T423.js +1 -0
  264. package/dist/client/assets/chunks/jinja-V4UNU6K4.js +1 -0
  265. package/dist/client/assets/chunks/jison-KH5XNLJP.js +1 -0
  266. package/dist/client/assets/chunks/journeyDiagram-OPLOXDXO-ANDOJZKW.js +139 -0
  267. package/dist/client/assets/chunks/json-HPXFRRPY.js +1 -0
  268. package/dist/client/assets/chunks/json5-LJM6TXWM.js +1 -0
  269. package/dist/client/assets/chunks/jsonc-UZWRU3JV.js +1 -0
  270. package/dist/client/assets/chunks/jsonl-RFZD5UN4.js +1 -0
  271. package/dist/client/assets/chunks/jsonnet-GFZABBL6.js +1 -0
  272. package/dist/client/assets/chunks/jssm-2YIGBISJ.js +1 -0
  273. package/dist/client/assets/chunks/jsx-KLV2ZWUT.js +1 -0
  274. package/dist/client/assets/chunks/julia-3TZDIPPO.js +1 -0
  275. package/dist/client/assets/chunks/just-UHCONBQS.js +1 -0
  276. package/dist/client/assets/chunks/kanban-definition-BZKZHSQY-GF5I5NVD.js +89 -0
  277. package/dist/client/assets/chunks/katex-PIN72PQZ.js +257 -0
  278. package/dist/client/assets/chunks/kdl-DARTFOCL.js +1 -0
  279. package/dist/client/assets/chunks/kotlin-7KT5DW6Y.js +1 -0
  280. package/dist/client/assets/chunks/kusto-EKYXZTC5.js +1 -0
  281. package/dist/client/assets/chunks/langs-GO3UQR4H.js +1 -0
  282. package/dist/client/assets/chunks/latex-T57MIHR5.js +1 -0
  283. package/dist/client/assets/chunks/lean-5QVPRMV6.js +1 -0
  284. package/dist/client/assets/chunks/less-K6QEH5TN.js +1 -0
  285. package/dist/client/assets/chunks/liquid-3LCNNEIV.js +1 -0
  286. package/dist/client/assets/chunks/llvm-O32ZIVRF.js +1 -0
  287. package/dist/client/assets/chunks/log-C4YPJ5BB.js +1 -0
  288. package/dist/client/assets/chunks/logo-JPMO43A6.js +1 -0
  289. package/dist/client/assets/chunks/lua-YKVSOG7K.js +1 -0
  290. package/dist/client/assets/chunks/luau-K4EECYSO.js +1 -0
  291. package/dist/client/assets/chunks/make-VHSYMHHW.js +1 -0
  292. package/dist/client/assets/chunks/markdown-GC5J46H4.js +1 -0
  293. package/dist/client/assets/chunks/marko-U45YFADC.js +1 -0
  294. package/dist/client/assets/chunks/matlab-AMOKC4LU.js +1 -0
  295. package/dist/client/assets/chunks/mdc-DIGA2UXP.js +1 -0
  296. package/dist/client/assets/chunks/mdx-BZUGCKQA.js +1 -0
  297. package/dist/client/assets/chunks/mermaid-WHDP6ZPA.js +1 -0
  298. package/dist/client/assets/chunks/mermaid.core-SQMPMUDN.js +10 -0
  299. package/dist/client/assets/chunks/mindmap-definition-I2QAS2VK-4NH5S56C.js +98 -0
  300. package/dist/client/assets/chunks/mipsasm-2S4CUGQV.js +1 -0
  301. package/dist/client/assets/chunks/mojo-ZOL2PNKT.js +1 -0
  302. package/dist/client/assets/chunks/moonbit-U3BDAIFE.js +1 -0
  303. package/dist/client/assets/chunks/move-YSXALBWA.js +1 -0
  304. package/dist/client/assets/chunks/narrat-DHFIAUJH.js +1 -0
  305. package/dist/client/assets/chunks/nextflow-ESAKNTI3.js +1 -0
  306. package/dist/client/assets/chunks/nextflow-groovy-FKDSPJUI.js +1 -0
  307. package/dist/client/assets/chunks/nginx-XYAYERLO.js +1 -0
  308. package/dist/client/assets/chunks/nim-XOWBVFDH.js +1 -0
  309. package/dist/client/assets/chunks/nix-RVSTQSHC.js +1 -0
  310. package/dist/client/assets/chunks/nsis-KMDUKQRL.js +1 -0
  311. package/dist/client/assets/chunks/nushell-SKJHHZ7U.js +1 -0
  312. package/dist/client/assets/chunks/objective-c-3B3KXQ7Q.js +1 -0
  313. package/dist/client/assets/chunks/objective-cpp-6JDULPJS.js +1 -0
  314. package/dist/client/assets/chunks/ocaml-TMRFXBVO.js +1 -0
  315. package/dist/client/assets/chunks/odin-IN3PLCK7.js +1 -0
  316. package/dist/client/assets/chunks/openscad-P52IKPNH.js +1 -0
  317. package/dist/client/assets/chunks/org-N3SJ2PIA.js +1 -0
  318. package/dist/client/assets/chunks/packet-JDAUHWVQ-4SWIKSKP.js +1 -0
  319. package/dist/client/assets/chunks/pascal-T7CUWCQ4.js +1 -0
  320. package/dist/client/assets/chunks/pegDiagram-FD4XPPHP-WDKZSEGN.js +1 -0
  321. package/dist/client/assets/chunks/perl-LCZ4KODH.js +1 -0
  322. package/dist/client/assets/chunks/php-4XHMBVR5.js +1 -0
  323. package/dist/client/assets/chunks/pie-XZMESJXO-PSSWOWGV.js +1 -0
  324. package/dist/client/assets/chunks/pieDiagram-J4AKIIQI-BDW5I5ON.js +39 -0
  325. package/dist/client/assets/chunks/pkl-OACG5B67.js +1 -0
  326. package/dist/client/assets/chunks/plsql-7E5C7CJX.js +1 -0
  327. package/dist/client/assets/chunks/po-ZSREFRRP.js +1 -0
  328. package/dist/client/assets/chunks/polar-4GBINVA7.js +1 -0
  329. package/dist/client/assets/chunks/postcss-B7RPVGFW.js +1 -0
  330. package/dist/client/assets/chunks/powerquery-6UFMTY4G.js +1 -0
  331. package/dist/client/assets/chunks/powershell-3STRPCNT.js +1 -0
  332. package/dist/client/assets/chunks/prisma-4TPSPIZ5.js +1 -0
  333. package/dist/client/assets/chunks/prolog-HEAYPKQW.js +1 -0
  334. package/dist/client/assets/chunks/proto-Y3Y3VKXM.js +1 -0
  335. package/dist/client/assets/chunks/pug-7PBPMG3M.js +1 -0
  336. package/dist/client/assets/chunks/puppet-FR35R4OI.js +1 -0
  337. package/dist/client/assets/chunks/purescript-OUHXQAOW.js +1 -0
  338. package/dist/client/assets/chunks/python-SNDG7FNU.js +1 -0
  339. package/dist/client/assets/chunks/qml-UVIOSWP4.js +1 -0
  340. package/dist/client/assets/chunks/qmldir-6JGUNYL5.js +1 -0
  341. package/dist/client/assets/chunks/qss-ZCC466IZ.js +1 -0
  342. package/dist/client/assets/chunks/quadrantDiagram-XTYBLID2-5VKXWVJ6.js +7 -0
  343. package/dist/client/assets/chunks/r-4XW4O3ZF.js +1 -0
  344. package/dist/client/assets/chunks/racket-YJAYXOOG.js +1 -0
  345. package/dist/client/assets/chunks/radar-ABXABTNO-3AXZCEY2.js +1 -0
  346. package/dist/client/assets/chunks/railroad-I3PHUGI6-2PLXYPOT.js +1 -0
  347. package/dist/client/assets/chunks/railroad-abnf-LNEFI6M7-M4DGICQX.js +1 -0
  348. package/dist/client/assets/chunks/railroad-ebnf-DWYD2UWJ-UEIHQMSZ.js +1 -0
  349. package/dist/client/assets/chunks/railroad-peg-JR7BVNR7-I7VLIBXM.js +1 -0
  350. package/dist/client/assets/chunks/railroadDiagram-MRQ6NCDL-Y6IYWEFL.js +1 -0
  351. package/dist/client/assets/chunks/raku-63NEL5JK.js +1 -0
  352. package/dist/client/assets/chunks/razor-J3CJP523.js +1 -0
  353. package/dist/client/assets/chunks/rbs-6GQLT7NW.js +1 -0
  354. package/dist/client/assets/chunks/reg-6Q3OEC2C.js +1 -0
  355. package/dist/client/assets/chunks/regexp-LPIMILT3.js +1 -0
  356. package/dist/client/assets/chunks/rel-TOQGUTHB.js +1 -0
  357. package/dist/client/assets/chunks/requirementDiagram-Y7LWUY3S-CIWXVVWJ.js +84 -0
  358. package/dist/client/assets/chunks/riscv-UELGBOXE.js +1 -0
  359. package/dist/client/assets/chunks/ron-FW7LCJJH.js +1 -0
  360. package/dist/client/assets/chunks/rosmsg-O63VHE3L.js +1 -0
  361. package/dist/client/assets/chunks/rst-3WJXGLA7.js +1 -0
  362. package/dist/client/assets/chunks/ruby-7S7L6JTH.js +1 -0
  363. package/dist/client/assets/chunks/rust-LIK4HRRI.js +1 -0
  364. package/dist/client/assets/chunks/sankeyDiagram-WGJFYUXA-OGNQPX5V.js +40 -0
  365. package/dist/client/assets/chunks/sas-FHDPZ2JH.js +1 -0
  366. package/dist/client/assets/chunks/sass-UI4HW2FN.js +1 -0
  367. package/dist/client/assets/chunks/scala-KN7RQSUJ.js +1 -0
  368. package/dist/client/assets/chunks/scheme-5R527YZ5.js +1 -0
  369. package/dist/client/assets/chunks/scss-KZ6DRE4A.js +1 -0
  370. package/dist/client/assets/chunks/sdbl-FHOCL5SL.js +1 -0
  371. package/dist/client/assets/chunks/sequenceDiagram-5NDRBG5M-QX2V24ZU.js +169 -0
  372. package/dist/client/assets/chunks/shaderlab-2TLHUS2H.js +1 -0
  373. package/dist/client/assets/chunks/shellscript-PIB6ZBDM.js +1 -0
  374. package/dist/client/assets/chunks/shellsession-5KL7NFNN.js +1 -0
  375. package/dist/client/assets/chunks/sizeCapture-INFHLROL-LCS2PIHM.js +1 -0
  376. package/dist/client/assets/chunks/smalltalk-JFLFU247.js +1 -0
  377. package/dist/client/assets/chunks/smithy-HONEXZAM.js +1 -0
  378. package/dist/client/assets/chunks/solidity-SJ3INJFZ.js +1 -0
  379. package/dist/client/assets/chunks/soy-ND4SWTM2.js +1 -0
  380. package/dist/client/assets/chunks/sparql-YB2JQBZD.js +1 -0
  381. package/dist/client/assets/chunks/splunk-UXIDDAWL.js +1 -0
  382. package/dist/client/assets/chunks/sql-K6OMG7SQ.js +1 -0
  383. package/dist/client/assets/chunks/ssh-config-I7KJY3KQ.js +1 -0
  384. package/dist/client/assets/chunks/stata-DNZ3DTFJ.js +1 -0
  385. package/dist/client/assets/chunks/stateDiagram-v2-FJ4FJNEA-LVAUWF3A.js +291 -0
  386. package/dist/client/assets/chunks/stylus-GWPR6IQY.js +1 -0
  387. package/dist/client/assets/chunks/surrealql-KQNHBWLC.js +1 -0
  388. package/dist/client/assets/chunks/svelte-YQKF25S4.js +1 -0
  389. package/dist/client/assets/chunks/swift-ZCIZUJXA.js +1 -0
  390. package/dist/client/assets/chunks/swimlanes-UMQ2AFYF-B3RQOARQ.js +1 -0
  391. package/dist/client/assets/chunks/swimlanesDiagram-OMPLPG4O-JOE33EOV.js +8 -0
  392. package/dist/client/assets/chunks/system-verilog-Y7E6FIO3.js +1 -0
  393. package/dist/client/assets/chunks/systemd-WHC7NBZP.js +1 -0
  394. package/dist/client/assets/chunks/talonscript-WC7SODAH.js +1 -0
  395. package/dist/client/assets/chunks/tasl-QHY2GTCB.js +1 -0
  396. package/dist/client/assets/chunks/tcl-VAMIL5PJ.js +1 -0
  397. package/dist/client/assets/chunks/temml-ISNSX3VV.js +96 -0
  398. package/dist/client/assets/chunks/templ-B3BHKWV4.js +1 -0
  399. package/dist/client/assets/chunks/terraform-Q4UEK6FK.js +1 -0
  400. package/dist/client/assets/chunks/tex-63OWCYAB.js +1 -0
  401. package/dist/client/assets/chunks/timeline-definition-SEUHKTQE-FDFTVAJG.js +120 -0
  402. package/dist/client/assets/chunks/toml-7Z4IPGES.js +1 -0
  403. package/dist/client/assets/chunks/treeView-D4JQ5SDB-ABSGRAGI.js +1 -0
  404. package/dist/client/assets/chunks/treemap-SAJKECNS-MYX2CBJN.js +1 -0
  405. package/dist/client/assets/chunks/ts-tags-DT62HE52.js +1 -0
  406. package/dist/client/assets/chunks/tsv-RTXHWADP.js +1 -0
  407. package/dist/client/assets/chunks/tsx-UANUBOC7.js +1 -0
  408. package/dist/client/assets/chunks/turtle-QVOUNUUL.js +1 -0
  409. package/dist/client/assets/chunks/twig-ZPC4BPDA.js +1 -0
  410. package/dist/client/assets/chunks/typescript-WGWKIMMW.js +1 -0
  411. package/dist/client/assets/chunks/typespec-TYCVR32J.js +1 -0
  412. package/dist/client/assets/chunks/typst-PIBFYUO6.js +1 -0
  413. package/dist/client/assets/chunks/usecaseDiagram-AFA6YXN4-KW7ADINR.js +370 -0
  414. package/dist/client/assets/chunks/v-3ERNWBSP.js +1 -0
  415. package/dist/client/assets/chunks/vala-UCBCT2GS.js +1 -0
  416. package/dist/client/assets/chunks/vb-DGI3VTPA.js +1 -0
  417. package/dist/client/assets/chunks/vennDiagram-NNMJR3RB-RDGLGOGM.js +34 -0
  418. package/dist/client/assets/chunks/verilog-G72NZROS.js +1 -0
  419. package/dist/client/assets/chunks/vhdl-PYGA77XE.js +1 -0
  420. package/dist/client/assets/chunks/viml-OOC5B5UU.js +1 -0
  421. package/dist/client/assets/chunks/vue-GTNHIOPG.js +1 -0
  422. package/dist/client/assets/chunks/vue-html-DKAMJV55.js +1 -0
  423. package/dist/client/assets/chunks/vue-vine-WTM5HREV.js +1 -0
  424. package/dist/client/assets/chunks/vyper-RHYEHOJM.js +1 -0
  425. package/dist/client/assets/chunks/wardley-7MLQ67FV-QJL2HSBT.js +1 -0
  426. package/dist/client/assets/chunks/wardleyDiagram-S7YFUSEH-A4XX3UJR.js +78 -0
  427. package/dist/client/assets/chunks/wasm-ZMM2Z5XV.js +1 -0
  428. package/dist/client/assets/chunks/wenyan-HF5UTKSJ.js +1 -0
  429. package/dist/client/assets/chunks/wgsl-O7D7OPO7.js +1 -0
  430. package/dist/client/assets/chunks/wikitext-T7BSWSKQ.js +1 -0
  431. package/dist/client/assets/chunks/wit-TKCHPPT6.js +1 -0
  432. package/dist/client/assets/chunks/wolfram-7MN66A7N.js +1 -0
  433. package/dist/client/assets/chunks/xml-NLTLAWOD.js +1 -0
  434. package/dist/client/assets/chunks/xsl-NZ4ECK3P.js +1 -0
  435. package/dist/client/assets/chunks/xychartDiagram-GGNKY7IX-OXJILWHR.js +7 -0
  436. package/dist/client/assets/chunks/yaml-HRJLEV3V.js +1 -0
  437. package/dist/client/assets/chunks/zenscript-4LLRSLPI.js +1 -0
  438. package/dist/client/assets/chunks/zig-Y7MUQFUO.js +1 -0
  439. package/dist/client/assets/main.js +186 -0
  440. package/dist/client/index.html +48 -0
  441. package/dist/config.js +322 -0
  442. package/dist/files.js +178 -0
  443. package/dist/git.js +365 -0
  444. package/dist/glob.js +89 -0
  445. package/dist/review.js +290 -0
  446. package/dist/search.js +136 -0
  447. package/dist/server.js +482 -0
  448. package/dist/watch.js +69 -0
  449. package/dist/zip.js +100 -0
  450. package/package.json +61 -4
@@ -0,0 +1,200 @@
1
+ import{a as Ut,b as jt}from"./chunk-JMUVGGX7.js";import{a as _1}from"./chunk-NBH7YOBD.js";import{a as v1}from"./chunk-PI3SNP4C.js";import{b as x1,c as T1}from"./chunk-WS5EHW43.js";import{a as F1}from"./chunk-YCE5ECKY.js";import"./chunk-25KVF5ZE.js";import"./chunk-WRA6KJHX.js";import"./chunk-O4MVOA7X.js";import"./chunk-VNQBBFIY.js";import{h as D1}from"./chunk-GQJIKV3T.js";import{h as S1}from"./chunk-JCWYZ7X2.js";import"./chunk-UNEI7LMM.js";import"./chunk-YORIST7Z.js";import{b as m1,c as A1,d as E1,f as C1}from"./chunk-HIGPS4L2.js";import"./chunk-XF5T2P7U.js";import"./chunk-OBHQQZ4H.js";import{q as Lt,t as Bt}from"./chunk-FNOXGAL5.js";import"./chunk-EO3ER3GN.js";import{$ as zt,N as l1,T as c1,U as d1,V as h1,W as p1,X as f1,Y as g1,Z as b1,_ as de,a as o1,aa as k1,b as u1}from"./chunk-SZYM6GIJ.js";import{b as re,d as It}from"./chunk-5XZPGKN4.js";import{a as A}from"./chunk-EIBFAW37.js";import{a as a1}from"./chunk-FTY6WLQF.js";import"./chunk-7FMWBHZO.js";var tt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},W1=new Set([tt.SHAPE_UNSUPPORTED,tt.SHAPE_REMOVED,tt.CONTAINMENT_VIOLATION]),Fs=new Set(Object.values(tt).filter(s=>!W1.has(s))),K1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),H1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),Y1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),$e="roundedRect";function et(s){return s&&(K1.get(s)??s)}A(et,"resolveShapeAlias");function I1(s,i){for(let r of s)if(!r.isGroup){if((!r.shape||r.shape==="squareRect"||r.shape==="rect")&&(r.shape=$e),H1.has(r.shape)){let n=`shape "${r.shape}" was removed in v0.8.1, using "${$e}"`;i?.emitError?i.emitError("SHAPE_REMOVED",n,{nodeId:r.id}):re.warn(`agentflow: ${n}`),r.shape=$e;continue}if(!Y1.has(r.shape)){let n=`shape "${r.shape}" is not supported, using "${$e}"`;i?.emitWarning?i.emitWarning("SHAPE_UNSUPPORTED",n,{nodeId:r.id}):re.warn(`agentflow: ${n}`),r.shape=$e}}}A(I1,"normaliseNodeShapes");var yt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),L1=yt.size,B1=A(s=>`af-kind-${s}`,"kindClass"),q1=[...yt.keys()],M1=A(s=>Math.max(1,s-L1),"containerSlotCount"),y1=A((s,i)=>{let r=L1+s%M1(i);return i>0?r%i:r},"containerSlot");function w1(s,i,r){let n=de().themeVariables?.borderColorArray,u=Array.isArray(n)?n.length:0,l=r.size;for(let c of s??[]){if(c.isGroup||c.shape==="collapsedGroup"){let h=r.get(String(c.id))??l++;c.colorIndex=y1(h,u);continue}let a=i(String(c.id));a&&yt.has(a)&&(c.cssClasses=`${c.cssClasses??""} ${B1(a)}`.replace(/\s+/g," ").trim())}}A(w1,"assignColorSlots");var V1="agentflow-",Wt=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),X1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),Q1={flow:"flowGroup"};function Mt(s){if(Array.isArray(s))return s.map(r=>Mt(r));if(s===null||typeof s!="object")return s;let i={};for(let r of Object.keys(s))r==="__proto__"||r==="constructor"||r==="prototype"||(i[r]=Mt(s[r]));return i}A(Mt,"stripPrototypeKeys");function N1(s){let i=!1,r=!1,n=0,u,l=[];for(let c of s.split(`
2
+ `)){if(u!==void 0){let p=c.length-c.trimStart().length;if(c.trim()===""||p>u){l.push(c);continue}u=void 0}let a=-1;for(let p=0;p<c.length;p++){let m=c[p];if(r)m==="\\"?p++:m==='"'&&(r=!1);else if(i)m==="'"&&(i=!1);else if(m==='"')r=!0;else if(m==="'")i=!0;else if(m==="#"&&(p===0||c[p-1]===" "||c[p-1]===" ")){a=p;break}else m==="["||m==="{"?n++:(m==="]"||m==="}")&&(n=Math.max(0,n-1))}if(i||r||n>0){l.push(c);continue}let h=a>=0?c.slice(0,a):c,g=a>=0?c.slice(a):"";if(/:\s*[>|][\d+-]*\s*$/.test(h)){u=c.length-c.trimStart().length,l.push(c);continue}l.push(h.replace(/,([\t ]*)$/,"$1")+g)}return l.join(`
3
+ `)}A(N1,"stripLineTrailingCommas");var Ze,J1=(Ze=class{constructor(){this.vertexCounter=0,this.config=de(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=d1,this.setAccDescription=p1,this.setDiagramTitle=g1,this.getAccTitle=h1,this.getAccDescription=f1,this.getDiagramTitle=b1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return l1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(let r of this.vertices.values())if(r.id===i)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,r,n,u,l,c,a={},h,g){if(!i||i.trim().length===0)return;let p;if(h!==void 0){let b;h.includes(`
4
+ `)?b=h+`
5
+ `:b=`{
6
+ `+h+`
7
+ }`;try{p=jt(b,{schema:Ut})??{}}catch(d){let f=h.includes(`
8
+ `)?N1(h):h;if(f!==h)try{p=jt(f+`
9
+ `,{schema:Ut})??{}}catch{this.rethrowMetadataYamlError(d,h,g)}else this.rethrowMetadataYamlError(d,h,g)}p=Mt(p)}let m;if(p&&typeof p.shape=="string"){let b=p;m=b.shape;let d=et(m);d&&d!==m&&(b.shape=d)}let x=this.subGraphLookup.get(i);if(x&&p){x.metadata={...x.metadata,...p};return}let L=this.connectors.get(i);if(L&&p){L.metadata={...L.metadata,...p};return}if(i==="connectors")return;let C=this.edges.find(b=>b.id===i);if(C){let b=p;b?.animate!==void 0&&(C.animate=b.animate),b?.animation!==void 0&&(C.animation=b.animation),b?.curve!==void 0&&(C.interpolate=b.curve),p&&(C.metadata={...C.metadata,...p});return}let M,T=this.vertices.get(i);if(T===void 0&&(T={id:i,labelType:"text",domId:V1+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,T)),this.vertexCounter++,r!==void 0?(this.config=de(),M=this.sanitizeText(r.text.trim()),T.labelType=r.type,M.startsWith('"')&&M.endsWith('"')&&(M=M.substring(1,M.length-1)),T.text=M):T.text===void 0&&(T.text=i),n!==void 0&&(T.type=n),u?.forEach(b=>{T.styles.push(b)}),l?.forEach(b=>{T.classes.push(b)}),c!==void 0&&(T.dir=c),T.props===void 0?T.props=a:a!==void 0&&Object.assign(T.props,a),p){if(T.metadata={...T.metadata,...p},p.shape){let b=m??p.shape;if(typeof b!="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(b)}.`,g);if(b!==b.toLowerCase()||b.includes("_"))throw this.positionedShapeError(`No such shape: ${b}. Shape names should be lowercase.`,g);if(!S1(p.shape))throw this.positionedShapeError(`No such shape: ${p.shape}.`,g);T.type=p?.shape}p?.label&&(T.text=this.sanitizeText(p.label),T.labelType=this.sanitizeNodeLabelType(p?.labelType))}}positionedShapeError(i,r){let n=new Error(i);if(!r)return n;let u=r.first_line+this.frontmatterLineOffset;return Object.assign(n,{hash:{text:"",token:null,line:u-1,loc:{first_line:u,last_line:r.last_line+this.frontmatterLineOffset,first_column:r.first_column,last_column:r.last_column},expected:[]}}),n}rethrowMetadataYamlError(i,r,n){let u=i;if(!u||u.name!=="YAMLException"||!u.mark||!n)throw i;let l;try{let c=!r.includes(`
10
+ `),a=c?`{
11
+ `+r+`
12
+ }`:r+`
13
+ `,h=n.first_line+this.frontmatterLineOffset,g=n.first_column+2,p=A((b,d)=>c?{line:h,column:g+(b===1?d:0)}:{line:h+b,column:b===0?g+d:d},"toSource"),m=p(u.mark.line,u.mark.column),x=u.reason??(u.message??"").split(`
14
+ `)[0].replace(/\s*\(\d+:\d+\)\s*$/,""),L=a.split(`
15
+ `),C=[];if(c)C.push(1);else for(let b=u.mark.line-1;b<=u.mark.line+1;b++)b<0||b>=L.length||b===L.length-1&&L[b]===""&&b!==u.mark.line||C.push(b);let M=Math.max(...C.map(b=>String(p(b,0).line).length)),T=[];for(let b of C){let d=p(b,0).line,f=` ${String(d).padStart(M)} | `;T.push(f+L[b].replace(/\t/g,"\u2192")),b===u.mark.line&&T.push("-".repeat(f.length+u.mark.column)+"^")}l={message:`${x} (${m.line}:${m.column+1})
16
+
17
+ ${T.join(`
18
+ `)}`,markLine:m.line-1,markColumn:m.column,hash:{text:"",token:null,line:m.line-1,loc:{first_line:m.line,last_line:m.line,first_column:m.column,last_column:m.column+1},expected:[]}}}catch{}throw l&&(u.message=l.message,u.mark.line=l.markLine,u.mark.column=l.markColumn,u.hash=l.hash),u}addSingleLink(i,r,n,u){let a={start:i,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};re.info("abc78 Got edge...",a);let h=n.text;if(h!==void 0&&(a.text=this.sanitizeText(h.text.trim()),a.text.startsWith('"')&&a.text.endsWith('"')&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=this.sanitizeNodeLabelType(h.type)),n!==void 0&&(a.type=n.type,a.stroke=n.stroke,a.length=n.length>10?10:n.length,n.edgeSemantic&&(a.edgeSemantic=n.edgeSemantic)),u&&!this.edges.some(g=>g.id===u))a.id=u,a.isUserDefinedId=!0;else{let g=this.edges.filter(p=>p.start===a.start&&p.end===a.end);g.length===0?a.id=Bt(a.start,a.end,{counter:0,prefix:"L"}):a.id=Bt(a.start,a.end,{counter:g.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))re.info("Pushing edge..."),this.edges.push(a);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
19
+
20
+ Initialize mermaid with maxEdges set to a higher number to allow more edges.
21
+ You cannot set this config via configuration inside the diagram as it is a secure config.
22
+ You have to call mermaid.initialize.`)}isLinkData(i){return i!==null&&typeof i=="object"&&"id"in i&&typeof i.id=="string"}addLink(i,r,n){let u=this.isLinkData(n)?n.id.replace("@",""):void 0;re.info("addLink",i,r,u);for(let l of i)for(let c of r){let a=l===i[i.length-1],h=c===r[0];a&&h?this.addSingleLink(l,c,n,u):this.addSingleLink(l,c,n,void 0)}}updateLinkInterpolate(i,r){i.forEach(n=>{if(n==="default"){this.edges.defaultInterpolate=r;return}if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[n].interpolate=r})}updateLink(i,r){i.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(u=>u?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(i,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(u=>{let l=this.classes.get(u);l===void 0&&(l={id:u,styles:[],textStyles:[]},this.classes.set(u,l)),n?.forEach(c=>{if(/color/.exec(c)){let a=c.replace("fill","bgFill");l.textStyles.push(a)}l.styles.push(c)})})}setDirection(i){this.direction=i.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,r){for(let n of i.split(",")){let u=this.vertices.get(n);u&&u.classes.push(r);let l=this.edges.find(a=>a.id===n);l&&l.classes.push(r);let c=this.subGraphLookup.get(n);c&&c.classes.push(r)}}setTooltip(i,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(i,r,n){if(de().securityLevel!=="loose"||r===void 0)return;let u=[];if(typeof n=="string"){u=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let c=0;c<u.length;c++){let a=u[c].trim();a.startsWith('"')&&a.endsWith('"')&&(a=a.substr(1,a.length-2)),u[c]=a}}u.length===0&&u.push(i);let l=this.vertices.get(i);l&&(l.haveCallback=!0,this.funs.push(()=>{let c=this.lookUpDomId(i),a=document.querySelector(`[id="${c}"]`);a!==null&&a.addEventListener("click",()=>{Lt.runFunc(r,...u)},!1)}))}setLink(i,r,n){i.split(",").forEach(u=>{let l=this.vertices.get(u);l!==void 0&&(l.link=Lt.formatUrl(r,this.config),l.linkTarget=n)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,r,n){i.split(",").forEach(u=>{this.setClickFun(u,r,n)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(r=>{r(i)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(i){return X1.has(i.type)}getTools(){let i=[];for(let r of this.vertices.values())this.isToolDefinition(r)&&i.push(r);return i}getClasses(){return this.classes}setupToolTips(i){let r=D1();It(i).select("svg").selectAll("g.node").on("mouseover",l=>{let c=It(l.currentTarget),a=c.attr("title");if(a===null)return;let h=l.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(c.attr("title")).style("left",window.scrollX+h.left+(h.right-h.left)/2+"px").style("top",window.scrollY+h.bottom+"px"),r.html(a1.sanitize(a)),c.classed("hover",!0)}).on("mouseout",l=>{r.transition().duration(500).style("opacity",0),It(l.currentTarget).classed("hover",!1)})}clear(i="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=i,this.config=de(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,c1()}setGen(i){this.version=i||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(i,r,n,u){let l=i?.text?.trim(),c=n?.text;i===n&&n?.text&&/\s/.exec(n.text)&&(l=void 0);let h=A(C=>{let M={boolean:{},number:{},string:{}},T=[],b;return{nodeList:C.filter(function(f){let B=typeof f;return f.stmt&&f.stmt==="dir"?(b=f.value,!1):f.trim()===""?!1:B in M?M[B].hasOwnProperty(f)?!1:M[B][f]=!0:T.includes(f)?!1:T.push(f)}),dir:b}},"uniq")(r.flat()),g=h.nodeList,p=h.dir,m=de().flowchart??{};if(p=p??(m.inheritDir?this.getDirection()??de().direction??void 0:void 0),this.version==="gen-1")for(let C=0;C<g.length;C++)g[C]=this.lookUpDomId(g[C]);l=l??"subGraph"+this.subCount,c=c||"",c=this.sanitizeText(c),this.subCount=this.subCount+1;let x={id:l,nodes:g.filter(C=>C!==l&&!this.globalNodes.has(C)),title:c.trim(),classes:[],dir:p,labelType:this.sanitizeNodeLabelType(n?.type),type:u??"flow"};re.info("Adding",x.id,x.nodes,x.dir),x.nodes=this.makeUniq(x,this.subGraphs).nodes;let L=this.getPosForId(l);if(L!==-1){let C=this.subGraphs[L];for(let M of x.nodes)C.nodes.includes(M)||C.nodes.push(M);x.title&&(C.title=x.title),x.dir&&(C.dir=x.dir),x.type&&(C.type=x.type),this.subGraphLookup.set(l,C)}else this.subGraphs.push(x),this.subGraphLookup.set(l,x);return l}addGlobal(i){for(let r of i.flat()){if(typeof r!="string")continue;let n=r.trim();n!==""&&this.globalNodes.add(n)}for(let r of this.subGraphs)r.nodes=r.nodes.filter(n=>!this.globalNodes.has(n))}getPosForId(i){for(let[r,n]of this.subGraphs.entries())if(n.id===i)return r;return-1}indexNodes2(i,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===i)return{result:!0,count:0};let u=0,l=1;for(;u<n.length;){let c=this.getPosForId(n[u]);if(c>=0){let a=this.indexNodes2(i,c);if(a.result)return{result:!0,count:l+a.count};l=l+a.count}u=u+1}return{result:!1,count:l}}getDepthFirstPos(i){return this.posCrossRef[i]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}addConnector(i,r){let n=i?.text?.trim();if(!n)return"";let u=r?.text?.trim()??"",l=u.length>0?this.sanitizeText(u):n,c=this.connectors.get(n);return c?u.length>0&&(c.text=l):(c={id:n,labelType:"text",domId:V1+n+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:l},this.connectors.set(n,c),this.vertices.set(n,c),this.vertexCounter++),n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}computeEdgeSemantic(i,r){if(i==="arrow_point"&&r==="normal")return"sequence";if(i==="arrow_cross"&&r==="normal")return"failure";if(i==="arrow_open"&&r==="dotted")return"reference"}destructStartLink(i){let r=i.trim(),n="arrow_open",u="normal";return r.includes(".")&&(u="dotted"),{type:n,stroke:u}}countChar(i,r){let n=r.length,u=0;for(let l=0;l<n;++l)r[l]===i&&++u;return u}destructEndLink(i){let r=i.trim(),n=r.slice(0,-1),u="arrow_open";switch(r.slice(-1)){case"x":u="arrow_cross";break;case">":u="arrow_point";break;case"-":case".":u="arrow_open",n=r;break}let l="normal",c=n.length-1,a=this.countChar(".",n);return a>0&&(l="dotted",c=a),{type:u,stroke:l,length:c}}destructLink(i,r){let n=this.destructEndLink(i),u;return r?(u=this.destructStartLink(r),u.stroke!==n.stroke?{type:"INVALID",stroke:"INVALID"}:(u.type=n.type,u.length=n.length,{...u,edgeSemantic:this.computeEdgeSemantic(u.type,u.stroke)})):{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}exists(i,r){for(let n of i)if(n.nodes.includes(r))return!0;return!1}makeUniq(i,r){let n=[];return i.nodes.forEach((u,l)=>{this.exists(r,u)||n.push(i.nodes[l])}),{nodes:n}}getTypeFromVertex(i){let r=typeof i.type=="string"?et(i.type):i.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(i,r){return i.find(n=>n.id===r)}destructEdgeType(i){let r="none",n="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":n=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=i.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(i,r,n,u,l,c){let a=n.get(i.id),h=u.get(i.id)??!1,g=this.findNode(r,i.id);if(g)g.cssStyles=i.styles,g.cssCompiledStyles=this.getCompiledStyles(i.classes),g.cssClasses=i.classes.join(" ");else{let p={id:i.id,label:i.text,labelType:i.labelType,labelStyle:"",parentId:a,padding:l.flowchart?.padding||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:c,link:i.link,linkTarget:i.linkTarget,tooltip:this.getTooltip(i.id),metadata:i.metadata};h?r.push({...p,isGroup:!0,shape:"rect"}):r.push({...p,isGroup:!1,shape:this.getTypeFromVertex(i),wrappingWidth:l.agentflow?.wrappingWidth,minWidth:l.agentflow?.minNodeWidth})}}getCompiledStyles(i){let r=[];for(let n of i){let u=this.classes.get(n);u?.styles&&(r=[...r,...u.styles??[]].map(l=>l.trim())),u?.textStyles&&(r=[...r,...u.textStyles??[]].map(l=>l.trim()))}return r}runPostParseValidators(){this.postParseValidationRun||(this.postParseValidationRun=!0)}getData(){this.runPostParseValidators();let i=de(),r=[],n=[],u=this.getSubGraphs(),l=new Map,c=new Map,a=new Set,h=new Map,g=A((d,f,B=new Set)=>{if(B.has(d))return;B.add(d);let R=this.subGraphLookup.get(d);if(R)for(let se of R.nodes)se===f||B.has(se)||(a.add(se),h.set(se,f),g(se,f,B))},"collectDescendants");for(let d of u)d.metadata?.view==="collapsed"&&!a.has(d.id)&&g(d.id,d.id);let p=A((d,f)=>{let B=new Set,R=f;for(;R!==void 0&&!B.has(R);){if(R===d)return!0;B.add(R),R=l.get(R)}return!1},"wouldCloseContainmentCycle");for(let d=u.length-1;d>=0;d--){let f=u[d];if(!a.has(f.id)){f.nodes.length>0&&c.set(f.id,!0);for(let B of f.nodes){if(p(B,f.id)){this.emitWarning(tt.CONTAINMENT_VIOLATION,`Container "${f.id}" cannot contain "${B}" because "${B}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:B});continue}l.set(B,f.id)}}}for(let d=u.length-1;d>=0;d--){let f=u[d];if(a.has(f.id))continue;if(f.metadata?.view==="collapsed"){let R={...f.metadata,containerType:f.type};r.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:l.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:"collapsedGroup",dir:f.dir,isGroup:!1,look:i.look,metadata:R})}else r.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:l.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:Q1[f.type??"flow"],dir:f.dir,isGroup:!0,look:i.look,metadata:f.metadata})}this.getVertices().forEach(d=>{a.has(d.id)||this.addNodeFromVertex(d,r,l,c,i,i.look||"classic")});let x=this.getEdges();x.forEach((d,f)=>{let B=h.get(d.start)??d.start,R=h.get(d.end)??d.end;if(B===R&&d.start!==d.end)return;let{arrowTypeStart:se,arrowTypeEnd:he}=this.destructEdgeType(d.type),le=[...x.defaultStyle??[]];d.style&&le.push(...d.style);let O={id:Bt(B,R,{counter:f,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:B,end:R,type:d.type??"normal",label:d.text,labelType:d.labelType,labelpos:"c",thickness:d.stroke,minlen:d.length,classes:d?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":se,arrowTypeEnd:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":he,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(d.classes),labelStyle:le,style:le,pattern:d.stroke,look:i.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||i.flowchart?.curve,metadata:d.metadata};n.push(O)}),I1(r,this);let L=new Map,C=new Map;for(let d of u){let f=l.get(d.id);f!==void 0&&C.set(f,[...C.get(f)??[],d.id])}let M=0,T=A(d=>{if(!L.has(d)){L.set(d,M++);for(let f of C.get(d)??[])T(f)}},"walkContainers");for(let d of u)l.get(d.id)===void 0&&T(d.id);let b=new Set(this.getConnectors().map(d=>d.id));return w1(r,d=>{if(b.has(d))return"connector";let f=this.vertices.get(d);return f?this.deriveVertexKind(f,et(f.type)):void 0},L),{nodes:r,edges:n,other:{},config:i,connectors:this.getConnectors()}}defaultConfig(){return k1.flowchart}deriveVertexKind(i,r){return this.isToolDefinition(i)?"tool":r==="hexagon"||r==="hex"?"action":r==="lean-right"||r==="lean_right"?"input":r==="lin-doc"||r==="lined-document"?"refdoc":r==="diamond"?"decision":"task"}getSemanticModel(){this.runPostParseValidators();let i=new Set(this.subGraphs.map(a=>a.id)),r=[],n=[];for(let[a,h]of this.vertices){if(i.has(a))continue;if(h.isConnector){let m={id:a};if(h.text!==void 0&&h.text!==a&&(m.title=h.text),h.metadata&&Object.keys(h.metadata).length>0){let x={};for(let[L,C]of Object.entries(h.metadata))Wt.has(L)||(x[L]=C);Object.keys(x).length>0&&(m.metadata=x)}n.push(m);continue}let g={id:a};h.text!==void 0&&(g.label=h.text);let p=typeof h.type=="string"?et(h.type):h.type;if(p!==void 0&&(g.shape=p),g.vertexKind=this.deriveVertexKind(h,p),h.metadata&&Object.keys(h.metadata).length>0){let m={};for(let[x,L]of Object.entries(h.metadata))Wt.has(x)||(m[x]=L);Object.keys(m).length>0&&(g.metadata=m)}r.push(g)}let u=this.edges.map(a=>{let h={start:a.start,end:a.end};return a.id!==void 0&&(h.id=a.id),typeof a.text=="string"&&a.text.length>0&&(h.label=a.text),a.type!==void 0&&(h.type=a.type),a.stroke!==void 0&&(h.stroke=a.stroke),a.edgeSemantic!==void 0&&(h.edgeSemantic=a.edgeSemantic),a.length!==void 0&&(h.length=a.length),a.metadata&&Object.keys(a.metadata).length>0&&(h.metadata={...a.metadata}),h}),l=this.subGraphs.map(a=>{let h={id:a.id,nodes:[...a.nodes]};if(a.type!==void 0&&(h.type=a.type),a.title!==void 0&&(h.title=a.title),a.dir!==void 0&&(h.direction=a.dir),a.metadata&&Object.keys(a.metadata).length>0){let g={};for(let[p,m]of Object.entries(a.metadata))Wt.has(p)||(g[p]=m);Object.keys(g).length>0&&(h.metadata=g)}return h}),c={vertices:r,edges:u,subGraphs:l,connectors:n,diagnostics:this.diagnostics};return this.direction!==void 0&&(c.direction=this.direction),c}setFrontmatterLineOffset(i){this.frontmatterLineOffset=i??0}toElementPosition(i){let r=i?.first_line??0,n=i?.first_column??0,u=i?.last_line??r,l=i?.last_column??n,[c,a]=i?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:n,endLine:u+this.frontmatterLineOffset,endColumn:l,startIndex:c,endIndex:a}}pushMapping(i,r,n){if(!i)return;let u={id:i,type:r,position:this.toElementPosition(n)};return this.elementMappings.push(u),u}addVertexMapping(i,r,n,u){let l=this.pushMapping(i,"vertex",u);l&&n==null&&this.bareVertexMappings.add(l)}extendVertexMapping(i,r){if(!i||!r)return;let n=this.toElementPosition(r);for(let u=this.elementMappings.length-1;u>=0;u--){let l=this.elementMappings[u];if(l.type==="vertex"&&l.id===i){this.bareVertexMappings.has(l)&&(l.type="attachment",this.bareVertexMappings.delete(l)),(n.endLine>l.position.endLine||n.endLine===l.position.endLine&&n.endColumn>l.position.endColumn)&&(l.position.endLine=n.endLine,l.position.endColumn=n.endColumn,l.position.endIndex=n.endIndex);return}}this.pushMapping(i,"attachment",r)}addEdgeMapping(i,r,n,u){let l=Array.isArray(r)?r.map(a=>typeof a=="string"?a:a?.id??"").filter(Boolean):[],c=l.length>0?l.join(">"):"edge";this.pushMapping(c,"edge",u)}addSubgraphMapping(i,r,n,u){let l=(typeof i=="string"?i:i?.text)??"",c=this.toElementPosition(n),a=u?this.toElementPosition(u):c;l&&this.elementMappings.push({id:l,type:"subgraph",position:{startLine:c.startLine,startColumn:c.startColumn,endLine:a.endLine,endColumn:a.endColumn,startIndex:c.startIndex,endIndex:a.endIndex}})}addConnectorMapping(i,r,n,u){let l=i?.text?.trim()??"";if(!l)return;let c=this.toElementPosition(n),a=u?this.toElementPosition(u):c;this.elementMappings.push({id:l,type:"connector",position:{startLine:c.startLine,startColumn:c.startColumn,endLine:a.endLine,endColumn:a.endColumn,startIndex:c.startIndex,endIndex:a.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(i){return this.elementMappings.find(r=>r.id===i)}getElementsOnLine(i){return this.elementMappings.filter(r=>i>=r.position.startLine&&i<=r.position.endLine)}getElementAtPosition(i,r){let n=this.elementMappings.filter(l=>{let{startLine:c,startColumn:a,endLine:h,endColumn:g}=l.position;return!(i<c||i>h||i===c&&r<a||i===h&&r>g)});if(n.length===0)return;let u=A(({position:l})=>[l.endLine-l.startLine,l.endColumn-l.startColumn],"span");return n.reduce((l,c)=>{let[a,h]=u(l),[g,p]=u(c);return g!==a?g<a?c:l:p<h?c:l})}getMappingStats(){let i=0,r=0,n=0,u=0,l=0;for(let c of this.elementMappings)c.type==="vertex"?i++:c.type==="edge"?r++:c.type==="subgraph"?n++:c.type==="connector"?u++:c.type==="attachment"&&l++;return{vertices:i,edges:r,subgraphs:n,connectors:u,attachments:l,totalElements:this.elementMappings.length}}emitDiagnostic(i,r,n,u){let l=u?.nodeId??u?.edgeId,c=l?this.getElementById(l):void 0,a={id:i,severity:r,message:n,...u?.nodeId?{nodeId:u.nodeId}:{},...u?.edgeId&&!u?.nodeId?{edgeId:u.edgeId}:{},...c?{position:c.position}:{}};if(this.diagnostics.some(p=>p.id===a.id&&p.severity===a.severity&&p.message===a.message&&p.nodeId===a.nodeId&&p.edgeId===a.edgeId))return;this.diagnostics.push(a);let g=`agentflow[${i}]: ${n}`;r==="error"?re.error(g):re.warn(g)}emitWarning(i,r,n){this.emitDiagnostic(i,"warning",r,n)}emitError(i,r,n){this.emitDiagnostic(i,"error",r,n)}getDiagnostics(){return[...this.diagnostics]}},A(Ze,"AgentFlowDB"),Ze),Z1=A(function(s,i){return i.db.getClasses()},"getClasses"),$1=A(async function(s,i,r,n){re.debug("Drawing agentflow diagram",i);let{securityLevel:u,agentflow:l,layout:c}=de();n.db.setDiagramId(i),re.debug("Before getData: ");let a=n.db.getData();re.debug("Data: ",a);let h=v1(i,u),g=n.db.getDirection();a.type=n.type,a.layoutAlgorithm=T1(c),a.layoutAlgorithm==="dagre"&&c==="elk"&&re.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),a.direction=g,a.nodeSpacing=l?.nodeSpacing||50,a.rankSpacing=l?.rankSpacing||50,a.markers=["point","circle","cross","hierarchy"],a.diagramId=i,re.debug("REF1:",a),await x1(a,h);let p=l?.diagramPadding??8;Lt.insertTitle(h,"agentflowTitleText",l?.titleTopMargin??0,n.db.getDiagramTitle()),F1(h,p,"agentflow",l?.useMaxWidth??!0)},"draw"),es={getClasses:Z1,draw:$1},Kt=(function(){var s=A(function(Te,k,E,S){for(E=E||{},S=Te.length;S--;E[Te[S]]=k);return E},"o"),i=[1,5],r=[1,4],n=[1,3],u=[1,6],l=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],c=[2,2],a=[1,15],h=[1,16],g=[1,17],p=[1,18],m=[1,19],x=[1,26],L=[1,27],C=[1,28],M=[1,30],T=[1,31],b=[1,32],d=[1,55],f=[1,54],B=[1,34],R=[1,35],se=[1,36],he=[1,37],le=[1,38],O=[1,50],G=[1,52],U=[1,48],j=[1,53],z=[1,49],W=[1,56],K=[1,51],H=[1,57],Y=[1,58],De=[1,39],_e=[1,40],ve=[1,41],Fe=[1,42],Ve=[1,43],Se=[1,64],D=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],Z=[1,70],$=[1,68],ee=[1,67],te=[1,69],Me=[8,9,10,12,78,80,81],ye=[1,88],we=[1,101],Ne=[1,106],Re=[1,105],Oe=[1,102],Pe=[1,98],Ge=[1,104],Ue=[1,100],je=[1,107],ze=[1,103],We=[1,108],Ke=[1,99],Ie=[8,9,10,11,12,43,78,80,81],X=[8,9,10,11,12,43,49,78,80,81],ne=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],Ht=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],He=[47,63,92,105,108,109,112,114,117,118,119],Yt=[1,131],qt=[1,132],st=[1,134],it=[1,133],Xt=[47,63,65,77,92,105,108,109,112,114,117,118,119],rt=[1,143],nt=[1,157],at=[1,158],ot=[1,159],ut=[1,162],lt=[1,161],ct=[1,160],dt=[1,145],ht=[1,147],pt=[1,151],Qt=[1,139],Jt=[1,140],ft=[1,152],gt=[1,153],bt=[1,154],kt=[1,155],mt=[1,156],At=[1,163],Et=[1,164],Ct=[1,141],St=[1,142],xt=[1,149],Tt=[1,144],Dt=[1,148],_t=[1,146],Ye=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],Zt=[1,168],qe=[1,170],P=[8,9,10,12],ae=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],v=[1,190],Q=[1,186],J=[1,187],F=[1,191],V=[1,188],I=[1,189],Xe=[80,119,122],y=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],$t=[11,109],xe=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],pe=[1,269],fe=[1,267],ge=[1,271],be=[1,265],ke=[1,266],me=[1,268],Ae=[1,270],Ee=[1,272],Qe=[1,292],e1=[8,9,10,12,109],ce=[8,9,10,11,12,63,87,108,109,112,113,114,115],wt={trace:A(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:A(function(k,E,S,o,w,e,_){var t=e.length-1;switch(w){case 2:this.$=[];break;case 3:(!Array.isArray(e[t])||e[t].length>0)&&e[t-1].push(e[t]),this.$=e[t-1];break;case 4:case 198:this.$=e[t];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:o.setDirection("TB"),this.$="TB";break;case 14:o.setDirection(e[t-1]),this.$=e[t-1];break;case 32:this.$=e[t-1].nodes;break;case 38:this.$=o.addSubGraph(e[t-6],e[t-1],e[t-4],"flow"),o.addSubgraphMapping&&o.addSubgraphMapping(e[t-6],e[t-4],_[t-8],_[t]);break;case 39:this.$=o.addSubGraph(e[t-7],e[t-1],e[t-5],"flow"),o.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,e[t-3],_[t-3]),o.addSubgraphMapping&&o.addSubgraphMapping(e[t-7],e[t-5],_[t-9],_[t]);break;case 40:this.$=o.addSubGraph(e[t-3],e[t-1],{text:"",type:"text"},"flow"),o.addSubgraphMapping&&o.addSubgraphMapping(e[t-3],{text:"",type:"text"},_[t-5],_[t]);break;case 41:this.$=o.addSubGraph(e[t-4],e[t-1],{text:"",type:"text"},"flow"),o.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,e[t-3],_[t-3]),o.addSubgraphMapping&&o.addSubgraphMapping(e[t-4],{text:"",type:"text"},_[t-6],_[t]);break;case 42:this.$=o.addSubGraph(void 0,e[t-1],void 0,"flow"),o.addSubgraphMapping&&o.addSubgraphMapping(void 0,void 0,_[t-3],_[t]);break;case 43:o.addGlobal(e[t-1]),this.$=[];break;case 44:this.$=o.addConnector(e[t-4],e[t-2]),o.addConnectorMapping&&o.addConnectorMapping(e[t-4],e[t-2],_[t-6],_[t]);break;case 45:this.$=o.addConnector(e[t-5],e[t-3]),o.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,e[t-1],_[t-1]),o.addConnectorMapping&&o.addConnectorMapping(e[t-5],e[t-3],_[t-7],_[t]);break;case 46:this.$=o.addConnector(e[t-1],{text:"",type:"text"}),o.addConnectorMapping&&o.addConnectorMapping(e[t-1],{text:"",type:"text"},_[t-3],_[t]);break;case 47:this.$=o.addConnector(e[t-2],{text:"",type:"text"}),o.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,e[t-1],_[t-1]),o.addConnectorMapping&&o.addConnectorMapping(e[t-2],{text:"",type:"text"},_[t-4],_[t]);break;case 49:this.$=e[t].trim(),o.setAccTitle(this.$);break;case 50:case 51:this.$=e[t].trim(),o.setAccDescription(this.$);break;case 56:this.$=e[t-1]+e[t];break;case 57:this.$=e[t];break;case 58:o.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t],_[t]),o.extendVertexMapping&&o.extendVertexMapping(e[t-1][e[t-1].length-1],_[t]),o.addLink(e[t-3].stmt,e[t-1],e[t-2]),o.addEdgeMapping&&o.addEdgeMapping(e[t-3].stmt,e[t-1],e[t-2],this._$),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 59:o.addLink(e[t-2].stmt,e[t],e[t-1]),o.addEdgeMapping&&o.addEdgeMapping(e[t-2].stmt,e[t],e[t-1],this._$),this.$={stmt:e[t],nodes:e[t].concat(e[t-2].nodes)};break;case 60:o.addLink(e[t-3].stmt,e[t-1],e[t-2]),o.addEdgeMapping&&o.addEdgeMapping(e[t-3].stmt,e[t-1],e[t-2],this._$),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 61:this.$={stmt:e[t-1],nodes:e[t-1]};break;case 62:o.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t],_[t]),o.extendVertexMapping&&o.extendVertexMapping(e[t-1][e[t-1].length-1],_[t]),this.$={stmt:e[t-1],nodes:e[t-1],shapeData:e[t]};break;case 63:this.$={stmt:e[t],nodes:e[t]};break;case 64:this.$=[e[t]];break;case 65:o.addVertex(e[t-5][e[t-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-4],_[t-4]),o.extendVertexMapping&&o.extendVertexMapping(e[t-5][e[t-5].length-1],_[t-4]),this.$=e[t-5].concat(e[t]);break;case 66:this.$=e[t-4].concat(e[t]);break;case 67:this.$=e[t];break;case 68:this.$=e[t-2],o.setClass(e[t-2],e[t]);break;case 69:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"square"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"square",this._$);break;case 70:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"doublecircle"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"doublecircle",this._$);break;case 71:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"circle"),o.addVertexMapping&&o.addVertexMapping(e[t-5],e[t-2],"circle",this._$);break;case 72:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"ellipse"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"ellipse",this._$);break;case 73:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"stadium"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"stadium",this._$);break;case 74:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"subroutine"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"subroutine",this._$);break;case 75:this.$=e[t-7],o.addVertex(e[t-7],e[t-1],"rect",void 0,void 0,void 0,Object.fromEntries([[e[t-5],e[t-3]]])),o.addVertexMapping&&o.addVertexMapping(e[t-7],e[t-1],"rect",this._$);break;case 76:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"cylinder"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"cylinder",this._$);break;case 77:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"round"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"round",this._$);break;case 78:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"diamond"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"diamond",this._$);break;case 79:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"hexagon"),o.addVertexMapping&&o.addVertexMapping(e[t-5],e[t-2],"hexagon",this._$);break;case 80:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"odd"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"odd",this._$);break;case 81:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"trapezoid"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"trapezoid",this._$);break;case 82:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"inv_trapezoid"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"inv_trapezoid",this._$);break;case 83:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_right"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"lean_right",this._$);break;case 84:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_left"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"lean_left",this._$);break;case 85:this.$=e[t],o.addVertex(e[t]),o.addVertexMapping&&o.addVertexMapping(e[t],void 0,void 0,this._$);break;case 86:e[t-1].text=e[t],this.$=e[t-1];break;case 87:case 88:e[t-2].text=e[t-1],this.$=e[t-2];break;case 89:this.$=e[t];break;case 90:var N=o.destructLink(e[t],e[t-2]);this.$={type:N.type,stroke:N.stroke,length:N.length,edgeSemantic:N.edgeSemantic,text:e[t-1]};break;case 91:var N=o.destructLink(e[t],e[t-2]);this.$={type:N.type,stroke:N.stroke,length:N.length,edgeSemantic:N.edgeSemantic,text:e[t-1],id:e[t-3]};break;case 92:this.$={text:e[t],type:"text"};break;case 93:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 94:this.$={text:e[t],type:"string"};break;case 95:this.$={text:e[t],type:"markdown"};break;case 96:var N=o.destructLink(e[t]);this.$={type:N.type,stroke:N.stroke,length:N.length,edgeSemantic:N.edgeSemantic};break;case 97:var N=o.destructLink(e[t]);this.$={type:N.type,stroke:N.stroke,length:N.length,edgeSemantic:N.edgeSemantic,id:e[t-1]};break;case 98:this.$=e[t-1];break;case 99:this.$={text:e[t],type:"text"};break;case 100:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 101:this.$={text:e[t],type:"string"};break;case 102:case 119:this.$={text:e[t],type:"markdown"};break;case 116:this.$={text:e[t],type:"text"};break;case 117:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 118:this.$={text:e[t],type:"text"};break;case 120:this.$=e[t-4],o.addClass(e[t-2],e[t]);break;case 121:this.$=e[t-4],o.setClass(e[t-2],e[t]);break;case 122:case 130:this.$=e[t-1],o.setClickEvent(e[t-1],e[t]);break;case 123:case 131:this.$=e[t-3],o.setClickEvent(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 124:this.$=e[t-2],o.setClickEvent(e[t-2],e[t-1],e[t]);break;case 125:this.$=e[t-4],o.setClickEvent(e[t-4],e[t-3],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 126:this.$=e[t-2],o.setLink(e[t-2],e[t]);break;case 127:this.$=e[t-4],o.setLink(e[t-4],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 128:this.$=e[t-4],o.setLink(e[t-4],e[t-2],e[t]);break;case 129:this.$=e[t-6],o.setLink(e[t-6],e[t-4],e[t]),o.setTooltip(e[t-6],e[t-2]);break;case 132:this.$=e[t-1],o.setLink(e[t-1],e[t]);break;case 133:this.$=e[t-3],o.setLink(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 134:this.$=e[t-3],o.setLink(e[t-3],e[t-2],e[t]);break;case 135:this.$=e[t-5],o.setLink(e[t-5],e[t-4],e[t]),o.setTooltip(e[t-5],e[t-2]);break;case 136:this.$=e[t-4],o.addVertex(e[t-2],void 0,void 0,e[t]);break;case 137:this.$=e[t-4],o.updateLink([e[t-2]],e[t]);break;case 138:this.$=e[t-4],o.updateLink(e[t-2],e[t]);break;case 139:this.$=e[t-8],o.updateLinkInterpolate([e[t-6]],e[t-2]),o.updateLink([e[t-6]],e[t]);break;case 140:this.$=e[t-8],o.updateLinkInterpolate(e[t-6],e[t-2]),o.updateLink(e[t-6],e[t]);break;case 141:this.$=e[t-6],o.updateLinkInterpolate([e[t-4]],e[t]);break;case 142:this.$=e[t-6],o.updateLinkInterpolate(e[t-4],e[t]);break;case 143:case 145:this.$=[e[t]];break;case 144:case 146:e[t-2].push(e[t]),this.$=e[t-2];break;case 148:this.$=e[t-1]+e[t];break;case 196:this.$=e[t];break;case 197:this.$=e[t-1]+""+e[t];break;case 199:this.$=e[t-1]+""+e[t];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:i,10:r,11:n,13:u},{1:[3]},s(l,c,{5:7}),{4:8,8:i,10:r,11:n,13:u},{4:9,8:i,10:r,11:n,13:u},{4:10,8:i,10:r,11:n,13:u},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:a,9:h,10:g,11:p,12:m,21:20,23:21,24:22,25:23,26:24,27:25,28:x,35:L,36:C,37:29,38:M,40:T,42:b,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:he,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},s(l,[2,10]),s(l,[2,11]),s(l,[2,12]),s(l,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:Se,16:59,19:62},s(D,[2,3]),s(D,[2,4]),s(D,[2,5]),s(D,[2,6]),s(D,[2,7]),s(D,[2,8]),s(D,[2,9]),{8:Z,9:$,10:ee,12:te,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:Z,9:$,10:ee,12:te,22:75},{8:Z,9:$,10:ee,12:te,22:76},{8:Z,9:$,10:ee,12:te,22:77},{8:Z,9:$,10:ee,12:te,22:78},{8:Z,9:$,10:ee,12:te,22:79},{8:Z,9:$,10:ee,11:[1,80],12:te,22:81},{8:Z,9:$,10:ee,12:te,22:82},{11:[1,83]},s(D,[2,48]),{39:[1,84]},{41:[1,85]},s(D,[2,51]),s(Me,[2,63],{19:86,34:87,11:Se,43:ye}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:we,47:Ne,63:Re,83:[1,96],92:Oe,98:[1,93],100:[1,94],104:95,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke,123:97},s(D,[2,200]),s(D,[2,201]),s(D,[2,202]),s(D,[2,203]),s(D,[2,204]),s(Ie,[2,64]),s(Ie,[2,67],{49:[1,109]}),s(X,[2,85],{116:122,30:[1,110],47:d,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:f,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:O,105:G,108:U,109:j,112:z,114:W,117:K,118:H,119:Y}),s(ne,[2,196]),s(ne,[2,157]),s(ne,[2,158]),s(ne,[2,159]),s(ne,[2,160]),s(ne,[2,161]),s(ne,[2,162]),s(ne,[2,163]),s(ne,[2,164]),s(ne,[2,165]),s(ne,[2,166]),s(ne,[2,167]),s(l,[2,14]),s(l,[2,20]),s(l,[2,21]),{10:[1,123]},s(l,[2,23]),s(Ht,[2,31],{19:124,11:Se}),s(D,[2,32]),{45:125,46:44,47:d,48:45,50:46,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},s(D,[2,52]),s(D,[2,53]),s(D,[2,54]),s(D,[2,55]),s(He,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:Yt,84:qt,119:st,122:it},{78:[1,135],80:[1,136]},s(Xt,[2,96]),s(D,[2,33]),s(D,[2,34]),s(D,[2,35]),s(D,[2,36]),s(D,[2,37]),{11:rt,13:nt,15:at,28:ot,29:137,33:ut,35:lt,36:ct,47:dt,63:ht,78:pt,83:Qt,84:Jt,86:150,87:ft,88:gt,89:bt,90:kt,91:mt,92:At,93:Et,94:138,108:Ct,112:St,114:xt,117:Tt,118:Dt,119:_t},s(Ye,c,{5:165}),s(Ye,c,{5:166}),{11:rt,13:nt,15:at,28:ot,29:167,33:ut,35:lt,36:ct,47:dt,63:ht,78:pt,83:Qt,84:Jt,86:150,87:ft,88:gt,89:bt,90:kt,91:mt,92:At,93:Et,94:138,108:Ct,112:St,114:xt,117:Tt,118:Dt,119:_t},s(D,[2,49]),s(D,[2,50]),s(Me,[2,61],{47:Zt}),s(Me,[2,62],{19:169,11:Se,43:qe}),s(Ie,[2,57]),{47:d,50:171,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},{105:[1,172],106:173,108:[1,174]},{47:d,50:175,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},{47:d,50:176,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},s(P,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},s(P,[2,130],{123:181,11:[1,180],15:we,47:Ne,63:Re,92:Oe,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke}),s(P,[2,132],{11:[1,182]}),s(ae,[2,198]),s(ae,[2,185]),s(ae,[2,186]),s(ae,[2,187]),s(ae,[2,188]),s(ae,[2,189]),s(ae,[2,190]),s(ae,[2,191]),s(ae,[2,192]),s(ae,[2,193]),s(ae,[2,194]),s(ae,[2,195]),{47:d,50:183,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},{31:184,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{31:192,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{31:194,53:[1,193],70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{31:195,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{31:196,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{31:197,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{112:[1,198]},{31:199,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{31:200,68:[1,201],70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{31:202,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{31:203,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{31:204,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},s(ne,[2,197]),s(l,[2,22]),s(Ht,[2,30]),s(Me,[2,59],{34:205,19:206,11:Se,43:ye}),s(He,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{80:[1,210],82:211,119:st,122:it},s(Xe,[2,92]),s(Xe,[2,94]),s(Xe,[2,95]),s(Xe,[2,183]),s(Xe,[2,184]),{79:212,82:130,83:Yt,84:qt,119:st,122:it},s(Xt,[2,97]),{8:Z,9:$,10:ee,11:rt,12:te,13:nt,15:at,22:214,28:ot,30:[1,213],33:ut,34:215,35:lt,36:ct,43:ye,47:dt,63:ht,78:pt,86:150,87:ft,88:gt,89:bt,90:kt,91:mt,92:At,93:Et,94:216,108:Ct,112:St,114:xt,117:Tt,118:Dt,119:_t},s(y,[2,116]),s(y,[2,118]),s(y,[2,119]),s(y,[2,172]),s(y,[2,173]),s(y,[2,174]),s(y,[2,175]),s(y,[2,176]),s(y,[2,177]),s(y,[2,178]),s(y,[2,179]),s(y,[2,180]),s(y,[2,181]),s(y,[2,182]),s(y,[2,103]),s(y,[2,104]),s(y,[2,105]),s(y,[2,106]),s(y,[2,107]),s(y,[2,108]),s(y,[2,109]),s(y,[2,110]),s(y,[2,111]),s(y,[2,112]),s(y,[2,113]),s(y,[2,114]),s(y,[2,115]),{6:13,7:14,8:a,9:h,10:g,11:p,12:m,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,217],35:L,36:C,37:29,38:M,40:T,42:b,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:he,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},{6:13,7:14,8:a,9:h,10:g,11:p,12:m,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,218],35:L,36:C,37:29,38:M,40:T,42:b,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:he,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},{8:Z,9:$,10:ee,11:rt,12:te,13:nt,15:at,22:220,28:ot,30:[1,219],33:ut,34:221,35:lt,36:ct,43:ye,47:dt,63:ht,78:pt,86:150,87:ft,88:gt,89:bt,90:kt,91:mt,92:At,93:Et,94:216,108:Ct,112:St,114:xt,117:Tt,118:Dt,119:_t},{11:Se,19:222},{47:[1,223]},s(Ie,[2,56]),{11:[1,224],47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:122,117:K,118:H,119:Y},{11:[1,225]},{11:[1,226],109:[1,227]},s($t,[2,143]),{11:[1,228],47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:122,117:K,118:H,119:Y},{11:[1,229],47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:122,117:K,118:H,119:Y},{83:[1,230]},s(P,[2,124],{11:[1,231]}),s(P,[2,126],{11:[1,232]}),{83:[1,233]},s(ae,[2,199]),{83:[1,234],101:[1,235]},s(Ie,[2,68],{116:122,47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,117:K,118:H,119:Y}),{32:[1,236],70:v,85:237,119:F,120:V,121:I},s(xe,[2,99]),s(xe,[2,101]),s(xe,[2,102]),s(xe,[2,168]),s(xe,[2,169]),s(xe,[2,170]),s(xe,[2,171]),{52:[1,238],70:v,85:237,119:F,120:V,121:I},{31:239,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{54:[1,240],70:v,85:237,119:F,120:V,121:I},{56:[1,241],70:v,85:237,119:F,120:V,121:I},{58:[1,242],70:v,85:237,119:F,120:V,121:I},{60:[1,243],70:v,85:237,119:F,120:V,121:I},{63:[1,244]},{67:[1,245],70:v,85:237,119:F,120:V,121:I},{69:[1,246],70:v,85:237,119:F,120:V,121:I},{31:247,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},{32:[1,248],70:v,85:237,119:F,120:V,121:I},{70:v,72:[1,249],74:[1,250],85:237,119:F,120:V,121:I},{70:v,72:[1,252],74:[1,251],85:237,119:F,120:V,121:I},s(Me,[2,58],{19:169,11:Se,43:qe}),s(Me,[2,60],{47:Zt}),s(He,[2,88]),s(He,[2,87]),{65:[1,253],70:v,85:237,119:F,120:V,121:I},s(He,[2,90]),s(Xe,[2,93]),{80:[1,254],82:211,119:st,122:it},{31:255,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},s(Ye,c,{5:256}),{8:Z,9:$,10:ee,12:te,22:257,43:qe},s(y,[2,117]),s(D,[2,42]),s(D,[2,43]),{31:258,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},s(D,[2,46]),{8:Z,9:$,10:ee,12:te,22:259,43:qe},{46:260,47:d,48:45,50:46,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},{11:Se,19:261},{11:pe,63:fe,87:ge,95:262,108:be,110:263,111:264,112:ke,113:me,114:Ae,115:Ee},{11:pe,63:fe,87:ge,95:273,107:[1,274],108:be,110:263,111:264,112:ke,113:me,114:Ae,115:Ee},{11:pe,63:fe,87:ge,95:275,107:[1,276],108:be,110:263,111:264,112:ke,113:me,114:Ae,115:Ee},{108:[1,277]},{11:pe,63:fe,87:ge,95:278,108:be,110:263,111:264,112:ke,113:me,114:Ae,115:Ee},{47:d,50:279,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},s(P,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},s(P,[2,131]),s(P,[2,133],{11:[1,283]}),s(P,[2,134]),s(X,[2,69]),s(xe,[2,100]),s(X,[2,70]),{54:[1,284],70:v,85:237,119:F,120:V,121:I},s(X,[2,77]),s(X,[2,72]),s(X,[2,73]),s(X,[2,74]),{112:[1,285]},s(X,[2,76]),s(X,[2,78]),{69:[1,286],70:v,85:237,119:F,120:V,121:I},s(X,[2,80]),s(X,[2,81]),s(X,[2,83]),s(X,[2,82]),s(X,[2,84]),s([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),s(He,[2,91]),{32:[1,287],70:v,85:237,119:F,120:V,121:I},{6:13,7:14,8:a,9:h,10:g,11:p,12:m,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,288],35:L,36:C,37:29,38:M,40:T,42:b,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:he,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},s(Ye,c,{5:289}),{32:[1,290],70:v,85:237,119:F,120:V,121:I},s(D,[2,47]),s(Ie,[2,66]),{46:291,47:d,48:45,50:46,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},s(P,[2,136],{109:Qe}),s(e1,[2,145],{111:293,11:pe,63:fe,87:ge,108:be,112:ke,113:me,114:Ae,115:Ee}),s(ce,[2,147]),s(ce,[2,149]),s(ce,[2,150]),s(ce,[2,151]),s(ce,[2,152]),s(ce,[2,153]),s(ce,[2,154]),s(ce,[2,155]),s(ce,[2,156]),s(P,[2,137],{109:Qe}),{11:[1,294]},s(P,[2,138],{109:Qe}),{11:[1,295]},s($t,[2,144]),s(P,[2,120],{109:Qe}),s(P,[2,121],{116:122,47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,117:K,118:H,119:Y}),s(P,[2,125]),s(P,[2,127],{11:[1,296]}),s(P,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:Z,9:$,10:ee,12:te,22:301,34:302,43:ye},s(D,[2,40]),{6:13,7:14,8:a,9:h,10:g,11:p,12:m,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,303],35:L,36:C,37:29,38:M,40:T,42:b,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:he,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},{8:Z,9:$,10:ee,12:te,22:304,34:305,43:ye},s(Ie,[2,65]),{11:pe,63:fe,87:ge,108:be,110:306,111:264,112:ke,113:me,114:Ae,115:Ee},s(ce,[2,148]),{15:we,47:Ne,63:Re,92:Oe,104:307,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke,123:97},{15:we,47:Ne,63:Re,92:Oe,104:308,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke,123:97},{101:[1,309]},s(P,[2,135]),s(X,[2,71]),{31:310,70:v,83:Q,84:J,85:185,119:F,120:V,121:I},s(X,[2,79]),s(Ye,c,{5:311}),{8:Z,9:$,10:ee,12:te,22:312,43:qe},s(D,[2,41]),s(D,[2,44]),{8:Z,9:$,10:ee,12:te,22:313,43:qe},s(e1,[2,146],{111:293,11:pe,63:fe,87:ge,108:be,112:ke,113:me,114:Ae,115:Ee}),s(P,[2,141],{123:181,11:[1,314],15:we,47:Ne,63:Re,92:Oe,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke}),s(P,[2,142],{123:181,11:[1,315],15:we,47:Ne,63:Re,92:Oe,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke}),s(P,[2,129]),{32:[1,316],70:v,85:237,119:F,120:V,121:I},{6:13,7:14,8:a,9:h,10:g,11:p,12:m,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,317],35:L,36:C,37:29,38:M,40:T,42:b,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:he,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},s(Ye,c,{5:318}),s(D,[2,45]),{11:pe,63:fe,87:ge,95:319,108:be,110:263,111:264,112:ke,113:me,114:Ae,115:Ee},{11:pe,63:fe,87:ge,95:320,108:be,110:263,111:264,112:ke,113:me,114:Ae,115:Ee},s(X,[2,75]),s(D,[2,38]),{6:13,7:14,8:a,9:h,10:g,11:p,12:m,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,321],35:L,36:C,37:29,38:M,40:T,42:b,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:he,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},s(P,[2,139],{109:Qe}),s(P,[2,140],{109:Qe}),s(D,[2,39])],defaultActions:{},parseError:A(function(k,E){if(E.recoverable)this.trace(k);else{var S=new Error(k);throw S.hash=E,S}},"parseError"),parse:A(function(k){var E=this,S=[0],o=[],w=[null],e=[],_=this.table,t="",N=0,t1=0,s1=0,G1=2,i1=1,U1=e.slice.call(arguments,1),q=Object.create(this.lexer),Le={yy:{}};for(var Nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Nt)&&(Le.yy[Nt]=this.yy[Nt]);q.setInput(k,Le.yy),Le.yy.lexer=q,Le.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var Rt=q.yylloc;e.push(Rt);var j1=q.options&&q.options.ranges;typeof Le.yy.parseError=="function"?this.parseError=Le.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z1(oe){S.length=S.length-2*oe,w.length=w.length-oe,e.length=e.length-oe}A(z1,"popStack");function r1(){var oe;return oe=o.pop()||q.lex()||i1,typeof oe!="number"&&(oe instanceof Array&&(o=oe,oe=o.pop()),oe=E.symbols_[oe]||oe),oe}A(r1,"lex");for(var ie,Ot,Be,ue,as,Pt,Je={},Ft,Ce,n1,Vt;;){if(Be=S[S.length-1],this.defaultActions[Be]?ue=this.defaultActions[Be]:((ie===null||typeof ie>"u")&&(ie=r1()),ue=_[Be]&&_[Be][ie]),typeof ue>"u"||!ue.length||!ue[0]){var Gt="";Vt=[];for(Ft in _[Be])this.terminals_[Ft]&&Ft>G1&&Vt.push("'"+this.terminals_[Ft]+"'");q.showPosition?Gt="Parse error on line "+(N+1)+`:
23
+ `+q.showPosition()+`
24
+ Expecting `+Vt.join(", ")+", got '"+(this.terminals_[ie]||ie)+"'":Gt="Parse error on line "+(N+1)+": Unexpected "+(ie==i1?"end of input":"'"+(this.terminals_[ie]||ie)+"'"),this.parseError(Gt,{text:q.match,token:this.terminals_[ie]||ie,line:q.yylineno,loc:Rt,expected:Vt})}if(ue[0]instanceof Array&&ue.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Be+", token: "+ie);switch(ue[0]){case 1:S.push(ie),w.push(q.yytext),e.push(q.yylloc),S.push(ue[1]),ie=null,Ot?(ie=Ot,Ot=null):(t1=q.yyleng,t=q.yytext,N=q.yylineno,Rt=q.yylloc,s1>0&&s1--);break;case 2:if(Ce=this.productions_[ue[1]][1],Je.$=w[w.length-Ce],Je._$={first_line:e[e.length-(Ce||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(Ce||1)].first_column,last_column:e[e.length-1].last_column},j1&&(Je._$.range=[e[e.length-(Ce||1)].range[0],e[e.length-1].range[1]]),Pt=this.performAction.apply(Je,[t,t1,N,Le.yy,ue[1],w,e].concat(U1)),typeof Pt<"u")return Pt;Ce&&(S=S.slice(0,-1*Ce*2),w=w.slice(0,-1*Ce),e=e.slice(0,-1*Ce)),S.push(this.productions_[ue[1]][0]),w.push(Je.$),e.push(Je._$),n1=_[S[S.length-2]][S[S.length-1]],S.push(n1);break;case 3:return!0}}return!0},"parse")},P1=(function(){var Te={EOF:1,parseError:A(function(E,S){if(this.yy.parser)this.yy.parser.parseError(E,S);else throw new Error(E)},"parseError"),setInput:A(function(k,E){return this.yy=E||this.yy||{},this._input=k,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:A(function(){var k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var E=k.match(/(?:\r\n?|\n).*/g);return E?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),k},"input"),unput:A(function(k){var E=k.length,S=k.split(/(?:\r\n?|\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-E),this.offset-=E;var o=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 w=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===o.length?this.yylloc.first_column:0)+o[o.length-S.length].length-S[0].length:this.yylloc.first_column-E},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-E]),this.yyleng=this.yytext.length,this},"unput"),more:A(function(){return this._more=!0,this},"more"),reject:A(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).
25
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:A(function(k){this.unput(this.match.slice(k))},"less"),pastInput:A(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:A(function(){var k=this.match;return k.length<20&&(k+=this._input.substr(0,20-k.length)),(k.substr(0,20)+(k.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:A(function(){var k=this.pastInput(),E=new Array(k.length+1).join("-");return k+this.upcomingInput()+`
26
+ `+E+"^"},"showPosition"),test_match:A(function(k,E){var S,o,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),o=k[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+k[0].length},this.yytext+=k[0],this.match+=k[0],this.matches=k,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(k[0].length),this.matched+=k[0],S=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var e in w)this[e]=w[e];return!1}return!1},"test_match"),next:A(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var k,E,S,o;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),e=0;e<w.length;e++)if(S=this._input.match(this.rules[w[e]]),S&&(!E||S[0].length>E[0].length)){if(E=S,o=e,this.options.backtrack_lexer){if(k=this.test_match(S,w[e]),k!==!1)return k;if(this._backtrack){E=!1;continue}else return!1}else if(!this.options.flex)break}return E?(k=this.test_match(E,w[o]),k!==!1?k:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
27
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:A(function(){var E=this.next();return E||this.lex()},"lex"),begin:A(function(E){this.conditionStack.push(E)},"begin"),popState:A(function(){var E=this.conditionStack.length-1;return E>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:A(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:A(function(E){return E=this.conditionStack.length-1-Math.abs(E||0),E>=0?this.conditionStack[E]:"INITIAL"},"topState"),pushState:A(function(E){this.begin(E)},"pushState"),stateStackSize:A(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:A(function(E,S,o,w){var e=w;switch(o){case 0:return this.begin("acc_title"),38;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),40;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),S.yytext="",43;break;case 8:return this.pushState("shapeDataStr"),43;break;case 9:return this.popState(),43;break;case 10:let _=/\n\s*/g;return S.yytext=S.yytext.replace(_,"<br/>"),43;break;case 11:return 43;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 17:this.popState();break;case 18:return 99;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 91;case 35:return E.lex.firstGraph()&&this.begin("dir"),13;break;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),14;break;case 45:return this.popState(),15;break;case 46:return this.popState(),15;break;case 47:return this.popState(),15;break;case 48:return this.popState(),15;break;case 49:return this.popState(),15;break;case 50:return this.popState(),15;break;case 51:return this.popState(),15;break;case 52:return this.popState(),15;break;case 53:return this.popState(),15;break;case 54:return this.popState(),15;break;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:return 114;case 63:return 49;case 64:return 63;case 65:return 47;case 66:return 9;case 67:return 109;case 68:return 118;case 69:return this.popState(),80;break;case 70:return this.pushState("edgeText"),78;break;case 71:return 122;case 72:return 80;case 73:break;case 74:return this.popState(),56;break;case 75:return"TEXT";case 76:return this.pushState("ellipseText"),55;break;case 77:return this.popState(),58;break;case 78:return this.pushState("text"),57;break;case 79:return this.popState(),60;break;case 80:return this.pushState("text"),59;break;case 81:return 61;case 82:return this.pushState("text"),70;break;case 83:return this.popState(),67;break;case 84:return this.pushState("text"),66;break;case 85:return this.popState(),52;break;case 86:return this.pushState("text"),51;break;case 87:break;case 88:return this.popState(),72;break;case 89:return this.popState(),74;break;case 90:return 120;case 91:return this.pushState("trapText"),71;break;case 92:return this.pushState("trapText"),73;break;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return"SEP";case 97:return 92;case 98:return 118;case 99:return 114;case 100:return 47;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;break;case 106:return this.pushState("text"),65;break;case 107:return this.popState(),54;break;case 108:return this.pushState("text"),53;break;case 109:return this.popState(),32;break;case 110:return this.pushState("text"),30;break;case 111:return this.popState(),69;break;case 112:return this.pushState("text"),68;break;case 113:break;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 10;case 117:return 11;case 118:return 12}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}};return Te})();wt.lexer=P1;function vt(){this.yy={}}return A(vt,"Parser"),vt.prototype=wt,wt.Parser=vt,new vt})();Kt.parser=Kt;var R1=Kt,O1=Object.assign({},R1);O1.parse=s=>{let i=s.replace(/}[^\S\n]*\n/g,`}
28
+ `);return R1.parse(i)};var ts=O1,ss=A(s=>{let{theme:i,bkgColorArray:r,borderColorArray:n}=s;if(!A1(i,n))return"";let u=E1(s.look),l=m1(r),c=C1(s.THEME_COLOR_LIMIT,n),a=A(p=>n[p%n.length],"border"),h=A(p=>l?`fill: ${r[p%r.length]};`:"","fill"),g="";for(let p of q1){let m=yt.get(p),x=`[data-look="${u}"].node.${B1(p)}`;g+=`
29
+
30
+ ${x} rect,
31
+ ${x} path,
32
+ ${x} polygon {
33
+ stroke: ${a(m)};
34
+ ${h(m)}
35
+ }
36
+ `}for(let p=0;p<M1(c);p++){let m=y1(p,c),x=`[data-look="${u}"][data-color-id="color-${m}"].cluster`,L=`[data-look="${u}"][data-color-id="color-${m}"].node`,C=A(M=>`${x} ${M}, ${L} ${M}`,"rule");g+=`
37
+
38
+ ${C("rect")},
39
+ ${C("path")} {
40
+ stroke: ${a(m)};
41
+ ${h(m)}
42
+ }
43
+ `}return g},"genColor"),is=A((s,i)=>{let r=u1,n=r(s,"r"),u=r(s,"g"),l=r(s,"b");return o1(n,u,l,i)},"fade"),rs=A(s=>`${ss(s)}
44
+ .label {
45
+ font-family: ${s.fontFamily};
46
+ color: ${s.nodeTextColor||s.textColor};
47
+ }
48
+ .cluster-label text {
49
+ fill: ${s.titleColor};
50
+ }
51
+ .cluster-label span {
52
+ color: ${s.titleColor};
53
+ }
54
+ .cluster-label span p {
55
+ background-color: transparent;
56
+ }
57
+
58
+ .label text,span {
59
+ fill: ${s.nodeTextColor||s.textColor};
60
+ color: ${s.nodeTextColor||s.textColor};
61
+ }
62
+
63
+ .node rect,
64
+ .node circle,
65
+ .node ellipse,
66
+ .node polygon,
67
+ .node path {
68
+ fill: ${s.mainBkg};
69
+ stroke: ${s.nodeBorder};
70
+ stroke-width: ${s.strokeWidth??1}px;
71
+ }
72
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
73
+ text-anchor: middle;
74
+ }
75
+ .node .katex path {
76
+ fill: ${s.nodeTextColor||s.textColor};
77
+ stroke: ${s.nodeTextColor||s.textColor};
78
+ stroke-width: 1px;
79
+ }
80
+
81
+ .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
82
+ text-align: center;
83
+ }
84
+ .node.clickable {
85
+ cursor: pointer;
86
+ }
87
+
88
+
89
+ .root .anchor path {
90
+ fill: ${s.lineColor} !important;
91
+ stroke-width: 0;
92
+ stroke: ${s.lineColor};
93
+ }
94
+
95
+ .arrowheadPath {
96
+ fill: ${s.arrowheadColor};
97
+ }
98
+
99
+ .edgePaths .path {
100
+ stroke: ${s.lineColor};
101
+ stroke-width: ${s.strokeWidth??2}px;
102
+ }
103
+
104
+ .flowchart-link {
105
+ stroke: ${s.lineColor};
106
+ fill: none;
107
+ }
108
+
109
+ .edgeLabel {
110
+ background-color: ${s.edgeLabelBackground};
111
+ p {
112
+ background-color: ${s.edgeLabelBackground};
113
+ }
114
+ rect {
115
+ opacity: 0.5;
116
+ background-color: ${s.edgeLabelBackground};
117
+ fill: ${s.edgeLabelBackground};
118
+ }
119
+ text-align: center;
120
+ }
121
+
122
+ /* For html labels only */
123
+ .labelBkg {
124
+ background-color: ${is(s.edgeLabelBackground,.5)};
125
+ }
126
+
127
+ .cluster rect {
128
+ fill: ${s.clusterBkg};
129
+ stroke: ${s.clusterBorder};
130
+ stroke-width: 1px;
131
+ }
132
+
133
+ .flow-cluster rect {
134
+ fill: none;
135
+ stroke: ${s.clusterBorder};
136
+ stroke-width: 0.75px;
137
+ }
138
+
139
+ .node .collapsed-indicator {
140
+ fill: ${s.nodeBorder};
141
+ stroke: none;
142
+ stroke-width: 0;
143
+ opacity: 0.5;
144
+ }
145
+
146
+ .node .collapsed-separator {
147
+ stroke-width: 0.75px;
148
+ }
149
+
150
+ .cluster text {
151
+ fill: ${s.titleColor};
152
+ }
153
+
154
+ .cluster span {
155
+ color: ${s.titleColor};
156
+ }
157
+ /* .cluster div {
158
+ color: ${s.titleColor};
159
+ } */
160
+
161
+ div.mermaidTooltip {
162
+ position: absolute;
163
+ text-align: center;
164
+ max-width: 200px;
165
+ padding: 2px;
166
+ font-family: ${s.fontFamily};
167
+ font-size: 12px;
168
+ background: ${s.tertiaryColor};
169
+ border: 1px solid ${s.border2};
170
+ border-radius: 2px;
171
+ pointer-events: none;
172
+ z-index: 100;
173
+ }
174
+
175
+ .agentflowTitleText {
176
+ text-anchor: middle;
177
+ font-size: 18px;
178
+ fill: ${s.textColor};
179
+ }
180
+
181
+ rect.text {
182
+ fill: none;
183
+ stroke-width: 0;
184
+ }
185
+
186
+ .icon-shape, .image-shape {
187
+ background-color: ${s.edgeLabelBackground};
188
+ p {
189
+ background-color: ${s.edgeLabelBackground};
190
+ padding: 2px;
191
+ }
192
+ .label rect {
193
+ opacity: 0.5;
194
+ background-color: ${s.edgeLabelBackground};
195
+ fill: ${s.edgeLabelBackground};
196
+ }
197
+ text-align: center;
198
+ }
199
+ ${_1()}
200
+ `,"getStyles"),ns=rs,Is={parser:ts,get db(){return new J1},renderer:es,styles:ns,init:A(s=>{s.agentflow??={},s.layout&&zt({layout:s.layout}),s.flowchart??={},s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,zt({flowchart:{arrowMarkerAbsolute:s.arrowMarkerAbsolute}})},"init")};export{Is as diagram};
@@ -0,0 +1,24 @@
1
+ import{a as N}from"./chunk-NCOVM3YF.js";import{a as L}from"./chunk-XE6SLBBE.js";import"./chunk-HNO6SQ7M.js";import"./chunk-4NXNVEWK.js";import{a as _}from"./chunk-P2FYOAEV.js";import"./chunk-FZFME6UK.js";import"./chunk-CALYHV7D.js";import"./chunk-7BAEB64Q.js";import"./chunk-SVM2H22K.js";import"./chunk-YUN7JSFJ.js";import"./chunk-4RNNBDFQ.js";import"./chunk-2ZCRJZGF.js";import"./chunk-ZZHMDDZN.js";import"./chunk-56ITEUFA.js";import"./chunk-RORF4F5V.js";import"./chunk-KPNXJBIW.js";import"./chunk-ADDF76FL.js";import"./chunk-JJ6YWJQS.js";import"./chunk-PZELHD2H.js";import{p as y}from"./chunk-FNOXGAL5.js";import"./chunk-EO3ER3GN.js";import{B as S,O as D,T,U as z,V as E,W as F,X as P,Y as A,Z as W,q as C}from"./chunk-SZYM6GIJ.js";import{b as x}from"./chunk-5XZPGKN4.js";import{a as g}from"./chunk-EIBFAW37.js";import"./chunk-FTY6WLQF.js";import"./chunk-7FMWBHZO.js";var j=C.packet,u,M=(u=class{constructor(){this.packet=[],this.setAccTitle=z,this.getAccTitle=E,this.setDiagramTitle=A,this.getDiagramTitle=W,this.getAccDescription=P,this.setAccDescription=F}getConfig(){let t=y({...j,...S().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){T(),this.packet=[]}},g(u,"PacketDB"),u),G=1e4,H=g((e,t)=>{N(e,t);let a=-1,o=[],s=1,{bitsPerRow:l}=t.getConfig();for(let{start:r,end:i,bits:d,label:h}of e.blocks){if(r!==void 0&&i!==void 0&&i<r)throw new Error(`Packet block ${r} - ${i} is invalid. End must be greater than start.`);if(r??=a+1,r!==a+1)throw new Error(`Packet block ${r} - ${i??r} is not contiguous. It should start from ${a+1}.`);if(d===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(i??=r+(d??1)-1,d??=i-r+1,a=i,x.debug(`Packet block ${r} - ${a} with label ${h}`);o.length<=l+1&&t.getPacket().length<G;){let[c,p]=K({start:r,end:i,bits:d,label:h},s,l);if(o.push(c),c.end+1===s*l&&(t.pushWord(o),o=[],s++),!p)break;({start:r,end:i,bits:d,label:h}=p)}}t.pushWord(o)},"populate"),K=g((e,t,a)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*a)return[e,void 0];let o=t*a-1,s=t*a;return[{start:e.start,end:o,label:e.label,bits:o-e.start},{start:s,end:e.end,label:e.label,bits:e.end-s}]},"getNextFittingBlock"),Y={parser:{yy:void 0},parse:g(async e=>{let t=await L("packet",e),a=Y.parser?.yy;if(!(a instanceof M))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");x.debug(t),H(t,a)},"parse")},U=g((e,t,a,o)=>{let s=o.db,l=s.getConfig(),{rowHeight:r,paddingY:i,bitWidth:d,bitsPerRow:h}=l,c=s.getPacket(),p=s.getDiagramTitle(),b=r+i,n=b*(c.length+1)-(p?0:r),f=d*h+2,k=_(t);k.attr("viewBox",`0 0 ${f} ${n}`),D(k,n,f,l.useMaxWidth);for(let[B,m]of c.entries())X(k,m,B,l);k.append("text").text(p).attr("x",f/2).attr("y",n-b/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),X=g((e,t,a,{rowHeight:o,paddingX:s,paddingY:l,bitWidth:r,bitsPerRow:i,showBits:d,bitOrder:h})=>{let c=e.append("g"),p=a*(o+l)+l,b=h==="descending";for(let n of t){let f=n.end-n.start+1,k=n.start%i,m=(b?i-k-f:k)*r+1,w=f*r-s;if(c.append("rect").attr("x",m).attr("y",p).attr("width",w).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",m+w/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!d)continue;let[I,O]=b?[n.end,n.start]:[n.start,n.end],v=f===1,$=p-2;c.append("text").attr("x",m+(v?w/2:0)).attr("y",$).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",v?"middle":"start").text(I),v||c.append("text").attr("x",m+w).attr("y",$).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(O)}},"drawWord"),q={draw:U},J={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},Q=g(({packet:e}={})=>{let t=y(J,e);return`
2
+ .packetByte {
3
+ font-size: ${t.byteFontSize};
4
+ }
5
+ .packetByte.start {
6
+ fill: ${t.startByteColor};
7
+ }
8
+ .packetByte.end {
9
+ fill: ${t.endByteColor};
10
+ }
11
+ .packetLabel {
12
+ fill: ${t.labelColor};
13
+ font-size: ${t.labelFontSize};
14
+ }
15
+ .packetTitle {
16
+ fill: ${t.titleColor};
17
+ font-size: ${t.titleFontSize};
18
+ }
19
+ .packetBlock {
20
+ stroke: ${t.blockStrokeColor};
21
+ stroke-width: ${t.blockStrokeWidth};
22
+ fill: ${t.blockFillColor};
23
+ }
24
+ `},"styles"),ot={parser:Y,get db(){return new M},renderer:q,styles:Q};export{ot as diagram};
@@ -0,0 +1,41 @@
1
+ import{a as F}from"./chunk-NCOVM3YF.js";import{a as D}from"./chunk-XE6SLBBE.js";import"./chunk-HNO6SQ7M.js";import"./chunk-4NXNVEWK.js";import{a as E}from"./chunk-P2FYOAEV.js";import"./chunk-FZFME6UK.js";import"./chunk-CALYHV7D.js";import"./chunk-7BAEB64Q.js";import"./chunk-SVM2H22K.js";import"./chunk-YUN7JSFJ.js";import"./chunk-4RNNBDFQ.js";import"./chunk-2ZCRJZGF.js";import"./chunk-ZZHMDDZN.js";import"./chunk-56ITEUFA.js";import"./chunk-RORF4F5V.js";import"./chunk-KPNXJBIW.js";import"./chunk-ADDF76FL.js";import"./chunk-JJ6YWJQS.js";import"./chunk-PZELHD2H.js";import{p as y}from"./chunk-FNOXGAL5.js";import"./chunk-EO3ER3GN.js";import{B as b,O as L,T,U as S,V as k,W as O,X as R,Y as I,Z as _,o as A,q as M}from"./chunk-SZYM6GIJ.js";import{b as C}from"./chunk-5XZPGKN4.js";import{a as i}from"./chunk-EIBFAW37.js";import"./chunk-FTY6WLQF.js";import"./chunk-7FMWBHZO.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w=32,P={axes:[],curves:[],options:x},g=structuredClone(P),U=M.radar,X=i(()=>y({...U,...b().radar}),"getConfig"),z=i(()=>g.axes,"getAxes"),K=i(()=>g.curves,"getCurves"),N=i(()=>g.options,"getOptions"),Y=i(a=>{g.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Z=i(a=>{g.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:q(t.entries)}))},"setCurves"),q=i(a=>{if(a[0].axis==null)return a.map(e=>e.value);let t=z();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{let r=a.find(n=>n.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=i(a=>{let t=a.reduce((e,r)=>(e[r.name]=r,e),{});g.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},g.options.ticks>w&&(C.warn(`Radar diagram ticks (${g.options.ticks}) exceeds maximum allowed (${w}). Using ${w} instead.`),g.options.ticks=w)},"setOptions"),Q=i(()=>{T(),g=structuredClone(P)},"clear"),$={getAxes:z,getCurves:K,getOptions:N,setAxes:Y,setCurves:Z,setOptions:J,getConfig:X,clear:Q,setAccTitle:S,getAccTitle:k,setDiagramTitle:I,getDiagramTitle:_,getAccDescription:R,setAccDescription:O},tt=i(a=>{F(a,$);let{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:i(async a=>{let t=await D("radar",a);C.debug(t),tt(t)},"parse")},at=i((a,t,e,r)=>{let n=r.db,l=n.getAxes(),c=n.getCurves(),s=n.getOptions(),o=n.getConfig(),d=n.getDiagramTitle(),p=E(t),u=rt(p,o),m=s.max??Math.max(...c.map(f=>Math.max(...f.entries))),h=s.min,v=Math.min(o.width,o.height)/2;nt(u,l,v,s.ticks,s.graticule),st(u,l,v,o),G(u,l,c,h,m,s.graticule,o),V(u,c,s.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=i((a,t)=>{let e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,n={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return L(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${n.x}, ${n.y})`)},"drawFrame"),nt=i((a,t,e,r,n)=>{if(n==="circle")for(let l=0;l<r;l++){let c=e*(l+1)/r;a.append("circle").attr("r",c).attr("class","radarGraticule")}else if(n==="polygon"){let l=t.length;for(let c=0;c<r;c++){let s=e*(c+1)/r,o=t.map((d,p)=>{let u=2*p*Math.PI/l-Math.PI/2,m=s*Math.cos(u),h=s*Math.sin(u);return`${m},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=i((a,t,e,r)=>{let n=t.length;for(let l=0;l<n;l++){let c=t[l].label,s=2*l*Math.PI/n-Math.PI/2,o=Math.cos(s),d=Math.sin(s);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");let p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",m=4;a.append("text").text(c).attr("x",e*r.axisLabelFactor*o+m*o).attr("y",e*r.axisLabelFactor*d+m*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function G(a,t,e,r,n,l,c){let s=t.length,o=Math.min(c.width,c.height)/2;e.forEach((d,p)=>{if(d.entries.length!==s)return;let u=d.entries.map((m,h)=>{let v=2*Math.PI*h/s-Math.PI/2,f=B(m,r,n,o),H=f*Math.cos(v),j=f*Math.sin(v);return{x:H,y:j}});l==="circle"?a.append("path").attr("d",W(u,c.curveTension)).attr("class",`radarCurve-${p}`):l==="polygon"&&a.append("polygon").attr("points",u.map(m=>`${m.x},${m.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}i(G,"drawCurves");function B(a,t,e,r){let n=Math.min(Math.max(a,t),e);return r*(n-t)/(e-t)}i(B,"relativeRadius");function W(a,t){let e=a.length,r=`M${a[0].x},${a[0].y}`;for(let n=0;n<e;n++){let l=a[(n-1+e)%e],c=a[n],s=a[(n+1)%e],o=a[(n+2)%e],d={x:c.x+(s.x-l.x)*t,y:c.y+(s.y-l.y)*t},p={x:s.x-(o.x-c.x)*t,y:s.y-(o.y-c.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${s.x},${s.y}`}return`${r} Z`}i(W,"closedRoundCurve");function V(a,t,e,r){if(!e)return;let n=(r.width/2+r.marginRight)*3/4,l=-(r.height/2+r.marginTop)*3/4,c=20;t.forEach((s,o)=>{let d=a.append("g").attr("transform",`translate(${n}, ${l+o*c})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(s.label)})}i(V,"drawLegend");var ot={draw:at},it=i((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){let n=a[`cScale${r}`];e+=`
2
+ .radarCurve-${r} {
3
+ color: ${n};
4
+ fill: ${n};
5
+ fill-opacity: ${t.curveOpacity};
6
+ stroke: ${n};
7
+ stroke-width: ${t.curveStrokeWidth};
8
+ }
9
+ .radarLegendBox-${r} {
10
+ fill: ${n};
11
+ fill-opacity: ${t.curveOpacity};
12
+ stroke: ${n};
13
+ }
14
+ `}return e},"genIndexStyles"),lt=i(a=>{let t=A(),e=b(),r=y(t,e.themeVariables),n=y(r.radar,a);return{themeVariables:r,radarOptions:n}},"buildRadarStyleOptions"),ct=i(({radar:a}={})=>{let{themeVariables:t,radarOptions:e}=lt(a);return`
15
+ .radarTitle {
16
+ font-size: ${t.fontSize};
17
+ color: ${t.titleColor};
18
+ dominant-baseline: hanging;
19
+ text-anchor: middle;
20
+ }
21
+ .radarAxisLine {
22
+ stroke: ${e.axisColor};
23
+ stroke-width: ${e.axisStrokeWidth};
24
+ }
25
+ .radarAxisLabel {
26
+ font-size: ${e.axisLabelFontSize}px;
27
+ color: ${e.axisColor};
28
+ }
29
+ .radarGraticule {
30
+ fill: ${e.graticuleColor};
31
+ fill-opacity: ${e.graticuleOpacity};
32
+ stroke: ${e.graticuleColor};
33
+ stroke-width: ${e.graticuleStrokeWidth};
34
+ }
35
+ .radarLegendText {
36
+ text-anchor: start;
37
+ font-size: ${e.legendFontSize}px;
38
+ dominant-baseline: hanging;
39
+ }
40
+ ${it(t,e)}
41
+ `},"styles"),vt={parser:et,db:$,renderer:ot,styles:ct};export{vt as diagram};
@@ -0,0 +1,24 @@
1
+ import{a as we}from"./chunk-NCOVM3YF.js";import{a as be}from"./chunk-XE6SLBBE.js";import"./chunk-HNO6SQ7M.js";import"./chunk-4NXNVEWK.js";import{a as Se}from"./chunk-P2FYOAEV.js";import{h as I,w as Q}from"./chunk-FH24BIIA.js";import"./chunk-FZFME6UK.js";import"./chunk-CALYHV7D.js";import"./chunk-7BAEB64Q.js";import"./chunk-SVM2H22K.js";import"./chunk-YUN7JSFJ.js";import"./chunk-4RNNBDFQ.js";import"./chunk-2ZCRJZGF.js";import"./chunk-ZZHMDDZN.js";import"./chunk-56ITEUFA.js";import"./chunk-RORF4F5V.js";import"./chunk-KPNXJBIW.js";import"./chunk-ADDF76FL.js";import"./chunk-JJ6YWJQS.js";import"./chunk-PZELHD2H.js";import{a as ve}from"./chunk-YCE5ECKY.js";import{c as xe,d as D}from"./chunk-UNEI7LMM.js";import{p as ee}from"./chunk-FNOXGAL5.js";import"./chunk-EO3ER3GN.js";import{B as J,O as ue,T as fe,U as he,V as de,W as pe,X as ge,Y as me,Z as ye,o as oe,q as ce}from"./chunk-SZYM6GIJ.js";import{b as Z,d as O}from"./chunk-5XZPGKN4.js";import{a as b}from"./chunk-EIBFAW37.js";import"./chunk-FTY6WLQF.js";import"./chunk-7FMWBHZO.js";function Pe(t){var n=0,a=t.children,r=a&&a.length;if(!r)n=1;else for(;--r>=0;)n+=a[r].value;t.value=n}function Ve(){return this.eachAfter(Pe)}function Ee(t,n){let a=-1;for(let r of this)t.call(n,r,++a,this);return this}function Ie(t,n){for(var a=this,r=[a],i,l,u=-1;a=r.pop();)if(t.call(n,a,++u,this),i=a.children)for(l=i.length-1;l>=0;--l)r.push(i[l]);return this}function We(t,n){for(var a=this,r=[a],i=[],l,u,f,p=-1;a=r.pop();)if(i.push(a),l=a.children)for(u=0,f=l.length;u<f;++u)r.push(l[u]);for(;a=i.pop();)t.call(n,a,++p,this);return this}function Be(t,n){let a=-1;for(let r of this)if(t.call(n,r,++a,this))return r}function He(t){return this.eachAfter(function(n){for(var a=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)a+=r[i].value;n.value=a})}function qe(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})}function Oe(t){for(var n=this,a=Xe(n,t),r=[n];n!==a;)n=n.parent,r.push(n);for(var i=r.length;t!==a;)r.splice(i,0,t),t=t.parent;return r}function Xe(t,n){if(t===n)return t;var a=t.ancestors(),r=n.ancestors(),i=null;for(t=a.pop(),n=r.pop();t===n;)i=t,t=a.pop(),n=r.pop();return i}function Ge(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n}function Ye(){return Array.from(this)}function je(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t}function Ke(){var t=this,n=[];return t.each(function(a){a!==t&&n.push({source:a.parent,target:a})}),n}function*Ue(){var t=this,n,a=[t],r,i,l;do for(n=a.reverse(),a=[];t=n.pop();)if(yield t,r=t.children)for(i=0,l=r.length;i<l;++i)a.push(r[i]);while(a.length)}function te(t,n){t instanceof Map?(t=[void 0,t],n===void 0&&(n=Qe)):n===void 0&&(n=Je);for(var a=new Y(t),r,i=[a],l,u,f,p;r=i.pop();)if((u=n(r.data))&&(p=(u=Array.from(u)).length))for(r.children=u,f=p-1;f>=0;--f)i.push(l=u[f]=new Y(u[f])),l.parent=r,l.depth=r.depth+1;return a.eachBefore(tt)}function Ze(){return te(this).eachBefore(et)}function Je(t){return t.children}function Qe(t){return Array.isArray(t)?t[1]:null}function et(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function tt(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function Y(t){this.data=t,this.depth=this.height=0,this.parent=null}Y.prototype=te.prototype={constructor:Y,count:Ve,each:Ee,eachAfter:We,eachBefore:Ie,find:Be,sum:He,sort:qe,path:Oe,ancestors:Ge,descendants:Ye,leaves:je,links:Ke,copy:Ze,[Symbol.iterator]:Ue};function nt(t){if(typeof t!="function")throw new Error;return t}function X(){return 0}function G(t){return function(){return t}}function rt(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Ce(t,n,a,r,i){for(var l=t.children,u,f=-1,p=l.length,o=t.value&&(r-n)/t.value;++f<p;)u=l[f],u.y0=a,u.y1=i,u.x0=n,u.x1=n+=u.value*o}function at(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}at.prototype=Object.create(Y.prototype);function _e(t,n,a,r,i){for(var l=t.children,u,f=-1,p=l.length,o=t.value&&(i-a)/t.value;++f<p;)u=l[f],u.x0=n,u.x1=r,u.y0=a,u.y1=a+=u.value*o}var Te=(1+Math.sqrt(5))/2;function ze(t,n,a,r,i,l){for(var u=[],f=n.children,p,o,h=0,x=0,s=f.length,S,v,m=n.value,d,w,M,A,P,H,k;h<s;){S=i-a,v=l-r;do d=f[x++].value;while(!d&&x<s);for(w=M=d,H=Math.max(v/S,S/v)/(m*t),k=d*d*H,P=Math.max(M/k,k/w);x<s;++x){if(d+=o=f[x].value,o<w&&(w=o),o>M&&(M=o),k=d*d*H,A=Math.max(M/k,k/w),A>P){d-=o;break}P=A}u.push(p={value:d,dice:S<v,children:f.slice(h,x)}),p.dice?Ce(p,a,r,i,m?r+=v*d/m:l):_e(p,a,r,m?a+=S*d/m:i,l),m-=d,h=x}return u}var it=(function t(n){function a(r,i,l,u,f){ze(n,r,i,l,u,f)}return a.ratio=function(r){return t((r=+r)>1?r:1)},a})(Te);function Ae(){var t=it,n=!1,a=1,r=1,i=[0],l=X,u=X,f=X,p=X,o=X;function h(s){return s.x0=s.y0=0,s.x1=a,s.y1=r,s.eachBefore(x),i=[0],n&&s.eachBefore(rt),s}function x(s){var S=i[s.depth],v=s.x0+S,m=s.y0+S,d=s.x1-S,w=s.y1-S;d<v&&(v=d=(v+d)/2),w<m&&(m=w=(m+w)/2),s.x0=v,s.y0=m,s.x1=d,s.y1=w,s.children&&(S=i[s.depth+1]=l(s)/2,v+=o(s)-S,m+=u(s)-S,d-=f(s)-S,w-=p(s)-S,d<v&&(v=d=(v+d)/2),w<m&&(m=w=(m+w)/2),t(s,v,m,d,w))}return h.round=function(s){return arguments.length?(n=!!s,h):n},h.size=function(s){return arguments.length?(a=+s[0],r=+s[1],h):[a,r]},h.tile=function(s){return arguments.length?(t=nt(s),h):t},h.padding=function(s){return arguments.length?h.paddingInner(s).paddingOuter(s):h.paddingInner()},h.paddingInner=function(s){return arguments.length?(l=typeof s=="function"?s:G(+s),h):l},h.paddingOuter=function(s){return arguments.length?h.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):h.paddingTop()},h.paddingTop=function(s){return arguments.length?(u=typeof s=="function"?s:G(+s),h):u},h.paddingRight=function(s){return arguments.length?(f=typeof s=="function"?s:G(+s),h):f},h.paddingBottom=function(s){return arguments.length?(p=typeof s=="function"?s:G(+s),h):p},h.paddingLeft=function(s){return arguments.length?(o=typeof s=="function"?s:G(+s),h):o},h}var mt=(function t(n){function a(r,i,l,u,f){if((p=r._squarify)&&p.ratio===n)for(var p,o,h,x,s=-1,S,v=p.length,m=r.value;++s<v;){for(o=p[s],h=o.children,x=o.value=0,S=h.length;x<S;++x)o.value+=h[x].value;o.dice?Ce(o,i,l,u,m?l+=(f-l)*o.value/m:f):_e(o,i,l,m?i+=(u-i)*o.value/m:u,f),m-=o.value}else r._squarify=p=ze(n,r,i,l,u,f),p.ratio=n}return a.ratio=function(r){return t((r=+r)>1?r:1)},a})(Te);var B,Le=(B=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=he,this.getAccTitle=de,this.setDiagramTitle=me,this.getDiagramTitle=ye,this.getAccDescription=ge,this.setAccDescription=pe}getNodes(){return this.nodes}getConfig(){let n=ce,a=J();return ee({...n.treemap,...a.treemap??{}})}addNode(n,a){this.nodes.push(n),this.levels.set(n,a),a===0&&(this.outerNodes.push(n),this.root??=n)}getRoot(){return{name:"",children:this.outerNodes}}addClass(n,a){let r=this.classes.get(n)??{id:n,styles:[],textStyles:[]},i=a.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(l=>{xe(l)&&(r?.textStyles?r.textStyles.push(l):r.textStyles=[l]),r?.styles?r.styles.push(l):r.styles=[l]}),this.classes.set(n,r)}getClasses(){return this.classes}getStylesForClass(n){return this.classes.get(n)?.styles??[]}clear(){fe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},b(B,"TreeMapDB"),B);function $e(t){if(!t.length)return[];let n=[],a=[];return t.forEach(r=>{let i={name:r.name,children:r.type==="Leaf"?void 0:[]};for(i.classSelector=r?.classSelector,r?.cssCompiledStyles&&(i.cssCompiledStyles=r.cssCompiledStyles),r.type==="Leaf"&&r.value!==void 0&&(i.value=r.value);a.length>0&&a[a.length-1].level>=r.level;)a.pop();if(a.length===0)n.push(i);else{let l=a[a.length-1].node;l.children?l.children.push(i):l.children=[i]}r.type!=="Leaf"&&a.push({node:i,level:r.level})}),n}b($e,"buildHierarchy");var lt=b((t,n)=>{we(t,n);let a=[];for(let l of t.TreemapRows??[])l.$type==="ClassDefStatement"&&n.addClass(l.className??"",l.styleText??"");for(let l of t.TreemapRows??[]){let u=l.item;if(!u)continue;let f=l.indent?parseInt(l.indent):0,p=st(u),o=u.classSelector?n.getStylesForClass(u.classSelector):[],h=o.length>0?o:void 0,x={level:f,name:p,type:u.$type,value:u.value,classSelector:u.classSelector,cssCompiledStyles:h};a.push(x)}let r=$e(a),i=b((l,u)=>{for(let f of l)n.addNode(f,u),f.children&&f.children.length>0&&i(f.children,u+1)},"addNodesRecursively");i(r,0)},"populate"),st=b(t=>t.name?String(t.name):"","getItemName"),Me={parser:{yy:void 0},parse:b(async t=>{try{let a=await be("treemap",t);Z.debug("Treemap AST:",a);let r=Me.parser?.yy;if(!(r instanceof Le))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(a,r)}catch(n){throw Z.error("Error parsing treemap:",n),n}},"parse")},ot=10,W=10,j=25,ct=b((t,n,a,r)=>{let i=r.db,l=i.getConfig(),u=l.padding??ot,f=i.getDiagramTitle(),p=i.getRoot(),{themeVariables:o}=J();if(!p)return;let h=f?30:0,x=Se(n),s=l.nodeWidth?l.nodeWidth*W:960,S=l.nodeHeight?l.nodeHeight*W:500,v=s,m=S+h;x.attr("viewBox",`0 0 ${v} ${m}`),ue(x,m,v,l.useMaxWidth);let d;try{let e=l.valueFormat||",";if(e==="$0,0")d=b(c=>"$"+I(",")(c),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){let c=/\.\d+/.exec(e),g=c?c[0]:"";d=b(C=>"$"+I(","+g)(C),"valueFormat")}else if(e.startsWith("$")){let c=e.substring(1);d=b(g=>"$"+I(c||"")(g),"valueFormat")}else d=I(e)}catch(e){Z.error("Error creating format function:",e),d=I(",")}let w=Q().range(["transparent",o.cScale0,o.cScale1,o.cScale2,o.cScale3,o.cScale4,o.cScale5,o.cScale6,o.cScale7,o.cScale8,o.cScale9,o.cScale10,o.cScale11]),M=Q().range(["transparent",o.cScalePeer0,o.cScalePeer1,o.cScalePeer2,o.cScalePeer3,o.cScalePeer4,o.cScalePeer5,o.cScalePeer6,o.cScalePeer7,o.cScalePeer8,o.cScalePeer9,o.cScalePeer10,o.cScalePeer11]),A=Q().range([o.cScaleLabel0,o.cScaleLabel1,o.cScaleLabel2,o.cScaleLabel3,o.cScaleLabel4,o.cScaleLabel5,o.cScaleLabel6,o.cScaleLabel7,o.cScaleLabel8,o.cScaleLabel9,o.cScaleLabel10,o.cScaleLabel11]);f&&x.append("text").attr("x",v/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f);let P=x.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),H=te(p).sum(e=>e.value??0).sort((e,c)=>(c.value??0)-(e.value??0)),ae=Ae().size([s,S]).paddingTop(e=>e.children&&e.children.length>0?j+W:0).paddingInner(u).paddingLeft(e=>e.children&&e.children.length>0?W:0).paddingRight(e=>e.children&&e.children.length>0?W:0).paddingBottom(e=>e.children&&e.children.length>0?W:0).round(!0)(H),ke=ae.descendants().filter(e=>e.children&&e.children.length>0),q=P.selectAll(".treemapSection").data(ke).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);q.append("rect").attr("width",e=>e.x1-e.x0).attr("height",j).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),q.append("clipPath").attr("id",(e,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",j),q.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,c)=>`treemapSection section${c}`).attr("fill",e=>w(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";let c=D({cssCompiledStyles:e.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),q.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",j/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,c)=>`url(#clip-section-${n}-${c})`).attr("style",e=>{if(e.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=D({cssCompiledStyles:e.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;let c=O(this),g=e.data.name;c.text(g);let C=e.x1-e.x0,T=6,_;l.showValues!==!1&&e.value?_=C-10-30-10-T:_=C-T-6;let y=Math.max(15,_),F=c.node();if(F.getComputedTextLength()>y){let R=g;for(;R.length>0;){if(R=g.substring(0,R.length-1),R.length===0){c.text("..."),F.getComputedTextLength()>y&&c.text("");break}if(c.text(R+"..."),F.getComputedTextLength()<=y)break}}}),l.showValues!==!1&&q.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",j/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?d(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=D({cssCompiledStyles:e.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")});let ie=ae.leaves(),L=ie.length>20,Ne=L?16:38,K=L?14:28,V=L?4:8,E=L?4:6,ne=L?2:4,le=L?8:10,re=L?1:2,U=P.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,c)=>`treemapNode treemapLeafGroup leaf${c}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);U.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?w(e.parent.data.name):w(e.data.name)).attr("style",e=>D({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?w(e.parent.data.name):w(e.data.name)).attr("stroke-width",3),U.append("clipPath").attr("id",(e,c)=>`clip-${n}-${c}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),U.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Ne}px;fill:`+A(e.data.name)+";",g=D({cssCompiledStyles:e.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,c)=>`url(#clip-${n}-${c})`).text(e=>e.data.name).each(function(e){let c=O(this),g=e.x1-e.x0,C=e.y1-e.y0,T=c.node(),_=g-2*ne,N=C-2*ne;if(_<le||N<le){c.style("display","none");return}let y=parseInt(c.style("font-size"),10),F=.6;for(;T.getComputedTextLength()>_&&y>V;)y--,c.style("font-size",`${y}px`);let z=Math.max(E,Math.min(K,Math.round(y*F))),$=y+re+z;for(;$>N&&y>V&&(y--,z=Math.max(E,Math.min(K,Math.round(y*F))),!(z<E&&y===V));)c.style("font-size",`${y}px`),$=y+re+z,z<=E&&$>N;c.style("font-size",`${y}px`),L?(y<V||N<V)&&c.style("display","none"):(T.getComputedTextLength()>_||y<V||N<y)&&c.style("display","none")}),l.showValues!==!1&&U.append("text").attr("class","treemapValue").attr("x",c=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",c=>{let g=`text-anchor: middle; dominant-baseline: hanging; font-size: ${K}px;fill:`+A(c.data.name)+";",C=D({cssCompiledStyles:c.data.cssCompiledStyles});return g+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,g)=>`url(#clip-${n}-${g})`).text(c=>c.value?d(c.value):"").each(function(c){let g=O(this),C=this.parentNode;if(!C){g.style("display","none");return}let T=O(C).select(".treemapLabel");if(T.empty()||T.style("display")==="none"){g.style("display","none");return}let _=parseFloat(T.style("font-size")),y=Math.max(E,Math.min(K,Math.round(_*.6)));g.style("font-size",`${y}px`);let z=(c.y1-c.y0)/2+_/2+re;g.attr("y",z);let $=c.x1-c.x0,se=c.y1-c.y0-4,De=$-2*ne;g.node().getComputedTextLength()>De||z+y>se||y<E?g.style("display","none"):g.style("display",null)});let Fe=l.diagramPadding??8;ve(x,Fe,"flowchart",l?.useMaxWidth||!1)},"draw"),ut=b(function(t,n){return n.db.getClasses()},"getClasses"),ft={draw:ct,getClasses:ut},ht={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},dt=b(({treemap:t}={})=>{let n=oe(),a=J(),r=ee(n,a.themeVariables),i=ee(ht,t),l=i.titleColor??r.titleColor,u=i.labelColor??r.textColor,f=i.valueColor??r.textColor;return`
2
+ .treemapNode.section {
3
+ stroke: ${i.sectionStrokeColor};
4
+ stroke-width: ${i.sectionStrokeWidth};
5
+ fill: ${i.sectionFillColor};
6
+ }
7
+ .treemapNode.leaf {
8
+ stroke: ${i.leafStrokeColor};
9
+ stroke-width: ${i.leafStrokeWidth};
10
+ fill: ${i.leafFillColor};
11
+ }
12
+ .treemapLabel {
13
+ fill: ${u};
14
+ font-size: ${i.labelFontSize};
15
+ }
16
+ .treemapValue {
17
+ fill: ${f};
18
+ font-size: ${i.valueFontSize};
19
+ }
20
+ .treemapTitle {
21
+ fill: ${l};
22
+ font-size: ${i.titleFontSize};
23
+ }
24
+ `},"getStyles"),pt=dt,Lt={parser:Me,get db(){return new Le},renderer:ft,styles:pt};export{Lt as diagram};
@@ -0,0 +1,3 @@
1
+ import{a as V}from"./chunk-NCOVM3YF.js";import{a as j}from"./chunk-XE6SLBBE.js";import"./chunk-HNO6SQ7M.js";import"./chunk-4NXNVEWK.js";import"./chunk-FZFME6UK.js";import"./chunk-CALYHV7D.js";import"./chunk-7BAEB64Q.js";import"./chunk-SVM2H22K.js";import"./chunk-YUN7JSFJ.js";import"./chunk-4RNNBDFQ.js";import"./chunk-2ZCRJZGF.js";import"./chunk-ZZHMDDZN.js";import"./chunk-56ITEUFA.js";import"./chunk-RORF4F5V.js";import"./chunk-KPNXJBIW.js";import"./chunk-ADDF76FL.js";import"./chunk-JJ6YWJQS.js";import{f as X}from"./chunk-PZELHD2H.js";import{i as w,l as G,p as L}from"./chunk-FNOXGAL5.js";import"./chunk-EO3ER3GN.js";import{B as v,H as b,T as N,U as T,V as C,W as I,X as O,Y as W,Z as H,_ as k,ca as U,q as D}from"./chunk-SZYM6GIJ.js";import{b as f,d as _}from"./chunk-5XZPGKN4.js";import{a as o}from"./chunk-EIBFAW37.js";import"./chunk-FTY6WLQF.js";import"./chunk-7FMWBHZO.js";var Y="position frame",z="frame positioned",F="position relation",K="relation positioned",we=o(function(e){f.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){q(),N()},"clear");function q(){S={}}o(q,"reset");var Se=D.eventmodeling,Me=o(()=>L({...Se,...v().eventmodeling}),"getConfig"),S={};function J(){let e=ke,{ast:n}=S,t=A();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,r)=>{let a=re(i,n.dataEntities,t);e=P(e,{$kind:Y,index:r,frame:i,textProps:a});let d;ce(i)?(f.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=P(e,{$kind:F,index:r,frame:i,sourceFrame:l})})):e=P(e,{$kind:F,index:r,frame:i})}),e={...e,sortedSwimlanesArray:$(e.swimlanes)},e}o(J,"getState");function Q(e){S.ast=void 0;let n=new Set;for(let t of e.frames){if(n.has(t.name)){let i=t.$cstNode?.range.start.line,r=i===void 0?"":` on line ${i+1}`;throw new Error(`Duplicate event modeling frame ID "${t.name}"${r}`)}n.add(t.name)}S.ast=e}o(Q,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function A(){return s}o(A,"getDiagramProps");var ke={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function Z(e){let n=e.split(".");if(n.length===2)return n[0]}o(Z,"extractNamespace");function ee(e){let n=e.split(".");return n.length===2?n[1]:e}o(ee,"extractName");function te(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(te,"findSwimlaneByNamespace");function y(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{let r=Number.parseInt(i);return r>n&&r<t}).map(i=>Number.parseInt(i)))+1}o(y,"findNextAvailableIndex");function ne(e,n){let t=Z(e.entityIdentifier),i=te(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:y(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:y(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:y(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(ne,"calculateSwimlaneProps");function ie(e){let{themeVariables:n}=v();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(ie,"calculateEntityVisualProps");function re(e,n,t){let i=v(),r=b(ee(e.entityIdentifier)??"",i),a,d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},c=`<b>${w(r,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(a=e.dataInlineValue,a=a.substring(a.indexOf("{")+1),a=a.substring(0,a.lastIndexOf("}")-1),a=b(a,i),a=w(a,t.textMaxWidth,d),a=a.replaceAll(" ","&nbsp;")),e.dataReference){let p=n.find(M=>M.name===e.dataReference?.$refText);p&&(a=p.dataBlockValue,a=a.substring(a.indexOf(`{
2
+ `)+2),a=a.substring(0,a.lastIndexOf("}")-1),a=b(a,i),a=w(a,t.textMaxWidth,d),a=a.replaceAll(" ","&nbsp;"),a+="<br/>")}let m=a!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${a}</code>`);let x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=G(c,x),h=m?u.width/3:u.width,g={content:c,width:h,height:u.height};return f.debug(`[${e.name}] ${e.entityIdentifier} text`,g),g}o(re,"calculateTextProps");function ae(e,n){let t=n,i=ie(t.frame),r={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:z,frame:t.frame,index:t.index,visual:i,dimension:r,textProps:t.textProps}]}o(ae,"decidePositionFrame");function oe(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(oe,"calculateX");function se(e,n){let t=[...e.map(i=>i.r),n];return Math.max(...t)}o(se,"calculateMaxRight");function $(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o($,"sortedSwimlanesArray");function de(e,n){let t=n,i=ne(t.frame,e.swimlanes),r;i.index in e.swimlanes?r=e.swimlanes[i.index]:r={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=oe(r,d,a),m=c+l.width+s.boxPadding,x=se(Object.values(e.swimlanes),m);r.r=c+l.width,r.maxHeight=Math.max(r.maxHeight,l.height),r.height=Math.max(s.swimlaneMinHeight,r.maxHeight)+2*s.swimlanePadding;let u={x:c,y:s.swimlanePadding+r.y,r:m,dimension:l,leftSibling:!1,swimlane:r,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${r.index}`]:r},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},g=$(h.swimlanes);g.length>0&&(g[0].y=0);for(let p=1;p<g.length;p++){let M=g[p],R=g[p-1];M.y=R.y+R.height+s.swimlaneGap}return h}o(de,"evolveFramePositioned");function le(e,n){return e===0&&n.sourceFrames.length===0}o(le,"isFirstFrame");function ce(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(ce,"hasSourceFrame");function B(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(B,"findBoxByFrame");function me(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){let r=e[i];if(r.swimlane.index!==n)return r}}o(me,"findBoxByLineIndex");function ue(e,n){let t=n;if(le(t.index,t.frame))return[];let i=B(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let r;if(t.sourceFrame)r=B(e.boxes,t.sourceFrame);else{if(X(t.frame))return[];r=me(e.boxes,i.swimlane.index,t.index-1)}return r===void 0?[]:[{$kind:K,frame:t.frame,index:t.index,sourceBox:r,targetBox:i}]}o(ue,"decidePositionRelation");function xe(e,n){let t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(xe,"evolveRelationPositioned");var Fe={[Y]:ae,[F]:ue},Be={[z]:de,[K]:xe};function fe(e,n){let t=Fe[n.$kind];if(t==null)return[];let i=t(e,n);return f.debug("decided events",i),i}o(fe,"decide");function ge(e,n){let t=n.reduce((i,r)=>{let a=Be[r.$kind];return a==null?i:a(i,r)},e);return f.debug("evolve events",{state:e,newState:t,events:n}),t}o(ge,"evolve");function P(e,n){let t=fe(e,n);return ge(e,t)}o(P,"dispatch");var E={getConfig:Me,preserveCommentsWhenParsing:!0,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:T,getAccTitle:C,getAccDescription:O,setAccDescription:I,setDiagramTitle:W,getDiagramTitle:H,setAst:Q,getDiagramProps:A,getState:J},Ee={parse:o(async e=>{let n=await j("eventmodeling",e);f.debug(n),E.setAst(n),V(n,E)},"parse")},Ae=k(),$e=Ae?.eventmodeling;function he(e,n){return t=>{let i=t.swimlane.y+n.swimlanePadding,r=e.append("g").attr("class","em-box");r.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),r.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(he,"renderD3Box");function pe(e,n){return e>n}o(pe,"dirUpwards");function ve(e,n,t,i){return r=>{let a=r.sourceBox.swimlane.y+n.swimlanePadding,d=r.targetBox.swimlane.y+n.swimlanePadding,l=pe(a,d),c=r.sourceBox.x+r.sourceBox.dimension.width*2/3,m=r.targetBox.x+r.targetBox.dimension.width/3,x,u;f.debug(`rendering relation up=${l} for `,{sourceBox:r.sourceBox,targetBox:r.targetBox}),l?(x=a,u=d+r.targetBox.dimension.height):(x=a+r.sourceBox.dimension.height,u=d);let h=i.emRelationStroke??r.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",r.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ve,"renderD3Relation");function be(e,n,t,i){return r=>{let a=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";a.append("rect").attr("x",0).attr("y",r.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",r.height).attr("fill",d).attr("stroke",l),a.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",r.y+30).text(r.label)}}o(be,"renderD3Swimlane");var Re=o(function(e,n,t,i){if(f.debug("in eventmodeling renderer",e+`
3
+ `,"id:",n,t),!$e)throw new Error("EventModeling config not found");let r=i.db,{themeVariables:a,eventmodeling:d}=k(),l=_(`[id="${n}"]`),c=r.getDiagramProps(),m=r.getState(),x=`em-arrowhead-${n}`,u=a.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(be(l,m.maxR,c,a)),m.boxes.forEach(he(l,c)),m.relations.forEach(ve(l,c,x,a)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),U(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),De={draw:Re},Ne=o(e=>"","getStyles"),Te=Ne,Le={parser:Ee,db:E,renderer:De,styles:Te};export{Le as diagram};