@kabmo-labs/kabmo 0.41.0 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +533 -518
  3. package/dist/client/static/js/{CsvGrid-60njj97j.js → CsvGrid-20k047ht.js} +2 -2
  4. package/dist/client/static/js/{DocxView-rsv0j46a.js → DocxView-qpvhfcmg.js} +5 -5
  5. package/dist/client/static/js/{DrawioView-n2g5df3a.js → DrawioView-178skky8.js} +2 -2
  6. package/dist/client/static/js/ImageView-460th5qa.js +1 -0
  7. package/dist/client/static/js/LayoutWrapper-5cv0dty8.js +2 -0
  8. package/dist/client/static/js/Modal-wks6p4r5.js +38 -0
  9. package/dist/client/static/js/{PdfView-1r7a0qkp.js → PdfView-y51g03nr.js} +1 -1
  10. package/dist/client/static/js/SessionsView-rsmvn7ks.js +1 -0
  11. package/dist/client/static/js/{SheetView-bt5pp042.js → SheetView-z7yvb05v.js} +25 -25
  12. package/dist/client/static/js/{SvgPreview-vfmqgmrx.js → SvgPreview-yehgzhem.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-8k5hk1yx.js → abnfDiagram-O67JEVCF-6zxpcy8b.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-9q06651f.js +1 -0
  15. package/dist/client/static/js/architectureDiagram-NJMV4G6O-m98sgh3c.js +36 -0
  16. package/dist/client/static/js/{astro-0rh34hha.js → astro-nn7xg0we.js} +1 -1
  17. package/dist/client/static/js/bash-fjzhxy10.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-04sbtdth.js → blockDiagram-BEXU5L5S-cp7rervg.js} +5 -5
  19. package/dist/client/static/js/c-wqtyezvw.js +1 -0
  20. package/dist/client/static/js/c4Diagram-YGBWAQC7-t31recqm.js +38 -0
  21. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-18cc0bsb.js → classDiagram-v2-NBCMYWYE-fy8x3dkx.js} +5 -5
  22. package/dist/client/static/js/{cose-bilkent-JH36ORCC-dk683zvp.js → cose-bilkent-JH36ORCC-va7ybm9e.js} +1 -1
  23. package/dist/client/static/js/cpp-y0nzwner.js +1 -0
  24. package/dist/client/static/js/css-a13jmmnc.js +1 -0
  25. package/dist/client/static/js/css-n2waj098.js +1 -0
  26. package/dist/client/static/js/cynefin-OW5HDTMX-w7a38g4g.js +1 -0
  27. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-m2sx8d8s.js → cynefinDiagram-VND7K2PF-4k0k429c.js} +2 -2
  28. package/dist/client/static/js/{dagre-6A5THRUB-qf3pr59p.js → dagre-6A5THRUB-ykdhxq6t.js} +2 -2
  29. package/dist/client/static/js/{diagram-22UHCM2B-twnz23mt.js → diagram-22UHCM2B-5nvwx7b6.js} +8 -8
  30. package/dist/client/static/js/{diagram-3UASUU5V-417bas6t.js → diagram-3UASUU5V-hc7zsjgw.js} +1 -1
  31. package/dist/client/static/js/diagram-ATOU4E4O-97ae07y7.js +3 -0
  32. package/dist/client/static/js/diagram-CDSNMT55-b56nnbbs.js +30 -0
  33. package/dist/client/static/js/{diagram-MLGK6HIB-7a0h1hs3.js → diagram-MLGK6HIB-37rygr9k.js} +1 -1
  34. package/dist/client/static/js/{diagram-MPIPVDR6-w75bftmd.js → diagram-MPIPVDR6-wv3vhhfk.js} +2 -2
  35. package/dist/client/static/js/{dockerfile-g5qbaeq3.js → dockerfile-0efb1z6e.js} +1 -1
  36. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-vdzm3tsv.js → ebnfDiagram-ZINNZB2B-13fv7vxg.js} +1 -1
  37. package/dist/client/static/js/{elixir-gpez1k9m.js → elixir-mabagxwa.js} +1 -1
  38. package/dist/client/static/js/{elk-276RUBZZ-2fsbb484.js → elk-276RUBZZ-xam60ktz.js} +1 -1
  39. package/dist/client/static/js/{erDiagram-OPXOYQCR-vnkztq7d.js → erDiagram-OPXOYQCR-24ctv2ee.js} +6 -6
  40. package/dist/client/static/js/{erlang-jqqa3ehb.js → erlang-zwy7cqdk.js} +1 -1
  41. package/dist/client/static/js/eventmodeling-NTZA5JFV-6wrjccyw.js +1 -0
  42. package/dist/client/static/js/flowDiagram-KWPJA3E3-19vjkg84.js +1 -0
  43. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-pbvcch52.js → ganttDiagram-FUAMR5RP-766a8fqw.js} +2 -2
  44. package/dist/client/static/js/gitGraph-4MIJSDKK-4je2p50v.js +1 -0
  45. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-dkvktvzr.js → gitGraphDiagram-X574FWY7-fmwjkgh6.js} +2 -2
  46. package/dist/client/static/js/graphql-gvb7e2eb.js +1 -0
  47. package/dist/client/static/js/html-bwyt0ayy.js +1 -0
  48. package/dist/client/static/js/{index-rc8wrs2a.js → index-03pyvmcz.js} +2 -2
  49. package/dist/client/static/js/index-13dr1t1r.js +314 -0
  50. package/dist/client/static/js/{index-rebnv57p.js → index-13xbwcbz.js} +2 -2
  51. package/dist/client/static/js/{index-pbsm2vw7.js → index-1c0pnsjd.js} +2 -2
  52. package/dist/client/static/js/index-1rxa9zxp.js +1 -0
  53. package/dist/client/static/js/{index-c6kx7s6a.js → index-2hpy58d0.js} +2 -2
  54. package/dist/client/static/js/{index-f8pq132s.js → index-2x9eqztp.js} +1 -1
  55. package/dist/client/static/js/{index-pn91shfp.js → index-4cncqz8j.js} +2 -2
  56. package/dist/client/static/js/index-4j8rgr4p.js +1 -0
  57. package/dist/client/static/js/{index-x2kb1kx5.js → index-4mstdh41.js} +3 -3
  58. package/dist/client/static/js/index-4z4ax55k.js +12 -0
  59. package/dist/client/static/js/{index-55hq7tnj.js → index-6ge6gk9w.js} +1 -1
  60. package/dist/client/static/js/{index-re1xz433.js → index-7t63akyt.js} +1 -1
  61. package/dist/client/static/js/{index-zye9309h.js → index-8b3t2y77.js} +2 -2
  62. package/dist/client/static/js/index-8hgm0abr.js +474 -0
  63. package/dist/client/static/js/index-8jqawh3r.js +2 -0
  64. package/dist/client/static/js/index-95en3p3g.js +9 -0
  65. package/dist/client/static/js/{index-rdqn92tc.js → index-97qst4k9.js} +2 -2
  66. package/dist/client/static/js/{index-xfa5hswh.js → index-9vdbnvmk.js} +1 -1
  67. package/dist/client/static/js/{index-zfykeg7x.js → index-a9t9gdew.js} +9 -9
  68. package/dist/client/static/js/{index-ds6a2cx7.js → index-b4y5g48d.js} +5 -5
  69. package/dist/client/static/js/{index-hz177dr2.js → index-czagykbq.js} +2 -2
  70. package/dist/client/static/js/{index-yq9vnd1y.js → index-dfqmwm7j.js} +2 -2
  71. package/dist/client/static/js/{index-tgper3yy.js → index-dydwcp3n.js} +2 -2
  72. package/dist/client/static/js/{index-0c6vpk89.js → index-e1yz59fa.js} +2 -2
  73. package/dist/client/static/js/{index-ce4vytm6.js → index-e6any867.js} +2 -2
  74. package/dist/client/static/js/{index-j5ram1ve.js → index-ejdnjh5c.js} +2 -2
  75. package/dist/client/static/js/index-f4vr1c6e.css +1 -0
  76. package/dist/client/static/js/{index-cytks03p.js → index-feffxxss.js} +2 -2
  77. package/dist/client/static/js/{index-6fx2t6y7.js → index-grczkttn.js} +12 -12
  78. package/dist/client/static/js/{index-s78n0dtv.js → index-hga3e13s.js} +2 -2
  79. package/dist/client/static/js/{index-ajjq0b8y.js → index-hw14rhen.js} +2 -2
  80. package/dist/client/static/js/index-hzwr5fm9.js +4 -0
  81. package/dist/client/static/js/{index-sj4y8kj2.js → index-j17h4z6f.js} +2 -2
  82. package/dist/client/static/js/{index-a4ed3mks.js → index-ka2rc2cr.js} +5 -5
  83. package/dist/client/static/js/{index-djv15k5s.js → index-ktbrmp29.js} +2 -2
  84. package/dist/client/static/js/{index-3rymer2w.js → index-nbexks3x.js} +1 -1
  85. package/dist/client/static/js/{index-ngk9h0v9.js → index-nh29fkk9.js} +2 -2
  86. package/dist/client/static/js/{index-gn92c6hp.js → index-p0ez6hqd.js} +2 -2
  87. package/dist/client/static/js/{index-e7yf273s.js → index-pkes9492.js} +2 -2
  88. package/dist/client/static/js/{index-fg965t62.js → index-pysqpc5n.js} +2 -2
  89. package/dist/client/static/js/index-qj34r6d0.js +1 -0
  90. package/dist/client/static/js/{index-ntcqyqd5.js → index-qx6x4z0y.js} +2 -2
  91. package/dist/client/static/js/{index-agdbjh5k.js → index-r8cc80w5.js} +2 -2
  92. package/dist/client/static/js/{index-9dnkfpx4.js → index-rab39785.js} +2 -2
  93. package/dist/client/static/js/{index-haaz8t7e.js → index-sk9ej289.js} +2 -2
  94. package/dist/client/static/js/{index-9fnzcg2x.js → index-sq3r1xhf.js} +2 -2
  95. package/dist/client/static/js/{index-pfbyfab5.js → index-sx809d6d.js} +2 -2
  96. package/dist/client/static/js/{index-7w3gqw2b.js → index-sz3mxjvy.js} +1 -1
  97. package/dist/client/static/js/{index-4jk8ngjg.js → index-tqycj126.js} +2 -2
  98. package/dist/client/static/js/{index-0xaz2eyv.js → index-vcn1kcpy.js} +3 -3
  99. package/dist/client/static/js/{index-2z9wrb46.js → index-x7f5ysch.js} +2 -2
  100. package/dist/client/static/js/index-xe5cqwnf.js +1 -0
  101. package/dist/client/static/js/index-xxe52zrm.js +2 -0
  102. package/dist/client/static/js/{index-amawahyh.js → index-yvxa7hd8.js} +2 -2
  103. package/dist/client/static/js/{index-e6qjfcz9.js → index-z6kpc98a.js} +1 -1
  104. package/dist/client/static/js/{index-yzg9mbsv.js → index-zjydzxhm.js} +1 -1
  105. package/dist/client/static/js/{index-ne131hmw.js → index-zvazj4va.js} +2 -2
  106. package/dist/client/static/js/info-A6RAGUB7-k0z5qdew.js +1 -0
  107. package/dist/client/static/js/{infoDiagram-VRGFBTTK-mh6yks62.js → infoDiagram-VRGFBTTK-tqytmzp1.js} +1 -1
  108. package/dist/client/static/js/ini-2gvjwh83.js +1 -0
  109. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-hnfqppnv.js → ishikawaDiagram-OU5B5YK6-rp77ff6m.js} +1 -1
  110. package/dist/client/static/js/java-1xwcq79s.js +1 -0
  111. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-s4nv1f3q.js → journeyDiagram-ZHPQQLJL-c7bxrhf1.js} +2 -2
  112. package/dist/client/static/js/json-4pqjabgq.js +1 -0
  113. package/dist/client/static/js/jsx-wcsss15s.js +1 -0
  114. package/dist/client/static/js/{julia-yre4bxb9.js → julia-2eekpjq8.js} +1 -1
  115. package/dist/client/static/js/{kanban-definition-PNTS6WVX-t8kbfefp.js → kanban-definition-PNTS6WVX-j2pxewqq.js} +5 -5
  116. package/dist/client/static/js/lua-h7vjcn0h.js +1 -0
  117. package/dist/client/static/js/markdown-f30jjjh9.js +1 -0
  118. package/dist/client/static/js/{mermaid.core-0784021p.js → mermaid.core-cqqe1krg.js} +6 -6
  119. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-swkkze8c.js → mindmap-definition-NLK3R4M7-s03k32p9.js} +5 -5
  120. package/dist/client/static/js/one-dark-pro-9tt0a020.js +1 -0
  121. package/dist/client/static/js/one-light-5fg4r0ra.js +1 -0
  122. package/dist/client/static/js/packet-AYTQ26CC-6cnvmb2z.js +1 -0
  123. package/dist/client/static/js/{pegDiagram-GJSIUBJH-jqayzh7z.js → pegDiagram-GJSIUBJH-dfg2j0zc.js} +1 -1
  124. package/dist/client/static/js/{perl-weeskn1v.js → perl-5vxax0nr.js} +1 -1
  125. package/dist/client/static/js/{php-vf3045p9.js → php-hgrgdq63.js} +1 -1
  126. package/dist/client/static/js/pie-WAS4IAKB-m9z1mztn.js +1 -0
  127. package/dist/client/static/js/{pieDiagram-5QR66LMP-w03a65ky.js → pieDiagram-5QR66LMP-pshd1j79.js} +1 -1
  128. package/dist/client/static/js/properties-ymexza6q.js +1 -0
  129. package/dist/client/static/js/python-31ycwa66.js +1 -0
  130. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-2j7sfa9s.js → quadrantDiagram-O4NWA36T-cvvvmtk2.js} +4 -4
  131. package/dist/client/static/js/r-t2nne4xp.js +1 -0
  132. package/dist/client/static/js/radar-RG4KPBEZ-8m9rkex6.js +1 -0
  133. package/dist/client/static/js/railroad-74A4TZTK-wc55emj8.js +1 -0
  134. package/dist/client/static/js/railroad-abnf-HS5TGJTU-2y2rnrzq.js +1 -0
  135. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-zzcc9x0v.js +1 -0
  136. package/dist/client/static/js/railroad-peg-WCYAUIDC-z82na5nb.js +1 -0
  137. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-jtkkgy34.js → railroadDiagram-XR7U4H2S-h53p3sha.js} +1 -1
  138. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-t85ckjdb.js → requirementDiagram-PLB6GJNP-bdv2fkxd.js} +4 -4
  139. package/dist/client/static/js/{ruby-1a2ryzy6.js → ruby-8pxcn21w.js} +1 -1
  140. package/dist/client/static/js/{rust-736r0f0v.js → rust-j80dxgjg.js} +1 -1
  141. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-5pfkw8ne.js → sankeyDiagram-IPEJSGJF-xqnnvmhy.js} +2 -2
  142. package/dist/client/static/js/{sass-tq4vw7hd.js → sass-bm32bb5k.js} +1 -1
  143. package/dist/client/static/js/{scss-x7ddw6gb.js → scss-e2dndbfa.js} +1 -1
  144. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-55vs9zv5.js → sequenceDiagram-PO4LG4MO-3p67305f.js} +10 -10
  145. package/dist/client/static/js/{sizeCapture-INFHLROL-pzqqd7f4.js → sizeCapture-INFHLROL-f87525h7.js} +1 -1
  146. package/dist/client/static/js/sql-bwnasywx.js +1 -0
  147. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-6nhrph8n.js → stateDiagram-v2-GCMORJYK-e5st1fy3.js} +6 -6
  148. package/dist/client/static/js/{svelte-0hv6pak2.js → svelte-ztkaww47.js} +1 -1
  149. package/dist/client/static/js/{swimlanes-2SLR337P-6tcnxfbv.js → swimlanes-2SLR337P-ceghkbez.js} +1 -1
  150. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-vc8hvfya.js +8 -0
  151. package/dist/client/static/js/{timeline-definition-EJHVYXUP-1dz46nt5.js → timeline-definition-EJHVYXUP-f7evs443.js} +2 -2
  152. package/dist/client/static/js/treeView-Q6P3EWNA-kzh6cm3f.js +1 -0
  153. package/dist/client/static/js/treemap-WGGIJYW6-wz5ed560.js +1 -0
  154. package/dist/client/static/js/tsx-zfy727zs.js +1 -0
  155. package/dist/client/static/js/typescript-p3syh43m.js +1 -0
  156. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-b3jfveq6.js → usecaseDiagram-POWQR4AR-0gpn21p7.js} +27 -27
  157. package/dist/client/static/js/{vennDiagram-UO4OBE2U-dnc3jqvp.js → vennDiagram-UO4OBE2U-4spzy428.js} +1 -1
  158. package/dist/client/static/js/{vue-zccj3qa5.js → vue-xm1dxpmy.js} +1 -1
  159. package/dist/client/static/js/wardley-WFR3VGLG-zewbfccz.js +1 -0
  160. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-466m8400.js → wardleyDiagram-VNRHLVJA-745xr2pa.js} +4 -4
  161. package/dist/client/static/js/xml-4enq788a.js +1 -0
  162. package/dist/client/static/js/xychartDiagram-PMCCYNJV-7dr9qwx5.js +7 -0
  163. package/dist/client/static/js/yaml-pjtt3jsc.js +1 -0
  164. package/package.json +1 -1
  165. package/src/client/components/common/batch-selection/folder-state.ts +2 -2
  166. package/src/client/components/common/server-control/Panel.tsx +16 -5
  167. package/src/client/components/common/server-control/index.test.tsx +63 -9
  168. package/src/client/components/common/session-row/TrailingSlot.tsx +8 -0
  169. package/src/client/components/common/session-row/index.tsx +16 -9
  170. package/src/client/components/layout/session-sidebar/CategoryItem.tsx +1 -1
  171. package/src/client/components/layout/session-sidebar/ClassicView.tsx +13 -0
  172. package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +175 -0
  173. package/src/client/components/layout/session-sidebar/SessionList.tsx +9 -1
  174. package/src/client/components/layout/session-sidebar/SessionsView.tsx +6 -0
  175. package/src/client/components/layout/session-sidebar/harness-filter.test.tsx +173 -0
  176. package/src/client/components/layout/session-sidebar/modern/FilterChips.tsx +63 -18
  177. package/src/client/components/layout/session-sidebar/modern/SearchField.tsx +1 -1
  178. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +21 -12
  179. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -1
  180. package/src/client/components/layout/session-sidebar/modern/index.tsx +11 -2
  181. package/src/client/components/layout/session-sidebar/modern/search-field.test.tsx +96 -0
  182. package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +3 -0
  183. package/src/client/components/layout/session-sidebar/variant-props.ts +7 -0
  184. package/src/client/components/mobile/SessionSidebar.tsx +14 -25
  185. package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +19 -0
  186. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +1 -1
  187. package/src/client/components/settings/categories/omp-settings/EngineHeader.tsx +1 -1
  188. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.image.test.ts +147 -0
  189. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.test.ts +51 -83
  190. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +44 -63
  191. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ReadDirectory.tsx +72 -0
  192. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ReadImage.tsx +51 -0
  193. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/read-test-util.ts +91 -0
  194. package/src/client/components/workspace/git-panel/commit-modal/CommitRow.test.ts +80 -62
  195. package/src/client/components/workspace/git-panel/commit-modal/CommitRow.tsx +15 -33
  196. package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -1
  197. package/src/client/components/workspace/terminal-panel/copy.test.ts +179 -0
  198. package/src/client/components/workspace/terminal-panel/copy.ts +76 -0
  199. package/src/client/components/workspace/terminal-panel/mount.ts +13 -0
  200. package/src/client/data/settings/omp-schema.json +39 -18
  201. package/src/client/hooks/chat/omp/pending-child.test.ts +1 -1
  202. package/src/client/hooks/chat/omp/session-sidebar-controller.test.ts +61 -0
  203. package/src/client/hooks/chat/omp/session-sidebar-controller.ts +37 -39
  204. package/src/client/hooks/chat/omp/sidebar-filter.ts +62 -0
  205. package/src/client/hooks/chat/timeline/session-changes.test.ts +85 -0
  206. package/src/client/hooks/chat/timeline/session-changes.ts +8 -5
  207. package/src/client/hooks/shell/servers.ts +60 -2
  208. package/src/client/hooks/ui/updates/mobile-flow.ts +56 -0
  209. package/src/client/tailwind.css +58 -0
  210. package/src/server/lib/harness/acp/commands.test.ts +1 -0
  211. package/src/server/lib/harness/acp/commands.ts +12 -4
  212. package/src/server/lib/harness/acp/replay-transcript.ts +32 -13
  213. package/src/server/lib/harness/acp/session-transcript.server.test.ts +162 -0
  214. package/src/server/lib/harness/acp/session-transcript.server.ts +350 -0
  215. package/src/server/lib/harness/acp/session.ts +6 -1
  216. package/src/server/lib/harness/schema.server.ts +18 -0
  217. package/src/server/lib/harness/spawn.server.ts +14 -1
  218. package/src/server/lib/models/provider-icon-fetch.ts +2 -2
  219. package/src/server/lib/models/provider-icon-parse.test.ts +0 -12
  220. package/src/server/lib/models/provider-icon-parse.ts +0 -8
  221. package/src/server/lib/omp/rpc/frame-fold.test.ts +16 -1
  222. package/src/server/lib/omp/rpc/frame-fold.ts +17 -4
  223. package/src/server/lib/omp/session/blobs.server.test.ts +34 -0
  224. package/src/server/lib/omp/session/blobs.server.ts +8 -3
  225. package/src/server/lib/omp/session/delete.server.ts +4 -0
  226. package/src/server/lib/omp/session/sidebar-activity.server.test.ts +2 -1
  227. package/src/server/routes/agent/harness-command.test.ts +71 -0
  228. package/src/server/routes/agent/harness-command.ts +27 -13
  229. package/src/server/routes/chat/imported.ts +5 -2
  230. package/src/server/routes/chat/live-meta.ts +42 -0
  231. package/src/server/routes/chat/session.test.ts +110 -0
  232. package/src/server/routes/chat/session.ts +31 -34
  233. package/src/shared/lib/chat/transcript-rows.ts +22 -0
  234. package/src/shared/lib/fs/file-kind.test.ts +46 -3
  235. package/src/shared/lib/fs/file-kind.ts +40 -9
  236. package/src/shared/lib/omp/config/schema-releases.test.ts +29 -0
  237. package/src/shared/lib/workspace/harness-filter.test.ts +89 -0
  238. package/src/shared/lib/workspace/harness-filter.ts +75 -0
  239. package/src/{client/lib → shared/lib/workspace}/session-tree.test.ts +1 -1
  240. package/src/shared/lib/workspace/session-visibility.test.ts +71 -0
  241. package/src/shared/lib/workspace/session-visibility.ts +48 -23
  242. package/src/shared/lib/workspace/sidebar-filter-row.test.ts +64 -23
  243. package/src/shared/lib/workspace/sidebar-filter-row.ts +89 -31
  244. package/dist/client/static/js/ImageView-t330jx6y.js +0 -1
  245. package/dist/client/static/js/LayoutWrapper-qp6nsw65.js +0 -2
  246. package/dist/client/static/js/Modal-sbya4ahp.js +0 -38
  247. package/dist/client/static/js/SessionsView-yqs5m8tj.js +0 -1
  248. package/dist/client/static/js/architecture-7GRP2DOG-1wqga929.js +0 -1
  249. package/dist/client/static/js/architectureDiagram-NJMV4G6O-7jcb7fgy.js +0 -36
  250. package/dist/client/static/js/bash-vv2ysp0a.js +0 -1
  251. package/dist/client/static/js/c-67jyc7sg.js +0 -1
  252. package/dist/client/static/js/c4Diagram-YGBWAQC7-vwac9za0.js +0 -38
  253. package/dist/client/static/js/cpp-crfbnwv8.js +0 -1
  254. package/dist/client/static/js/css-2re5mbea.js +0 -1
  255. package/dist/client/static/js/css-983fbv00.js +0 -1
  256. package/dist/client/static/js/cynefin-OW5HDTMX-j2dpdgkh.js +0 -1
  257. package/dist/client/static/js/diagram-ATOU4E4O-n63cpdnx.js +0 -3
  258. package/dist/client/static/js/diagram-CDSNMT55-v86p14dd.js +0 -30
  259. package/dist/client/static/js/eventmodeling-NTZA5JFV-xjvjawd3.js +0 -1
  260. package/dist/client/static/js/flowDiagram-KWPJA3E3-j21f2bfg.js +0 -1
  261. package/dist/client/static/js/gitGraph-4MIJSDKK-r0zbk95f.js +0 -1
  262. package/dist/client/static/js/graphql-npbd9fdx.js +0 -1
  263. package/dist/client/static/js/html-1cpe2xc8.js +0 -1
  264. package/dist/client/static/js/index-1sw00wm0.js +0 -2
  265. package/dist/client/static/js/index-7fwppdkn.js +0 -1
  266. package/dist/client/static/js/index-ae91g8ka.js +0 -9
  267. package/dist/client/static/js/index-b6cyn4hr.js +0 -314
  268. package/dist/client/static/js/index-efn233xp.js +0 -4
  269. package/dist/client/static/js/index-esx3zwnt.js +0 -1
  270. package/dist/client/static/js/index-fbbp5cwj.js +0 -2
  271. package/dist/client/static/js/index-g1cggqgx.js +0 -12
  272. package/dist/client/static/js/index-ghsdzs4m.js +0 -1
  273. package/dist/client/static/js/index-gs7ytgdw.js +0 -474
  274. package/dist/client/static/js/index-jqs23cc7.css +0 -1
  275. package/dist/client/static/js/index-qjsy6p86.js +0 -1
  276. package/dist/client/static/js/info-A6RAGUB7-a8xap43w.js +0 -1
  277. package/dist/client/static/js/ini-df5bw23e.js +0 -1
  278. package/dist/client/static/js/java-8j33rj1p.js +0 -1
  279. package/dist/client/static/js/json-g5ggnd94.js +0 -1
  280. package/dist/client/static/js/jsx-f6p72qpc.js +0 -1
  281. package/dist/client/static/js/lua-bahx6qze.js +0 -1
  282. package/dist/client/static/js/markdown-9dhg1fax.js +0 -1
  283. package/dist/client/static/js/one-dark-pro-h5tmw145.js +0 -1
  284. package/dist/client/static/js/one-light-x7vj1pxr.js +0 -1
  285. package/dist/client/static/js/packet-AYTQ26CC-b5bvg6v1.js +0 -1
  286. package/dist/client/static/js/pie-WAS4IAKB-77ee73zg.js +0 -1
  287. package/dist/client/static/js/properties-49mfnee4.js +0 -1
  288. package/dist/client/static/js/python-qb69wp1s.js +0 -1
  289. package/dist/client/static/js/r-s3mf2tch.js +0 -1
  290. package/dist/client/static/js/radar-RG4KPBEZ-cp79xtvb.js +0 -1
  291. package/dist/client/static/js/railroad-74A4TZTK-dcpgqhcb.js +0 -1
  292. package/dist/client/static/js/railroad-abnf-HS5TGJTU-qasqv686.js +0 -1
  293. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e46908rd.js +0 -1
  294. package/dist/client/static/js/railroad-peg-WCYAUIDC-7009t6bk.js +0 -1
  295. package/dist/client/static/js/sql-aczp05f2.js +0 -1
  296. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-7xrkrkpa.js +0 -8
  297. package/dist/client/static/js/treeView-Q6P3EWNA-tpn62q8j.js +0 -1
  298. package/dist/client/static/js/treemap-WGGIJYW6-w910f1g4.js +0 -1
  299. package/dist/client/static/js/tsx-s1shkfg9.js +0 -1
  300. package/dist/client/static/js/typescript-htx9v6bf.js +0 -1
  301. package/dist/client/static/js/wardley-WFR3VGLG-pt9tq808.js +0 -1
  302. package/dist/client/static/js/xml-wr1dxav5.js +0 -1
  303. package/dist/client/static/js/xychartDiagram-PMCCYNJV-kryrpqp1.js +0 -7
  304. package/dist/client/static/js/yaml-0y9fdskg.js +0 -1
  305. /package/src/{client/lib → shared/lib/workspace}/session-tree.ts +0 -0
