@altimateai/ui-components 0.0.78-beta.1 → 0.0.78

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 (404) hide show
  1. package/dist/CoachForm.css +1 -1
  2. package/dist/CoachForm.js +23919 -67654
  3. package/dist/DbtDocsRenderer.js +1 -1
  4. package/dist/Stack.js +2231 -2829
  5. package/dist/Switch.js +87 -128
  6. package/dist/ToggleGroup.js +5100 -6285
  7. package/dist/_basePickBy.js +60 -60
  8. package/dist/_baseUniq.js +152 -152
  9. package/dist/arc.js +53 -53
  10. package/dist/architectureDiagram-VXUJARFQ.js +4315 -480
  11. package/dist/assets/icons/index.js +1 -1
  12. package/dist/blockDiagram-VD42YOAC.js +1 -1
  13. package/dist/c4Diagram-YG6GDRKO.js +22 -22
  14. package/dist/channel.js +2 -2
  15. package/dist/chatbotV2/index.d.ts +19 -57
  16. package/dist/chatbotV2/index.js +56 -91
  17. package/dist/chunk-4BX2VUAB.js +1 -1
  18. package/dist/chunk-55IACEB6.js +2 -2
  19. package/dist/chunk-B4BG7PRW.js +1 -1
  20. package/dist/chunk-DI55MBZ5.js +14 -14
  21. package/dist/chunk-FMBD7UC4.js +1 -1
  22. package/dist/chunk-QN33PNHL.js +5 -5
  23. package/dist/chunk-QZHKN3VN.js +1 -1
  24. package/dist/chunk-TZMSLE5B.js +1 -1
  25. package/dist/classDiagram-2ON5EDUG.js +1 -1
  26. package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
  27. package/dist/cose-bilkent-S5V4N54A.js +2535 -160
  28. package/dist/dagre-6UL2VRFP.js +101 -101
  29. package/dist/dayjs.min.js +2 -2
  30. package/dist/defaultLocale.js +3 -3
  31. package/dist/diagram-PSM6KHXK.js +414 -198
  32. package/dist/diagram-QEK2KX5R.js +26 -26
  33. package/dist/diagram-S2PKOQOG.js +12 -12
  34. package/dist/erDiagram-Q2GNP2WA.js +1 -1
  35. package/dist/flowDiagram-NV44I4VS.js +6 -6
  36. package/dist/ganttDiagram-LVOFAZNH.js +1718 -843
  37. package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
  38. package/dist/graph.js +18 -17
  39. package/dist/index.d.ts +6 -101
  40. package/dist/index.js +37 -37
  41. package/dist/index2.js +684 -216
  42. package/dist/infoDiagram-F6ZHWCRC.js +14 -14
  43. package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
  44. package/dist/kanban-definition-3W4ZIXB7.js +42 -42
  45. package/dist/layout.js +678 -567
  46. package/dist/lineage/index.js +1309 -1302
  47. package/dist/linear.js +1 -1
  48. package/dist/main.css +1 -1
  49. package/dist/main.js +150 -150
  50. package/dist/mermaid-parser.core.js +155 -155
  51. package/dist/mindmap-definition-VGOIOE7T.js +28 -28
  52. package/dist/pieDiagram-ADFJNKIX.js +108 -68
  53. package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
  54. package/dist/redux-toolkit.modern.js +555 -563
  55. package/dist/requirementDiagram-UZGBJVZJ.js +14 -14
  56. package/dist/sankeyDiagram-TZEHDZUN.js +622 -229
  57. package/dist/sequenceDiagram-WL72ISMW.js +1 -1
  58. package/dist/shadcn/index.d.ts +8 -11
  59. package/dist/shadcn/index.js +4733 -6547
  60. package/dist/stateDiagram-FKZM4ZOC.js +33 -33
  61. package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
  62. package/dist/timeline-definition-IT6M3QCI.js +63 -63
  63. package/dist/{types-UHJCpYj0.d.ts → types-ByRPUpXR.d.ts} +116 -25
  64. package/dist/xychartDiagram-PRI3JC2R.js +491 -449
  65. package/package.json +1 -1
  66. package/dist/abap.js +0 -6
  67. package/dist/actionscript-3.js +0 -6
  68. package/dist/ada.js +0 -6
  69. package/dist/andromeeda.js +0 -4
  70. package/dist/angular-html.js +0 -32
  71. package/dist/angular-ts.js +0 -21
  72. package/dist/apache.js +0 -6
  73. package/dist/apex.js +0 -6
  74. package/dist/apl.js +0 -16
  75. package/dist/applescript.js +0 -6
  76. package/dist/ara.js +0 -6
  77. package/dist/architectureDiagram-VXUJARFQ2.js +0 -831
  78. package/dist/asciidoc.js +0 -6
  79. package/dist/asm.js +0 -6
  80. package/dist/astro.js +0 -18
  81. package/dist/aurora-x.js +0 -4
  82. package/dist/awk.js +0 -6
  83. package/dist/ayu-dark.js +0 -4
  84. package/dist/ballerina.js +0 -6
  85. package/dist/band.js +0 -46
  86. package/dist/bat.js +0 -6
  87. package/dist/beancount.js +0 -6
  88. package/dist/berry.js +0 -6
  89. package/dist/bibtex.js +0 -6
  90. package/dist/bicep.js +0 -6
  91. package/dist/blade.js +0 -20
  92. package/dist/blockDiagram-VD42YOAC2.js +0 -2266
  93. package/dist/bsl.js +0 -8
  94. package/dist/c.js +0 -6
  95. package/dist/c3.js +0 -6
  96. package/dist/c4Diagram-YG6GDRKO2.js +0 -1582
  97. package/dist/cadence.js +0 -6
  98. package/dist/cairo.js +0 -8
  99. package/dist/catppuccin-frappe.js +0 -4
  100. package/dist/catppuccin-latte.js +0 -4
  101. package/dist/catppuccin-macchiato.js +0 -4
  102. package/dist/catppuccin-mocha.js +0 -4
  103. package/dist/chunk-4BX2VUAB2.js +0 -9
  104. package/dist/chunk-55IACEB62.js +0 -9
  105. package/dist/chunk-B4BG7PRW2.js +0 -1377
  106. package/dist/chunk-DI55MBZ52.js +0 -1382
  107. package/dist/chunk-FMBD7UC42.js +0 -19
  108. package/dist/chunk-QN33PNHL2.js +0 -20
  109. package/dist/chunk-QZHKN3VN2.js +0 -15
  110. package/dist/chunk-TZMSLE5B2.js +0 -64
  111. package/dist/clarity.js +0 -6
  112. package/dist/classDiagram-2ON5EDUG2.js +0 -17
  113. package/dist/classDiagram-v2-WZHVMYZB2.js +0 -17
  114. package/dist/clojure.js +0 -6
  115. package/dist/cmake.js +0 -6
  116. package/dist/cobol.js +0 -10
  117. package/dist/code-block-37QAKDTI.js +0 -27
  118. package/dist/codeowners.js +0 -6
  119. package/dist/codeql.js +0 -6
  120. package/dist/coffee.js +0 -8
  121. package/dist/common-lisp.js +0 -6
  122. package/dist/coq.js +0 -6
  123. package/dist/cose-bilkent-S5V4N54A2.js +0 -231
  124. package/dist/cpp.js +0 -18
  125. package/dist/crystal.js +0 -18
  126. package/dist/csharp.js +0 -6
  127. package/dist/css.js +0 -6
  128. package/dist/csv.js +0 -6
  129. package/dist/cue.js +0 -6
  130. package/dist/cypher.js +0 -6
  131. package/dist/cytoscape-cose-bilkent.js +0 -2380
  132. package/dist/cytoscape-fcose.js +0 -3840
  133. package/dist/d.js +0 -6
  134. package/dist/dagre-6UL2VRFP2.js +0 -447
  135. package/dist/dark-plus.js +0 -4
  136. package/dist/dart.js +0 -6
  137. package/dist/dax.js +0 -6
  138. package/dist/desktop.js +0 -6
  139. package/dist/diagram-PSM6KHXK2.js +0 -319
  140. package/dist/diagram-QEK2KX5R2.js +0 -221
  141. package/dist/diagram-S2PKOQOG2.js +0 -143
  142. package/dist/diff.js +0 -6
  143. package/dist/docker.js +0 -6
  144. package/dist/dotenv.js +0 -6
  145. package/dist/dracula-soft.js +0 -4
  146. package/dist/dracula.js +0 -4
  147. package/dist/dream-maker.js +0 -6
  148. package/dist/edge.js +0 -12
  149. package/dist/elixir.js +0 -8
  150. package/dist/elm.js +0 -8
  151. package/dist/emacs-lisp.js +0 -6
  152. package/dist/erDiagram-Q2GNP2WA2.js +0 -843
  153. package/dist/erb.js +0 -10
  154. package/dist/erlang.js +0 -8
  155. package/dist/everforest-dark.js +0 -4
  156. package/dist/everforest-light.js +0 -4
  157. package/dist/fennel.js +0 -6
  158. package/dist/fish.js +0 -6
  159. package/dist/flowDiagram-NV44I4VS2.js +0 -1628
  160. package/dist/fluent.js +0 -6
  161. package/dist/fortran-fixed-form.js +0 -8
  162. package/dist/fortran-free-form.js +0 -6
  163. package/dist/fsharp.js +0 -8
  164. package/dist/ganttDiagram-JELNMOA3.js +0 -1788
  165. package/dist/gdresource.js +0 -10
  166. package/dist/gdscript.js +0 -6
  167. package/dist/gdshader.js +0 -6
  168. package/dist/genie.js +0 -6
  169. package/dist/gherkin.js +0 -6
  170. package/dist/git-commit.js +0 -8
  171. package/dist/git-rebase.js +0 -8
  172. package/dist/gitGraphDiagram-NY62KEGX2.js +0 -713
  173. package/dist/github-dark-default.js +0 -4
  174. package/dist/github-dark-dimmed.js +0 -4
  175. package/dist/github-dark-high-contrast.js +0 -4
  176. package/dist/github-dark.js +0 -4
  177. package/dist/github-light-default.js +0 -4
  178. package/dist/github-light-high-contrast.js +0 -4
  179. package/dist/github-light.js +0 -4
  180. package/dist/gleam.js +0 -6
  181. package/dist/glimmer-js.js +0 -14
  182. package/dist/glimmer-ts.js +0 -14
  183. package/dist/glsl.js +0 -8
  184. package/dist/gn.js +0 -6
  185. package/dist/gnuplot.js +0 -6
  186. package/dist/go.js +0 -6
  187. package/dist/graph2.js +0 -246
  188. package/dist/graphql.js +0 -14
  189. package/dist/groovy.js +0 -6
  190. package/dist/gruvbox-dark-hard.js +0 -4
  191. package/dist/gruvbox-dark-medium.js +0 -4
  192. package/dist/gruvbox-dark-soft.js +0 -4
  193. package/dist/gruvbox-light-hard.js +0 -4
  194. package/dist/gruvbox-light-medium.js +0 -4
  195. package/dist/gruvbox-light-soft.js +0 -4
  196. package/dist/hack.js +0 -10
  197. package/dist/haml.js +0 -10
  198. package/dist/handlebars.js +0 -14
  199. package/dist/haskell.js +0 -6
  200. package/dist/haxe.js +0 -6
  201. package/dist/hcl.js +0 -6
  202. package/dist/hjson.js +0 -6
  203. package/dist/hlsl.js +0 -6
  204. package/dist/houston.js +0 -4
  205. package/dist/html-derivative.js +0 -8
  206. package/dist/html.js +0 -10
  207. package/dist/http.js +0 -14
  208. package/dist/hurl.js +0 -12
  209. package/dist/hxml.js +0 -8
  210. package/dist/hy.js +0 -6
  211. package/dist/imba.js +0 -6
  212. package/dist/index3.js +0 -689
  213. package/dist/infoDiagram-WHAUD3N6.js +0 -24
  214. package/dist/ini.js +0 -6
  215. package/dist/java.js +0 -6
  216. package/dist/javascript.js +0 -6
  217. package/dist/jinja.js +0 -11
  218. package/dist/jison.js +0 -8
  219. package/dist/journeyDiagram-XKPGCS4Q2.js +0 -837
  220. package/dist/json.js +0 -6
  221. package/dist/json5.js +0 -6
  222. package/dist/jsonc.js +0 -6
  223. package/dist/jsonl.js +0 -6
  224. package/dist/jsonnet.js +0 -6
  225. package/dist/jssm.js +0 -6
  226. package/dist/jsx.js +0 -6
  227. package/dist/julia.js +0 -16
  228. package/dist/kanagawa-dragon.js +0 -4
  229. package/dist/kanagawa-lotus.js +0 -4
  230. package/dist/kanagawa-wave.js +0 -4
  231. package/dist/kanban-definition-3W4ZIXB72.js +0 -720
  232. package/dist/katex2.js +0 -11691
  233. package/dist/kdl.js +0 -6
  234. package/dist/kotlin.js +0 -6
  235. package/dist/kusto.js +0 -6
  236. package/dist/laserwave.js +0 -4
  237. package/dist/latex.js +0 -8
  238. package/dist/layout2.js +0 -1224
  239. package/dist/lean.js +0 -6
  240. package/dist/less.js +0 -6
  241. package/dist/light-plus.js +0 -4
  242. package/dist/liquid.js +0 -14
  243. package/dist/llvm.js +0 -6
  244. package/dist/log.js +0 -6
  245. package/dist/logo.js +0 -6
  246. package/dist/lua.js +0 -8
  247. package/dist/luau.js +0 -6
  248. package/dist/make.js +0 -6
  249. package/dist/markdown.js +0 -6
  250. package/dist/marko.js +0 -14
  251. package/dist/material-theme-darker.js +0 -4
  252. package/dist/material-theme-lighter.js +0 -4
  253. package/dist/material-theme-ocean.js +0 -4
  254. package/dist/material-theme-palenight.js +0 -4
  255. package/dist/material-theme.js +0 -4
  256. package/dist/matlab.js +0 -6
  257. package/dist/mdc.js +0 -12
  258. package/dist/mdx.js +0 -6
  259. package/dist/mermaid-4DMBBIKO.js +0 -4
  260. package/dist/mermaid.js +0 -6
  261. package/dist/min-dark.js +0 -4
  262. package/dist/min-light.js +0 -4
  263. package/dist/mindmap-definition-VGOIOE7T2.js +0 -786
  264. package/dist/mipsasm.js +0 -6
  265. package/dist/mojo.js +0 -6
  266. package/dist/monokai.js +0 -4
  267. package/dist/moonbit.js +0 -6
  268. package/dist/move.js +0 -6
  269. package/dist/narrat.js +0 -6
  270. package/dist/nextflow.js +0 -6
  271. package/dist/nginx.js +0 -8
  272. package/dist/night-owl.js +0 -4
  273. package/dist/nim.js +0 -20
  274. package/dist/nix.js +0 -9
  275. package/dist/nord.js +0 -4
  276. package/dist/nushell.js +0 -6
  277. package/dist/objective-c.js +0 -6
  278. package/dist/objective-cpp.js +0 -6
  279. package/dist/ocaml.js +0 -6
  280. package/dist/one-dark-pro.js +0 -4
  281. package/dist/one-light.js +0 -4
  282. package/dist/openscad.js +0 -6
  283. package/dist/pascal.js +0 -6
  284. package/dist/perl.js +0 -16
  285. package/dist/php.js +0 -18
  286. package/dist/pie.js +0 -45
  287. package/dist/pieDiagram-ADFJNKIX2.js +0 -123
  288. package/dist/pkl.js +0 -6
  289. package/dist/plastic.js +0 -4
  290. package/dist/plsql.js +0 -6
  291. package/dist/po.js +0 -6
  292. package/dist/poimandres.js +0 -4
  293. package/dist/polar.js +0 -6
  294. package/dist/postcss.js +0 -6
  295. package/dist/powerquery.js +0 -6
  296. package/dist/powershell.js +0 -6
  297. package/dist/prisma.js +0 -6
  298. package/dist/prolog.js +0 -6
  299. package/dist/proto.js +0 -6
  300. package/dist/pug.js +0 -12
  301. package/dist/puppet.js +0 -6
  302. package/dist/purescript.js +0 -6
  303. package/dist/python.js +0 -6
  304. package/dist/qml.js +0 -8
  305. package/dist/qmldir.js +0 -6
  306. package/dist/qss.js +0 -6
  307. package/dist/quadrantDiagram-AYHSOK5B2.js +0 -1025
  308. package/dist/r.js +0 -6
  309. package/dist/racket.js +0 -6
  310. package/dist/raku.js +0 -6
  311. package/dist/razor.js +0 -10
  312. package/dist/red.js +0 -4
  313. package/dist/reg.js +0 -6
  314. package/dist/regexp.js +0 -6
  315. package/dist/rel.js +0 -6
  316. package/dist/requirementDiagram-UZGBJVZJ2.js +0 -852
  317. package/dist/riscv.js +0 -6
  318. package/dist/rose-pine-dawn.js +0 -4
  319. package/dist/rose-pine-moon.js +0 -4
  320. package/dist/rose-pine.js +0 -4
  321. package/dist/rosmsg.js +0 -6
  322. package/dist/rst.js +0 -22
  323. package/dist/ruby.js +0 -30
  324. package/dist/rust.js +0 -6
  325. package/dist/sankeyDiagram-TZEHDZUN2.js +0 -418
  326. package/dist/sankeyLinkHorizontal.js +0 -403
  327. package/dist/sas.js +0 -8
  328. package/dist/sass.js +0 -6
  329. package/dist/scala.js +0 -6
  330. package/dist/scheme.js +0 -6
  331. package/dist/scss.js +0 -8
  332. package/dist/sdbl.js +0 -6
  333. package/dist/sequenceDiagram-WL72ISMW2.js +0 -2523
  334. package/dist/shaderlab.js +0 -8
  335. package/dist/shellscript.js +0 -6
  336. package/dist/shellsession.js +0 -8
  337. package/dist/slack-dark.js +0 -4
  338. package/dist/slack-ochin.js +0 -4
  339. package/dist/smalltalk.js +0 -6
  340. package/dist/snazzy-light.js +0 -4
  341. package/dist/solarized-dark.js +0 -4
  342. package/dist/solarized-light.js +0 -4
  343. package/dist/solidity.js +0 -6
  344. package/dist/soy.js +0 -8
  345. package/dist/sparql.js +0 -8
  346. package/dist/splunk.js +0 -6
  347. package/dist/sql.js +0 -6
  348. package/dist/ssh-config.js +0 -6
  349. package/dist/stata.js +0 -8
  350. package/dist/stateDiagram-FKZM4ZOC2.js +0 -264
  351. package/dist/stateDiagram-v2-4FDKWEC32.js +0 -17
  352. package/dist/stylus.js +0 -6
  353. package/dist/svelte.js +0 -14
  354. package/dist/swift.js +0 -6
  355. package/dist/synthwave-84.js +0 -4
  356. package/dist/system-verilog.js +0 -6
  357. package/dist/systemd.js +0 -6
  358. package/dist/talonscript.js +0 -6
  359. package/dist/tasl.js +0 -6
  360. package/dist/tcl.js +0 -6
  361. package/dist/templ.js +0 -12
  362. package/dist/terraform.js +0 -6
  363. package/dist/tex.js +0 -8
  364. package/dist/time.js +0 -900
  365. package/dist/timeline-definition-IT6M3QCI2.js +0 -802
  366. package/dist/tokyo-night.js +0 -4
  367. package/dist/toml.js +0 -6
  368. package/dist/ts-tags.js +0 -41
  369. package/dist/tsv.js +0 -6
  370. package/dist/tsx.js +0 -6
  371. package/dist/turtle.js +0 -6
  372. package/dist/twig.js +0 -18
  373. package/dist/typescript.js +0 -6
  374. package/dist/typespec.js +0 -6
  375. package/dist/typst.js +0 -6
  376. package/dist/union.js +0 -8
  377. package/dist/v.js +0 -6
  378. package/dist/vala.js +0 -6
  379. package/dist/vb.js +0 -6
  380. package/dist/verilog.js +0 -6
  381. package/dist/vesper.js +0 -4
  382. package/dist/vhdl.js +0 -6
  383. package/dist/viml.js +0 -6
  384. package/dist/vitesse-black.js +0 -4
  385. package/dist/vitesse-dark.js +0 -4
  386. package/dist/vitesse-light.js +0 -4
  387. package/dist/vue-html.js +0 -8
  388. package/dist/vue-vine.js +0 -18
  389. package/dist/vue.js +0 -31
  390. package/dist/vyper.js +0 -6
  391. package/dist/wasm.js +0 -7
  392. package/dist/wasm2.js +0 -6
  393. package/dist/wenyan.js +0 -6
  394. package/dist/wgsl.js +0 -6
  395. package/dist/wikitext.js +0 -6
  396. package/dist/wit.js +0 -6
  397. package/dist/wolfram.js +0 -6
  398. package/dist/xml.js +0 -8
  399. package/dist/xsl.js +0 -8
  400. package/dist/xychartDiagram-PRI3JC2R2.js +0 -1299
  401. package/dist/yaml.js +0 -6
  402. package/dist/zenscript.js +0 -6
  403. package/dist/zig.js +0 -6
  404. package/dist/zipObject.js +0 -128
