@kabmo-labs/kabmo 0.61.0 → 0.62.0

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 (506) hide show
  1. package/README.md +53 -49
  2. package/dist/client/index.html +1 -1
  3. package/dist/client/index.js +1157 -825
  4. package/dist/client/static/js/{Body-ab8wswhm.js → Body-z6kstvk6.js} +3 -3
  5. package/dist/client/static/js/{CsvGrid-czssywvz.js → CsvGrid-f73c0s4e.js} +2 -2
  6. package/dist/client/static/js/{DocxView-ke0dwdmt.js → DocxView-a1pb7nsb.js} +3 -3
  7. package/dist/client/static/js/{DrawioView-a1whhy84.js → DrawioView-r61gcg24.js} +2 -2
  8. package/dist/client/static/js/{HtmlPreview-dr32dwjy.js → HtmlPreview-vt7j0b05.js} +1 -1
  9. package/dist/client/static/js/ImageView-4nhr5dtm.js +1 -0
  10. package/dist/client/static/js/LayoutWrapper-vwhy0vhj.js +2 -0
  11. package/dist/client/static/js/MergeDiffView-f4h9ss71.js +1 -0
  12. package/dist/client/static/js/Modal-cadmjkak.js +60 -0
  13. package/dist/client/static/js/{PdfView-2kdn91f9.js → PdfView-mppt2gkd.js} +1 -1
  14. package/dist/client/static/js/SessionsView-vvsaw9f0.js +1 -0
  15. package/dist/client/static/js/{SheetView-ettr9pdw.js → SheetView-5s9zfx9g.js} +9 -9
  16. package/dist/client/static/js/{SvgPreview-hzcejjry.js → SvgPreview-ff78xn3e.js} +1 -1
  17. package/dist/client/static/js/{abnfDiagram-O67JEVCF-kdmv4y72.js → abnfDiagram-O67JEVCF-p29sh3w2.js} +1 -1
  18. package/dist/client/static/js/architecture-7GRP2DOG-83w3kytq.js +1 -0
  19. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-qyrwaq0x.js → architectureDiagram-NJMV4G6O-nbpdyea3.js} +3 -3
  20. package/dist/client/static/js/{astro-yphdvdty.js → astro-qtfmc8x7.js} +1 -1
  21. package/dist/client/static/js/bash-wcy12qjx.js +1 -0
  22. package/dist/client/static/js/{blockDiagram-BEXU5L5S-tszxy2g7.js → blockDiagram-BEXU5L5S-t8xbexa6.js} +6 -6
  23. package/dist/client/static/js/c-vvantfth.js +1 -0
  24. package/dist/client/static/js/{c4Diagram-YGBWAQC7-0ye36hhv.js → c4Diagram-YGBWAQC7-9fwf2zxk.js} +3 -3
  25. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-szgk1shv.js → classDiagram-v2-NBCMYWYE-nbapgqbs.js} +4 -4
  26. package/dist/client/static/js/{cose-bilkent-JH36ORCC-0s9s4mmv.js → cose-bilkent-JH36ORCC-k54mmydp.js} +1 -1
  27. package/dist/client/static/js/cpp-5x63r6g0.js +1 -0
  28. package/dist/client/static/js/css-j2j6f03w.js +1 -0
  29. package/dist/client/static/js/css-qk59j6rj.js +1 -0
  30. package/dist/client/static/js/cynefin-OW5HDTMX-80z02zrj.js +1 -0
  31. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-664g28ze.js → cynefinDiagram-VND7K2PF-qdg32wah.js} +1 -1
  32. package/dist/client/static/js/{dagre-6A5THRUB-ga4rp1jx.js → dagre-6A5THRUB-qzshg1vs.js} +2 -2
  33. package/dist/client/static/js/{diagram-22UHCM2B-aagj46ty.js → diagram-22UHCM2B-197hemfa.js} +11 -11
  34. package/dist/client/static/js/{diagram-3UASUU5V-20qk6whk.js → diagram-3UASUU5V-236gnjr6.js} +1 -1
  35. package/dist/client/static/js/{diagram-ATOU4E4O-1vg1tfca.js → diagram-ATOU4E4O-vjgpyaaq.js} +3 -3
  36. package/dist/client/static/js/{diagram-CDSNMT55-90d6jrqs.js → diagram-CDSNMT55-ywvzcx7z.js} +4 -4
  37. package/dist/client/static/js/{diagram-MLGK6HIB-8je4z8m1.js → diagram-MLGK6HIB-9ey7ev7j.js} +1 -1
  38. package/dist/client/static/js/{diagram-MPIPVDR6-0kzpexsj.js → diagram-MPIPVDR6-vrqbb6r7.js} +2 -2
  39. package/dist/client/static/js/{dockerfile-5nrbr0ef.js → dockerfile-4nked309.js} +1 -1
  40. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-47yg36zx.js → ebnfDiagram-ZINNZB2B-hvnkevqy.js} +1 -1
  41. package/dist/client/static/js/{elixir-3nwnd9yw.js → elixir-3jvh6v4k.js} +1 -1
  42. package/dist/client/static/js/{elk-276RUBZZ-5hqp6r2d.js → elk-276RUBZZ-nej6yy1c.js} +1 -1
  43. package/dist/client/static/js/{erDiagram-OPXOYQCR-bt9te7r0.js → erDiagram-OPXOYQCR-ww453xcy.js} +5 -5
  44. package/dist/client/static/js/{erlang-p5c4n3t0.js → erlang-4fz73a1q.js} +1 -1
  45. package/dist/client/static/js/eventmodeling-NTZA5JFV-y9pq2709.js +1 -0
  46. package/dist/client/static/js/flowDiagram-KWPJA3E3-e6v7513q.js +1 -0
  47. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-kzc13swm.js → ganttDiagram-FUAMR5RP-abc5wy70.js} +3 -3
  48. package/dist/client/static/js/gitGraph-4MIJSDKK-fzaf9azs.js +1 -0
  49. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-bjf8aa3j.js → gitGraphDiagram-X574FWY7-4acqzj2h.js} +7 -7
  50. package/dist/client/static/js/graphql-hpkvdvk7.js +1 -0
  51. package/dist/client/static/js/html-x12gb1wk.js +1 -0
  52. package/dist/client/static/js/{index-v88m5sva.js → index-0g82ph6h.js} +2 -2
  53. package/dist/client/static/js/{index-1fmjhm2d.js → index-0w1jzang.js} +5 -5
  54. package/dist/client/static/js/{index-kj70d2q9.js → index-1svt0cdw.js} +2 -2
  55. package/dist/client/static/js/{index-m24sebb0.js → index-1tb4py5v.js} +2 -2
  56. package/dist/client/static/js/index-2gt9krtj.js +4 -0
  57. package/dist/client/static/js/index-2x9m7s1a.js +1 -0
  58. package/dist/client/static/js/index-3fvqmz3m.js +4 -0
  59. package/dist/client/static/js/{index-k9yf2txw.js → index-42wvbkm5.js} +2 -2
  60. package/dist/client/static/js/index-477vtt51.js +2 -0
  61. package/dist/client/static/js/{index-ca6tmamh.js → index-4px56qaz.js} +2 -2
  62. package/dist/client/static/js/{index-excgtjhx.js → index-5anvw7xg.js} +36 -36
  63. package/dist/client/static/js/index-5nb9k2ph.js +1 -0
  64. package/dist/client/static/js/{index-97sw4d9n.js → index-615je3km.js} +2 -2
  65. package/dist/client/static/js/{index-jz4012t5.js → index-66qxrh5n.js} +1 -1
  66. package/dist/client/static/js/{index-a145x0w2.js → index-7kct1sz1.js} +2 -2
  67. package/dist/client/static/js/{index-hwv7bfxc.js → index-8e0d8y30.js} +2 -2
  68. package/dist/client/static/js/{index-s4j2ghmx.js → index-90bq56xw.js} +2 -2
  69. package/dist/client/static/js/{index-wsy6y5em.js → index-b1gzh60t.js} +11 -11
  70. package/dist/client/static/js/{index-10vzyga1.js → index-bypkmjrz.js} +2 -2
  71. package/dist/client/static/js/{index-n8r7r86r.js → index-c1vd63yd.js} +2 -2
  72. package/dist/client/static/js/index-c9f0hejv.js +3 -0
  73. package/dist/client/static/js/{index-2dmew334.js → index-cgqj15g0.js} +2 -2
  74. package/dist/client/static/js/{index-mtav0rpf.js → index-cts5re1t.js} +2 -2
  75. package/dist/client/static/js/index-dxc14kmm.js +1 -0
  76. package/dist/client/static/js/{index-krdz5vby.js → index-dxyjxhm1.js} +2 -2
  77. package/dist/client/static/js/{index-zr3965k9.js → index-edpyqz9f.js} +1 -1
  78. package/dist/client/static/js/{index-h7agc069.js → index-eesepb70.js} +2 -2
  79. package/dist/client/static/js/{index-r38e0rya.js → index-evh437bz.js} +2 -2
  80. package/dist/client/static/js/index-ey6v4t5b.js +1 -0
  81. package/dist/client/static/js/{index-025s3fp8.js → index-fsd7n336.js} +2 -2
  82. package/dist/client/static/js/{index-yfcy4cf6.js → index-h7a7fqag.js} +2 -2
  83. package/dist/client/static/js/{index-11qn05g9.js → index-hffgwnvz.js} +2 -2
  84. package/dist/client/static/js/index-j734ev6q.js +482 -0
  85. package/dist/client/static/js/{index-9g2nzgpx.js → index-jcbp1d9d.js} +6 -6
  86. package/dist/client/static/js/index-jg5h18sm.js +2 -0
  87. package/dist/client/static/js/{index-bq9f0mxp.js → index-jtdve6xw.js} +7 -7
  88. package/dist/client/static/js/{index-kyr612aa.js → index-k0bqrb1y.js} +1 -1
  89. package/dist/client/static/js/{index-bdtftrym.js → index-kegevd10.js} +2 -2
  90. package/dist/client/static/js/{index-fr6wsqk8.js → index-kqcfxkch.js} +2 -2
  91. package/dist/client/static/js/{index-sr14vwn5.js → index-kv1xnem9.js} +2 -2
  92. package/dist/client/static/js/{index-xy0m8te9.js → index-m54ctmxr.js} +1 -1
  93. package/dist/client/static/js/index-mgzbypt5.js +314 -0
  94. package/dist/client/static/js/{index-85jfn1fz.js → index-mh52531j.js} +2 -2
  95. package/dist/client/static/js/{index-776n5n29.js → index-mhz5ywa4.js} +5 -5
  96. package/dist/client/static/js/{index-3j2he86h.js → index-nnwdbg3t.js} +2 -2
  97. package/dist/client/static/js/{index-3x7cbxwq.js → index-nxd6z7f9.js} +2 -2
  98. package/dist/client/static/js/{index-dabnbvbc.js → index-pjrbt77c.js} +2 -2
  99. package/dist/client/static/js/index-r7h4pm42.js +2 -0
  100. package/dist/client/static/js/index-ratrdgc9.js +2 -0
  101. package/dist/client/static/js/{index-475dc6h9.js → index-rhmvh9w5.js} +2 -2
  102. package/dist/client/static/js/{index-twwsn91p.js → index-sqzjwy9h.js} +2 -2
  103. package/dist/client/static/js/{index-z5s9tmj8.js → index-tckzkw0f.js} +2 -2
  104. package/dist/client/static/js/index-tza9h3q6.css +1 -0
  105. package/dist/client/static/js/{index-qccydkze.js → index-vhjfr093.js} +2 -2
  106. package/dist/client/static/js/{index-653x8zdq.js → index-w0j96eyy.js} +8 -8
  107. package/dist/client/static/js/{index-24a40rw8.js → index-ws04kxy9.js} +1 -1
  108. package/dist/client/static/js/{index-a3bpmw2r.js → index-x1yqmzpr.js} +2 -2
  109. package/dist/client/static/js/{index-fb2fjndj.js → index-x2f7wykb.js} +6 -6
  110. package/dist/client/static/js/index-y8405hdg.js +10 -0
  111. package/dist/client/static/js/{index-sx83ans2.js → index-yxk7dgnb.js} +2 -2
  112. package/dist/client/static/js/{index-bkn6jtn1.js → index-zavecxak.js} +2 -2
  113. package/dist/client/static/js/{index-vn59zz0k.js → index-zg7q3kcb.js} +2 -2
  114. package/dist/client/static/js/{index-enm77k5z.js → index-zhn9vv3z.js} +2 -2
  115. package/dist/client/static/js/{index-vgcw01yk.js → index-zy963qbh.js} +1 -1
  116. package/dist/client/static/js/info-A6RAGUB7-t7pbg7rt.js +1 -0
  117. package/dist/client/static/js/{infoDiagram-VRGFBTTK-jy5zvvj8.js → infoDiagram-VRGFBTTK-9pe7w3r5.js} +2 -2
  118. package/dist/client/static/js/ini-522adp5a.js +1 -0
  119. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-pfky1nnf.js → ishikawaDiagram-OU5B5YK6-38arfrx5.js} +2 -2
  120. package/dist/client/static/js/java-z0rgs7v6.js +1 -0
  121. package/dist/client/static/js/javascript-fv87f565.js +1 -0
  122. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-mvaf7rfh.js → journeyDiagram-ZHPQQLJL-kcwzjgtz.js} +4 -4
  123. package/dist/client/static/js/json-1czq1ped.js +1 -0
  124. package/dist/client/static/js/jsx-1fch2jyr.js +1 -0
  125. package/dist/client/static/js/{julia-rpd1y9vh.js → julia-pzzxbptm.js} +1 -1
  126. package/dist/client/static/js/{kanban-definition-PNTS6WVX-hw2xwe6e.js → kanban-definition-PNTS6WVX-nmegwy9w.js} +15 -15
  127. package/dist/client/static/js/lua-nn8bpjev.js +1 -0
  128. package/dist/client/static/js/markdown-38tqrgkn.js +1 -0
  129. package/dist/client/static/js/{mermaid.core-hsw87hmq.js → mermaid.core-3aae27b9.js} +7 -7
  130. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-wfe4d846.js → mindmap-definition-NLK3R4M7-zsaq4e65.js} +12 -12
  131. package/dist/client/static/js/one-dark-pro-trnff03z.js +1 -0
  132. package/dist/client/static/js/one-light-ck31ptqs.js +1 -0
  133. package/dist/client/static/js/packet-AYTQ26CC-rwac7scq.js +1 -0
  134. package/dist/client/static/js/{pegDiagram-GJSIUBJH-cvnmxgst.js → pegDiagram-GJSIUBJH-2b6whj1p.js} +1 -1
  135. package/dist/client/static/js/{perl-kmtz9dnv.js → perl-zdkbbjd2.js} +1 -1
  136. package/dist/client/static/js/{php-bttrsbxy.js → php-ktaxff6g.js} +1 -1
  137. package/dist/client/static/js/pie-WAS4IAKB-gjz20apz.js +1 -0
  138. package/dist/client/static/js/{pieDiagram-5QR66LMP-0n3gz7sv.js → pieDiagram-5QR66LMP-y09ar7vz.js} +3 -3
  139. package/dist/client/static/js/properties-kncqeqhn.js +1 -0
  140. package/dist/client/static/js/python-gx8ggmyh.js +1 -0
  141. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-9qqh6xvv.js → quadrantDiagram-O4NWA36T-mapfzs06.js} +3 -3
  142. package/dist/client/static/js/r-x8rftkm3.js +1 -0
  143. package/dist/client/static/js/radar-RG4KPBEZ-akwdknab.js +1 -0
  144. package/dist/client/static/js/railroad-74A4TZTK-m5v4rfhx.js +1 -0
  145. package/dist/client/static/js/railroad-abnf-HS5TGJTU-k2gmqcjb.js +1 -0
  146. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zdsfjf4.js +1 -0
  147. package/dist/client/static/js/railroad-peg-WCYAUIDC-e98evqb6.js +1 -0
  148. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-5f3x3762.js → railroadDiagram-XR7U4H2S-70qy7qdh.js} +1 -1
  149. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-a68bv6kh.js → requirementDiagram-PLB6GJNP-2vb2gp3e.js} +3 -3
  150. package/dist/client/static/js/{ruby-dve3y59w.js → ruby-ytqv3pqz.js} +1 -1
  151. package/dist/client/static/js/{rust-qjhdt4b0.js → rust-6sddyxnt.js} +1 -1
  152. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-ry7xcphh.js → sankeyDiagram-IPEJSGJF-9jd8ebrn.js} +3 -3
  153. package/dist/client/static/js/{sass-emxqt5p2.js → sass-dvbra5b6.js} +1 -1
  154. package/dist/client/static/js/{scss-4j4t3r6y.js → scss-sy7w8916.js} +1 -1
  155. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-mekzzhet.js → sequenceDiagram-PO4LG4MO-w7z84f80.js} +7 -7
  156. package/dist/client/static/js/{sizeCapture-INFHLROL-pvc16ame.js → sizeCapture-INFHLROL-q8w7ehgx.js} +1 -1
  157. package/dist/client/static/js/sql-99y0qnag.js +1 -0
  158. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-3ytxby83.js → stateDiagram-v2-GCMORJYK-4978hapr.js} +3 -3
  159. package/dist/client/static/js/{svelte-dbsx1ehx.js → svelte-xvs3fkza.js} +1 -1
  160. package/dist/client/static/js/{swimlanes-2SLR337P-c2zfp416.js → swimlanes-2SLR337P-eshg5fjy.js} +1 -1
  161. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-914e28hd.js +8 -0
  162. package/dist/client/static/js/timeline-definition-EJHVYXUP-5h5q357k.js +120 -0
  163. package/dist/client/static/js/treeView-Q6P3EWNA-fkm3a7gx.js +1 -0
  164. package/dist/client/static/js/treemap-WGGIJYW6-hm4ktxjf.js +1 -0
  165. package/dist/client/static/js/tsx-phngprp0.js +1 -0
  166. package/dist/client/static/js/typescript-m62a7zr2.js +1 -0
  167. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-sz6b7bnv.js → usecaseDiagram-POWQR4AR-4j69y3zx.js} +20 -20
  168. package/dist/client/static/js/vennDiagram-UO4OBE2U-pa9p5jpw.js +34 -0
  169. package/dist/client/static/js/{vue-hyr58df9.js → vue-p4g4avm3.js} +1 -1
  170. package/dist/client/static/js/wardley-WFR3VGLG-3y2rvdmy.js +1 -0
  171. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-xvtyvde9.js → wardleyDiagram-VNRHLVJA-hjddd656.js} +3 -3
  172. package/dist/client/static/js/xml-59n0cjn6.js +1 -0
  173. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-jcs20s84.js → xychartDiagram-PMCCYNJV-8ng5m849.js} +4 -4
  174. package/dist/client/static/js/yaml-9fw908s4.js +1 -0
  175. package/dist/client/tailwindcss-oxide.linux-x64-gnu-c0fa36dv.node +0 -0
  176. package/dist/client/tailwindcss-oxide.linux-x64-musl-kr04sh0e.node +0 -0
  177. package/marketplace/plugins/command-runner/package.json +2 -2
  178. package/marketplace/plugins/command-runner/src/app.tsx +2 -5
  179. package/marketplace/plugins/command-runner/src/panel/CustomForm.tsx +35 -52
  180. package/marketplace/plugins/command-runner/src/panel/Groups.tsx +6 -5
  181. package/marketplace/plugins/command-runner/src/panel/Header.tsx +18 -54
  182. package/marketplace/plugins/command-runner/src/panel/Output.tsx +3 -7
  183. package/marketplace/plugins/command-runner/src/panel/Row.tsx +19 -38
  184. package/marketplace/plugins/command-runner/src/panel/index.tsx +1 -4
  185. package/marketplace/plugins/git-forge/package.json +2 -2
  186. package/marketplace/plugins/git-forge/src/app.tsx +2 -0
  187. package/marketplace/plugins/git-forge/src/panel/Credential.tsx +8 -15
  188. package/marketplace/plugins/git-forge/src/panel/Header.tsx +35 -66
  189. package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +7 -13
  190. package/marketplace/plugins/git-forge/src/panel/List.tsx +28 -56
  191. package/marketplace/plugins/git-forge/src/panel/Row.tsx +7 -9
  192. package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +21 -31
  193. package/marketplace/plugins/git-forge/src/panel/Write.tsx +26 -40
  194. package/marketplace/plugins/git-forge/src/panel/index.tsx +0 -1
  195. package/marketplace/plugins/github-actions/package.json +2 -2
  196. package/marketplace/plugins/github-actions/src/app.tsx +2 -0
  197. package/marketplace/plugins/github-actions/src/panel/Actions.tsx +9 -17
  198. package/marketplace/plugins/github-actions/src/panel/LogView.tsx +4 -13
  199. package/marketplace/plugins/github-actions/src/panel/Row.tsx +4 -5
  200. package/marketplace/plugins/github-actions/src/panel/RunView.tsx +8 -15
  201. package/marketplace/plugins/github-actions/src/panel/index.test.tsx +3 -2
  202. package/marketplace/plugins/github-actions/src/panel/index.tsx +31 -37
  203. package/marketplace/plugins/kanban/package.json +2 -2
  204. package/marketplace/plugins/kanban/src/app.tsx +2 -0
  205. package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +88 -98
  206. package/marketplace/plugins/kanban/src/panel/CardTile.tsx +6 -10
  207. package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +22 -18
  208. package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +59 -70
  209. package/marketplace/plugins/kanban/src/panel/index.tsx +37 -52
  210. package/marketplace/plugins/kanban/src/panel/use-board.ts +2 -0
  211. package/marketplace/plugins/session-info/package.json +2 -2
  212. package/marketplace/plugins/session-info/src/app.tsx +6 -3
  213. package/marketplace/plugins/stats/package.json +2 -2
  214. package/marketplace/plugins/stats/src/KillConfirm.test.tsx +6 -4
  215. package/marketplace/plugins/stats/src/KillConfirm.tsx +26 -76
  216. package/marketplace/plugins/stats/src/ProcessTable.tsx +8 -6
  217. package/marketplace/plugins/stats/src/RefreshButton.tsx +7 -5
  218. package/marketplace/plugins/stats/src/app.tsx +11 -9
  219. package/package.json +10 -10
  220. package/src/cli/lib/commands/plugin.js +8 -5
  221. package/src/client/bootstrap.d.ts +5 -0
  222. package/src/client/chat-title-overlay.test.ts +53 -0
  223. package/src/client/components/auth/login-screen/index.tsx +31 -3
  224. package/src/client/components/common/SignOutButton.tsx +4 -5
  225. package/src/client/components/common/account-badge/index.tsx +31 -0
  226. package/src/client/components/common/footer-version/index.tsx +40 -0
  227. package/src/client/components/common/fullscreen-viewer/fullscreen-viewer.test.tsx +24 -0
  228. package/src/client/components/common/fullscreen-viewer/index.tsx +22 -31
  229. package/src/client/components/common/header-controls/MoreMenu.tsx +5 -56
  230. package/src/client/components/common/header-controls/index.test.tsx +2 -6
  231. package/src/client/components/common/header-controls/index.tsx +9 -25
  232. package/src/client/components/common/header-controls/phone-row.test.tsx +3 -16
  233. package/src/client/components/common/shell-update-button/index.tsx +2 -2
  234. package/src/client/components/common/zoom-pan-stage/index.tsx +54 -50
  235. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -5
  236. package/src/client/components/layout/desktop-layout/index.tsx +2 -4
  237. package/src/client/components/layout/left-bar/index.tsx +25 -3
  238. package/src/client/components/layout/rail-toggle.test.tsx +112 -0
  239. package/src/client/components/layout/session-sidebar/CategoryHeader.accent.test.tsx +81 -0
  240. package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +11 -3
  241. package/src/client/components/layout/session-sidebar/Footer.test.tsx +36 -0
  242. package/src/client/components/layout/session-sidebar/Footer.tsx +42 -61
  243. package/src/client/components/layout/session-sidebar/FooterHost.tsx +5 -1
  244. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +30 -10
  245. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +4 -0
  246. package/src/client/components/layout/session-sidebar/modern/index.tsx +8 -1
  247. package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +25 -4
  248. package/src/client/components/layout/session-title-bar/index.tsx +13 -5
  249. package/src/client/components/layout/top-bars.test.tsx +4 -2
  250. package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
  251. package/src/client/components/mobile/RightSidebar.tsx +12 -3
  252. package/src/client/components/mobile/SessionSidebar.tsx +6 -2
  253. package/src/client/components/mobile/drawer-layout.test.tsx +7 -3
  254. package/src/client/components/mobile/drawer-strip.tsx +9 -2
  255. package/src/client/components/mobile/mobile-main-view/Header.test.tsx +29 -9
  256. package/src/client/components/mobile/mobile-main-view/Header.tsx +43 -12
  257. package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +12 -1
  258. package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
  259. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +1 -0
  260. package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +9 -1
  261. package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +4 -2
  262. package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +1 -1
  263. package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +48 -46
  264. package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +18 -1
  265. package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +4 -0
  266. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +4 -6
  267. package/src/client/components/mobile/right-drawer-nav.test.tsx +53 -1
  268. package/src/client/components/settings/Band.tsx +5 -2
  269. package/src/client/components/settings/Modal.tsx +8 -5
  270. package/src/client/components/settings/Sidebar.tsx +5 -3
  271. package/src/client/components/settings/apply-side-effects.ts +5 -0
  272. package/src/client/components/settings/categories/AccountSettings.tsx +266 -0
  273. package/src/client/components/settings/categories/ProjectSettings.tsx +2 -0
  274. package/src/client/components/settings/categories/account-settings/Dialogs.tsx +223 -0
  275. package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +3 -4
  276. package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +66 -39
  277. package/src/client/components/settings/categories/connect-settings/DeviceTable.tsx +7 -4
  278. package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +14 -1
  279. package/src/client/components/settings/categories/project-settings/ProjectSharing.tsx +130 -0
  280. package/src/client/components/settings/categories/project-settings/SidebarList.tsx +5 -0
  281. package/src/client/components/settings/category-content.tsx +3 -0
  282. package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +3 -1
  283. package/src/client/components/workspace/chat-timeline/ComposerDockFrame.tsx +2 -1
  284. package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -1
  285. package/src/client/components/workspace/chat-timeline/SessionSkeleton.tsx +1 -1
  286. package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +1 -0
  287. package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +9 -2
  288. package/src/client/components/workspace/chat-timeline/chat-input/expansion.test.ts +1 -1
  289. package/src/client/components/workspace/chat-timeline/chat-input/expansion.ts +2 -1
  290. package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +34 -0
  291. package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
  292. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +4 -1
  293. package/src/client/components/workspace/editor/Tab.tsx +19 -26
  294. package/src/client/components/workspace/editor/Tabs.test.ts +13 -7
  295. package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -0
  296. package/src/client/components/workspace/git-panel/commit-modal/floating.test.ts +46 -0
  297. package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -0
  298. package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +4 -5
  299. package/src/client/components/workspace/panel-tabs/TabChip.tsx +40 -39
  300. package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +76 -58
  301. package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +9 -9
  302. package/src/client/components/workspace/panel-tabs/TabStrip.tsx +14 -1
  303. package/src/client/components/workspace/panel-tabs/index.tsx +1 -1
  304. package/src/client/components/workspace/plugin-panel/catalog.tsx +22 -5
  305. package/src/client/components/workspace/plugin-panel/chrome.test.tsx +89 -0
  306. package/src/client/components/workspace/plugin-panel/chrome.tsx +62 -0
  307. package/src/client/data/settings/omp-schema.json +40 -4
  308. package/src/client/floating-phone.test.ts +189 -0
  309. package/src/client/floating.css +205 -2
  310. package/src/client/floating.test.ts +43 -0
  311. package/src/client/glass.css +47 -0
  312. package/src/client/hooks/chat/omp/index.ts +6 -5
  313. package/src/client/hooks/chat/omp/prompt-send.test.ts +18 -0
  314. package/src/client/hooks/chat/omp/prompt-send.ts +26 -8
  315. package/src/client/hooks/chat/omp/session-list.tsx +20 -8
  316. package/src/client/hooks/chat/timeline/deferred-model.ts +13 -5
  317. package/src/client/hooks/chat/timeline/index.ts +2 -0
  318. package/src/client/hooks/chat/timeline/send-props.ts +14 -0
  319. package/src/client/hooks/chat/timeline/send-steer.test.ts +11 -2
  320. package/src/client/hooks/chat/timeline/send-switch.test.ts +92 -0
  321. package/src/client/hooks/chat/timeline/send.test-util.ts +37 -7
  322. package/src/client/hooks/chat/timeline/send.test.ts +11 -2
  323. package/src/client/hooks/chat/timeline/send.ts +62 -42
  324. package/src/client/hooks/editor/image-generation.ts +24 -0
  325. package/src/client/hooks/editor/resolve-viewer.test.ts +26 -20
  326. package/src/client/hooks/editor/resolve-viewer.ts +14 -5
  327. package/src/client/hooks/editor/use-file-editor.test.ts +34 -0
  328. package/src/client/hooks/editor/use-file-editor.ts +6 -2
  329. package/src/client/hooks/settings/accounts.ts +162 -0
  330. package/src/client/hooks/ui/auth.ts +58 -3
  331. package/src/client/hooks/ui/border-style.test.ts +5 -4
  332. package/src/client/hooks/ui/border-style.ts +3 -2
  333. package/src/client/hooks/ui/mobile-chrome-style.ts +68 -0
  334. package/src/client/hooks/ui/navbar-controls.test.ts +1 -2
  335. package/src/client/hooks/ui/navbar-controls.ts +0 -3
  336. package/src/client/hooks/ui/zoom-gesture.ts +104 -0
  337. package/src/client/lib/desktop/titlebar.test.ts +21 -0
  338. package/src/client/lib/desktop/titlebar.ts +34 -0
  339. package/src/client/lib/plugins/bootstrap.test.ts +20 -0
  340. package/src/client/lib/plugins/bootstrap.tsx +10 -15
  341. package/src/client/lib/plugins/kit-components.test.tsx +119 -0
  342. package/src/client/lib/plugins/kit-components.tsx +79 -0
  343. package/src/client/lib/plugins/kit.ts +8 -0
  344. package/src/client/lib/plugins/slots.test.ts +34 -0
  345. package/src/client/lib/plugins/slots.ts +31 -4
  346. package/src/client/lib/plugins/stylesheets.ts +10 -11
  347. package/src/client/lib/ui/pinch.test.ts +74 -0
  348. package/src/client/lib/ui/pinch.ts +104 -0
  349. package/src/client/lib/ui/safe-area.test.ts +25 -0
  350. package/src/client/lib/ui/safe-area.ts +23 -0
  351. package/src/client/main.tsx +8 -1
  352. package/src/client/tailwind.css +54 -1
  353. package/src/server/index.ts +2 -0
  354. package/src/server/lib/assets/shell-attributes.server.ts +12 -4
  355. package/src/server/lib/assets/shell-attributes.test.ts +19 -18
  356. package/src/server/lib/auth/client-address.test.ts +2 -2
  357. package/src/server/lib/auth/guard.test.ts +2 -2
  358. package/src/server/lib/auth/guard.ts +81 -97
  359. package/src/server/lib/auth/handover-guard.test.ts +1 -1
  360. package/src/server/lib/auth/rate-limit.test.ts +2 -2
  361. package/src/server/lib/auth/token.test.ts +1 -1
  362. package/src/server/lib/auth/workspace-gate.server.ts +34 -0
  363. package/src/server/lib/bundler/css.test.ts +16 -0
  364. package/src/server/lib/connect/devices.server.test.ts +12 -0
  365. package/src/server/lib/connect/devices.server.ts +63 -19
  366. package/src/server/lib/connect/pairing.server.ts +5 -3
  367. package/src/server/lib/connect/status.server.ts +2 -2
  368. package/src/server/lib/db/schema.test.ts +3 -3
  369. package/src/server/lib/db/schema.ts +6 -0
  370. package/src/server/lib/harness/update-spawn.server.test.ts +97 -0
  371. package/src/server/lib/harness/update-spawn.server.ts +10 -0
  372. package/src/server/lib/models/provider-icon-override.server.test.ts +140 -0
  373. package/src/server/lib/models/provider-icon-override.server.ts +197 -0
  374. package/src/server/lib/models/provider-icon-store.server.ts +8 -0
  375. package/src/server/lib/models/provider-icon.server.ts +31 -6
  376. package/src/server/lib/omp/session/artifacts.server.test.ts +11 -7
  377. package/src/server/lib/omp/session/artifacts.server.ts +21 -17
  378. package/src/server/lib/panels/build.server.ts +19 -2
  379. package/src/server/lib/panels/css.server.test.ts +141 -0
  380. package/src/server/lib/panels/css.server.ts +255 -0
  381. package/src/server/lib/panels/plugin-ui-contract.test.ts +64 -0
  382. package/src/server/lib/panels/registry-stylesheet.server.test.ts +69 -0
  383. package/src/server/lib/panels/scan.server.ts +13 -7
  384. package/src/server/lib/panels/source-warnings.server.test.ts +65 -0
  385. package/src/server/lib/panels/source-warnings.server.ts +71 -0
  386. package/src/server/lib/realtime/topics/catalog.server.ts +3 -0
  387. package/src/server/lib/realtime/topics.server.ts +14 -0
  388. package/src/server/lib/sessions/last-opened-client.server.ts +1 -1
  389. package/src/server/lib/workspace/access.server.ts +108 -0
  390. package/src/server/lib/workspace/project-patch.server.ts +4 -2
  391. package/src/server/lib/workspace/register-folder.server.ts +19 -5
  392. package/src/server/lib/workspace/session-access.server.ts +55 -0
  393. package/src/server/lib/workspace/tenancy-schema.server.ts +40 -0
  394. package/src/server/plugins/ssr.ts +19 -3
  395. package/src/server/routes/accounts/index.ts +8 -0
  396. package/src/server/routes/accounts/management.test.ts +174 -0
  397. package/src/server/routes/accounts/management.ts +166 -0
  398. package/src/server/routes/auth/login.ts +22 -8
  399. package/src/server/routes/auth/logout.ts +1 -1
  400. package/src/server/routes/auth/password.ts +40 -33
  401. package/src/server/routes/auth/revoke.test.ts +1 -1
  402. package/src/server/routes/auth/revoke.ts +26 -8
  403. package/src/server/routes/auth/routes.test.ts +3 -3
  404. package/src/server/routes/auth/state.ts +14 -7
  405. package/src/server/routes/connect/devices.ts +7 -4
  406. package/src/server/routes/connect/pair.ts +4 -3
  407. package/src/server/routes/connect/status.ts +4 -2
  408. package/src/server/routes/connect/tunnels.ts +2 -1
  409. package/src/server/routes/folders/batch-delete.ts +12 -0
  410. package/src/server/routes/folders/clone.ts +7 -2
  411. package/src/server/routes/folders/create.ts +3 -1
  412. package/src/server/routes/folders/folder.ts +44 -4
  413. package/src/server/routes/folders/index.ts +3 -0
  414. package/src/server/routes/folders/shares.ts +62 -0
  415. package/src/server/routes/index.ts +2 -0
  416. package/src/server/routes/panels/build.ts +1 -1
  417. package/src/server/routes/panels/css.test.ts +22 -0
  418. package/src/server/routes/panels/css.ts +5 -7
  419. package/src/server/routes/realtime/ws.ts +16 -1
  420. package/src/server/routes/sessions/list.ts +3 -2
  421. package/src/server/routes/settings/projects.ts +46 -7
  422. package/src/server/routes/settings/provider-icon.ts +18 -0
  423. package/src/shared/lib/chat/timeline/tool-render-mode.test.ts +2 -2
  424. package/src/shared/lib/chat/timeline/tool-render-mode.ts +6 -3
  425. package/src/shared/lib/icons/tint-hues.generated.ts +38 -37
  426. package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +27 -1
  427. package/src/shared/lib/omp/session/prewarm-misc.test.ts +1 -1
  428. package/src/shared/lib/realtime/protocol.ts +16 -0
  429. package/src/shared/lib/settings/defaults.ts +2 -1
  430. package/src/shared/lib/settings/sections.ts +1 -1
  431. package/src/shared/lib/theme/border-style.test.ts +11 -9
  432. package/src/shared/lib/theme/border-style.ts +7 -7
  433. package/src/shared/lib/theme/chrome-style.test.ts +15 -0
  434. package/src/shared/lib/theme/chrome-style.ts +16 -1
  435. package/src/shared/types/index.ts +1 -0
  436. package/src/shared/types/settings/state.ts +6 -5
  437. package/src/test-support/file-editor.test-util.ts +25 -6
  438. package/tsconfig.json +21 -0
  439. package/dist/client/static/js/ImageView-zf4kh5wp.js +0 -1
  440. package/dist/client/static/js/LayoutWrapper-dncbzcea.js +0 -2
  441. package/dist/client/static/js/MergeDiffView-btdx9yb9.js +0 -1
  442. package/dist/client/static/js/Modal-5cxfw2rv.js +0 -60
  443. package/dist/client/static/js/SessionsView-vbn0nvx4.js +0 -1
  444. package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +0 -1
  445. package/dist/client/static/js/bash-bcbct9gc.js +0 -1
  446. package/dist/client/static/js/c-fn9jz26e.js +0 -1
  447. package/dist/client/static/js/cpp-a1q64mke.js +0 -1
  448. package/dist/client/static/js/css-b92azee8.js +0 -1
  449. package/dist/client/static/js/css-sn00sq6v.js +0 -1
  450. package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +0 -1
  451. package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +0 -1
  452. package/dist/client/static/js/flowDiagram-KWPJA3E3-500fcx2a.js +0 -1
  453. package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +0 -1
  454. package/dist/client/static/js/graphql-8d8bn59j.js +0 -1
  455. package/dist/client/static/js/html-6hdrwtz2.js +0 -1
  456. package/dist/client/static/js/index-0kcnghxn.js +0 -4
  457. package/dist/client/static/js/index-2zhmmtye.js +0 -2
  458. package/dist/client/static/js/index-4vtc4xct.js +0 -481
  459. package/dist/client/static/js/index-5srvxsht.js +0 -2
  460. package/dist/client/static/js/index-6c1s0v4b.js +0 -1
  461. package/dist/client/static/js/index-cvm2ha01.js +0 -1
  462. package/dist/client/static/js/index-d11mbz2q.js +0 -4
  463. package/dist/client/static/js/index-fen0x3qh.js +0 -1
  464. package/dist/client/static/js/index-gwgh27h3.js +0 -314
  465. package/dist/client/static/js/index-hxy1sadd.js +0 -2
  466. package/dist/client/static/js/index-pg87cgpy.js +0 -2
  467. package/dist/client/static/js/index-q1a40v20.js +0 -3
  468. package/dist/client/static/js/index-qmvstmvh.js +0 -1
  469. package/dist/client/static/js/index-t6nqy2n5.css +0 -1
  470. package/dist/client/static/js/index-wf5j0009.js +0 -10
  471. package/dist/client/static/js/index-y6zbkh4p.js +0 -2
  472. package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +0 -1
  473. package/dist/client/static/js/ini-g6a5xsaw.js +0 -1
  474. package/dist/client/static/js/java-n596am4c.js +0 -1
  475. package/dist/client/static/js/javascript-zc1qnyyp.js +0 -1
  476. package/dist/client/static/js/json-7k70qbkj.js +0 -1
  477. package/dist/client/static/js/jsx-sndenqrc.js +0 -1
  478. package/dist/client/static/js/lua-djd3g9q5.js +0 -1
  479. package/dist/client/static/js/markdown-r2tpvxpn.js +0 -1
  480. package/dist/client/static/js/one-dark-pro-ckq5capv.js +0 -1
  481. package/dist/client/static/js/one-light-a908z398.js +0 -1
  482. package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +0 -1
  483. package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +0 -1
  484. package/dist/client/static/js/properties-brn72zdk.js +0 -1
  485. package/dist/client/static/js/python-g9mghwgm.js +0 -1
  486. package/dist/client/static/js/r-e247x4mw.js +0 -1
  487. package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +0 -1
  488. package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +0 -1
  489. package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +0 -1
  490. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +0 -1
  491. package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +0 -1
  492. package/dist/client/static/js/sql-0kar81jy.js +0 -1
  493. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-9gm67sq4.js +0 -8
  494. package/dist/client/static/js/timeline-definition-EJHVYXUP-xtvv4za2.js +0 -120
  495. package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +0 -1
  496. package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +0 -1
  497. package/dist/client/static/js/tsx-gjxfjnbk.js +0 -1
  498. package/dist/client/static/js/typescript-bm89v3gk.js +0 -1
  499. package/dist/client/static/js/vennDiagram-UO4OBE2U-56q0qs51.js +0 -34
  500. package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +0 -1
  501. package/dist/client/static/js/xml-b7824nx0.js +0 -1
  502. package/dist/client/static/js/yaml-kqqktdv1.js +0 -1
  503. package/src/server/lib/auth/client-address.ts +0 -89
  504. package/src/server/lib/auth/config.ts +0 -133
  505. package/src/server/lib/auth/rate-limit.ts +0 -146
  506. package/src/server/lib/auth/token.ts +0 -220
