@self-review/serve 1.45.0 → 2.0.3

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 (601) hide show
  1. package/README.md +84 -17
  2. package/dist/cli.js +209 -196
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/assets/abnfDiagram-VCTEODGH-CRvWpEsk.js +1 -0
  5. package/dist/client/assets/{arc-LxCcHggQ.js → arc-PsXBAWZS.js} +1 -1
  6. package/dist/client/assets/architectureDiagram-5GKGNRK7-C3DgmaC3.js +36 -0
  7. package/dist/client/assets/blockDiagram-I7D4REHJ-BUrTsHao.js +129 -0
  8. package/dist/client/assets/c4Diagram-7LVT6UL2-CpZNs6lz.js +38 -0
  9. package/dist/client/assets/channel-mzvzhynH.js +1 -0
  10. package/dist/client/assets/{chunk-QZHKN3VN-GT04-vw7.js → chunk-2Q5K7J3B-BcKcR0LE.js} +1 -1
  11. package/dist/client/assets/{chunk-FMBD7UC4-tB9OepVI.js → chunk-5VM5RSS4-C7oHjssV.js} +1 -1
  12. package/dist/client/assets/chunk-F27PBJKO-BlPczT9-.js +1 -0
  13. package/dist/client/assets/chunk-IMKFNOWR-JWhBhxWO.js +231 -0
  14. package/dist/client/assets/{chunk-4BX2VUAB-D2GfUqwd.js → chunk-JWPE2WC7-BHqPUvha.js} +1 -1
  15. package/dist/client/assets/chunk-POPQ4Y6H-F7oDRNF5.js +1 -0
  16. package/dist/client/assets/chunk-SVP7TREG-BXZpN96Q.js +88 -0
  17. package/dist/client/assets/chunk-TICWLB2K-DNvFXi10.js +206 -0
  18. package/dist/client/assets/{chunk-55IACEB6-C68L7s0h.js → chunk-XXDRQBXY-DOvXkBHK.js} +1 -1
  19. package/dist/client/assets/classDiagram-ZZMXUADV-BAE1ijM-.js +1 -0
  20. package/dist/client/assets/classDiagram-v2-VYDZK3BY-BAE1ijM-.js +1 -0
  21. package/dist/client/assets/{cose-bilkent-S5V4N54A-Ds41oEbD.js → cose-bilkent-JH36ORCC-DPJK_EQL.js} +1 -1
  22. package/dist/client/assets/cynefin-OW5HDTMX-JBAmnTQp.js +166 -0
  23. package/dist/client/assets/cynefinDiagram-5FMLGOSQ-CsYygsrr.js +62 -0
  24. package/dist/client/assets/cytoscape.esm-BB4DxJjf.js +321 -0
  25. package/dist/client/assets/dagre-GXQ25YYZ-Dbz4M33p.js +4 -0
  26. package/dist/client/assets/diagram-S7CK7UJ4-Biv-Q_jb.js +30 -0
  27. package/dist/client/assets/diagram-UQ7AKVKN-JRvoicym.js +41 -0
  28. package/dist/client/assets/diagram-VSXAHHWV-VAXOLPk0.js +3 -0
  29. package/dist/client/assets/diagram-VX7I27RA-DRmE-ol9.js +24 -0
  30. package/dist/client/assets/diagram-Z3DM3KII-CavqQl_8.js +24 -0
  31. package/dist/client/assets/ebnfDiagram-PWID7BFC-70cdWXxf.js +1 -0
  32. package/dist/client/assets/erDiagram-RLTQ6QDP-Ha04LW0x.js +99 -0
  33. package/dist/client/assets/flowDiagram-HODETNUW-BRLi1S7q.js +168 -0
  34. package/dist/client/assets/ganttDiagram-EL5Y4UJY-BfBVCQ3A.js +292 -0
  35. package/dist/client/assets/gitGraphDiagram-WWUBYQGX-D-GiQOxC.js +106 -0
  36. package/dist/client/assets/index-hcoT-WH0.css +1 -0
  37. package/dist/client/assets/index-vUb9LsiF.js +285 -0
  38. package/dist/client/assets/infoDiagram-27XIBGKW-KEMBoX9p.js +2 -0
  39. package/dist/client/assets/ishikawaDiagram-5VMMS53U-CBS0T3w-.js +70 -0
  40. package/dist/client/assets/journeyDiagram-3NMN7TZE-AN4puIAJ.js +139 -0
  41. package/dist/client/assets/{kanban-definition-3W4ZIXB7-D-BINTOt.js → kanban-definition-UXKFOSKX-BWQivApD.js} +8 -8
  42. package/dist/client/assets/katex-HP8lGamR.js +257 -0
  43. package/dist/client/assets/layout-B7etliRi.js +1 -0
  44. package/dist/client/assets/{linear-CNmY37sq.js → linear-DYVJ9r-o.js} +1 -1
  45. package/dist/client/assets/mermaid.core-B9m3791z.js +310 -0
  46. package/dist/client/assets/mindmap-definition-YA3MSWOX-BwhaRhOg.js +96 -0
  47. package/dist/client/assets/pegDiagram-XKGWAZYB-B6zVpKjE.js +1 -0
  48. package/dist/client/assets/pieDiagram-E7YTZNPT-DGmD4H1L.js +39 -0
  49. package/dist/client/assets/quadrantDiagram-AXDQQJYC-CrKpGbBm.js +7 -0
  50. package/dist/client/assets/railroadDiagram-O6MQD6OU-DLcnTQsv.js +1 -0
  51. package/dist/client/assets/requirementDiagram-BXWQKSXE-bqG-UOfq.js +84 -0
  52. package/dist/client/assets/sankeyDiagram-P5KCCOFB-DGRQqw-s.js +40 -0
  53. package/dist/client/assets/sequenceDiagram-WJ2MYXX4-CW-ivDp5.js +162 -0
  54. package/dist/client/assets/sizeCapture-INFHLROL-BbHjPnUF.js +1 -0
  55. package/dist/client/assets/stateDiagram-D77RDMKH-BproWKBe.js +1 -0
  56. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Ck8yo6ic.js +1 -0
  57. package/dist/client/assets/swimlanes-42K2YHIH-OG2jZQn8.js +1 -0
  58. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-CgYw65ZN.js +8 -0
  59. package/dist/client/assets/timeline-definition-24CTP7MA-DQeIsWHU.js +120 -0
  60. package/dist/client/assets/vennDiagram-4TSXK5OY-CzLpoCxP.js +34 -0
  61. package/dist/client/assets/wardleyDiagram-VM6X3IG4-Bga8iF2e.js +78 -0
  62. package/dist/client/assets/xychartDiagram-S5SC5T6Z-BMPq9UWm.js +7 -0
  63. package/dist/client/index.html +2 -2
  64. package/package.json +3 -3
  65. package/dist/client/assets/_basePickBy-DzL66huQ.js +0 -1
  66. package/dist/client/assets/_baseUniq-D_kA9hnK.js +0 -1
  67. package/dist/client/assets/architectureDiagram-VXUJARFQ-BmSW2FCh.js +0 -36
  68. package/dist/client/assets/blockDiagram-VD42YOAC-Duz6oS5b.js +0 -122
  69. package/dist/client/assets/c4Diagram-YG6GDRKO-Bv4P72yB.js +0 -10
  70. package/dist/client/assets/channel-ydExFSqY.js +0 -1
  71. package/dist/client/assets/chunk-B4BG7PRW-BtVwfswM.js +0 -165
  72. package/dist/client/assets/chunk-DI55MBZ5-BDdO91wt.js +0 -220
  73. package/dist/client/assets/chunk-QN33PNHL-HjKgp1PB.js +0 -1
  74. package/dist/client/assets/chunk-TZMSLE5B-DpxXSXMp.js +0 -1
  75. package/dist/client/assets/classDiagram-2ON5EDUG-Dg8dmmRD.js +0 -1
  76. package/dist/client/assets/classDiagram-v2-WZHVMYZB-Dg8dmmRD.js +0 -1
  77. package/dist/client/assets/clone-Bq6xpRgi.js +0 -1
  78. package/dist/client/assets/cytoscape.esm-5J0xJHOV.js +0 -321
  79. package/dist/client/assets/dagre-6UL2VRFP-DZiEousR.js +0 -4
  80. package/dist/client/assets/diagram-PSM6KHXK-0_alnUMs.js +0 -24
  81. package/dist/client/assets/diagram-QEK2KX5R-KFaKVdU8.js +0 -43
  82. package/dist/client/assets/diagram-S2PKOQOG-C2Dy10VG.js +0 -24
  83. package/dist/client/assets/erDiagram-Q2GNP2WA-_P7rrcgu.js +0 -60
  84. package/dist/client/assets/flowDiagram-NV44I4VS-BvC6gSn5.js +0 -162
  85. package/dist/client/assets/ganttDiagram-JELNMOA3-DjzuVPeB.js +0 -267
  86. package/dist/client/assets/gitGraphDiagram-V2S2FVAM-B9fPDqqA.js +0 -65
  87. package/dist/client/assets/graph-BqLQdgDA.js +0 -1
  88. package/dist/client/assets/index-CAXQd1OO.js +0 -286
  89. package/dist/client/assets/index-CmSvc3Wo.css +0 -1
  90. package/dist/client/assets/infoDiagram-HS3SLOUP-DiMCwlkY.js +0 -2
  91. package/dist/client/assets/journeyDiagram-XKPGCS4Q-Dn5WdzPP.js +0 -139
  92. package/dist/client/assets/katex-DhXJpUyf.js +0 -261
  93. package/dist/client/assets/layout-Bo5pDIcD.js +0 -1
  94. package/dist/client/assets/mermaid.core-DfADLZQ1.js +0 -250
  95. package/dist/client/assets/mindmap-definition-VGOIOE7T-H5HwEwuX.js +0 -68
  96. package/dist/client/assets/pieDiagram-ADFJNKIX-RiZa5XQN.js +0 -30
  97. package/dist/client/assets/quadrantDiagram-AYHSOK5B-CFFX55h2.js +0 -7
  98. package/dist/client/assets/requirementDiagram-UZGBJVZJ-B6JBcV1I.js +0 -64
  99. package/dist/client/assets/sankeyDiagram-TZEHDZUN-GZT80dnc.js +0 -10
  100. package/dist/client/assets/sequenceDiagram-WL72ISMW-CbUqoUma.js +0 -145
  101. package/dist/client/assets/stateDiagram-FKZM4ZOC-LEb-ZQVV.js +0 -1
  102. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-BYGHA8iw.js +0 -1
  103. package/dist/client/assets/timeline-definition-IT6M3QCI-Cm1Kd50N.js +0 -61
  104. package/dist/client/assets/treemap-GDKQZRPO-CWXk-dEb.js +0 -160
  105. package/dist/client/assets/xychartDiagram-PRI3JC2R-BUllxp6G.js +0 -7
  106. package/dist/core/src/apply-suggestion.d.ts +0 -76
  107. package/dist/core/src/apply-suggestion.d.ts.map +0 -1
  108. package/dist/core/src/apply-suggestion.js +0 -109
  109. package/dist/core/src/apply-suggestion.js.map +0 -1
  110. package/dist/core/src/config.d.ts +0 -3
  111. package/dist/core/src/config.d.ts.map +0 -1
  112. package/dist/core/src/config.js +0 -196
  113. package/dist/core/src/config.js.map +0 -1
  114. package/dist/core/src/diff-parser.d.ts +0 -3
  115. package/dist/core/src/diff-parser.d.ts.map +0 -1
  116. package/dist/core/src/diff-parser.js +0 -236
  117. package/dist/core/src/diff-parser.js.map +0 -1
  118. package/dist/core/src/directory-scanner.d.ts +0 -18
  119. package/dist/core/src/directory-scanner.d.ts.map +0 -1
  120. package/dist/core/src/directory-scanner.js +0 -99
  121. package/dist/core/src/directory-scanner.js.map +0 -1
  122. package/dist/core/src/fetch-comments.d.ts +0 -69
  123. package/dist/core/src/fetch-comments.d.ts.map +0 -1
  124. package/dist/core/src/fetch-comments.js +0 -180
  125. package/dist/core/src/fetch-comments.js.map +0 -1
  126. package/dist/core/src/file-type-utils.d.ts +0 -16
  127. package/dist/core/src/file-type-utils.d.ts.map +0 -1
  128. package/dist/core/src/file-type-utils.js +0 -106
  129. package/dist/core/src/file-type-utils.js.map +0 -1
  130. package/dist/core/src/forge-provider.d.ts +0 -123
  131. package/dist/core/src/forge-provider.d.ts.map +0 -1
  132. package/dist/core/src/forge-provider.js +0 -68
  133. package/dist/core/src/forge-provider.js.map +0 -1
  134. package/dist/core/src/fs-utils.d.ts +0 -7
  135. package/dist/core/src/fs-utils.d.ts.map +0 -1
  136. package/dist/core/src/fs-utils.js +0 -20
  137. package/dist/core/src/fs-utils.js.map +0 -1
  138. package/dist/core/src/git-diff-args.d.ts +0 -38
  139. package/dist/core/src/git-diff-args.d.ts.map +0 -1
  140. package/dist/core/src/git-diff-args.js +0 -170
  141. package/dist/core/src/git-diff-args.js.map +0 -1
  142. package/dist/core/src/git-diff-loader.d.ts +0 -14
  143. package/dist/core/src/git-diff-loader.d.ts.map +0 -1
  144. package/dist/core/src/git-diff-loader.js +0 -30
  145. package/dist/core/src/git-diff-loader.js.map +0 -1
  146. package/dist/core/src/git.d.ts +0 -52
  147. package/dist/core/src/git.d.ts.map +0 -1
  148. package/dist/core/src/git.js +0 -191
  149. package/dist/core/src/git.js.map +0 -1
  150. package/dist/core/src/github-provider.d.ts +0 -7
  151. package/dist/core/src/github-provider.d.ts.map +0 -1
  152. package/dist/core/src/github-provider.js +0 -151
  153. package/dist/core/src/github-provider.js.map +0 -1
  154. package/dist/core/src/gitlab-provider.d.ts +0 -10
  155. package/dist/core/src/gitlab-provider.d.ts.map +0 -1
  156. package/dist/core/src/gitlab-provider.js +0 -207
  157. package/dist/core/src/gitlab-provider.js.map +0 -1
  158. package/dist/core/src/guide-loader.d.ts +0 -23
  159. package/dist/core/src/guide-loader.d.ts.map +0 -1
  160. package/dist/core/src/guide-loader.js +0 -95
  161. package/dist/core/src/guide-loader.js.map +0 -1
  162. package/dist/core/src/guide-parser.d.ts +0 -34
  163. package/dist/core/src/guide-parser.d.ts.map +0 -1
  164. package/dist/core/src/guide-parser.js +0 -136
  165. package/dist/core/src/guide-parser.js.map +0 -1
  166. package/dist/core/src/guide-schema.d.ts +0 -2
  167. package/dist/core/src/guide-schema.d.ts.map +0 -1
  168. package/dist/core/src/guide-schema.js +0 -202
  169. package/dist/core/src/guide-schema.js.map +0 -1
  170. package/dist/core/src/ignore-filter.d.ts +0 -8
  171. package/dist/core/src/ignore-filter.d.ts.map +0 -1
  172. package/dist/core/src/ignore-filter.js +0 -16
  173. package/dist/core/src/ignore-filter.js.map +0 -1
  174. package/dist/core/src/index.d.ts +0 -38
  175. package/dist/core/src/index.d.ts.map +0 -1
  176. package/dist/core/src/index.js +0 -54
  177. package/dist/core/src/index.js.map +0 -1
  178. package/dist/core/src/materializer.d.ts +0 -60
  179. package/dist/core/src/materializer.d.ts.map +0 -1
  180. package/dist/core/src/materializer.js +0 -255
  181. package/dist/core/src/materializer.js.map +0 -1
  182. package/dist/core/src/payload-sizing.d.ts +0 -20
  183. package/dist/core/src/payload-sizing.d.ts.map +0 -1
  184. package/dist/core/src/payload-sizing.js +0 -74
  185. package/dist/core/src/payload-sizing.js.map +0 -1
  186. package/dist/core/src/remote-mode.d.ts +0 -89
  187. package/dist/core/src/remote-mode.d.ts.map +0 -1
  188. package/dist/core/src/remote-mode.js +0 -193
  189. package/dist/core/src/remote-mode.js.map +0 -1
  190. package/dist/core/src/review-handlers.d.ts +0 -160
  191. package/dist/core/src/review-handlers.d.ts.map +0 -1
  192. package/dist/core/src/review-handlers.js +0 -463
  193. package/dist/core/src/review-handlers.js.map +0 -1
  194. package/dist/core/src/staged-untracked.d.ts +0 -12
  195. package/dist/core/src/staged-untracked.d.ts.map +0 -1
  196. package/dist/core/src/staged-untracked.js +0 -21
  197. package/dist/core/src/staged-untracked.js.map +0 -1
  198. package/dist/core/src/startup-mode.d.ts +0 -6
  199. package/dist/core/src/startup-mode.d.ts.map +0 -1
  200. package/dist/core/src/startup-mode.js +0 -73
  201. package/dist/core/src/startup-mode.js.map +0 -1
  202. package/dist/core/src/synthetic-diff.d.ts +0 -21
  203. package/dist/core/src/synthetic-diff.d.ts.map +0 -1
  204. package/dist/core/src/synthetic-diff.js +0 -104
  205. package/dist/core/src/synthetic-diff.js.map +0 -1
  206. package/dist/core/src/thread-mapper.d.ts +0 -39
  207. package/dist/core/src/thread-mapper.d.ts.map +0 -1
  208. package/dist/core/src/thread-mapper.js +0 -217
  209. package/dist/core/src/thread-mapper.js.map +0 -1
  210. package/dist/core/src/types.d.ts +0 -2
  211. package/dist/core/src/types.d.ts.map +0 -1
  212. package/dist/core/src/types.js +0 -2
  213. package/dist/core/src/types.js.map +0 -1
  214. package/dist/core/src/xml-parser.d.ts +0 -15
  215. package/dist/core/src/xml-parser.d.ts.map +0 -1
  216. package/dist/core/src/xml-parser.js +0 -237
  217. package/dist/core/src/xml-parser.js.map +0 -1
  218. package/dist/core/src/xml-serializer.d.ts +0 -4
  219. package/dist/core/src/xml-serializer.d.ts.map +0 -1
  220. package/dist/core/src/xml-serializer.js +0 -923
  221. package/dist/core/src/xml-serializer.js.map +0 -1
  222. package/dist/react/src/ReviewPanel.d.ts +0 -72
  223. package/dist/react/src/ReviewPanel.d.ts.map +0 -1
  224. package/dist/react/src/ReviewPanel.js +0 -51
  225. package/dist/react/src/ReviewPanel.js.map +0 -1
  226. package/dist/react/src/SingleFileReview.d.ts +0 -49
  227. package/dist/react/src/SingleFileReview.d.ts.map +0 -1
  228. package/dist/react/src/SingleFileReview.js +0 -41
  229. package/dist/react/src/SingleFileReview.js.map +0 -1
  230. package/dist/react/src/adapter.d.ts +0 -72
  231. package/dist/react/src/adapter.d.ts.map +0 -1
  232. package/dist/react/src/adapter.js +0 -2
  233. package/dist/react/src/adapter.js.map +0 -1
  234. package/dist/react/src/components/Comments/AttachmentDropZone.d.ts +0 -10
  235. package/dist/react/src/components/Comments/AttachmentDropZone.d.ts.map +0 -1
  236. package/dist/react/src/components/Comments/AttachmentDropZone.js +0 -52
  237. package/dist/react/src/components/Comments/AttachmentDropZone.js.map +0 -1
  238. package/dist/react/src/components/Comments/AttachmentImage.d.ts +0 -6
  239. package/dist/react/src/components/Comments/AttachmentImage.d.ts.map +0 -1
  240. package/dist/react/src/components/Comments/AttachmentImage.js +0 -50
  241. package/dist/react/src/components/Comments/AttachmentImage.js.map +0 -1
  242. package/dist/react/src/components/Comments/AttachmentThumbnail.d.ts +0 -6
  243. package/dist/react/src/components/Comments/AttachmentThumbnail.d.ts.map +0 -1
  244. package/dist/react/src/components/Comments/AttachmentThumbnail.js +0 -16
  245. package/dist/react/src/components/Comments/AttachmentThumbnail.js.map +0 -1
  246. package/dist/react/src/components/Comments/CategorySelector.d.ts +0 -6
  247. package/dist/react/src/components/Comments/CategorySelector.d.ts.map +0 -1
  248. package/dist/react/src/components/Comments/CategorySelector.js +0 -27
  249. package/dist/react/src/components/Comments/CategorySelector.js.map +0 -1
  250. package/dist/react/src/components/Comments/CommentDisplay.d.ts +0 -7
  251. package/dist/react/src/components/Comments/CommentDisplay.d.ts.map +0 -1
  252. package/dist/react/src/components/Comments/CommentDisplay.js +0 -103
  253. package/dist/react/src/components/Comments/CommentDisplay.js.map +0 -1
  254. package/dist/react/src/components/Comments/CommentInput.d.ts +0 -11
  255. package/dist/react/src/components/Comments/CommentInput.d.ts.map +0 -1
  256. package/dist/react/src/components/Comments/CommentInput.js +0 -81
  257. package/dist/react/src/components/Comments/CommentInput.js.map +0 -1
  258. package/dist/react/src/components/Comments/ComposerCore.d.ts +0 -49
  259. package/dist/react/src/components/Comments/ComposerCore.d.ts.map +0 -1
  260. package/dist/react/src/components/Comments/ComposerCore.js +0 -91
  261. package/dist/react/src/components/Comments/ComposerCore.js.map +0 -1
  262. package/dist/react/src/components/Comments/EmojiAutocomplete.d.ts +0 -14
  263. package/dist/react/src/components/Comments/EmojiAutocomplete.d.ts.map +0 -1
  264. package/dist/react/src/components/Comments/EmojiAutocomplete.js +0 -19
  265. package/dist/react/src/components/Comments/EmojiAutocomplete.js.map +0 -1
  266. package/dist/react/src/components/Comments/ReplyDisplay.d.ts +0 -22
  267. package/dist/react/src/components/Comments/ReplyDisplay.d.ts.map +0 -1
  268. package/dist/react/src/components/Comments/ReplyDisplay.js +0 -38
  269. package/dist/react/src/components/Comments/ReplyDisplay.js.map +0 -1
  270. package/dist/react/src/components/Comments/ReplyInput.d.ts +0 -9
  271. package/dist/react/src/components/Comments/ReplyInput.d.ts.map +0 -1
  272. package/dist/react/src/components/Comments/ReplyInput.js +0 -47
  273. package/dist/react/src/components/Comments/ReplyInput.js.map +0 -1
  274. package/dist/react/src/components/Comments/SuggestionApplyControl.d.ts +0 -27
  275. package/dist/react/src/components/Comments/SuggestionApplyControl.d.ts.map +0 -1
  276. package/dist/react/src/components/Comments/SuggestionApplyControl.js +0 -103
  277. package/dist/react/src/components/Comments/SuggestionApplyControl.js.map +0 -1
  278. package/dist/react/src/components/Comments/SuggestionBlock.d.ts +0 -26
  279. package/dist/react/src/components/Comments/SuggestionBlock.d.ts.map +0 -1
  280. package/dist/react/src/components/Comments/SuggestionBlock.js +0 -33
  281. package/dist/react/src/components/Comments/SuggestionBlock.js.map +0 -1
  282. package/dist/react/src/components/Comments/SuggestionPanel.d.ts +0 -8
  283. package/dist/react/src/components/Comments/SuggestionPanel.d.ts.map +0 -1
  284. package/dist/react/src/components/Comments/SuggestionPanel.js +0 -12
  285. package/dist/react/src/components/Comments/SuggestionPanel.js.map +0 -1
  286. package/dist/react/src/components/DiffViewer/DiffContentArea.d.ts +0 -35
  287. package/dist/react/src/components/DiffViewer/DiffContentArea.d.ts.map +0 -1
  288. package/dist/react/src/components/DiffViewer/DiffContentArea.js +0 -40
  289. package/dist/react/src/components/DiffViewer/DiffContentArea.js.map +0 -1
  290. package/dist/react/src/components/DiffViewer/DiffViewer.d.ts +0 -4
  291. package/dist/react/src/components/DiffViewer/DiffViewer.d.ts.map +0 -1
  292. package/dist/react/src/components/DiffViewer/DiffViewer.js +0 -110
  293. package/dist/react/src/components/DiffViewer/DiffViewer.js.map +0 -1
  294. package/dist/react/src/components/DiffViewer/EmptyDiffMessage.d.ts +0 -6
  295. package/dist/react/src/components/DiffViewer/EmptyDiffMessage.d.ts.map +0 -1
  296. package/dist/react/src/components/DiffViewer/EmptyDiffMessage.js +0 -18
  297. package/dist/react/src/components/DiffViewer/EmptyDiffMessage.js.map +0 -1
  298. package/dist/react/src/components/DiffViewer/EmptyLinePane.d.ts +0 -2
  299. package/dist/react/src/components/DiffViewer/EmptyLinePane.d.ts.map +0 -1
  300. package/dist/react/src/components/DiffViewer/EmptyLinePane.js +0 -5
  301. package/dist/react/src/components/DiffViewer/EmptyLinePane.js.map +0 -1
  302. package/dist/react/src/components/DiffViewer/ExpandContextBar.d.ts +0 -10
  303. package/dist/react/src/components/DiffViewer/ExpandContextBar.d.ts.map +0 -1
  304. package/dist/react/src/components/DiffViewer/ExpandContextBar.js +0 -16
  305. package/dist/react/src/components/DiffViewer/ExpandContextBar.js.map +0 -1
  306. package/dist/react/src/components/DiffViewer/FileSection.d.ts +0 -9
  307. package/dist/react/src/components/DiffViewer/FileSection.d.ts.map +0 -1
  308. package/dist/react/src/components/DiffViewer/FileSection.js +0 -137
  309. package/dist/react/src/components/DiffViewer/FileSection.js.map +0 -1
  310. package/dist/react/src/components/DiffViewer/FileSectionBody.d.ts +0 -13
  311. package/dist/react/src/components/DiffViewer/FileSectionBody.d.ts.map +0 -1
  312. package/dist/react/src/components/DiffViewer/FileSectionBody.js +0 -8
  313. package/dist/react/src/components/DiffViewer/FileSectionBody.js.map +0 -1
  314. package/dist/react/src/components/DiffViewer/FileSectionHeader.d.ts +0 -16
  315. package/dist/react/src/components/DiffViewer/FileSectionHeader.d.ts.map +0 -1
  316. package/dist/react/src/components/DiffViewer/FileSectionHeader.js +0 -53
  317. package/dist/react/src/components/DiffViewer/FileSectionHeader.js.map +0 -1
  318. package/dist/react/src/components/DiffViewer/FrontMatterTable.d.ts +0 -6
  319. package/dist/react/src/components/DiffViewer/FrontMatterTable.d.ts.map +0 -1
  320. package/dist/react/src/components/DiffViewer/FrontMatterTable.js +0 -30
  321. package/dist/react/src/components/DiffViewer/FrontMatterTable.js.map +0 -1
  322. package/dist/react/src/components/DiffViewer/GuideChapterDivider.d.ts +0 -20
  323. package/dist/react/src/components/DiffViewer/GuideChapterDivider.d.ts.map +0 -1
  324. package/dist/react/src/components/DiffViewer/GuideChapterDivider.js +0 -27
  325. package/dist/react/src/components/DiffViewer/GuideChapterDivider.js.map +0 -1
  326. package/dist/react/src/components/DiffViewer/GuideOverviewContent.d.ts +0 -16
  327. package/dist/react/src/components/DiffViewer/GuideOverviewContent.d.ts.map +0 -1
  328. package/dist/react/src/components/DiffViewer/GuideOverviewContent.js +0 -56
  329. package/dist/react/src/components/DiffViewer/GuideOverviewContent.js.map +0 -1
  330. package/dist/react/src/components/DiffViewer/GuideOverviewDialog.d.ts +0 -12
  331. package/dist/react/src/components/DiffViewer/GuideOverviewDialog.d.ts.map +0 -1
  332. package/dist/react/src/components/DiffViewer/GuideOverviewDialog.js +0 -13
  333. package/dist/react/src/components/DiffViewer/GuideOverviewDialog.js.map +0 -1
  334. package/dist/react/src/components/DiffViewer/GuideOverviewPanel.d.ts +0 -8
  335. package/dist/react/src/components/DiffViewer/GuideOverviewPanel.d.ts.map +0 -1
  336. package/dist/react/src/components/DiffViewer/GuideOverviewPanel.js +0 -16
  337. package/dist/react/src/components/DiffViewer/GuideOverviewPanel.js.map +0 -1
  338. package/dist/react/src/components/DiffViewer/HunkHeader.d.ts +0 -5
  339. package/dist/react/src/components/DiffViewer/HunkHeader.d.ts.map +0 -1
  340. package/dist/react/src/components/DiffViewer/HunkHeader.js +0 -5
  341. package/dist/react/src/components/DiffViewer/HunkHeader.js.map +0 -1
  342. package/dist/react/src/components/DiffViewer/InlineCommentSlot.d.ts +0 -18
  343. package/dist/react/src/components/DiffViewer/InlineCommentSlot.d.ts.map +0 -1
  344. package/dist/react/src/components/DiffViewer/InlineCommentSlot.js +0 -13
  345. package/dist/react/src/components/DiffViewer/InlineCommentSlot.js.map +0 -1
  346. package/dist/react/src/components/DiffViewer/MarkdownCode.d.ts +0 -9
  347. package/dist/react/src/components/DiffViewer/MarkdownCode.d.ts.map +0 -1
  348. package/dist/react/src/components/DiffViewer/MarkdownCode.js +0 -24
  349. package/dist/react/src/components/DiffViewer/MarkdownCode.js.map +0 -1
  350. package/dist/react/src/components/DiffViewer/MermaidBlock.d.ts +0 -4
  351. package/dist/react/src/components/DiffViewer/MermaidBlock.d.ts.map +0 -1
  352. package/dist/react/src/components/DiffViewer/MermaidBlock.js +0 -51
  353. package/dist/react/src/components/DiffViewer/MermaidBlock.js.map +0 -1
  354. package/dist/react/src/components/DiffViewer/RenderedImageView.d.ts +0 -8
  355. package/dist/react/src/components/DiffViewer/RenderedImageView.d.ts.map +0 -1
  356. package/dist/react/src/components/DiffViewer/RenderedImageView.js +0 -46
  357. package/dist/react/src/components/DiffViewer/RenderedImageView.js.map +0 -1
  358. package/dist/react/src/components/DiffViewer/RenderedMarkdownView.d.ts +0 -16
  359. package/dist/react/src/components/DiffViewer/RenderedMarkdownView.d.ts.map +0 -1
  360. package/dist/react/src/components/DiffViewer/RenderedMarkdownView.js +0 -324
  361. package/dist/react/src/components/DiffViewer/RenderedMarkdownView.js.map +0 -1
  362. package/dist/react/src/components/DiffViewer/RenderedSvgView.d.ts +0 -7
  363. package/dist/react/src/components/DiffViewer/RenderedSvgView.d.ts.map +0 -1
  364. package/dist/react/src/components/DiffViewer/RenderedSvgView.js +0 -21
  365. package/dist/react/src/components/DiffViewer/RenderedSvgView.js.map +0 -1
  366. package/dist/react/src/components/DiffViewer/SplitView.d.ts +0 -23
  367. package/dist/react/src/components/DiffViewer/SplitView.d.ts.map +0 -1
  368. package/dist/react/src/components/DiffViewer/SplitView.js +0 -137
  369. package/dist/react/src/components/DiffViewer/SplitView.js.map +0 -1
  370. package/dist/react/src/components/DiffViewer/SyntaxLine.d.ts +0 -49
  371. package/dist/react/src/components/DiffViewer/SyntaxLine.d.ts.map +0 -1
  372. package/dist/react/src/components/DiffViewer/SyntaxLine.js +0 -73
  373. package/dist/react/src/components/DiffViewer/SyntaxLine.js.map +0 -1
  374. package/dist/react/src/components/DiffViewer/UnifiedView.d.ts +0 -23
  375. package/dist/react/src/components/DiffViewer/UnifiedView.d.ts.map +0 -1
  376. package/dist/react/src/components/DiffViewer/UnifiedView.js +0 -96
  377. package/dist/react/src/components/DiffViewer/UnifiedView.js.map +0 -1
  378. package/dist/react/src/components/DiffViewer/diff-utils.d.ts +0 -31
  379. package/dist/react/src/components/DiffViewer/diff-utils.d.ts.map +0 -1
  380. package/dist/react/src/components/DiffViewer/diff-utils.js +0 -134
  381. package/dist/react/src/components/DiffViewer/diff-utils.js.map +0 -1
  382. package/dist/react/src/components/DiffViewer/useDragSelection.d.ts +0 -25
  383. package/dist/react/src/components/DiffViewer/useDragSelection.d.ts.map +0 -1
  384. package/dist/react/src/components/DiffViewer/useDragSelection.js +0 -210
  385. package/dist/react/src/components/DiffViewer/useDragSelection.js.map +0 -1
  386. package/dist/react/src/components/DiffViewer/useExpandContext.d.ts +0 -15
  387. package/dist/react/src/components/DiffViewer/useExpandContext.d.ts.map +0 -1
  388. package/dist/react/src/components/DiffViewer/useExpandContext.js +0 -209
  389. package/dist/react/src/components/DiffViewer/useExpandContext.js.map +0 -1
  390. package/dist/react/src/components/FileTree.d.ts +0 -2
  391. package/dist/react/src/components/FileTree.d.ts.map +0 -1
  392. package/dist/react/src/components/FileTree.js +0 -93
  393. package/dist/react/src/components/FileTree.js.map +0 -1
  394. package/dist/react/src/components/FileTreeEntry.d.ts +0 -13
  395. package/dist/react/src/components/FileTreeEntry.d.ts.map +0 -1
  396. package/dist/react/src/components/FileTreeEntry.js +0 -21
  397. package/dist/react/src/components/FileTreeEntry.js.map +0 -1
  398. package/dist/react/src/components/FileTreeToggle.d.ts +0 -15
  399. package/dist/react/src/components/FileTreeToggle.d.ts.map +0 -1
  400. package/dist/react/src/components/FileTreeToggle.js +0 -16
  401. package/dist/react/src/components/FileTreeToggle.js.map +0 -1
  402. package/dist/react/src/components/GuideRouteHud.d.ts +0 -10
  403. package/dist/react/src/components/GuideRouteHud.d.ts.map +0 -1
  404. package/dist/react/src/components/GuideRouteHud.js +0 -43
  405. package/dist/react/src/components/GuideRouteHud.js.map +0 -1
  406. package/dist/react/src/components/GuideRouteMap.d.ts +0 -20
  407. package/dist/react/src/components/GuideRouteMap.d.ts.map +0 -1
  408. package/dist/react/src/components/GuideRouteMap.js +0 -58
  409. package/dist/react/src/components/GuideRouteMap.js.map +0 -1
  410. package/dist/react/src/components/GuideStation.d.ts +0 -28
  411. package/dist/react/src/components/GuideStation.d.ts.map +0 -1
  412. package/dist/react/src/components/GuideStation.js +0 -24
  413. package/dist/react/src/components/GuideStation.js.map +0 -1
  414. package/dist/react/src/components/HintOverlay.d.ts +0 -13
  415. package/dist/react/src/components/HintOverlay.d.ts.map +0 -1
  416. package/dist/react/src/components/HintOverlay.js +0 -27
  417. package/dist/react/src/components/HintOverlay.js.map +0 -1
  418. package/dist/react/src/components/KeyboardNavigationManager.d.ts +0 -2
  419. package/dist/react/src/components/KeyboardNavigationManager.d.ts.map +0 -1
  420. package/dist/react/src/components/KeyboardNavigationManager.js +0 -8
  421. package/dist/react/src/components/KeyboardNavigationManager.js.map +0 -1
  422. package/dist/react/src/components/Layout.d.ts +0 -2
  423. package/dist/react/src/components/Layout.d.ts.map +0 -1
  424. package/dist/react/src/components/Layout.js +0 -63
  425. package/dist/react/src/components/Layout.js.map +0 -1
  426. package/dist/react/src/components/ReviewProgress.d.ts +0 -2
  427. package/dist/react/src/components/ReviewProgress.d.ts.map +0 -1
  428. package/dist/react/src/components/ReviewProgress.js +0 -25
  429. package/dist/react/src/components/ReviewProgress.js.map +0 -1
  430. package/dist/react/src/components/Toolbar.d.ts +0 -6
  431. package/dist/react/src/components/Toolbar.d.ts.map +0 -1
  432. package/dist/react/src/components/Toolbar.js +0 -61
  433. package/dist/react/src/components/Toolbar.js.map +0 -1
  434. package/dist/react/src/components/TruncatedPath.d.ts +0 -7
  435. package/dist/react/src/components/TruncatedPath.d.ts.map +0 -1
  436. package/dist/react/src/components/TruncatedPath.js +0 -15
  437. package/dist/react/src/components/TruncatedPath.js.map +0 -1
  438. package/dist/react/src/components/ui/badge.d.ts +0 -10
  439. package/dist/react/src/components/ui/badge.d.ts.map +0 -1
  440. package/dist/react/src/components/ui/badge.js +0 -21
  441. package/dist/react/src/components/ui/badge.js.map +0 -1
  442. package/dist/react/src/components/ui/button.d.ts +0 -11
  443. package/dist/react/src/components/ui/button.d.ts.map +0 -1
  444. package/dist/react/src/components/ui/button.js +0 -32
  445. package/dist/react/src/components/ui/button.js.map +0 -1
  446. package/dist/react/src/components/ui/dialog.d.ts +0 -12
  447. package/dist/react/src/components/ui/dialog.d.ts.map +0 -1
  448. package/dist/react/src/components/ui/dialog.js +0 -23
  449. package/dist/react/src/components/ui/dialog.js.map +0 -1
  450. package/dist/react/src/components/ui/input.d.ts +0 -4
  451. package/dist/react/src/components/ui/input.d.ts.map +0 -1
  452. package/dist/react/src/components/ui/input.js +0 -9
  453. package/dist/react/src/components/ui/input.js.map +0 -1
  454. package/dist/react/src/components/ui/separator.d.ts +0 -6
  455. package/dist/react/src/components/ui/separator.d.ts.map +0 -1
  456. package/dist/react/src/components/ui/separator.js +0 -8
  457. package/dist/react/src/components/ui/separator.js.map +0 -1
  458. package/dist/react/src/components/ui/table.d.ts +0 -11
  459. package/dist/react/src/components/ui/table.d.ts.map +0 -1
  460. package/dist/react/src/components/ui/table.js +0 -21
  461. package/dist/react/src/components/ui/table.js.map +0 -1
  462. package/dist/react/src/components/ui/textarea.d.ts +0 -4
  463. package/dist/react/src/components/ui/textarea.d.ts.map +0 -1
  464. package/dist/react/src/components/ui/textarea.js +0 -9
  465. package/dist/react/src/components/ui/textarea.js.map +0 -1
  466. package/dist/react/src/components/ui/toggle-group.d.ts +0 -22
  467. package/dist/react/src/components/ui/toggle-group.d.ts.map +0 -1
  468. package/dist/react/src/components/ui/toggle-group.js +0 -48
  469. package/dist/react/src/components/ui/toggle-group.js.map +0 -1
  470. package/dist/react/src/components/ui/tooltip.d.ts +0 -16
  471. package/dist/react/src/components/ui/tooltip.d.ts.map +0 -1
  472. package/dist/react/src/components/ui/tooltip.js +0 -21
  473. package/dist/react/src/components/ui/tooltip.js.map +0 -1
  474. package/dist/react/src/context/ConfigContext.d.ts +0 -26
  475. package/dist/react/src/context/ConfigContext.d.ts.map +0 -1
  476. package/dist/react/src/context/ConfigContext.js +0 -150
  477. package/dist/react/src/context/ConfigContext.js.map +0 -1
  478. package/dist/react/src/context/DiffNavigationContext.d.ts +0 -16
  479. package/dist/react/src/context/DiffNavigationContext.d.ts.map +0 -1
  480. package/dist/react/src/context/DiffNavigationContext.js +0 -79
  481. package/dist/react/src/context/DiffNavigationContext.js.map +0 -1
  482. package/dist/react/src/context/GuideContext.d.ts +0 -28
  483. package/dist/react/src/context/GuideContext.d.ts.map +0 -1
  484. package/dist/react/src/context/GuideContext.js +0 -64
  485. package/dist/react/src/context/GuideContext.js.map +0 -1
  486. package/dist/react/src/context/ReviewAdapterContext.d.ts +0 -9
  487. package/dist/react/src/context/ReviewAdapterContext.d.ts.map +0 -1
  488. package/dist/react/src/context/ReviewAdapterContext.js +0 -10
  489. package/dist/react/src/context/ReviewAdapterContext.js.map +0 -1
  490. package/dist/react/src/context/ReviewContext.d.ts +0 -60
  491. package/dist/react/src/context/ReviewContext.d.ts.map +0 -1
  492. package/dist/react/src/context/ReviewContext.js +0 -233
  493. package/dist/react/src/context/ReviewContext.js.map +0 -1
  494. package/dist/react/src/hooks/useDiffNavigation.d.ts +0 -4
  495. package/dist/react/src/hooks/useDiffNavigation.d.ts.map +0 -1
  496. package/dist/react/src/hooks/useDiffNavigation.js +0 -5
  497. package/dist/react/src/hooks/useDiffNavigation.js.map +0 -1
  498. package/dist/react/src/hooks/useEmojiAutocomplete.d.ts +0 -24
  499. package/dist/react/src/hooks/useEmojiAutocomplete.d.ts.map +0 -1
  500. package/dist/react/src/hooks/useEmojiAutocomplete.js +0 -175
  501. package/dist/react/src/hooks/useEmojiAutocomplete.js.map +0 -1
  502. package/dist/react/src/hooks/useKeyboardNavigation.d.ts +0 -15
  503. package/dist/react/src/hooks/useKeyboardNavigation.d.ts.map +0 -1
  504. package/dist/react/src/hooks/useKeyboardNavigation.js +0 -227
  505. package/dist/react/src/hooks/useKeyboardNavigation.js.map +0 -1
  506. package/dist/react/src/hooks/useReviewBridge.d.ts +0 -15
  507. package/dist/react/src/hooks/useReviewBridge.d.ts.map +0 -1
  508. package/dist/react/src/hooks/useReviewBridge.js +0 -43
  509. package/dist/react/src/hooks/useReviewBridge.js.map +0 -1
  510. package/dist/react/src/hooks/useReviewState.d.ts +0 -16
  511. package/dist/react/src/hooks/useReviewState.d.ts.map +0 -1
  512. package/dist/react/src/hooks/useReviewState.js +0 -101
  513. package/dist/react/src/hooks/useReviewState.js.map +0 -1
  514. package/dist/react/src/index.d.ts +0 -25
  515. package/dist/react/src/index.d.ts.map +0 -1
  516. package/dist/react/src/index.js +0 -22
  517. package/dist/react/src/index.js.map +0 -1
  518. package/dist/react/src/lib/utils.d.ts +0 -3
  519. package/dist/react/src/lib/utils.d.ts.map +0 -1
  520. package/dist/react/src/lib/utils.js +0 -6
  521. package/dist/react/src/lib/utils.js.map +0 -1
  522. package/dist/react/src/utils/category-utils.d.ts +0 -17
  523. package/dist/react/src/utils/category-utils.d.ts.map +0 -1
  524. package/dist/react/src/utils/category-utils.js +0 -23
  525. package/dist/react/src/utils/category-utils.js.map +0 -1
  526. package/dist/react/src/utils/comment-anchors.d.ts +0 -4
  527. package/dist/react/src/utils/comment-anchors.d.ts.map +0 -1
  528. package/dist/react/src/utils/comment-anchors.js +0 -17
  529. package/dist/react/src/utils/comment-anchors.js.map +0 -1
  530. package/dist/react/src/utils/diff-styles.d.ts +0 -12
  531. package/dist/react/src/utils/diff-styles.d.ts.map +0 -1
  532. package/dist/react/src/utils/diff-styles.js +0 -46
  533. package/dist/react/src/utils/diff-styles.js.map +0 -1
  534. package/dist/react/src/utils/emoji-data.d.ts +0 -8
  535. package/dist/react/src/utils/emoji-data.d.ts.map +0 -1
  536. package/dist/react/src/utils/emoji-data.js +0 -43
  537. package/dist/react/src/utils/emoji-data.js.map +0 -1
  538. package/dist/react/src/utils/file-type-utils.d.ts +0 -20
  539. package/dist/react/src/utils/file-type-utils.d.ts.map +0 -1
  540. package/dist/react/src/utils/file-type-utils.js +0 -110
  541. package/dist/react/src/utils/file-type-utils.js.map +0 -1
  542. package/dist/react/src/utils/front-matter.d.ts +0 -14
  543. package/dist/react/src/utils/front-matter.d.ts.map +0 -1
  544. package/dist/react/src/utils/front-matter.js +0 -40
  545. package/dist/react/src/utils/front-matter.js.map +0 -1
  546. package/dist/react/src/utils/guide-accents.d.ts +0 -46
  547. package/dist/react/src/utils/guide-accents.d.ts.map +0 -1
  548. package/dist/react/src/utils/guide-accents.js +0 -100
  549. package/dist/react/src/utils/guide-accents.js.map +0 -1
  550. package/dist/react/src/utils/guide-display.d.ts +0 -48
  551. package/dist/react/src/utils/guide-display.d.ts.map +0 -1
  552. package/dist/react/src/utils/guide-display.js +0 -75
  553. package/dist/react/src/utils/guide-display.js.map +0 -1
  554. package/dist/react/src/utils/image-utils.d.ts +0 -3
  555. package/dist/react/src/utils/image-utils.d.ts.map +0 -1
  556. package/dist/react/src/utils/image-utils.js +0 -33
  557. package/dist/react/src/utils/image-utils.js.map +0 -1
  558. package/dist/react/src/utils/passive-content.d.ts +0 -9
  559. package/dist/react/src/utils/passive-content.d.ts.map +0 -1
  560. package/dist/react/src/utils/passive-content.js +0 -135
  561. package/dist/react/src/utils/passive-content.js.map +0 -1
  562. package/dist/react/src/utils/remark-emoji.d.ts +0 -3
  563. package/dist/react/src/utils/remark-emoji.d.ts.map +0 -1
  564. package/dist/react/src/utils/remark-emoji.js +0 -38
  565. package/dist/react/src/utils/remark-emoji.js.map +0 -1
  566. package/dist/serve/src/args.d.ts +0 -15
  567. package/dist/serve/src/args.d.ts.map +0 -1
  568. package/dist/serve/src/args.js +0 -65
  569. package/dist/serve/src/args.js.map +0 -1
  570. package/dist/serve/src/cli.d.ts +0 -3
  571. package/dist/serve/src/cli.d.ts.map +0 -1
  572. package/dist/serve/src/cli.js +0 -81
  573. package/dist/serve/src/cli.js.map +0 -1
  574. package/dist/serve/src/client/adapter.d.ts +0 -25
  575. package/dist/serve/src/client/adapter.d.ts.map +0 -1
  576. package/dist/serve/src/client/adapter.js +0 -190
  577. package/dist/serve/src/client/adapter.js.map +0 -1
  578. package/dist/serve/src/client/index.d.ts +0 -2
  579. package/dist/serve/src/client/index.d.ts.map +0 -1
  580. package/dist/serve/src/client/index.js +0 -135
  581. package/dist/serve/src/client/index.js.map +0 -1
  582. package/dist/serve/src/lifecycle.d.ts +0 -27
  583. package/dist/serve/src/lifecycle.d.ts.map +0 -1
  584. package/dist/serve/src/lifecycle.js +0 -73
  585. package/dist/serve/src/lifecycle.js.map +0 -1
  586. package/dist/serve/src/server.d.ts +0 -34
  587. package/dist/serve/src/server.d.ts.map +0 -1
  588. package/dist/serve/src/server.js +0 -430
  589. package/dist/serve/src/server.js.map +0 -1
  590. package/dist/serve/src/startup.d.ts +0 -19
  591. package/dist/serve/src/startup.d.ts.map +0 -1
  592. package/dist/serve/src/startup.js +0 -117
  593. package/dist/serve/src/startup.js.map +0 -1
  594. package/dist/serve/src/validate.d.ts +0 -44
  595. package/dist/serve/src/validate.d.ts.map +0 -1
  596. package/dist/serve/src/validate.js +0 -295
  597. package/dist/serve/src/validate.js.map +0 -1
  598. package/dist/types/src/index.d.ts +0 -417
  599. package/dist/types/src/index.d.ts.map +0 -1
  600. package/dist/types/src/index.js +0 -5
  601. package/dist/types/src/index.js.map +0 -1
