@foris/ai-agent 0.2.0 → 0.4.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 (401) hide show
  1. package/dist/abap-Y8Dl9g_6.js +6 -0
  2. package/dist/actionscript-3-DZzbMeqX.js +6 -0
  3. package/dist/ada-vP6ak0IW.js +6 -0
  4. package/dist/ai-agent.es.js +6 -1391
  5. package/dist/ai-agent.umd.js +3374 -103
  6. package/dist/ai-chat-panel/ChatPanel.d.ts +1 -1
  7. package/dist/ai-chat-panel/chatPanel.constants.d.ts +17 -0
  8. package/dist/ai-prompt-code-editor/PromptCodeEditor.d.ts +15 -0
  9. package/dist/ai-prompt-code-editor/index.d.ts +1 -0
  10. package/dist/ai-prompt-code-editor/promptCodeEditor.mock.d.ts +5 -0
  11. package/dist/andromeeda-BIpZ7gaU.js +4 -0
  12. package/dist/angular-html-DPB4Rf0C.js +32 -0
  13. package/dist/angular-ts-CeqPwKaz.js +24 -0
  14. package/dist/apache-BUjz-sD2.js +6 -0
  15. package/dist/apex-oLhhs58q.js +6 -0
  16. package/dist/apl-Bfz1rp5e.js +17 -0
  17. package/dist/applescript-BPx7YFFu.js +6 -0
  18. package/dist/ara-Z2fSOxSw.js +6 -0
  19. package/dist/arc-CYayZuAl.js +85 -0
  20. package/dist/architectureDiagram-VXUJARFQ-CqFKxLlH.js +4674 -0
  21. package/dist/asciidoc-B-pCoB3G.js +6 -0
  22. package/dist/asm-BTWLY5ym.js +6 -0
  23. package/dist/astro-CFFExE8Q.js +18 -0
  24. package/dist/aurora-x-BwoVEUWZ.js +4 -0
  25. package/dist/awk-Fb0P9dkn.js +6 -0
  26. package/dist/ayu-dark-CxPZkpb2.js +4 -0
  27. package/dist/ballerina-oZK-YekG.js +6 -0
  28. package/dist/bat-0FvbqU9S.js +6 -0
  29. package/dist/beancount-DqJEb89h.js +6 -0
  30. package/dist/berry-DODBq_Ff.js +6 -0
  31. package/dist/bibtex-EULQRLY5.js +6 -0
  32. package/dist/bicep-BorU73w0.js +6 -0
  33. package/dist/blade-DRRSiTQz.js +21 -0
  34. package/dist/blockDiagram-VD42YOAC-DEi-xIcu.js +2407 -0
  35. package/dist/bsl-NkNNwerW.js +8 -0
  36. package/dist/c-eeMepfLm.js +6 -0
  37. package/dist/c4Diagram-YG6GDRKO-mFZhX_-U.js +1585 -0
  38. package/dist/cadence-02UX7mW8.js +6 -0
  39. package/dist/cairo-DM6WF2e3.js +8 -0
  40. package/dist/catppuccin-frappe-D3cH2rXe.js +4 -0
  41. package/dist/catppuccin-latte-C0LRGUW4.js +4 -0
  42. package/dist/catppuccin-macchiato-c5wQ11TT.js +4 -0
  43. package/dist/catppuccin-mocha-WMD6Qvya.js +4 -0
  44. package/dist/channel-CbDO3juL.js +5 -0
  45. package/dist/chunk-4BX2VUAB-D5qkn5BA.js +9 -0
  46. package/dist/chunk-55IACEB6-CR8xZK7z.js +8 -0
  47. package/dist/chunk-B4BG7PRW-Cm3F2ypm.js +1377 -0
  48. package/dist/chunk-DI55MBZ5-CxISwEU9.js +1383 -0
  49. package/dist/chunk-FMBD7UC4-DZxSUJCY.js +19 -0
  50. package/dist/chunk-QN33PNHL-5NUdQ31M.js +20 -0
  51. package/dist/chunk-QZHKN3VN-CSeHgX9s.js +15 -0
  52. package/dist/chunk-TZMSLE5B-DfqMo2XK.js +64 -0
  53. package/dist/clarity-PKm5CwqM.js +6 -0
  54. package/dist/classDiagram-2ON5EDUG-6wC7c07U.js +22 -0
  55. package/dist/classDiagram-v2-WZHVMYZB-6wC7c07U.js +22 -0
  56. package/dist/clojure-CXJfHrL3.js +6 -0
  57. package/dist/cmake-BJz8BOTU.js +6 -0
  58. package/dist/cobol-DYTFdEK1.js +12 -0
  59. package/dist/code-block-QI2IAROF-zqFu2qJj.js +2812 -0
  60. package/dist/codeowners-Bt9yU6NX.js +6 -0
  61. package/dist/codeql-DHkodjjI.js +6 -0
  62. package/dist/coffee-DGBR_nr_.js +8 -0
  63. package/dist/common-lisp-EVqT9Zhp.js +6 -0
  64. package/dist/components/ai-elements/artifact.d.ts +23 -0
  65. package/dist/components/ai-elements/canvas.d.ts +7 -0
  66. package/dist/components/ai-elements/chain-of-thought.d.ts +29 -0
  67. package/dist/components/ai-elements/checkpoint.d.ts +11 -0
  68. package/dist/components/ai-elements/code-block.d.ts +17 -0
  69. package/dist/components/ai-elements/confirmation.d.ts +49 -0
  70. package/dist/components/ai-elements/connection.d.ts +2 -0
  71. package/dist/components/ai-elements/context.d.ts +32 -0
  72. package/dist/components/ai-elements/controls.d.ts +4 -0
  73. package/dist/components/ai-elements/conversation.d.ts +15 -0
  74. package/dist/components/ai-elements/edge.d.ts +5 -0
  75. package/dist/components/ai-elements/image.d.ts +6 -0
  76. package/dist/components/ai-elements/inline-citation.d.ts +38 -0
  77. package/dist/components/ai-elements/loader.d.ts +5 -0
  78. package/dist/components/ai-elements/message.d.ts +46 -0
  79. package/dist/components/ai-elements/model-selector.d.ts +35 -0
  80. package/dist/components/ai-elements/node.d.ts +21 -0
  81. package/dist/components/ai-elements/open-in-chat.d.ts +28 -0
  82. package/dist/components/ai-elements/panel.d.ts +5 -0
  83. package/dist/components/ai-elements/plan.d.ts +25 -0
  84. package/dist/components/ai-elements/prompt-input.d.ts +187 -0
  85. package/dist/components/ai-elements/queue.d.ts +61 -0
  86. package/dist/components/ai-elements/reasoning.d.ts +26 -0
  87. package/dist/components/ai-elements/shimmer.d.ts +9 -0
  88. package/dist/components/ai-elements/sources.d.ts +12 -0
  89. package/dist/components/ai-elements/suggestion.d.ts +10 -0
  90. package/dist/components/ai-elements/task.d.ts +14 -0
  91. package/dist/components/ai-elements/tool.d.ts +23 -0
  92. package/dist/components/ai-elements/toolbar.d.ts +5 -0
  93. package/dist/components/ai-elements/web-preview.d.ts +34 -0
  94. package/dist/components/ui/alert.d.ts +9 -0
  95. package/dist/components/ui/badge.d.ts +9 -0
  96. package/dist/components/ui/button-group.d.ts +12 -0
  97. package/dist/components/ui/button.d.ts +10 -0
  98. package/dist/components/ui/card.d.ts +9 -0
  99. package/dist/components/ui/carousel.d.ts +19 -0
  100. package/dist/components/ui/collapsible.d.ts +6 -0
  101. package/dist/components/ui/command.d.ts +18 -0
  102. package/dist/components/ui/dialog.d.ts +15 -0
  103. package/dist/components/ui/dropdown-menu.d.ts +25 -0
  104. package/dist/components/ui/hover-card.d.ts +6 -0
  105. package/dist/components/ui/input-group.d.ts +16 -0
  106. package/dist/components/ui/input.d.ts +3 -0
  107. package/dist/components/ui/progress.d.ts +4 -0
  108. package/dist/components/ui/scroll-area.d.ts +5 -0
  109. package/dist/components/ui/select.d.ts +15 -0
  110. package/dist/components/ui/separator.d.ts +4 -0
  111. package/dist/components/ui/textarea.d.ts +3 -0
  112. package/dist/components/ui/tooltip.d.ts +7 -0
  113. package/dist/coq-B0L9upzn.js +6 -0
  114. package/dist/cose-bilkent-S5V4N54A-BzL4MMWZ.js +2612 -0
  115. package/dist/cpp-ZFnOq6fV.js +19 -0
  116. package/dist/crystal-CRJyc4G-.js +18 -0
  117. package/dist/csharp-C7yUs7-w.js +6 -0
  118. package/dist/css-CECN5uSL.js +6 -0
  119. package/dist/csv-CmYOceLb.js +6 -0
  120. package/dist/cue-ZzumE7IT.js +6 -0
  121. package/dist/cypher-jpdmjtA6.js +6 -0
  122. package/dist/cytoscape.esm-ClN43hhW.js +18846 -0
  123. package/dist/d-CBagWSwH.js +6 -0
  124. package/dist/dagre-6UL2VRFP-CwTDE2RX.js +451 -0
  125. package/dist/dark-plus-pUHDTVV0.js +4 -0
  126. package/dist/dart-6ObCrKr9.js +6 -0
  127. package/dist/dax-CcDT-8dH.js +6 -0
  128. package/dist/defaultLocale-DcQU6Vee.js +177 -0
  129. package/dist/desktop-B93p9R9O.js +6 -0
  130. package/dist/diagram-PSM6KHXK-UeQhynP7.js +544 -0
  131. package/dist/diagram-QEK2KX5R-DZy1cp9G.js +224 -0
  132. package/dist/diagram-S2PKOQOG-DyT7Ss8-.js +146 -0
  133. package/dist/diff-BxzP2J8R.js +6 -0
  134. package/dist/docker-CsHqm9tx.js +6 -0
  135. package/dist/dotenv-BMjVjUL1.js +6 -0
  136. package/dist/dracula-BtZx2Kac.js +4 -0
  137. package/dist/dracula-soft-BKa-aqBv.js +4 -0
  138. package/dist/dream-maker-PAx17jaB.js +6 -0
  139. package/dist/edge-B882-fmN.js +14 -0
  140. package/dist/elixir-DRzNHQCz.js +10 -0
  141. package/dist/elm-DZPAA5Qn.js +9 -0
  142. package/dist/emacs-lisp-Cfxdx5D-.js +6 -0
  143. package/dist/erDiagram-Q2GNP2WA-CpzaErVm.js +846 -0
  144. package/dist/erb-DB1DqdBc.js +27 -0
  145. package/dist/erlang-DNcDT8Hi.js +8 -0
  146. package/dist/everforest-dark-DMCBqXCK.js +4 -0
  147. package/dist/everforest-light-BbXl82Em.js +4 -0
  148. package/dist/fennel-N4WcXuKx.js +6 -0
  149. package/dist/fish-BTDEUgqH.js +6 -0
  150. package/dist/flowDiagram-NV44I4VS-BHP6h-eN.js +1631 -0
  151. package/dist/fluent-BMXUxfv1.js +6 -0
  152. package/dist/fortran-fixed-form-DUsA-VGo.js +8 -0
  153. package/dist/fortran-free-form-DPIT_jbP.js +6 -0
  154. package/dist/fsharp-CYOiIVNx.js +8 -0
  155. package/dist/ganttDiagram-JELNMOA3-0qqei9Bz.js +2702 -0
  156. package/dist/gdresource-BwtMIoBm.js +10 -0
  157. package/dist/gdscript-BifyeYhI.js +6 -0
  158. package/dist/gdshader-Bk8fF6yr.js +6 -0
  159. package/dist/genie-DzUvd7U9.js +6 -0
  160. package/dist/gherkin-DHRaV0YP.js +6 -0
  161. package/dist/git-commit-Bd32YZ0K.js +8 -0
  162. package/dist/git-rebase-ZWUFO_T4.js +8 -0
  163. package/dist/gitGraphDiagram-NY62KEGX-DGukWnfa.js +715 -0
  164. package/dist/github-dark-DenFmJkN.js +4 -0
  165. package/dist/github-dark-default-BJPUVz4H.js +4 -0
  166. package/dist/github-dark-dimmed-DUshB20C.js +4 -0
  167. package/dist/github-dark-high-contrast-D3aGCnF8.js +4 -0
  168. package/dist/github-light-JYsPkUQd.js +4 -0
  169. package/dist/github-light-default-D99KPAby.js +4 -0
  170. package/dist/github-light-high-contrast-BbmZE-Mp.js +4 -0
  171. package/dist/gleam-Bv284lvN.js +6 -0
  172. package/dist/glimmer-js-DkxNrfPT.js +14 -0
  173. package/dist/glimmer-ts-D6YZEmK_.js +14 -0
  174. package/dist/glsl-CkUcVZNK.js +8 -0
  175. package/dist/gnuplot-yPG9-sE_.js +6 -0
  176. package/dist/go-ChxJuLYK.js +6 -0
  177. package/dist/graph-DB2UxkYH.js +1190 -0
  178. package/dist/graphql-CBu2ehBn.js +14 -0
  179. package/dist/groovy-CJQTphOW.js +6 -0
  180. package/dist/gruvbox-dark-hard-C5HOtKIh.js +4 -0
  181. package/dist/gruvbox-dark-medium-FVgwJHuz.js +4 -0
  182. package/dist/gruvbox-dark-soft-B46F314v.js +4 -0
  183. package/dist/gruvbox-light-hard-CJD38wDZ.js +4 -0
  184. package/dist/gruvbox-light-medium-BlIhMYTA.js +4 -0
  185. package/dist/gruvbox-light-soft-DoPHyLVZ.js +4 -0
  186. package/dist/hack-DVWgrvc2.js +12 -0
  187. package/dist/haml-NZLVzu_R.js +10 -0
  188. package/dist/handlebars-mxStpSE7.js +14 -0
  189. package/dist/haskell-WeIwNIP6.js +6 -0
  190. package/dist/haxe-TztHsm5T.js +6 -0
  191. package/dist/hcl-D438OF-I.js +6 -0
  192. package/dist/hjson-DYBUbqOl.js +6 -0
  193. package/dist/hlsl-Bk8TCZNL.js +6 -0
  194. package/dist/hooks/useCodeTransform.d.ts +13 -0
  195. package/dist/houston-BDYrDoDW.js +4 -0
  196. package/dist/html-B50bmoVb.js +10 -0
  197. package/dist/html-derivative-ByyNxAP5.js +10 -0
  198. package/dist/http-BVIWqb92.js +19 -0
  199. package/dist/hurl-B8OTiYoQ.js +17 -0
  200. package/dist/hxml-GbqSQCLa.js +8 -0
  201. package/dist/hy-Brt5EZ7-.js +6 -0
  202. package/dist/imba-CimUv-Uh.js +6 -0
  203. package/dist/index-Zd10d_CE.js +52486 -0
  204. package/dist/index.d.ts +2 -2
  205. package/dist/infoDiagram-WHAUD3N6-CRWuQBon.js +27 -0
  206. package/dist/ini-BZIuRIvJ.js +6 -0
  207. package/dist/init-DjUOC4st.js +16 -0
  208. package/dist/java-DY6VlHhP.js +6 -0
  209. package/dist/javascript-C25yR2R2.js +6 -0
  210. package/dist/jinja-CI-LSgSv.js +13 -0
  211. package/dist/jison-DdreslRX.js +8 -0
  212. package/dist/journeyDiagram-XKPGCS4Q-Bl-asDPd.js +840 -0
  213. package/dist/json-DxJze_jm.js +6 -0
  214. package/dist/json5-BT4Fjg39.js +6 -0
  215. package/dist/jsonc-CHjZD8gR.js +6 -0
  216. package/dist/jsonl-BGuvDmy9.js +6 -0
  217. package/dist/jsonnet-Bx2cfsXg.js +6 -0
  218. package/dist/jssm-BcADi6EI.js +6 -0
  219. package/dist/jsx-BtKADgXT.js +6 -0
  220. package/dist/julia-ll8P6QXy.js +19 -0
  221. package/dist/kanagawa-dragon-CiKur4Hl.js +4 -0
  222. package/dist/kanagawa-lotus-BKu-smKu.js +4 -0
  223. package/dist/kanagawa-wave-CQwozSzG.js +4 -0
  224. package/dist/kanban-definition-3W4ZIXB7-IdguZzXg.js +724 -0
  225. package/dist/katex.min-l0sNRNKZ.js +1 -0
  226. package/dist/kdl-BNOv9TC3.js +6 -0
  227. package/dist/kotlin-ByBMgTeR.js +6 -0
  228. package/dist/kusto-VWFLl2T0.js +6 -0
  229. package/dist/laserwave-6a00oqik.js +4 -0
  230. package/dist/latex-DF20280u.js +9 -0
  231. package/dist/layout-Q6wQN5dr.js +1730 -0
  232. package/dist/lean-D5yRrexI.js +6 -0
  233. package/dist/less-B1GLI2Di.js +6 -0
  234. package/dist/lib/utils.d.ts +2 -0
  235. package/dist/light-plus-CZuVqSLX.js +4 -0
  236. package/dist/linear-CRqCHTKs.js +277 -0
  237. package/dist/liquid-CHzkx3jT.js +14 -0
  238. package/dist/llvm-co1rIKs3.js +6 -0
  239. package/dist/log-Al8wyEFV.js +6 -0
  240. package/dist/logo-DBa4JDzV.js +6 -0
  241. package/dist/lua-kX5WP_P5.js +8 -0
  242. package/dist/luau-DtBSxLyz.js +6 -0
  243. package/dist/make-CsMclxtr.js +6 -0
  244. package/dist/markdown-CrScaQ96.js +6 -0
  245. package/dist/marko-ls0Jg2j8.js +14 -0
  246. package/dist/material-theme-D6KBX41T.js +4 -0
  247. package/dist/material-theme-darker-CkRroheE.js +4 -0
  248. package/dist/material-theme-lighter-BUBw43Yz.js +4 -0
  249. package/dist/material-theme-ocean-ClGX14Ja.js +4 -0
  250. package/dist/material-theme-palenight-C1RVm8K1.js +4 -0
  251. package/dist/matlab-BOAaUVP0.js +6 -0
  252. package/dist/mdc-DIP5_jeM.js +15 -0
  253. package/dist/mdx-BOhZZUJ8.js +6 -0
  254. package/dist/mermaid-B0ixDHKN.js +6 -0
  255. package/dist/mermaid-NA5CF7SZ-CkTMfgBy.js +6 -0
  256. package/dist/mermaid.core-DyFxH-Px.js +14414 -0
  257. package/dist/min-dark-C7ak0t6c.js +4 -0
  258. package/dist/min-light-CKFxVcPp.js +4 -0
  259. package/dist/mindmap-definition-VGOIOE7T-C8jP5oWr.js +790 -0
  260. package/dist/mipsasm-CTx18fBl.js +6 -0
  261. package/dist/mojo-BD611d7o.js +6 -0
  262. package/dist/monokai-C1KBYcO0.js +4 -0
  263. package/dist/move-F-dICmj2.js +6 -0
  264. package/dist/narrat-DmhDCBs-.js +6 -0
  265. package/dist/nextflow-DmSVRGjG.js +6 -0
  266. package/dist/nginx-COxS3qoU.js +9 -0
  267. package/dist/night-owl-Bm2rzalh.js +4 -0
  268. package/dist/nim-CCwXZLHG.js +21 -0
  269. package/dist/nix-BZK5F767.js +9 -0
  270. package/dist/nord-CC5OiUXg.js +4 -0
  271. package/dist/nushell-D8j3dhT-.js +6 -0
  272. package/dist/objective-c-Itk8tzmv.js +6 -0
  273. package/dist/objective-cpp-DGt5UKRO.js +6 -0
  274. package/dist/ocaml-eSVK32Eg.js +6 -0
  275. package/dist/one-dark-pro-DTA3VF0_.js +4 -0
  276. package/dist/one-light-D9sNaUtq.js +4 -0
  277. package/dist/openscad-Sp5uZ6f2.js +6 -0
  278. package/dist/ordinal-MUacOSdK.js +65 -0
  279. package/dist/pascal-xy8pJNns.js +6 -0
  280. package/dist/perl-NvKK8p2P.js +17 -0
  281. package/dist/php-CK5hNnT0.js +19 -0
  282. package/dist/pieDiagram-ADFJNKIX-DuP0zFKX.js +166 -0
  283. package/dist/pkl-C-zSNmaA.js +6 -0
  284. package/dist/plastic-CSTz3KZp.js +4 -0
  285. package/dist/plsql-pVbGZfOv.js +6 -0
  286. package/dist/po-BNfHvqmm.js +6 -0
  287. package/dist/poimandres-C-VADXHD.js +4 -0
  288. package/dist/polar-CAZahv3u.js +6 -0
  289. package/dist/postcss-05aHdL-n.js +6 -0
  290. package/dist/powerquery-DI9HkTvs.js +6 -0
  291. package/dist/powershell-Clc4ydu-.js +6 -0
  292. package/dist/prisma-FZjmVtSl.js +6 -0
  293. package/dist/prolog-C5-yg4TO.js +6 -0
  294. package/dist/proto-MmCPeFAD.js +6 -0
  295. package/dist/pug-XOw9Q1Ho.js +12 -0
  296. package/dist/puppet-CUJHmnxV.js +6 -0
  297. package/dist/purescript-rUfGld-4.js +6 -0
  298. package/dist/python-BFNSHbwJ.js +6 -0
  299. package/dist/qml-rTNXsquU.js +8 -0
  300. package/dist/qmldir-BInDYbpo.js +6 -0
  301. package/dist/qss-AeJTysr_.js +6 -0
  302. package/dist/quadrantDiagram-AYHSOK5B-ACKBMWQA.js +1030 -0
  303. package/dist/r-Bm0uF0U2.js +6 -0
  304. package/dist/racket-B83wSAja.js +6 -0
  305. package/dist/raku-nEQ4ZJJ7.js +6 -0
  306. package/dist/razor-CoqPuKQU.js +12 -0
  307. package/dist/red-7y8PH7HH.js +4 -0
  308. package/dist/reg-m_s_Kiip.js +6 -0
  309. package/dist/regexp-BazyLpPg.js +6 -0
  310. package/dist/rel-BcRfyd6Q.js +6 -0
  311. package/dist/requirementDiagram-UZGBJVZJ-DAH6cyPg.js +856 -0
  312. package/dist/riscv-Ce8MAQLP.js +6 -0
  313. package/dist/rose-pine-BKc3yVeu.js +4 -0
  314. package/dist/rose-pine-dawn-BulJcPZT.js +4 -0
  315. package/dist/rose-pine-moon-j6jiXKV8.js +4 -0
  316. package/dist/rosmsg-Cz0w1km8.js +6 -0
  317. package/dist/rst-AoEjemIj.js +36 -0
  318. package/dist/ruby-CGSl8JoB.js +36 -0
  319. package/dist/rust-CLzF9zIN.js +6 -0
  320. package/dist/sankeyDiagram-TZEHDZUN-DpLK8yNI.js +830 -0
  321. package/dist/sas-fpEvgATw.js +8 -0
  322. package/dist/sass-DxHp5rTx.js +6 -0
  323. package/dist/scala-D4grkFkl.js +6 -0
  324. package/dist/scheme-BCRWuEm4.js +6 -0
  325. package/dist/scss-B1FaCqwR.js +8 -0
  326. package/dist/sdbl-B7T8abf4.js +6 -0
  327. package/dist/sequenceDiagram-WL72ISMW-CslcsjON.js +2526 -0
  328. package/dist/shaderlab-Cr62-Wb4.js +8 -0
  329. package/dist/shellscript-InADTalH.js +6 -0
  330. package/dist/shellsession-DiDJNQdy.js +8 -0
  331. package/dist/slack-dark-i7wN4OET.js +4 -0
  332. package/dist/slack-ochin-ndHf0LoP.js +4 -0
  333. package/dist/smalltalk-BlI1_OkM.js +6 -0
  334. package/dist/snazzy-light-BlSJXAu4.js +4 -0
  335. package/dist/solarized-dark-UTmkh7lw.js +4 -0
  336. package/dist/solarized-light-BheCkDPT.js +4 -0
  337. package/dist/solidity-DUWnFhS6.js +6 -0
  338. package/dist/soy-YPoZ1G2p.js +10 -0
  339. package/dist/sparql-B0KWFEri.js +8 -0
  340. package/dist/splunk-CRXR8A9s.js +6 -0
  341. package/dist/sql-Cn_v3PB0.js +6 -0
  342. package/dist/ssh-config-DP-hNVbF.js +6 -0
  343. package/dist/stata-B8c5fTjX.js +8 -0
  344. package/dist/stateDiagram-FKZM4ZOC-oVuJ6JZY.js +268 -0
  345. package/dist/stateDiagram-v2-4FDKWEC3-Dw3L9jZX.js +21 -0
  346. package/dist/style.css +1 -1
  347. package/dist/stylus-CyKEU1Ej.js +6 -0
  348. package/dist/svelte-5UasyOg7.js +14 -0
  349. package/dist/swift-9UzSvamq.js +6 -0
  350. package/dist/synthwave-84-NU3C_KFZ.js +4 -0
  351. package/dist/system-verilog-BCm7smPJ.js +6 -0
  352. package/dist/systemd-C-4qm6XH.js +6 -0
  353. package/dist/tailwind.css +178 -0
  354. package/dist/talonscript-CFF3LF_O.js +6 -0
  355. package/dist/tasl-Cg_WBUAe.js +6 -0
  356. package/dist/tcl-DN7buRTF.js +6 -0
  357. package/dist/templ-peLZIM2D.js +12 -0
  358. package/dist/terraform-DGvcn9zM.js +6 -0
  359. package/dist/tex-DpOayVob.js +8 -0
  360. package/dist/timeline-definition-IT6M3QCI-D_aGDXh0.js +805 -0
  361. package/dist/tokyo-night-DP4TmcQl.js +4 -0
  362. package/dist/toml-DY62mUL_.js +6 -0
  363. package/dist/treemap-KMMF4GRG-D_L55G0b.js +15045 -0
  364. package/dist/ts-tags-CWmBp2js.js +43 -0
  365. package/dist/tsv-BtvSkaG0.js +6 -0
  366. package/dist/tsx-B8rCNbgL.js +6 -0
  367. package/dist/turtle-_H59FV7D.js +6 -0
  368. package/dist/twig-Cpoho6oi.js +35 -0
  369. package/dist/typescript-RycA9KXf.js +6 -0
  370. package/dist/typespec-DWqp-kUU.js +6 -0
  371. package/dist/typst-D_1QKWns.js +6 -0
  372. package/dist/v-BPCNiyYe.js +6 -0
  373. package/dist/vala-uxaPR7d1.js +6 -0
  374. package/dist/vb-D8_c5-KN.js +6 -0
  375. package/dist/verilog-B-bybjPF.js +6 -0
  376. package/dist/vesper-BckBta1U.js +4 -0
  377. package/dist/vhdl-CUlNa8ac.js +6 -0
  378. package/dist/viml-DsfA-sWm.js +6 -0
  379. package/dist/vitesse-black-BoGvW84i.js +4 -0
  380. package/dist/vitesse-dark-Cym-eLtO.js +4 -0
  381. package/dist/vitesse-light-CcmG315c.js +4 -0
  382. package/dist/vue-DmFKWfEU.js +31 -0
  383. package/dist/vue-html-BB2aI7Yc.js +15 -0
  384. package/dist/vue-vine-CznNap4x.js +24 -0
  385. package/dist/vyper-CPQuu50u.js +6 -0
  386. package/dist/wasm-BBXxrAl7.js +6 -0
  387. package/dist/wasm-DQxwEHae.js +7 -0
  388. package/dist/wenyan-pbVjoM9_.js +6 -0
  389. package/dist/wgsl-DY4iK1q1.js +6 -0
  390. package/dist/wikitext-Z-MoUasO.js +6 -0
  391. package/dist/wit-CQMQOlTg.js +6 -0
  392. package/dist/wolfram-Dz4KXISs.js +6 -0
  393. package/dist/xml-C2J0sS9M.js +8 -0
  394. package/dist/xsl-CbTBIiv3.js +9 -0
  395. package/dist/xychartDiagram-PRI3JC2R-u3osfT09.js +1345 -0
  396. package/dist/yaml-DaO7k5B1.js +6 -0
  397. package/dist/zenscript-CxBjpf9c.js +6 -0
  398. package/dist/zig-Vm0PO9wB.js +6 -0
  399. package/package.json +36 -7
  400. package/dist/ai-input-action/InputAction.d.ts +0 -8
  401. package/dist/ai-input-action/index.d.ts +0 -1