@@ -1,271 +1,487 @@
1
- import { s as ne, g as oe, m as ie, n as ce, b as pe, c as de, _ as h, E as U, D as q, ae as he, r as ue, C as me, l as I, H as fe, j as ye, af as L } from "./CoachForm.js";
2
- import { s as ge } from "./chunk-QN33PNHL.js";
3
- import { p as Se } from "./chunk-4BX2VUAB.js";
4
- import { p as xe } from "./mermaid-parser.core.js";
5
- import { s as _ } from "./redux-toolkit.modern.js";
6
- import { f as P } from "./defaultLocale.js";
7
- import { o as B } from "./ordinal.js";
8
- import { h as be, t as ve } from "./index2.js";
9
- var F, J = (F = class {
1
+ import { a3 as he, a4 as ue, ag as pe, ah as fe, a5 as ge, a6 as me, a1 as w, aw as te, av as ae, bK as ye, an as Se, au as ve, ad as J, az as xe, ae as be, bL as P } from "./CoachForm.js";
2
+ import { s as we } from "./chunk-QN33PNHL.js";
3
+ import { p as Ce } from "./chunk-4BX2VUAB.js";
4
+ import { p as Te } from "./mermaid-parser.core.js";
5
+ import { s as Y } from "./redux-toolkit.modern.js";
6
+ import { b as O } from "./defaultLocale.js";
7
+ import { o as Z } from "./ordinal.js";
8
+ function Le(t) {
9
+ var a = 0, l = t.children, n = l && l.length;
10
+ if (!n) a = 1;
11
+ else for (; --n >= 0; ) a += l[n].value;
12
+ t.value = a;
13
+ }
14
+ function $e() {
15
+ return this.eachAfter(Le);
16
+ }
17
+ function Ae(t, a) {
18
+ let l = -1;
19
+ for (const n of this)
20
+ t.call(a, n, ++l, this);
21
+ return this;
22
+ }
23
+ function Fe(t, a) {
24
+ for (var l = this, n = [l], o, s, d = -1; l = n.pop(); )
25
+ if (t.call(a, l, ++d, this), o = l.children)
26
+ for (s = o.length - 1; s >= 0; --s)
27
+ n.push(o[s]);
28
+ return this;
29
+ }
30
+ function ke(t, a) {
31
+ for (var l = this, n = [l], o = [], s, d, h, g = -1; l = n.pop(); )
32
+ if (o.push(l), s = l.children)
33
+ for (d = 0, h = s.length; d < h; ++d)
34
+ n.push(s[d]);
35
+ for (; l = o.pop(); )
36
+ t.call(a, l, ++g, this);
37
+ return this;
38
+ }
39
+ function Ne(t, a) {
40
+ let l = -1;
41
+ for (const n of this)
42
+ if (t.call(a, n, ++l, this))
43
+ return n;
44
+ }
45
+ function Me(t) {
46
+ return this.eachAfter(function(a) {
47
+ for (var l = +t(a.data) || 0, n = a.children, o = n && n.length; --o >= 0; ) l += n[o].value;
48
+ a.value = l;
49
+ });
50
+ }
51
+ function ze(t) {
52
+ return this.eachBefore(function(a) {
53
+ a.children && a.children.sort(t);
54
+ });
55
+ }
56
+ function _e(t) {
57
+ for (var a = this, l = Ve(a, t), n = [a]; a !== l; )
58
+ a = a.parent, n.push(a);
59
+ for (var o = n.length; t !== l; )
60
+ n.splice(o, 0, t), t = t.parent;
61
+ return n;
62
+ }
63
+ function Ve(t, a) {
64
+ if (t === a) return t;
65
+ var l = t.ancestors(), n = a.ancestors(), o = null;
66
+ for (t = l.pop(), a = n.pop(); t === a; )
67
+ o = t, t = l.pop(), a = n.pop();
68
+ return o;
69
+ }
70
+ function De() {
71
+ for (var t = this, a = [t]; t = t.parent; )
72
+ a.push(t);
73
+ return a;
74
+ }
75
+ function Pe() {
76
+ return Array.from(this);
77
+ }
78
+ function Be() {
79
+ var t = [];
80
+ return this.eachBefore(function(a) {
81
+ a.children || t.push(a);
82
+ }), t;
83
+ }
84
+ function Re() {
85
+ var t = this, a = [];
86
+ return t.each(function(l) {
87
+ l !== t && a.push({ source: l.parent, target: l });
88
+ }), a;
89
+ }
90
+ function* Ee() {
91
+ var t = this, a, l = [t], n, o, s;
92
+ do
93
+ for (a = l.reverse(), l = []; t = a.pop(); )
94
+ if (yield t, n = t.children)
95
+ for (o = 0, s = n.length; o < s; ++o)
96
+ l.push(n[o]);
97
+ while (l.length);
98
+ }
99
+ function Q(t, a) {
100
+ t instanceof Map ? (t = [void 0, t], a === void 0 && (a = Ie)) : a === void 0 && (a = He);
101
+ for (var l = new K(t), n, o = [l], s, d, h, g; n = o.pop(); )
102
+ if ((d = a(n.data)) && (g = (d = Array.from(d)).length))
103
+ for (n.children = d, h = g - 1; h >= 0; --h)
104
+ o.push(s = d[h] = new K(d[h])), s.parent = n, s.depth = n.depth + 1;
105
+ return l.eachBefore(Ge);
106
+ }
107
+ function We() {
108
+ return Q(this).eachBefore(Oe);
109
+ }
110
+ function He(t) {
111
+ return t.children;
112
+ }
113
+ function Ie(t) {
114
+ return Array.isArray(t) ? t[1] : null;
115
+ }
116
+ function Oe(t) {
117
+ t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
118
+ }
119
+ function Ge(t) {
120
+ var a = 0;
121
+ do
122
+ t.height = a;
123
+ while ((t = t.parent) && t.height < ++a);
124
+ }
125
+ function K(t) {
126
+ this.data = t, this.depth = this.height = 0, this.parent = null;
127
+ }
128
+ K.prototype = Q.prototype = {
129
+ constructor: K,
130
+ count: $e,
131
+ each: Ae,
132
+ eachAfter: ke,
133
+ eachBefore: Fe,
134
+ find: Ne,
135
+ sum: Me,
136
+ sort: ze,
137
+ path: _e,
138
+ ancestors: De,
139
+ descendants: Pe,
140
+ leaves: Be,
141
+ links: Re,
142
+ copy: We,
143
+ [Symbol.iterator]: Ee
144
+ };
145
+ function qe(t) {
146
+ if (typeof t != "function") throw new Error();
147
+ return t;
148
+ }
149
+ function G() {
150
+ return 0;
151
+ }
152
+ function q(t) {
153
+ return function() {
154
+ return t;
155
+ };
156
+ }
157
+ function Xe(t) {
158
+ t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
159
+ }
160
+ function je(t, a, l, n, o) {
161
+ for (var s = t.children, d, h = -1, g = s.length, c = t.value && (n - a) / t.value; ++h < g; )
162
+ d = s[h], d.y0 = l, d.y1 = o, d.x0 = a, d.x1 = a += d.value * c;
163
+ }
164
+ function Ye(t, a, l, n, o) {
165
+ for (var s = t.children, d, h = -1, g = s.length, c = t.value && (o - l) / t.value; ++h < g; )
166
+ d = s[h], d.x0 = a, d.x1 = n, d.y0 = l, d.y1 = l += d.value * c;
167
+ }
168
+ var Ke = (1 + Math.sqrt(5)) / 2;
169
+ function Ue(t, a, l, n, o, s) {
170
+ for (var d = [], h = a.children, g, c, u = 0, b = 0, r = h.length, x, S, v = a.value, p, m, N, k, V, E, M; u < r; ) {
171
+ x = o - l, S = s - n;
172
+ do
173
+ p = h[b++].value;
174
+ while (!p && b < r);
175
+ for (m = N = p, E = Math.max(S / x, x / S) / (v * t), M = p * p * E, V = Math.max(N / M, M / m); b < r; ++b) {
176
+ if (p += c = h[b].value, c < m && (m = c), c > N && (N = c), M = p * p * E, k = Math.max(N / M, M / m), k > V) {
177
+ p -= c;
178
+ break;
179
+ }
180
+ V = k;
181
+ }
182
+ d.push(g = { value: p, dice: x < S, children: h.slice(u, b) }), g.dice ? je(g, l, n, o, v ? n += S * p / v : s) : Ye(g, l, n, v ? l += x * p / v : o, s), v -= p, u = b;
183
+ }
184
+ return d;
185
+ }
186
+ const Ze = function t(a) {
187
+ function l(n, o, s, d, h) {
188
+ Ue(a, n, o, s, d, h);
189
+ }
190
+ return l.ratio = function(n) {
191
+ return t((n = +n) > 1 ? n : 1);
192
+ }, l;
193
+ }(Ke);
194
+ function Je() {
195
+ var t = Ze, a = !1, l = 1, n = 1, o = [0], s = G, d = G, h = G, g = G, c = G;
196
+ function u(r) {
197
+ return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), o = [0], a && r.eachBefore(Xe), r;
198
+ }
199
+ function b(r) {
200
+ var x = o[r.depth], S = r.x0 + x, v = r.y0 + x, p = r.x1 - x, m = r.y1 - x;
201
+ p < S && (S = p = (S + p) / 2), m < v && (v = m = (v + m) / 2), r.x0 = S, r.y0 = v, r.x1 = p, r.y1 = m, r.children && (x = o[r.depth + 1] = s(r) / 2, S += c(r) - x, v += d(r) - x, p -= h(r) - x, m -= g(r) - x, p < S && (S = p = (S + p) / 2), m < v && (v = m = (v + m) / 2), t(r, S, v, p, m));
202
+ }
203
+ return u.round = function(r) {
204
+ return arguments.length ? (a = !!r, u) : a;
205
+ }, u.size = function(r) {
206
+ return arguments.length ? (l = +r[0], n = +r[1], u) : [l, n];
207
+ }, u.tile = function(r) {
208
+ return arguments.length ? (t = qe(r), u) : t;
209
+ }, u.padding = function(r) {
210
+ return arguments.length ? u.paddingInner(r).paddingOuter(r) : u.paddingInner();
211
+ }, u.paddingInner = function(r) {
212
+ return arguments.length ? (s = typeof r == "function" ? r : q(+r), u) : s;
213
+ }, u.paddingOuter = function(r) {
214
+ return arguments.length ? u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r) : u.paddingTop();
215
+ }, u.paddingTop = function(r) {
216
+ return arguments.length ? (d = typeof r == "function" ? r : q(+r), u) : d;
217
+ }, u.paddingRight = function(r) {
218
+ return arguments.length ? (h = typeof r == "function" ? r : q(+r), u) : h;
219
+ }, u.paddingBottom = function(r) {
220
+ return arguments.length ? (g = typeof r == "function" ? r : q(+r), u) : g;
221
+ }, u.paddingLeft = function(r) {
222
+ return arguments.length ? (c = typeof r == "function" ? r : q(+r), u) : c;
223
+ }, u;
224
+ }
225
+ var R, ne = (R = class {
10
226
  constructor() {
11
- this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = ne, this.getAccTitle = oe, this.setDiagramTitle = ie, this.getDiagramTitle = ce, this.getAccDescription = pe, this.setAccDescription = de;
227
+ this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = he, this.getAccTitle = ue, this.setDiagramTitle = pe, this.getDiagramTitle = fe, this.getAccDescription = ge, this.setAccDescription = me;
12
228
  }
13
229
  getNodes() {
14
230
  return this.nodes;
15
231
  }
16
232
  getConfig() {
17
- const a = me, o = U();
18
- return q({
233
+ const a = ve, l = te();
234
+ return ae({
19
235
  ...a.treemap,
20
- ...o.treemap ?? {}
236
+ ...l.treemap ?? {}
21
237
  });
22
238
  }
23
- addNode(a, o) {
24
- this.nodes.push(a), this.levels.set(a, o), o === 0 && (this.outerNodes.push(a), this.root ?? (this.root = a));
239
+ addNode(a, l) {
240
+ this.nodes.push(a), this.levels.set(a, l), l === 0 && (this.outerNodes.push(a), this.root ?? (this.root = a));
25
241
  }
26
242
  getRoot() {
27
243
  return { name: "", children: this.outerNodes };
28
244
  }
29
- addClass(a, o) {
30
- const s = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, c = o.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
31
- c && c.forEach((r) => {
32
- he(r) && (s != null && s.textStyles ? s.textStyles.push(r) : s.textStyles = [r]), s != null && s.styles ? s.styles.push(r) : s.styles = [r];
33
- }), this.classes.set(a, s);
245
+ addClass(a, l) {
246
+ const n = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, o = l.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
247
+ o && o.forEach((s) => {
248
+ ye(s) && (n != null && n.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n != null && n.styles ? n.styles.push(s) : n.styles = [s];
249
+ }), this.classes.set(a, n);
34
250
  }
35
251
  getClasses() {
36
252
  return this.classes;
37
253
  }
38
254
  getStylesForClass(a) {
39
- var o;
40
- return ((o = this.classes.get(a)) == null ? void 0 : o.styles) ?? [];
255
+ var l;
256
+ return ((l = this.classes.get(a)) == null ? void 0 : l.styles) ?? [];
41
257
  }
42
258
  clear() {
43
- ue(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
259
+ Se(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
44
260
  }
45
- }, h(F, "TreeMapDB"), F);
46
- function K(p) {
47
- if (!p.length)
261
+ }, w(R, "TreeMapDB"), R);
262
+ function le(t) {
263
+ if (!t.length)
48
264
  return [];
49
- const a = [], o = [];
50
- return p.forEach((s) => {
51
- const c = {
52
- name: s.name,
53
- children: s.type === "Leaf" ? void 0 : []
265
+ const a = [], l = [];
266
+ return t.forEach((n) => {
267
+ const o = {
268
+ name: n.name,
269
+ children: n.type === "Leaf" ? void 0 : []
54
270
  };
55
- for (c.classSelector = s == null ? void 0 : s.classSelector, s != null && s.cssCompiledStyles && (c.cssCompiledStyles = [s.cssCompiledStyles]), s.type === "Leaf" && s.value !== void 0 && (c.value = s.value); o.length > 0 && o[o.length - 1].level >= s.level; )
56
- o.pop();
57
- if (o.length === 0)
58
- a.push(c);
271
+ for (o.classSelector = n == null ? void 0 : n.classSelector, n != null && n.cssCompiledStyles && (o.cssCompiledStyles = [n.cssCompiledStyles]), n.type === "Leaf" && n.value !== void 0 && (o.value = n.value); l.length > 0 && l[l.length - 1].level >= n.level; )
272
+ l.pop();
273
+ if (l.length === 0)
274
+ a.push(o);
59
275
  else {
60
- const r = o[o.length - 1].node;
61
- r.children ? r.children.push(c) : r.children = [c];
276
+ const s = l[l.length - 1].node;
277
+ s.children ? s.children.push(o) : s.children = [o];
62
278
  }
63
- s.type !== "Leaf" && o.push({ node: c, level: s.level });
279
+ n.type !== "Leaf" && l.push({ node: o, level: n.level });
64
280
  }), a;
65
281
  }
66
- h(K, "buildHierarchy");
67
- var Ce = /* @__PURE__ */ h((p, a) => {
68
- Se(p, a);
69
- const o = [];
70
- for (const r of p.TreemapRows ?? [])
71
- r.$type === "ClassDefStatement" && a.addClass(r.className ?? "", r.styleText ?? "");
72
- for (const r of p.TreemapRows ?? []) {
73
- const d = r.item;
282
+ w(le, "buildHierarchy");
283
+ var Qe = /* @__PURE__ */ w((t, a) => {
284
+ Ce(t, a);
285
+ const l = [];
286
+ for (const s of t.TreemapRows ?? [])
287
+ s.$type === "ClassDefStatement" && a.addClass(s.className ?? "", s.styleText ?? "");
288
+ for (const s of t.TreemapRows ?? []) {
289
+ const d = s.item;
74
290
  if (!d)
75
291
  continue;
76
- const f = r.indent ? parseInt(r.indent) : 0, V = we(d), l = d.classSelector ? a.getStylesForClass(d.classSelector) : [], z = l.length > 0 ? l.join(";") : void 0, b = {
77
- level: f,
78
- name: V,
292
+ const h = s.indent ? parseInt(s.indent) : 0, g = et(d), c = d.classSelector ? a.getStylesForClass(d.classSelector) : [], u = c.length > 0 ? c.join(";") : void 0, b = {
293
+ level: h,
294
+ name: g,
79
295
  type: d.$type,
80
296
  value: d.value,
81
297
  classSelector: d.classSelector,
82
- cssCompiledStyles: z
298
+ cssCompiledStyles: u
83
299
  };
84
- o.push(b);
300
+ l.push(b);
85
301
  }
86
- const s = K(o), c = /* @__PURE__ */ h((r, d) => {
87
- for (const f of r)
88
- a.addNode(f, d), f.children && f.children.length > 0 && c(f.children, d + 1);
302
+ const n = le(l), o = /* @__PURE__ */ w((s, d) => {
303
+ for (const h of s)
304
+ a.addNode(h, d), h.children && h.children.length > 0 && o(h.children, d + 1);
89
305
  }, "addNodesRecursively");
90
- c(s, 0);
91
- }, "populate"), we = /* @__PURE__ */ h((p) => p.name ? String(p.name) : "", "getItemName"), Q = {
306
+ o(n, 0);
307
+ }, "populate"), et = /* @__PURE__ */ w((t) => t.name ? String(t.name) : "", "getItemName"), re = {
92
308
  // @ts-expect-error - TreeMapDB is not assignable to DiagramDB
93
309
  parser: { yy: void 0 },
94
- parse: /* @__PURE__ */ h(async (p) => {
310
+ parse: /* @__PURE__ */ w(async (t) => {
95
311
  var a;
96
312
  try {
97
- const s = await xe("treemap", p);
98
- I.debug("Treemap AST:", s);
99
- const c = (a = Q.parser) == null ? void 0 : a.yy;
100
- if (!(c instanceof J))
313
+ const n = await Te("treemap", t);
314
+ J.debug("Treemap AST:", n);
315
+ const o = (a = re.parser) == null ? void 0 : a.yy;
316
+ if (!(o instanceof ne))
101
317
  throw new Error(
102
318
  "parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
103
319
  );
104
- Ce(s, c);
105
- } catch (o) {
106
- throw I.error("Error parsing treemap:", o), o;
320
+ Qe(n, o);
321
+ } catch (l) {
322
+ throw J.error("Error parsing treemap:", l), l;
107
323
  }
108
324
  }, "parse")
109
- }, Te = 10, $ = 10, M = 25, Le = /* @__PURE__ */ h((p, a, o, s) => {
110
- const c = s.db, r = c.getConfig(), d = r.padding ?? Te, f = c.getDiagramTitle(), V = c.getRoot(), { themeVariables: l } = U();
111
- if (!V)
325
+ }, tt = 10, B = 10, X = 25, at = /* @__PURE__ */ w((t, a, l, n) => {
326
+ const o = n.db, s = o.getConfig(), d = s.padding ?? tt, h = o.getDiagramTitle(), g = o.getRoot(), { themeVariables: c } = te();
327
+ if (!g)
112
328
  return;
113
- const z = f ? 30 : 0, b = fe(a), G = r.nodeWidth ? r.nodeWidth * $ : 960, O = r.nodeHeight ? r.nodeHeight * $ : 500, H = G, X = O + z;
114
- b.attr("viewBox", `0 0 ${H} ${X}`), ye(b, X, H, r.useMaxWidth);
115
- let v;
329
+ const u = h ? 30 : 0, b = xe(a), r = s.nodeWidth ? s.nodeWidth * B : 960, x = s.nodeHeight ? s.nodeHeight * B : 500, S = r, v = x + u;
330
+ b.attr("viewBox", `0 0 ${S} ${v}`), be(b, v, S, s.useMaxWidth);
331
+ let p;
116
332
  try {
117
- const e = r.valueFormat || ",";
333
+ const e = s.valueFormat || ",";
118
334
  if (e === "$0,0")
119
- v = /* @__PURE__ */ h((t) => "$" + P(",")(t), "valueFormat");
335
+ p = /* @__PURE__ */ w((i) => "$" + O(",")(i), "valueFormat");
120
336
  else if (e.startsWith("$") && e.includes(",")) {
121
- const t = /\.\d+/.exec(e), n = t ? t[0] : "";
122
- v = /* @__PURE__ */ h((u) => "$" + P("," + n)(u), "valueFormat");
337
+ const i = /\.\d+/.exec(e), f = i ? i[0] : "";
338
+ p = /* @__PURE__ */ w((C) => "$" + O("," + f)(C), "valueFormat");
123
339
  } else if (e.startsWith("$")) {
124
- const t = e.substring(1);
125
- v = /* @__PURE__ */ h((n) => "$" + P(t || "")(n), "valueFormat");
340
+ const i = e.substring(1);
341
+ p = /* @__PURE__ */ w((f) => "$" + O(i || "")(f), "valueFormat");
126
342
  } else
127
- v = P(e);
343
+ p = O(e);
128
344
  } catch (e) {
129
- I.error("Error creating format function:", e), v = P(",");
345
+ J.error("Error creating format function:", e), p = O(",");
130
346
  }
131
- const N = B().range([
347
+ const m = Z().range([
132
348
  "transparent",
133
- l.cScale0,
134
- l.cScale1,
135
- l.cScale2,
136
- l.cScale3,
137
- l.cScale4,
138
- l.cScale5,
139
- l.cScale6,
140
- l.cScale7,
141
- l.cScale8,
142
- l.cScale9,
143
- l.cScale10,
144
- l.cScale11
145
- ]), Z = B().range([
349
+ c.cScale0,
350
+ c.cScale1,
351
+ c.cScale2,
352
+ c.cScale3,
353
+ c.cScale4,
354
+ c.cScale5,
355
+ c.cScale6,
356
+ c.cScale7,
357
+ c.cScale8,
358
+ c.cScale9,
359
+ c.cScale10,
360
+ c.cScale11
361
+ ]), N = Z().range([
146
362
  "transparent",
147
- l.cScalePeer0,
148
- l.cScalePeer1,
149
- l.cScalePeer2,
150
- l.cScalePeer3,
151
- l.cScalePeer4,
152
- l.cScalePeer5,
153
- l.cScalePeer6,
154
- l.cScalePeer7,
155
- l.cScalePeer8,
156
- l.cScalePeer9,
157
- l.cScalePeer10,
158
- l.cScalePeer11
159
- ]), E = B().range([
160
- l.cScaleLabel0,
161
- l.cScaleLabel1,
162
- l.cScaleLabel2,
163
- l.cScaleLabel3,
164
- l.cScaleLabel4,
165
- l.cScaleLabel5,
166
- l.cScaleLabel6,
167
- l.cScaleLabel7,
168
- l.cScaleLabel8,
169
- l.cScaleLabel9,
170
- l.cScaleLabel10,
171
- l.cScaleLabel11
363
+ c.cScalePeer0,
364
+ c.cScalePeer1,
365
+ c.cScalePeer2,
366
+ c.cScalePeer3,
367
+ c.cScalePeer4,
368
+ c.cScalePeer5,
369
+ c.cScalePeer6,
370
+ c.cScalePeer7,
371
+ c.cScalePeer8,
372
+ c.cScalePeer9,
373
+ c.cScalePeer10,
374
+ c.cScalePeer11
375
+ ]), k = Z().range([
376
+ c.cScaleLabel0,
377
+ c.cScaleLabel1,
378
+ c.cScaleLabel2,
379
+ c.cScaleLabel3,
380
+ c.cScaleLabel4,
381
+ c.cScaleLabel5,
382
+ c.cScaleLabel6,
383
+ c.cScaleLabel7,
384
+ c.cScaleLabel8,
385
+ c.cScaleLabel9,
386
+ c.cScaleLabel10,
387
+ c.cScaleLabel11
172
388
  ]);
173
- f && b.append("text").attr("x", H / 2).attr("y", z / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(f);
174
- const j = b.append("g").attr("transform", `translate(0, ${z})`).attr("class", "treemapContainer"), ee = be(V).sum((e) => e.value ?? 0).sort((e, t) => (t.value ?? 0) - (e.value ?? 0)), Y = ve().size([G, O]).paddingTop(
175
- (e) => e.children && e.children.length > 0 ? M + $ : 0
176
- ).paddingInner(d).paddingLeft((e) => e.children && e.children.length > 0 ? $ : 0).paddingRight((e) => e.children && e.children.length > 0 ? $ : 0).paddingBottom((e) => e.children && e.children.length > 0 ? $ : 0).round(!0)(ee), te = Y.descendants().filter((e) => e.children && e.children.length > 0), A = j.selectAll(".treemapSection").data(te).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
177
- A.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", M).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), A.append("clipPath").attr("id", (e, t) => `clip-section-${a}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", M), A.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, t) => `treemapSection section${t}`).attr("fill", (e) => N(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => Z(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
389
+ h && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(h);
390
+ const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), E = Q(g).sum((e) => e.value ?? 0).sort((e, i) => (i.value ?? 0) - (e.value ?? 0)), ee = Je().size([r, x]).paddingTop(
391
+ (e) => e.children && e.children.length > 0 ? X + B : 0
392
+ ).paddingInner(d).paddingLeft((e) => e.children && e.children.length > 0 ? B : 0).paddingRight((e) => e.children && e.children.length > 0 ? B : 0).paddingBottom((e) => e.children && e.children.length > 0 ? B : 0).round(!0)(E), se = ee.descendants().filter((e) => e.children && e.children.length > 0), W = V.selectAll(".treemapSection").data(se).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
393
+ W.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), W.append("clipPath").attr("id", (e, i) => `clip-section-${a}-${i}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), W.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, i) => `treemapSection section${i}`).attr("fill", (e) => m(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => N(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
178
394
  if (e.depth === 0)
179
395
  return "display: none;";
180
- const t = L({ cssCompiledStyles: e.data.cssCompiledStyles });
181
- return t.nodeStyles + ";" + t.borderStyles.join(";");
182
- }), A.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", M / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => {
396
+ const i = P({ cssCompiledStyles: e.data.cssCompiledStyles });
397
+ return i.nodeStyles + ";" + i.borderStyles.join(";");
398
+ }), W.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", X / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => {
183
399
  if (e.depth === 0)
184
400
  return "display: none;";
185
- const t = "dominant-baseline: middle; font-size: 12px; fill:" + E(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", n = L({ cssCompiledStyles: e.data.cssCompiledStyles });
186
- return t + n.labelStyles.replace("color:", "fill:");
401
+ const i = "dominant-baseline: middle; font-size: 12px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
402
+ return i + f.labelStyles.replace("color:", "fill:");
187
403
  }).each(function(e) {
188
404
  if (e.depth === 0)
189
405
  return;
190
- const t = _(this), n = e.data.name;
191
- t.text(n);
192
- const u = e.x1 - e.x0, g = 6;
193
- let S;
194
- r.showValues !== !1 && e.value ? S = u - 10 - 30 - 10 - g : S = u - g - 6;
195
- const x = Math.max(15, S), i = t.node();
196
- if (i.getComputedTextLength() > x) {
197
- const m = "...";
198
- let y = n;
199
- for (; y.length > 0; ) {
200
- if (y = n.substring(0, y.length - 1), y.length === 0) {
201
- t.text(m), i.getComputedTextLength() > x && t.text("");
406
+ const i = Y(this), f = e.data.name;
407
+ i.text(f);
408
+ const C = e.x1 - e.x0, $ = 6;
409
+ let A;
410
+ s.showValues !== !1 && e.value ? A = C - 10 - 30 - 10 - $ : A = C - $ - 6;
411
+ const F = Math.max(15, A), y = i.node();
412
+ if (y.getComputedTextLength() > F) {
413
+ const T = "...";
414
+ let L = f;
415
+ for (; L.length > 0; ) {
416
+ if (L = f.substring(0, L.length - 1), L.length === 0) {
417
+ i.text(T), y.getComputedTextLength() > F && i.text("");
202
418
  break;
203
419
  }
204
- if (t.text(y + m), i.getComputedTextLength() <= x)
420
+ if (i.text(L + T), y.getComputedTextLength() <= F)
205
421
  break;
206
422
  }
207
423
  }
208
- }), r.showValues !== !1 && A.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", M / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? v(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
424
+ }), s.showValues !== !1 && W.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", X / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? p(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
209
425
  if (e.depth === 0)
210
426
  return "display: none;";
211
- const t = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + E(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", n = L({ cssCompiledStyles: e.data.cssCompiledStyles });
212
- return t + n.labelStyles.replace("color:", "fill:");
427
+ const i = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
428
+ return i + f.labelStyles.replace("color:", "fill:");
213
429
  });
214
- const ae = Y.leaves(), W = j.selectAll(".treemapLeafGroup").data(ae).enter().append("g").attr("class", (e, t) => `treemapNode treemapLeafGroup leaf${t}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
215
- W.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? N(e.parent.data.name) : N(e.data.name)).attr("style", (e) => L({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? N(e.parent.data.name) : N(e.data.name)).attr("stroke-width", 3), W.append("clipPath").attr("id", (e, t) => `clip-${a}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), W.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
216
- const t = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + E(e.data.name) + ";", n = L({ cssCompiledStyles: e.data.cssCompiledStyles });
217
- return t + n.labelStyles.replace("color:", "fill:");
218
- }).attr("clip-path", (e, t) => `url(#clip-${a}-${t})`).text((e) => e.data.name).each(function(e) {
219
- const t = _(this), n = e.x1 - e.x0, u = e.y1 - e.y0, g = t.node(), S = 4, T = n - 2 * S, x = u - 2 * S;
220
- if (T < 10 || x < 10) {
221
- t.style("display", "none");
430
+ const ie = ee.leaves(), j = V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class", (e, i) => `treemapNode treemapLeafGroup leaf${i}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
431
+ j.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("style", (e) => P({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("stroke-width", 3), j.append("clipPath").attr("id", (e, i) => `clip-${a}-${i}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), j.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
432
+ const i = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + k(e.data.name) + ";", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
433
+ return i + f.labelStyles.replace("color:", "fill:");
434
+ }).attr("clip-path", (e, i) => `url(#clip-${a}-${i})`).text((e) => e.data.name).each(function(e) {
435
+ const i = Y(this), f = e.x1 - e.x0, C = e.y1 - e.y0, $ = i.node(), A = 4, D = f - 2 * A, F = C - 2 * A;
436
+ if (D < 10 || F < 10) {
437
+ i.style("display", "none");
222
438
  return;
223
439
  }
224
- let i = parseInt(t.style("font-size"), 10);
225
- const C = 8, m = 28, y = 0.6, w = 6, k = 2;
226
- for (; g.getComputedTextLength() > T && i > C; )
227
- i--, t.style("font-size", `${i}px`);
228
- let D = Math.max(
229
- w,
230
- Math.min(m, Math.round(i * y))
231
- ), R = i + k + D;
232
- for (; R > x && i > C && (i--, D = Math.max(
233
- w,
234
- Math.min(m, Math.round(i * y))
235
- ), !(D < w && i === C)); )
236
- t.style("font-size", `${i}px`), R = i + k + D;
237
- t.style("font-size", `${i}px`), (g.getComputedTextLength() > T || i < C || x < i) && t.style("display", "none");
238
- }), r.showValues !== !1 && W.append("text").attr("class", "treemapValue").attr("x", (t) => (t.x1 - t.x0) / 2).attr("y", function(t) {
239
- return (t.y1 - t.y0) / 2;
240
- }).attr("style", (t) => {
241
- const n = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + E(t.data.name) + ";", u = L({ cssCompiledStyles: t.data.cssCompiledStyles });
242
- return n + u.labelStyles.replace("color:", "fill:");
243
- }).attr("clip-path", (t, n) => `url(#clip-${a}-${n})`).text((t) => t.value ? v(t.value) : "").each(function(t) {
244
- const n = _(this), u = this.parentNode;
245
- if (!u) {
246
- n.style("display", "none");
440
+ let y = parseInt(i.style("font-size"), 10);
441
+ const z = 8, T = 28, L = 0.6, _ = 6, H = 2;
442
+ for (; $.getComputedTextLength() > D && y > z; )
443
+ y--, i.style("font-size", `${y}px`);
444
+ let I = Math.max(
445
+ _,
446
+ Math.min(T, Math.round(y * L))
447
+ ), U = y + H + I;
448
+ for (; U > F && y > z && (y--, I = Math.max(
449
+ _,
450
+ Math.min(T, Math.round(y * L))
451
+ ), !(I < _ && y === z)); )
452
+ i.style("font-size", `${y}px`), U = y + H + I;
453
+ i.style("font-size", `${y}px`), ($.getComputedTextLength() > D || y < z || F < y) && i.style("display", "none");
454
+ }), s.showValues !== !1 && j.append("text").attr("class", "treemapValue").attr("x", (i) => (i.x1 - i.x0) / 2).attr("y", function(i) {
455
+ return (i.y1 - i.y0) / 2;
456
+ }).attr("style", (i) => {
457
+ const f = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + k(i.data.name) + ";", C = P({ cssCompiledStyles: i.data.cssCompiledStyles });
458
+ return f + C.labelStyles.replace("color:", "fill:");
459
+ }).attr("clip-path", (i, f) => `url(#clip-${a}-${f})`).text((i) => i.value ? p(i.value) : "").each(function(i) {
460
+ const f = Y(this), C = this.parentNode;
461
+ if (!C) {
462
+ f.style("display", "none");
247
463
  return;
248
464
  }
249
- const g = _(u).select(".treemapLabel");
250
- if (g.empty() || g.style("display") === "none") {
251
- n.style("display", "none");
465
+ const $ = Y(C).select(".treemapLabel");
466
+ if ($.empty() || $.style("display") === "none") {
467
+ f.style("display", "none");
252
468
  return;
253
469
  }
254
- const S = parseFloat(g.style("font-size")), T = 28, x = 0.6, i = 6, C = 2, m = Math.max(
255
- i,
256
- Math.min(T, Math.round(S * x))
470
+ const A = parseFloat($.style("font-size")), D = 28, F = 0.6, y = 6, z = 2, T = Math.max(
471
+ y,
472
+ Math.min(D, Math.round(A * F))
257
473
  );
258
- n.style("font-size", `${m}px`);
259
- const w = (t.y1 - t.y0) / 2 + S / 2 + C;
260
- n.attr("y", w);
261
- const k = t.x1 - t.x0, se = t.y1 - t.y0 - 4, re = k - 2 * 4;
262
- n.node().getComputedTextLength() > re || w + m > se || m < i ? n.style("display", "none") : n.style("display", null);
474
+ f.style("font-size", `${T}px`);
475
+ const _ = (i.y1 - i.y0) / 2 + A / 2 + z;
476
+ f.attr("y", _);
477
+ const H = i.x1 - i.x0, ce = i.y1 - i.y0 - 4, de = H - 2 * 4;
478
+ f.node().getComputedTextLength() > de || _ + T > ce || T < y ? f.style("display", "none") : f.style("display", null);
263
479
  });
264
- const le = r.diagramPadding ?? 8;
265
- ge(b, le, "flowchart", (r == null ? void 0 : r.useMaxWidth) || !1);
266
- }, "draw"), $e = /* @__PURE__ */ h(function(p, a) {
480
+ const oe = s.diagramPadding ?? 8;
481
+ we(b, oe, "flowchart", (s == null ? void 0 : s.useMaxWidth) || !1);
482
+ }, "draw"), nt = /* @__PURE__ */ w(function(t, a) {
267
483
  return a.db.getClasses();
268
- }, "getClasses"), Fe = { draw: Le, getClasses: $e }, ze = {
484
+ }, "getClasses"), lt = { draw: at, getClasses: nt }, rt = {
269
485
  sectionStrokeColor: "black",
270
486
  sectionStrokeWidth: "1",
271
487
  sectionFillColor: "#efefef",
@@ -278,10 +494,10 @@ var Ce = /* @__PURE__ */ h((p, a) => {
278
494
  valueColor: "black",
279
495
  titleColor: "black",
280
496
  titleFontSize: "14px"
281
- }, Ne = /* @__PURE__ */ h(({
282
- treemap: p
497
+ }, st = /* @__PURE__ */ w(({
498
+ treemap: t
283
499
  } = {}) => {
284
- const a = q(ze, p);
500
+ const a = ae(rt, t);
285
501
  return `
286
502
  .treemapNode.section {
287
503
  stroke: ${a.sectionStrokeColor};
@@ -306,14 +522,14 @@ var Ce = /* @__PURE__ */ h((p, a) => {
306
522
  font-size: ${a.titleFontSize};
307
523
  }
308
524
  `;
309
- }, "getStyles"), Ae = Ne, Be = {
310
- parser: Q,
525
+ }, "getStyles"), it = st, mt = {
526
+ parser: re,
311
527
  get db() {
312
- return new J();
528
+ return new ne();
313
529
  },
314
- renderer: Fe,
315
- styles: Ae
530
+ renderer: lt,
531
+ styles: it
316
532
  };
317
533
  export {
318
- Be as diagram
534
+ mt as diagram
319
535
  };