@bkm016/basalt 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/README.md +275 -2
  2. package/chunk-09vr609h.js +2 -0
  3. package/chunk-0hbjv3y6.js +11 -0
  4. package/chunk-0qqb6v41.js +3753 -0
  5. package/chunk-0szjy61m.js +2 -0
  6. package/chunk-0yytz0r1.js +59 -0
  7. package/chunk-1aspj1hn.js +3 -0
  8. package/chunk-1b7gbe8g.js +10 -0
  9. package/chunk-1v7st27a.js +25 -0
  10. package/chunk-1yzt0qm0.js +2 -0
  11. package/chunk-2bb01ddq.js +16 -0
  12. package/chunk-2wkaw73s.js +9 -0
  13. package/chunk-2zqny2sy.js +2 -0
  14. package/chunk-32at88hc.js +3 -0
  15. package/chunk-3m7qwfm3.js +7 -0
  16. package/chunk-44ek81ad.js +3 -0
  17. package/chunk-45cz26ap.js +39 -0
  18. package/chunk-501zkf9b.js +3 -0
  19. package/chunk-58vz2qsq.js +2 -0
  20. package/chunk-6e49xsf5.js +3 -0
  21. package/chunk-6qertm2t.js +3 -0
  22. package/chunk-8dxzqwq3.js +2 -0
  23. package/chunk-9mmz6wt3.js +2 -0
  24. package/chunk-a3tqx584.js +10 -0
  25. package/chunk-a6r4z44b.js +2 -0
  26. package/chunk-a8nyk4k9.js +2 -0
  27. package/chunk-agntrqs9.js +2 -0
  28. package/chunk-bhqyxyap.js +3 -0
  29. package/chunk-bpw6q7g0.js +3 -0
  30. package/chunk-c25s4w6a.js +5 -0
  31. package/chunk-cv5wsd9m.js +8 -0
  32. package/chunk-d48bfd2e.js +3 -0
  33. package/chunk-dakrpbe6.js +3 -0
  34. package/chunk-dhm42y04.js +7 -0
  35. package/chunk-exnn1867.js +2 -0
  36. package/chunk-f7egr55n.js +31 -0
  37. package/chunk-g2t6t8fk.js +3 -0
  38. package/chunk-h6sw8fbt.js +5 -0
  39. package/chunk-hat3s3pr.js +3 -0
  40. package/chunk-hcn9cf6v.js +2 -0
  41. package/chunk-jhd54p1b.js +3 -0
  42. package/chunk-k7w7ac9q.js +18 -0
  43. package/chunk-kf8hq21a.js +25 -0
  44. package/chunk-kfq8wyd3.js +3 -0
  45. package/chunk-n6e43rvk.js +3 -0
  46. package/chunk-nt2gntad.js +2 -0
  47. package/chunk-pmc3y1z8.js +2 -0
  48. package/chunk-pvncysbb.js +3 -0
  49. package/chunk-q8zx3kt6.js +2 -0
  50. package/chunk-qczbfccb.js +12 -0
  51. package/chunk-qnr1f5pj.js +3 -0
  52. package/chunk-qx0m82rw.js +2 -0
  53. package/chunk-r9aatvwm.js +3 -0
  54. package/chunk-rm3kcxq9.js +20 -0
  55. package/chunk-rv06x0kn.js +7 -0
  56. package/chunk-ry0z4ev6.js +2 -0
  57. package/chunk-s37s3k24.js +12 -0
  58. package/chunk-sh74qzvt.js +5 -0
  59. package/chunk-szat3vp4.js +3 -0
  60. package/chunk-t057xfrt.js +5 -0
  61. package/chunk-tvm4zmgj.js +3 -0
  62. package/chunk-v9fea96h.js +3 -0
  63. package/chunk-vgvq3q12.js +3 -0
  64. package/chunk-vkkj4awb.js +2 -0
  65. package/chunk-vv7fp27r.js +3 -0
  66. package/chunk-wjd9fr23.js +2 -0
  67. package/chunk-wx7kdf0b.js +2 -0
  68. package/chunk-x3dnb9sz.js +3 -0
  69. package/chunk-xsbxykr4.js +2 -0
  70. package/chunk-xysny0ve.js +3 -0
  71. package/chunk-y69ewdn2.js +3 -0
  72. package/chunk-yskm0hsy.js +2 -0
  73. package/chunk-zef13k3h.js +471 -0
  74. package/cli.js +89 -0
  75. package/compiled.js +23 -0
  76. package/icon-dp9pmcvp.png +0 -0
  77. package/package.json +21 -4
  78. package/ui-test-worker.js +226 -0
  79. package/web/KaTeX_AMS-Regular-n7eqehx2.woff2 +0 -0
  80. package/web/KaTeX_Caligraphic-Bold-20r3b6fv.woff2 +0 -0
  81. package/web/KaTeX_Caligraphic-Regular-kkjm8f18.woff2 +0 -0
  82. package/web/KaTeX_Fraktur-Bold-pz5vg4t0.woff2 +0 -0
  83. package/web/KaTeX_Fraktur-Regular-a1e9wkwk.woff2 +0 -0
  84. package/web/KaTeX_Main-Bold-mcp098h8.woff2 +0 -0
  85. package/web/KaTeX_Main-BoldItalic-fy74z249.woff2 +0 -0
  86. package/web/KaTeX_Main-Italic-hw2gxy7f.woff2 +0 -0
  87. package/web/KaTeX_Main-Regular-xvp1b75c.woff2 +0 -0
  88. package/web/KaTeX_Math-BoldItalic-mf5nf33d.woff2 +0 -0
  89. package/web/KaTeX_Math-Italic-ap60jrna.woff2 +0 -0
  90. package/web/KaTeX_SansSerif-Bold-we3bymb6.woff2 +0 -0
  91. package/web/KaTeX_SansSerif-Italic-ent92bjx.woff2 +0 -0
  92. package/web/KaTeX_SansSerif-Regular-0573pbz9.woff2 +0 -0
  93. package/web/KaTeX_Script-Regular-z2rtj6vq.woff2 +0 -0
  94. package/web/KaTeX_Size1-Regular-dfr3w1hv.woff2 +0 -0
  95. package/web/KaTeX_Size2-Regular-kted78zb.woff2 +0 -0
  96. package/web/KaTeX_Size3-Regular-e6k1k5jk.woff2 +0 -0
  97. package/web/KaTeX_Size4-Regular-abedc1pd.woff2 +0 -0
  98. package/web/KaTeX_Typewriter-Regular-scw9zx1z.woff2 +0 -0
  99. package/web/apple-touch-icon-7dkm33qp.png +0 -0
  100. package/web/apple-touch-icon.png +0 -0
  101. package/web/chunk-05w4fyzc.js +1 -0
  102. package/web/chunk-0mrkjnte.js +1 -0
  103. package/web/chunk-0pbjgdgp.js +2 -0
  104. package/web/chunk-0s80zw00.js +1 -0
  105. package/web/chunk-0vt9fg48.js +2 -0
  106. package/web/chunk-20q90epj.js +2 -0
  107. package/web/chunk-22a4ety5.js +1 -0
  108. package/web/chunk-24mfx6w1.js +2 -0
  109. package/web/chunk-2j4m0bh1.js +2 -0
  110. package/web/chunk-2m12wyrb.js +16 -0
  111. package/web/chunk-2msj52w6.js +1 -0
  112. package/web/chunk-2ps6mepk.js +120 -0
  113. package/web/chunk-2pver6r4.js +1 -0
  114. package/web/chunk-2scce33n.js +1 -0
  115. package/web/chunk-37ajk6zg.js +2 -0
  116. package/web/chunk-3ee04tmm.js +200 -0
  117. package/web/chunk-3jhyzmnf.js +292 -0
  118. package/web/chunk-45fzdcgz.js +30 -0
  119. package/web/chunk-4gavbw65.js +1 -0
  120. package/web/chunk-4ks96e4r.js +1 -0
  121. package/web/chunk-4rm1vy7w.js +1 -0
  122. package/web/chunk-4v8en1yw.js +40 -0
  123. package/web/chunk-4wd9r73y.js +1 -0
  124. package/web/chunk-4wkm9fda.js +1 -0
  125. package/web/chunk-54thej0t.js +2 -0
  126. package/web/chunk-59kqahb3.js +1 -0
  127. package/web/chunk-5vw9rs4r.js +4 -0
  128. package/web/chunk-6beqrmtq.js +1 -0
  129. package/web/chunk-6m69hczt.js +2 -0
  130. package/web/chunk-70qwwwak.js +2 -0
  131. package/web/chunk-74j07k8k.js +2 -0
  132. package/web/chunk-8g239029.js +1 -0
  133. package/web/chunk-8p4tc9f4.js +70 -0
  134. package/web/chunk-90kp4pnz.js +2 -0
  135. package/web/chunk-9an7cjd9.js +291 -0
  136. package/web/chunk-9dxjafp2.js +78 -0
  137. package/web/chunk-9p12mgs6.js +2 -0
  138. package/web/chunk-9v1f6yc8.js +1 -0
  139. package/web/chunk-9yakxvjb.js +2 -0
  140. package/web/chunk-a1z5qx1r.js +36 -0
  141. package/web/chunk-a3verqw9.js +214 -0
  142. package/web/chunk-a5x2zveg.js +7 -0
  143. package/web/chunk-ad6x47yy.js +1 -0
  144. package/web/chunk-amzgyy1k.js +1 -0
  145. package/web/chunk-b1pe46zz.js +2 -0
  146. package/web/chunk-b4wbk7vc.js +217 -0
  147. package/web/chunk-bc78qf1m.js +7 -0
  148. package/web/chunk-bgnnrpna.js +89 -0
  149. package/web/chunk-bj90t5gh.js +99 -0
  150. package/web/chunk-bjkc94mv.js +1 -0
  151. package/web/chunk-ca682sm6.js +370 -0
  152. package/web/chunk-cff5hcm8.js +8 -0
  153. package/web/chunk-cg3jterp.js +2 -0
  154. package/web/chunk-d18r4m14.js +141 -0
  155. package/web/chunk-dmqtdeb4.js +1 -0
  156. package/web/chunk-dt462hk9.js +332 -0
  157. package/web/chunk-dy2gm1fs.js +1 -0
  158. package/web/chunk-dzwxgqgm.js +39 -0
  159. package/web/chunk-e32y85kx.js +1 -0
  160. package/web/chunk-e53wfgb8.js +1 -0
  161. package/web/chunk-e6jxqbv7.js +3 -0
  162. package/web/chunk-esp1mmgr.js +1 -0
  163. package/web/chunk-ew3cgdtd.js +1 -0
  164. package/web/chunk-f26smjjf.js +2 -0
  165. package/web/chunk-f91wzwtk.js +1 -0
  166. package/web/chunk-fk0dh93x.js +89 -0
  167. package/web/chunk-fm2ybfj5.js +98 -0
  168. package/web/chunk-fscafg24.js +34 -0
  169. package/web/chunk-fz06t6km.js +55 -0
  170. package/web/chunk-g1ev11wx.js +1 -0
  171. package/web/chunk-g4azyef7.js +106 -0
  172. package/web/chunk-gjq1pxw3.js +1 -0
  173. package/web/chunk-gqw3f02j.js +140 -0
  174. package/web/chunk-h5ejbf6e.js +1 -0
  175. package/web/chunk-hev4hq89.js +2 -0
  176. package/web/chunk-hfaffkrh.js +1 -0
  177. package/web/chunk-hp167dbv.js +1 -0
  178. package/web/chunk-j2vt8c8v.js +1 -0
  179. package/web/chunk-jjh5jvva.js +1 -0
  180. package/web/chunk-jrcyc9s9.js +38 -0
  181. package/web/chunk-jwzd9tzk.js +24 -0
  182. package/web/chunk-k5btcvbg.js +1 -0
  183. package/web/chunk-ka3q31t1.js +1 -0
  184. package/web/chunk-kdyjnwdx.js +2 -0
  185. package/web/chunk-kpvgecwy.js +1 -0
  186. package/web/chunk-kq40ss39.js +1 -0
  187. package/web/chunk-m2d1sp30.js +1 -0
  188. package/web/chunk-n1dmrz44.js +2 -0
  189. package/web/chunk-n90cqdvg.js +2 -0
  190. package/web/chunk-nj0cv1cq.js +257 -0
  191. package/web/chunk-nzey7cpv.js +1 -0
  192. package/web/chunk-p3b9crsa.js +2 -0
  193. package/web/chunk-pf2ab8p8.js +1 -0
  194. package/web/chunk-pxe3vna4.js +1 -0
  195. package/web/chunk-q0p5xqe1.js +84 -0
  196. package/web/chunk-q5ke7a33.js +24 -0
  197. package/web/chunk-q7dsnvpf.js +1 -0
  198. package/web/chunk-qd8bxxdj.js +1 -0
  199. package/web/chunk-qefasa1j.js +2 -0
  200. package/web/chunk-qh7265qw.js +4 -0
  201. package/web/chunk-qnaqf0cr.js +1 -0
  202. package/web/chunk-r1dnh0s8.js +1 -0
  203. package/web/chunk-r5eakmw6.js +1 -0
  204. package/web/chunk-rg426vkf.js +1 -0
  205. package/web/chunk-rpmpttbk.js +12 -0
  206. package/web/chunk-rtf2zzzv.js +1 -0
  207. package/web/chunk-ry9256r7.js +1 -0
  208. package/web/chunk-rykfak98.js +2 -0
  209. package/web/chunk-scpwc9ev.js +1 -0
  210. package/web/chunk-srrfphes.js +1 -0
  211. package/web/chunk-ss1bcb0n.js +2 -0
  212. package/web/chunk-ssy07dd2.js +1 -0
  213. package/web/chunk-t6agpn2z.js +1 -0
  214. package/web/chunk-taynqrgq.js +142 -0
  215. package/web/chunk-tgpbhzn9.js +1 -0
  216. package/web/chunk-tmvakq7n.js +19 -0
  217. package/web/chunk-tqmwd9qp.js +139 -0
  218. package/web/chunk-ts7zrf5b.js +2 -0
  219. package/web/chunk-ttg6tbwx.js +2 -0
  220. package/web/chunk-v28fx2nd.js +1 -0
  221. package/web/chunk-v5cnt7c8.js +1 -0
  222. package/web/chunk-vt40e1kp.js +1136 -0
  223. package/web/chunk-w53rba6g.js +1 -0
  224. package/web/chunk-w86n42dy.js +1 -0
  225. package/web/chunk-w880psmw.js +1 -0
  226. package/web/chunk-wptv8atc.js +2 -0
  227. package/web/chunk-wtawdeej.css +1 -0
  228. package/web/chunk-xbty0rv7.js +41 -0
  229. package/web/chunk-xet1jjy9.js +1 -0
  230. package/web/chunk-xjxv8dg8.js +169 -0
  231. package/web/chunk-xrxne80b.js +62 -0
  232. package/web/chunk-xzp7jf7e.js +2 -0
  233. package/web/chunk-y0m8hrwz.js +303 -0
  234. package/web/chunk-y49fhfda.js +7 -0
  235. package/web/chunk-yd46jhqv.js +1 -0
  236. package/web/chunk-ydtrc1ay.js +2 -0
  237. package/web/chunk-z09emmrb.js +1 -0
  238. package/web/chunk-z7dcbxws.js +1 -0
  239. package/web/chunk-zbj1trar.js +2 -0
  240. package/web/chunk-zde7mj43.js +1 -0
  241. package/web/icon-192.png +0 -0
  242. package/web/icon-512.png +0 -0
  243. package/web/icon-maskable-512.png +0 -0
  244. package/web/icon-yx2p2pye.svg +13 -0
  245. package/web/icon.svg +13 -0
  246. package/web/index.html +23 -0
  247. package/web/install.ps1 +91 -0
  248. package/web/install.sh +177 -0
  249. package/web/inter-latin-wght-normal-an0py913.woff2 +0 -0
  250. package/web/jetbrains-mono-latin-wght-normal-hj2e42wt.woff2 +0 -0
  251. package/web/manifest-txf6vfbq.webmanifest +35 -0
  252. package/web/manifest.webmanifest +35 -0
  253. package/web/source-serif-4-latin-wght-italic-ta5tqqvz.woff2 +0 -0
  254. package/web/source-serif-4-latin-wght-normal-1yyvbhsz.woff2 +0 -0
  255. package/web/sw.js +90 -0
  256. package/worker.js +2 -0
