@bkm016/basalt 0.1.12 → 0.1.14

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 (288) hide show
  1. package/README.md +3 -2
  2. package/chunk-03wzwnn6.js +2 -0
  3. package/{chunk-7jezts2n.js → chunk-06s9pr82.js} +2 -2
  4. package/{chunk-eyrtbbdd.js → chunk-0crbhhna.js} +1 -1
  5. package/{chunk-kpe7pnhy.js → chunk-0rasqm8y.js} +4 -4
  6. package/chunk-1w4nh5t6.js +5 -0
  7. package/{chunk-02d3x4mj.js → chunk-2eaehpp6.js} +3 -3
  8. package/{chunk-jj4hqbrx.js → chunk-30dxcr91.js} +3 -3
  9. package/{chunk-nw1xpt3s.js → chunk-343jsm46.js} +2 -2
  10. package/{chunk-bk4rpnm8.js → chunk-37ndxehw.js} +2 -2
  11. package/chunk-38g4jd6v.js +5 -0
  12. package/{chunk-0fc9apfn.js → chunk-39mh7h58.js} +23 -23
  13. package/{chunk-6mges89p.js → chunk-44a7f5ta.js} +5 -5
  14. package/chunk-44b9yx79.js +2 -0
  15. package/{chunk-jn5pqy5v.js → chunk-46vy2m29.js} +1 -1
  16. package/{chunk-2kxnw7vs.js → chunk-4f6p4n7k.js} +2 -2
  17. package/chunk-4w8j6n7z.js +2 -0
  18. package/{chunk-qs8zzg50.js → chunk-4yxd2kg1.js} +2 -2
  19. package/{chunk-ksk49hv0.js → chunk-59hg9a84.js} +1 -1
  20. package/chunk-62ebm0bn.js +2 -0
  21. package/chunk-6ef085c1.js +20 -0
  22. package/chunk-6hx9y86d.js +3 -0
  23. package/chunk-73t051r6.js +2 -0
  24. package/{chunk-1h34mzh7.js → chunk-7mgkpn94.js} +7 -7
  25. package/{chunk-w0rr66z7.js → chunk-81x8r8w4.js} +1 -1
  26. package/chunk-86yr2c0r.js +3 -0
  27. package/{chunk-ypqjfv3a.js → chunk-8np9b2y8.js} +2 -2
  28. package/{chunk-hbnmymaq.js → chunk-9ew8cap5.js} +2 -2
  29. package/chunk-9v3b7jjv.js +2 -0
  30. package/{chunk-01nve4qy.js → chunk-9vam83py.js} +1 -1
  31. package/chunk-9xjecw6c.js +2 -0
  32. package/{chunk-6sz5q3df.js → chunk-b2wpj81x.js} +2 -2
  33. package/chunk-b516bp7n.js +3 -0
  34. package/chunk-bjvv3403.js +2 -0
  35. package/{chunk-hc300148.js → chunk-c8g9jjqs.js} +2 -2
  36. package/chunk-cs91rmbf.js +18 -0
  37. package/chunk-drett6hb.js +2 -0
  38. package/{chunk-fy82qxa1.js → chunk-edcf97ka.js} +1 -1
  39. package/chunk-en7z6ne5.js +3 -0
  40. package/{chunk-p2pmdbt2.js → chunk-evnqkyt7.js} +12 -12
  41. package/{chunk-8mezk0cb.js → chunk-g2etemv5.js} +2 -2
  42. package/{chunk-n0ybj4h9.js → chunk-g5p9mj1r.js} +2 -2
  43. package/{chunk-eq4wqxzt.js → chunk-ge38dhv9.js} +2 -2
  44. package/chunk-hggam3je.js +2 -0
  45. package/chunk-k38jaz6c.js +7 -0
  46. package/{chunk-qfcr5g35.js → chunk-kcn05erf.js} +3 -3
  47. package/{chunk-rwks9zaw.js → chunk-m5km74eq.js} +2 -2
  48. package/{chunk-jpnf71q7.js → chunk-mfb3dgs8.js} +2 -2
  49. package/{chunk-vjne04dp.js → chunk-mh4bjtfs.js} +4 -4
  50. package/chunk-nysatg77.js +4161 -0
  51. package/chunk-p886jr17.js +25 -0
  52. package/{chunk-82v8jh1h.js → chunk-pdt65s31.js} +2 -2
  53. package/chunk-pjgt1bdx.js +3 -0
  54. package/{chunk-tvm4zmgj.js → chunk-pyj6avd5.js} +2 -2
  55. package/chunk-qd2enpr2.js +3 -0
  56. package/{chunk-cbgpymt4.js → chunk-qe76naq9.js} +1 -1
  57. package/{chunk-ntks40jd.js → chunk-qjnx4fsn.js} +5 -5
  58. package/{chunk-fhxy6y34.js → chunk-qs161f2q.js} +2 -2
  59. package/{chunk-v7wcchy2.js → chunk-rghqprav.js} +1 -1
  60. package/chunk-t33bm5aa.js +2 -0
  61. package/{chunk-nrsd810j.js → chunk-tfhp09nj.js} +2 -2
  62. package/chunk-vd5332ps.js +2 -0
  63. package/{chunk-3pf1d62g.js → chunk-vqm94hz2.js} +2 -2
  64. package/{chunk-85v69h91.js → chunk-w55cnj0f.js} +2 -2
  65. package/{chunk-1zj3zvw5.js → chunk-wnd3y4c0.js} +4 -4
  66. package/{chunk-stj493dn.js → chunk-xafx1p7z.js} +2 -2
  67. package/{chunk-9as0p561.js → chunk-xf7zw32f.js} +14 -14
  68. package/chunk-xk3t5ves.js +482 -0
  69. package/{chunk-5wnmbc1b.js → chunk-xq74x4gc.js} +2 -2
  70. package/chunk-y0274xr2.js +7 -0
  71. package/{chunk-ejjem0tc.js → chunk-z9p6s986.js} +6 -6
  72. package/chunk-zcwz44db.js +2 -0
  73. package/{chunk-w6f2r052.js → chunk-zhyzhekt.js} +1 -1
  74. package/compiled.js +85 -12
  75. package/package.json +1 -1
  76. package/ui-test-worker.js +65 -65
  77. package/web/chunk-15g9pnzy.js +1 -0
  78. package/web/{chunk-4f6a8dsk.js → chunk-17wwzrp4.js} +1 -1
  79. package/web/chunk-19tkjg9w.js +1 -0
  80. package/web/chunk-1y387f45.js +1 -0
  81. package/web/{chunk-30aeb767.js → chunk-25sn840r.js} +2 -2
  82. package/web/chunk-26sp6jre.js +1 -0
  83. package/web/{chunk-81s15c2e.js → chunk-2c7kxr4v.js} +2 -2
  84. package/web/{chunk-wvrs986a.js → chunk-2gsf89vs.js} +3 -3
  85. package/web/{chunk-3qxxrwsp.js → chunk-2gvz70wr.js} +10 -10
  86. package/web/chunk-2s3my1jn.js +1 -0
  87. package/web/{chunk-ar6jnhm5.js → chunk-32dh0hft.js} +1 -1
  88. package/web/{chunk-3rkkp6ed.js → chunk-3haw3wcw.js} +5 -5
  89. package/web/{chunk-hn8m1vsg.js → chunk-3rxhs9qm.js} +7 -7
  90. package/web/chunk-410qdvmv.js +1 -0
  91. package/web/chunk-4qehf2xx.js +2 -0
  92. package/web/{chunk-qdd3bx8q.js → chunk-51b8n5e1.js} +1 -1
  93. package/web/chunk-54mgncq3.js +1 -0
  94. package/web/{chunk-r6kk4vp1.js → chunk-59g6rrew.js} +4 -4
  95. package/web/{chunk-7tkgbbf9.js → chunk-5d9veaef.js} +2 -2
  96. package/web/chunk-6481wt3t.js +1 -0
  97. package/web/chunk-6ehecat3.js +1 -0
  98. package/web/chunk-6m8hq6ph.js +1 -0
  99. package/web/chunk-73941p08.js +1 -0
  100. package/web/{chunk-aeymdtm1.js → chunk-783s8jds.js} +3 -3
  101. package/web/{chunk-g4zm0crw.js → chunk-78m018ya.js} +1 -1
  102. package/web/chunk-797bh7z6.js +39 -0
  103. package/web/{chunk-hva7xyne.js → chunk-7hpqrfgg.js} +2 -2
  104. package/web/{chunk-enwfd8d5.js → chunk-7kywe73f.js} +2 -2
  105. package/web/chunk-7qq1ypvj.js +1 -0
  106. package/web/{chunk-xbyrgyy0.js → chunk-7wzszsf5.js} +2 -2
  107. package/web/{chunk-aa46mrgh.js → chunk-7zfqppsx.js} +2 -2
  108. package/web/{chunk-d73zkc4q.js → chunk-8sr9w61v.js} +3 -3
  109. package/web/{chunk-v34mr9ky.js → chunk-8ttp8fh3.js} +6 -6
  110. package/web/chunk-8zg89764.js +1 -0
  111. package/web/{chunk-2cyzaqjy.js → chunk-988e9wx6.js} +3 -3
  112. package/web/{chunk-k4dnjf8n.js → chunk-9h0f3gar.js} +3 -3
  113. package/web/chunk-9vr6hpmk.js +34 -0
  114. package/web/chunk-9vrp249f.js +2 -0
  115. package/web/{chunk-td83xf12.js → chunk-a205cj09.js} +2 -2
  116. package/web/{chunk-gkmaryr4.js → chunk-ahn2frbt.js} +1 -1
  117. package/web/{chunk-5g8md2wg.js → chunk-aknsydan.js} +5 -5
  118. package/web/chunk-at0xtfhy.js +1 -0
  119. package/web/chunk-bahccwb9.js +1 -0
  120. package/web/{chunk-rdr6wt22.js → chunk-c7fqrs8j.js} +4 -4
  121. package/web/chunk-d3hyf9yd.js +1 -0
  122. package/web/chunk-dcegr80c.js +1 -0
  123. package/web/{chunk-act3rr85.js → chunk-dwtatme7.js} +1 -1
  124. package/web/{chunk-5np514v5.js → chunk-ex8rmqn1.js} +12 -12
  125. package/web/{chunk-g488hxx0.js → chunk-faskbfjf.js} +3 -3
  126. package/web/chunk-feanedhx.js +1 -0
  127. package/web/{chunk-e94pd9rr.js → chunk-ffywf5w5.js} +10 -10
  128. package/web/chunk-fx3d48e6.js +1 -0
  129. package/web/{chunk-ncfzmf2g.js → chunk-g3szt4c4.js} +1 -1
  130. package/web/chunk-g7bcntpm.js +1 -0
  131. package/web/chunk-gr1tjqbd.js +1 -0
  132. package/web/{chunk-bygwbpvq.js → chunk-hbwxtbq3.js} +2 -2
  133. package/web/{chunk-gten0rpx.js → chunk-hdtvrh0f.js} +2 -2
  134. package/web/chunk-j031r08w.js +1 -0
  135. package/web/{chunk-d57fm7k0.js → chunk-j6wcszxq.js} +2 -2
  136. package/web/{chunk-885kpj14.js → chunk-jdx7qp2w.js} +2 -2
  137. package/web/chunk-jge7nn3s.js +1 -0
  138. package/web/chunk-jy8zat04.js +1 -0
  139. package/web/{chunk-7vgh17es.js → chunk-jzge034r.js} +1 -1
  140. package/web/{chunk-fj753yzt.js → chunk-k4qrqmdk.js} +2 -2
  141. package/web/chunk-k8s7kye3.js +1 -0
  142. package/web/{chunk-2jfesv7m.js → chunk-k9fyqrhp.js} +2 -2
  143. package/web/chunk-k9zn1n6d.js +1 -0
  144. package/web/chunk-kg3tksv7.js +1 -0
  145. package/web/chunk-kk5rw81s.js +2 -0
  146. package/web/{chunk-xpecre7w.js → chunk-kpmd893m.js} +4 -4
  147. package/web/chunk-md9j949p.js +1 -0
  148. package/web/{chunk-jeafmjsm.js → chunk-mn2wv9ye.js} +6 -6
  149. package/web/{chunk-dndd757x.js → chunk-mv7jgmnb.js} +3 -3
  150. package/web/{chunk-c3fty2c2.js → chunk-mvm68qtt.js} +7 -7
  151. package/web/chunk-nbcpbqq4.js +1 -0
  152. package/web/{chunk-b99k8q22.js → chunk-nfpff7yf.js} +8 -8
  153. package/web/chunk-nk7jkpam.js +1 -0
  154. package/web/chunk-nmvt1rn3.js +1 -0
  155. package/web/chunk-npw1s1h2.js +1 -0
  156. package/web/chunk-npyrdsf8.css +1 -0
  157. package/web/chunk-nzzxv84v.js +8 -0
  158. package/web/{chunk-n9v14vyd.js → chunk-p4pqtybm.js} +22 -22
  159. package/web/{chunk-jyf7a7yp.js → chunk-p79c7aak.js} +1 -1
  160. package/web/{chunk-6jb2zyp6.js → chunk-pafw34vg.js} +2 -2
  161. package/web/{chunk-y2rzeb4v.js → chunk-pf65cank.js} +2 -2
  162. package/web/{chunk-d1btrqmw.js → chunk-ppa21760.js} +1 -1
  163. package/web/{chunk-60mym60n.js → chunk-ptpkv0te.js} +1 -1
  164. package/web/{chunk-yjs6jmdb.js → chunk-qcdej581.js} +3 -3
  165. package/web/{chunk-q1zxvjhs.js → chunk-qftcdcps.js} +2 -2
  166. package/web/{chunk-4wwd3pfz.js → chunk-qv1w36ja.js} +2 -2
  167. package/web/chunk-r8p741qj.js +2 -0
  168. package/web/chunk-rcexbkjj.js +1 -0
  169. package/web/{chunk-kerfb21g.js → chunk-rjakb64x.js} +1 -1
  170. package/web/{chunk-k0cg4n2k.js → chunk-s0xy00v5.js} +2 -2
  171. package/web/{chunk-ym7kv2hs.js → chunk-s2ps0ct5.js} +1 -1
  172. package/web/{chunk-h24ybwp6.js → chunk-s45g7fp6.js} +1 -1
  173. package/web/{chunk-pjpre6de.js → chunk-s70aj1v5.js} +6 -6
  174. package/web/chunk-say8bvkc.js +1 -0
  175. package/web/{chunk-qh62nkem.js → chunk-sd3cdqcm.js} +2 -2
  176. package/web/{chunk-6f2sz84q.js → chunk-sgkevxdf.js} +2 -2
  177. package/web/chunk-sjffrcq9.js +1 -0
  178. package/web/{chunk-19zd0tye.js → chunk-snaepr87.js} +8 -8
  179. package/web/{chunk-3n9ypydh.js → chunk-tdzh6nsz.js} +2 -2
  180. package/web/{chunk-wqzbxzk3.js → chunk-tjd8qp87.js} +1 -1
  181. package/web/chunk-tncc9e57.js +1 -0
  182. package/web/chunk-ty2rmwda.js +1142 -0
  183. package/web/chunk-v22hp18w.js +1 -0
  184. package/web/chunk-ve9dz857.js +2 -0
  185. package/web/{chunk-80z8s8zb.js → chunk-vg346gxc.js} +2 -2
  186. package/web/{chunk-hqxc9m07.js → chunk-vpegzgzb.js} +10 -10
  187. package/web/{chunk-pzg25qqe.js → chunk-vvvd3grf.js} +2 -2
  188. package/web/{chunk-qp3tjhaq.js → chunk-vwv6pqy7.js} +1 -1
  189. package/web/{chunk-3psgr0q8.js → chunk-vxm7n7w6.js} +20 -20
  190. package/web/{chunk-h754ntg7.js → chunk-w5q7978e.js} +1 -1
  191. package/web/{chunk-xvfeq8v2.js → chunk-we4mhfmq.js} +12 -12
  192. package/web/{chunk-8539865x.js → chunk-wfgrdabk.js} +1 -1
  193. package/web/{chunk-sdr5wa4z.js → chunk-wkhj4hsw.js} +4 -4
  194. package/web/{chunk-7ksg3ccg.js → chunk-wspk8qbg.js} +2 -2
  195. package/web/{chunk-hxbfkdjd.js → chunk-xf1hnpme.js} +1 -1
  196. package/web/{chunk-v1hfbjz9.js → chunk-xhqvzmfj.js} +5 -5
  197. package/web/chunk-xq70hgre.js +1 -0
  198. package/web/chunk-xtss82z2.js +1 -0
  199. package/web/{chunk-yf8ykk4v.js → chunk-y3tb6410.js} +3 -3
  200. package/web/{chunk-7v85yvb2.js → chunk-y6mcxfm0.js} +1 -1
  201. package/web/{chunk-7adsmqv6.js → chunk-ya696bfe.js} +2 -2
  202. package/web/{chunk-w9gnqkez.js → chunk-ysw5fs45.js} +3 -3
  203. package/web/chunk-zkq1xknc.js +1 -0
  204. package/web/chunk-zkv025s5.js +1 -0
  205. package/web/{chunk-8cnjd0f2.js → chunk-zpzvz973.js} +28 -28
  206. package/web/{chunk-b5zf1hs3.js → chunk-zsat72qd.js} +120 -120
  207. package/web/chunk-zx3h7v72.js +1 -0
  208. package/web/index.html +1 -1
  209. package/worker.js +1 -1
  210. package/chunk-1xfv4bd7.js +0 -2
  211. package/chunk-2fyjph3f.js +0 -2
  212. package/chunk-37zystxb.js +0 -25
  213. package/chunk-3k627vf2.js +0 -3
  214. package/chunk-4gtgqcct.js +0 -5
  215. package/chunk-7er5pz7s.js +0 -479
  216. package/chunk-7g5smgjj.js +0 -2
  217. package/chunk-7m3jagqn.js +0 -2
  218. package/chunk-9c4gdg1q.js +0 -3
  219. package/chunk-b2bxqeb4.js +0 -2
  220. package/chunk-bpw6q7g0.js +0 -3
  221. package/chunk-bwawt15q.js +0 -3
  222. package/chunk-cdw03j4t.js +0 -20
  223. package/chunk-ch1r3ted.js +0 -2
  224. package/chunk-cmwdjes8.js +0 -18
  225. package/chunk-db7ws33a.js +0 -7
  226. package/chunk-e1x629v0.js +0 -5
  227. package/chunk-j64dc767.js +0 -3
  228. package/chunk-m4bg1apa.js +0 -7
  229. package/chunk-nhm9z3d8.js +0 -2
  230. package/chunk-pnspvnyd.js +0 -2
  231. package/chunk-qnkrrwmg.js +0 -2
  232. package/chunk-r4gm8ngh.js +0 -2
  233. package/chunk-rks90mh1.js +0 -2
  234. package/chunk-t7te60m7.js +0 -2
  235. package/chunk-tv52xajf.js +0 -2
  236. package/chunk-wqqjzsjt.js +0 -3983
  237. package/chunk-xef4642x.js +0 -3
  238. package/web/chunk-04drx71p.js +0 -1
  239. package/web/chunk-0mdf1qja.js +0 -1
  240. package/web/chunk-0rdgt4jb.css +0 -1
  241. package/web/chunk-1m0kp0g3.js +0 -8
  242. package/web/chunk-3j2tcphs.js +0 -1
  243. package/web/chunk-3k9h7a73.js +0 -1142
  244. package/web/chunk-3m1bb2fw.js +0 -1
  245. package/web/chunk-55nvm2mj.js +0 -1
  246. package/web/chunk-5dkqfnh7.js +0 -2
  247. package/web/chunk-7ky5nrrr.js +0 -1
  248. package/web/chunk-8sdjgv3k.js +0 -1
  249. package/web/chunk-9bxtzwtc.js +0 -1
  250. package/web/chunk-9jy8nc4r.js +0 -1
  251. package/web/chunk-aebrw6cv.js +0 -39
  252. package/web/chunk-bcjgzwef.js +0 -1
  253. package/web/chunk-bra33pt0.js +0 -2
  254. package/web/chunk-cxpnj495.js +0 -2
  255. package/web/chunk-d94t9z70.js +0 -1
  256. package/web/chunk-de29pe57.js +0 -1
  257. package/web/chunk-e68jw0bg.js +0 -1
  258. package/web/chunk-fr4fft89.js +0 -1
  259. package/web/chunk-gckmcef6.js +0 -1
  260. package/web/chunk-gnb09wmx.js +0 -1
  261. package/web/chunk-gx340asc.js +0 -1
  262. package/web/chunk-hrgqc1vr.js +0 -1
  263. package/web/chunk-j9c8fa82.js +0 -1
  264. package/web/chunk-jz5mmp64.js +0 -1
  265. package/web/chunk-kxeaj44h.js +0 -1
  266. package/web/chunk-m0136xav.js +0 -1
  267. package/web/chunk-m1rdyvb5.js +0 -1
  268. package/web/chunk-m6vyvgm5.js +0 -1
  269. package/web/chunk-mxkbmgcv.js +0 -2
  270. package/web/chunk-my0ec787.js +0 -1
  271. package/web/chunk-mzzaet63.js +0 -1
  272. package/web/chunk-nkpdd9hw.js +0 -1
  273. package/web/chunk-ny436sqg.js +0 -1
  274. package/web/chunk-pbp1p5ex.js +0 -1
  275. package/web/chunk-ph75hddv.js +0 -1
  276. package/web/chunk-phdfyqaa.js +0 -1
  277. package/web/chunk-phxa5krt.js +0 -1
  278. package/web/chunk-r4zbw4zj.js +0 -2
  279. package/web/chunk-ry4ycah9.js +0 -1
  280. package/web/chunk-sqm16fat.js +0 -1
  281. package/web/chunk-tj1fn8v2.js +0 -1
  282. package/web/chunk-v0wtk059.js +0 -34
  283. package/web/chunk-v1qt3gq4.js +0 -1
  284. package/web/chunk-v854w9yn.js +0 -1
  285. package/web/chunk-ve56gxq0.js +0 -1
  286. package/web/chunk-w573ym17.js +0 -1
  287. package/web/chunk-x0mjydtp.js +0 -1
  288. package/web/chunk-zhybh04p.js +0 -1
