@kabmo-labs/kabmo 0.57.0 → 0.58.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 (525) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +523 -506
  3. package/dist/client/static/js/Body-karkrzkc.js +3 -0
  4. package/dist/client/static/js/{CsvGrid-t84xmbk9.js → CsvGrid-j03knmbe.js} +2 -2
  5. package/dist/client/static/js/{DocxView-4jda3szm.js → DocxView-e8408vzs.js} +2 -2
  6. package/dist/client/static/js/{DrawioView-9qvvtnvt.js → DrawioView-fj4mfzch.js} +2 -2
  7. package/dist/client/static/js/{HtmlPreview-4pba1ys5.js → HtmlPreview-9g8xwzgw.js} +1 -1
  8. package/dist/client/static/js/ImageView-sz4fzz9k.js +1 -0
  9. package/dist/client/static/js/LayoutWrapper-q6q4h04a.js +2 -0
  10. package/dist/client/static/js/MergeDiffView-b8f013ws.js +1 -0
  11. package/dist/client/static/js/Modal-ahecatp5.js +60 -0
  12. package/dist/client/static/js/{PdfView-sny55sne.js → PdfView-8jtdx5hd.js} +1 -1
  13. package/dist/client/static/js/SessionsView-jwp8xvw5.js +1 -0
  14. package/dist/client/static/js/{SheetView-ezqak2b4.js → SheetView-hwx8s864.js} +11 -11
  15. package/dist/client/static/js/{SvgPreview-q1cvdf4s.js → SvgPreview-ete36nzv.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-ftm2qwa3.js → abnfDiagram-O67JEVCF-7nsqzz6z.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-dc7zys46.js +1 -0
  18. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-j8kqfzmf.js → architectureDiagram-NJMV4G6O-xvpkfq2f.js} +11 -11
  19. package/dist/client/static/js/{astro-asmathwv.js → astro-rsrqgjjx.js} +1 -1
  20. package/dist/client/static/js/bash-n5d0esqg.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-m3zpsp9h.js → blockDiagram-BEXU5L5S-0saahcs6.js} +7 -7
  22. package/dist/client/static/js/c-pk766wx0.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-myshvbrx.js → c4Diagram-YGBWAQC7-ktpqnb4a.js} +2 -2
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-s0cwmsj4.js → classDiagram-v2-NBCMYWYE-x67cz3ms.js} +5 -5
  25. package/dist/client/static/js/{cose-bilkent-JH36ORCC-t5t02sfr.js → cose-bilkent-JH36ORCC-9wzmhkz8.js} +1 -1
  26. package/dist/client/static/js/cpp-3pt91jvm.js +1 -0
  27. package/dist/client/static/js/css-sp1cgdbr.js +1 -0
  28. package/dist/client/static/js/cynefin-OW5HDTMX-9fx59e89.js +1 -0
  29. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-6yxd72sh.js → cynefinDiagram-VND7K2PF-dmmgmv99.js} +2 -2
  30. package/dist/client/static/js/{dagre-6A5THRUB-vft5103m.js → dagre-6A5THRUB-ygkkms1t.js} +2 -2
  31. package/dist/client/static/js/{diagram-22UHCM2B-yy2jfvxt.js → diagram-22UHCM2B-qxj0pqb4.js} +14 -14
  32. package/dist/client/static/js/{diagram-3UASUU5V-1xqhzq20.js → diagram-3UASUU5V-77k8w5dt.js} +1 -1
  33. package/dist/client/static/js/{diagram-ATOU4E4O-f11cxgvm.js → diagram-ATOU4E4O-m0h86vf4.js} +3 -3
  34. package/dist/client/static/js/{diagram-CDSNMT55-gqmkfcp7.js → diagram-CDSNMT55-5v28kaeg.js} +5 -5
  35. package/dist/client/static/js/{diagram-MLGK6HIB-1fg7304a.js → diagram-MLGK6HIB-zgcg9gaz.js} +2 -2
  36. package/dist/client/static/js/{diagram-MPIPVDR6-mem80369.js → diagram-MPIPVDR6-10c9s6e6.js} +2 -2
  37. package/dist/client/static/js/{dockerfile-jarjwxp9.js → dockerfile-dr9sdsqp.js} +1 -1
  38. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-4rcbvfrj.js → ebnfDiagram-ZINNZB2B-mz4022dz.js} +1 -1
  39. package/dist/client/static/js/{elixir-7q2k61zb.js → elixir-3dy25ex8.js} +1 -1
  40. package/dist/client/static/js/{elk-276RUBZZ-ykd0stxz.js → elk-276RUBZZ-ccerbsag.js} +1 -1
  41. package/dist/client/static/js/{erDiagram-OPXOYQCR-b2th9bk4.js → erDiagram-OPXOYQCR-a8vjyrrw.js} +5 -5
  42. package/dist/client/static/js/{erlang-tjsd7n4d.js → erlang-v7344938.js} +1 -1
  43. package/dist/client/static/js/eventmodeling-NTZA5JFV-61d2ee91.js +1 -0
  44. package/dist/client/static/js/flowDiagram-KWPJA3E3-104ywb7w.js +1 -0
  45. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-64p5r7cx.js → ganttDiagram-FUAMR5RP-sz1g29fp.js} +4 -4
  46. package/dist/client/static/js/gitGraph-4MIJSDKK-zkb30q0t.js +1 -0
  47. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-z3yc333r.js → gitGraphDiagram-X574FWY7-efqk42q0.js} +15 -15
  48. package/dist/client/static/js/graphql-2ntm7jyh.js +1 -0
  49. package/dist/client/static/js/html-mt2yb43b.js +1 -0
  50. package/dist/client/static/js/{index-w659dhe5.js → index-2a0b9ya2.js} +1 -1
  51. package/dist/client/static/js/index-2f6psebk.js +2 -0
  52. package/dist/client/static/js/{index-j9y4tjk0.js → index-3m1dksmy.js} +2 -2
  53. package/dist/client/static/js/{index-668fc1df.js → index-3p732mvs.js} +2 -2
  54. package/dist/client/static/js/{index-3x88t8g9.js → index-3ymw778n.js} +2 -2
  55. package/dist/client/static/js/{index-rbkvw2xs.js → index-5tp3emtg.js} +2 -2
  56. package/dist/client/static/js/{index-h4qmywn5.js → index-6ac860yz.js} +2 -2
  57. package/dist/client/static/js/{index-77wznmg5.js → index-6ey6y9em.js} +2 -2
  58. package/dist/client/static/js/index-6h46r2de.js +1 -0
  59. package/dist/client/static/js/index-6qqsy78z.js +1 -0
  60. package/dist/client/static/js/{index-25zpywv7.js → index-6x0kn8pb.js} +2 -2
  61. package/dist/client/static/js/{index-dxx49b9m.js → index-7ma44af3.js} +3 -3
  62. package/dist/client/static/js/index-7s4dge1z.js +1 -0
  63. package/dist/client/static/js/{index-my856e49.js → index-7ynf3s2w.js} +2 -2
  64. package/dist/client/static/js/index-8aqjj2x2.js +1 -0
  65. package/dist/client/static/js/index-bkwax812.js +1 -0
  66. package/dist/client/static/js/{index-60g0e74a.js → index-dqf0srrp.js} +2 -2
  67. package/dist/client/static/js/{index-mdmtxh1c.js → index-dz18nn65.js} +2 -2
  68. package/dist/client/static/js/{index-5m0se6fk.js → index-e42ys2q3.js} +7 -7
  69. package/dist/client/static/js/{index-wxs0x3g1.js → index-ewryzs4g.js} +2 -2
  70. package/dist/client/static/js/{index-t415df0c.js → index-f31c6jg8.js} +22 -22
  71. package/dist/client/static/js/index-f44k9k8d.css +1 -0
  72. package/dist/client/static/js/{index-nnqyew8n.js → index-fhtnvqgf.js} +2 -2
  73. package/dist/client/static/js/{index-396g4zz4.js → index-gaa39w5q.js} +2 -2
  74. package/dist/client/static/js/{index-hmjb96kb.js → index-gqsnyh8k.js} +2 -2
  75. package/dist/client/static/js/index-gw4c5n3a.js +2 -0
  76. package/dist/client/static/js/index-j863hg0d.js +9 -0
  77. package/dist/client/static/js/{index-e4yj4kbe.js → index-jnxmvxb8.js} +12 -12
  78. package/dist/client/static/js/{index-0prwdwyb.js → index-jxsha63v.js} +2 -2
  79. package/dist/client/static/js/index-k1576e2m.js +2 -0
  80. package/dist/client/static/js/index-k4qshngy.js +4 -0
  81. package/dist/client/static/js/{index-3x3nhs8n.js → index-k56patms.js} +2 -2
  82. package/dist/client/static/js/{index-8pqx5n2p.js → index-kc5yt2cd.js} +2 -2
  83. package/dist/client/static/js/index-mkp3gwag.js +1 -0
  84. package/dist/client/static/js/{index-q9gbwqbe.js → index-nzq51nbb.js} +7 -7
  85. package/dist/client/static/js/{index-c2vc6znd.js → index-q5q8a3qn.js} +2 -2
  86. package/dist/client/static/js/{index-g71wn1pr.js → index-qbqm3c91.js} +5 -5
  87. package/dist/client/static/js/{index-sw370sk7.js → index-qkcmspxq.js} +2 -2
  88. package/dist/client/static/js/index-r1wrke3j.js +1 -0
  89. package/dist/client/static/js/index-rr79n77k.js +470 -0
  90. package/dist/client/static/js/{index-y1j18rha.js → index-rxt8sf9a.js} +2 -2
  91. package/dist/client/static/js/{index-6m5n8b6w.js → index-ssepzdaz.js} +6 -6
  92. package/dist/client/static/js/{index-rsyqf691.js → index-sxag9ptg.js} +2 -2
  93. package/dist/client/static/js/{index-k57bandz.js → index-t71k3b28.js} +2 -2
  94. package/dist/client/static/js/index-tc07gd33.js +2 -0
  95. package/dist/client/static/js/{index-m6eh5g1q.js → index-tdg7hz80.js} +2 -2
  96. package/dist/client/static/js/{index-nt17ejrm.js → index-th61y26d.js} +2 -2
  97. package/dist/client/static/js/{index-ebnd5hnr.js → index-tnxp90ac.js} +1 -1
  98. package/dist/client/static/js/{index-ms80nne4.js → index-tq3t3qm4.js} +2 -2
  99. package/dist/client/static/js/index-ts8rhd06.js +1 -0
  100. package/dist/client/static/js/{index-xtrsvm0d.js → index-v8xhgfeq.js} +2 -2
  101. package/dist/client/static/js/{index-n71ffk62.js → index-vb5a3g01.js} +4 -4
  102. package/dist/client/static/js/{index-bwwgtesb.js → index-ver116ed.js} +1 -1
  103. package/dist/client/static/js/{index-hge0y4vn.js → index-vf01q99d.js} +2 -2
  104. package/dist/client/static/js/{index-wgcgshdh.js → index-w5j1wgcz.js} +1 -1
  105. package/dist/client/static/js/{index-cwwg7k5f.js → index-wnk9k57k.js} +27 -27
  106. package/dist/client/static/js/{index-2gf593e3.js → index-x7h04xzf.js} +2 -2
  107. package/dist/client/static/js/{index-kbaffwp1.js → index-xfyxmaj1.js} +85 -85
  108. package/dist/client/static/js/index-xygk0v3e.js +2 -0
  109. package/dist/client/static/js/{index-kt7c42n7.js → index-y0f3wbc3.js} +2 -2
  110. package/dist/client/static/js/index-zh550byg.js +2 -0
  111. package/dist/client/static/js/info-A6RAGUB7-xxvyt8p8.js +1 -0
  112. package/dist/client/static/js/{infoDiagram-VRGFBTTK-59xq3n1b.js → infoDiagram-VRGFBTTK-rykcacj5.js} +1 -1
  113. package/dist/client/static/js/ini-bdk46a3d.js +1 -0
  114. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-v18q4qt7.js → ishikawaDiagram-OU5B5YK6-rj752kd8.js} +3 -3
  115. package/dist/client/static/js/java-3g3925cf.js +1 -0
  116. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-etazj0p8.js → journeyDiagram-ZHPQQLJL-mtetwn6f.js} +5 -5
  117. package/dist/client/static/js/json-hdyzmffz.js +1 -0
  118. package/dist/client/static/js/jsx-y8r9mrdq.js +1 -0
  119. package/dist/client/static/js/{julia-d18zhpyp.js → julia-mxe3pnz3.js} +1 -1
  120. package/dist/client/static/js/{kanban-definition-PNTS6WVX-ph15e5p2.js → kanban-definition-PNTS6WVX-4h5pw5mm.js} +3 -3
  121. package/dist/client/static/js/lua-wf5k6p3r.js +1 -0
  122. package/dist/client/static/js/markdown-9bf16dx7.js +1 -0
  123. package/dist/client/static/js/{mermaid.core-7ygd161b.js → mermaid.core-bs542jma.js} +8 -8
  124. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-j5xsftrf.js → mindmap-definition-NLK3R4M7-67s4xy7h.js} +5 -5
  125. package/dist/client/static/js/one-dark-pro-541ed4b7.js +1 -0
  126. package/dist/client/static/js/one-light-nr79mykt.js +1 -0
  127. package/dist/client/static/js/packet-AYTQ26CC-cm8jeesg.js +1 -0
  128. package/dist/client/static/js/{pegDiagram-GJSIUBJH-09nvb70v.js → pegDiagram-GJSIUBJH-qykb6ssk.js} +1 -1
  129. package/dist/client/static/js/{perl-sns2qvmf.js → perl-a8eeaqkn.js} +1 -1
  130. package/dist/client/static/js/{php-3q6v9eey.js → php-6gq92zt8.js} +1 -1
  131. package/dist/client/static/js/pie-WAS4IAKB-8b9xgcxv.js +1 -0
  132. package/dist/client/static/js/{pieDiagram-5QR66LMP-6ymh1960.js → pieDiagram-5QR66LMP-mymrrvck.js} +2 -2
  133. package/dist/client/static/js/properties-xk4dn00p.js +1 -0
  134. package/dist/client/static/js/python-7sgz05n4.js +1 -0
  135. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-hk61avw2.js → quadrantDiagram-O4NWA36T-6f8ahd40.js} +6 -6
  136. package/dist/client/static/js/r-w4qxm0pv.js +1 -0
  137. package/dist/client/static/js/radar-RG4KPBEZ-fxr2x2mf.js +1 -0
  138. package/dist/client/static/js/railroad-74A4TZTK-5qd45xk1.js +1 -0
  139. package/dist/client/static/js/railroad-abnf-HS5TGJTU-6fa00vpk.js +1 -0
  140. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pcbtg7tj.js +1 -0
  141. package/dist/client/static/js/railroad-peg-WCYAUIDC-r0fdhdtp.js +1 -0
  142. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-3jvqrfnb.js → railroadDiagram-XR7U4H2S-c3habpvw.js} +1 -1
  143. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-zthfj48k.js → requirementDiagram-PLB6GJNP-nysqy6te.js} +12 -12
  144. package/dist/client/static/js/{ruby-f9k99tfq.js → ruby-mc826p2e.js} +1 -1
  145. package/dist/client/static/js/{rust-q7n7q6dy.js → rust-m4f4vpvn.js} +1 -1
  146. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-nh5d6xte.js → sankeyDiagram-IPEJSGJF-s5dtfp3z.js} +4 -4
  147. package/dist/client/static/js/{sass-2syegq28.js → sass-8bq5r2tz.js} +1 -1
  148. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-crej9b40.js → sequenceDiagram-PO4LG4MO-bb3yp049.js} +21 -21
  149. package/dist/client/static/js/{sizeCapture-INFHLROL-nvvxw58j.js → sizeCapture-INFHLROL-0m2msee7.js} +1 -1
  150. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-e6tztjnj.js → stateDiagram-v2-GCMORJYK-cd0qgj6t.js} +3 -3
  151. package/dist/client/static/js/{svelte-mm3jfpje.js → svelte-5vrwkc13.js} +1 -1
  152. package/dist/client/static/js/{swimlanes-2SLR337P-xhdqjqmf.js → swimlanes-2SLR337P-rpb01f7p.js} +1 -1
  153. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-zx36y2c8.js +8 -0
  154. package/dist/client/static/js/{timeline-definition-EJHVYXUP-9cve31zc.js → timeline-definition-EJHVYXUP-tqw2e6y1.js} +5 -5
  155. package/dist/client/static/js/treeView-Q6P3EWNA-9sn2h4ea.js +1 -0
  156. package/dist/client/static/js/treemap-WGGIJYW6-9fzms0pq.js +1 -0
  157. package/dist/client/static/js/tsx-h5yzg80q.js +1 -0
  158. package/dist/client/static/js/typescript-qy1sbhea.js +1 -0
  159. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-asycstwe.js → usecaseDiagram-POWQR4AR-dhf4d5xg.js} +41 -41
  160. package/dist/client/static/js/{vennDiagram-UO4OBE2U-gbzk6era.js → vennDiagram-UO4OBE2U-ztkk79dv.js} +7 -7
  161. package/dist/client/static/js/{vue-e8e3q3hj.js → vue-gmjnxjm3.js} +1 -1
  162. package/dist/client/static/js/wardley-WFR3VGLG-vy6rp5gp.js +1 -0
  163. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-1swwfszr.js → wardleyDiagram-VNRHLVJA-ahre5tmv.js} +5 -5
  164. package/dist/client/static/js/xml-mrk4xakv.js +1 -0
  165. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-v7qkwv0b.js → xychartDiagram-PMCCYNJV-vak2c50n.js} +6 -6
  166. package/dist/client/static/js/yaml-xaza6dra.js +1 -0
  167. package/package.json +6 -6
  168. package/src/client/bootstrap.d.ts +11 -0
  169. package/src/client/borders.css +3 -4
  170. package/src/client/components/auth/login-screen/index.tsx +1 -1
  171. package/src/client/components/common/ComposerPicker.tsx +1 -1
  172. package/src/client/components/common/CopyButton.tsx +1 -1
  173. package/src/client/components/common/FolderPicker.tsx +1 -1
  174. package/src/client/components/common/SubagentStatusIcon.tsx +2 -2
  175. package/src/client/components/common/ViewportSelector.tsx +2 -2
  176. package/src/client/components/common/batch-selection/BatchActionBar.tsx +1 -1
  177. package/src/client/components/common/batch-selection/BatchDeleteModal.tsx +4 -4
  178. package/src/client/components/common/checkbox/style.ts +1 -1
  179. package/src/client/components/common/context-usage-button/McpSection.tsx +3 -2
  180. package/src/client/components/common/file-icon/index.tsx +3 -3
  181. package/src/client/components/common/harness-glyph/index.tsx +4 -3
  182. package/src/client/components/common/image-viewer/fullscreen.tsx +1 -1
  183. package/src/client/components/common/image-viewer/index.tsx +2 -2
  184. package/src/client/components/common/markdown-review/ReviewPopover.tsx +2 -2
  185. package/src/client/components/common/markdown-review/ReviewSummary.tsx +3 -3
  186. package/src/client/components/common/plugin-render-boundary/index.tsx +1 -1
  187. package/src/client/components/common/server-control/Panel.tsx +1 -1
  188. package/src/client/components/common/server-control/Row.tsx +3 -3
  189. package/src/client/components/common/session-actions-menu/MenuItem.tsx +2 -2
  190. package/src/client/components/common/session-branch/SubagentRow.tsx +1 -1
  191. package/src/client/components/common/session-delete-modal/index.tsx +4 -4
  192. package/src/client/components/common/session-row/StatusSlot.tsx +1 -1
  193. package/src/client/components/common/session-row/index.tsx +40 -2
  194. package/src/client/components/common/session-row/session-row.test.tsx +46 -3
  195. package/src/client/components/common/shell-update-button/Modal.tsx +1 -1
  196. package/src/client/components/common/todo-row/index.tsx +1 -1
  197. package/src/client/components/common/window-controls/index.tsx +1 -1
  198. package/src/client/components/common/workspace-options-menu/index.tsx +4 -4
  199. package/src/client/components/layout/session-sidebar/Toolbar.tsx +2 -2
  200. package/src/client/components/layout/session-sidebar/WorktreeBadge.tsx +1 -1
  201. package/src/client/components/layout/session-sidebar/about-modal/UpdateLogDialog.tsx +1 -1
  202. package/src/client/components/layout/session-sidebar/about-modal/UpdateSection.tsx +3 -3
  203. package/src/client/components/layout/session-sidebar/about-modal/index.tsx +1 -1
  204. package/src/client/components/layout/session-sidebar/modern/FilterChips.tsx +1 -1
  205. package/src/client/components/layout/session-sidebar/new-workspace-modal/DirectoryList.tsx +2 -2
  206. package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +1 -1
  207. package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +1 -1
  208. package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +1 -1
  209. package/src/client/components/layout/session-sidebar/scheduler-modal/TaskList.tsx +4 -4
  210. package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +1 -1
  211. package/src/client/components/layout/update-popup/Actions.tsx +1 -1
  212. package/src/client/components/mobile/mobile-right-sidebar/Action.tsx +1 -1
  213. package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +3 -3
  214. package/src/client/components/mobile/mobile-right-sidebar/MissingFileBanner.tsx +2 -2
  215. package/src/client/components/mobile/mobile-right-sidebar/PreviewScroller.tsx +2 -2
  216. package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +2 -2
  217. package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +3 -3
  218. package/src/client/components/settings/Modal.tsx +8 -3
  219. package/src/client/components/settings/SettingsSidebarList.tsx +2 -2
  220. package/src/client/components/settings/Sidebar.tsx +3 -3
  221. package/src/client/components/settings/apply-side-effects.test.ts +46 -0
  222. package/src/client/components/settings/apply-side-effects.ts +8 -0
  223. package/src/client/components/settings/categories/BehaviorSettings.tsx +1 -1
  224. package/src/client/components/settings/categories/OmpSettings.tsx +3 -3
  225. package/src/client/components/settings/categories/UsageSettings.tsx +3 -3
  226. package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +5 -5
  227. package/src/client/components/settings/categories/appearance-settings/CustomThemeEditor.tsx +177 -0
  228. package/src/client/components/settings/categories/appearance-settings/CustomThemeSection.test.tsx +136 -0
  229. package/src/client/components/settings/categories/appearance-settings/CustomThemeSection.tsx +180 -0
  230. package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +1 -1
  231. package/src/client/components/settings/categories/appearance-settings/ThemeGrid.tsx +6 -5
  232. package/src/client/components/settings/categories/appearance-settings/ThemePreview.tsx +106 -0
  233. package/src/client/components/settings/categories/appearance-settings/ThemeSection.tsx +7 -3
  234. package/src/client/components/settings/categories/behavior-settings/Editor.tsx +1 -1
  235. package/src/client/components/settings/categories/chat-settings/ToolRenderSection.tsx +1 -1
  236. package/src/client/components/settings/categories/command-settings/DetailPane.tsx +4 -4
  237. package/src/client/components/settings/categories/dictation-settings/ExternalSection.tsx +1 -1
  238. package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +1 -1
  239. package/src/client/components/settings/categories/git-settings/IdentitySection.tsx +2 -2
  240. package/src/client/components/settings/categories/harness-settings/AccountLoginPanel.tsx +3 -3
  241. package/src/client/components/settings/categories/harness-settings/AccountsPanel.tsx +13 -83
  242. package/src/client/components/settings/categories/harness-settings/HarnessImportControls.tsx +1 -1
  243. package/src/client/components/settings/categories/mcp-settings/ConnectionTest.tsx +1 -1
  244. package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +5 -5
  245. package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +1 -1
  246. package/src/client/components/settings/categories/mcp-settings/KeyValueSection.tsx +1 -1
  247. package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +2 -2
  248. package/src/client/components/settings/categories/omp-settings/ConfigTabs.tsx +4 -4
  249. package/src/client/components/settings/categories/omp-settings/OrderedChips.tsx +1 -1
  250. package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +3 -3
  251. package/src/client/components/settings/categories/omp-settings/RoleEditor.tsx +2 -2
  252. package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +2 -2
  253. package/src/client/components/settings/categories/panel-plugins/GitFreshness.tsx +2 -2
  254. package/src/client/components/settings/categories/panel-plugins/InstallForm.tsx +3 -3
  255. package/src/client/components/settings/categories/panel-plugins/InstalledList.tsx +1 -1
  256. package/src/client/components/settings/categories/panel-plugins/Meta.tsx +1 -1
  257. package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +5 -5
  258. package/src/client/components/settings/categories/panel-plugins/ReadmeModal.tsx +1 -1
  259. package/src/client/components/settings/categories/panel-plugins/Registries.tsx +4 -4
  260. package/src/client/components/settings/categories/panel-plugins/Section.tsx +3 -3
  261. package/src/client/components/settings/categories/panel-plugins/SettingsModal.tsx +2 -2
  262. package/src/client/components/settings/categories/panel-plugins/SyncBlockedNotice.tsx +2 -2
  263. package/src/client/components/settings/categories/panel-plugins/Toolbar.tsx +1 -1
  264. package/src/client/components/settings/categories/plugin-settings/DetailPane.tsx +2 -2
  265. package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +4 -4
  266. package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +1 -1
  267. package/src/client/components/settings/categories/plugin-settings/SidebarList.tsx +4 -4
  268. package/src/client/components/settings/categories/project-settings/AddProjectModal.tsx +1 -1
  269. package/src/client/components/settings/categories/project-settings/DeleteProjectModal.tsx +3 -3
  270. package/src/client/components/settings/categories/project-settings/DetailsHeader.tsx +1 -1
  271. package/src/client/components/settings/categories/project-settings/IconGrid.tsx +3 -3
  272. package/src/client/components/settings/categories/project-settings/SidebarList.tsx +1 -1
  273. package/src/client/components/settings/categories/project-settings/WorktreeSettings.tsx +2 -2
  274. package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +3 -3
  275. package/src/client/components/settings/categories/provider-settings/AddProviderModal.tsx +2 -2
  276. package/src/client/components/settings/categories/provider-settings/AuthSection.tsx +3 -3
  277. package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +3 -3
  278. package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +1 -1
  279. package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +2 -2
  280. package/src/client/components/settings/categories/provider-settings/LoginModal.tsx +2 -2
  281. package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +3 -3
  282. package/src/client/components/settings/categories/provider-settings/ModelCapabilitiesModal.tsx +1 -1
  283. package/src/client/components/settings/categories/provider-settings/PriceFields.tsx +1 -1
  284. package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +1 -1
  285. package/src/client/components/settings/categories/skill-catalog/SkillCard.tsx +1 -1
  286. package/src/client/components/settings/categories/skill-catalog/SourceRail.tsx +1 -1
  287. package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +7 -7
  288. package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +1 -1
  289. package/src/client/components/settings/categories/skill-settings/SidebarList.tsx +2 -2
  290. package/src/client/components/settings/categories/usage-settings/ProviderCard.tsx +1 -1
  291. package/src/client/components/settings/categories/usage-settings/SavedResetsSection.tsx +2 -2
  292. package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +1 -1
  293. package/src/client/components/settings/categories/usage-settings/TokenHarborCard.tsx +1 -1
  294. package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +2 -2
  295. package/src/client/components/settings/categories/voice-settings/speech/EngineSection.tsx +5 -5
  296. package/src/client/components/settings/categories/voice-settings/speech/ModelsSection.tsx +4 -4
  297. package/src/client/components/workspace/browser-panel/ActivityToasts.tsx +2 -2
  298. package/src/client/components/workspace/browser-panel/EngineNotice.tsx +1 -1
  299. package/src/client/components/workspace/browser-panel/index.tsx +2 -2
  300. package/src/client/components/workspace/browser-toolbar/clusters.tsx +2 -2
  301. package/src/client/components/workspace/btw-panel/Messages.tsx +2 -2
  302. package/src/client/components/workspace/btw-panel/TopicMenu.tsx +1 -1
  303. package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +1 -1
  304. package/src/client/components/workspace/chat-timeline/ChangedFilesSummary.tsx +7 -7
  305. package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +2 -2
  306. package/src/client/components/workspace/chat-timeline/IrcNotice.tsx +2 -2
  307. package/src/client/components/workspace/chat-timeline/MessageItem.tsx +3 -3
  308. package/src/client/components/workspace/chat-timeline/OrchestrationNotice.tsx +5 -5
  309. package/src/client/components/workspace/chat-timeline/QueueList.tsx +1 -1
  310. package/src/client/components/workspace/chat-timeline/SubagentControls.tsx +1 -1
  311. package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +5 -5
  312. package/src/client/components/workspace/chat-timeline/TaskResultContent.tsx +1 -1
  313. package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +1 -1
  314. package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +1 -1
  315. package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +2 -2
  316. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +1 -1
  317. package/src/client/components/workspace/chat-timeline/chat-input/ComposerNotice.tsx +2 -2
  318. package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +1 -1
  319. package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +11 -11
  320. package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +3 -3
  321. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +2 -2
  322. package/src/client/components/workspace/chat-timeline/chat-input/VoiceNotice.tsx +1 -1
  323. package/src/client/components/workspace/chat-timeline/chat-input/props.ts +3 -3
  324. package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +1 -1
  325. package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +2 -2
  326. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormAsk.tsx +1 -1
  327. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormDialog.tsx +1 -1
  328. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionCard.tsx +2 -2
  329. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/SwipeDeck.tsx +7 -7
  330. package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/ApprovalBody.tsx +1 -1
  331. package/src/client/components/workspace/chat-timeline/tool-renderers/hashline-patch/index.tsx +3 -3
  332. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/AstEdit.tsx +5 -5
  333. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +9 -9
  334. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Debug.tsx +5 -5
  335. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Edit.tsx +5 -5
  336. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Eval.tsx +6 -6
  337. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/FileMatches.tsx +2 -2
  338. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Github.tsx +7 -7
  339. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Goal.tsx +5 -5
  340. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/GoalRecord.tsx +5 -5
  341. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Lsp.tsx +9 -9
  342. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ManageSkill.tsx +3 -3
  343. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.tsx +8 -8
  344. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Resolve.tsx +3 -3
  345. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SecurityScan.tsx +6 -6
  346. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/TaskResult.tsx +2 -2
  347. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Todo.tsx +1 -1
  348. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +7 -7
  349. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +1 -1
  350. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.tsx +2 -2
  351. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/EnvelopeHeader.tsx +3 -3
  352. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolCardShell.tsx +4 -4
  353. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolFactChips.tsx +5 -5
  354. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +1 -1
  355. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.ts +10 -8
  356. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/status-glyph.tsx +3 -3
  357. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label.test.ts +37 -0
  358. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label.ts +17 -1
  359. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +50 -21
  360. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +21 -17
  361. package/src/client/components/workspace/context-panel/RawJsonViewer.tsx +2 -2
  362. package/src/client/components/workspace/diff-panel/ConflictBanner.tsx +3 -3
  363. package/src/client/components/workspace/diff-panel/Toolbar.tsx +3 -3
  364. package/src/client/components/workspace/diff-panel/index.tsx +3 -3
  365. package/src/client/components/workspace/diff-panel/toolbar-git-actions.tsx +1 -1
  366. package/src/client/components/workspace/editor/ConflictStrip.tsx +2 -2
  367. package/src/client/components/workspace/editor/ExternalChangeStrip.tsx +2 -2
  368. package/src/client/components/workspace/editor/FilePane.tsx +6 -6
  369. package/src/client/components/workspace/editor/FindWidget.tsx +2 -2
  370. package/src/client/components/workspace/editor/GoToLineModal.tsx +1 -1
  371. package/src/client/components/workspace/editor/SaveAsModal.tsx +3 -3
  372. package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +2 -2
  373. package/src/client/components/workspace/editor/StatusBar.tsx +1 -1
  374. package/src/client/components/workspace/editor/Tabs.test.ts +3 -3
  375. package/src/client/components/workspace/editor/Tabs.tsx +6 -6
  376. package/src/client/components/workspace/editor/Toolbar.tsx +4 -4
  377. package/src/client/components/workspace/editor/toolbar-clusters.tsx +1 -1
  378. package/src/client/components/workspace/editor/viewers/DataGrid.tsx +1 -1
  379. package/src/client/components/workspace/editor/viewers/GridToolbar.tsx +2 -2
  380. package/src/client/components/workspace/editor/viewers/SheetView.tsx +2 -2
  381. package/src/client/components/workspace/editor/viewers/ViewerError.tsx +2 -2
  382. package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +1 -1
  383. package/src/client/components/workspace/file-explorer/ContextMenu.tsx +3 -3
  384. package/src/client/components/workspace/file-explorer/Modals.tsx +3 -3
  385. package/src/client/components/workspace/file-explorer/RowLabel.test.tsx +2 -2
  386. package/src/client/components/workspace/git-panel/BranchToolbar.tsx +2 -2
  387. package/src/client/components/workspace/git-panel/ChangesList.tsx +3 -3
  388. package/src/client/components/workspace/git-panel/ConflictItem.tsx +3 -3
  389. package/src/client/components/workspace/git-panel/FileItem.tsx +1 -1
  390. package/src/client/components/workspace/git-panel/Modals.tsx +1 -1
  391. package/src/client/components/workspace/git-panel/OperationBar.tsx +4 -4
  392. package/src/client/components/workspace/git-panel/StashSection.tsx +1 -1
  393. package/src/client/components/workspace/git-panel/TreeItem.tsx +2 -2
  394. package/src/client/components/workspace/git-panel/branch-modal/BranchRow.tsx +2 -2
  395. package/src/client/components/workspace/git-panel/branch-modal/DeleteDialog.tsx +2 -2
  396. package/src/client/components/workspace/git-panel/branch-modal/index.tsx +2 -2
  397. package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +31 -76
  398. package/src/client/components/workspace/model-dropdown/Item.tsx +2 -2
  399. package/src/client/components/workspace/model-dropdown/Panel.tsx +15 -9
  400. package/src/client/components/workspace/model-dropdown/Section.tsx +1 -1
  401. package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +12 -83
  402. package/src/client/components/workspace/model-dropdown/index.tsx +2 -2
  403. package/src/client/components/workspace/model-dropdown/picker-close.test.tsx +16 -2
  404. package/src/client/components/workspace/plan-panel/PageView.tsx +2 -2
  405. package/src/client/components/workspace/plan-panel/index.tsx +2 -2
  406. package/src/client/components/workspace/plugin-panel/Error.tsx +1 -1
  407. package/src/client/components/workspace/repo-picker/Modal.tsx +3 -3
  408. package/src/client/components/workspace/repo-picker/Row.tsx +5 -5
  409. package/src/client/components/workspace/search-panel/Body.tsx +2 -2
  410. package/src/client/components/workspace/terminal-panel/Header.tsx +3 -3
  411. package/src/client/components/workspace/terminal-panel/KeyBar.tsx +2 -2
  412. package/src/client/components/workspace/terminal-panel/QuickActions.tsx +1 -1
  413. package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +1 -1
  414. package/src/client/components/workspace/terminal-panel/index.tsx +1 -1
  415. package/src/client/components/workspace/usage-panel/index.tsx +3 -3
  416. package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +1 -1
  417. package/src/client/components/workspace/wiki-panel/PageView.tsx +2 -2
  418. package/src/client/components/workspace/wiki-panel/index.tsx +2 -2
  419. package/src/client/components/workspace/worktree-modal/index.tsx +1 -1
  420. package/src/client/data/settings/omp-schema.json +27 -7
  421. package/src/client/hooks/chat/timeline/session-harness.ts +2 -1
  422. package/src/client/hooks/editor/use-unload-guard.tsx +2 -2
  423. package/src/client/hooks/models/use-harness-accounts-panel.ts +142 -0
  424. package/src/client/hooks/ui/border-style.test.ts +1 -2
  425. package/src/client/hooks/ui/theme.ts +23 -2
  426. package/src/client/main.tsx +7 -1
  427. package/src/client/tailwind-contrast.test.ts +22 -7
  428. package/src/client/tailwind.css +115 -18
  429. package/src/server/lib/assets/theme-css.server.test.ts +31 -1
  430. package/src/server/lib/assets/theme-css.server.ts +15 -1
  431. package/src/server/lib/dictation/capability.server.test.ts +9 -6
  432. package/src/server/lib/dictation/worker-process.ts +9 -2
  433. package/src/server/lib/harness/accounts.test.ts +5 -3
  434. package/src/server/lib/harness/acp/acp-todos.test.ts +23 -0
  435. package/src/server/lib/omp/session/delete.server.ts +4 -0
  436. package/src/server/lib/realtime/topics/session-data.server.ts +63 -1
  437. package/src/server/lib/realtime/topics/session-data.test.ts +154 -0
  438. package/src/server/lib/tray/runtime.server.ts +5 -0
  439. package/src/server/plugins/ssr.ts +16 -4
  440. package/src/server/routes/settings/root.ts +11 -0
  441. package/src/server/routes/settings/settings-store-routes.test.ts +37 -0
  442. package/src/shared/lib/chat/timeline/block-chrome.ts +2 -2
  443. package/src/shared/lib/chat/todo/flat-list.test.ts +81 -0
  444. package/src/shared/lib/chat/todo/flat-list.ts +29 -0
  445. package/src/shared/lib/chat/todo/parser.ts +7 -53
  446. package/src/shared/lib/chat/todo/progress.test.ts +3 -3
  447. package/src/shared/lib/chat/todo/progress.ts +3 -3
  448. package/src/shared/lib/fs/git-status.test.ts +22 -22
  449. package/src/shared/lib/fs/git-status.ts +31 -31
  450. package/src/shared/lib/icons/icon-paint-authority.ts +5 -4
  451. package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +20 -3
  452. package/src/shared/lib/settings/defaults.ts +1 -0
  453. package/src/shared/lib/theme/catalog.test.ts +42 -0
  454. package/src/shared/lib/theme/catalog.ts +66 -11
  455. package/src/shared/lib/theme/css.ts +25 -1
  456. package/src/shared/lib/theme/custom.test.ts +156 -0
  457. package/src/shared/lib/theme/custom.ts +260 -0
  458. package/src/shared/lib/theme/ink-scale.test.ts +83 -2
  459. package/src/shared/lib/theme/ink-scale.ts +74 -9
  460. package/src/shared/lib/theme/shell-palette.ts +3 -3
  461. package/src/shared/lib/theme/theme.test.ts +28 -13
  462. package/src/shared/types/settings/state.ts +11 -3
  463. package/tsconfig.json +6 -0
  464. package/dist/client/static/js/Body-k96gtstv.js +0 -3
  465. package/dist/client/static/js/ImageView-0gf5xdsv.js +0 -1
  466. package/dist/client/static/js/LayoutWrapper-pwbq5syv.js +0 -2
  467. package/dist/client/static/js/MergeDiffView-m4jkr786.js +0 -1
  468. package/dist/client/static/js/Modal-yjszc3vy.js +0 -60
  469. package/dist/client/static/js/SessionsView-q3800n83.js +0 -1
  470. package/dist/client/static/js/architecture-7GRP2DOG-3hkq8grc.js +0 -1
  471. package/dist/client/static/js/bash-n7wcmq3s.js +0 -1
  472. package/dist/client/static/js/c-20y64hcp.js +0 -1
  473. package/dist/client/static/js/cpp-ty6n0dg9.js +0 -1
  474. package/dist/client/static/js/css-ncvxaxt0.js +0 -1
  475. package/dist/client/static/js/cynefin-OW5HDTMX-9m18e6m5.js +0 -1
  476. package/dist/client/static/js/eventmodeling-NTZA5JFV-d4egnv9v.js +0 -1
  477. package/dist/client/static/js/flowDiagram-KWPJA3E3-f3bdtc1z.js +0 -1
  478. package/dist/client/static/js/gitGraph-4MIJSDKK-grqv890n.js +0 -1
  479. package/dist/client/static/js/graphql-6rwdfcnf.js +0 -1
  480. package/dist/client/static/js/html-p76eszt9.js +0 -1
  481. package/dist/client/static/js/index-1mm7kyjd.js +0 -1
  482. package/dist/client/static/js/index-3w18s59k.js +0 -9
  483. package/dist/client/static/js/index-ep353yxd.js +0 -2
  484. package/dist/client/static/js/index-ewtv8gg7.js +0 -1
  485. package/dist/client/static/js/index-gr07t5c4.js +0 -2
  486. package/dist/client/static/js/index-jd2h5tvh.js +0 -2
  487. package/dist/client/static/js/index-k6wms0kx.js +0 -1
  488. package/dist/client/static/js/index-k9v6477a.js +0 -1
  489. package/dist/client/static/js/index-mv83hpva.js +0 -1
  490. package/dist/client/static/js/index-nr5gwny1.js +0 -470
  491. package/dist/client/static/js/index-rqpbva78.js +0 -2
  492. package/dist/client/static/js/index-taz2nfym.css +0 -1
  493. package/dist/client/static/js/index-x6945djv.js +0 -1
  494. package/dist/client/static/js/index-y5mf2w81.js +0 -1
  495. package/dist/client/static/js/index-y69cbdvd.js +0 -2
  496. package/dist/client/static/js/index-y6qtx68e.js +0 -1
  497. package/dist/client/static/js/index-yktwxghr.js +0 -2
  498. package/dist/client/static/js/index-zj65csnm.js +0 -4
  499. package/dist/client/static/js/info-A6RAGUB7-rzpg7qk1.js +0 -1
  500. package/dist/client/static/js/ini-kjcpgebh.js +0 -1
  501. package/dist/client/static/js/java-0bcyv1jt.js +0 -1
  502. package/dist/client/static/js/json-xha2drny.js +0 -1
  503. package/dist/client/static/js/jsx-8p6dqgpq.js +0 -1
  504. package/dist/client/static/js/lua-njwwdj4s.js +0 -1
  505. package/dist/client/static/js/markdown-8gbyxxjd.js +0 -1
  506. package/dist/client/static/js/one-dark-pro-4s2rr12v.js +0 -1
  507. package/dist/client/static/js/one-light-3bkk59ww.js +0 -1
  508. package/dist/client/static/js/packet-AYTQ26CC-eac14hsq.js +0 -1
  509. package/dist/client/static/js/pie-WAS4IAKB-a9xqvysf.js +0 -1
  510. package/dist/client/static/js/properties-d5bwhgwz.js +0 -1
  511. package/dist/client/static/js/python-fdwwjjhh.js +0 -1
  512. package/dist/client/static/js/r-4d2ygtfj.js +0 -1
  513. package/dist/client/static/js/radar-RG4KPBEZ-jv2pm0fe.js +0 -1
  514. package/dist/client/static/js/railroad-74A4TZTK-j74sc0b6.js +0 -1
  515. package/dist/client/static/js/railroad-abnf-HS5TGJTU-eaf19baz.js +0 -1
  516. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d4j5nq31.js +0 -1
  517. package/dist/client/static/js/railroad-peg-WCYAUIDC-ba862a9p.js +0 -1
  518. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-hbwg3m3k.js +0 -8
  519. package/dist/client/static/js/treeView-Q6P3EWNA-e8yb44pd.js +0 -1
  520. package/dist/client/static/js/treemap-WGGIJYW6-zvdv84vp.js +0 -1
  521. package/dist/client/static/js/tsx-dk8rpgtw.js +0 -1
  522. package/dist/client/static/js/typescript-5txwpd9t.js +0 -1
  523. package/dist/client/static/js/wardley-WFR3VGLG-hbv0cg4s.js +0 -1
  524. package/dist/client/static/js/xml-8516fzfp.js +0 -1
  525. package/dist/client/static/js/yaml-6k1tmwtm.js +0 -1