@@ -0,0 +1,2 @@
1
+ import{d,n,o,i,a,e,s,E,ne,Ne,Me,_,ni,rt,Te,_e,b,X,di,Vm}from"./index-8hgm0abr.js";var B={name:"list-filter",size:24,node:[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]},M=s(B);function I({title:t,options:r,methodLabel:p,badge:m,icon:x,onCancel:g}){let f=di({title:t,options:r})?Vm(t):null,h=f?`Allow ${f.tool}`:t||p;return e("div",{className:"flex items-center justify-between border-b border-ink/8 bg-canvas/40 px-5 py-3.5",children:[e("div",{className:"flex items-center gap-3 min-w-0",children:[e("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-ink/12 bg-paper text-ink shadow-xs",children:x}),e("div",{className:"min-w-0",children:[e("div",{className:"flex items-center gap-2",children:[e("h3",{className:"truncate text-[14px] font-semibold tracking-tight text-ink",children:h}),e("span",{className:"flex items-center gap-1 rounded-full border border-ink/10 bg-paper px-2 py-0.5 font-mono text-[10px] font-medium tracking-wider text-ink/60 uppercase",children:[e(Me,{size:9,className:"text-ink/40"}),m]})]}),e("p",{className:"mt-0.5 text-[11px] text-ink/50",children:f?"The agent wants to run this. Review it before you allow.":"Autonomous agent inquiry requiring user confirmation"})]})]}),e("button",{type:"button",onClick:g,"aria-label":"Close dialog (Esc)",title:"Cancel (Esc)",className:"flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-ink/10 text-ink/45 transition-colors hover:border-ink/25 hover:bg-ink/5 hover:text-ink",children:e(b,{size:14})})]})}function T({options:t,optionDetails:r,selectedOption:p,customValue:m,onCustomChange:x,customInputRef:g,onSelect:f,onConfirmOption:h,hideCustomAnswer:l=!1}){return e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[e("span",{children:"Available Options"}),e("span",{className:"font-mono text-[10px] text-ink/40",children:["Press [1-",Math.min(9,t.length),"] to choose"]})]}),e("div",{className:"grid gap-2",role:"radiogroup",children:t.map((k,y)=>{let u=p===k,v=r[y]?.description;return e("button",{type:"button",onClick:()=>f(k),onDblClick:()=>h(k),"aria-checked":u,role:"radio",className:`group flex w-full cursor-pointer items-start gap-3 rounded-xl border p-3.5 text-left transition-all ${u?"border-ink bg-paper shadow-sm ring-1 ring-ink/10":"border-ink/10 bg-canvas/30 hover:border-ink/25 hover:bg-paper"}`,children:[e("span",{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md font-mono text-[11px] font-semibold transition-colors ${u?"bg-ink text-paper":"border border-ink/15 bg-paper text-ink/60 group-hover:border-ink/30 group-hover:text-ink"}`,children:y+1}),e("div",{className:"min-w-0 flex-1",children:[e("div",{className:"flex items-center gap-2",children:e("span",{className:`text-[13px] font-medium leading-snug ${u?"text-ink font-semibold":"text-ink/85"}`,children:k})}),v&&e("div",{className:"mt-1 text-[11.5px] leading-relaxed text-ink/55",children:v})]}),e("span",{className:"mt-0.5 shrink-0",children:u?e(ne,{size:16,className:"text-ink"}):e(ni,{size:16,className:"text-ink/20 group-hover:text-ink/40"})})]},k)})}),!l&&e("div",{className:"space-y-1.5 pt-1",children:[e("div",{className:"text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:"Other: type your own answer"}),e("input",{ref:g,type:"text",value:m,placeholder:"Type a custom answer and press Enter...",onChange:(k)=>x(k.currentTarget.value),onKeyDown:(k)=>{if(k.key==="Enter"){if(k.preventDefault(),k.stopPropagation(),m.trim())h(m.trim())}},className:"w-full rounded-xl border border-ink/15 bg-paper px-4 py-3 text-[13.5px] text-ink placeholder:text-ink/35 outline-none transition-all focus:border-ink focus:ring-2 focus:ring-ink/15"})]})]})}function S({method:t,optionsLength:r,selectedOption:p,hasCustomAnswer:m=!1,onCancel:x,onSubmit:g}){let f=t==="select"&&!p&&!m;return e("div",{className:"flex flex-wrap items-center justify-between gap-3 border-t border-ink/8 bg-canvas/40 px-5 py-3.5",children:[e("div",{className:"flex items-center gap-2 font-mono text-[11px] text-ink/50",children:[t==="select"&&e(d,{children:[e("span",{className:"hidden items-center gap-1 sm:inline-flex",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:["1-",Math.min(9,r)]}),e("span",{className:"text-ink/40",children:"choose"})]}),e("span",{className:"hidden text-ink/30 sm:inline",children:"•"}),e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"↵"}),e("span",{className:"text-ink/40",children:"select"})]})]}),t==="confirm"&&e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"↵"}),e("span",{className:"text-ink/40",children:"confirm"})]}),t==="editor"&&e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"⌘↵"}),e("span",{className:"text-ink/40",children:"save buffer"})]}),e("span",{className:"text-ink/30",children:"•"}),e("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"Esc"}),e("span",{className:"text-ink/40",children:"cancel"})]})]}),e("div",{className:"flex items-center gap-2.5 ml-auto",children:[e("button",{type:"button",onClick:x,className:"flex cursor-pointer items-center gap-1 rounded-lg border border-ink/15 bg-paper px-3.5 py-1.5 text-[12px] font-medium text-ink/70 transition-colors hover:border-ink/30 hover:bg-canvas/50 hover:text-ink",children:[e(b,{size:12,className:"opacity-60"}),e("span",{children:"Cancel"})]}),e("button",{type:"button",onClick:g,disabled:f,className:"flex cursor-pointer items-center gap-1.5 rounded-lg bg-ink px-4 py-1.5 text-[12px] font-semibold text-paper shadow-xs transition-all hover:opacity-90 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-35",children:[e("span",{children:t==="confirm"?"Confirm":t==="select"?"Select Option":"Submit Response"}),e(rt,{size:12,className:"opacity-70"})]})]})]})}function P({title:t,options:r}){let p=di({title:t,options:r})?Vm(t):null;if(!p)return null;return e("div",{className:"space-y-2",children:[p.reason&&e("div",{className:"flex items-start gap-2 rounded-xl border border-warning/25 bg-warning/8 px-3.5 py-2.5 text-[12px] leading-relaxed text-ink/80",children:[e(_,{size:13,className:"mt-0.5 shrink-0 text-warning"}),e("span",{className:"min-w-0 break-words",children:p.reason})]}),p.details.length>0&&e("div",{className:"rounded-xl border border-ink/10 bg-canvas/40 px-3.5 py-2.5",children:p.details.map((m,x)=>e("div",{className:"font-mono text-[11.5px] leading-relaxed text-ink/75 break-all",children:m},`${x}-${m}`))})]})}function R({method:t,options:r,selectedOption:p,onSelectOption:m,customInputRef:x,onSubmit:g,onCancel:f}){o(()=>{let h=(l)=>{if(l.key==="Escape"){l.preventDefault(),l.stopPropagation(),f();return}if(t==="select"&&r.length>0){if(l.target instanceof HTMLInputElement&&l.target===x.current)return;let y=parseInt(l.key,10);if(!isNaN(y)&&y>=1&&y<=r.length){l.preventDefault(),m(r[y-1]);return}if(l.key==="ArrowDown"){l.preventDefault();let u=r.findIndex((N)=>N===p),v=u<r.length-1?u+1:0;m(r[v]);return}if(l.key==="ArrowUp"){l.preventDefault();let u=r.findIndex((N)=>N===p),v=u>0?u-1:r.length-1;m(r[v]);return}if(l.key==="Enter"&&p){l.preventDefault(),g();return}}if(t==="confirm"){if(l.key==="Enter"){l.preventDefault(),g();return}}if(t==="editor"){if((l.metaKey||l.ctrlKey)&&l.key==="Enter"){l.preventDefault(),g();return}}};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[f,g,t,r,p,m,x])}function L(t,r){switch(t){case"select":return{icon:e(M,{size:16,className:"text-ink"}),label:"Decision Required",badge:`${r} Choices`};case"confirm":return{icon:e(E,{size:16,className:"text-ink"}),label:"Confirmation Required",badge:"Confirm Action"};case"input":return{icon:e(_e,{size:16,className:"text-ink"}),label:"Prompt Input",badge:"Text Input"};case"editor":return{icon:e(Te,{size:16,className:"text-ink"}),label:"Buffer Editor",badge:"Multiline Buffer"};default:return{icon:e(Ne,{size:16,className:"text-ink"}),label:"Agent Request",badge:"Input"}}}function ke({request:t,onRespond:r}){let[p,m]=n(t.method==="editor"?t.prefill??"":""),[x,g]=n(null),[f,h]=n(""),l=i(null),k=i(null),y=i(null),u=i(null),v=t.options??[],N=t.optionDetails??[],C=di(t);o(()=>{let c=t.options??[];m(t.method==="editor"?t.prefill??"":""),g(c.length>0?c[0]:null),h("")},[t]),o(()=>{if(l.current?.focus(),t.method==="input")k.current?.focus();else if(t.method==="editor")y.current?.focus();else if(t.method==="select"){if((t.options??[]).some((H)=>/^other\b/i.test(H.trim())))u.current?.focus()}},[t]);let w=a(()=>{r(t,{cancelled:!0})},[r,t]),A=a(()=>{if(t.method==="confirm")r(t,{confirmed:!0});else if(t.method==="select"){if(f.trim()&&!C)r(t,{value:f.trim()});else if(x)r(t,{value:x})}else r(t,{value:p})},[r,t,x,p,f,C]),O=a((c)=>{if(/^other\b/i.test(c.trim())){g(c),u.current?.focus();return}r(t,{value:c})},[r,t]),z=a((c)=>{if(g(c),/^other\b/i.test(c.trim()))u.current?.focus()},[]);R({method:t.method,options:v,selectedOption:x,onSelectOption:g,customInputRef:u,onSubmit:A,onCancel:w});let D=L(t.method,v.length);return e("div",{className:"extension-dialog-backdrop modal-scrim fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6 backdrop-blur-[8px]",onMouseDown:(c)=>{if(c.target===c.currentTarget)w()},children:e("div",{ref:l,role:"dialog","aria-modal":"true","aria-label":t.title||D.label,tabIndex:-1,className:"glass-overlay extension-dialog-panel w-full max-w-[560px] overflow-hidden rounded-2xl border border-ink/15 bg-paper shadow-2xl outline-none",style:{boxShadow:"0 24px 64px -8px color-mix(in srgb, var(--theme-ink) 28%, transparent)"},children:[e(I,{title:t.title,options:v,methodLabel:D.label,badge:D.badge,icon:D.icon,onCancel:w}),e("div",{className:"max-h-[65vh] overflow-y-auto px-6 py-5 space-y-4",children:[e(P,{title:t.title,options:v}),t.message&&e("div",{className:"rounded-xl border border-ink/8 bg-canvas/40 p-4 text-[13px] leading-relaxed text-ink/85 select-text",children:e(X,{content:t.message})}),t.method==="select"&&e(T,{options:v,optionDetails:N,selectedOption:x,customValue:f,onCustomChange:h,customInputRef:u,onSelect:z,onConfirmOption:O,hideCustomAnswer:C}),t.method==="confirm"&&e("div",{className:"flex items-center gap-3 rounded-xl border border-ink/10 bg-canvas/30 p-4",children:[e("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-ink/5 text-ink",children:e(ne,{size:18})}),e("div",{className:"text-[12.5px] leading-relaxed text-ink/75",children:["Confirming will allow the autonomous agent to proceed with this operation. Press ",e("kbd",{className:"rounded border border-ink/20 bg-paper px-1 py-0.2 font-mono text-[10.5px]",children:"Enter"})," to confirm or ",e("kbd",{className:"rounded border border-ink/20 bg-paper px-1 py-0.2 font-mono text-[10.5px]",children:"Esc"})," to abort."]})]}),t.method==="input"&&e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[e("span",{children:"Your Response"}),e("span",{className:"font-mono text-[10px] text-ink/40",children:"Press [Enter] to submit"})]}),e("input",{ref:k,type:t.secret===!0?"password":"text",value:p,placeholder:t.placeholder||"Type your response...",onChange:(c)=>m(c.currentTarget.value),onKeyDown:(c)=>{if(c.key==="Enter")c.preventDefault(),A()},className:"w-full rounded-xl border border-ink/15 bg-paper px-4 py-3 text-[13.5px] text-ink placeholder:text-ink/35 outline-none transition-all focus:border-ink focus:ring-2 focus:ring-ink/15"})]}),t.method==="editor"&&e("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[e("span",{children:"Buffer Content"}),e("span",{className:"font-mono text-[10px] text-ink/40",children:[p.split(`
2
+ `).length," lines · ⌘↵ to save"]})]}),e("textarea",{ref:y,value:p,onChange:(c)=>m(c.currentTarget.value),rows:8,placeholder:t.placeholder||"Enter content...",className:"w-full rounded-xl border border-ink/15 bg-canvas/30 px-4 py-3 font-mono text-[12px] leading-relaxed text-ink placeholder:text-ink/35 outline-none transition-all focus:border-ink focus:bg-paper focus:ring-2 focus:ring-ink/15"})]})]}),e(S,{method:t.method,optionsLength:v.length,selectedOption:x,hasCustomAnswer:f.trim().length>0,onCancel:w,onSubmit:A})]})})}export{ke as ExtensionDialog};
@@ -0,0 +1,9 @@
1
+ import{d,n,o,W,i,u,a,yr,e,vr,ho,Kn,Rp,Ce,S,Lp,ng,cr,ur,s,Ua,Ie,Ga,m,Qn,L,_,tt,f,B,ie,nt,re,fe,ge,Ln,rn,Mn,Y,D,Ea,O,Co,cn,b,ht,it,pe,Hu,ui,J,lt,ct,bt,je,he,X}from"./index-8hgm0abr.js";import{Dp,br}from"./index-x7f5ysch.js";var Bt={name:"folder-tree",size:24,node:[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]},Ue=s(Bt);var Ft={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]},We=s(Ft);function qe({message:t,hasStagedChanges:c,isBusy:l=!1,amend:r=!1,seeded:p=!1,onToggleAmend:h,onChangeMessage:g,onCommit:v}){let y=t.trim().length>0&&!l&&(r||c),P=r?"Rewrite the previous commit with this message":c?"Commit staged changes":"Stage changes first";return e("div",{className:"border-t border-ink/10 bg-canvas/50 p-3 flex flex-col gap-2",children:[e("textarea",{value:t,onChange:(C)=>g(C.currentTarget.value),onKeyDown:(C)=>{if(C.key==="Enter"&&(C.metaKey||C.ctrlKey)&&y)C.preventDefault(),v()},placeholder:r?"New message for the previous commit (⌘/Ctrl+Enter to commit)":"Commit message (⌘/Ctrl+Enter to commit)",rows:5,className:"w-full resize-y min-h-[100px] max-h-[200px] bg-paper border border-ink/20 rounded px-2.5 py-1.5 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),e("div",{className:"flex items-center gap-2",children:[e("label",{className:"flex items-center gap-1.5 text-[11px] text-ink/70 cursor-pointer select-none",children:[e("input",{type:"checkbox",checked:r,onChange:(C)=>h?.(C.currentTarget.checked),className:`${he} accent-ink cursor-pointer`}),"Amend"]}),r&&p&&e("span",{className:"text-[10px] text-ink/40",title:"The previous commit's message, loaded as an editable starting point",children:"previous message loaded"}),e("button",{type:"button",onClick:v,disabled:!y,title:P,className:"ml-auto flex items-center justify-center gap-1.5 px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:[e(f,{size:12}),r?"Amend commit":"Commit"]})]})]})}function Ke({operation:t,conflicts:c,isBusy:l,onAbort:r,onContinue:p}){let h=ho[t],g=c.length,v=g===0,y=t!=="stash-pop";return e("div",{className:"border-t border-warning/30 bg-warning/5 p-3 flex flex-col gap-2",children:[e("div",{className:"flex items-center gap-2 text-xs text-ink",children:[e(_,{size:13,className:"text-warning flex-shrink-0"}),e("span",{className:"font-medium",children:[h.charAt(0).toUpperCase()+h.slice(1)," in progress"]}),e("span",{className:`font-mono tabular-nums text-[10px] ${v?"text-success":"text-warning"}`,children:v?"all conflicts resolved":`${g} conflict${g===1?"":"s"} left`})]}),!v&&e("div",{className:"max-h-20 overflow-y-auto scrollbar-overlay-container font-mono text-[10px] text-warning/90 space-y-0.5",children:c.map((P)=>e("div",{className:"truncate",title:P,children:P},P))}),e("div",{className:"flex items-stretch gap-2",children:[e("button",{type:"button",onClick:r,disabled:l,title:`Abort the ${h} and restore the previous state`,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 rounded border border-error/40 text-error hover:bg-error/10 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:[e(cn,{size:12}),"Abort ",h]}),y&&e("button",{type:"button",onClick:p,disabled:l||!v,title:v?`Conclude the ${h}`:`Resolve all ${g} conflict(s) first`,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 rounded border border-transparent bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:[e(Ln,{size:12}),"Continue ",h]})]})]})}function Ve({branchRef:t,showBranchMenu:c,setShowBranchMenu:l,branch:r,branches:p,remoteBranches:h,onCheckout:g,onMerge:v,onOpenBranchPrompt:y,onManageBranches:P,optionsRef:C,showOptions:R,setShowOptions:N,onHistory:G,onGraph:M,viewMode:k,setViewMode:x,isBusy:w=!1,syncCount:T={ahead:0,behind:0},syncing:F=!1,onSync:H,onFetch:A,detached:z=!1}){return e("div",{className:"p-3 border-b border-ink/10 bg-canvas/50 flex items-center justify-between",children:[e("div",{className:"relative",ref:t,children:[e("button",{onClick:()=>l(!c),className:"flex items-center space-x-1.5 hover:bg-ink/5 px-2 py-1 -ml-2 rounded transition-colors text-[11px] text-ink/80 font-medium",title:z?`Detached HEAD at ${r}`:`On branch ${r}`,children:[e(ge,{size:12,className:z?"text-warning":"text-ink/60"}),e("span",{className:`truncate max-w-[140px] ${z?"font-mono text-warning":""}`,children:r}),e(B,{size:12,className:"text-ink/40"})]}),c&&e("div",{className:"glass-popover absolute top-full left-0 mt-1 w-56 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs",children:e("div",{className:"max-h-48 scrollbar-overlay-container py-1",children:[p.length>0&&e(d,{children:[e("div",{className:"px-3 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold",children:"Local"}),p.map((E)=>e("div",{className:"flex items-center group/branch",children:[e("button",{onClick:()=>{g(E),l(!1)},className:"flex-1 min-w-0 text-left px-3 py-2 hover:bg-ink/5 flex items-center justify-between transition-colors",children:[e("span",{className:"truncate",children:E}),r===E&&e(f,{size:12,className:"text-ink flex-shrink-0"})]}),r!==E&&e("button",{type:"button",onClick:()=>{v(E),l(!1)},title:`Merge ${E} into ${r}`,"aria-label":`Merge ${E} into ${r}`,className:"touch-visible opacity-0 group-hover/branch:opacity-100 px-2 py-2 text-ink/40 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer flex-shrink-0",children:e(Ln,{size:12})})]},E))]}),h.length>0&&e(d,{children:[e("div",{className:"px-3 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold",children:"Remote"}),h.map((E)=>e("div",{className:"flex items-center group/branch",children:[e("button",{onClick:()=>{g(E),l(!1)},className:"flex-1 min-w-0 text-left px-3 py-2 hover:bg-ink/5 flex items-center justify-between transition-colors",children:[e("span",{className:"truncate",children:E}),r===E&&e(f,{size:12,className:"text-ink flex-shrink-0"})]}),r!==E&&e("button",{type:"button",onClick:()=>{v(E),l(!1)},title:`Merge ${E} into ${r}`,"aria-label":`Merge ${E} into ${r}`,className:"touch-visible opacity-0 group-hover/branch:opacity-100 px-2 py-2 text-ink/40 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer flex-shrink-0",children:e(Ln,{size:12})})]},E))]}),e("div",{className:"w-full h-px bg-ink/10 my-1"}),e("button",{onClick:()=>{y(),l(!1)},className:"w-full text-left px-3 py-2 hover:bg-ink/5 flex items-center space-x-2 transition-colors text-ink/80 italic",children:[e(Y,{size:12}),e("span",{children:"Create new branch..."})]}),e("button",{onClick:P,className:"w-full text-left px-3 py-2 hover:bg-ink/5 flex items-center space-x-2 transition-colors text-ink/80",children:[e(Co,{size:12}),e("span",{children:"Manage branches..."})]})]})})]}),e("div",{className:"flex items-center space-x-2 text-ink/40 relative",ref:C,children:[e("button",{type:"button",onClick:A,disabled:w,title:"Fetch from all remotes and prune deleted branches","aria-label":"Fetch",className:"p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:e(Ua,{size:13})}),e("button",{type:"button",onClick:H,disabled:w,title:F?"Syncing with upstream…":T.ahead>0&&T.behind>0?`Pull ${T.behind} then push ${T.ahead} commit(s)`:T.ahead>0?`Push ${T.ahead} commit(s)`:T.behind>0?`Pull ${T.behind} commit(s)`:"Up to date — sync anyway","aria-label":"Sync with upstream","aria-busy":F,className:`flex items-center gap-1 p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors disabled:cursor-not-allowed ${F?"":"disabled:opacity-40"}`,children:[e(D,{size:13,className:F?"animate-spin":"","aria-hidden":"true"}),e("span",{className:"font-mono tabular-nums text-[10px]",children:["↑",T.ahead," ↓",T.behind]})]}),e("button",{type:"button",onClick:G,title:"Commit History","aria-label":"Commit History",className:"p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors",children:e(Qn,{size:13})}),e("button",{type:"button",onClick:M,title:"Git Graph","aria-label":"Git Graph",className:"p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors",children:e(Ln,{size:13})}),e("button",{type:"button",onClick:()=>N(!R),title:"View Options","aria-label":"View Options","aria-expanded":R,className:"p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors",children:e(Ie,{size:13})}),R&&e("div",{className:"glass-popover absolute right-0 top-full mt-1 w-36 bg-paper border border-ink/15 rounded-md shadow-lg z-50 py-1 font-mono text-xs",children:[e("button",{type:"button",onClick:()=>{x("flat"),N(!1)},className:"w-full px-3 py-1.5 text-left text-ink hover:bg-ink/5 flex items-center justify-between transition-colors",children:[e("div",{className:"flex items-center space-x-1.5",children:[e(We,{size:12,className:"text-ink/60"}),e("span",{children:"View as List"})]}),k==="flat"&&e(f,{size:12,className:"text-ink"})]}),e("button",{type:"button",onClick:()=>{x("tree"),N(!1)},className:"w-full px-3 py-1.5 text-left text-ink hover:bg-ink/5 flex items-center justify-between transition-colors",children:[e("div",{className:"flex items-center space-x-1.5",children:[e(Ue,{size:12,className:"text-ink/60"}),e("span",{children:"View as Tree"})]}),k==="tree"&&e(f,{size:12,className:"text-ink"})]})]})]})]})}function Ye({activeRepo:t,repos:c,isRefreshing:l,rootPath:r,reposScanning:p,onSelectRepo:h,onRefresh:g,onRefreshRepos:v}){return e(ht,{left:e(d,{children:[e(Dp,{size:12,className:"text-ink/50 flex-shrink-0","aria-hidden":!0}),e(br,{rootPath:r,activeRepo:t,onSelectRepo:h,repos:c,scanning:p,onRefreshRepos:v})]}),right:e(it,{label:"Refresh",onClick:g,busy:l})})}function Be({change:t,isStaged:c,repo:l,rootPath:r,onAction:p}){let h=Kn(t.status,c),{charStatus:g,colorClass:v}=h,y=t.file.split("/"),P=y.pop()||t.file,C=y.length>0?y.join("/"):"";return e("div",{className:"flex items-center justify-between px-3 py-1 hover:bg-ink/5 cursor-pointer group text-[11px] transition-colors",onClick:()=>{window.dispatchEvent(new CustomEvent("omp:open-diff",{detail:{file:t.file,staged:c,status:g,repo:l||".",root:r}}))},children:[e("div",{className:"flex items-center space-x-1.5 flex-1 min-w-0 pr-2",children:[e("span",{className:`font-bold font-mono text-[10px] w-3 flex-shrink-0 text-center ${v}`,title:`Status: ${h.label}`,children:g}),e(lt,{name:P,size:12,className:"flex-shrink-0"}),e("span",{className:`truncate ${v}`,title:t.file,children:P}),C&&e("span",{className:"text-[10px] text-ink/40 truncate ml-1",children:C})]}),e("div",{className:"flex items-center space-x-1 text-ink/40 flex-shrink-0",children:e("div",{className:"flex items-center touch-visible opacity-0 group-hover:opacity-100 space-x-1",children:[!c&&e(d,{children:[e("button",{type:"button",onClick:(N)=>{N.stopPropagation(),p("revert",t.file)},title:"Discard Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(cn,{size:11})}),e("button",{type:"button",onClick:(N)=>{N.stopPropagation(),p("stage",t.file)},title:"Stage Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Y,{size:11})})]}),c&&e("button",{type:"button",onClick:(N)=>{N.stopPropagation(),p("unstage",t.file)},title:"Unstage Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(rn,{size:11})})]})})]})}function Xe({change:t,repo:c,rootPath:l,onResolve:r}){let[p,h]=n(!1),[g,v]=n(null),y=t.file.split("/"),P=y.pop()||t.file,C=y.length>0?y.join("/"):"",R=()=>{window.dispatchEvent(new CustomEvent("omp:open-diff",{detail:{file:t.file,staged:!1,status:t.status,repo:c,root:l}}))},N=async()=>{let k=!p;if(h(k),k&&g===null){let x=new URLSearchParams({conflictMarkers:"1",file:t.file,repo:c||"."});if(l)x.set("root",l);try{let T=await(await fetch(`/api/fs/git?${x.toString()}`)).json();v(T.markers??{})}catch{v({})}}},G=g?.ours||"ours",M=g?.theirs||"theirs";return e("div",{className:"border-b border-warning/20 last:border-b-0",children:[e("div",{className:"flex items-center justify-between px-3 py-1 hover:bg-warning/5 cursor-pointer group text-[11px] transition-colors",onClick:R,children:[e("div",{className:"flex items-center space-x-1.5 flex-1 min-w-0 pr-2",children:[e(Ga,{size:11,className:"text-warning flex-shrink-0"}),e(lt,{name:P,size:12,className:"flex-shrink-0"}),e("span",{className:"truncate text-warning",title:t.file,children:P}),C&&e("span",{className:"text-[10px] text-ink/40 truncate ml-1",children:C}),vr(t.status)&&e("span",{className:"text-[10px] text-warning/70 font-mono flex-shrink-0",children:t.status})]}),e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),N()},title:p?"Hide resolve actions":"Show resolve actions","aria-label":p?"Hide resolve actions":"Show resolve actions","aria-expanded":p,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors flex-shrink-0",children:p?e(nt,{size:11}):e(B,{size:11})})]}),p&&e("div",{className:"px-3 pb-2 pt-0.5 flex flex-wrap items-center gap-1.5",children:[e("button",{type:"button",onClick:()=>r(t.file,"ours"),title:`Take ${G} — \`git checkout --ours\` then stage`,className:"px-2 py-0.5 text-[10px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/80 hover:text-ink transition-colors cursor-pointer max-w-[45%] truncate",children:["take ",G]}),e("button",{type:"button",onClick:()=>r(t.file,"theirs"),title:`Take ${M} — \`git checkout --theirs\` then stage`,className:"px-2 py-0.5 text-[10px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/80 hover:text-ink transition-colors cursor-pointer max-w-[45%] truncate",children:["take ",M]}),e("button",{type:"button",onClick:()=>r(t.file,""),title:"Mark resolved: the file was edited by hand, this stages it",className:"px-2 py-0.5 text-[10px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/80 hover:text-ink transition-colors cursor-pointer flex items-center gap-1",children:[e(f,{size:10}),"mark resolved"]})]})]})}function Et(t){let c={id:"",name:"",path:"",type:"folder",children:[],changeCount:0};for(let r of t){let p=r.file.replace(/^[./]+/,""),h=p.endsWith("/"),g=p.replace(/\/$/,"").split("/").filter(Boolean),v=c,y="";for(let P=0;P<g.length;P++){let C=g[P];y=y?`${y}/${C}`:C;let R=P===g.length-1;if(R&&!h)v.children.push({id:y,name:C,path:y,type:"file",change:r,children:[],changeCount:1});else{let G=v.children.find((M)=>M.type==="folder"&&M.name===C);if(!G)G={id:y,name:C,path:y,type:"folder",children:[],changeCount:0,change:R&&h?r:void 0},v.children.push(G);v=G}}}function l(r){if(r.type==="file")return 1;let p=r.change?1:0;for(let h of r.children)p+=l(h);return r.changeCount=p,r.children.sort((h,g)=>{if(h.type==="folder"&&g.type==="file")return-1;if(h.type==="file"&&g.type==="folder")return 1;return h.name.localeCompare(g.name)}),p}return l(c),c.children}function Ze(t){let{sessionId:c,ready:l,read:r}=Lp(),p=u(()=>Et(t),[t]),h=u(()=>{let N=new Set;function G(M){for(let k of M)if(k.type==="folder"){if(N.add(k.id),k.children&&k.children.length>0)G(k.children)}}return G(p),N},[p]),[g,v]=S("git.expandedFolders",[]),y=u(()=>new Set(g),[g]),P=i(null);o(()=>{if(!l||P.current===c)return;if(h.size===0)return;if(P.current=c,r("git.expandedFolders",[]).length>0)return;v(Array.from(h))},[l,c,h,r,v]);let C=a((N)=>{v((G)=>{let M=new Set(G);if(M.has(N))M.delete(N);else M.add(N);return Array.from(M)})},[v]),R=a((N)=>y.has(N),[y]);return{tree:p,expandedFolders:y,toggleFolder:C,isFolderOpen:R,expandAll:()=>v(Array.from(h)),collapseAll:()=>v([])}}function Fe({node:t,isStaged:c,isFolderOpen:l,toggleFolder:r,onAction:p,repo:h,rootPath:g}){let v=t.type==="folder",y=v?l(t.id):!1;if(v)return e("div",{className:"select-none",children:[e("div",{className:"flex items-center justify-between px-2 py-1 hover:bg-ink/5 cursor-pointer rounded group transition-colors text-[11px]",onClick:()=>r(t.id),children:[e("div",{className:"flex items-center space-x-1.5 flex-1 min-w-0 pr-1",children:[e("span",{className:"w-3.5 h-3.5 flex items-center justify-center text-ink/40 flex-shrink-0",children:y?e(B,{size:12}):e(ie,{size:12})}),e(lt,{name:t.name,isFolder:!0,isOpen:y,size:13,className:"flex-shrink-0"}),e("span",{className:"font-medium text-ink truncate",children:t.name}),e("span",{className:"text-[10px] text-ink/40 font-normal px-1 py-0.2 bg-ink/5 rounded-full ml-1",children:t.changeCount})]}),e("div",{className:"flex items-center space-x-1 text-ink/40 flex-shrink-0",children:e("div",{className:"flex items-center touch-visible opacity-0 group-hover:opacity-100 space-x-1",children:!c?e(d,{children:[e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),p("revert",t.path)},title:`Discard changes in ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(cn,{size:11})}),e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),p("stage",t.path)},title:`Stage ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Y,{size:11})})]}):e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),p("unstage",t.path)},title:`Unstage ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(rn,{size:11})})})})]}),y&&t.children&&t.children.length>0&&e("div",{className:"ml-3 border-l border-ink/10 pl-1",children:t.children.map((k)=>e(Fe,{node:k,isStaged:c,isFolderOpen:l,toggleFolder:r,onAction:p,repo:h,rootPath:g},k.id))})]});let P=t.change,C=Kn(P?.status||"M",c),{charStatus:R,colorClass:N}=C,G=P?P.file:t.path;return e("div",{className:"flex items-center justify-between px-2 py-0.5 hover:bg-ink/5 cursor-pointer rounded group transition-colors text-[11px]",onClick:()=>{window.dispatchEvent(new CustomEvent("omp:open-diff",{detail:{file:G,staged:c,status:R,repo:h||".",root:g}}))},children:[e("div",{className:"flex items-center space-x-1.5 flex-1 min-w-0 pr-1",children:[e("span",{className:"w-3.5 h-3.5 flex items-center justify-center flex-shrink-0",children:e("span",{className:`font-bold font-mono text-[10px] ${N}`,title:`Status: ${C.label}`,children:R})}),e(lt,{name:t.name,size:12,className:"flex-shrink-0"}),e("span",{className:`truncate ${N}`,title:G,children:t.name})]}),e("div",{className:"flex items-center space-x-1 text-ink/40 flex-shrink-0",children:e("div",{className:"flex items-center touch-visible opacity-0 group-hover:opacity-100 space-x-1",children:!c?e(d,{children:[e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),p("revert",G)},title:"Discard Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(cn,{size:11})}),e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),p("stage",G)},title:"Stage Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Y,{size:11})})]}):e("button",{type:"button",onClick:(k)=>{k.stopPropagation(),p("unstage",G)},title:"Unstage Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(rn,{size:11})})})})]})}function Ee({changes:t,isStaged:c,repo:l,rootPath:r,onAction:p}){let{tree:h,isFolderOpen:g,toggleFolder:v}=Ze(t);if(h.length===0)return null;return e("div",{className:"py-0.5",children:h.map((y)=>e(Fe,{node:y,isStaged:c,isFolderOpen:g,toggleFolder:v,onAction:p,repo:l,rootPath:r},y.id))})}function Qe({changes:t,isLoading:c,viewMode:l,repo:r,rootPath:p,onAction:h,onResolve:g}){let[v,y]=S("git.stagedExpanded",!0),[P,C]=S("git.unstagedExpanded",!0),[R,N]=S("git.conflictsExpanded",!0),G=t.filter((x)=>vr(x.status)),M=t.filter((x)=>{if(vr(x.status))return!1;let w=x.status;return w&&w[0]!==" "&&w[0]!=="?"}),k=t.filter((x)=>{if(vr(x.status))return!1;let w=x.status;return w&&w[1]!==" "&&w[1]!=="?"||w==="??"});if(c&&t.length===0)return e("div",{className:"flex-1 scrollbar-overlay-container font-mono text-[11px] text-ink/80",children:e("div",{className:"p-4 text-center text-ink/40 italic",children:"Loading..."})});if(t.length===0)return e("div",{className:"flex-1 scrollbar-overlay-container font-mono text-[11px] text-ink/80",children:e("div",{className:"p-4 text-center text-ink/40 italic",children:"No changes found."})});return e("div",{className:"flex-1 scrollbar-overlay-container font-mono text-[11px] text-ink/80",children:e("div",{className:"py-1",children:[G.length>0&&e("div",{className:"mb-2",children:[e("div",{className:"flex items-center justify-between px-3 py-1 group hover:bg-warning/5 cursor-pointer transition-colors",onClick:()=>N(!R),children:e("div",{className:"flex items-center space-x-1 font-semibold text-warning text-xs",children:[e("span",{className:"w-3 text-center",children:R?"▾":"▸"}),e("span",{children:"Conflicts"}),e("span",{className:"text-warning/70 font-normal ml-1 border border-warning/30 rounded-full px-1.5 text-[10px] bg-paper",children:G.length})]})}),R&&G.map((x)=>e(Xe,{change:x,repo:r,rootPath:p,onResolve:g??(()=>{})},`conflict-${x.file}`))]}),M.length>0&&e("div",{className:"mb-2",children:[e("div",{className:"flex items-center justify-between px-3 py-1 group hover:bg-ink/5 cursor-pointer transition-colors",onClick:()=>y(!v),children:[e("div",{className:"flex items-center space-x-1 font-semibold text-ink text-xs",children:[e("span",{className:"w-3 text-center",children:v?"▾":"▸"}),e("span",{children:"Staged Changes"}),e("span",{className:"text-ink/40 font-normal ml-1 border border-ink/20 rounded-full px-1.5 text-[10px] bg-paper",children:M.length})]}),e("div",{className:"touch-visible opacity-0 group-hover:opacity-100 flex items-center space-x-1 text-ink/40 flex-shrink-0",children:e("button",{type:"button",onClick:(x)=>{x.stopPropagation(),h("unstage_all")},title:"Unstage All Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(rn,{size:12})})})]}),v&&(l==="tree"?e(Ee,{changes:M,isStaged:!0,repo:r,rootPath:p,onAction:h}):M.map((x)=>e(Be,{change:x,isStaged:!0,repo:r,rootPath:p,onAction:h},x.file+"staged")))]}),k.length>0&&e("div",{children:[e("div",{className:"flex items-center justify-between px-3 py-1 group hover:bg-ink/5 cursor-pointer transition-colors",onClick:()=>C(!P),children:[e("div",{className:"flex items-center space-x-1 font-semibold text-ink text-xs",children:[e("span",{className:"w-3 text-center",children:P?"▾":"▸"}),e("span",{children:"Changes"}),e("span",{className:"text-ink/40 font-normal ml-1 border border-ink/20 rounded-full px-1.5 text-[10px] bg-paper",children:k.length})]}),e("div",{className:"touch-visible opacity-0 group-hover:opacity-100 flex items-center space-x-1 text-ink/40 flex-shrink-0",children:[e("button",{type:"button",onClick:(x)=>{x.stopPropagation(),h("revert_all")},title:"Discard All Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(cn,{size:12})}),e("button",{type:"button",onClick:(x)=>{x.stopPropagation(),h("stage_all")},title:"Stage All Changes",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Y,{size:12})})]})]}),P&&(l==="tree"?e(Ee,{changes:k,isStaged:!1,repo:r,rootPath:p,onAction:h}):k.map((x)=>e(Be,{change:x,isStaged:!1,repo:r,rootPath:p,onAction:h},x.file+"unstaged")))]})]})})}function Je({matches:t,loaded:c,total:l,hasMore:r,isFiltering:p}){if(p)return`${t} of ${c} loaded`;if(typeof l==="number"&&l>0)return r||c<l?`${c} of ${l}`:`${l} commits`;return r?`${c}+ commits`:`${c} commits`}function et({isGraphMode:t,onToggleMode:c,searchQuery:l,onSearchChange:r,onRefresh:p,onClose:h,isRefreshing:g,totalCommits:v,loadedCount:y,totalCount:P,hasMore:C}){let R=Je({matches:v,loaded:y,total:P,hasMore:C,isFiltering:l.trim().length>0});return e("div",{className:`flex flex-col gap-2 px-3 lg:px-5 py-3 border-b border-ink/10 bg-paper select-none
2
+ pl-[max(0.75rem,env(safe-area-inset-left,0px))] pr-[max(0.75rem,env(safe-area-inset-right,0px))]`,children:[e("div",{className:"flex items-center justify-between gap-2 lg:gap-4",children:[e("div",{className:"flex flex-col min-w-0",children:[e("div",{className:"flex items-center gap-2.5 min-w-0",children:[e("h2",{className:"text-base font-semibold text-ink tracking-tight",children:t?"Graph":"History"}),e("span",{className:"text-[11px] font-mono px-2 py-0.5 rounded-full bg-ink/5 text-ink/80 border border-ink/10 whitespace-nowrap",children:R})]}),e("p",{className:"text-xs text-muted mt-0.5 hidden lg:block",children:t?"Follow branch topology and inspect commits.":"Browse recent commits and inspect changed files."})]}),e("div",{className:"flex items-center gap-1.5 lg:gap-2 flex-shrink-0",children:[e("div",{className:"flex items-center text-xs lg:bg-ink/5 lg:p-0.5 lg:rounded-lg lg:border lg:border-ink/10",children:[e("button",{type:"button",onClick:()=>c(!1),title:"History view","aria-label":"History view","aria-pressed":!t,className:`tap-target flex items-center justify-center gap-1.5 p-2 rounded-md font-medium transition-colors cursor-pointer lg:px-2.5 lg:py-1 ${!t?"bg-ink/5 text-ink lg:bg-paper lg:shadow-xs":"text-ink/80 lg:hover:text-ink lg:hover:bg-ink/5"}`,children:[e(Qn,{size:13,"aria-hidden":"true"}),e("span",{className:"hidden lg:inline",children:"History"})]}),e("button",{type:"button",onClick:()=>c(!0),title:"Graph view","aria-label":"Graph view","aria-pressed":t,className:`tap-target flex items-center justify-center gap-1.5 p-2 rounded-md font-medium transition-colors cursor-pointer lg:px-2.5 lg:py-1 ${t?"bg-ink/5 text-ink lg:bg-paper lg:shadow-xs":"text-ink/80 lg:hover:text-ink lg:hover:bg-ink/5"}`,children:[e(Ln,{size:13,"aria-hidden":"true"}),e("span",{className:"hidden lg:inline",children:"Graph"})]})]}),e("button",{type:"button",onClick:p,disabled:g,className:"tap-target flex items-center justify-center gap-1.5 p-2 rounded-md text-ink/70 transition-colors cursor-pointer text-xs disabled:opacity-40 lg:px-2.5 lg:py-1.5 lg:border lg:border-ink/15 lg:hover:bg-ink/5 lg:hover:text-ink",title:"Refresh commit history","aria-label":"Refresh commit history",children:[e(Ea,{size:13,className:g?"animate-spin text-ink":"","aria-hidden":"true"}),e("span",{className:"hidden lg:inline",children:"Refresh"})]}),e("button",{type:"button",onClick:h,className:"tap-target p-2 -mr-1 rounded-md hover:bg-ink/5 text-muted hover:text-ink transition-colors cursor-pointer",title:"Close modal","aria-label":"Close commit history",children:e(b,{size:16,"aria-hidden":"true"})})]})]}),e("div",{className:"relative mt-1",children:[e(O,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-ink/55","aria-hidden":"true"}),e("input",{type:"text",value:l,onChange:(N)=>r(N.currentTarget.value),placeholder:"Filter commits by message, author, or hash...","aria-label":"Filter commits",className:"w-full bg-ink/[0.03] border border-ink/15 rounded-md pl-8 pr-3 py-1.5 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),l&&e("button",{type:"button",onClick:()=>r(""),"aria-label":"Clear filter",className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-ink/55 hover:text-ink cursor-pointer",children:e(b,{size:12,"aria-hidden":"true"})})]})]})}var ce=["#38bdf8","#f97316","#a855f7","#10b981","#ec4899","#eab308","#06b6d4","#6366f1"];function He(t,c){if(!t||!c)return!1;if(t===c)return!0;let l=Math.min(t.length,c.length);if(l>=4)return t.substring(0,l)===c.substring(0,l);return!1}function Ge(t){let c=new Map,l=[];for(let r of t){if(typeof r.lane==="number"){c.set(r.hash,r.lane);continue}let p=l.findIndex((g)=>He(g,r.hash)||He(g,r.shortHash));if(p===-1)if(p=l.indexOf(null),p===-1)p=l.length,l.push(r.hash);else l[p]=r.hash;c.set(r.hash,p);let h=r.parents&&r.parents[0];if(h)l[p]=h;else l[p]=null;if(r.parents&&r.parents.length>1)for(let g=1;g<r.parents.length;g++){let v=r.parents[g];if(!l.some((P)=>He(P,v))){let P=l.indexOf(null);if(P===-1)l.push(v);else l[P]=v}}}return c}function ot(t,c,l,r){let p=[],h=new Map;t.forEach((g,v)=>{if(h.set(g.hash,v),g.shortHash)h.set(g.shortHash,v);if(g.hash.length>=7)h.set(g.hash.substring(0,7),v)});for(let g of t){let v=c.get(g.hash)??0,y=l[g.hash]??0,P=ce[v%ce.length];if(!g.parents||g.parents.length===0)continue;for(let C of g.parents){let R=h.get(C);if(typeof R!=="number"&&C.length>=7)R=h.get(C.substring(0,7));if(typeof R==="number"){let N=t[R],G=c.get(N.hash)??v,M=l[N.hash]??y+60;p.push({fromHash:g.hash,toHash:N.hash,fromLane:v,toLane:G,fromY:y,toY:M,color:ce[v%ce.length]})}else p.push({fromHash:g.hash,toHash:"tail-"+g.hash,fromLane:v,toLane:v,fromY:y,toY:Math.max(y+80,r),color:P})}}return p}function rt(t,c,l,r){if(Math.abs(t-l)<1)return`M ${t} ${c} L ${l} ${r}`;let p=r-c,h=c+p*0.45,g=r-p*0.45;return`M ${t} ${c} C ${t} ${h}, ${l} ${g}, ${l} ${r}`}function st({commits:t,nodePositions:c,selectedHash:l,hoveredHash:r,isGraphMode:p,laneWidth:h=18,paddingLeft:g=16,totalHeight:v}){let y=u(()=>{if(!p){let N=new Map;return t.forEach((G)=>N.set(G.hash,0)),N}return Ge(t)},[t,p]),P=u(()=>{let N=0;return y.forEach((G)=>{if(G>N)N=G}),N},[y]),C=p?(P+1)*h+g*2:36,R=u(()=>{if(!p){let N=[];for(let G=0;G<t.length-1;G++){let M=c[t[G].hash]??G*60+20,k=c[t[G+1].hash]??(G+1)*60+20;N.push({fromHash:t[G].hash,toHash:t[G+1].hash,fromLane:0,toLane:0,fromY:M,toY:k,color:"var(--theme-ink)"})}return N}return ot(t,y,c,v)},[t,y,c,v,p]);return e("div",{className:"absolute top-0 left-0 pointer-events-none z-10",style:{width:C,height:v},"aria-hidden":"true",children:e("svg",{className:"w-full h-full overflow-visible",style:{width:C,height:v},children:[R.map((N)=>{let G=p?g+N.fromLane*h:16,M=p?g+N.toLane*h:16,k=p?N.color:"currentColor",x=p?0.95:0.25,w=rt(G,N.fromY,M,N.toY);return e("path",{d:w,fill:"none",stroke:k,strokeWidth:p?2.25:1.5,strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:x},`${N.fromHash}->${N.toHash}`)}),t.map((N)=>{let G=y.get(N.hash)??0,M=p?g+G*h:16,k=c[N.hash]??20,x=l===N.hash||l===N.shortHash,w=r===N.hash||r===N.shortHash,T=p?ce[G%ce.length]:"var(--theme-success)";return e("g",{"data-commit-node":N.hash,children:[(x||w)&&e("circle",{cx:M,cy:k,r:8,fill:T,fillOpacity:x?0.35:0.2,stroke:T,strokeWidth:1}),e("circle",{"data-commit-dot":"",cx:M,cy:k,r:p?4:4.5,fill:p?"var(--theme-paper)":T,stroke:T,strokeWidth:p?2.5:1.5}),p&&e("circle",{cx:M,cy:k,r:1.8,fill:T})]},`node-${N.hash}`)})]})})}var Ht=[{action:"checkout",label:"checkout"},{action:"create_branch_here",label:"create branch here"},{action:"cherry_pick",label:"cherry-pick"},{action:"revert",label:"revert"},{action:"reset",label:"reset..."},{action:"merge",label:"merge into current"},{action:"rebase",label:"rebase onto this"}];function at({commit:t,onAction:c}){return e("div",{className:"flex flex-wrap items-center gap-1.5 pt-1.5 pb-2",children:Ht.map(({action:l,label:r})=>e("button",{type:"button",onClick:(p)=>{p.stopPropagation(),c(l,t)},className:"px-2.5 py-1 text-[11px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/80 hover:text-ink transition-colors cursor-pointer",children:r},l))})}var Se=3;function zt(t){let c=[];for(let l=0;l<t.length;l+=1){if(t[l].type!=="context"){c.push({row:t[l],index:l});continue}let r=l;while(r<t.length&&t[r].type==="context")r+=1;let p=r-l;if(p>Se*2+1){for(let h=l;h<l+Se;h+=1)c.push({row:t[h],index:h});c.push({row:{type:"elided",count:p-Se*2},index:-1});for(let h=r-Se;h<r;h+=1)c.push({row:t[h],index:h})}else for(let h=l;h<r;h+=1)c.push({row:t[h],index:h});l=r-1}return c}function dt({diffText:t,isLoading:c,filePath:l,fullContext:r=!1,onToggleContext:p}){let h=ui(),g=u(()=>{if(!t)return[];let C=[],R=1,N=1,G=t.split(/\r?\n/),k=G.some((x)=>x.startsWith("@@"))?G:[`@@ -0,0 +1,${G.length} @@`,...G.map((x)=>x.startsWith("+")||x.startsWith("-")?x:`+${x}`)];for(let x of k){if(x.startsWith("diff --git")||x.startsWith("index ")||x.startsWith("---")||x.startsWith("+++")||x.startsWith("new file mode")||x.startsWith("deleted file mode")||x.startsWith("similarity index")||x.startsWith("old mode")||x.startsWith("new mode")||x.startsWith("\\ No newline"))continue;if(x.startsWith("@@")){let w=x.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);if(w)R=parseInt(w[1],10),N=parseInt(w[2],10);C.push({type:"meta",text:x})}else if(x.startsWith("+"))C.push({type:"add",text:x.slice(1),newNum:N++});else if(x.startsWith("-"))C.push({type:"del",text:x.slice(1),oldNum:R++});else{let w=x.startsWith(" ")?x.slice(1):x;C.push({type:"context",text:w,oldNum:R++,newNum:N++})}}return C},[t]),v=bt(l),y=u(()=>{let C=Array(g.length).fill(""),R=-1,N=(G)=>{if(R<0)return;let M=Hu(g.slice(R,G).map((k)=>k.text).join(`
3
+ `),v);for(let k=R;k<G;k++)C[k]=M[k-R]??"";R=-1};return g.forEach((G,M)=>{if(G.type==="meta")N(M);else if(R<0)R=M}),N(g.length),C},[g,v,h]),P=u(()=>r?g.map((C,R)=>({row:C,index:R})):zt(g),[g,r]);if(c)return e("div",{className:"my-2 p-4 rounded bg-canvas border border-ink/10 text-muted font-mono text-xs flex items-center justify-center",children:"Loading commit diff..."});if(!t||g.length===0)return e("div",{className:"my-2 p-3 rounded bg-canvas border border-ink/10 text-muted font-mono text-xs text-center",children:"No diff content available for this file."});return e("div",{className:"my-2 rounded border border-ink/15 bg-paper overflow-hidden text-[11px] font-mono leading-relaxed text-ink",children:[e("div",{className:"flex items-center justify-between px-3 py-1.5 bg-canvas border-b border-ink/10 text-ink/70 text-[10.5px]",children:[e("span",{className:"font-semibold text-muted",children:"Diff preview"}),e("button",{type:"button",onClick:p,disabled:!p,className:"hover:text-ink flex items-center gap-1 cursor-pointer transition-colors disabled:opacity-40 disabled:cursor-default",title:r?"Show only the changed hunks":"Read the whole file around the change","aria-pressed":r,children:r?e(d,{children:[e(nt,{size:12,"aria-hidden":"true"})," Collapse context"]}):e(d,{children:[e(B,{size:12,"aria-hidden":"true"})," Expand all context"]})})]}),e("div",{className:"overflow-x-auto max-h-72 select-text",children:e("div",{className:"w-max min-w-full divide-y divide-ink/[0.04]",children:P.map(({row:C,index:R},N)=>{if(C.type==="elided")return e("div",{className:"px-3 py-1 bg-canvas text-muted text-[10px] text-center select-none",title:`${C.count} unchanged line(s) hidden`,children:["⋯ ",C.count," unchanged line",C.count===1?"":"s"," hidden ⋯"]},`elided-${N}`);let G=C,M=R;if(G.type==="meta")return e("div",{className:"flex items-center gap-2 px-3 py-1 bg-canvas border-y border-ink/10 text-muted text-[10px] font-semibold",children:[e("span",{children:"↕"}),e("span",{children:G.text})]},M);let k=G.type==="add",x=G.type==="del";return e("div",{className:`flex items-start font-mono ${k?"bg-success/10 hover:bg-success/15":x?"bg-error/10 hover:bg-error/15":"text-ink hover:bg-ink/[0.02]"}`,children:[e("div",{className:`w-10 flex-shrink-0 text-right pr-2 py-0.5 select-none border-r border-ink/10 text-[10px] tabular-nums font-mono ${x?"bg-error/15 text-ink/80 font-semibold":k?"bg-success/15 text-ink/80":"bg-canvas/50 text-muted"}`,children:G.oldNum??(k?"+":"")}),e("div",{className:`w-10 flex-shrink-0 text-right pr-2 py-0.5 select-none border-r border-ink/10 text-[10px] tabular-nums font-mono ${k?"bg-success/15 text-ink/80 font-semibold":x?"bg-error/15 text-ink/80":"bg-canvas/50 text-muted"}`,children:G.newNum??(x?"-":"")}),e("div",{className:`w-4 flex-shrink-0 text-center py-0.5 select-none font-bold ${k||x?"text-ink/80":"opacity-0"}`,children:k?"+":x?"-":" "}),e("div",{className:"flex-1 py-0.5 pr-3 whitespace-pre text-ink",children:G.text?e("span",{className:"shiki",dangerouslySetInnerHTML:{__html:y[M]}}):" "})]},M)})})})]})}function pt({commit:t,isSelected:c,onSelect:l,onAction:r,onToggleFile:p,isExpandedFile:h,isLoadingFile:g,isFullContextFile:v,onToggleContext:y,fileDiffs:P,headerRef:C}){let[R,N]=n(!1),G=t.body?.trim()??"",M=G.length>0,k=t.files??[],x=k.length,w=x>0,T=M||w,F=(A)=>{A.stopPropagation(),navigator.clipboard.writeText(t.hash),N(!0),setTimeout(()=>N(!1),2000)},H=(A,z)=>{A.stopPropagation(),p(t.hash,z)};return e("div",{onClick:()=>l(t),"data-testid":"commit-row","data-commit-hash":t.hash,className:"border-b border-ink/5 transition-colors cursor-pointer hover:bg-ink/[0.015]",children:e("div",{className:"py-2.5 flex flex-col",children:[e("div",{className:"flex flex-col gap-1",children:[t.refs&&t.refs.length>0&&e("div",{className:"flex flex-wrap items-center gap-1.5 pb-0.5",children:t.refs.map((A,z)=>{let E=A.includes("stash"),Z=A.includes("HEAD")||A.includes("main")||A.includes("master");return e("span",{className:`px-2 py-0.5 rounded text-[10px] font-mono border ${E?"bg-warning/10 text-ink/80 border-warning/25 font-semibold":Z?"bg-ink/10 text-ink font-semibold border-ink/20":"bg-canvas text-muted border-ink/10 font-medium"}`,children:A},z)})}),e("div",{ref:C,className:"flex items-start gap-1.5",children:e("button",{type:"button",onClick:(A)=>{A.stopPropagation(),l(t)},"aria-expanded":T?c:void 0,className:"flex flex-1 min-w-0 items-start gap-1.5 text-left cursor-pointer rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20",children:[e("span",{"data-commit-title":"",className:"text-[13px] font-semibold text-ink leading-snug break-words flex-1 min-w-0",children:t.message}),T&&e("span",{className:"text-ink/55 flex-shrink-0 mt-0.5","aria-hidden":"true",children:c?e(B,{size:13}):e(ie,{size:13})})]})}),M&&c&&e("div",{className:"border-l-2 border-ink/15 pl-3 py-1",children:e(X,{content:G,className:"text-ink/70"})}),e("div",{className:"flex items-center gap-x-2 gap-y-0.5 text-[11px] text-muted font-mono flex-wrap",children:[e("span",{children:t.author}),e("span",{children:t.date}),e("button",{type:"button",onClick:F,title:"Copy commit hash","aria-label":`Copy commit hash ${t.shortHash}`,className:"inline-flex items-center gap-1 hover:text-ink transition-colors cursor-pointer text-ink/70",children:[e("span",{children:t.shortHash}),R?e(f,{size:11,className:"text-success-text","aria-hidden":"true"}):e(re,{size:11,"aria-hidden":"true"})]}),w&&e("span",{children:[x," ",x===1?"file":"files"]})]})]}),c&&e("div",{className:"mt-2",children:e(at,{commit:t,onAction:r})}),w&&c&&e("div",{className:"mt-2 flex flex-col gap-1",children:k.map((A,z)=>{let E=h(t.hash,A.file),Z=`${t.hash}:${A.file}`,ne=P[Z]!==void 0?P[Z]:A.diff,U=g(t.hash,A.file),V=A.status==="A"?"text-success-text font-bold":A.status==="D"?"text-error-text font-bold":A.status==="R"?"text-meta-text font-bold":"text-info-text font-bold";return e("div",{className:"flex flex-col",children:[e("button",{type:"button",onClick:(q)=>H(q,A),"aria-expanded":E,className:"flex w-full items-center gap-2 py-1 px-2 rounded text-[11.5px] font-mono text-ink/80 transition-colors group cursor-pointer border border-transparent hover:border-ink/10 text-left",children:[e("span",{className:`w-3.5 text-center flex-shrink-0 text-[11px] ${V}`,children:A.status||"M"}),e("span",{className:"truncate flex-1 min-w-0 text-ink/90 group-hover:text-ink font-medium",children:A.file}),e("span",{className:"flex items-center gap-1 text-[10.5px] tabular-nums flex-shrink-0 font-medium",children:[e("span",{className:"text-success-text",children:["+",A.additions]}),e("span",{className:"text-ink/30",children:"/"}),e("span",{className:"text-error-text",children:["-",A.deletions]})]}),e("span",{className:"text-ink/55 group-hover:text-ink flex-shrink-0",children:E?e(B,{size:13,"aria-hidden":"true"}):e(ie,{size:13,"aria-hidden":"true"})})]}),E&&e("div",{className:"pl-4 pr-1",children:e(dt,{diffText:ne,isLoading:U,filePath:A.file,fullContext:v(t.hash,A.file),onToggleContext:()=>y(t.hash,A)})})]},z)})})]})})}var be=50;function Ot(t){if(!Array.isArray(t))return[];let c=[];for(let l of t){if(!l||typeof l!=="object")continue;let r=l;if(typeof r.file!=="string"||!r.file)continue;c.push({file:r.file,status:typeof r.status==="string"?r.status:"M",additions:typeof r.additions==="number"&&Number.isFinite(r.additions)?r.additions:0,deletions:typeof r.deletions==="number"&&Number.isFinite(r.deletions)?r.deletions:0,diff:typeof r.diff==="string"?r.diff:void 0})}return c}function ze(t){if(!Array.isArray(t))return[];let c=[];for(let l of t){if(!l||typeof l!=="object")continue;let r=l,p=typeof r.hash==="string"&&r.hash?r.hash:"";if(!p)continue;c.push({hash:p,shortHash:typeof r.shortHash==="string"&&r.shortHash?r.shortHash:p.slice(0,8),author:typeof r.author==="string"?r.author:"Unknown",date:typeof r.date==="string"?r.date:typeof r.time==="string"?r.time:"",message:typeof r.message==="string"?r.message:"",body:typeof r.body==="string"?r.body:void 0,parents:Array.isArray(r.parents)?r.parents.filter((h)=>typeof h==="string"):[],refs:Array.isArray(r.refs)?r.refs.filter((h)=>typeof h==="string"):[],files:Ot(r.files),lane:typeof r.lane==="number"?r.lane:void 0})}return c}function mt({output:t,isGraphMode:c,rootPath:l,activeRepo:r}){let[p,h]=n(!1),[g,v]=n(t?.hasMore??t?.data?.length===be),[y,P]=n(t?.total),C=u(()=>ze(t?.data),[t?.data]),R=Array.isArray(t?.data)?t.data.length:0,[N,G]=n(C),[M,k]=n(R);o(()=>{if(G(C),k(R),v(t?.hasMore??R===be),typeof t?.total==="number")P(t.total)},[C,R,t?.hasMore,t?.total]);let x=a(async()=>{if(p||!g)return;h(!0);try{let w=new FormData;if(w.set("actionType",c?"graph":"history"),w.set("limit",String(be)),w.set("skip",String(M)),l)w.set("root",l);if(r)w.set("repo",r);let F=await(await fetch("/api/fs/git",{method:"POST",body:w})).json();if(F.success&&Array.isArray(F.data)){let H=ze(F.data),A=F.data.length;if(G((z)=>{let E=new Set(z.map((ne)=>ne.hash)),Z=H.filter((ne)=>!E.has(ne.hash));return[...z,...Z]}),k((z)=>z+A),v(Boolean(F.hasMore??A===be)),typeof F.total==="number")P(F.total)}else v(!1)}catch(w){console.error("Failed to load more commits:",w)}finally{h(!1)}},[p,g,c,M,l,r]);return{commits:N,hasMore:g,totalCount:y,isLoadingMore:p,handleLoadMore:x}}function ut({onExecuteAction:t,rootPath:c,activeRepo:l}){let[r,p]=n({}),[h,g]=n(new Set),[v,y]=n(new Set),[P,C]=n(new Set),R=a(async(k,x,w)=>{let T=`${k}:${x.file}`;y((F)=>new Set(F).add(T));try{let F=new FormData;if(F.set("actionType","commit_diff"),F.set("hash",k),F.set("file",x.file),w)F.set("full","1");if(c)F.set("root",c);if(l&&l!==".")F.set("repo",l);let A=await(await fetch("/api/fs/git",{method:"POST",body:F})).json();if(A&&typeof A.diff==="string")p((z)=>({...z,[T]:A.diff}));else if(A&&A.error)p((z)=>({...z,[T]:`// Error: ${A.error}`}))}catch(F){console.error("Failed to load file diff:",F);let H=F instanceof Error?F.message:"Network error";p((A)=>({...A,[T]:`// Error loading diff: ${H}`}))}finally{y((F)=>{let H=new Set(F);return H.delete(T),H})}},[c,l]),N=a(async(k,x)=>{let w=`${k}:${x.file}`,T=!h.has(w);if(g((F)=>{let H=new Set(F);if(H.has(w))H.delete(w);else H.add(w);return H}),T&&r[w]===void 0&&!x.diff)await R(k,x,!1)},[h,r,R]),G=a(async(k,x)=>{let w=`${k}:${x.file}`,T=!P.has(w);C((F)=>{let H=new Set(F);if(H.has(w))H.delete(w);else H.add(w);return H}),await R(k,x,T)},[P,R]),M=a((k,x)=>{if(!t)return;if(k==="checkout")t("checkout",void 0,{branch:x.hash});else if(k==="create_branch_here"){let w=window.prompt(`Create new branch at commit ${x.shortHash}:`,`branch-${x.shortHash}`);if(w?.trim())t("create_branch_at",void 0,{branch:w.trim(),hash:x.hash})}else if(k==="cherry_pick"){if(window.confirm(`Cherry-pick commit ${x.shortHash} onto current branch?`))t("cherry_pick",void 0,{hash:x.hash})}else if(k==="revert"){if(window.confirm(`Revert commit ${x.shortHash}?`))t("revert_commit",void 0,{hash:x.hash})}else if(k==="reset"){let w=window.prompt(`Reset current branch to ${x.shortHash} (soft, mixed, hard):`,"soft");if(w&&["soft","mixed","hard"].includes(w.toLowerCase()))t("reset_commit",void 0,{hash:x.hash,mode:w.toLowerCase()})}else if(k==="merge"){if(window.confirm(`Merge commit ${x.shortHash} into current branch?`))t("merge_commit",void 0,{hash:x.hash})}else if(k==="rebase"){if(window.confirm(`Rebase current branch onto commit ${x.shortHash}?`))t("rebase_commit",void 0,{hash:x.hash})}},[t]);return{fileDiffs:r,expandedFiles:h,loadingFiles:v,fullContextFiles:P,handleToggleFile:N,handleToggleContext:G,handleCommitAction:M}}function Oe({output:t,onClose:c,onRefresh:l,onExecuteAction:r,rootPath:p,activeRepo:h}){if(o(()=>{if(!t)return;let j=(I)=>{if(I.key==="Escape")c()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[t,c]),!t)return null;let[g,v]=n(()=>({title:t.title,graph:t.title.toLowerCase().includes("graph")}));if(g.title!==t.title)v({title:t.title,graph:t.title.toLowerCase().includes("graph")});let y=g.graph,P=(j)=>v((I)=>({...I,graph:j})),[C,R]=n(""),[N,G]=n(""),[M,k]=n(!1),{commits:x,hasMore:w,totalCount:T,isLoadingMore:F,handleLoadMore:H}=mt({output:t,isGraphMode:y,rootPath:p,activeRepo:h}),{fileDiffs:A,expandedFiles:z,loadingFiles:E,fullContextFiles:Z,handleToggleFile:ne,handleToggleContext:U,handleCommitAction:V}=ut({onExecuteAction:r,rootPath:p,activeRepo:h});o(()=>{if(x.length>0&&!N)G(x[0].hash)},[x,N]);let q=u(()=>{if(!C.trim())return x;let j=C.toLowerCase().trim();return x.filter((I)=>I.message.toLowerCase().includes(j)||I.author.toLowerCase().includes(j)||I.shortHash.toLowerCase().includes(j)||I.hash.toLowerCase().includes(j)||I.refs?.some((te)=>te.toLowerCase().includes(j)))},[x,C]),oe=i(null),ae=i(null),ve=i(null),de=i({}),[me,ye]=n({}),[Pe,$e]=n(800);o(()=>{let j=ve.current;if(!j||!w||F||C.trim())return;let I=new IntersectionObserver((te)=>{if(te[0].isIntersecting)H()},{root:oe.current,threshold:0.1});return I.observe(j),()=>I.disconnect()},[w,F,C,H]);let le=a(()=>{if(!oe.current||!ae.current)return;let j=oe.current.getBoundingClientRect(),I=oe.current.scrollTop,te={};q.forEach((ue,Te)=>{let xe=de.current[ue.hash];if(xe){let se=xe.getBoundingClientRect();te[ue.hash]=se.top+se.height/2-j.top+I}else te[ue.hash]=Te*60+20}),ye(te);let we=ae.current.offsetHeight;$e(Math.max(we,oe.current.clientHeight,600))},[q]);W(()=>{le();let j=requestAnimationFrame(()=>{le()});return()=>cancelAnimationFrame(j)},[le,q,A,z,y,N]),o(()=>{let j=ae.current;if(!j)return;let I=new ResizeObserver(()=>{le()});I.observe(j);for(let te of Array.from(j.children))I.observe(te);return()=>I.disconnect()},[le,q]);let Q=u(()=>Ge(q),[q]),Me=u(()=>{let j=0;return Q.forEach((I)=>{if(I>j)j=I}),j},[Q]),ke=18,Ne=16,Ae=y?(Me+1)*ke+Ne*2:36,Le=()=>{k(!0),l?.(),setTimeout(()=>k(!1),600)};return e("div",{className:"fixed inset-0 z-50 modal-scrim backdrop-blur-xs flex items-center justify-center p-0 lg:p-5",onClick:c,role:"dialog","aria-modal":"true","aria-label":t.title,children:e("div",{className:`glass-overlay bg-paper border-ink/20 shadow-2xl flex flex-col overflow-hidden
4
+ w-full h-full rounded-none border-0
5
+ lg:w-[min(94vw,1200px)] lg:h-[88vh] lg:rounded-xl lg:border
6
+ pt-[env(safe-area-inset-top,0px)] lg:pt-0`,onClick:(j)=>j.stopPropagation(),children:[e(et,{isGraphMode:y,onToggleMode:P,searchQuery:C,onSearchChange:R,onRefresh:Le,onClose:c,isRefreshing:M,totalCommits:q.length,loadedCount:x.length,totalCount:T,hasMore:w}),e("div",{ref:oe,className:`flex-1 overflow-y-auto scrollbar-overlay-container relative select-text
7
+ px-3 lg:px-5
8
+ pl-[max(0.75rem,env(safe-area-inset-left,0px))] pr-[max(0.75rem,env(safe-area-inset-right,0px))]`,children:q.length===0?e("div",{className:"flex flex-col items-center justify-center py-20 text-muted font-mono text-xs",children:C.trim()?"No matching commits found.":"No commits in this branch."}):e("div",{className:"relative min-h-full pb-8",children:[e(st,{commits:q,nodePositions:me,selectedHash:N,isGraphMode:y,laneWidth:ke,paddingLeft:Ne,totalHeight:Pe}),e("div",{ref:ae,className:"flex flex-col relative z-20",style:{paddingLeft:`${Ae}px`},children:[q.map((j)=>e(pt,{commit:j,isSelected:N===j.hash,onSelect:(I)=>G(I.hash),onAction:V,onToggleFile:ne,isExpandedFile:(I,te)=>z.has(`${I}:${te}`),isLoadingFile:(I,te)=>E.has(`${I}:${te}`),isFullContextFile:(I,te)=>Z.has(`${I}:${te}`),onToggleContext:U,fileDiffs:A,headerRef:(I)=>{de.current[j.hash]=I}},j.hash)),e("div",{ref:ve,className:"pt-3 pb-4 px-4 flex items-center justify-center",children:F?e("div",{className:"flex items-center gap-2 text-xs text-muted font-mono py-2",children:[e(m,{size:14,className:"animate-spin text-info-text","aria-hidden":"true"}),e("span",{children:"Loading more commits..."})]}):w&&!C.trim()?e("button",{type:"button",onClick:H,className:"px-3 py-1.5 text-xs font-mono text-ink/70 hover:text-ink bg-ink/5 hover:bg-ink/10 rounded-md border border-ink/10 transition-colors cursor-pointer",children:"Load more commits..."}):q.length>10?e("div",{className:"text-[11px] font-mono text-muted py-2",children:["End of commit history (",typeof T==="number"&&T>0?T:x.length," commits)"]}):null})]})]})})]})})}function ft({children:t,onClose:c}){return e("div",{className:"fixed inset-0 z-50 modal-scrim flex items-center justify-center p-4",onClick:c,role:"dialog","aria-modal":"true",children:e("div",{className:"glass-overlay bg-paper border border-ink/20 rounded-lg shadow-xl flex flex-col overflow-hidden w-[min(94vw,420px)] max-h-[80vh]",onClick:(l)=>l.stopPropagation(),children:t})})}function gt({modal:t,onClose:c,onConfirm:l}){if(!t)return null;return e(ft,{onClose:c,children:[e("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-ink/10",children:[e(_,{size:16,className:"text-error flex-shrink-0"}),e("h3",{className:"text-sm font-semibold text-ink",children:"Confirm Action"})]}),e("div",{className:"px-4 py-4 text-xs text-ink/80 leading-relaxed",children:t.message}),e("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:c,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",onClick:l,className:"px-3 py-1.5 rounded bg-error text-canvas hover:bg-error/90 transition-colors cursor-pointer text-xs font-medium",children:"Confirm"})]})]})}function xt({isOpen:t,branchName:c,inputRef:l,onChange:r,onClose:p,onCreate:h}){if(!t)return null;let g=a(()=>{if(c.trim())h()},[c,h]);return e(ft,{onClose:p,children:[e("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-ink/10",children:[e(Ln,{size:16,className:"text-ink/60 flex-shrink-0"}),e("h3",{className:"text-sm font-semibold text-ink",children:"Create New Branch"})]}),e("div",{className:"px-4 py-4",children:e("input",{ref:l,type:"text",value:c,onChange:(v)=>r(v.currentTarget.value),onKeyDown:(v)=>{if(v.key==="Enter")g();if(v.key==="Escape")p()},placeholder:"branch-name",className:"w-full bg-canvas border border-ink/20 rounded px-3 py-2 text-xs focus:outline-none focus:border-ink/40 text-ink placeholder-ink/40 transition-colors"})}),e("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:p,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",onClick:g,disabled:!c.trim(),className:"px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:"Create"})]})]})}function vt({branch:t,detached:c,onCheckout:l,onMerge:r,onRename:p,onDelete:h}){let g=t.current&&!c;return e("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)_minmax(0,9.5rem)_4.25rem_4rem] items-start gap-x-2 px-4 py-2 border-b border-ink/5 last:border-b-0 hover:bg-ink/[0.02] group/row transition-colors",children:[e("div",{className:"h-5 flex items-center justify-center",children:g&&e(f,{size:12,className:"text-ink","aria-label":"Current branch"})}),e("button",{type:"button",onClick:l,disabled:g,title:g?"Already on this branch":`Check out ${t.name}`,className:"min-w-0 text-left cursor-pointer disabled:cursor-default",children:[e("div",{className:"h-5 flex items-center gap-1.5 min-w-0",children:[e(ge,{size:11,className:g?"text-ink/60 flex-shrink-0":"text-ink/40 flex-shrink-0"}),e("span",{className:`truncate text-xs ${g?"font-semibold text-ink":"text-ink/90"}`,children:t.name})]}),t.subject&&e("div",{className:"h-4 flex items-center pl-[18px] min-w-0",children:e("span",{className:"truncate text-[10px] text-ink/40",title:t.subject,children:t.subject})})]}),e("div",{className:"h-5 flex items-center justify-end min-w-0",children:e(It,{branch:t})}),e("div",{className:"h-5 flex items-center justify-end",children:t.date&&e("span",{className:"text-[10px] text-ink/40 truncate",children:t.date})}),e("div",{className:"h-5 flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/row:opacity-100",children:[!g&&e("button",{type:"button",onClick:r,title:`Merge ${t.name} into the current branch`,"aria-label":`Merge ${t.name} into the current branch`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Ln,{size:11})}),e("button",{type:"button",onClick:p,title:`Rename ${t.name}`,"aria-label":`Rename ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Mn,{size:11})}),!g&&e("button",{type:"button",onClick:h,title:`Delete ${t.name}`,"aria-label":`Delete ${t.name}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-error hover:bg-error/10 cursor-pointer transition-colors",children:e(L,{size:11})})]})]})}function It({branch:t}){if(t.gone)return e("span",{className:"text-[10px] font-mono text-warning border border-warning/30 rounded px-1 truncate",title:`${t.upstream} no longer exists on the remote — fetch --prune to drop it`,children:"gone"});if(!t.upstream)return e("span",{className:"text-[10px] font-mono text-ink/40 truncate",title:"No upstream: this branch has never been published",children:"unpublished"});return e("span",{className:"flex items-center gap-1 text-[10px] font-mono text-ink/50 min-w-0",children:[e("span",{className:"truncate",title:t.upstream,children:t.upstream}),(t.ahead>0||t.behind>0)&&e("span",{className:"tabular-nums text-ink/70 flex-shrink-0",children:[t.ahead>0&&`↑${t.ahead}`,t.behind>0&&`↓${t.behind}`]})]})}function yt({branch:t,onClose:c,onSubmit:l}){if(!t)return null;return e(_t,{branch:t,onClose:c,onSubmit:l})}function _t({branch:t,onClose:c,onSubmit:l}){let[r,p]=n(t.name),[h,g]=n(!1),v=r.trim(),y=v===t.name,P=v.length>0&&!y,C=()=>{if(P)l(t.name,v,h)};return e(J,{onClose:c,maxWidthClass:"max-w-[min(94vw,460px)]",header:e("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-sm font-semibold text-ink",children:"Rename branch"}),e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:t.name})]}),children:[e("div",{className:"px-5 py-4 flex flex-col gap-3",children:[e("div",{children:[e("label",{className:"text-[10px] uppercase tracking-wider text-ink/50 font-semibold",htmlFor:"branch-rename-input",children:"New name"}),e("input",{id:"branch-rename-input",type:"text",value:r,autoFocus:!0,onChange:(R)=>p(R.currentTarget.value),onKeyDown:(R)=>{if(R.key==="Enter")C();if(R.key==="Escape")c()},className:"mt-1 w-full bg-paper border border-ink/20 rounded px-2.5 py-1.5 text-xs font-mono text-ink focus:outline-none focus:border-ink/40 transition-colors"}),y&&v.length>0&&e("p",{className:"mt-1 text-[10px] text-ink/50",children:"The name is unchanged."})]}),e("div",{className:"text-[10px] font-mono text-ink/60 flex flex-col gap-0.5 border border-ink/10 rounded p-2 bg-canvas/40",children:[e("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"text-ink/40",children:"upstream"}),e("span",{className:"truncate",children:t.upstream||"none (unpublished)"})]}),e("p",{className:"text-ink/40 leading-relaxed mt-0.5",children:"A local rename keeps this upstream unchanged — a plain push afterwards will refuse until the upstream matches the new name, which is what the remote option below does."})]}),e("label",{className:"flex items-start gap-2 text-[11px] text-ink/80 cursor-pointer select-none",children:[e("input",{type:"checkbox",checked:h,onChange:(R)=>g(R.currentTarget.checked),className:`${he} accent-ink cursor-pointer mt-0.5`}),e("span",{className:"flex flex-col gap-0.5",children:[e("span",{children:"Also rename it on the remote"}),e("span",{className:"text-[10px] font-mono text-ink/50",children:["git push -u ",t.upstream?t.upstream.split("/")[0]:"origin"," ",v||"<new>",e("br",{}),"git push ",t.upstream?t.upstream.split("/")[0]:"origin"," --delete ",t.name,e("br",{}),"git fetch --prune"]})]})]})]}),e("div",{className:"flex items-center justify-end gap-2 px-5 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:c,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",onClick:C,disabled:!P,className:"px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:"Rename"})]})]})}function kt({branch:t,force:c,onForceChange:l,onClose:r,onConfirm:p}){if(!t)return null;return e(J,{onClose:r,maxWidthClass:"max-w-[min(94vw,440px)]",header:e("div",{className:"flex items-center gap-2",children:[e(_,{size:15,className:"text-error flex-shrink-0"}),e("h2",{className:"text-sm font-semibold text-ink",children:"Delete branch"})]}),children:[e("div",{className:"px-5 py-4 flex flex-col gap-3 text-xs text-ink/80 leading-relaxed",children:[e("p",{children:["Delete ",e("span",{className:"font-mono font-semibold text-ink",children:t.name}),t.upstream&&e(d,{children:[" ","(tracks ",e("span",{className:"font-mono",children:t.upstream}),")"]}),"?"]}),e("div",{className:"text-[10px] font-mono text-ink/60 border border-ink/10 rounded p-2 bg-canvas/40 flex flex-col gap-0.5",children:[e("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"text-ink/40",children:"last commit"}),e("span",{className:"truncate",children:t.subject||"–"})]}),e("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"text-ink/40",children:"when"}),e("span",{children:t.date||"–"})]})]}),e("label",{className:"flex items-start gap-2 cursor-pointer select-none text-[11px]",children:[e("input",{type:"checkbox",checked:c,onChange:(h)=>l(h.currentTarget.checked),className:`${he} accent-error cursor-pointer mt-0.5`}),e("span",{className:"flex flex-col gap-0.5",children:[e("span",{className:"text-error font-medium",children:"Delete even if its commits are not merged"}),e("span",{className:"text-[10px] font-mono text-ink/50",children:["git branch ",c?"-D":"-d"," ",t.name]}),e("span",{className:"text-ink/50",children:"Without this, git refuses when the branch holds commits no other branch has. Leaving it off is the safe default."})]})]})]}),e("div",{className:"flex items-center justify-end gap-2 px-5 py-3 border-t border-ink/10",children:[e("button",{type:"button",onClick:r,className:"px-3 py-1.5 rounded border border-ink/20 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer text-xs",children:"Cancel"}),e("button",{type:"button",onClick:()=>p(t.name),className:"px-3 py-1.5 rounded bg-error text-canvas hover:bg-error/90 transition-colors cursor-pointer text-xs font-medium",children:["Delete ",c?"(force)":""]})]})]})}function Ct({isOpen:t,rootPath:c,repo:l,currentBranch:r,detached:p,isBusy:h,onClose:g,onAction:v,onConfirmDelete:y}){let[P,C]=n([]),[R,N]=n(!1),[G,M]=n(null),[k,x]=n(""),[w,T]=n(null),[F,H]=n(null),[A,z]=n(!1),E=a(async()=>{N(!0),M(null);let U=new URLSearchParams({branches:"1",repo:l||"."});if(c)U.set("root",c);try{let V=await fetch(`/api/fs/git?${U.toString()}`),q=await V.json();if(q.success&&Array.isArray(q.branches))C(q.branches);else M(q.error||`Failed to read branches (HTTP ${V.status})`)}catch(V){M(V instanceof Error?V.message:"Failed to read branches")}finally{N(!1)}},[c,l]);o(()=>{if(t)E()},[t,E]);let Z=i(!1);o(()=>{if(!t){Z.current=!1;return}if(Z.current&&!h)E();Z.current=h},[t,h,E]),o(()=>{if(!t)T(null),H(null),z(!1),x("")},[t]);let ne=u(()=>{let U=k.trim().toLowerCase();if(!U)return P;return P.filter((V)=>V.name.toLowerCase().includes(U)||V.upstream.toLowerCase().includes(U))},[P,k]);if(!t)return null;return e(d,{children:[e(J,{onClose:g,maxWidthClass:"max-w-[min(96vw,720px)]",header:e("div",{className:"flex items-center gap-2 min-w-0",children:[e("h2",{className:"text-sm font-semibold text-ink",children:"Branches"}),e("span",{className:"text-[10px] font-mono text-ink/50",children:p?`detached at ${r}`:`on ${r}`})]}),children:[e("div",{className:"px-5 py-3 flex items-center gap-2 border-b border-ink/10",children:[e(O,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:k,onChange:(U)=>x(U.currentTarget.value),placeholder:"Filter branches…","aria-label":"Filter branches",className:"flex-1 min-w-0 bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),e("button",{type:"button",onClick:()=>void E(),disabled:R,title:"Refresh","aria-label":"Refresh branches",className:"text-ink/40 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 flex-shrink-0",children:e(D,{size:12,className:R?"animate-spin":""})})]}),e("div",{className:"min-h-[40vh] max-h-[60vh] overflow-y-auto scrollbar-overlay-container",children:R&&P.length===0?e("div",{className:"flex items-center justify-center gap-2 py-12 text-xs text-ink/50 font-mono",children:[e(m,{size:14,className:"animate-spin text-info"}),"Loading branches…"]}):G?e("div",{className:"py-12 px-6 text-center text-xs text-error font-mono",children:G}):ne.length===0?e("div",{className:"py-12 text-center text-xs text-ink/40 font-mono",children:k.trim()?"No matching branches.":"No branches."}):ne.map((U)=>e(vt,{branch:U,detached:p,onCheckout:()=>{v("checkout",{branch:U.name}),g()},onMerge:()=>{v("merge_branch",{branch:U.name}),g()},onRename:()=>T(U),onDelete:()=>{H(U),z(!1)}},U.name))})]}),e(yt,{branch:w,onClose:()=>T(null),onSubmit:(U,V,q)=>{v("rename_branch",{branch:U,newName:V,...q?{remote:"1"}:{}}),T(null)}},w?.name??"none"),e(kt,{branch:F,force:A,onForceChange:z,onClose:()=>{H(null),z(!1)},onConfirm:(U)=>{y(U,A),H(null),z(!1)}})]})}function Nt({mounted:t,confirmModal:c,onCloseConfirm:l,onConfirm:r,branchPrompt:p,newBranchName:h,newBranchInputRef:g,onNewBranchNameChange:v,onCloseBranchPrompt:y,onCreateBranch:P,viewingOutput:C,onCloseOutput:R,onRefreshOutput:N,onExecuteAction:G,branchModalOpen:M,onCloseBranchModal:k,rootPath:x,activeRepo:w,currentBranch:T,detached:F,isBusy:H,onBranchAction:A,onConfirmDeleteBranch:z}){if(!t)return null;return e(d,{children:[e(gt,{modal:c,onClose:l,onConfirm:r}),e(xt,{isOpen:p,branchName:h,inputRef:g,onChange:v,onClose:y,onCreate:P}),e(Oe,{output:C,onClose:R,onRefresh:N,onExecuteAction:G,rootPath:x,activeRepo:w}),e(Ct,{isOpen:M,rootPath:x,repo:w,currentBranch:T,detached:F,isBusy:H,onClose:k,onAction:A,onConfirmDelete:z})]})}function wt({rootPath:t,repo:c,isBusy:l,onAction:r}){let[p,h]=S("git.stashExpanded",!1),[g,v]=n([]),[y,P]=n(!1),[C,R]=n(""),[N,G]=n(!1),M=yr(),k=a(async()=>{P(!0);let w=new URLSearchParams({stashes:"1",repo:c||"."});if(t)w.set("root",t);try{let F=await(await fetch(`/api/fs/git?${w.toString()}`)).json();v(F.stashes??[])}catch{v([])}finally{P(!1)}},[t,c]);o(()=>{if(p)k()},[p,k,l]);let x=(w,T)=>{if(r(w,T),w==="stash_push")R(""),G(!1)};return e("div",{className:"border-t border-ink/10 bg-canvas/30 flex-shrink-0",children:[e("div",{className:"flex items-center hover:bg-ink/5 transition-colors",children:[e("button",{type:"button",onClick:()=>h(!p),"aria-expanded":p,"aria-controls":M,title:p?"Hide stashes":"Show stashes",className:"flex flex-1 min-w-0 items-center space-x-1 py-1.5 pl-3 pr-2 text-left font-semibold text-xs text-ink transition-colors cursor-pointer",children:[e("span",{className:"w-3 text-center font-mono","aria-hidden":"true",children:p?"▾":"▸"}),e(tt,{size:12}),e("span",{children:"Stash"}),g.length>0&&e("span",{className:"font-normal ml-1 border border-ink/20 rounded-full px-1.5 text-[10px] text-ink/50",children:g.length})]}),e("button",{type:"button",onClick:()=>x("stash_push",{...C.trim()?{message:C.trim()}:{},...N?{untracked:"1"}:{}}),disabled:l,title:"Stash the working tree",className:"mr-3 flex flex-shrink-0 items-center gap-1 px-2 py-0.5 text-[10px] font-mono rounded border border-ink/20 hover:bg-ink/5 text-ink/70 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",children:[e(Y,{size:10}),"Save"]})]}),e("div",{className:"section-reveal","data-expanded":p,id:M,inert:!p,children:e("div",{children:e("div",{className:"px-3 pb-2 flex flex-col gap-1.5",children:[e("div",{className:"flex items-center gap-1.5",children:[e("input",{type:"text",value:C,onChange:(w)=>R(w.currentTarget.value),placeholder:"Stash message (optional)","aria-label":"Stash message",className:"flex-1 min-w-0 bg-paper border border-ink/20 rounded px-2 py-1 text-[11px] text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"}),e("label",{className:"flex items-center gap-1 text-[10px] text-ink/60 cursor-pointer select-none flex-shrink-0",title:"Also stash untracked files (-u)",children:[e("input",{type:"checkbox",checked:N,onChange:(w)=>G(w.currentTarget.checked),className:`${he} accent-ink cursor-pointer`}),"-u"]})]}),y&&g.length===0?e("div",{className:"text-[10px] text-ink/40 italic py-1",children:"Loading…"}):g.length===0?e("div",{className:"text-[10px] text-ink/40 italic py-1",children:"No stash entries."}):e("div",{className:"max-h-40 overflow-y-auto scrollbar-overlay-container flex flex-col",children:g.map((w)=>e("div",{className:"grid grid-cols-[4rem_minmax(0,1fr)_3.5rem_4.5rem] items-center gap-x-1 group/stash py-0.5",children:[e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:w.ref}),e("span",{className:"min-w-0 truncate text-[10px] text-ink/80",title:w.subject,children:w.subject}),e("span",{className:"text-[10px] text-ink/40 text-right truncate",children:w.date}),e("div",{className:"flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/stash:opacity-100",children:[e("button",{type:"button",onClick:()=>x("stash_apply",{ref:w.ref,pop:"1"}),disabled:l,title:"Pop: apply and remove the entry","aria-label":"Pop stash",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-40",children:e(fe,{size:10})}),e("button",{type:"button",onClick:()=>x("stash_apply",{ref:w.ref}),disabled:l,title:"Apply: keep the entry","aria-label":"Apply stash",className:"w-5 h-5 flex items-center justify-center rounded hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-40",children:e(tt,{size:10})}),e("button",{type:"button",onClick:()=>x("stash_drop",{ref:w.ref}),disabled:l,title:"Drop: discard the entry (the stash is not recoverable from the panel)","aria-label":"Drop stash",className:"w-5 h-5 flex items-center justify-center rounded hover:text-error hover:bg-error/10 cursor-pointer transition-colors disabled:opacity-40",children:e(L,{size:10})})]})]},w.ref))})]})})})]})}function Rt({repo:t,isBusy:c,onInit:l}){let r=t==="."?"this folder":t;return e("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[e(ge,{size:26,className:"text-ink/25","aria-hidden":!0}),e("div",{className:"font-mono space-y-1",children:[e("p",{className:"text-xs text-ink/70",children:"Not a Git repository"}),e("p",{className:"text-[11px] leading-4 text-ink/40",children:["Initialize one in ",r," to track changes, commit and manage branches."]})]}),e("button",{type:"button",onClick:l,disabled:c,"aria-label":"Initialize Git repository",title:`git init in ${r}`,className:"flex items-center justify-center gap-1.5 px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/90 transition-colors cursor-pointer text-xs font-medium disabled:opacity-40 disabled:cursor-not-allowed",children:[e(ge,{size:12,"aria-hidden":!0}),"Initialize repository"]})]})}function Gt(t,c,l){let r=ct(),{activeRepo:p,setActiveRepo:h,ready:g}=cr(t),{repos:v,scanning:y,rescan:P}=ur(t,c),C=ng(p,v),R=i(C);R.current=C;let N=i("");N.current=`${t??""}\x00${C}`;let G=i(""),M=i(""),k=i(void 0);if(r.data!==k.current)k.current=r.data,M.current=G.current;let x=c&&g?Rp(`${t??""}\x00${C}`):null,w=Ce(x),T=i(w.refresh);T.current=w.refresh;let F=M.current===N.current?r.data:void 0,H=w.data??F,A=H?.syncCount??F?.syncCount,z=a((ne)=>{if(!c)return;let U=ne??R.current,V=new URLSearchParams;if(t)V.set("root",t);if(U&&U!==".")V.set("repo",U);V.set("sync","1"),V.set("t",String(Date.now())),G.current=N.current;let q=T.current;r.load(`/api/fs/git?${V.toString()}`).then(()=>q())},[c,t,r.load]);o(()=>{if(!g)return;z()},[l,t,c,g,C,z]);let E=r.state==="loading",Z=E||w.refreshing;return{activeRepo:C,setActiveRepo:h,repos:v,reposScanning:y,refreshRepos:P,isReading:E,isRefreshing:Z,data:H,syncCount:A,loadRepo:z,refreshTopic:w.refresh}}function St(t,c){let l=ct(),r=i(null),p=a((h,g,v)=>{r.current={actionType:h,extra:v};let y=new FormData;if(y.append("actionType",h),y.append("repo",c),t)y.append("root",t);if(g)y.append("file",g);if(v)Object.entries(v).forEach(([P,C])=>y.append(P,C));l.submit(y,{method:"POST",action:"/api/fs/git"})},[c,t,l]);return{state:l.state,execute:p,data:l.data,lastAction:r.current}}function Pt({rootPath:t,repo:c,execute:l}){let{sessionId:r}=Lp(),[p,h]=S("git.commitDraft",""),[g,v]=S("git.amend",!1),y=i(null),P=i(p);P.current=p;let C=i(g);C.current=g;let R=i(h);R.current=h,o(()=>{if(!g)return;if(P.current.trim().length>0)return;let M=new URLSearchParams({headMessage:"1"});if(t)M.set("root",t);if(c&&c!==".")M.set("repo",c);let k=!1;return fetch(`/api/fs/git?${M.toString()}`).then((x)=>x.json()).then((x)=>{if(k)return;if(!C.current||P.current.trim().length>0)return;let w=typeof x?.message==="string"?x.message:"";if(w.length===0)return;y.current=w,R.current(w)}).catch(()=>{}),()=>{k=!0}},[g,r,t,c]);let N=a((M)=>{if(M){v(!0);return}if(y.current!==null&&P.current===y.current)h("");y.current=null,v(!1)},[v,h]),G=a(()=>{l("commit",void 0,{message:P.current,...C.current?{amend:"1"}:{}}),h(""),v(!1),y.current=null},[l,v,h]);return{message:p,setMessage:h,amend:g,seeded:y.current!==null&&p===y.current,toggleAmend:N,commit:G}}var $t=48;function jt(t,c){let l=c?.branch?.trim()??"",r=(c?.hash??"").slice(0,7),p=c?.ref?.trim()||"stash@{0}";switch(t){case"init":return{done:"Initialized the repository"};case"fetch":return{done:"Fetched every remote"};case"push":return{done:"Pushed to upstream"};case"pull":return{done:"Pulled from upstream",stopped:"Pulled"};case"sync":return{done:"Synced with upstream",stopped:"Pulled, but nothing was pushed"};case"abort_operation":return{done:"Aborted the operation in progress"};case"continue_operation":return{done:"Concluded the operation"};case"commit":{if(c?.amend==="1")return{done:"Amended the last commit"};let h=(c?.message??"").split(`
9
+ `)[0].trim();if(!h)return{done:"Commit created"};return{done:`Committed “${h.length>$t?`${h.slice(0,$t-1)}…`:h}”`}}case"checkout":return{done:l?`Switched to ${l}`:"Switched branch"};case"create_branch":case"create_branch_at":return{done:l?`Created branch ${l}`:"Created branch"};case"rename_branch":{let h=c?.newName?.trim()??"";return{done:l&&h?`Renamed ${l} to ${h}`:"Renamed branch"}}case"delete_branch":return{done:l?`Deleted branch ${l}`:"Deleted branch"};case"merge_branch":return{done:l?`Merged ${l}`:"Merged branch",stopped:l?`Merging ${l}`:"Merging the branch"};case"merge_commit":return{done:r?`Merged commit ${r}`:"Merged commit",stopped:r?`Merging ${r}`:"Merging the commit"};case"cherry_pick":return{done:r?`Cherry-picked ${r}`:"Cherry-picked commit",stopped:r?`Cherry-picking ${r}`:"Cherry-picking the commit"};case"revert_commit":return{done:r?`Reverted commit ${r}`:"Reverted commit",stopped:r?`Reverting ${r}`:"Reverting the commit"};case"rebase_commit":return{done:r?`Rebased onto ${r}`:"Rebased",stopped:r?`Rebasing onto ${r}`:"Rebasing"};case"reset_commit":{let h=c?.mode??"mixed";return{done:r?`Reset to ${r} (${h})`:`Reset (${h})`}}case"stash_push":return{done:"Stashed your changes"};case"stash_apply":return{done:c?.pop==="1"?`Popped ${p}`:`Applied ${p}`,stopped:c?.pop==="1"?`Popping ${p}`:`Applying ${p}`};case"stash_drop":return{done:`Dropped ${p}`};default:return null}}function Mt({actionType:t,extra:c,stopped:l}){let r=jt(t,c);if(!l)return r?.done??null;let p=ho[l]??l,h=r?.stopped??r?.done??"",g=t==="sync"?"resolve it above, then Sync again":"resolve it above";return h?`${h} — the ${p} stopped on a conflict; ${g}`:`The ${p} stopped on a conflict; ${g}`}function At(t){let{fetcher:c,onPage:l,onReload:r,onSuccess:p,onError:h}=t,g=i(null),v=i({onPage:l,onReload:r,onSuccess:p,onError:h});v.current={onPage:l,onReload:r,onSuccess:p,onError:h},o(()=>{if(c.state!=="idle"||!c.data)return;let y=c.data;if(y===g.current)return;g.current=y;let P=v.current;if(y.type==="history"||y.type==="graph"){P.onPage({title:y.type==="graph"?"Git Graph":"Commit History",data:y.data||[],hasMore:y.hasMore,total:y.total});return}if(!y.success){P.onError(y.error||"Git operation failed");return}P.onReload();let C=c.lastAction,R=C?Mt({...C,stopped:y.stopped}):null;if(R)P.onSuccess(R,y.stopped?"warning":"success")},[c.state,c.data,c.lastAction])}function Lt(t,c,l,r){if(t==="revert")return{type:t,file:c,message:`Are you sure you want to discard changes in ${c}?`};if(t==="revert_all")return{type:t,message:"Are you sure you want to discard ALL unstaged changes? This cannot be undone."};if(t==="abort_operation"){let p=r?ho[r]:"operation";return{type:t,message:`Abort the ${p}? Everything resolved so far is discarded and the working tree returns to its pre-${p} state.`}}if(t==="delete_branch"){let p=l?.branch??"",h=l?.force==="1";return{type:t,extra:{branch:p,...h?{force:"1"}:{}},message:h?`Delete branch ${p} even though its commits are not merged? This cannot be undone from the panel.`:`Delete branch ${p}?`}}if(t==="stash_drop"){let p=l?.ref||"the top entry";return{type:t,extra:{ref:l?.ref??""},message:`Drop ${p}? The stash entry is removed — this cannot be undone from the panel.`}}return null}function hs({className:t="",enabled:c=!0,rootPath:l,refreshKey:r=0}){let{activeRepo:p,setActiveRepo:h,repos:g,reposScanning:v,refreshRepos:y,isReading:P,isRefreshing:C,data:R,syncCount:N,loadRepo:G,refreshTopic:M}=Gt(l,c,r),k=St(l,p),[x,w]=S("git.viewMode","flat"),[T,F]=n(!1),H=i(null),[A,z]=n(!1),E=i(null),[Z,ne]=n(null),[U,V]=n(!1),[q,oe]=n(""),ae=i(null),[ve,de]=n(!1),[me,ye]=n(null),[Pe,$e]=n(!1),{pushToast:le}=je();o(()=>{$e(!0)},[]),o(()=>{if(U&&ae.current)ae.current.focus()},[U]),At({fetcher:k,onPage:ye,onReload:G,onSuccess:(K,ee)=>le(K,ee),onError:(K)=>le(K,"error")}),pe(H,()=>F(!1)),pe(E,()=>z(!1));let Q=k.execute,{message:Me,setMessage:ke,amend:Ne,seeded:Ae,toggleAmend:Le,commit:j}=Pt({rootPath:l,repo:p,execute:Q}),I=(K,ee,Re)=>{let _e=Lt(K,ee,Re,R?.state?.operation??null);if(_e){ne(_e);return}Q(K,ee,Re)},te=(K,ee)=>{Q("resolve_conflict",K,ee?{side:ee}:void 0)},we=R?.branch||"main",ue=R?.branches||["main"],Te=R?.remoteBranches||[],xe=R?.changes||[],se=P||k.state!=="idle",De=k.state==="idle"?null:k.lastAction?.actionType??null,Tt=De==="sync"||De==="push"||De==="pull",Dt=xe.filter((K)=>{if(vr(K.status))return!1;let ee=K.status;return ee&&ee[0]!==" "&&ee[0]!=="?"});if(!c)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${t}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e("div",{className:`flex flex-col h-full bg-paper relative ${t}`,children:[e(Nt,{mounted:Pe,confirmModal:Z,onCloseConfirm:()=>ne(null),onConfirm:()=>{if(Z)Q(Z.type,Z.file,Z.extra),ne(null)},branchPrompt:U,newBranchName:q,newBranchInputRef:ae,onNewBranchNameChange:oe,onCloseBranchPrompt:()=>{V(!1),oe("")},onCreateBranch:()=>{if(q.trim())Q("create_branch",void 0,{branch:q.trim()}),V(!1),oe("")},viewingOutput:me,onCloseOutput:()=>ye(null),onRefreshOutput:()=>{if(me)Q(me.title.toLowerCase().includes("graph")?"graph":"history")},onExecuteAction:(K,ee,Re)=>Q(K,ee,Re),branchModalOpen:ve,onCloseBranchModal:()=>de(!1),rootPath:l,activeRepo:p,currentBranch:we,detached:R?.state?.detached??!1,isBusy:se,onBranchAction:(K,ee)=>Q(K,void 0,ee),onConfirmDeleteBranch:(K,ee)=>{Q("delete_branch",void 0,{branch:K,...ee?{force:"1"}:{}})}}),e(Ye,{activeRepo:p,repos:g,isRefreshing:C,rootPath:l,reposScanning:v,onSelectRepo:(K)=>{if(K!==p)h(K)},onRefresh:()=>{M(),G()},onRefreshRepos:y}),R?.isRepo===!1?e(Rt,{repo:p,isBusy:se,onInit:()=>Q("init")}):e(d,{children:[e(Ve,{branchRef:E,showBranchMenu:A,setShowBranchMenu:z,branch:we,branches:ue,remoteBranches:Te,onCheckout:(K)=>Q("checkout",void 0,{branch:K}),onMerge:(K)=>Q("merge_branch",void 0,{branch:K}),onOpenBranchPrompt:()=>V(!0),onManageBranches:()=>{de(!0),z(!1)},optionsRef:H,showOptions:T,setShowOptions:F,onHistory:()=>Q("history"),onGraph:()=>Q("graph"),viewMode:x,setViewMode:w,isBusy:se,syncCount:N,syncing:Tt,onSync:()=>Q("sync"),onFetch:()=>Q("fetch"),detached:R?.state?.detached??!1}),R?.state?.operation?e(Ke,{operation:R.state.operation,conflicts:R.state.conflicts,isBusy:se,onAbort:()=>I("abort_operation"),onContinue:()=>Q("continue_operation")}):e(qe,{message:Me,hasStagedChanges:Dt.length>0,isBusy:se,amend:Ne,seeded:Ae,onToggleAmend:Le,onChangeMessage:ke,onCommit:j}),e(Qe,{changes:xe,isLoading:se,viewMode:x,repo:p,rootPath:l,onAction:I,onResolve:te}),e(wt,{rootPath:l,repo:p,isBusy:se,onAction:(K,ee)=>I(K,void 0,ee)})]})]})}export{hs as GitPanel};
@@ -1,2 +1,2 @@
1
- import{d,n,W,i,e,s,f,B,re,Ee,qa,ka,Ft,Ca,fr,Wt,Kt}from"./index-gs7ytgdw.js";import{Qa,Na,yi}from"./index-pfbyfab5.js";var J={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]},y=s(J);var K={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]},Z=s(K);var Q={name:"ratio",size:24,node:[["rect",{width:"12",height:"20",x:"6",y:"2",rx:"2",key:"1oxtiu"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]]},w=s(Q);var Y={name:"tablet",size:24,node:[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]},C=s(Y);var k=[{id:"responsive",label:"Responsive (100% Fluid)",category:"responsive",icon:ka},{id:"desktop-16-9",label:"Desktop 16:9 (Auto H:W)",category:"responsive",icon:w},{id:"laptop",label:"Laptop (1024 × 768)",category:"responsive",icon:Z},{id:"tablet",label:"Tablet (768 × 1024)",category:"mobile",icon:C},{id:"mobile",label:"Mobile Phone (375 × 667)",category:"mobile",icon:fr},{id:"mobile-lg",label:"Mobile Large (414 × 896)",category:"mobile",icon:fr}];function j(t){switch(t){case"desktop-16-9":return"Desktop 16:9";case"laptop":return"Laptop 1024p";case"tablet":return"Tablet 768p";case"mobile":return"Mobile 375p";case"mobile-lg":return"Mobile Lg 414p";case"responsive":default:return"Responsive"}}function z({viewportMode:t,onChangeViewport:r,zoomLevel:a=100,onSetZoom:l}){let[p,c]=n(null);return e("div",{className:"flex items-center space-x-1.5 flex-shrink-0",children:[e("div",{className:"hidden sm:flex items-center bg-canvas border border-ink/10 rounded-md p-0.5",children:[e("button",{type:"button",onClick:()=>r("responsive"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${t==="responsive"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Responsive (100% Fluid)",children:e(ka,{size:12})}),e("button",{type:"button",onClick:()=>r("desktop-16-9"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${t==="desktop-16-9"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Desktop 16:9 (Auto Height following Width)",children:e(w,{size:12})}),e("button",{type:"button",onClick:()=>r("tablet"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${t==="tablet"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Tablet (768px)",children:e(C,{size:12})}),e("button",{type:"button",onClick:()=>r("mobile"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${t==="mobile"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Mobile (375px)",children:e(fr,{size:12})})]}),e("button",{type:"button","aria-haspopup":"menu","aria-expanded":p!==null,onClick:(o)=>c(p?null:Wt(o.currentTarget)),className:"flex items-center space-x-1 px-2 py-1 rounded bg-canvas border border-ink/15 hover:border-ink/30 text-ink text-[11px] font-mono transition-colors cursor-pointer",title:"Device & Responsive Testing Menu",children:[e("span",{className:"hidden md:inline text-[10px] font-medium",children:j(t)}),e(B,{size:11,className:"text-ink/60"})]}),e(Kt,{anchor:p,ariaLabel:"Device & Responsive Testing Menu",className:"w-56 bg-paper border border-ink/15 rounded-lg shadow-xl py-1 text-xs font-mono",onClose:()=>c(null),children:[e("div",{className:"px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:"Responsive Testing"}),k.filter((o)=>o.category==="responsive").map((o)=>{let u=o.icon,b=t===o.id;return e("button",{type:"button",onClick:()=>{r(o.id),c(null)},className:`w-full px-2.5 py-1.5 flex items-center justify-between text-left hover:bg-ink/5 cursor-pointer ${b?"bg-ink/10 font-semibold text-ink":"text-ink/75"}`,children:[e("div",{className:"flex items-center space-x-2",children:[e(u,{size:13,className:"text-ink/60"}),e("span",{children:o.label})]}),b&&e(f,{size:12,className:"text-success"})]},o.id)}),e("div",{className:"mt-1 pt-1 border-t border-ink/10 px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:"Mobile Testing"}),k.filter((o)=>o.category==="mobile").map((o)=>{let u=o.icon,b=t===o.id;return e("button",{type:"button",onClick:()=>{r(o.id),c(null)},className:`w-full px-2.5 py-1.5 flex items-center justify-between text-left hover:bg-ink/5 cursor-pointer ${b?"bg-ink/10 font-semibold text-ink":"text-ink/75"}`,children:[e("div",{className:"flex items-center space-x-2",children:[e(u,{size:13,className:"text-ink/60"}),e("span",{children:o.label})]}),b&&e(f,{size:12,className:"text-success"})]},o.id)}),l&&e(d,{children:[e("div",{className:"mt-1 pt-1 border-t border-ink/10 px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:["Zoom Scale (",a,"%)"]}),e("div",{className:"grid grid-cols-3 gap-1 px-2 py-1",children:[50,75,100,125,150,200].map((o)=>e("button",{type:"button",onClick:()=>{l(o),c(null)},className:`px-1.5 py-1 text-center rounded text-[11px] font-mono cursor-pointer transition-colors ${a===o?"bg-ink text-canvas font-semibold":"bg-canvas border border-ink/10 text-ink/75 hover:bg-ink/5"}`,children:[o,"%"]},o))})]})]})]})}function L({zoomLevel:t,onZoomIn:r,onZoomOut:a,onResetZoom:l}){return e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 text-xs font-mono",children:[e("button",{type:"button",onClick:a,disabled:t<=50,"aria-label":"Perkecil tampilan",title:"Zoom Out (-10%)",className:"p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors",children:e(Na,{size:12})}),e("button",{type:"button",onClick:l,className:"px-1 text-[10px] font-medium text-ink/75 hover:text-ink hover:underline cursor-pointer select-none",title:"Reset Zoom (100%)",children:[t,"%"]}),e("button",{type:"button",onClick:r,disabled:t>=200,"aria-label":"Perbesar tampilan",title:"Zoom In (+10%)",className:"p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors",children:e(Qa,{size:12})})]})}var h="p-1.5 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink transition-colors cursor-pointer disabled:cursor-not-allowed";function O(t){let r=[],{url:a,zoomLevel:l,copied:p,included:c}=t;if(t.viewportMode&&t.onChangeViewport){let{viewportMode:o,onChangeViewport:u,onSetZoom:b}=t;r.push({id:"viewport",actions:k.map((m)=>({label:m.label,icon:m.icon,onSelect:()=>u(m.id),active:o===m.id})),children:e(z,{viewportMode:o,onChangeViewport:u,zoomLevel:l,onSetZoom:b})})}if(r.push({id:"zoom",actions:[{label:"Zoom in (+10%)",icon:Qa,onSelect:t.onZoomIn,disabled:l>=200},{label:"Zoom out (-10%)",icon:Na,onSelect:t.onZoomOut,disabled:l<=50},{label:"Reset zoom (100%)",icon:Ft,onSelect:t.onResetZoom,active:l===100}],children:e(L,{zoomLevel:l,onZoomIn:t.onZoomIn,onZoomOut:t.onZoomOut,onResetZoom:t.onResetZoom})}),r.push({id:"include",actions:[{label:c?"Page context added to the draft":"Include this page in the chat draft",icon:qa,onSelect:t.onIncludeInChat,disabled:!a}],children:e("button",{type:"button",onClick:t.onIncludeInChat,disabled:!a,"aria-label":"Include this page in the chat draft",title:c?"Page context added to the draft":"Include this page in the chat draft",className:h,children:c?e(f,{size:14,className:"text-success"}):e(qa,{size:14})})}),t.annotate){let o=t.annotate;r.push({id:"annotate",actions:[{label:o.count>0?`${o.active?"Tutup mode anotasi":"Buka mode anotasi"} (${o.count})`:"Mark a part of the page, then send it to the chat",icon:y,onSelect:o.onToggle,active:o.active,disabled:!a}],children:e("button",{type:"button",onClick:o.onToggle,disabled:!a,"aria-label":"Page annotation mode","aria-pressed":o.active,title:o.active?"Tutup mode anotasi":o.count>0?`Anotasi (${o.count}) — buka lagi`:"Mark a part of the page, then send it to the chat",className:`${h} relative ${o.active?"bg-ink/10 text-ink":""}`,children:[e(y,{size:14}),o.count>0&&e("span",{className:"absolute -top-0.5 -right-0.5 min-w-[13px] h-[13px] px-0.5 rounded-full bg-error text-paper text-[10px] leading-[13px] font-mono text-center",children:o.count})]})})}if(r.push({id:"copy",actions:[{label:p?"Copied URL!":"Copy URL",icon:re,onSelect:t.onCopy,disabled:!a}],children:e("button",{type:"button",onClick:t.onCopy,disabled:!a,"aria-label":"Salin URL",title:p?"Copied URL!":"Copy URL",className:h,children:p?e(f,{size:14,className:"text-success"}):e(re,{size:14})})}),t.onReconnect){let o=t.onReconnect;r.push({id:"reconnect",actions:[{label:"Sambungkan ulang live view",icon:Ca,onSelect:o}],children:e("button",{type:"button",onClick:o,"aria-label":"Sambungkan ulang live view",title:"Reconnect live view",className:h,children:e(Ca,{size:14})})})}return r.push({id:"open-external",actions:[{label:t.openExternalLabel,icon:Ee,onSelect:t.onOpenExternal,disabled:!a}],children:e("button",{type:"button",onClick:t.onOpenExternal,disabled:!a,"aria-label":t.openExternalLabel,title:t.openExternalTitle,className:h,children:e(Ee,{size:14})})}),r}var P=108,ee=280,oe=18,te=140,ne=36;function xu({url:t,statusDotClass:r,statusLabel:a,viewportMode:l,zoomLevel:p,onChangeViewport:c,onZoomIn:o,onZoomOut:u,onResetZoom:b,onSetZoom:m,annotate:A,onIncludeInChat:V,onOpenExternal:E,onReconnect:D,openExternalLabel:_,openExternalTitle:U,children:H}){let[X,T]=n(!1),[q,N]=n(!1),g=i(null),[x,R]=n(0),F=O({url:t,zoomLevel:p,copied:X,included:q,viewportMode:l,onChangeViewport:c,annotate:A,onReconnect:D,onIncludeInChat:()=>{V(),N(!0),setTimeout(()=>N(!1),2500)},onCopy:()=>{if(!t)return;navigator.clipboard.writeText(t).then(()=>{T(!0),setTimeout(()=>T(!1),2000)}).catch(()=>{})},onOpenExternal:E,onZoomIn:o,onZoomOut:u,onResetZoom:b,onSetZoom:m,openExternalLabel:_,openExternalTitle:U});W(()=>{let v=g.current;if(!v)return;R(v.clientWidth)}),W(()=>{let v=g.current;if(!v||typeof ResizeObserver>"u")return;let M=new ResizeObserver(()=>R(v.clientWidth));return M.observe(v),()=>M.disconnect()},[]);let I=x===0||x>=ee,S=I?x>0?Math.min(P,x*0.25):P:oe,G=x>0?Math.max(0,x-S-te-ne):void 0;return e("div",{ref:g,"data-browser-toolbar":"",className:"h-10 px-2.5 border-b border-ink/10 bg-paper flex items-center gap-x-2 flex-shrink-0 select-none",children:[e("div",{className:"flex items-center space-x-1.5 flex-shrink-0 min-w-0",style:{maxWidth:`${S}px`},title:a,children:[e("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${r}`}),I&&e("span",{className:"text-[10px] font-mono uppercase tracking-wide text-ink/60 truncate",children:a})]}),e("div",{className:"flex flex-1 min-w-0 items-center",children:H}),e(yi,{clusters:F,available:G})]})}
2
- export{xu};
1
+ import{d,n,W,i,e,s,f,B,re,Ee,Ha,xa,Pt,Ea,fr,xt,Dt}from"./index-8hgm0abr.js";import{Qa,Ra,ki}from"./index-sx809d6d.js";var J={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]},y=s(J);var K={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]},Z=s(K);var Q={name:"ratio",size:24,node:[["rect",{width:"12",height:"20",x:"6",y:"2",rx:"2",key:"1oxtiu"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]]},w=s(Q);var Y={name:"tablet",size:24,node:[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]},C=s(Y);var k=[{id:"responsive",label:"Responsive (100% Fluid)",category:"responsive",icon:xa},{id:"desktop-16-9",label:"Desktop 16:9 (Auto H:W)",category:"responsive",icon:w},{id:"laptop",label:"Laptop (1024 × 768)",category:"responsive",icon:Z},{id:"tablet",label:"Tablet (768 × 1024)",category:"mobile",icon:C},{id:"mobile",label:"Mobile Phone (375 × 667)",category:"mobile",icon:fr},{id:"mobile-lg",label:"Mobile Large (414 × 896)",category:"mobile",icon:fr}];function j(t){switch(t){case"desktop-16-9":return"Desktop 16:9";case"laptop":return"Laptop 1024p";case"tablet":return"Tablet 768p";case"mobile":return"Mobile 375p";case"mobile-lg":return"Mobile Lg 414p";case"responsive":default:return"Responsive"}}function z({viewportMode:t,onChangeViewport:r,zoomLevel:a=100,onSetZoom:l}){let[p,c]=n(null);return e("div",{className:"flex items-center space-x-1.5 flex-shrink-0",children:[e("div",{className:"hidden sm:flex items-center bg-canvas border border-ink/10 rounded-md p-0.5",children:[e("button",{type:"button",onClick:()=>r("responsive"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${t==="responsive"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Responsive (100% Fluid)",children:e(xa,{size:12})}),e("button",{type:"button",onClick:()=>r("desktop-16-9"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${t==="desktop-16-9"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Desktop 16:9 (Auto Height following Width)",children:e(w,{size:12})}),e("button",{type:"button",onClick:()=>r("tablet"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${t==="tablet"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Tablet (768px)",children:e(C,{size:12})}),e("button",{type:"button",onClick:()=>r("mobile"),className:`p-1 rounded text-xs transition-colors cursor-pointer ${t==="mobile"?"bg-ink text-canvas font-medium":"text-ink/50 hover:text-ink"}`,title:"Mobile (375px)",children:e(fr,{size:12})})]}),e("button",{type:"button","aria-haspopup":"menu","aria-expanded":p!==null,onClick:(o)=>c(p?null:xt(o.currentTarget)),className:"flex items-center space-x-1 px-2 py-1 rounded bg-canvas border border-ink/15 hover:border-ink/30 text-ink text-[11px] font-mono transition-colors cursor-pointer",title:"Device & Responsive Testing Menu",children:[e("span",{className:"hidden md:inline text-[10px] font-medium",children:j(t)}),e(B,{size:11,className:"text-ink/60"})]}),e(Dt,{anchor:p,ariaLabel:"Device & Responsive Testing Menu",className:"w-56 bg-paper border border-ink/15 rounded-lg shadow-xl py-1 text-xs font-mono",onClose:()=>c(null),children:[e("div",{className:"px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:"Responsive Testing"}),k.filter((o)=>o.category==="responsive").map((o)=>{let u=o.icon,b=t===o.id;return e("button",{type:"button",onClick:()=>{r(o.id),c(null)},className:`w-full px-2.5 py-1.5 flex items-center justify-between text-left hover:bg-ink/5 cursor-pointer ${b?"bg-ink/10 font-semibold text-ink":"text-ink/75"}`,children:[e("div",{className:"flex items-center space-x-2",children:[e(u,{size:13,className:"text-ink/60"}),e("span",{children:o.label})]}),b&&e(f,{size:12,className:"text-success"})]},o.id)}),e("div",{className:"mt-1 pt-1 border-t border-ink/10 px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:"Mobile Testing"}),k.filter((o)=>o.category==="mobile").map((o)=>{let u=o.icon,b=t===o.id;return e("button",{type:"button",onClick:()=>{r(o.id),c(null)},className:`w-full px-2.5 py-1.5 flex items-center justify-between text-left hover:bg-ink/5 cursor-pointer ${b?"bg-ink/10 font-semibold text-ink":"text-ink/75"}`,children:[e("div",{className:"flex items-center space-x-2",children:[e(u,{size:13,className:"text-ink/60"}),e("span",{children:o.label})]}),b&&e(f,{size:12,className:"text-success"})]},o.id)}),l&&e(d,{children:[e("div",{className:"mt-1 pt-1 border-t border-ink/10 px-2.5 py-1 text-[10px] text-ink/40 uppercase tracking-wider font-semibold",children:["Zoom Scale (",a,"%)"]}),e("div",{className:"grid grid-cols-3 gap-1 px-2 py-1",children:[50,75,100,125,150,200].map((o)=>e("button",{type:"button",onClick:()=>{l(o),c(null)},className:`px-1.5 py-1 text-center rounded text-[11px] font-mono cursor-pointer transition-colors ${a===o?"bg-ink text-canvas font-semibold":"bg-canvas border border-ink/10 text-ink/75 hover:bg-ink/5"}`,children:[o,"%"]},o))})]})]})]})}function L({zoomLevel:t,onZoomIn:r,onZoomOut:a,onResetZoom:l}){return e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 text-xs font-mono",children:[e("button",{type:"button",onClick:a,disabled:t<=50,"aria-label":"Perkecil tampilan",title:"Zoom Out (-10%)",className:"p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors",children:e(Ra,{size:12})}),e("button",{type:"button",onClick:l,className:"px-1 text-[10px] font-medium text-ink/75 hover:text-ink hover:underline cursor-pointer select-none",title:"Reset Zoom (100%)",children:[t,"%"]}),e("button",{type:"button",onClick:r,disabled:t>=200,"aria-label":"Perbesar tampilan",title:"Zoom In (+10%)",className:"p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors",children:e(Qa,{size:12})})]})}var h="p-1.5 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink transition-colors cursor-pointer disabled:cursor-not-allowed";function O(t){let r=[],{url:a,zoomLevel:l,copied:p,included:c}=t;if(t.viewportMode&&t.onChangeViewport){let{viewportMode:o,onChangeViewport:u,onSetZoom:b}=t;r.push({id:"viewport",actions:k.map((m)=>({label:m.label,icon:m.icon,onSelect:()=>u(m.id),active:o===m.id})),children:e(z,{viewportMode:o,onChangeViewport:u,zoomLevel:l,onSetZoom:b})})}if(r.push({id:"zoom",actions:[{label:"Zoom in (+10%)",icon:Qa,onSelect:t.onZoomIn,disabled:l>=200},{label:"Zoom out (-10%)",icon:Ra,onSelect:t.onZoomOut,disabled:l<=50},{label:"Reset zoom (100%)",icon:Pt,onSelect:t.onResetZoom,active:l===100}],children:e(L,{zoomLevel:l,onZoomIn:t.onZoomIn,onZoomOut:t.onZoomOut,onResetZoom:t.onResetZoom})}),r.push({id:"include",actions:[{label:c?"Page context added to the draft":"Include this page in the chat draft",icon:Ha,onSelect:t.onIncludeInChat,disabled:!a}],children:e("button",{type:"button",onClick:t.onIncludeInChat,disabled:!a,"aria-label":"Include this page in the chat draft",title:c?"Page context added to the draft":"Include this page in the chat draft",className:h,children:c?e(f,{size:14,className:"text-success"}):e(Ha,{size:14})})}),t.annotate){let o=t.annotate;r.push({id:"annotate",actions:[{label:o.count>0?`${o.active?"Tutup mode anotasi":"Buka mode anotasi"} (${o.count})`:"Mark a part of the page, then send it to the chat",icon:y,onSelect:o.onToggle,active:o.active,disabled:!a}],children:e("button",{type:"button",onClick:o.onToggle,disabled:!a,"aria-label":"Page annotation mode","aria-pressed":o.active,title:o.active?"Tutup mode anotasi":o.count>0?`Anotasi (${o.count}) — buka lagi`:"Mark a part of the page, then send it to the chat",className:`${h} relative ${o.active?"bg-ink/10 text-ink":""}`,children:[e(y,{size:14}),o.count>0&&e("span",{className:"absolute -top-0.5 -right-0.5 min-w-[13px] h-[13px] px-0.5 rounded-full bg-error text-paper text-[10px] leading-[13px] font-mono text-center",children:o.count})]})})}if(r.push({id:"copy",actions:[{label:p?"Copied URL!":"Copy URL",icon:re,onSelect:t.onCopy,disabled:!a}],children:e("button",{type:"button",onClick:t.onCopy,disabled:!a,"aria-label":"Salin URL",title:p?"Copied URL!":"Copy URL",className:h,children:p?e(f,{size:14,className:"text-success"}):e(re,{size:14})})}),t.onReconnect){let o=t.onReconnect;r.push({id:"reconnect",actions:[{label:"Sambungkan ulang live view",icon:Ea,onSelect:o}],children:e("button",{type:"button",onClick:o,"aria-label":"Sambungkan ulang live view",title:"Reconnect live view",className:h,children:e(Ea,{size:14})})})}return r.push({id:"open-external",actions:[{label:t.openExternalLabel,icon:Ee,onSelect:t.onOpenExternal,disabled:!a}],children:e("button",{type:"button",onClick:t.onOpenExternal,disabled:!a,"aria-label":t.openExternalLabel,title:t.openExternalTitle,className:h,children:e(Ee,{size:14})})}),r}var P=108,ee=280,oe=18,te=140,ne=36;function Cu({url:t,statusDotClass:r,statusLabel:a,viewportMode:l,zoomLevel:p,onChangeViewport:c,onZoomIn:o,onZoomOut:u,onResetZoom:b,onSetZoom:m,annotate:A,onIncludeInChat:V,onOpenExternal:E,onReconnect:D,openExternalLabel:_,openExternalTitle:U,children:H}){let[X,T]=n(!1),[q,N]=n(!1),g=i(null),[x,R]=n(0),F=O({url:t,zoomLevel:p,copied:X,included:q,viewportMode:l,onChangeViewport:c,annotate:A,onReconnect:D,onIncludeInChat:()=>{V(),N(!0),setTimeout(()=>N(!1),2500)},onCopy:()=>{if(!t)return;navigator.clipboard.writeText(t).then(()=>{T(!0),setTimeout(()=>T(!1),2000)}).catch(()=>{})},onOpenExternal:E,onZoomIn:o,onZoomOut:u,onResetZoom:b,onSetZoom:m,openExternalLabel:_,openExternalTitle:U});W(()=>{let v=g.current;if(!v)return;R(v.clientWidth)}),W(()=>{let v=g.current;if(!v||typeof ResizeObserver>"u")return;let M=new ResizeObserver(()=>R(v.clientWidth));return M.observe(v),()=>M.disconnect()},[]);let I=x===0||x>=ee,S=I?x>0?Math.min(P,x*0.25):P:oe,G=x>0?Math.max(0,x-S-te-ne):void 0;return e("div",{ref:g,"data-browser-toolbar":"",className:"h-10 px-2.5 border-b border-ink/10 bg-paper flex items-center gap-x-2 flex-shrink-0 select-none",children:[e("div",{className:"flex items-center space-x-1.5 flex-shrink-0 min-w-0",style:{maxWidth:`${S}px`},title:a,children:[e("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${r}`}),I&&e("span",{className:"text-[10px] font-mono uppercase tracking-wide text-ink/60 truncate",children:a})]}),e("div",{className:"flex flex-1 min-w-0 items-center",children:H}),e(ki,{clusters:F,available:G})]})}
2
+ export{Cu};
@@ -1,2 +1,2 @@
1
- import{t}from"./index-b6cyn4hr.js";function be(c,e){if(c.accDescr)e.setAccDescription?.(c.accDescr);if(c.accTitle)e.setAccTitle?.(c.accTitle);if(c.title)e.setDiagramTitle?.(c.title)}t(be,"populateCommonDb");
1
+ import{t}from"./index-13dr1t1r.js";function be(c,e){if(c.accDescr)e.setAccDescription?.(c.accDescr);if(c.accTitle)e.setAccTitle?.(c.accTitle);if(c.title)e.setDiagramTitle?.(c.title)}t(be,"populateCommonDb");
2
2
  export{be};