@zythum02/fello-server 0.1.28

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 (369) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +213 -0
  3. package/out/renderer/assets/_baseUniq-C01H-TTl.js +660 -0
  4. package/out/renderer/assets/abap-B7h4dtBh.js +7 -0
  5. package/out/renderer/assets/actionscript-3-DtnkuHN2.js +7 -0
  6. package/out/renderer/assets/ada-BZS802Se.js +7 -0
  7. package/out/renderer/assets/andromeeda-C847lm7Z.js +4 -0
  8. package/out/renderer/assets/angular-html-BYG42TJr.js +42 -0
  9. package/out/renderer/assets/angular-ts-BftcHvZ6.js +29 -0
  10. package/out/renderer/assets/apache-D4roVlsU.js +7 -0
  11. package/out/renderer/assets/apex-B-mI3Md2.js +7 -0
  12. package/out/renderer/assets/apl-CGZawg-A.js +18 -0
  13. package/out/renderer/assets/applescript-C43Knf0G.js +7 -0
  14. package/out/renderer/assets/ara-DRBH84ND.js +7 -0
  15. package/out/renderer/assets/arc-BXqrFYj-.js +131 -0
  16. package/out/renderer/assets/architectureDiagram-Q4EWVU46-DlFz_4yO.js +8718 -0
  17. package/out/renderer/assets/asciidoc-CT8_dLUs.js +7 -0
  18. package/out/renderer/assets/asm-3tg4MVib.js +7 -0
  19. package/out/renderer/assets/astro-BxdWOZvM.js +19 -0
  20. package/out/renderer/assets/aurora-x-wJ4-eM2h.js +4 -0
  21. package/out/renderer/assets/awk-ChreaG-G.js +7 -0
  22. package/out/renderer/assets/ayu-dark-rtpbXCNg.js +4 -0
  23. package/out/renderer/assets/ayu-light-BCZDSyV8.js +4 -0
  24. package/out/renderer/assets/ayu-mirage-BVoH71sA.js +4 -0
  25. package/out/renderer/assets/ballerina-B0yt0TYU.js +7 -0
  26. package/out/renderer/assets/bat-BzNgQIA7.js +7 -0
  27. package/out/renderer/assets/beancount-aZWrE5WV.js +7 -0
  28. package/out/renderer/assets/berry--Qc8OslH.js +7 -0
  29. package/out/renderer/assets/bibtex-BLeFwAes.js +7 -0
  30. package/out/renderer/assets/bicep-DbBeGdXQ.js +7 -0
  31. package/out/renderer/assets/bird2-aXhIUHPg.js +7 -0
  32. package/out/renderer/assets/blade-BbH7YAUi.js +22 -0
  33. package/out/renderer/assets/blockDiagram-DXYQGD6D-B_jYpKkP.js +3637 -0
  34. package/out/renderer/assets/bsl-DwPS0BId.js +9 -0
  35. package/out/renderer/assets/c-C4VtT7JA.js +7 -0
  36. package/out/renderer/assets/c3-CWHczQMq.js +7 -0
  37. package/out/renderer/assets/c4Diagram-AHTNJAMY-DWRXz6-S.js +2482 -0
  38. package/out/renderer/assets/cadence-S_NtR5Dy.js +7 -0
  39. package/out/renderer/assets/cairo-BtYx2aM5.js +9 -0
  40. package/out/renderer/assets/catppuccin-frappe-C21OPQfC.js +4 -0
  41. package/out/renderer/assets/catppuccin-latte-0ZtXlsrX.js +4 -0
  42. package/out/renderer/assets/catppuccin-macchiato-BD_FR4sl.js +4 -0
  43. package/out/renderer/assets/catppuccin-mocha-C653csR5.js +4 -0
  44. package/out/renderer/assets/channel-iMh-jYBg.js +7 -0
  45. package/out/renderer/assets/chunk-4BX2VUAB-CDXuLHIo.js +16 -0
  46. package/out/renderer/assets/chunk-4TB4RGXK-Bs-z-5kA.js +1920 -0
  47. package/out/renderer/assets/chunk-55IACEB6-DBmLw2WJ.js +13 -0
  48. package/out/renderer/assets/chunk-EDXVE4YY-BhsDT27O.js +24 -0
  49. package/out/renderer/assets/chunk-FMBD7UC4-C_qJYK5q.js +19 -0
  50. package/out/renderer/assets/chunk-OYMX7WX6-DIh7s3uw.js +1939 -0
  51. package/out/renderer/assets/chunk-QZHKN3VN-CYa45CSJ.js +19 -0
  52. package/out/renderer/assets/chunk-YZCP3GAM-BeF07Xv_.js +116 -0
  53. package/out/renderer/assets/clarity-D2ViJC0i.js +7 -0
  54. package/out/renderer/assets/classDiagram-6PBFFD2Q-B12_6ldG.js +23 -0
  55. package/out/renderer/assets/classDiagram-v2-HSJHXN6E-B12_6ldG.js +23 -0
  56. package/out/renderer/assets/clojure-C_G4_w5x.js +7 -0
  57. package/out/renderer/assets/clone-1GZJZPn3.js +8 -0
  58. package/out/renderer/assets/cmake-CDfQILeU.js +7 -0
  59. package/out/renderer/assets/cobol-B8r1pfPr.js +13 -0
  60. package/out/renderer/assets/codeowners-awy7PWCD.js +7 -0
  61. package/out/renderer/assets/codeql-lfK8ppuq.js +7 -0
  62. package/out/renderer/assets/coffee-XLjtuEYs.js +9 -0
  63. package/out/renderer/assets/common-lisp-DAq1kaby.js +7 -0
  64. package/out/renderer/assets/coq-l_JvzFJl.js +7 -0
  65. package/out/renderer/assets/cose-bilkent-S5V4N54A-CuSnz9Ro.js +4942 -0
  66. package/out/renderer/assets/cpp-zh2ePAE_.js +22 -0
  67. package/out/renderer/assets/crystal-BqBRy7Ec.js +19 -0
  68. package/out/renderer/assets/csharp-DxX_6tHh.js +7 -0
  69. package/out/renderer/assets/css-BtVcDqlU.js +7 -0
  70. package/out/renderer/assets/csv-Ba84L8e5.js +7 -0
  71. package/out/renderer/assets/cue-BFSVLV6N.js +7 -0
  72. package/out/renderer/assets/cypher-DbUmWIxC.js +7 -0
  73. package/out/renderer/assets/cytoscape.esm-Bm8DJGmZ.js +30239 -0
  74. package/out/renderer/assets/d-9qSZPw74.js +7 -0
  75. package/out/renderer/assets/dagre-KV5264BT-LHPLEy9g.js +694 -0
  76. package/out/renderer/assets/dark-plus-DmZ1Dzd4.js +4 -0
  77. package/out/renderer/assets/dart-CCSsOg9l.js +7 -0
  78. package/out/renderer/assets/dax-CvsmLV-B.js +7 -0
  79. package/out/renderer/assets/defaultLocale-B2RvLBDe.js +206 -0
  80. package/out/renderer/assets/desktop-_xiGZ9X1.js +7 -0
  81. package/out/renderer/assets/diagram-5BDNPKRD-DWjP3Jzr.js +171 -0
  82. package/out/renderer/assets/diagram-G4DWMVQ6-CM3uASto.js +853 -0
  83. package/out/renderer/assets/diagram-MMDJMWI5-X5oh5RON.js +303 -0
  84. package/out/renderer/assets/diagram-TYMM5635-iO4Xohj9.js +214 -0
  85. package/out/renderer/assets/diff-BEdzuHlE.js +7 -0
  86. package/out/renderer/assets/docker-CUaLOm2I.js +7 -0
  87. package/out/renderer/assets/dotenv-Bb4iNxXK.js +7 -0
  88. package/out/renderer/assets/dracula-B8-AVrwI.js +4 -0
  89. package/out/renderer/assets/dracula-soft-BHeefow7.js +4 -0
  90. package/out/renderer/assets/dream-maker-CNLQpoF-.js +7 -0
  91. package/out/renderer/assets/edge-CnHxQ_FD.js +15 -0
  92. package/out/renderer/assets/elixir-B_LIBv5J.js +11 -0
  93. package/out/renderer/assets/elm-BlO7pcFp.js +10 -0
  94. package/out/renderer/assets/emacs-lisp-4gdXY_g3.js +7 -0
  95. package/out/renderer/assets/erDiagram-SMLLAGMA-4xwE7Ysd.js +1227 -0
  96. package/out/renderer/assets/erb-Bzn22wO6.js +28 -0
  97. package/out/renderer/assets/erlang-Ch5kuXHm.js +9 -0
  98. package/out/renderer/assets/everforest-dark-Cg1xdODP.js +4 -0
  99. package/out/renderer/assets/everforest-light-BmTD3bxe.js +4 -0
  100. package/out/renderer/assets/fennel-BTELNkeT.js +7 -0
  101. package/out/renderer/assets/fish-kGF2-4SL.js +7 -0
  102. package/out/renderer/assets/flowDiagram-DWJPFMVM-DoIqEJWm.js +2332 -0
  103. package/out/renderer/assets/fluent-YyC28MRr.js +7 -0
  104. package/out/renderer/assets/fortran-fixed-form-CpmOyvS5.js +9 -0
  105. package/out/renderer/assets/fortran-free-form-5X94ETMi.js +7 -0
  106. package/out/renderer/assets/fsharp-5vtGqRR9.js +9 -0
  107. package/out/renderer/assets/ganttDiagram-T4ZO3ILL-C48vXSUK.js +3714 -0
  108. package/out/renderer/assets/gdresource-B5TLWiFO.js +11 -0
  109. package/out/renderer/assets/gdscript-CNW3Aj-d.js +7 -0
  110. package/out/renderer/assets/gdshader-BEzE4j_3.js +7 -0
  111. package/out/renderer/assets/genie-BvhtM5Ga.js +7 -0
  112. package/out/renderer/assets/gherkin-xCNF9gh8.js +7 -0
  113. package/out/renderer/assets/git-commit-PP9xCApN.js +9 -0
  114. package/out/renderer/assets/git-rebase-D-XQSvDj.js +9 -0
  115. package/out/renderer/assets/gitGraphDiagram-UUTBAWPF-D3YiiEhK.js +1375 -0
  116. package/out/renderer/assets/github-dark-O22yVQaY.js +4 -0
  117. package/out/renderer/assets/github-dark-default-DB2Hkvqn.js +4 -0
  118. package/out/renderer/assets/github-dark-dimmed-CMZ_OfqC.js +4 -0
  119. package/out/renderer/assets/github-dark-high-contrast-DmxWVmCU.js +4 -0
  120. package/out/renderer/assets/github-light-BTbR9xVK.js +4 -0
  121. package/out/renderer/assets/github-light-default-DWEonwFe.js +4 -0
  122. package/out/renderer/assets/github-light-high-contrast-WJ_cPDts.js +4 -0
  123. package/out/renderer/assets/gleam-LmNxrMsN.js +7 -0
  124. package/out/renderer/assets/glimmer-js-h2QNNiD7.js +15 -0
  125. package/out/renderer/assets/glimmer-ts-Bk3uX6Ae.js +15 -0
  126. package/out/renderer/assets/glsl-CGsiYPcu.js +9 -0
  127. package/out/renderer/assets/gn-OUMx7fqt.js +7 -0
  128. package/out/renderer/assets/gnuplot-tV8vezdE.js +7 -0
  129. package/out/renderer/assets/go-DRMr3iML.js +7 -0
  130. package/out/renderer/assets/graph-CYPfPCZi.js +953 -0
  131. package/out/renderer/assets/graphql-CwmtR1ib.js +15 -0
  132. package/out/renderer/assets/groovy-Bn4MhXgW.js +7 -0
  133. package/out/renderer/assets/gruvbox-dark-hard-DVsRsETr.js +4 -0
  134. package/out/renderer/assets/gruvbox-dark-medium-B5JBrQdg.js +4 -0
  135. package/out/renderer/assets/gruvbox-dark-soft-Db-YOqRx.js +4 -0
  136. package/out/renderer/assets/gruvbox-light-hard-CXzJt7DI.js +4 -0
  137. package/out/renderer/assets/gruvbox-light-medium-B89RAI1Y.js +4 -0
  138. package/out/renderer/assets/gruvbox-light-soft-Cs0hTZYv.js +4 -0
  139. package/out/renderer/assets/hack-BTX3ICIE.js +13 -0
  140. package/out/renderer/assets/haml-DrIklt7F.js +11 -0
  141. package/out/renderer/assets/handlebars-yWFGGD2R.js +15 -0
  142. package/out/renderer/assets/haskell-CzPS7wjM.js +7 -0
  143. package/out/renderer/assets/haxe-BpobLYM9.js +7 -0
  144. package/out/renderer/assets/hcl-axoq0Ycu.js +7 -0
  145. package/out/renderer/assets/highlighted-body-OFNGDK62-B6M-kMLU.js +17 -0
  146. package/out/renderer/assets/hjson-I7LcauIB.js +7 -0
  147. package/out/renderer/assets/hlsl-TRzjajlb.js +7 -0
  148. package/out/renderer/assets/horizon-DWzh3z5C.js +4 -0
  149. package/out/renderer/assets/horizon-bright-C1AFkPsv.js +4 -0
  150. package/out/renderer/assets/houston-CF_ws8Cq.js +4 -0
  151. package/out/renderer/assets/html-GC16tDh9.js +11 -0
  152. package/out/renderer/assets/html-derivative-HU9p64q4.js +11 -0
  153. package/out/renderer/assets/http-DjsOm9E4.js +20 -0
  154. package/out/renderer/assets/hurl-Am2cDU4f.js +18 -0
  155. package/out/renderer/assets/hxml-Jle7oGdm.js +9 -0
  156. package/out/renderer/assets/hy-B1k9U6S8.js +7 -0
  157. package/out/renderer/assets/imba-C4923lSV.js +7 -0
  158. package/out/renderer/assets/index-D8H7Q_md.css +382 -0
  159. package/out/renderer/assets/index-Dabo17L1.js +236275 -0
  160. package/out/renderer/assets/infoDiagram-42DDH7IO-ur7rRidE.js +33 -0
  161. package/out/renderer/assets/ini-B84Ha1bx.js +7 -0
  162. package/out/renderer/assets/init-ZxktEp_H.js +16 -0
  163. package/out/renderer/assets/ishikawaDiagram-UXIWVN3A-fJSipMV8.js +967 -0
  164. package/out/renderer/assets/java-BfXh-0uJ.js +7 -0
  165. package/out/renderer/assets/javascript-BsAkV7mL.js +7 -0
  166. package/out/renderer/assets/jinja-FkIlHBgj.js +16 -0
  167. package/out/renderer/assets/jison-BkdOIOd4.js +9 -0
  168. package/out/renderer/assets/journeyDiagram-VCZTEJTY-TxjKxXBo.js +1255 -0
  169. package/out/renderer/assets/json-TjWBGEk1.js +7 -0
  170. package/out/renderer/assets/json5-DCGCKrmX.js +7 -0
  171. package/out/renderer/assets/jsonc-DLVLp8id.js +7 -0
  172. package/out/renderer/assets/jsonl-B-R_pDGg.js +7 -0
  173. package/out/renderer/assets/jsonnet-Cs8BnnC6.js +7 -0
  174. package/out/renderer/assets/jssm-DDuANZ2u.js +7 -0
  175. package/out/renderer/assets/jsx-BPmvoin2.js +7 -0
  176. package/out/renderer/assets/julia-CU_UwNb8.js +20 -0
  177. package/out/renderer/assets/just-tGFryTtU.js +34 -0
  178. package/out/renderer/assets/kanagawa-dragon-DU8n2NNT.js +4 -0
  179. package/out/renderer/assets/kanagawa-lotus-Byd0CDet.js +4 -0
  180. package/out/renderer/assets/kanagawa-wave-DExoagcR.js +4 -0
  181. package/out/renderer/assets/kanban-definition-6JOO6SKY-DJwjRjlE.js +1052 -0
  182. package/out/renderer/assets/kdl-DzNQTDs7.js +7 -0
  183. package/out/renderer/assets/kotlin-BM2ZNTMh.js +7 -0
  184. package/out/renderer/assets/kusto-dtpuxMFE.js +7 -0
  185. package/out/renderer/assets/laserwave-DF03wMlf.js +4 -0
  186. package/out/renderer/assets/latex-B0gTO9uZ.js +10 -0
  187. package/out/renderer/assets/layout-BT1ASsLg.js +2217 -0
  188. package/out/renderer/assets/lean-CTow-IzD.js +7 -0
  189. package/out/renderer/assets/less-BAzLMJNR.js +7 -0
  190. package/out/renderer/assets/light-plus-DS08Xg5J.js +4 -0
  191. package/out/renderer/assets/linear-ecuEcPGt.js +340 -0
  192. package/out/renderer/assets/liquid-QmJ_LYTW.js +15 -0
  193. package/out/renderer/assets/llvm-CTKcAHbb.js +7 -0
  194. package/out/renderer/assets/log-BF22rfM9.js +7 -0
  195. package/out/renderer/assets/logo-D9l7oEJ8.js +7 -0
  196. package/out/renderer/assets/lua-BVbbqwZC.js +9 -0
  197. package/out/renderer/assets/luau-CdZ6BoEa.js +7 -0
  198. package/out/renderer/assets/make-DLtqaK4D.js +7 -0
  199. package/out/renderer/assets/markdown-F_EULe_G.js +7 -0
  200. package/out/renderer/assets/marko-BAWrmNIa.js +15 -0
  201. package/out/renderer/assets/material-theme-B8B2U48Q.js +4 -0
  202. package/out/renderer/assets/material-theme-darker-BV0iY_T3.js +4 -0
  203. package/out/renderer/assets/material-theme-lighter-DrzybSTF.js +4 -0
  204. package/out/renderer/assets/material-theme-ocean-BRPLVReX.js +4 -0
  205. package/out/renderer/assets/material-theme-palenight-DSJwsR_D.js +4 -0
  206. package/out/renderer/assets/matlab-7XHduepk.js +7 -0
  207. package/out/renderer/assets/mdc-Ca0ft0PS.js +16 -0
  208. package/out/renderer/assets/mdx-D5wExp-O.js +7 -0
  209. package/out/renderer/assets/mermaid-z_1ejSlp.js +7 -0
  210. package/out/renderer/assets/min-BYCDJeWK.js +41 -0
  211. package/out/renderer/assets/min-dark-BNaN9fWk.js +4 -0
  212. package/out/renderer/assets/min-light-CMrjentn.js +4 -0
  213. package/out/renderer/assets/mindmap-definition-QFDTVHPH-D2MxZmzw.js +1186 -0
  214. package/out/renderer/assets/mipsasm-BQyyUrpa.js +7 -0
  215. package/out/renderer/assets/mojo-ByCRDvCf.js +7 -0
  216. package/out/renderer/assets/monokai-DelygWXa.js +4 -0
  217. package/out/renderer/assets/moonbit-CqjK87KZ.js +7 -0
  218. package/out/renderer/assets/move-DhTNmxqC.js +7 -0
  219. package/out/renderer/assets/narrat-CLjGcbCy.js +7 -0
  220. package/out/renderer/assets/nextflow-B166B-y1.js +9 -0
  221. package/out/renderer/assets/nextflow-groovy-BOO9s0iq.js +7 -0
  222. package/out/renderer/assets/nginx-BFAkI5_-.js +10 -0
  223. package/out/renderer/assets/night-owl-DSS199ra.js +4 -0
  224. package/out/renderer/assets/night-owl-light-gC6E-Eh2.js +4 -0
  225. package/out/renderer/assets/nim-B3PAIZ4D.js +22 -0
  226. package/out/renderer/assets/nix-ByWcmvXF.js +12 -0
  227. package/out/renderer/assets/nord-CvDbBq5M.js +4 -0
  228. package/out/renderer/assets/nushell-DB8ZUEbK.js +7 -0
  229. package/out/renderer/assets/objective-c-BRoNQF42.js +7 -0
  230. package/out/renderer/assets/objective-cpp-DEoN9Fe5.js +7 -0
  231. package/out/renderer/assets/ocaml-B1kfGk9Y.js +7 -0
  232. package/out/renderer/assets/odin-CNQ56Ay2.js +7 -0
  233. package/out/renderer/assets/one-dark-pro-CsMf0BoJ.js +4 -0
  234. package/out/renderer/assets/one-light-B0cTzZyr.js +4 -0
  235. package/out/renderer/assets/openscad-C_m7ehZF.js +7 -0
  236. package/out/renderer/assets/ordinal-CxptdPJm.js +76 -0
  237. package/out/renderer/assets/pascal-CU8Kjkr_.js +7 -0
  238. package/out/renderer/assets/pdf-worker-wrapper-Do-ikGHl.js +46762 -0
  239. package/out/renderer/assets/perl-HITCDkgu.js +18 -0
  240. package/out/renderer/assets/php-C2HieitX.js +20 -0
  241. package/out/renderer/assets/pieDiagram-DEJITSTG-Cew7QWxE.js +248 -0
  242. package/out/renderer/assets/pierre-dark-C-Drv5KU.js +4 -0
  243. package/out/renderer/assets/pierre-dark-soft-Cd74uQaL.js +4 -0
  244. package/out/renderer/assets/pierre-light-CfQnmt6J.js +4 -0
  245. package/out/renderer/assets/pierre-light-soft-DMVdU74b.js +4 -0
  246. package/out/renderer/assets/pkl-BsByaYax.js +7 -0
  247. package/out/renderer/assets/plastic-BjwMpBc0.js +4 -0
  248. package/out/renderer/assets/plsql-B3Na24V4.js +7 -0
  249. package/out/renderer/assets/po-BajfNjc5.js +7 -0
  250. package/out/renderer/assets/poimandres-ChWyhPrn.js +4 -0
  251. package/out/renderer/assets/polar-BB-dlxnO.js +7 -0
  252. package/out/renderer/assets/postcss-kj1IbjVd.js +7 -0
  253. package/out/renderer/assets/powerquery-B-e1fO-k.js +7 -0
  254. package/out/renderer/assets/powershell-BcMVbGpk.js +7 -0
  255. package/out/renderer/assets/prisma-bmxcSDxq.js +7 -0
  256. package/out/renderer/assets/prolog-BT9GCzqD.js +7 -0
  257. package/out/renderer/assets/proto-Ds-m32NR.js +7 -0
  258. package/out/renderer/assets/pug-BwQB43qN.js +13 -0
  259. package/out/renderer/assets/puppet-N15G4Usj.js +7 -0
  260. package/out/renderer/assets/purescript-DrwsEYNH.js +7 -0
  261. package/out/renderer/assets/python-CrdIx4PZ.js +7 -0
  262. package/out/renderer/assets/qml-jtL8okyu.js +9 -0
  263. package/out/renderer/assets/qmldir-DuMSk0Oz.js +7 -0
  264. package/out/renderer/assets/qss-BFrB6p4y.js +7 -0
  265. package/out/renderer/assets/quadrantDiagram-34T5L4WZ-CrZCtVJh.js +1342 -0
  266. package/out/renderer/assets/r-Dpdc-Kyk.js +7 -0
  267. package/out/renderer/assets/racket-DbA06HL7.js +7 -0
  268. package/out/renderer/assets/raku-6v-Y17bs.js +7 -0
  269. package/out/renderer/assets/razor-gBXW6YBJ.js +13 -0
  270. package/out/renderer/assets/red-DByOl5N0.js +4 -0
  271. package/out/renderer/assets/reg-CULnG2WX.js +7 -0
  272. package/out/renderer/assets/regexp-BxWeO75u.js +7 -0
  273. package/out/renderer/assets/rel-CHRwzjd4.js +7 -0
  274. package/out/renderer/assets/requirementDiagram-MS252O5E-C69IGxW8.js +1204 -0
  275. package/out/renderer/assets/riscv-BNQ9cVpw.js +7 -0
  276. package/out/renderer/assets/ron-CUEPaFZU.js +7 -0
  277. package/out/renderer/assets/rose-pine-B-kZ4Z9q.js +4 -0
  278. package/out/renderer/assets/rose-pine-dawn-efeVGdSI.js +4 -0
  279. package/out/renderer/assets/rose-pine-moon-DmodZNzl.js +4 -0
  280. package/out/renderer/assets/rosmsg-Bfahr6vb.js +7 -0
  281. package/out/renderer/assets/rst-by6KAwTb.js +37 -0
  282. package/out/renderer/assets/ruby-C13Bjepi.js +37 -0
  283. package/out/renderer/assets/rust-CMNYZh5a.js +7 -0
  284. package/out/renderer/assets/sankeyDiagram-XADWPNL6-B2tuS_nG.js +1205 -0
  285. package/out/renderer/assets/sas-BLBgC3TA.js +9 -0
  286. package/out/renderer/assets/sass-BheygBdF.js +7 -0
  287. package/out/renderer/assets/scala-B-_7vFVn.js +7 -0
  288. package/out/renderer/assets/scheme-BSHdPinv.js +7 -0
  289. package/out/renderer/assets/scss-Dq-LbI_c.js +9 -0
  290. package/out/renderer/assets/sdbl-BBUhycGU.js +7 -0
  291. package/out/renderer/assets/sequenceDiagram-FGHM5R23-Dv_lOZN1.js +4502 -0
  292. package/out/renderer/assets/shaderlab-C07uO3dL.js +9 -0
  293. package/out/renderer/assets/shellscript-CQ8MXh-D.js +7 -0
  294. package/out/renderer/assets/shellsession-CkeTp4M1.js +9 -0
  295. package/out/renderer/assets/slack-dark-BEe10hxO.js +4 -0
  296. package/out/renderer/assets/slack-ochin-BKmu9pBc.js +4 -0
  297. package/out/renderer/assets/smalltalk-qxcGy4fT.js +7 -0
  298. package/out/renderer/assets/snazzy-light-Dcvd-ZyI.js +4 -0
  299. package/out/renderer/assets/solarized-dark-BBl5y5sR.js +4 -0
  300. package/out/renderer/assets/solarized-light-DW9b_AY8.js +4 -0
  301. package/out/renderer/assets/solidity-CSTQ0FCC.js +7 -0
  302. package/out/renderer/assets/soy-BHaHgMUy.js +11 -0
  303. package/out/renderer/assets/sparql-DswowMAp.js +9 -0
  304. package/out/renderer/assets/splunk-DcGJXIDa.js +7 -0
  305. package/out/renderer/assets/sql-DzUuSofg.js +7 -0
  306. package/out/renderer/assets/ssh-config-Bk_I5wDR.js +7 -0
  307. package/out/renderer/assets/stata-Dl7wDdBE.js +9 -0
  308. package/out/renderer/assets/stateDiagram-FHFEXIEX-D9dJAqtV.js +452 -0
  309. package/out/renderer/assets/stateDiagram-v2-QKLJ7IA2-CQXoaDY1.js +21 -0
  310. package/out/renderer/assets/stylus-DXFa_2Jl.js +7 -0
  311. package/out/renderer/assets/surrealql-Bs3vUeKA.js +9 -0
  312. package/out/renderer/assets/svelte-fC0HkEkx.js +15 -0
  313. package/out/renderer/assets/swift-Cohr-WZC.js +7 -0
  314. package/out/renderer/assets/synthwave-84-CoUef9sh.js +4 -0
  315. package/out/renderer/assets/system-verilog-BcESSvRn.js +7 -0
  316. package/out/renderer/assets/systemd-DJPFjU02.js +7 -0
  317. package/out/renderer/assets/talonscript-CEEMXJTH.js +7 -0
  318. package/out/renderer/assets/tasl-DfOr2qHi.js +7 -0
  319. package/out/renderer/assets/tcl-CTsc4-t7.js +7 -0
  320. package/out/renderer/assets/templ-CSEiQwNm.js +13 -0
  321. package/out/renderer/assets/terraform-CeztUfUr.js +7 -0
  322. package/out/renderer/assets/tex-CGVqF8nD.js +9 -0
  323. package/out/renderer/assets/timeline-definition-GMOUNBTQ-DnnX0Ml0.js +1596 -0
  324. package/out/renderer/assets/tokyo-night-DjtLpAEY.js +4 -0
  325. package/out/renderer/assets/toml-vHPzWDj6.js +7 -0
  326. package/out/renderer/assets/ts-tags-cG2hZuda.js +54 -0
  327. package/out/renderer/assets/tsv-ChRVFvMy.js +7 -0
  328. package/out/renderer/assets/tsx-CmGGo4Hm.js +7 -0
  329. package/out/renderer/assets/turtle-BnC7StHY.js +7 -0
  330. package/out/renderer/assets/twig-CwEEYIBf.js +36 -0
  331. package/out/renderer/assets/typescript-CP6ECzON.js +7 -0
  332. package/out/renderer/assets/typespec-CkDVVIcK.js +7 -0
  333. package/out/renderer/assets/typst-XYLFxYau.js +7 -0
  334. package/out/renderer/assets/v-BSYXvR4g.js +7 -0
  335. package/out/renderer/assets/vala-qJa5rry9.js +7 -0
  336. package/out/renderer/assets/vb-Bzg9rspf.js +7 -0
  337. package/out/renderer/assets/vennDiagram-DHZGUBPP-BCIC8HTk.js +2486 -0
  338. package/out/renderer/assets/verilog-CCb_iTfF.js +7 -0
  339. package/out/renderer/assets/vesper-4Q1cEwPL.js +4 -0
  340. package/out/renderer/assets/vhdl-DMqk4T2s.js +7 -0
  341. package/out/renderer/assets/viml--FINbfoq.js +7 -0
  342. package/out/renderer/assets/vitesse-black-BqNLki8b.js +4 -0
  343. package/out/renderer/assets/vitesse-dark-jJ32WhwH.js +4 -0
  344. package/out/renderer/assets/vitesse-light-476zM4e6.js +4 -0
  345. package/out/renderer/assets/vue-K-7Ga-y8.js +40 -0
  346. package/out/renderer/assets/vue-html-DhreShjd.js +9 -0
  347. package/out/renderer/assets/vue-vine-rMIwOpFf.js +19 -0
  348. package/out/renderer/assets/vyper-DP4whl13.js +7 -0
  349. package/out/renderer/assets/wardley-RL74JXVD-B35jxdMa.js +27371 -0
  350. package/out/renderer/assets/wardleyDiagram-NUSXRM2D-D3rjXear.js +901 -0
  351. package/out/renderer/assets/wasm-BBh6f151.js +7 -0
  352. package/out/renderer/assets/wasm-DDgzZJey.js +10 -0
  353. package/out/renderer/assets/wenyan-BdqozpMZ.js +7 -0
  354. package/out/renderer/assets/wgsl-Vo-hHVWH.js +7 -0
  355. package/out/renderer/assets/wikitext-BDjE6pmL.js +7 -0
  356. package/out/renderer/assets/wit-C_nQzOkY.js +7 -0
  357. package/out/renderer/assets/wolfram-CRmjUoI4.js +7 -0
  358. package/out/renderer/assets/xml-BMzZeaqs.js +9 -0
  359. package/out/renderer/assets/xsl-CnwVr_6q.js +10 -0
  360. package/out/renderer/assets/xychartDiagram-5P7HB3ND-095YR9W9.js +1932 -0
  361. package/out/renderer/assets/yaml-B_vW5iTY.js +7 -0
  362. package/out/renderer/assets/zenscript-DFINJL6j.js +7 -0
  363. package/out/renderer/assets/zig-CS4FMAZp.js +7 -0
  364. package/out/renderer/index.html +13 -0
  365. package/out/scripts/electron-preload/preload.mjs +35 -0
  366. package/out/scripts/mcp-ask-user/server.mjs +126 -0
  367. package/out/scripts/mcp-skills/server.mjs +163 -0
  368. package/out/server/main.js +7000 -0
  369. package/package.json +44 -0