@@ -1,15 +1,15 @@
1
- import{t,a,de,x,b,F,C,l,p,Ba,In,cn,Fa,Er,Ar,Rr,Lr,za,Ua,ja,qa,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,Qa,Ja,ei,ti,ni,un,ai,pe,se,le,Ze,Xe,Tt,vt,Et,Yn,en,Zn}from"./chunk-b5zf1hs3.js";import{re}from"./chunk-3n9ypydh.js";import{qe}from"./chunk-h754ntg7.js";import{Bt}from"./chunk-r4zbw4zj.js";function Te(e){return Array.isArray(e)}function Ne(e){if(In(e))return e;let o=cn(e);if(!Qe(e))return{};if(Te(e)){let i=Array.from(e);if(e.length>0&&typeof e[0]==="string"&&Object.hasOwn(e,"index"))i.index=e.index,i.input=e.input;return i}if(un(e)){let i=e;return new i.constructor(i.buffer,i.byteOffset,i.length)}if(o==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(o==="[object DataView]"){let i=e,{buffer:g,byteOffset:f,byteLength:r}=i,d=new ArrayBuffer(r),w=new Uint8Array(g,f,r);return new Uint8Array(d).set(w),new DataView(d)}if(o==="[object Boolean]"||o==="[object Number]"||o==="[object String]"){let g=new e.constructor(e.valueOf());if(o==="[object String]")et(g,e);else ge(g,e);return g}if(o==="[object Date]")return new Date(Number(e));if(o==="[object RegExp]"){let i=e,g=new RegExp(i.source,i.flags);return g.lastIndex=i.lastIndex,g}if(o==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(o==="[object Map]"){let i=e,g=new Map;return i.forEach((f,r)=>{g.set(r,f)}),g}if(o==="[object Set]"){let i=e,g=new Set;return i.forEach((f)=>{g.add(f)}),g}if(o==="[object Arguments]"){let i=e,g={};return ge(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}let u={};return tt(u,e),ge(u,e),$e(u,e),u}function Qe(e){switch(cn(e)){case Lr:case Va:case Wa:case Ha:case Rr:case Ua:case ti:case ni:case Qa:case Ja:case ei:case ja:case Ar:case Ga:case Fa:case qa:case Er:case za:case Ya:case Za:case Xa:case Ka:return!0;default:return!1}}function ge(e,o){for(let u in o)if(Object.hasOwn(o,u))e[u]=o[u]}function $e(e,o){let u=Object.getOwnPropertySymbols(o);for(let i=0;i<u.length;i++){let g=u[i];if(Object.prototype.propertyIsEnumerable.call(o,g))e[g]=o[g]}}function et(e,o){let u=o.valueOf().length;for(let i in o)if(Object.hasOwn(o,i)&&(Number.isNaN(Number(i))||Number(i)>=u))e[i]=o[i]}function tt(e,o){let u=Object.getPrototypeOf(o);if(u!==null){if(typeof o.constructor==="function")Object.setPrototypeOf(e,u)}}var be=function(){var e=t(function(B,S,n,h){for(n=n||{},h=B.length;h--;n[B[h]]=S);return n},"o"),o=[1,15],u=[1,7],i=[1,13],g=[1,14],f=[1,19],r=[1,16],d=[1,17],w=[1,18],E=[8,30],k=[8,10,21,28,29,30,31,39,43,46],L=[1,23],_=[1,24],T=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],I=[1,49],N={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:t(function(S,n,h,m,D,s,H){var c=s.length-1;switch(D){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",s[c-1]),m.setHierarchy(s[c-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",s[c]),typeof s[c].length==="number"?this.$=s[c]:this.$=[s[c]];break;case 13:m.getLogger().debug("Rule: statement #2: ",s[c-1]),this.$=[s[c-1]].concat(s[c]);break;case 14:m.getLogger().debug("Rule: link: ",s[c],S),this.$={edgeTypeStr:s[c],label:""};break;case 15:m.getLogger().debug("Rule: LABEL link: ",s[c-3],s[c-1],s[c]),this.$={edgeTypeStr:s[c],label:s[c-1]};break;case 18:let V=parseInt(s[c]),j=m.generateId();this.$={id:j,type:"space",label:"",width:V,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",s[c-2],s[c-1],s[c]," typestr: ",s[c-1].edgeTypeStr);let G=m.edgeStrToEdgeData(s[c-1].edgeTypeStr),ie=m.edgeStrToEdgeStartData(s[c-1].edgeTypeStr),q=m.edgeStrToThickness(s[c-1].edgeTypeStr),ae=m.edgeStrToPattern(s[c-1].edgeTypeStr);this.$=[{id:s[c-2].id,label:s[c-2].label,type:s[c-2].type,directions:s[c-2].directions},{id:s[c-2].id+"-"+s[c].id,start:s[c-2].id,end:s[c].id,label:s[c-1].label,type:"edge",thickness:q,pattern:ae,directions:s[c].directions,arrowTypeEnd:G,arrowTypeStart:ie},{id:s[c].id,label:s[c].label,type:m.typeStr2Type(s[c].typeStr),directions:s[c].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[c-1],s[c]),this.$={id:s[c-1].id,label:s[c-1].label,type:m.typeStr2Type(s[c-1].typeStr),directions:s[c-1].directions,widthInColumns:parseInt(s[c],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",s[c]),this.$={id:s[c].id,label:s[c].label,type:m.typeStr2Type(s[c].typeStr),directions:s[c].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",s[c]),this.$={type:"column-setting",columns:s[c]==="auto"?-1:parseInt(s[c])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",s[c-2],s[c-1]);let O=m.generateId();this.$={...s[c-2],type:"composite",children:s[c-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",s[c-2],s[c-1],s[c]);let K=m.generateId();this.$={id:K,type:"composite",label:"",children:s[c-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",s[c]),this.$={id:s[c]};break;case 30:m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[c-1],s[c]),this.$={id:s[c-1],label:s[c].label,typeStr:s[c].typeStr,directions:s[c].directions};break;case 31:m.getLogger().debug("Rule: dirList: ",s[c]),this.$=[s[c]];break;case 32:m.getLogger().debug("Rule: dirList: ",s[c-1],s[c]),this.$=[s[c-1]].concat(s[c]);break;case 33:m.getLogger().debug("Rule: nodeShapeNLabel: ",s[c-2],s[c-1],s[c]),this.$={typeStr:s[c-2]+s[c],label:s[c-1]};break;case 34:m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[c-3],s[c-2]," #3:",s[c-1],s[c]),this.$={typeStr:s[c-3]+s[c],label:s[c-2],directions:s[c-1]};break;case 35:case 36:this.$={type:"classDef",id:s[c-1].trim(),css:s[c].trim()};break;case 37:this.$={type:"applyClass",id:s[c-1].trim(),styleClass:s[c].trim()};break;case 38:this.$={type:"applyStyles",id:s[c-1].trim(),stylesStr:s[c].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:o,11:3,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:w},{8:[1,20]},e(E,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:o,21:u,28:i,29:g,31:f,39:r,43:d,46:w}),e(k,[2,16],{14:22,15:L,16:_}),e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),e(k,[2,21]),e(k,[2,22]),e(T,[2,25],{27:[1,25]}),e(k,[2,26]),{19:26,26:12,31:f},{10:o,11:27,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:w},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(E,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},e(T,[2,24]),{10:o,11:37,13:4,14:22,15:L,16:_,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:w},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(T,[2,23]),{18:[1,45]},{30:[1,46]},e(k,[2,28]),e(k,[2,35]),e(k,[2,36]),e(k,[2,37]),e(k,[2,38]),{36:[1,47]},{33:48,34:I},{15:[1,50]},e(k,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:I,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:t(function(S,n){if(n.recoverable)this.trace(S);else{var h=Error(S);throw h.hash=n,h}},"parseError"),parse:t(function(S){var n=this,h=[0],m=[],D=[null],s=[],H=this.table,c="",V=0,j=0,G=0,ie=2,q=1,ae=s.slice.call(arguments,1),O=Object.create(this.lexer),K={yy:{}};for(var ne in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ne))K.yy[ne]=this.yy[ne];if(O.setInput(S,K.yy),K.yy.lexer=O,K.yy.parser=this,typeof O.yylloc>"u")O.yylloc={};var oe=O.yylloc;s.push(oe);var Ge=O.options&&O.options.ranges;if(typeof K.yy.parseError==="function")this.parseError=K.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Je(P){h.length=h.length-2*P,D.length=D.length-P,s.length=s.length-P}t(Je,"popStack");function _e(){var P=m.pop()||O.lex()||q;if(typeof P!=="number"){if(P instanceof Array)m=P,P=m.pop();P=n.symbols_[P]||P}return P}t(_e,"lex");var A,ce,W,R,At,ue,U={},J,Y,De,Z;while(!0){if(W=h[h.length-1],this.defaultActions[W])R=this.defaultActions[W];else{if(A===null||typeof A>"u")A=_e();R=H[W]&&H[W][A]}if(typeof R>"u"||!R.length||!R[0]){var he="";Z=[];for(J in H[W])if(this.terminals_[J]&&J>ie)Z.push("'"+this.terminals_[J]+"'");if(O.showPosition)he="Parse error on line "+(V+1)+`:
1
+ import{t,a,de,x,b,F,C,l,p,ja,Nn,un,qa,Lr,Ir,Dr,Nr,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,Qa,Ja,ei,ti,ni,ri,ai,ii,oi,dn,li,pe,le,ce,Ze,Xe,Et,bt,At,Kn,tn,Qn}from"./chunk-zsat72qd.js";import{re}from"./chunk-tdzh6nsz.js";import{qe}from"./chunk-w5q7978e.js";import{Bt}from"./chunk-9vrp249f.js";function Te(e){return Array.isArray(e)}function Ne(e){if(Nn(e))return e;let o=un(e);if(!Qe(e))return{};if(Te(e)){let i=Array.from(e);if(e.length>0&&typeof e[0]==="string"&&Object.hasOwn(e,"index"))i.index=e.index,i.input=e.input;return i}if(dn(e)){let i=e;return new i.constructor(i.buffer,i.byteOffset,i.length)}if(o==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(o==="[object DataView]"){let i=e,{buffer:g,byteOffset:f,byteLength:r}=i,d=new ArrayBuffer(r),w=new Uint8Array(g,f,r);return new Uint8Array(d).set(w),new DataView(d)}if(o==="[object Boolean]"||o==="[object Number]"||o==="[object String]"){let g=new e.constructor(e.valueOf());if(o==="[object String]")et(g,e);else ge(g,e);return g}if(o==="[object Date]")return new Date(Number(e));if(o==="[object RegExp]"){let i=e,g=new RegExp(i.source,i.flags);return g.lastIndex=i.lastIndex,g}if(o==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(o==="[object Map]"){let i=e,g=new Map;return i.forEach((f,r)=>{g.set(r,f)}),g}if(o==="[object Set]"){let i=e,g=new Set;return i.forEach((f)=>{g.add(f)}),g}if(o==="[object Arguments]"){let i=e,g={};return ge(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}let u={};return tt(u,e),ge(u,e),$e(u,e),u}function Qe(e){switch(un(e)){case Nr:case Ya:case Za:case Ka:case Dr:case Wa:case ii:case oi:case ni:case ri:case ai:case Ga:case Ir:case Xa:case qa:case Ha:case Lr:case Va:case Qa:case Ja:case ei:case ti:return!0;default:return!1}}function ge(e,o){for(let u in o)if(Object.hasOwn(o,u))e[u]=o[u]}function $e(e,o){let u=Object.getOwnPropertySymbols(o);for(let i=0;i<u.length;i++){let g=u[i];if(Object.prototype.propertyIsEnumerable.call(o,g))e[g]=o[g]}}function et(e,o){let u=o.valueOf().length;for(let i in o)if(Object.hasOwn(o,i)&&(Number.isNaN(Number(i))||Number(i)>=u))e[i]=o[i]}function tt(e,o){let u=Object.getPrototypeOf(o);if(u!==null){if(typeof o.constructor==="function")Object.setPrototypeOf(e,u)}}var be=function(){var e=t(function(B,S,n,h){for(n=n||{},h=B.length;h--;n[B[h]]=S);return n},"o"),o=[1,15],u=[1,7],i=[1,13],g=[1,14],f=[1,19],r=[1,16],d=[1,17],w=[1,18],E=[8,30],k=[8,10,21,28,29,30,31,39,43,46],L=[1,23],_=[1,24],T=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],I=[1,49],N={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:t(function(S,n,h,m,D,s,H){var c=s.length-1;switch(D){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",s[c-1]),m.setHierarchy(s[c-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",s[c]),typeof s[c].length==="number"?this.$=s[c]:this.$=[s[c]];break;case 13:m.getLogger().debug("Rule: statement #2: ",s[c-1]),this.$=[s[c-1]].concat(s[c]);break;case 14:m.getLogger().debug("Rule: link: ",s[c],S),this.$={edgeTypeStr:s[c],label:""};break;case 15:m.getLogger().debug("Rule: LABEL link: ",s[c-3],s[c-1],s[c]),this.$={edgeTypeStr:s[c],label:s[c-1]};break;case 18:let V=parseInt(s[c]),j=m.generateId();this.$={id:j,type:"space",label:"",width:V,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",s[c-2],s[c-1],s[c]," typestr: ",s[c-1].edgeTypeStr);let G=m.edgeStrToEdgeData(s[c-1].edgeTypeStr),se=m.edgeStrToEdgeStartData(s[c-1].edgeTypeStr),q=m.edgeStrToThickness(s[c-1].edgeTypeStr),ie=m.edgeStrToPattern(s[c-1].edgeTypeStr);this.$=[{id:s[c-2].id,label:s[c-2].label,type:s[c-2].type,directions:s[c-2].directions},{id:s[c-2].id+"-"+s[c].id,start:s[c-2].id,end:s[c].id,label:s[c-1].label,type:"edge",thickness:q,pattern:ie,directions:s[c].directions,arrowTypeEnd:G,arrowTypeStart:se},{id:s[c].id,label:s[c].label,type:m.typeStr2Type(s[c].typeStr),directions:s[c].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[c-1],s[c]),this.$={id:s[c-1].id,label:s[c-1].label,type:m.typeStr2Type(s[c-1].typeStr),directions:s[c-1].directions,widthInColumns:parseInt(s[c],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",s[c]),this.$={id:s[c].id,label:s[c].label,type:m.typeStr2Type(s[c].typeStr),directions:s[c].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",s[c]),this.$={type:"column-setting",columns:s[c]==="auto"?-1:parseInt(s[c])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",s[c-2],s[c-1]);let O=m.generateId();this.$={...s[c-2],type:"composite",children:s[c-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",s[c-2],s[c-1],s[c]);let K=m.generateId();this.$={id:K,type:"composite",label:"",children:s[c-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",s[c]),this.$={id:s[c]};break;case 30:m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[c-1],s[c]),this.$={id:s[c-1],label:s[c].label,typeStr:s[c].typeStr,directions:s[c].directions};break;case 31:m.getLogger().debug("Rule: dirList: ",s[c]),this.$=[s[c]];break;case 32:m.getLogger().debug("Rule: dirList: ",s[c-1],s[c]),this.$=[s[c-1]].concat(s[c]);break;case 33:m.getLogger().debug("Rule: nodeShapeNLabel: ",s[c-2],s[c-1],s[c]),this.$={typeStr:s[c-2]+s[c],label:s[c-1]};break;case 34:m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[c-3],s[c-2]," #3:",s[c-1],s[c]),this.$={typeStr:s[c-3]+s[c],label:s[c-2],directions:s[c-1]};break;case 35:case 36:this.$={type:"classDef",id:s[c-1].trim(),css:s[c].trim()};break;case 37:this.$={type:"applyClass",id:s[c-1].trim(),styleClass:s[c].trim()};break;case 38:this.$={type:"applyStyles",id:s[c-1].trim(),stylesStr:s[c].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:o,11:3,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:w},{8:[1,20]},e(E,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:o,21:u,28:i,29:g,31:f,39:r,43:d,46:w}),e(k,[2,16],{14:22,15:L,16:_}),e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),e(k,[2,21]),e(k,[2,22]),e(T,[2,25],{27:[1,25]}),e(k,[2,26]),{19:26,26:12,31:f},{10:o,11:27,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:w},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(E,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},e(T,[2,24]),{10:o,11:37,13:4,14:22,15:L,16:_,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:w},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(T,[2,23]),{18:[1,45]},{30:[1,46]},e(k,[2,28]),e(k,[2,35]),e(k,[2,36]),e(k,[2,37]),e(k,[2,38]),{36:[1,47]},{33:48,34:I},{15:[1,50]},e(k,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:I,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:t(function(S,n){if(n.recoverable)this.trace(S);else{var h=Error(S);throw h.hash=n,h}},"parseError"),parse:t(function(S){var n=this,h=[0],m=[],D=[null],s=[],H=this.table,c="",V=0,j=0,G=0,se=2,q=1,ie=s.slice.call(arguments,1),O=Object.create(this.lexer),K={yy:{}};for(var ae in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ae))K.yy[ae]=this.yy[ae];if(O.setInput(S,K.yy),K.yy.lexer=O,K.yy.parser=this,typeof O.yylloc>"u")O.yylloc={};var ne=O.yylloc;s.push(ne);var Ge=O.options&&O.options.ranges;if(typeof K.yy.parseError==="function")this.parseError=K.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Je(P){h.length=h.length-2*P,D.length=D.length-P,s.length=s.length-P}t(Je,"popStack");function _e(){var P=m.pop()||O.lex()||q;if(typeof P!=="number"){if(P instanceof Array)m=P,P=m.pop();P=n.symbols_[P]||P}return P}t(_e,"lex");var A,oe,W,R,vt,ue,U={},J,Y,De,Z;while(!0){if(W=h[h.length-1],this.defaultActions[W])R=this.defaultActions[W];else{if(A===null||typeof A>"u")A=_e();R=H[W]&&H[W][A]}if(typeof R>"u"||!R.length||!R[0]){var he="";Z=[];for(J in H[W])if(this.terminals_[J]&&J>se)Z.push("'"+this.terminals_[J]+"'");if(O.showPosition)he="Parse error on line "+(V+1)+`:
2
2
  `+O.showPosition()+`
3
- Expecting `+Z.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else he="Parse error on line "+(V+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(he,{text:O.match,token:this.terminals_[A]||A,line:O.yylineno,loc:oe,expected:Z})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(R[0]){case 1:if(h.push(A),D.push(O.yytext),s.push(O.yylloc),h.push(R[1]),A=null,!ce){if(j=O.yyleng,c=O.yytext,V=O.yylineno,oe=O.yylloc,G>0)G--}else A=ce,ce=null;break;case 2:if(Y=this.productions_[R[1]][1],U.$=D[D.length-Y],U._$={first_line:s[s.length-(Y||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(Y||1)].first_column,last_column:s[s.length-1].last_column},Ge)U._$.range=[s[s.length-(Y||1)].range[0],s[s.length-1].range[1]];if(ue=this.performAction.apply(U,[c,j,V,K.yy,R[1],D,s].concat(ae)),typeof ue<"u")return ue;if(Y)h=h.slice(0,-1*Y*2),D=D.slice(0,-1*Y),s=s.slice(0,-1*Y);h.push(this.productions_[R[1]][0]),D.push(U.$),s.push(U._$),De=H[h[h.length-2]][h[h.length-1]],h.push(De);break;case 3:return!0}}return!0},"parse")},v=function(){var B={EOF:1,parseError:t(function(n,h){if(this.yy.parser)this.yy.parser.parseError(n,h);else throw Error(n)},"parseError"),setInput:t(function(S,n){if(this.yy=n||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var n=S.match(/(?:\r\n?|\n).*/g);if(n)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),S},"input"),unput:t(function(S){var n=S.length,h=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var m=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),h.length-1)this.yylineno-=h.length-1;var D=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:h?(h.length===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[D[0],D[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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).
3
+ Expecting `+Z.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else he="Parse error on line "+(V+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(he,{text:O.match,token:this.terminals_[A]||A,line:O.yylineno,loc:ne,expected:Z})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(R[0]){case 1:if(h.push(A),D.push(O.yytext),s.push(O.yylloc),h.push(R[1]),A=null,!oe){if(j=O.yyleng,c=O.yytext,V=O.yylineno,ne=O.yylloc,G>0)G--}else A=oe,oe=null;break;case 2:if(Y=this.productions_[R[1]][1],U.$=D[D.length-Y],U._$={first_line:s[s.length-(Y||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(Y||1)].first_column,last_column:s[s.length-1].last_column},Ge)U._$.range=[s[s.length-(Y||1)].range[0],s[s.length-1].range[1]];if(ue=this.performAction.apply(U,[c,j,V,K.yy,R[1],D,s].concat(ie)),typeof ue<"u")return ue;if(Y)h=h.slice(0,-1*Y*2),D=D.slice(0,-1*Y),s=s.slice(0,-1*Y);h.push(this.productions_[R[1]][0]),D.push(U.$),s.push(U._$),De=H[h[h.length-2]][h[h.length-1]],h.push(De);break;case 3:return!0}}return!0},"parse")},v=function(){var B={EOF:1,parseError:t(function(n,h){if(this.yy.parser)this.yy.parser.parseError(n,h);else throw Error(n)},"parseError"),setInput:t(function(S,n){if(this.yy=n||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var n=S.match(/(?:\r\n?|\n).*/g);if(n)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),S},"input"),unput:t(function(S){var n=S.length,h=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var m=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),h.length-1)this.yylineno-=h.length-1;var D=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:h?(h.length===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[D[0],D[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(S){this.unput(this.match.slice(S))},"less"),pastInput:t(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var S=this.match;if(S.length<20)S+=this._input.substr(0,20-S.length);return(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var S=this.pastInput(),n=Array(S.length+1).join("-");return S+this.upcomingInput()+`
5
5
  `+n+"^"},"showPosition"),test_match:t(function(S,n){var h,m,D;if(this.options.backtrack_lexer){if(D={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)D.yylloc.range=this.yylloc.range.slice(0)}if(m=S[0].match(/(?:\r\n?|\n).*/g),m)this.yylineno+=m.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],h=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var s in D)this[s]=D[s];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var S,n,h,m;if(!this._more)this.yytext="",this.match="";var D=this._currentRules();for(var s=0;s<D.length;s++)if(h=this._input.match(this.rules[D[s]]),h&&(!n||h[0].length>n[0].length)){if(n=h,m=s,this.options.backtrack_lexer)if(S=this.test_match(h,D[s]),S!==!1)return S;else if(this._backtrack){n=!1;continue}else return!1;else if(!this.options.flex)break}if(n){if(S=this.test_match(n,D[m]),S!==!1)return S;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:t(function(n){this.conditionStack.push(n)},"begin"),popState:t(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:t(function(n){this.begin(n)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(n,h,m,D){var s=D;switch(m){case 0:return n.getLogger().debug("Found block-beta"),10;break;case 1:return n.getLogger().debug("Found id-block"),29;break;case 2:return n.getLogger().debug("Found block"),10;break;case 3:n.getLogger().debug(".",h.yytext);break;case 4:n.getLogger().debug("_",h.yytext);break;case 5:return 5;case 6:return h.yytext=-1,28;break;case 7:return h.yytext=h.yytext.replace(/columns\s+/,""),n.getLogger().debug("COLUMNS (LEX)",h.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:n.getLogger().debug("LEX: POPPING STR:",h.yytext),this.popState();break;case 13:return n.getLogger().debug("LEX: STR end:",h.yytext),"STR";break;case 14:return h.yytext=h.yytext.replace(/space\:/,""),n.getLogger().debug("SPACE NUM (LEX)",h.yytext),21;break;case 15:return h.yytext="1",n.getLogger().debug("COLUMNS (LEX)",h.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),n.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),n.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),n.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),n.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),n.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),n.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),n.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),n.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),n.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),n.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return n.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return n.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return n.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return n.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return n.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return n.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return n.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),n.getLogger().debug("LEX ARR START"),37;break;case 74:return n.getLogger().debug("Lex: NODE_ID",h.yytext),31;break;case 75:return n.getLogger().debug("Lex: EOF",h.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:n.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:n.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return n.getLogger().debug("LEX: NODE_DESCR:",h.yytext),"NODE_DESCR";break;case 83:n.getLogger().debug("LEX POPPING"),this.popState();break;case 84:n.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (right): dir:",h.yytext),"DIR";break;case 86:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (left):",h.yytext),"DIR";break;case 87:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (x):",h.yytext),"DIR";break;case 88:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (y):",h.yytext),"DIR";break;case 89:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (up):",h.yytext),"DIR";break;case 90:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (down):",h.yytext),"DIR";break;case 91:return h.yytext="]>",n.getLogger().debug("Lex (ARROW_DIR end):",h.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return n.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 93:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 94:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 95:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 96:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 97:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 98:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return n.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),n.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 102:return this.popState(),n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 103:return this.popState(),n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 104:return n.getLogger().debug("Lex: COLON",h.yytext),h.yytext=h.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return B}();N.lexer=v;function z(){this.yy={}}return t(z,"Parser"),z.prototype=N,N.Parser=z,new z}();be.parser=be;var rt=be,M=new Map,me=[],Se=new Map,Ie="color",Oe="fill",st="bgFill",ve=",",Q=new Map,Le="",it=t((e)=>b.sanitizeText(e,l()),"sanitizeText"),at=t(function(e,o=""){let u=Q.get(e);if(!u)u={id:e,styles:[],textStyles:[]},Q.set(e,u);if(o!==void 0&&o!==null)o.split(ve).forEach((i)=>{let g=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Ie).exec(i)){let r=g.replace(Oe,st).replace(Ie,Oe);u.textStyles.push(r)}u.styles.push(g)})},"addStyleClass"),nt=t(function(e,o=""){let u=M.get(e);if(o!==void 0&&o!==null)u.styles=o.split(ve)},"addStyle2Node"),ot=t(function(e,o){e.split(",").forEach(function(u){let i=M.get(u);if(i===void 0){let g=u.trim();i={id:g,type:"na",children:[]},M.set(g,i)}if(!i.classes)i.classes=[];i.classes.push(o)})},"setCssClass"),Ae=0,ze=t((e,o)=>{let u=e.flat(),i=[],f=u.find((r)=>r?.type==="column-setting")?.columns??-1;for(let r of u){if(typeof f==="number"&&f>0&&r.type!=="column-setting"&&typeof r.widthInColumns==="number"&&r.widthInColumns>f)a.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${f}`);if(r.label)r.label=it(r.label);if(r.type==="classDef"){at(r.id,r.css);continue}if(r.type==="applyClass"){ot(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){if(r?.stylesStr)nt(r.id,r?.stylesStr);continue}if(r.type==="column-setting")o.columns=r.columns??-1;else if(r.type==="edge"){let d=(Se.get(r.id)??0)+1;Se.set(r.id,d),r.id=d+"-"+r.id,me.push(r)}else{if(!r.label)if(r.type==="composite")r.label="";else r.label=r.id;let d=M.get(r.id);if(d===void 0){if(r.type==="composite")r.colorIndex=Ae++;M.set(r.id,r)}else{if(r.type!=="na")d.type=r.type;if(r.label!==r.id)d.label=r.label}if(r.children)ze(r.children,r);if(r.type==="space"){let w=r.width??1;for(let E=0;E<w;E++){let k=Ne(r);k.id=k.id+"-"+E,M.set(k.id,k),i.push(k)}}else if(d===void 0)i.push(r)}}o.children=i},"populateBlockDatabase"),ke=[],X={id:"root",type:"composite",children:[],columns:-1},lt=t(()=>{a.debug("Clear called"),C(),X={id:"root",type:"composite",children:[],columns:-1},M=new Map([["root",X]]),ke=[],Q=new Map,me=[],Se=new Map,Le="",Ae=0},"clear");function Be(e){switch(a.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return a.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}t(Be,"typeStr2Type");function Re(e){switch(a.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}t(Re,"edgeTypeStr2Type");function Pe(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}t(Pe,"edgeStrToEdgeData");function Fe(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}t(Fe,"edgeStrToEdgeStartData");function Me(e){return e.includes("==")?"thick":"normal"}t(Me,"edgeStrToThickness");function Ke(e){if(e.includes(".-"))return"dotted";return"solid"}t(Ke,"edgeStrToPattern");var Ce=0,ct=t(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=t((e)=>{X.children=e,ze(e,X),ke=X.children},"setHierarchy"),ht=t((e)=>{let o=M.get(e);if(!o)return-1;if(o.columns)return o.columns;if(!o.children)return-1;return o.children.length},"getColumns"),gt=t(()=>[...M.values()],"getBlocksFlat"),dt=t(()=>ke||[],"getBlocks"),pt=t(()=>me,"getEdges"),ft=t((e)=>M.get(e),"getBlock"),bt=t((e)=>{M.set(e.id,e)},"setBlock"),St=t((e)=>{Le=e},"setDiagramId"),xt=t(()=>Le,"getDiagramId"),mt=t(()=>a,"getLogger"),Lt=t(function(){return Q},"getClasses"),kt={getConfig:t(()=>x().block,"getConfig"),typeStr2Type:Be,edgeTypeStr2Type:Re,edgeStrToEdgeData:Pe,edgeStrToEdgeStartData:Fe,edgeStrToThickness:Me,edgeStrToPattern:Ke,getLogger:mt,getBlocksFlat:gt,getBlocks:dt,getEdges:pt,setHierarchy:ut,getBlock:ft,setBlock:bt,getColumns:ht,getClasses:Lt,clear:lt,generateId:ct,setDiagramId:St,getDiagramId:xt},yt=kt,wt=t((e)=>{let{theme:o,bkgColorArray:u,borderColorArray:i}=e;if(!se(o,i))return"";let g=le(e.look),f=pe(u),r="";for(let d=0;d<Ze(e.THEME_COLOR_LIMIT,i);d++){let w=i[d%i.length],E=f?`fill: ${u[d%u.length]};`:"",k=`[data-look="${g}"][data-color-id="color-${d}"]`;r+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:t(function(n){this.conditionStack.push(n)},"begin"),popState:t(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:t(function(n){this.begin(n)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(n,h,m,D){var s=D;switch(m){case 0:return n.getLogger().debug("Found block-beta"),10;break;case 1:return n.getLogger().debug("Found id-block"),29;break;case 2:return n.getLogger().debug("Found block"),10;break;case 3:n.getLogger().debug(".",h.yytext);break;case 4:n.getLogger().debug("_",h.yytext);break;case 5:return 5;case 6:return h.yytext=-1,28;break;case 7:return h.yytext=h.yytext.replace(/columns\s+/,""),n.getLogger().debug("COLUMNS (LEX)",h.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:n.getLogger().debug("LEX: POPPING STR:",h.yytext),this.popState();break;case 13:return n.getLogger().debug("LEX: STR end:",h.yytext),"STR";break;case 14:return h.yytext=h.yytext.replace(/space\:/,""),n.getLogger().debug("SPACE NUM (LEX)",h.yytext),21;break;case 15:return h.yytext="1",n.getLogger().debug("COLUMNS (LEX)",h.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),n.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),n.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),n.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),n.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),n.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),n.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),n.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),n.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),n.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),n.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return n.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return n.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return n.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return n.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return n.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return n.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return n.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),n.getLogger().debug("LEX ARR START"),37;break;case 74:return n.getLogger().debug("Lex: NODE_ID",h.yytext),31;break;case 75:return n.getLogger().debug("Lex: EOF",h.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:n.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:n.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return n.getLogger().debug("LEX: NODE_DESCR:",h.yytext),"NODE_DESCR";break;case 83:n.getLogger().debug("LEX POPPING"),this.popState();break;case 84:n.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (right): dir:",h.yytext),"DIR";break;case 86:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (left):",h.yytext),"DIR";break;case 87:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (x):",h.yytext),"DIR";break;case 88:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (y):",h.yytext),"DIR";break;case 89:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (up):",h.yytext),"DIR";break;case 90:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (down):",h.yytext),"DIR";break;case 91:return h.yytext="]>",n.getLogger().debug("Lex (ARROW_DIR end):",h.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return n.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 93:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 94:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 95:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 96:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 97:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 98:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return n.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),n.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 102:return this.popState(),n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 103:return this.popState(),n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 104:return n.getLogger().debug("Lex: COLON",h.yytext),h.yytext=h.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return B}();N.lexer=v;function z(){this.yy={}}return t(z,"Parser"),z.prototype=N,N.Parser=z,new z}();be.parser=be;var rt=be,M=new Map,me=[],Se=new Map,Ie="color",Oe="fill",st="bgFill",ve=",",Q=new Map,Le="",it=t((e)=>b.sanitizeText(e,l()),"sanitizeText"),at=t(function(e,o=""){let u=Q.get(e);if(!u)u={id:e,styles:[],textStyles:[]},Q.set(e,u);if(o!==void 0&&o!==null)o.split(ve).forEach((i)=>{let g=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Ie).exec(i)){let r=g.replace(Oe,st).replace(Ie,Oe);u.textStyles.push(r)}u.styles.push(g)})},"addStyleClass"),nt=t(function(e,o=""){let u=M.get(e);if(o!==void 0&&o!==null)u.styles=o.split(ve)},"addStyle2Node"),ot=t(function(e,o){e.split(",").forEach(function(u){let i=M.get(u);if(i===void 0){let g=u.trim();i={id:g,type:"na",children:[]},M.set(g,i)}if(!i.classes)i.classes=[];i.classes.push(o)})},"setCssClass"),Ae=0,ze=t((e,o)=>{let u=e.flat(),i=[],f=u.find((r)=>r?.type==="column-setting")?.columns??-1;for(let r of u){if(typeof f==="number"&&f>0&&r.type!=="column-setting"&&typeof r.widthInColumns==="number"&&r.widthInColumns>f)a.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${f}`);if(r.label)r.label=it(r.label);if(r.type==="classDef"){at(r.id,r.css);continue}if(r.type==="applyClass"){ot(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){if(r?.stylesStr)nt(r.id,r?.stylesStr);continue}if(r.type==="column-setting")o.columns=r.columns??-1;else if(r.type==="edge"){let d=(Se.get(r.id)??0)+1;Se.set(r.id,d),r.id=d+"-"+r.id,me.push(r)}else{if(!r.label)if(r.type==="composite")r.label="";else r.label=r.id;let d=M.get(r.id);if(d===void 0){if(r.type==="composite")r.colorIndex=Ae++;M.set(r.id,r)}else{if(r.type!=="na")d.type=r.type;if(r.label!==r.id)d.label=r.label}if(r.children)ze(r.children,r);if(r.type==="space"){let w=r.width??1;for(let E=0;E<w;E++){let k=Ne(r);k.id=k.id+"-"+E,M.set(k.id,k),i.push(k)}}else if(d===void 0)i.push(r)}}o.children=i},"populateBlockDatabase"),ke=[],X={id:"root",type:"composite",children:[],columns:-1},lt=t(()=>{a.debug("Clear called"),C(),X={id:"root",type:"composite",children:[],columns:-1},M=new Map([["root",X]]),ke=[],Q=new Map,me=[],Se=new Map,Le="",Ae=0},"clear");function Be(e){switch(a.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return a.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}t(Be,"typeStr2Type");function Re(e){switch(a.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}t(Re,"edgeTypeStr2Type");function Pe(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}t(Pe,"edgeStrToEdgeData");function Fe(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}t(Fe,"edgeStrToEdgeStartData");function Me(e){return e.includes("==")?"thick":"normal"}t(Me,"edgeStrToThickness");function Ke(e){if(e.includes(".-"))return"dotted";return"solid"}t(Ke,"edgeStrToPattern");var Ce=0,ct=t(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=t((e)=>{X.children=e,ze(e,X),ke=X.children},"setHierarchy"),ht=t((e)=>{let o=M.get(e);if(!o)return-1;if(o.columns)return o.columns;if(!o.children)return-1;return o.children.length},"getColumns"),gt=t(()=>[...M.values()],"getBlocksFlat"),dt=t(()=>ke||[],"getBlocks"),pt=t(()=>me,"getEdges"),ft=t((e)=>M.get(e),"getBlock"),St=t((e)=>{M.set(e.id,e)},"setBlock"),xt=t((e)=>{Le=e},"setDiagramId"),mt=t(()=>Le,"getDiagramId"),Lt=t(()=>a,"getLogger"),kt=t(function(){return Q},"getClasses"),yt={getConfig:t(()=>x().block,"getConfig"),typeStr2Type:Be,edgeTypeStr2Type:Re,edgeStrToEdgeData:Pe,edgeStrToEdgeStartData:Fe,edgeStrToThickness:Me,edgeStrToPattern:Ke,getLogger:Lt,getBlocksFlat:gt,getBlocks:dt,getEdges:pt,setHierarchy:ut,getBlock:ft,setBlock:St,getColumns:ht,getClasses:kt,clear:lt,generateId:ct,setDiagramId:xt,getDiagramId:mt},wt=yt,_t=t((e)=>{let{theme:o,bkgColorArray:u,borderColorArray:i}=e;if(!le(o,i))return"";let g=ce(e.look),f=pe(u),r="";for(let d=0;d<Ze(e.THEME_COLOR_LIMIT,i);d++){let w=i[d%i.length],E=f?`fill: ${u[d%u.length]};`:"",k=`[data-look="${g}"][data-color-id="color-${d}"]`;r+=`
7
7
 
8
8
  ${k}.node rect.composite {
9
9
  stroke: ${w};
10
10
  ${E}
11
11
  }
12
- `}return r},"genColor"),fe=t((e,o)=>{let u=Bt,i=u(e,"r"),g=u(e,"g"),f=u(e,"b");return de(i,g,f,o)},"fade"),_t=t((e)=>`${wt(e)}
12
+ `}return r},"genColor"),fe=t((e,o)=>{let u=Bt,i=u(e,"r"),g=u(e,"g"),f=u(e,"b");return de(i,g,f,o)},"fade"),Dt=t((e)=>`${_t(e)}
13
13
  .label {
14
14
  font-family: ${e.fontFamily};
15
15
  color: ${e.nodeTextColor||e.textColor};
@@ -137,4 +137,4 @@ Expecting `+Z.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else he="Parse er
137
137
  fill: ${e.textColor};
138
138
  }
139
139
  ${qe()}
140
- `,"getStyles"),Dt=_t;function xe(e,o){if(e===0||!Number.isInteger(e))throw Error("Columns must be an integer !== 0.");if(o<0||!Number.isInteger(o))throw Error("Position must be a non-negative integer."+o);if(e<0)return{px:o,py:0};if(e===1)return{px:0,py:o};let u=o%e,i=Math.floor(o/e);return{px:u,py:i}}t(xe,"calculateBlockPosition");var Nt=t((e)=>{let o=0,u=0;for(let i of e.children){let{width:g,height:f,x:r,y:d}=i.size??{width:0,height:0,x:0,y:0};if(a.debug("getMaxChildSize abc95 child:",i.id,"width:",g,"height:",f,"x:",r,"y:",d,i.type),i.type==="space")continue;let w=g/(i.widthInColumns??1);if(w>o)o=w;if(f>u)u=f}return{width:o,height:u}},"getMaxChildSize");function ee(e,o,u=0,i=0,g=8){if(a.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",u),!e?.size?.width)e.size={width:u,height:i,x:0,y:0};let f=0,r=0;if(e.children?.length>0){for(let y of e.children)ee(y,o,0,0,g);let d=Nt(e);f=d.width,r=d.height,a.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",f,r);for(let y of e.children)if(y.size)a.debug(`abc95 Setting size of children of ${e.id} id=${y.id} ${f} ${r} ${JSON.stringify(y.size)}`),y.size.width=f*(y.widthInColumns??1)+g*((y.widthInColumns??1)-1),y.size.height=r,y.size.x=0,y.size.y=0,a.debug(`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${f} maxHeight:${r}`);for(let y of e.children)ee(y,o,f,r,g);let w=e.columns??-1,E=0;for(let y of e.children)E+=y.widthInColumns??1;let k=e.children.length;if(w>0&&w<E)k=w;let L=Math.ceil(E/k),_=k*(f+g)+g,T=L*(r+g)+g;if(_<u){a.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${u} siblingHeight ${i} width ${_}`),_=u,T=i;let y=(u-k*g-g)/k,I=(i-L*g-g)/L;a.debug("Size indata abc88",e.id,"childWidth",y,"maxWidth",f),a.debug("Size indata abc88",e.id,"childHeight",I,"maxHeight",r),a.debug("Size indata abc88 xSize",k,"padding",g);for(let N of e.children)if(N.size)N.size.width=y,N.size.height=I,N.size.x=0,N.size.y=0}if(a.debug(`abc95 (finale calc) ${e.id} xSize ${k} ySize ${L} columns ${w}${e.children.length} width=${Math.max(_,e.size?.width||0)}`),_<(e?.size?.width||0)){_=e?.size?.width||0;let y=w>0?Math.min(e.children.length,w):e.children.length;if(y>0){let I=(_-y*g-g)/y;a.debug("abc95 (growing to fit) width",e.id,_,e.size?.width,I);for(let N of e.children)if(N.size)N.size.width=I}}e.size={width:_,height:T,x:0,y:0}}a.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}t(ee,"setBlockSizes");function ye(e,o,u=8){a.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(a.debug("layoutBlocks columns abc95",e.id,"=>",i,e),e.children&&e.children.length>0){let g=e?.children[0]?.size?.width??0,f=e.children.length*g+(e.children.length-1)*u;a.debug("widthOfChildren 88",f,"posX");let r=new Map;{let L=0;for(let _ of e.children){if(!_.size)continue;let{py:T}=xe(i,L),y=r.get(T)??0;if(_.size.height>y)r.set(T,_.size.height);let I=_?.widthInColumns??1;if(i>0)I=Math.min(I,i-L%i);L+=I}}let d=new Map;{let L=0,_=[...r.keys()].sort((T,y)=>T-y);for(let T of _)d.set(T,L),L+=(r.get(T)??0)+u}let w=0;a.debug("abc91 block?.size?.x",e.id,e?.size?.x);let E=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-u,k=0;for(let L of e.children){let _=e;if(!L.size)continue;let{width:T,height:y}=L.size,{px:I,py:N}=xe(i,w);if(N!=k)k=N,E=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-u,a.debug("New row in layout for block",e.id," and child ",L.id,k);if(a.debug(`abc89 layout blocks (child) id: ${L.id} Pos: ${w} (px, py) ${I},${N} (${_?.size?.x},${_?.size?.y}) parent: ${_.id} width: ${T}${u}`),_.size){let z=T/2;L.size.x=E+u+z,a.debug(`abc91 layout blocks (calc) px, pyid:${L.id} startingPos=X${E} new startingPosX${L.size.x} ${z} padding=${u} width=${T} halfWidth=${z} => x:${L.size.x} y:${L.size.y} ${L.widthInColumns} (width * (child?.w || 1)) / 2 ${T*(L?.widthInColumns??1)/2}`),E=L.size.x+z;let B=d.get(N)??0,S=r.get(N)??y;L.size.y=_.size.y-_.size.height/2+B+S/2+u,a.debug(`abc88 layout blocks (calc) px, pyid:${L.id}startingPosX${E}${u}${z}=>x:${L.size.x}y:${L.size.y}${L.widthInColumns}(width * (child?.w || 1)) / 2${T*(L?.widthInColumns??1)/2}`)}if(L.children)ye(L,o,u);let v=L?.widthInColumns??1;if(i>0)v=Math.min(v,i-w%i);w+=v,a.debug("abc88 columnsPos",L,w)}}a.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}t(ye,"layoutBlocks");function we(e,{minX:o,minY:u,maxX:i,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:f,y:r,width:d,height:w}=e.size;if(f-d/2<o)o=f-d/2;if(r-w/2<u)u=r-w/2;if(f+d/2>i)i=f+d/2;if(r+w/2>g)g=r+w/2}if(e.children)for(let f of e.children)({minX:o,minY:u,maxX:i,maxY:g}=we(f,{minX:o,minY:u,maxX:i,maxY:g}));return{minX:o,minY:u,maxX:i,maxY:g}}t(we,"findBounds");function Ye(e){let o=e.getBlock("root");if(!o)return;let u=l()?.block?.padding??8;ee(o,e,0,0,u),ye(o,e,u),a.debug("getBlocks",JSON.stringify(o,null,2));let{minX:i,minY:g,maxX:f,maxY:r}=we(o),d=r-g,w=f-i;return{x:i,y:g,width:w,height:d}}t(Ye,"layout");function Ee(e,o,u=!1){let i=e,g="default";if((i?.classes?.length||0)>0)g=(i?.classes??[]).join(" ");g=g+" flowchart-label";let f=(i?.classes??[]).flatMap((y)=>o.getClasses().get(y)?.styles??[]),r=0,d="rect",w;switch(i.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",w=0;break;case"square":d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"group":d="rect";break;case"doublecircle":d="doublecircle";break;default:d="rect"}let E=ai(i?.styles??[]),k=i.label,L=i.size??{width:0,height:0,x:0,y:0},_=o.getDiagramId();return{labelStyle:E.labelStyle,shape:d,label:k,labelText:k,rx:r,ry:r,class:g,cssClasses:g,cssStyles:i?.styles??[],cssCompiledStyles:f,style:E.style,id:i.id,domId:_?`${_}-${i.id}`:i.id,isGroup:!1,directions:i.directions,width:L.width||void 0,height:L.height||void 0,wrappingWidth:L.width||Number.POSITIVE_INFINITY,x:L.x,y:L.y,positioned:u,intersect:void 0,padding:w??x()?.block?.padding??0,widthInColumns:i.widthInColumns??1,colorIndex:i.colorIndex,look:x().look}}t(Ee,"getNodeFromBlock");async function We(e,o,u){let i=Ee(o,u,!1);if(o.type==="group")return;let g=x(),f=await Tt(e,i,{config:g}),r=f.node()?.getBBox()??{width:0,height:0},d=u.getBlock(i.id);d.size={width:r.width,height:r.height,x:0,y:0,node:f},u.setBlock(d),f.remove()}t(We,"calculateBlockSize");async function Ve(e,o,u){let i=Ee(o,u,!0);if(u.getBlock(i.id).type!=="space"){let f=x(),r=await Tt(e,i,{config:f});if(i.colorIndex!==void 0)Xe(r,i.colorIndex,f.theme,f.themeVariables?.borderColorArray);o.intersect=i?.intersect,vt(i)}}t(Ve,"insertBlockPositioned");async function te(e,o,u,i){for(let g of o)if(await i(e,g,u),g.children)await te(e,g.children,u,i)}t(te,"performOperations");async function Ue(e,o,u){await te(e,o,u,We)}t(Ue,"calculateBlockSizes");async function He(e,o,u){await te(e,o,u,Ve)}t(He,"insertBlocks");async function je(e,o,u,i,g){let f=new re({multigraph:!0,compound:!0});f.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of u)if(r.size)f.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of o)if(r.start&&r.end){let d=i.getBlock(r.start),w=i.getBlock(r.end);if(d?.size&&w?.size){let E=d.size,k=w.size,L=[{x:E.x,y:E.y},{x:E.x+(k.x-E.x)/2,y:E.y+(k.y-E.y)/2},{x:k.x,y:k.y}],_=g?`${g}-${r.id}`:r.id,T=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",y=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",I=`${T} ${y} flowchart-link LS-a1 LE-b1`;if(en(e,{...r,id:_,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:L,classes:I},{},"block",f.node(r.start),f.node(r.end),g),r.label)await Et(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:L,classes:I}),Yn({...r,x:L[1].x,y:L[1].y},{originalPath:L})}}}t(je,"insertEdges");var It=t(function(e,o){return o.db.getClasses()},"getClasses"),Ot=t(async function(e,o,u,i){let{securityLevel:g,block:f}=x(),r=i.db;r.setDiagramId(o);let d;if(g==="sandbox")d=p("#i"+o);let w=g==="sandbox"?p(d.nodes()[0].contentDocument.body):p("body"),E=g==="sandbox"?w.select(`[id="${o}"]`):p(`[id="${o}"]`);Ba(E,x()),Zn(E,["point","circle","cross"],i.type,o);let L=r.getBlocks(),_=r.getBlocksFlat(),T=r.getEdges(),y=E.insert("g").attr("class","block");await Ue(y,L,r);let I=Ye(r);await He(y,L,r),await je(y,T,_,r,o);let N=y.node()?.getBBox(),v=N&&Number.isFinite(N.width)&&Number.isFinite(N.height)?N:I;if(v){let z=Math.max(1,Math.round(0.125*(v.width/v.height))),B=v.height+z+10,S=v.width+10,{useMaxWidth:n}=f;F(E,B,S,!!n),a.debug("Here Bounds",I,v),E.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Ct={draw:Ot,getClasses:It},ar={parser:rt,db:yt,renderer:Ct,styles:Dt};export{ar as diagram};
140
+ `,"getStyles"),Tt=Dt;function xe(e,o){if(e===0||!Number.isInteger(e))throw Error("Columns must be an integer !== 0.");if(o<0||!Number.isInteger(o))throw Error("Position must be a non-negative integer."+o);if(e<0)return{px:o,py:0};if(e===1)return{px:0,py:o};let u=o%e,i=Math.floor(o/e);return{px:u,py:i}}t(xe,"calculateBlockPosition");var Nt=t((e)=>{let o=0,u=0;for(let i of e.children){let{width:g,height:f,x:r,y:d}=i.size??{width:0,height:0,x:0,y:0};if(a.debug("getMaxChildSize abc95 child:",i.id,"width:",g,"height:",f,"x:",r,"y:",d,i.type),i.type==="space")continue;let w=g/(i.widthInColumns??1);if(w>o)o=w;if(f>u)u=f}return{width:o,height:u}},"getMaxChildSize");function ee(e,o,u=0,i=0,g=8){if(a.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",u),!e?.size?.width)e.size={width:u,height:i,x:0,y:0};let f=0,r=0;if(e.children?.length>0){for(let y of e.children)ee(y,o,0,0,g);let d=Nt(e);f=d.width,r=d.height,a.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",f,r);for(let y of e.children)if(y.size)a.debug(`abc95 Setting size of children of ${e.id} id=${y.id} ${f} ${r} ${JSON.stringify(y.size)}`),y.size.width=f*(y.widthInColumns??1)+g*((y.widthInColumns??1)-1),y.size.height=r,y.size.x=0,y.size.y=0,a.debug(`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${f} maxHeight:${r}`);for(let y of e.children)ee(y,o,f,r,g);let w=e.columns??-1,E=0;for(let y of e.children)E+=y.widthInColumns??1;let k=e.children.length;if(w>0&&w<E)k=w;let L=Math.ceil(E/k),_=k*(f+g)+g,T=L*(r+g)+g;if(_<u){a.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${u} siblingHeight ${i} width ${_}`),_=u,T=i;let y=(u-k*g-g)/k,I=(i-L*g-g)/L;a.debug("Size indata abc88",e.id,"childWidth",y,"maxWidth",f),a.debug("Size indata abc88",e.id,"childHeight",I,"maxHeight",r),a.debug("Size indata abc88 xSize",k,"padding",g);for(let N of e.children)if(N.size)N.size.width=y,N.size.height=I,N.size.x=0,N.size.y=0}if(a.debug(`abc95 (finale calc) ${e.id} xSize ${k} ySize ${L} columns ${w}${e.children.length} width=${Math.max(_,e.size?.width||0)}`),_<(e?.size?.width||0)){_=e?.size?.width||0;let y=w>0?Math.min(e.children.length,w):e.children.length;if(y>0){let I=(_-y*g-g)/y;a.debug("abc95 (growing to fit) width",e.id,_,e.size?.width,I);for(let N of e.children)if(N.size)N.size.width=I}}e.size={width:_,height:T,x:0,y:0}}a.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}t(ee,"setBlockSizes");function ye(e,o,u=8){a.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(a.debug("layoutBlocks columns abc95",e.id,"=>",i,e),e.children&&e.children.length>0){let g=e?.children[0]?.size?.width??0,f=e.children.length*g+(e.children.length-1)*u;a.debug("widthOfChildren 88",f,"posX");let r=new Map;{let L=0;for(let _ of e.children){if(!_.size)continue;let{py:T}=xe(i,L),y=r.get(T)??0;if(_.size.height>y)r.set(T,_.size.height);let I=_?.widthInColumns??1;if(i>0)I=Math.min(I,i-L%i);L+=I}}let d=new Map;{let L=0,_=[...r.keys()].sort((T,y)=>T-y);for(let T of _)d.set(T,L),L+=(r.get(T)??0)+u}let w=0;a.debug("abc91 block?.size?.x",e.id,e?.size?.x);let E=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-u,k=0;for(let L of e.children){let _=e;if(!L.size)continue;let{width:T,height:y}=L.size,{px:I,py:N}=xe(i,w);if(N!=k)k=N,E=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-u,a.debug("New row in layout for block",e.id," and child ",L.id,k);if(a.debug(`abc89 layout blocks (child) id: ${L.id} Pos: ${w} (px, py) ${I},${N} (${_?.size?.x},${_?.size?.y}) parent: ${_.id} width: ${T}${u}`),_.size){let z=T/2;L.size.x=E+u+z,a.debug(`abc91 layout blocks (calc) px, pyid:${L.id} startingPos=X${E} new startingPosX${L.size.x} ${z} padding=${u} width=${T} halfWidth=${z} => x:${L.size.x} y:${L.size.y} ${L.widthInColumns} (width * (child?.w || 1)) / 2 ${T*(L?.widthInColumns??1)/2}`),E=L.size.x+z;let B=d.get(N)??0,S=r.get(N)??y;L.size.y=_.size.y-_.size.height/2+B+S/2+u,a.debug(`abc88 layout blocks (calc) px, pyid:${L.id}startingPosX${E}${u}${z}=>x:${L.size.x}y:${L.size.y}${L.widthInColumns}(width * (child?.w || 1)) / 2${T*(L?.widthInColumns??1)/2}`)}if(L.children)ye(L,o,u);let v=L?.widthInColumns??1;if(i>0)v=Math.min(v,i-w%i);w+=v,a.debug("abc88 columnsPos",L,w)}}a.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}t(ye,"layoutBlocks");function we(e,{minX:o,minY:u,maxX:i,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:f,y:r,width:d,height:w}=e.size;if(f-d/2<o)o=f-d/2;if(r-w/2<u)u=r-w/2;if(f+d/2>i)i=f+d/2;if(r+w/2>g)g=r+w/2}if(e.children)for(let f of e.children)({minX:o,minY:u,maxX:i,maxY:g}=we(f,{minX:o,minY:u,maxX:i,maxY:g}));return{minX:o,minY:u,maxX:i,maxY:g}}t(we,"findBounds");function Ye(e){let o=e.getBlock("root");if(!o)return;let u=l()?.block?.padding??8;ee(o,e,0,0,u),ye(o,e,u),a.debug("getBlocks",JSON.stringify(o,null,2));let{minX:i,minY:g,maxX:f,maxY:r}=we(o),d=r-g,w=f-i;return{x:i,y:g,width:w,height:d}}t(Ye,"layout");function Ee(e,o,u=!1){let i=e,g="default";if((i?.classes?.length||0)>0)g=(i?.classes??[]).join(" ");g=g+" flowchart-label";let f=(i?.classes??[]).flatMap((y)=>o.getClasses().get(y)?.styles??[]),r=0,d="rect",w;switch(i.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",w=0;break;case"square":d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"group":d="rect";break;case"doublecircle":d="doublecircle";break;default:d="rect"}let E=li(i?.styles??[]),k=i.label,L=i.size??{width:0,height:0,x:0,y:0},_=o.getDiagramId();return{labelStyle:E.labelStyle,shape:d,label:k,labelText:k,rx:r,ry:r,class:g,cssClasses:g,cssStyles:i?.styles??[],cssCompiledStyles:f,style:E.style,id:i.id,domId:_?`${_}-${i.id}`:i.id,isGroup:!1,directions:i.directions,width:L.width||void 0,height:L.height||void 0,wrappingWidth:L.width||Number.POSITIVE_INFINITY,x:L.x,y:L.y,positioned:u,intersect:void 0,padding:w??x()?.block?.padding??0,widthInColumns:i.widthInColumns??1,colorIndex:i.colorIndex,look:x().look}}t(Ee,"getNodeFromBlock");async function We(e,o,u){let i=Ee(o,u,!1);if(o.type==="group")return;let g=x(),f=await Et(e,i,{config:g}),r=f.node()?.getBBox()??{width:0,height:0},d=u.getBlock(i.id);d.size={width:r.width,height:r.height,x:0,y:0,node:f},u.setBlock(d),f.remove()}t(We,"calculateBlockSize");async function Ve(e,o,u){let i=Ee(o,u,!0);if(u.getBlock(i.id).type!=="space"){let f=x(),r=await Et(e,i,{config:f});if(i.colorIndex!==void 0)Xe(r,i.colorIndex,f.theme,f.themeVariables?.borderColorArray);o.intersect=i?.intersect,bt(i)}}t(Ve,"insertBlockPositioned");async function te(e,o,u,i){for(let g of o)if(await i(e,g,u),g.children)await te(e,g.children,u,i)}t(te,"performOperations");async function Ue(e,o,u){await te(e,o,u,We)}t(Ue,"calculateBlockSizes");async function He(e,o,u){await te(e,o,u,Ve)}t(He,"insertBlocks");async function je(e,o,u,i,g){let f=new re({multigraph:!0,compound:!0});f.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of u)if(r.size)f.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of o)if(r.start&&r.end){let d=i.getBlock(r.start),w=i.getBlock(r.end);if(d?.size&&w?.size){let E=d.size,k=w.size,L=[{x:E.x,y:E.y},{x:E.x+(k.x-E.x)/2,y:E.y+(k.y-E.y)/2},{x:k.x,y:k.y}],_=g?`${g}-${r.id}`:r.id,T=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",y=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",I=`${T} ${y} flowchart-link LS-a1 LE-b1`;if(tn(e,{...r,id:_,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:L,classes:I},{},"block",f.node(r.start),f.node(r.end),g),r.label)await At(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:L,classes:I}),Kn({...r,x:L[1].x,y:L[1].y},{originalPath:L})}}}t(je,"insertEdges");var It=t(function(e,o){return o.db.getClasses()},"getClasses"),Ot=t(async function(e,o,u,i){let{securityLevel:g,block:f}=x(),r=i.db;r.setDiagramId(o);let d;if(g==="sandbox")d=p("#i"+o);let w=g==="sandbox"?p(d.nodes()[0].contentDocument.body):p("body"),E=g==="sandbox"?w.select(`[id="${o}"]`):p(`[id="${o}"]`);ja(E,x()),Qn(E,["point","circle","cross"],i.type,o);let L=r.getBlocks(),_=r.getBlocksFlat(),T=r.getEdges(),y=E.insert("g").attr("class","block");await Ue(y,L,r);let I=Ye(r);await He(y,L,r),await je(y,T,_,r,o);let N=y.node()?.getBBox(),v=N&&Number.isFinite(N.width)&&Number.isFinite(N.height)?N:I;if(v){let z=Math.max(1,Math.round(0.125*(v.width/v.height))),B=v.height+z+10,S=v.width+10,{useMaxWidth:n}=f;F(E,B,S,!!n),a.debug("Here Bounds",I,v),E.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Ct={draw:Ot,getClasses:It},ar={parser:rt,db:wt,renderer:Ct,styles:Tt};export{ar as diagram};
@@ -0,0 +1 @@
1
+ import{Jn}from"./chunk-5d9veaef.js";export{Jn as default};
@@ -0,0 +1 @@
1
+ import{r,e,n,y,s,st,U,$n}from"./chunk-ty2rmwda.js";var x=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],a=s("check-check",x);var h={once:{label:"已允许本次控制电脑",tone:"text-success",icon:U},session:{label:"本会话始终允许控制",tone:"text-success",icon:a},deny:{label:"已拒绝控制电脑",tone:"text-danger",icon:st},cancelled:{label:"控制电脑授权已取消",tone:"text-faint",icon:$n}};function w(l){let{style:p,cn:c,Collapsible:i,CollapsibleTrigger:m,CollapsibleContent:d,Chevron:u}=y(),[f,C]=r(!1),t=l.payload;if(!t||typeof t.id!=="string"||t.state==="pending")return null;let o=h[t.state],b=o.icon;return n(i,{open:f,onOpenChange:C,className:"w-full text-xs text-ink/90 animate-fade",children:[n(m,{className:p("chat.timelineRow","cursor-pointer select-none"),children:[e("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e(b,{className:c("size-3.5",o.tone)})}),e("span",{className:"shrink-0",children:o.label}),n("span",{className:"min-w-0 flex-1 truncate font-mono text-[11.5px] opacity-80",title:t.app,children:[t.action," ",t.app]}),e(u,{className:"size-3.5 shrink-0 text-faint opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),e(d,{children:e("pre",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px] font-mono text-[11.5px] break-all whitespace-pre-wrap text-dim",children:t.detail})})]})}export{w as ApprovalCard};
@@ -1,5 +1,5 @@
1
- import{t,a,we,x,O,F,C,l,V}from"./chunk-b5zf1hs3.js";var D="",E="",W="",_=[],A=new Map,y=t((e)=>O(e,l()),"sanitizeText"),b=t((e)=>{switch(e.type){case"terminal":return{...e,value:y(e.value)};case"nonterminal":return{...e,name:y(e.name)};case"sequence":return{...e,elements:e.elements.map(b)};case"choice":return{...e,alternatives:e.alternatives.map(b)};case"optional":return{...e,element:b(e.element)};case"repetition":return{...e,element:b(e.element),separator:e.separator?b(e.separator):void 0};case"special":return{...e,text:y(e.text)}}},"sanitizeAstNode"),G=t(()=>{D="",E="",W="",_.length=0,A.clear(),C(),a.debug("[Railroad] Database cleared")},"clear"),L=t((e)=>{D=y(e),a.debug("[Railroad] Title set:",e)},"setTitle"),I=t(()=>D,"getTitle"),U=t((e)=>{let n={...e,name:y(e.name),definition:b(e.definition),comment:e.comment?y(e.comment):void 0};if(a.debug("[Railroad] Adding rule:",n.name),A.has(n.name))a.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`);_.push(n),A.set(n.name,n)},"addRule"),j=t(()=>_,"getRules"),K=t((e)=>A.get(e),"getRule"),Q=t((e)=>{E=y(e).replace(/^\s+/g,""),a.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=t(()=>E,"getAccTitle"),ee=t((e)=>{W=y(e).replace(/\n\s+/g,`
2
- `),a.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),te=t(()=>W,"getAccDescription"),re=L,ie=I,J={clear:G,setTitle:L,getTitle:I,addRule:U,getRules:j,getRule:K,setAccTitle:Q,getAccTitle:Z,setAccDescription:ee,getAccDescription:te,setDiagramTitle:re,getDiagramTitle:ie},T={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),X=t((e)=>{if(!e)return!1;return Object.keys(e).every((n)=>n==="railroad"||oe.has(n))},"isRailroadStyleOptions"),le=t((e)=>{if(!e)return{};if("railroad"in e&&e.railroad)return e.railroad;return X(e)?e:{}},"extractRailroadOverrides"),se=t((e)=>{if(!e||X(e))return{};let{railroad:n,svgId:s,theme:i,look:r,...o}=e;return o},"extractThemeOverrides"),u=t((e,n)=>{if(typeof e!=="string")return n;let s=e.trim();return ne.test(s)?s:n},"sanitizeColorValue"),H=t((e,n)=>{if(typeof e!=="string")return n;let s=e.trim();return ae.test(s)?s:n},"sanitizeFontFamilyValue"),z=t((e,n)=>{let s=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(s)&&s>=0?s:n},"sanitizeNumberValue"),de=t((e)=>{let n=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>0?n:void 0},"parseThemeFontSize"),ce=t((e)=>{let n=H(e.fontFamily,T.fontFamily),s=de(e.fontSize)??T.fontSize;return{...T,fontFamily:n,fontSize:s,terminalFill:u(e.secondBkg??e.secondaryColor,T.terminalFill),terminalStroke:u(e.secondaryBorderColor??e.lineColor,T.terminalStroke),terminalTextColor:u(e.secondaryTextColor??e.textColor,T.terminalTextColor),nonTerminalFill:u(e.mainBkg??e.background,T.nonTerminalFill),nonTerminalStroke:u(e.primaryBorderColor??e.lineColor,T.nonTerminalStroke),nonTerminalTextColor:u(e.primaryTextColor??e.textColor,T.nonTerminalTextColor),lineColor:u(e.lineColor,T.lineColor),markerFill:u(e.lineColor,T.markerFill),commentFill:u(e.labelBackground??e.tertiaryColor,T.commentFill),commentStroke:u(e.tertiaryBorderColor??e.lineColor,T.commentStroke),commentTextColor:u(e.tertiaryTextColor??e.textColor,T.commentTextColor),specialFill:u(e.tertiaryColor??e.secondaryColor,T.specialFill),specialStroke:u(e.tertiaryBorderColor??e.secondaryBorderColor,T.specialStroke),ruleNameColor:u(e.titleColor??e.textColor,T.ruleNameColor)}},"buildThemeDefaults"),B=t((e)=>{let n=x(),s={...we(),...n.themeVariables??{},...se(e)},i=ce(s),r={...n.railroad??{},...le(e)};return{compactMode:r.compactMode??i.compactMode,padding:z(r.padding,i.padding),verticalSeparation:z(r.verticalSeparation,i.verticalSeparation),horizontalSeparation:z(r.horizontalSeparation,i.horizontalSeparation),arcRadius:z(r.arcRadius,i.arcRadius),fontSize:z(r.fontSize,i.fontSize),fontFamily:H(r.fontFamily,i.fontFamily),terminalFill:u(r.terminalFill,i.terminalFill),terminalStroke:u(r.terminalStroke,i.terminalStroke),terminalTextColor:u(r.terminalTextColor,i.terminalTextColor),nonTerminalFill:u(r.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:u(r.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:u(r.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:u(r.lineColor,i.lineColor),strokeWidth:z(r.strokeWidth,i.strokeWidth),markerFill:u(r.markerFill,i.markerFill),commentFill:u(r.commentFill,i.commentFill),commentStroke:u(r.commentStroke,i.commentStroke),commentTextColor:u(r.commentTextColor,i.commentTextColor),specialFill:u(r.specialFill,i.specialFill),specialStroke:u(r.specialStroke,i.specialStroke),ruleNameColor:u(r.ruleNameColor,i.ruleNameColor),showMarkers:r.showMarkers??i.showMarkers,markerRadius:z(r.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),Dt=t((e)=>{let{fontFamily:n,fontSize:s,terminalFill:i,terminalStroke:r,terminalTextColor:o,nonTerminalFill:g,nonTerminalStroke:m,nonTerminalTextColor:d,lineColor:f,strokeWidth:p,markerFill:h,commentFill:v,commentStroke:c,commentTextColor:w,specialFill:N,specialStroke:R,ruleNameColor:S}=B(e);return`
1
+ import{t,a,we,x,O,F,C,l,V}from"./chunk-zsat72qd.js";var D="",E="",W="",_=[],A=new Map,y=t((e)=>O(e,l()),"sanitizeText"),b=t((e)=>{switch(e.type){case"terminal":return{...e,value:y(e.value)};case"nonterminal":return{...e,name:y(e.name)};case"sequence":return{...e,elements:e.elements.map(b)};case"choice":return{...e,alternatives:e.alternatives.map(b)};case"optional":return{...e,element:b(e.element)};case"repetition":return{...e,element:b(e.element),separator:e.separator?b(e.separator):void 0};case"special":return{...e,text:y(e.text)}}},"sanitizeAstNode"),G=t(()=>{D="",E="",W="",_.length=0,A.clear(),C(),a.debug("[Railroad] Database cleared")},"clear"),L=t((e)=>{D=y(e),a.debug("[Railroad] Title set:",e)},"setTitle"),I=t(()=>D,"getTitle"),U=t((e)=>{let n={...e,name:y(e.name),definition:b(e.definition),comment:e.comment?y(e.comment):void 0};if(a.debug("[Railroad] Adding rule:",n.name),A.has(n.name))a.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`);_.push(n),A.set(n.name,n)},"addRule"),j=t(()=>_,"getRules"),K=t((e)=>A.get(e),"getRule"),J=t((e)=>{E=y(e).replace(/^\s+/g,""),a.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Q=t(()=>E,"getAccTitle"),Z=t((e)=>{W=y(e).replace(/\n\s+/g,`
2
+ `),a.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),te=t(()=>W,"getAccDescription"),re=L,ie=I,ee={clear:G,setTitle:L,getTitle:I,addRule:U,getRules:j,getRule:K,setAccTitle:J,getAccTitle:Q,setAccDescription:Z,getAccDescription:te,setDiagramTitle:re,getDiagramTitle:ie},T={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),X=t((e)=>{if(!e)return!1;return Object.keys(e).every((n)=>n==="railroad"||oe.has(n))},"isRailroadStyleOptions"),le=t((e)=>{if(!e)return{};if("railroad"in e&&e.railroad)return e.railroad;return X(e)?e:{}},"extractRailroadOverrides"),se=t((e)=>{if(!e||X(e))return{};let{railroad:n,svgId:s,theme:i,look:r,...o}=e;return o},"extractThemeOverrides"),u=t((e,n)=>{if(typeof e!=="string")return n;let s=e.trim();return ne.test(s)?s:n},"sanitizeColorValue"),H=t((e,n)=>{if(typeof e!=="string")return n;let s=e.trim();return ae.test(s)?s:n},"sanitizeFontFamilyValue"),z=t((e,n)=>{let s=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(s)&&s>=0?s:n},"sanitizeNumberValue"),de=t((e)=>{let n=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>0?n:void 0},"parseThemeFontSize"),ce=t((e)=>{let n=H(e.fontFamily,T.fontFamily),s=de(e.fontSize)??T.fontSize;return{...T,fontFamily:n,fontSize:s,terminalFill:u(e.secondBkg??e.secondaryColor,T.terminalFill),terminalStroke:u(e.secondaryBorderColor??e.lineColor,T.terminalStroke),terminalTextColor:u(e.secondaryTextColor??e.textColor,T.terminalTextColor),nonTerminalFill:u(e.mainBkg??e.background,T.nonTerminalFill),nonTerminalStroke:u(e.primaryBorderColor??e.lineColor,T.nonTerminalStroke),nonTerminalTextColor:u(e.primaryTextColor??e.textColor,T.nonTerminalTextColor),lineColor:u(e.lineColor,T.lineColor),markerFill:u(e.lineColor,T.markerFill),commentFill:u(e.labelBackground??e.tertiaryColor,T.commentFill),commentStroke:u(e.tertiaryBorderColor??e.lineColor,T.commentStroke),commentTextColor:u(e.tertiaryTextColor??e.textColor,T.commentTextColor),specialFill:u(e.tertiaryColor??e.secondaryColor,T.specialFill),specialStroke:u(e.tertiaryBorderColor??e.secondaryBorderColor,T.specialStroke),ruleNameColor:u(e.titleColor??e.textColor,T.ruleNameColor)}},"buildThemeDefaults"),B=t((e)=>{let n=x(),s={...we(),...n.themeVariables??{},...se(e)},i=ce(s),r={...n.railroad??{},...le(e)};return{compactMode:r.compactMode??i.compactMode,padding:z(r.padding,i.padding),verticalSeparation:z(r.verticalSeparation,i.verticalSeparation),horizontalSeparation:z(r.horizontalSeparation,i.horizontalSeparation),arcRadius:z(r.arcRadius,i.arcRadius),fontSize:z(r.fontSize,i.fontSize),fontFamily:H(r.fontFamily,i.fontFamily),terminalFill:u(r.terminalFill,i.terminalFill),terminalStroke:u(r.terminalStroke,i.terminalStroke),terminalTextColor:u(r.terminalTextColor,i.terminalTextColor),nonTerminalFill:u(r.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:u(r.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:u(r.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:u(r.lineColor,i.lineColor),strokeWidth:z(r.strokeWidth,i.strokeWidth),markerFill:u(r.markerFill,i.markerFill),commentFill:u(r.commentFill,i.commentFill),commentStroke:u(r.commentStroke,i.commentStroke),commentTextColor:u(r.commentTextColor,i.commentTextColor),specialFill:u(r.specialFill,i.specialFill),specialStroke:u(r.specialStroke,i.specialStroke),ruleNameColor:u(r.ruleNameColor,i.ruleNameColor),showMarkers:r.showMarkers??i.showMarkers,markerRadius:z(r.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),Dt=t((e)=>{let{fontFamily:n,fontSize:s,terminalFill:i,terminalStroke:r,terminalTextColor:o,nonTerminalFill:g,nonTerminalStroke:m,nonTerminalTextColor:d,lineColor:f,strokeWidth:p,markerFill:h,commentFill:v,commentStroke:c,commentTextColor:w,specialFill:N,specialStroke:R,ruleNameColor:S}=B(e);return`
3
3
  .railroad-diagram {
4
4
  font-family: ${n};
5
5
  font-size: ${s}px;
@@ -85,5 +85,5 @@ import{t,a,we,x,O,F,C,l,V}from"./chunk-b5zf1hs3.js";var D="",E="",W="",_=[],A=ne
85
85
  /* Grouping container, no specific styles */
86
86
  }
87
87
  `},"getStyles"),k=class{constructor(){this.d=""}static{t(this,"PathBuilder")}moveTo(e,n){return this.d+=`M ${e} ${n} `,this}lineTo(e,n){return this.d+=`L ${e} ${n} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,n,s,i,r,o,g){return this.d+=`A ${e} ${n} ${s} ${i?1:0} ${r?1:0} ${o} ${g} `,this}build(){return this.d.trim()}},me=class{constructor(e,n=B()){this.textCache=new Map,this.svg=e,this.config=n}static{t(this,"RailroadRenderer")}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let n=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),s=n.node().getBBox(),i={width:s.width,height:s.height};return n.remove(),this.textCache.set(e,i),i}renderTerminal(e,n){let s=this.measureText(n),i=s.width+this.config.padding*2,r=s.height+this.config.padding*2,o=e.append("g").attr("class","railroad-terminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r).attr("rx",10).attr("ry",10),o.append("text").attr("x",i/2).attr("y",r/2).text(n),{element:o.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderNonTerminal(e,n){let s=this.measureText(n),i=s.width+this.config.padding*2,r=s.height+this.config.padding*2,o=e.append("g").attr("class","railroad-nonterminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r),o.append("text").attr("x",i/2).attr("y",r/2).text(n),{element:o.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderSequence(e,n){let s=n.map((d)=>this.renderExpression(e,d)),i=0,r=0,o=0;for(let d of s)i+=d.dimensions.width,r=Math.max(r,d.dimensions.up),o=Math.max(o,d.dimensions.down);i+=(s.length-1)*this.config.horizontalSeparation;let g=e.append("g").attr("class","railroad-sequence"),m=0;for(let d=0;d<s.length;d++){let f=s[d],p=r-f.dimensions.up;if(g.node().appendChild(f.element).setAttribute("transform",`translate(${m}, ${p})`),d<s.length-1){let v=m+f.dimensions.width,c=v+this.config.horizontalSeparation,w=r;g.append("path").attr("class","railroad-line").attr("d",new k().moveTo(v,w).lineTo(c,w).build())}m+=f.dimensions.width+this.config.horizontalSeparation}return{element:g.node(),dimensions:{width:i,height:r+o,up:r,down:o}}}renderChoice(e,n){let s=n.map((h)=>this.renderExpression(e,h)),i=0,r=0;for(let h of s)i=Math.max(i,h.dimensions.width),r+=h.dimensions.height;r+=(s.length-1)*this.config.verticalSeparation;let o=this.config.arcRadius,g=o*4,m=i+g,d=e.append("g").attr("class","railroad-choice"),f=0,p=r/2;for(let h of s){let v=f,c=v+h.dimensions.up,w=o*2+(i-h.dimensions.width)/2;d.node().appendChild(h.element).setAttribute("transform",`translate(${w}, ${v})`);let R=new k,S=c>p;if(c===p)R.moveTo(0,p).lineTo(w,c);else R.moveTo(0,p).arcTo(o,o,0,!1,S,o,p+(S?o:-o)).lineTo(o,c-(S?o:-o)).arcTo(o,o,0,!1,!S,o*2,c).lineTo(w,c);d.append("path").attr("class","railroad-line").attr("d",R.build());let M=new k,Y=w+h.dimensions.width,q=m-o*2;if(c===p)M.moveTo(Y,c).lineTo(m,p);else M.moveTo(Y,c).lineTo(q,c).arcTo(o,o,0,!1,!S,m-o,c+(S?-o:o)).lineTo(m-o,p+(S?o:-o)).arcTo(o,o,0,!1,S,m,p);d.append("path").attr("class","railroad-line").attr("d",M.build()),f+=h.dimensions.height+this.config.verticalSeparation}return{element:d.node(),dimensions:{width:m,height:r,up:p,down:r-p}}}renderOptional(e,n){let s=this.renderExpression(e,n),i=this.config.arcRadius,r=i*2,o=s.dimensions.width+i*4,g=s.dimensions.height+r,m=e.append("g").attr("class","railroad-optional"),d=i*2,f=r;m.node().appendChild(s.element).setAttribute("transform",`translate(${d}, ${f})`);let h=f+s.dimensions.up,v=new k().moveTo(0,h).lineTo(i*2,h);m.append("path").attr("class","railroad-line").attr("d",v.build());let c=new k().moveTo(d+s.dimensions.width,h).lineTo(o,h);m.append("path").attr("class","railroad-line").attr("d",c.build());let w=new k().moveTo(0,h).arcTo(i,i,0,!1,!1,i,h-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,h-i).arcTo(i,i,0,!1,!1,o,h);return m.append("path").attr("class","railroad-line").attr("d",w.build()),{element:m.node(),dimensions:{width:o,height:g,up:h,down:g-h}}}renderRepetition(e,n,s){let i=this.renderExpression(e,n),r=this.config.arcRadius,o=r*2,g=i.dimensions.width+r*4,m=s===0,d=i.dimensions.height+o+(m?o:0),f=e.append("g").attr("class","railroad-repetition"),p=r*2,h=m?o:0;f.node().appendChild(i.element).setAttribute("transform",`translate(${p}, ${h})`);let c=h+i.dimensions.up;f.append("path").attr("class","railroad-line").attr("d",new k().moveTo(0,c).lineTo(r*2,c).build()),f.append("path").attr("class","railroad-line").attr("d",new k().moveTo(p+i.dimensions.width,c).lineTo(g,c).build());let w=h+i.dimensions.height+r,N=new k().moveTo(p+i.dimensions.width,c).arcTo(r,r,0,!1,!0,p+i.dimensions.width+r,c+r).lineTo(p+i.dimensions.width+r,w).arcTo(r,r,0,!1,!0,p+i.dimensions.width,w+r).lineTo(r*2,w+r).arcTo(r,r,0,!1,!0,r,w).lineTo(r,c+r).arcTo(r,r,0,!1,!0,r*2,c);if(f.append("path").attr("class","railroad-line").attr("d",N.build()),m){let R=new k().moveTo(0,c).arcTo(r,r,0,!1,!1,r,c-r).lineTo(r,r).arcTo(r,r,0,!1,!0,r*2,0).lineTo(g-r*2,0).arcTo(r,r,0,!1,!0,g-r,r).lineTo(g-r,c-r).arcTo(r,r,0,!1,!1,g,c);f.append("path").attr("class","railroad-line").attr("d",R.build())}return{element:f.node(),dimensions:{width:g,height:d,up:c,down:d-c}}}renderSpecial(e,n){let s=this.measureText("? "+n+" ?"),i=s.width+this.config.padding*2,r=s.height+this.config.padding*2,o=e.append("g").attr("class","railroad-special");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r),o.append("text").attr("x",i/2).attr("y",r/2).text("? "+n+" ?"),{element:o.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderExpression(e,n){switch(n.type){case"terminal":return this.renderTerminal(e,n.value);case"nonterminal":return this.renderNonTerminal(e,n.name);case"sequence":return this.renderSequence(e,n.elements);case"choice":return this.renderChoice(e,n.alternatives);case"optional":return this.renderOptional(e,n.element);case"repetition":return this.renderRepetition(e,n.element,n.min);case"special":return this.renderSpecial(e,n.text);default:throw Error(`Unknown node type: ${n.type}`)}}renderRule(e,n){let s=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${n})`),i=e.name+" =",r=this.measureText(i).width+20,o=r+20,g=s.append("g"),m=this.renderExpression(g,e.definition),d=Math.max(20,m.dimensions.up),f=d-m.dimensions.up;return g.attr("transform",`translate(${o}, ${f})`),s.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",d).text(i),s.append("g").attr("class","railroad-start").append("circle").attr("cx",r).attr("cy",d).attr("r",this.config.markerRadius),s.append("g").attr("class","railroad-end").append("circle").attr("cx",o+m.dimensions.width+10).attr("cy",d).attr("r",this.config.markerRadius),s.append("path").attr("class","railroad-line").attr("d",new k().moveTo(r+this.config.markerRadius,d).lineTo(o,d).build()),s.append("path").attr("class","railroad-line").attr("d",new k().moveTo(o+m.dimensions.width,d).lineTo(o+m.dimensions.width+10-this.config.markerRadius,d).build()),{height:Math.max(40,f+m.dimensions.height+this.config.padding*2),width:o+m.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let n=this.config.padding,s=0;for(let i of e){let r=this.renderRule(i,n);n+=r.height+this.config.verticalSeparation,s=Math.max(s,r.width)}return{width:s+this.config.padding*2,height:n+this.config.padding}}},P=t((e,n,s)=>{F(e,n.height,n.width,s),e.attr("viewBox",`0 0 ${n.width} ${n.height}`)},"configureRailroadSvgSize"),he=t((e,n,s)=>{a.debug(`[Railroad] Rendering diagram
88
- `+e);try{let i=V(n);i.attr("class","railroad-diagram");let o=x().railroad?.useMaxWidth??!0,g=J.getRules();if(a.debug(`[Railroad] Rendering ${g.length} rules`),g.length===0){a.warn("[Railroad] No rules to render"),P(i,{height:100,width:200},o);return}let d=new me(i,B()).renderDiagram(g);P(i,d,o),a.debug("[Railroad] Render complete")}catch(i){throw a.error("[Railroad] Render error:",i),i}},"draw"),Mt={draw:he};
89
- export{J,Dt,Mt};
88
+ `+e);try{let i=V(n);i.attr("class","railroad-diagram");let o=x().railroad?.useMaxWidth??!0,g=ee.getRules();if(a.debug(`[Railroad] Rendering ${g.length} rules`),g.length===0){a.warn("[Railroad] No rules to render"),P(i,{height:100,width:200},o);return}let d=new me(i,B()).renderDiagram(g);P(i,d,o),a.debug("[Railroad] Render complete")}catch(i){throw a.error("[Railroad] Render error:",i),i}},"draw"),Nt={draw:he};
89
+ export{ee,Dt,Nt};
@@ -0,0 +1 @@
1
+ import{t,a}from"./chunk-zsat72qd.js";import{ee,Dt,Nt}from"./chunk-c7fqrs8j.js";import{H}from"./chunk-p79c7aak.js";import{ir,wt}from"./chunk-p4pqtybm.js";var o=ir().Railroad.parser.LangiumParser,n=t((e)=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{let r=e.elements.map(n);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{let r=e.alternatives.map(n);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:n(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:n(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:n(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),l=t((e)=>({name:e.name,definition:n(e.definition)}),"transformRule"),s=t((e)=>{if(H(e,ee),e.title)ee.setTitle(e.title);e.rules.map((r)=>ee.addRule(l(r)))},"populateDb"),m={parse:t((e)=>{ee.clear(),a.debug("[Railroad Parser] Starting Langium parse");let r=o.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new wt(r);let i=r.value;a.debug("[Railroad Parser] Parsed rules:",i.rules.length),s(i),a.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:ee}},R={parser:m,db:ee,renderer:Nt,styles:Dt};export{R as diagram};
@@ -0,0 +1 @@
1
+ import{Oi}from"./chunk-p4pqtybm.js";export{Oi as createEventModelingServices};
@@ -1,4 +1,4 @@
1
- import{H}from"./chunk-jyf7a7yp.js";import{t,a,we,M,x,F,C,S,E,T,A,L,R,p,V,Yr,k,U}from"./chunk-b5zf1hs3.js";import{Pt}from"./chunk-qp3tjhaq.js";import{Q}from"./chunk-n9v14vyd.js";import{Qe}from"./chunk-1zwc09e8.js";import{ue}from"./chunk-qdd3bx8q.js";function Ye(e){var n=0,l=e.children,o=l&&l.length;if(!o)n=1;else while(--o>=0)n+=l[o].value;e.value=n}function ge(){return this.eachAfter(Ye)}function ye(e,n){let l=-1;for(let o of this)e.call(n,o,++l,this);return this}function xe(e,n){var l=this,o=[l],s,d,f=-1;while(l=o.pop())if(e.call(n,l,++f,this),s=l.children)for(d=s.length-1;d>=0;--d)o.push(s[d]);return this}function Se(e,n){var l=this,o=[l],s=[],d,f,h,b=-1;while(l=o.pop())if(s.push(l),d=l.children)for(f=0,h=d.length;f<h;++f)o.push(d[f]);while(l=s.pop())e.call(n,l,++b,this);return this}function ve(e,n){let l=-1;for(let o of this)if(e.call(n,o,++l,this))return o}function be(e){return this.eachAfter(function(n){var l=+e(n.data)||0,o=n.children,s=o&&o.length;while(--s>=0)l+=o[s].value;n.value=l})}function Ce(e){return this.eachBefore(function(n){if(n.children)n.children.sort(e)})}function Te(e){var n=this,l=je(n,e),o=[n];while(n!==l)n=n.parent,o.push(n);var s=o.length;while(e!==l)o.splice(s,0,e),e=e.parent;return o}function je(e,n){if(e===n)return e;var l=e.ancestors(),o=n.ancestors(),s=null;e=l.pop(),n=o.pop();while(e===n)s=e,e=l.pop(),n=o.pop();return s}function Le(){var e=this,n=[e];while(e=e.parent)n.push(e);return n}function $e(){return Array.from(this)}function Ae(){var e=[];return this.eachBefore(function(n){if(!n.children)e.push(n)}),e}function Fe(){var e=this,n=[];return e.each(function(l){if(l!==e)n.push({source:l.parent,target:l})}),n}function*Ne(){var e=this,n,l=[e],o,s,d;do{n=l.reverse(),l=[];while(e=n.pop())if(yield e,o=e.children)for(s=0,d=o.length;s<d;++s)l.push(o[s])}while(l.length)}function re(e,n){if(e instanceof Map){if(e=[void 0,e],n===void 0)n=Je}else if(n===void 0)n=Ue;var l=new ie(e),o,s=[l],d,f,h,b;while(o=s.pop())if((f=n(o.data))&&(b=(f=Array.from(f)).length)){o.children=f;for(h=b-1;h>=0;--h)s.push(d=f[h]=new ie(f[h])),d.parent=o,d.depth=o.depth+1}return l.eachBefore(et)}function Ze(){return re(this).eachBefore(Ke)}function Ue(e){return e.children}function Je(e){return Array.isArray(e)?e[1]:null}function Ke(e){if(e.data.value!==void 0)e.value=e.data.value;e.data=e.data.data}function et(e){var n=0;do e.height=n;while((e=e.parent)&&e.height<++n)}function ie(e){this.data=e,this.depth=this.height=0,this.parent=null}ie.prototype=re.prototype={constructor:ie,count:ge,each:ye,eachAfter:Se,eachBefore:xe,find:ve,sum:be,sort:Ce,path:Te,ancestors:Le,descendants:$e,leaves:Ae,links:Fe,copy:Ze,[Symbol.iterator]:Ne};function Be(e){if(typeof e!=="function")throw Error();return e}function ne(){return 0}function K(e){return function(){return e}}function ke(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Me(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(o-n)/e.value;while(++h<b)f=d[h],f.y0=l,f.y1=s,f.x0=n,f.x1=n+=f.value*u}function _e(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(s-l)/e.value;while(++h<b)f=d[h],f.x0=n,f.x1=o,f.y0=l,f.y1=l+=f.value*u}var tt=(1+Math.sqrt(5))/2;function at(e,n,l,o,s,d){var f=[],h=n.children,b,u,m=0,D=0,i=h.length,z,N,_=n.value,g,w,X,q,ee,oe,Y;while(m<i){z=s-l,N=d-o;do g=h[D++].value;while(!g&&D<i);w=X=g,oe=Math.max(N/z,z/N)/(_*e),Y=g*g*oe,ee=Math.max(X/Y,Y/w);for(;D<i;++D){if(g+=u=h[D].value,u<w)w=u;if(u>X)X=u;if(Y=g*g*oe,q=Math.max(X/Y,Y/w),q>ee){g-=u;break}ee=q}if(f.push(b={value:g,dice:z<N,children:h.slice(m,D)}),b.dice)Me(b,l,o,s,_?o+=N*g/_:d);else _e(b,l,o,_?l+=z*g/_:s,d);_-=g,m=D}return f}var Ee=function e(n){function l(o,s,d,f,h){at(n,o,s,d,f,h)}return l.ratio=function(o){return e((o=+o)>1?o:1)},l}(tt);function fe(){var e=Ee,n=!1,l=1,o=1,s=[0],d=ne,f=ne,h=ne,b=ne,u=ne;function m(i){if(i.x0=i.y0=0,i.x1=l,i.y1=o,i.eachBefore(D),s=[0],n)i.eachBefore(ke);return i}function D(i){var z=s[i.depth],N=i.x0+z,_=i.y0+z,g=i.x1-z,w=i.y1-z;if(g<N)N=g=(N+g)/2;if(w<_)_=w=(_+w)/2;if(i.x0=N,i.y0=_,i.x1=g,i.y1=w,i.children){if(z=s[i.depth+1]=d(i)/2,N+=u(i)-z,_+=f(i)-z,g-=h(i)-z,w-=b(i)-z,g<N)N=g=(N+g)/2;if(w<_)_=w=(_+w)/2;e(i,N,_,g,w)}}return m.round=function(i){return arguments.length?(n=!!i,m):n},m.size=function(i){return arguments.length?(l=+i[0],o=+i[1],m):[l,o]},m.tile=function(i){return arguments.length?(e=Be(i),m):e},m.padding=function(i){return arguments.length?m.paddingInner(i).paddingOuter(i):m.paddingInner()},m.paddingInner=function(i){return arguments.length?(d=typeof i==="function"?i:K(+i),m):d},m.paddingOuter=function(i){return arguments.length?m.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):m.paddingTop()},m.paddingTop=function(i){return arguments.length?(f=typeof i==="function"?i:K(+i),m):f},m.paddingRight=function(i){return arguments.length?(h=typeof i==="function"?i:K(+i),m):h},m.paddingBottom=function(i){return arguments.length?(b=typeof i==="function"?i:K(+i),m):b},m.paddingLeft=function(i){return arguments.length?(u=typeof i==="function"?i:K(+i),m):u},m}var Re=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getAccDescription=A,this.setAccDescription=T}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=M,n=x();return U({...e.treemap,...n.treemap??{}})}addNode(e,n){if(this.nodes.push(e),this.levels.set(e,n),n===0)this.outerNodes.push(e),this.root??=e}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,n){let l=this.classes.get(e)??{id:e,styles:[],textStyles:[]},o=n.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(Yr(s))if(l?.textStyles)l.textStyles.push(s);else l.textStyles=[s];if(l?.styles)l.styles.push(s);else l.styles=[s]});this.classes.set(e,l)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){C(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function We(e){if(!e.length)return[];let n=[],l=[];return e.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(l.length>0&&l[l.length-1].level>=o.level)l.pop();if(l.length===0)n.push(s);else{let d=l[l.length-1].node;if(d.children)d.children.push(s);else d.children=[s]}if(o.type!=="Leaf")l.push({node:s,level:o.level})}),n}t(We,"buildHierarchy");var rt=t((e,n)=>{H(e,n);let l=[];for(let d of e.TreemapRows??[])if(d.$type==="ClassDefStatement")n.addClass(d.className??"",d.styleText??"");for(let d of e.TreemapRows??[]){let f=d.item;if(!f)continue;let h=d.indent?parseInt(d.indent):0,b=nt(f),u=f.classSelector?n.getStylesForClass(f.classSelector):[],m=u.length>0?u:void 0,D={level:h,name:b,type:f.$type,value:f.value,classSelector:f.classSelector,cssCompiledStyles:m};l.push(D)}let o=We(l),s=t((d,f)=>{for(let h of d)if(n.addNode(h,f),h.children&&h.children.length>0)s(h.children,f+1)},"addNodesRecursively");s(o,0)},"populate"),nt=t((e)=>e.name?String(e.name):"","getItemName"),He={parser:{yy:void 0},parse:t(async(e)=>{try{let l=await Q("treemap",e);a.debug("Treemap AST:",l);let o=He.parser?.yy;if(!(o instanceof Re))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(l,o)}catch(n){throw a.error("Error parsing treemap:",n),n}},"parse")},lt=10,le=10,ce=25,ot=t((e,n,l,o)=>{let s=o.db,d=s.getConfig(),f=d.padding??lt,h=s.getDiagramTitle(),b=s.getRoot(),{themeVariables:u}=x();if(!b)return;let m=h?30:0,D=V(n),i=d.nodeWidth?d.nodeWidth*le:960,z=d.nodeHeight?d.nodeHeight*le:500,N=i,_=z+m;D.attr("viewBox",`0 0 ${N} ${_}`),F(D,_,N,d.useMaxWidth);let g;try{let r=d.valueFormat||",";if(r==="$0,0")g=t((c)=>"$"+Pt(",")(c),"valueFormat");else if(r.startsWith("$")&&r.includes(",")){let c=/\.\d+/.exec(r),y=c?c[0]:"";g=t((P)=>"$"+Pt(","+y)(P),"valueFormat")}else if(r.startsWith("$")){let c=r.substring(1);g=t((y)=>"$"+Pt(c||"")(y),"valueFormat")}else g=Pt(r)}catch(r){a.error("Error creating format function:",r),g=Pt(",")}let w=Qe().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),X=Qe().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),q=Qe().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);if(h)D.append("text").attr("x",N/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let ee=D.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),oe=re(b).sum((r)=>r.value??0).sort((r,c)=>(c.value??0)-(r.value??0)),ze=fe().size([i,z]).paddingTop((r)=>r.children&&r.children.length>0?ce+le:0).paddingInner(f).paddingLeft((r)=>r.children&&r.children.length>0?le:0).paddingRight((r)=>r.children&&r.children.length>0?le:0).paddingBottom((r)=>r.children&&r.children.length>0?le:0).round(!0)(oe),Ie=ze.descendants().filter((r)=>r.children&&r.children.length>0),se=ee.selectAll(".treemapSection").data(Ie).enter().append("g").attr("class","treemapSection").attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",ce).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(r)=>{if(r.depth===0)return"display: none;";return""}),se.append("clipPath").attr("id",(r,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-12)).attr("height",ce),se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class",(r,c)=>`treemapSection section${c}`).attr("fill",(r)=>w(r.data.name)).attr("fill-opacity",0.6).attr("stroke",(r)=>X(r.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c=k({cssCompiledStyles:r.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),se.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",ce/2).attr("dominant-baseline","middle").text((r)=>r.depth===0?"":r.data.name).attr("font-weight","bold").attr("clip-path",(r,c)=>`url(#clip-section-${n}-${c})`).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+q(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).each(function(r){if(r.depth===0)return;let c=p(this),y=r.data.name;c.text(y);let P=r.x1-r.x0,W=6,B;if(d.showValues!==!1&&r.value){let O=P-10,J=30,Ge=10;B=O-30-10-W}else B=P-W-6;let v=Math.max(15,B),Z=c.node();if(Z.getComputedTextLength()>v){let J=y;while(J.length>0){if(J=y.substring(0,J.length-1),J.length===0){if(c.text("..."),Z.getComputedTextLength()>v)c.text("");break}if(c.text(J+"..."),Z.getComputedTextLength()<=v)break}}}),d.showValues!==!1)se.append("text").attr("class","treemapSectionValue").attr("x",(r)=>r.x1-r.x0-10).attr("y",ce/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((r)=>r.value?g(r.value):"").attr("font-style","italic").attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+q(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")});let De=ze.leaves(),G=De.length>20,Oe=G?16:38,pe=G?14:28,te=G?4:8,ae=G?4:6,he=G?2:4,Ve=G?8:10,me=G?1:2,de=ee.selectAll(".treemapLeafGroup").data(De).enter().append("g").attr("class",(r,c)=>`treemapNode treemapLeafGroup leaf${c}${r.data.classSelector?` ${r.data.classSelector}`:""}x`).attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(de.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class","treemapLeaf").attr("fill",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("style",(r)=>k({cssCompiledStyles:r.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("stroke-width",3),de.append("clipPath").attr("id",(r,c)=>`clip-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-4)).attr("height",(r)=>Math.max(0,r.y1-r.y0-4)),de.append("text").attr("class","treemapLabel").attr("x",(r)=>(r.x1-r.x0)/2).attr("y",(r)=>(r.y1-r.y0)/2).attr("style",(r)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Oe}px;fill:`+q(r.data.name)+";",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).attr("clip-path",(r,c)=>`url(#clip-${n}-${c})`).text((r)=>r.data.name).each(function(r){let c=p(this),y=r.x1-r.x0,P=r.y1-r.y0,W=c.node(),B=y-2*he,j=P-2*he;if(B<Ve||j<Ve){c.style("display","none");return}let v=parseInt(c.style("font-size"),10),Z=0.6;while(W.getComputedTextLength()>B&&v>te)v--,c.style("font-size",`${v}px`);let I=Math.max(ae,Math.min(pe,Math.round(v*Z))),O=v+me+I;while(O>j&&v>te){if(v--,I=Math.max(ae,Math.min(pe,Math.round(v*Z))),I<ae&&v===te)break;if(c.style("font-size",`${v}px`),O=v+me+I,I<=ae&&O>j);}if(c.style("font-size",`${v}px`),G){if(v<te||j<te)c.style("display","none")}else if(W.getComputedTextLength()>B||v<te||j<v)c.style("display","none")}),d.showValues!==!1)de.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let y=`text-anchor: middle; dominant-baseline: hanging; font-size: ${pe}px;fill:`+q(c.data.name)+";",P=k({cssCompiledStyles:c.data.cssCompiledStyles});return y+P.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,y)=>`url(#clip-${n}-${y})`).text((c)=>c.value?g(c.value):"").each(function(c){let y=p(this),P=this.parentNode;if(!P){y.style("display","none");return}let W=p(P).select(".treemapLabel");if(W.empty()||W.style("display")==="none"){y.style("display","none");return}let B=parseFloat(W.style("font-size")),v=Math.max(ae,Math.min(pe,Math.round(B*0.6)));y.style("font-size",`${v}px`);let I=(c.y1-c.y0)/2+B/2+me;y.attr("y",I);let O=c.x1-c.x0,Pe=c.y1-c.y0-4,Xe=O-2*he;if(y.node().getComputedTextLength()>Xe||I+v>Pe||v<ae)y.style("display","none");else y.style("display",null)});let qe=d.diagramPadding??8;ue(D,qe,"flowchart",d?.useMaxWidth||!1)},"draw"),st=t(function(e,n){return n.db.getClasses()},"getClasses"),it={draw:ot,getClasses:st},ct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=t(({treemap:e}={})=>{let n=we(),l=x(),o=U(n,l.themeVariables),s=U(ct,e),d=s.titleColor??o.titleColor,f=s.labelColor??o.textColor,h=s.valueColor??o.textColor;return`
1
+ import{H}from"./chunk-p79c7aak.js";import{t,a,we,N,x,F,C,S,E,T,A,L,R,p,V,Qr,k,j}from"./chunk-zsat72qd.js";import{Pt}from"./chunk-vwv6pqy7.js";import{J}from"./chunk-p4pqtybm.js";import{Qe}from"./chunk-1zwc09e8.js";import{ue}from"./chunk-51b8n5e1.js";function Ye(e){var n=0,l=e.children,o=l&&l.length;if(!o)n=1;else while(--o>=0)n+=l[o].value;e.value=n}function ge(){return this.eachAfter(Ye)}function ye(e,n){let l=-1;for(let o of this)e.call(n,o,++l,this);return this}function xe(e,n){var l=this,o=[l],s,d,f=-1;while(l=o.pop())if(e.call(n,l,++f,this),s=l.children)for(d=s.length-1;d>=0;--d)o.push(s[d]);return this}function Se(e,n){var l=this,o=[l],s=[],d,f,h,b=-1;while(l=o.pop())if(s.push(l),d=l.children)for(f=0,h=d.length;f<h;++f)o.push(d[f]);while(l=s.pop())e.call(n,l,++b,this);return this}function ve(e,n){let l=-1;for(let o of this)if(e.call(n,o,++l,this))return o}function be(e){return this.eachAfter(function(n){var l=+e(n.data)||0,o=n.children,s=o&&o.length;while(--s>=0)l+=o[s].value;n.value=l})}function Ce(e){return this.eachBefore(function(n){if(n.children)n.children.sort(e)})}function Te(e){var n=this,l=je(n,e),o=[n];while(n!==l)n=n.parent,o.push(n);var s=o.length;while(e!==l)o.splice(s,0,e),e=e.parent;return o}function je(e,n){if(e===n)return e;var l=e.ancestors(),o=n.ancestors(),s=null;e=l.pop(),n=o.pop();while(e===n)s=e,e=l.pop(),n=o.pop();return s}function Le(){var e=this,n=[e];while(e=e.parent)n.push(e);return n}function $e(){return Array.from(this)}function Ae(){var e=[];return this.eachBefore(function(n){if(!n.children)e.push(n)}),e}function Fe(){var e=this,n=[];return e.each(function(l){if(l!==e)n.push({source:l.parent,target:l})}),n}function*Ne(){var e=this,n,l=[e],o,s,d;do{n=l.reverse(),l=[];while(e=n.pop())if(yield e,o=e.children)for(s=0,d=o.length;s<d;++s)l.push(o[s])}while(l.length)}function re(e,n){if(e instanceof Map){if(e=[void 0,e],n===void 0)n=Je}else if(n===void 0)n=Ue;var l=new ie(e),o,s=[l],d,f,h,b;while(o=s.pop())if((f=n(o.data))&&(b=(f=Array.from(f)).length)){o.children=f;for(h=b-1;h>=0;--h)s.push(d=f[h]=new ie(f[h])),d.parent=o,d.depth=o.depth+1}return l.eachBefore(et)}function Ze(){return re(this).eachBefore(Ke)}function Ue(e){return e.children}function Je(e){return Array.isArray(e)?e[1]:null}function Ke(e){if(e.data.value!==void 0)e.value=e.data.value;e.data=e.data.data}function et(e){var n=0;do e.height=n;while((e=e.parent)&&e.height<++n)}function ie(e){this.data=e,this.depth=this.height=0,this.parent=null}ie.prototype=re.prototype={constructor:ie,count:ge,each:ye,eachAfter:Se,eachBefore:xe,find:ve,sum:be,sort:Ce,path:Te,ancestors:Le,descendants:$e,leaves:Ae,links:Fe,copy:Ze,[Symbol.iterator]:Ne};function Be(e){if(typeof e!=="function")throw Error();return e}function ne(){return 0}function Q(e){return function(){return e}}function ke(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Me(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(o-n)/e.value;while(++h<b)f=d[h],f.y0=l,f.y1=s,f.x0=n,f.x1=n+=f.value*u}function _e(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(s-l)/e.value;while(++h<b)f=d[h],f.x0=n,f.x1=o,f.y0=l,f.y1=l+=f.value*u}var tt=(1+Math.sqrt(5))/2;function at(e,n,l,o,s,d){var f=[],h=n.children,b,u,m=0,D=0,i=h.length,z,M,_=n.value,g,w,X,q,ee,oe,Y;while(m<i){z=s-l,M=d-o;do g=h[D++].value;while(!g&&D<i);w=X=g,oe=Math.max(M/z,z/M)/(_*e),Y=g*g*oe,ee=Math.max(X/Y,Y/w);for(;D<i;++D){if(g+=u=h[D].value,u<w)w=u;if(u>X)X=u;if(Y=g*g*oe,q=Math.max(X/Y,Y/w),q>ee){g-=u;break}ee=q}if(f.push(b={value:g,dice:z<M,children:h.slice(m,D)}),b.dice)Me(b,l,o,s,_?o+=M*g/_:d);else _e(b,l,o,_?l+=z*g/_:s,d);_-=g,m=D}return f}var Ee=function e(n){function l(o,s,d,f,h){at(n,o,s,d,f,h)}return l.ratio=function(o){return e((o=+o)>1?o:1)},l}(tt);function fe(){var e=Ee,n=!1,l=1,o=1,s=[0],d=ne,f=ne,h=ne,b=ne,u=ne;function m(i){if(i.x0=i.y0=0,i.x1=l,i.y1=o,i.eachBefore(D),s=[0],n)i.eachBefore(ke);return i}function D(i){var z=s[i.depth],M=i.x0+z,_=i.y0+z,g=i.x1-z,w=i.y1-z;if(g<M)M=g=(M+g)/2;if(w<_)_=w=(_+w)/2;if(i.x0=M,i.y0=_,i.x1=g,i.y1=w,i.children){if(z=s[i.depth+1]=d(i)/2,M+=u(i)-z,_+=f(i)-z,g-=h(i)-z,w-=b(i)-z,g<M)M=g=(M+g)/2;if(w<_)_=w=(_+w)/2;e(i,M,_,g,w)}}return m.round=function(i){return arguments.length?(n=!!i,m):n},m.size=function(i){return arguments.length?(l=+i[0],o=+i[1],m):[l,o]},m.tile=function(i){return arguments.length?(e=Be(i),m):e},m.padding=function(i){return arguments.length?m.paddingInner(i).paddingOuter(i):m.paddingInner()},m.paddingInner=function(i){return arguments.length?(d=typeof i==="function"?i:Q(+i),m):d},m.paddingOuter=function(i){return arguments.length?m.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):m.paddingTop()},m.paddingTop=function(i){return arguments.length?(f=typeof i==="function"?i:Q(+i),m):f},m.paddingRight=function(i){return arguments.length?(h=typeof i==="function"?i:Q(+i),m):h},m.paddingBottom=function(i){return arguments.length?(b=typeof i==="function"?i:Q(+i),m):b},m.paddingLeft=function(i){return arguments.length?(u=typeof i==="function"?i:Q(+i),m):u},m}var Re=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getAccDescription=A,this.setAccDescription=T}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=N,n=x();return j({...e.treemap,...n.treemap??{}})}addNode(e,n){if(this.nodes.push(e),this.levels.set(e,n),n===0)this.outerNodes.push(e),this.root??=e}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,n){let l=this.classes.get(e)??{id:e,styles:[],textStyles:[]},o=n.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(Qr(s))if(l?.textStyles)l.textStyles.push(s);else l.textStyles=[s];if(l?.styles)l.styles.push(s);else l.styles=[s]});this.classes.set(e,l)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){C(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function We(e){if(!e.length)return[];let n=[],l=[];return e.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(l.length>0&&l[l.length-1].level>=o.level)l.pop();if(l.length===0)n.push(s);else{let d=l[l.length-1].node;if(d.children)d.children.push(s);else d.children=[s]}if(o.type!=="Leaf")l.push({node:s,level:o.level})}),n}t(We,"buildHierarchy");var rt=t((e,n)=>{H(e,n);let l=[];for(let d of e.TreemapRows??[])if(d.$type==="ClassDefStatement")n.addClass(d.className??"",d.styleText??"");for(let d of e.TreemapRows??[]){let f=d.item;if(!f)continue;let h=d.indent?parseInt(d.indent):0,b=nt(f),u=f.classSelector?n.getStylesForClass(f.classSelector):[],m=u.length>0?u:void 0,D={level:h,name:b,type:f.$type,value:f.value,classSelector:f.classSelector,cssCompiledStyles:m};l.push(D)}let o=We(l),s=t((d,f)=>{for(let h of d)if(n.addNode(h,f),h.children&&h.children.length>0)s(h.children,f+1)},"addNodesRecursively");s(o,0)},"populate"),nt=t((e)=>e.name?String(e.name):"","getItemName"),He={parser:{yy:void 0},parse:t(async(e)=>{try{let l=await J("treemap",e);a.debug("Treemap AST:",l);let o=He.parser?.yy;if(!(o instanceof Re))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(l,o)}catch(n){throw a.error("Error parsing treemap:",n),n}},"parse")},lt=10,le=10,ce=25,ot=t((e,n,l,o)=>{let s=o.db,d=s.getConfig(),f=d.padding??lt,h=s.getDiagramTitle(),b=s.getRoot(),{themeVariables:u}=x();if(!b)return;let m=h?30:0,D=V(n),i=d.nodeWidth?d.nodeWidth*le:960,z=d.nodeHeight?d.nodeHeight*le:500,M=i,_=z+m;D.attr("viewBox",`0 0 ${M} ${_}`),F(D,_,M,d.useMaxWidth);let g;try{let r=d.valueFormat||",";if(r==="$0,0")g=t((c)=>"$"+Pt(",")(c),"valueFormat");else if(r.startsWith("$")&&r.includes(",")){let c=/\.\d+/.exec(r),y=c?c[0]:"";g=t((P)=>"$"+Pt(","+y)(P),"valueFormat")}else if(r.startsWith("$")){let c=r.substring(1);g=t((y)=>"$"+Pt(c||"")(y),"valueFormat")}else g=Pt(r)}catch(r){a.error("Error creating format function:",r),g=Pt(",")}let w=Qe().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),X=Qe().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),q=Qe().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);if(h)D.append("text").attr("x",M/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let ee=D.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),oe=re(b).sum((r)=>r.value??0).sort((r,c)=>(c.value??0)-(r.value??0)),ze=fe().size([i,z]).paddingTop((r)=>r.children&&r.children.length>0?ce+le:0).paddingInner(f).paddingLeft((r)=>r.children&&r.children.length>0?le:0).paddingRight((r)=>r.children&&r.children.length>0?le:0).paddingBottom((r)=>r.children&&r.children.length>0?le:0).round(!0)(oe),Ie=ze.descendants().filter((r)=>r.children&&r.children.length>0),se=ee.selectAll(".treemapSection").data(Ie).enter().append("g").attr("class","treemapSection").attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",ce).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(r)=>{if(r.depth===0)return"display: none;";return""}),se.append("clipPath").attr("id",(r,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-12)).attr("height",ce),se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class",(r,c)=>`treemapSection section${c}`).attr("fill",(r)=>w(r.data.name)).attr("fill-opacity",0.6).attr("stroke",(r)=>X(r.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c=k({cssCompiledStyles:r.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),se.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",ce/2).attr("dominant-baseline","middle").text((r)=>r.depth===0?"":r.data.name).attr("font-weight","bold").attr("clip-path",(r,c)=>`url(#clip-section-${n}-${c})`).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+q(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).each(function(r){if(r.depth===0)return;let c=p(this),y=r.data.name;c.text(y);let P=r.x1-r.x0,W=6,B;if(d.showValues!==!1&&r.value){let O=P-10,K=30,Ge=10;B=O-30-10-W}else B=P-W-6;let v=Math.max(15,B),U=c.node();if(U.getComputedTextLength()>v){let K=y;while(K.length>0){if(K=y.substring(0,K.length-1),K.length===0){if(c.text("..."),U.getComputedTextLength()>v)c.text("");break}if(c.text(K+"..."),U.getComputedTextLength()<=v)break}}}),d.showValues!==!1)se.append("text").attr("class","treemapSectionValue").attr("x",(r)=>r.x1-r.x0-10).attr("y",ce/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((r)=>r.value?g(r.value):"").attr("font-style","italic").attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+q(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")});let De=ze.leaves(),G=De.length>20,Oe=G?16:38,pe=G?14:28,te=G?4:8,ae=G?4:6,he=G?2:4,Ve=G?8:10,me=G?1:2,de=ee.selectAll(".treemapLeafGroup").data(De).enter().append("g").attr("class",(r,c)=>`treemapNode treemapLeafGroup leaf${c}${r.data.classSelector?` ${r.data.classSelector}`:""}x`).attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(de.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class","treemapLeaf").attr("fill",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("style",(r)=>k({cssCompiledStyles:r.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("stroke-width",3),de.append("clipPath").attr("id",(r,c)=>`clip-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-4)).attr("height",(r)=>Math.max(0,r.y1-r.y0-4)),de.append("text").attr("class","treemapLabel").attr("x",(r)=>(r.x1-r.x0)/2).attr("y",(r)=>(r.y1-r.y0)/2).attr("style",(r)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Oe}px;fill:`+q(r.data.name)+";",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).attr("clip-path",(r,c)=>`url(#clip-${n}-${c})`).text((r)=>r.data.name).each(function(r){let c=p(this),y=r.x1-r.x0,P=r.y1-r.y0,W=c.node(),B=y-2*he,Z=P-2*he;if(B<Ve||Z<Ve){c.style("display","none");return}let v=parseInt(c.style("font-size"),10),U=0.6;while(W.getComputedTextLength()>B&&v>te)v--,c.style("font-size",`${v}px`);let I=Math.max(ae,Math.min(pe,Math.round(v*U))),O=v+me+I;while(O>Z&&v>te){if(v--,I=Math.max(ae,Math.min(pe,Math.round(v*U))),I<ae&&v===te)break;if(c.style("font-size",`${v}px`),O=v+me+I,I<=ae&&O>Z);}if(c.style("font-size",`${v}px`),G){if(v<te||Z<te)c.style("display","none")}else if(W.getComputedTextLength()>B||v<te||Z<v)c.style("display","none")}),d.showValues!==!1)de.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let y=`text-anchor: middle; dominant-baseline: hanging; font-size: ${pe}px;fill:`+q(c.data.name)+";",P=k({cssCompiledStyles:c.data.cssCompiledStyles});return y+P.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,y)=>`url(#clip-${n}-${y})`).text((c)=>c.value?g(c.value):"").each(function(c){let y=p(this),P=this.parentNode;if(!P){y.style("display","none");return}let W=p(P).select(".treemapLabel");if(W.empty()||W.style("display")==="none"){y.style("display","none");return}let B=parseFloat(W.style("font-size")),v=Math.max(ae,Math.min(pe,Math.round(B*0.6)));y.style("font-size",`${v}px`);let I=(c.y1-c.y0)/2+B/2+me;y.attr("y",I);let O=c.x1-c.x0,Pe=c.y1-c.y0-4,Xe=O-2*he;if(y.node().getComputedTextLength()>Xe||I+v>Pe||v<ae)y.style("display","none");else y.style("display",null)});let qe=d.diagramPadding??8;ue(D,qe,"flowchart",d?.useMaxWidth||!1)},"draw"),st=t(function(e,n){return n.db.getClasses()},"getClasses"),it={draw:ot,getClasses:st},ct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=t(({treemap:e}={})=>{let n=we(),l=x(),o=j(n,l.themeVariables),s=j(ct,e),d=s.titleColor??o.titleColor,f=s.labelColor??o.textColor,h=s.valueColor??o.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${s.sectionStrokeColor};
4
4
  stroke-width: ${s.sectionStrokeWidth};