@bkm016/basalt 0.1.3 → 0.1.5

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 (287) hide show
  1. package/README.md +53 -5
  2. package/{chunk-y648fzx0.js → chunk-0039s4jt.js} +3 -3
  3. package/{chunk-m40gxwq4.js → chunk-00gwse5r.js} +3 -3
  4. package/{chunk-t6zs4kw0.js → chunk-0fwdxd45.js} +2 -2
  5. package/{chunk-6hssbcgj.js → chunk-0j0qggej.js} +1 -1
  6. package/chunk-0n99m9m4.js +2 -0
  7. package/{chunk-d8gtbw9g.js → chunk-0stvywr8.js} +1 -1
  8. package/{chunk-ztsjgssj.js → chunk-1xa7d5mh.js} +1 -1
  9. package/chunk-2nb3d92s.js +2 -0
  10. package/chunk-2nkfxhef.js +3868 -0
  11. package/chunk-2pa1z37c.js +2 -0
  12. package/{chunk-fw2bpqmw.js → chunk-2qcpq99g.js} +1 -1
  13. package/{chunk-981f9dw8.js → chunk-36cqq0ga.js} +6 -6
  14. package/{chunk-3cjsd292.js → chunk-3c330qna.js} +2 -2
  15. package/chunk-3k627vf2.js +3 -0
  16. package/{chunk-r7fpkb49.js → chunk-3k7ejpkc.js} +1 -1
  17. package/chunk-4g5f43ea.js +3 -0
  18. package/{chunk-fjtvjrkg.js → chunk-539ekagy.js} +4 -4
  19. package/{chunk-97rzj7f6.js → chunk-5v4g21rw.js} +1 -1
  20. package/{chunk-aefadsy6.js → chunk-6dsq0fns.js} +2 -2
  21. package/{chunk-pbcy6zdt.js → chunk-7as47pcw.js} +1 -1
  22. package/{chunk-g2t6t8fk.js → chunk-7jezts2n.js} +2 -2
  23. package/{chunk-8tjad3r0.js → chunk-7qq99360.js} +6 -6
  24. package/{chunk-gp7y0fja.js → chunk-7tgqhveh.js} +15 -15
  25. package/{chunk-mvfsxdx6.js → chunk-7w0mefgk.js} +10 -10
  26. package/{chunk-y58ygzn9.js → chunk-818nd6s1.js} +3 -3
  27. package/{chunk-vv7fp27r.js → chunk-8mezk0cb.js} +2 -2
  28. package/{chunk-rtzqqngy.js → chunk-8xb636vr.js} +5 -5
  29. package/{chunk-2esbgxps.js → chunk-980drajf.js} +15 -15
  30. package/{chunk-c7x1zq39.js → chunk-9z7sdh5e.js} +3 -3
  31. package/{chunk-10xzzn07.js → chunk-a4b75ekk.js} +2 -2
  32. package/{chunk-5j1krv9v.js → chunk-ar3dbfp9.js} +1 -1
  33. package/{chunk-vk1gxk1t.js → chunk-aw65h276.js} +1 -1
  34. package/{chunk-75m78j7x.js → chunk-b9fqretv.js} +2 -2
  35. package/{chunk-y0m980k3.js → chunk-bgkegf0k.js} +22 -22
  36. package/{chunk-0y7ne3d0.js → chunk-bwawt15q.js} +2 -2
  37. package/{chunk-pxsrqrd0.js → chunk-c4qr1f41.js} +2 -2
  38. package/chunk-dddsrff6.js +478 -0
  39. package/{chunk-xfvvh1s5.js → chunk-e63c1186.js} +1 -1
  40. package/{chunk-8296hw9m.js → chunk-ebzkckyw.js} +2 -2
  41. package/chunk-eegztdzb.js +2 -0
  42. package/{chunk-hwr56pfj.js → chunk-gw05p4g3.js} +1 -1
  43. package/{chunk-k23t7vhs.js → chunk-h1rypb99.js} +5 -5
  44. package/{chunk-nbb9trwz.js → chunk-hq5ke1yp.js} +2 -2
  45. package/{chunk-jwdb0ccj.js → chunk-jvwg4rn1.js} +3 -3
  46. package/{chunk-fm0k0qtz.js → chunk-jyrwk08p.js} +2 -2
  47. package/chunk-kns4kv7b.js +3 -0
  48. package/{chunk-8d46jtbj.js → chunk-mat08ab1.js} +2 -2
  49. package/{chunk-bannb9xm.js → chunk-mkp28k1x.js} +2 -2
  50. package/{chunk-d2j735sd.js → chunk-npez1492.js} +2 -2
  51. package/{chunk-shadcb9z.js → chunk-nx3jnbv8.js} +2 -2
  52. package/{chunk-ykens1hy.js → chunk-nxkmd29x.js} +1 -1
  53. package/{chunk-y7nma9rk.js → chunk-pjr91g6k.js} +2 -2
  54. package/{chunk-m8vkwdgr.js → chunk-r0jc8e7t.js} +4 -4
  55. package/chunk-rxj6tct8.js +2 -0
  56. package/{chunk-362g64pd.js → chunk-sqaam5ak.js} +1 -1
  57. package/{chunk-gzxnene8.js → chunk-srjgvdvs.js} +12 -12
  58. package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
  59. package/{chunk-k6w6y71k.js → chunk-t7sc0wwc.js} +2 -2
  60. package/{chunk-27gntzs5.js → chunk-v4k3qmdm.js} +2 -2
  61. package/{chunk-x1xss1d7.js → chunk-vt1anydc.js} +4 -4
  62. package/chunk-wd3z74av.js +2 -0
  63. package/{chunk-z55bmysw.js → chunk-wfyrfvfn.js} +1 -1
  64. package/{chunk-v9fea96h.js → chunk-wnzvnskb.js} +2 -2
  65. package/{chunk-cjc90f84.js → chunk-x89em726.js} +3 -3
  66. package/{chunk-1qpces5a.js → chunk-xtq1xpq0.js} +2 -2
  67. package/chunk-yna8bwqc.js +2 -0
  68. package/{chunk-k506w58v.js → chunk-zn0g0859.js} +2 -2
  69. package/{chunk-qe0teyn1.js → chunk-zrkh5dw7.js} +1 -1
  70. package/chunk-zzwjt7fp.js +2 -0
  71. package/compiled.js +12 -12
  72. package/package.json +1 -1
  73. package/ui-test-worker.js +20 -20
  74. package/web/chunk-01hcjafh.js +2 -0
  75. package/web/{chunk-n8sky2q6.js → chunk-07agqp8h.js} +1 -1
  76. package/web/{chunk-tx8240k4.js → chunk-0k9aec1s.js} +20 -20
  77. package/web/{chunk-74j07k8k.js → chunk-0p1nmj5n.js} +2 -2
  78. package/web/chunk-0qr891eq.js +70 -0
  79. package/web/{chunk-ts7zrf5b.js → chunk-0whceqes.js} +2 -2
  80. package/web/chunk-0ytga215.js +1 -0
  81. package/web/{chunk-h288yd5w.js → chunk-12z7d0hp.js} +3 -3
  82. package/web/chunk-14bad871.js +2 -0
  83. package/web/chunk-1amzv4ha.js +1 -0
  84. package/web/chunk-1cfh0e2e.js +324 -0
  85. package/web/chunk-1pasbxwh.js +89 -0
  86. package/web/{chunk-j0bwwc1g.js → chunk-1s2hp6h1.js} +1 -1
  87. package/web/chunk-26bwh1sb.js +169 -0
  88. package/web/{chunk-b0a8nbj0.js → chunk-2nht58dc.js} +5 -5
  89. package/web/chunk-2y0rc1fe.js +1 -0
  90. package/web/chunk-3hkgdw6f.js +36 -0
  91. package/web/chunk-4a4j030b.js +1 -0
  92. package/web/{chunk-4fzj0azw.js → chunk-4m3zdd41.js} +6 -6
  93. package/web/chunk-4w298aqs.js +1 -0
  94. package/web/{chunk-2hd1pe9w.js → chunk-56krfj3b.js} +7 -7
  95. package/web/{chunk-ds7srg4p.js → chunk-5nda24gv.js} +1 -1
  96. package/web/{chunk-5hmfk69r.js → chunk-5shygfgb.js} +19 -19
  97. package/web/chunk-65nwc4cf.js +1 -0
  98. package/web/chunk-6bwgdvf6.js +1 -0
  99. package/web/chunk-6enn8p66.js +1 -0
  100. package/web/chunk-6stt9d18.js +1 -0
  101. package/web/{chunk-4gavbw65.js → chunk-7a3c137d.js} +1 -1
  102. package/web/chunk-7e47b1sn.js +1 -0
  103. package/web/chunk-7pypx5h8.js +2 -0
  104. package/web/chunk-7znyd1mj.js +39 -0
  105. package/web/{chunk-0z0jycs8.js → chunk-892nf39p.js} +7 -7
  106. package/web/chunk-8r0s8tx7.js +1 -0
  107. package/web/chunk-9dy7z3ej.js +2 -0
  108. package/web/chunk-9mq2cdtq.js +1 -0
  109. package/web/chunk-9w5tf22s.js +1 -0
  110. package/web/{chunk-es28k2t7.js → chunk-9xgspn75.js} +2 -2
  111. package/web/{chunk-0xc2c540.js → chunk-abhad4zj.js} +56 -56
  112. package/web/chunk-advfpyb9.js +140 -0
  113. package/web/chunk-affear07.js +3 -0
  114. package/web/chunk-ahztazsg.js +1 -0
  115. package/web/chunk-aqt7kc3s.js +106 -0
  116. package/web/chunk-b5hah4mf.js +1 -0
  117. package/web/chunk-b8tfetd8.js +1 -0
  118. package/web/{chunk-7yc083xj.js → chunk-bnb9xhgw.js} +15 -15
  119. package/web/{chunk-n1dmrz44.js → chunk-c01176kn.js} +2 -2
  120. package/web/chunk-c3nn0vvc.js +1 -0
  121. package/web/chunk-c53xmf48.js +30 -0
  122. package/web/chunk-ckgpy4r4.js +1 -0
  123. package/web/chunk-crzseqbx.js +24 -0
  124. package/web/chunk-d22wq71s.js +1 -0
  125. package/web/{chunk-97b62pvb.js → chunk-d60dpf69.js} +19 -19
  126. package/web/{chunk-sn9ecfvy.js → chunk-d6ddkh6e.js} +1 -1
  127. package/web/{chunk-cg3jterp.js → chunk-d9wdsjkk.js} +2 -2
  128. package/web/{chunk-ttg6tbwx.js → chunk-da7m1kva.js} +2 -2
  129. package/web/chunk-dbnrfxt1.js +8 -0
  130. package/web/chunk-ddxf8e84.js +1 -0
  131. package/web/chunk-dzg1pv80.js +200 -0
  132. package/web/{chunk-xnq41dgs.js → chunk-e8h45nyr.js} +1 -1
  133. package/web/chunk-ej9vb61c.js +1 -0
  134. package/web/chunk-f9k3xrwb.js +2 -0
  135. package/web/{chunk-7xk0ntav.js → chunk-fjag6yg8.js} +2 -2
  136. package/web/chunk-fnnrrzqa.js +78 -0
  137. package/web/{chunk-n90cqdvg.js → chunk-fv6vm14n.js} +2 -2
  138. package/web/{chunk-axkyft9f.js → chunk-g5jxwkdh.js} +1 -1
  139. package/web/{chunk-ep37qp12.js → chunk-g8kkc6vz.js} +1 -1
  140. package/web/chunk-g9sqbafw.js +2 -0
  141. package/web/{chunk-g46f421r.js → chunk-gcv91974.js} +4 -4
  142. package/web/{chunk-7qxhk1kz.js → chunk-gxqaa4sv.js} +7 -7
  143. package/web/chunk-gxsb5tx3.js +1 -0
  144. package/web/{chunk-54thej0t.js → chunk-gyp6v7jd.js} +2 -2
  145. package/web/chunk-h0c42zy3.js +1 -0
  146. package/web/chunk-h2ag4kvz.js +2 -0
  147. package/web/{chunk-eqsd8zta.js → chunk-h6gh63xj.js} +2 -2
  148. package/web/{chunk-6m69hczt.js → chunk-h6k1x096.js} +2 -2
  149. package/web/{chunk-24mfx6w1.js → chunk-j1bw5v1g.js} +2 -2
  150. package/web/chunk-j34q5jn6.js +1 -0
  151. package/web/{chunk-0pbjgdgp.js → chunk-ja7w629n.js} +2 -2
  152. package/web/{chunk-zbj1trar.js → chunk-jam45rqg.js} +2 -2
  153. package/web/{chunk-23c1df7e.js → chunk-jcdw85mv.js} +1 -1
  154. package/web/chunk-jfvxxp5c.js +1 -0
  155. package/web/chunk-jg6fmz2d.js +1 -0
  156. package/web/{chunk-90xqeczk.js → chunk-k67v6dyg.js} +40 -40
  157. package/web/chunk-ka7c5rhx.js +99 -0
  158. package/web/{chunk-acybsx44.js → chunk-kza0t0gj.js} +1 -1
  159. package/web/{chunk-7520nrbb.js → chunk-m8knte9z.js} +1 -1
  160. package/web/{chunk-v5cnt7c8.js → chunk-mnzramhc.js} +1 -1
  161. package/web/{chunk-7v5rxabp.js → chunk-mpfgr049.js} +1 -1
  162. package/web/chunk-mz1dabxh.js +1 -0
  163. package/web/chunk-mz9b5bsa.js +1 -0
  164. package/web/chunk-p53n0hwr.js +1 -0
  165. package/web/chunk-paywgcf7.js +40 -0
  166. package/web/chunk-pfcnr9tw.js +1 -0
  167. package/web/chunk-pyg1mr80.js +303 -0
  168. package/web/chunk-q7xkscc5.js +1 -0
  169. package/web/{chunk-xzp7jf7e.js → chunk-qcge7d6s.js} +2 -2
  170. package/web/chunk-qmbgb79a.js +1139 -0
  171. package/web/{chunk-5b2nw6j1.js → chunk-qq5gh5zr.js} +1 -1
  172. package/web/chunk-qrdh9j62.js +1 -0
  173. package/web/{chunk-w7snhcyg.js → chunk-s24qs1bn.js} +9 -9
  174. package/web/chunk-sd22cnjy.js +1 -0
  175. package/web/{chunk-ydtrc1ay.js → chunk-sd3cdqcm.js} +2 -2
  176. package/web/{chunk-rykfak98.js → chunk-sf101c23.js} +2 -2
  177. package/web/{chunk-p9hsd3rn.js → chunk-sfq6cw45.js} +2 -2
  178. package/web/chunk-svqj4az8.js +1 -0
  179. package/web/chunk-t7jwyvvr.js +1 -0
  180. package/web/{chunk-47q4hmfp.js → chunk-tcp77cp2.js} +2 -2
  181. package/web/chunk-tf18d2dk.css +1 -0
  182. package/web/chunk-thbqwq6b.js +1 -0
  183. package/web/chunk-v0g4cqc1.js +4 -0
  184. package/web/chunk-vhzys0rr.js +292 -0
  185. package/web/chunk-vnt34mkb.js +1 -0
  186. package/web/chunk-vqfz99ff.js +1 -0
  187. package/web/chunk-vttgyb5v.js +2 -0
  188. package/web/chunk-x7sb3bwf.js +370 -0
  189. package/web/chunk-xce8n339.js +1 -0
  190. package/web/{chunk-mb4qx9hy.js → chunk-xk1t58c4.js} +12 -12
  191. package/web/chunk-xsrvw7dt.js +4 -0
  192. package/web/chunk-xtss82z2.js +1 -0
  193. package/web/{chunk-2j4m0bh1.js → chunk-y7jq61nv.js} +2 -2
  194. package/web/{chunk-7ba8vrfc.js → chunk-ybw6vgf6.js} +2 -2
  195. package/web/{chunk-24h1rfje.js → chunk-yvgs6bm3.js} +4 -4
  196. package/web/{chunk-sb1cjpq8.js → chunk-z4aj066q.js} +1 -1
  197. package/web/chunk-zazs8p6c.js +1 -0
  198. package/web/{chunk-n8gfjj9a.js → chunk-zc1mk10n.js} +19 -19
  199. package/web/{chunk-5qqw2e0t.js → chunk-zqht0jzx.js} +6 -6
  200. package/web/{chunk-mwj9tpkz.js → chunk-zz397b0v.js} +12 -12
  201. package/web/index.html +1 -1
  202. package/worker.js +1 -1
  203. package/chunk-06hdzq5n.js +0 -2
  204. package/chunk-09rj27b2.js +0 -2
  205. package/chunk-1zdwrgd4.js +0 -2
  206. package/chunk-5c9j8qe4.js +0 -478
  207. package/chunk-9mmz6wt3.js +0 -2
  208. package/chunk-bpw6q7g0.js +0 -3
  209. package/chunk-bxn5kmpz.js +0 -3753
  210. package/chunk-n6e43rvk.js +0 -3
  211. package/chunk-pmqtkqsf.js +0 -2
  212. package/chunk-ry0z4ev6.js +0 -2
  213. package/chunk-v258nxcz.js +0 -2
  214. package/chunk-zmsgwr3s.js +0 -2
  215. package/web/chunk-0s80zw00.js +0 -1
  216. package/web/chunk-166qe5j6.js +0 -2
  217. package/web/chunk-1c95wfvq.js +0 -1
  218. package/web/chunk-329rtxa9.js +0 -1
  219. package/web/chunk-33qwz9bc.js +0 -2
  220. package/web/chunk-3qjnwsph.js +0 -1
  221. package/web/chunk-4rm1vy7w.js +0 -1
  222. package/web/chunk-59kqahb3.js +0 -1
  223. package/web/chunk-61jahh35.js +0 -292
  224. package/web/chunk-6beqrmtq.js +0 -1
  225. package/web/chunk-6gxf3vsg.js +0 -1
  226. package/web/chunk-6parf7sy.js +0 -2
  227. package/web/chunk-89fkdgbp.js +0 -2
  228. package/web/chunk-8qgpfxkz.js +0 -1
  229. package/web/chunk-9a3q0jsh.js +0 -36
  230. package/web/chunk-9bgey148.js +0 -169
  231. package/web/chunk-9xh96b33.js +0 -2
  232. package/web/chunk-a5sg33w2.js +0 -3
  233. package/web/chunk-a91vxtx4.js +0 -1
  234. package/web/chunk-agec7jj4.js +0 -1
  235. package/web/chunk-c516cghj.js +0 -1
  236. package/web/chunk-cqp1d4p0.js +0 -1
  237. package/web/chunk-cwtdnacf.js +0 -1
  238. package/web/chunk-dg1vas6z.js +0 -8
  239. package/web/chunk-dy2gm1fs.js +0 -1
  240. package/web/chunk-f91wzwtk.js +0 -1
  241. package/web/chunk-fc0nx23g.js +0 -1
  242. package/web/chunk-fhnypcrm.js +0 -1139
  243. package/web/chunk-fv60p68p.js +0 -1
  244. package/web/chunk-g1ev11wx.js +0 -1
  245. package/web/chunk-h18tnrf2.js +0 -1
  246. package/web/chunk-hfaffkrh.js +0 -1
  247. package/web/chunk-hszjc2ny.js +0 -70
  248. package/web/chunk-j2vt8c8v.js +0 -1
  249. package/web/chunk-jqa39f8t.js +0 -78
  250. package/web/chunk-jvbbrnpa.js +0 -1
  251. package/web/chunk-jzfd7cyh.js +0 -2
  252. package/web/chunk-ka3q31t1.js +0 -1
  253. package/web/chunk-ka9ak8wr.js +0 -1
  254. package/web/chunk-m2d1sp30.js +0 -1
  255. package/web/chunk-mnjd59jk.js +0 -1
  256. package/web/chunk-ng0nbfhh.js +0 -1
  257. package/web/chunk-nz9nxk48.js +0 -1
  258. package/web/chunk-phw908hn.js +0 -1
  259. package/web/chunk-pjmmma1k.js +0 -1
  260. package/web/chunk-pxe3vna4.js +0 -1
  261. package/web/chunk-q7yn4m3t.js +0 -1
  262. package/web/chunk-qh15dxav.css +0 -1
  263. package/web/chunk-qnhqexe0.js +0 -1
  264. package/web/chunk-rcx1aee5.js +0 -99
  265. package/web/chunk-rjqj6ffe.js +0 -1
  266. package/web/chunk-rks7ksv3.js +0 -106
  267. package/web/chunk-rtf2zzzv.js +0 -1
  268. package/web/chunk-sgvp8vge.js +0 -1
  269. package/web/chunk-sjjwte12.js +0 -1
  270. package/web/chunk-srrfphes.js +0 -1
  271. package/web/chunk-t7bwsdbr.js +0 -1
  272. package/web/chunk-tse9gvyq.js +0 -89
  273. package/web/chunk-vd6y2pcm.js +0 -39
  274. package/web/chunk-vpa55vje.js +0 -4
  275. package/web/chunk-vymqrpm3.js +0 -303
  276. package/web/chunk-wdtnhpd6.js +0 -4
  277. package/web/chunk-wmvd6j0b.js +0 -200
  278. package/web/chunk-xvsmtetz.js +0 -30
  279. package/web/chunk-y3ajqthy.js +0 -370
  280. package/web/chunk-yd1ez3wd.js +0 -2
  281. package/web/chunk-yfbxtg5p.js +0 -1
  282. package/web/chunk-ywp4s71k.js +0 -40
  283. package/web/chunk-z4x331rx.js +0 -140
  284. package/web/chunk-z6bpamwq.js +0 -24
  285. package/web/chunk-zmdnxn6m.js +0 -2
  286. package/web/install.ps1 +0 -91
  287. package/web/install.sh +0 -177