@@ -0,0 +1,217 @@
1
+ import{e,r,Le,O,Xt,y,C,S,E,T,A,I,L,s,p,N,Fe,le,ae,ie,Ye,he,ge}from"./chunk-y0m8hrwz.js";import{Mt}from"./chunk-p3b9crsa.js";import{je}from"./chunk-2m12wyrb.js";import{fe}from"./chunk-ss1bcb0n.js";import{oe}from"./chunk-hev4hq89.js";var tt=function(){var i=e(function(W,b,k,m){for(k=k||{},m=W.length;m--;k[W[m]]=b);return k},"o"),n=[1,18],l=[1,19],u=[1,20],o=[1,41],d=[1,26],f=[1,42],h=[1,24],D=[1,25],F=[1,32],R=[1,33],J=[1,34],_=[1,45],Oe=[1,35],we=[1,36],Me=[1,37],Pe=[1,38],Ve=[1,27],Re=[1,28],Ge=[1,29],Ue=[1,30],ze=[1,31],x=[1,44],v=[1,46],w=[1,43],M=[1,47],Ke=[1,9],g=[1,8,9],be=[1,58],ke=[1,59],me=[1,60],Ce=[1,61],Ee=[1,62],We=[1,63],Qe=[1,64],G=[1,8,9,41],st=[1,77],H=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],Te=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ye=[13,60,86,100,102,103],Z=[13,60,73,74,86,100,102,103],it=[13,60,68,69,70,71,72,86,100,102,103],De=[1,103],ee=[1,121],te=[1,117],se=[1,113],re=[1,119],ne=[1,114],ue=[1,115],ce=[1,116],de=[1,118],pe=[1,120],at=[22,50,60,61,82,86,87,88,89,90],rt=[1,128],Be=[12,39],Xe=[1,8,9,39,41,44,46],_e=[1,8,9,22],nt=[1,153],lt=[1,8,9,61],Y=[1,8,9,22,50,60,61,82,86,87,88,89,90],He={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(b,k,m,c,B,t,Ae){var a=t.length-1;switch(B){case 8:this.$=t[a-1];break;case 9:case 10:case 13:case 15:this.$=t[a];break;case 11:case 14:this.$=t[a-2]+"."+t[a];break;case 12:case 16:this.$=t[a-1]+t[a];break;case 17:case 18:this.$=t[a-1]+"~"+t[a]+"~";break;case 19:c.addRelation(t[a]);break;case 20:t[a-1].title=c.cleanupLabel(t[a]),c.addRelation(t[a-1]);break;case 31:this.$=t[a].trim(),c.setAccTitle(this.$);break;case 32:case 33:this.$=t[a].trim(),c.setAccDescription(this.$);break;case 34:c.addClassesToNamespace(t[a-3],t[a-1][0],t[a-1][1]),c.popNamespace();break;case 35:c.addClassesToNamespace(t[a-4],t[a-1][0],t[a-1][1]),c.popNamespace();break;case 36:this.$=c.addNamespace(t[a]);break;case 37:this.$=c.addNamespace(t[a-1],t[a]);break;case 38:this.$=[[t[a]],[]];break;case 39:this.$=[[t[a-1]],[]];break;case 40:t[a][0].unshift(t[a-2]),this.$=t[a];break;case 41:this.$=[[],[t[a]]];break;case 42:this.$=[[],[t[a-1]]];break;case 43:t[a][1].unshift(t[a-2]),this.$=t[a];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=t[a];break;case 48:c.setCssClass(t[a-2],t[a]);break;case 49:c.addMembers(t[a-3],t[a-1]);break;case 51:c.setCssClass(t[a-5],t[a-3]),c.addMembers(t[a-5],t[a-1]);break;case 52:c.addAnnotation(t[a-3],t[a-1]);break;case 53:c.addAnnotation(t[a-6],t[a-4]),c.addMembers(t[a-6],t[a-1]);break;case 54:c.addAnnotation(t[a-5],t[a-3]);break;case 55:this.$=t[a],c.addClass(t[a]);break;case 56:this.$=t[a-1],c.addClass(t[a-1]),c.setClassLabel(t[a-1],t[a]);break;case 60:c.addAnnotation(t[a],t[a-2]);break;case 61:case 74:this.$=[t[a]];break;case 62:t[a].push(t[a-1]),this.$=t[a];break;case 63:break;case 64:c.addMember(t[a-1],c.cleanupLabel(t[a]));break;case 65:break;case 66:break;case 67:this.$={id1:t[a-2],id2:t[a],relation:t[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:t[a-3],id2:t[a],relation:t[a-1],relationTitle1:t[a-2],relationTitle2:"none"};break;case 69:this.$={id1:t[a-3],id2:t[a],relation:t[a-2],relationTitle1:"none",relationTitle2:t[a-1]};break;case 70:this.$={id1:t[a-4],id2:t[a],relation:t[a-2],relationTitle1:t[a-3],relationTitle2:t[a-1]};break;case 71:this.$=c.addNote(t[a],t[a-1]);break;case 72:this.$=c.addNote(t[a]);break;case 73:this.$=t[a-2],c.defineClass(t[a-1],t[a]);break;case 75:this.$=t[a-2].concat([t[a]]);break;case 76:c.setDirection("TB");break;case 77:c.setDirection("BT");break;case 78:c.setDirection("RL");break;case 79:c.setDirection("LR");break;case 80:this.$={type1:t[a-2],type2:t[a],lineType:t[a-1]};break;case 81:this.$={type1:"none",type2:t[a],lineType:t[a-1]};break;case 82:this.$={type1:t[a-1],type2:"none",lineType:t[a]};break;case 83:this.$={type1:"none",type2:"none",lineType:t[a]};break;case 84:this.$=c.relationType.AGGREGATION;break;case 85:this.$=c.relationType.EXTENSION;break;case 86:this.$=c.relationType.COMPOSITION;break;case 87:this.$=c.relationType.DEPENDENCY;break;case 88:this.$=c.relationType.LOLLIPOP;break;case 89:this.$=c.lineType.LINE;break;case 90:this.$=c.lineType.DOTTED_LINE;break;case 91:case 97:this.$=t[a-2],c.setClickEvent(t[a-1],t[a]);break;case 92:case 98:this.$=t[a-3],c.setClickEvent(t[a-2],t[a-1]),c.setTooltip(t[a-2],t[a]);break;case 93:this.$=t[a-2],c.setLink(t[a-1],t[a]);break;case 94:this.$=t[a-3],c.setLink(t[a-2],t[a-1],t[a]);break;case 95:this.$=t[a-3],c.setLink(t[a-2],t[a-1]),c.setTooltip(t[a-2],t[a]);break;case 96:this.$=t[a-4],c.setLink(t[a-3],t[a-2],t[a]),c.setTooltip(t[a-3],t[a-1]);break;case 99:this.$=t[a-3],c.setClickEvent(t[a-2],t[a-1],t[a]);break;case 100:this.$=t[a-4],c.setClickEvent(t[a-3],t[a-2],t[a-1]),c.setTooltip(t[a-3],t[a]);break;case 101:this.$=t[a-3],c.setLink(t[a-2],t[a]);break;case 102:this.$=t[a-4],c.setLink(t[a-3],t[a-1],t[a]);break;case 103:this.$=t[a-4],c.setLink(t[a-3],t[a-1]),c.setTooltip(t[a-3],t[a]);break;case 104:this.$=t[a-5],c.setLink(t[a-4],t[a-2],t[a]),c.setTooltip(t[a-4],t[a-1]);break;case 105:this.$=t[a-2],c.setCssStyle(t[a-1],t[a]);break;case 106:c.setCssClass(t[a-1],t[a]);break;case 107:this.$=[t[a]];break;case 108:t[a-2].push(t[a]),this.$=t[a-2];break;case 110:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:l,37:u,38:22,42:o,43:23,46:d,48:f,51:h,52:D,54:F,56:R,57:J,60:_,62:Oe,63:we,64:Me,65:Pe,75:Ve,76:Re,78:Ge,82:Ue,83:ze,86:x,100:v,102:w,103:M},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},i(Ke,[2,5],{8:[1,48]}),{8:[1,49]},i(g,[2,19],{22:[1,50]}),i(g,[2,21]),i(g,[2,22]),i(g,[2,23]),i(g,[2,24]),i(g,[2,25]),i(g,[2,26]),i(g,[2,27]),i(g,[2,28]),i(g,[2,29]),i(g,[2,30]),{34:[1,51]},{36:[1,52]},i(g,[2,33]),i(g,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:be,69:ke,70:me,71:Ce,72:Ee,73:We,74:Qe}),{39:[1,65]},i(G,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),i(g,[2,65]),i(g,[2,66]),{16:69,60:_,86:x,100:v,102:w},{16:39,17:40,19:70,60:_,86:x,100:v,102:w,103:M},{16:39,17:40,19:71,60:_,86:x,100:v,102:w,103:M},{16:39,17:40,19:72,60:_,86:x,100:v,102:w,103:M},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:_,86:x,100:v,102:w,103:M},{13:st,55:76},{58:78,60:[1,79]},i(g,[2,76]),i(g,[2,77]),i(g,[2,78]),i(g,[2,79]),i(H,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:_,86:x,100:v,102:w,103:M}),i(H,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:_,86:x,100:v,102:w,103:M},{16:39,17:40,19:87,60:_,86:x,100:v,102:w,103:M},i(Te,[2,133]),i(Te,[2,134]),i(Te,[2,135]),i(Te,[2,136]),i([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),i(Ke,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:l,37:u,42:o,46:d,48:f,51:h,52:D,54:F,56:R,57:J,60:_,62:Oe,63:we,64:Me,65:Pe,75:Ve,76:Re,78:Ge,82:Ue,83:ze,86:x,100:v,102:w,103:M}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:l,37:u,38:22,42:o,43:23,46:d,48:f,51:h,52:D,54:F,56:R,57:J,60:_,62:Oe,63:we,64:Me,65:Pe,75:Ve,76:Re,78:Ge,82:Ue,83:ze,86:x,100:v,102:w,103:M},i(g,[2,20]),i(g,[2,31]),i(g,[2,32]),{13:[1,91],16:39,17:40,19:90,60:_,86:x,100:v,102:w,103:M},{53:92,66:56,67:57,68:be,69:ke,70:me,71:Ce,72:Ee,73:We,74:Qe},i(g,[2,64]),{67:93,73:We,74:Qe},i(ye,[2,83],{66:94,68:be,69:ke,70:me,71:Ce,72:Ee}),i(Z,[2,84]),i(Z,[2,85]),i(Z,[2,86]),i(Z,[2,87]),i(Z,[2,88]),i(it,[2,89]),i(it,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:o,43:23,48:f,54:F,56:R},{16:100,60:_,86:x,100:v,102:w},{41:[1,102],45:101,51:De},{16:104,60:_,86:x,100:v,102:w},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:ee,50:te,59:110,60:se,82:re,84:111,85:112,86:ne,87:ue,88:ce,89:de,90:pe},{60:[1,122]},{13:st,55:123},i(G,[2,72]),i(G,[2,138]),{22:ee,50:te,59:124,60:se,61:[1,125],82:re,84:111,85:112,86:ne,87:ue,88:ce,89:de,90:pe},i(at,[2,74]),{16:39,17:40,19:126,60:_,86:x,100:v,102:w,103:M},i(H,[2,16]),i(H,[2,17]),i(H,[2,18]),{11:127,12:rt,39:[2,36]},i(Be,[2,9],{16:85,17:86,15:130,18:[1,129],60:_,86:x,100:v,102:w,103:M}),i(Be,[2,10]),i(Xe,[2,55],{11:131,12:rt}),i(Ke,[2,7]),{9:[1,132]},i(_e,[2,67]),{16:39,17:40,19:133,60:_,86:x,100:v,102:w,103:M},{13:[1,135],16:39,17:40,19:134,60:_,86:x,100:v,102:w,103:M},i(ye,[2,82],{66:136,68:be,69:ke,70:me,71:Ce,72:Ee}),i(ye,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:o,43:23,48:f,54:F,56:R},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},i(G,[2,48],{39:[1,142]}),{41:[1,143]},i(G,[2,50]),{41:[2,61],45:144,51:De},{47:[1,145]},{16:39,17:40,19:146,60:_,86:x,100:v,102:w,103:M},i(g,[2,91],{13:[1,147]}),i(g,[2,93],{13:[1,149],77:[1,148]}),i(g,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},i(g,[2,105],{61:nt}),i(lt,[2,107],{85:154,22:ee,50:te,60:se,82:re,86:ne,87:ue,88:ce,89:de,90:pe}),i(Y,[2,109]),i(Y,[2,111]),i(Y,[2,112]),i(Y,[2,113]),i(Y,[2,114]),i(Y,[2,115]),i(Y,[2,116]),i(Y,[2,117]),i(Y,[2,118]),i(Y,[2,119]),i(g,[2,106]),i(G,[2,71]),i(g,[2,73],{61:nt}),{60:[1,155]},i(H,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:_,86:x,100:v,102:w,103:M},i(Be,[2,12]),i(Xe,[2,56]),{1:[2,4]},i(_e,[2,69]),i(_e,[2,68]),{16:39,17:40,19:158,60:_,86:x,100:v,102:w,103:M},i(ye,[2,80]),i(G,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:o,43:23,48:f,54:F,56:R},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:o,43:23,48:f,54:F,56:R},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:o,43:23,48:f,54:F,56:R},{45:163,51:De},i(G,[2,49]),{41:[2,62]},i(G,[2,52],{39:[1,164]}),i(g,[2,60]),i(g,[2,92]),i(g,[2,94]),i(g,[2,95],{77:[1,165]}),i(g,[2,98]),i(g,[2,99],{13:[1,166]}),i(g,[2,101],{13:[1,168],77:[1,167]}),{22:ee,50:te,60:se,82:re,84:169,85:112,86:ne,87:ue,88:ce,89:de,90:pe},i(Y,[2,110]),i(at,[2,75]),{14:[1,170]},i(Be,[2,11]),i(_e,[2,70]),i(G,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:De},i(g,[2,96]),i(g,[2,100]),i(g,[2,102]),i(g,[2,103],{77:[1,174]}),i(lt,[2,108],{85:154,22:ee,50:te,60:se,82:re,86:ne,87:ue,88:ce,89:de,90:pe}),i(Xe,[2,8]),i(G,[2,51]),{41:[1,175]},i(G,[2,54]),i(g,[2,104]),i(G,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(b,k){if(k.recoverable)this.trace(b);else{var m=Error(b);throw m.hash=k,m}},"parseError"),parse:e(function(b){var k=this,m=[0],c=[],B=[null],t=[],Ae=this.table,a="",Ne=0,ut=0,ot=0,kt=2,ct=1,mt=t.slice.call(arguments,1),P=Object.create(this.lexer),Q={yy:{}};for(var qe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,qe))Q.yy[qe]=this.yy[qe];if(P.setInput(b,Q.yy),Q.yy.lexer=P,Q.yy.parser=this,typeof P.yylloc>"u")P.yylloc={};var Je=P.yylloc;t.push(Je);var gt=P.options&&P.options.ranges;if(typeof Q.yy.parseError==="function")this.parseError=Q.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Ct(z){m.length=m.length-2*z,B.length=B.length-z,t.length=t.length-z}e(Ct,"popStack");function ht(){var z=c.pop()||P.lex()||ct;if(typeof z!=="number"){if(z instanceof Array)c=z,z=c.pop();z=k.symbols_[z]||z}return z}e(ht,"lex");var V,Ze,j,U,Lt,$e,q={},xe,K,dt,ve;while(!0){if(j=m[m.length-1],this.defaultActions[j])U=this.defaultActions[j];else{if(V===null||typeof V>"u")V=ht();U=Ae[j]&&Ae[j][V]}if(typeof U>"u"||!U.length||!U[0]){var et="";ve=[];for(xe in Ae[j])if(this.terminals_[xe]&&xe>kt)ve.push("'"+this.terminals_[xe]+"'");if(P.showPosition)et="Parse error on line "+(Ne+1)+`:
2
+ `+P.showPosition()+`
3
+ Expecting `+ve.join(", ")+", got '"+(this.terminals_[V]||V)+"'";else et="Parse error on line "+(Ne+1)+": Unexpected "+(V==ct?"end of input":"'"+(this.terminals_[V]||V)+"'");this.parseError(et,{text:P.match,token:this.terminals_[V]||V,line:P.yylineno,loc:Je,expected:ve})}if(U[0]instanceof Array&&U.length>1)throw Error("Parse Error: multiple actions possible at state: "+j+", token: "+V);switch(U[0]){case 1:if(m.push(V),B.push(P.yytext),t.push(P.yylloc),m.push(U[1]),V=null,!Ze){if(ut=P.yyleng,a=P.yytext,Ne=P.yylineno,Je=P.yylloc,ot>0)ot--}else V=Ze,Ze=null;break;case 2:if(K=this.productions_[U[1]][1],q.$=B[B.length-K],q._$={first_line:t[t.length-(K||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(K||1)].first_column,last_column:t[t.length-1].last_column},gt)q._$.range=[t[t.length-(K||1)].range[0],t[t.length-1].range[1]];if($e=this.performAction.apply(q,[a,ut,Ne,Q.yy,U[1],B,t].concat(mt)),typeof $e<"u")return $e;if(K)m=m.slice(0,-1*K*2),B=B.slice(0,-1*K),t=t.slice(0,-1*K);m.push(this.productions_[U[1]][0]),B.push(q.$),t.push(q._$),dt=Ae[m[m.length-2]][m[m.length-1]],m.push(dt);break;case 3:return!0}}return!0},"parse")},ft=function(){var W={EOF:1,parseError:e(function(k,m){if(this.yy.parser)this.yy.parser.parseError(k,m);else throw Error(k)},"parseError"),setInput:e(function(b,k){if(this.yy=k||this.yy||{},this._input=b,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 b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var k=b.match(/(?:\r\n?|\n).*/g);if(k)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),b},"input"),unput:e(function(b){var k=b.length,m=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var c=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1)this.yylineno-=m.length-1;var B=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:m?(m.length===c.length?this.yylloc.first_column:0)+c[c.length-m.length].length-m[0].length:this.yylloc.first_column-k},this.options.ranges)this.yylloc.range=[B[0],B[0]+this.yyleng-k];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(b){this.unput(this.match.slice(b))},"less"),pastInput:e(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var b=this.match;if(b.length<20)b+=this._input.substr(0,20-b.length);return(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var b=this.pastInput(),k=Array(b.length+1).join("-");return b+this.upcomingInput()+`
5
+ `+k+"^"},"showPosition"),test_match:e(function(b,k){var m,c,B;if(this.options.backtrack_lexer){if(B={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)B.yylloc.range=this.yylloc.range.slice(0)}if(c=b[0].match(/(?:\r\n?|\n).*/g),c)this.yylineno+=c.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,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(b[0].length),this.matched+=b[0],m=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(m)return m;else if(this._backtrack){for(var t in B)this[t]=B[t];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var b,k,m,c;if(!this._more)this.yytext="",this.match="";var B=this._currentRules();for(var t=0;t<B.length;t++)if(m=this._input.match(this.rules[B[t]]),m&&(!k||m[0].length>k[0].length)){if(k=m,c=t,this.options.backtrack_lexer)if(b=this.test_match(m,B[t]),b!==!1)return b;else if(this._backtrack){k=!1;continue}else return!1;else if(!this.options.flex)break}if(k){if(b=this.test_match(k,B[c]),b!==!1)return b;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 k=this.next();if(k)return k;else return this.lex()},"lex"),begin:e(function(k){this.conditionStack.push(k)},"begin"),popState:e(function(){var k=this.conditionStack.length-1;if(k>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(k){if(k=this.conditionStack.length-1-Math.abs(k||0),k>=0)return this.conditionStack[k];else return"INITIAL"},"topState"),pushState:e(function(k){this.begin(k)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(k,m,c,B){var t=B;switch(c){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;break;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;break;case 40:return this.popState(),8;break;case 41:break;case 42:return this.popState(),this.popState(),41;break;case 43:return this.begin("class-body"),39;break;case 44:return this.popState(),41;break;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};return W}();He.lexer=ft;function Se(){this.yy={}}return e(Se,"Parser"),Se.prototype=He,He.Parser=Se,new Se}();tt.parser=tt;var Et=tt,pt=["#","+","~","-",""],At=class{static{e(this,"ClassMember")}constructor(i,n){this.memberType=n,this.visibility="",this.classifier="",this.text="";let l=O(i,s());this.parseMember(l)}getDisplayDetails(){let i=this.visibility+Xt(this.id);if(this.memberType==="method"){if(i+=`(${Xt(this.parameters.trim())})`,this.returnType)i+=" : "+Xt(this.returnType)}i=i.trim();let n=this.parseClassifier();return{displayText:i,cssStyle:n}}parseMember(i){let n="";if(this.memberType==="method"){let o=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(o){let d=o[1]?o[1].trim():"";if(pt.includes(d))this.visibility=d;if(this.id=o[2],this.parameters=o[3]?o[3].trim():"",n=o[4]?o[4].trim():"",this.returnType=o[5]?o[5].trim():"",n===""){let f=this.returnType.substring(this.returnType.length-1);if(/[$*]/.exec(f))n=f,this.returnType=this.returnType.substring(0,this.returnType.length-1)}}}else{let u=i.length,o=i.substring(0,1),d=i.substring(u-1);if(pt.includes(o))this.visibility=o;if(/[$*]/.exec(d))n=d;this.id=i.substring(this.visibility===""?0:1,n===""?u:u-1)}this.classifier=n,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let l=`${this.visibility?"\\"+this.visibility:""}${Xt(this.id)}${this.memberType==="method"?`(${Xt(this.parameters)})${this.returnType?" : "+Xt(this.returnType):""}`:""}`;if(this.text=l.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;"))this.text=this.text.replace("\\&lt;","~")}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},Ie="classId-",bt=0,X=e((i)=>y.sanitizeText(i,s()),"sanitizeText"),Tt=class i{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=e((n)=>{let l=Mt();p(n).select("svg").selectAll("g").filter(function(){return p(this).attr("title")!==null}).on("mouseover",(d)=>{let f=p(d.currentTarget),h=f.attr("title");if(!h)return;let D=d.currentTarget.getBoundingClientRect();l.transition().duration(200).style("opacity",".9"),l.html(Le.sanitize(h)).style("left",`${window.scrollX+D.left+D.width/2}px`).style("top",`${window.scrollY+D.bottom+4}px`),f.classed("hover",!0)}).on("mouseout",(d)=>{l.transition().duration(500).style("opacity",0),p(d.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getConfig=e(()=>s().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{e(this,"ClassDB")}splitClassNameAndType(n){let l=y.sanitizeText(n,s()),u="",o=l;if(l.indexOf("~")>0){let d=l.split("~");o=X(d[0]),u=X(d[1])}return{className:o,type:u}}setClassLabel(n,l){let u=y.sanitizeText(n,s());if(l)l=X(l);let{className:o}=this.splitClassNameAndType(u);this.classes.get(o).label=l,this.classes.get(o).text=`${l}${this.classes.get(o).type?`<${this.classes.get(o).type}>`:""}`}addClass(n){let l=y.sanitizeText(n,s()),{className:u,type:o}=this.splitClassNameAndType(l);if(this.classes.has(u))return;let d=y.sanitizeText(u,s());this.classes.set(d,{id:d,type:o,label:d,text:`${d}${o?`&lt;${o}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:Ie+d+"-"+bt}),bt++}addInterface(n,l){let u={id:`interface${this.interfaces.length}`,label:n,classId:l};this.interfaces.push(u)}setDiagramId(n){this.diagramId=n}lookUpDomId(n){let l=y.sanitizeText(n,s());if(this.classes.has(l)){let u=this.classes.get(l).domId;return this.diagramId?`${this.diagramId}-${u}`:u}throw Error("Class not found: "+l)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",C()}getClass(n){return this.classes.get(n)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(n){let l=typeof n==="number"?`note${n}`:n;return this.notes.get(l)}getNotes(){return this.notes}addRelation(n){r.debug("Adding relation: "+JSON.stringify(n));let l=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];if(n.relation.type1===this.relationType.LOLLIPOP&&!l.includes(n.relation.type2))this.addClass(n.id2),this.addInterface(n.id1,n.id2),n.id1=`interface${this.interfaces.length-1}`;else if(n.relation.type2===this.relationType.LOLLIPOP&&!l.includes(n.relation.type1))this.addClass(n.id1),this.addInterface(n.id2,n.id1),n.id2=`interface${this.interfaces.length-1}`;else this.addClass(n.id1),this.addClass(n.id2);n.id1=this.splitClassNameAndType(n.id1).className,n.id2=this.splitClassNameAndType(n.id2).className,n.relationTitle1=y.sanitizeText(n.relationTitle1.trim(),s()),n.relationTitle2=y.sanitizeText(n.relationTitle2.trim(),s()),this.relations.push(n)}addAnnotation(n,l){let u=this.splitClassNameAndType(n).className;this.classes.get(u).annotations.push(l)}addMember(n,l){this.addClass(n);let u=this.splitClassNameAndType(n).className,o=this.classes.get(u);if(typeof l==="string"){let d=l.trim();if(d.startsWith("<<")&&d.endsWith(">>"))o.annotations.push(X(d.substring(2,d.length-2)));else if(d.indexOf(")")>0)o.methods.push(new At(d,"method"));else if(d)o.members.push(new At(d,"attribute"))}}addMembers(n,l){if(Array.isArray(l))l.reverse(),l.forEach((u)=>this.addMember(n,u))}addNote(n,l){let u=this.notes.size,o={id:`note${u}`,class:l,text:n,index:u};return this.notes.set(o.id,o),o.id}cleanupLabel(n){if(n.startsWith(":"))n=n.substring(1);return X(n.trim())}setCssClass(n,l){n.split(",").forEach((u)=>{let o=u;if(/\d/.exec(u[0]))o=Ie+o;o=this.splitClassNameAndType(o).className;let d=this.classes.get(o);if(d)d.cssClasses+=" "+l})}defineClass(n,l){for(let u of n){let o=this.styleClasses.get(u);if(o===void 0)o={id:u,styles:[],textStyles:[]},this.styleClasses.set(u,o);if(l)l.forEach((d)=>{if(/color/.exec(d)){let f=d.replace("fill","bgFill");o.textStyles.push(f)}o.styles.push(d)});this.classes.forEach((d)=>{if(d.cssClasses.includes(u))d.styles.push(...l.flatMap((f)=>f.split(",")))})}}setTooltip(n,l){n.split(",").forEach((u)=>{if(l!==void 0){let o=this.splitClassNameAndType(u).className,d=this.classes.get(o);if(d)d.tooltip=X(l)}})}getTooltip(n,l){if(l&&this.namespaces.has(l))return this.namespaces.get(l).classes.get(n).tooltip;return this.classes.get(n).tooltip}setLink(n,l,u){let o=s();n.split(",").forEach((d)=>{let f=d;if(/\d/.exec(d[0]))f=Ie+f;f=this.splitClassNameAndType(f).className;let h=this.classes.get(f);if(h)if(h.link=N.formatUrl(l,o),o.securityLevel==="sandbox")h.linkTarget="_top";else if(typeof u==="string")h.linkTarget=X(u);else h.linkTarget="_blank"}),this.setCssClass(n,"clickable")}setClickEvent(n,l,u){n.split(",").forEach((o)=>{this.setClickFunc(o,l,u);let d=this.splitClassNameAndType(o).className,f=this.classes.get(d);if(f)f.haveCallback=!0}),this.setCssClass(n,"clickable")}setClickFunc(n,l,u){let o=y.sanitizeText(n,s());if(s().securityLevel!=="loose")return;if(l===void 0)return;let f=this.splitClassNameAndType(o).className;if(this.classes.has(f)){let h=[];if(typeof u==="string"){h=u.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let D=0;D<h.length;D++){let F=h[D].trim();if(F.startsWith('"')&&F.endsWith('"'))F=F.substr(1,F.length-2);h[D]=F}}if(h.length===0)h.push(f);this.functions.push(()=>{let D=this.lookUpDomId(f),F=document.querySelector(`[id="${D}"]`);if(F!==null)F.addEventListener("click",()=>{N.runFunc(l,...h)},!1)})}}bindFunctions(n){this.functions.forEach((l)=>{l(n)})}escapeHtml(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}getDirection(){return this.direction}setDirection(n){this.direction=n}static resolveQualifiedId(n,l){let u=l.at(-1);return u?`${u}.${n}`:n}static getAncestorIds(n){let l=n.split("."),u=Array(l.length);u[0]=l[0];for(let o=1;o<l.length;o++)u[o]=`${u[o-1]}.${l[o]}`;return u}createNamespaceNode(n,l,u,o=!1){return{id:n,label:l,classes:new Map,notes:new Map,children:new Map,domId:Ie+n+"-"+this.namespaceCounter++,parent:u,explicit:o}}linkParentChild(n,l){let u=this.namespaces.get(n),o=this.namespaces.get(l);if(!u||!o)return;if(!u.children.has(l))u.children.set(l,o);o.parent??=n}addNamespace(n,l){let u=i.resolveQualifiedId(n,this.namespaceStack);if(this.namespaceStack.push(u),this.namespaces.has(u)){let f=this.namespaces.get(u);if(f.explicit=!0,l)f.label=l;return u}let o=u.split("."),d=i.getAncestorIds(u);for(let f=0;f<d.length;f++){let h=d[f],D=f>0?d[f-1]:void 0,F=f===d.length-1,R=F&&l?l:o[f];if(!this.namespaces.has(h))this.namespaces.set(h,this.createNamespaceNode(h,R,D,F));else if(F)this.namespaces.get(h).explicit=!0;if(D)this.linkParentChild(D,h)}return u}popNamespace(){this.namespaceStack.pop()}getNamespace(n){return this.namespaces.get(n)}getNamespaces(){return this.namespaces}addClassesToNamespace(n,l,u){if(!this.namespaces.has(n))return;for(let o of l){let{className:d}=this.splitClassNameAndType(o),f=this.getClass(d);f.parent=n,this.namespaces.get(n).classes.set(d,f)}for(let o of u){let d=this.getNote(o);d.parent=n,this.namespaces.get(n).notes.set(o,d)}}setCssStyle(n,l){let u=this.classes.get(n);if(!l||!u)return;for(let o of l)if(o.includes(","))u.styles.push(...o.split(","));else u.styles.push(o)}getArrowMarker(n){let l;switch(n){case 0:l="aggregation";break;case 1:l="extension";break;case 2:l="composition";break;case 3:l="dependency";break;case 4:l="lollipop";break;default:l="none"}return l}resolveExplicitAncestor(n){let l=n;while(l){let u=this.namespaces.get(l);if(!u)return;if(u.explicit)return l;l=u.parent}return}getData(){let n=[],l=[],u=s(),o=u.class?.hierarchicalNamespaces??!0;for(let h of this.namespaces.values()){if(!o&&!h.explicit)continue;let D={id:h.id,label:o?h.label:h.id,isGroup:!0,padding:u.class.padding??16,shape:"rect",cssStyles:[],look:u.look,parentId:o?h.parent:void 0};n.push(D)}let d=0;for(let h of this.classes.values()){let D=o?h.parent:this.resolveExplicitAncestor(h.parent),F={...h,type:void 0,isGroup:!1,parentId:D,look:u.look,colorIndex:d++};n.push(F)}for(let h of this.notes.values()){let D=o?h.parent:this.resolveExplicitAncestor(h.parent),F={id:h.id,label:h.text,isGroup:!1,shape:"note",padding:u.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${u.themeVariables.noteBkgColor}`,`stroke: ${u.themeVariables.noteBorderColor}`],look:u.look,parentId:D,labelType:"markdown"};n.push(F);let R=this.classes.get(h.class)?.id;if(R){let J={id:`edgeNote${h.index}`,start:h.id,end:R,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:u.look};l.push(J)}}for(let h of this.interfaces){let D={id:h.id,label:h.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:u.look};n.push(D)}let f=0;for(let h of this.relations){f++;let D={id:Fe(h.id1,h.id2,{prefix:"id",counter:f}),start:h.id1,end:h.id2,type:"normal",label:h.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(h.relation.type1),arrowTypeEnd:this.getArrowMarker(h.relation.type2),startLabelRight:h.relationTitle1==="none"?"":h.relationTitle1,endLabelLeft:h.relationTitle2==="none"?"":h.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:h.style||"",pattern:h.relation.lineType==1?"dashed":"solid",look:u.look,labelType:"markdown"};l.push(D)}return{nodes:n,edges:l,other:{},config:u,direction:this.getDirection()}}},yt=e((i)=>{let{theme:n,bkgColorArray:l,borderColorArray:u}=i;if(!ae(n,u))return"";let o=ie(i.look),d=le(l),f="";for(let h=0;h<Ye(i.THEME_COLOR_LIMIT,u);h++){let D=u[h%u.length];f+=`
7
+
8
+ [data-look="${o}"][data-color-id="color-${h}"].node .outer-path path {
9
+ stroke: ${D};
10
+ ${d?`fill: ${l[h%l.length]};`:""}
11
+ }
12
+
13
+ [data-look="${o}"][data-color-id="color-${h}"].node .divider path {
14
+ stroke: ${D};
15
+ }
16
+ `}return f},"genColor"),Dt=e((i)=>`${yt(i)}
17
+ g.classGroup text {
18
+ fill: ${i.nodeBorder||i.classText};
19
+ stroke: none;
20
+ font-family: ${i.fontFamily};
21
+ font-size: 10px;
22
+
23
+ .title {
24
+ font-weight: bolder;
25
+ }
26
+
27
+ }
28
+
29
+ .cluster-label text {
30
+ fill: ${i.titleColor};
31
+ }
32
+ .cluster-label span {
33
+ color: ${i.titleColor};
34
+ }
35
+ .cluster-label span p {
36
+ background-color: transparent;
37
+ }
38
+
39
+ .cluster rect {
40
+ fill: ${i.clusterBkg};
41
+ stroke: ${i.clusterBorder};
42
+ stroke-width: 1px;
43
+ }
44
+
45
+ .cluster text {
46
+ fill: ${i.titleColor};
47
+ }
48
+
49
+ .cluster span {
50
+ color: ${i.titleColor};
51
+ }
52
+
53
+ .nodeLabel, .edgeLabel {
54
+ color: ${i.classText};
55
+ }
56
+
57
+ .noteLabel .nodeLabel, .noteLabel .edgeLabel {
58
+ color: ${i.noteTextColor};
59
+ }
60
+ .edgeLabel .label rect {
61
+ fill: ${i.mainBkg};
62
+ }
63
+ .label text {
64
+ fill: ${i.classText};
65
+ }
66
+
67
+ .labelBkg {
68
+ background: ${i.mainBkg};
69
+ }
70
+ .edgeLabel .label span {
71
+ background: ${i.mainBkg};
72
+ }
73
+
74
+ .classTitle {
75
+ font-weight: bolder;
76
+ }
77
+ .node rect,
78
+ .node circle,
79
+ .node ellipse,
80
+ .node polygon,
81
+ .node path {
82
+ fill: ${i.mainBkg};
83
+ stroke: ${i.nodeBorder};
84
+ stroke-width: ${i.strokeWidth};
85
+ }
86
+
87
+
88
+ .divider {
89
+ stroke: ${i.nodeBorder};
90
+ stroke-width: 1;
91
+ }
92
+
93
+ g.clickable {
94
+ cursor: pointer;
95
+ }
96
+
97
+ g.classGroup rect {
98
+ fill: ${i.mainBkg};
99
+ stroke: ${i.nodeBorder};
100
+ }
101
+
102
+ g.classGroup line {
103
+ stroke: ${i.nodeBorder};
104
+ stroke-width: 1;
105
+ }
106
+
107
+ .classLabel .box {
108
+ stroke: none;
109
+ stroke-width: 0;
110
+ fill: ${i.mainBkg};
111
+ opacity: 0.5;
112
+ }
113
+
114
+ .classLabel .label {
115
+ fill: ${i.nodeBorder};
116
+ font-size: 10px;
117
+ }
118
+
119
+ .relation {
120
+ stroke: ${i.lineColor};
121
+ stroke-width: ${i.strokeWidth};
122
+ fill: none;
123
+ }
124
+
125
+ .dashed-line{
126
+ stroke-dasharray: 3;
127
+ }
128
+
129
+ .dotted-line{
130
+ stroke-dasharray: 1 2;
131
+ }
132
+
133
+ [id$="-compositionStart"], .composition {
134
+ fill: ${i.lineColor} !important;
135
+ stroke: ${i.lineColor} !important;
136
+ stroke-width: 1;
137
+ }
138
+
139
+ [id$="-compositionEnd"], .composition {
140
+ fill: ${i.lineColor} !important;
141
+ stroke: ${i.lineColor} !important;
142
+ stroke-width: 1;
143
+ }
144
+
145
+ [id$="-dependencyStart"], .dependency {
146
+ fill: ${i.lineColor} !important;
147
+ stroke: ${i.lineColor} !important;
148
+ stroke-width: 1;
149
+ }
150
+
151
+ [id$="-dependencyEnd"], .dependency {
152
+ fill: ${i.lineColor} !important;
153
+ stroke: ${i.lineColor} !important;
154
+ stroke-width: 1;
155
+ }
156
+
157
+ [id$="-extensionStart"], .extension {
158
+ fill: transparent !important;
159
+ stroke: ${i.lineColor} !important;
160
+ stroke-width: 1;
161
+ }
162
+
163
+ [id$="-extensionEnd"], .extension {
164
+ fill: transparent !important;
165
+ stroke: ${i.lineColor} !important;
166
+ stroke-width: 1;
167
+ }
168
+
169
+ [id$="-aggregationStart"], .aggregation {
170
+ fill: transparent !important;
171
+ stroke: ${i.lineColor} !important;
172
+ stroke-width: 1;
173
+ }
174
+
175
+ [id$="-aggregationEnd"], .aggregation {
176
+ fill: transparent !important;
177
+ stroke: ${i.lineColor} !important;
178
+ stroke-width: 1;
179
+ }
180
+
181
+ [id$="-lollipopStart"], .lollipop {
182
+ fill: ${i.mainBkg} !important;
183
+ stroke: ${i.lineColor} !important;
184
+ stroke-width: 1;
185
+ }
186
+
187
+ [id$="-lollipopEnd"], .lollipop {
188
+ fill: ${i.mainBkg} !important;
189
+ stroke: ${i.lineColor} !important;
190
+ stroke-width: 1;
191
+ }
192
+
193
+ .edgeTerminals {
194
+ font-size: 11px;
195
+ line-height: initial;
196
+ }
197
+
198
+ .classTitleText {
199
+ text-anchor: middle;
200
+ font-size: 18px;
201
+ fill: ${i.textColor};
202
+ }
203
+
204
+ .edgeLabel[data-look="neo"] {
205
+ background-color: ${i.edgeLabelBackground};
206
+ p {
207
+ background-color: ${i.edgeLabelBackground};
208
+ }
209
+ rect {
210
+ opacity: 0.5;
211
+ background-color: ${i.edgeLabelBackground};
212
+ fill: ${i.edgeLabelBackground};
213
+ }
214
+ text-align: center;
215
+ }
216
+ ${je()}
217
+ `,"getStyles"),Ft=Dt,Bt=e((i,n="TB")=>{if(!i.doc)return n;let l=n;for(let u of i.doc)if(u.stmt==="dir")l=u.value;return l},"getDir"),_t=e(function(i,n){return n.db.getClasses()},"getClasses"),St=e(async function(i,n,l,u){r.info("REF0:"),r.info("Drawing class diagram (v3)",n);let{securityLevel:o,state:d,layout:f}=s();u.db.setDiagramId(n);let h=u.db.getData(),D=fe(n,o);h.type=u.type,h.layoutAlgorithm=ge(f),h.nodeSpacing=d?.nodeSpacing||50,h.rankSpacing=d?.rankSpacing||50,h.markers=["aggregation","extension","composition","dependency","lollipop"],h.diagramId=n,await he(h,D);let F=8;N.insertTitle(D,"classDiagramTitleText",d?.titleTopMargin??25,u.db.getDiagramTitle()),oe(D,F,"classDiagram",d?.useMaxWidth??!0)},"draw"),Nt={getClasses:_t,draw:St,getDir:Bt},$t={parser:Et,get db(){return new Tt},renderer:Nt,styles:Ft,init:e((i)=>{if(!i.class)i.class={};i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute},"init")};export{$t as diagram};
@@ -0,0 +1,7 @@
1
+ import{e,r,we,D,b,O,B,C,S,E,T,A,I,L,qn,q,U,qi}from"./chunk-y0m8hrwz.js";import"./chunk-0mrkjnte.js";import{Xe}from"./chunk-20q90epj.js";import{xt}from"./chunk-90kp4pnz.js";import{Nt}from"./chunk-ry9256r7.js";function Pt(t,i,s){t=+t,i=+i,s=(a=arguments.length)<2?(i=t,t=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-t)/s))|0,c=Array(a);while(++n<a)c[n]=t+n*s;return c}function ft(){var t=Xe().unknown(void 0),{domain:i,range:s}=t,n=0,a=1,c,l,f=!1,g=0,y=0,z=0.5;delete t.unknown;function P(){var k=i().length,G=a<n,X=G?a:n,Y=G?n:a;if(c=(Y-X)/Math.max(1,k-g+y*2),f)c=Math.floor(c);if(X+=(Y-X-c*(k-g))*z,l=c*(1-g),f)X=Math.round(X),l=Math.round(l);var j=Pt(k).map(function(it){return X+c*it});return s(G?j.reverse():j)}return t.domain=function(k){return arguments.length?(i(k),P()):i()},t.range=function(k){return arguments.length?([n,a]=k,n=+n,a=+a,P()):[n,a]},t.rangeRound=function(k){return[n,a]=k,n=+n,a=+a,f=!0,P()},t.bandwidth=function(){return l},t.step=function(){return c},t.round=function(k){return arguments.length?(f=!!k,P()):f},t.padding=function(k){return arguments.length?(g=Math.min(1,y=+k),P()):g},t.paddingInner=function(k){return arguments.length?(g=Math.min(1,k),P()):g},t.paddingOuter=function(k){return arguments.length?(y=+k,P()):y},t.align=function(k){return arguments.length?(z=Math.max(0,Math.min(1,k)),P()):z},t.copy=function(){return ft(i(),[n,a]).round(f).paddingInner(g).paddingOuter(y).align(z)},Nt.apply(P(),arguments)}var Lt=function(){var t=e(function(J,h,u,x){for(u=u||{},x=J.length;x--;u[J[x]]=h);return u},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],g=[1,25],y=[1,26],z=[1,28],P=[1,29],k=[1,30],G=[1,31],X=[1,32],Y=[1,33],j=[1,34],it=[1,35],nt=[1,36],R=[1,37],K=[1,43],d=[1,42],Q=[1,47],Z=[1,50],v=[1,10,12,14,16,18,19,21,23,36,37,38],ot=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],N=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],gt=[1,65],W=[26,28],_={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:e(function(h,u,x,p,M,o,rt){var m=o.length-1;switch(M){case 5:p.setOrientation(o[m]);break;case 9:p.setDiagramTitle(o[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},o[m]);break;case 13:p.setLineData(o[m-1],o[m]);break;case 14:p.setBarData({text:"",type:"text"},o[m]);break;case 15:p.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=o[m-1];break;case 20:case 30:this.$=[o[m-2],...o[m]];break;case 21:case 31:this.$=[o[m]];break;case 22:this.$={value:Number(o[m-1]),label:o[m]};break;case 23:this.$={value:Number(o[m]),label:""};break;case 24:p.setXAxisTitle(o[m]);break;case 25:p.setXAxisTitle(o[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(o[m]);break;case 28:p.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 29:this.$=o[m-1];break;case 32:p.setYAxisTitle(o[m]);break;case 33:p.setYAxisTitle(o[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 39:this.$={text:o[m],type:"text"};break;case 40:this.$={text:o[m],type:"text"};break;case 41:this.$={text:o[m],type:"markdown"};break;case 42:this.$=o[m];break;case 43:this.$=o[m-1]+""+o[m];break}},"anonymous"),table:[t(i,s,{3:1,4:2,7:4,5:n,36:a,37:c,38:l}),{1:[3]},t(i,s,{4:2,7:4,3:8,5:n,36:a,37:c,38:l}),t(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{1:[2,1]},t(i,s,{4:2,7:4,3:21,5:n,36:a,37:c,38:l}),{1:[2,3]},t(f,[2,5]),t(i,[2,7],{4:22,36:a,37:c,38:l}),{11:23,30:g,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{11:39,13:38,24:K,29:d,30:g,31:40,32:41,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{11:45,15:44,29:Q,30:g,35:46,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{11:49,17:48,24:Z,30:g,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{11:52,17:51,24:Z,30:g,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},{20:[1,53]},{22:[1,54]},t(v,[2,18]),{1:[2,2]},t(v,[2,8]),t(v,[2,9]),t(ot,[2,39],{41:55,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R}),t(ot,[2,40]),t(ot,[2,41]),t(N,[2,42]),t(N,[2,44]),t(N,[2,45]),t(N,[2,46]),t(N,[2,47]),t(N,[2,48]),t(N,[2,49]),t(N,[2,50]),t(N,[2,51]),t(N,[2,52]),t(N,[2,53]),t(v,[2,10]),t(v,[2,24],{32:41,31:56,24:K,29:d}),t(v,[2,26]),t(v,[2,27]),{33:[1,57]},{11:59,30:g,34:58,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},t(v,[2,11]),t(v,[2,32],{35:60,29:Q}),t(v,[2,34]),{33:[1,61]},t(v,[2,12]),{17:62,24:Z},{25:63,27:64,29:gt},t(v,[2,14]),{17:66,24:Z},t(v,[2,16]),t(v,[2,17]),t(N,[2,43]),t(v,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(v,[2,33]),{29:[1,70]},t(v,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(W,[2,23],{30:[1,73]}),t(v,[2,15]),t(v,[2,28]),t(v,[2,29]),{11:59,30:g,34:74,39:24,40:y,41:27,42:z,43:P,44:k,45:G,46:X,47:Y,48:j,49:it,50:nt,51:R},t(v,[2,35]),t(v,[2,19]),{25:75,27:64,29:gt},t(W,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:e(function(h,u){if(u.recoverable)this.trace(h);else{var x=Error(h);throw x.hash=u,x}},"parseError"),parse:e(function(h){var u=this,x=[0],p=[],M=[null],o=[],rt=this.table,m="",yt=0,Ht=0,$t=0,fe=2,Ut=1,pe=o.slice.call(arguments,1),F=Object.create(this.lexer),ht={yy:{}};for(var Rt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Rt))ht.yy[Rt]=this.yy[Rt];if(F.setInput(h,ht.yy),ht.yy.lexer=F,ht.yy.parser=this,typeof F.yylloc>"u")F.yylloc={};var _t=F.yylloc;o.push(_t);var me=F.options&&F.options.ranges;if(typeof ht.yy.parseError==="function")this.parseError=ht.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function be(et){x.length=x.length-2*et,M.length=M.length-et,o.length=o.length-et}e(be,"popStack");function qt(){var et=p.pop()||F.lex()||Ut;if(typeof et!=="number"){if(et instanceof Array)p=et,et=p.pop();et=u.symbols_[et]||et}return et}e(qt,"lex");var H,Tt,lt,tt,Oe,Dt,ut={},wt,at,Gt,kt;while(!0){if(lt=x[x.length-1],this.defaultActions[lt])tt=this.defaultActions[lt];else{if(H===null||typeof H>"u")H=qt();tt=rt[lt]&&rt[lt][H]}if(typeof tt>"u"||!tt.length||!tt[0]){var vt="";kt=[];for(wt in rt[lt])if(this.terminals_[wt]&&wt>fe)kt.push("'"+this.terminals_[wt]+"'");if(F.showPosition)vt="Parse error on line "+(yt+1)+`:
2
+ `+F.showPosition()+`
3
+ Expecting `+kt.join(", ")+", got '"+(this.terminals_[H]||H)+"'";else vt="Parse error on line "+(yt+1)+": Unexpected "+(H==Ut?"end of input":"'"+(this.terminals_[H]||H)+"'");this.parseError(vt,{text:F.match,token:this.terminals_[H]||H,line:F.yylineno,loc:_t,expected:kt})}if(tt[0]instanceof Array&&tt.length>1)throw Error("Parse Error: multiple actions possible at state: "+lt+", token: "+H);switch(tt[0]){case 1:if(x.push(H),M.push(F.yytext),o.push(F.yylloc),x.push(tt[1]),H=null,!Tt){if(Ht=F.yyleng,m=F.yytext,yt=F.yylineno,_t=F.yylloc,$t>0)$t--}else H=Tt,Tt=null;break;case 2:if(at=this.productions_[tt[1]][1],ut.$=M[M.length-at],ut._$={first_line:o[o.length-(at||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(at||1)].first_column,last_column:o[o.length-1].last_column},me)ut._$.range=[o[o.length-(at||1)].range[0],o[o.length-1].range[1]];if(Dt=this.performAction.apply(ut,[m,Ht,yt,ht.yy,tt[1],M,o].concat(pe)),typeof Dt<"u")return Dt;if(at)x=x.slice(0,-1*at*2),M=M.slice(0,-1*at),o=o.slice(0,-1*at);x.push(this.productions_[tt[1]][0]),M.push(ut.$),o.push(ut._$),Gt=rt[x[x.length-2]][x[x.length-1]],x.push(Gt);break;case 3:return!0}}return!0},"parse")},st=function(){var J={EOF:1,parseError:e(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw Error(u)},"parseError"),setInput:e(function(h,u){if(this.yy=u||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);if(u)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),h},"input"),unput:e(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var p=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),x.length-1)this.yylineno-=x.length-1;var M=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:x?(x.length===p.length?this.yylloc.first_column:0)+p[p.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges)this.yylloc.range=[M[0],M[0]+this.yyleng-u];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(h){this.unput(this.match.slice(h))},"less"),pastInput:e(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var h=this.pastInput(),u=Array(h.length+1).join("-");return h+this.upcomingInput()+`
5
+ `+u+"^"},"showPosition"),test_match:e(function(h,u){var x,p,M;if(this.options.backtrack_lexer){if(M={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)M.yylloc.range=this.yylloc.range.slice(0)}if(p=h[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],x=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(x)return x;else if(this._backtrack){for(var o in M)this[o]=M[o];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var h,u,x,p;if(!this._more)this.yytext="",this.match="";var M=this._currentRules();for(var o=0;o<M.length;o++)if(x=this._input.match(this.rules[M[o]]),x&&(!u||x[0].length>u[0].length)){if(u=x,p=o,this.options.backtrack_lexer)if(h=this.test_match(x,M[o]),h!==!1)return h;else if(this._backtrack){u=!1;continue}else return!1;else if(!this.options.flex)break}if(u){if(h=this.test_match(u,M[p]),h!==!1)return h;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 u=this.next();if(u)return u;else return this.lex()},"lex"),begin:e(function(u){this.conditionStack.push(u)},"begin"),popState:e(function(){var u=this.conditionStack.length-1;if(u>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(u){if(u=this.conditionStack.length-1-Math.abs(u||0),u>=0)return this.conditionStack[u];else return"INITIAL"},"topState"),pushState:e(function(u){this.begin(u)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(u,x,p,M){var o=M;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return J}();_.lexer=st;function V(){this.yy={}}return e(V,"Parser"),V.prototype=_,_.Parser=V,new V}();Lt.parser=Lt;var ye=Lt;function At(t){return t.type==="bar"}e(At,"isBarPlot");function Ct(t){return t.type==="band"}e(Ct,"isBandAxisData");function dt(t){return t.type==="linear"}e(dt,"isLinearAxisData");var Bt=class{constructor(t){this.parentGroup=t}static{e(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((g,y)=>Math.max(y.length,g),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i),a=n.node()?.getScreenCTM?.(),c=e((g)=>g&&g>0?g:1,"toScale"),l=c(a?.a),f=c(a?.d);for(let g of t){let y=qi(n,1,g),z=y?y.width/l:g.length*i,P=y?y.height/f:i;s.width=Math.max(s.width,z),s.height=Math.max(s.height,P)}return n.remove(),s}},jt=0.7,Qt=0.2,Kt=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{e(this,"BaseAxis")}setRange(t){if(this.range=t,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=t[1]-t[0];else this.boundingRect.width=t[1]-t[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t)=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(jt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(jt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Qt*t.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Qt*t.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(t);else this.calculateSpaceIfDrawnHorizontally(t);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ke=class extends Kt{static{e(this,"BandAxis")}constructor(t,i,s,n,a){super(t,n,a,i);this.categories=s,this.scale=ft().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=ft().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),r.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},Ae=class extends Kt{static{e(this,"LinearAxis")}constructor(t,i,s,n,a){super(t,n,a,i);this.domain=s,this.scale=xt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];if(this.axisPosition==="left")t.reverse();this.scale=xt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function Et(t,i,s,n){let a=new Bt(n);if(Ct(t))return new ke(i,s,t.categories,t.title,a);return new Ae(i,s,[t.min,t.max],t.title,a)}e(Et,"getAxis");var Ce=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;if(n<=t.height&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.titleWidth=i.width,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(t,i){let s=Math.min(this.titleWidth,this.chartConfig.width)/2,n=Math.min(Math.max((t+i)/2,s),this.chartConfig.width-s);this.boundingRect.x=n-s,this.boundingRect.width=s*2}getDrawableElements(){let t=[];if(this.showChartTitle)t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return t}};function Zt(t,i,s,n){let a=new Bt(n);return new Ce(a,t,i,s)}e(Zt,"getChartTitleComponent");var Se=0.75,Re=0.5,_e=0.35;function Mt(t){return{fontSize:t,markerSize:t*Se,markerSpacing:t*_e,itemSpacing:t*Re}}e(Mt,"getLegendLayout");var Te=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{e(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((g)=>g.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=Mt(this.chartConfig.legendFontSize),c=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((g)=>g.title),i),l=this.chartConfig.legendPadding*2+s+n+c.width,f=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(l<=t.width&&f<=t.height)this.boundingRect.width=l,this.boundingRect.height=f;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:t,markerSize:i,markerSpacing:s,itemSpacing:n}=Mt(this.chartConfig.legendFontSize),a=t+n,c=this.boundingRect.x+this.chartConfig.legendPadding,l=this.boundingRect.y+this.chartConfig.legendPadding,f=[],g=[];for(let[y,z]of this.visiblePlots.entries())if(At(z))f.push({x:c,y:l+y*a,width:i,height:i,fill:z.fill,strokeFill:z.fill,strokeWidth:0});else{let P=l+y*a+i/2;g.push({path:`M ${c},${P} L ${c+i},${P}`,strokeFill:z.strokeFill,strokeWidth:z.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:f},{groupTexts:["legend","markers"],type:"path",data:g},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((y,z)=>({text:y.title,x:c+i+s,y:l+z*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function Jt(t,i,s,n){let a=new Bt(n);return new Te(a,t,i,s)}e(Jt,"getChartLegendComponent");var De=class{constructor(t,i,s,n,a){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{e(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=qn().y((n)=>n[0]).x((n)=>n[1])(t);else i=qn().x((n)=>n[0]).y((n)=>n[1])(t);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let c=[];for(let[l,[f,g]]of t.entries()){let y=this.plotData.pointLabels[l];if(!y)continue;if(this.orientation==="horizontal")c.push({x:g+10,y:f,text:y,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else c.push({x:f,y:g-10,text:y,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(c.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:c})}return s}},ve=class{constructor(t,i,s,n,a,c){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=c}static{e(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},Pe=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new De(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{let n=new ve(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}};function te(t,i,s){return new Pe(t,i,s)}e(te,"getPlotComponent");var Le=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:Zt(t,i,s,n),plot:te(t,i,s),legend:Jt(t,i,s,n),xAxis:Et(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Et(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{e(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},c=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:l});if(t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,a=this.componentStore.legend.calculateSpace({width:t,height:l}),t-=a.width,t>0)c+=t,t=0;if(i>0)l+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:l}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.title.alignTo(s,s+c),this.componentStore.legend.setBoundingBoxXY({x:s+c,y:n+Math.max((l-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+c]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+l}),this.componentStore.yAxis.setRange([n,n+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((g)=>At(g)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,c={width:0,height:0},l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:l,height:f});if(t-=g.width,i-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=g.height,i-=g.height,this.componentStore.xAxis.setAxisPosition("left"),g=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=g.width,n=g.width,this.componentStore.yAxis.setAxisPosition("top"),g=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=g.height,a=s+g.height,c=this.componentStore.legend.calculateSpace({width:t,height:f}),t-=c.width,t>0)l+=t,t=0;if(i>0)f+=i,i=0;if(this.componentStore.plot.calculateSpace({width:l,height:f}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.title.alignTo(n,n+l),this.componentStore.legend.setBoundingBoxXY({x:n+l,y:a+Math.max((f-c.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+l]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((y)=>At(y)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},Ee=class{static{e(this,"XYChartBuilder")}static build(t,i,s,n){return new Le(t,i,s,n).getDrawableElement()}},pt=0,ee,mt=Vt(),bt=Ot(),w=Wt(),It=bt.plotColorPalette.split(",").map((t)=>t.trim()),St=!1,zt=!1;function Ot(){let t=we(),i=b();return U(t.xyChart,i.themeVariables.xyChart)}e(Ot,"getChartDefaultThemeConfig");function Vt(){let t=b();return U(D.xyChart,t.xyChart)}e(Vt,"getChartDefaultConfig");function Wt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}e(Wt,"getChartDefaultData");function ct(t){let i=b();return O(t.trim(),i)}e(ct,"textSanitizer");function ie(t){ee=t}e(ie,"setTmpSVGG");function se(t){if(t==="horizontal")mt.chartOrientation="horizontal";else mt.chartOrientation="vertical"}e(se,"setOrientation");function ne(t){w.xAxis.title=ct(t.text)}e(ne,"setXAxisTitle");function Ft(t,i){w.xAxis={type:"linear",title:w.xAxis.title,min:t,max:i},St=!0}e(Ft,"setXAxisRangeData");function ae(t){w.xAxis={type:"band",title:w.xAxis.title,categories:t.map((i)=>ct(i.text))},St=!0}e(ae,"setXAxisBand");function oe(t){w.yAxis.title=ct(t.text)}e(oe,"setYAxisTitle");function re(t,i){w.yAxis={type:"linear",title:w.yAxis.title,min:t,max:i},zt=!0}e(re,"setYAxisRangeData");function he(t){let i=Math.min(...t),s=Math.max(...t),n=dt(w.yAxis)?w.yAxis.min:1/0,a=dt(w.yAxis)?w.yAxis.max:-1/0;w.yAxis={type:"linear",title:w.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}e(he,"setYAxisRangeFromPlotData");function Xt(t){let i=[];if(t.length===0)return i;if(!St){let s=dt(w.xAxis)?w.xAxis.min:1/0,n=dt(w.xAxis)?w.xAxis.max:-1/0;Ft(Math.min(s,1),Math.max(n,t.length))}if(Ct(w.xAxis)&&t.length>w.xAxis.categories.length)t=t.slice(0,w.xAxis.categories.length);if(!zt)he(t);if(Ct(w.xAxis))i=w.xAxis.categories.map((s,n)=>[s,t[n]]);if(dt(w.xAxis)){let s=w.xAxis.min,n=w.xAxis.max;if(t.length===1)i=[[`${s}`,t[0]]];else{let a=(n-s)/(t.length-1);i=t.map((c,l)=>[`${s+l*a}`,c])}}return i}e(Xt,"transformDataWithoutCategory");function Yt(t){return It[t===0?0:t%It.length]}e(Yt,"getPlotColorFromPalette");function le(t,i){let s=i.map((l)=>l.value),n=i.map((l)=>l.label?ct(l.label):""),a=Xt(s),c=n.some((l)=>l!=="");w.plots.push({type:"line",title:ct(t.text),strokeFill:Yt(pt),strokeWidth:2,data:a,...c?{pointLabels:n}:{}}),pt++}e(le,"setLineData");function ce(t,i){let s=i.map((a)=>a.value),n=Xt(s);w.plots.push({type:"bar",title:ct(t.text),fill:Yt(pt),data:n}),pt++}e(ce,"setBarData");function ge(){if(w.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return w.title=L(),Ee.build(mt,w,bt,ee)}e(ge,"getDrawableElem");function ue(){return bt}e(ue,"getChartThemeConfig");function de(){return mt}e(de,"getChartConfig");function xe(){return w}e(xe,"getXYChartData");var Me=e(function(){C(),pt=0,mt=Vt(),w=Wt(),bt=Ot(),It=bt.plotColorPalette.split(",").map((t)=>t.trim()),St=!1,zt=!1},"clear"),Ie={getDrawableElem:ge,clear:Me,setAccTitle:S,getAccTitle:E,setDiagramTitle:I,getDiagramTitle:L,getAccDescription:A,setAccDescription:T,setOrientation:se,setXAxisTitle:ne,setXAxisRangeData:Ft,setXAxisBand:ae,setYAxisTitle:oe,setYAxisRangeData:re,setLineData:le,setBarData:ce,setTmpSVGG:ie,getChartThemeConfig:ue,getChartConfig:de,getXYChartData:xe},Be=e((t,i,s,n)=>{let a=n.db,c=a.getChartThemeConfig(),l=a.getChartConfig(),f=a.getXYChartData().plots[0].data.map((R)=>R[1]);function g(R){return R==="top"?"text-before-edge":"middle"}e(g,"getDominantBaseLine");function y(R){return R==="left"?"start":R==="right"?"end":"middle"}e(y,"getTextAnchor");function z(R){return`translate(${R.x}, ${R.y}) rotate(${R.rotation||0})`}e(z,"getTextTransformation"),r.debug(`Rendering xychart chart
7
+ `+t);let P=q(i),k=P.append("g").attr("class","main"),G=k.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");B(P,l.height,l.width,!0),P.attr("viewBox",`0 0 ${l.width} ${l.height}`),G.attr("fill",c.backgroundColor),a.setTmpSVGG(P.append("g").attr("class","mermaid-tmp-group"));let X=a.getDrawableElem(),Y={};function j(R){let K=k,d="";for(let[Q]of R.entries()){let Z=k;if(Q>0&&Y[d])Z=Y[d];if(d+=R[Q],K=Y[d],!K)K=Y[d]=Z.append("g").attr("class",R[Q])}return K}e(j,"getGroup");for(let R of X){if(R.data.length===0)continue;let K=j(R.groupTexts);switch(R.type){case"rect":if(K.selectAll("rect").data(R.data).enter().append("rect").attr("x",(d)=>d.x).attr("y",(d)=>d.y).attr("width",(d)=>d.width).attr("height",(d)=>d.height).attr("fill",(d)=>d.fill).attr("stroke",(d)=>d.strokeFill).attr("stroke-width",(d)=>d.strokeWidth),l.showDataLabel){let d=l.showDataLabelOutsideBar;if(l.chartOrientation==="horizontal"){let Q=function(_,st){let{data:V,label:J}=_;return st*J.length*Z<=V.width-v};var it=Q;e(Q,"fitsHorizontally");let Z=0.7,v=10,ot=R.data.map((_,st)=>({data:_,label:f[st].toString()})).filter((_)=>_.data.width>0&&_.data.height>0),N=ot.map((_)=>{let{data:st}=_,V=st.height*0.7;while(!Q(_,V)&&V>0)V-=1;return V}),gt=Math.floor(Math.min(...N)),W=e((_)=>{if(d)return _.data.x+_.data.width+v;else return _.data.x+_.data.width-v},"determineLabelXPosition");K.selectAll("text").data(ot).enter().append("text").attr("x",W).attr("y",(_)=>_.data.y+_.data.height/2).attr("text-anchor",d?"start":"end").attr("dominant-baseline","middle").attr("fill",c.dataLabelColor).attr("font-size",`${gt}px`).text((_)=>_.label)}else{let Q=function(W,_,st){let{data:V,label:J}=W,h=0.7,u=_*J.length*0.7,x=V.x+V.width/2,p=x-u/2,M=x+u/2,o=p>=V.x&&M<=V.x+V.width,rt=V.y+st+_<=V.y+V.height;return o&&rt};var nt=Q;e(Q,"fitsInBar");let Z=10,v=R.data.map((W,_)=>({data:W,label:f[_].toString()})).filter((W)=>W.data.width>0&&W.data.height>0),ot=v.map((W)=>{let{data:_,label:st}=W,V=_.width/(st.length*0.7);while(!Q(W,V,Z)&&V>0)V-=1;return V}),N=Math.floor(Math.min(...ot)),gt=e((W)=>{if(d)return W.data.y-Z;else return W.data.y+Z},"determineLabelYPosition");K.selectAll("text").data(v).enter().append("text").attr("x",(W)=>W.data.x+W.data.width/2).attr("y",gt).attr("text-anchor","middle").attr("dominant-baseline",d?"auto":"hanging").attr("fill",c.dataLabelColor).attr("font-size",`${N}px`).text((W)=>W.label)}}break;case"text":K.selectAll("text").data(R.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(d)=>d.fill).attr("font-size",(d)=>d.fontSize).attr("dominant-baseline",(d)=>g(d.verticalPos)).attr("text-anchor",(d)=>y(d.horizontalPos)).attr("transform",(d)=>z(d)).text((d)=>d.text);break;case"path":K.selectAll("path").data(R.data).enter().append("path").attr("d",(d)=>d.path).attr("fill",(d)=>d.fill?d.fill:"none").attr("stroke",(d)=>d.strokeFill).attr("stroke-width",(d)=>d.strokeWidth);break}}},"draw"),ze={draw:Be},ti={parser:ye,db:Ie,renderer:ze};export{ti as diagram};
@@ -0,0 +1,89 @@
1
+ import{e,r,Y,u,d,D,O,mt,s,q,et,tt,St,ht,Kt}from"./chunk-y0m8hrwz.js";import{je}from"./chunk-2m12wyrb.js";var ae=function(){var t=e(function(R,a,i,c){for(i=i||{},c=R.length;c--;i[R[c]]=a);return i},"o"),f=[1,4],m=[1,13],o=[1,12],y=[1,15],N=[1,16],S=[1,20],g=[1,19],A=[6,7,8],P=[1,26],b=[1,24],B=[1,25],x=[6,7,11],X=[1,31],L=[6,7,11,24],H=[1,6,13,16,17,20,23],k=[1,35],j=[1,36],T=[1,6,7,11,13,16,17,20,23],K=[1,38],F={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(a,i,c,l,p,n,G){var h=n.length-1;switch(p){case 6:case 7:return l;case 8:l.getLogger().trace("Stop NL ");break;case 9:l.getLogger().trace("Stop EOF ");break;case 11:l.getLogger().trace("Stop NL2 ");break;case 12:l.getLogger().trace("Stop EOF2 ");break;case 15:l.getLogger().info("Node: ",n[h-1].id),l.addNode(n[h-2].length,n[h-1].id,n[h-1].descr,n[h-1].type,n[h]);break;case 16:l.getLogger().info("Node: ",n[h].id),l.addNode(n[h-1].length,n[h].id,n[h].descr,n[h].type);break;case 17:l.getLogger().trace("Icon: ",n[h]),l.decorateNode({icon:n[h]});break;case 18:case 23:l.decorateNode({class:n[h]});break;case 19:l.getLogger().trace("SPACELIST");break;case 20:l.getLogger().trace("Node: ",n[h-1].id),l.addNode(0,n[h-1].id,n[h-1].descr,n[h-1].type,n[h]);break;case 21:l.getLogger().trace("Node: ",n[h].id),l.addNode(0,n[h].id,n[h].descr,n[h].type);break;case 22:l.decorateNode({icon:n[h]});break;case 27:l.getLogger().trace("node found ..",n[h-2]),this.$={id:n[h-1],descr:n[h-1],type:l.getType(n[h-2],n[h])};break;case 28:this.$={id:n[h],descr:n[h],type:0};break;case 29:l.getLogger().trace("node found ..",n[h-3]),this.$={id:n[h-3],descr:n[h-1],type:l.getType(n[h-2],n[h])};break;case 30:this.$=n[h-1]+n[h];break;case 31:this.$=n[h];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:m,7:[1,10],9:9,12:11,13:o,14:14,16:y,17:N,18:17,19:18,20:S,23:g},t(A,[2,3]),{1:[2,2]},t(A,[2,4]),t(A,[2,5]),{1:[2,6],6:m,12:21,13:o,14:14,16:y,17:N,18:17,19:18,20:S,23:g},{6:m,9:22,12:11,13:o,14:14,16:y,17:N,18:17,19:18,20:S,23:g},{6:P,7:b,10:23,11:B},t(x,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:S,23:g}),t(x,[2,19]),t(x,[2,21],{15:30,24:X}),t(x,[2,22]),t(x,[2,23]),t(L,[2,25]),t(L,[2,26]),t(L,[2,28],{20:[1,32]}),{21:[1,33]},{6:P,7:b,10:34,11:B},{1:[2,7],6:m,12:21,13:o,14:14,16:y,17:N,18:17,19:18,20:S,23:g},t(H,[2,14],{7:k,11:j}),t(T,[2,8]),t(T,[2,9]),t(T,[2,10]),t(x,[2,16],{15:37,24:X}),t(x,[2,17]),t(x,[2,18]),t(x,[2,20],{24:K}),t(L,[2,31]),{21:[1,39]},{22:[1,40]},t(H,[2,13],{7:k,11:j}),t(T,[2,11]),t(T,[2,12]),t(x,[2,15],{24:K}),t(L,[2,30]),{22:[1,41]},t(L,[2,27]),t(L,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(a,i){if(i.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=i,c}},"parseError"),parse:e(function(a){var i=this,c=[0],l=[],p=[null],n=[],G=this.table,h="",J=0,he=0,ue=0,be=2,ge=1,ye=n.slice.call(arguments,1),_=Object.create(this.lexer),M={yy:{}};for(var te in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,te))M.yy[te]=this.yy[te];if(_.setInput(a,M.yy),M.yy.lexer=_,M.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var ne=_.yylloc;n.push(ne);var me=_.options&&_.options.ranges;if(typeof M.yy.parseError==="function")this.parseError=M.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ke(C){c.length=c.length-2*C,p.length=p.length-C,n.length=n.length-C}e(ke,"popStack");function de(){var C=l.pop()||_.lex()||ge;if(typeof C!=="number"){if(C instanceof Array)l=C,C=l.pop();C=i.symbols_[C]||C}return C}e(de,"lex");var v,ie,U,I,Fe,re,z={},Q,V,pe,Z;while(!0){if(U=c[c.length-1],this.defaultActions[U])I=this.defaultActions[U];else{if(v===null||typeof v>"u")v=de();I=G[U]&&G[U][v]}if(typeof I>"u"||!I.length||!I[0]){var se="";Z=[];for(Q in G[U])if(this.terminals_[Q]&&Q>be)Z.push("'"+this.terminals_[Q]+"'");if(_.showPosition)se="Parse error on line "+(J+1)+`:
2
+ `+_.showPosition()+`
3
+ Expecting `+Z.join(", ")+", got '"+(this.terminals_[v]||v)+"'";else se="Parse error on line "+(J+1)+": Unexpected "+(v==ge?"end of input":"'"+(this.terminals_[v]||v)+"'");this.parseError(se,{text:_.match,token:this.terminals_[v]||v,line:_.yylineno,loc:ne,expected:Z})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+U+", token: "+v);switch(I[0]){case 1:if(c.push(v),p.push(_.yytext),n.push(_.yylloc),c.push(I[1]),v=null,!ie){if(he=_.yyleng,h=_.yytext,J=_.yylineno,ne=_.yylloc,ue>0)ue--}else v=ie,ie=null;break;case 2:if(V=this.productions_[I[1]][1],z.$=p[p.length-V],z._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},me)z._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]];if(re=this.performAction.apply(z,[h,he,J,M.yy,I[1],p,n].concat(ye)),typeof re<"u")return re;if(V)c=c.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V);c.push(this.productions_[I[1]][0]),p.push(z.$),n.push(z._$),pe=G[c[c.length-2]][c[c.length-1]],c.push(pe);break;case 3:return!0}}return!0},"parse")},ee=function(){var R={EOF:1,parseError:e(function(i,c){if(this.yy.parser)this.yy.parser.parseError(i,c);else throw Error(i)},"parseError"),setInput:e(function(a,i){if(this.yy=i||this.yy||{},this._input=a,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 a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var i=a.match(/(?:\r\n?|\n).*/g);if(i)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),a},"input"),unput:e(function(a){var i=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var l=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),c.length-1)this.yylineno-=c.length-1;var p=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:c?(c.length===l.length?this.yylloc.first_column:0)+l[l.length-c.length].length-c[0].length:this.yylloc.first_column-i},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-i];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(a){this.unput(this.match.slice(a))},"less"),pastInput:e(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var a=this.match;if(a.length<20)a+=this._input.substr(0,20-a.length);return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var a=this.pastInput(),i=Array(a.length+1).join("-");return a+this.upcomingInput()+`
5
+ `+i+"^"},"showPosition"),test_match:e(function(a,i){var c,l,p;if(this.options.backtrack_lexer){if(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)p.yylloc.range=this.yylloc.range.slice(0)}if(l=a[0].match(/(?:\r\n?|\n).*/g),l)this.yylineno+=l.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(c)return c;else if(this._backtrack){for(var n in p)this[n]=p[n];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var a,i,c,l;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var n=0;n<p.length;n++)if(c=this._input.match(this.rules[p[n]]),c&&(!i||c[0].length>i[0].length)){if(i=c,l=n,this.options.backtrack_lexer)if(a=this.test_match(c,p[n]),a!==!1)return a;else if(this._backtrack){i=!1;continue}else return!1;else if(!this.options.flex)break}if(i){if(a=this.test_match(i,p[l]),a!==!1)return a;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 i=this.next();if(i)return i;else return this.lex()},"lex"),begin:e(function(i){this.conditionStack.push(i)},"begin"),popState:e(function(){var i=this.conditionStack.length-1;if(i>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(i){if(i=this.conditionStack.length-1-Math.abs(i||0),i>=0)return this.conditionStack[i];else return"INITIAL"},"topState"),pushState:e(function(i){this.begin(i)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(i,c,l,p){var n=p;switch(l){case 0:return this.pushState("shapeData"),c.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let G=/\n\s*/g;return c.yytext=c.yytext.replace(G,"<br/>"),24;break;case 4:return 24;case 5:this.popState();break;case 6:return i.getLogger().trace("Found comment",c.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return i.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:i.getLogger().trace("end icon"),this.popState();break;case 16:return i.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return i.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return i.getLogger().trace("description:",c.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),i.getLogger().trace("node end ...",c.yytext),"NODE_DEND";break;case 36:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return i.getLogger().trace("Long description:",c.yytext),21;break;case 42:return i.getLogger().trace("Long description:",c.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return R}();F.lexer=ee;function W(){this.yy={}}return e(W,"Parser"),W.prototype=F,F.Parser=W,new W}();ae.parser=ae;var Ee=ae,w=[],ce=[],oe=0,le={},_e=e(()=>{w=[],ce=[],oe=0,le={}},"clear"),Se=e((t)=>{if(w.length===0)return null;let f=w[0].level,m=null;for(let o=w.length-1;o>=0;o--){if(w[o].level===f&&!m)m=w[o];if(w[o].level<f)throw Error('Items without section detected, found section ("'+w[o].label+'")')}if(t===m?.level)return null;return m},"getSection"),fe=e(function(){return ce},"getSections"),Ne=e(function(){let t=[],f=[],m=fe(),o=s();for(let y of m){let N={id:y.id,label:O(y.label??"",o),labelType:"markdown",isGroup:!0,ticket:y.ticket,shape:"kanbanSection",level:y.level,look:o.look};f.push(N);let S=w.filter((g)=>g.parentId===y.id);for(let g of S){let A={id:g.id,parentId:y.id,label:O(g.label??"",o),labelType:"markdown",isGroup:!1,ticket:g?.ticket,priority:g?.priority,assigned:g?.assigned,icon:g?.icon,shape:"kanbanItem",level:g.level,rx:5,ry:5,cssStyles:["text-align: left"]};f.push(A)}}return{nodes:f,edges:t,other:{},config:s()}},"getData"),xe=e((t,f,m,o,y)=>{let N=s(),S=N.mindmap?.padding??D.mindmap.padding;switch(o){case E.ROUNDED_RECT:case E.RECT:case E.HEXAGON:S*=2}let g={id:O(f,N)||"kbn"+oe++,level:t,label:O(m,N),width:N.mindmap?.maxNodeWidth??D.mindmap.maxNodeWidth,padding:S,isGroup:!1};if(y!==void 0){let P;if(!y.includes(`
7
+ `))P=`{
8
+ `+y+`
9
+ }`;else P=y+`
10
+ `;let b=tt(P,{schema:et});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);if(b?.shape&&b.shape==="kanbanItem")g.shape=b?.shape;if(b?.label)g.label=b?.label;if(b?.icon)g.icon=b?.icon.toString();if(b?.assigned)g.assigned=b?.assigned.toString();if(b?.ticket)g.ticket=b?.ticket.toString();if(b?.priority)g.priority=b?.priority}let A=Se(t);if(A)g.parentId=A.id||"kbn"+oe++;else ce.push(g);w.push(g)},"addNode"),E={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ve=e((t,f)=>{switch(r.debug("In get type",t,f),t){case"[":return E.RECT;case"(":return f===")"?E.ROUNDED_RECT:E.CLOUD;case"((":return E.CIRCLE;case")":return E.CLOUD;case"))":return E.BANG;case"{{":return E.HEXAGON;default:return E.DEFAULT}},"getType"),De=e((t,f)=>{le[t]=f},"setElementForId"),Le=e((t)=>{if(!t)return;let f=s(),m=w[w.length-1];if(t.icon)m.icon=O(t.icon,f);if(t.class)m.cssClasses=O(t.class,f)},"decorateNode"),Oe=e((t)=>{switch(t){case E.DEFAULT:return"no-border";case E.RECT:return"rect";case E.ROUNDED_RECT:return"rounded-rect";case E.CIRCLE:return"circle";case E.CLOUD:return"cloud";case E.BANG:return"bang";case E.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ie=e(()=>r,"getLogger"),Ce=e((t)=>le[t],"getElementById"),we={clear:_e,addNode:xe,getSections:fe,getData:Ne,nodeType:E,getType:ve,setElementForId:De,decorateNode:Le,type2Str:Oe,getLogger:Ie,getElementById:Ce},Ae=we,Te=e(async(t,f,m,o)=>{r.debug(`Rendering kanban diagram
11
+ `+t);let N=o.db.getData(),S=s();S.htmlLabels=!1;let g=q(f);for(let k of N.nodes)k.domId=`${f}-${k.id}`;let A=g.append("g");A.attr("class","sections");let P=g.append("g");P.attr("class","items");let b=N.nodes.filter((k)=>k.isGroup),B=0,x=10,X=[],L=25;for(let k of b){let j=S?.kanban?.sectionWidth||200;B=B+1,k.x=j*B+(B-1)*x/2,k.width=j,k.y=0,k.height=j*3,k.rx=5,k.ry=5,k.cssClasses=k.cssClasses+" section-"+B;let T=await Kt(A,k);L=Math.max(L,T?.labelBBox?.height),X.push(T)}let H=0;for(let k of b){let j=X[H];H=H+1;let T=S?.kanban?.sectionWidth||200,K=-T*3/2+L,F=K,ee=N.nodes.filter((a)=>a.parentId===k.id);for(let a of ee){if(a.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");a.x=k.x,a.width=T-1.5*x;let c=(await St(P,a,{config:S})).node().getBBox();a.y=F+c.height/2,await ht(a),F=a.y+c.height/2+x/2}let W=j.cluster.select("rect"),R=Math.max(F-K+3*x,50)+(L-25);W.attr("height",R)}mt(void 0,g,S.mindmap?.padding??D.kanban.padding,S.mindmap?.useMaxWidth??D.kanban.useMaxWidth)},"draw"),Re={draw:Te},Pe=e((t)=>{let f="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)if(t["lineColor"+o]=t["lineColor"+o]||t["cScaleInv"+o],Y(t["lineColor"+o]))t["lineColor"+o]=u(t["lineColor"+o],20);else t["lineColor"+o]=d(t["lineColor"+o],20);let m=e((o,y)=>t.darkMode?d(o,y):u(o,y),"adjuster");for(let o=0;o<t.THEME_COLOR_LIMIT;o++){let y=""+(17-3*o);f+=`
12
+ .section-${o-1} rect, .section-${o-1} path, .section-${o-1} circle, .section-${o-1} polygon, .section-${o-1} path {
13
+ fill: ${m(t["cScale"+o],10)};
14
+ stroke: ${m(t["cScale"+o],10)};
15
+
16
+ }
17
+ .section-${o-1} text {
18
+ fill: ${t["cScaleLabel"+o]};
19
+ }
20
+ .node-icon-${o-1} {
21
+ font-size: 40px;
22
+ color: ${t["cScaleLabel"+o]};
23
+ }
24
+ .section-edge-${o-1}{
25
+ stroke: ${t["cScale"+o]};
26
+ }
27
+ .edge-depth-${o-1}{
28
+ stroke-width: ${y};
29
+ }
30
+ .section-${o-1} line {
31
+ stroke: ${t["cScaleInv"+o]} ;
32
+ stroke-width: 3;
33
+ }
34
+
35
+ .disabled, .disabled circle, .disabled text {
36
+ fill: lightgray;
37
+ }
38
+ .disabled text {
39
+ fill: #efefef;
40
+ }
41
+
42
+ .node rect,
43
+ .node circle,
44
+ .node ellipse,
45
+ .node polygon,
46
+ .node path {
47
+ fill: ${t.background};
48
+ stroke: ${t.nodeBorder};
49
+ stroke-width: 1px;
50
+ }
51
+
52
+ .kanban-ticket-link {
53
+ fill: ${t.background};
54
+ stroke: ${t.nodeBorder};
55
+ text-decoration: underline;
56
+ }
57
+ `}return f},"genSections"),Ve=e((t)=>`
58
+ .edge {
59
+ stroke-width: 3;
60
+ }
61
+ ${Pe(t)}
62
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
63
+ fill: ${t.git0};
64
+ }
65
+ .section-root text {
66
+ fill: ${t.gitBranchLabel0};
67
+ }
68
+ .icon-container {
69
+ height:100%;
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: center;
73
+ }
74
+ .edge {
75
+ fill: none;
76
+ }
77
+ .cluster-label, .label {
78
+ color: ${t.textColor};
79
+ fill: ${t.textColor};
80
+ }
81
+ .kanban-label {
82
+ dy: 1em;
83
+ alignment-baseline: middle;
84
+ text-anchor: middle;
85
+ dominant-baseline: middle;
86
+ text-align: center;
87
+ }
88
+ ${je()}
89
+ `,"getStyles"),Be=Ve,it={db:Ae,renderer:Re,parser:Ee,styles:Be};export{it as diagram};