@@ -1,7 +0,0 @@
1
- import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Nt,H as mi,e as yi,y as bi,F as St,i as Ai,D as Yt,E as wi,K as Ci,aF as Si,R as Wt}from"./mermaid.core-DfADLZQ1.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-CNmY37sq.js";import"./index-CAXQd1OO.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function yt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,g,m=!1,p=0,k=0,v=.5;delete e.unknown;function C(){var b=t().length,E=n<s,D=E?n:s,P=E?s:n;o=(P-D)/Math.max(1,b-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(b-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var I=Ri(b).map(function(y){return D+o*y});return i(E?I.reverse():I)}return e.domain=function(b){return arguments.length?(t(b),C()):t()},e.range=function(b){return arguments.length?([s,n]=b,s=+s,n=+n,C()):[s,n]},e.rangeRound=function(b){return[s,n]=b,s=+s,n=+n,m=!0,C()},e.bandwidth=function(){return g},e.step=function(){return o},e.round=function(b){return arguments.length?(m=!!b,C()):m},e.padding=function(b){return arguments.length?(p=Math.min(1,k=+b),C()):p},e.paddingInner=function(b){return arguments.length?(p=Math.min(1,b),C()):p},e.paddingOuter=function(b){return arguments.length?(k=+b,C()):k},e.align=function(b){return arguments.length?(v=Math.max(0,Math.min(1,b)),C()):v},e.copy=function(){return yt(t(),[s,n]).round(m).paddingInner(p).paddingOuter(k).align(v)},_i.apply(C(),arguments)}var bt=(function(){var e=a(function(F,h,u,x){for(u=u||{},x=F.length;x--;u[F[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],C=[1,29],b=[1,30],E=[1,31],D=[1,32],P=[1,33],I=[1,34],y=[1,35],_=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],R=[1,64],$={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,u,x,d,w,r,at){var f=r.length-1;switch(w){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,34]),e(m,[2,35]),e(m,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:g}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{20:[1,53]},{22:[1,54]},e(l,[2,18]),{1:[2,2]},e(l,[2,8]),e(l,[2,9]),e(L,[2,37],{40:55,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c}),e(L,[2,38]),e(L,[2,39]),e(S,[2,40]),e(S,[2,42]),e(S,[2,43]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(l,[2,10]),e(l,[2,22],{30:41,29:56,24:W,27:z}),e(l,[2,24]),e(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,11]),e(l,[2,30],{33:60,27:U}),e(l,[2,32]),{31:[1,61]},e(l,[2,12]),{17:62,24:X},{25:63,27:R},e(l,[2,14]),{17:65,24:X},e(l,[2,16]),e(l,[2,17]),e(S,[2,41]),e(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(l,[2,31]),{27:[1,69]},e(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(l,[2,15]),e(l,[2,26]),e(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,33]),e(l,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:a(function(h){var u=this,x=[0],d=[],w=[null],r=[],at=this.table,f="",lt=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),T=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);T.setInput(h,Y.yy),Y.yy.lexer=T,Y.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var ft=T.yylloc;r.push(ft);var ci=T.options&&T.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(V){x.length=x.length-2*V,w.length=w.length-V,r.length=r.length-V}a(ui,"popStack");function Vt(){var V;return V=d.pop()||T.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}a(Vt,"lex");for(var M,H,B,pt,q={},ct,O,Bt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((M===null||typeof M>"u")&&(M=Vt()),B=at[H]&&at[H][M]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");T.showPosition?mt="Parse error on line "+(lt+1)+`:
2
- `+T.showPosition()+`
3
- Expecting `+ut.join(", ")+", got '"+(this.terminals_[M]||M)+"'":mt="Parse error on line "+(lt+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(mt,{text:T.match,token:this.terminals_[M]||M,line:T.yylineno,loc:ft,expected:ut})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+M);switch(B[0]){case 1:x.push(M),w.push(T.yytext),r.push(T.yylloc),x.push(B[1]),M=null,It=T.yyleng,f=T.yytext,lt=T.yylineno,ft=T.yylloc;break;case 2:if(O=this.productions_[B[1]][1],q.$=w[w.length-O],q._$={first_line:r[r.length-(O||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(O||1)].first_column,last_column:r[r.length-1].last_column},ci&&(q._$.range=[r[r.length-(O||1)].range[0],r[r.length-1].range[1]]),pt=this.performAction.apply(q,[f,It,lt,Y.yy,B[1],w,r].concat(li)),typeof pt<"u")return pt;O&&(x=x.slice(0,-1*O*2),w=w.slice(0,-1*O),r=r.slice(0,-1*O)),x.push(this.productions_[B[1]][0]),w.push(q.$),r.push(q._$),Bt=at[x[x.length-2]][x[x.length-1]],x.push(Bt);break;case 3:return!0}}return!0},"parse")},Et=(function(){var F={EOF:1,parseError:a(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw new Error(u)},"parseError"),setInput:a(function(h,u){return this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
5
- `+u+"^"},"showPosition"),test_match:a(function(h,u){var x,d,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),d=h[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],x=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var r in w)this[r]=w[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,u,x,d;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),r=0;r<w.length;r++)if(x=this._input.match(this.rules[w[r]]),x&&(!u||x[0].length>u[0].length)){if(u=x,d=r,this.options.backtrack_lexer){if(h=this.test_match(x,w[r]),h!==!1)return h;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(h=this.test_match(u,w[d]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var u=this.next();return u||this.lex()},"lex"),begin:a(function(u){this.conditionStack.push(u)},"begin"),popState:a(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:a(function(u){this.begin(u)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(u,x,d,w){switch(d){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F})();$.lexer=Et;function N(){this.yy={}}return a(N,"Parser"),N.prototype=$,$.Parser=N,new N})();bt.parser=bt;var Ti=bt;function At(e){return e.type==="bar"}a(At,"isBarPlot");function _t(e){return e.type==="band"}a(_t,"isBandAxisData");function G(e){return e.type==="linear"}a(G,"isLinearAxisData");var j,Ht=(j=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,g)=>Math.max(g.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const g=Si(n,1,o),m=g?g.width:o.length*i,p=g?g.height:i;s.width=Math.max(s.width,m),s.height=Math.max(s.height,p)}return n.remove(),s}},a(j,"TextDimensionCalculatorWithFont"),j),Ft=.7,Ot=.2,Q,Ut=(Q=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ft*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ft*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ot*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ot*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(Q,"BaseAxis"),Q),K,Di=(K=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=yt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=yt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Nt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(K,"BandAxis"),K),Z,vi=(Z=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=zt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=zt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(Z,"LinearAxis"),Z);function wt(e,t,i,s){const n=new Ht(s);return _t(e)?new Di(t,i,e.categories,e.title,n):new vi(t,i,[e.min,e.max],e.title,n)}a(wt,"getAxis");var J,Pi=(J=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(J,"ChartTitle"),J);function $t(e,t,i,s){const n=new Ht(s);return new Pi(n,e,t,i)}a($t,"getChartTitleComponent");var tt,Li=(tt=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=Wt().y(s=>s[0]).x(s=>s[1])(t):i=Wt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a(tt,"LinePlot"),tt),it,Ei=(it=class{constructor(t,i,s,n,o,g){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=g}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(it,"BarPlot"),it),et,Ii=(et=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Li(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Ei(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(et,"BasePlot"),et);function qt(e,t,i){return new Ii(e,t,i)}a(qt,"getPlotComponent");var st,Mi=(st=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:$t(t,i,s,n),plot:qt(t,i,s),xAxis:wt(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:wt(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),m=this.componentStore.plot.calculateSpace({width:o,height:g});t-=m.width,i-=m.height,m=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=m.height,i-=m.height,this.componentStore.xAxis.setAxisPosition("bottom"),m=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=m.height,this.componentStore.yAxis.setAxisPosition("left"),m=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=m.width,t-=m.width,t>0&&(o+=t,t=0),i>0&&(g+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:g}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+g}),this.componentStore.yAxis.setRange([n,n+g]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(p=>At(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,g=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),m=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:g,height:m});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("left"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=p.width,n=p.width,this.componentStore.yAxis.setAxisPosition("top"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=p.height,o=s+p.height,t>0&&(g+=t,t=0),i>0&&(m+=i,i=0),this.componentStore.plot.calculateSpace({width:g,height:m}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+g]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+m]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(k=>At(k))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(st,"Orchestrator"),st),nt,Vi=(nt=class{static build(t,i,s,n){return new Mi(t,i,s,n).getDrawableElement()}},a(nt,"XYChartBuilder"),nt),rt=0,Gt,ot=Tt(),ht=Rt(),A=Dt(),Ct=ht.plotColorPalette.split(",").map(e=>e.trim()),gt=!1,kt=!1;function Rt(){const e=Ci(),t=St();return Yt(e.xyChart,t.themeVariables.xyChart)}a(Rt,"getChartDefaultThemeConfig");function Tt(){const e=St();return Yt(wi.xyChart,e.xyChart)}a(Tt,"getChartDefaultConfig");function Dt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(Dt,"getChartDefaultData");function xt(e){const t=St();return Ai(e.trim(),t)}a(xt,"textSanitizer");function jt(e){Gt=e}a(jt,"setTmpSVGG");function Qt(e){e==="horizontal"?ot.chartOrientation="horizontal":ot.chartOrientation="vertical"}a(Qt,"setOrientation");function Kt(e){A.xAxis.title=xt(e.text)}a(Kt,"setXAxisTitle");function vt(e,t){A.xAxis={type:"linear",title:A.xAxis.title,min:e,max:t},gt=!0}a(vt,"setXAxisRangeData");function Zt(e){A.xAxis={type:"band",title:A.xAxis.title,categories:e.map(t=>xt(t.text))},gt=!0}a(Zt,"setXAxisBand");function Jt(e){A.yAxis.title=xt(e.text)}a(Jt,"setYAxisTitle");function ti(e,t){A.yAxis={type:"linear",title:A.yAxis.title,min:e,max:t},kt=!0}a(ti,"setYAxisRangeData");function ii(e){const t=Math.min(...e),i=Math.max(...e),s=G(A.yAxis)?A.yAxis.min:1/0,n=G(A.yAxis)?A.yAxis.max:-1/0;A.yAxis={type:"linear",title:A.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ii,"setYAxisRangeFromPlotData");function Pt(e){let t=[];if(e.length===0)return t;if(!gt){const i=G(A.xAxis)?A.xAxis.min:1/0,s=G(A.xAxis)?A.xAxis.max:-1/0;vt(Math.min(i,1),Math.max(s,e.length))}if(kt||ii(e),_t(A.xAxis)&&(t=A.xAxis.categories.map((i,s)=>[i,e[s]])),G(A.xAxis)){const i=A.xAxis.min,s=A.xAxis.max,n=(s-i)/(e.length-1),o=[];for(let g=i;g<=s;g+=n)o.push(`${g}`);t=o.map((g,m)=>[g,e[m]])}return t}a(Pt,"transformDataWithoutCategory");function Lt(e){return Ct[e===0?0:e%Ct.length]}a(Lt,"getPlotColorFromPalette");function ei(e,t){const i=Pt(t);A.plots.push({type:"line",strokeFill:Lt(rt),strokeWidth:2,data:i}),rt++}a(ei,"setLineData");function si(e,t){const i=Pt(t);A.plots.push({type:"bar",fill:Lt(rt),data:i}),rt++}a(si,"setBarData");function ni(){if(A.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return A.title=Xt(),Vi.build(ot,A,ht,Gt)}a(ni,"getDrawableElem");function ai(){return ht}a(ai,"getChartThemeConfig");function ri(){return ot}a(ri,"getChartConfig");function oi(){return A}a(oi,"getXYChartData");var Bi=a(function(){bi(),rt=0,ot=Tt(),A=Dt(),ht=Rt(),Ct=ht.plotColorPalette.split(",").map(e=>e.trim()),gt=!1,kt=!1},"clear"),Wi={getDrawableElem:ni,clear:Bi,setAccTitle:pi,getAccTitle:fi,setDiagramTitle:di,getDiagramTitle:Xt,getAccDescription:xi,setAccDescription:gi,setOrientation:Qt,setXAxisTitle:Kt,setXAxisRangeData:vt,setXAxisBand:Zt,setYAxisTitle:Jt,setYAxisRangeData:ti,setLineData:ei,setBarData:si,setTmpSVGG:jt,getChartThemeConfig:ai,getChartConfig:ri,getXYChartData:oi},zi=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),g=n.getChartConfig(),m=n.getXYChartData().plots[0].data.map(y=>y[1]);function p(y){return y==="top"?"text-before-edge":"middle"}a(p,"getDominantBaseLine");function k(y){return y==="left"?"start":y==="right"?"end":"middle"}a(k,"getTextAnchor");function v(y){return`translate(${y.x}, ${y.y}) rotate(${y.rotation||0})`}a(v,"getTextTransformation"),Nt.debug(`Rendering xychart chart
7
- `+e);const C=mi(t),b=C.append("g").attr("class","main"),E=b.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");yi(C,g.height,g.width,!0),C.attr("viewBox",`0 0 ${g.width} ${g.height}`),E.attr("fill",o.backgroundColor),n.setTmpSVGG(C.append("g").attr("class","mermaid-tmp-group"));const D=n.getDrawableElem(),P={};function I(y){let _=b,c="";for(const[W]of y.entries()){let z=b;W>0&&P[c]&&(z=P[c]),c+=y[W],_=P[c],_||(_=P[c]=z.append("g").attr("class",y[W]))}return _}a(I,"getGroup");for(const y of D){if(y.data.length===0)continue;const _=I(y.groupTexts);switch(y.type){case"rect":if(_.selectAll("rect").data(y.data).enter().append("rect").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).attr("fill",c=>c.fill).attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth),g.showDataLabel)if(g.chartOrientation==="horizontal"){let c=function(l,L){const{data:S,label:R}=l;return L*R.length*W<=S.width-10};a(c,"fitsHorizontally");const W=.7,z=y.data.map((l,L)=>({data:l,label:m[L].toString()})).filter(l=>l.data.width>0&&l.data.height>0),U=z.map(l=>{const{data:L}=l;let S=L.height*.7;for(;!c(l,S)&&S>0;)S-=1;return S}),X=Math.floor(Math.min(...U));_.selectAll("text").data(z).enter().append("text").attr("x",l=>l.data.x+l.data.width-10).attr("y",l=>l.data.y+l.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${X}px`).text(l=>l.label)}else{let c=function(l,L,S){const{data:R,label:$}=l,N=L*$.length*.7,F=R.x+R.width/2,h=F-N/2,u=F+N/2,x=h>=R.x&&u<=R.x+R.width,d=R.y+S+L<=R.y+R.height;return x&&d};a(c,"fitsInBar");const W=10,z=y.data.map((l,L)=>({data:l,label:m[L].toString()})).filter(l=>l.data.width>0&&l.data.height>0),U=z.map(l=>{const{data:L,label:S}=l;let R=L.width/(S.length*.7);for(;!c(l,R,W)&&R>0;)R-=1;return R}),X=Math.floor(Math.min(...U));_.selectAll("text").data(z).enter().append("text").attr("x",l=>l.data.x+l.data.width/2).attr("y",l=>l.data.y+W).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${X}px`).text(l=>l.label)}break;case"text":_.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",c=>c.fill).attr("font-size",c=>c.fontSize).attr("dominant-baseline",c=>p(c.verticalPos)).attr("text-anchor",c=>k(c.horizontalPos)).attr("transform",c=>v(c)).text(c=>c.text);break;case"path":_.selectAll("path").data(y.data).enter().append("path").attr("d",c=>c.path).attr("fill",c=>c.fill?c.fill:"none").attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth);break}}},"draw"),Fi={draw:zi},$i={parser:Ti,db:Wi,renderer:Fi};export{$i as diagram};
@@ -1,76 +0,0 @@
1
- import type { LineRange, Suggestion } from './types';
2
- /**
3
- * Why an apply was refused. Every value is a structural fact about the
4
- * request or the file — never a fragment of the file's contents, so a
5
- * refusal is safe to surface in the UI and in logs.
6
- */
7
- export type ApplyRefusalReason =
8
- /** The suggestion is file-level: there is nothing to replace. */
9
- 'no-anchor'
10
- /**
11
- * The anchor names deleted lines (`side: 'old'`). Those lines are not in
12
- * the working file, and the app holds no old→new line mapping, so the
13
- * target is undefined rather than merely missing.
14
- */
15
- | 'old-side-anchor'
16
- /** `destinationRoot` is relative; resolving it would consult the cwd. */
17
- | 'destination-not-absolute'
18
- /** `filePath` resolves outside `destinationRoot`. */
19
- | 'path-escapes-destination'
20
- /** No file at the resolved path. */
21
- | 'file-missing'
22
- /** The path exists but could not be read (permissions, a directory, …). */
23
- | 'file-unreadable'
24
- /**
25
- * The file is not valid UTF-8. Rewriting it would round-trip its bytes
26
- * through a lossy decode and corrupt regions outside the anchor.
27
- */
28
- | 'file-not-utf8'
29
- /** The anchor falls outside the file's line count. */
30
- | 'anchor-out-of-range'
31
- /** The anchored lines no longer match `suggestion.originalCode`. */
32
- | 'context-mismatch'
33
- /** The context matched but the write itself failed. */
34
- | 'write-failed';
35
- export interface ApplySuggestionRequest {
36
- /**
37
- * Absolute path of the directory the reviewed files live in. Always
38
- * supplied by the caller: a git-mode working tree, a directory-mode root,
39
- * a reused clone, or the destination the user picked for a temporary-clone
40
- * review. Never derived here.
41
- */
42
- destinationRoot: string;
43
- /** Path of the file to modify, relative to `destinationRoot`. */
44
- filePath: string;
45
- /** The comment's anchor. `null` (file-level) is refused. */
46
- lineRange: LineRange | null;
47
- suggestion: Suggestion;
48
- }
49
- export interface ApplySuggestionApplied {
50
- status: 'applied';
51
- /** Echoed from the request, so a batch caller can attribute the result. */
52
- filePath: string;
53
- absolutePath: string;
54
- /** How many on-disk lines the proposal replaced. */
55
- replacedLines: number;
56
- }
57
- export interface ApplySuggestionRefused {
58
- status: 'refused';
59
- filePath: string;
60
- reason: ApplyRefusalReason;
61
- /** One sentence naming the refusal, safe to show to the reviewer. */
62
- detail: string;
63
- }
64
- export type ApplySuggestionResult = ApplySuggestionApplied | ApplySuggestionRefused;
65
- /**
66
- * Apply one anchored suggestion to one file under `destinationRoot`.
67
- *
68
- * On a byte-for-byte match between the anchored lines and
69
- * `suggestion.originalCode`, the anchored lines are replaced with
70
- * `suggestion.proposedCode` and the file is rewritten. Lines outside the
71
- * anchor keep their exact bytes, including their line terminators, and the
72
- * file's trailing-newline state is preserved either way. Any other outcome
73
- * refuses with a reason and writes nothing.
74
- */
75
- export declare function applySuggestion(request: ApplySuggestionRequest): ApplySuggestionResult;
76
- //# sourceMappingURL=apply-suggestion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-suggestion.d.ts","sourceRoot":"","sources":["../../../../core/src/apply-suggestion.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB;AAC5B,iEAAiE;AAC/D,WAAW;AACb;;;;GAIG;GACD,iBAAiB;AACnB,yEAAyE;GACvE,0BAA0B;AAC5B,qDAAqD;GACnD,0BAA0B;AAC5B,oCAAoC;GAClC,cAAc;AAChB,2EAA2E;GACzE,iBAAiB;AACnB;;;GAGG;GACD,eAAe;AACjB,sDAAsD;GACpD,qBAAqB;AACvB,oEAAoE;GAClE,kBAAkB;AACpB,uDAAuD;GACrD,cAAc,CAAC;AAEnB,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,SAAS,CAAC;IAClB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,GAAG,sBAAsB,CAAC;AAuCpF;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,qBAAqB,CA6FtF"}
@@ -1,109 +0,0 @@
1
- // apply-suggestion.ts
2
- // Writes one anchored suggestion into one working file, or refuses and
3
- // writes nothing. Node-only, Electron-free, and free of process-global
4
- // state: the caller names the destination root, so nothing here ever
5
- // consults `process.cwd()`.
6
- //
7
- // The engine is deliberately narrow. It performs a byte-for-byte context
8
- // check and a literal line replacement — no fuzzy matching, no force flag,
9
- // no staging, no git. Every outcome is reported: a refusal names its reason
10
- // and leaves the file untouched (PRD Section 5.4.8).
11
- import { readFileSync, writeFileSync } from 'fs';
12
- import { isAbsolute, relative, resolve, sep } from 'path';
13
- function refuse(filePath, reason, detail) {
14
- return { status: 'refused', filePath, reason, detail };
15
- }
16
- function errorCode(error) {
17
- return error?.code;
18
- }
19
- /**
20
- * Split file text into lines, keeping each line's own bytes intact.
21
- *
22
- * The split is on `\n` only, so a CRLF file's `\r` stays at the end of the
23
- * line it terminates. That makes the comparison against `originalCode`
24
- * byte-exact (the diff parser hands the same `\r` through in `DiffLine`),
25
- * and it means rejoining preserves mixed line endings exactly as found.
26
- */
27
- function splitLines(content) {
28
- if (content === '')
29
- return [];
30
- const lines = content.split('\n');
31
- // A trailing terminator produces an empty final element that is not a line.
32
- if (lines[lines.length - 1] === '')
33
- lines.pop();
34
- return lines;
35
- }
36
- /**
37
- * True when every line being replaced carries a CRLF terminator. Only then
38
- * is it unambiguous that a hand-typed LF proposal should be written back as
39
- * CRLF; a mixed or LF region takes the proposal verbatim.
40
- */
41
- function isCrlfRegion(anchored) {
42
- return anchored.length > 0 && anchored.every(line => line.endsWith('\r'));
43
- }
44
- /**
45
- * Apply one anchored suggestion to one file under `destinationRoot`.
46
- *
47
- * On a byte-for-byte match between the anchored lines and
48
- * `suggestion.originalCode`, the anchored lines are replaced with
49
- * `suggestion.proposedCode` and the file is rewritten. Lines outside the
50
- * anchor keep their exact bytes, including their line terminators, and the
51
- * file's trailing-newline state is preserved either way. Any other outcome
52
- * refuses with a reason and writes nothing.
53
- */
54
- export function applySuggestion(request) {
55
- const { destinationRoot, filePath, lineRange, suggestion } = request;
56
- if (!lineRange) {
57
- return refuse(filePath, 'no-anchor', 'This suggestion is file-level, so there are no lines to replace.');
58
- }
59
- if (lineRange.side === 'old') {
60
- return refuse(filePath, 'old-side-anchor', 'This suggestion is anchored to deleted lines, which are not in the working file.');
61
- }
62
- if (!isAbsolute(destinationRoot)) {
63
- return refuse(filePath, 'destination-not-absolute', 'The destination directory must be an absolute path.');
64
- }
65
- const root = resolve(destinationRoot);
66
- const absolutePath = resolve(root, filePath);
67
- const rel = relative(root, absolutePath);
68
- if (isAbsolute(filePath) || rel === '' || rel === '..' || rel.startsWith(`..${sep}`)) {
69
- return refuse(filePath, 'path-escapes-destination', 'The file path resolves outside the destination directory.');
70
- }
71
- let buffer;
72
- try {
73
- buffer = readFileSync(absolutePath);
74
- }
75
- catch (error) {
76
- const code = errorCode(error);
77
- if (code === 'ENOENT' || code === 'ENOTDIR') {
78
- return refuse(filePath, 'file-missing', 'The file is not in the destination directory.');
79
- }
80
- return refuse(filePath, 'file-unreadable', `The file could not be read (${code ?? 'unknown'}).`);
81
- }
82
- const content = buffer.toString('utf8');
83
- if (!Buffer.from(content, 'utf8').equals(buffer)) {
84
- return refuse(filePath, 'file-not-utf8', 'The file is not valid UTF-8 text.');
85
- }
86
- const lines = splitLines(content);
87
- const { start, end } = lineRange;
88
- if (start < 1 || end < start || end > lines.length) {
89
- return refuse(filePath, 'anchor-out-of-range', `Lines ${start}-${end} are outside this file, which has ${lines.length} line(s).`);
90
- }
91
- const anchored = lines.slice(start - 1, end);
92
- if (anchored.join('\n') !== suggestion.originalCode) {
93
- return refuse(filePath, 'context-mismatch', `Lines ${start}-${end} no longer match the code this suggestion was written against.`);
94
- }
95
- const proposed = suggestion.proposedCode.split('\n');
96
- const replacement = isCrlfRegion(anchored)
97
- ? proposed.map(line => (line.endsWith('\r') ? line : `${line}\r`))
98
- : proposed;
99
- const updated = [...lines.slice(0, start - 1), ...replacement, ...lines.slice(end)];
100
- const output = updated.join('\n') + (content.endsWith('\n') ? '\n' : '');
101
- try {
102
- writeFileSync(absolutePath, output, 'utf8');
103
- }
104
- catch (error) {
105
- return refuse(filePath, 'write-failed', `The file could not be written (${errorCode(error) ?? 'unknown'}).`);
106
- }
107
- return { status: 'applied', filePath, absolutePath, replacedLines: anchored.length };
108
- }
109
- //# sourceMappingURL=apply-suggestion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-suggestion.js","sourceRoot":"","sources":["../../../../core/src/apply-suggestion.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,uEAAuE;AACvE,uEAAuE;AACvE,qEAAqE;AACrE,4BAA4B;AAC5B,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,4EAA4E;AAC5E,qDAAqD;AAErD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAuE1D,SAAS,MAAM,CACb,QAAgB,EAChB,MAA0B,EAC1B,MAAc;IAEd,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACzD,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAQ,KAA2C,EAAE,IAAI,CAAC;AAC5D,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,OAAe;IACjC,IAAI,OAAO,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IAC9B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,4EAA4E;IAC5E,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,KAAK,CAAC,GAAG,EAAE,CAAC;IAChD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;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AC;IAED,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,YAAY,CAAC,QAAQ,CAAC;QACxC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;QAClE,CAAC,CAAC,QAAQ,CAAC;IACb,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACpF,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAEzE,IAAI,CAAC;QACH,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,MAAM,CACX,QAAQ,EACR,cAAc,EACd,kCAAkC,SAAS,CAAC,KAAK,CAAC,IAAI,SAAS,IAAI,CACpE,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;AACvF,CAAC"}
@@ -1,3 +0,0 @@
1
- import { AppConfig } from './types';
2
- export declare function loadConfig(): AppConfig;
3
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../core/src/config.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA0EpC,wBAAgB,UAAU,IAAI,SAAS,CA0BtC"}
@@ -1,196 +0,0 @@
1
- // src/main/config.ts
2
- // YAML configuration loading and merging
3
- import { readFileSync, existsSync } from 'fs';
4
- import { join } from 'path';
5
- import { homedir } from 'os';
6
- import { parse as parseYaml } from 'yaml';
7
- const defaults = {
8
- theme: 'system',
9
- diffView: 'split',
10
- fontSize: 14,
11
- outputFormat: 'xml',
12
- outputFile: './review.xml',
13
- ignore: [
14
- '.git',
15
- 'node_modules',
16
- 'vendor',
17
- '.vendor',
18
- '__pycache__',
19
- '.venv',
20
- 'venv',
21
- '.env',
22
- 'dist',
23
- 'build',
24
- '.next',
25
- '.nuxt',
26
- '.svelte-kit',
27
- 'target',
28
- '*.min.js',
29
- '*.min.css',
30
- 'package-lock.json',
31
- 'yarn.lock',
32
- 'pnpm-lock.yaml',
33
- 'composer.lock',
34
- 'Gemfile.lock',
35
- 'Cargo.lock',
36
- 'poetry.lock',
37
- 'go.sum',
38
- ],
39
- categories: [
40
- {
41
- name: 'question',
42
- description: 'Clarification needed — not necessarily a problem',
43
- color: '#805ad5',
44
- },
45
- {
46
- name: 'bug',
47
- description: 'Likely defect or incorrect behavior',
48
- color: '#e53e3e',
49
- },
50
- {
51
- name: 'security',
52
- description: 'Security vulnerability or concern',
53
- color: '#dd6b20',
54
- },
55
- {
56
- name: 'style',
57
- description: 'Code style, naming, or formatting issue',
58
- color: '#3182ce',
59
- },
60
- {
61
- name: 'task',
62
- description: 'Action item or follow-up task',
63
- color: '#38a169',
64
- },
65
- {
66
- name: 'nit',
67
- description: 'Minor nitpick, low priority',
68
- color: '#718096',
69
- },
70
- ],
71
- defaultDiffArgs: '',
72
- showUntracked: true,
73
- showUntrackedExplicit: false,
74
- wordWrap: true,
75
- maxFiles: 500,
76
- maxTotalLines: 100000,
77
- };
78
- export function loadConfig() {
79
- let config = { ...defaults };
80
- // Load user-level config
81
- const userConfigPath = join(homedir(), '.config', 'self-review', 'config.yaml');
82
- if (existsSync(userConfigPath)) {
83
- try {
84
- const userConfig = loadYamlConfig(userConfigPath);
85
- config = mergeConfig(config, userConfig);
86
- }
87
- catch (error) {
88
- console.error(`Warning: Failed to load user config from ${userConfigPath}: ${error}`);
89
- }
90
- }
91
- // Load project-level config
92
- const projectConfigPath = join(process.cwd(), '.self-review.yaml');
93
- if (existsSync(projectConfigPath)) {
94
- try {
95
- const projectConfig = loadYamlConfig(projectConfigPath);
96
- config = mergeConfig(config, projectConfig);
97
- }
98
- catch (error) {
99
- console.error(`Warning: Failed to load project config from ${projectConfigPath}: ${error}`);
100
- }
101
- }
102
- return config;
103
- }
104
- function loadYamlConfig(path) {
105
- const content = readFileSync(path, 'utf-8');
106
- const raw = parseYaml(content);
107
- // An empty file (or one containing only `null`) is a valid "use defaults" state.
108
- if (raw === null || raw === undefined) {
109
- return {};
110
- }
111
- if (typeof raw !== 'object' || Array.isArray(raw)) {
112
- throw new Error('Invalid YAML format');
113
- }
114
- // Map kebab-case keys to camelCase
115
- const config = {};
116
- if ('theme' in raw) {
117
- if (['light', 'dark', 'system'].includes(raw.theme)) {
118
- config.theme = raw.theme;
119
- }
120
- else {
121
- console.error(`Warning: Invalid theme value "${raw.theme}", using default`);
122
- }
123
- }
124
- if ('diff-view' in raw) {
125
- if (['split', 'unified'].includes(raw['diff-view'])) {
126
- config.diffView = raw['diff-view'];
127
- }
128
- else {
129
- console.error(`Warning: Invalid diff-view value "${raw['diff-view']}", using default`);
130
- }
131
- }
132
- if ('font-size' in raw && typeof raw['font-size'] === 'number') {
133
- config.fontSize = raw['font-size'];
134
- }
135
- if ('output-format' in raw && typeof raw['output-format'] === 'string') {
136
- config.outputFormat = raw['output-format'];
137
- }
138
- if ('ignore' in raw && Array.isArray(raw.ignore)) {
139
- config.ignore = raw.ignore.filter((item) => typeof item === 'string');
140
- }
141
- if ('categories' in raw && Array.isArray(raw.categories)) {
142
- const usableCategories = raw.categories.filter((cat) => cat !== null &&
143
- typeof cat === 'object' &&
144
- typeof cat.name === 'string' &&
145
- cat.name !== '' &&
146
- typeof cat.description === 'string' &&
147
- typeof cat.color === 'string');
148
- // A `categories` list that leaves no usable entry (empty list, every entry
149
- // shaped wrong, or every entry named '') would silently disable commenting,
150
- // so it's treated the same as any other invalid value: warn and keep the default.
151
- if (usableCategories.length > 0) {
152
- config.categories = usableCategories;
153
- }
154
- else {
155
- console.error('Warning: Category configuration has no usable categories, using default categories');
156
- }
157
- }
158
- if ('default-diff-args' in raw && typeof raw['default-diff-args'] === 'string') {
159
- config.defaultDiffArgs = raw['default-diff-args'];
160
- }
161
- if ('show-untracked' in raw && typeof raw['show-untracked'] === 'boolean') {
162
- config.showUntracked = raw['show-untracked'];
163
- config.showUntrackedExplicit = true;
164
- }
165
- if ('word-wrap' in raw && typeof raw['word-wrap'] === 'boolean') {
166
- config.wordWrap = raw['word-wrap'];
167
- }
168
- if ('max-files' in raw && typeof raw['max-files'] === 'number') {
169
- config.maxFiles = raw['max-files'] >= 0 ? raw['max-files'] : defaults.maxFiles;
170
- }
171
- if ('max-total-lines' in raw && typeof raw['max-total-lines'] === 'number') {
172
- config.maxTotalLines =
173
- raw['max-total-lines'] >= 0 ? raw['max-total-lines'] : defaults.maxTotalLines;
174
- }
175
- if ('output-file' in raw &&
176
- typeof raw['output-file'] === 'string' &&
177
- raw['output-file'].length > 0) {
178
- config.outputFile = raw['output-file'];
179
- }
180
- if ('guide-file' in raw &&
181
- typeof raw['guide-file'] === 'string' &&
182
- raw['guide-file'].length > 0) {
183
- config.guideFile = raw['guide-file'];
184
- }
185
- return config;
186
- }
187
- function mergeConfig(base, override) {
188
- return {
189
- ...base,
190
- ...override,
191
- // Arrays are replaced, not merged
192
- ignore: override.ignore !== undefined ? override.ignore : base.ignore,
193
- categories: override.categories !== undefined ? override.categories : base.categories,
194
- };
195
- }
196
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot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YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,EAC5B,CAAC;QACD,MAAM,CAAC,SAAS,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,IAAe,EAAE,QAA4B;IAChE,OAAO;QACL,GAAG,IAAI;QACP,GAAG,QAAQ;QACX,kCAAkC;QAClC,MAAM,EAAE,QAAQ,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;QACrE,UAAU,EAAE,QAAQ,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU;KACtF,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- import { DiffFile } from './types';
2
- export declare function parseDiff(rawDiff: string): DiffFile[];
3
- //# sourceMappingURL=diff-parser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diff-parser.d.ts","sourceRoot":"","sources":["../../../../core/src/diff-parser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAwB,MAAM,SAAS,CAAC;AAEzD,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE,CAkMrD"}