@@ -0,0 +1,1345 @@
1
+ import { _ as a, ak as gi, l as Xt, a9 as Wt, a1 as xi, G as St, F as Nt, E as di, i as fi, p as Yt, s as pi, g as mi, o as yi, b as bi, c as Ai, v as wi, K as Ci, k as Si } from "./mermaid.core-DyFxH-Px.js";
2
+ import { i as _i } from "./init-DjUOC4st.js";
3
+ import { o as ki } from "./ordinal-MUacOSdK.js";
4
+ import { l as zt } from "./linear-CRqCHTKs.js";
5
+ import "./index-Zd10d_CE.js";
6
+ import "react";
7
+ import "react-dom";
8
+ import "./defaultLocale-DcQU6Vee.js";
9
+ function Ri(e, t, i) {
10
+ e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
11
+ for (var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n; )
12
+ o[s] = e + s * i;
13
+ return o;
14
+ }
15
+ function yt() {
16
+ var e = ki().unknown(void 0), t = e.domain, i = e.range, s = 0, n = 1, o, g, m = !1, p = 0, k = 0, v = 0.5;
17
+ delete e.unknown;
18
+ function C() {
19
+ var b = t().length, E = n < s, D = E ? n : s, P = E ? s : n;
20
+ o = (P - D) / Math.max(1, b - p + k * 2), m && (o = Math.floor(o)), D += (P - D - o * (b - p)) * v, g = o * (1 - p), m && (D = Math.round(D), g = Math.round(g));
21
+ var I = Ri(b).map(function(y) {
22
+ return D + o * y;
23
+ });
24
+ return i(E ? I.reverse() : I);
25
+ }
26
+ return e.domain = function(b) {
27
+ return arguments.length ? (t(b), C()) : t();
28
+ }, e.range = function(b) {
29
+ return arguments.length ? ([s, n] = b, s = +s, n = +n, C()) : [s, n];
30
+ }, e.rangeRound = function(b) {
31
+ return [s, n] = b, s = +s, n = +n, m = !0, C();
32
+ }, e.bandwidth = function() {
33
+ return g;
34
+ }, e.step = function() {
35
+ return o;
36
+ }, e.round = function(b) {
37
+ return arguments.length ? (m = !!b, C()) : m;
38
+ }, e.padding = function(b) {
39
+ return arguments.length ? (p = Math.min(1, k = +b), C()) : p;
40
+ }, e.paddingInner = function(b) {
41
+ return arguments.length ? (p = Math.min(1, b), C()) : p;
42
+ }, e.paddingOuter = function(b) {
43
+ return arguments.length ? (k = +b, C()) : k;
44
+ }, e.align = function(b) {
45
+ return arguments.length ? (v = Math.max(0, Math.min(1, b)), C()) : v;
46
+ }, e.copy = function() {
47
+ return yt(t(), [s, n]).round(m).paddingInner(p).paddingOuter(k).align(v);
48
+ }, _i.apply(C(), arguments);
49
+ }
50
+ var bt = function() {
51
+ var e = /* @__PURE__ */ a(function(F, h, u, x) {
52
+ for (u = u || {}, x = F.length; x--; u[F[x]] = h)
53
+ ;
54
+ return u;
55
+ }, "o"), t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], n = [1, 5], o = [1, 6], g = [1, 7], m = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], p = [1, 25], k = [1, 26], v = [1, 28], C = [1, 29], b = [1, 30], E = [1, 31], D = [1, 32], P = [1, 33], I = [1, 34], y = [1, 35], _ = [1, 36], c = [1, 37], W = [1, 43], z = [1, 42], U = [1, 47], X = [1, 50], l = [1, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], L = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36], S = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], R = [1, 64], $ = {
56
+ trace: /* @__PURE__ */ a(function() {
57
+ }, "trace"),
58
+ yy: {},
59
+ 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, commaSeparatedNumbers: 25, SQUARE_BRACES_END: 26, NUMBER_WITH_DECIMAL: 27, COMMA: 28, xAxisData: 29, bandData: 30, ARROW_DELIMITER: 31, commaSeparatedTexts: 32, yAxisData: 33, NEWLINE: 34, SEMI: 35, EOF: 36, alphaNum: 37, STR: 38, MD_STR: 39, alphaNumToken: 40, AMP: 41, NUM: 42, ALPHA: 43, PLUS: 44, EQUALS: 45, MULT: 46, DOT: 47, BRKT: 48, MINUS: 49, UNDERSCORE: 50, $accept: 0, $end: 1 },
60
+ 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", 27: "NUMBER_WITH_DECIMAL", 28: "COMMA", 31: "ARROW_DELIMITER", 34: "NEWLINE", 35: "SEMI", 36: "EOF", 38: "STR", 39: "MD_STR", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "PLUS", 45: "EQUALS", 46: "MULT", 47: "DOT", 48: "BRKT", 49: "MINUS", 50: "UNDERSCORE" },
61
+ 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], [13, 1], [13, 2], [13, 1], [29, 1], [29, 3], [30, 3], [32, 3], [32, 1], [15, 1], [15, 2], [15, 1], [33, 3], [4, 1], [4, 1], [4, 1], [11, 1], [11, 1], [11, 1], [37, 1], [37, 2], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1]],
62
+ performAction: /* @__PURE__ */ a(function(h, u, x, d, w, r, j) {
63
+ var f = r.length - 1;
64
+ switch (w) {
65
+ case 5:
66
+ d.setOrientation(r[f]);
67
+ break;
68
+ case 9:
69
+ d.setDiagramTitle(r[f].text.trim());
70
+ break;
71
+ case 12:
72
+ d.setLineData({ text: "", type: "text" }, r[f]);
73
+ break;
74
+ case 13:
75
+ d.setLineData(r[f - 1], r[f]);
76
+ break;
77
+ case 14:
78
+ d.setBarData({ text: "", type: "text" }, r[f]);
79
+ break;
80
+ case 15:
81
+ d.setBarData(r[f - 1], r[f]);
82
+ break;
83
+ case 16:
84
+ this.$ = r[f].trim(), d.setAccTitle(this.$);
85
+ break;
86
+ case 17:
87
+ case 18:
88
+ this.$ = r[f].trim(), d.setAccDescription(this.$);
89
+ break;
90
+ case 19:
91
+ this.$ = r[f - 1];
92
+ break;
93
+ case 20:
94
+ this.$ = [Number(r[f - 2]), ...r[f]];
95
+ break;
96
+ case 21:
97
+ this.$ = [Number(r[f])];
98
+ break;
99
+ case 22:
100
+ d.setXAxisTitle(r[f]);
101
+ break;
102
+ case 23:
103
+ d.setXAxisTitle(r[f - 1]);
104
+ break;
105
+ case 24:
106
+ d.setXAxisTitle({ type: "text", text: "" });
107
+ break;
108
+ case 25:
109
+ d.setXAxisBand(r[f]);
110
+ break;
111
+ case 26:
112
+ d.setXAxisRangeData(Number(r[f - 2]), Number(r[f]));
113
+ break;
114
+ case 27:
115
+ this.$ = r[f - 1];
116
+ break;
117
+ case 28:
118
+ this.$ = [r[f - 2], ...r[f]];
119
+ break;
120
+ case 29:
121
+ this.$ = [r[f]];
122
+ break;
123
+ case 30:
124
+ d.setYAxisTitle(r[f]);
125
+ break;
126
+ case 31:
127
+ d.setYAxisTitle(r[f - 1]);
128
+ break;
129
+ case 32:
130
+ d.setYAxisTitle({ type: "text", text: "" });
131
+ break;
132
+ case 33:
133
+ d.setYAxisRangeData(Number(r[f - 2]), Number(r[f]));
134
+ break;
135
+ case 37:
136
+ this.$ = { text: r[f], type: "text" };
137
+ break;
138
+ case 38:
139
+ this.$ = { text: r[f], type: "text" };
140
+ break;
141
+ case 39:
142
+ this.$ = { text: r[f], type: "markdown" };
143
+ break;
144
+ case 40:
145
+ this.$ = r[f];
146
+ break;
147
+ case 41:
148
+ this.$ = r[f - 1] + "" + r[f];
149
+ break;
150
+ }
151
+ }, "anonymous"),
152
+ table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 34: n, 35: o, 36: g }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 34: n, 35: o, 36: g }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 34: n, 35: o, 36: g }), { 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(m, [2, 34]), e(m, [2, 35]), e(m, [2, 36]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 34: n, 35: o, 36: g }), { 1: [2, 3] }, e(m, [2, 5]), e(t, [2, 7], { 4: 22, 34: n, 35: o, 36: g }), { 11: 23, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 11: 39, 13: 38, 24: W, 27: z, 29: 40, 30: 41, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 11: 45, 15: 44, 27: U, 33: 46, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 11: 49, 17: 48, 24: X, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 11: 52, 17: 51, 24: X, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 20: [1, 53] }, { 22: [1, 54] }, e(l, [2, 18]), { 1: [2, 2] }, e(l, [2, 8]), e(l, [2, 9]), e(L, [2, 37], { 40: 55, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }), e(L, [2, 38]), e(L, [2, 39]), e(S, [2, 40]), e(S, [2, 42]), e(S, [2, 43]), e(S, [2, 44]), e(S, [2, 45]), e(S, [2, 46]), e(S, [2, 47]), e(S, [2, 48]), e(S, [2, 49]), e(S, [2, 50]), e(S, [2, 51]), e(l, [2, 10]), e(l, [2, 22], { 30: 41, 29: 56, 24: W, 27: z }), e(l, [2, 24]), e(l, [2, 25]), { 31: [1, 57] }, { 11: 59, 32: 58, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, e(l, [2, 11]), e(l, [2, 30], { 33: 60, 27: U }), e(l, [2, 32]), { 31: [1, 61] }, e(l, [2, 12]), { 17: 62, 24: X }, { 25: 63, 27: R }, e(l, [2, 14]), { 17: 65, 24: X }, e(l, [2, 16]), e(l, [2, 17]), e(S, [2, 41]), e(l, [2, 23]), { 27: [1, 66] }, { 26: [1, 67] }, { 26: [2, 29], 28: [1, 68] }, e(l, [2, 31]), { 27: [1, 69] }, e(l, [2, 13]), { 26: [1, 70] }, { 26: [2, 21], 28: [1, 71] }, e(l, [2, 15]), e(l, [2, 26]), e(l, [2, 27]), { 11: 59, 32: 72, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, e(l, [2, 33]), e(l, [2, 19]), { 25: 73, 27: R }, { 26: [2, 28] }, { 26: [2, 20] }],
153
+ defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 72: [2, 28], 73: [2, 20] },
154
+ parseError: /* @__PURE__ */ a(function(h, u) {
155
+ if (u.recoverable)
156
+ this.trace(h);
157
+ else {
158
+ var x = new Error(h);
159
+ throw x.hash = u, x;
160
+ }
161
+ }, "parseError"),
162
+ parse: /* @__PURE__ */ a(function(h) {
163
+ var u = this, x = [0], d = [], w = [null], r = [], j = this.table, f = "", lt = 0, It = 0, hi = 2, Mt = 1, li = r.slice.call(arguments, 1), T = Object.create(this.lexer), Y = { yy: {} };
164
+ for (var dt in this.yy)
165
+ Object.prototype.hasOwnProperty.call(this.yy, dt) && (Y.yy[dt] = this.yy[dt]);
166
+ T.setInput(h, Y.yy), Y.yy.lexer = T, Y.yy.parser = this, typeof T.yylloc > "u" && (T.yylloc = {});
167
+ var ft = T.yylloc;
168
+ r.push(ft);
169
+ var ci = T.options && T.options.ranges;
170
+ typeof Y.yy.parseError == "function" ? this.parseError = Y.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
171
+ function ui(V) {
172
+ x.length = x.length - 2 * V, w.length = w.length - V, r.length = r.length - V;
173
+ }
174
+ a(ui, "popStack");
175
+ function Vt() {
176
+ var V;
177
+ return V = d.pop() || T.lex() || Mt, typeof V != "number" && (V instanceof Array && (d = V, V = d.pop()), V = u.symbols_[V] || V), V;
178
+ }
179
+ a(Vt, "lex");
180
+ for (var M, H, B, pt, G = {}, ct, O, Bt, ut; ; ) {
181
+ if (H = x[x.length - 1], this.defaultActions[H] ? B = this.defaultActions[H] : ((M === null || typeof M > "u") && (M = Vt()), B = j[H] && j[H][M]), typeof B > "u" || !B.length || !B[0]) {
182
+ var mt = "";
183
+ ut = [];
184
+ for (ct in j[H])
185
+ this.terminals_[ct] && ct > hi && ut.push("'" + this.terminals_[ct] + "'");
186
+ T.showPosition ? mt = "Parse error on line " + (lt + 1) + `:
187
+ ` + T.showPosition() + `
188
+ Expecting ` + ut.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : mt = "Parse error on line " + (lt + 1) + ": Unexpected " + (M == Mt ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(mt, {
189
+ text: T.match,
190
+ token: this.terminals_[M] || M,
191
+ line: T.yylineno,
192
+ loc: ft,
193
+ expected: ut
194
+ });
195
+ }
196
+ if (B[0] instanceof Array && B.length > 1)
197
+ throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + M);
198
+ switch (B[0]) {
199
+ case 1:
200
+ x.push(M), w.push(T.yytext), r.push(T.yylloc), x.push(B[1]), M = null, It = T.yyleng, f = T.yytext, lt = T.yylineno, ft = T.yylloc;
201
+ break;
202
+ case 2:
203
+ if (O = this.productions_[B[1]][1], G.$ = w[w.length - O], G._$ = {
204
+ first_line: r[r.length - (O || 1)].first_line,
205
+ last_line: r[r.length - 1].last_line,
206
+ first_column: r[r.length - (O || 1)].first_column,
207
+ last_column: r[r.length - 1].last_column
208
+ }, ci && (G._$.range = [
209
+ r[r.length - (O || 1)].range[0],
210
+ r[r.length - 1].range[1]
211
+ ]), pt = this.performAction.apply(G, [
212
+ f,
213
+ It,
214
+ lt,
215
+ Y.yy,
216
+ B[1],
217
+ w,
218
+ r
219
+ ].concat(li)), typeof pt < "u")
220
+ return pt;
221
+ O && (x = x.slice(0, -1 * O * 2), w = w.slice(0, -1 * O), r = r.slice(0, -1 * O)), x.push(this.productions_[B[1]][0]), w.push(G.$), r.push(G._$), Bt = j[x[x.length - 2]][x[x.length - 1]], x.push(Bt);
222
+ break;
223
+ case 3:
224
+ return !0;
225
+ }
226
+ }
227
+ return !0;
228
+ }, "parse")
229
+ }, Et = /* @__PURE__ */ function() {
230
+ var F = {
231
+ EOF: 1,
232
+ parseError: /* @__PURE__ */ a(function(u, x) {
233
+ if (this.yy.parser)
234
+ this.yy.parser.parseError(u, x);
235
+ else
236
+ throw new Error(u);
237
+ }, "parseError"),
238
+ // resets the lexer, sets new input
239
+ setInput: /* @__PURE__ */ a(function(h, u) {
240
+ return this.yy = u || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
241
+ first_line: 1,
242
+ first_column: 0,
243
+ last_line: 1,
244
+ last_column: 0
245
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
246
+ }, "setInput"),
247
+ // consumes and returns one char from the input
248
+ input: /* @__PURE__ */ a(function() {
249
+ var h = this._input[0];
250
+ this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
251
+ var u = h.match(/(?:\r\n?|\n).*/g);
252
+ return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h;
253
+ }, "input"),
254
+ // unshifts one char (or a string) into the input
255
+ unput: /* @__PURE__ */ a(function(h) {
256
+ var u = h.length, x = h.split(/(?:\r\n?|\n)/g);
257
+ this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
258
+ var d = this.match.split(/(?:\r\n?|\n)/g);
259
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), x.length - 1 && (this.yylineno -= x.length - 1);
260
+ var w = this.yylloc.range;
261
+ return this.yylloc = {
262
+ first_line: this.yylloc.first_line,
263
+ last_line: this.yylineno + 1,
264
+ first_column: this.yylloc.first_column,
265
+ last_column: x ? (x.length === d.length ? this.yylloc.first_column : 0) + d[d.length - x.length].length - x[0].length : this.yylloc.first_column - u
266
+ }, this.options.ranges && (this.yylloc.range = [w[0], w[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
267
+ }, "unput"),
268
+ // When called from action, caches matched text and appends it on next action
269
+ more: /* @__PURE__ */ a(function() {
270
+ return this._more = !0, this;
271
+ }, "more"),
272
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
273
+ reject: /* @__PURE__ */ a(function() {
274
+ if (this.options.backtrack_lexer)
275
+ this._backtrack = !0;
276
+ else
277
+ 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).
278
+ ` + this.showPosition(), {
279
+ text: "",
280
+ token: null,
281
+ line: this.yylineno
282
+ });
283
+ return this;
284
+ }, "reject"),
285
+ // retain first n characters of the match
286
+ less: /* @__PURE__ */ a(function(h) {
287
+ this.unput(this.match.slice(h));
288
+ }, "less"),
289
+ // displays already matched input, i.e. for error messages
290
+ pastInput: /* @__PURE__ */ a(function() {
291
+ var h = this.matched.substr(0, this.matched.length - this.match.length);
292
+ return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
293
+ }, "pastInput"),
294
+ // displays upcoming input, i.e. for error messages
295
+ upcomingInput: /* @__PURE__ */ a(function() {
296
+ var h = this.match;
297
+ return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
298
+ }, "upcomingInput"),
299
+ // displays the character position where the lexing error occurred, i.e. for error messages
300
+ showPosition: /* @__PURE__ */ a(function() {
301
+ var h = this.pastInput(), u = new Array(h.length + 1).join("-");
302
+ return h + this.upcomingInput() + `
303
+ ` + u + "^";
304
+ }, "showPosition"),
305
+ // test the lexed token: return FALSE when not a match, otherwise return token
306
+ test_match: /* @__PURE__ */ a(function(h, u) {
307
+ var x, d, w;
308
+ if (this.options.backtrack_lexer && (w = {
309
+ yylineno: this.yylineno,
310
+ yylloc: {
311
+ first_line: this.yylloc.first_line,
312
+ last_line: this.last_line,
313
+ first_column: this.yylloc.first_column,
314
+ last_column: this.yylloc.last_column
315
+ },
316
+ yytext: this.yytext,
317
+ match: this.match,
318
+ matches: this.matches,
319
+ matched: this.matched,
320
+ yyleng: this.yyleng,
321
+ offset: this.offset,
322
+ _more: this._more,
323
+ _input: this._input,
324
+ yy: this.yy,
325
+ conditionStack: this.conditionStack.slice(0),
326
+ done: this.done
327
+ }, this.options.ranges && (w.yylloc.range = this.yylloc.range.slice(0))), d = h[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
328
+ first_line: this.yylloc.last_line,
329
+ last_line: this.yylineno + 1,
330
+ first_column: this.yylloc.last_column,
331
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
332
+ }, this.yytext += h[0], this.match += h[0], this.matches = h, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(h[0].length), this.matched += h[0], x = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), x)
333
+ return x;
334
+ if (this._backtrack) {
335
+ for (var r in w)
336
+ this[r] = w[r];
337
+ return !1;
338
+ }
339
+ return !1;
340
+ }, "test_match"),
341
+ // return next match in input
342
+ next: /* @__PURE__ */ a(function() {
343
+ if (this.done)
344
+ return this.EOF;
345
+ this._input || (this.done = !0);
346
+ var h, u, x, d;
347
+ this._more || (this.yytext = "", this.match = "");
348
+ for (var w = this._currentRules(), r = 0; r < w.length; r++)
349
+ if (x = this._input.match(this.rules[w[r]]), x && (!u || x[0].length > u[0].length)) {
350
+ if (u = x, d = r, this.options.backtrack_lexer) {
351
+ if (h = this.test_match(x, w[r]), h !== !1)
352
+ return h;
353
+ if (this._backtrack) {
354
+ u = !1;
355
+ continue;
356
+ } else
357
+ return !1;
358
+ } else if (!this.options.flex)
359
+ break;
360
+ }
361
+ return u ? (h = this.test_match(u, w[d]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
362
+ ` + this.showPosition(), {
363
+ text: "",
364
+ token: null,
365
+ line: this.yylineno
366
+ });
367
+ }, "next"),
368
+ // return next match that has a token
369
+ lex: /* @__PURE__ */ a(function() {
370
+ var u = this.next();
371
+ return u || this.lex();
372
+ }, "lex"),
373
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
374
+ begin: /* @__PURE__ */ a(function(u) {
375
+ this.conditionStack.push(u);
376
+ }, "begin"),
377
+ // pop the previously active lexer condition state off the condition stack
378
+ popState: /* @__PURE__ */ a(function() {
379
+ var u = this.conditionStack.length - 1;
380
+ return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
381
+ }, "popState"),
382
+ // produce the lexer rule set which is active for the currently active lexer condition state
383
+ _currentRules: /* @__PURE__ */ a(function() {
384
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
385
+ }, "_currentRules"),
386
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
387
+ topState: /* @__PURE__ */ a(function(u) {
388
+ return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
389
+ }, "topState"),
390
+ // alias for begin(condition)
391
+ pushState: /* @__PURE__ */ a(function(u) {
392
+ this.begin(u);
393
+ }, "pushState"),
394
+ // return the number of states currently on the stack
395
+ stateStackSize: /* @__PURE__ */ a(function() {
396
+ return this.conditionStack.length;
397
+ }, "stateStackSize"),
398
+ options: { "case-insensitive": !0 },
399
+ performAction: /* @__PURE__ */ a(function(u, x, d, w) {
400
+ switch (d) {
401
+ case 0:
402
+ break;
403
+ case 1:
404
+ break;
405
+ case 2:
406
+ return this.popState(), 34;
407
+ case 3:
408
+ return this.popState(), 34;
409
+ case 4:
410
+ return 34;
411
+ case 5:
412
+ break;
413
+ case 6:
414
+ return 10;
415
+ case 7:
416
+ return this.pushState("acc_title"), 19;
417
+ case 8:
418
+ return this.popState(), "acc_title_value";
419
+ case 9:
420
+ return this.pushState("acc_descr"), 21;
421
+ case 10:
422
+ return this.popState(), "acc_descr_value";
423
+ case 11:
424
+ this.pushState("acc_descr_multiline");
425
+ break;
426
+ case 12:
427
+ this.popState();
428
+ break;
429
+ case 13:
430
+ return "acc_descr_multiline_value";
431
+ case 14:
432
+ return 5;
433
+ case 15:
434
+ return 5;
435
+ case 16:
436
+ return 8;
437
+ case 17:
438
+ return this.pushState("axis_data"), "X_AXIS";
439
+ case 18:
440
+ return this.pushState("axis_data"), "Y_AXIS";
441
+ case 19:
442
+ return this.pushState("axis_band_data"), 24;
443
+ case 20:
444
+ return 31;
445
+ case 21:
446
+ return this.pushState("data"), 16;
447
+ case 22:
448
+ return this.pushState("data"), 18;
449
+ case 23:
450
+ return this.pushState("data_inner"), 24;
451
+ case 24:
452
+ return 27;
453
+ case 25:
454
+ return this.popState(), 26;
455
+ case 26:
456
+ this.popState();
457
+ break;
458
+ case 27:
459
+ this.pushState("string");
460
+ break;
461
+ case 28:
462
+ this.popState();
463
+ break;
464
+ case 29:
465
+ return "STR";
466
+ case 30:
467
+ return 24;
468
+ case 31:
469
+ return 26;
470
+ case 32:
471
+ return 43;
472
+ case 33:
473
+ return "COLON";
474
+ case 34:
475
+ return 44;
476
+ case 35:
477
+ return 28;
478
+ case 36:
479
+ return 45;
480
+ case 37:
481
+ return 46;
482
+ case 38:
483
+ return 48;
484
+ case 39:
485
+ return 50;
486
+ case 40:
487
+ return 47;
488
+ case 41:
489
+ return 41;
490
+ case 42:
491
+ return 49;
492
+ case 43:
493
+ return 42;
494
+ case 44:
495
+ break;
496
+ case 45:
497
+ return 35;
498
+ case 46:
499
+ return 36;
500
+ }
501
+ }, "anonymous"),
502
+ 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],
503
+ 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 } }
504
+ };
505
+ return F;
506
+ }();
507
+ $.lexer = Et;
508
+ function N() {
509
+ this.yy = {};
510
+ }
511
+ return a(N, "Parser"), N.prototype = $, $.Parser = N, new N();
512
+ }();
513
+ bt.parser = bt;
514
+ var Ti = bt;
515
+ function At(e) {
516
+ return e.type === "bar";
517
+ }
518
+ a(At, "isBarPlot");
519
+ function _t(e) {
520
+ return e.type === "band";
521
+ }
522
+ a(_t, "isBandAxisData");
523
+ function q(e) {
524
+ return e.type === "linear";
525
+ }
526
+ a(q, "isLinearAxisData");
527
+ var J, Ht = (J = class {
528
+ constructor(t) {
529
+ this.parentGroup = t;
530
+ }
531
+ getMaxDimension(t, i) {
532
+ if (!this.parentGroup)
533
+ return {
534
+ width: t.reduce((o, g) => Math.max(g.length, o), 0) * i,
535
+ height: i
536
+ };
537
+ const s = {
538
+ width: 0,
539
+ height: 0
540
+ }, n = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", i);
541
+ for (const o of t) {
542
+ const g = gi(n, 1, o), m = g ? g.width : o.length * i, p = g ? g.height : i;
543
+ s.width = Math.max(s.width, m), s.height = Math.max(s.height, p);
544
+ }
545
+ return n.remove(), s;
546
+ }
547
+ }, a(J, "TextDimensionCalculatorWithFont"), J), Ft = 0.7, Ot = 0.2, tt, Ut = (tt = class {
548
+ constructor(t, i, s, n) {
549
+ this.axisConfig = t, this.title = i, this.textDimensionCalculator = s, this.axisThemeConfig = n, this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left", this.showTitle = !1, this.showLabel = !1, this.showTick = !1, this.showAxisLine = !1, this.outerPadding = 0, this.titleTextHeight = 0, this.labelTextHeight = 0, this.range = [0, 10], this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left";
550
+ }
551
+ setRange(t) {
552
+ this.range = t, this.axisPosition === "left" || this.axisPosition === "right" ? this.boundingRect.height = t[1] - t[0] : this.boundingRect.width = t[1] - t[0], this.recalculateScale();
553
+ }
554
+ getRange() {
555
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
556
+ }
557
+ setAxisPosition(t) {
558
+ this.axisPosition = t, this.setRange(this.range);
559
+ }
560
+ getTickDistance() {
561
+ const t = this.getRange();
562
+ return Math.abs(t[0] - t[1]) / this.getTickValues().length;
563
+ }
564
+ getAxisOuterPadding() {
565
+ return this.outerPadding;
566
+ }
567
+ getLabelDimension() {
568
+ return this.textDimensionCalculator.getMaxDimension(
569
+ this.getTickValues().map((t) => t.toString()),
570
+ this.axisConfig.labelFontSize
571
+ );
572
+ }
573
+ recalculateOuterPaddingToDrawBar() {
574
+ Ft * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(Ft * this.getTickDistance() / 2)), this.recalculateScale();
575
+ }
576
+ calculateSpaceIfDrawnHorizontally(t) {
577
+ let i = t.height;
578
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
579
+ const s = this.getLabelDimension(), n = Ot * t.width;
580
+ this.outerPadding = Math.min(s.width / 2, n);
581
+ const o = s.height + this.axisConfig.labelPadding * 2;
582
+ this.labelTextHeight = s.height, o <= i && (i -= o, this.showLabel = !0);
583
+ }
584
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
585
+ const s = this.textDimensionCalculator.getMaxDimension(
586
+ [this.title],
587
+ this.axisConfig.titleFontSize
588
+ ), n = s.height + this.axisConfig.titlePadding * 2;
589
+ this.titleTextHeight = s.height, n <= i && (i -= n, this.showTitle = !0);
590
+ }
591
+ this.boundingRect.width = t.width, this.boundingRect.height = t.height - i;
592
+ }
593
+ calculateSpaceIfDrawnVertical(t) {
594
+ let i = t.width;
595
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
596
+ const s = this.getLabelDimension(), n = Ot * t.height;
597
+ this.outerPadding = Math.min(s.height / 2, n);
598
+ const o = s.width + this.axisConfig.labelPadding * 2;
599
+ o <= i && (i -= o, this.showLabel = !0);
600
+ }
601
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
602
+ const s = this.textDimensionCalculator.getMaxDimension(
603
+ [this.title],
604
+ this.axisConfig.titleFontSize
605
+ ), n = s.height + this.axisConfig.titlePadding * 2;
606
+ this.titleTextHeight = s.height, n <= i && (i -= n, this.showTitle = !0);
607
+ }
608
+ this.boundingRect.width = t.width - i, this.boundingRect.height = t.height;
609
+ }
610
+ calculateSpace(t) {
611
+ return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(t) : this.calculateSpaceIfDrawnHorizontally(t), this.recalculateScale(), {
612
+ width: this.boundingRect.width,
613
+ height: this.boundingRect.height
614
+ };
615
+ }
616
+ setBoundingBoxXY(t) {
617
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
618
+ }
619
+ getDrawableElementsForLeftAxis() {
620
+ const t = [];
621
+ if (this.showAxisLine) {
622
+ const i = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
623
+ t.push({
624
+ type: "path",
625
+ groupTexts: ["left-axis", "axisl-line"],
626
+ data: [
627
+ {
628
+ path: `M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y + this.boundingRect.height} `,
629
+ strokeFill: this.axisThemeConfig.axisLineColor,
630
+ strokeWidth: this.axisConfig.axisLineWidth
631
+ }
632
+ ]
633
+ });
634
+ }
635
+ if (this.showLabel && t.push({
636
+ type: "text",
637
+ groupTexts: ["left-axis", "label"],
638
+ data: this.getTickValues().map((i) => ({
639
+ text: i.toString(),
640
+ 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),
641
+ y: this.getScaleValue(i),
642
+ fill: this.axisThemeConfig.labelColor,
643
+ fontSize: this.axisConfig.labelFontSize,
644
+ rotation: 0,
645
+ verticalPos: "middle",
646
+ horizontalPos: "right"
647
+ }))
648
+ }), this.showTick) {
649
+ const i = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
650
+ t.push({
651
+ type: "path",
652
+ groupTexts: ["left-axis", "ticks"],
653
+ data: this.getTickValues().map((s) => ({
654
+ path: `M ${i},${this.getScaleValue(s)} L ${i - this.axisConfig.tickLength},${this.getScaleValue(s)}`,
655
+ strokeFill: this.axisThemeConfig.tickColor,
656
+ strokeWidth: this.axisConfig.tickWidth
657
+ }))
658
+ });
659
+ }
660
+ return this.showTitle && t.push({
661
+ type: "text",
662
+ groupTexts: ["left-axis", "title"],
663
+ data: [
664
+ {
665
+ text: this.title,
666
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
667
+ y: this.boundingRect.y + this.boundingRect.height / 2,
668
+ fill: this.axisThemeConfig.titleColor,
669
+ fontSize: this.axisConfig.titleFontSize,
670
+ rotation: 270,
671
+ verticalPos: "top",
672
+ horizontalPos: "center"
673
+ }
674
+ ]
675
+ }), t;
676
+ }
677
+ getDrawableElementsForBottomAxis() {
678
+ const t = [];
679
+ if (this.showAxisLine) {
680
+ const i = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
681
+ t.push({
682
+ type: "path",
683
+ groupTexts: ["bottom-axis", "axis-line"],
684
+ data: [
685
+ {
686
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
687
+ strokeFill: this.axisThemeConfig.axisLineColor,
688
+ strokeWidth: this.axisConfig.axisLineWidth
689
+ }
690
+ ]
691
+ });
692
+ }
693
+ if (this.showLabel && t.push({
694
+ type: "text",
695
+ groupTexts: ["bottom-axis", "label"],
696
+ data: this.getTickValues().map((i) => ({
697
+ text: i.toString(),
698
+ x: this.getScaleValue(i),
699
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
700
+ fill: this.axisThemeConfig.labelColor,
701
+ fontSize: this.axisConfig.labelFontSize,
702
+ rotation: 0,
703
+ verticalPos: "top",
704
+ horizontalPos: "center"
705
+ }))
706
+ }), this.showTick) {
707
+ const i = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
708
+ t.push({
709
+ type: "path",
710
+ groupTexts: ["bottom-axis", "ticks"],
711
+ data: this.getTickValues().map((s) => ({
712
+ path: `M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i + this.axisConfig.tickLength}`,
713
+ strokeFill: this.axisThemeConfig.tickColor,
714
+ strokeWidth: this.axisConfig.tickWidth
715
+ }))
716
+ });
717
+ }
718
+ return this.showTitle && t.push({
719
+ type: "text",
720
+ groupTexts: ["bottom-axis", "title"],
721
+ data: [
722
+ {
723
+ text: this.title,
724
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
725
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
726
+ fill: this.axisThemeConfig.titleColor,
727
+ fontSize: this.axisConfig.titleFontSize,
728
+ rotation: 0,
729
+ verticalPos: "top",
730
+ horizontalPos: "center"
731
+ }
732
+ ]
733
+ }), t;
734
+ }
735
+ getDrawableElementsForTopAxis() {
736
+ const t = [];
737
+ if (this.showAxisLine) {
738
+ const i = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
739
+ t.push({
740
+ type: "path",
741
+ groupTexts: ["top-axis", "axis-line"],
742
+ data: [
743
+ {
744
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
745
+ strokeFill: this.axisThemeConfig.axisLineColor,
746
+ strokeWidth: this.axisConfig.axisLineWidth
747
+ }
748
+ ]
749
+ });
750
+ }
751
+ if (this.showLabel && t.push({
752
+ type: "text",
753
+ groupTexts: ["top-axis", "label"],
754
+ data: this.getTickValues().map((i) => ({
755
+ text: i.toString(),
756
+ x: this.getScaleValue(i),
757
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
758
+ fill: this.axisThemeConfig.labelColor,
759
+ fontSize: this.axisConfig.labelFontSize,
760
+ rotation: 0,
761
+ verticalPos: "top",
762
+ horizontalPos: "center"
763
+ }))
764
+ }), this.showTick) {
765
+ const i = this.boundingRect.y;
766
+ t.push({
767
+ type: "path",
768
+ groupTexts: ["top-axis", "ticks"],
769
+ data: this.getTickValues().map((s) => ({
770
+ 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)}`,
771
+ strokeFill: this.axisThemeConfig.tickColor,
772
+ strokeWidth: this.axisConfig.tickWidth
773
+ }))
774
+ });
775
+ }
776
+ return this.showTitle && t.push({
777
+ type: "text",
778
+ groupTexts: ["top-axis", "title"],
779
+ data: [
780
+ {
781
+ text: this.title,
782
+ x: this.boundingRect.x + this.boundingRect.width / 2,
783
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
784
+ fill: this.axisThemeConfig.titleColor,
785
+ fontSize: this.axisConfig.titleFontSize,
786
+ rotation: 0,
787
+ verticalPos: "top",
788
+ horizontalPos: "center"
789
+ }
790
+ ]
791
+ }), t;
792
+ }
793
+ getDrawableElements() {
794
+ if (this.axisPosition === "left")
795
+ return this.getDrawableElementsForLeftAxis();
796
+ if (this.axisPosition === "right")
797
+ throw Error("Drawing of right axis is not implemented");
798
+ return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
799
+ }
800
+ }, a(tt, "BaseAxis"), tt), it, Di = (it = class extends Ut {
801
+ constructor(t, i, s, n, o) {
802
+ super(t, n, o, i), this.categories = s, this.scale = yt().domain(this.categories).range(this.getRange());
803
+ }
804
+ setRange(t) {
805
+ super.setRange(t);
806
+ }
807
+ recalculateScale() {
808
+ this.scale = yt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5), Xt.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
809
+ }
810
+ getTickValues() {
811
+ return this.categories;
812
+ }
813
+ getScaleValue(t) {
814
+ return this.scale(t) ?? this.getRange()[0];
815
+ }
816
+ }, a(it, "BandAxis"), it), et, vi = (et = class extends Ut {
817
+ constructor(t, i, s, n, o) {
818
+ super(t, n, o, i), this.domain = s, this.scale = zt().domain(this.domain).range(this.getRange());
819
+ }
820
+ getTickValues() {
821
+ return this.scale.ticks();
822
+ }
823
+ recalculateScale() {
824
+ const t = [...this.domain];
825
+ this.axisPosition === "left" && t.reverse(), this.scale = zt().domain(t).range(this.getRange());
826
+ }
827
+ getScaleValue(t) {
828
+ return this.scale(t);
829
+ }
830
+ }, a(et, "LinearAxis"), et);
831
+ function wt(e, t, i, s) {
832
+ const n = new Ht(s);
833
+ return _t(e) ? new Di(
834
+ t,
835
+ i,
836
+ e.categories,
837
+ e.title,
838
+ n
839
+ ) : new vi(
840
+ t,
841
+ i,
842
+ [e.min, e.max],
843
+ e.title,
844
+ n
845
+ );
846
+ }
847
+ a(wt, "getAxis");
848
+ var st, Pi = (st = class {
849
+ constructor(t, i, s, n) {
850
+ this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = n, this.boundingRect = {
851
+ x: 0,
852
+ y: 0,
853
+ width: 0,
854
+ height: 0
855
+ }, this.showChartTitle = !1;
856
+ }
857
+ setBoundingBoxXY(t) {
858
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
859
+ }
860
+ calculateSpace(t) {
861
+ const i = this.textDimensionCalculator.getMaxDimension(
862
+ [this.chartData.title],
863
+ this.chartConfig.titleFontSize
864
+ ), s = Math.max(i.width, t.width), n = i.height + 2 * this.chartConfig.titlePadding;
865
+ return i.width <= s && i.height <= n && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = s, this.boundingRect.height = n, this.showChartTitle = !0), {
866
+ width: this.boundingRect.width,
867
+ height: this.boundingRect.height
868
+ };
869
+ }
870
+ getDrawableElements() {
871
+ const t = [];
872
+ return this.showChartTitle && t.push({
873
+ groupTexts: ["chart-title"],
874
+ type: "text",
875
+ data: [
876
+ {
877
+ fontSize: this.chartConfig.titleFontSize,
878
+ text: this.chartData.title,
879
+ verticalPos: "middle",
880
+ horizontalPos: "center",
881
+ x: this.boundingRect.x + this.boundingRect.width / 2,
882
+ y: this.boundingRect.y + this.boundingRect.height / 2,
883
+ fill: this.chartThemeConfig.titleColor,
884
+ rotation: 0
885
+ }
886
+ ]
887
+ }), t;
888
+ }
889
+ }, a(st, "ChartTitle"), st);
890
+ function $t(e, t, i, s) {
891
+ const n = new Ht(s);
892
+ return new Pi(n, e, t, i);
893
+ }
894
+ a($t, "getChartTitleComponent");
895
+ var nt, Li = (nt = class {
896
+ constructor(t, i, s, n, o) {
897
+ this.plotData = t, this.xAxis = i, this.yAxis = s, this.orientation = n, this.plotIndex = o;
898
+ }
899
+ getDrawableElement() {
900
+ const t = this.plotData.data.map((s) => [
901
+ this.xAxis.getScaleValue(s[0]),
902
+ this.yAxis.getScaleValue(s[1])
903
+ ]);
904
+ let i;
905
+ return this.orientation === "horizontal" ? i = Wt().y((s) => s[0]).x((s) => s[1])(t) : i = Wt().x((s) => s[0]).y((s) => s[1])(t), i ? [
906
+ {
907
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
908
+ type: "path",
909
+ data: [
910
+ {
911
+ path: i,
912
+ strokeFill: this.plotData.strokeFill,
913
+ strokeWidth: this.plotData.strokeWidth
914
+ }
915
+ ]
916
+ }
917
+ ] : [];
918
+ }
919
+ }, a(nt, "LinePlot"), nt), at, Ei = (at = class {
920
+ constructor(t, i, s, n, o, g) {
921
+ this.barData = t, this.boundingRect = i, this.xAxis = s, this.yAxis = n, this.orientation = o, this.plotIndex = g;
922
+ }
923
+ getDrawableElement() {
924
+ const t = this.barData.data.map((o) => [
925
+ this.xAxis.getScaleValue(o[0]),
926
+ this.yAxis.getScaleValue(o[1])
927
+ ]), s = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - 0.05), n = s / 2;
928
+ return this.orientation === "horizontal" ? [
929
+ {
930
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
931
+ type: "rect",
932
+ data: t.map((o) => ({
933
+ x: this.boundingRect.x,
934
+ y: o[0] - n,
935
+ height: s,
936
+ width: o[1] - this.boundingRect.x,
937
+ fill: this.barData.fill,
938
+ strokeWidth: 0,
939
+ strokeFill: this.barData.fill
940
+ }))
941
+ }
942
+ ] : [
943
+ {
944
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
945
+ type: "rect",
946
+ data: t.map((o) => ({
947
+ x: o[0] - n,
948
+ y: o[1],
949
+ width: s,
950
+ height: this.boundingRect.y + this.boundingRect.height - o[1],
951
+ fill: this.barData.fill,
952
+ strokeWidth: 0,
953
+ strokeFill: this.barData.fill
954
+ }))
955
+ }
956
+ ];
957
+ }
958
+ }, a(at, "BarPlot"), at), rt, Ii = (rt = class {
959
+ constructor(t, i, s) {
960
+ this.chartConfig = t, this.chartData = i, this.chartThemeConfig = s, this.boundingRect = {
961
+ x: 0,
962
+ y: 0,
963
+ width: 0,
964
+ height: 0
965
+ };
966
+ }
967
+ setAxes(t, i) {
968
+ this.xAxis = t, this.yAxis = i;
969
+ }
970
+ setBoundingBoxXY(t) {
971
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
972
+ }
973
+ calculateSpace(t) {
974
+ return this.boundingRect.width = t.width, this.boundingRect.height = t.height, {
975
+ width: this.boundingRect.width,
976
+ height: this.boundingRect.height
977
+ };
978
+ }
979
+ getDrawableElements() {
980
+ if (!(this.xAxis && this.yAxis))
981
+ throw Error("Axes must be passed to render Plots");
982
+ const t = [];
983
+ for (const [i, s] of this.chartData.plots.entries())
984
+ switch (s.type) {
985
+ case "line":
986
+ {
987
+ const n = new Li(
988
+ s,
989
+ this.xAxis,
990
+ this.yAxis,
991
+ this.chartConfig.chartOrientation,
992
+ i
993
+ );
994
+ t.push(...n.getDrawableElement());
995
+ }
996
+ break;
997
+ case "bar":
998
+ {
999
+ const n = new Ei(
1000
+ s,
1001
+ this.boundingRect,
1002
+ this.xAxis,
1003
+ this.yAxis,
1004
+ this.chartConfig.chartOrientation,
1005
+ i
1006
+ );
1007
+ t.push(...n.getDrawableElement());
1008
+ }
1009
+ break;
1010
+ }
1011
+ return t;
1012
+ }
1013
+ }, a(rt, "BasePlot"), rt);
1014
+ function Gt(e, t, i) {
1015
+ return new Ii(e, t, i);
1016
+ }
1017
+ a(Gt, "getPlotComponent");
1018
+ var ot, Mi = (ot = class {
1019
+ constructor(t, i, s, n) {
1020
+ this.chartConfig = t, this.chartData = i, this.componentStore = {
1021
+ title: $t(t, i, s, n),
1022
+ plot: Gt(t, i, s),
1023
+ xAxis: wt(
1024
+ i.xAxis,
1025
+ t.xAxis,
1026
+ {
1027
+ titleColor: s.xAxisTitleColor,
1028
+ labelColor: s.xAxisLabelColor,
1029
+ tickColor: s.xAxisTickColor,
1030
+ axisLineColor: s.xAxisLineColor
1031
+ },
1032
+ n
1033
+ ),
1034
+ yAxis: wt(
1035
+ i.yAxis,
1036
+ t.yAxis,
1037
+ {
1038
+ titleColor: s.yAxisTitleColor,
1039
+ labelColor: s.yAxisLabelColor,
1040
+ tickColor: s.yAxisTickColor,
1041
+ axisLineColor: s.yAxisLineColor
1042
+ },
1043
+ n
1044
+ )
1045
+ };
1046
+ }
1047
+ calculateVerticalSpace() {
1048
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), g = Math.floor(
1049
+ i * this.chartConfig.plotReservedSpacePercent / 100
1050
+ ), m = this.componentStore.plot.calculateSpace({
1051
+ width: o,
1052
+ height: g
1053
+ });
1054
+ t -= m.width, i -= m.height, m = this.componentStore.title.calculateSpace({
1055
+ width: this.chartConfig.width,
1056
+ height: i
1057
+ }), n = m.height, i -= m.height, this.componentStore.xAxis.setAxisPosition("bottom"), m = this.componentStore.xAxis.calculateSpace({
1058
+ width: t,
1059
+ height: i
1060
+ }), i -= m.height, this.componentStore.yAxis.setAxisPosition("left"), m = this.componentStore.yAxis.calculateSpace({
1061
+ width: t,
1062
+ height: i
1063
+ }), s = m.width, t -= m.width, t > 0 && (o += t, t = 0), i > 0 && (g += i, i = 0), this.componentStore.plot.calculateSpace({
1064
+ width: o,
1065
+ height: g
1066
+ }), this.componentStore.plot.setBoundingBoxXY({ x: s, y: n }), this.componentStore.xAxis.setRange([s, s + o]), this.componentStore.xAxis.setBoundingBoxXY({ x: s, y: n + g }), this.componentStore.yAxis.setRange([n, n + g]), this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: n }), this.chartData.plots.some((p) => At(p)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1067
+ }
1068
+ calculateHorizontalSpace() {
1069
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = 0, g = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), m = Math.floor(
1070
+ i * this.chartConfig.plotReservedSpacePercent / 100
1071
+ ), p = this.componentStore.plot.calculateSpace({
1072
+ width: g,
1073
+ height: m
1074
+ });
1075
+ t -= p.width, i -= p.height, p = this.componentStore.title.calculateSpace({
1076
+ width: this.chartConfig.width,
1077
+ height: i
1078
+ }), s = p.height, i -= p.height, this.componentStore.xAxis.setAxisPosition("left"), p = this.componentStore.xAxis.calculateSpace({
1079
+ width: t,
1080
+ height: i
1081
+ }), t -= p.width, n = p.width, this.componentStore.yAxis.setAxisPosition("top"), p = this.componentStore.yAxis.calculateSpace({
1082
+ width: t,
1083
+ height: i
1084
+ }), i -= p.height, o = s + p.height, t > 0 && (g += t, t = 0), i > 0 && (m += i, i = 0), this.componentStore.plot.calculateSpace({
1085
+ width: g,
1086
+ height: m
1087
+ }), this.componentStore.plot.setBoundingBoxXY({ x: n, y: o }), this.componentStore.yAxis.setRange([n, n + g]), this.componentStore.yAxis.setBoundingBoxXY({ x: n, y: s }), this.componentStore.xAxis.setRange([o, o + m]), this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: o }), this.chartData.plots.some((k) => At(k)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1088
+ }
1089
+ calculateSpace() {
1090
+ this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
1091
+ }
1092
+ getDrawableElement() {
1093
+ this.calculateSpace();
1094
+ const t = [];
1095
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1096
+ for (const i of Object.values(this.componentStore))
1097
+ t.push(...i.getDrawableElements());
1098
+ return t;
1099
+ }
1100
+ }, a(ot, "Orchestrator"), ot), ht, Vi = (ht = class {
1101
+ static build(t, i, s, n) {
1102
+ return new Mi(t, i, s, n).getDrawableElement();
1103
+ }
1104
+ }, a(ht, "XYChartBuilder"), ht), Q = 0, qt, K = Tt(), Z = Rt(), A = Dt(), Ct = Z.plotColorPalette.split(",").map((e) => e.trim()), gt = !1, kt = !1;
1105
+ function Rt() {
1106
+ const e = xi(), t = St();
1107
+ return Nt(e.xyChart, t.themeVariables.xyChart);
1108
+ }
1109
+ a(Rt, "getChartDefaultThemeConfig");
1110
+ function Tt() {
1111
+ const e = St();
1112
+ return Nt(
1113
+ di.xyChart,
1114
+ e.xyChart
1115
+ );
1116
+ }
1117
+ a(Tt, "getChartDefaultConfig");
1118
+ function Dt() {
1119
+ return {
1120
+ yAxis: {
1121
+ type: "linear",
1122
+ title: "",
1123
+ min: 1 / 0,
1124
+ max: -1 / 0
1125
+ },
1126
+ xAxis: {
1127
+ type: "band",
1128
+ title: "",
1129
+ categories: []
1130
+ },
1131
+ title: "",
1132
+ plots: []
1133
+ };
1134
+ }
1135
+ a(Dt, "getChartDefaultData");
1136
+ function xt(e) {
1137
+ const t = St();
1138
+ return fi(e.trim(), t);
1139
+ }
1140
+ a(xt, "textSanitizer");
1141
+ function jt(e) {
1142
+ qt = e;
1143
+ }
1144
+ a(jt, "setTmpSVGG");
1145
+ function Qt(e) {
1146
+ e === "horizontal" ? K.chartOrientation = "horizontal" : K.chartOrientation = "vertical";
1147
+ }
1148
+ a(Qt, "setOrientation");
1149
+ function Kt(e) {
1150
+ A.xAxis.title = xt(e.text);
1151
+ }
1152
+ a(Kt, "setXAxisTitle");
1153
+ function vt(e, t) {
1154
+ A.xAxis = { type: "linear", title: A.xAxis.title, min: e, max: t }, gt = !0;
1155
+ }
1156
+ a(vt, "setXAxisRangeData");
1157
+ function Zt(e) {
1158
+ A.xAxis = {
1159
+ type: "band",
1160
+ title: A.xAxis.title,
1161
+ categories: e.map((t) => xt(t.text))
1162
+ }, gt = !0;
1163
+ }
1164
+ a(Zt, "setXAxisBand");
1165
+ function Jt(e) {
1166
+ A.yAxis.title = xt(e.text);
1167
+ }
1168
+ a(Jt, "setYAxisTitle");
1169
+ function ti(e, t) {
1170
+ A.yAxis = { type: "linear", title: A.yAxis.title, min: e, max: t }, kt = !0;
1171
+ }
1172
+ a(ti, "setYAxisRangeData");
1173
+ function ii(e) {
1174
+ const t = Math.min(...e), i = Math.max(...e), s = q(A.yAxis) ? A.yAxis.min : 1 / 0, n = q(A.yAxis) ? A.yAxis.max : -1 / 0;
1175
+ A.yAxis = {
1176
+ type: "linear",
1177
+ title: A.yAxis.title,
1178
+ min: Math.min(s, t),
1179
+ max: Math.max(n, i)
1180
+ };
1181
+ }
1182
+ a(ii, "setYAxisRangeFromPlotData");
1183
+ function Pt(e) {
1184
+ let t = [];
1185
+ if (e.length === 0)
1186
+ return t;
1187
+ if (!gt) {
1188
+ const i = q(A.xAxis) ? A.xAxis.min : 1 / 0, s = q(A.xAxis) ? A.xAxis.max : -1 / 0;
1189
+ vt(Math.min(i, 1), Math.max(s, e.length));
1190
+ }
1191
+ if (kt || ii(e), _t(A.xAxis) && (t = A.xAxis.categories.map((i, s) => [i, e[s]])), q(A.xAxis)) {
1192
+ const i = A.xAxis.min, s = A.xAxis.max, n = (s - i) / (e.length - 1), o = [];
1193
+ for (let g = i; g <= s; g += n)
1194
+ o.push(`${g}`);
1195
+ t = o.map((g, m) => [g, e[m]]);
1196
+ }
1197
+ return t;
1198
+ }
1199
+ a(Pt, "transformDataWithoutCategory");
1200
+ function Lt(e) {
1201
+ return Ct[e === 0 ? 0 : e % Ct.length];
1202
+ }
1203
+ a(Lt, "getPlotColorFromPalette");
1204
+ function ei(e, t) {
1205
+ const i = Pt(t);
1206
+ A.plots.push({
1207
+ type: "line",
1208
+ strokeFill: Lt(Q),
1209
+ strokeWidth: 2,
1210
+ data: i
1211
+ }), Q++;
1212
+ }
1213
+ a(ei, "setLineData");
1214
+ function si(e, t) {
1215
+ const i = Pt(t);
1216
+ A.plots.push({
1217
+ type: "bar",
1218
+ fill: Lt(Q),
1219
+ data: i
1220
+ }), Q++;
1221
+ }
1222
+ a(si, "setBarData");
1223
+ function ni() {
1224
+ if (A.plots.length === 0)
1225
+ throw Error("No Plot to render, please provide a plot with some data");
1226
+ return A.title = Yt(), Vi.build(K, A, Z, qt);
1227
+ }
1228
+ a(ni, "getDrawableElem");
1229
+ function ai() {
1230
+ return Z;
1231
+ }
1232
+ a(ai, "getChartThemeConfig");
1233
+ function ri() {
1234
+ return K;
1235
+ }
1236
+ a(ri, "getChartConfig");
1237
+ function oi() {
1238
+ return A;
1239
+ }
1240
+ a(oi, "getXYChartData");
1241
+ var Bi = /* @__PURE__ */ a(function() {
1242
+ wi(), Q = 0, K = Tt(), A = Dt(), Z = Rt(), Ct = Z.plotColorPalette.split(",").map((e) => e.trim()), gt = !1, kt = !1;
1243
+ }, "clear"), Wi = {
1244
+ getDrawableElem: ni,
1245
+ clear: Bi,
1246
+ setAccTitle: pi,
1247
+ getAccTitle: mi,
1248
+ setDiagramTitle: yi,
1249
+ getDiagramTitle: Yt,
1250
+ getAccDescription: bi,
1251
+ setAccDescription: Ai,
1252
+ setOrientation: Qt,
1253
+ setXAxisTitle: Kt,
1254
+ setXAxisRangeData: vt,
1255
+ setXAxisBand: Zt,
1256
+ setYAxisTitle: Jt,
1257
+ setYAxisRangeData: ti,
1258
+ setLineData: ei,
1259
+ setBarData: si,
1260
+ setTmpSVGG: jt,
1261
+ getChartThemeConfig: ai,
1262
+ getChartConfig: ri,
1263
+ getXYChartData: oi
1264
+ }, zi = /* @__PURE__ */ a((e, t, i, s) => {
1265
+ const n = s.db, o = n.getChartThemeConfig(), g = n.getChartConfig(), m = n.getXYChartData().plots[0].data.map((y) => y[1]);
1266
+ function p(y) {
1267
+ return y === "top" ? "text-before-edge" : "middle";
1268
+ }
1269
+ a(p, "getDominantBaseLine");
1270
+ function k(y) {
1271
+ return y === "left" ? "start" : y === "right" ? "end" : "middle";
1272
+ }
1273
+ a(k, "getTextAnchor");
1274
+ function v(y) {
1275
+ return `translate(${y.x}, ${y.y}) rotate(${y.rotation || 0})`;
1276
+ }
1277
+ a(v, "getTextTransformation"), Xt.debug(`Rendering xychart chart
1278
+ ` + e);
1279
+ const C = Ci(t), b = C.append("g").attr("class", "main"), E = b.append("rect").attr("width", g.width).attr("height", g.height).attr("class", "background");
1280
+ Si(C, g.height, g.width, !0), C.attr("viewBox", `0 0 ${g.width} ${g.height}`), E.attr("fill", o.backgroundColor), n.setTmpSVGG(C.append("g").attr("class", "mermaid-tmp-group"));
1281
+ const D = n.getDrawableElem(), P = {};
1282
+ function I(y) {
1283
+ let _ = b, c = "";
1284
+ for (const [W] of y.entries()) {
1285
+ let z = b;
1286
+ W > 0 && P[c] && (z = P[c]), c += y[W], _ = P[c], _ || (_ = P[c] = z.append("g").attr("class", y[W]));
1287
+ }
1288
+ return _;
1289
+ }
1290
+ a(I, "getGroup");
1291
+ for (const y of D) {
1292
+ if (y.data.length === 0)
1293
+ continue;
1294
+ const _ = I(y.groupTexts);
1295
+ switch (y.type) {
1296
+ case "rect":
1297
+ if (_.selectAll("rect").data(y.data).enter().append("rect").attr("x", (c) => c.x).attr("y", (c) => c.y).attr("width", (c) => c.width).attr("height", (c) => c.height).attr("fill", (c) => c.fill).attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth), g.showDataLabel)
1298
+ if (g.chartOrientation === "horizontal") {
1299
+ let c = function(l, L) {
1300
+ const { data: S, label: R } = l;
1301
+ return L * R.length * W <= S.width - 10;
1302
+ };
1303
+ a(c, "fitsHorizontally");
1304
+ const W = 0.7, z = y.data.map((l, L) => ({ data: l, label: m[L].toString() })).filter((l) => l.data.width > 0 && l.data.height > 0), U = z.map((l) => {
1305
+ const { data: L } = l;
1306
+ let S = L.height * 0.7;
1307
+ for (; !c(l, S) && S > 0; )
1308
+ S -= 1;
1309
+ return S;
1310
+ }), X = Math.floor(Math.min(...U));
1311
+ _.selectAll("text").data(z).enter().append("text").attr("x", (l) => l.data.x + l.data.width - 10).attr("y", (l) => l.data.y + l.data.height / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").attr("fill", "black").attr("font-size", `${X}px`).text((l) => l.label);
1312
+ } else {
1313
+ let c = function(l, L, S) {
1314
+ const { data: R, label: $ } = l, N = L * $.length * 0.7, F = R.x + R.width / 2, h = F - N / 2, u = F + N / 2, x = h >= R.x && u <= R.x + R.width, d = R.y + S + L <= R.y + R.height;
1315
+ return x && d;
1316
+ };
1317
+ a(c, "fitsInBar");
1318
+ const W = 10, z = y.data.map((l, L) => ({ data: l, label: m[L].toString() })).filter((l) => l.data.width > 0 && l.data.height > 0), U = z.map((l) => {
1319
+ const { data: L, label: S } = l;
1320
+ let R = L.width / (S.length * 0.7);
1321
+ for (; !c(l, R, W) && R > 0; )
1322
+ R -= 1;
1323
+ return R;
1324
+ }), X = Math.floor(Math.min(...U));
1325
+ _.selectAll("text").data(z).enter().append("text").attr("x", (l) => l.data.x + l.data.width / 2).attr("y", (l) => l.data.y + W).attr("text-anchor", "middle").attr("dominant-baseline", "hanging").attr("fill", "black").attr("font-size", `${X}px`).text((l) => l.label);
1326
+ }
1327
+ break;
1328
+ case "text":
1329
+ _.selectAll("text").data(y.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (c) => c.fill).attr("font-size", (c) => c.fontSize).attr("dominant-baseline", (c) => p(c.verticalPos)).attr("text-anchor", (c) => k(c.horizontalPos)).attr("transform", (c) => v(c)).text((c) => c.text);
1330
+ break;
1331
+ case "path":
1332
+ _.selectAll("path").data(y.data).enter().append("path").attr("d", (c) => c.path).attr("fill", (c) => c.fill ? c.fill : "none").attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth);
1333
+ break;
1334
+ }
1335
+ }
1336
+ }, "draw"), Fi = {
1337
+ draw: zi
1338
+ }, qi = {
1339
+ parser: Ti,
1340
+ db: Wi,
1341
+ renderer: Fi
1342
+ };
1343
+ export {
1344
+ qi as diagram
1345
+ };