@@ -1,4 +0,0 @@
1
- import{e,r,s,R,Ct,ho,ht,Qt,Tt,Hn,Jt}from"./chunk-vymqrpm3.js";import{be,Pe,Qe,Te,ct,qt,H,me,at,Vt,it,cr,ua,da,pa,yn,wt,ma,vn,Oe,bn,$t,kt,xn,Gt,_n,fa,ha,ur,xe,ga,wn,Wt,kn,dr,pr,Ht,ya,mr,va,zr,ut,fr,ba,xa,_a,We,hr,gr,Cn,wa,yr,f,Je,dt,_e,Yt,Q}from"./chunk-7xk0ntav.js";import{sa,la,G,$n,eo,ca,lr}from"./chunk-jzfd7cyh.js";import{At}from"./chunk-fhnypcrm.js";var wr={};At(wr,{default:()=>er});var uo=/\s/;function co(t){var n=t.length;while(n--&&uo.test(t.charAt(n)));return n}var te=co;var po=/^\s+/;function lo(t){return t?t.slice(0,te(t)+1).replace(po,""):t}var ne=lo;var oe=NaN,mo=/^[-+]0x[0-9a-f]+$/i,go=/^0b[01]+$/i,vo=/^0o[0-7]+$/i,bo=parseInt;function yo(t){if(typeof t=="number")return t;if(ct(t))return oe;if(me(t)){var n=typeof t.valueOf=="function"?t.valueOf():t;t=me(n)?n+"":n}if(typeof t!="string")return t===0?t:+t;t=ne(t);var o=go.test(t);return o||vo.test(t)?bo(t.slice(2),o?2:8):mo.test(t)?oe:+t}var ie=yo;var ae=1/0,wo=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function _o(t){if(!t)return t===0?t:0;if(t=ie(t),t===ae||t===-ae){var n=t<0?-1:1;return n*wo}return t===t?t:0}var Y=_o;function Eo(t){var n=Y(t),o=n%1;return n===n?o?n-o:n:0}var fe=Eo;var se=Object.create,xo=function(){function t(){}return function(n){if(!me(n))return{};if(se)return se(n);t.prototype=n;var o=new t;return t.prototype=void 0,o}}(),ue=xo;function Oo(t,n){var o=-1,i=t.length;n||(n=Array(i));while(++o<i)n[o]=t[o];return n}var vr=Oo;function Lo(t,n,o){if(n=="__proto__"&&cr)cr(t,n,{configurable:!0,enumerable:!0,value:o,writable:!0});else t[n]=o}var M=Lo;var Io=Object.prototype,No=Io.hasOwnProperty;function Po(t,n,o){var i=t[n];if(!(No.call(t,n)&&wt(i,o))||o===void 0&&!(n in t))M(t,n,o)}var j=Po;function ko(t,n,o,i){var a=!o;o||(o={});var u=-1,d=n.length;while(++u<d){var c=n[u],p=i?i(o[c],t[c],c,o,t):void 0;if(p===void 0)p=t[c];if(a)M(o,c,p);else j(o,c,p)}return o}var P=ko;function Ao(t,n,o){if(!me(o))return!1;var i=typeof n;if(i=="number"?Oe(o)&&yn(n,o.length):i=="string"&&(n in o))return wt(o[n],t);return!1}var T=Ao;function Ro(t){return vn(function(n,o){var i=-1,a=o.length,u=a>1?o[a-1]:void 0,d=a>2?o[2]:void 0;if(u=t.length>3&&typeof u=="function"?(a--,u):void 0,d&&T(o[0],o[1],d))u=a<3?void 0:u,a=1;n=Object(n);while(++i<a){var c=o[i];if(c)t(n,c,i,u)}return n})}var de=Ro;function Mo(t){var n=[];if(t!=null)for(var o in Object(t))n.push(o);return n}var ce=Mo;var jo=Object.prototype,Bo=jo.hasOwnProperty;function Do(t){if(!me(t))return ce(t);var n=bn(t),o=[];for(var i in t)if(!(i=="constructor"&&(n||!Bo.call(t,i))))o.push(i);return o}var pe=Do;function Fo(t){return Oe(t)?fa(t,!0):pe(t)}var L=Fo;function Go(t){var n=t==null?0:t.length;return n?pr(t,1):[]}var S=Go;function Xo(t){return ua(ma(t,void 0,S),t+"")}var le=Xo;var Uo=ha(Object.getPrototypeOf,Object),z=Uo;var Vo="[object Object]",Yo=Function.prototype,zo=Object.prototype,he=Yo.toString,Wo=zo.hasOwnProperty,qo=he.call(Object);function Ho(t){if(!Te(t)||Qe(t)!=Vo)return!1;var n=z(t);if(n===null)return!0;var o=Wo.call(n,"constructor")&&n.constructor;return typeof o=="function"&&o instanceof o&&he.call(o)==qo}var ge=Ho;var Ko="\\ud800-\\udfff",Jo="\\u0300-\\u036f",Zo="\\ufe20-\\ufe2f",$o="\\u20d0-\\u20ff",Qo=Jo+Zo+$o,ri="\\ufe0e\\ufe0f",ei="\\u200d",ti=RegExp("["+ei+Ko+Qo+ri+"]");function ni(t){return ti.test(t)}var ve=ni;function oi(t,n){return t&&P(n,xe(n),t)}var ye=oi;function ii(t,n){return t&&P(n,L(n),t)}var we=ii;var Se=typeof wr=="object"&&wr&&!wr.nodeType&&wr,Ee=Se&&typeof br=="object"&&br&&!br.nodeType&&br,ai=Ee&&Ee.exports===Se,Le=ai?be.Buffer:void 0,Ie=Le?Le.allocUnsafe:void 0;function fi(t,n){if(n)return t.slice();var o=t.length,i=Ie?Ie(o):new t.constructor(o);return t.copy(i),i}var er=fi;function si(t,n){return P(t,mr(t),n)}var Ne=si;var ui=Object.getOwnPropertySymbols,di=!ui?ya:function(t){var n=[];while(t)dr(n,mr(t)),t=z(t);return n},_r=di;function ci(t,n){return P(t,_r(t),n)}var ke=ci;function pi(t){return va(t,L,_r)}var Ce=pi;var li=Object.prototype,mi=li.hasOwnProperty;function hi(t){var n=t.length,o=new t.constructor(n);if(n&&typeof t[0]=="string"&&mi.call(t,"index"))o.index=t.index,o.input=t.input;return o}var Ae=hi;function gi(t){var n=new t.constructor(t.byteLength);return new fr(n).set(new fr(t)),n}var W=gi;function vi(t,n){var o=n?W(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.byteLength)}var Re=vi;var bi=/\w*$/;function yi(t){var n=new t.constructor(t.source,bi.exec(t));return n.lastIndex=t.lastIndex,n}var Me=yi;var je=Pe?Pe.prototype:void 0,Be=je?je.valueOf:void 0;function wi(t){return Be?Object(Be.call(t)):{}}var De=wi;function _i(t,n){var o=n?W(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}var Er=_i;var Ei="[object Boolean]",xi="[object Date]",Oi="[object Map]",Li="[object Number]",Ii="[object RegExp]",Si="[object Set]",Ni="[object String]",Pi="[object Symbol]",ki="[object ArrayBuffer]",Ti="[object DataView]",Ci="[object Float32Array]",Ai="[object Float64Array]",Ri="[object Int8Array]",Mi="[object Int16Array]",ji="[object Int32Array]",Bi="[object Uint8Array]",Di="[object Uint8ClampedArray]",Fi="[object Uint16Array]",Gi="[object Uint32Array]";function Xi(t,n,o){var i=t.constructor;switch(n){case ki:return W(t);case Ei:case xi:return new i(+t);case Ti:return Re(t,o);case Ci:case Ai:case Ri:case Mi:case ji:case Bi:case Di:case Fi:case Gi:return Er(t,o);case Oi:return new i;case Li:case Ni:return new i(t);case Ii:return Me(t);case Si:return new i;case Pi:return De(t)}}var Fe=Xi;function Ui(t){return typeof t.constructor=="function"&&!bn(t)?ue(z(t)):{}}var xr=Ui;var Vi="[object Map]";function Yi(t){return Te(t)&&ut(t)==Vi}var Ge=Yi;var Xe=Gt&&Gt.isMap,zi=Xe?xn(Xe):Ge,Ue=zi;var Wi="[object Set]";function qi(t){return Te(t)&&ut(t)==Wi}var Ve=qi;var Ye=Gt&&Gt.isSet,Hi=Ye?xn(Ye):Ve,ze=Hi;var Zi=1,$i=2,ra=4,qe="[object Arguments]",ea="[object Array]",ta="[object Boolean]",na="[object Date]",oa="[object Error]",He="[object Function]",ia="[object GeneratorFunction]",aa="[object Map]",Ea="[object Number]",Ke="[object Object]",Oa="[object RegExp]",La="[object Set]",Ia="[object String]",Sa="[object Symbol]",Na="[object WeakMap]",Pa="[object ArrayBuffer]",ka="[object DataView]",Ta="[object Float32Array]",Ca="[object Float64Array]",Aa="[object Int8Array]",Ra="[object Int16Array]",Ma="[object Int32Array]",ja="[object Uint8Array]",Ba="[object Uint8ClampedArray]",Da="[object Uint16Array]",Fa="[object Uint32Array]",x={};x[qe]=x[ea]=x[Pa]=x[ka]=x[ta]=x[na]=x[Ta]=x[Ca]=x[Aa]=x[Ra]=x[Ma]=x[aa]=x[Ea]=x[Ke]=x[Oa]=x[La]=x[Ia]=x[Sa]=x[ja]=x[Ba]=x[Da]=x[Fa]=!0;x[oa]=x[He]=x[Na]=!1;function Or(t,n,o,i,a,u){var d,c=n&Zi,p=n&$i,l=n&ra;if(o)d=a?o(t,i,a,u):o(t);if(d!==void 0)return d;if(!me(t))return t;var m=H(t);if(m){if(d=Ae(t),!c)return vr(t,d)}else{var h=ut(t),g=h==He||h==ia;if(kt(t))return er(t,c);if(h==Ke||h==qe||g&&!a){if(d=p||g?{}:xr(t),!c)return p?ke(t,we(d,t)):Ne(t,ye(d,t))}else{if(!x[h])return a?t:{};d=Fe(t,h,c)}}u||(u=new Ht);var b=u.get(t);if(b)return b;if(u.set(t,d),ze(t))t.forEach(function(v){d.add(Or(v,n,o,v,t,u))});else if(Ue(t))t.forEach(function(v,_){d.set(_,Or(v,n,o,_,t,u))});var w=l?p?Ce:zr:p?L:xe,y=m?void 0:w(t);return da(y||t,function(v,_){if(y)_=v,v=t[_];j(d,_,Or(v,n,o,_,t,u))}),d}var Ze=Or;var Ga=1,Xa=4;function Ua(t){return Ze(t,Ga|Xa)}var $e=Ua;var Va=function(){return be.Date.now()},Tr=Va;var rt=Object.prototype,Ya=rt.hasOwnProperty,za=vn(function(t,n){t=Object(t);var o=-1,i=n.length,a=i>2?n[2]:void 0;if(a&&T(n[0],n[1],a))i=1;while(++o<i){var u=n[o],d=L(u),c=-1,p=d.length;while(++c<p){var l=d[c],m=t[l];if(m===void 0||wt(m,rt[l])&&!Ya.call(t,l))t[l]=u[l]}}return t}),et=za;function Wa(t,n,o){if(o!==void 0&&!wt(t[n],o)||o===void 0&&!(n in t))M(t,n,o)}var tr=Wa;function qa(t,n){if(n==="constructor"&&typeof t[n]==="function")return;if(n=="__proto__")return;return t[n]}var nr=qa;function Ha(t){return P(t,L(t))}var tt=Ha;function Ka(t,n,o,i,a,u,d){var c=nr(t,o),p=nr(n,o),l=d.get(p);if(l){tr(t,o,l);return}var m=u?u(c,p,o+"",t,n,d):void 0,h=m===void 0;if(h){var g=H(p),b=!g&&kt(p),w=!g&&!b&&_n(p);if(m=p,g||b||w)if(H(c))m=c;else if(wa(c))m=vr(c);else if(b)h=!1,m=er(p,!0);else if(w)h=!1,m=Er(p,!0);else m=[];else if(ge(p)||$t(p)){if(m=c,$t(c))m=tt(c);else if(!me(c)||Vt(c))m=xr(p)}else h=!1}if(h)d.set(p,m),a(m,p,i,u,d),d.delete(p);tr(t,o,m)}var nt=Ka;function ot(t,n,o,i,a){if(t===n)return;hr(n,function(u,d){if(a||(a=new Ht),me(u))nt(t,n,d,o,ot,i,a);else{var c=i?i(nr(t,d),u,d+"",t,n,a):void 0;if(c===void 0)c=u;tr(t,d,c)}},L)}var ft=ot;function Ja(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}var U=Ja;function Za(t){return function(n,o,i){var a=Object(n);if(!Oe(n)){var u=We(o,3);n=xe(n),o=function(c){return u(a[c],c,a)}}var d=t(n,o,i);return d>-1?a[u?n[d]:d]:void 0}}var st=Za;var $a=Math.max;function Qa(t,n,o){var i=t==null?0:t.length;if(!i)return-1;var a=o==null?0:fe(o);if(a<0)a=$a(i+a,0);return pa(t,We(n,3),a)}var pt=Qa;var rf=st(pt),or=rf;function ef(t,n){var o=-1,i=Oe(t)?Array(t.length):[];return Cn(t,function(a,u,d){i[++o]=n(a,u,d)}),i}var Lr=ef;function tf(t,n){var o=H(t)?qt:Lr;return o(t,We(n,3))}var E=tf;function nf(t,n){return t==null?t:hr(t,yr(n),L)}var lt=nf;function of(t,n){return t&&gr(t,yr(n))}var mt=of;function af(t,n){return t>n}var gt=af;var ff=Object.prototype,sf=ff.hasOwnProperty;function uf(t,n){return t!=null&&sf.call(t,n)}var vt=uf;function df(t,n){return t!=null&&ba(t,n,vt)}var Ir=df;var cf="[object String]";function pf(t){return typeof t=="string"||!H(t)&&Te(t)&&Qe(t)==cf}var bt=pf;function lf(t,n){return t<n}var Sr=lf;function mf(t,n){var o={};return n=We(n,3),gr(t,function(i,a,u){M(o,a,n(i,a,u))}),o}var q=mf;function hf(t,n,o){var i=-1,a=t.length;while(++i<a){var u=t[i],d=n(u);if(d!=null&&(c===void 0?d===d&&!ct(d):o(d,c)))var c=d,p=u}return p}var K=hf;function gf(t){return t&&t.length?K(t,at,gt):void 0}var I=gf;var vf=de(function(t,n,o){ft(t,n,o)}),ir=vf;function bf(t){return t&&t.length?K(t,at,Sr):void 0}var B=bf;function yf(t,n){return t&&t.length?K(t,We(n,2),Sr):void 0}var J=yf;function wf(t,n,o,i){if(!me(t))return t;n=wn(n,t);var a=-1,u=n.length,d=u-1,c=t;while(c!=null&&++a<u){var p=Wt(n[a]),l=o;if(p==="__proto__"||p==="constructor"||p==="prototype")return t;if(a!=d){var m=c[p];if(l=i?i(m,p,c):void 0,l===void 0)l=me(m)?m:yn(n[a+1])?[]:{}}j(c,p,l),c=c[p]}return t}var yt=wf;function _f(t,n,o){var i=-1,a=n.length,u={};while(++i<a){var d=n[i],c=kn(t,d);if(o(c,d))yt(u,wn(d,t),c)}return u}var _t=_f;function Ef(t,n){var o=t.length;t.sort(n);while(o--)t[o]=t[o].value;return t}var Et=Ef;function xf(t,n){if(t!==n){var o=t!==void 0,i=t===null,a=t===t,u=ct(t),d=n!==void 0,c=n===null,p=n===n,l=ct(n);if(!c&&!l&&!u&&t>n||u&&d&&p&&!c&&!l||i&&d&&p||!o&&p||!a)return 1;if(!i&&!u&&!l&&t<n||l&&o&&a&&!i&&!u||c&&o&&a||!d&&a||!p)return-1}return 0}var xt=xf;function Of(t,n,o){var i=-1,a=t.criteria,u=n.criteria,d=a.length,c=o.length;while(++i<d){var p=xt(a[i],u[i]);if(p){if(i>=c)return p;var l=o[i];return p*(l=="desc"?-1:1)}}return t.index-n.index}var Ot=Of;function Lf(t,n,o){if(n.length)n=qt(n,function(u){if(H(u))return function(d){return kn(d,u.length===1?u[0]:u)};return u});else n=[at];var i=-1;n=qt(n,xn(We));var a=Lr(t,function(u,d,c){var p=qt(n,function(l){return l(u)});return{criteria:p,index:++i,value:u}});return Et(a,function(u,d){return Ot(u,d,o)})}var Lt=Lf;var If=_a("length"),It=If;var Nt="\\ud800-\\udfff",Sf="\\u0300-\\u036f",Nf="\\ufe20-\\ufe2f",Pf="\\u20d0-\\u20ff",kf=Sf+Nf+Pf,Tf="\\ufe0e\\ufe0f",Cf="["+Nt+"]",Cr="["+kf+"]",Ar="\\ud83c[\\udffb-\\udfff]",Af="(?:"+Cr+"|"+Ar+")",Pt="[^"+Nt+"]",Rt="(?:\\ud83c[\\udde6-\\uddff]){2}",Mt="[\\ud800-\\udbff][\\udc00-\\udfff]",Rf="\\u200d",jt=Af+"?",Bt="["+Tf+"]?",Mf="(?:"+Rf+"(?:"+[Pt,Rt,Mt].join("|")+")"+Bt+jt+")*",jf=Bt+jt+Mf,Bf="(?:"+[Pt+Cr+"?",Cr,Rt,Mt,Cf].join("|")+")",St=RegExp(Ar+"(?="+Ar+")|"+Bf+jf,"g");function Df(t){var n=St.lastIndex=0;while(St.test(t))++n;return n}var Dt=Df;function Ff(t){return ve(t)?Dt(t):It(t)}var Ft=Ff;function Gf(t,n){return _t(t,n,function(o,i){return xa(t,i)})}var Xt=Gf;var Xf=le(function(t,n){return t==null?{}:Xt(t,n)}),Z=Xf;var{ceil:Uf,max:Vf}=Math;function Yf(t,n,o,i){var a=-1,u=Vf(Uf((n-t)/(o||1)),0),d=Array(u);while(u--)d[i?u:++a]=t,t+=o;return d}var Ut=Yf;function zf(t){return function(n,o,i){if(i&&typeof i!="number"&&T(n,o,i))o=i=void 0;if(n=Y(n),o===void 0)o=n,n=0;else o=Y(o);return i=i===void 0?n<o?1:-1:Y(i),Ut(n,o,i,t)}}var zt=zf;var Wf=zt(),N=Wf;var qf="[object Map]",Hf="[object Set]";function Kf(t){if(t==null)return 0;if(Oe(t))return bt(t)?Ft(t):t.length;var n=ut(t);if(n==qf||n==Hf)return t.size;return ur(t).length}var Kt=Kf;var Jf=vn(function(t,n){if(t==null)return[];var o=n.length;if(o>1&&T(t,n[0],n[1]))n=[];else if(o>2&&T(n[0],n[1],n[2]))n=[n[0]];return Lt(t,pr(n,1),[])}),C=Jf;var Zf=0;function $f(t){var n=++Zf;return ga(t)+n}var rr=$f;function Qf(t,n,o){var i=-1,a=t.length,u=n.length,d={};while(++i<a){var c=i<u?n[i]:void 0;o(d,t[i],c)}return d}var Zt=Qf;function rs(t,n){return Zt(t||[],n||[],j)}var Rr=rs;class Mr{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,n=t._prev;if(n!==t)return rn(n),n}enqueue(t){var n=this._sentinel;if(t._prev&&t._next)rn(t);t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){var t=[],n=this._sentinel,o=n._prev;while(o!==n)t.push(JSON.stringify(o,es)),o=o._prev;return"["+t.join(", ")+"]"}}function rn(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function es(t,n){if(t!=="_next"&&t!=="_prev")return n}var ts=it(1);function en(t,n){if(t.nodeCount()<=1)return[];var o=os(t,n||ts),i=ns(o.graph,o.buckets,o.zeroIdx);return S(E(i,function(a){return t.outEdges(a.v,a.w)}))}function ns(t,n,o){var i=[],a=n[n.length-1],u=n[0],d;while(t.nodeCount()){while(d=u.dequeue())jr(t,n,o,d);while(d=a.dequeue())jr(t,n,o,d);if(t.nodeCount()){for(var c=n.length-2;c>0;--c)if(d=n[c].dequeue(),d){i=i.concat(jr(t,n,o,d,!0));break}}}return i}function jr(t,n,o,i,a){var u=a?[]:void 0;return f(t.inEdges(i.v),function(d){var c=t.edge(d),p=t.node(d.v);if(a)u.push({v:d.v,w:d.w});p.out-=c,Br(n,o,p)}),f(t.outEdges(i.v),function(d){var c=t.edge(d),p=d.w,l=t.node(p);l.in-=c,Br(n,o,l)}),t.removeNode(i.v),u}function os(t,n){var o=new Q,i=0,a=0;f(t.nodes(),function(c){o.setNode(c,{v:c,in:0,out:0})}),f(t.edges(),function(c){var p=o.edge(c.v,c.w)||0,l=n(c),m=p+l;o.setEdge(c.v,c.w,m),a=Math.max(a,o.node(c.v).out+=l),i=Math.max(i,o.node(c.w).in+=l)});var u=N(a+i+3).map(function(){return new Mr}),d=i+1;return f(o.nodes(),function(c){Br(u,d,o.node(c))}),{graph:o,buckets:u,zeroIdx:d}}function Br(t,n,o){if(!o.out)t[0].enqueue(o);else if(!o.in)t[t.length-1].enqueue(o);else t[o.out-o.in+n].enqueue(o)}function tn(t){var n=t.graph().acyclicer==="greedy"?en(t,o(t)):is(t);f(n,function(i){var a=t.edge(i);t.removeEdge(i),a.forwardName=i.name,a.reversed=!0,t.setEdge(i.w,i.v,a,rr("rev"))});function o(i){return function(a){return i.edge(a).weight}}}function is(t){var n=[],o={},i={};function a(u){if(Object.prototype.hasOwnProperty.call(i,u))return;i[u]=!0,o[u]=!0,f(t.outEdges(u),function(d){if(Object.prototype.hasOwnProperty.call(o,d.w))n.push(d);else a(d.w)}),delete o[u]}return f(t.nodes(),a),n}function nn(t){f(t.edges(),function(n){var o=t.edge(n);if(o.reversed){t.removeEdge(n);var i=o.forwardName;delete o.reversed,delete o.forwardName,t.setEdge(n.w,n.v,o,i)}})}function k(t,n,o,i){var a;do a=rr(i);while(t.hasNode(a));return o.dummy=n,t.setNode(a,o),a}function an(t){var n=new Q().setGraph(t.graph());return f(t.nodes(),function(o){n.setNode(o,t.node(o))}),f(t.edges(),function(o){var i=n.edge(o.v,o.w)||{weight:0,minlen:1},a=t.edge(o);n.setEdge(o.v,o.w,{weight:i.weight+a.weight,minlen:Math.max(i.minlen,a.minlen)})}),n}function Nr(t){var n=new Q({multigraph:t.isMultigraph()}).setGraph(t.graph());return f(t.nodes(),function(o){if(!t.children(o).length)n.setNode(o,t.node(o))}),f(t.edges(),function(o){n.setEdge(o,t.edge(o))}),n}function Dr(t,n){var{x:o,y:i}=t,a=n.x-o,u=n.y-i,d=t.width/2,c=t.height/2;if(!a&&!u)throw Error("Not possible to find intersection inside of the rectangle");var p,l;if(Math.abs(u)*d>Math.abs(a)*c){if(u<0)c=-c;p=c*a/u,l=c}else{if(a<0)d=-d;p=d,l=d*u/a}return{x:o+p,y:i+l}}function D(t){var n=E(N(Gr(t)+1),function(){return[]});return f(t.nodes(),function(o){var i=t.node(o),a=i.rank;if(!_e(a))n[a][i.order]=o}),n}function fn(t){var n=B(E(t.nodes(),function(o){return t.node(o).rank}));f(t.nodes(),function(o){var i=t.node(o);if(Ir(i,"rank"))i.rank-=n})}function sn(t){var n=B(E(t.nodes(),function(u){return t.node(u).rank})),o=[];f(t.nodes(),function(u){var d=t.node(u).rank-n;if(!o[d])o[d]=[];o[d].push(u)});var i=0,a=t.graph().nodeRankFactor;f(o,function(u,d){if(_e(u)&&d%a!==0)--i;else if(i)f(u,function(c){t.node(c).rank+=i})})}function Fr(t,n,o,i){var a={width:0,height:0};if(arguments.length>=4)a.rank=o,a.order=i;return k(t,"border",a,n)}function Gr(t){return I(E(t.nodes(),function(n){var o=t.node(n).rank;if(!_e(o))return o}))}function un(t,n){var o={lhs:[],rhs:[]};return f(t,function(i){if(n(i))o.lhs.push(i);else o.rhs.push(i)}),o}function dn(t,n){var o=Tr();try{return n()}finally{console.log(t+" time: "+(Tr()-o)+"ms")}}function cn(t,n){return n()}function ln(t){function n(o){var i=t.children(o),a=t.node(o);if(i.length)f(i,n);if(Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var u=a.minRank,d=a.maxRank+1;u<d;++u)pn(t,"borderLeft","_bl",o,a,u),pn(t,"borderRight","_br",o,a,u)}}f(t.children(),n)}function pn(t,n,o,i,a,u){var d={width:0,height:0,rank:u,borderType:n},c=a[n][u-1],p=k(t,"border",d,o);if(a[n][u]=p,t.setParent(p,i),c)t.setEdge(c,p,{weight:1})}function hn(t){var n=t.graph().rankdir.toLowerCase();if(n==="lr"||n==="rl")En(t)}function gn(t){var n=t.graph().rankdir.toLowerCase();if(n==="bt"||n==="rl")as(t);if(n==="lr"||n==="rl")fs(t),En(t)}function En(t){f(t.nodes(),function(n){mn(t.node(n))}),f(t.edges(),function(n){mn(t.edge(n))})}function mn(t){var n=t.width;t.width=t.height,t.height=n}function as(t){f(t.nodes(),function(n){Xr(t.node(n))}),f(t.edges(),function(n){var o=t.edge(n);if(f(o.points,Xr),Object.prototype.hasOwnProperty.call(o,"y"))Xr(o)})}function Xr(t){t.y=-t.y}function fs(t){f(t.nodes(),function(n){Ur(t.node(n))}),f(t.edges(),function(n){var o=t.edge(n);if(f(o.points,Ur),Object.prototype.hasOwnProperty.call(o,"x"))Ur(o)})}function Ur(t){var n=t.x;t.x=t.y,t.y=n}function On(t){t.graph().dummyChains=[],f(t.edges(),function(n){us(t,n)})}function us(t,n){var o=n.v,i=t.node(o).rank,a=n.w,u=t.node(a).rank,d=n.name,c=t.edge(n),p=c.labelRank;if(u===i+1)return;t.removeEdge(n);var l=void 0,m,h;for(h=0,++i;i<u;++h,++i){if(c.points=[],l={width:0,height:0,edgeLabel:c,edgeObj:n,rank:i},m=k(t,"edge",l,"_d"),i===p)l.width=c.width,l.height=c.height,l.dummy="edge-label",l.labelpos=c.labelpos;if(t.setEdge(o,m,{weight:c.weight},d),h===0)t.graph().dummyChains.push(m);o=m}t.setEdge(o,a,{weight:c.weight},d)}function Ln(t){f(t.graph().dummyChains,function(n){var o=t.node(n),i=o.edgeLabel,a;t.setEdge(o.edgeObj,i);while(o.dummy){if(a=t.successors(n)[0],t.removeNode(n),i.points.push({x:o.x,y:o.y}),o.dummy==="edge-label")i.x=o.x,i.y=o.y,i.width=o.width,i.height=o.height;n=a,o=t.node(n)}})}function ar(t){var n={};function o(i){var a=t.node(i);if(Object.prototype.hasOwnProperty.call(n,i))return a.rank;n[i]=!0;var u=B(E(t.outEdges(i),function(d){return o(d.w)-t.edge(d).minlen}));if(u===Number.POSITIVE_INFINITY||u===void 0||u===null)u=0;return a.rank=u}f(t.sources(),o)}function V(t,n){return t.node(n.w).rank-t.node(n.v).rank-t.edge(n).minlen}function Pr(t){var n=new Q({directed:!1}),o=t.nodes()[0],i=t.nodeCount();n.setNode(o,{});var a,u;while(ds(n,t)<i)a=cs(n,t),u=n.hasNode(a.v)?V(t,a):-V(t,a),ps(n,t,u);return n}function ds(t,n){function o(i){f(n.nodeEdges(i),function(a){var u=a.v,d=i===u?a.w:u;if(!t.hasNode(d)&&!V(n,a))t.setNode(d,{}),t.setEdge(i,d,{}),o(d)})}return f(t.nodes(),o),t.nodeCount()}function cs(t,n){return J(n.edges(),function(o){if(t.hasNode(o.v)!==t.hasNode(o.w))return V(n,o)})}function ps(t,n,o){f(t.nodes(),function(i){n.node(i).rank+=o})}var dh=it(1);var vh=it(1);Vr.CycleException=sr;function Vr(t){var n={},o={},i=[];function a(u){if(Object.prototype.hasOwnProperty.call(o,u))throw new sr;if(!Object.prototype.hasOwnProperty.call(n,u))o[u]=!0,n[u]=!0,f(t.predecessors(u),a),delete o[u],i.push(u)}if(f(t.sinks(),a),Kt(n)!==t.nodeCount())throw new sr;return i}function sr(){}sr.prototype=Error();function kr(t,n,o){if(!H(n))n=[n];var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],u={};return f(n,function(d){if(!t.hasNode(d))throw Error("Graph does not have node: "+d);Sn(t,d,o==="post",u,i,a)}),a}function Sn(t,n,o,i,a,u){if(!Object.prototype.hasOwnProperty.call(i,n)){if(i[n]=!0,!o)u.push(n);if(f(a(n),function(d){Sn(t,d,o,i,a,u)}),o)u.push(n)}}function Yr(t,n){return kr(t,n,"post")}function Wr(t,n){return kr(t,n,"pre")}X.initLowLimValues=Hr;X.initCutValues=qr;X.calcCutValue=Pn;X.leaveEdge=An;X.enterEdge=Rn;X.exchangeEdges=Mn;function X(t){t=an(t),ar(t);var n=Pr(t);Hr(n),qr(n,t);var o,i;while(o=An(n))i=Rn(n,t,o),Mn(n,t,o,i)}function qr(t,n){var o=Yr(t,t.nodes());o=o.slice(0,o.length-1),f(o,function(i){vs(t,n,i)})}function vs(t,n,o){var i=t.node(o),a=i.parent;t.edge(o,a).cutvalue=Pn(t,n,o)}function Pn(t,n,o){var i=t.node(o),a=i.parent,u=!0,d=n.edge(o,a),c=0;if(!d)u=!1,d=n.edge(a,o);return c=d.weight,f(n.nodeEdges(o),function(p){var l=p.v===o,m=l?p.w:p.v;if(m!==a){var h=l===u,g=n.edge(p).weight;if(c+=h?g:-g,ys(t,o,m)){var b=t.edge(o,m).cutvalue;c+=h?-b:b}}}),c}function Hr(t,n){if(arguments.length<2)n=t.nodes()[0];Tn(t,{},1,n)}function Tn(t,n,o,i,a){var u=o,d=t.node(i);if(n[i]=!0,f(t.neighbors(i),function(c){if(!Object.prototype.hasOwnProperty.call(n,c))o=Tn(t,n,o,c,i)}),d.low=u,d.lim=o++,a)d.parent=a;else delete d.parent;return o}function An(t){return or(t.edges(),function(n){return t.edge(n).cutvalue<0})}function Rn(t,n,o){var{v:i,w:a}=o;if(!n.hasEdge(i,a))i=o.w,a=o.v;var u=t.node(i),d=t.node(a),c=u,p=!1;if(u.lim>d.lim)c=d,p=!0;var l=Je(n.edges(),function(m){return p===Nn(t,t.node(m.v),c)&&p!==Nn(t,t.node(m.w),c)});return J(l,function(m){return V(n,m)})}function Mn(t,n,o,i){var{v:a,w:u}=o;t.removeEdge(a,u),t.setEdge(i.v,i.w,{}),Hr(t),qr(t,n),bs(t,n)}function bs(t,n){var o=or(t.nodes(),function(a){return!n.node(a).parent}),i=Wr(t,o);i=i.slice(1),f(i,function(a){var u=t.node(a).parent,d=n.edge(a,u),c=!1;if(!d)d=n.edge(u,a),c=!0;n.node(a).rank=n.node(u).rank+(c?d.minlen:-d.minlen)})}function ys(t,n,o){return t.hasEdge(n,o)}function Nn(t,n,o){return o.low<=n.lim&&n.lim<=o.lim}function Kr(t){switch(t.graph().ranker){case"network-simplex":jn(t);break;case"tight-tree":_s(t);break;case"longest-path":ws(t);break;default:jn(t)}}var ws=ar;function _s(t){ar(t),Pr(t)}function jn(t){X(t)}function Bn(t){var n=k(t,"root",{},"_root"),o=Es(t),i=I(dt(o))-1,a=2*i+1;t.graph().nestingRoot=n,f(t.edges(),function(d){t.edge(d).minlen*=a});var u=xs(t)+1;f(t.children(),function(d){Dn(t,n,a,u,i,o,d)}),t.graph().nodeRankFactor=a}function Dn(t,n,o,i,a,u,d){var c=t.children(d);if(!c.length){if(d!==n)t.setEdge(n,d,{weight:0,minlen:o});return}var p=Fr(t,"_bt"),l=Fr(t,"_bb"),m=t.node(d);if(t.setParent(p,d),m.borderTop=p,t.setParent(l,d),m.borderBottom=l,f(c,function(h){Dn(t,n,o,i,a,u,h);var g=t.node(h),b=g.borderTop?g.borderTop:h,w=g.borderBottom?g.borderBottom:h,y=g.borderTop?i:2*i,v=b!==w?1:a-u[d]+1;t.setEdge(p,b,{weight:y,minlen:v,nestingEdge:!0}),t.setEdge(w,l,{weight:y,minlen:v,nestingEdge:!0})}),!t.parent(d))t.setEdge(n,p,{weight:0,minlen:a+u[d]})}function Es(t){var n={};function o(i,a){var u=t.children(i);if(u&&u.length)f(u,function(d){o(d,a+1)});n[i]=a}return f(t.children(),function(i){o(i,1)}),n}function xs(t){return Yt(t.edges(),function(n,o){return n+t.edge(o).weight},0)}function Fn(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,f(t.edges(),function(o){var i=t.edge(o);if(i.nestingEdge)t.removeEdge(o)})}function Gn(t,n,o){var i={},a;f(o,function(u){var d=t.parent(u),c,p;while(d){if(c=t.parent(d),c)p=i[c],i[c]=d;else p=a,a=d;if(p&&p!==d){n.setEdge(p,d);return}d=c}})}function Xn(t,n,o){var i=Ls(t),a=new Q({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(u){return t.node(u)});return f(t.nodes(),function(u){var d=t.node(u),c=t.parent(u);if(d.rank===n||d.minRank<=n&&n<=d.maxRank){if(a.setNode(u),a.setParent(u,c||i),f(t[o](u),function(p){var l=p.v===u?p.w:p.v,m=a.edge(l,u),h=!_e(m)?m.weight:0;a.setEdge(l,u,{weight:t.edge(p).weight+h})}),Object.prototype.hasOwnProperty.call(d,"minRank"))a.setNode(u,{borderLeft:d.borderLeft[n],borderRight:d.borderRight[n]})}}),a}function Ls(t){var n;while(t.hasNode(n=rr("_root")));return n}function Un(t,n){var o=0;for(var i=1;i<n.length;++i)o+=Is(t,n[i-1],n[i]);return o}function Is(t,n,o){var i=Rr(o,E(o,function(l,m){return m})),a=S(E(n,function(l){return C(E(t.outEdges(l),function(m){return{pos:i[m.w],weight:t.edge(m).weight}}),"pos")})),u=1;while(u<o.length)u<<=1;var d=2*u-1;u-=1;var c=E(Array(d),function(){return 0}),p=0;return f(a.forEach(function(l){var m=l.pos+u;c[m]+=l.weight;var h=0;while(m>0){if(m%2)h+=c[m+1];m=m-1>>1,c[m]+=l.weight}p+=l.weight*h})),p}function Vn(t){var n={},o=Je(t.nodes(),function(c){return!t.children(c).length}),i=I(E(o,function(c){return t.node(c).rank})),a=E(N(i+1),function(){return[]});function u(c){if(Ir(n,c))return;n[c]=!0;var p=t.node(c);a[p.rank].push(c),f(t.successors(c),u)}var d=C(o,function(c){return t.node(c).rank});return f(d,u),a}function Yn(t,n){return E(n,function(o){var i=t.inEdges(o);if(!i.length)return{v:o};else{var a=Yt(i,function(u,d){var c=t.edge(d),p=t.node(d.v);return{sum:u.sum+c.weight*p.order,weight:u.weight+c.weight}},{sum:0,weight:0});return{v:o,barycenter:a.sum/a.weight,weight:a.weight}}})}function zn(t,n){var o={};f(t,function(a,u){var d=o[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:u};if(!_e(a.barycenter))d.barycenter=a.barycenter,d.weight=a.weight}),f(n.edges(),function(a){var u=o[a.v],d=o[a.w];if(!_e(u)&&!_e(d))d.indegree++,u.out.push(o[a.w])});var i=Je(o,function(a){return!a.indegree});return Ss(i)}function Ss(t){var n=[];function o(u){return function(d){if(d.merged)return;if(_e(d.barycenter)||_e(u.barycenter)||d.barycenter>=u.barycenter)Ns(u,d)}}function i(u){return function(d){if(d.in.push(u),--d.indegree===0)t.push(d)}}while(t.length){var a=t.pop();n.push(a),f(a.in.reverse(),o(a)),f(a.out,i(a))}return E(Je(n,function(u){return!u.merged}),function(u){return Z(u,["vs","i","barycenter","weight"])})}function Ns(t,n){var o=0,i=0;if(t.weight)o+=t.barycenter*t.weight,i+=t.weight;if(n.weight)o+=n.barycenter*n.weight,i+=n.weight;t.vs=n.vs.concat(t.vs),t.barycenter=o/i,t.weight=i,t.i=Math.min(n.i,t.i),n.merged=!0}function qn(t,n){var o=un(t,function(m){return Object.prototype.hasOwnProperty.call(m,"barycenter")}),i=o.lhs,a=C(o.rhs,function(m){return-m.i}),u=[],d=0,c=0,p=0;i.sort(Ps(!!n)),p=Wn(u,a,p),f(i,function(m){p+=m.vs.length,u.push(m.vs),d+=m.barycenter*m.weight,c+=m.weight,p=Wn(u,a,p)});var l={vs:S(u)};if(c)l.barycenter=d/c,l.weight=c;return l}function Wn(t,n,o){var i;while(n.length&&(i=U(n)).i<=o)n.pop(),t.push(i.vs),o++;return o}function Ps(t){return function(n,o){if(n.barycenter<o.barycenter)return-1;else if(n.barycenter>o.barycenter)return 1;return!t?n.i-o.i:o.i-n.i}}function Jr(t,n,o,i){var a=t.children(n),u=t.node(n),d=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,p={};if(d)a=Je(a,function(w){return w!==d&&w!==c});var l=Yn(t,a);f(l,function(w){if(t.children(w.v).length){var y=Jr(t,w.v,o,i);if(p[w.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter"))Ts(w,y)}});var m=zn(l,o);ks(m,p);var h=qn(m,i);if(d){if(h.vs=S([d,h.vs,c]),t.predecessors(d).length){var g=t.node(t.predecessors(d)[0]),b=t.node(t.predecessors(c)[0]);if(!Object.prototype.hasOwnProperty.call(h,"barycenter"))h.barycenter=0,h.weight=0;h.barycenter=(h.barycenter*h.weight+g.order+b.order)/(h.weight+2),h.weight+=2}}return h}function ks(t,n){f(t,function(o){o.vs=S(o.vs.map(function(i){if(n[i])return n[i].vs;return i}))})}function Ts(t,n){if(!_e(t.barycenter))t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight;else t.barycenter=n.barycenter,t.weight=n.weight}function Zn(t){var n=Gr(t),o=Kn(t,N(1,n+1),"inEdges"),i=Kn(t,N(n-1,-1,-1),"outEdges"),a=Vn(t);Jn(t,a);var u=Number.POSITIVE_INFINITY,d;for(var c=0,p=0;p<4;++c,++p){Cs(c%2?o:i,c%4>=2),a=D(t);var l=Un(t,a);if(l<u)p=0,d=$e(a),u=l}Jn(t,d)}function Kn(t,n,o){return E(n,function(i){return Xn(t,i,o)})}function Cs(t,n){var o=new Q;f(t,function(i){var a=i.graph().root,u=Jr(i,a,o,n);f(u.vs,function(d,c){i.node(d).order=c}),Gn(i,o,u.vs)})}function Jn(t,n){f(n,function(o){f(o,function(i,a){t.node(i).order=a})})}function Qn(t){var n=Rs(t);f(t.graph().dummyChains,function(o){var i=t.node(o),a=i.edgeObj,u=As(t,n,a.v,a.w),{path:d,lca:c}=u,p=0,l=d[p],m=!0;while(o!==a.w){if(i=t.node(o),m){while((l=d[p])!==c&&t.node(l).maxRank<i.rank)p++;if(l===c)m=!1}if(!m){while(p<d.length-1&&t.node(l=d[p+1]).minRank<=i.rank)p++;l=d[p]}t.setParent(o,l),o=t.successors(o)[0]}})}function As(t,n,o,i){var a=[],u=[],d=Math.min(n[o].low,n[i].low),c=Math.max(n[o].lim,n[i].lim),p,l;p=o;do p=t.parent(p),a.push(p);while(p&&(n[p].low>d||c>n[p].lim));l=p,p=i;while((p=t.parent(p))!==l)u.push(p);return{path:a.concat(u.reverse()),lca:l}}function Rs(t){var n={},o=0;function i(a){var u=o;f(t.children(a),i),n[a]={low:u,lim:o++}}return f(t.children(),i),n}function Ms(t,n){var o={};function i(a,u){var d=0,c=0,p=a.length,l=U(u);return f(u,function(m,h){var g=Bs(t,m),b=g?t.node(g).order:p;if(g||m===l)f(u.slice(c,h+1),function(w){f(t.predecessors(w),function(y){var v=t.node(y),_=v.order;if((_<d||b<_)&&!(v.dummy&&t.node(w).dummy))ro(o,y,w)})}),c=h+1,d=b}),u}return Yt(n,i),o}function js(t,n){var o={};function i(u,d,c,p,l){var m;f(N(d,c),function(h){if(m=u[h],t.node(m).dummy)f(t.predecessors(m),function(g){var b=t.node(g);if(b.dummy&&(b.order<p||b.order>l))ro(o,g,m)})})}function a(u,d){var c=-1,p,l=0;return f(d,function(m,h){if(t.node(m).dummy==="border"){var g=t.predecessors(m);if(g.length)p=t.node(g[0]).order,i(d,l,h,c,p),l=h,c=p}i(d,l,d.length,p,u.length)}),d}return Yt(n,a),o}function Bs(t,n){if(t.node(n).dummy)return or(t.predecessors(n),function(o){return t.node(o).dummy})}function ro(t,n,o){if(n>o){var i=n;n=o,o=i}if(!Object.prototype.hasOwnProperty.call(t,n))Object.defineProperty(t,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=t[n];Object.defineProperty(a,o,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ds(t,n,o){if(n>o){var i=n;n=o,o=i}return!!t[n]&&Object.prototype.hasOwnProperty.call(t[n],o)}function Fs(t,n,o,i){var a={},u={},d={};return f(n,function(c){f(c,function(p,l){a[p]=p,u[p]=p,d[p]=l})}),f(n,function(c){var p=-1;f(c,function(l){var m=i(l);if(m.length){m=C(m,function(y){return d[y]});var h=(m.length-1)/2;for(var g=Math.floor(h),b=Math.ceil(h);g<=b;++g){var w=m[g];if(u[l]===l&&p<d[w]&&!Ds(o,l,w))u[w]=l,u[l]=a[l]=a[w],p=d[w]}}})}),{root:a,align:u}}function Gs(t,n,o,i,a){var u={},d=Xs(t,n,o,a),c=a?"borderLeft":"borderRight";function p(h,g){var b=d.nodes(),w=b.pop(),y={};while(w){if(y[w])h(w);else y[w]=!0,b.push(w),b=b.concat(g(w));w=b.pop()}}function l(h){u[h]=d.inEdges(h).reduce(function(g,b){return Math.max(g,u[b.v]+d.edge(b))},0)}function m(h){var g=d.outEdges(h).reduce(function(w,y){return Math.min(w,u[y.w]-d.edge(y))},Number.POSITIVE_INFINITY),b=t.node(h);if(g!==Number.POSITIVE_INFINITY&&b.borderType!==c)u[h]=Math.max(u[h],g)}return p(l,d.predecessors.bind(d)),p(m,d.successors.bind(d)),f(i,function(h){u[h]=u[o[h]]}),u}function Xs(t,n,o,i){var a=new Q,u=t.graph(),d=zs(u.nodesep,u.edgesep,i);return f(n,function(c){var p;f(c,function(l){var m=o[l];if(a.setNode(m),p){var h=o[p],g=a.edge(h,m);a.setEdge(h,m,Math.max(d(t,l,p),g||0))}p=l})}),a}function Us(t,n){return J(dt(n),function(o){var{NEGATIVE_INFINITY:i,POSITIVE_INFINITY:a}=Number;return lt(o,function(u,d){var c=Ws(t,d)/2;i=Math.max(u+c,i),a=Math.min(u-c,a)}),i-a})}function Vs(t,n){var o=dt(n),i=B(o),a=I(o);f(["u","d"],function(u){f(["l","r"],function(d){var c=u+d,p=t[c],l;if(p===n)return;var m=dt(p);if(l=d==="l"?i-B(m):a-I(m),l)t[c]=q(p,function(h){return h+l})})})}function Ys(t,n){return q(t.ul,function(o,i){if(n)return t[n.toLowerCase()][i];else{var a=C(E(t,i));return(a[1]+a[2])/2}})}function to(t){var n=D(t),o=ir(Ms(t,n),js(t,n)),i={},a;f(["u","d"],function(d){a=d==="u"?n:dt(n).reverse(),f(["l","r"],function(c){if(c==="r")a=E(a,function(h){return dt(h).reverse()});var p=(d==="u"?t.predecessors:t.successors).bind(t),l=Fs(t,a,o,p),m=Gs(t,a,l.root,l.align,c==="r");if(c==="r")m=q(m,function(h){return-h});i[d+c]=m})});var u=Us(t,i);return Vs(i,u),Ys(i,t.graph().align)}function zs(t,n,o){return function(i,a,u){var d=i.node(a),c=i.node(u),p=0,l;if(p+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":l=-d.width/2;break;case"r":l=d.width/2;break}if(l)p+=o?l:-l;if(l=0,p+=(d.dummy?n:t)/2,p+=(c.dummy?n:t)/2,p+=c.width/2,Object.prototype.hasOwnProperty.call(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":l=c.width/2;break;case"r":l=-c.width/2;break}if(l)p+=o?l:-l;return l=0,p}}function Ws(t,n){return t.node(n).width}function no(t){t=Nr(t),qs(t),mt(to(t),function(n,o){t.node(o).x=n})}function qs(t){var n=D(t),o=t.graph().ranksep,i=0;f(n,function(a){var u=I(E(a,function(d){return t.node(d).height}));f(a,function(d){t.node(d).y=i+u/2}),i+=u+o})}function Qr(t,n){var o=n&&n.debugTiming?dn:cn;o("layout",()=>{var i=o(" buildLayoutGraph",()=>ou(t));o(" runLayout",()=>Hs(i,o)),o(" updateInputGraph",()=>Ks(t,i))})}function Hs(t,n){n(" makeSpaceForEdgeLabels",()=>iu(t)),n(" removeSelfEdges",()=>mu(t)),n(" acyclic",()=>tn(t)),n(" nestingGraph.run",()=>Bn(t)),n(" rank",()=>Kr(Nr(t))),n(" injectEdgeLabelProxies",()=>au(t)),n(" removeEmptyRanks",()=>sn(t)),n(" nestingGraph.cleanup",()=>Fn(t)),n(" normalizeRanks",()=>fn(t)),n(" assignRankMinMax",()=>fu(t)),n(" removeEdgeLabelProxies",()=>su(t)),n(" normalize.run",()=>On(t)),n(" parentDummyChains",()=>Qn(t)),n(" addBorderSegments",()=>ln(t)),n(" order",()=>Zn(t)),n(" insertSelfEdges",()=>hu(t)),n(" adjustCoordinateSystem",()=>hn(t)),n(" position",()=>no(t)),n(" positionSelfEdges",()=>gu(t)),n(" removeBorderNodes",()=>lu(t)),n(" normalize.undo",()=>Ln(t)),n(" fixupEdgeLabelCoords",()=>cu(t)),n(" undoCoordinateSystem",()=>gn(t)),n(" translateGraph",()=>uu(t)),n(" assignNodeIntersects",()=>du(t)),n(" reversePoints",()=>pu(t)),n(" acyclic.undo",()=>nn(t))}function Ks(t,n){f(t.nodes(),function(o){var i=t.node(o),a=n.node(o);if(i){if(i.x=a.x,i.y=a.y,n.children(o).length)i.width=a.width,i.height=a.height}}),f(t.edges(),function(o){var i=t.edge(o),a=n.edge(o);if(i.points=a.points,Object.prototype.hasOwnProperty.call(a,"x"))i.x=a.x,i.y=a.y}),t.graph().width=n.graph().width,t.graph().height=n.graph().height}var Js=["nodesep","edgesep","ranksep","marginx","marginy"],Zs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$s=["acyclicer","ranker","rankdir","align"],Qs=["width","height"],ru={width:0,height:0},eu=["minlen","weight","width","height","labeloffset"],tu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},nu=["labelpos"];function ou(t){var n=new Q({multigraph:!0,compound:!0}),o=$r(t.graph());return n.setGraph(ir({},Zs,Zr(o,Js),Z(o,$s))),f(t.nodes(),function(i){var a=$r(t.node(i));n.setNode(i,et(Zr(a,Qs),ru)),n.setParent(i,t.parent(i))}),f(t.edges(),function(i){var a=$r(t.edge(i));n.setEdge(i,ir({},tu,Zr(a,eu),Z(a,nu)))}),n}function iu(t){var n=t.graph();n.ranksep/=2,f(t.edges(),function(o){var i=t.edge(o);if(i.minlen*=2,i.labelpos.toLowerCase()!=="c")if(n.rankdir==="TB"||n.rankdir==="BT")i.width+=i.labeloffset;else i.height+=i.labeloffset})}function au(t){f(t.edges(),function(n){var o=t.edge(n);if(o.width&&o.height){var i=t.node(n.v),a=t.node(n.w),u={rank:(a.rank-i.rank)/2+i.rank,e:n};k(t,"edge-proxy",u,"_ep")}})}function fu(t){var n=0;f(t.nodes(),function(o){var i=t.node(o);if(i.borderTop)i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,n=I(n,i.maxRank)}),t.graph().maxRank=n}function su(t){f(t.nodes(),function(n){var o=t.node(n);if(o.dummy==="edge-proxy")t.edge(o.e).labelRank=o.rank,t.removeNode(n)})}function uu(t){var n=Number.POSITIVE_INFINITY,o=0,i=Number.POSITIVE_INFINITY,a=0,u=t.graph(),d=u.marginx||0,c=u.marginy||0;function p(l){var{x:m,y:h,width:g,height:b}=l;n=Math.min(n,m-g/2),o=Math.max(o,m+g/2),i=Math.min(i,h-b/2),a=Math.max(a,h+b/2)}f(t.nodes(),function(l){p(t.node(l))}),f(t.edges(),function(l){var m=t.edge(l);if(Object.prototype.hasOwnProperty.call(m,"x"))p(m)}),n-=d,i-=c,f(t.nodes(),function(l){var m=t.node(l);m.x-=n,m.y-=i}),f(t.edges(),function(l){var m=t.edge(l);if(f(m.points,function(h){h.x-=n,h.y-=i}),Object.prototype.hasOwnProperty.call(m,"x"))m.x-=n;if(Object.prototype.hasOwnProperty.call(m,"y"))m.y-=i}),u.width=o-n+d,u.height=a-i+c}function du(t){f(t.edges(),function(n){var o=t.edge(n),i=t.node(n.v),a=t.node(n.w),u,d;if(!o.points)o.points=[],u=a,d=i;else u=o.points[0],d=o.points[o.points.length-1];o.points.unshift(Dr(i,u)),o.points.push(Dr(a,d))})}function cu(t){f(t.edges(),function(n){var o=t.edge(n);if(Object.prototype.hasOwnProperty.call(o,"x")){if(o.labelpos==="l"||o.labelpos==="r")o.width-=o.labeloffset;switch(o.labelpos){case"l":o.x-=o.width/2+o.labeloffset;break;case"r":o.x+=o.width/2+o.labeloffset;break}}})}function pu(t){f(t.edges(),function(n){var o=t.edge(n);if(o.reversed)o.points.reverse()})}function lu(t){f(t.nodes(),function(n){if(t.children(n).length){var o=t.node(n),i=t.node(o.borderTop),a=t.node(o.borderBottom),u=t.node(U(o.borderLeft)),d=t.node(U(o.borderRight));o.width=Math.abs(d.x-u.x),o.height=Math.abs(a.y-i.y),o.x=u.x+o.width/2,o.y=i.y+o.height/2}}),f(t.nodes(),function(n){if(t.node(n).dummy==="border")t.removeNode(n)})}function mu(t){f(t.edges(),function(n){if(n.v===n.w){var o=t.node(n.v);if(!o.selfEdges)o.selfEdges=[];o.selfEdges.push({e:n,label:t.edge(n)}),t.removeEdge(n)}})}function hu(t){var n=D(t);f(n,function(o){var i=0;f(o,function(a,u){var d=t.node(a);d.order=u+i,f(d.selfEdges,function(c){k(t,"selfedge",{width:c.label.width,height:c.label.height,rank:d.rank,order:u+ ++i,e:c.e,label:c.label},"_se")}),delete d.selfEdges})})}function gu(t){f(t.nodes(),function(n){var o=t.node(n);if(o.dummy==="selfedge"){var i=t.node(o.e.v),a=i.x+i.width/2,u=i.y,d=o.x-a,c=i.height/2;t.setEdge(o.e,o.label),t.removeNode(n),o.label.points=[{x:a+2*d/3,y:u-c},{x:a+5*d/6,y:u-c},{x:a+d,y:u},{x:a+5*d/6,y:u+c},{x:a+2*d/3,y:u+c}],o.label.x=o.x,o.label.y=o.y}})}function Zr(t,n){return q(Z(t,n),Number)}function $r(t){var n={};return f(t,function(o,i){n[i.toLowerCase()]=o}),n}var oo=e((t,n,o)=>Math.max(n,Math.min(o,t)),"clamp"),io=e((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),vu=e((t)=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),bu=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],yu=e((t,n,o,i,a)=>{let u=[],d=new Set;if(o.forEach(({start:m,end:h})=>{if(m!==i)d.add(m);if(h!==i)d.add(h)}),d.forEach((m)=>{let h=t.node(m);if(typeof h?.x==="number"&&typeof h?.y==="number")u.push(h)}),u.length===0)o.forEach(({edge:m})=>{(m.points??[]).forEach((h)=>{if(typeof h?.x==="number"&&typeof h?.y==="number")u.push(h)})});if(u.length===0)return io(a);let c=u.reduce((m,h)=>({x:m.x+h.x/u.length,y:m.y+h.y/u.length}),{x:0,y:0}),p=c.x-n.x,l=c.y-n.y;if(Math.abs(p)>Math.abs(l))return p>0?"right":"left";if(Math.abs(l)>0)return l>0?"bottom":"top";return io(a)},"getSelfLoopSide"),wu=e((t,n="top",o=0,i=0)=>{let a=t.x,u=t.y-o,d=t.width/2,c=t.height/2,p=Math.max(36,Math.min(100,t.width*0.8)),l=oo(Math.max(i,t.width*0.35),36,p),m=oo(Math.min(t.width,t.height)*0.45,24,48);switch(n){case"bottom":{let h=u+c;return[{x:a-l/2,y:h},{x:a-l/2,y:h+m},{x:a+l/2,y:h+m},{x:a+l/2,y:h}]}case"right":{let h=a+d;return[{x:h,y:u-l/2},{x:h+m,y:u-l/2},{x:h+m,y:u+l/2},{x:h,y:u+l/2}]}case"left":{let h=a-d;return[{x:h,y:u-l/2},{x:h-m,y:u-l/2},{x:h-m,y:u+l/2},{x:h,y:u+l/2}]}case"top":default:{let h=u-c;return[{x:a-l/2,y:h},{x:a-l/2,y:h-m},{x:a+l/2,y:h-m},{x:a+l/2,y:h}]}}},"getSelfLoopPoints"),_u=e((t,n,o="top",i=0,a={})=>{let d=t.x,c=t.y-i,p=a.width??0,l=a.height??0;switch(o){case"bottom":return{x:d,y:Math.max(...n.map((m)=>m.y))+l/2+4};case"right":return{x:Math.max(...n.map((m)=>m.x))+p/2+4,y:c};case"left":return{x:Math.min(...n.map((m)=>m.x))-p/2-4,y:c};case"top":default:return{x:d,y:Math.min(...n.map((m)=>m.y))-l/2-4}}},"getSelfLoopLabelPosition"),Ki=e((t,n=0,{mergeSelfLoops:o=!0}={})=>{let i=new Map,a=[],u=t.graph()?.rankdir;return t.edges().forEach((d)=>{let c=t.edge(d);if(o&&c.selfLoop){let p=c.selfLoop.id;if(!i.has(p))i.set(p,[]);i.get(p).push({edge:c,start:d.v,end:d.w})}else a.push({edge:c,start:d.v,end:d.w})}),i.forEach((d)=>{if(d.length!==3){d.forEach((_)=>a.push(_));return}d.sort((_,A)=>_.edge.selfLoop.order-A.edge.selfLoop.order);let[c,p,l]=d,m=c.edge.originalEdge??p.edge.originalEdge??l.edge.originalEdge??p.edge,h=t.node(m.start);if(!h){d.forEach((_)=>a.push(_));return}let g={width:p.edge.width,height:p.edge.height},b=yu(t,h,d,m.start,u),w=wu(h,b,n,g.width??0),y=_u(h,w,b,n,g),v={...p.edge,...m,id:m.id,points:w,start:m.start,end:m.end,x:y.x,y:y.y,width:g.width,height:g.height,labelStyle:p.edge.labelStyle,fromCluster:c.edge.fromCluster??p.edge.fromCluster??l.edge.fromCluster,toCluster:c.edge.toCluster??p.edge.toCluster??l.edge.toCluster};delete v.selfLoop,delete v.originalEdge,a.push({edge:v,start:v.start,end:v.end})}),a},"getEdgesToRender"),fo=e(async({element:t,graph:n,diagramType:o,id:i,parentCluster:a,siteConfig:u})=>{let d=n.graph().rankdir;r.trace("Dir in recursive render - dir:",d);let{clusters:c,edgePaths:p,edgeLabels:l,nodes:m,rootGroups:h}=sa(t,{edgePathsClass:"edgePaths"});if(!n.nodes())r.info("No nodes found for",n);else r.info("Recursive render XXX",n.nodes());if(n.edges().length>0)r.info("Recursive edges",n.edge(n.edges()[0]));let g=vu(o);await Promise.all(n.nodes().map(async function(y){let v=n.node(y);if(a!==void 0){let _=JSON.parse(JSON.stringify(a.clusterData));if(r.trace(`Setting data for parent cluster XXX
2
- Node.id = `,y,`
3
- data=`,_.height,`
4
- Parent cluster`,a.height),n.setNode(a.id,_),!n.parent(y))r.trace("Setting parent",y,a.id),n.setParent(y,a.id,_)}if(r.info("(Insert) Node XXX"+y+": "+JSON.stringify(n.node(y))),v?.clusterNode){r.info("Cluster identified XBX",y,v.width,n.node(y));let{ranksep:_,nodesep:A}=n.graph();v.graph.setGraph({...v.graph.graph(),ranksep:_+25,nodesep:A});let re=await Lu({element:m,graph:v.graph,diagramType:o,id:i,parentCluster:n.node(y),siteConfig:u}),ee=re.elem;R(v,ee),v.diff=re.diff||0,r.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),ho(ee,v)}else if(n.children(y).length>0)r.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",n),r.trace($n(v.id,n)),G.set(v.id,{id:$n(v.id,n),node:v});else r.trace("Node - the non recursive path XAX",y,m,n.node(y),d),await la(m,n.node(y),{config:u,dir:d})})),await e(async()=>{let y=n.edges().map(async function(v){let _=n.edge(v.v,v.w,v.name);if(r.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),r.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(n.edge(v))),r.info("Fix",G,"ids:",v.v,v.w,"Translating: ",G.get(v.v),G.get(v.w)),g&&_.selfLoop){if(_.selfLoop.order!==1)return;let A={..._.originalEdge,..._,id:_.selfLoop.id,startLabelLeft:_.originalEdge?.startLabelLeft??_.startLabelLeft,startLabelRight:_.originalEdge?.startLabelRight??_.startLabelRight,endLabelLeft:_.originalEdge?.endLabelLeft??_.endLabelLeft,endLabelRight:_.originalEdge?.endLabelRight??_.endLabelRight};await Tt(l,A),_.width=A.width,_.height=A.height,_.labelStyle=A.labelStyle;return}await Tt(l,_)});await Promise.all(y)},"processEdges")();let{subGraphTitleTotalMargin:w}=Ct(u);return{elem:h,graph:n,groups:{clusters:c,edgePaths:p,edgeLabels:l,nodes:m,rootGroups:h},diagramType:o,id:i,mergeSelfLoops:g,subGraphTitleTotalMargin:w}},"measureDagreGraph"),so=e((t)=>{r.info("############################################# XXX"),r.info("### Layout ### XXX"),r.info("############################################# XXX"),Qr(t)},"runDagreGraphLayout"),Eu=e((t,n,o)=>{let i=t.node(n);if(!i)return;let a={...i};if(i?.clusterNode)a.y=(i.y??0)+o;else if(t.children(n).length>0)a.height=(i.height??0)+o;else a.y=(i.y??0)+o/2;return a},"normalizeDagreNode"),ao=e((t,n)=>{bu.forEach((o)=>{if(n[o]!==void 0)t[o]=n[o]})},"applyDagreNodeLayout"),xu=e((t,n,o,i)=>({...t,start:t.start??n,end:t.end??o,points:(t.points??[]).map((a)=>({...a,y:typeof a.y==="number"?a.y+i:a.y}))}),"normalizeDagreEdge"),Co=e((t,n)=>{let{graph:o,mergeSelfLoops:i,subGraphTitleTotalMargin:a=0}=n,u=new Map(t.nodes.map((c)=>[c.id,c]));ca(o).forEach((c)=>{let p=Eu(o,c,a);if(!p)return;ao(o.node(c),p);let l=u.get(c);if(l)ao(l,p)});let d=a/2;return t.edges=Ki(o,d,{mergeSelfLoops:i}).map(({edge:c,start:p,end:l})=>xu(c,p,l,d)),t},"applyDagreLayoutResult"),Ou=e(async({elem:t,graph:n,groups:{clusters:o,edgePaths:i},diagramType:a,id:u,mergeSelfLoops:d,subGraphTitleTotalMargin:c})=>{let p=0;await Promise.all(ca(n).map(async function(h){let g=n.node(h);if(r.info("Position XBX => "+h+": ("+g.x,","+g.y,") width: ",g.width," height: ",g.height),g?.clusterNode)g.y+=c,r.info("A tainted cluster node XBX1",h,g.id,g.width,g.height,g.x,g.y,n.parent(h)),G.get(g.id).node=g,ht(g);else if(n.children(h).length>0){r.info("A pure cluster node XBX1",h,g.id,g.x,g.y,g.width,g.height,n.parent(h)),g.height+=c,n.node(g.parentId);let b=g?.padding/2||0,w=g?.labelBBox?.height||0,y=w-b||0;r.debug("OffsetY",y,"labelHeight",w,"halfPadding",b),await Qt(o,g),G.get(g.id).node=g}else{let b=n.node(g.parentId);g.y+=c/2,r.info("A regular node XBX1 - using the padding",g.id,"parent",g.parentId,g.width,g.height,g.x,g.y,"offsetY",g.offsetY,"parent",b,b?.offsetY,g),ht(g)}}));let l=c/2;return Ki(n,l,{mergeSelfLoops:d}).forEach(function({edge:h,start:g,end:b}){r.info("Edge "+g+" -> "+b+": "+JSON.stringify(h),h),h.points.forEach((_)=>_.y+=l);let w=n.node(g),y=n.node(b),v=Jt(i,h,G,a,w,y,u);Hn(h,v)}),n.nodes().forEach(function(h){let g=n.node(h);if(r.info(h,g.type,g.diff),g.isGroup)p=g.diff}),r.warn("Returning from recursive render XAX",t,p),{elem:t,diff:p}},"paintDagreLayoutCore"),Lu=e(async(t)=>{let n=await fo(t);return so(n.graph),await Ou(n)},"renderDagreSubgraph"),Qi=e((t)=>{let n=new Q({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.nodeSpacing||t.config?.flowchart?.nodeSpacing,ranksep:t.config?.rankSpacing||t.rankSpacing||t.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach((o)=>{if(n.setNode(o.id,{...o}),o.parentId)n.setParent(o.id,o.parentId)}),r.debug("Edges:",t.edges),t.edges.forEach((o)=>{if(o.start===o.end){let i=o.start,a=i+"---"+i+"---1",u=i+"---"+i+"---2",d=n.node(i);n.setNode(a,{domId:a,id:a,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(a,d.parentId),n.setNode(u,{domId:u,id:u,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(u,d.parentId);let c=structuredClone(o),p=structuredClone(o),l=structuredClone(o),m=structuredClone(o);if(p.originalEdge=c,p.selfLoop={id:c.id,order:0},l.originalEdge=c,l.selfLoop={id:c.id,order:1},m.originalEdge=c,m.selfLoop={id:c.id,order:2},p.label="",p.arrowTypeEnd="none",p.endLabelLeft="",p.endLabelRight="",p.startLabelLeft="",p.id=i+"-cyclic-special-1",l.startLabelRight="",l.startLabelLeft="",l.endLabelLeft="",l.endLabelRight="",l.arrowTypeStart="none",l.arrowTypeEnd="none",l.id=i+"-cyclic-special-mid",m.label="",m.startLabelRight="",m.startLabelLeft="",m.arrowTypeStart="none",d.isGroup)p.fromCluster=i,m.toCluster=i;m.id=i+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(i,a,p,i+"-cyclic-special-0"),n.setEdge(a,u,l,i+"-cyclic-special-1"),n.setEdge(u,i,m,i+"-cyclic-special-2")}else n.setEdge(o.start,o.end,{...o},o.id)}),eo(n),{graph:n}},"prepareLayoutForDagre"),So=e(async(t,{element:n,preparedLayout:o})=>{let i=o??Qi(t),a=s(),u=await fo({element:n,graph:i.graph,diagramType:t.type,id:t.diagramId,parentCluster:void 0,siteConfig:a});return i.measuredLayout=u,u},"measureDagreLayout"),To=e((t,n)=>{let o=n.preparedLayout?.measuredLayout;if(!o)throw Error("runDagreLayoutCore requires measureDagreLayout to run first");return so(o.graph),Co(t,o),o},"runDagreLayoutCore"),Iu=e((t,{measure:n})=>ca(n.graph).map((o)=>n.graph.node(o)).filter(Boolean),"getDagrePaintNodes"),Su=e((t,n,{measure:o})=>t?o.graph.node(t):void 0,"getDagreEdgeNode"),Ji=lr({prepareLayout:Qi,measureLayout:So,runLayoutCore:To,paintOptions:{clusterDb:G,getNodes:Iu,getEdgeNode:Su,skipNode:e((t,{measure:n})=>!n.graph.hasNode(t.id),"skipNode"),isCluster:e((t,{measure:n})=>n.graph.hasNode(t.id)&&(n.graph.children(t.id)??[]).length>0,"isCluster")}});export{Ki,Co,Qi,So,To,Ji};
@@ -1,200 +0,0 @@
1
- import{e,r,le,Le,y,C,S,E,T,A,I,L,s,an,Tn,p,et,tt,N,Fe,ce,ae,ie,Ye,Dr,ge,ye}from"./chunk-vymqrpm3.js";import{Pt}from"./chunk-47q4hmfp.js";import{je}from"./chunk-7520nrbb.js";import{Ot}from"./chunk-166qe5j6.js";import{he}from"./chunk-es28k2t7.js";import{se}from"./chunk-zmdnxn6m.js";var Dt={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"},U1=new Set([Dt.SHAPE_UNSUPPORTED,Dt.SHAPE_REMOVED,Dt.CONTAINMENT_VIOLATION]),Ds=new Set(Object.values(Dt).filter((t)=>!U1.has(t))),j1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),z1=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"]),W1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),xt="roundedRect";function Tt(t){if(!t)return t;return j1.get(t)??t}e(Tt,"resolveShapeAlias");function v1(t,a){for(let o of t){if(o.isGroup)continue;if(!o.shape||o.shape==="squareRect"||o.shape==="rect")o.shape=xt;if(z1.has(o.shape)){let u=`shape "${o.shape}" was removed in v0.8.1, using "${xt}"`;if(a?.emitError)a.emitError("SHAPE_REMOVED",u,{nodeId:o.id});else r.warn(`agentflow: ${u}`);o.shape=xt;continue}if(!W1.has(o.shape)){let u=`shape "${o.shape}" is not supported, using "${xt}"`;if(a?.emitWarning)a.emitWarning("SHAPE_UNSUPPORTED",u,{nodeId:o.id});else r.warn(`agentflow: ${u}`);o.shape=xt}}}e(v1,"normaliseNodeShapes");var i1=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),F1=i1.size,V1=e((t)=>`af-kind-${t}`,"kindClass"),K1=[...i1.keys()],I1=e((t)=>Math.max(1,t-F1),"containerSlotCount"),L1=e((t,a)=>{let o=F1+t%I1(a);return a>0?o%a:o},"containerSlot");function B1(t,a,o){let u=s().themeVariables?.borderColorArray,d=Array.isArray(u)?u.length:0,h=o.size;for(let l of t??[]){if(l.isGroup||l.shape==="collapsedGroup"){let m=o.get(String(l.id))??h++;l.colorIndex=L1(m,d);continue}let f=a(String(l.id));if(f&&i1.has(f))l.cssClasses=`${l.cssClasses??""} ${V1(f)}`.replace(/\s+/g," ").trim()}}e(B1,"assignColorSlots");var _1="agentflow-",c1=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),H1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),Y1={flow:"flowGroup"};function s1(t){if(Array.isArray(t))return t.map((o)=>s1(o));if(t===null||typeof t!=="object")return t;let a={};for(let o of Object.keys(t)){if(o==="__proto__"||o==="constructor"||o==="prototype")continue;a[o]=s1(t[o])}return a}e(s1,"stripPrototypeKeys");function M1(t){let a=!1,o=!1,u=0,d,h=[];for(let l of t.split(`
2
- `)){if(d!==void 0){let x=l.length-l.trimStart().length;if(l.trim()===""||x>d){h.push(l);continue}d=void 0}let f=-1;for(let x=0;x<l.length;x++){let _=l[x];if(o){if(_==="\\")x++;else if(_==='"')o=!1}else if(a){if(_==="'")a=!1}else if(_==='"')o=!0;else if(_==="'")a=!0;else if(_==="#"&&(x===0||l[x-1]===" "||l[x-1]==="\t")){f=x;break}else if(_==="["||_==="{")u++;else if(_==="]"||_==="}")u=Math.max(0,u-1)}if(a||o||u>0){h.push(l);continue}let m=f>=0?l.slice(0,f):l,k=f>=0?l.slice(f):"";if(/:\s*[>|][\d+-]*\s*$/.test(m)){d=l.length-l.trimStart().length,h.push(l);continue}h.push(m.replace(/,([\t ]*)$/,"$1")+k)}return h.join(`
3
- `)}e(M1,"stripLineTrailingCommas");var q1=class{constructor(){this.vertexCounter=0,this.config=s(),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=S,this.setAccDescription=T,this.setDiagramTitle=I,this.getAccTitle=E,this.getAccDescription=A,this.getDiagramTitle=L,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")}static{e(this,"AgentFlowDB")}sanitizeText(t){return y.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let a of this.vertices.values())if(a.id===t)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,a,o,u,d,h,l={},f,m){if(!t||t.trim().length===0)return;let k;if(f!==void 0){let D;if(!f.includes(`
4
- `))D=`{
5
- `+f+`
6
- }`;else D=f+`
7
- `;try{k=tt(D,{schema:et})??{}}catch(g){let b=f.includes(`
8
- `)?M1(f):f;if(b!==f)try{k=tt(b+`
9
- `,{schema:et})??{}}catch{this.rethrowMetadataYamlError(g,f,m)}else this.rethrowMetadataYamlError(g,f,m)}k=s1(k)}let x;if(k&&typeof k.shape==="string"){let D=k;x=D.shape;let g=Tt(x);if(g&&g!==x)D.shape=g}let _=this.subGraphLookup.get(t);if(_&&k){_.metadata={..._.metadata,...k};return}let P=this.connectors.get(t);if(P&&k){P.metadata={...P.metadata,...k};return}if(t==="connectors")return;let B=this.edges.find((D)=>D.id===t);if(B){let D=k;if(D?.animate!==void 0)B.animate=D.animate;if(D?.animation!==void 0)B.animation=D.animation;if(D?.curve!==void 0)B.interpolate=D.curve;if(k)B.metadata={...B.metadata,...k};return}let W,w=this.vertices.get(t);if(w===void 0)w={id:t,labelType:"text",domId:_1+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,w);if(this.vertexCounter++,a!==void 0){if(this.config=s(),W=this.sanitizeText(a.text.trim()),w.labelType=a.type,W.startsWith('"')&&W.endsWith('"'))W=W.substring(1,W.length-1);w.text=W}else if(w.text===void 0)w.text=t;if(o!==void 0)w.type=o;if(u!==void 0&&u!==null)u.forEach((D)=>{w.styles.push(D)});if(d!==void 0&&d!==null)d.forEach((D)=>{w.classes.push(D)});if(h!==void 0)w.dir=h;if(w.props===void 0)w.props=l;else if(l!==void 0)Object.assign(w.props,l);if(k){if(w.metadata={...w.metadata,...k},k.shape){let D=x??k.shape;if(typeof D!=="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(D)}.`,m);if(D!==D.toLowerCase()||D.includes("_"))throw this.positionedShapeError(`No such shape: ${D}. Shape names should be lowercase.`,m);else if(!Dr(k.shape))throw this.positionedShapeError(`No such shape: ${k.shape}.`,m);w.type=k?.shape}if(k?.label)w.text=this.sanitizeText(k.label),w.labelType=this.sanitizeNodeLabelType(k?.labelType)}}positionedShapeError(t,a){let o=Error(t);if(!a)return o;let u=a.first_line+this.frontmatterLineOffset;return Object.assign(o,{hash:{text:"",token:null,line:u-1,loc:{first_line:u,last_line:a.last_line+this.frontmatterLineOffset,first_column:a.first_column,last_column:a.last_column},expected:[]}}),o}rethrowMetadataYamlError(t,a,o){let u=t;if(!u||u.name!=="YAMLException"||!u.mark||!o)throw t;let d;try{let h=!a.includes(`
10
- `),l=h?`{
11
- `+a+`
12
- }`:a+`
13
- `,f=o.first_line+this.frontmatterLineOffset,m=o.first_column+2,k=e((D,g)=>{if(h)return{line:f,column:m+(D===1?g:0)};return{line:f+D,column:D===0?m+g:g}},"toSource"),x=k(u.mark.line,u.mark.column),_=u.reason??(u.message??"").split(`
14
- `)[0].replace(/\s*\(\d+:\d+\)\s*$/,""),P=l.split(`
15
- `),B=[];if(h)B.push(1);else for(let D=u.mark.line-1;D<=u.mark.line+1;D++){if(D<0||D>=P.length)continue;if(D===P.length-1&&P[D]===""&&D!==u.mark.line)continue;B.push(D)}let W=Math.max(...B.map((D)=>String(k(D,0).line).length)),w=[];for(let D of B){let g=k(D,0).line,b=` ${String(g).padStart(W)} | `;if(w.push(b+P[D].replace(/\t/g,"→")),D===u.mark.line)w.push("-".repeat(b.length+u.mark.column)+"^")}d={message:`${_} (${x.line}:${x.column+1})
16
-
17
- ${w.join(`
18
- `)}`,markLine:x.line-1,markColumn:x.column,hash:{text:"",token:null,line:x.line-1,loc:{first_line:x.line,last_line:x.line,first_column:x.column,last_column:x.column+1},expected:[]}}}catch{}if(d)u.message=d.message,u.mark.line=d.markLine,u.mark.column=d.markColumn,u.hash=d.hash;throw u}addSingleLink(t,a,o,u){let l={start:t,end:a,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};r.info("abc78 Got edge...",l);let f=o.text;if(f!==void 0){if(l.text=this.sanitizeText(f.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"'))l.text=l.text.substring(1,l.text.length-1);l.labelType=this.sanitizeNodeLabelType(f.type)}if(o!==void 0){if(l.type=o.type,l.stroke=o.stroke,l.length=o.length>10?10:o.length,o.edgeSemantic)l.edgeSemantic=o.edgeSemantic}if(u&&!this.edges.some((m)=>m.id===u))l.id=u,l.isUserDefinedId=!0;else{let m=this.edges.filter((k)=>k.start===l.start&&k.end===l.end);if(m.length===0)l.id=Fe(l.start,l.end,{counter:0,prefix:"L"});else l.id=Fe(l.start,l.end,{counter:m.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))r.info("Pushing edge..."),this.edges.push(l);else throw 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(t){return t!==null&&typeof t==="object"&&"id"in t&&typeof t.id==="string"}addLink(t,a,o){let u=this.isLinkData(o)?o.id.replace("@",""):void 0;r.info("addLink",t,a,u);for(let d of t)for(let h of a){let l=d===t[t.length-1],f=h===a[0];if(l&&f)this.addSingleLink(d,h,o,u);else this.addSingleLink(d,h,o,void 0)}}updateLinkInterpolate(t,a){t.forEach((o)=>{if(o==="default"){this.edges.defaultInterpolate=a;return}if(typeof o==="number"&&o>=this.edges.length)throw Error(`The index ${o} 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[o].interpolate=a})}updateLink(t,a){t.forEach((o)=>{if(typeof o==="number"&&o>=this.edges.length)throw Error(`The index ${o} 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.)`);if(o==="default")this.edges.defaultStyle=a;else if(this.edges[o].style=a,(this.edges[o]?.style?.length??0)>0&&!this.edges[o]?.style?.some((u)=>u?.startsWith("fill")))this.edges[o]?.style?.push("fill:none")})}addClass(t,a){let o=a.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach((u)=>{let d=this.classes.get(u);if(d===void 0)d={id:u,styles:[],textStyles:[]},this.classes.set(u,d);if(o!==void 0&&o!==null)o.forEach((h)=>{if(/color/.exec(h)){let l=h.replace("fill","bgFill");d.textStyles.push(l)}d.styles.push(h)})})}setDirection(t){if(this.direction=t.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(t,a){for(let o of t.split(",")){let u=this.vertices.get(o);if(u)u.classes.push(a);let d=this.edges.find((l)=>l.id===o);if(d)d.classes.push(a);let h=this.subGraphLookup.get(o);if(h)h.classes.push(a)}}setTooltip(t,a){if(a===void 0)return;a=this.sanitizeText(a);for(let o of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(o):o,a)}setClickFun(t,a,o){if(s().securityLevel!=="loose")return;if(a===void 0)return;let u=[];if(typeof o==="string"){u=o.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let h=0;h<u.length;h++){let l=u[h].trim();if(l.startsWith('"')&&l.endsWith('"'))l=l.substr(1,l.length-2);u[h]=l}}if(u.length===0)u.push(t);let d=this.vertices.get(t);if(d)d.haveCallback=!0,this.funs.push(()=>{let h=this.lookUpDomId(t),l=document.querySelector(`[id="${h}"]`);if(l!==null)l.addEventListener("click",()=>{N.runFunc(a,...u)},!1)})}setLink(t,a,o){t.split(",").forEach((u)=>{let d=this.vertices.get(u);if(d!==void 0)d.link=N.formatUrl(a,this.config),d.linkTarget=o}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,a,o){t.split(",").forEach((u)=>{this.setClickFun(u,a,o)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach((a)=>{a(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(t){return H1.has(t.type)}getTools(){let t=[];for(let a of this.vertices.values())if(this.isToolDefinition(a))t.push(a);return t}getClasses(){return this.classes}setupToolTips(t){let a=Pt();p(t).select("svg").selectAll("g.node").on("mouseover",(d)=>{let h=p(d.currentTarget),l=h.attr("title");if(l===null)return;let f=d.currentTarget?.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.text(h.attr("title")).style("left",window.scrollX+f.left+(f.right-f.left)/2+"px").style("top",window.scrollY+f.bottom+"px"),a.html(Le.sanitize(l)),h.classed("hover",!0)}).on("mouseout",(d)=>{a.transition().duration(500).style("opacity",0),p(d.currentTarget).classed("hover",!1)})}clear(t="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=t,this.config=s(),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,C()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,a,o,u){let d=t?.text?.trim(),h=o?.text;if(t===o&&o?.text&&/\s/.exec(o.text))d=void 0;let f=e((B)=>{let W={boolean:{},number:{},string:{}},w=[],D;return{nodeList:B.filter(function(b){let M=typeof b;if(b.stmt&&b.stmt==="dir")return D=b.value,!1;if(b.trim()==="")return!1;if(M in W)return W[M].hasOwnProperty(b)?!1:W[M][b]=!0;else return w.includes(b)?!1:w.push(b)}),dir:D}},"uniq")(a.flat()),{nodeList:m,dir:k}=f,x=s().flowchart??{};if(k=k??(x.inheritDir?this.getDirection()??s().direction??void 0:void 0),this.version==="gen-1")for(let B=0;B<m.length;B++)m[B]=this.lookUpDomId(m[B]);d=d??"subGraph"+this.subCount,h=h||"",h=this.sanitizeText(h),this.subCount=this.subCount+1;let _={id:d,nodes:m.filter((B)=>B!==d&&!this.globalNodes.has(B)),title:h.trim(),classes:[],dir:k,labelType:this.sanitizeNodeLabelType(o?.type),type:u??"flow"};r.info("Adding",_.id,_.nodes,_.dir),_.nodes=this.makeUniq(_,this.subGraphs).nodes;let P=this.getPosForId(d);if(P!==-1){let B=this.subGraphs[P];for(let W of _.nodes)if(!B.nodes.includes(W))B.nodes.push(W);if(_.title)B.title=_.title;if(_.dir)B.dir=_.dir;if(_.type)B.type=_.type;this.subGraphLookup.set(d,B)}else this.subGraphs.push(_),this.subGraphLookup.set(d,_);return d}addGlobal(t){for(let a of t.flat()){if(typeof a!=="string")continue;let o=a.trim();if(o!=="")this.globalNodes.add(o)}for(let a of this.subGraphs)a.nodes=a.nodes.filter((o)=>!this.globalNodes.has(o))}getPosForId(t){for(let[a,o]of this.subGraphs.entries())if(o.id===t)return a;return-1}indexNodes2(t,a){let o=this.subGraphs[a].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=a,this.subGraphs[a].id===t)return{result:!0,count:0};let u=0,d=1;while(u<o.length){let h=this.getPosForId(o[u]);if(h>=0){let l=this.indexNodes2(t,h);if(l.result)return{result:!0,count:d+l.count};else d=d+l.count}u=u+1}return{result:!1,count:d}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}addConnector(t,a){let o=t?.text?.trim();if(!o)return"";let u=a?.text?.trim()??"",d=u.length>0?this.sanitizeText(u):o,h=this.connectors.get(o);if(!h)h={id:o,labelType:"text",domId:_1+o+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:d},this.connectors.set(o,h),this.vertices.set(o,h),this.vertexCounter++;else if(u.length>0)h.text=d;return o}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}computeEdgeSemantic(t,a){if(t==="arrow_point"&&a==="normal")return"sequence";if(t==="arrow_cross"&&a==="normal")return"failure";if(t==="arrow_open"&&a==="dotted")return"reference";return}destructStartLink(t){let a=t.trim(),o="arrow_open",u="normal";if(a.includes("."))u="dotted";return{type:"arrow_open",stroke:u}}countChar(t,a){let o=a.length,u=0;for(let d=0;d<o;++d)if(a[d]===t)++u;return u}destructEndLink(t){let a=t.trim(),o=a.slice(0,-1),u="arrow_open";switch(a.slice(-1)){case"x":u="arrow_cross";break;case">":u="arrow_point";break;case"-":case".":u="arrow_open",o=a;break}let d="normal",h=o.length-1,l=this.countChar(".",o);if(l>0)d="dotted",h=l;return{type:u,stroke:d,length:h}}destructLink(t,a){let o=this.destructEndLink(t),u;if(a){if(u=this.destructStartLink(a),u.stroke!==o.stroke)return{type:"INVALID",stroke:"INVALID"};return u.type=o.type,u.length=o.length,{...u,edgeSemantic:this.computeEdgeSemantic(u.type,u.stroke)}}return{...o,edgeSemantic:this.computeEdgeSemantic(o.type,o.stroke)}}exists(t,a){for(let o of t)if(o.nodes.includes(a))return!0;return!1}makeUniq(t,a){let o=[];return t.nodes.forEach((u,d)=>{if(!this.exists(a,u))o.push(t.nodes[d])}),{nodes:o}}getTypeFromVertex(t){let a=typeof t.type==="string"?Tt(t.type):t.type;switch(a){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return a}}findNode(t,a){return t.find((o)=>o.id===a)}destructEdgeType(t){let a="none",o="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":o=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":a=t.replace("double_",""),o=a;break}return{arrowTypeStart:a,arrowTypeEnd:o}}addNodeFromVertex(t,a,o,u,d,h){let l=o.get(t.id),f=u.get(t.id)??!1,m=this.findNode(a,t.id);if(m)m.cssStyles=t.styles,m.cssCompiledStyles=this.getCompiledStyles(t.classes),m.cssClasses=t.classes.join(" ");else{let k={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:l,padding:d.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:h,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),metadata:t.metadata};if(f)a.push({...k,isGroup:!0,shape:"rect"});else a.push({...k,isGroup:!1,shape:this.getTypeFromVertex(t),wrappingWidth:d.agentflow?.wrappingWidth,minWidth:d.agentflow?.minNodeWidth})}}getCompiledStyles(t){let a=[];for(let o of t){let u=this.classes.get(o);if(u?.styles)a=[...a,...u.styles??[]].map((d)=>d.trim());if(u?.textStyles)a=[...a,...u.textStyles??[]].map((d)=>d.trim())}return a}runPostParseValidators(){if(this.postParseValidationRun)return;this.postParseValidationRun=!0}getData(){this.runPostParseValidators();let t=s(),a=[],o=[],u=this.getSubGraphs(),d=new Map,h=new Map,l=new Set,f=new Map,m=e((g,b,M=new Set)=>{if(M.has(g))return;M.add(g);let q=this.subGraphLookup.get(g);if(!q)return;for(let Ce of q.nodes){if(Ce===b||M.has(Ce))continue;l.add(Ce),f.set(Ce,b),m(Ce,b,M)}},"collectDescendants");for(let g of u)if(g.metadata?.view==="collapsed"&&!l.has(g.id))m(g.id,g.id);let k=e((g,b)=>{let M=new Set,q=b;while(q!==void 0&&!M.has(q)){if(q===g)return!0;M.add(q),q=d.get(q)}return!1},"wouldCloseContainmentCycle");for(let g=u.length-1;g>=0;g--){let b=u[g];if(l.has(b.id))continue;if(b.nodes.length>0)h.set(b.id,!0);for(let M of b.nodes){if(k(M,b.id)){this.emitWarning(Dt.CONTAINMENT_VIOLATION,`Container "${b.id}" cannot contain "${M}" because "${M}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:M});continue}d.set(M,b.id)}}for(let g=u.length-1;g>=0;g--){let b=u[g];if(l.has(b.id))continue;if(b.metadata?.view==="collapsed"){let q={...b.metadata,containerType:b.type};a.push({id:b.id,label:b.title,labelStyle:"",labelType:b.labelType,parentId:d.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssClasses:b.classes.join(" "),shape:"collapsedGroup",dir:b.dir,isGroup:!1,look:t.look,metadata:q})}else a.push({id:b.id,label:b.title,labelStyle:"",labelType:b.labelType,parentId:d.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssClasses:b.classes.join(" "),shape:Y1[b.type??"flow"],dir:b.dir,isGroup:!0,look:t.look,metadata:b.metadata})}this.getVertices().forEach((g)=>{if(l.has(g.id))return;this.addNodeFromVertex(g,a,d,h,t,t.look||"classic")});let _=this.getEdges();_.forEach((g,b)=>{let M=f.get(g.start)??g.start,q=f.get(g.end)??g.end;if(M===q&&g.start!==g.end)return;let{arrowTypeStart:Ce,arrowTypeEnd:Ie}=this.destructEdgeType(g.type),ve=[..._.defaultStyle??[]];if(g.style)ve.push(...g.style);let Be={id:Fe(M,q,{counter:b,prefix:"L"},g.id),isUserDefinedId:g.isUserDefinedId,start:M,end:q,type:g.type??"normal",label:g.text,labelType:g.labelType,labelpos:"c",thickness:g.stroke,minlen:g.length,classes:g?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":Ce,arrowTypeEnd:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":Ie,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(g.classes),labelStyle:ve,style:ve,pattern:g.stroke,look:t.look,animate:g.animate,animation:g.animation,curve:g.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve,metadata:g.metadata};o.push(Be)}),v1(a,this);let P=new Map,B=new Map;for(let g of u){let b=d.get(g.id);if(b!==void 0)B.set(b,[...B.get(b)??[],g.id])}let W=0,w=e((g)=>{if(P.has(g))return;P.set(g,W++);for(let b of B.get(g)??[])w(b)},"walkContainers");for(let g of u)if(d.get(g.id)===void 0)w(g.id);let D=new Set(this.getConnectors().map((g)=>g.id));return B1(a,(g)=>{if(D.has(g))return"connector";let b=this.vertices.get(g);return b?this.deriveVertexKind(b,Tt(b.type)):void 0},P),{nodes:a,edges:o,other:{},config:t,connectors:this.getConnectors()}}defaultConfig(){return Tn.flowchart}deriveVertexKind(t,a){if(this.isToolDefinition(t))return"tool";if(a==="hexagon"||a==="hex")return"action";if(a==="lean-right"||a==="lean_right")return"input";if(a==="lin-doc"||a==="lined-document")return"refdoc";if(a==="diamond")return"decision";return"task"}getSemanticModel(){this.runPostParseValidators();let t=new Set(this.subGraphs.map((l)=>l.id)),a=[],o=[];for(let[l,f]of this.vertices){if(t.has(l))continue;if(f.isConnector){let x={id:l};if(f.text!==void 0&&f.text!==l)x.title=f.text;if(f.metadata&&Object.keys(f.metadata).length>0){let _={};for(let[P,B]of Object.entries(f.metadata)){if(c1.has(P))continue;_[P]=B}if(Object.keys(_).length>0)x.metadata=_}o.push(x);continue}let m={id:l};if(f.text!==void 0)m.label=f.text;let k=typeof f.type==="string"?Tt(f.type):f.type;if(k!==void 0)m.shape=k;if(m.vertexKind=this.deriveVertexKind(f,k),f.metadata&&Object.keys(f.metadata).length>0){let x={};for(let[_,P]of Object.entries(f.metadata)){if(c1.has(_))continue;x[_]=P}if(Object.keys(x).length>0)m.metadata=x}a.push(m)}let u=this.edges.map((l)=>{let f={start:l.start,end:l.end};if(l.id!==void 0)f.id=l.id;if(typeof l.text==="string"&&l.text.length>0)f.label=l.text;if(l.type!==void 0)f.type=l.type;if(l.stroke!==void 0)f.stroke=l.stroke;if(l.edgeSemantic!==void 0)f.edgeSemantic=l.edgeSemantic;if(l.length!==void 0)f.length=l.length;if(l.metadata&&Object.keys(l.metadata).length>0)f.metadata={...l.metadata};return f}),d=this.subGraphs.map((l)=>{let f={id:l.id,nodes:[...l.nodes]};if(l.type!==void 0)f.type=l.type;if(l.title!==void 0)f.title=l.title;if(l.dir!==void 0)f.direction=l.dir;if(l.metadata&&Object.keys(l.metadata).length>0){let m={};for(let[k,x]of Object.entries(l.metadata)){if(c1.has(k))continue;m[k]=x}if(Object.keys(m).length>0)f.metadata=m}return f}),h={vertices:a,edges:u,subGraphs:d,connectors:o,diagnostics:this.diagnostics};if(this.direction!==void 0)h.direction=this.direction;return h}setFrontmatterLineOffset(t){this.frontmatterLineOffset=t??0}toElementPosition(t){let a=t?.first_line??0,o=t?.first_column??0,u=t?.last_line??a,d=t?.last_column??o,[h,l]=t?.range??[0,0];return{startLine:a+this.frontmatterLineOffset,startColumn:o,endLine:u+this.frontmatterLineOffset,endColumn:d,startIndex:h,endIndex:l}}pushMapping(t,a,o){if(!t)return;let u={id:t,type:a,position:this.toElementPosition(o)};return this.elementMappings.push(u),u}addVertexMapping(t,a,o,u){let d=this.pushMapping(t,"vertex",u);if(d&&o==null)this.bareVertexMappings.add(d)}extendVertexMapping(t,a){if(!t||!a)return;let o=this.toElementPosition(a);for(let u=this.elementMappings.length-1;u>=0;u--){let d=this.elementMappings[u];if(d.type==="vertex"&&d.id===t){if(this.bareVertexMappings.has(d))d.type="attachment",this.bareVertexMappings.delete(d);if(o.endLine>d.position.endLine||o.endLine===d.position.endLine&&o.endColumn>d.position.endColumn)d.position.endLine=o.endLine,d.position.endColumn=o.endColumn,d.position.endIndex=o.endIndex;return}}this.pushMapping(t,"attachment",a)}addEdgeMapping(t,a,o,u){let d=Array.isArray(a)?a.map((l)=>typeof l==="string"?l:l?.id??"").filter(Boolean):[],h=d.length>0?d.join(">"):"edge";this.pushMapping(h,"edge",u)}addSubgraphMapping(t,a,o,u){let d=(typeof t==="string"?t:t?.text)??"",h=this.toElementPosition(o),l=u?this.toElementPosition(u):h;if(!d)return;this.elementMappings.push({id:d,type:"subgraph",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:l.endLine,endColumn:l.endColumn,startIndex:h.startIndex,endIndex:l.endIndex}})}addConnectorMapping(t,a,o,u){let d=t?.text?.trim()??"";if(!d)return;let h=this.toElementPosition(o),l=u?this.toElementPosition(u):h;this.elementMappings.push({id:d,type:"connector",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:l.endLine,endColumn:l.endColumn,startIndex:h.startIndex,endIndex:l.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(t){return this.elementMappings.find((a)=>a.id===t)}getElementsOnLine(t){return this.elementMappings.filter((a)=>t>=a.position.startLine&&t<=a.position.endLine)}getElementAtPosition(t,a){let o=this.elementMappings.filter((d)=>{let{startLine:h,startColumn:l,endLine:f,endColumn:m}=d.position;if(t<h||t>f)return!1;if(t===h&&a<l)return!1;if(t===f&&a>m)return!1;return!0});if(o.length===0)return;let u=e(({position:d})=>[d.endLine-d.startLine,d.endColumn-d.startColumn],"span");return o.reduce((d,h)=>{let[l,f]=u(d),[m,k]=u(h);if(m!==l)return m<l?h:d;return k<f?h:d})}getMappingStats(){let t=0,a=0,o=0,u=0,d=0;for(let h of this.elementMappings)if(h.type==="vertex")t++;else if(h.type==="edge")a++;else if(h.type==="subgraph")o++;else if(h.type==="connector")u++;else if(h.type==="attachment")d++;return{vertices:t,edges:a,subgraphs:o,connectors:u,attachments:d,totalElements:this.elementMappings.length}}emitDiagnostic(t,a,o,u){let d=u?.nodeId??u?.edgeId,h=d?this.getElementById(d):void 0,l={id:t,severity:a,message:o,...u?.nodeId?{nodeId:u.nodeId}:{},...u?.edgeId&&!u?.nodeId?{edgeId:u.edgeId}:{},...h?{position:h.position}:{}};if(this.diagnostics.some((k)=>k.id===l.id&&k.severity===l.severity&&k.message===l.message&&k.nodeId===l.nodeId&&k.edgeId===l.edgeId))return;this.diagnostics.push(l);let m=`agentflow[${t}]: ${o}`;if(a==="error")r.error(m);else r.warn(m)}emitWarning(t,a,o){this.emitDiagnostic(t,"warning",a,o)}emitError(t,a,o){this.emitDiagnostic(t,"error",a,o)}getDiagnostics(){return[...this.diagnostics]}},X1=e(function(t,a){return a.db.getClasses()},"getClasses"),Q1=e(async function(t,a,o,u){r.debug("Drawing agentflow diagram",a);let{securityLevel:d,agentflow:h,layout:l}=s();u.db.setDiagramId(a),r.debug("Before getData: ");let f=u.db.getData();r.debug("Data: ",f);let m=he(a,d),k=u.db.getDirection();if(f.type=u.type,f.layoutAlgorithm=ye(l),f.layoutAlgorithm==="dagre"&&l==="elk")r.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.");f.direction=k,f.nodeSpacing=h?.nodeSpacing||50,f.rankSpacing=h?.rankSpacing||50,f.markers=["point","circle","cross","hierarchy"],f.diagramId=a,r.debug("REF1:",f),await ge(f,m);let x=h?.diagramPadding??8;N.insertTitle(m,"agentflowTitleText",h?.titleTopMargin??0,u.db.getDiagramTitle()),se(m,x,"agentflow",h?.useMaxWidth??!0)},"draw"),J1={getClasses:X1,draw:Q1},d1=function(){var t=e(function(He,v,F,V){for(F=F||{},V=He.length;V--;F[He[V]]=v);return F},"o"),a=[1,5],o=[1,4],u=[1,3],d=[1,6],h=[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],l=[2,2],f=[1,15],m=[1,16],k=[1,17],x=[1,18],_=[1,19],P=[1,26],B=[1,27],W=[1,28],w=[1,30],D=[1,31],g=[1,32],b=[1,55],M=[1,54],q=[1,34],Ce=[1,35],Ie=[1,36],ve=[1,37],Be=[1,38],Q=[1,50],J=[1,52],Z=[1,48],ee=[1,53],te=[1,49],re=[1,56],ne=[1,51],oe=[1,57],ue=[1,58],qe=[1,39],Xe=[1,40],Qe=[1,41],Je=[1,42],Ze=[1,43],We=[1,64],R=[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],ke=[1,70],me=[1,68],Ae=[1,67],Ee=[1,69],rt=[8,9,10,12,78,80,81],nt=[1,88],at=[1,101],ot=[1,106],ut=[1,105],lt=[1,102],ct=[1,98],dt=[1,104],ht=[1,100],pt=[1,107],ft=[1,103],gt=[1,108],bt=[1,99],$e=[8,9,10,11,12,43,78,80,81],pe=[8,9,10,11,12,43,49,78,80,81],xe=[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],h1=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],kt=[47,63,92,105,108,109,112,114,117,118,119],p1=[1,131],f1=[1,132],_t=[1,134],vt=[1,133],g1=[47,63,65,77,92,105,108,109,112,114,117,118,119],Ft=[1,143],Vt=[1,157],It=[1,158],Lt=[1,159],Bt=[1,162],Mt=[1,161],yt=[1,160],wt=[1,145],Nt=[1,147],Rt=[1,151],b1=[1,139],k1=[1,140],Gt=[1,152],Ut=[1,153],jt=[1,154],zt=[1,155],Wt=[1,156],Kt=[1,163],Ht=[1,164],Yt=[1,141],qt=[1,142],Xt=[1,149],Qt=[1,144],Jt=[1,148],Zt=[1,146],mt=[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],m1=[1,168],At=[1,170],X=[8,9,10,12],Te=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],G=[1,190],fe=[1,186],be=[1,187],U=[1,191],j=[1,188],z=[1,189],Et=[80,119,122],K=[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],A1=[11,109],Ke=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],Me=[1,269],we=[1,267],Ne=[1,271],Re=[1,265],Oe=[1,266],Pe=[1,268],Ge=[1,270],Ue=[1,272],Ct=[1,292],E1=[8,9,10,12,109],Ve=[8,9,10,11,12,63,87,108,109,112,113,114,115],r1={trace:e(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:e(function(v,F,V,c,H,i,O){var n=i.length-1;switch(H){case 2:this.$=[];break;case 3:if(!Array.isArray(i[n])||i[n].length>0)i[n-1].push(i[n]);this.$=i[n-1];break;case 4:case 198:this.$=i[n];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:c.setDirection("TB"),this.$="TB";break;case 14:c.setDirection(i[n-1]),this.$=i[n-1];break;case 32:this.$=i[n-1].nodes;break;case 38:if(this.$=c.addSubGraph(i[n-6],i[n-1],i[n-4],"flow"),c.addSubgraphMapping)c.addSubgraphMapping(i[n-6],i[n-4],O[n-8],O[n]);break;case 39:if(this.$=c.addSubGraph(i[n-7],i[n-1],i[n-5],"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,i[n-3],O[n-3]),c.addSubgraphMapping)c.addSubgraphMapping(i[n-7],i[n-5],O[n-9],O[n]);break;case 40:if(this.$=c.addSubGraph(i[n-3],i[n-1],{text:"",type:"text"},"flow"),c.addSubgraphMapping)c.addSubgraphMapping(i[n-3],{text:"",type:"text"},O[n-5],O[n]);break;case 41:if(this.$=c.addSubGraph(i[n-4],i[n-1],{text:"",type:"text"},"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,i[n-3],O[n-3]),c.addSubgraphMapping)c.addSubgraphMapping(i[n-4],{text:"",type:"text"},O[n-6],O[n]);break;case 42:if(this.$=c.addSubGraph(void 0,i[n-1],void 0,"flow"),c.addSubgraphMapping)c.addSubgraphMapping(void 0,void 0,O[n-3],O[n]);break;case 43:c.addGlobal(i[n-1]),this.$=[];break;case 44:if(this.$=c.addConnector(i[n-4],i[n-2]),c.addConnectorMapping)c.addConnectorMapping(i[n-4],i[n-2],O[n-6],O[n]);break;case 45:if(this.$=c.addConnector(i[n-5],i[n-3]),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,i[n-1],O[n-1]),c.addConnectorMapping)c.addConnectorMapping(i[n-5],i[n-3],O[n-7],O[n]);break;case 46:if(this.$=c.addConnector(i[n-1],{text:"",type:"text"}),c.addConnectorMapping)c.addConnectorMapping(i[n-1],{text:"",type:"text"},O[n-3],O[n]);break;case 47:if(this.$=c.addConnector(i[n-2],{text:"",type:"text"}),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,i[n-1],O[n-1]),c.addConnectorMapping)c.addConnectorMapping(i[n-2],{text:"",type:"text"},O[n-4],O[n]);break;case 49:this.$=i[n].trim(),c.setAccTitle(this.$);break;case 50:case 51:this.$=i[n].trim(),c.setAccDescription(this.$);break;case 56:this.$=i[n-1]+i[n];break;case 57:this.$=i[n];break;case 58:if(c.addVertex(i[n-1][i[n-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,i[n],O[n]),c.extendVertexMapping)c.extendVertexMapping(i[n-1][i[n-1].length-1],O[n]);if(c.addLink(i[n-3].stmt,i[n-1],i[n-2]),c.addEdgeMapping)c.addEdgeMapping(i[n-3].stmt,i[n-1],i[n-2],this._$);this.$={stmt:i[n-1],nodes:i[n-1].concat(i[n-3].nodes)};break;case 59:if(c.addLink(i[n-2].stmt,i[n],i[n-1]),c.addEdgeMapping)c.addEdgeMapping(i[n-2].stmt,i[n],i[n-1],this._$);this.$={stmt:i[n],nodes:i[n].concat(i[n-2].nodes)};break;case 60:if(c.addLink(i[n-3].stmt,i[n-1],i[n-2]),c.addEdgeMapping)c.addEdgeMapping(i[n-3].stmt,i[n-1],i[n-2],this._$);this.$={stmt:i[n-1],nodes:i[n-1].concat(i[n-3].nodes)};break;case 61:this.$={stmt:i[n-1],nodes:i[n-1]};break;case 62:if(c.addVertex(i[n-1][i[n-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,i[n],O[n]),c.extendVertexMapping)c.extendVertexMapping(i[n-1][i[n-1].length-1],O[n]);this.$={stmt:i[n-1],nodes:i[n-1],shapeData:i[n]};break;case 63:this.$={stmt:i[n],nodes:i[n]};break;case 64:this.$=[i[n]];break;case 65:if(c.addVertex(i[n-5][i[n-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,i[n-4],O[n-4]),c.extendVertexMapping)c.extendVertexMapping(i[n-5][i[n-5].length-1],O[n-4]);this.$=i[n-5].concat(i[n]);break;case 66:this.$=i[n-4].concat(i[n]);break;case 67:this.$=i[n];break;case 68:this.$=i[n-2],c.setClass(i[n-2],i[n]);break;case 69:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"square"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"square",this._$);break;case 70:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"doublecircle"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"doublecircle",this._$);break;case 71:if(this.$=i[n-5],c.addVertex(i[n-5],i[n-2],"circle"),c.addVertexMapping)c.addVertexMapping(i[n-5],i[n-2],"circle",this._$);break;case 72:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"ellipse"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"ellipse",this._$);break;case 73:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"stadium"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"stadium",this._$);break;case 74:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"subroutine"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"subroutine",this._$);break;case 75:if(this.$=i[n-7],c.addVertex(i[n-7],i[n-1],"rect",void 0,void 0,void 0,Object.fromEntries([[i[n-5],i[n-3]]])),c.addVertexMapping)c.addVertexMapping(i[n-7],i[n-1],"rect",this._$);break;case 76:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"cylinder"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"cylinder",this._$);break;case 77:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"round"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"round",this._$);break;case 78:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"diamond"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"diamond",this._$);break;case 79:if(this.$=i[n-5],c.addVertex(i[n-5],i[n-2],"hexagon"),c.addVertexMapping)c.addVertexMapping(i[n-5],i[n-2],"hexagon",this._$);break;case 80:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"odd"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"odd",this._$);break;case 81:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"trapezoid"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"trapezoid",this._$);break;case 82:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"inv_trapezoid"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"inv_trapezoid",this._$);break;case 83:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"lean_right"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"lean_right",this._$);break;case 84:if(this.$=i[n-3],c.addVertex(i[n-3],i[n-1],"lean_left"),c.addVertexMapping)c.addVertexMapping(i[n-3],i[n-1],"lean_left",this._$);break;case 85:if(this.$=i[n],c.addVertex(i[n]),c.addVertexMapping)c.addVertexMapping(i[n],void 0,void 0,this._$);break;case 86:i[n-1].text=i[n],this.$=i[n-1];break;case 87:case 88:i[n-2].text=i[n-1],this.$=i[n-2];break;case 89:this.$=i[n];break;case 90:var Y=c.destructLink(i[n],i[n-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:i[n-1]};break;case 91:var Y=c.destructLink(i[n],i[n-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:i[n-1],id:i[n-3]};break;case 92:this.$={text:i[n],type:"text"};break;case 93:this.$={text:i[n-1].text+""+i[n],type:i[n-1].type};break;case 94:this.$={text:i[n],type:"string"};break;case 95:this.$={text:i[n],type:"markdown"};break;case 96:var Y=c.destructLink(i[n]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic};break;case 97:var Y=c.destructLink(i[n]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,id:i[n-1]};break;case 98:this.$=i[n-1];break;case 99:this.$={text:i[n],type:"text"};break;case 100:this.$={text:i[n-1].text+""+i[n],type:i[n-1].type};break;case 101:this.$={text:i[n],type:"string"};break;case 102:case 119:this.$={text:i[n],type:"markdown"};break;case 116:this.$={text:i[n],type:"text"};break;case 117:this.$={text:i[n-1].text+""+i[n],type:i[n-1].type};break;case 118:this.$={text:i[n],type:"text"};break;case 120:this.$=i[n-4],c.addClass(i[n-2],i[n]);break;case 121:this.$=i[n-4],c.setClass(i[n-2],i[n]);break;case 122:case 130:this.$=i[n-1],c.setClickEvent(i[n-1],i[n]);break;case 123:case 131:this.$=i[n-3],c.setClickEvent(i[n-3],i[n-2]),c.setTooltip(i[n-3],i[n]);break;case 124:this.$=i[n-2],c.setClickEvent(i[n-2],i[n-1],i[n]);break;case 125:this.$=i[n-4],c.setClickEvent(i[n-4],i[n-3],i[n-2]),c.setTooltip(i[n-4],i[n]);break;case 126:this.$=i[n-2],c.setLink(i[n-2],i[n]);break;case 127:this.$=i[n-4],c.setLink(i[n-4],i[n-2]),c.setTooltip(i[n-4],i[n]);break;case 128:this.$=i[n-4],c.setLink(i[n-4],i[n-2],i[n]);break;case 129:this.$=i[n-6],c.setLink(i[n-6],i[n-4],i[n]),c.setTooltip(i[n-6],i[n-2]);break;case 132:this.$=i[n-1],c.setLink(i[n-1],i[n]);break;case 133:this.$=i[n-3],c.setLink(i[n-3],i[n-2]),c.setTooltip(i[n-3],i[n]);break;case 134:this.$=i[n-3],c.setLink(i[n-3],i[n-2],i[n]);break;case 135:this.$=i[n-5],c.setLink(i[n-5],i[n-4],i[n]),c.setTooltip(i[n-5],i[n-2]);break;case 136:this.$=i[n-4],c.addVertex(i[n-2],void 0,void 0,i[n]);break;case 137:this.$=i[n-4],c.updateLink([i[n-2]],i[n]);break;case 138:this.$=i[n-4],c.updateLink(i[n-2],i[n]);break;case 139:this.$=i[n-8],c.updateLinkInterpolate([i[n-6]],i[n-2]),c.updateLink([i[n-6]],i[n]);break;case 140:this.$=i[n-8],c.updateLinkInterpolate(i[n-6],i[n-2]),c.updateLink(i[n-6],i[n]);break;case 141:this.$=i[n-6],c.updateLinkInterpolate([i[n-4]],i[n]);break;case 142:this.$=i[n-6],c.updateLinkInterpolate(i[n-4],i[n]);break;case 143:case 145:this.$=[i[n]];break;case 144:case 146:i[n-2].push(i[n]),this.$=i[n-2];break;case 148:this.$=i[n-1]+i[n];break;case 196:this.$=i[n];break;case 197:this.$=i[n-1]+""+i[n];break;case 199:this.$=i[n-1]+""+i[n];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:a,10:o,11:u,13:d},{1:[3]},t(h,l,{5:7}),{4:8,8:a,10:o,11:u,13:d},{4:9,8:a,10:o,11:u,13:d},{4:10,8:a,10:o,11:u,13:d},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:f,9:m,10:k,11:x,12:_,21:20,23:21,24:22,25:23,26:24,27:25,28:P,35:B,36:W,37:29,38:w,40:D,42:g,45:33,46:44,47:b,48:45,50:46,63:M,87:q,88:Ce,89:Ie,90:ve,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue,124:qe,125:Xe,126:Qe,127:Je,128:Ze},t(h,[2,10]),t(h,[2,11]),t(h,[2,12]),t(h,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:We,16:59,19:62},t(R,[2,3]),t(R,[2,4]),t(R,[2,5]),t(R,[2,6]),t(R,[2,7]),t(R,[2,8]),t(R,[2,9]),{8:ke,9:me,10:Ae,12:Ee,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:ke,9:me,10:Ae,12:Ee,22:75},{8:ke,9:me,10:Ae,12:Ee,22:76},{8:ke,9:me,10:Ae,12:Ee,22:77},{8:ke,9:me,10:Ae,12:Ee,22:78},{8:ke,9:me,10:Ae,12:Ee,22:79},{8:ke,9:me,10:Ae,11:[1,80],12:Ee,22:81},{8:ke,9:me,10:Ae,12:Ee,22:82},{11:[1,83]},t(R,[2,48]),{39:[1,84]},{41:[1,85]},t(R,[2,51]),t(rt,[2,63],{19:86,34:87,11:We,43:nt}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:at,47:ot,63:ut,83:[1,96],92:lt,98:[1,93],100:[1,94],104:95,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},t(R,[2,200]),t(R,[2,201]),t(R,[2,202]),t(R,[2,203]),t(R,[2,204]),t($e,[2,64]),t($e,[2,67],{49:[1,109]}),t(pe,[2,85],{116:122,30:[1,110],47:b,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:M,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:Q,105:J,108:Z,109:ee,112:te,114:re,117:ne,118:oe,119:ue}),t(xe,[2,196]),t(xe,[2,157]),t(xe,[2,158]),t(xe,[2,159]),t(xe,[2,160]),t(xe,[2,161]),t(xe,[2,162]),t(xe,[2,163]),t(xe,[2,164]),t(xe,[2,165]),t(xe,[2,166]),t(xe,[2,167]),t(h,[2,14]),t(h,[2,20]),t(h,[2,21]),{10:[1,123]},t(h,[2,23]),t(h1,[2,31],{19:124,11:We}),t(R,[2,32]),{45:125,46:44,47:b,48:45,50:46,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue},t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(kt,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:p1,84:f1,119:_t,122:vt},{78:[1,135],80:[1,136]},t(g1,[2,96]),t(R,[2,33]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{11:Ft,13:Vt,15:It,28:Lt,29:137,33:Bt,35:Mt,36:yt,47:wt,63:Nt,78:Rt,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:138,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},t(mt,l,{5:165}),t(mt,l,{5:166}),{11:Ft,13:Vt,15:It,28:Lt,29:167,33:Bt,35:Mt,36:yt,47:wt,63:Nt,78:Rt,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:138,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},t(R,[2,49]),t(R,[2,50]),t(rt,[2,61],{47:m1}),t(rt,[2,62],{19:169,11:We,43:At}),t($e,[2,57]),{47:b,50:171,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue},{105:[1,172],106:173,108:[1,174]},{47:b,50:175,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue},{47:b,50:176,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue},t(X,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},t(X,[2,130],{123:181,11:[1,180],15:at,47:ot,63:ut,92:lt,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),t(X,[2,132],{11:[1,182]}),t(Te,[2,198]),t(Te,[2,185]),t(Te,[2,186]),t(Te,[2,187]),t(Te,[2,188]),t(Te,[2,189]),t(Te,[2,190]),t(Te,[2,191]),t(Te,[2,192]),t(Te,[2,193]),t(Te,[2,194]),t(Te,[2,195]),{47:b,50:183,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue},{31:184,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:192,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:194,53:[1,193],70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:195,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:196,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:197,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{112:[1,198]},{31:199,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:200,68:[1,201],70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:202,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:203,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:204,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},t(xe,[2,197]),t(h,[2,22]),t(h1,[2,30]),t(rt,[2,59],{34:205,19:206,11:We,43:nt}),t(kt,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{80:[1,210],82:211,119:_t,122:vt},t(Et,[2,92]),t(Et,[2,94]),t(Et,[2,95]),t(Et,[2,183]),t(Et,[2,184]),{79:212,82:130,83:p1,84:f1,119:_t,122:vt},t(g1,[2,97]),{8:ke,9:me,10:Ae,11:Ft,12:Ee,13:Vt,15:It,22:214,28:Lt,30:[1,213],33:Bt,34:215,35:Mt,36:yt,43:nt,47:wt,63:Nt,78:Rt,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:216,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},t(K,[2,116]),t(K,[2,118]),t(K,[2,119]),t(K,[2,172]),t(K,[2,173]),t(K,[2,174]),t(K,[2,175]),t(K,[2,176]),t(K,[2,177]),t(K,[2,178]),t(K,[2,179]),t(K,[2,180]),t(K,[2,181]),t(K,[2,182]),t(K,[2,103]),t(K,[2,104]),t(K,[2,105]),t(K,[2,106]),t(K,[2,107]),t(K,[2,108]),t(K,[2,109]),t(K,[2,110]),t(K,[2,111]),t(K,[2,112]),t(K,[2,113]),t(K,[2,114]),t(K,[2,115]),{6:13,7:14,8:f,9:m,10:k,11:x,12:_,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,217],35:B,36:W,37:29,38:w,40:D,42:g,45:33,46:44,47:b,48:45,50:46,63:M,87:q,88:Ce,89:Ie,90:ve,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue,124:qe,125:Xe,126:Qe,127:Je,128:Ze},{6:13,7:14,8:f,9:m,10:k,11:x,12:_,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,218],35:B,36:W,37:29,38:w,40:D,42:g,45:33,46:44,47:b,48:45,50:46,63:M,87:q,88:Ce,89:Ie,90:ve,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue,124:qe,125:Xe,126:Qe,127:Je,128:Ze},{8:ke,9:me,10:Ae,11:Ft,12:Ee,13:Vt,15:It,22:220,28:Lt,30:[1,219],33:Bt,34:221,35:Mt,36:yt,43:nt,47:wt,63:Nt,78:Rt,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:216,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},{11:We,19:222},{47:[1,223]},t($e,[2,56]),{11:[1,224],47:b,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:122,117:ne,118:oe,119:ue},{11:[1,225]},{11:[1,226],109:[1,227]},t(A1,[2,143]),{11:[1,228],47:b,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:122,117:ne,118:oe,119:ue},{11:[1,229],47:b,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:122,117:ne,118:oe,119:ue},{83:[1,230]},t(X,[2,124],{11:[1,231]}),t(X,[2,126],{11:[1,232]}),{83:[1,233]},t(Te,[2,199]),{83:[1,234],101:[1,235]},t($e,[2,68],{116:122,47:b,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,117:ne,118:oe,119:ue}),{32:[1,236],70:G,85:237,119:U,120:j,121:z},t(Ke,[2,99]),t(Ke,[2,101]),t(Ke,[2,102]),t(Ke,[2,168]),t(Ke,[2,169]),t(Ke,[2,170]),t(Ke,[2,171]),{52:[1,238],70:G,85:237,119:U,120:j,121:z},{31:239,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{54:[1,240],70:G,85:237,119:U,120:j,121:z},{56:[1,241],70:G,85:237,119:U,120:j,121:z},{58:[1,242],70:G,85:237,119:U,120:j,121:z},{60:[1,243],70:G,85:237,119:U,120:j,121:z},{63:[1,244]},{67:[1,245],70:G,85:237,119:U,120:j,121:z},{69:[1,246],70:G,85:237,119:U,120:j,121:z},{31:247,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{32:[1,248],70:G,85:237,119:U,120:j,121:z},{70:G,72:[1,249],74:[1,250],85:237,119:U,120:j,121:z},{70:G,72:[1,252],74:[1,251],85:237,119:U,120:j,121:z},t(rt,[2,58],{19:169,11:We,43:At}),t(rt,[2,60],{47:m1}),t(kt,[2,88]),t(kt,[2,87]),{65:[1,253],70:G,85:237,119:U,120:j,121:z},t(kt,[2,90]),t(Et,[2,93]),{80:[1,254],82:211,119:_t,122:vt},{31:255,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},t(mt,l,{5:256}),{8:ke,9:me,10:Ae,12:Ee,22:257,43:At},t(K,[2,117]),t(R,[2,42]),t(R,[2,43]),{31:258,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},t(R,[2,46]),{8:ke,9:me,10:Ae,12:Ee,22:259,43:At},{46:260,47:b,48:45,50:46,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue},{11:We,19:261},{11:Me,63:we,87:Ne,95:262,108:Re,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{11:Me,63:we,87:Ne,95:273,107:[1,274],108:Re,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{11:Me,63:we,87:Ne,95:275,107:[1,276],108:Re,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{108:[1,277]},{11:Me,63:we,87:Ne,95:278,108:Re,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{47:b,50:279,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue},t(X,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},t(X,[2,131]),t(X,[2,133],{11:[1,283]}),t(X,[2,134]),t(pe,[2,69]),t(Ke,[2,100]),t(pe,[2,70]),{54:[1,284],70:G,85:237,119:U,120:j,121:z},t(pe,[2,77]),t(pe,[2,72]),t(pe,[2,73]),t(pe,[2,74]),{112:[1,285]},t(pe,[2,76]),t(pe,[2,78]),{69:[1,286],70:G,85:237,119:U,120:j,121:z},t(pe,[2,80]),t(pe,[2,81]),t(pe,[2,83]),t(pe,[2,82]),t(pe,[2,84]),t([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),t(kt,[2,91]),{32:[1,287],70:G,85:237,119:U,120:j,121:z},{6:13,7:14,8:f,9:m,10:k,11:x,12:_,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,288],35:B,36:W,37:29,38:w,40:D,42:g,45:33,46:44,47:b,48:45,50:46,63:M,87:q,88:Ce,89:Ie,90:ve,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue,124:qe,125:Xe,126:Qe,127:Je,128:Ze},t(mt,l,{5:289}),{32:[1,290],70:G,85:237,119:U,120:j,121:z},t(R,[2,47]),t($e,[2,66]),{46:291,47:b,48:45,50:46,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue},t(X,[2,136],{109:Ct}),t(E1,[2,145],{111:293,11:Me,63:we,87:Ne,108:Re,112:Oe,113:Pe,114:Ge,115:Ue}),t(Ve,[2,147]),t(Ve,[2,149]),t(Ve,[2,150]),t(Ve,[2,151]),t(Ve,[2,152]),t(Ve,[2,153]),t(Ve,[2,154]),t(Ve,[2,155]),t(Ve,[2,156]),t(X,[2,137],{109:Ct}),{11:[1,294]},t(X,[2,138],{109:Ct}),{11:[1,295]},t(A1,[2,144]),t(X,[2,120],{109:Ct}),t(X,[2,121],{116:122,47:b,63:M,92:Q,105:J,108:Z,109:ee,112:te,114:re,117:ne,118:oe,119:ue}),t(X,[2,125]),t(X,[2,127],{11:[1,296]}),t(X,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:ke,9:me,10:Ae,12:Ee,22:301,34:302,43:nt},t(R,[2,40]),{6:13,7:14,8:f,9:m,10:k,11:x,12:_,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,303],35:B,36:W,37:29,38:w,40:D,42:g,45:33,46:44,47:b,48:45,50:46,63:M,87:q,88:Ce,89:Ie,90:ve,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue,124:qe,125:Xe,126:Qe,127:Je,128:Ze},{8:ke,9:me,10:Ae,12:Ee,22:304,34:305,43:nt},t($e,[2,65]),{11:Me,63:we,87:Ne,108:Re,110:306,111:264,112:Oe,113:Pe,114:Ge,115:Ue},t(Ve,[2,148]),{15:at,47:ot,63:ut,92:lt,104:307,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},{15:at,47:ot,63:ut,92:lt,104:308,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},{101:[1,309]},t(X,[2,135]),t(pe,[2,71]),{31:310,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},t(pe,[2,79]),t(mt,l,{5:311}),{8:ke,9:me,10:Ae,12:Ee,22:312,43:At},t(R,[2,41]),t(R,[2,44]),{8:ke,9:me,10:Ae,12:Ee,22:313,43:At},t(E1,[2,146],{111:293,11:Me,63:we,87:Ne,108:Re,112:Oe,113:Pe,114:Ge,115:Ue}),t(X,[2,141],{123:181,11:[1,314],15:at,47:ot,63:ut,92:lt,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),t(X,[2,142],{123:181,11:[1,315],15:at,47:ot,63:ut,92:lt,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),t(X,[2,129]),{32:[1,316],70:G,85:237,119:U,120:j,121:z},{6:13,7:14,8:f,9:m,10:k,11:x,12:_,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,317],35:B,36:W,37:29,38:w,40:D,42:g,45:33,46:44,47:b,48:45,50:46,63:M,87:q,88:Ce,89:Ie,90:ve,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue,124:qe,125:Xe,126:Qe,127:Je,128:Ze},t(mt,l,{5:318}),t(R,[2,45]),{11:Me,63:we,87:Ne,95:319,108:Re,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{11:Me,63:we,87:Ne,95:320,108:Re,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},t(pe,[2,75]),t(R,[2,38]),{6:13,7:14,8:f,9:m,10:k,11:x,12:_,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,321],35:B,36:W,37:29,38:w,40:D,42:g,45:33,46:44,47:b,48:45,50:46,63:M,87:q,88:Ce,89:Ie,90:ve,91:Be,92:Q,105:J,108:Z,109:ee,112:te,114:re,116:47,117:ne,118:oe,119:ue,124:qe,125:Xe,126:Qe,127:Je,128:Ze},t(X,[2,139],{109:Ct}),t(X,[2,140],{109:Ct}),t(R,[2,39])],defaultActions:{},parseError:e(function(v,F){if(F.recoverable)this.trace(v);else{var V=Error(v);throw V.hash=F,V}},"parseError"),parse:e(function(v){var F=this,V=[0],c=[],H=[null],i=[],O=this.table,n="",Y=0,C1=0,S1=0,R1=2,x1=1,O1=i.slice.call(arguments,1),de=Object.create(this.lexer),st={yy:{}};for(var n1 in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,n1))st.yy[n1]=this.yy[n1];if(de.setInput(v,st.yy),st.yy.lexer=de,st.yy.parser=this,typeof de.yylloc>"u")de.yylloc={};var a1=de.yylloc;i.push(a1);var P1=de.options&&de.options.ranges;if(typeof st.yy.parseError==="function")this.parseError=st.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function G1(_e){V.length=V.length-2*_e,H.length=H.length-_e,i.length=i.length-_e}e(G1,"popStack");function T1(){var _e=c.pop()||de.lex()||x1;if(typeof _e!=="number"){if(_e instanceof Array)c=_e,_e=c.pop();_e=F.symbols_[_e]||_e}return _e}e(T1,"lex");var Se,o1,it,De,is,u1,St={},e1,ze,D1,t1;while(!0){if(it=V[V.length-1],this.defaultActions[it])De=this.defaultActions[it];else{if(Se===null||typeof Se>"u")Se=T1();De=O[it]&&O[it][Se]}if(typeof De>"u"||!De.length||!De[0]){var l1="";t1=[];for(e1 in O[it])if(this.terminals_[e1]&&e1>R1)t1.push("'"+this.terminals_[e1]+"'");if(de.showPosition)l1="Parse error on line "+(Y+1)+`:
23
- `+de.showPosition()+`
24
- Expecting `+t1.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'";else l1="Parse error on line "+(Y+1)+": Unexpected "+(Se==x1?"end of input":"'"+(this.terminals_[Se]||Se)+"'");this.parseError(l1,{text:de.match,token:this.terminals_[Se]||Se,line:de.yylineno,loc:a1,expected:t1})}if(De[0]instanceof Array&&De.length>1)throw Error("Parse Error: multiple actions possible at state: "+it+", token: "+Se);switch(De[0]){case 1:if(V.push(Se),H.push(de.yytext),i.push(de.yylloc),V.push(De[1]),Se=null,!o1){if(C1=de.yyleng,n=de.yytext,Y=de.yylineno,a1=de.yylloc,S1>0)S1--}else Se=o1,o1=null;break;case 2:if(ze=this.productions_[De[1]][1],St.$=H[H.length-ze],St._$={first_line:i[i.length-(ze||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(ze||1)].first_column,last_column:i[i.length-1].last_column},P1)St._$.range=[i[i.length-(ze||1)].range[0],i[i.length-1].range[1]];if(u1=this.performAction.apply(St,[n,C1,Y,st.yy,De[1],H,i].concat(O1)),typeof u1<"u")return u1;if(ze)V=V.slice(0,-1*ze*2),H=H.slice(0,-1*ze),i=i.slice(0,-1*ze);V.push(this.productions_[De[1]][0]),H.push(St.$),i.push(St._$),D1=O[V[V.length-2]][V[V.length-1]],V.push(D1);break;case 3:return!0}}return!0},"parse")},N1=function(){var He={EOF:1,parseError:e(function(F,V){if(this.yy.parser)this.yy.parser.parseError(F,V);else throw Error(F)},"parseError"),setInput:e(function(v,F){if(this.yy=F||this.yy||{},this._input=v,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];return this.offset=0,this},"setInput"),input:e(function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var F=v.match(/(?:\r\n?|\n).*/g);if(F)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),v},"input"),unput:e(function(v){var F=v.length,V=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-F),this.offset-=F;var c=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),V.length-1)this.yylineno-=V.length-1;var H=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:V?(V.length===c.length?this.yylloc.first_column:0)+c[c.length-V.length].length-V[0].length:this.yylloc.first_column-F},this.options.ranges)this.yylloc.range=[H[0],H[0]+this.yyleng-F];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(v){this.unput(this.match.slice(v))},"less"),pastInput:e(function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var v=this.match;if(v.length<20)v+=this._input.substr(0,20-v.length);return(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var v=this.pastInput(),F=Array(v.length+1).join("-");return v+this.upcomingInput()+`
26
- `+F+"^"},"showPosition"),test_match:e(function(v,F){var V,c,H;if(this.options.backtrack_lexer){if(H={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)H.yylloc.range=this.yylloc.range.slice(0)}if(c=v[0].match(/(?:\r\n?|\n).*/g),c)this.yylineno+=c.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(v[0].length),this.matched+=v[0],V=this.performAction.call(this,this.yy,this,F,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(V)return V;else if(this._backtrack){for(var i in H)this[i]=H[i];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var v,F,V,c;if(!this._more)this.yytext="",this.match="";var H=this._currentRules();for(var i=0;i<H.length;i++)if(V=this._input.match(this.rules[H[i]]),V&&(!F||V[0].length>F[0].length)){if(F=V,c=i,this.options.backtrack_lexer)if(v=this.test_match(V,H[i]),v!==!1)return v;else if(this._backtrack){F=!1;continue}else return!1;else if(!this.options.flex)break}if(F){if(v=this.test_match(F,H[c]),v!==!1)return v;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
27
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var F=this.next();if(F)return F;else return this.lex()},"lex"),begin:e(function(F){this.conditionStack.push(F)},"begin"),popState:e(function(){var F=this.conditionStack.length-1;if(F>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(F){if(F=this.conditionStack.length-1-Math.abs(F||0),F>=0)return this.conditionStack[F];else return"INITIAL"},"topState"),pushState:e(function(F){this.begin(F)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(F,V,c,H){var i=H;switch(c){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"),V.yytext="",43;break;case 8:return this.pushState("shapeDataStr"),43;break;case 9:return this.popState(),43;break;case 10:let O=/\n\s*/g;return V.yytext=V.yytext.replace(O,"<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:if(F.lex.firstGraph())this.begin("dir");return 13;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 He}();r1.lexer=N1;function $t(){this.yy={}}return e($t,"Parser"),$t.prototype=r1,r1.Parser=$t,new $t}();d1.parser=d1;var y1=d1,w1=Object.assign({},y1);w1.parse=(t)=>{let a=t.replace(/}[^\S\n]*\n/g,`}
28
- `);return y1.parse(a)};var Z1=w1,$1=e((t)=>{let{theme:a,bkgColorArray:o,borderColorArray:u}=t;if(!ae(a,u))return"";let d=ie(t.look),h=ce(o),l=Ye(t.THEME_COLOR_LIMIT,u),f=e((x)=>u[x%u.length],"border"),m=e((x)=>h?`fill: ${o[x%o.length]};`:"","fill"),k="";for(let x of K1){let _=i1.get(x),P=`[data-look="${d}"].node.${V1(x)}`;k+=`
29
-
30
- ${P} rect,
31
- ${P} path,
32
- ${P} polygon {
33
- stroke: ${f(_)};
34
- ${m(_)}
35
- }
36
- `}for(let x=0;x<I1(l);x++){let _=L1(x,l),P=`[data-look="${d}"][data-color-id="color-${_}"].cluster`,B=`[data-look="${d}"][data-color-id="color-${_}"].node`,W=e((w)=>`${P} ${w}, ${B} ${w}`,"rule");k+=`
37
-
38
- ${W("rect")},
39
- ${W("path")} {
40
- stroke: ${f(_)};
41
- ${m(_)}
42
- }
43
- `}return k},"genColor"),es=e((t,a)=>{let o=Ot,u=o(t,"r"),d=o(t,"g"),h=o(t,"b");return le(u,d,h,a)},"fade"),ts=e((t)=>`${$1(t)}
44
- .label {
45
- font-family: ${t.fontFamily};
46
- color: ${t.nodeTextColor||t.textColor};
47
- }
48
- .cluster-label text {
49
- fill: ${t.titleColor};
50
- }
51
- .cluster-label span {
52
- color: ${t.titleColor};
53
- }
54
- .cluster-label span p {
55
- background-color: transparent;
56
- }
57
-
58
- .label text,span {
59
- fill: ${t.nodeTextColor||t.textColor};
60
- color: ${t.nodeTextColor||t.textColor};
61
- }
62
-
63
- .node rect,
64
- .node circle,
65
- .node ellipse,
66
- .node polygon,
67
- .node path {
68
- fill: ${t.mainBkg};
69
- stroke: ${t.nodeBorder};
70
- stroke-width: ${t.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: ${t.nodeTextColor||t.textColor};
77
- stroke: ${t.nodeTextColor||t.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: ${t.lineColor} !important;
91
- stroke-width: 0;
92
- stroke: ${t.lineColor};
93
- }
94
-
95
- .arrowheadPath {
96
- fill: ${t.arrowheadColor};
97
- }
98
-
99
- .edgePaths .path {
100
- stroke: ${t.lineColor};
101
- stroke-width: ${t.strokeWidth??2}px;
102
- }
103
-
104
- .flowchart-link {
105
- stroke: ${t.lineColor};
106
- fill: none;
107
- }
108
-
109
- .edgeLabel {
110
- background-color: ${t.edgeLabelBackground};
111
- p {
112
- background-color: ${t.edgeLabelBackground};
113
- }
114
- rect {
115
- opacity: 0.5;
116
- background-color: ${t.edgeLabelBackground};
117
- fill: ${t.edgeLabelBackground};
118
- }
119
- text-align: center;
120
- }
121
-
122
- /* For html labels only */
123
- .labelBkg {
124
- background-color: ${es(t.edgeLabelBackground,0.5)};
125
- }
126
-
127
- .cluster rect {
128
- fill: ${t.clusterBkg};
129
- stroke: ${t.clusterBorder};
130
- stroke-width: 1px;
131
- }
132
-
133
- .flow-cluster rect {
134
- fill: none;
135
- stroke: ${t.clusterBorder};
136
- stroke-width: 0.75px;
137
- }
138
-
139
- .node .collapsed-indicator {
140
- fill: ${t.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: ${t.titleColor};
152
- }
153
-
154
- .cluster span {
155
- color: ${t.titleColor};
156
- }
157
- /* .cluster div {
158
- color: ${t.titleColor};
159
- } */
160
-
161
- div.mermaidTooltip {
162
- position: absolute;
163
- text-align: center;
164
- max-width: 200px;
165
- padding: 2px;
166
- font-family: ${t.fontFamily};
167
- font-size: 12px;
168
- background: ${t.tertiaryColor};
169
- border: 1px solid ${t.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: ${t.textColor};
179
- }
180
-
181
- rect.text {
182
- fill: none;
183
- stroke-width: 0;
184
- }
185
-
186
- .icon-shape, .image-shape {
187
- background-color: ${t.edgeLabelBackground};
188
- p {
189
- background-color: ${t.edgeLabelBackground};
190
- padding: 2px;
191
- }
192
- .label rect {
193
- opacity: 0.5;
194
- background-color: ${t.edgeLabelBackground};
195
- fill: ${t.edgeLabelBackground};
196
- }
197
- text-align: center;
198
- }
199
- ${je()}
200
- `,"getStyles"),ss=ts,vs={parser:Z1,get db(){return new q1},renderer:J1,styles:ss,init:e((t)=>{if(t.agentflow??={},t.layout)an({layout:t.layout});t.flowchart??={},t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,an({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")};export{vs as diagram};
@@ -1,30 +0,0 @@
1
- import{hn}from"./chunk-7ba8vrfc.js";import{W}from"./chunk-89fkdgbp.js";import{e,r,D,b,O,B,C,S,E,T,A,I,L,V,In,nt,U}from"./chunk-vymqrpm3.js";import{X}from"./chunk-n8gfjj9a.js";var P=/[─━│┃└┗├┣]/,F=/[└┗├┣]/,ee=/[─━]/,H=/^[\s│┃]+$/,z=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,G=/^\s*%%/,te=" ";function Z(i){return i.some((n)=>P.test(n))}e(Z,"isBoxDrawingFormat");function q(i){for(let n of i){let t=F.exec(n);if(t?.index&&t.index>0)return t.index}return 4}e(q,"inferSegmentWidth");function j(i,n){return i.replace(/\bline\s+(\d+)\b/gi,(t,o)=>{let c=parseInt(o,10),s=n.get(c);return s?`line ${s}`:t})}e(j,"remapErrorLines");function J(i){let n=i.split(`
2
- `),t=new Map,o=-1;for(let[g,d]of n.entries())if(d.trim()==="treeView-beta"){o=g;break}if(o===-1)return{text:i,lineMap:t};let c=[];for(let g=o+1;g<n.length;g++){let d=n[g];if(d.trim()===""||G.test(d)||z.test(d))continue;if(H.test(d))continue;c.push(d.replace(/\t/g," "))}if(!Z(c))return{text:i,lineMap:t};let s=q(c),a=[],l=0;for(let g=0;g<=o;g++)a.push(n[g]),l++,t.set(l,g+1);for(let g=o+1;g<n.length;g++){let d=n[g],p=d.trim(),f=g+1;if(p===""){a.push(d),l++,t.set(l,f);continue}if(G.test(d)){a.push(d),l++,t.set(l,f);continue}if(z.test(d)){a.push(d),l++,t.set(l,f);continue}if(H.test(d))continue;let h=d.replace(/\t/g," "),w=F.exec(h);if(w?.index!==void 0){let u=w.index,x=Math.round(u/s)+1,m=u+1;while(m<h.length&&ee.test(h[m]))m++;while(m<h.length&&h[m]===" ")m++;let y=h.slice(m).trimEnd();if(!y)throw Error(`Line ${f}: Empty node — expected a filename or directory name after the box-drawing prefix`);let Q=te.repeat(x);a.push(Q+y),l++,t.set(l,f)}else if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;else if(P.test(h))a.push(d),l++,t.set(l,f);else if(/^\s+/.test(h))throw Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);else a.push(d),l++,t.set(l,f)}return{text:a.join(`
3
- `),lineMap:t}}e(J,"preprocessBoxDrawing");var v=new hn(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),re=e(()=>{v.reset(),C()},"clear"),ne=e(()=>v.records.stack[0],"getRoot"),ie=e(()=>v.records.cnt,"getCount"),oe=D.treeView,se=e(()=>U(oe,b().treeView),"getConfig"),ae=e((i,n,t,o,c,s)=>{while(i<=v.records.stack[v.records.stack.length-1].level)v.records.stack.pop();let a={id:v.records.cnt++,level:i,name:n,nodeType:t,icon:c,cssClass:o,description:s,children:[]};v.records.stack[v.records.stack.length-1].children.push(a),v.records.stack.push(a)},"addNode"),ce={clear:re,addNode:ae,getRoot:ne,getCount:ie,getConfig:se,getAccTitle:E,getAccDescription:A,getDiagramTitle:L,setAccDescription:T,setAccTitle:S,setDiagramTitle:I},N=ce,le=e((i)=>{W(i,N);for(let n of i.nodes){let t=typeof n.indent==="number"?n.indent:0,o=n.name,c=o.endsWith("/");if(c)o=o.slice(0,-1);let s=c?"directory":"file",a=n.classAnnotation||void 0,l=n.iconAnnotation,g=l!==void 0?l||"none":void 0,d=n.descAnnotation||void 0,p=d?O(d,b()):void 0;N.addNode(t,o,s,a,g,p)}},"populate"),de={parse:e(async(i)=>{let{text:n,lineMap:t}=J(i);try{let o=await X("treeView",n);r.debug(o),le(o)}catch(o){if(t.size>0&&o instanceof Error)o.message=j(o.message,t);throw o}},"parse")},k={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function K(i,n){let t=n?.filenameIcons?.[i];if(t)return t;let o=i.lastIndexOf(".");if(o>0){let c=i.substring(o).toLowerCase(),s=n?.extensionIcons;return s?.[c]??s?.[c.slice(1)]}return}e(K,"detectIcon");function _(i,n){if(i.includes(":"))return i;if(i in k.icons||!n)return`${k.prefix}:${i}`;return`${n}:${i}`}e(_,"qualifyIcon");function R(i,n){if(i.icon==="none")return;if(i.icon)return _(i.icon,n.defaultIconPack);if(!n.showIcons)return;if(i.nodeType==="file"){let t=K(i.name,n);if(t==="none")return;if(t)return _(t,n.defaultIconPack)}return`${k.prefix}:${i.nodeType==="directory"?"folder":"file"}`}e(R,"getNodeIcon");In([{name:k.prefix,icons:k}]);var M=14,he=4,pe=16,fe=e(async(i,n)=>{let t=[],o=e((s)=>{let a=R(s,n);if(a)t.push({icon:a,node:s});s.children.forEach(o)},"collect");o(i);let c=await Promise.all(t.map(async({icon:s,node:a})=>({id:a.id,svg:await nt(s,{height:M,width:M})})));return new Map(c.map(({id:s,svg:a})=>[s,a]))},"resolveNodeIcons"),ge=e((i,n,t,o,c,s)=>{let a=o.append("g"),l="treeView-node-label";if(t.nodeType==="directory")l+=" treeView-node-dir";if(t.cssClass)l+=` ${t.cssClass}`;let g=M+he,d=R(t,c),p=d!==void 0;if(d)a.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${i+c.paddingX}, ${n+c.paddingY})`).html(s.get(t.id)??"");let f=a.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:h,width:w}=f.node().getBBox(),u=h+c.paddingY*2,x=i+c.paddingX+(p?g:0);f.attr("x",x),f.attr("y",n+u/2);let m=x+w,y=w+c.paddingX*2+(p?g:0);if(t.BBox={x:i,y:n,width:y,height:u},t.cssClass?.split(/\s+/).includes("highlight"))a.insert("rect",":first-child").attr("x",i).attr("y",n+1).attr("width",0).attr("height",u-2).attr("rx",3).attr("class","treeView-highlight-bg");return{node:t,nodeGroup:a,labelRightEdge:m,centerY:n+u/2}},"positionLabel"),Y=e((i,n,t,o,c,s)=>i.append("line").attr("x1",n).attr("y1",t).attr("x2",o).attr("y2",c).attr("stroke-width",s).attr("class","treeView-node-line"),"positionLine"),ue=e((i,n,t,o)=>{let c=0,s=0,a=[],l=e((p,f,h,w)=>{let u=w*(h.rowIndent+h.paddingX),x=ge(u,c,f,p,h,o);a.push(x);let{height:m,width:y}=f.BBox;Y(p,u-h.rowIndent,c+m/2,u,c+m/2,h.lineThickness),s=Math.max(s,u+y),c+=m},"drawNode"),g=e((p,f=0)=>{l(i,p,t,f),p.children.forEach((x)=>{g(x,f+1)});let{x:h,y:w,height:u}=p.BBox;if(p.children.length){let{y:x,height:m}=p.children[p.children.length-1].BBox;Y(i,h+t.paddingX,w+u,h+t.paddingX,x+m/2+t.lineThickness/2,t.lineThickness)}},"processNode");g(n);let d=a.filter((p)=>p.node.description);if(d.length>0){let f=Math.max(...a.map((h)=>h.labelRightEdge))+pe;for(let h of d){let u=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",h.centerY).node().getBBox();s=Math.max(s,f+u.width+t.paddingX)}}for(let p of a)if(p.node.cssClass?.split(/\s+/).includes("highlight")){let f=p.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let h=s-p.node.BBox.x+8;f.attr("width",h),s=Math.max(s,p.node.BBox.x+h+2)}}return{totalHeight:c,totalWidth:s}},"drawTree"),me=e(async(i,n,t,o)=>{r.debug(`Rendering treeView diagram
4
- `+i);let c=o.db,s=c.getRoot(),a=c.getConfig(),l=V(n),g=l.append("g");g.attr("class","tree-view");let d=await fe(s,a),{totalHeight:p,totalWidth:f}=ue(g,s,a,d);l.attr("viewBox",`-${a.lineThickness/2} 0 ${f} ${p}`),B(l,p,f,a.useMaxWidth)},"draw"),we={draw:me},xe=we,ve={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},be=e(({treeView:i})=>{let{labelFontSize:n,labelColor:t,lineColor:o,iconColor:c,descriptionColor:s,highlightBg:a,highlightStroke:l}=U(ve,i);return`
5
- .treeView-node-label {
6
- font-size: ${n};
7
- fill: ${t};
8
- white-space: pre;
9
- }
10
- .treeView-node-dir {
11
- font-weight: bold;
12
- }
13
- .treeView-node-line {
14
- stroke: ${o};
15
- }
16
- .treeView-node-icon {
17
- color: ${c};
18
- }
19
- .treeView-node-description {
20
- font-size: ${n};
21
- fill: ${s};
22
- font-style: italic;
23
- white-space: pre;
24
- }
25
- .treeView-highlight-bg {
26
- fill: ${a};
27
- stroke: ${l};
28
- stroke-width: 1;
29
- }
30
- `},"styles"),Ce=be,Ee={db:N,renderer:xe,parser:de,styles:Ce};export{Ee as diagram};