@bkm016/basalt 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/README.md +53 -5
  2. package/{chunk-y648fzx0.js → chunk-0039s4jt.js} +3 -3
  3. package/{chunk-m40gxwq4.js → chunk-00gwse5r.js} +3 -3
  4. package/{chunk-t6zs4kw0.js → chunk-0fwdxd45.js} +2 -2
  5. package/{chunk-6hssbcgj.js → chunk-0j0qggej.js} +1 -1
  6. package/chunk-0n99m9m4.js +2 -0
  7. package/{chunk-d8gtbw9g.js → chunk-0stvywr8.js} +1 -1
  8. package/{chunk-ztsjgssj.js → chunk-1xa7d5mh.js} +1 -1
  9. package/chunk-2nb3d92s.js +2 -0
  10. package/chunk-2nkfxhef.js +3868 -0
  11. package/chunk-2pa1z37c.js +2 -0
  12. package/{chunk-fw2bpqmw.js → chunk-2qcpq99g.js} +1 -1
  13. package/{chunk-981f9dw8.js → chunk-36cqq0ga.js} +6 -6
  14. package/{chunk-3cjsd292.js → chunk-3c330qna.js} +2 -2
  15. package/chunk-3k627vf2.js +3 -0
  16. package/{chunk-r7fpkb49.js → chunk-3k7ejpkc.js} +1 -1
  17. package/chunk-4g5f43ea.js +3 -0
  18. package/{chunk-fjtvjrkg.js → chunk-539ekagy.js} +4 -4
  19. package/{chunk-97rzj7f6.js → chunk-5v4g21rw.js} +1 -1
  20. package/{chunk-aefadsy6.js → chunk-6dsq0fns.js} +2 -2
  21. package/{chunk-pbcy6zdt.js → chunk-7as47pcw.js} +1 -1
  22. package/{chunk-g2t6t8fk.js → chunk-7jezts2n.js} +2 -2
  23. package/{chunk-8tjad3r0.js → chunk-7qq99360.js} +6 -6
  24. package/{chunk-gp7y0fja.js → chunk-7tgqhveh.js} +15 -15
  25. package/{chunk-mvfsxdx6.js → chunk-7w0mefgk.js} +10 -10
  26. package/{chunk-y58ygzn9.js → chunk-818nd6s1.js} +3 -3
  27. package/{chunk-vv7fp27r.js → chunk-8mezk0cb.js} +2 -2
  28. package/{chunk-rtzqqngy.js → chunk-8xb636vr.js} +5 -5
  29. package/{chunk-2esbgxps.js → chunk-980drajf.js} +15 -15
  30. package/{chunk-c7x1zq39.js → chunk-9z7sdh5e.js} +3 -3
  31. package/{chunk-10xzzn07.js → chunk-a4b75ekk.js} +2 -2
  32. package/{chunk-5j1krv9v.js → chunk-ar3dbfp9.js} +1 -1
  33. package/{chunk-vk1gxk1t.js → chunk-aw65h276.js} +1 -1
  34. package/{chunk-75m78j7x.js → chunk-b9fqretv.js} +2 -2
  35. package/{chunk-y0m980k3.js → chunk-bgkegf0k.js} +22 -22
  36. package/{chunk-0y7ne3d0.js → chunk-bwawt15q.js} +2 -2
  37. package/{chunk-pxsrqrd0.js → chunk-c4qr1f41.js} +2 -2
  38. package/chunk-dddsrff6.js +478 -0
  39. package/{chunk-xfvvh1s5.js → chunk-e63c1186.js} +1 -1
  40. package/{chunk-8296hw9m.js → chunk-ebzkckyw.js} +2 -2
  41. package/chunk-eegztdzb.js +2 -0
  42. package/{chunk-hwr56pfj.js → chunk-gw05p4g3.js} +1 -1
  43. package/{chunk-k23t7vhs.js → chunk-h1rypb99.js} +5 -5
  44. package/{chunk-nbb9trwz.js → chunk-hq5ke1yp.js} +2 -2
  45. package/{chunk-jwdb0ccj.js → chunk-jvwg4rn1.js} +3 -3
  46. package/{chunk-fm0k0qtz.js → chunk-jyrwk08p.js} +2 -2
  47. package/chunk-kns4kv7b.js +3 -0
  48. package/{chunk-8d46jtbj.js → chunk-mat08ab1.js} +2 -2
  49. package/{chunk-bannb9xm.js → chunk-mkp28k1x.js} +2 -2
  50. package/{chunk-d2j735sd.js → chunk-npez1492.js} +2 -2
  51. package/{chunk-shadcb9z.js → chunk-nx3jnbv8.js} +2 -2
  52. package/{chunk-ykens1hy.js → chunk-nxkmd29x.js} +1 -1
  53. package/{chunk-y7nma9rk.js → chunk-pjr91g6k.js} +2 -2
  54. package/{chunk-m8vkwdgr.js → chunk-r0jc8e7t.js} +4 -4
  55. package/chunk-rxj6tct8.js +2 -0
  56. package/{chunk-362g64pd.js → chunk-sqaam5ak.js} +1 -1
  57. package/{chunk-gzxnene8.js → chunk-srjgvdvs.js} +12 -12
  58. package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
  59. package/{chunk-k6w6y71k.js → chunk-t7sc0wwc.js} +2 -2
  60. package/{chunk-27gntzs5.js → chunk-v4k3qmdm.js} +2 -2
  61. package/{chunk-x1xss1d7.js → chunk-vt1anydc.js} +4 -4
  62. package/chunk-wd3z74av.js +2 -0
  63. package/{chunk-z55bmysw.js → chunk-wfyrfvfn.js} +1 -1
  64. package/{chunk-v9fea96h.js → chunk-wnzvnskb.js} +2 -2
  65. package/{chunk-cjc90f84.js → chunk-x89em726.js} +3 -3
  66. package/{chunk-1qpces5a.js → chunk-xtq1xpq0.js} +2 -2
  67. package/chunk-yna8bwqc.js +2 -0
  68. package/{chunk-k506w58v.js → chunk-zn0g0859.js} +2 -2
  69. package/{chunk-qe0teyn1.js → chunk-zrkh5dw7.js} +1 -1
  70. package/chunk-zzwjt7fp.js +2 -0
  71. package/compiled.js +12 -12
  72. package/package.json +1 -1
  73. package/ui-test-worker.js +20 -20
  74. package/web/chunk-01hcjafh.js +2 -0
  75. package/web/{chunk-n8sky2q6.js → chunk-07agqp8h.js} +1 -1
  76. package/web/{chunk-tx8240k4.js → chunk-0k9aec1s.js} +20 -20
  77. package/web/{chunk-74j07k8k.js → chunk-0p1nmj5n.js} +2 -2
  78. package/web/chunk-0qr891eq.js +70 -0
  79. package/web/{chunk-ts7zrf5b.js → chunk-0whceqes.js} +2 -2
  80. package/web/chunk-0ytga215.js +1 -0
  81. package/web/{chunk-h288yd5w.js → chunk-12z7d0hp.js} +3 -3
  82. package/web/chunk-14bad871.js +2 -0
  83. package/web/chunk-1amzv4ha.js +1 -0
  84. package/web/chunk-1cfh0e2e.js +324 -0
  85. package/web/chunk-1pasbxwh.js +89 -0
  86. package/web/{chunk-j0bwwc1g.js → chunk-1s2hp6h1.js} +1 -1
  87. package/web/chunk-26bwh1sb.js +169 -0
  88. package/web/{chunk-b0a8nbj0.js → chunk-2nht58dc.js} +5 -5
  89. package/web/chunk-2y0rc1fe.js +1 -0
  90. package/web/chunk-3hkgdw6f.js +36 -0
  91. package/web/chunk-4a4j030b.js +1 -0
  92. package/web/{chunk-4fzj0azw.js → chunk-4m3zdd41.js} +6 -6
  93. package/web/chunk-4w298aqs.js +1 -0
  94. package/web/{chunk-2hd1pe9w.js → chunk-56krfj3b.js} +7 -7
  95. package/web/{chunk-ds7srg4p.js → chunk-5nda24gv.js} +1 -1
  96. package/web/{chunk-5hmfk69r.js → chunk-5shygfgb.js} +19 -19
  97. package/web/chunk-65nwc4cf.js +1 -0
  98. package/web/chunk-6bwgdvf6.js +1 -0
  99. package/web/chunk-6enn8p66.js +1 -0
  100. package/web/chunk-6stt9d18.js +1 -0
  101. package/web/{chunk-4gavbw65.js → chunk-7a3c137d.js} +1 -1
  102. package/web/chunk-7e47b1sn.js +1 -0
  103. package/web/chunk-7pypx5h8.js +2 -0
  104. package/web/chunk-7znyd1mj.js +39 -0
  105. package/web/{chunk-0z0jycs8.js → chunk-892nf39p.js} +7 -7
  106. package/web/chunk-8r0s8tx7.js +1 -0
  107. package/web/chunk-9dy7z3ej.js +2 -0
  108. package/web/chunk-9mq2cdtq.js +1 -0
  109. package/web/chunk-9w5tf22s.js +1 -0
  110. package/web/{chunk-es28k2t7.js → chunk-9xgspn75.js} +2 -2
  111. package/web/{chunk-0xc2c540.js → chunk-abhad4zj.js} +56 -56
  112. package/web/chunk-advfpyb9.js +140 -0
  113. package/web/chunk-affear07.js +3 -0
  114. package/web/chunk-ahztazsg.js +1 -0
  115. package/web/chunk-aqt7kc3s.js +106 -0
  116. package/web/chunk-b5hah4mf.js +1 -0
  117. package/web/chunk-b8tfetd8.js +1 -0
  118. package/web/{chunk-7yc083xj.js → chunk-bnb9xhgw.js} +15 -15
  119. package/web/{chunk-n1dmrz44.js → chunk-c01176kn.js} +2 -2
  120. package/web/chunk-c3nn0vvc.js +1 -0
  121. package/web/chunk-c53xmf48.js +30 -0
  122. package/web/chunk-ckgpy4r4.js +1 -0
  123. package/web/chunk-crzseqbx.js +24 -0
  124. package/web/chunk-d22wq71s.js +1 -0
  125. package/web/{chunk-97b62pvb.js → chunk-d60dpf69.js} +19 -19
  126. package/web/{chunk-sn9ecfvy.js → chunk-d6ddkh6e.js} +1 -1
  127. package/web/{chunk-cg3jterp.js → chunk-d9wdsjkk.js} +2 -2
  128. package/web/{chunk-ttg6tbwx.js → chunk-da7m1kva.js} +2 -2
  129. package/web/chunk-dbnrfxt1.js +8 -0
  130. package/web/chunk-ddxf8e84.js +1 -0
  131. package/web/chunk-dzg1pv80.js +200 -0
  132. package/web/{chunk-xnq41dgs.js → chunk-e8h45nyr.js} +1 -1
  133. package/web/chunk-ej9vb61c.js +1 -0
  134. package/web/chunk-f9k3xrwb.js +2 -0
  135. package/web/{chunk-7xk0ntav.js → chunk-fjag6yg8.js} +2 -2
  136. package/web/chunk-fnnrrzqa.js +78 -0
  137. package/web/{chunk-n90cqdvg.js → chunk-fv6vm14n.js} +2 -2
  138. package/web/{chunk-axkyft9f.js → chunk-g5jxwkdh.js} +1 -1
  139. package/web/{chunk-ep37qp12.js → chunk-g8kkc6vz.js} +1 -1
  140. package/web/chunk-g9sqbafw.js +2 -0
  141. package/web/{chunk-g46f421r.js → chunk-gcv91974.js} +4 -4
  142. package/web/{chunk-7qxhk1kz.js → chunk-gxqaa4sv.js} +7 -7
  143. package/web/chunk-gxsb5tx3.js +1 -0
  144. package/web/{chunk-54thej0t.js → chunk-gyp6v7jd.js} +2 -2
  145. package/web/chunk-h0c42zy3.js +1 -0
  146. package/web/chunk-h2ag4kvz.js +2 -0
  147. package/web/{chunk-eqsd8zta.js → chunk-h6gh63xj.js} +2 -2
  148. package/web/{chunk-6m69hczt.js → chunk-h6k1x096.js} +2 -2
  149. package/web/{chunk-24mfx6w1.js → chunk-j1bw5v1g.js} +2 -2
  150. package/web/chunk-j34q5jn6.js +1 -0
  151. package/web/{chunk-0pbjgdgp.js → chunk-ja7w629n.js} +2 -2
  152. package/web/{chunk-zbj1trar.js → chunk-jam45rqg.js} +2 -2
  153. package/web/{chunk-23c1df7e.js → chunk-jcdw85mv.js} +1 -1
  154. package/web/chunk-jfvxxp5c.js +1 -0
  155. package/web/chunk-jg6fmz2d.js +1 -0
  156. package/web/{chunk-90xqeczk.js → chunk-k67v6dyg.js} +40 -40
  157. package/web/chunk-ka7c5rhx.js +99 -0
  158. package/web/{chunk-acybsx44.js → chunk-kza0t0gj.js} +1 -1
  159. package/web/{chunk-7520nrbb.js → chunk-m8knte9z.js} +1 -1
  160. package/web/{chunk-v5cnt7c8.js → chunk-mnzramhc.js} +1 -1
  161. package/web/{chunk-7v5rxabp.js → chunk-mpfgr049.js} +1 -1
  162. package/web/chunk-mz1dabxh.js +1 -0
  163. package/web/chunk-mz9b5bsa.js +1 -0
  164. package/web/chunk-p53n0hwr.js +1 -0
  165. package/web/chunk-paywgcf7.js +40 -0
  166. package/web/chunk-pfcnr9tw.js +1 -0
  167. package/web/chunk-pyg1mr80.js +303 -0
  168. package/web/chunk-q7xkscc5.js +1 -0
  169. package/web/{chunk-xzp7jf7e.js → chunk-qcge7d6s.js} +2 -2
  170. package/web/chunk-qmbgb79a.js +1139 -0
  171. package/web/{chunk-5b2nw6j1.js → chunk-qq5gh5zr.js} +1 -1
  172. package/web/chunk-qrdh9j62.js +1 -0
  173. package/web/{chunk-w7snhcyg.js → chunk-s24qs1bn.js} +9 -9
  174. package/web/chunk-sd22cnjy.js +1 -0
  175. package/web/{chunk-ydtrc1ay.js → chunk-sd3cdqcm.js} +2 -2
  176. package/web/{chunk-rykfak98.js → chunk-sf101c23.js} +2 -2
  177. package/web/{chunk-p9hsd3rn.js → chunk-sfq6cw45.js} +2 -2
  178. package/web/chunk-svqj4az8.js +1 -0
  179. package/web/chunk-t7jwyvvr.js +1 -0
  180. package/web/{chunk-47q4hmfp.js → chunk-tcp77cp2.js} +2 -2
  181. package/web/chunk-tf18d2dk.css +1 -0
  182. package/web/chunk-thbqwq6b.js +1 -0
  183. package/web/chunk-v0g4cqc1.js +4 -0
  184. package/web/chunk-vhzys0rr.js +292 -0
  185. package/web/chunk-vnt34mkb.js +1 -0
  186. package/web/chunk-vqfz99ff.js +1 -0
  187. package/web/chunk-vttgyb5v.js +2 -0
  188. package/web/chunk-x7sb3bwf.js +370 -0
  189. package/web/chunk-xce8n339.js +1 -0
  190. package/web/{chunk-mb4qx9hy.js → chunk-xk1t58c4.js} +12 -12
  191. package/web/chunk-xsrvw7dt.js +4 -0
  192. package/web/chunk-xtss82z2.js +1 -0
  193. package/web/{chunk-2j4m0bh1.js → chunk-y7jq61nv.js} +2 -2
  194. package/web/{chunk-7ba8vrfc.js → chunk-ybw6vgf6.js} +2 -2
  195. package/web/{chunk-24h1rfje.js → chunk-yvgs6bm3.js} +4 -4
  196. package/web/{chunk-sb1cjpq8.js → chunk-z4aj066q.js} +1 -1
  197. package/web/chunk-zazs8p6c.js +1 -0
  198. package/web/{chunk-n8gfjj9a.js → chunk-zc1mk10n.js} +19 -19
  199. package/web/{chunk-5qqw2e0t.js → chunk-zqht0jzx.js} +6 -6
  200. package/web/{chunk-mwj9tpkz.js → chunk-zz397b0v.js} +12 -12
  201. package/web/index.html +1 -1
  202. package/worker.js +1 -1
  203. package/chunk-06hdzq5n.js +0 -2
  204. package/chunk-09rj27b2.js +0 -2
  205. package/chunk-1zdwrgd4.js +0 -2
  206. package/chunk-5c9j8qe4.js +0 -478
  207. package/chunk-9mmz6wt3.js +0 -2
  208. package/chunk-bpw6q7g0.js +0 -3
  209. package/chunk-bxn5kmpz.js +0 -3753
  210. package/chunk-n6e43rvk.js +0 -3
  211. package/chunk-pmqtkqsf.js +0 -2
  212. package/chunk-ry0z4ev6.js +0 -2
  213. package/chunk-v258nxcz.js +0 -2
  214. package/chunk-zmsgwr3s.js +0 -2
  215. package/web/chunk-0s80zw00.js +0 -1
  216. package/web/chunk-166qe5j6.js +0 -2
  217. package/web/chunk-1c95wfvq.js +0 -1
  218. package/web/chunk-329rtxa9.js +0 -1
  219. package/web/chunk-33qwz9bc.js +0 -2
  220. package/web/chunk-3qjnwsph.js +0 -1
  221. package/web/chunk-4rm1vy7w.js +0 -1
  222. package/web/chunk-59kqahb3.js +0 -1
  223. package/web/chunk-61jahh35.js +0 -292
  224. package/web/chunk-6beqrmtq.js +0 -1
  225. package/web/chunk-6gxf3vsg.js +0 -1
  226. package/web/chunk-6parf7sy.js +0 -2
  227. package/web/chunk-89fkdgbp.js +0 -2
  228. package/web/chunk-8qgpfxkz.js +0 -1
  229. package/web/chunk-9a3q0jsh.js +0 -36
  230. package/web/chunk-9bgey148.js +0 -169
  231. package/web/chunk-9xh96b33.js +0 -2
  232. package/web/chunk-a5sg33w2.js +0 -3
  233. package/web/chunk-a91vxtx4.js +0 -1
  234. package/web/chunk-agec7jj4.js +0 -1
  235. package/web/chunk-c516cghj.js +0 -1
  236. package/web/chunk-cqp1d4p0.js +0 -1
  237. package/web/chunk-cwtdnacf.js +0 -1
  238. package/web/chunk-dg1vas6z.js +0 -8
  239. package/web/chunk-dy2gm1fs.js +0 -1
  240. package/web/chunk-f91wzwtk.js +0 -1
  241. package/web/chunk-fc0nx23g.js +0 -1
  242. package/web/chunk-fhnypcrm.js +0 -1139
  243. package/web/chunk-fv60p68p.js +0 -1
  244. package/web/chunk-g1ev11wx.js +0 -1
  245. package/web/chunk-h18tnrf2.js +0 -1
  246. package/web/chunk-hfaffkrh.js +0 -1
  247. package/web/chunk-hszjc2ny.js +0 -70
  248. package/web/chunk-j2vt8c8v.js +0 -1
  249. package/web/chunk-jqa39f8t.js +0 -78
  250. package/web/chunk-jvbbrnpa.js +0 -1
  251. package/web/chunk-jzfd7cyh.js +0 -2
  252. package/web/chunk-ka3q31t1.js +0 -1
  253. package/web/chunk-ka9ak8wr.js +0 -1
  254. package/web/chunk-m2d1sp30.js +0 -1
  255. package/web/chunk-mnjd59jk.js +0 -1
  256. package/web/chunk-ng0nbfhh.js +0 -1
  257. package/web/chunk-nz9nxk48.js +0 -1
  258. package/web/chunk-phw908hn.js +0 -1
  259. package/web/chunk-pjmmma1k.js +0 -1
  260. package/web/chunk-pxe3vna4.js +0 -1
  261. package/web/chunk-q7yn4m3t.js +0 -1
  262. package/web/chunk-qh15dxav.css +0 -1
  263. package/web/chunk-qnhqexe0.js +0 -1
  264. package/web/chunk-rcx1aee5.js +0 -99
  265. package/web/chunk-rjqj6ffe.js +0 -1
  266. package/web/chunk-rks7ksv3.js +0 -106
  267. package/web/chunk-rtf2zzzv.js +0 -1
  268. package/web/chunk-sgvp8vge.js +0 -1
  269. package/web/chunk-sjjwte12.js +0 -1
  270. package/web/chunk-srrfphes.js +0 -1
  271. package/web/chunk-t7bwsdbr.js +0 -1
  272. package/web/chunk-tse9gvyq.js +0 -89
  273. package/web/chunk-vd6y2pcm.js +0 -39
  274. package/web/chunk-vpa55vje.js +0 -4
  275. package/web/chunk-vymqrpm3.js +0 -303
  276. package/web/chunk-wdtnhpd6.js +0 -4
  277. package/web/chunk-wmvd6j0b.js +0 -200
  278. package/web/chunk-xvsmtetz.js +0 -30
  279. package/web/chunk-y3ajqthy.js +0 -370
  280. package/web/chunk-yd1ez3wd.js +0 -2
  281. package/web/chunk-yfbxtg5p.js +0 -1
  282. package/web/chunk-ywp4s71k.js +0 -40
  283. package/web/chunk-z4x331rx.js +0 -140
  284. package/web/chunk-z6bpamwq.js +0 -24
  285. package/web/chunk-zmdnxn6m.js +0 -2
  286. package/web/install.ps1 +0 -91
  287. package/web/install.sh +0 -177