@@ -1,5 +1,5 @@
1
- import{xe}from"./index-bwwgtesb.js";import{t,l,Yt,C,re,M,O,G,z,j,q,H,m,Ae,ce}from"./index-kbaffwp1.js";import{$e}from"./index-cwwg7k5f.js";var Q=t((a,s)=>{let o=a<=1?a*100:a;if(o<0||o>100)throw Error(`${s} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return o},"toPercent"),B=t((a,s,o)=>({x:Q(s,`${o} evolution`),y:Q(a,`${o} visibility`)}),"toCoordinates"),st=t((a)=>{if(!a)return;if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward";return},"getFlowFromPort"),Xt=t((a)=>{if(!a?.startsWith("+"))return{};let o=/^\+'([^']*)'/.exec(a)?.[1];if(a.includes("<>"))return{flow:"bidirectional",label:o};if(a.includes("<"))return{flow:"backward",label:o};if(a.includes(">"))return{flow:"forward",label:o};return{label:o}},"extractFlowFromArrow"),Et=t((a,s)=>{if(xe(a,s),a.size)s.setSize(a.size.width,a.size.height);if(a.evolution){let o=a.evolution.stages.map((r)=>{if(r.secondName)return`${r.name.trim()} / ${r.secondName.trim()}`;return r.name.trim()}),g=a.evolution.stages.filter((r)=>r.boundary!==void 0).map((r)=>r.boundary);s.updateAxes({stages:o,stageBoundaries:g})}if(a.anchors.forEach((o)=>{let g=B(o.visibility,o.evolution,`Anchor "${o.name}"`);s.addNode(o.name,o.name,g.x,g.y,"anchor")}),a.components.forEach((o)=>{let g=B(o.visibility,o.evolution,`Component "${o.name}"`),r=o.label?(o.label.negX?-1:1)*o.label.offsetX:void 0,c=o.label?(o.label.negY?-1:1)*o.label.offsetY:void 0,k=o.decorator?.strategy;s.addNode(o.name,o.name,g.x,g.y,"component",r,c,o.inertia,k)}),a.notes.forEach((o)=>{let g=B(o.visibility,o.evolution,`Note "${o.text}"`);s.addNote(o.text,g.x,g.y)}),a.pipelines.forEach((o)=>{let g=s.getNode(o.parent);if(!g||typeof g.y!=="number")throw Error(`Pipeline "${o.parent}" must reference an existing component with coordinates.`);let r=g.y;s.startPipeline(o.parent),o.components.forEach((c)=>{let k=`${o.parent}_${c.name}`,T=c.label?(c.label.negX?-1:1)*c.label.offsetX:void 0,u=c.label?(c.label.negY?-1:1)*c.label.offsetY:void 0,Z=Q(c.evolution,`Pipeline component "${c.name}" evolution`);s.addNode(k,c.name,Z,r,"pipeline-component",T,u),s.addPipelineComponent(o.parent,k)})}),a.links.forEach((o)=>{let g=!!o.arrow&&(o.arrow.includes("-.->")||o.arrow.includes(".-.")),r=st(o.fromPort)??st(o.toPort),{flow:c,label:k}=Xt(o.arrow);if(!r&&c)r=c;let T=o.linkLabel,u=k??T;s.addLink(s.resolveNodeId(o.from),s.resolveNodeId(o.to),g,u,r)}),a.evolves.forEach((o)=>{let g=s.getNode(o.component);if(g?.y!==void 0){let r=Q(o.target,`Evolve target for "${o.component}"`);s.addTrend(o.component,r,g.y)}}),a.annotations.length>0){let o=a.annotations[0],g=B(o.x,o.y,"Annotations box");s.setAnnotationsBox(g.x,g.y)}a.annotation.forEach((o)=>{let g=B(o.x,o.y,`Annotation ${o.number}`);s.addAnnotation(o.number,[{x:g.x,y:g.y}],o.text)}),a.accelerators.forEach((o)=>{let g=B(o.x,o.y,`Accelerator "${o.name}"`);s.addAccelerator(o.name,g.x,g.y)}),a.deaccelerators.forEach((o)=>{let g=B(o.x,o.y,`Deaccelerator "${o.name}"`);s.addDeaccelerator(o.name,g.x,g.y)})},"populateDb"),it={parser:{yy:void 0},parse:t(async(a)=>{let s=await $e("wardley",a);l.debug(s);let o=it.parser?.yy;if(!o||typeof o.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Et(s,o)},"parse")},Ht=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,"WardleyBuilder")}addNode(a){let s=this.nodes.get(a.id)??{id:a.id,label:a.label},o={...s,...a,className:a.className??s.className,labelOffsetX:a.labelOffsetX??s.labelOffsetX,labelOffsetY:a.labelOffsetY??s.labelOffsetY};this.nodes.set(a.id,o)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let s=this.nodes.get(a);if(s)s.isPipelineParent=!0}addPipelineComponent(a,s){let o=this.pipelines.get(a);if(o)o.componentIds.push(s);let g=this.nodes.get(s);if(g)g.inPipeline=!0}addAnnotation(a){this.annotations.push(a)}addNote(a){this.notes.push(a)}addAccelerator(a){this.accelerators.push(a)}addDeaccelerator(a){this.deaccelerators.push(a)}setAnnotationsBox(a,s){this.annotationsBox={x:a,y:s}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,s){this.size={width:a,height:s}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[s,o]of this.nodes)if(o.label===a)return s;return a}build(){let a=[];for(let s of this.nodes.values()){if(typeof s.x!=="number"||typeof s.y!=="number")throw Error(`Node "${s.label}" is missing coordinates`);a.push(s)}return{nodes:a,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},v=new Ht;function dt(){return m()["wardley-beta"]}t(dt,"getConfig");function lt(a,s,o,g,r,c,k,T,u){v.addNode({id:a,label:s,x:o,y:g,className:r,labelOffsetX:c,labelOffsetY:k,inertia:T,sourceStrategy:u})}t(lt,"addNode");function ct(a,s,o=!1,g,r){v.addLink({source:a,target:s,dashed:o,label:g,flow:r})}t(ct,"addLink");function pt(a,s,o){v.addTrend({nodeId:a,targetX:s,targetY:o})}t(pt,"addTrend");function ht(a,s,o){v.addAnnotation({number:a,coordinates:s,text:o})}t(ht,"addAnnotation");function ft(a,s,o){v.addNote({text:a,x:s,y:o})}t(ft,"addNote");function xt(a,s,o){v.addAccelerator({name:a,x:s,y:o})}t(xt,"addAccelerator");function gt(a,s,o){v.addDeaccelerator({name:a,x:s,y:o})}t(gt,"addDeaccelerator");function yt(a,s){v.setAnnotationsBox(a,s)}t(yt,"setAnnotationsBox");function ut(a,s){v.setSize(a,s)}t(ut,"setSize");function wt(a){v.startPipeline(a)}t(wt,"startPipeline");function mt(a,s){v.addPipelineComponent(a,s)}t(mt,"addPipelineComponent");function kt(a){v.setAxes(a)}t(kt,"updateAxes");function bt(a){return v.getNode(a)}t(bt,"getNode");function $t(a){return v.resolveNodeId(a)}t($t,"resolveNodeId");function vt(){return v.build()}t(vt,"getWardleyData");function Pt(){v.clear(),M()}t(Pt,"clear");var It={getConfig:dt,addNode:lt,addLink:ct,addTrend:pt,addAnnotation:ht,addNote:ft,addAccelerator:xt,addDeaccelerator:gt,setAnnotationsBox:yt,setSize:ut,startPipeline:wt,addPipelineComponent:mt,updateAxes:kt,getNode:bt,resolveNodeId:$t,getWardleyData:vt,clear:Pt,setAccTitle:O,getAccTitle:G,setDiagramTitle:q,getDiagramTitle:H,getAccDescription:j,setAccDescription:z},Bt=["Genesis","Custom Built","Product","Commodity"],Ft=t(()=>{let{themeVariables:a}=m();return{backgroundColor:a.wardley?.backgroundColor??a.background??"#fff",axisColor:a.wardley?.axisColor??"#000",axisTextColor:a.wardley?.axisTextColor??a.primaryTextColor??"#222",gridColor:a.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:a.wardley?.componentFill??"#fff",componentStroke:a.wardley?.componentStroke??"#000",componentLabelColor:a.wardley?.componentLabelColor??a.primaryTextColor??"#222",linkStroke:a.wardley?.linkStroke??"#000",evolutionStroke:a.wardley?.evolutionStroke??"#dc3545",annotationStroke:a.wardley?.annotationStroke??"#000",annotationTextColor:a.wardley?.annotationTextColor??a.primaryTextColor??"#222",annotationFill:a.wardley?.annotationFill??a.background??"#fff"}},"getTheme"),Rt=t(()=>{let a=m()["wardley-beta"];return{width:a?.width??900,height:a?.height??600,padding:a?.padding??48,nodeRadius:a?.nodeRadius??6,nodeLabelOffset:a?.nodeLabelOffset??8,axisFontSize:a?.axisFontSize??12,labelFontSize:a?.labelFontSize??10,showGrid:a?.showGrid??!1,useMaxWidth:a?.useMaxWidth??!0}},"getConfigValues"),Ot=t((a,s,o,g)=>{l.debug(`Rendering Wardley map
2
- `+a);let r=Rt(),c=Ft(),k=r.nodeRadius*1.6,T=g.db,u=T.getWardleyData(),Z=T.getDiagramTitle(),W=u.size?.width??r.width,P=u.size?.height??r.height,R=Ae(s);R.selectAll("*").remove(),re(R,P,W,r.useMaxWidth),R.attr("viewBox",`0 0 ${W} ${P}`);let N=R.append("g").attr("class","wardley-map"),tt=R.append("defs");tt.append("marker").attr("id",`arrow-${s}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.evolutionStroke).attr("stroke","none"),tt.append("marker").attr("id",`link-arrow-end-${s}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.linkStroke).attr("stroke","none"),tt.append("marker").attr("id",`link-arrow-start-${s}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",c.linkStroke).attr("stroke","none"),N.append("rect").attr("class","wardley-background").attr("width",W).attr("height",P).attr("fill",c.backgroundColor);let D=W-r.padding*2,V=P-r.padding*2;if(Z)N.append("text").attr("class","wardley-title").attr("x",W/2).attr("y",r.padding/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(Z);let E=t((e)=>r.padding+e/100*D,"projectX"),Y=t((e)=>P-r.padding-e/100*V,"projectY"),U=N.append("g").attr("class","wardley-axes");U.append("line").attr("x1",r.padding).attr("x2",W-r.padding).attr("y1",P-r.padding).attr("y2",P-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1),U.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",P-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1);let Ct=u.axes.xLabel??"Evolution",St=u.axes.yLabel??"Visibility";U.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+D/2).attr("y",P-r.padding/4).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(Ct),U.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+V/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+V/2})`).text(St);let _=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:Bt;if(_.length>0){let e=N.append("g").attr("class","wardley-stages"),i=u.axes.stageBoundaries,n=[];if(i&&i.length===_.length){let d=0;i.forEach((h)=>{n.push({start:d,end:h}),d=h})}else{let d=1/_.length;_.forEach((h,f)=>{n.push({start:f*d,end:(f+1)*d})})}_.forEach((d,h)=>{let f=n[h],y=r.padding+f.start*D,x=r.padding+f.end*D,w=(y+x)/2;if(h>0)e.append("line").attr("x1",y).attr("x2",y).attr("y1",r.padding).attr("y2",P-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",0.8);e.append("text").attr("class","wardley-stage-label").attr("x",w).attr("y",P-r.padding/1.5).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(d)})}if(r.showGrid){let e=N.append("g").attr("class","wardley-grid");for(let i=1;i<4;i++){let n=i/4,d=r.padding+D*n;e.append("line").attr("x1",d).attr("x2",d).attr("y1",r.padding).attr("y2",P-r.padding).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6"),e.append("line").attr("x1",r.padding).attr("x2",W-r.padding).attr("y1",P-r.padding-V*n).attr("y2",P-r.padding-V*n).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6")}}let p=new Map;if(u.nodes.forEach((e)=>{p.set(e.id,{x:E(e.x),y:Y(e.y),node:e})}),u.pipelines.length>0){let e=N.append("g").attr("class","wardley-pipelines"),i=N.append("g").attr("class","wardley-pipeline-links");u.pipelines.forEach((n)=>{if(n.componentIds.length===0)return;let d=n.componentIds.map((x)=>({id:x,pos:p.get(x),node:u.nodes.find((w)=>w.id===x)})).filter((x)=>x.pos&&x.node).sort((x,w)=>x.node.x-w.node.x);for(let x=0;x<d.length-1;x++){let w=d[x],b=d[x+1];i.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",w.pos.x).attr("y1",w.pos.y).attr("x2",b.pos.x).attr("y2",b.pos.y).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let h=1/0,f=-1/0,y=0;if(n.componentIds.forEach((x)=>{let w=p.get(x);if(w)h=Math.min(h,w.x),f=Math.max(f,w.x),y=w.y}),h!==1/0&&f!==-1/0){let w=r.nodeRadius*4,b=y-w/2,L=p.get(n.nodeId);if(L){let X=(h+f)/2;L.x=X,L.y=b-k/6}e.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",b).attr("width",f-h+30).attr("height",w).attr("fill","none").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let rt=N.append("g").attr("class","wardley-links"),ot=new Map;u.pipelines.forEach((e)=>{ot.set(e.nodeId,new Set(e.componentIds))});let nt=u.links.filter((e)=>{if(!p.has(e.source)||!p.has(e.target))return!1;if(ot.get(e.target)?.has(e.source))return!1;return!0});rt.selectAll("line").data(nt).enter().append("line").attr("class",(e)=>`wardley-link${e.dashed?" wardley-link--dashed":""}`).attr("x1",(e)=>{let i=p.get(e.source),n=p.get(e.target),h=u.nodes.find((w)=>w.id===e.source).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,f=n.x-i.x,y=n.y-i.y,x=Math.sqrt(f*f+y*y);return i.x+f/x*h}).attr("y1",(e)=>{let i=p.get(e.source),n=p.get(e.target),h=u.nodes.find((w)=>w.id===e.source).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,f=n.x-i.x,y=n.y-i.y,x=Math.sqrt(f*f+y*y);return i.y+y/x*h}).attr("x2",(e)=>{let i=p.get(e.source),n=p.get(e.target),h=u.nodes.find((w)=>w.id===e.target).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,f=i.x-n.x,y=i.y-n.y,x=Math.sqrt(f*f+y*y);return n.x+f/x*h}).attr("y2",(e)=>{let i=p.get(e.source),n=p.get(e.target),h=u.nodes.find((w)=>w.id===e.target).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,f=i.x-n.x,y=i.y-n.y,x=Math.sqrt(f*f+y*y);return n.y+y/x*h}).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(e)=>e.dashed?"6 6":null).attr("marker-end",(e)=>{if(e.flow==="forward"||e.flow==="bidirectional")return`url(#link-arrow-end-${s})`;return null}).attr("marker-start",(e)=>{if(e.flow==="backward"||e.flow==="bidirectional")return`url(#link-arrow-start-${s})`;return null}),rt.selectAll("text").data(nt.filter((e)=>e.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(e)=>{let i=p.get(e.source),n=p.get(e.target),d=(i.x+n.x)/2,h=n.y-i.y,f=n.x-i.x,y=Math.sqrt(f*f+h*h),x=8,w=h/y;return d+w*8}).attr("y",(e)=>{let i=p.get(e.source),n=p.get(e.target),d=(i.y+n.y)/2,h=n.x-i.x,f=n.y-i.y,y=Math.sqrt(h*h+f*f),x=8,w=-h/y;return d+w*8}).attr("fill",c.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(e)=>{let i=p.get(e.source),n=p.get(e.target),d=(i.x+n.x)/2,h=(i.y+n.y)/2,f=n.x-i.x,y=n.y-i.y,x=Math.sqrt(f*f+y*y),w=8,b=y/x,L=-f/x,X=d+b*8,J=h+L*8,F=Math.atan2(y,f)*180/Math.PI;if(F>90||F<-90)F+=180;return`rotate(${F} ${X} ${J})`}).text((e)=>e.label);let Mt=N.append("g").attr("class","wardley-trends"),Nt=u.trends.map((e)=>{let i=p.get(e.nodeId);if(!i)return null;let n=E(e.targetX),d=Y(e.targetY),h=n-i.x,f=d-i.y,y=Math.sqrt(h*h+f*f),x=r.nodeRadius+2,w=y>x?n-h/y*x:n,b=y>x?d-f/y*x:d;return{origin:i,targetX:n,targetY:d,adjustedX2:w,adjustedY2:b}}).filter((e)=>e!==null);Mt.selectAll("line").data(Nt).enter().append("line").attr("class","wardley-trend").attr("x1",(e)=>e.origin.x).attr("y1",(e)=>e.origin.y).attr("x2",(e)=>e.adjustedX2).attr("y2",(e)=>e.adjustedY2).attr("stroke",c.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${s})`);let A=N.append("g").attr("class","wardley-nodes").selectAll("g").data(u.nodes).enter().append("g").attr("class",(e)=>["wardley-node",e.className?`wardley-node--${e.className}`:""].filter(Boolean).join(" "));A.filter((e)=>e.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",c.componentStroke).attr("stroke-width",1),A.filter((e)=>e.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",c.componentStroke).attr("stroke-width",1),A.filter((e)=>e.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let I=A.filter((e)=>e.sourceStrategy==="market");I.append("circle").attr("class","wardley-market-overlay").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),A.filter((e)=>!e.isPipelineParent&&e.sourceStrategy!=="market"&&e.className!=="anchor").append("circle").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1);let et=r.nodeRadius*0.7,S=r.nodeRadius*1.2;if(I.append("line").attr("class","wardley-market-line").attr("x1",(e)=>p.get(e.id).x).attr("y1",(e)=>p.get(e.id).y-S).attr("x2",(e)=>p.get(e.id).x-S*Math.cos(Math.PI/6)).attr("y2",(e)=>p.get(e.id).y+S*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",(e)=>p.get(e.id).x-S*Math.cos(Math.PI/6)).attr("y1",(e)=>p.get(e.id).y+S*Math.sin(Math.PI/6)).attr("x2",(e)=>p.get(e.id).x+S*Math.cos(Math.PI/6)).attr("y2",(e)=>p.get(e.id).y+S*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",(e)=>p.get(e.id).x+S*Math.cos(Math.PI/6)).attr("y1",(e)=>p.get(e.id).y+S*Math.sin(Math.PI/6)).attr("x2",(e)=>p.get(e.id).x).attr("y2",(e)=>p.get(e.id).y-S).attr("stroke",c.componentStroke).attr("stroke-width",1),I.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y-S).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>p.get(e.id).x-S*Math.cos(Math.PI/6)).attr("cy",(e)=>p.get(e.id).y+S*Math.sin(Math.PI/6)).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>p.get(e.id).x+S*Math.cos(Math.PI/6)).attr("cy",(e)=>p.get(e.id).y+S*Math.sin(Math.PI/6)).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),A.filter((e)=>e.isPipelineParent===!0).append("rect").attr("x",(e)=>p.get(e.id).x-k/2).attr("y",(e)=>p.get(e.id).y-k/2).attr("width",k).attr("height",k).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1),A.filter((e)=>e.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(e)=>{let i=p.get(e.id),n=e.isPipelineParent?k/2+15:r.nodeRadius+15;if(e.sourceStrategy)n+=r.nodeRadius+10;return i.x+n}).attr("y1",(e)=>{let i=p.get(e.id),n=e.isPipelineParent?k:r.nodeRadius*2;return i.y-n/2}).attr("x2",(e)=>{let i=p.get(e.id),n=e.isPipelineParent?k/2+15:r.nodeRadius+15;if(e.sourceStrategy)n+=r.nodeRadius+10;return i.x+n}).attr("y2",(e)=>{let i=p.get(e.id),n=e.isPipelineParent?k:r.nodeRadius*2;return i.y+n/2}).attr("stroke",c.componentStroke).attr("stroke-width",6),A.append("text").attr("x",(e)=>{let i=p.get(e.id);if(e.className==="anchor")return e.labelOffsetX!==void 0?i.x+e.labelOffsetX:i.x;let n=r.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetX===void 0)n+=10;let d=e.labelOffsetX??n;return i.x+d}).attr("y",(e)=>{let i=p.get(e.id);if(e.className==="anchor")return e.labelOffsetY!==void 0?i.y+e.labelOffsetY:i.y-3;let n=-r.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetY===void 0)n-=10;let d=e.labelOffsetY??n;return i.y+d}).attr("class","wardley-node-label").attr("fill",(e)=>{if(e.className==="evolved")return c.evolutionStroke;if(e.className==="anchor")return"#000";return c.componentLabelColor}).attr("font-size",r.labelFontSize).attr("font-weight",(e)=>e.className==="anchor"?"bold":"normal").attr("text-anchor",(e)=>e.className==="anchor"?"middle":"start").attr("dominant-baseline",(e)=>e.className==="anchor"?"middle":"auto").text((e)=>e.label),u.annotations.length>0){let e=N.append("g").attr("class","wardley-annotations");if(u.annotations.forEach((i)=>{let n=i.coordinates.map((d)=>({x:E(d.x),y:Y(d.y)}));if(n.length>1)for(let d=0;d<n.length-1;d++)e.append("line").attr("class","wardley-annotation-line").attr("x1",n[d].x).attr("y1",n[d].y).attr("x2",n[d+1].x).attr("y2",n[d+1].y).attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach((d)=>{let h=e.append("g").attr("class","wardley-annotation");h.append("circle").attr("cx",d.x).attr("cy",d.y).attr("r",10).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5),h.append("text").attr("x",d.x).attr("y",d.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.number)})}),u.annotationsBox){let i=E(u.annotationsBox.x),n=Y(u.annotationsBox.y),d=10,h=16,f=11,y=e.append("g").attr("class","wardley-annotations-box"),x=[...u.annotations].filter((b)=>b.text).sort((b,L)=>b.number-L.number),w=[];if(x.forEach((b,L)=>{let X=y.append("text").attr("x",i+d).attr("y",n+d+(L+1)*h).attr("font-size",f).attr("fill",c.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${b.number}. ${b.text}`);w.push(X)}),w.length>0){let b=0,L=0;w.forEach((at)=>{let K=at.node(),Wt=K.getComputedTextLength();b=Math.max(b,Wt);let At=K.getBBox();L=Math.max(L,At.height)});let X=b+d*2+105,J=x.length*h+d*2+L/2,F=r.padding,zt=W-r.padding-X,Lt=r.padding,Tt=P-r.padding-J;i=Math.max(F,Math.min(i,zt)),n=Math.max(Lt,Math.min(n,Tt)),w.forEach((at,K)=>{at.attr("x",i+d).attr("y",n+d+(K+1)*h)}),y.insert("rect","text").attr("x",i).attr("y",n).attr("width",X).attr("height",J).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(u.notes.length>0){let e=N.append("g").attr("class","wardley-notes");u.notes.forEach((i)=>{let n=E(i.x),d=Y(i.y);e.append("text").attr("x",n).attr("y",d).attr("text-anchor","start").attr("font-size",11).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.text)})}if(u.accelerators.length>0){let e=N.append("g").attr("class","wardley-accelerators");u.accelerators.forEach((i)=>{let n=E(i.x),d=Y(i.y),h=60,f=30,y=20,x=`
1
+ import{xe}from"./index-ver116ed.js";import{t,l,Jt,E,re,F,O,G,z,j,q,H,m,Ae,ue}from"./index-xfyxmaj1.js";import{$e}from"./index-wnk9k57k.js";var Q=t((a,s)=>{let o=a<=1?a*100:a;if(o<0||o>100)throw Error(`${s} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return o},"toPercent"),I=t((a,s,o)=>({x:Q(s,`${o} evolution`),y:Q(a,`${o} visibility`)}),"toCoordinates"),st=t((a)=>{if(!a)return;if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward";return},"getFlowFromPort"),Xt=t((a)=>{if(!a?.startsWith("+"))return{};let o=/^\+'([^']*)'/.exec(a)?.[1];if(a.includes("<>"))return{flow:"bidirectional",label:o};if(a.includes("<"))return{flow:"backward",label:o};if(a.includes(">"))return{flow:"forward",label:o};return{label:o}},"extractFlowFromArrow"),Et=t((a,s)=>{if(xe(a,s),a.size)s.setSize(a.size.width,a.size.height);if(a.evolution){let o=a.evolution.stages.map((r)=>{if(r.secondName)return`${r.name.trim()} / ${r.secondName.trim()}`;return r.name.trim()}),g=a.evolution.stages.filter((r)=>r.boundary!==void 0).map((r)=>r.boundary);s.updateAxes({stages:o,stageBoundaries:g})}if(a.anchors.forEach((o)=>{let g=I(o.visibility,o.evolution,`Anchor "${o.name}"`);s.addNode(o.name,o.name,g.x,g.y,"anchor")}),a.components.forEach((o)=>{let g=I(o.visibility,o.evolution,`Component "${o.name}"`),r=o.label?(o.label.negX?-1:1)*o.label.offsetX:void 0,c=o.label?(o.label.negY?-1:1)*o.label.offsetY:void 0,k=o.decorator?.strategy;s.addNode(o.name,o.name,g.x,g.y,"component",r,c,o.inertia,k)}),a.notes.forEach((o)=>{let g=I(o.visibility,o.evolution,`Note "${o.text}"`);s.addNote(o.text,g.x,g.y)}),a.pipelines.forEach((o)=>{let g=s.getNode(o.parent);if(!g||typeof g.y!=="number")throw Error(`Pipeline "${o.parent}" must reference an existing component with coordinates.`);let r=g.y;s.startPipeline(o.parent),o.components.forEach((c)=>{let k=`${o.parent}_${c.name}`,N=c.label?(c.label.negX?-1:1)*c.label.offsetX:void 0,u=c.label?(c.label.negY?-1:1)*c.label.offsetY:void 0,Z=Q(c.evolution,`Pipeline component "${c.name}" evolution`);s.addNode(k,c.name,Z,r,"pipeline-component",N,u),s.addPipelineComponent(o.parent,k)})}),a.links.forEach((o)=>{let g=!!o.arrow&&(o.arrow.includes("-.->")||o.arrow.includes(".-.")),r=st(o.fromPort)??st(o.toPort),{flow:c,label:k}=Xt(o.arrow);if(!r&&c)r=c;let N=o.linkLabel,u=k??N;s.addLink(s.resolveNodeId(o.from),s.resolveNodeId(o.to),g,u,r)}),a.evolves.forEach((o)=>{let g=s.getNode(o.component);if(g?.y!==void 0){let r=Q(o.target,`Evolve target for "${o.component}"`);s.addTrend(o.component,r,g.y)}}),a.annotations.length>0){let o=a.annotations[0],g=I(o.x,o.y,"Annotations box");s.setAnnotationsBox(g.x,g.y)}a.annotation.forEach((o)=>{let g=I(o.x,o.y,`Annotation ${o.number}`);s.addAnnotation(o.number,[{x:g.x,y:g.y}],o.text)}),a.accelerators.forEach((o)=>{let g=I(o.x,o.y,`Accelerator "${o.name}"`);s.addAccelerator(o.name,g.x,g.y)}),a.deaccelerators.forEach((o)=>{let g=I(o.x,o.y,`Deaccelerator "${o.name}"`);s.addDeaccelerator(o.name,g.x,g.y)})},"populateDb"),it={parser:{yy:void 0},parse:t(async(a)=>{let s=await $e("wardley",a);l.debug(s);let o=it.parser?.yy;if(!o||typeof o.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Et(s,o)},"parse")},Ht=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,"WardleyBuilder")}addNode(a){let s=this.nodes.get(a.id)??{id:a.id,label:a.label},o={...s,...a,className:a.className??s.className,labelOffsetX:a.labelOffsetX??s.labelOffsetX,labelOffsetY:a.labelOffsetY??s.labelOffsetY};this.nodes.set(a.id,o)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let s=this.nodes.get(a);if(s)s.isPipelineParent=!0}addPipelineComponent(a,s){let o=this.pipelines.get(a);if(o)o.componentIds.push(s);let g=this.nodes.get(s);if(g)g.inPipeline=!0}addAnnotation(a){this.annotations.push(a)}addNote(a){this.notes.push(a)}addAccelerator(a){this.accelerators.push(a)}addDeaccelerator(a){this.deaccelerators.push(a)}setAnnotationsBox(a,s){this.annotationsBox={x:a,y:s}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,s){this.size={width:a,height:s}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[s,o]of this.nodes)if(o.label===a)return s;return a}build(){let a=[];for(let s of this.nodes.values()){if(typeof s.x!=="number"||typeof s.y!=="number")throw Error(`Node "${s.label}" is missing coordinates`);a.push(s)}return{nodes:a,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},v=new Ht;function dt(){return m()["wardley-beta"]}t(dt,"getConfig");function lt(a,s,o,g,r,c,k,N,u){v.addNode({id:a,label:s,x:o,y:g,className:r,labelOffsetX:c,labelOffsetY:k,inertia:N,sourceStrategy:u})}t(lt,"addNode");function ct(a,s,o=!1,g,r){v.addLink({source:a,target:s,dashed:o,label:g,flow:r})}t(ct,"addLink");function pt(a,s,o){v.addTrend({nodeId:a,targetX:s,targetY:o})}t(pt,"addTrend");function ht(a,s,o){v.addAnnotation({number:a,coordinates:s,text:o})}t(ht,"addAnnotation");function ft(a,s,o){v.addNote({text:a,x:s,y:o})}t(ft,"addNote");function xt(a,s,o){v.addAccelerator({name:a,x:s,y:o})}t(xt,"addAccelerator");function gt(a,s,o){v.addDeaccelerator({name:a,x:s,y:o})}t(gt,"addDeaccelerator");function yt(a,s){v.setAnnotationsBox(a,s)}t(yt,"setAnnotationsBox");function ut(a,s){v.setSize(a,s)}t(ut,"setSize");function wt(a){v.startPipeline(a)}t(wt,"startPipeline");function mt(a,s){v.addPipelineComponent(a,s)}t(mt,"addPipelineComponent");function kt(a){v.setAxes(a)}t(kt,"updateAxes");function bt(a){return v.getNode(a)}t(bt,"getNode");function $t(a){return v.resolveNodeId(a)}t($t,"resolveNodeId");function vt(){return v.build()}t(vt,"getWardleyData");function Pt(){v.clear(),F()}t(Pt,"clear");var Yt={getConfig:dt,addNode:lt,addLink:ct,addTrend:pt,addAnnotation:ht,addNote:ft,addAccelerator:xt,addDeaccelerator:gt,setAnnotationsBox:yt,setSize:ut,startPipeline:wt,addPipelineComponent:mt,updateAxes:kt,getNode:bt,resolveNodeId:$t,getWardleyData:vt,clear:Pt,setAccTitle:O,getAccTitle:G,setDiagramTitle:q,getDiagramTitle:H,getAccDescription:j,setAccDescription:z},It=["Genesis","Custom Built","Product","Commodity"],Bt=t(()=>{let{themeVariables:a}=m();return{backgroundColor:a.wardley?.backgroundColor??a.background??"#fff",axisColor:a.wardley?.axisColor??"#000",axisTextColor:a.wardley?.axisTextColor??a.primaryTextColor??"#222",gridColor:a.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:a.wardley?.componentFill??"#fff",componentStroke:a.wardley?.componentStroke??"#000",componentLabelColor:a.wardley?.componentLabelColor??a.primaryTextColor??"#222",linkStroke:a.wardley?.linkStroke??"#000",evolutionStroke:a.wardley?.evolutionStroke??"#dc3545",annotationStroke:a.wardley?.annotationStroke??"#000",annotationTextColor:a.wardley?.annotationTextColor??a.primaryTextColor??"#222",annotationFill:a.wardley?.annotationFill??a.background??"#fff"}},"getTheme"),Ft=t(()=>{let a=m()["wardley-beta"];return{width:a?.width??900,height:a?.height??600,padding:a?.padding??48,nodeRadius:a?.nodeRadius??6,nodeLabelOffset:a?.nodeLabelOffset??8,axisFontSize:a?.axisFontSize??12,labelFontSize:a?.labelFontSize??10,showGrid:a?.showGrid??!1,useMaxWidth:a?.useMaxWidth??!0}},"getConfigValues"),Rt=t((a,s,o,g)=>{l.debug(`Rendering Wardley map
2
+ `+a);let r=Ft(),c=Bt(),k=r.nodeRadius*1.6,N=g.db,u=N.getWardleyData(),Z=N.getDiagramTitle(),L=u.size?.width??r.width,P=u.size?.height??r.height,R=Ae(s);R.selectAll("*").remove(),re(R,P,L,r.useMaxWidth),R.attr("viewBox",`0 0 ${L} ${P}`);let S=R.append("g").attr("class","wardley-map"),tt=R.append("defs");tt.append("marker").attr("id",`arrow-${s}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.evolutionStroke).attr("stroke","none"),tt.append("marker").attr("id",`link-arrow-end-${s}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.linkStroke).attr("stroke","none"),tt.append("marker").attr("id",`link-arrow-start-${s}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",c.linkStroke).attr("stroke","none"),S.append("rect").attr("class","wardley-background").attr("width",L).attr("height",P).attr("fill",c.backgroundColor);let D=L-r.padding*2,V=P-r.padding*2;if(Z)S.append("text").attr("class","wardley-title").attr("x",L/2).attr("y",r.padding/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(Z);let A=t((e)=>r.padding+e/100*D,"projectX"),X=t((e)=>P-r.padding-e/100*V,"projectY"),U=S.append("g").attr("class","wardley-axes");U.append("line").attr("x1",r.padding).attr("x2",L-r.padding).attr("y1",P-r.padding).attr("y2",P-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1),U.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",P-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1);let Ct=u.axes.xLabel??"Evolution",St=u.axes.yLabel??"Visibility";U.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+D/2).attr("y",P-r.padding/4).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(Ct),U.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+V/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+V/2})`).text(St);let _=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:It;if(_.length>0){let e=S.append("g").attr("class","wardley-stages"),i=u.axes.stageBoundaries,n=[];if(i&&i.length===_.length){let d=0;i.forEach((h)=>{n.push({start:d,end:h}),d=h})}else{let d=1/_.length;_.forEach((h,f)=>{n.push({start:f*d,end:(f+1)*d})})}_.forEach((d,h)=>{let f=n[h],y=r.padding+f.start*D,x=r.padding+f.end*D,w=(y+x)/2;if(h>0)e.append("line").attr("x1",y).attr("x2",y).attr("y1",r.padding).attr("y2",P-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",0.8);e.append("text").attr("class","wardley-stage-label").attr("x",w).attr("y",P-r.padding/1.5).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(d)})}if(r.showGrid){let e=S.append("g").attr("class","wardley-grid");for(let i=1;i<4;i++){let n=i/4,d=r.padding+D*n;e.append("line").attr("x1",d).attr("x2",d).attr("y1",r.padding).attr("y2",P-r.padding).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6"),e.append("line").attr("x1",r.padding).attr("x2",L-r.padding).attr("y1",P-r.padding-V*n).attr("y2",P-r.padding-V*n).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6")}}let p=new Map;if(u.nodes.forEach((e)=>{p.set(e.id,{x:A(e.x),y:X(e.y),node:e})}),u.pipelines.length>0){let e=S.append("g").attr("class","wardley-pipelines"),i=S.append("g").attr("class","wardley-pipeline-links");u.pipelines.forEach((n)=>{if(n.componentIds.length===0)return;let d=n.componentIds.map((x)=>({id:x,pos:p.get(x),node:u.nodes.find((w)=>w.id===x)})).filter((x)=>x.pos&&x.node).sort((x,w)=>x.node.x-w.node.x);for(let x=0;x<d.length-1;x++){let w=d[x],b=d[x+1];i.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",w.pos.x).attr("y1",w.pos.y).attr("x2",b.pos.x).attr("y2",b.pos.y).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let h=1/0,f=-1/0,y=0;if(n.componentIds.forEach((x)=>{let w=p.get(x);if(w)h=Math.min(h,w.x),f=Math.max(f,w.x),y=w.y}),h!==1/0&&f!==-1/0){let w=r.nodeRadius*4,b=y-w/2,M=p.get(n.nodeId);if(M){let W=(h+f)/2;M.x=W,M.y=b-k/6}e.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",b).attr("width",f-h+30).attr("height",w).attr("fill","none").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let rt=S.append("g").attr("class","wardley-links"),ot=new Map;u.pipelines.forEach((e)=>{ot.set(e.nodeId,new Set(e.componentIds))});let nt=u.links.filter((e)=>{if(!p.has(e.source)||!p.has(e.target))return!1;if(ot.get(e.target)?.has(e.source))return!1;return!0});rt.selectAll("line").data(nt).enter().append("line").attr("class",(e)=>`wardley-link${e.dashed?" wardley-link--dashed":""}`).attr("x1",(e)=>{let i=p.get(e.source),n=p.get(e.target),h=u.nodes.find((w)=>w.id===e.source).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,f=n.x-i.x,y=n.y-i.y,x=Math.sqrt(f*f+y*y);return i.x+f/x*h}).attr("y1",(e)=>{let i=p.get(e.source),n=p.get(e.target),h=u.nodes.find((w)=>w.id===e.source).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,f=n.x-i.x,y=n.y-i.y,x=Math.sqrt(f*f+y*y);return i.y+y/x*h}).attr("x2",(e)=>{let i=p.get(e.source),n=p.get(e.target),h=u.nodes.find((w)=>w.id===e.target).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,f=i.x-n.x,y=i.y-n.y,x=Math.sqrt(f*f+y*y);return n.x+f/x*h}).attr("y2",(e)=>{let i=p.get(e.source),n=p.get(e.target),h=u.nodes.find((w)=>w.id===e.target).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,f=i.x-n.x,y=i.y-n.y,x=Math.sqrt(f*f+y*y);return n.y+y/x*h}).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(e)=>e.dashed?"6 6":null).attr("marker-end",(e)=>{if(e.flow==="forward"||e.flow==="bidirectional")return`url(#link-arrow-end-${s})`;return null}).attr("marker-start",(e)=>{if(e.flow==="backward"||e.flow==="bidirectional")return`url(#link-arrow-start-${s})`;return null}),rt.selectAll("text").data(nt.filter((e)=>e.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(e)=>{let i=p.get(e.source),n=p.get(e.target),d=(i.x+n.x)/2,h=n.y-i.y,f=n.x-i.x,y=Math.sqrt(f*f+h*h),x=8,w=h/y;return d+w*8}).attr("y",(e)=>{let i=p.get(e.source),n=p.get(e.target),d=(i.y+n.y)/2,h=n.x-i.x,f=n.y-i.y,y=Math.sqrt(h*h+f*f),x=8,w=-h/y;return d+w*8}).attr("fill",c.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(e)=>{let i=p.get(e.source),n=p.get(e.target),d=(i.x+n.x)/2,h=(i.y+n.y)/2,f=n.x-i.x,y=n.y-i.y,x=Math.sqrt(f*f+y*y),w=8,b=y/x,M=-f/x,W=d+b*8,J=h+M*8,B=Math.atan2(y,f)*180/Math.PI;if(B>90||B<-90)B+=180;return`rotate(${B} ${W} ${J})`}).text((e)=>e.label);let Mt=S.append("g").attr("class","wardley-trends"),Nt=u.trends.map((e)=>{let i=p.get(e.nodeId);if(!i)return null;let n=A(e.targetX),d=X(e.targetY),h=n-i.x,f=d-i.y,y=Math.sqrt(h*h+f*f),x=r.nodeRadius+2,w=y>x?n-h/y*x:n,b=y>x?d-f/y*x:d;return{origin:i,targetX:n,targetY:d,adjustedX2:w,adjustedY2:b}}).filter((e)=>e!==null);Mt.selectAll("line").data(Nt).enter().append("line").attr("class","wardley-trend").attr("x1",(e)=>e.origin.x).attr("y1",(e)=>e.origin.y).attr("x2",(e)=>e.adjustedX2).attr("y2",(e)=>e.adjustedY2).attr("stroke",c.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${s})`);let T=S.append("g").attr("class","wardley-nodes").selectAll("g").data(u.nodes).enter().append("g").attr("class",(e)=>["wardley-node",e.className?`wardley-node--${e.className}`:""].filter(Boolean).join(" "));T.filter((e)=>e.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",c.componentStroke).attr("stroke-width",1),T.filter((e)=>e.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",c.componentStroke).attr("stroke-width",1),T.filter((e)=>e.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let Y=T.filter((e)=>e.sourceStrategy==="market");Y.append("circle").attr("class","wardley-market-overlay").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),T.filter((e)=>!e.isPipelineParent&&e.sourceStrategy!=="market"&&e.className!=="anchor").append("circle").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y).attr("r",r.nodeRadius).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1);let et=r.nodeRadius*0.7,C=r.nodeRadius*1.2;if(Y.append("line").attr("class","wardley-market-line").attr("x1",(e)=>p.get(e.id).x).attr("y1",(e)=>p.get(e.id).y-C).attr("x2",(e)=>p.get(e.id).x-C*Math.cos(Math.PI/6)).attr("y2",(e)=>p.get(e.id).y+C*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),Y.append("line").attr("class","wardley-market-line").attr("x1",(e)=>p.get(e.id).x-C*Math.cos(Math.PI/6)).attr("y1",(e)=>p.get(e.id).y+C*Math.sin(Math.PI/6)).attr("x2",(e)=>p.get(e.id).x+C*Math.cos(Math.PI/6)).attr("y2",(e)=>p.get(e.id).y+C*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),Y.append("line").attr("class","wardley-market-line").attr("x1",(e)=>p.get(e.id).x+C*Math.cos(Math.PI/6)).attr("y1",(e)=>p.get(e.id).y+C*Math.sin(Math.PI/6)).attr("x2",(e)=>p.get(e.id).x).attr("y2",(e)=>p.get(e.id).y-C).attr("stroke",c.componentStroke).attr("stroke-width",1),Y.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>p.get(e.id).x).attr("cy",(e)=>p.get(e.id).y-C).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),Y.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>p.get(e.id).x-C*Math.cos(Math.PI/6)).attr("cy",(e)=>p.get(e.id).y+C*Math.sin(Math.PI/6)).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),Y.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>p.get(e.id).x+C*Math.cos(Math.PI/6)).attr("cy",(e)=>p.get(e.id).y+C*Math.sin(Math.PI/6)).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),T.filter((e)=>e.isPipelineParent===!0).append("rect").attr("x",(e)=>p.get(e.id).x-k/2).attr("y",(e)=>p.get(e.id).y-k/2).attr("width",k).attr("height",k).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1),T.filter((e)=>e.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(e)=>{let i=p.get(e.id),n=e.isPipelineParent?k/2+15:r.nodeRadius+15;if(e.sourceStrategy)n+=r.nodeRadius+10;return i.x+n}).attr("y1",(e)=>{let i=p.get(e.id),n=e.isPipelineParent?k:r.nodeRadius*2;return i.y-n/2}).attr("x2",(e)=>{let i=p.get(e.id),n=e.isPipelineParent?k/2+15:r.nodeRadius+15;if(e.sourceStrategy)n+=r.nodeRadius+10;return i.x+n}).attr("y2",(e)=>{let i=p.get(e.id),n=e.isPipelineParent?k:r.nodeRadius*2;return i.y+n/2}).attr("stroke",c.componentStroke).attr("stroke-width",6),T.append("text").attr("x",(e)=>{let i=p.get(e.id);if(e.className==="anchor")return e.labelOffsetX!==void 0?i.x+e.labelOffsetX:i.x;let n=r.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetX===void 0)n+=10;let d=e.labelOffsetX??n;return i.x+d}).attr("y",(e)=>{let i=p.get(e.id);if(e.className==="anchor")return e.labelOffsetY!==void 0?i.y+e.labelOffsetY:i.y-3;let n=-r.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetY===void 0)n-=10;let d=e.labelOffsetY??n;return i.y+d}).attr("class","wardley-node-label").attr("fill",(e)=>{if(e.className==="evolved")return c.evolutionStroke;if(e.className==="anchor")return"#000";return c.componentLabelColor}).attr("font-size",r.labelFontSize).attr("font-weight",(e)=>e.className==="anchor"?"bold":"normal").attr("text-anchor",(e)=>e.className==="anchor"?"middle":"start").attr("dominant-baseline",(e)=>e.className==="anchor"?"middle":"auto").text((e)=>e.label),u.annotations.length>0){let e=S.append("g").attr("class","wardley-annotations");if(u.annotations.forEach((i)=>{let n=i.coordinates.map((d)=>({x:A(d.x),y:X(d.y)}));if(n.length>1)for(let d=0;d<n.length-1;d++)e.append("line").attr("class","wardley-annotation-line").attr("x1",n[d].x).attr("y1",n[d].y).attr("x2",n[d+1].x).attr("y2",n[d+1].y).attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach((d)=>{let h=e.append("g").attr("class","wardley-annotation");h.append("circle").attr("cx",d.x).attr("cy",d.y).attr("r",10).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5),h.append("text").attr("x",d.x).attr("y",d.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.number)})}),u.annotationsBox){let i=A(u.annotationsBox.x),n=X(u.annotationsBox.y),d=10,h=16,f=11,y=e.append("g").attr("class","wardley-annotations-box"),x=[...u.annotations].filter((b)=>b.text).sort((b,M)=>b.number-M.number),w=[];if(x.forEach((b,M)=>{let W=y.append("text").attr("x",i+d).attr("y",n+d+(M+1)*h).attr("font-size",f).attr("fill",c.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${b.number}. ${b.text}`);w.push(W)}),w.length>0){let b=0,M=0;w.forEach((at)=>{let K=at.node(),Wt=K.getComputedTextLength();b=Math.max(b,Wt);let At=K.getBBox();M=Math.max(M,At.height)});let W=b+d*2+105,J=x.length*h+d*2+M/2,B=r.padding,zt=L-r.padding-W,Lt=r.padding,Tt=P-r.padding-J;i=Math.max(B,Math.min(i,zt)),n=Math.max(Lt,Math.min(n,Tt)),w.forEach((at,K)=>{at.attr("x",i+d).attr("y",n+d+(K+1)*h)}),y.insert("rect","text").attr("x",i).attr("y",n).attr("width",W).attr("height",J).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(u.notes.length>0){let e=S.append("g").attr("class","wardley-notes");u.notes.forEach((i)=>{let n=A(i.x),d=X(i.y);e.append("text").attr("x",n).attr("y",d).attr("text-anchor","start").attr("font-size",11).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.text)})}if(u.accelerators.length>0){let e=S.append("g").attr("class","wardley-accelerators");u.accelerators.forEach((i)=>{let n=A(i.x),d=X(i.y),h=60,f=30,y=20,x=`
3
3
  M ${n} ${d-15}
4
4
  L ${n+60-20} ${d-15}
5
5
  L ${n+60-20} ${d-15-8}
@@ -8,7 +8,7 @@ import{xe}from"./index-bwwgtesb.js";import{t,l,Yt,C,re,M,O,G,z,j,q,H,m,Ae,ce}fro
8
8
  L ${n+60-20} ${d+15}
9
9
  L ${n} ${d+15}
10
10
  Z
11
- `;e.append("path").attr("d",x).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),e.append("text").attr("x",n+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.name)})}if(u.deaccelerators.length>0){let e=N.append("g").attr("class","wardley-deaccelerators");u.deaccelerators.forEach((i)=>{let n=E(i.x),d=Y(i.y),h=60,f=30,y=20,x=`
11
+ `;e.append("path").attr("d",x).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),e.append("text").attr("x",n+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.name)})}if(u.deaccelerators.length>0){let e=S.append("g").attr("class","wardley-deaccelerators");u.deaccelerators.forEach((i)=>{let n=A(i.x),d=X(i.y),h=60,f=30,y=20,x=`
12
12
  M ${n+60} ${d-15}
13
13
  L ${n+20} ${d-15}
14
14
  L ${n+20} ${d-15-8}
@@ -17,7 +17,7 @@ import{xe}from"./index-bwwgtesb.js";import{t,l,Yt,C,re,M,O,G,z,j,q,H,m,Ae,ce}fro
17
17
  L ${n+20} ${d+15}
18
18
  L ${n+60} ${d+15}
19
19
  Z
20
- `;e.append("path").attr("d",x).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),e.append("text").attr("x",n+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.name)})}},"draw"),Dt={draw:Ot},Gt=t(({wardley:a}={})=>{let s=Yt(),o=C(),g=ce(s,o.themeVariables),r=ce(g.wardley,a);return`
20
+ `;e.append("path").attr("d",x).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),e.append("text").attr("x",n+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.name)})}},"draw"),Ot={draw:Rt},Dt=t(({wardley:a}={})=>{let s=Jt(),o=E(),g=ue(s,o.themeVariables),r=ue(g.wardley,a);return`
21
21
  .wardley-background {
22
22
  fill: ${r.backgroundColor};
23
23
  }
@@ -75,4 +75,4 @@ import{xe}from"./index-bwwgtesb.js";import{t,l,Yt,C,re,M,O,G,z,j,q,H,m,Ae,ce}fro
75
75
  .wardley-notes text {
76
76
  fill: ${r.axisTextColor};
77
77
  }
78
- `},"styles"),Qt={parser:it,db:It,renderer:Dt,styles:Gt};export{Qt as diagram};
78
+ `},"styles"),Qt={parser:it,db:Yt,renderer:Ot,styles:Dt};export{Qt as diagram};
@@ -0,0 +1 @@
1
+ import{gi}from"./index-sxag9ptg.js";import"./index-jxsha63v.js";export{gi as default};
@@ -1,7 +1,7 @@
1
- import{t,l,Yt,Y,C,te,re,M,O,G,z,j,q,H,_o,nr,sl,Ae,ce,$g}from"./index-kbaffwp1.js";import{Aa}from"./index-mdmtxh1c.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=nr().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,V=a<n,L=V?a:n,E=V?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 F=Rt(y).map(function(Z){return L+h*Z});return s(V?F.reverse():F)}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)},_o.apply(_(),arguments)}var _t=function(){var e=t(function(U,r,g,d){for(g=g||{},d=U.length;d--;g[U[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],V=[1,31],L=[1,32],E=[1,33],F=[1,34],Z=[1,35],tt=[1,36],w=[1,37],X=[1,43],u=[1,42],W=[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:V,46:L,47:E,48:F,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:V,46:L,47:E,48:F,49:Z,50:tt,51:w},{11:45,15:44,29:W,30:f,35:46,39:24,40:R,41:27,42:D,43:_,44:y,45:V,46:L,47:E,48:F,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:V,46:L,47:E,48:F,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:V,46:L,47:E,48:F,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:V,46:L,47:E,48:F,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:V,46:L,47:E,48:F,49:Z,50:tt,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:W}),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:V,46:L,47:E,48:F,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 B,At,at,Q,Be,Ct,ht={},ft,et,Nt,pt;while(!0){if(at=d[d.length-1],this.defaultActions[at])Q=this.defaultActions[at];else{if(B===null||typeof B>"u")B=Xt();Q=st[at]&&st[at][B]}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
- `+P.showPosition()+`
3
- Expecting `+pt.join(", ")+", got '"+(this.terminals_[B]||B)+"'";else St="Parse error on line "+(xt+1)+": Unexpected "+(B==Wt?"end of input":"'"+(this.terminals_[B]||B)+"'");this.parseError(St,{text:P.match,token:this.terminals_[B]||B,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: "+B);switch(Q[0]){case 1:if(d.push(B),S.push(P.yytext),o.push(P.yylloc),d.push(Q[1]),B=null,!At){if(Vt=P.yyleng,m=P.yytext,xt=P.yylineno,kt=P.yylloc,Ft>0)Ft--}else B=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 U={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).
1
+ import{t,l,Jt,Y,E,te,re,F,O,G,z,j,q,H,To,nr,ll,Ae,ue,Vg}from"./index-xfyxmaj1.js";import{Aa}from"./index-dz18nn65.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=nr().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,S=0,T=0.5;delete e.unknown;function R(){var y=i().length,B=a<n,P=B?a:n,L=B?n:a;if(h=(L-P)/Math.max(1,y-f+S*2),x)h=Math.floor(h);if(P+=(L-P-h*(y-f))*T,c=h*(1-f),x)P=Math.round(P),c=Math.round(c);var V=Rt(y).map(function(Z){return P+h*Z});return s(B?V.reverse():V)}return e.domain=function(y){return arguments.length?(i(y),R()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,R()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,R()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,R()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,S=+y),R()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),R()):f},e.paddingOuter=function(y){return arguments.length?(S=+y,R()):S},e.align=function(y){return arguments.length?(T=Math.max(0,Math.min(1,y)),R()):T},e.copy=function(){return ct(i(),[n,a]).round(x).paddingInner(f).paddingOuter(S).align(T)},To.apply(R(),arguments)}var _t=function(){var e=t(function(U,r,g,d){for(g=g||{},d=U.length;d--;g[U[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],S=[1,26],T=[1,28],R=[1,29],y=[1,30],B=[1,31],P=[1,32],L=[1,33],V=[1,34],Z=[1,35],tt=[1,36],w=[1,37],X=[1,43],u=[1,42],W=[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],D=[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,C,o,st){var m=o.length-1;switch(C){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:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:39,13:38,24:X,29:u,30:f,31:40,32:41,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:45,15:44,29:W,30:f,35:46,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:49,17:48,24:N,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:52,17:51,24:N,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,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:T,43:R,44:y,45:B,46:P,47:L,48:V,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:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:W}),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(D,[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:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:rt},e(D,[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=[],C=[null],o=[],st=this.table,m="",xt=0,Vt=0,Ft=0,de=2,Wt=1,xe=o.slice.call(arguments,1),v=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(v.setInput(r,nt.yy),nt.yy.lexer=v,nt.yy.parser=this,typeof v.yylloc>"u")v.yylloc={};var kt=v.yylloc;o.push(kt);var fe=v.options&&v.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,C.length=C.length-K,o.length=o.length-K}t(pe,"popStack");function Xt(){var K=p.pop()||v.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,Be,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(v.showPosition)St="Parse error on line "+(xt+1)+`:
2
+ `+v.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:v.match,token:this.terminals_[M]||M,line:v.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),C.push(v.yytext),o.push(v.yylloc),d.push(Q[1]),M=null,!At){if(Vt=v.yyleng,m=v.yytext,xt=v.yylineno,kt=v.yylloc,Ft>0)Ft--}else M=At,At=null;break;case 2:if(et=this.productions_[Q[1]][1],ht.$=C[C.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],C,o].concat(xe)),typeof Ct<"u")return Ct;if(et)d=d.slice(0,-1*et*2),C=C.slice(0,-1*et),o=o.slice(0,-1*et);d.push(this.productions_[Q[1]][0]),C.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 U={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 C=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=[C[0],C[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
- `+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 U}();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=$g(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}},Ht=0.7,$t=0.2,Ut=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(Ht*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Ht*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=$t*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=$t*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 Ut{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 Ut{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=Aa().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=Aa().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 qt(e,i,s,n){let a=new Pt(n);return new we(a,e,i,s)}t(qt,"getChartTitleComponent");var ke=0.75,Ce=0.5,Se=0.35;function Dt(e){return{fontSize:e,markerSize:e*ke,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Dt,"getLegendLayout");var Re=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 Gt(e,i,s,n){let a=new Pt(n);return new Re(a,e,i,s)}t(Gt,"getChartLegendComponent");var _e=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=sl().y((n)=>n[0]).x((n)=>n[1])(e);else i=sl().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}},Te=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}))}]}},De=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 _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function jt(e,i,s){return new De(e,i,s)}t(jt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:qt(e,i,s,n),plot:jt(e,i,s),legend:Gt(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}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(e,i,s,n).getDrawableElement()}},gt=0,Qt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=Yt(),i=C();return ce(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=C();return ce(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 Kt(e){Qt=e}t(Kt,"setTmpSVGG");function Zt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Zt,"setOrientation");function Jt(e){b.xAxis.title=ot(e.text)}t(Jt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function ee(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(ee,"setXAxisBand");function ie(e){b.yAxis.title=ot(e.text)}t(ie,"setYAxisTitle");function se(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(se,"setYAxisRangeData");function ne(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(ne,"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)ne(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 he(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=H(),Pe.build(ut,b,dt,Qt)}t(he,"getDrawableElem");function le(){return dt}t(le,"getChartThemeConfig");function ge(){return ut}t(ge,"getChartConfig");function ue(){return b}t(ue,"getXYChartData");var Le=t(function(){M(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Ee={getDrawableElem:he,clear:Le,setAccTitle:O,getAccTitle:G,setDiagramTitle:q,getDiagramTitle:H,getAccDescription:j,setAccDescription:z,setOrientation:Zt,setXAxisTitle:Jt,setXAxisRangeData:Bt,setXAxisBand:ee,setYAxisTitle:ie,setYAxisRangeData:se,setLineData:ae,setBarData:oe,setTmpSVGG:Kt,getChartThemeConfig:le,getChartConfig:ge,getXYChartData:ue},Ie=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"),V=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");re(_,c.height,c.width,!0),_.attr("viewBox",`0 0 ${c.width} ${c.height}`),V.attr("fill",h.backgroundColor),a.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));let L=a.getDrawableElem(),E={};function F(w){let X=y,u="";for(let[W]of w.entries()){let N=y;if(W>0&&E[u])N=E[u];if(u+=w[W],X=E[u],!X)X=E[u]=N.append("g").attr("class",w[W])}return X}t(F,"getGroup");for(let w of L){if(w.data.length===0)continue;let X=F(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 W=function(k,J){let{data:T,label:U}=k;return J*U.length*N<=T.width-A};var Z=W;t(W,"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(!W(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 W=function(v,k,J){let{data:T,label:U}=v,r=0.7,g=k*U.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=W;t(W,"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(!W(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"),Me={draw:Ie},Ke={parser:me,db:Ee,renderer:Me};export{Ke as diagram};
5
+ `+g+"^"},"showPosition"),test_match:t(function(r,g){var d,p,C;if(this.options.backtrack_lexer){if(C={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)C.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 C)this[o]=C[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 C=this._currentRules();for(var o=0;o<C.length;o++)if(d=this._input.match(this.rules[C[o]]),d&&(!g||d[0].length>g[0].length)){if(g=d,p=o,this.options.backtrack_lexer)if(r=this.test_match(d,C[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,C[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,C){var o=C;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 U}();k.lexer=J;function _(){this.yy={}}return t(_,"Parser"),_.prototype=k,k.Parser=_,new _}();_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=Vg(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=Aa().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=Aa().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,Ce=0.5,Se=0.35;function Dt(e){return{fontSize:e,markerSize:e*ke,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Dt,"getLegendLayout");var Re=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[S,T]of this.visiblePlots.entries())if(mt(T))x.push({x:h,y:c+S*a,width:i,height:i,fill:T.fill,strokeFill:T.fill,strokeWidth:0});else{let R=c+S*a+i/2;f.push({path:`M ${h},${R} L ${h+i},${R}`,strokeFill:T.strokeFill,strokeWidth:T.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((S,T)=>({text:S.title,x:h+i+s,y:c+T*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 Re(a,e,i,s)}t(qt,"getChartLegendComponent");var _e=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=ll().y((n)=>n[0]).x((n)=>n[1])(e);else i=ll().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 S=this.plotData.pointLabels[c];if(!S)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:S,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}},Te=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}))}]}},De=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 _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(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 De(e,i,s)}t(Gt,"getPlotComponent");var ve=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((S)=>mt(S)))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}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(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=Jt(),i=E();return ue(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=E();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=E();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 ee(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(ee,"setXAxisBand");function ie(e){b.yAxis.title=ot(e.text)}t(ie,"setYAxisTitle");function se(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(se,"setYAxisRangeData");function ne(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(ne,"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)ne(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 he(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=H(),Pe.build(ut,b,dt,jt)}t(he,"getDrawableElem");function le(){return dt}t(le,"getChartThemeConfig");function ce(){return ut}t(ce,"getChartConfig");function ge(){return b}t(ge,"getXYChartData");var Le=t(function(){F(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Ee={getDrawableElem:he,clear:Le,setAccTitle:O,getAccTitle:G,setDiagramTitle:q,getDiagramTitle:H,getAccDescription:j,setAccDescription:z,setOrientation:Kt,setXAxisTitle:Zt,setXAxisRangeData:Bt,setXAxisBand:ee,setYAxisTitle:ie,setYAxisRangeData:se,setLineData:ae,setBarData:oe,setTmpSVGG:Qt,getChartThemeConfig:le,getChartConfig:ce,getXYChartData:ge},Ie=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 S(w){return w==="left"?"start":w==="right"?"end":"middle"}t(S,"getTextAnchor");function T(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(T,"getTextTransformation"),l.debug(`Rendering xychart chart
7
+ `+e);let R=Ae(i),y=R.append("g").attr("class","main"),B=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");re(R,c.height,c.width,!0),R.attr("viewBox",`0 0 ${c.width} ${c.height}`),B.attr("fill",h.backgroundColor),a.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));let P=a.getDrawableElem(),L={};function V(w){let X=y,u="";for(let[W]of w.entries()){let N=y;if(W>0&&L[u])N=L[u];if(u+=w[W],X=L[u],!X)X=L[u]=N.append("g").attr("class",w[W])}return X}t(V,"getGroup");for(let w of P){if(w.data.length===0)continue;let X=V(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 W=function(k,J){let{data:_,label:U}=k;return J*U.length*N<=_.width-A};var Z=W;t(W,"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,_=J.height*0.7;while(!W(k,_)&&_>0)_-=1;return _}),rt=Math.floor(Math.min(...I)),D=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",D).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 W=function(D,k,J){let{data:_,label:U}=D,r=0.7,g=k*U.length*0.7,d=_.x+_.width/2,p=d-g/2,C=d+g/2,o=p>=_.x&&C<=_.x+_.width,st=_.y+J+k<=_.y+_.height;return o&&st};var tt=W;t(W,"fitsInBar");let N=10,A=w.data.map((D,k)=>({data:D,label:x[k].toString()})).filter((D)=>D.data.width>0&&D.data.height>0),it=A.map((D)=>{let{data:k,label:J}=D,_=k.width/(J.length*0.7);while(!W(D,_,N)&&_>0)_-=1;return _}),I=Math.floor(Math.min(...it)),rt=t((D)=>{if(u)return D.data.y-N;else return D.data.y+N},"determineLabelYPosition");X.selectAll("text").data(A).enter().append("text").attr("x",(D)=>D.data.x+D.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((D)=>D.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)=>S(u.horizontalPos)).attr("transform",(u)=>T(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"),Me={draw:Ie},Ke={parser:me,db:Ee,renderer:Me};export{Ke as diagram};
@@ -0,0 +1 @@
1
+ import{rA}from"./index-tq3t3qm4.js";export{rA as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kabmo-labs/kabmo",
3
- "version": "0.57.0",
3
+ "version": "0.58.0",
4
4
  "description": "Web console and diagnostic workbench for AI coding agents: Elysia + Preact on Bun.",
5
5
  "license": "MIT",
6
6
  "author": "Wijanarko Putra Rajeb <wijanarko.rajeb@gmail.com>",
@@ -104,17 +104,17 @@
104
104
  "tailwindcss": "^4.1.14",
105
105
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
106
106
  "yaml": "^2.9.1",
107
- "@kabmo-labs/kabmo-acp": "1.1.0",
108
- "@kabmo-labs/kabmo-app-contracts": "1.0.0",
107
+ "@kabmo-labs/kabmo-acp": "1.2.0",
108
+ "@kabmo-labs/kabmo-app-contracts": "1.1.0",
109
109
  "@kabmo-labs/kabmo-auth": "1.0.0",
110
110
  "@kabmo-labs/kabmo-bytes": "1.0.0",
111
- "@kabmo-labs/kabmo-chat": "1.2.0",
111
+ "@kabmo-labs/kabmo-chat": "1.3.0",
112
112
  "@kabmo-labs/kabmo-db": "1.0.0",
113
113
  "@kabmo-labs/kabmo-format": "1.0.0",
114
114
  "@kabmo-labs/kabmo-fs": "1.0.0",
115
115
  "@kabmo-labs/kabmo-git": "1.0.0",
116
116
  "@kabmo-labs/kabmo-guards": "1.0.0",
117
- "@kabmo-labs/kabmo-harness": "1.0.0",
117
+ "@kabmo-labs/kabmo-harness": "1.1.0",
118
118
  "@kabmo-labs/kabmo-http": "1.0.0",
119
119
  "@kabmo-labs/kabmo-idle-reaper": "1.0.0",
120
120
  "@kabmo-labs/kabmo-live-sessions": "1.0.0",
@@ -132,7 +132,7 @@
132
132
  "@kabmo-labs/kabmo-sdk": "0.5.0",
133
133
  "@kabmo-labs/kabmo-session": "1.0.0",
134
134
  "@kabmo-labs/kabmo-settings": "1.0.0",
135
- "@kabmo-labs/kabmo-ui": "0.0.4",
135
+ "@kabmo-labs/kabmo-ui": "0.0.5",
136
136
  "@kabmo-labs/kabmo-workspace": "1.0.0",
137
137
  "@kabmo-labs/kabmo-worktree": "1.0.0"
138
138
  },
@@ -1,6 +1,17 @@
1
+ import type { ThemePalette } from '@kabmo-labs/kabmo-app-contracts/theme';
2
+
1
3
  export interface KabmoBootstrap {
2
4
  initialIsMobile: boolean;
3
5
  appSettings: Record<string, unknown>;
6
+ /**
7
+ * The user palettes, present even for an unauthenticated visitor.
8
+ *
9
+ * They are presentation, like the palette id itself: without them the login
10
+ * screen is served in a custom theme and the client then resolves that id to
11
+ * the shipped default, repainting the page one frame later. They carry eight
12
+ * colours and a name, never a stored preference.
13
+ */
14
+ customThemes?: ThemePalette[];
4
15
  /**
5
16
  * Whether the serving Kabmo runs in production (`NODE_ENV=production`).
6
17
  * Gates development-only chrome (the desktop ⇄ mobile layout switch).
@@ -61,13 +61,12 @@
61
61
  * is what a plugin's `@scope`d stylesheet (0,1,0) has to lose against — a
62
62
  * plugin must not bring a hairline back into a borderless shell.
63
63
  *
64
- * The published hairline tokens are cleared too, because a component that reads
65
- * one of them directly (the chrome rim, a dialog's rim) would otherwise keep the
66
- * one line the utility rules no longer paint.
64
+ * The published hairline token is cleared too, because a component that reads
65
+ * it directly (the chrome rim, a dialog's rim) would otherwise keep the one
66
+ * line the utility rules no longer paint.
67
67
  */
68
68
 
69
69
  :root[data-borders="borderless"] {
70
- --ink-hairline: transparent;
71
70
  --glass-hairline: transparent;
72
71
  }
73
72
 
@@ -145,7 +145,7 @@ export const LoginScreen: FunctionComponent = () => {
145
145
  </button>
146
146
 
147
147
  {error && (
148
- <p role="alert" className="text-xs text-error text-center">
148
+ <p role="alert" className="text-xs text-error-text text-center">
149
149
  {error}
150
150
  </p>
151
151
  )}
@@ -107,7 +107,7 @@ export function ComposerPicker({
107
107
 
108
108
  <div className="flex-1 overflow-y-auto">
109
109
  {error ? (
110
- <div className="px-3 py-2 text-error">{error}</div>
110
+ <div className="px-3 py-2 text-error-text">{error}</div>
111
111
  ) : loading && items.length === 0 ? (
112
112
  <div className="px-3 py-2 text-ink/50">Loading…</div>
113
113
  ) : items.length === 0 ? (
@@ -51,7 +51,7 @@ export function CopyButton({
51
51
  className = DEFAULT_CLASSNAME,
52
52
  iconSize = 10,
53
53
  iconClassName,
54
- copiedIconClassName = 'text-success',
54
+ copiedIconClassName = 'text-success-text',
55
55
  label,
56
56
  copiedLabel = 'Copied',
57
57
  wrapLabel = false,
@@ -169,7 +169,7 @@ export function FolderPicker({ initialPath, onSelect, onClose }: FolderPickerPro
169
169
  <Loader2 size={18} className="animate-spin" />
170
170
  </div>
171
171
  ) : error ? (
172
- <div className="flex flex-col items-center justify-center h-40 text-xs text-error space-y-2 px-4">
172
+ <div className="flex flex-col items-center justify-center h-40 text-xs text-error-text space-y-2 px-4">
173
173
  <span>{error}</span>
174
174
  <button
175
175
  type="button"
@@ -12,8 +12,8 @@ interface SubagentStatusIconProps {
12
12
  * circle (`live === false`). */
13
13
  export function SubagentStatusIcon({ status, live, size = 12 }: SubagentStatusIconProps) {
14
14
  const iconProps = { size, strokeWidth: 2, 'aria-hidden': true as const };
15
- if (status === 'completed') return <CheckCircle2 {...iconProps} className="text-success" />;
16
- if (status === 'failed') return <CircleAlert {...iconProps} className="text-error" />;
15
+ if (status === 'completed') return <CheckCircle2 {...iconProps} className="text-success-text" />;
16
+ if (status === 'failed') return <CircleAlert {...iconProps} className="text-error-text" />;
17
17
  if (status === 'aborted') return <Ban {...iconProps} className="text-ink/40" />;
18
18
  if (live === false) return <Circle {...iconProps} className="text-ink/30" />;
19
19
  const dot = Math.max(5, Math.round(size / 2));
@@ -150,7 +150,7 @@ export function BrowserViewportSelector({
150
150
  <Icon size={13} className="text-ink/60" />
151
151
  <span>{opt.label}</span>
152
152
  </div>
153
- {isSelected && <Check size={12} className="text-success" />}
153
+ {isSelected && <Check size={12} className="text-success-text" />}
154
154
  </button>
155
155
  );
156
156
  })}
@@ -180,7 +180,7 @@ export function BrowserViewportSelector({
180
180
  <Icon size={13} className="text-ink/60" />
181
181
  <span>{opt.label}</span>
182
182
  </div>
183
- {isSelected && <Check size={12} className="text-success" />}
183
+ {isSelected && <Check size={12} className="text-success-text" />}
184
184
  </button>
185
185
  );
186
186
  })}
@@ -146,7 +146,7 @@ export function BatchActionBar({
146
146
  type="button"
147
147
  onClick={onDelete}
148
148
  disabled={actionDisabled}
149
- className="min-w-0 w-full h-7 flex items-center justify-center gap-1 px-2 rounded bg-error text-canvas text-[11px] font-semibold hover:opacity-90 transition-opacity cursor-pointer disabled:opacity-40"
149
+ className="min-w-0 w-full h-7 flex items-center justify-center gap-1 px-2 rounded bg-error text-error-on text-[11px] font-semibold hover:opacity-90 transition-opacity cursor-pointer disabled:opacity-40"
150
150
  >
151
151
  {busy ? (
152
152
  <>