@@ -0,0 +1,1375 @@
1
+ import { p as populateCommonDb } from "./chunk-4BX2VUAB-CDXuLHIo.js";
2
+ import { I as ImperativeState } from "./chunk-QZHKN3VN-CYa45CSJ.js";
3
+ import { v as getDiagramTitle, t as setDiagramTitle, s as setAccDescription, g as getAccDescription, a as getAccTitle, b as setAccTitle, _ as __name, G as getConfig, l as log, d as select, c as getConfig2, u as utils_default, H as setupGraphViewbox2, C as clear, m as common_default, I as cleanAndMerge, K as defaultConfig_default, M as random } from "./index-Dabo17L1.js";
4
+ import { p as parse } from "./wardley-RL74JXVD-B35jxdMa.js";
5
+ import "./min-BYCDJeWK.js";
6
+ import "./_baseUniq-C01H-TTl.js";
7
+ var commitType = {
8
+ NORMAL: 0,
9
+ REVERSE: 1,
10
+ HIGHLIGHT: 2,
11
+ MERGE: 3,
12
+ CHERRY_PICK: 4
13
+ };
14
+ var DEFAULT_GITGRAPH_CONFIG = defaultConfig_default.gitGraph;
15
+ var getConfig3 = /* @__PURE__ */ __name(() => {
16
+ const config = cleanAndMerge({
17
+ ...DEFAULT_GITGRAPH_CONFIG,
18
+ ...getConfig().gitGraph
19
+ });
20
+ return config;
21
+ }, "getConfig");
22
+ var state = new ImperativeState(() => {
23
+ const config = getConfig3();
24
+ const mainBranchName = config.mainBranchName;
25
+ const mainBranchOrder = config.mainBranchOrder;
26
+ return {
27
+ mainBranchName,
28
+ commits: /* @__PURE__ */ new Map(),
29
+ head: null,
30
+ branchConfig: /* @__PURE__ */ new Map([[mainBranchName, { name: mainBranchName, order: mainBranchOrder }]]),
31
+ branches: /* @__PURE__ */ new Map([[mainBranchName, null]]),
32
+ currBranch: mainBranchName,
33
+ direction: "LR",
34
+ seq: 0,
35
+ options: {}
36
+ };
37
+ });
38
+ function getID() {
39
+ return random({ length: 7 });
40
+ }
41
+ __name(getID, "getID");
42
+ function uniqBy(list, fn) {
43
+ const recordMap = /* @__PURE__ */ Object.create(null);
44
+ return list.reduce((out, item) => {
45
+ const key = fn(item);
46
+ if (!recordMap[key]) {
47
+ recordMap[key] = true;
48
+ out.push(item);
49
+ }
50
+ return out;
51
+ }, []);
52
+ }
53
+ __name(uniqBy, "uniqBy");
54
+ var setDirection = /* @__PURE__ */ __name(function(dir2) {
55
+ state.records.direction = dir2;
56
+ }, "setDirection");
57
+ var setOptions = /* @__PURE__ */ __name(function(rawOptString) {
58
+ log.debug("options str", rawOptString);
59
+ rawOptString = rawOptString?.trim();
60
+ rawOptString = rawOptString || "{}";
61
+ try {
62
+ state.records.options = JSON.parse(rawOptString);
63
+ } catch (e) {
64
+ log.error("error while parsing gitGraph options", e.message);
65
+ }
66
+ }, "setOptions");
67
+ var getOptions = /* @__PURE__ */ __name(function() {
68
+ return state.records.options;
69
+ }, "getOptions");
70
+ var commit = /* @__PURE__ */ __name(function(commitDB) {
71
+ let msg = commitDB.msg;
72
+ let id = commitDB.id;
73
+ const type = commitDB.type;
74
+ let tags = commitDB.tags;
75
+ log.info("commit", msg, id, type, tags);
76
+ log.debug("Entering commit:", msg, id, type, tags);
77
+ const config = getConfig3();
78
+ id = common_default.sanitizeText(id, config);
79
+ msg = common_default.sanitizeText(msg, config);
80
+ tags = tags?.map((tag) => common_default.sanitizeText(tag, config));
81
+ const newCommit = {
82
+ id: id ? id : state.records.seq + "-" + getID(),
83
+ message: msg,
84
+ seq: state.records.seq++,
85
+ type: type ?? commitType.NORMAL,
86
+ tags: tags ?? [],
87
+ parents: state.records.head == null ? [] : [state.records.head.id],
88
+ branch: state.records.currBranch
89
+ };
90
+ state.records.head = newCommit;
91
+ log.info("main branch", config.mainBranchName);
92
+ if (state.records.commits.has(newCommit.id)) {
93
+ log.warn(`Commit ID ${newCommit.id} already exists`);
94
+ }
95
+ state.records.commits.set(newCommit.id, newCommit);
96
+ state.records.branches.set(state.records.currBranch, newCommit.id);
97
+ log.debug("in pushCommit " + newCommit.id);
98
+ }, "commit");
99
+ var branch = /* @__PURE__ */ __name(function(branchDB) {
100
+ let name = branchDB.name;
101
+ const order = branchDB.order;
102
+ name = common_default.sanitizeText(name, getConfig3());
103
+ if (state.records.branches.has(name)) {
104
+ throw new Error(
105
+ `Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${name}")`
106
+ );
107
+ }
108
+ state.records.branches.set(name, state.records.head != null ? state.records.head.id : null);
109
+ state.records.branchConfig.set(name, { name, order });
110
+ checkout(name);
111
+ log.debug("in createBranch");
112
+ }, "branch");
113
+ var merge = /* @__PURE__ */ __name((mergeDB) => {
114
+ let otherBranch = mergeDB.branch;
115
+ let customId = mergeDB.id;
116
+ const overrideType = mergeDB.type;
117
+ const customTags = mergeDB.tags;
118
+ const config = getConfig3();
119
+ otherBranch = common_default.sanitizeText(otherBranch, config);
120
+ if (customId) {
121
+ customId = common_default.sanitizeText(customId, config);
122
+ }
123
+ const currentBranchCheck = state.records.branches.get(state.records.currBranch);
124
+ const otherBranchCheck = state.records.branches.get(otherBranch);
125
+ const currentCommit = currentBranchCheck ? state.records.commits.get(currentBranchCheck) : void 0;
126
+ const otherCommit = otherBranchCheck ? state.records.commits.get(otherBranchCheck) : void 0;
127
+ if (currentCommit && otherCommit && currentCommit.branch === otherBranch) {
128
+ throw new Error(`Cannot merge branch '${otherBranch}' into itself.`);
129
+ }
130
+ if (state.records.currBranch === otherBranch) {
131
+ const error = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
132
+ error.hash = {
133
+ text: `merge ${otherBranch}`,
134
+ token: `merge ${otherBranch}`,
135
+ expected: ["branch abc"]
136
+ };
137
+ throw error;
138
+ }
139
+ if (currentCommit === void 0 || !currentCommit) {
140
+ const error = new Error(
141
+ `Incorrect usage of "merge". Current branch (${state.records.currBranch})has no commits`
142
+ );
143
+ error.hash = {
144
+ text: `merge ${otherBranch}`,
145
+ token: `merge ${otherBranch}`,
146
+ expected: ["commit"]
147
+ };
148
+ throw error;
149
+ }
150
+ if (!state.records.branches.has(otherBranch)) {
151
+ const error = new Error(
152
+ 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist"
153
+ );
154
+ error.hash = {
155
+ text: `merge ${otherBranch}`,
156
+ token: `merge ${otherBranch}`,
157
+ expected: [`branch ${otherBranch}`]
158
+ };
159
+ throw error;
160
+ }
161
+ if (otherCommit === void 0 || !otherCommit) {
162
+ const error = new Error(
163
+ 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits"
164
+ );
165
+ error.hash = {
166
+ text: `merge ${otherBranch}`,
167
+ token: `merge ${otherBranch}`,
168
+ expected: ['"commit"']
169
+ };
170
+ throw error;
171
+ }
172
+ if (currentCommit === otherCommit) {
173
+ const error = new Error('Incorrect usage of "merge". Both branches have same head');
174
+ error.hash = {
175
+ text: `merge ${otherBranch}`,
176
+ token: `merge ${otherBranch}`,
177
+ expected: ["branch abc"]
178
+ };
179
+ throw error;
180
+ }
181
+ if (customId && state.records.commits.has(customId)) {
182
+ const error = new Error(
183
+ 'Incorrect usage of "merge". Commit with id:' + customId + " already exists, use different custom id"
184
+ );
185
+ error.hash = {
186
+ text: `merge ${otherBranch} ${customId} ${overrideType} ${customTags?.join(" ")}`,
187
+ token: `merge ${otherBranch} ${customId} ${overrideType} ${customTags?.join(" ")}`,
188
+ expected: [
189
+ `merge ${otherBranch} ${customId}_UNIQUE ${overrideType} ${customTags?.join(" ")}`
190
+ ]
191
+ };
192
+ throw error;
193
+ }
194
+ const verifiedBranch = otherBranchCheck ? otherBranchCheck : "";
195
+ const commit2 = {
196
+ id: customId || `${state.records.seq}-${getID()}`,
197
+ message: `merged branch ${otherBranch} into ${state.records.currBranch}`,
198
+ seq: state.records.seq++,
199
+ parents: state.records.head == null ? [] : [state.records.head.id, verifiedBranch],
200
+ branch: state.records.currBranch,
201
+ type: commitType.MERGE,
202
+ customType: overrideType,
203
+ customId: customId ? true : false,
204
+ tags: customTags ?? []
205
+ };
206
+ state.records.head = commit2;
207
+ state.records.commits.set(commit2.id, commit2);
208
+ state.records.branches.set(state.records.currBranch, commit2.id);
209
+ log.debug(state.records.branches);
210
+ log.debug("in mergeBranch");
211
+ }, "merge");
212
+ var cherryPick = /* @__PURE__ */ __name(function(cherryPickDB) {
213
+ let sourceId = cherryPickDB.id;
214
+ let targetId = cherryPickDB.targetId;
215
+ let tags = cherryPickDB.tags;
216
+ let parentCommitId = cherryPickDB.parent;
217
+ log.debug("Entering cherryPick:", sourceId, targetId, tags);
218
+ const config = getConfig3();
219
+ sourceId = common_default.sanitizeText(sourceId, config);
220
+ targetId = common_default.sanitizeText(targetId, config);
221
+ tags = tags?.map((tag) => common_default.sanitizeText(tag, config));
222
+ parentCommitId = common_default.sanitizeText(parentCommitId, config);
223
+ if (!sourceId || !state.records.commits.has(sourceId)) {
224
+ const error = new Error(
225
+ 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
226
+ );
227
+ error.hash = {
228
+ text: `cherryPick ${sourceId} ${targetId}`,
229
+ token: `cherryPick ${sourceId} ${targetId}`,
230
+ expected: ["cherry-pick abc"]
231
+ };
232
+ throw error;
233
+ }
234
+ const sourceCommit = state.records.commits.get(sourceId);
235
+ if (sourceCommit === void 0 || !sourceCommit) {
236
+ throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
237
+ }
238
+ if (parentCommitId && !(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommitId))) {
239
+ const error = new Error(
240
+ "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
241
+ );
242
+ throw error;
243
+ }
244
+ const sourceCommitBranch = sourceCommit.branch;
245
+ if (sourceCommit.type === commitType.MERGE && !parentCommitId) {
246
+ const error = new Error(
247
+ "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
248
+ );
249
+ throw error;
250
+ }
251
+ if (!targetId || !state.records.commits.has(targetId)) {
252
+ if (sourceCommitBranch === state.records.currBranch) {
253
+ const error = new Error(
254
+ 'Incorrect usage of "cherryPick". Source commit is already on current branch'
255
+ );
256
+ error.hash = {
257
+ text: `cherryPick ${sourceId} ${targetId}`,
258
+ token: `cherryPick ${sourceId} ${targetId}`,
259
+ expected: ["cherry-pick abc"]
260
+ };
261
+ throw error;
262
+ }
263
+ const currentCommitId = state.records.branches.get(state.records.currBranch);
264
+ if (currentCommitId === void 0 || !currentCommitId) {
265
+ const error = new Error(
266
+ `Incorrect usage of "cherry-pick". Current branch (${state.records.currBranch})has no commits`
267
+ );
268
+ error.hash = {
269
+ text: `cherryPick ${sourceId} ${targetId}`,
270
+ token: `cherryPick ${sourceId} ${targetId}`,
271
+ expected: ["cherry-pick abc"]
272
+ };
273
+ throw error;
274
+ }
275
+ const currentCommit = state.records.commits.get(currentCommitId);
276
+ if (currentCommit === void 0 || !currentCommit) {
277
+ const error = new Error(
278
+ `Incorrect usage of "cherry-pick". Current branch (${state.records.currBranch})has no commits`
279
+ );
280
+ error.hash = {
281
+ text: `cherryPick ${sourceId} ${targetId}`,
282
+ token: `cherryPick ${sourceId} ${targetId}`,
283
+ expected: ["cherry-pick abc"]
284
+ };
285
+ throw error;
286
+ }
287
+ const commit2 = {
288
+ id: state.records.seq + "-" + getID(),
289
+ message: `cherry-picked ${sourceCommit?.message} into ${state.records.currBranch}`,
290
+ seq: state.records.seq++,
291
+ parents: state.records.head == null ? [] : [state.records.head.id, sourceCommit.id],
292
+ branch: state.records.currBranch,
293
+ type: commitType.CHERRY_PICK,
294
+ tags: tags ? tags.filter(Boolean) : [
295
+ `cherry-pick:${sourceCommit.id}${sourceCommit.type === commitType.MERGE ? `|parent:${parentCommitId}` : ""}`
296
+ ]
297
+ };
298
+ state.records.head = commit2;
299
+ state.records.commits.set(commit2.id, commit2);
300
+ state.records.branches.set(state.records.currBranch, commit2.id);
301
+ log.debug(state.records.branches);
302
+ log.debug("in cherryPick");
303
+ }
304
+ }, "cherryPick");
305
+ var checkout = /* @__PURE__ */ __name(function(branch2) {
306
+ branch2 = common_default.sanitizeText(branch2, getConfig3());
307
+ if (!state.records.branches.has(branch2)) {
308
+ const error = new Error(
309
+ `Trying to checkout branch which is not yet created. (Help try using "branch ${branch2}")`
310
+ );
311
+ error.hash = {
312
+ text: `checkout ${branch2}`,
313
+ token: `checkout ${branch2}`,
314
+ expected: [`branch ${branch2}`]
315
+ };
316
+ throw error;
317
+ } else {
318
+ state.records.currBranch = branch2;
319
+ const id = state.records.branches.get(state.records.currBranch);
320
+ if (id === void 0 || !id) {
321
+ state.records.head = null;
322
+ } else {
323
+ state.records.head = state.records.commits.get(id) ?? null;
324
+ }
325
+ }
326
+ }, "checkout");
327
+ function upsert(arr, key, newVal) {
328
+ const index = arr.indexOf(key);
329
+ if (index === -1) {
330
+ arr.push(newVal);
331
+ } else {
332
+ arr.splice(index, 1, newVal);
333
+ }
334
+ }
335
+ __name(upsert, "upsert");
336
+ function prettyPrintCommitHistory(commitArr) {
337
+ const commit2 = commitArr.reduce((out, commit3) => {
338
+ if (out.seq > commit3.seq) {
339
+ return out;
340
+ }
341
+ return commit3;
342
+ }, commitArr[0]);
343
+ let line = "";
344
+ commitArr.forEach(function(c) {
345
+ if (c === commit2) {
346
+ line += " *";
347
+ } else {
348
+ line += " |";
349
+ }
350
+ });
351
+ const label = [line, commit2.id, commit2.seq];
352
+ for (const branch2 in state.records.branches) {
353
+ if (state.records.branches.get(branch2) === commit2.id) {
354
+ label.push(branch2);
355
+ }
356
+ }
357
+ log.debug(label.join(" "));
358
+ if (commit2.parents && commit2.parents.length == 2 && commit2.parents[0] && commit2.parents[1]) {
359
+ const newCommit = state.records.commits.get(commit2.parents[0]);
360
+ upsert(commitArr, commit2, newCommit);
361
+ if (commit2.parents[1]) {
362
+ commitArr.push(state.records.commits.get(commit2.parents[1]));
363
+ }
364
+ } else if (commit2.parents.length == 0) {
365
+ return;
366
+ } else {
367
+ if (commit2.parents[0]) {
368
+ const newCommit = state.records.commits.get(commit2.parents[0]);
369
+ upsert(commitArr, commit2, newCommit);
370
+ }
371
+ }
372
+ commitArr = uniqBy(commitArr, (c) => c.id);
373
+ prettyPrintCommitHistory(commitArr);
374
+ }
375
+ __name(prettyPrintCommitHistory, "prettyPrintCommitHistory");
376
+ var prettyPrint = /* @__PURE__ */ __name(function() {
377
+ log.debug(state.records.commits);
378
+ const node = getCommitsArray()[0];
379
+ prettyPrintCommitHistory([node]);
380
+ }, "prettyPrint");
381
+ var clear2 = /* @__PURE__ */ __name(function() {
382
+ state.reset();
383
+ clear();
384
+ }, "clear");
385
+ var getBranchesAsObjArray = /* @__PURE__ */ __name(function() {
386
+ const branchesArray = [...state.records.branchConfig.values()].map((branchConfig, i) => {
387
+ if (branchConfig.order !== null && branchConfig.order !== void 0) {
388
+ return branchConfig;
389
+ }
390
+ return {
391
+ ...branchConfig,
392
+ order: parseFloat(`0.${i}`)
393
+ };
394
+ }).sort((a, b) => (a.order ?? 0) - (b.order ?? 0)).map(({ name }) => ({ name }));
395
+ return branchesArray;
396
+ }, "getBranchesAsObjArray");
397
+ var getBranches = /* @__PURE__ */ __name(function() {
398
+ return state.records.branches;
399
+ }, "getBranches");
400
+ var getCommits = /* @__PURE__ */ __name(function() {
401
+ return state.records.commits;
402
+ }, "getCommits");
403
+ var getCommitsArray = /* @__PURE__ */ __name(function() {
404
+ const commitArr = [...state.records.commits.values()];
405
+ commitArr.forEach(function(o) {
406
+ log.debug(o.id);
407
+ });
408
+ commitArr.sort((a, b) => a.seq - b.seq);
409
+ return commitArr;
410
+ }, "getCommitsArray");
411
+ var getCurrentBranch = /* @__PURE__ */ __name(function() {
412
+ return state.records.currBranch;
413
+ }, "getCurrentBranch");
414
+ var getDirection = /* @__PURE__ */ __name(function() {
415
+ return state.records.direction;
416
+ }, "getDirection");
417
+ var getHead = /* @__PURE__ */ __name(function() {
418
+ return state.records.head;
419
+ }, "getHead");
420
+ var db = {
421
+ commitType,
422
+ getConfig: getConfig3,
423
+ setDirection,
424
+ setOptions,
425
+ getOptions,
426
+ commit,
427
+ branch,
428
+ merge,
429
+ cherryPick,
430
+ checkout,
431
+ //reset,
432
+ prettyPrint,
433
+ clear: clear2,
434
+ getBranchesAsObjArray,
435
+ getBranches,
436
+ getCommits,
437
+ getCommitsArray,
438
+ getCurrentBranch,
439
+ getDirection,
440
+ getHead,
441
+ setAccTitle,
442
+ getAccTitle,
443
+ getAccDescription,
444
+ setAccDescription,
445
+ setDiagramTitle,
446
+ getDiagramTitle
447
+ };
448
+ var populate = /* @__PURE__ */ __name((ast, db2) => {
449
+ populateCommonDb(ast, db2);
450
+ if (ast.dir) {
451
+ db2.setDirection(ast.dir);
452
+ }
453
+ for (const statement of ast.statements) {
454
+ parseStatement(statement, db2);
455
+ }
456
+ }, "populate");
457
+ var parseStatement = /* @__PURE__ */ __name((statement, db2) => {
458
+ const parsers = {
459
+ Commit: /* @__PURE__ */ __name((stmt) => db2.commit(parseCommit(stmt)), "Commit"),
460
+ Branch: /* @__PURE__ */ __name((stmt) => db2.branch(parseBranch(stmt)), "Branch"),
461
+ Merge: /* @__PURE__ */ __name((stmt) => db2.merge(parseMerge(stmt)), "Merge"),
462
+ Checkout: /* @__PURE__ */ __name((stmt) => db2.checkout(parseCheckout(stmt)), "Checkout"),
463
+ CherryPicking: /* @__PURE__ */ __name((stmt) => db2.cherryPick(parseCherryPicking(stmt)), "CherryPicking")
464
+ };
465
+ const parser2 = parsers[statement.$type];
466
+ if (parser2) {
467
+ parser2(statement);
468
+ } else {
469
+ log.error(`Unknown statement type: ${statement.$type}`);
470
+ }
471
+ }, "parseStatement");
472
+ var parseCommit = /* @__PURE__ */ __name((commit2) => {
473
+ const commitDB = {
474
+ id: commit2.id,
475
+ msg: commit2.message ?? "",
476
+ type: commit2.type !== void 0 ? commitType[commit2.type] : commitType.NORMAL,
477
+ tags: commit2.tags ?? void 0
478
+ };
479
+ return commitDB;
480
+ }, "parseCommit");
481
+ var parseBranch = /* @__PURE__ */ __name((branch2) => {
482
+ const branchDB = {
483
+ name: branch2.name,
484
+ order: branch2.order ?? 0
485
+ };
486
+ return branchDB;
487
+ }, "parseBranch");
488
+ var parseMerge = /* @__PURE__ */ __name((merge2) => {
489
+ const mergeDB = {
490
+ branch: merge2.branch,
491
+ id: merge2.id ?? "",
492
+ type: merge2.type !== void 0 ? commitType[merge2.type] : void 0,
493
+ tags: merge2.tags ?? void 0
494
+ };
495
+ return mergeDB;
496
+ }, "parseMerge");
497
+ var parseCheckout = /* @__PURE__ */ __name((checkout2) => {
498
+ const branch2 = checkout2.branch;
499
+ return branch2;
500
+ }, "parseCheckout");
501
+ var parseCherryPicking = /* @__PURE__ */ __name((cherryPicking) => {
502
+ const cherryPickDB = {
503
+ id: cherryPicking.id,
504
+ targetId: "",
505
+ tags: cherryPicking.tags?.length === 0 ? void 0 : cherryPicking.tags,
506
+ parent: cherryPicking.parent
507
+ };
508
+ return cherryPickDB;
509
+ }, "parseCherryPicking");
510
+ var parser = {
511
+ parse: /* @__PURE__ */ __name(async (input) => {
512
+ const ast = await parse("gitGraph", input);
513
+ log.debug(ast);
514
+ populate(ast, db);
515
+ }, "parse")
516
+ };
517
+ var LAYOUT_OFFSET = 10;
518
+ var COMMIT_STEP = 40;
519
+ var PX = 4;
520
+ var PY = 2;
521
+ var THEME_COLOR_LIMIT = 8;
522
+ var REDUX_GEOMETRY_THEMES = /* @__PURE__ */ new Set(["redux", "redux-dark", "redux-color", "redux-dark-color"]);
523
+ var REDUX_BRANCH_LABEL_PADDING_Y = 12;
524
+ var COLOR_THEMES = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]);
525
+ var DARK_THEMES = /* @__PURE__ */ new Set(["dark", "redux-dark", "redux-dark-color", "neo-dark"]);
526
+ var calcColorIndex = /* @__PURE__ */ __name((rawIndex, limit, avoidDefaultColor = false) => {
527
+ if (avoidDefaultColor && rawIndex > 0) {
528
+ return (rawIndex - 1) % (limit - 1) + 1;
529
+ }
530
+ return rawIndex % limit;
531
+ }, "calcColorIndex");
532
+ var branchPos = /* @__PURE__ */ new Map();
533
+ var commitPos = /* @__PURE__ */ new Map();
534
+ var defaultPos = 30;
535
+ var allCommitsDict = /* @__PURE__ */ new Map();
536
+ var lanes = [];
537
+ var maxPos = 0;
538
+ var dir = "LR";
539
+ var clear3 = /* @__PURE__ */ __name(() => {
540
+ branchPos.clear();
541
+ commitPos.clear();
542
+ allCommitsDict.clear();
543
+ maxPos = 0;
544
+ lanes = [];
545
+ dir = "LR";
546
+ }, "clear");
547
+ var drawText = /* @__PURE__ */ __name((txt) => {
548
+ const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text");
549
+ const rows = typeof txt === "string" ? txt.split(/\\n|\n|<br\s*\/?>/gi) : txt;
550
+ rows.forEach((row) => {
551
+ const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
552
+ tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
553
+ tspan.setAttribute("dy", "1em");
554
+ tspan.setAttribute("x", "0");
555
+ tspan.setAttribute("class", "row");
556
+ tspan.textContent = row.trim();
557
+ svgLabel.appendChild(tspan);
558
+ });
559
+ return svgLabel;
560
+ }, "drawText");
561
+ var findClosestParent = /* @__PURE__ */ __name((parents) => {
562
+ let closestParent;
563
+ let comparisonFunc;
564
+ let targetPosition;
565
+ if (dir === "BT") {
566
+ comparisonFunc = /* @__PURE__ */ __name((a, b) => a <= b, "comparisonFunc");
567
+ targetPosition = Infinity;
568
+ } else {
569
+ comparisonFunc = /* @__PURE__ */ __name((a, b) => a >= b, "comparisonFunc");
570
+ targetPosition = 0;
571
+ }
572
+ parents.forEach((parent) => {
573
+ const parentPosition = dir === "TB" || dir == "BT" ? commitPos.get(parent)?.y : commitPos.get(parent)?.x;
574
+ if (parentPosition !== void 0 && comparisonFunc(parentPosition, targetPosition)) {
575
+ closestParent = parent;
576
+ targetPosition = parentPosition;
577
+ }
578
+ });
579
+ return closestParent;
580
+ }, "findClosestParent");
581
+ var findClosestParentBT = /* @__PURE__ */ __name((parents) => {
582
+ let closestParent = "";
583
+ let maxPosition = Infinity;
584
+ parents.forEach((parent) => {
585
+ const parentPosition = commitPos.get(parent).y;
586
+ if (parentPosition <= maxPosition) {
587
+ closestParent = parent;
588
+ maxPosition = parentPosition;
589
+ }
590
+ });
591
+ return closestParent || void 0;
592
+ }, "findClosestParentBT");
593
+ var setParallelBTPos = /* @__PURE__ */ __name((sortedKeys, commits, defaultPos2) => {
594
+ let curPos = defaultPos2;
595
+ let maxPosition = defaultPos2;
596
+ const roots = [];
597
+ sortedKeys.forEach((key) => {
598
+ const commit2 = commits.get(key);
599
+ if (!commit2) {
600
+ throw new Error(`Commit not found for key ${key}`);
601
+ }
602
+ if (commit2.parents.length) {
603
+ curPos = calculateCommitPosition(commit2);
604
+ maxPosition = Math.max(curPos, maxPosition);
605
+ } else {
606
+ roots.push(commit2);
607
+ }
608
+ setCommitPosition(commit2, curPos);
609
+ });
610
+ curPos = maxPosition;
611
+ roots.forEach((commit2) => {
612
+ setRootPosition(commit2, curPos, defaultPos2);
613
+ });
614
+ sortedKeys.forEach((key) => {
615
+ const commit2 = commits.get(key);
616
+ if (commit2?.parents.length) {
617
+ const closestParent = findClosestParentBT(commit2.parents);
618
+ curPos = commitPos.get(closestParent).y - COMMIT_STEP;
619
+ if (curPos <= maxPosition) {
620
+ maxPosition = curPos;
621
+ }
622
+ const x = branchPos.get(commit2.branch).pos;
623
+ const y = curPos - LAYOUT_OFFSET;
624
+ commitPos.set(commit2.id, { x, y });
625
+ }
626
+ });
627
+ }, "setParallelBTPos");
628
+ var findClosestParentPos = /* @__PURE__ */ __name((commit2) => {
629
+ const closestParent = findClosestParent(commit2.parents.filter((p) => p !== null));
630
+ if (!closestParent) {
631
+ throw new Error(`Closest parent not found for commit ${commit2.id}`);
632
+ }
633
+ const closestParentPos = commitPos.get(closestParent)?.y;
634
+ if (closestParentPos === void 0) {
635
+ throw new Error(`Closest parent position not found for commit ${commit2.id}`);
636
+ }
637
+ return closestParentPos;
638
+ }, "findClosestParentPos");
639
+ var calculateCommitPosition = /* @__PURE__ */ __name((commit2) => {
640
+ const closestParentPos = findClosestParentPos(commit2);
641
+ return closestParentPos + COMMIT_STEP;
642
+ }, "calculateCommitPosition");
643
+ var setCommitPosition = /* @__PURE__ */ __name((commit2, curPos) => {
644
+ const branch2 = branchPos.get(commit2.branch);
645
+ if (!branch2) {
646
+ throw new Error(`Branch not found for commit ${commit2.id}`);
647
+ }
648
+ const x = branch2.pos;
649
+ const y = curPos + LAYOUT_OFFSET;
650
+ commitPos.set(commit2.id, { x, y });
651
+ return { x, y };
652
+ }, "setCommitPosition");
653
+ var setRootPosition = /* @__PURE__ */ __name((commit2, curPos, defaultPos2) => {
654
+ const branch2 = branchPos.get(commit2.branch);
655
+ if (!branch2) {
656
+ throw new Error(`Branch not found for commit ${commit2.id}`);
657
+ }
658
+ const y = curPos + defaultPos2;
659
+ const x = branch2.pos;
660
+ commitPos.set(commit2.id, { x, y });
661
+ }, "setRootPosition");
662
+ var drawCommitBullet = /* @__PURE__ */ __name((gBullets, commit2, commitPosition, typeClass, branchIndex, commitSymbolType) => {
663
+ const { theme } = getConfig2();
664
+ const useReduxGeometry = REDUX_GEOMETRY_THEMES.has(theme ?? "");
665
+ const useColorTheme = COLOR_THEMES.has(theme ?? "");
666
+ const isDark = DARK_THEMES.has(theme ?? "");
667
+ if (commitSymbolType === commitType.HIGHLIGHT) {
668
+ gBullets.append("rect").attr("x", commitPosition.x - 10 + (useReduxGeometry ? 3 : 0)).attr("y", commitPosition.y - 10 + (useReduxGeometry ? 3 : 0)).attr("width", useReduxGeometry ? 14 : 20).attr("height", useReduxGeometry ? 14 : 20).attr(
669
+ "class",
670
+ `commit ${commit2.id} commit-highlight${calcColorIndex(branchIndex, THEME_COLOR_LIMIT, useColorTheme)} ${typeClass}-outer`
671
+ );
672
+ gBullets.append("rect").attr("x", commitPosition.x - 6 + (useReduxGeometry ? 2 : 0)).attr("y", commitPosition.y - 6 + (useReduxGeometry ? 2 : 0)).attr("width", useReduxGeometry ? 8 : 12).attr("height", useReduxGeometry ? 8 : 12).attr(
673
+ "class",
674
+ `commit ${commit2.id} commit${calcColorIndex(branchIndex, THEME_COLOR_LIMIT, useColorTheme)} ${typeClass}-inner`
675
+ );
676
+ } else if (commitSymbolType === commitType.CHERRY_PICK) {
677
+ gBullets.append("circle").attr("cx", commitPosition.x).attr("cy", commitPosition.y).attr("r", useReduxGeometry ? 7 : 10).attr("class", `commit ${commit2.id} ${typeClass}`);
678
+ gBullets.append("circle").attr("cx", commitPosition.x - 3).attr("cy", commitPosition.y + 2).attr("r", useReduxGeometry ? 2.5 : 2.75).attr("fill", isDark ? "#000000" : "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
679
+ gBullets.append("circle").attr("cx", commitPosition.x + 3).attr("cy", commitPosition.y + 2).attr("r", useReduxGeometry ? 2.5 : 2.75).attr("fill", isDark ? "#000000" : "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
680
+ gBullets.append("line").attr("x1", commitPosition.x + 3).attr("y1", commitPosition.y + 1).attr("x2", commitPosition.x).attr("y2", commitPosition.y - 5).attr("stroke", isDark ? "#000000" : "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
681
+ gBullets.append("line").attr("x1", commitPosition.x - 3).attr("y1", commitPosition.y + 1).attr("x2", commitPosition.x).attr("y2", commitPosition.y - 5).attr("stroke", isDark ? "#000000" : "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
682
+ } else {
683
+ const circle = gBullets.append("circle");
684
+ circle.attr("cx", commitPosition.x);
685
+ circle.attr("cy", commitPosition.y);
686
+ circle.attr("r", useReduxGeometry ? 7 : 10);
687
+ circle.attr(
688
+ "class",
689
+ `commit ${commit2.id} commit${calcColorIndex(branchIndex, THEME_COLOR_LIMIT, useColorTheme)}`
690
+ );
691
+ if (commitSymbolType === commitType.MERGE) {
692
+ const circle2 = gBullets.append("circle");
693
+ circle2.attr("cx", commitPosition.x);
694
+ circle2.attr("cy", commitPosition.y);
695
+ circle2.attr("r", useReduxGeometry ? 5 : 6);
696
+ circle2.attr(
697
+ "class",
698
+ `commit ${typeClass} ${commit2.id} commit${calcColorIndex(branchIndex, THEME_COLOR_LIMIT, useColorTheme)}`
699
+ );
700
+ }
701
+ if (commitSymbolType === commitType.REVERSE) {
702
+ const cross = gBullets.append("path");
703
+ const constValue = useReduxGeometry ? 4 : 5;
704
+ cross.attr(
705
+ "d",
706
+ `M ${commitPosition.x - constValue},${commitPosition.y - constValue}L${commitPosition.x + constValue},${commitPosition.y + constValue}M${commitPosition.x - constValue},${commitPosition.y + constValue}L${commitPosition.x + constValue},${commitPosition.y - constValue}`
707
+ ).attr(
708
+ "class",
709
+ `commit ${typeClass} ${commit2.id} commit${calcColorIndex(branchIndex, THEME_COLOR_LIMIT, useColorTheme)}`
710
+ );
711
+ }
712
+ }
713
+ }, "drawCommitBullet");
714
+ var drawCommitLabel = /* @__PURE__ */ __name((gLabels, commit2, commitPosition, pos, gitGraphConfig) => {
715
+ if (commit2.type !== commitType.CHERRY_PICK && (commit2.customId && commit2.type === commitType.MERGE || commit2.type !== commitType.MERGE) && gitGraphConfig.showCommitLabel) {
716
+ const wrapper = gLabels.append("g");
717
+ const labelBkg = wrapper.insert("rect").attr("class", "commit-label-bkg");
718
+ const text = wrapper.append("text").attr("x", pos).attr("y", commitPosition.y + 25).attr("class", "commit-label").text(commit2.id);
719
+ const bbox = text.node()?.getBBox();
720
+ if (bbox) {
721
+ labelBkg.attr("x", commitPosition.posWithOffset - bbox.width / 2 - PY).attr("y", commitPosition.y + 13.5).attr("width", bbox.width + 2 * PY).attr("height", bbox.height + 2 * PY);
722
+ if (dir === "TB" || dir === "BT") {
723
+ labelBkg.attr("x", commitPosition.x - (bbox.width + 4 * PX + 5)).attr("y", commitPosition.y - 12);
724
+ text.attr("x", commitPosition.x - (bbox.width + 4 * PX)).attr("y", commitPosition.y + bbox.height - 12);
725
+ } else {
726
+ text.attr("x", commitPosition.posWithOffset - bbox.width / 2);
727
+ }
728
+ if (gitGraphConfig.rotateCommitLabel) {
729
+ if (dir === "TB" || dir === "BT") {
730
+ text.attr(
731
+ "transform",
732
+ "rotate(-45, " + commitPosition.x + ", " + commitPosition.y + ")"
733
+ );
734
+ labelBkg.attr(
735
+ "transform",
736
+ "rotate(-45, " + commitPosition.x + ", " + commitPosition.y + ")"
737
+ );
738
+ } else {
739
+ const r_x = -7.5 - (bbox.width + 10) / 25 * 9.5;
740
+ const r_y = 10 + bbox.width / 25 * 8.5;
741
+ wrapper.attr(
742
+ "transform",
743
+ "translate(" + r_x + ", " + r_y + ") rotate(-45, " + pos + ", " + commitPosition.y + ")"
744
+ );
745
+ }
746
+ }
747
+ }
748
+ }
749
+ }, "drawCommitLabel");
750
+ var drawCommitTags = /* @__PURE__ */ __name((gLabels, commit2, commitPosition, pos) => {
751
+ if (commit2.tags.length > 0) {
752
+ let yOffset = 0;
753
+ let maxTagBboxWidth = 0;
754
+ let maxTagBboxHeight = 0;
755
+ const tagElements = [];
756
+ for (const tagValue of commit2.tags.reverse()) {
757
+ const rect = gLabels.insert("polygon");
758
+ const hole = gLabels.append("circle");
759
+ const tag = gLabels.append("text").attr("y", commitPosition.y - 16 - yOffset).attr("class", "tag-label").text(tagValue);
760
+ const tagBbox = tag.node()?.getBBox();
761
+ if (!tagBbox) {
762
+ throw new Error("Tag bbox not found");
763
+ }
764
+ maxTagBboxWidth = Math.max(maxTagBboxWidth, tagBbox.width);
765
+ maxTagBboxHeight = Math.max(maxTagBboxHeight, tagBbox.height);
766
+ tag.attr("x", commitPosition.posWithOffset - tagBbox.width / 2);
767
+ tagElements.push({
768
+ tag,
769
+ hole,
770
+ rect,
771
+ yOffset
772
+ });
773
+ yOffset += 20;
774
+ }
775
+ for (const { tag, hole, rect, yOffset: yOffset2 } of tagElements) {
776
+ const h2 = maxTagBboxHeight / 2;
777
+ const ly = commitPosition.y - 19.2 - yOffset2;
778
+ rect.attr("class", "tag-label-bkg").attr(
779
+ "points",
780
+ `
781
+ ${pos - maxTagBboxWidth / 2 - PX / 2},${ly + PY}
782
+ ${pos - maxTagBboxWidth / 2 - PX / 2},${ly - PY}
783
+ ${commitPosition.posWithOffset - maxTagBboxWidth / 2 - PX},${ly - h2 - PY}
784
+ ${commitPosition.posWithOffset + maxTagBboxWidth / 2 + PX},${ly - h2 - PY}
785
+ ${commitPosition.posWithOffset + maxTagBboxWidth / 2 + PX},${ly + h2 + PY}
786
+ ${commitPosition.posWithOffset - maxTagBboxWidth / 2 - PX},${ly + h2 + PY}`
787
+ );
788
+ hole.attr("cy", ly).attr("cx", pos - maxTagBboxWidth / 2 + PX / 2).attr("r", 1.5).attr("class", "tag-hole");
789
+ if (dir === "TB" || dir === "BT") {
790
+ const yOrigin = pos + yOffset2;
791
+ rect.attr("class", "tag-label-bkg").attr(
792
+ "points",
793
+ `
794
+ ${commitPosition.x},${yOrigin + 2}
795
+ ${commitPosition.x},${yOrigin - 2}
796
+ ${commitPosition.x + LAYOUT_OFFSET},${yOrigin - h2 - 2}
797
+ ${commitPosition.x + LAYOUT_OFFSET + maxTagBboxWidth + 4},${yOrigin - h2 - 2}
798
+ ${commitPosition.x + LAYOUT_OFFSET + maxTagBboxWidth + 4},${yOrigin + h2 + 2}
799
+ ${commitPosition.x + LAYOUT_OFFSET},${yOrigin + h2 + 2}`
800
+ ).attr("transform", "translate(12,12) rotate(45, " + commitPosition.x + "," + pos + ")");
801
+ hole.attr("cx", commitPosition.x + PX / 2).attr("cy", yOrigin).attr("transform", "translate(12,12) rotate(45, " + commitPosition.x + "," + pos + ")");
802
+ tag.attr("x", commitPosition.x + 5).attr("y", yOrigin + 3).attr("transform", "translate(14,14) rotate(45, " + commitPosition.x + "," + pos + ")");
803
+ }
804
+ }
805
+ }
806
+ }, "drawCommitTags");
807
+ var getCommitClassType = /* @__PURE__ */ __name((commit2) => {
808
+ const commitSymbolType = commit2.customType ?? commit2.type;
809
+ switch (commitSymbolType) {
810
+ case commitType.NORMAL:
811
+ return "commit-normal";
812
+ case commitType.REVERSE:
813
+ return "commit-reverse";
814
+ case commitType.HIGHLIGHT:
815
+ return "commit-highlight";
816
+ case commitType.MERGE:
817
+ return "commit-merge";
818
+ case commitType.CHERRY_PICK:
819
+ return "commit-cherry-pick";
820
+ default:
821
+ return "commit-normal";
822
+ }
823
+ }, "getCommitClassType");
824
+ var calculatePosition = /* @__PURE__ */ __name((commit2, dir2, pos, commitPos2) => {
825
+ const defaultCommitPosition = { x: 0, y: 0 };
826
+ if (commit2.parents.length > 0) {
827
+ const closestParent = findClosestParent(commit2.parents);
828
+ if (closestParent) {
829
+ const parentPosition = commitPos2.get(closestParent) ?? defaultCommitPosition;
830
+ if (dir2 === "TB") {
831
+ return parentPosition.y + COMMIT_STEP;
832
+ } else if (dir2 === "BT") {
833
+ const currentPosition = commitPos2.get(commit2.id) ?? defaultCommitPosition;
834
+ return currentPosition.y - COMMIT_STEP;
835
+ } else {
836
+ return parentPosition.x + COMMIT_STEP;
837
+ }
838
+ }
839
+ } else {
840
+ if (dir2 === "TB") {
841
+ return defaultPos;
842
+ } else if (dir2 === "BT") {
843
+ const currentPosition = commitPos2.get(commit2.id) ?? defaultCommitPosition;
844
+ return currentPosition.y - COMMIT_STEP;
845
+ } else {
846
+ return 0;
847
+ }
848
+ }
849
+ return 0;
850
+ }, "calculatePosition");
851
+ var getCommitPosition = /* @__PURE__ */ __name((commit2, pos, isParallelCommits) => {
852
+ const posWithOffset = dir === "BT" && isParallelCommits ? pos : pos + LAYOUT_OFFSET;
853
+ const branchY = branchPos.get(commit2.branch)?.pos;
854
+ const x = dir === "TB" || dir === "BT" ? branchPos.get(commit2.branch)?.pos : posWithOffset;
855
+ if (x === void 0 || branchY === void 0) {
856
+ throw new Error(`Position were undefined for commit ${commit2.id}`);
857
+ }
858
+ const useReduxGeometry = REDUX_GEOMETRY_THEMES.has(getConfig2().theme ?? "");
859
+ const y = dir === "TB" || dir === "BT" ? posWithOffset : branchY + (useReduxGeometry ? REDUX_BRANCH_LABEL_PADDING_Y / 2 + 1 : -2);
860
+ return { x, y, posWithOffset };
861
+ }, "getCommitPosition");
862
+ var drawCommits = /* @__PURE__ */ __name((svg, commits, modifyGraph, gitGraphConfig) => {
863
+ const gBullets = svg.append("g").attr("class", "commit-bullets");
864
+ const gLabels = svg.append("g").attr("class", "commit-labels");
865
+ let pos = dir === "TB" || dir === "BT" ? defaultPos : 0;
866
+ const keys = [...commits.keys()];
867
+ const isParallelCommits = gitGraphConfig.parallelCommits ?? false;
868
+ const sortKeys = /* @__PURE__ */ __name((a, b) => {
869
+ const seqA = commits.get(a)?.seq;
870
+ const seqB = commits.get(b)?.seq;
871
+ return seqA !== void 0 && seqB !== void 0 ? seqA - seqB : 0;
872
+ }, "sortKeys");
873
+ let sortedKeys = keys.sort(sortKeys);
874
+ if (dir === "BT") {
875
+ if (isParallelCommits) {
876
+ setParallelBTPos(sortedKeys, commits, pos);
877
+ }
878
+ sortedKeys = sortedKeys.reverse();
879
+ }
880
+ sortedKeys.forEach((key) => {
881
+ const commit2 = commits.get(key);
882
+ if (!commit2) {
883
+ throw new Error(`Commit not found for key ${key}`);
884
+ }
885
+ if (isParallelCommits) {
886
+ pos = calculatePosition(commit2, dir, pos, commitPos);
887
+ }
888
+ const commitPosition = getCommitPosition(commit2, pos, isParallelCommits);
889
+ if (modifyGraph) {
890
+ const typeClass = getCommitClassType(commit2);
891
+ const commitSymbolType = commit2.customType ?? commit2.type;
892
+ const branchIndex = branchPos.get(commit2.branch)?.index ?? 0;
893
+ drawCommitBullet(gBullets, commit2, commitPosition, typeClass, branchIndex, commitSymbolType);
894
+ drawCommitLabel(gLabels, commit2, commitPosition, pos, gitGraphConfig);
895
+ drawCommitTags(gLabels, commit2, commitPosition, pos);
896
+ }
897
+ if (dir === "TB" || dir === "BT") {
898
+ commitPos.set(commit2.id, { x: commitPosition.x, y: commitPosition.posWithOffset });
899
+ } else {
900
+ commitPos.set(commit2.id, { x: commitPosition.posWithOffset, y: commitPosition.y });
901
+ }
902
+ pos = dir === "BT" && isParallelCommits ? pos + COMMIT_STEP : pos + COMMIT_STEP + LAYOUT_OFFSET;
903
+ if (pos > maxPos) {
904
+ maxPos = pos;
905
+ }
906
+ });
907
+ }, "drawCommits");
908
+ var shouldRerouteArrow = /* @__PURE__ */ __name((commitA, commitB, p1, p2, allCommits) => {
909
+ const commitBIsFurthest = dir === "TB" || dir === "BT" ? p1.x < p2.x : p1.y < p2.y;
910
+ const branchToGetCurve = commitBIsFurthest ? commitB.branch : commitA.branch;
911
+ const isOnBranchToGetCurve = /* @__PURE__ */ __name((x) => x.branch === branchToGetCurve, "isOnBranchToGetCurve");
912
+ const isBetweenCommits = /* @__PURE__ */ __name((x) => x.seq > commitA.seq && x.seq < commitB.seq, "isBetweenCommits");
913
+ return [...allCommits.values()].some((commitX) => {
914
+ return isBetweenCommits(commitX) && isOnBranchToGetCurve(commitX);
915
+ });
916
+ }, "shouldRerouteArrow");
917
+ var findLane = /* @__PURE__ */ __name((y1, y2, depth = 0) => {
918
+ const candidate = y1 + Math.abs(y1 - y2) / 2;
919
+ if (depth > 5) {
920
+ return candidate;
921
+ }
922
+ const ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10);
923
+ if (ok) {
924
+ lanes.push(candidate);
925
+ return candidate;
926
+ }
927
+ const diff = Math.abs(y1 - y2);
928
+ return findLane(y1, y2 - diff / 5, depth + 1);
929
+ }, "findLane");
930
+ var drawArrow = /* @__PURE__ */ __name((svg, commitA, commitB, allCommits) => {
931
+ const { theme: arrowTheme } = getConfig2();
932
+ const useColorTheme = COLOR_THEMES.has(arrowTheme ?? "");
933
+ const p1 = commitPos.get(commitA.id);
934
+ const p2 = commitPos.get(commitB.id);
935
+ if (p1 === void 0 || p2 === void 0) {
936
+ throw new Error(`Commit positions not found for commits ${commitA.id} and ${commitB.id}`);
937
+ }
938
+ const arrowNeedsRerouting = shouldRerouteArrow(commitA, commitB, p1, p2, allCommits);
939
+ let arc = "";
940
+ let arc2 = "";
941
+ let radius = 0;
942
+ let offset = 0;
943
+ let colorClassNum = branchPos.get(commitB.branch)?.index;
944
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
945
+ colorClassNum = branchPos.get(commitA.branch)?.index;
946
+ }
947
+ let lineDef;
948
+ if (arrowNeedsRerouting) {
949
+ arc = "A 10 10, 0, 0, 0,";
950
+ arc2 = "A 10 10, 0, 0, 1,";
951
+ radius = 10;
952
+ offset = 10;
953
+ const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y);
954
+ const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x);
955
+ if (dir === "TB") {
956
+ if (p1.x < p2.x) {
957
+ lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;
958
+ } else {
959
+ colorClassNum = branchPos.get(commitA.branch)?.index;
960
+ lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`;
961
+ }
962
+ } else if (dir === "BT") {
963
+ if (p1.x < p2.x) {
964
+ lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc} ${lineX} ${p1.y - offset} L ${lineX} ${p2.y + radius} ${arc2} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;
965
+ } else {
966
+ colorClassNum = branchPos.get(commitA.branch)?.index;
967
+ lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc2} ${lineX} ${p1.y - offset} L ${lineX} ${p2.y + radius} ${arc} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`;
968
+ }
969
+ } else {
970
+ if (p1.y < p2.y) {
971
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`;
972
+ } else {
973
+ colorClassNum = branchPos.get(commitA.branch)?.index;
974
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`;
975
+ }
976
+ }
977
+ } else {
978
+ arc = "A 20 20, 0, 0, 0,";
979
+ arc2 = "A 20 20, 0, 0, 1,";
980
+ radius = 20;
981
+ offset = 20;
982
+ if (dir === "TB") {
983
+ if (p1.x < p2.x) {
984
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
985
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
986
+ } else {
987
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`;
988
+ }
989
+ }
990
+ if (p1.x > p2.x) {
991
+ arc = "A 20 20, 0, 0, 0,";
992
+ arc2 = "A 20 20, 0, 0, 1,";
993
+ radius = 20;
994
+ offset = 20;
995
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
996
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`;
997
+ } else {
998
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x + radius} ${p1.y} ${arc} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`;
999
+ }
1000
+ }
1001
+ if (p1.x === p2.x) {
1002
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
1003
+ }
1004
+ } else if (dir === "BT") {
1005
+ if (p1.x < p2.x) {
1006
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
1007
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
1008
+ } else {
1009
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`;
1010
+ }
1011
+ }
1012
+ if (p1.x > p2.x) {
1013
+ arc = "A 20 20, 0, 0, 0,";
1014
+ arc2 = "A 20 20, 0, 0, 1,";
1015
+ radius = 20;
1016
+ offset = 20;
1017
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
1018
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`;
1019
+ } else {
1020
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x + radius} ${p1.y} ${arc2} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`;
1021
+ }
1022
+ }
1023
+ if (p1.x === p2.x) {
1024
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
1025
+ }
1026
+ } else {
1027
+ if (p1.y < p2.y) {
1028
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
1029
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`;
1030
+ } else {
1031
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
1032
+ }
1033
+ }
1034
+ if (p1.y > p2.y) {
1035
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
1036
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`;
1037
+ } else {
1038
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
1039
+ }
1040
+ }
1041
+ if (p1.y === p2.y) {
1042
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
1043
+ }
1044
+ }
1045
+ }
1046
+ if (lineDef === void 0) {
1047
+ throw new Error("Line definition not found");
1048
+ }
1049
+ svg.append("path").attr("d", lineDef).attr(
1050
+ "class",
1051
+ "arrow arrow" + calcColorIndex(colorClassNum, THEME_COLOR_LIMIT, useColorTheme)
1052
+ );
1053
+ }, "drawArrow");
1054
+ var drawArrows = /* @__PURE__ */ __name((svg, commits) => {
1055
+ const gArrows = svg.append("g").attr("class", "commit-arrows");
1056
+ [...commits.keys()].forEach((key) => {
1057
+ const commit2 = commits.get(key);
1058
+ if (commit2.parents && commit2.parents.length > 0) {
1059
+ commit2.parents.forEach((parent) => {
1060
+ drawArrow(gArrows, commits.get(parent), commit2, commits);
1061
+ });
1062
+ }
1063
+ });
1064
+ }, "drawArrows");
1065
+ var drawBranches = /* @__PURE__ */ __name((svg, branches, gitGraphConfig, id) => {
1066
+ const { look, theme, themeVariables } = getConfig2();
1067
+ const { dropShadow, THEME_COLOR_LIMIT: themeColorLimit } = themeVariables;
1068
+ const useReduxGeometry = REDUX_GEOMETRY_THEMES.has(theme ?? "");
1069
+ const useColorTheme = COLOR_THEMES.has(theme ?? "");
1070
+ const g = svg.append("g");
1071
+ branches.forEach((branch2, index) => {
1072
+ const adjustIndexForTheme = calcColorIndex(
1073
+ index,
1074
+ useReduxGeometry ? themeColorLimit : THEME_COLOR_LIMIT,
1075
+ useColorTheme
1076
+ );
1077
+ const pos = branchPos.get(branch2.name)?.pos;
1078
+ if (pos === void 0) {
1079
+ throw new Error(`Position not found for branch ${branch2.name}`);
1080
+ }
1081
+ const spineY = dir === "TB" || dir === "BT" ? pos : useReduxGeometry ? pos + REDUX_BRANCH_LABEL_PADDING_Y / 2 + 1 : pos - 2;
1082
+ const line = g.append("line");
1083
+ line.attr("x1", 0);
1084
+ line.attr("y1", spineY);
1085
+ line.attr("x2", maxPos);
1086
+ line.attr("y2", spineY);
1087
+ line.attr("class", "branch branch" + adjustIndexForTheme);
1088
+ if (dir === "TB") {
1089
+ line.attr("y1", defaultPos);
1090
+ line.attr("x1", pos);
1091
+ line.attr("y2", maxPos);
1092
+ line.attr("x2", pos);
1093
+ } else if (dir === "BT") {
1094
+ line.attr("y1", maxPos);
1095
+ line.attr("x1", pos);
1096
+ line.attr("y2", defaultPos);
1097
+ line.attr("x2", pos);
1098
+ }
1099
+ lanes.push(spineY);
1100
+ const name = branch2.name;
1101
+ const labelElement = drawText(name);
1102
+ const bkg = g.insert("rect");
1103
+ const branchLabel = g.insert("g").attr("class", "branchLabel");
1104
+ const label = branchLabel.insert("g").attr("class", "label branch-label" + adjustIndexForTheme);
1105
+ label.node().appendChild(labelElement);
1106
+ const bbox = labelElement.getBBox();
1107
+ const borderRadius = useReduxGeometry ? 0 : 4;
1108
+ const labelPaddingX = useReduxGeometry ? 16 : 0;
1109
+ const labelPaddingY = useReduxGeometry ? REDUX_BRANCH_LABEL_PADDING_Y : 0;
1110
+ if (look === "neo") {
1111
+ bkg.attr("data-look", `neo`);
1112
+ }
1113
+ bkg.attr("class", "branchLabelBkg label" + adjustIndexForTheme).attr(
1114
+ "style",
1115
+ look === "neo" ? `filter:${useReduxGeometry ? `url(#${id}-drop-shadow)` : dropShadow}` : ""
1116
+ ).attr("rx", borderRadius).attr("ry", borderRadius).attr("x", -bbox.width - 4 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)).attr("y", -bbox.height / 2 + 10).attr("width", bbox.width + 18 + labelPaddingX).attr("height", bbox.height + 4 + labelPaddingY);
1117
+ label.attr(
1118
+ "transform",
1119
+ "translate(" + (-bbox.width - 14 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0) + labelPaddingX / 2) + ", " + (spineY - bbox.height / 2 - 2) + ")"
1120
+ );
1121
+ if (dir === "TB") {
1122
+ bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", 0);
1123
+ label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", 0)");
1124
+ if (useReduxGeometry) {
1125
+ bkg.attr("transform", `translate(${-labelPaddingX / 2 - 3}, ${-labelPaddingY - 10})`);
1126
+ label.attr(
1127
+ "transform",
1128
+ "translate(" + (pos - bbox.width / 2 - 5) + ", " + (-labelPaddingY * 2 + 7) + ")"
1129
+ );
1130
+ }
1131
+ } else if (dir === "BT") {
1132
+ bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", maxPos);
1133
+ label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", " + maxPos + ")");
1134
+ if (useReduxGeometry) {
1135
+ bkg.attr("transform", `translate(${-labelPaddingX / 2 - 3}, ${labelPaddingY + 10})`);
1136
+ label.attr(
1137
+ "transform",
1138
+ "translate(" + (pos - bbox.width / 2 - 5) + ", " + (maxPos + labelPaddingY * 2 + 4) + ")"
1139
+ );
1140
+ }
1141
+ } else {
1142
+ bkg.attr("transform", "translate(-19, " + (spineY - 12 - labelPaddingY / 2) + ")");
1143
+ }
1144
+ });
1145
+ }, "drawBranches");
1146
+ var setBranchPosition = /* @__PURE__ */ __name(function(name, pos, index, bbox, rotateCommitLabel) {
1147
+ branchPos.set(name, { pos, index });
1148
+ pos += 50 + (rotateCommitLabel ? 40 : 0) + (dir === "TB" || dir === "BT" ? bbox.width / 2 : 0);
1149
+ return pos;
1150
+ }, "setBranchPosition");
1151
+ var draw = /* @__PURE__ */ __name(function(txt, id, ver, diagObj) {
1152
+ clear3();
1153
+ log.debug("in gitgraph renderer", txt + "\n", "id:", id, ver);
1154
+ const db2 = diagObj.db;
1155
+ if (!db2.getConfig) {
1156
+ log.error("getConfig method is not available on db");
1157
+ return;
1158
+ }
1159
+ const gitGraphConfig = db2.getConfig();
1160
+ const rotateCommitLabel = gitGraphConfig.rotateCommitLabel ?? false;
1161
+ allCommitsDict = db2.getCommits();
1162
+ const branches = db2.getBranchesAsObjArray();
1163
+ dir = db2.getDirection();
1164
+ const diagram2 = select(`[id="${id}"]`);
1165
+ const { look, theme, themeVariables } = getConfig2();
1166
+ const { useGradient, gradientStart, gradientStop, filterColor } = themeVariables;
1167
+ if (useGradient) {
1168
+ const gradient = diagram2.append("defs").append("linearGradient").attr("id", id + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
1169
+ gradient.append("stop").attr("offset", "0%").attr("stop-color", gradientStart).attr("stop-opacity", 1);
1170
+ gradient.append("stop").attr("offset", "100%").attr("stop-color", gradientStop).attr("stop-opacity", 1);
1171
+ }
1172
+ if (look === "neo" && REDUX_GEOMETRY_THEMES.has(theme ?? "")) {
1173
+ diagram2.append("defs").append("filter").attr("id", id + "-drop-shadow").attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", "0.06").attr("flood-color", filterColor);
1174
+ }
1175
+ let pos = 0;
1176
+ branches.forEach((branch2, index) => {
1177
+ const labelElement = drawText(branch2.name);
1178
+ const g = diagram2.append("g");
1179
+ const branchLabel = g.insert("g").attr("class", "branchLabel");
1180
+ const label = branchLabel.insert("g").attr("class", "label branch-label");
1181
+ label.node()?.appendChild(labelElement);
1182
+ const bbox = labelElement.getBBox();
1183
+ pos = setBranchPosition(branch2.name, pos, index, bbox, rotateCommitLabel);
1184
+ label.remove();
1185
+ branchLabel.remove();
1186
+ g.remove();
1187
+ });
1188
+ drawCommits(diagram2, allCommitsDict, false, gitGraphConfig);
1189
+ if (gitGraphConfig.showBranches) {
1190
+ drawBranches(diagram2, branches, gitGraphConfig, id);
1191
+ }
1192
+ drawArrows(diagram2, allCommitsDict);
1193
+ drawCommits(diagram2, allCommitsDict, true, gitGraphConfig);
1194
+ utils_default.insertTitle(
1195
+ diagram2,
1196
+ "gitTitleText",
1197
+ gitGraphConfig.titleTopMargin ?? 0,
1198
+ db2.getDiagramTitle()
1199
+ );
1200
+ setupGraphViewbox2(void 0, diagram2, gitGraphConfig.diagramPadding, gitGraphConfig.useMaxWidth);
1201
+ }, "draw");
1202
+ var gitGraphRenderer_default = {
1203
+ draw
1204
+ };
1205
+ var GIT_NAMED_COLOR_COUNT = 8;
1206
+ var REDUX_GEOMETRY_THEMES2 = /* @__PURE__ */ new Set(["redux", "redux-dark", "redux-color", "redux-dark-color"]);
1207
+ var COLOR_THEMES2 = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]);
1208
+ var NEO_THEMES = /* @__PURE__ */ new Set(["neo", "neo-dark"]);
1209
+ var DARK_THEMES2 = /* @__PURE__ */ new Set(["dark", "redux-dark", "redux-dark-color", "neo-dark"]);
1210
+ var NEO_COLOR_GEN_THEMES = /* @__PURE__ */ new Set([
1211
+ "redux",
1212
+ "redux-dark",
1213
+ "redux-color",
1214
+ "redux-dark-color",
1215
+ "neo",
1216
+ "neo-dark"
1217
+ ]);
1218
+ var genGitGraphGradient = /* @__PURE__ */ __name((options) => {
1219
+ const { svgId } = options;
1220
+ let sections = "";
1221
+ if (options.useGradient && svgId) {
1222
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1223
+ sections += `
1224
+ .label${i} { fill: ${options.mainBkg}; stroke: url(${svgId}-gradient); stroke-width: ${options.strokeWidth};}
1225
+ `;
1226
+ }
1227
+ }
1228
+ return sections;
1229
+ }, "genGitGraphGradient");
1230
+ var genColor = /* @__PURE__ */ __name((options) => {
1231
+ const config = getConfig();
1232
+ const { theme, themeVariables } = config;
1233
+ const { borderColorArray } = themeVariables;
1234
+ const useReduxGeometry = REDUX_GEOMETRY_THEMES2.has(theme);
1235
+ if (NEO_THEMES.has(theme)) {
1236
+ let sections = "";
1237
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1238
+ if (i === 0) {
1239
+ sections += `
1240
+ .branch-label${i} { fill: ${options.nodeBorder};}
1241
+ .commit${i} { stroke: ${options.nodeBorder}; }
1242
+ .commit-highlight${i} { stroke: ${options.nodeBorder}; fill: ${options.nodeBorder}; }
1243
+ .arrow${i} { stroke: ${options.nodeBorder}; }
1244
+ .commit-bullets { fill: ${options.nodeBorder}; }
1245
+ .commit-cherry-pick${i} { stroke: ${options.nodeBorder}; }
1246
+ ${genGitGraphGradient(options)}`;
1247
+ } else {
1248
+ const ci = i % GIT_NAMED_COLOR_COUNT;
1249
+ sections += `
1250
+ .branch-label${i} { fill: ${options["gitBranchLabel" + ci]}; }
1251
+ .commit${i} { stroke: ${options["git" + ci]}; fill: ${options["git" + ci]}; }
1252
+ .commit-highlight${i} { stroke: ${options["gitInv" + ci]}; fill: ${options["gitInv" + ci]}; }
1253
+ .arrow${i} { stroke: ${options["git" + ci]}; }
1254
+ `;
1255
+ }
1256
+ }
1257
+ return sections;
1258
+ } else if (!COLOR_THEMES2.has(theme)) {
1259
+ let sections = "";
1260
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1261
+ sections += `
1262
+ .branch-label${i} { fill: ${options.nodeBorder}; ${useReduxGeometry ? `font-weight:${options.noteFontWeight}` : ""} }
1263
+ .commit${i} { stroke: ${options.nodeBorder}; }
1264
+ .commit-highlight${i} { stroke: ${options.nodeBorder}; fill: ${options.nodeBorder}; }
1265
+ .label${i} { fill: ${options.mainBkg}; stroke: ${options.nodeBorder}; stroke-width: ${options.strokeWidth}; ${useReduxGeometry ? `font-weight:${options.noteFontWeight}` : ""}}
1266
+ .arrow${i} { stroke: ${options.nodeBorder}; }
1267
+ .commit-bullets { fill: ${options.nodeBorder}; }
1268
+ .commit-cherry-pick${i} { stroke: ${options.nodeBorder}; }
1269
+ `;
1270
+ }
1271
+ return sections;
1272
+ } else {
1273
+ let sections = "";
1274
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1275
+ if (i === 0) {
1276
+ sections += `
1277
+ .branch-label${i} { fill: ${options.nodeBorder}; ${useReduxGeometry ? `font-weight:${options.noteFontWeight}` : ""} }
1278
+ .commit${i} { stroke: ${options.nodeBorder}; }
1279
+ .commit-highlight${i} { stroke: ${options.nodeBorder}; fill: ${options.mainBkg}; }
1280
+ .label${i} { fill: ${options.mainBkg}; stroke: ${options.nodeBorder}; stroke-width: ${options.strokeWidth}; ${useReduxGeometry ? `font-weight:${options.noteFontWeight}` : ""} }
1281
+ .arrow${i} { stroke: ${options.nodeBorder}; }
1282
+ .commit-bullets { fill: ${options.nodeBorder}; }
1283
+ `;
1284
+ } else {
1285
+ const colorIndex = i % borderColorArray.length;
1286
+ sections += `
1287
+ .branch-label${i} { fill: ${options.nodeBorder}; ${useReduxGeometry ? `font-weight:${options.noteFontWeight}` : ""} }
1288
+ .commit${i} { stroke: ${borderColorArray[colorIndex]}; fill: ${borderColorArray[colorIndex]}; }
1289
+ .commit-highlight${i} { stroke: ${borderColorArray[colorIndex]}; fill: ${borderColorArray[colorIndex]}; }
1290
+ .label${i} { fill: ${DARK_THEMES2.has(theme) ? options.mainBkg : borderColorArray[colorIndex]}; stroke: ${borderColorArray[colorIndex]}; stroke-width: ${options.strokeWidth}; }
1291
+ .arrow${i} { stroke: ${borderColorArray[colorIndex]}; }
1292
+ `;
1293
+ }
1294
+ }
1295
+ return sections;
1296
+ }
1297
+ }, "genColor");
1298
+ var normalTheme = /* @__PURE__ */ __name((options) => {
1299
+ return `${Array.from({ length: options.THEME_COLOR_LIMIT }, (_, i) => i).map((i) => {
1300
+ const ci = i % GIT_NAMED_COLOR_COUNT;
1301
+ return `
1302
+ .branch-label${i} { fill: ${options["gitBranchLabel" + ci]}; }
1303
+ .commit${i} { stroke: ${options["git" + ci]}; fill: ${options["git" + ci]}; }
1304
+ .commit-highlight${i} { stroke: ${options["gitInv" + ci]}; fill: ${options["gitInv" + ci]}; }
1305
+ .label${i} { fill: ${options["git" + ci]}; }
1306
+ .arrow${i} { stroke: ${options["git" + ci]}; }
1307
+ `;
1308
+ }).join("\n")}`;
1309
+ }, "normalTheme");
1310
+ var getStyles = /* @__PURE__ */ __name((options) => {
1311
+ const config = getConfig();
1312
+ const { theme } = config;
1313
+ const useNeoColorGen = NEO_COLOR_GEN_THEMES.has(theme);
1314
+ return `
1315
+ .commit-id,
1316
+ .commit-msg,
1317
+ .branch-label {
1318
+ fill: lightgrey;
1319
+ color: lightgrey;
1320
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
1321
+ font-family: var(--mermaid-font-family);
1322
+ }
1323
+
1324
+ ${useNeoColorGen ? genColor(options) : normalTheme(options)}
1325
+
1326
+ .branch {
1327
+ stroke-width: ${options.strokeWidth};
1328
+ stroke: ${options.commitLineColor ?? options.lineColor};
1329
+ stroke-dasharray: ${useNeoColorGen ? "4 2" : "2"};
1330
+ }
1331
+ .commit-label { font-size: ${options.commitLabelFontSize}; fill: ${useNeoColorGen ? options.nodeBorder : options.commitLabelColor}; ${useNeoColorGen ? `font-weight:${options.noteFontWeight};` : ""}}
1332
+ .commit-label-bkg { font-size: ${options.commitLabelFontSize}; fill: ${useNeoColorGen ? "transparent" : options.commitLabelBackground}; opacity: ${useNeoColorGen ? "" : 0.5}; }
1333
+ .tag-label { font-size: ${options.tagLabelFontSize}; fill: ${options.tagLabelColor};}
1334
+ .tag-label-bkg { fill: ${useNeoColorGen ? options.mainBkg : options.tagLabelBackground}; stroke: ${useNeoColorGen ? options.nodeBorder : options.tagLabelBorder}; ${useNeoColorGen ? `filter:${options.dropShadow}` : ""} }
1335
+ .tag-hole { fill: ${options.textColor}; }
1336
+
1337
+ .commit-merge {
1338
+ stroke: ${useNeoColorGen ? options.mainBkg : options.primaryColor};
1339
+ fill: ${useNeoColorGen ? options.mainBkg : options.primaryColor};
1340
+ }
1341
+ .commit-reverse {
1342
+ stroke: ${useNeoColorGen ? options.mainBkg : options.primaryColor};
1343
+ fill: ${useNeoColorGen ? options.mainBkg : options.primaryColor};
1344
+ stroke-width: ${useNeoColorGen ? options.strokeWidth : 3};
1345
+ }
1346
+ .commit-highlight-outer {
1347
+ }
1348
+ .commit-highlight-inner {
1349
+ stroke: ${useNeoColorGen ? options.mainBkg : options.primaryColor};
1350
+ fill: ${useNeoColorGen ? options.mainBkg : options.primaryColor};
1351
+ }
1352
+
1353
+ .arrow {
1354
+ /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
1355
+ stroke-width: ${REDUX_GEOMETRY_THEMES2.has(theme) ? options.strokeWidth : 8};
1356
+ stroke-linecap: round;
1357
+ fill: none
1358
+ }
1359
+ .gitTitleText {
1360
+ text-anchor: middle;
1361
+ font-size: 18px;
1362
+ fill: ${options.textColor};
1363
+ }
1364
+ `;
1365
+ }, "getStyles");
1366
+ var styles_default = getStyles;
1367
+ var diagram = {
1368
+ parser,
1369
+ db,
1370
+ renderer: gitGraphRenderer_default,
1371
+ styles: styles_default
1372
+ };
1373
+ export {
1374
+ diagram
1375
+ };