@@ -0,0 +1,140 @@
1
+ import{e,a,ce,b,v,B,C,l,p,Ma,Mn,un,Na,Ar,Lr,Rr,Ir,Pa,Oa,$a,Ba,Fa,za,Ua,ja,qa,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,dn,Ja,ue,oe,se,Ye,Ze,Et,gt,At,Zn,nn,Xn}from"./chunk-pyg1mr80.js";import{J}from"./chunk-fjag6yg8.js";import{je}from"./chunk-m8knte9z.js";import{Bt}from"./chunk-9dy7z3ej.js";function Te(t){return Array.isArray(t)}function Ne(t){if(Mn(t))return t;let o=un(t);if(!Qe(t))return{};if(Te(t)){let i=Array.from(t);if(t.length>0&&typeof t[0]==="string"&&Object.hasOwn(t,"index"))i.index=t.index,i.input=t.input;return i}if(dn(t)){let i=t;return new i.constructor(i.buffer,i.byteOffset,i.length)}if(o==="[object ArrayBuffer]")return new ArrayBuffer(t.byteLength);if(o==="[object DataView]"){let i=t,{buffer:g,byteOffset:f,byteLength:r}=i,d=new ArrayBuffer(r),y=new Uint8Array(g,f,r);return new Uint8Array(d).set(y),new DataView(d)}if(o==="[object Boolean]"||o==="[object Number]"||o==="[object String]"){let g=new t.constructor(t.valueOf());if(o==="[object String]")et(g,t);else pe(g,t);return g}if(o==="[object Date]")return new Date(Number(t));if(o==="[object RegExp]"){let i=t,g=new RegExp(i.source,i.flags);return g.lastIndex=i.lastIndex,g}if(o==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(t));if(o==="[object Map]"){let i=t,g=new Map;return i.forEach((f,r)=>{g.set(r,f)}),g}if(o==="[object Set]"){let i=t,g=new Set;return i.forEach((f)=>{g.add(f)}),g}if(o==="[object Arguments]"){let i=t,g={};return pe(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}let u={};return tt(u,t),pe(u,t),$e(u,t),u}function Qe(t){switch(un(t)){case Ir:case Fa:case za:case ja:case Rr:case Oa:case Xa:case Ka:case Ha:case Ya:case Za:case $a:case Lr:case Ua:case Na:case Ba:case Ar:case Pa:case qa:case Va:case Wa:case Ga:return!0;default:return!1}}function pe(t,o){for(let u in o)if(Object.hasOwn(o,u))t[u]=o[u]}function $e(t,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))t[g]=o[g]}}function et(t,o){let u=o.valueOf().length;for(let i in o)if(Object.hasOwn(o,i)&&(Number.isNaN(Number(i))||Number(i)>=u))t[i]=o[i]}function tt(t,o){let u=Object.getPrototypeOf(o);if(u!==null){if(typeof o.constructor==="function")Object.setPrototypeOf(t,u)}}var be=function(){var t=e(function(R,S,n,h){for(n=n||{},h=R.length;h--;n[R[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],y=[1,18],w=[8,30],L=[8,10,21,28,29,30,31,39,43,46],m=[1,23],E=[1,24],D=[8,10,15,16,21,28,29,30,31,39,43,46],k=[8,10,15,16,21,27,28,29,30,31,39,43,46],N=[1,49],T={trace:e(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:e(function(S,n,h,x,_,s,H){var c=s.length-1;switch(_){case 4:x.getLogger().debug("Rule: separator (NL) ");break;case 5:x.getLogger().debug("Rule: separator (Space) ");break;case 6:x.getLogger().debug("Rule: separator (EOF) ");break;case 7:x.getLogger().debug("Rule: hierarchy: ",s[c-1]),x.setHierarchy(s[c-1]);break;case 8:x.getLogger().debug("Stop NL ");break;case 9:x.getLogger().debug("Stop EOF ");break;case 10:x.getLogger().debug("Stop NL2 ");break;case 11:x.getLogger().debug("Stop EOF2 ");break;case 12:x.getLogger().debug("Rule: statement: ",s[c]),typeof s[c].length==="number"?this.$=s[c]:this.$=[s[c]];break;case 13:x.getLogger().debug("Rule: statement #2: ",s[c-1]),this.$=[s[c-1]].concat(s[c]);break;case 14:x.getLogger().debug("Rule: link: ",s[c],S),this.$={edgeTypeStr:s[c],label:""};break;case 15:x.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=x.generateId();this.$={id:j,type:"space",label:"",width:V,children:[]};break;case 23:x.getLogger().debug("Rule: (nodeStatement link node) ",s[c-2],s[c-1],s[c]," typestr: ",s[c-1].edgeTypeStr);let G=x.edgeStrToEdgeData(s[c-1].edgeTypeStr),ie=x.edgeStrToEdgeStartData(s[c-1].edgeTypeStr),q=x.edgeStrToThickness(s[c-1].edgeTypeStr),ae=x.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:x.typeStr2Type(s[c].typeStr),directions:s[c].directions}];break;case 24:x.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[c-1],s[c]),this.$={id:s[c-1].id,label:s[c-1].label,type:x.typeStr2Type(s[c-1].typeStr),directions:s[c-1].directions,widthInColumns:parseInt(s[c],10)};break;case 25:x.getLogger().debug("Rule: nodeStatement (node) ",s[c]),this.$={id:s[c].id,label:s[c].label,type:x.typeStr2Type(s[c].typeStr),directions:s[c].directions,widthInColumns:1};break;case 26:x.getLogger().debug("APA123",this?this:"na"),x.getLogger().debug("COLUMNS: ",s[c]),this.$={type:"column-setting",columns:s[c]==="auto"?-1:parseInt(s[c])};break;case 27:x.getLogger().debug("Rule: id-block statement : ",s[c-2],s[c-1]);let I=x.generateId();this.$={...s[c-2],type:"composite",children:s[c-1]};break;case 28:x.getLogger().debug("Rule: blockStatement : ",s[c-2],s[c-1],s[c]);let K=x.generateId();this.$={id:K,type:"composite",label:"",children:s[c-1]};break;case 29:x.getLogger().debug("Rule: node (NODE_ID separator): ",s[c]),this.$={id:s[c]};break;case 30:x.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:x.getLogger().debug("Rule: dirList: ",s[c]),this.$=[s[c]];break;case 32:x.getLogger().debug("Rule: dirList: ",s[c-1],s[c]),this.$=[s[c-1]].concat(s[c]);break;case 33:x.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:x.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:y},{8:[1,20]},t(w,[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:y}),t(L,[2,16],{14:22,15:m,16:E}),t(L,[2,17]),t(L,[2,18]),t(L,[2,19]),t(L,[2,20]),t(L,[2,21]),t(L,[2,22]),t(D,[2,25],{27:[1,25]}),t(L,[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:y},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(k,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(w,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},t(D,[2,24]),{10:o,11:37,13:4,14:22,15:m,16:E,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:y},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(k,[2,30]),{18:[1,43]},{18:[1,44]},t(D,[2,23]),{18:[1,45]},{30:[1,46]},t(L,[2,28]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),{36:[1,47]},{33:48,34:N},{15:[1,50]},t(L,[2,27]),t(k,[2,33]),{38:[1,51]},{33:52,34:N,38:[2,31]},{31:[2,15]},t(k,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(S,n){if(n.recoverable)this.trace(S);else{var h=Error(S);throw h.hash=n,h}},"parseError"),parse:e(function(S){var n=this,h=[0],x=[],_=[null],s=[],H=this.table,c="",V=0,j=0,G=0,ie=2,q=1,ae=s.slice.call(arguments,1),I=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(I.setInput(S,K.yy),K.yy.lexer=I,K.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var le=I.yylloc;s.push(le);var qe=I.options&&I.options.ranges;if(typeof K.yy.parseError==="function")this.parseError=K.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Je(F){h.length=h.length-2*F,_.length=_.length-F,s.length=s.length-F}e(Je,"popStack");function _e(){var F=x.pop()||I.lex()||q;if(typeof F!=="number"){if(F instanceof Array)x=F,F=x.pop();F=n.symbols_[F]||F}return F}e(_e,"lex");var A,he,W,P,vt,ge,U={},Z,Y,De,Q;while(!0){if(W=h[h.length-1],this.defaultActions[W])P=this.defaultActions[W];else{if(A===null||typeof A>"u")A=_e();P=H[W]&&H[W][A]}if(typeof P>"u"||!P.length||!P[0]){var de="";Q=[];for(Z in H[W])if(this.terminals_[Z]&&Z>ie)Q.push("'"+this.terminals_[Z]+"'");if(I.showPosition)de="Parse error on line "+(V+1)+`:
2
+ `+I.showPosition()+`
3
+ Expecting `+Q.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else de="Parse error on line "+(V+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(de,{text:I.match,token:this.terminals_[A]||A,line:I.yylineno,loc:le,expected:Q})}if(P[0]instanceof Array&&P.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(P[0]){case 1:if(h.push(A),_.push(I.yytext),s.push(I.yylloc),h.push(P[1]),A=null,!he){if(j=I.yyleng,c=I.yytext,V=I.yylineno,le=I.yylloc,G>0)G--}else A=he,he=null;break;case 2:if(Y=this.productions_[P[1]][1],U.$=_[_.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},qe)U._$.range=[s[s.length-(Y||1)].range[0],s[s.length-1].range[1]];if(ge=this.performAction.apply(U,[c,j,V,K.yy,P[1],_,s].concat(ae)),typeof ge<"u")return ge;if(Y)h=h.slice(0,-1*Y*2),_=_.slice(0,-1*Y),s=s.slice(0,-1*Y);h.push(this.productions_[P[1]][0]),_.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")},O=function(){var R={EOF:1,parseError:e(function(n,h){if(this.yy.parser)this.yy.parser.parseError(n,h);else throw Error(n)},"parseError"),setInput:e(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:e(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:e(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 x=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 _=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===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[_[0],_[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(S){this.unput(this.match.slice(S))},"less"),pastInput:e(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:e(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:e(function(){var S=this.pastInput(),n=Array(S.length+1).join("-");return S+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:e(function(S,n){var h,x,_;if(this.options.backtrack_lexer){if(_={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)_.yylloc.range=this.yylloc.range.slice(0)}if(x=S[0].match(/(?:\r\n?|\n).*/g),x)this.yylineno+=x.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.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 _)this[s]=_[s];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var S,n,h,x;if(!this._more)this.yytext="",this.match="";var _=this._currentRules();for(var s=0;s<_.length;s++)if(h=this._input.match(this.rules[_[s]]),h&&(!n||h[0].length>n[0].length)){if(n=h,x=s,this.options.backtrack_lexer)if(S=this.test_match(h,_[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,_[x]),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:e(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:e(function(n){this.conditionStack.push(n)},"begin"),popState:e(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:e(function(n){this.begin(n)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(n,h,x,_){var s=_;switch(x){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 R}();T.lexer=O;function z(){this.yy={}}return e(z,"Parser"),z.prototype=T,T.Parser=z,new z}();be.parser=be;var rt=be,M=new Map,me=[],Se=new Map,Ie="color",Oe="fill",st="bgFill",ve=",",ee=new Map,Le="",it=e((t)=>v.sanitizeText(t,l()),"sanitizeText"),at=e(function(t,o=""){let u=ee.get(t);if(!u)u={id:t,styles:[],textStyles:[]},ee.set(t,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=e(function(t,o=""){let u=M.get(t);if(o!==void 0&&o!==null)u.styles=o.split(ve)},"addStyle2Node"),ot=e(function(t,o){t.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=e((t,o)=>{let u=t.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 y=r.width??1;for(let w=0;w<y;w++){let L=Ne(r);L.id=L.id+"-"+w,M.set(L.id,L),i.push(L)}}else if(d===void 0)i.push(r)}}o.children=i},"populateBlockDatabase"),ke=[],X={id:"root",type:"composite",children:[],columns:-1},lt=e(()=>{a.debug("Clear called"),C(),X={id:"root",type:"composite",children:[],columns:-1},M=new Map([["root",X]]),ke=[],ee=new Map,me=[],Se=new Map,Le="",Ae=0},"clear");function Be(t){switch(a.debug("typeStr2Type",t),t){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"}}e(Be,"typeStr2Type");function Re(t){switch(a.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}e(Re,"edgeTypeStr2Type");function Pe(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}e(Pe,"edgeStrToEdgeData");function Fe(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}e(Fe,"edgeStrToEdgeStartData");function Me(t){return t.includes("==")?"thick":"normal"}e(Me,"edgeStrToThickness");function Ke(t){if(t.includes(".-"))return"dotted";return"solid"}e(Ke,"edgeStrToPattern");var Ce=0,ct=e(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=e((t)=>{X.children=t,ze(t,X),ke=X.children},"setHierarchy"),ht=e((t)=>{let o=M.get(t);if(!o)return-1;if(o.columns)return o.columns;if(!o.children)return-1;return o.children.length},"getColumns"),dt=e(()=>[...M.values()],"getBlocksFlat"),pt=e(()=>ke||[],"getBlocks"),ft=e(()=>me,"getEdges"),bt=e((t)=>M.get(t),"getBlock"),St=e((t)=>{M.set(t.id,t)},"setBlock"),xt=e((t)=>{Le=t},"setDiagramId"),mt=e(()=>Le,"getDiagramId"),Lt=e(()=>a,"getLogger"),kt=e(function(){return ee},"getClasses"),yt={getConfig:e(()=>b().block,"getConfig"),typeStr2Type:Be,edgeTypeStr2Type:Re,edgeStrToEdgeData:Pe,edgeStrToEdgeStartData:Fe,edgeStrToThickness:Me,edgeStrToPattern:Ke,getLogger:Lt,getBlocksFlat:dt,getBlocks:pt,getEdges:ft,setHierarchy:ut,getBlock:bt,setBlock:St,getColumns:ht,getClasses:kt,clear:lt,generateId:ct,setDiagramId:xt,getDiagramId:mt},wt=yt,_t=e((t)=>{let{theme:o,bkgColorArray:u,borderColorArray:i}=t;if(!oe(o,i))return"";let g=se(t.look),f=ue(u),r="";for(let d=0;d<Ye(t.THEME_COLOR_LIMIT,i);d++){let y=i[d%i.length],w=f?`fill: ${u[d%u.length]};`:"",L=`[data-look="${g}"][data-color-id="color-${d}"]`;r+=`
7
+
8
+ ${L}.node rect.composite {
9
+ stroke: ${y};
10
+ ${w}
11
+ }
12
+ `}return r},"genColor"),fe=e((t,o)=>{let u=Bt,i=u(t,"r"),g=u(t,"g"),f=u(t,"b");return ce(i,g,f,o)},"fade"),Dt=e((t)=>`${_t(t)}
13
+ .label {
14
+ font-family: ${t.fontFamily};
15
+ color: ${t.nodeTextColor||t.textColor};
16
+ }
17
+ .cluster-label text {
18
+ fill: ${t.titleColor};
19
+ }
20
+ .cluster-label span {
21
+ color: ${t.titleColor};
22
+ }
23
+
24
+
25
+
26
+ .label text,span {
27
+ fill: ${t.nodeTextColor||t.textColor};
28
+ color: ${t.nodeTextColor||t.textColor};
29
+ }
30
+
31
+ .node rect,
32
+ .node circle,
33
+ .node ellipse,
34
+ .node polygon,
35
+ .node path {
36
+ fill: ${t.mainBkg};
37
+ stroke: ${t.nodeBorder};
38
+ /* From the theme, as every other diagram does. Pinned at 1px here, so block drew a
39
+ thinner border than an identical flowchart node under any theme asking for more --
40
+ the neo theme asks for 2. Nothing downstream corrected it: the neo rules set stroke
41
+ and filter, never stroke-width. */
42
+ stroke-width: ${t.strokeWidth??1}px;
43
+ }
44
+ .flowchart-label text {
45
+ text-anchor: middle;
46
+ }
47
+ // .flowchart-label .text-outer-tspan {
48
+ // text-anchor: middle;
49
+ // }
50
+ // .flowchart-label .text-inner-tspan {
51
+ // text-anchor: start;
52
+ // }
53
+
54
+ .node .label {
55
+ text-align: center;
56
+ }
57
+ .node.clickable {
58
+ cursor: pointer;
59
+ }
60
+
61
+ .arrowheadPath {
62
+ fill: ${t.arrowheadColor};
63
+ }
64
+
65
+ .edgePaths .path {
66
+ stroke: ${t.lineColor};
67
+ stroke-width: 2.0px;
68
+ }
69
+
70
+ .flowchart-link {
71
+ stroke: ${t.lineColor};
72
+ fill: none;
73
+ }
74
+
75
+ .edgeLabel {
76
+ background-color: ${t.edgeLabelBackground};
77
+ /*
78
+ * This is for backward compatibility with existing code that didn't
79
+ * add a \`<p>\` around edge labels.
80
+ *
81
+ * TODO: We should probably remove this in a future release.
82
+ */
83
+ p {
84
+ margin: 0;
85
+ padding: 0;
86
+ display: inline;
87
+ }
88
+ rect {
89
+ opacity: 0.5;
90
+ background-color: ${t.edgeLabelBackground};
91
+ fill: ${t.edgeLabelBackground};
92
+ }
93
+ text-align: center;
94
+ }
95
+
96
+ /* For html labels only */
97
+ .labelBkg {
98
+ background-color: ${t.edgeLabelBackground};
99
+ }
100
+
101
+ .node .cluster {
102
+ // fill: ${fe(t.mainBkg,0.5)};
103
+ fill: ${fe(t.clusterBkg,0.5)};
104
+ stroke: ${fe(t.clusterBorder,0.2)};
105
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
106
+ stroke-width: 1px;
107
+ }
108
+
109
+ .cluster text {
110
+ fill: ${t.titleColor};
111
+ }
112
+
113
+ .cluster span {
114
+ color: ${t.titleColor};
115
+ }
116
+ /* .cluster div {
117
+ color: ${t.titleColor};
118
+ } */
119
+
120
+ div.mermaidTooltip {
121
+ position: absolute;
122
+ text-align: center;
123
+ max-width: 200px;
124
+ padding: 2px;
125
+ font-family: ${t.fontFamily};
126
+ font-size: 12px;
127
+ background: ${t.tertiaryColor};
128
+ border: 1px solid ${t.border2};
129
+ border-radius: 2px;
130
+ pointer-events: none;
131
+ z-index: 100;
132
+ }
133
+
134
+ .flowchartTitleText {
135
+ text-anchor: middle;
136
+ font-size: 18px;
137
+ fill: ${t.textColor};
138
+ }
139
+ ${je()}
140
+ `,"getStyles"),Tt=Dt;function xe(t,o){if(t===0||!Number.isInteger(t))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(t<0)return{px:o,py:0};if(t===1)return{px:0,py:o};let u=o%t,i=Math.floor(o/t);return{px:u,py:i}}e(xe,"calculateBlockPosition");var Nt=e((t)=>{let o=0,u=0;for(let i of t.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 y=g/(i.widthInColumns??1);if(y>o)o=y;if(f>u)u=f}return{width:o,height:u}},"getMaxChildSize");function te(t,o,u=0,i=0,g=8){if(a.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",u),!t?.size?.width)t.size={width:u,height:i,x:0,y:0};let f=0,r=0;if(t.children?.length>0){for(let k of t.children)te(k,o,0,0,g);let d=Nt(t);f=d.width,r=d.height,a.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",f,r);for(let k of t.children)if(k.size)a.debug(`abc95 Setting size of children of ${t.id} id=${k.id} ${f} ${r} ${JSON.stringify(k.size)}`),k.size.width=f*(k.widthInColumns??1)+g*((k.widthInColumns??1)-1),k.size.height=r,k.size.x=0,k.size.y=0,a.debug(`abc95 updating size of ${t.id} children child:${k.id} maxWidth:${f} maxHeight:${r}`);for(let k of t.children)te(k,o,f,r,g);let y=t.columns??-1,w=0;for(let k of t.children)w+=k.widthInColumns??1;let L=t.children.length;if(y>0&&y<w)L=y;let m=Math.ceil(w/L),E=L*(f+g)+g,D=m*(r+g)+g;if(E<u){a.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${u} siblingHeight ${i} width ${E}`),E=u,D=i;let k=(u-L*g-g)/L,N=(i-m*g-g)/m;a.debug("Size indata abc88",t.id,"childWidth",k,"maxWidth",f),a.debug("Size indata abc88",t.id,"childHeight",N,"maxHeight",r),a.debug("Size indata abc88 xSize",L,"padding",g);for(let T of t.children)if(T.size)T.size.width=k,T.size.height=N,T.size.x=0,T.size.y=0}if(a.debug(`abc95 (finale calc) ${t.id} xSize ${L} ySize ${m} columns ${y}${t.children.length} width=${Math.max(E,t.size?.width||0)}`),E<(t?.size?.width||0)){E=t?.size?.width||0;let k=y>0?Math.min(t.children.length,y):t.children.length;if(k>0){let N=(E-k*g-g)/k;a.debug("abc95 (growing to fit) width",t.id,E,t.size?.width,N);for(let T of t.children)if(T.size)T.size.width=N}}t.size={width:E,height:D,x:0,y:0}}a.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}e(te,"setBlockSizes");function ye(t,o,u=8){a.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let i=t.columns??-1;if(a.debug("layoutBlocks columns abc95",t.id,"=>",i,t),t.children&&t.children.length>0){let g=t?.children[0]?.size?.width??0,f=t.children.length*g+(t.children.length-1)*u;a.debug("widthOfChildren 88",f,"posX");let r=new Map;{let m=0;for(let E of t.children){if(!E.size)continue;let{py:D}=xe(i,m),k=r.get(D)??0;if(E.size.height>k)r.set(D,E.size.height);let N=E?.widthInColumns??1;if(i>0)N=Math.min(N,i-m%i);m+=N}}let d=new Map;{let m=0,E=[...r.keys()].sort((D,k)=>D-k);for(let D of E)d.set(D,m),m+=(r.get(D)??0)+u}let y=0;a.debug("abc91 block?.size?.x",t.id,t?.size?.x);let w=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,L=0;for(let m of t.children){let E=t;if(!m.size)continue;let{width:D,height:k}=m.size,{px:N,py:T}=xe(i,y);if(T!=L)L=T,w=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,a.debug("New row in layout for block",t.id," and child ",m.id,L);if(a.debug(`abc89 layout blocks (child) id: ${m.id} Pos: ${y} (px, py) ${N},${T} (${E?.size?.x},${E?.size?.y}) parent: ${E.id} width: ${D}${u}`),E.size){let z=D/2;m.size.x=w+u+z,a.debug(`abc91 layout blocks (calc) px, pyid:${m.id} startingPos=X${w} new startingPosX${m.size.x} ${z} padding=${u} width=${D} halfWidth=${z} => x:${m.size.x} y:${m.size.y} ${m.widthInColumns} (width * (child?.w || 1)) / 2 ${D*(m?.widthInColumns??1)/2}`),w=m.size.x+z;let R=d.get(T)??0,S=r.get(T)??k;m.size.y=E.size.y-E.size.height/2+R+S/2+u,a.debug(`abc88 layout blocks (calc) px, pyid:${m.id}startingPosX${w}${u}${z}=>x:${m.size.x}y:${m.size.y}${m.widthInColumns}(width * (child?.w || 1)) / 2${D*(m?.widthInColumns??1)/2}`)}if(m.children)ye(m,o,u);let O=m?.widthInColumns??1;if(i>0)O=Math.min(O,i-y%i);y+=O,a.debug("abc88 columnsPos",m,y)}}a.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}e(ye,"layoutBlocks");function we(t,{minX:o,minY:u,maxX:i,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:f,y:r,width:d,height:y}=t.size;if(f-d/2<o)o=f-d/2;if(r-y/2<u)u=r-y/2;if(f+d/2>i)i=f+d/2;if(r+y/2>g)g=r+y/2}if(t.children)for(let f of t.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}}e(we,"findBounds");function We(t){let o=t.getBlock("root");if(!o)return;let u=l()?.block?.padding??8;te(o,t,0,0,u),ye(o,t,u),a.debug("getBlocks",JSON.stringify(o,null,2));let{minX:i,minY:g,maxX:f,maxY:r}=we(o),d=r-g,y=f-i;return{x:i,y:g,width:y,height:d}}e(We,"layout");function Ee(t,o,u=!1){let i=t,g="default";if((i?.classes?.length||0)>0)g=(i?.classes??[]).join(" ");g=g+" flowchart-label";let f=(i?.classes??[]).flatMap((k)=>o.getClasses().get(k)?.styles??[]),r=0,d="rect",y;switch(i.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",y=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 w=Ja(i?.styles??[]),L=i.label,m=i.size??{width:0,height:0,x:0,y:0},E=o.getDiagramId();return{labelStyle:w.labelStyle,shape:d,label:L,labelText:L,rx:r,ry:r,class:g,cssClasses:g,cssStyles:i?.styles??[],cssCompiledStyles:f,style:w.style,id:i.id,domId:E?`${E}-${i.id}`:i.id,isGroup:!1,directions:i.directions,width:m.width||void 0,height:m.height||void 0,wrappingWidth:m.width||Number.POSITIVE_INFINITY,x:m.x,y:m.y,positioned:u,intersect:void 0,padding:y??b()?.block?.padding??0,widthInColumns:i.widthInColumns??1,colorIndex:i.colorIndex,look:b().look}}e(Ee,"getNodeFromBlock");async function Ve(t,o,u){let i=Ee(o,u,!1);if(o.type==="group")return;let g=b(),f=await Et(t,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()}e(Ve,"calculateBlockSize");async function Ue(t,o,u){let i=Ee(o,u,!0);if(u.getBlock(i.id).type!=="space"){let f=b(),r=await Et(t,i,{config:f});if(i.colorIndex!==void 0)Ze(r,i.colorIndex,f.theme,f.themeVariables?.borderColorArray);o.intersect=i?.intersect,gt(i)}}e(Ue,"insertBlockPositioned");async function re(t,o,u,i){for(let g of o)if(await i(t,g,u),g.children)await re(t,g.children,u,i)}e(re,"performOperations");async function He(t,o,u){await re(t,o,u,Ve)}e(He,"calculateBlockSizes");async function Xe(t,o,u){await re(t,o,u,Ue)}e(Xe,"insertBlocks");async function Ge(t,o,u,i,g){let f=new J({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),y=i.getBlock(r.end);if(d?.size&&y?.size){let w=d.size,L=y.size,m=[{x:w.x,y:w.y},{x:w.x+(L.x-w.x)/2,y:w.y+(L.y-w.y)/2},{x:L.x,y:L.y}],E=g?`${g}-${r.id}`:r.id,D=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",k=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",N=`${D} ${k} flowchart-link LS-a1 LE-b1`;if(nn(t,{...r,id:E,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:m,classes:N},{},"block",f.node(r.start),f.node(r.end),g),r.label)await At(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:m,classes:N}),Zn({...r,x:m[1].x,y:m[1].y},{originalPath:m})}}}e(Ge,"insertEdges");var It=e(function(t,o){return o.db.getClasses()},"getClasses"),Ot=e(async function(t,o,u,i){let{securityLevel:g,block:f}=b(),r=i.db;r.setDiagramId(o);let d;if(g==="sandbox")d=p("#i"+o);let y=g==="sandbox"?p(d.nodes()[0].contentDocument.body):p("body"),w=g==="sandbox"?y.select(`[id="${o}"]`):p(`[id="${o}"]`);Ma(w,b()),Xn(w,["point","circle","cross"],i.type,o);let m=r.getBlocks(),E=r.getBlocksFlat(),D=r.getEdges(),k=w.insert("g").attr("class","block");await He(k,m,r);let N=We(r);await Xe(k,m,r),await Ge(k,D,E,r,o);let T=k.node()?.getBBox(),O=T&&Number.isFinite(T.width)&&Number.isFinite(T.height)?T:N;if(O){let z=Math.max(1,Math.round(0.125*(O.width/O.height))),R=O.height+z+10,S=O.width+10,{useMaxWidth:n}=f;B(w,R,S,!!n),a.debug("Here Bounds",N,O),w.attr("viewBox",`${O.x-5} ${O.y-5} ${O.width+10} ${O.height+10}`)}},"draw"),Ct={draw:Ot,getClasses:It},ar={parser:rt,db:wt,renderer:Ct,styles:Tt};export{ar as diagram};
@@ -0,0 +1,3 @@
1
+ import{G}from"./chunk-14bad871.js";import{e,a,D,b,O,C,S,E,T,A,R,L,l,kr,p,Nn,Xr,U}from"./chunk-pyg1mr80.js";import{Br,X}from"./chunk-zc1mk10n.js";var _="position frame",V="frame positioned",F="position relation",j="relation positioned",pe=e(function(t){a.debug("options str",t)},"setOptions"),ve=e(function(){return{}},"getOptions"),be=e(function(){Y(),C()},"clear");function Y(){M={}}e(Y,"reset");var we=D.eventmodeling,ye=e(()=>U({...we,...b().eventmodeling}),"getConfig"),M={};function z(){let t=Pe,{ast:i}=M,n=I();if(!i)throw Error("No data for EventModel");return i.frames.forEach((r,o)=>{let s=te(r,i.dataEntities,n);t=P(t,{$kind:_,index:o,frame:r,textProps:s});let c=void 0;if(se(r))a.debug("source frame",r.sourceFrames),c=i.frames.filter((m)=>r.sourceFrames.some((u)=>u.$refText===m.name)),c.forEach((m)=>{t=P(t,{$kind:F,index:o,frame:r,sourceFrame:m})});else t=P(t,{$kind:F,index:o,frame:r})}),t={...t,sortedSwimlanesArray:W(t.swimlanes)},t}e(z,"getState");function K(t){M.ast=void 0;let i=new Set;for(let n of t.frames){if(i.has(n.name)){let r=n.$cstNode?.range.start.line,o=r===void 0?"":` on line ${r+1}`;throw Error(`Duplicate event modeling frame ID "${n.name}"${o}`)}i.add(n.name)}M.ast=t}e(K,"setAst");var d={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function I(){return d}e(I,"getDiagramProps");var Pe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function q(t){let i=t.split(".");if(i.length===2)return i[0];return}e(q,"extractNamespace");function J(t){let i=t.split(".");if(i.length===2)return i[1];return t}e(J,"extractName");function Q(t,i){if(!i||i.length===0)return;return Object.values(t).find((n)=>n.namespace===i)}e(Q,"findSwimlaneByNamespace");function y(t,i,n){return Math.max(i,...Object.keys(t).filter((r)=>{let o=Number.parseInt(r);return o>i&&o<n}).map((r)=>Number.parseInt(r)))+1}e(y,"findNextAvailableIndex");function Z(t,i){let n=q(t.entityIdentifier),r=Q(i,n);switch(t.modelEntityType){case"ui":case"pcr":case"processor":if(r)return{index:r.index,label:r.namespace||d.labelUiAutomation};else if(n)return{index:y(i,0,100),label:d.labelUiAutomationPrefix+n};return{index:0,label:d.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":if(r)return{index:r.index,label:r.namespace||d.labelCommandReadModel};else if(n)return{index:y(i,100,200),label:d.labelCommandReadModelPrefix+n};return{index:100,label:d.labelCommandReadModel};case"evt":case"event":default:if(r)return{index:r.index,label:r.namespace||d.labelEvents};else if(n)return{index:y(i,200,300),label:d.labelEventsPrefix+n};return{index:200,label:d.labelEvents}}}e(Z,"calculateSwimlaneProps");function ee(t){let{themeVariables:i}=b();switch(t.modelEntityType){case"ui":return{fill:i.emUiFill??"white",stroke:i.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:i.emProcessorFill??"#edb3f6",stroke:i.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:i.emReadModelFill??"#d3f1a2",stroke:i.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:i.emCommandFill??"#bcd6fe",stroke:i.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:i.emEventFill??"#ffb778",stroke:i.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}e(ee,"calculateEntityVisualProps");function te(t,i,n){let r=b(),o=O(J(t.entityIdentifier)??"",r),s,c={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},u=`<b>${Nn(o,n.textMaxWidth,c)}</b>`;if(t.dataInlineValue)s=t.dataInlineValue,s=s.substring(s.indexOf("{")+1),s=s.substring(0,s.lastIndexOf("}")-1),s=O(s,r),s=Nn(s,n.textMaxWidth,c),s=s.replaceAll(" ","&nbsp;");if(t.dataReference){let w=i.find((k)=>k.name===t.dataReference?.$refText);if(w)s=w.dataBlockValue,s=s.substring(s.indexOf(`{
2
+ `)+2),s=s.substring(0,s.lastIndexOf("}")-1),s=O(s,r),s=Nn(s,n.textMaxWidth,c),s=s.replaceAll(" ","&nbsp;"),s+="<br/>"}let x=s!==void 0;if(x)u+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${s}</code>`;let g={fontSize:c.fontSize,fontWeight:c.fontWeight,fontFamily:c.fontFamily},f=Xr(u,g),v=x?f.width/3:f.width,h={content:u,width:v,height:f.height};return a.debug(`[${t.name}] ${t.entityIdentifier} text`,h),h}e(te,"calculateTextProps");function ne(t,i){let n=i,r=ee(n.frame),o={width:n.textProps.width+2*d.boxTextPadding,height:n.textProps.height+2*d.boxTextPadding};return[{$kind:V,frame:n.frame,index:n.index,visual:r,dimension:o,textProps:n.textProps}]}e(ne,"decidePositionFrame");function ie(t,i,n){if(i===void 0)return d.contentStartX;if(i.index===t.index&&t.r)return t.r+d.boxPadding;if(n===void 0)return d.contentStartX;return n.r-d.boxOverlap+d.boxPadding}e(ie,"calculateX");function re(t,i){let n=[...t.map((r)=>r.r),i];return Math.max(...n)}e(re,"calculateMaxRight");function W(t){return Object.values(t).sort((i,n)=>i.index-n.index)}e(W,"sortedSwimlanesArray");function ae(t,i){let n=i,r=Z(n.frame,t.swimlanes),o;if(r.index in t.swimlanes)o=t.swimlanes[r.index];else o={index:r.index,label:r.label,r:0,y:r.index*d.swimlaneMinHeight+d.swimlaneGap,height:d.swimlaneMinHeight,maxHeight:d.swimlaneMinHeight};let s=t.boxes.length>0?t.boxes[t.boxes.length-1]:void 0,c=t.previousSwimlaneNumber!==void 0?t.swimlanes[t.previousSwimlaneNumber]:void 0,m={width:Math.max(d.boxMinWidth,Math.min(d.boxMaxWidth,n.dimension.width))+2*d.boxPadding,height:Math.max(d.boxMinHeight,Math.min(d.boxMaxHeight,n.dimension.height))+2*d.boxPadding},u=ie(o,c,s),x=u+m.width+d.boxPadding,g=re(Object.values(t.swimlanes),x);o.r=u+m.width,o.maxHeight=Math.max(o.maxHeight,m.height),o.height=Math.max(d.swimlaneMinHeight,o.maxHeight)+2*d.swimlanePadding;let f={x:u,y:d.swimlanePadding+o.y,r:x,dimension:m,leftSibling:!1,swimlane:o,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},v={...t,boxes:[...t.boxes,f],swimlanes:{...t.swimlanes,[`${o.index}`]:o},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:g},h=W(v.swimlanes);if(h.length>0)h[0].y=0;for(let w=1;w<h.length;w++){let k=h[w],H=h[w-1];k.y=H.y+H.height+d.swimlaneGap}return v}e(ae,"evolveFramePositioned");function oe(t,i){if(t===0&&i.sourceFrames.length===0)return!0;return!1}e(oe,"isFirstFrame");function se(t){return t.sourceFrames!==void 0&&t.sourceFrames!==null&&t.sourceFrames.length>0}e(se,"hasSourceFrame");function B(t,i){if(i===void 0||i===null)return;return t.find((n)=>n.frame.name===i.name)}e(B,"findBoxByFrame");function de(t,i,n){if(n<0)return;for(let r=n;r>=0;r--){let o=t[r];if(o.swimlane.index!==i)return o}return}e(de,"findBoxByLineIndex");function le(t,i){let n=i;if(oe(n.index,n.frame))return[];let r=B(t.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let o;if(n.sourceFrame)o=B(t.boxes,n.sourceFrame);else{if(Br(n.frame))return[];o=de(t.boxes,r.swimlane.index,n.index-1)}if(o===void 0)return[];return[{$kind:j,frame:n.frame,index:n.index,sourceBox:o,targetBox:r}]}e(le,"decidePositionRelation");function ce(t,i){let n=i,r={visual:{fill:"none",stroke:"#000"},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...t,relations:[...t.relations,r]}}e(ce,"evolveRelationPositioned");var Se={[_]:ne,[F]:le},Me={[V]:ae,[j]:ce};function me(t,i){let n=Se[i.$kind];if(n===void 0||n===null)return[];let r=n(t,i);return a.debug("decided events",r),r}e(me,"decide");function ue(t,i){let n=i.reduce((r,o)=>{let s=Me[o.$kind];if(s===void 0||s===null)return r;return s(r,o)},t);return a.debug("evolve events",{state:t,newState:n,events:i}),n}e(ue,"evolve");function P(t,i){let n=me(t,i);return ue(t,n)}e(P,"dispatch");var N={getConfig:ye,preserveCommentsWhenParsing:!0,setOptions:pe,getOptions:ve,clear:be,setAccTitle:S,getAccTitle:E,getAccDescription:A,setAccDescription:T,setDiagramTitle:R,getDiagramTitle:L,setAst:K,getDiagramProps:I,getState:z},ke={parse:e(async(t)=>{let i=await X("eventmodeling",t);a.debug(i),N.setAst(i),G(i,N)},"parse")},Fe=l(),Be=Fe?.eventmodeling;function xe(t,i){return(n)=>{let r=n.swimlane.y+i.swimlanePadding,o=t.append("g").attr("class","em-box");o.append("rect").attr("x",n.x).attr("y",r).attr("rx","3").attr("width",n.dimension.width).attr("height",n.dimension.height).attr("stroke",n.visual.stroke).attr("fill",n.visual.fill),o.append("foreignObject").attr("x",n.x+i.boxPadding).attr("y",r+10).attr("width",n.dimension.width-2*i.boxPadding).attr("height",n.dimension.height-2*i.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(n.text)}}e(xe,"renderD3Box");function fe(t,i){return t>i}e(fe,"dirUpwards");function ge(t,i,n,r){return(o)=>{let s=o.sourceBox.swimlane.y+i.swimlanePadding,c=o.targetBox.swimlane.y+i.swimlanePadding,m=fe(s,c),u=o.sourceBox.x+o.sourceBox.dimension.width*2/3,x=o.targetBox.x+o.targetBox.dimension.width/3,g,f;if(a.debug(`rendering relation up=${m} for `,{sourceBox:o.sourceBox,targetBox:o.targetBox}),m)g=s,f=c+o.targetBox.dimension.height;else g=s+o.sourceBox.dimension.height,f=c;let v=r.emRelationStroke??o.visual.stroke;t.append("path").attr("class","em-relation").attr("fill",o.visual.fill).attr("stroke",v).attr("stroke-width","1").attr("marker-end",`url(#${n})`).attr("d",`M${u} ${g} L${x} ${f}`)}}e(ge,"renderD3Relation");function he(t,i,n,r){return(o)=>{let s=t.append("g").attr("class","em-swimlane"),c=r.emSwimlaneBackgroundOdd??"rgb(250,250,250)",m=r.emSwimlaneBackgroundStroke??"rgb(240,240,240)";s.append("rect").attr("x",0).attr("y",o.y).attr("rx","3").attr("width",i+n.swimlanePadding).attr("height",o.height).attr("fill",c).attr("stroke",m),s.append("text").attr("font-weight",n.swimlaneTextFontWeight).attr("x",30).attr("y",o.y+30).text(o.label)}}e(he,"renderD3Swimlane");var Ee=e(function(t,i,n,r){if(a.debug("in eventmodeling renderer",t+`
3
+ `,"id:",i,n),!Be)throw Error("EventModeling config not found");let o=r.db,{themeVariables:s,eventmodeling:c}=l(),m=p(`[id="${i}"]`),u=o.getDiagramProps(),x=o.getState(),g=`em-arrowhead-${i}`,f=s.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(he(m,x.maxR,u,s)),x.boxes.forEach(xe(m,u)),x.relations.forEach(ge(m,u,g,s)),m.append("defs").append("marker").attr("id",g).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),kr(void 0,m,c?.padding??30,c?.useMaxWidth)},"draw"),Ae={draw:Ee},$e=e((t)=>"","getStyles"),Re=$e,Ue={parser:ke,db:N,renderer:Ae,styles:Re};export{Ue as diagram};
@@ -0,0 +1 @@
1
+ import{hi}from"./chunk-qcge7d6s.js";export{hi as default};
@@ -0,0 +1,106 @@
1
+ import{yn}from"./chunk-ybw6vgf6.js";import{G}from"./chunk-14bad871.js";import{e,a,D,b,v,C,S,E,T,A,R,L,l,kr,p,ji,U,M}from"./chunk-pyg1mr80.js";import{X}from"./chunk-zc1mk10n.js";var k={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=D.gitGraph,J=e(()=>U({...Ce,...b().gitGraph}),"getConfig"),m=new yn(()=>{let t=J(),{mainBranchName:r,mainBranchOrder:o}=t;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:o}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function ne(){return ji({length:7})}e(ne,"getID");function pe(t,r){let o=Object.create(null);return t.reduce((c,i)=>{let h=r(i);if(!o[h])o[h]=!0,c.push(i);return c},[])}e(pe,"uniqBy");var ve=e(function(t){m.records.direction=t},"setDirection"),Ee=e(function(t){a.debug("options str",t),t=t?.trim(),t=t||"{}";try{m.records.options=JSON.parse(t)}catch(r){a.error("error while parsing gitGraph options",r.message)}},"setOptions"),Te=e(function(){return m.records.options},"getOptions"),Le=e(function(t){let{msg:r,id:o,type:c,tags:i}=t;a.info("commit",r,o,c,i),a.debug("Entering commit:",r,o,c,i);let h=J();o=v.sanitizeText(o,h),r=v.sanitizeText(r,h),i=i?.map((s)=>v.sanitizeText(s,h));let n={id:o?o:m.records.seq+"-"+ne(),message:r,seq:m.records.seq++,type:c??k.NORMAL,tags:i??[],parents:m.records.head==null?[]:[m.records.head.id],branch:m.records.currBranch};if(m.records.head=n,a.info("main branch",h.mainBranchName),m.records.commits.has(n.id))a.warn(`Commit ID ${n.id} already exists`);m.records.commits.set(n.id,n),m.records.branches.set(m.records.currBranch,n.id),a.debug("in pushCommit "+n.id)},"commit"),Me=e(function(t){let{name:r,order:o}=t;if(r=v.sanitizeText(r,J()),m.records.branches.has(r))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);m.records.branches.set(r,m.records.head!=null?m.records.head.id:null),m.records.branchConfig.set(r,{name:r,order:o}),ye(r),a.debug("in createBranch")},"branch"),Pe=e((t)=>{let{branch:r,id:o,type:c,tags:i}=t,h=J();if(r=v.sanitizeText(r,h),o)o=v.sanitizeText(o,h);let n=m.records.branches.get(m.records.currBranch),s=m.records.branches.get(r),g=n?m.records.commits.get(n):void 0,y=s?m.records.commits.get(s):void 0;if(g&&y&&g.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(m.records.currBranch===r){let d=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(g===void 0||!g){let d=Error(`Incorrect usage of "merge". Current branch (${m.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!m.records.branches.has(r)){let d=Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(y===void 0||!y){let d=Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if(g===y){let d=Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(o&&m.records.commits.has(o)){let d=Error('Incorrect usage of "merge". Commit with id:'+o+" already exists, use different custom id");throw d.hash={text:`merge ${r} ${o} ${c} ${i?.join(" ")}`,token:`merge ${r} ${o} ${c} ${i?.join(" ")}`,expected:[`merge ${r} ${o}_UNIQUE ${c} ${i?.join(" ")}`]},d}let x=s?s:"",f={id:o||`${m.records.seq}-${ne()}`,message:`merged branch ${r} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,x],branch:m.records.currBranch,type:k.MERGE,customType:c,customId:o?!0:!1,tags:i??[]};m.records.head=f,m.records.commits.set(f.id,f),m.records.branches.set(m.records.currBranch,f.id),a.debug(m.records.branches),a.debug("in mergeBranch")},"merge"),Re=e(function(t){let{id:r,targetId:o,tags:c,parent:i}=t;a.debug("Entering cherryPick:",r,o,c);let h=J();if(r=v.sanitizeText(r,h),o=v.sanitizeText(o,h),c=c?.map((g)=>v.sanitizeText(g,h)),i=v.sanitizeText(i,h),!r||!m.records.commits.has(r)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},g}let n=m.records.commits.get(r);if(n===void 0||!n)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(n.parents)&&n.parents.includes(i)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let s=n.branch;if(n.type===k.MERGE&&!i)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!o||!m.records.commits.has(o)){if(s===m.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},f}let g=m.records.branches.get(m.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},f}let y=m.records.commits.get(g);if(y===void 0||!y){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},f}let x={id:m.records.seq+"-"+ne(),message:`cherry-picked ${n?.message} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,n.id],branch:m.records.currBranch,type:k.CHERRY_PICK,tags:c?c.filter(Boolean):[`cherry-pick:${n.id}${n.type===k.MERGE?`|parent:${i}`:""}`]};m.records.head=x,m.records.commits.set(x.id,x),m.records.branches.set(m.records.currBranch,x.id),a.debug(m.records.branches),a.debug("in cherryPick")}},"cherryPick"),ye=e(function(t){if(t=v.sanitizeText(t,J()),!m.records.branches.has(t)){let r=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}else{m.records.currBranch=t;let r=m.records.branches.get(m.records.currBranch);if(r===void 0||!r)m.records.head=null;else m.records.head=m.records.commits.get(r)??null}},"checkout");function he(t,r,o){let c=t.indexOf(r);if(c===-1)t.push(o);else t.splice(c,1,o)}e(he,"upsert");function me(t){let r=t.reduce((i,h)=>{if(i.seq>h.seq)return i;return h},t[0]),o="";t.forEach(function(i){if(i===r)o+="\t*";else o+="\t|"});let c=[o,r.id,r.seq];for(let i in m.records.branches)if(m.records.branches.get(i)===r.id)c.push(i);if(a.debug(c.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){let i=m.records.commits.get(r.parents[0]);if(he(t,r,i),r.parents[1])t.push(m.records.commits.get(r.parents[1]))}else if(r.parents.length==0)return;else if(r.parents[0]){let i=m.records.commits.get(r.parents[0]);he(t,r,i)}t=pe(t,(i)=>i.id),me(t)}e(me,"prettyPrintCommitHistory");var Oe=e(function(){a.debug(m.records.commits);let t=xe()[0];me([t])},"prettyPrint"),Ie=e(function(){m.reset(),C()},"clear"),_e=e(function(){return[...m.records.branchConfig.values()].map((r,o)=>{if(r.order!==null&&r.order!==void 0)return r;return{...r,order:parseFloat(`0.${o}`)}}).sort((r,o)=>(r.order??0)-(o.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ge=e(function(){return m.records.branches},"getBranches"),De=e(function(){return m.records.commits},"getCommits"),xe=e(function(){let t=[...m.records.commits.values()];return t.forEach(function(r){a.debug(r.id)}),t.sort((r,o)=>r.seq-o.seq),t},"getCommitsArray"),We=e(function(){return m.records.currBranch},"getCurrentBranch"),qe=e(function(){return m.records.direction},"getDirection"),Ae=e(function(){return m.records.head},"getHead"),ue={commitType:k,getConfig:J,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:ye,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:xe,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:S,getAccTitle:E,getAccDescription:A,setAccDescription:T,setDiagramTitle:R,getDiagramTitle:L},He=e((t,r)=>{if(G(t,r),t.dir)r.setDirection(t.dir);for(let o of t.statements)Se(o,r)},"populate"),Se=e((t,r)=>{let c={Commit:e((i)=>r.commit(Ne(i)),"Commit"),Branch:e((i)=>r.branch(Fe(i)),"Branch"),Merge:e((i)=>r.merge(ze(i)),"Merge"),Checkout:e((i)=>r.checkout(Ye(i)),"Checkout"),CherryPicking:e((i)=>r.cherryPick(je(i)),"CherryPicking")}[t.$type];if(c)c(t);else a.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Ne=e((t)=>({id:t.id,msg:t.message??"",type:t.type!==void 0?k[t.type]:k.NORMAL,tags:t.tags??void 0}),"parseCommit"),Fe=e((t)=>({name:t.name,order:t.order??0}),"parseBranch"),ze=e((t)=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?k[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Ye=e((t)=>t.branch,"parseCheckout"),je=e((t)=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Ke={parse:e(async(t)=>{let r=await X("gitGraph",t);a.debug(r),He(r,ue)},"parse")},j=10,K=40,N=4,z=2,V=8,ce=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),le=12,ge=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Z=e((t,r,o=!1)=>{if(o&&t>0)return(t-1)%(r-1)+1;return t%r},"calcColorIndex"),W=new Map,q=new Map,oe=30,te=new Map,se=[],Y=0,w="LR",Ve=e(()=>{W.clear(),q.clear(),te.clear(),Y=0,se=[],w="LR"},"clear"),be=e((t)=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t==="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach((c)=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=c.trim(),r.appendChild(i)}),r},"drawText"),we=e((t)=>{let r,o,c;if(w==="BT")o=e((i,h)=>i<=h,"comparisonFunc"),c=1/0;else o=e((i,h)=>i>=h,"comparisonFunc"),c=0;return t.forEach((i)=>{let h=w==="TB"||w=="BT"?q.get(i)?.y:q.get(i)?.x;if(h!==void 0&&o(h,c))r=i,c=h}),r},"findClosestParent"),Ze=e((t)=>{let r="",o=1/0;return t.forEach((c)=>{let i=q.get(c).y;if(i<=o)r=c,o=i}),r||void 0},"findClosestParentBT"),Xe=e((t,r,o)=>{let c=o,i=o,h=[];t.forEach((n)=>{let s=r.get(n);if(!s)throw Error(`Commit not found for key ${n}`);if(s.parents.length)c=Qe(s),i=Math.max(c,i);else h.push(s);et(s,c)}),c=i,h.forEach((n)=>{tt(n,c,o)}),t.forEach((n)=>{let s=r.get(n);if(s?.parents.length){let g=Ze(s.parents);if(c=q.get(g).y-K,c<=i)i=c;let y=W.get(s.branch).pos,x=c-j;q.set(s.id,{x:y,y:x})}})},"setParallelBTPos"),Je=e((t)=>{let r=we(t.parents.filter((c)=>c!==null));if(!r)throw Error(`Closest parent not found for commit ${t.id}`);let o=q.get(r)?.y;if(o===void 0)throw Error(`Closest parent position not found for commit ${t.id}`);return o},"findClosestParentPos"),Qe=e((t)=>Je(t)+K,"calculateCommitPosition"),et=e((t,r)=>{let o=W.get(t.branch);if(!o)throw Error(`Branch not found for commit ${t.id}`);let c=o.pos,i=r+j;return q.set(t.id,{x:c,y:i}),{x:c,y:i}},"setCommitPosition"),tt=e((t,r,o)=>{let c=W.get(t.branch);if(!c)throw Error(`Branch not found for commit ${t.id}`);let i=r+o,h=c.pos;q.set(t.id,{x:h,y:i})},"setRootPosition"),rt=e((t,r,o,c,i,h)=>{let{theme:n}=l(),s=ce.has(n??""),g=ge.has(n??""),y=Ue.has(n??"");if(h===k.HIGHLIGHT)t.append("rect").attr("x",o.x-10+(s?3:0)).attr("y",o.y-10+(s?3:0)).attr("width",s?14:20).attr("height",s?14:20).attr("class",`commit ${r.id} commit-highlight${Z(i,V,g)} ${c}-outer`),t.append("rect").attr("x",o.x-6+(s?2:0)).attr("y",o.y-6+(s?2:0)).attr("width",s?8:12).attr("height",s?8:12).attr("class",`commit ${r.id} commit${Z(i,V,g)} ${c}-inner`);else if(h===k.CHERRY_PICK)t.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",s?7:10).attr("class",`commit ${r.id} ${c}`),t.append("circle").attr("cx",o.x-3).attr("cy",o.y+2).attr("r",s?2.5:2.75).attr("fill",y?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`),t.append("circle").attr("cx",o.x+3).attr("cy",o.y+2).attr("r",s?2.5:2.75).attr("fill",y?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`),t.append("line").attr("x1",o.x+3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",y?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`),t.append("line").attr("x1",o.x-3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",y?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`);else{let x=t.append("circle");if(x.attr("cx",o.x),x.attr("cy",o.y),x.attr("r",s?7:10),x.attr("class",`commit ${r.id} commit${Z(i,V,g)}`),h===k.MERGE){let f=t.append("circle");f.attr("cx",o.x),f.attr("cy",o.y),f.attr("r",s?5:6),f.attr("class",`commit ${c} ${r.id} commit${Z(i,V,g)}`)}if(h===k.REVERSE){let f=t.append("path"),d=s?4:5;f.attr("d",`M ${o.x-d},${o.y-d}L${o.x+d},${o.y+d}M${o.x-d},${o.y+d}L${o.x+d},${o.y-d}`).attr("class",`commit ${c} ${r.id} commit${Z(i,V,g)}`)}}},"drawCommitBullet"),at=e((t,r,o,c,i)=>{if(r.type!==k.CHERRY_PICK&&(r.customId&&r.type===k.MERGE||r.type!==k.MERGE)&&i.showCommitLabel){let h=t.append("g"),n=h.insert("rect").attr("class","commit-label-bkg"),s=h.append("text").attr("x",c).attr("y",o.y+25).attr("class","commit-label").text(r.id),g=s.node()?.getBBox();if(g){if(n.attr("x",o.posWithOffset-g.width/2-z).attr("y",o.y+13.5).attr("width",g.width+2*z).attr("height",g.height+2*z),w==="TB"||w==="BT")n.attr("x",o.x-(g.width+4*N+5)).attr("y",o.y-12),s.attr("x",o.x-(g.width+4*N)).attr("y",o.y+g.height-12);else s.attr("x",o.posWithOffset-g.width/2);if(i.rotateCommitLabel)if(w==="TB"||w==="BT")s.attr("transform","rotate(-45, "+o.x+", "+o.y+")"),n.attr("transform","rotate(-45, "+o.x+", "+o.y+")");else{let y=-7.5-(g.width+10)/25*9.5,x=10+g.width/25*8.5;h.attr("transform","translate("+y+", "+x+") rotate(-45, "+c+", "+o.y+")")}}}},"drawCommitLabel"),ot=e((t,r,o,c)=>{if(r.tags.length>0){let i=0,h=0,n=0,s=[];for(let g of r.tags.reverse()){let y=t.insert("polygon"),x=t.append("circle"),f=t.append("text").attr("y",o.y-16-i).attr("class","tag-label").text(g),d=f.node()?.getBBox();if(!d)throw Error("Tag bbox not found");h=Math.max(h,d.width),n=Math.max(n,d.height),f.attr("x",o.posWithOffset-d.width/2),s.push({tag:f,hole:x,rect:y,yOffset:i}),i+=20}for(let{tag:g,hole:y,rect:x,yOffset:f}of s){let d=n/2,B=o.y-19.2-f;if(x.attr("class","tag-label-bkg").attr("points",`
2
+ ${c-h/2-N/2},${B+z}
3
+ ${c-h/2-N/2},${B-z}
4
+ ${o.posWithOffset-h/2-N},${B-d-z}
5
+ ${o.posWithOffset+h/2+N},${B-d-z}
6
+ ${o.posWithOffset+h/2+N},${B+d+z}
7
+ ${o.posWithOffset-h/2-N},${B+d+z}`),y.attr("cy",B).attr("cx",c-h/2+N/2).attr("r",1.5).attr("class","tag-hole"),w==="TB"||w==="BT"){let u=c+f;x.attr("class","tag-label-bkg").attr("points",`
8
+ ${o.x},${u+2}
9
+ ${o.x},${u-2}
10
+ ${o.x+j},${u-d-2}
11
+ ${o.x+j+h+4},${u-d-2}
12
+ ${o.x+j+h+4},${u+d+2}
13
+ ${o.x+j},${u+d+2}`).attr("transform","translate(12,12) rotate(45, "+o.x+","+c+")"),y.attr("cx",o.x+N/2).attr("cy",u).attr("transform","translate(12,12) rotate(45, "+o.x+","+c+")"),g.attr("x",o.x+5).attr("y",u+3).attr("transform","translate(14,14) rotate(45, "+o.x+","+c+")")}}}},"drawCommitTags"),st=e((t)=>{switch(t.customType??t.type){case k.NORMAL:return"commit-normal";case k.REVERSE:return"commit-reverse";case k.HIGHLIGHT:return"commit-highlight";case k.MERGE:return"commit-merge";case k.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),nt=e((t,r,o,c)=>{let i={x:0,y:0};if(t.parents.length>0){let h=we(t.parents);if(h){let n=c.get(h)??i;if(r==="TB")return n.y+K;else if(r==="BT")return(c.get(t.id)??i).y-K;else return n.x+K}}else if(r==="TB")return oe;else if(r==="BT")return(c.get(t.id)??i).y-K;else return 0;return 0},"calculatePosition"),ct=e((t,r,o)=>{let c=w==="BT"&&o?r:r+j,i=W.get(t.branch)?.pos,h=w==="TB"||w==="BT"?W.get(t.branch)?.pos:c;if(h===void 0||i===void 0)throw Error(`Position were undefined for commit ${t.id}`);let n=ce.has(l().theme??""),s=w==="TB"||w==="BT"?c:i+(n?le/2+1:-2);return{x:h,y:s,posWithOffset:c}},"getCommitPosition"),$e=e((t,r,o,c)=>{let i=t.append("g").attr("class","commit-bullets"),h=t.append("g").attr("class","commit-labels"),n=w==="TB"||w==="BT"?oe:0,s=[...r.keys()],g=c.parallelCommits??!1,y=e((f,d)=>{let B=r.get(f)?.seq,u=r.get(d)?.seq;return B!==void 0&&u!==void 0?B-u:0},"sortKeys"),x=s.sort(y);if(w==="BT"){if(g)Xe(x,r,n);x=x.reverse()}x.forEach((f)=>{let d=r.get(f);if(!d)throw Error(`Commit not found for key ${f}`);if(g)n=nt(d,w,n,q);let B=ct(d,n,g);if(o){let u=st(d),P=d.customType??d.type,O=W.get(d.branch)?.index??0;rt(i,d,B,u,O,P),at(h,d,B,n,c),ot(h,d,B,n)}if(w==="TB"||w==="BT")q.set(d.id,{x:B.x,y:B.posWithOffset});else q.set(d.id,{x:B.posWithOffset,y:B.y});if(n=w==="BT"&&g?n+K:n+K+j,n>Y)Y=n})},"drawCommits"),it=e((t,r,o,c,i)=>{let n=(w==="TB"||w==="BT"?o.x<c.x:o.y<c.y)?r.branch:t.branch,s=e((y)=>y.branch===n,"isOnBranchToGetCurve"),g=e((y)=>y.seq>t.seq&&y.seq<r.seq,"isBetweenCommits");return[...i.values()].some((y)=>g(y)&&s(y))},"shouldRerouteArrow"),re=e((t,r,o=0)=>{let c=t+Math.abs(t-r)/2;if(o>5)return c;if(se.every((n)=>Math.abs(n-c)>=10))return se.push(c),c;let h=Math.abs(t-r);return re(t,r-h/5,o+1)},"findLane"),dt=e((t,r,o,c)=>{let{theme:i}=l(),h=ge.has(i??""),n=q.get(r.id),s=q.get(o.id);if(n===void 0||s===void 0)throw Error(`Commit positions not found for commits ${r.id} and ${o.id}`);let g=it(r,o,n,s,c),y="",x="",f=0,d=0,B=W.get(o.branch)?.index;if(o.type===k.MERGE&&r.id!==o.parents[0])B=W.get(r.branch)?.index;let u;if(g){y="A 10 10, 0, 0, 0,",x="A 10 10, 0, 0, 1,",f=10,d=10;let P=n.y<s.y?re(n.y,s.y):re(s.y,n.y),O=n.x<s.x?re(n.x,s.x):re(s.x,n.x);if(w==="TB")if(n.x<s.x)u=`M ${n.x} ${n.y} L ${O-f} ${n.y} ${x} ${O} ${n.y+d} L ${O} ${s.y-f} ${y} ${O+d} ${s.y} L ${s.x} ${s.y}`;else B=W.get(r.branch)?.index,u=`M ${n.x} ${n.y} L ${O+f} ${n.y} ${y} ${O} ${n.y+d} L ${O} ${s.y-f} ${x} ${O-d} ${s.y} L ${s.x} ${s.y}`;else if(w==="BT")if(n.x<s.x)u=`M ${n.x} ${n.y} L ${O-f} ${n.y} ${y} ${O} ${n.y-d} L ${O} ${s.y+f} ${x} ${O+d} ${s.y} L ${s.x} ${s.y}`;else B=W.get(r.branch)?.index,u=`M ${n.x} ${n.y} L ${O+f} ${n.y} ${x} ${O} ${n.y-d} L ${O} ${s.y+f} ${y} ${O-d} ${s.y} L ${s.x} ${s.y}`;else if(n.y<s.y)u=`M ${n.x} ${n.y} L ${n.x} ${P-f} ${y} ${n.x+d} ${P} L ${s.x-f} ${P} ${x} ${s.x} ${P+d} L ${s.x} ${s.y}`;else B=W.get(r.branch)?.index,u=`M ${n.x} ${n.y} L ${n.x} ${P+f} ${x} ${n.x+d} ${P} L ${s.x-f} ${P} ${y} ${s.x} ${P-d} L ${s.x} ${s.y}`}else if(y="A 20 20, 0, 0, 0,",x="A 20 20, 0, 0, 1,",f=20,d=20,w==="TB"){if(n.x<s.x)if(o.type===k.MERGE&&r.id!==o.parents[0])u=`M ${n.x} ${n.y} L ${n.x} ${s.y-f} ${y} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;else u=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${x} ${s.x} ${n.y+d} L ${s.x} ${s.y}`;if(n.x>s.x)if(y="A 20 20, 0, 0, 0,",x="A 20 20, 0, 0, 1,",f=20,d=20,o.type===k.MERGE&&r.id!==o.parents[0])u=`M ${n.x} ${n.y} L ${n.x} ${s.y-f} ${x} ${n.x-d} ${s.y} L ${s.x} ${s.y}`;else u=`M ${n.x} ${n.y} L ${s.x+f} ${n.y} ${y} ${s.x} ${n.y+d} L ${s.x} ${s.y}`;if(n.x===s.x)u=`M ${n.x} ${n.y} L ${s.x} ${s.y}`}else if(w==="BT"){if(n.x<s.x)if(o.type===k.MERGE&&r.id!==o.parents[0])u=`M ${n.x} ${n.y} L ${n.x} ${s.y+f} ${x} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;else u=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${y} ${s.x} ${n.y-d} L ${s.x} ${s.y}`;if(n.x>s.x)if(y="A 20 20, 0, 0, 0,",x="A 20 20, 0, 0, 1,",f=20,d=20,o.type===k.MERGE&&r.id!==o.parents[0])u=`M ${n.x} ${n.y} L ${n.x} ${s.y+f} ${y} ${n.x-d} ${s.y} L ${s.x} ${s.y}`;else u=`M ${n.x} ${n.y} L ${s.x+f} ${n.y} ${x} ${s.x} ${n.y-d} L ${s.x} ${s.y}`;if(n.x===s.x)u=`M ${n.x} ${n.y} L ${s.x} ${s.y}`}else{if(n.y<s.y)if(o.type===k.MERGE&&r.id!==o.parents[0])u=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${x} ${s.x} ${n.y+d} L ${s.x} ${s.y}`;else u=`M ${n.x} ${n.y} L ${n.x} ${s.y-f} ${y} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;if(n.y>s.y)if(o.type===k.MERGE&&r.id!==o.parents[0])u=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${y} ${s.x} ${n.y-d} L ${s.x} ${s.y}`;else u=`M ${n.x} ${n.y} L ${n.x} ${s.y+f} ${x} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;if(n.y===s.y)u=`M ${n.x} ${n.y} L ${s.x} ${s.y}`}if(u===void 0)throw Error("Line definition not found");t.append("path").attr("d",u).attr("class","arrow arrow"+Z(B,V,h))},"drawArrow"),ht=e((t,r)=>{let o=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach((c)=>{let i=r.get(c);if(i.parents&&i.parents.length>0)i.parents.forEach((h)=>{dt(o,r.get(h),i,r)})})},"drawArrows"),lt=e((t,r,o,c)=>{let{look:i,theme:h,themeVariables:n}=l(),{dropShadow:s,THEME_COLOR_LIMIT:g}=n,y=ce.has(h??""),x=ge.has(h??""),f=t.append("g");r.forEach((d,B)=>{let u=Z(B,y?g:V,x),P=W.get(d.name)?.pos;if(P===void 0)throw Error(`Position not found for branch ${d.name}`);let O=w==="TB"||w==="BT"?P:y?P+le/2+1:P-2,I=f.append("line");if(I.attr("x1",0),I.attr("y1",O),I.attr("x2",Y),I.attr("y2",O),I.attr("class","branch branch"+u),w==="TB")I.attr("y1",oe),I.attr("x1",P),I.attr("y2",Y),I.attr("x2",P);else if(w==="BT")I.attr("y1",Y),I.attr("x1",P),I.attr("y2",oe),I.attr("x2",P);se.push(O);let ie=d.name,ee=be(ie),H=f.insert("rect"),F=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);F.node().appendChild(ee);let _=ee.getBBox(),fe=y?0:4,ae=y?16:0,Q=y?le:0;if(i==="neo")H.attr("data-look","neo");if(H.attr("class","branchLabelBkg label"+u).attr("style",i==="neo"?`filter:${y?`url(#${c}-drop-shadow)`:s}`:"").attr("rx",fe).attr("ry",fe).attr("x",-_.width-4-(o.rotateCommitLabel===!0?30:0)).attr("y",-_.height/2+10).attr("width",_.width+18+ae).attr("height",_.height+4+Q),F.attr("transform","translate("+(-_.width-14-(o.rotateCommitLabel===!0?30:0)+ae/2)+", "+(O-_.height/2-2)+")"),w==="TB"){if(H.attr("x",P-_.width/2-10).attr("y",0),F.attr("transform","translate("+(P-_.width/2-5)+", 0)"),y)H.attr("transform",`translate(${-ae/2-3}, ${-Q-10})`),F.attr("transform","translate("+(P-_.width/2-5)+", "+(-Q*2+7)+")")}else if(w==="BT"){if(H.attr("x",P-_.width/2-10).attr("y",Y),F.attr("transform","translate("+(P-_.width/2-5)+", "+Y+")"),y)H.attr("transform",`translate(${-ae/2-3}, ${Q+10})`),F.attr("transform","translate("+(P-_.width/2-5)+", "+(Y+Q*2+4)+")")}else H.attr("transform","translate(-19, "+(O-12-Q/2)+")")})},"drawBranches"),mt=e(function(t,r,o,c,i){return W.set(t,{pos:r,index:o}),r+=50+(i?40:0)+(w==="TB"||w==="BT"?c.width/2:0),r},"setBranchPosition"),gt=e(function(t,r,o,c){Ve(),a.debug("in gitgraph renderer",t+`
14
+ `,"id:",r,o);let i=c.db;if(!i.getConfig){a.error("getConfig method is not available on db");return}let h=i.getConfig(),n=h.rotateCommitLabel??!1;te=i.getCommits();let s=i.getBranchesAsObjArray();w=i.getDirection();let g=p(`[id="${r}"]`),{look:y,theme:x,themeVariables:f}=l(),{useGradient:d,gradientStart:B,gradientStop:u,filterColor:P}=f;if(d){let I=g.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");I.append("stop").attr("offset","0%").attr("stop-color",B).attr("stop-opacity",1),I.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}if(y==="neo"&&ce.has(x??""))g.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",P);let O=0;if(s.forEach((I,ie)=>{let ee=be(I.name),H=g.append("g"),de=H.insert("g").attr("class","branchLabel"),F=de.insert("g").attr("class","label branch-label");F.node()?.appendChild(ee);let _=ee.getBBox();O=mt(I.name,O,ie,_,n),F.remove(),de.remove(),H.remove()}),$e(g,te,!1,h),h.showBranches)lt(g,s,h,r);ht(g,te),$e(g,te,!0,h),M.insertTitle(g,"gitTitleText",h.titleTopMargin??0,i.getDiagramTitle()),kr(void 0,g,h.diagramPadding,h.useMaxWidth)},"draw"),ft={draw:gt},Be=8,ke=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),$t=new Set(["redux-color","redux-dark-color"]),pt=new Set(["neo","neo-dark"]),yt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),xt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),ut=e((t)=>{let{svgId:r}=t,o="";if(t.useGradient&&r)for(let c=0;c<t.THEME_COLOR_LIMIT;c++)o+=`
15
+ .label${c} { fill: ${t.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${t.strokeWidth};}
16
+ `;return o},"genGitGraphGradient"),bt=e((t)=>{let r=b(),{theme:o,themeVariables:c}=r,{borderColorArray:i}=c,h=ke.has(o);if(pt.has(o)){let n="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)if(s===0)n+=`
17
+ .branch-label${s} { fill: ${t.nodeBorder};}
18
+ .commit${s} { stroke: ${t.nodeBorder}; }
19
+ .commit-highlight${s} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }
20
+ .arrow${s} { stroke: ${t.nodeBorder}; }
21
+ .commit-bullets { fill: ${t.nodeBorder}; }
22
+ .commit-cherry-pick${s} { stroke: ${t.nodeBorder}; }
23
+ ${ut(t)}`;else{let g=s%Be;n+=`
24
+ .branch-label${s} { fill: ${t["gitBranchLabel"+g]}; }
25
+ .commit${s} { stroke: ${t["git"+g]}; fill: ${t["git"+g]}; }
26
+ .commit-highlight${s} { stroke: ${t["gitInv"+g]}; fill: ${t["gitInv"+g]}; }
27
+ .arrow${s} { stroke: ${t["git"+g]}; }
28
+ `}return n}else if(!$t.has(o)){let n="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)n+=`
29
+ .branch-label${s} { fill: ${t.nodeBorder}; ${h?`font-weight:${t.noteFontWeight}`:""} }
30
+ .commit${s} { stroke: ${t.nodeBorder}; }
31
+ .commit-highlight${s} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }
32
+ .label${s} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${h?`font-weight:${t.noteFontWeight}`:""}}
33
+ .arrow${s} { stroke: ${t.nodeBorder}; }
34
+ .commit-bullets { fill: ${t.nodeBorder}; }
35
+ .commit-cherry-pick${s} { stroke: ${t.nodeBorder}; }
36
+ `;return n}else{let n="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)if(s===0)n+=`
37
+ .branch-label${s} { fill: ${t.nodeBorder}; ${h?`font-weight:${t.noteFontWeight}`:""} }
38
+ .commit${s} { stroke: ${t.nodeBorder}; }
39
+ .commit-highlight${s} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }
40
+ .label${s} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${h?`font-weight:${t.noteFontWeight}`:""} }
41
+ .arrow${s} { stroke: ${t.nodeBorder}; }
42
+ .commit-bullets { fill: ${t.nodeBorder}; }
43
+ `;else{let g=s%i.length;n+=`
44
+ .branch-label${s} { fill: ${t.nodeBorder}; ${h?`font-weight:${t.noteFontWeight}`:""} }
45
+ .commit${s} { stroke: ${i[g]}; fill: ${i[g]}; }
46
+ .commit-highlight${s} { stroke: ${i[g]}; fill: ${i[g]}; }
47
+ .label${s} { fill: ${yt.has(o)?t.mainBkg:i[g]}; stroke: ${i[g]}; stroke-width: ${t.strokeWidth}; }
48
+ .arrow${s} { stroke: ${i[g]}; }
49
+ `}return n}},"genColor"),wt=e((t)=>`${Array.from({length:t.THEME_COLOR_LIMIT},(r,o)=>o).map((r)=>{let o=r%Be;return`
50
+ .branch-label${r} { fill: ${t["gitBranchLabel"+o]}; }
51
+ .commit${r} { stroke: ${t["git"+o]}; fill: ${t["git"+o]}; }
52
+ .commit-highlight${r} { stroke: ${t["gitInv"+o]}; fill: ${t["gitInv"+o]}; }
53
+ .label${r} { fill: ${t["git"+o]}; }
54
+ .arrow${r} { stroke: ${t["git"+o]}; }
55
+ `}).join(`
56
+ `)}`,"normalTheme"),Bt=e((t)=>{let r=b(),{theme:o}=r,c=xt.has(o);return`
57
+ .commit-id,
58
+ .commit-msg,
59
+ .branch-label {
60
+ fill: lightgrey;
61
+ color: lightgrey;
62
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
63
+ font-family: var(--mermaid-font-family);
64
+ }
65
+
66
+ ${c?bt(t):wt(t)}
67
+
68
+ .branch {
69
+ stroke-width: ${t.strokeWidth};
70
+ stroke: ${t.commitLineColor??t.lineColor};
71
+ stroke-dasharray: ${c?"4 2":"2"};
72
+ }
73
+ .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${c?t.nodeBorder:t.commitLabelColor}; ${c?`font-weight:${t.noteFontWeight};`:""}}
74
+ .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${c?"transparent":t.commitLabelBackground}; opacity: ${c?"":0.5}; }
75
+ .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
76
+ .tag-label-bkg { fill: ${c?t.mainBkg:t.tagLabelBackground}; stroke: ${c?t.nodeBorder:t.tagLabelBorder}; ${c?`filter:${t.dropShadow}`:""} }
77
+ .tag-hole { fill: ${t.textColor}; }
78
+
79
+ .commit-merge {
80
+ stroke: ${c?t.mainBkg:t.primaryColor};
81
+ fill: ${c?t.mainBkg:t.primaryColor};
82
+ }
83
+ .commit-reverse {
84
+ stroke: ${c?t.mainBkg:t.primaryColor};
85
+ fill: ${c?t.mainBkg:t.primaryColor};
86
+ stroke-width: ${c?t.strokeWidth:3};
87
+ }
88
+ .commit-highlight-outer {
89
+ }
90
+ .commit-highlight-inner {
91
+ stroke: ${c?t.mainBkg:t.primaryColor};
92
+ fill: ${c?t.mainBkg:t.primaryColor};
93
+ }
94
+
95
+ .arrow {
96
+ /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
97
+ stroke-width: ${ke.has(o)?t.strokeWidth:8};
98
+ stroke-linecap: round;
99
+ fill: none
100
+ }
101
+ .gitTitleText {
102
+ text-anchor: middle;
103
+ font-size: 18px;
104
+ fill: ${t.textColor};
105
+ }
106
+ `},"getStyles"),kt=Bt,Ot={parser:Ke,db:ue,renderer:ft,styles:kt};export{Ot as diagram};
@@ -0,0 +1 @@
1
+ import"./chunk-pyg1mr80.js";import"./chunk-tcp77cp2.js";import{Co}from"./chunk-0k9aec1s.js";import"./chunk-m8knte9z.js";import"./chunk-9dy7z3ej.js";import"./chunk-9xgspn75.js";import"./chunk-01hcjafh.js";export{Co as diagram};
@@ -0,0 +1 @@
1
+ import{_i}from"./chunk-zc1mk10n.js";export{_i as createGitGraphServices};