@@ -1,7 +1,7 @@
1
- import{t,l,en,Y,C,te,ne,F,z,j,U,H,W,q,Mo,rr,pl,Ae,ue,sA}from"./index-gwgh27h3.js";import{xa}from"./index-475dc6h9.js";function Rt(e,i,s){e=+e,i=+i,s=(a=arguments.length)<2?(i=e,e=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-e)/s))|0,h=Array(a);while(++n<a)h[n]=e+n*s;return h}function ct(){var e=rr().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,R=0,D=0.5;delete e.unknown;function _(){var y=i().length,B=a<n,L=B?a:n,E=B?n:a;if(h=(E-L)/Math.max(1,y-f+R*2),x)h=Math.floor(h);if(L+=(E-L-h*(y-f))*D,c=h*(1-f),x)L=Math.round(L),c=Math.round(c);var O=Rt(y).map(function(Z){return L+h*Z});return s(B?O.reverse():O)}return e.domain=function(y){return arguments.length?(i(y),_()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,_()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,_()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,_()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,R=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(R=+y,_()):R},e.align=function(y){return arguments.length?(D=Math.max(0,Math.min(1,y)),_()):D},e.copy=function(){return ct(i(),[n,a]).round(x).paddingInner(f).paddingOuter(R).align(D)},Mo.apply(_(),arguments)}var _t=function(){var e=t(function(G,r,g,d){for(g=g||{},d=G.length;d--;g[G[d]]=r);return g},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],h=[1,6],c=[1,7],x=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],R=[1,26],D=[1,28],_=[1,29],y=[1,30],B=[1,31],L=[1,32],E=[1,33],O=[1,34],Z=[1,35],tt=[1,36],w=[1,37],X=[1,43],u=[1,42],V=[1,47],N=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],it=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],I=[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],rt=[1,65],v=[26,28],k={trace:t(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:t(function(r,g,d,p,S,o,st){var m=o.length-1;switch(S){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:[e(i,s,{3:1,4:2,7:4,5:n,36:a,37:h,38:c}),{1:[3]},e(i,s,{4:2,7:4,3:8,5:n,36:a,37:h,38:c}),e(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:h,38:c}),{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]},e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{1:[2,1]},e(i,s,{4:2,7:4,3:21,5:n,36:a,37:h,38:c}),{1:[2,3]},e(x,[2,5]),e(i,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{11:39,13:38,24:X,29:u,30:f,31:40,32:41,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{11:45,15:44,29:V,30:f,35:46,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{11:49,17:48,24:N,30:f,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{11:52,17:51,24:N,30:f,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(it,[2,39],{41:55,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w}),e(it,[2,40]),e(it,[2,41]),e(I,[2,42]),e(I,[2,44]),e(I,[2,45]),e(I,[2,46]),e(I,[2,47]),e(I,[2,48]),e(I,[2,49]),e(I,[2,50]),e(I,[2,51]),e(I,[2,52]),e(I,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:X,29:u}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:V}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:N},{25:63,27:64,29:rt},e(A,[2,14]),{17:66,24:N},e(A,[2,16]),e(A,[2,17]),e(I,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(v,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:f,34:74,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:rt},e(v,[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:t(function(r,g){if(g.recoverable)this.trace(r);else{var d=Error(r);throw d.hash=g,d}},"parseError"),parse:t(function(r){var g=this,d=[0],p=[],S=[null],o=[],st=this.table,m="",xt=0,Vt=0,Ft=0,ge=2,Wt=1,de=o.slice.call(arguments,1),P=Object.create(this.lexer),nt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))nt.yy[wt]=this.yy[wt];if(P.setInput(r,nt.yy),nt.yy.lexer=P,nt.yy.parser=this,typeof P.yylloc>"u")P.yylloc={};var kt=P.yylloc;o.push(kt);var xe=P.options&&P.options.ranges;if(typeof nt.yy.parseError==="function")this.parseError=nt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function fe(K){d.length=d.length-2*K,S.length=S.length-K,o.length=o.length-K}t(fe,"popStack");function Xt(){var K=p.pop()||P.lex()||Wt;if(typeof K!=="number"){if(K instanceof Array)p=K,K=p.pop();K=g.symbols_[K]||K}return K}t(Xt,"lex");var M,At,at,Q,Me,Ct,ht={},ft,et,Nt,pt;while(!0){if(at=d[d.length-1],this.defaultActions[at])Q=this.defaultActions[at];else{if(M===null||typeof M>"u")M=Xt();Q=st[at]&&st[at][M]}if(typeof Q>"u"||!Q.length||!Q[0]){var St="";pt=[];for(ft in st[at])if(this.terminals_[ft]&&ft>ge)pt.push("'"+this.terminals_[ft]+"'");if(P.showPosition)St="Parse error on line "+(xt+1)+`:
1
+ import{t,l,tn,Y,C,te,ae,F,z,H,U,j,W,q,Po,ar,wl,he,ue,yA}from"./index-mgzbypt5.js";import{Ba}from"./index-rhmvh9w5.js";function Rt(e,i,s){e=+e,i=+i,s=(a=arguments.length)<2?(i=e,e=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-e)/s))|0,h=Array(a);while(++n<a)h[n]=e+n*s;return h}function ct(){var e=ar().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,R=0,D=0.5;delete e.unknown;function _(){var y=i().length,B=a<n,L=B?a:n,E=B?n:a;if(h=(E-L)/Math.max(1,y-f+R*2),x)h=Math.floor(h);if(L+=(E-L-h*(y-f))*D,c=h*(1-f),x)L=Math.round(L),c=Math.round(c);var O=Rt(y).map(function(Z){return L+h*Z});return s(B?O.reverse():O)}return e.domain=function(y){return arguments.length?(i(y),_()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,_()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,_()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,_()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,R=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(R=+y,_()):R},e.align=function(y){return arguments.length?(D=Math.max(0,Math.min(1,y)),_()):D},e.copy=function(){return ct(i(),[n,a]).round(x).paddingInner(f).paddingOuter(R).align(D)},Po.apply(_(),arguments)}var _t=function(){var e=t(function(G,r,g,d){for(g=g||{},d=G.length;d--;g[G[d]]=r);return g},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],h=[1,6],c=[1,7],x=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],R=[1,26],D=[1,28],_=[1,29],y=[1,30],B=[1,31],L=[1,32],E=[1,33],O=[1,34],Z=[1,35],tt=[1,36],w=[1,37],X=[1,43],u=[1,42],V=[1,47],N=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],it=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],I=[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],rt=[1,65],v=[26,28],k={trace:t(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:t(function(r,g,d,p,S,o,st){var m=o.length-1;switch(S){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:[e(i,s,{3:1,4:2,7:4,5:n,36:a,37:h,38:c}),{1:[3]},e(i,s,{4:2,7:4,3:8,5:n,36:a,37:h,38:c}),e(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:h,38:c}),{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]},e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{1:[2,1]},e(i,s,{4:2,7:4,3:21,5:n,36:a,37:h,38:c}),{1:[2,3]},e(x,[2,5]),e(i,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{11:39,13:38,24:X,29:u,30:f,31:40,32:41,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{11:45,15:44,29:V,30:f,35:46,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{11:49,17:48,24:N,30:f,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{11:52,17:51,24:N,30:f,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(it,[2,39],{41:55,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w}),e(it,[2,40]),e(it,[2,41]),e(I,[2,42]),e(I,[2,44]),e(I,[2,45]),e(I,[2,46]),e(I,[2,47]),e(I,[2,48]),e(I,[2,49]),e(I,[2,50]),e(I,[2,51]),e(I,[2,52]),e(I,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:X,29:u}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:V}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:N},{25:63,27:64,29:rt},e(A,[2,14]),{17:66,24:N},e(A,[2,16]),e(A,[2,17]),e(I,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(v,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:f,34:74,39:24,40:R,41:27,42:D,43:_,44:y,45:B,46:L,47:E,48:O,49:Z,50:tt,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:rt},e(v,[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:t(function(r,g){if(g.recoverable)this.trace(r);else{var d=Error(r);throw d.hash=g,d}},"parseError"),parse:t(function(r){var g=this,d=[0],p=[],S=[null],o=[],st=this.table,m="",xt=0,Vt=0,Ft=0,de=2,Wt=1,xe=o.slice.call(arguments,1),P=Object.create(this.lexer),nt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))nt.yy[wt]=this.yy[wt];if(P.setInput(r,nt.yy),nt.yy.lexer=P,nt.yy.parser=this,typeof P.yylloc>"u")P.yylloc={};var kt=P.yylloc;o.push(kt);var fe=P.options&&P.options.ranges;if(typeof nt.yy.parseError==="function")this.parseError=nt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function pe(K){d.length=d.length-2*K,S.length=S.length-K,o.length=o.length-K}t(pe,"popStack");function Xt(){var K=p.pop()||P.lex()||Wt;if(typeof K!=="number"){if(K instanceof Array)p=K,K=p.pop();K=g.symbols_[K]||K}return K}t(Xt,"lex");var M,At,at,Q,Me,Ct,ht={},ft,et,Nt,pt;while(!0){if(at=d[d.length-1],this.defaultActions[at])Q=this.defaultActions[at];else{if(M===null||typeof M>"u")M=Xt();Q=st[at]&&st[at][M]}if(typeof Q>"u"||!Q.length||!Q[0]){var St="";pt=[];for(ft in st[at])if(this.terminals_[ft]&&ft>de)pt.push("'"+this.terminals_[ft]+"'");if(P.showPosition)St="Parse error on line "+(xt+1)+`:
2
2
  `+P.showPosition()+`
3
- Expecting `+pt.join(", ")+", got '"+(this.terminals_[M]||M)+"'";else St="Parse error on line "+(xt+1)+": Unexpected "+(M==Wt?"end of input":"'"+(this.terminals_[M]||M)+"'");this.parseError(St,{text:P.match,token:this.terminals_[M]||M,line:P.yylineno,loc:kt,expected:pt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+at+", token: "+M);switch(Q[0]){case 1:if(d.push(M),S.push(P.yytext),o.push(P.yylloc),d.push(Q[1]),M=null,!At){if(Vt=P.yyleng,m=P.yytext,xt=P.yylineno,kt=P.yylloc,Ft>0)Ft--}else M=At,At=null;break;case 2:if(et=this.productions_[Q[1]][1],ht.$=S[S.length-et],ht._$={first_line:o[o.length-(et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(et||1)].first_column,last_column:o[o.length-1].last_column},xe)ht._$.range=[o[o.length-(et||1)].range[0],o[o.length-1].range[1]];if(Ct=this.performAction.apply(ht,[m,Vt,xt,nt.yy,Q[1],S,o].concat(de)),typeof Ct<"u")return Ct;if(et)d=d.slice(0,-1*et*2),S=S.slice(0,-1*et),o=o.slice(0,-1*et);d.push(this.productions_[Q[1]][0]),S.push(ht.$),o.push(ht._$),Nt=st[d[d.length-2]][d[d.length-1]],d.push(Nt);break;case 3:return!0}}return!0},"parse")},J=function(){var G={EOF:1,parseError:t(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw Error(g)},"parseError"),setInput:t(function(r,g){if(this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);if(g)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),r},"input"),unput:t(function(r){var g=r.length,d=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;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),d.length-1)this.yylineno-=d.length-1;var S=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:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[S[0],S[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+pt.join(", ")+", got '"+(this.terminals_[M]||M)+"'";else St="Parse error on line "+(xt+1)+": Unexpected "+(M==Wt?"end of input":"'"+(this.terminals_[M]||M)+"'");this.parseError(St,{text:P.match,token:this.terminals_[M]||M,line:P.yylineno,loc:kt,expected:pt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+at+", token: "+M);switch(Q[0]){case 1:if(d.push(M),S.push(P.yytext),o.push(P.yylloc),d.push(Q[1]),M=null,!At){if(Vt=P.yyleng,m=P.yytext,xt=P.yylineno,kt=P.yylloc,Ft>0)Ft--}else M=At,At=null;break;case 2:if(et=this.productions_[Q[1]][1],ht.$=S[S.length-et],ht._$={first_line:o[o.length-(et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(et||1)].first_column,last_column:o[o.length-1].last_column},fe)ht._$.range=[o[o.length-(et||1)].range[0],o[o.length-1].range[1]];if(Ct=this.performAction.apply(ht,[m,Vt,xt,nt.yy,Q[1],S,o].concat(xe)),typeof Ct<"u")return Ct;if(et)d=d.slice(0,-1*et*2),S=S.slice(0,-1*et),o=o.slice(0,-1*et);d.push(this.productions_[Q[1]][0]),S.push(ht.$),o.push(ht._$),Nt=st[d[d.length-2]][d[d.length-1]],d.push(Nt);break;case 3:return!0}}return!0},"parse")},J=function(){var G={EOF:1,parseError:t(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw Error(g)},"parseError"),setInput:t(function(r,g){if(this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);if(g)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),r},"input"),unput:t(function(r){var g=r.length,d=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;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),d.length-1)this.yylineno-=d.length-1;var S=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:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[S[0],S[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(r){this.unput(this.match.slice(r))},"less"),pastInput:t(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var r=this.match;if(r.length<20)r+=this._input.substr(0,20-r.length);return(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var r=this.pastInput(),g=Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
5
  `+g+"^"},"showPosition"),test_match:t(function(r,g){var d,p,S;if(this.options.backtrack_lexer){if(S={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)S.yylloc.range=this.yylloc.range.slice(0)}if(p=r[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+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],d=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(d)return d;else if(this._backtrack){for(var o in S)this[o]=S[o];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var r,g,d,p;if(!this._more)this.yytext="",this.match="";var S=this._currentRules();for(var o=0;o<S.length;o++)if(d=this._input.match(this.rules[S[o]]),d&&(!g||d[0].length>g[0].length)){if(g=d,p=o,this.options.backtrack_lexer)if(r=this.test_match(d,S[o]),r!==!1)return r;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(r=this.test_match(g,S[p]),r!==!1)return r;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,S){var o=S;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 G}();k.lexer=J;function T(){this.yy={}}return t(T,"Parser"),T.prototype=k,k.Parser=T,new T}();_t.parser=_t;var pe=_t;function mt(e){return e.type==="bar"}t(mt,"isBarPlot");function bt(e){return e.type==="band"}t(bt,"isBandAxisData");function lt(e){return e.type==="linear"}t(lt,"isLinearAxisData");var Pt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=sA(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},Yt=0.7,Ht=0.2,$t=class{constructor(e,i,s,n){this.axisConfig=e,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{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Yt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Yt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.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=Ht*e.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=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.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=Ht*e.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=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.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)e.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);e.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)e.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 e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.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)e.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);e.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)e.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 e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.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)e.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;e.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)e.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 e}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[]}},me=class extends $t{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=ct().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ct().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},be=class extends $t{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=xa().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=xa().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Tt(e,i,s,n){let a=new Pt(n);if(bt(e))return new me(i,s,e.categories,e.title,a);return new be(i,s,[e.min,e.max],e.title,a)}t(Tt,"getAxis");var ye=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(this.showChartTitle)e.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 e}};function Ut(e,i,s,n){let a=new Pt(n);return new ye(a,e,i,s)}t(Ut,"getChartTitleComponent");var we=0.75,ke=0.5,Ce=0.35;function Dt(e){return{fontSize:e,markerSize:e*we,markerSpacing:e*Ce,itemSpacing:e*ke}}t(Dt,"getLegendLayout");var Se=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.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}=Dt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;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:e,markerSize:i,markerSpacing:s,itemSpacing:n}=Dt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[R,D]of this.visiblePlots.entries())if(mt(D))x.push({x:h,y:c+R*a,width:i,height:i,fill:D.fill,strokeFill:D.fill,strokeWidth:0});else{let _=c+R*a+i/2;f.push({path:`M ${h},${_} L ${h+i},${_}`,strokeFill:D.strokeFill,strokeWidth:D.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((R,D)=>({text:R.title,x:h+i+s,y:c+D*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function qt(e,i,s,n){let a=new Pt(n);return new Se(a,e,i,s)}t(qt,"getChartLegendComponent");var Re=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=pl().y((n)=>n[0]).x((n)=>n[1])(e);else i=pl().x((n)=>n[0]).y((n)=>n[1])(e);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 h=[];for(let[c,[x,f]]of e.entries()){let R=this.plotData.pointLabels[c];if(!R)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:R,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:R,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},_e=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=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:e.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:e.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}))}]}},Te=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.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 e=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new Re(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new _e(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function Gt(e,i,s){return new Te(e,i,s)}t(Gt,"getPlotComponent");var De=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Ut(e,i,s,n),plot:Gt(e,i,s),legend:qt(e,i,s,n),xAxis:Tt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Tt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>mt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((R)=>mt(R)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},ve=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new De(e,i,s,n).getDrawableElement()}},gt=0,jt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=en(),i=C();return ue(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=C();return ue(Y.xyChart,e.xyChart)}t(It,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Mt,"getChartDefaultData");function ot(e){let i=C();return te(e.trim(),i)}t(ot,"textSanitizer");function Qt(e){jt=e}t(Qt,"setTmpSVGG");function Kt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Kt,"setOrientation");function Zt(e){b.xAxis.title=ot(e.text)}t(Zt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function Jt(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(Jt,"setXAxisBand");function ee(e){b.yAxis.title=ot(e.text)}t(ee,"setYAxisTitle");function ie(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(ie,"setYAxisRangeData");function se(e){let i=Math.min(...e),s=Math.max(...e),n=lt(b.yAxis)?b.yAxis.min:1/0,a=lt(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(se,"setYAxisRangeFromPlotData");function zt(e){let i=[];if(e.length===0)return i;if(!yt){let s=lt(b.xAxis)?b.xAxis.min:1/0,n=lt(b.xAxis)?b.xAxis.max:-1/0;Bt(Math.min(s,1),Math.max(n,e.length))}if(bt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Lt)se(e);if(bt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(lt(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(zt,"transformDataWithoutCategory");function Ot(e){return vt[e===0?0:e%vt.length]}t(Ot,"getPlotColorFromPalette");function ae(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?ot(c.label):""),a=zt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:ot(e.text),strokeFill:Ot(gt),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),gt++}t(ae,"setLineData");function oe(e,i){let s=i.map((a)=>a.value),n=zt(s);b.plots.push({type:"bar",title:ot(e.text),fill:Ot(gt),data:n}),gt++}t(oe,"setBarData");function re(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=q(),ve.build(ut,b,dt,jt)}t(re,"getDrawableElem");function he(){return dt}t(he,"getChartThemeConfig");function le(){return ut}t(le,"getChartConfig");function ce(){return b}t(ce,"getXYChartData");var Pe=t(function(){F(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Le={getDrawableElem:re,clear:Pe,setAccTitle:z,getAccTitle:j,setDiagramTitle:W,getDiagramTitle:q,getAccDescription:H,setAccDescription:U,setOrientation:Kt,setXAxisTitle:Zt,setXAxisRangeData:Bt,setXAxisBand:Jt,setYAxisTitle:ee,setYAxisRangeData:ie,setLineData:ae,setBarData:oe,setTmpSVGG:Qt,getChartThemeConfig:he,getChartConfig:le,getXYChartData:ce},Ee=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function R(w){return w==="left"?"start":w==="right"?"end":"middle"}t(R,"getTextAnchor");function D(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(D,"getTextTransformation"),l.debug(`Rendering xychart chart
7
- `+e);let _=Ae(i),y=_.append("g").attr("class","main"),B=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");ne(_,c.height,c.width,!0),_.attr("viewBox",`0 0 ${c.width} ${c.height}`),B.attr("fill",h.backgroundColor),a.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));let L=a.getDrawableElem(),E={};function O(w){let X=y,u="";for(let[V]of w.entries()){let N=y;if(V>0&&E[u])N=E[u];if(u+=w[V],X=E[u],!X)X=E[u]=N.append("g").attr("class",w[V])}return X}t(O,"getGroup");for(let w of L){if(w.data.length===0)continue;let X=O(w.groupTexts);switch(w.type){case"rect":if(X.selectAll("rect").data(w.data).enter().append("rect").attr("x",(u)=>u.x).attr("y",(u)=>u.y).attr("width",(u)=>u.width).attr("height",(u)=>u.height).attr("fill",(u)=>u.fill).attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth),c.showDataLabel){let u=c.showDataLabelOutsideBar;if(c.chartOrientation==="horizontal"){let V=function(k,J){let{data:T,label:G}=k;return J*G.length*N<=T.width-A};var Z=V;t(V,"fitsHorizontally");let N=0.7,A=10,it=w.data.map((k,J)=>({data:k,label:x[J].toString()})).filter((k)=>k.data.width>0&&k.data.height>0),I=it.map((k)=>{let{data:J}=k,T=J.height*0.7;while(!V(k,T)&&T>0)T-=1;return T}),rt=Math.floor(Math.min(...I)),v=t((k)=>{if(u)return k.data.x+k.data.width+A;else return k.data.x+k.data.width-A},"determineLabelXPosition");X.selectAll("text").data(it).enter().append("text").attr("x",v).attr("y",(k)=>k.data.y+k.data.height/2).attr("text-anchor",u?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${rt}px`).text((k)=>k.label)}else{let V=function(v,k,J){let{data:T,label:G}=v,r=0.7,g=k*G.length*0.7,d=T.x+T.width/2,p=d-g/2,S=d+g/2,o=p>=T.x&&S<=T.x+T.width,st=T.y+J+k<=T.y+T.height;return o&&st};var tt=V;t(V,"fitsInBar");let N=10,A=w.data.map((v,k)=>({data:v,label:x[k].toString()})).filter((v)=>v.data.width>0&&v.data.height>0),it=A.map((v)=>{let{data:k,label:J}=v,T=k.width/(J.length*0.7);while(!V(v,T,N)&&T>0)T-=1;return T}),I=Math.floor(Math.min(...it)),rt=t((v)=>{if(u)return v.data.y-N;else return v.data.y+N},"determineLabelYPosition");X.selectAll("text").data(A).enter().append("text").attr("x",(v)=>v.data.x+v.data.width/2).attr("y",rt).attr("text-anchor","middle").attr("dominant-baseline",u?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${I}px`).text((v)=>v.label)}}break;case"text":X.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(u)=>u.fill).attr("font-size",(u)=>u.fontSize).attr("dominant-baseline",(u)=>f(u.verticalPos)).attr("text-anchor",(u)=>R(u.horizontalPos)).attr("transform",(u)=>D(u)).text((u)=>u.text);break;case"path":X.selectAll("path").data(w.data).enter().append("path").attr("d",(u)=>u.path).attr("fill",(u)=>u.fill?u.fill:"none").attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth);break}}},"draw"),Ie={draw:Ee},Qe={parser:pe,db:Le,renderer:Ie};export{Qe as diagram};
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,S){var o=S;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 G}();k.lexer=J;function T(){this.yy={}}return t(T,"Parser"),T.prototype=k,k.Parser=T,new T}();_t.parser=_t;var me=_t;function mt(e){return e.type==="bar"}t(mt,"isBarPlot");function bt(e){return e.type==="band"}t(bt,"isBandAxisData");function lt(e){return e.type==="linear"}t(lt,"isLinearAxisData");var Pt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=yA(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},Yt=0.7,Ht=0.2,$t=class{constructor(e,i,s,n){this.axisConfig=e,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{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Yt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Yt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.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=Ht*e.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=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.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=Ht*e.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=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.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)e.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);e.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)e.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 e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.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)e.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);e.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)e.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 e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.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)e.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;e.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)e.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 e}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[]}},be=class extends $t{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=ct().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ct().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},ye=class extends $t{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=Ba().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=Ba().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Tt(e,i,s,n){let a=new Pt(n);if(bt(e))return new be(i,s,e.categories,e.title,a);return new ye(i,s,[e.min,e.max],e.title,a)}t(Tt,"getAxis");var we=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(this.showChartTitle)e.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 e}};function Ut(e,i,s,n){let a=new Pt(n);return new we(a,e,i,s)}t(Ut,"getChartTitleComponent");var ke=0.75,Ae=0.5,Ce=0.35;function Dt(e){return{fontSize:e,markerSize:e*ke,markerSpacing:e*Ce,itemSpacing:e*Ae}}t(Dt,"getLegendLayout");var Se=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.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}=Dt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;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:e,markerSize:i,markerSpacing:s,itemSpacing:n}=Dt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[R,D]of this.visiblePlots.entries())if(mt(D))x.push({x:h,y:c+R*a,width:i,height:i,fill:D.fill,strokeFill:D.fill,strokeWidth:0});else{let _=c+R*a+i/2;f.push({path:`M ${h},${_} L ${h+i},${_}`,strokeFill:D.strokeFill,strokeWidth:D.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((R,D)=>({text:R.title,x:h+i+s,y:c+D*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function qt(e,i,s,n){let a=new Pt(n);return new Se(a,e,i,s)}t(qt,"getChartLegendComponent");var Re=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=wl().y((n)=>n[0]).x((n)=>n[1])(e);else i=wl().x((n)=>n[0]).y((n)=>n[1])(e);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 h=[];for(let[c,[x,f]]of e.entries()){let R=this.plotData.pointLabels[c];if(!R)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:R,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:R,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},_e=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=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:e.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:e.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}))}]}},Te=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.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 e=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new Re(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new _e(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function Gt(e,i,s){return new Te(e,i,s)}t(Gt,"getPlotComponent");var De=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Ut(e,i,s,n),plot:Gt(e,i,s),legend:qt(e,i,s,n),xAxis:Tt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Tt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>mt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((R)=>mt(R)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},ve=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new De(e,i,s,n).getDrawableElement()}},gt=0,jt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=tn(),i=C();return ue(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=C();return ue(Y.xyChart,e.xyChart)}t(It,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Mt,"getChartDefaultData");function ot(e){let i=C();return te(e.trim(),i)}t(ot,"textSanitizer");function Qt(e){jt=e}t(Qt,"setTmpSVGG");function Kt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Kt,"setOrientation");function Zt(e){b.xAxis.title=ot(e.text)}t(Zt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function Jt(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(Jt,"setXAxisBand");function ee(e){b.yAxis.title=ot(e.text)}t(ee,"setYAxisTitle");function ie(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(ie,"setYAxisRangeData");function se(e){let i=Math.min(...e),s=Math.max(...e),n=lt(b.yAxis)?b.yAxis.min:1/0,a=lt(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(se,"setYAxisRangeFromPlotData");function zt(e){let i=[];if(e.length===0)return i;if(!yt){let s=lt(b.xAxis)?b.xAxis.min:1/0,n=lt(b.xAxis)?b.xAxis.max:-1/0;Bt(Math.min(s,1),Math.max(n,e.length))}if(bt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Lt)se(e);if(bt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(lt(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(zt,"transformDataWithoutCategory");function Ot(e){return vt[e===0?0:e%vt.length]}t(Ot,"getPlotColorFromPalette");function ne(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?ot(c.label):""),a=zt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:ot(e.text),strokeFill:Ot(gt),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),gt++}t(ne,"setLineData");function oe(e,i){let s=i.map((a)=>a.value),n=zt(s);b.plots.push({type:"bar",title:ot(e.text),fill:Ot(gt),data:n}),gt++}t(oe,"setBarData");function re(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=q(),ve.build(ut,b,dt,jt)}t(re,"getDrawableElem");function le(){return dt}t(le,"getChartThemeConfig");function ce(){return ut}t(ce,"getChartConfig");function ge(){return b}t(ge,"getXYChartData");var Pe=t(function(){F(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Le={getDrawableElem:re,clear:Pe,setAccTitle:z,getAccTitle:H,setDiagramTitle:W,getDiagramTitle:q,getAccDescription:j,setAccDescription:U,setOrientation:Kt,setXAxisTitle:Zt,setXAxisRangeData:Bt,setXAxisBand:Jt,setYAxisTitle:ee,setYAxisRangeData:ie,setLineData:ne,setBarData:oe,setTmpSVGG:Qt,getChartThemeConfig:le,getChartConfig:ce,getXYChartData:ge},Ee=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function R(w){return w==="left"?"start":w==="right"?"end":"middle"}t(R,"getTextAnchor");function D(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(D,"getTextTransformation"),l.debug(`Rendering xychart chart
7
+ `+e);let _=he(i),y=_.append("g").attr("class","main"),B=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");ae(_,c.height,c.width,!0),_.attr("viewBox",`0 0 ${c.width} ${c.height}`),B.attr("fill",h.backgroundColor),a.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));let L=a.getDrawableElem(),E={};function O(w){let X=y,u="";for(let[V]of w.entries()){let N=y;if(V>0&&E[u])N=E[u];if(u+=w[V],X=E[u],!X)X=E[u]=N.append("g").attr("class",w[V])}return X}t(O,"getGroup");for(let w of L){if(w.data.length===0)continue;let X=O(w.groupTexts);switch(w.type){case"rect":if(X.selectAll("rect").data(w.data).enter().append("rect").attr("x",(u)=>u.x).attr("y",(u)=>u.y).attr("width",(u)=>u.width).attr("height",(u)=>u.height).attr("fill",(u)=>u.fill).attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth),c.showDataLabel){let u=c.showDataLabelOutsideBar;if(c.chartOrientation==="horizontal"){let V=function(k,J){let{data:T,label:G}=k;return J*G.length*N<=T.width-A};var Z=V;t(V,"fitsHorizontally");let N=0.7,A=10,it=w.data.map((k,J)=>({data:k,label:x[J].toString()})).filter((k)=>k.data.width>0&&k.data.height>0),I=it.map((k)=>{let{data:J}=k,T=J.height*0.7;while(!V(k,T)&&T>0)T-=1;return T}),rt=Math.floor(Math.min(...I)),v=t((k)=>{if(u)return k.data.x+k.data.width+A;else return k.data.x+k.data.width-A},"determineLabelXPosition");X.selectAll("text").data(it).enter().append("text").attr("x",v).attr("y",(k)=>k.data.y+k.data.height/2).attr("text-anchor",u?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${rt}px`).text((k)=>k.label)}else{let V=function(v,k,J){let{data:T,label:G}=v,r=0.7,g=k*G.length*0.7,d=T.x+T.width/2,p=d-g/2,S=d+g/2,o=p>=T.x&&S<=T.x+T.width,st=T.y+J+k<=T.y+T.height;return o&&st};var tt=V;t(V,"fitsInBar");let N=10,A=w.data.map((v,k)=>({data:v,label:x[k].toString()})).filter((v)=>v.data.width>0&&v.data.height>0),it=A.map((v)=>{let{data:k,label:J}=v,T=k.width/(J.length*0.7);while(!V(v,T,N)&&T>0)T-=1;return T}),I=Math.floor(Math.min(...it)),rt=t((v)=>{if(u)return v.data.y-N;else return v.data.y+N},"determineLabelYPosition");X.selectAll("text").data(A).enter().append("text").attr("x",(v)=>v.data.x+v.data.width/2).attr("y",rt).attr("text-anchor","middle").attr("dominant-baseline",u?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${I}px`).text((v)=>v.label)}}break;case"text":X.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(u)=>u.fill).attr("font-size",(u)=>u.fontSize).attr("dominant-baseline",(u)=>f(u.verticalPos)).attr("text-anchor",(u)=>R(u.horizontalPos)).attr("transform",(u)=>D(u)).text((u)=>u.text);break;case"path":X.selectAll("path").data(w.data).enter().append("path").attr("d",(u)=>u.path).attr("fill",(u)=>u.fill?u.fill:"none").attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth);break}}},"draw"),Ie={draw:Ee},Qe={parser:me,db:Le,renderer:Ie};export{Qe as diagram};
@@ -0,0 +1 @@
1
+ import{IA}from"./index-sqzjwy9h.js";export{IA as default};
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "command-runner",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "private": true,
5
5
  "description": "Lists a repository's commands and runs them, in the foreground or as background jobs.",
6
6
  "type": "module",
7
7
  "kabmo": {
8
8
  "id": "command-runner",
9
9
  "name": "Runner",
10
- "version": "0.5.2",
10
+ "version": "0.6.0",
11
11
  "description": "Lists a repository's commands and runs them, in the foreground or as background jobs.",
12
12
  "app": "dist/app.js",
13
13
  "server": "dist/server.js",
@@ -44,7 +44,6 @@
44
44
  import { useCallback, useEffect, useRef, useState } from 'preact/hooks';
45
45
  import { definePluginApp } from '@kabmo-labs/kabmo-sdk/app';
46
46
  import {
47
- usePanelHost,
48
47
  usePanelInfo,
49
48
  usePluginId,
50
49
  useRealtime,
@@ -71,9 +70,6 @@ const NO_FLAGS: Record<string, boolean> = {};
71
70
  function CommandRunnerPanel() {
72
71
  const pluginId = usePluginId();
73
72
  const info = usePanelInfo();
74
- // The host's own "draw your header" flag: the phone's drawer renders its own
75
- // tab strip above the view, so a second header would name the same panel twice.
76
- const host = usePanelHost();
77
73
  const repo = useRepoScope();
78
74
  const list = useRpc<{ root: string; repo: string }, CommandListing>(RPC.list);
79
75
  const start = useRpc<Record<string, unknown>, { runId: string }>(RPC.start);
@@ -273,7 +269,6 @@ function CommandRunnerPanel() {
273
269
  background={background}
274
270
  logs={logs}
275
271
  scope={scope}
276
- showHeader={host.showHeader !== false}
277
272
  onToggleGroup={handleToggleGroup}
278
273
  onToggleBackground={handleToggleBackground}
279
274
  onRefresh={refresh}
@@ -300,6 +295,8 @@ export default definePluginApp((app) => {
300
295
  // VIEW: `Runner` here would read `Runner — Runner`.
301
296
  title: 'Commands',
302
297
  component: CommandRunnerPanel,
298
+ // The host draws the panel's title row, so every plugin's chrome matches.
299
+ chrome: 'host',
303
300
  // A command row plus its label and status needs room before it wraps.
304
301
  minWidth: 420,
305
302
  });
@@ -6,13 +6,12 @@
6
6
  /**
7
7
  * The add/edit dialog for a user's own command.
8
8
  *
9
- * ## Why the dialog shell is written here
9
+ * ## The shell is the host's
10
10
  *
11
- * Kabmo's own modals sit on `src/client/components/common/Modal.tsx`, and
12
- * a plugin bundle cannot import Kabmo source — `@/…` does not resolve in it.
13
- * So the shell is reproduced with the same classes and the same ARIA pair
14
- * (`role="dialog"` + `aria-modal`), which is what makes it read as one of the
15
- * app's dialogs to a screen reader rather than as a floating div.
11
+ * This used to reproduce Kabmo's modal markup because a plugin bundle cannot
12
+ * import the host's source. The kit's `Dialog` now renders the host's own shell
13
+ * through the service seam, so the scrim, focus trap, Escape handling and close
14
+ * button are the app's — not a copy that can drift.
16
15
  *
17
16
  * ## The two fields that decide what actually runs
18
17
  *
@@ -29,6 +28,7 @@
29
28
  */
30
29
 
31
30
  import { useEffect, useRef, useState } from 'preact/hooks';
31
+ import { Button, Dialog, Section } from '@kabmo-labs/kabmo-ui/components';
32
32
 
33
33
  import type { CustomCommand, CustomScope } from '../protocol';
34
34
 
@@ -78,21 +78,28 @@ export function CustomForm({ editing, root, defaultCwd, onCancel, onSubmit, erro
78
78
  ? 'This workspace has no root to scope the command to.'
79
79
  : null;
80
80
 
81
+ const footer = (
82
+ <div className="px-5 py-3 border-t border-ink/10 flex items-center justify-end gap-2 flex-shrink-0">
83
+ <Button onClick={onCancel}>Cancel</Button>
84
+ <Button
85
+ type="submit"
86
+ variant="primary"
87
+ disabled={reason !== null}
88
+ title={reason ?? (editing ? 'Save this command' : 'Add this command')}
89
+ >
90
+ {editing ? 'Save' : 'Add'}
91
+ </Button>
92
+ </div>
93
+ );
94
+
81
95
  return (
82
- <div
83
- className="fixed inset-0 bg-ink/40 backdrop-blur-[2px] z-[60] flex items-center justify-center p-4"
84
- style={{
85
- paddingTop: 'max(1rem, env(safe-area-inset-top, 0px))',
86
- paddingBottom: 'max(1rem, env(safe-area-inset-bottom, 0px))',
87
- }}
88
- onClick={onCancel}
89
- >
90
- <form
91
- role="dialog"
92
- aria-modal="true"
93
- aria-label={editing ? 'Edit command' : 'Add command'}
94
- onClick={(event) => event.stopPropagation()}
95
- onSubmit={(event) => {
96
+ <Dialog
97
+ title={editing ? 'Edit command' : 'Add command'}
98
+ onClose={onCancel}
99
+ maxWidthClass="max-w-md"
100
+ form={{
101
+ className: 'flex flex-col gap-3',
102
+ onSubmit: (event) => {
96
103
  event.preventDefault();
97
104
  if (reason) return;
98
105
  onSubmit({
@@ -101,14 +108,11 @@ export function CustomForm({ editing, root, defaultCwd, onCancel, onSubmit, erro
101
108
  cwd: cwd.trim() || '.',
102
109
  previousId: editing?.id ?? null,
103
110
  });
104
- }}
105
- className="bg-paper border border-ink/15 rounded-xl shadow-2xl w-full max-w-md max-h-full flex flex-col overflow-hidden text-ink"
106
- >
107
- <div className="px-5 py-4 border-b border-ink/10 flex-shrink-0">
108
- <h2 className="text-sm font-semibold text-ink">{editing ? 'Edit command' : 'Add command'}</h2>
109
- </div>
110
-
111
- <div className="px-5 py-4 flex flex-col gap-3 min-h-0 overflow-y-auto scrollbar-overlay-container">
111
+ },
112
+ }}
113
+ footer={footer}
114
+ >
115
+ <div className="px-5 py-4 flex flex-col gap-3">
112
116
  <label className="flex flex-col gap-1">
113
117
  <span className="text-[10px] uppercase font-mono text-ink/40">Command</span>
114
118
  <input
@@ -125,8 +129,7 @@ export function CustomForm({ editing, root, defaultCwd, onCancel, onSubmit, erro
125
129
  <span className="text-[11px] text-ink/50">Runs through `sh -c`, so pipes and `&amp;&amp;` work.</span>
126
130
  </label>
127
131
 
128
- <fieldset className="flex flex-col gap-1">
129
- <legend className="text-[10px] uppercase font-mono text-ink/40">Available in</legend>
132
+ <Section legend="Available in" className="gap-1">
130
133
  {/* Native radios, not buttons with `aria-pressed`: a mutually
131
134
  exclusive choice is what a radio group IS, and the platform then
132
135
  gives arrow-key navigation, one Tab stop and the right
@@ -150,7 +153,7 @@ export function CustomForm({ editing, root, defaultCwd, onCancel, onSubmit, erro
150
153
  onSelect={() => setScope('global')}
151
154
  />
152
155
  </div>
153
- </fieldset>
156
+ </Section>
154
157
 
155
158
  <label className="flex flex-col gap-1">
156
159
  <span className="text-[10px] uppercase font-mono text-ink/40">Directory</span>
@@ -166,27 +169,7 @@ export function CustomForm({ editing, root, defaultCwd, onCancel, onSubmit, erro
166
169
 
167
170
  {error ? <p className="text-[11px] text-error">{error}</p> : null}
168
171
  </div>
169
-
170
- <div className="px-5 py-3 border-t border-ink/10 flex items-center justify-end gap-2 flex-shrink-0">
171
- <button
172
- type="button"
173
- onClick={onCancel}
174
- className="px-3 py-1.5 text-xs rounded border border-ink/15 text-ink hover:bg-ink/5 transition-colors cursor-pointer"
175
- >
176
- Cancel
177
- </button>
178
- <button
179
- type="submit"
180
- disabled={reason !== null}
181
- title={reason ?? (editing ? 'Save this command' : 'Add this command')}
182
- className="px-3 py-1.5 text-xs rounded border border-ink bg-ink text-canvas hover:opacity-90 transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-default"
183
- >
184
- {editing ? 'Save' : 'Add'}
185
- </button>
186
- </div>
187
-
188
- </form>
189
- </div>
172
+ </Dialog>
190
173
  );
191
174
  }
192
175
 
@@ -32,6 +32,7 @@
32
32
  * workspace seen for the first time shows its commands rather than hiding them.
33
33
  */
34
34
 
35
+ import { IconButton } from '@kabmo-labs/kabmo-ui/components';
35
36
  import { useId } from 'preact/hooks';
36
37
 
37
38
  import { CommandRow } from './Row';
@@ -141,15 +142,15 @@ function CommandGroupSection({
141
142
  </span>
142
143
  ) : null}
143
144
  {onAdd ? (
144
- <button
145
- type="button"
145
+ <IconButton
146
+ ariaLabel="Add your own command"
146
147
  onClick={onAdd}
147
148
  title="Add your own command"
148
- aria-label="Add your own command"
149
- className="ml-auto flex-shrink-0 p-1 rounded text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer"
149
+ size="sm"
150
+ className="ml-auto"
150
151
  >
151
152
  <Glyph path={ICON.plus} />
152
- </button>
153
+ </IconButton>
153
154
  ) : null}
154
155
  </div>
155
156
  ) : (
@@ -4,73 +4,37 @@
4
4
  */
5
5
 
6
6
  /**
7
- * The panel's header: its name, then the scope.
7
+ * The panel's toolbar: the shared repo scope and a rescan.
8
8
  *
9
- * Kabmo's panels open with a title row (`h-10 px-3 border-b`), and this
10
- * one had none — it started straight at the repo picker, so the view was the only
11
- * one in the right panel that never said what it was. The title takes the same
12
- * treatment `TerminalHeader` gives its own (`text-xs font-semibold tracking-wider
13
- * uppercase`) so the two read as the same kind of thing.
14
- *
15
- * `showHeader` is the host's own flag, and it is honoured for the reason the
16
- * terminal honours it: the phone's drawer draws its own tab strip above the view,
17
- * so a header here would be a second one naming the same panel.
18
- *
19
- * The rescan sits at the trailing edge of the title row rather than beside the
20
- * picker, because it acts on the WHOLE listing — every group — not on the repo
21
- * the picker just set.
9
+ * The title row is the HOST's (`chrome: 'host'`), so this file no longer draws
10
+ * one. The rescan sits beside the picker because it acts on the WHOLE listing —
11
+ * every group — not on the repo the picker just set.
22
12
  */
23
13
 
24
14
  import { RepoPicker, type RepoScopeHandle } from '@kabmo-labs/kabmo-ui';
15
+ import { IconButton, PanelToolbar } from '@kabmo-labs/kabmo-ui/components';
25
16
 
26
17
  import { Glyph, ICON } from './Glyph';
27
18
 
28
19
  export interface PanelHeaderProps {
29
20
  /** The shared nested-repo scope, from `useRepoScope()`. */
30
21
  scope: RepoScopeHandle;
31
- /** False in the phone's drawer, which draws its own tab strip. */
32
- showHeader: boolean;
33
22
  onRefresh: () => void;
34
23
  }
35
24
 
36
- export function PanelHeader({ scope, showHeader, onRefresh }: PanelHeaderProps) {
37
- if (!showHeader) {
38
- // Without the title row the picker still has to be reachable, so it stays —
39
- // one compact row, which is what the drawer's own chrome expects.
40
- return (
41
- <div className="flex items-center gap-2 px-2 py-1.5 border-b border-ink/10 flex-shrink-0">
42
- <RepoPicker scope={scope} className="min-w-0" />
43
- <button
44
- type="button"
45
- onClick={onRefresh}
46
- title="Rescan this repository"
47
- aria-label="Rescan this repository"
48
- className="ml-auto px-1.5 py-0.5 rounded text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer"
49
- >
50
- <Glyph path={ICON.refresh} />
51
- </button>
52
- </div>
53
- );
54
- }
55
-
25
+ export function PanelHeader({ scope, onRefresh }: PanelHeaderProps) {
56
26
  return (
57
- <div className="h-10 px-3 border-b border-ink/10 bg-paper flex items-center justify-between flex-shrink-0 select-none">
58
- <div className="flex items-center space-x-1.5 min-w-0">
59
- <Glyph path={ICON.runner} size={14} />
60
- <span className="text-xs font-semibold tracking-wider text-ink uppercase">Command Runner</span>
61
- </div>
62
- <div className="flex items-center space-x-1 min-w-0">
63
- <RepoPicker scope={scope} className="min-w-0" />
64
- <button
65
- type="button"
66
- onClick={onRefresh}
67
- title="Rescan this repository"
68
- aria-label="Rescan this repository"
69
- className="p-1 rounded text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer"
70
- >
71
- <Glyph path={ICON.refresh} />
72
- </button>
73
- </div>
74
- </div>
27
+ <PanelToolbar>
28
+ <RepoPicker scope={scope} className="min-w-0" />
29
+ <IconButton
30
+ ariaLabel="Rescan this repository"
31
+ onClick={onRefresh}
32
+ title="Rescan this repository"
33
+ size="sm"
34
+ className="ml-auto"
35
+ >
36
+ <Glyph path={ICON.refresh} />
37
+ </IconButton>
38
+ </PanelToolbar>
75
39
  );
76
40
  }
@@ -41,6 +41,7 @@
41
41
  * the old tail is gone, and the new run's output is what the reader asked for.
42
42
  */
43
43
 
44
+ import { Button } from '@kabmo-labs/kabmo-ui/components';
44
45
  import { useLayoutEffect, useRef } from 'preact/hooks';
45
46
 
46
47
  import type { RunLog, RunSummary } from '../protocol';
@@ -120,14 +121,9 @@ export function RunOutput({ run, log, onStop }: RunOutputProps) {
120
121
  <span className="ml-auto">{formatBytes(bytes)}</span>
121
122
  )}
122
123
  {run.status === 'running' ? (
123
- <button
124
- type="button"
125
- onClick={() => onStop(run.id)}
126
- title={`Stop ${run.label}`}
127
- className="px-1.5 rounded border border-error/40 text-error hover:bg-error/10 transition-colors cursor-pointer"
128
- >
124
+ <Button variant="danger" size="xs" onClick={() => onStop(run.id)} title={`Stop ${run.label}`}>
129
125
  Stop
130
- </button>
126
+ </Button>
131
127
  ) : null}
132
128
  </div>
133
129