farming-code 2.2.23 → 2.2.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/README.md +9 -2
  2. package/README.zh_cn.md +9 -2
  3. package/THIRD_PARTY_NOTICES.md +3 -0
  4. package/backend/acp-runtime.js +15 -1
  5. package/backend/agent-manager.js +1054 -94
  6. package/backend/atomic-json-store.js +37 -0
  7. package/backend/cli-agents.js +9 -7
  8. package/backend/config-manager.js +167 -58
  9. package/backend/control-api.js +2 -1
  10. package/backend/farming-agent-bootstrap.js +49 -0
  11. package/backend/farming-agent-bootstrap.zh_cn.md +5 -0
  12. package/backend/farming-app-cli.js +9 -2
  13. package/backend/farming-cli.js +55 -0
  14. package/backend/farming-session-store.js +92 -89
  15. package/backend/main-agent-skills.js +17 -0
  16. package/backend/native-pty-host-client.js +99 -7
  17. package/backend/native-pty-host-path.js +20 -0
  18. package/backend/native-pty-host.js +6 -5
  19. package/backend/preview-session-manager.js +68 -0
  20. package/backend/provider-adapters.js +44 -5
  21. package/backend/review-session-store.js +32 -25
  22. package/backend/review-state-store.js +13 -14
  23. package/backend/run-history-store.js +13 -16
  24. package/backend/server.js +103 -78
  25. package/backend/storage-layout.js +20 -0
  26. package/backend/workspace-file-router.js +171 -6
  27. package/backend/workspace-file-service.js +19 -0
  28. package/backend/workspace-root-registry.js +6 -4
  29. package/dist/assets/App-CM7Cy-l4.css +1 -0
  30. package/dist/assets/App-CPG4WcjO.js +658 -0
  31. package/dist/assets/{FileEditorMarkdownPreview-KbnE8VC8.js → FileEditorMarkdownPreview-DYOMm-b1.js} +5 -5
  32. package/dist/assets/FileEditorPane-DXXq82aM.js +2 -0
  33. package/dist/assets/IconGlyphs-DrdPjYXr.js +1 -0
  34. package/dist/assets/ProjectFilesSection-CP66XVPl.js +12 -0
  35. package/dist/assets/{ReviewPage-L1vh1Ggs.js → ReviewPage-w21MEPD6.js} +1 -1
  36. package/dist/assets/{abnfDiagram-VRR7QNED-nnglrXFi.js → abnfDiagram-VRR7QNED-BY1qwq8A.js} +1 -1
  37. package/dist/assets/api-w2x5QfxB.js +1 -0
  38. package/dist/assets/{arc-CWoVlxJw.js → arc-DgZRAlwj.js} +1 -1
  39. package/dist/assets/{architectureDiagram-ZJ3FMSHR-BEXMaFfY.js → architectureDiagram-ZJ3FMSHR-jFn144od.js} +1 -1
  40. package/dist/assets/{blockDiagram-677ZJIJ3-1mCezSBk.js → blockDiagram-677ZJIJ3-BmRjlV0H.js} +1 -1
  41. package/dist/assets/{c4Diagram-LMCZKHZV-DhTiI6Uv.js → c4Diagram-LMCZKHZV-DUKul6tT.js} +1 -1
  42. package/dist/assets/{workspace-editor-monaco-DLlws5Ig.js → channel-CI9j3QFD.js} +1 -1
  43. package/dist/assets/chunk-2Q5K7J3B-87UnWaoh.js +1 -0
  44. package/dist/assets/{chunk-32BRIVSS-CCdsKd73.js → chunk-32BRIVSS-rGVu23o5.js} +1 -1
  45. package/dist/assets/{chunk-52WLFC77-Gncjk4LF.js → chunk-52WLFC77-CvFDKgbB.js} +1 -1
  46. package/dist/assets/{chunk-5VM5RSS4-Dlw7AXWp.js → chunk-5VM5RSS4-CFgnRW1C.js} +1 -1
  47. package/dist/assets/{chunk-7BUUIJ7U-ZBRhjLOh.js → chunk-7BUUIJ7U-Cp7bqW6s.js} +1 -1
  48. package/dist/assets/{chunk-C7G6YPKG-CiDVUP82.js → chunk-C7G6YPKG-BIS1gjZO.js} +1 -1
  49. package/dist/assets/{chunk-EX3LRPZG-z6gXP2_N.js → chunk-EX3LRPZG-BKG-cR9j.js} +1 -1
  50. package/dist/assets/{chunk-FWX5IMBZ-DMZBccQa.js → chunk-FWX5IMBZ-B8PsTr8a.js} +2 -2
  51. package/dist/assets/{chunk-HOUHSVGY-D8tIeoPk.js → chunk-HOUHSVGY-BHFOAiXT.js} +1 -1
  52. package/dist/assets/{chunk-ICXQ74PX-b6oQ2Q17.js → chunk-ICXQ74PX-CvLE1J9X.js} +1 -1
  53. package/dist/assets/{chunk-JWPE2WC7-DSyBRaRG.js → chunk-JWPE2WC7-D8misks7.js} +1 -1
  54. package/dist/assets/{chunk-MOJQB5TN-DAVH_p2a.js → chunk-MOJQB5TN-D-oNgSNH.js} +1 -1
  55. package/dist/assets/{chunk-OGEWGWER-DxoiMCI-.js → chunk-OGEWGWER-C2N-la9e.js} +1 -1
  56. package/dist/assets/{chunk-PUDLZKDR-NsOWh7HM.js → chunk-PUDLZKDR-BwI3Jz8q.js} +1 -1
  57. package/dist/assets/{chunk-Q4XR5HBZ-Di4H7L21.js → chunk-Q4XR5HBZ-BuqGfsXA.js} +1 -1
  58. package/dist/assets/{chunk-RYQCIY6F-CZA9pvFX.js → chunk-RYQCIY6F-Bq4XZcGt.js} +1 -1
  59. package/dist/assets/{chunk-V7JOEXUC-DttpZg9Y.js → chunk-V7JOEXUC-QZLzdTTJ.js} +1 -1
  60. package/dist/assets/chunk-VAUOI2AC-Cb0-kQ9g.js +1 -0
  61. package/dist/assets/{chunk-VR4S4FIN-D-Fmtd4Z.js → chunk-VR4S4FIN-DcZTpML_.js} +1 -1
  62. package/dist/assets/{chunk-WYO6CB5R-CUxMtfK2.js → chunk-WYO6CB5R-DCU8wuny.js} +2 -2
  63. package/dist/assets/chunk-XXDRQBXY-BZAC1Krv.js +1 -0
  64. package/dist/assets/{chunk-ZGVPDNZ5-CoV2QEl0.js → chunk-ZGVPDNZ5-B7r85QbY.js} +1 -1
  65. package/dist/assets/{chunk-ZIRB5QZD-DncwlQQc.js → chunk-ZIRB5QZD-BgEnDWhQ.js} +1 -1
  66. package/dist/assets/classDiagram-OUVF2IWQ-DcvGOuvi.js +1 -0
  67. package/dist/assets/classDiagram-v2-EOCWNBFH-DDYUSofQ.js +1 -0
  68. package/dist/assets/code-dark-BDjwj7Um.css +1 -0
  69. package/dist/assets/{cose-bilkent-JH36ORCC-BNIAz0nN.js → cose-bilkent-JH36ORCC-CThXS2qG.js} +1 -1
  70. package/dist/assets/{cssMode-DDWxTPm_.js → cssMode-Bdg5RpcJ.js} +1 -1
  71. package/dist/assets/{cynefinDiagram-TSTJHNR4-0xPI92Lg.js → cynefinDiagram-TSTJHNR4-DxBgzw25.js} +1 -1
  72. package/dist/assets/{dagre-DXlcHgr3.js → dagre-BM-GvGUZ.js} +1 -1
  73. package/dist/assets/{dagre-VKFMJZFB-DfuMG4gU.js → dagre-VKFMJZFB-B7UCRmxR.js} +1 -1
  74. package/dist/assets/{diagram-FQU43EPY-CT00bLZ6.js → diagram-FQU43EPY-CeL2DwKx.js} +1 -1
  75. package/dist/assets/{diagram-G47NLZAW-Xbh7zXUx.js → diagram-G47NLZAW-BEirglCC.js} +1 -1
  76. package/dist/assets/{diagram-NH7WQ7WH-SRDVPfn7.js → diagram-NH7WQ7WH-C6wcI-Rl.js} +1 -1
  77. package/dist/assets/{diagram-OA4YK3LP-CQRli4Np.js → diagram-OA4YK3LP-DpM-XXtJ.js} +1 -1
  78. package/dist/assets/{diagram-WEI45ONY-DMf17WQi.js → diagram-WEI45ONY-BQyaut9k.js} +1 -1
  79. package/dist/assets/{ebnfDiagram-CCIWWBDH-DhpFkgJ5.js → ebnfDiagram-CCIWWBDH-UmAXsUhr.js} +1 -1
  80. package/dist/assets/{erDiagram-Q63AITRT-1IwxWmJo.js → erDiagram-Q63AITRT-CdYLEOch.js} +1 -1
  81. package/dist/assets/file-icons-BOlcJ0ZF.js +1 -0
  82. package/dist/assets/flowDiagram-23GEKE2U-CO-z9-tq.js +1 -0
  83. package/dist/assets/{freemarker2-QBsTERH-.js → freemarker2-DfMDJfnE.js} +1 -1
  84. package/dist/assets/{ganttDiagram-NO4QXBWP-BNCdfyr1.js → ganttDiagram-NO4QXBWP-DgSUNdUB.js} +1 -1
  85. package/dist/assets/{gitGraphDiagram-IHSO6WYX-pbyWZuiX.js → gitGraphDiagram-IHSO6WYX-DjwjtRtF.js} +1 -1
  86. package/dist/assets/{handlebars-CuoxPo5A.js → handlebars-BEdPtzMT.js} +1 -1
  87. package/dist/assets/{html-gX5PEu0Q.js → html-B1fPb1QD.js} +1 -1
  88. package/dist/assets/html2canvas-DsczWxBa.js +5 -0
  89. package/dist/assets/{htmlMode-DIWUbUxd.js → htmlMode-CY2ZjHxH.js} +1 -1
  90. package/dist/assets/{index-DhTUO8DA.js → index-BzQO3pUr.js} +2 -2
  91. package/dist/assets/{infoDiagram-FWYZ7A6U-BcTOgDbe.js → infoDiagram-FWYZ7A6U-Bi9076l2.js} +1 -1
  92. package/dist/assets/{ishikawaDiagram-FXEZZL3T-DCdvGKrn.js → ishikawaDiagram-FXEZZL3T-DaMaNZN7.js} +1 -1
  93. package/dist/assets/{javascript-BYKGIUGs.js → javascript-BV2OsWA0.js} +1 -1
  94. package/dist/assets/{journeyDiagram-5HDEW3XC-BZ-1q_IT.js → journeyDiagram-5HDEW3XC-CfDy69EZ.js} +1 -1
  95. package/dist/assets/{jsonMode-AFmQQP6u.js → jsonMode-zd07aeuX.js} +1 -1
  96. package/dist/assets/{kanban-definition-HUTT4EX6-BIgejCjj.js → kanban-definition-HUTT4EX6-XFvZ722B.js} +1 -1
  97. package/dist/assets/{line-CfptFMmX.js → line-BXK9PKLn.js} +1 -1
  98. package/dist/assets/{linear-Dld3_ERu.js → linear-CULvmq2Z.js} +1 -1
  99. package/dist/assets/{liquid-DBIl-f0z.js → liquid-BParI24X.js} +1 -1
  100. package/dist/assets/{lspLanguageFeatures-DK6tqicV.js → lspLanguageFeatures-BzredkoV.js} +1 -1
  101. package/dist/assets/main-BlVUXfxa.css +1 -0
  102. package/dist/assets/{map-LZWWoeWa.js → map-C9Qw9eWh.js} +1 -1
  103. package/dist/assets/{mdx-DS-bVtZN.js → mdx-vGzUJN98.js} +1 -1
  104. package/dist/assets/{mermaid.core-gSpX30pV.js → mermaid.core-CzazaIKr.js} +3 -3
  105. package/dist/assets/{mindmap-definition-LN4V7U3C-BKBaI4LW.js → mindmap-definition-LN4V7U3C-Uoff7hZ3.js} +1 -1
  106. package/dist/assets/{monaco.contribution-BXz-lfFB.js → monaco.contribution-BmaeBQEc.js} +2 -2
  107. package/dist/assets/{ordinal-BLrOss5K.js → ordinal-r6pIwRdZ.js} +1 -1
  108. package/dist/assets/{pegDiagram-2B236MQR-sBvDY3VX.js → pegDiagram-2B236MQR-CCBiHQjk.js} +1 -1
  109. package/dist/assets/{pieDiagram-ENE6RG2P-DWlWcu08.js → pieDiagram-ENE6RG2P-D61s7l75.js} +1 -1
  110. package/dist/assets/{python-C93q3xXz.js → python-CUwdLgsI.js} +1 -1
  111. package/dist/assets/{quadrantDiagram-ABIIQ3AL-DZutUd3J.js → quadrantDiagram-ABIIQ3AL-D_CWk2DQ.js} +1 -1
  112. package/dist/assets/{railroadDiagram-RFXS5EU6-DQb3lXGM.js → railroadDiagram-RFXS5EU6-CdlCHtxN.js} +1 -1
  113. package/dist/assets/{razor-CBifNGXO.js → razor-BScebUxU.js} +1 -1
  114. package/dist/assets/{requirementDiagram-TGXJPOKE-DqFGXu2e.js → requirementDiagram-TGXJPOKE-BLpHtkoC.js} +1 -1
  115. package/dist/assets/{sankeyDiagram-HTMAVEWB-d7ECahnO.js → sankeyDiagram-HTMAVEWB-CkhYZN2j.js} +1 -1
  116. package/dist/assets/{sequenceDiagram-DBY2YBRQ-DdsbKqct.js → sequenceDiagram-DBY2YBRQ-8bploKJl.js} +1 -1
  117. package/dist/assets/{sizeCapture-X5ZJPWSS-daTB6OcF.js → sizeCapture-X5ZJPWSS-DtSdkS0d.js} +1 -1
  118. package/dist/assets/{src-WBW1QxJt.js → src-6yeq6WBA.js} +1 -1
  119. package/dist/assets/{stateDiagram-2N3HPSRC-P6iSrgwR.js → stateDiagram-2N3HPSRC-DfmVGpfA.js} +1 -1
  120. package/dist/assets/stateDiagram-v2-6OUMAXLB-B2c9CQ-J.js +1 -0
  121. package/dist/assets/{swimlanes-5IMT3BWC-BGnZJx1M.js → swimlanes-5IMT3BWC-DRLk2zRF.js} +2 -2
  122. package/dist/assets/swimlanesDiagram-G3AALYLV-B7_APh_h.js +8 -0
  123. package/dist/assets/{timeline-definition-FHXFAJF6-rA-r3aUR.js → timeline-definition-FHXFAJF6-Cngfy588.js} +1 -1
  124. package/dist/assets/{tsMode-B0oUTcXQ.js → tsMode-DzUAibXK.js} +1 -1
  125. package/dist/assets/{typescript-KJKfYO7K.js → typescript-D9EOeM7N.js} +1 -1
  126. package/dist/assets/{vennDiagram-L72KCM5P-DiVKUjA9.js → vennDiagram-L72KCM5P-DeJn63Lq.js} +1 -1
  127. package/dist/assets/{wardleyDiagram-EHGQE667-Cfxh7UOn.js → wardleyDiagram-EHGQE667-BH1nzy77.js} +1 -1
  128. package/dist/assets/{workers-BSQRIkqa.js → workers-DAiomYZM.js} +1 -1
  129. package/dist/assets/workspace-editor-model-CSGCl21x.js +1 -0
  130. package/dist/assets/workspace-editor-monaco-CFEfFNcA.js +1 -0
  131. package/dist/assets/{workspace-editor-monaco-BIpqcWf1.js → workspace-editor-monaco-tXA-udGx.js} +3 -3
  132. package/dist/assets/workspace-view-state-BS_V8JVs.js +7 -0
  133. package/dist/assets/{xml-C8FAcN6j.js → xml-wWl1dhkQ.js} +1 -1
  134. package/dist/assets/{xychartDiagram-FW5EYKEG--hmryQeL.js → xychartDiagram-FW5EYKEG-SkO2prCU.js} +1 -1
  135. package/dist/assets/{yaml-BQ4NrRhG.js → yaml-Dc2WDaOZ.js} +1 -1
  136. package/dist/crt-markdown-renderer.js +46 -46
  137. package/dist/index.html +1 -1
  138. package/extensions/browser/backend/agent-capability.js +55 -0
  139. package/extensions/browser/backend/browser-mcp-server.js +269 -0
  140. package/extensions/browser/backend/browser-resource-manager.js +524 -0
  141. package/extensions/browser/backend/browser-resource-store.js +149 -0
  142. package/extensions/browser/backend/browser-router.js +128 -0
  143. package/extensions/browser/backend/cdp-browser-runtime.js +648 -0
  144. package/extensions/browser/backend/cdp-client.js +167 -0
  145. package/extensions/browser/backend/executable-discovery.js +91 -0
  146. package/extensions/browser/backend/farming-browser-client.js +83 -0
  147. package/extensions/browser/backend/index.js +7 -0
  148. package/extensions/browser/bin/farming-browser +117 -0
  149. package/extensions/browser/frontend/BrowserSidebarPortals.tsx +362 -0
  150. package/extensions/browser/frontend/BrowserViewer.tsx +329 -0
  151. package/extensions/browser/frontend/browser-resource-state.ts +60 -0
  152. package/extensions/browser/frontend/browser.css +516 -0
  153. package/extensions/browser/frontend/types.ts +25 -0
  154. package/extensions/browser/frontend/useBrowserResources.ts +151 -0
  155. package/frontend/session-bridge.js +7 -6
  156. package/frontend/skins/crt/app.js +64 -4
  157. package/package.json +18 -13
  158. package/shared/browser-protocol.js +1 -1
  159. package/dist/assets/App-BbNBDA__.js +0 -210
  160. package/dist/assets/App-BrP-ENHg.css +0 -1
  161. package/dist/assets/FileEditorPane-5_HUejjd.js +0 -2
  162. package/dist/assets/IconGlyphs-C2WFcoJS.js +0 -1
  163. package/dist/assets/ProjectFilesSection-C1RAJWOE.js +0 -12
  164. package/dist/assets/api-D8nyOEbz.js +0 -1
  165. package/dist/assets/channel-BVWNatUB.js +0 -1
  166. package/dist/assets/chunk-2Q5K7J3B-d5WWh8jo.js +0 -1
  167. package/dist/assets/chunk-VAUOI2AC-UHNr_yhX.js +0 -1
  168. package/dist/assets/chunk-XXDRQBXY-BBXwjhUx.js +0 -1
  169. package/dist/assets/classDiagram-OUVF2IWQ-Db0ib5iE.js +0 -1
  170. package/dist/assets/classDiagram-v2-EOCWNBFH-Bkf69XF9.js +0 -1
  171. package/dist/assets/code-dark-BKtvf0Xc.css +0 -1
  172. package/dist/assets/file-icons-CHWt5nSy.js +0 -1
  173. package/dist/assets/flowDiagram-23GEKE2U-DYFo2xmB.js +0 -1
  174. package/dist/assets/main-XMXgyJJt.css +0 -1
  175. package/dist/assets/stateDiagram-v2-6OUMAXLB-DIYSf_qh.js +0 -1
  176. package/dist/assets/swimlanesDiagram-G3AALYLV-BIkrlKrZ.js +0 -8
  177. package/dist/assets/workspace-editor-model-D0Im34S5.js +0 -1
  178. package/dist/assets/workspace-view-state-BqB4HM7r.js +0 -7
  179. /package/dist/assets/{abap-Cc5D5h5i.js → abap-CtX5nWyX.js} +0 -0
  180. /package/dist/assets/{apex-BKopwLmx.js → apex-DQJRAHwc.js} +0 -0
  181. /package/dist/assets/{array-HeX70jSN.js → array-BTwzYU0x.js} +0 -0
  182. /package/dist/assets/{azcli-DI-C34WA.js → azcli-9SMrOQ4q.js} +0 -0
  183. /package/dist/assets/{bat-Cbp6u42z.js → bat-CBGLUsw1.js} +0 -0
  184. /package/dist/assets/{bicep-4QA1jTCM.js → bicep-pDx8da1v.js} +0 -0
  185. /package/dist/assets/{cameligo-Dda_adPs.js → cameligo-hZV3vQ6_.js} +0 -0
  186. /package/dist/assets/{chunk-Y2CYZVJY-Di0sYzi1.js → chunk-Y2CYZVJY-BYi0W5ea.js} +0 -0
  187. /package/dist/assets/{clojure-CvY8A83L.js → clojure-BhCwU3gq.js} +0 -0
  188. /package/dist/assets/{coffee-4LX2Sv8A.js → coffee-BVB1PsgH.js} +0 -0
  189. /package/dist/assets/{core-B9MwRjDE.js → core-vPkV8P_m.js} +0 -0
  190. /package/dist/assets/{cpp-D4AzSV28.js → cpp-eTjuiNPq.js} +0 -0
  191. /package/dist/assets/{csharp-C4nWN4Yd.js → csharp-1kP-kKZT.js} +0 -0
  192. /package/dist/assets/{csp-CiEaaS5Z.js → csp-C_iQqIes.js} +0 -0
  193. /package/dist/assets/{css-DXxBRsbk.js → css-CxOs7IfP.js} +0 -0
  194. /package/dist/assets/{cypher-DOMzqyFA.js → cypher-Cd-a9Y82.js} +0 -0
  195. /package/dist/assets/{cytoscape.esm-Cl8iC3D7.js → cytoscape.esm-OLojuicg.js} +0 -0
  196. /package/dist/assets/{dart-BWS7MXt_.js → dart-whhXpexn.js} +0 -0
  197. /package/dist/assets/{defaultLocale-GJwWH1Jr.js → defaultLocale-CPimVhfE.js} +0 -0
  198. /package/dist/assets/{dist-ClAL-Tv5.js → dist-CLPYXg1u.js} +0 -0
  199. /package/dist/assets/{dockerfile-Baf4U3xT.js → dockerfile-DibBi8b6.js} +0 -0
  200. /package/dist/assets/{ecl-CT7udlkQ.js → ecl-DlF1KdoW.js} +0 -0
  201. /package/dist/assets/{editor.api2-B9h6iFPK.js → editor.api2-D74ufkbr.js} +0 -0
  202. /package/dist/assets/{elixir-CIbAZw5l.js → elixir-CHQ8uFT3.js} +0 -0
  203. /package/dist/assets/{flow9-Dqiw45WV.js → flow9-8nUnVKk1.js} +0 -0
  204. /package/dist/assets/{fsharp-E8E2L9jU.js → fsharp-DNZNZyEE.js} +0 -0
  205. /package/dist/assets/{go-CouVSN4D.js → go-_kPJjNc_.js} +0 -0
  206. /package/dist/assets/{graphlib-CbSvZcZU.js → graphlib-CBGF9gA9.js} +0 -0
  207. /package/dist/assets/{graphql-a6h6h5-t.js → graphql-4HCNVt5g.js} +0 -0
  208. /package/dist/assets/{hcl-vso3e6N-.js → hcl-C87ymY0o.js} +0 -0
  209. /package/dist/assets/{ini-SwZZkotR.js → ini-BYrrGNTc.js} +0 -0
  210. /package/dist/assets/{init-BPLPMQ3Y.js → init-8_PCa3LO.js} +0 -0
  211. /package/dist/assets/{java-CtRLC4_3.js → java-B211rJbk.js} +0 -0
  212. /package/dist/assets/{julia-CuJWFKQH.js → julia-DVPsRtBm.js} +0 -0
  213. /package/dist/assets/{katex-C8DPyI6s.js → katex-C2iYad0m.js} +0 -0
  214. /package/dist/assets/{kotlin-B_kBhsre.js → kotlin-BYyNerjp.js} +0 -0
  215. /package/dist/assets/{less-CtrHIfz3.js → less-EC9UblGE.js} +0 -0
  216. /package/dist/assets/{lexon-yVt1pJLu.js → lexon-B1yuUdqW.js} +0 -0
  217. /package/dist/assets/{lua-prOwgJ4U.js → lua-Bo6GFzxT.js} +0 -0
  218. /package/dist/assets/{m3-DhrdTQ84.js → m3-C-Y9cBVI.js} +0 -0
  219. /package/dist/assets/{markdown-DoI5HwSM.js → markdown-BHu-wLbe.js} +0 -0
  220. /package/dist/assets/{mermaid-parser.core-BQtepoLd.js → mermaid-parser.core-IxcGtNYG.js} +0 -0
  221. /package/dist/assets/{mips-Dye5jsBU.js → mips-Dkds26rX.js} +0 -0
  222. /package/dist/assets/{msdax-TkNOyIL8.js → msdax-PU4g-8_g.js} +0 -0
  223. /package/dist/assets/{mysql-CEc-RKZF.js → mysql-fPpuGpS7.js} +0 -0
  224. /package/dist/assets/{objective-c-CqqCsQz0.js → objective-c-Wy1e5JUf.js} +0 -0
  225. /package/dist/assets/{pascal-DO_pj8yg.js → pascal-BIXwvrqU.js} +0 -0
  226. /package/dist/assets/{pascaligo-1cbdZdF3.js → pascaligo-DwR0AtL_.js} +0 -0
  227. /package/dist/assets/{path-YdFzr2W6.js → path-BxQuywGl.js} +0 -0
  228. /package/dist/assets/{perl-B_N3PYfC.js → perl-CGHAl8my.js} +0 -0
  229. /package/dist/assets/{pgsql-9iYk1FQ7.js → pgsql-B91M73E2.js} +0 -0
  230. /package/dist/assets/{php-rO2sgoUM.js → php-C70ttrCx.js} +0 -0
  231. /package/dist/assets/{pla-Cbgv60kq.js → pla-BNrXaRh0.js} +0 -0
  232. /package/dist/assets/{postiats-y6xrhy_M.js → postiats-Dv2IAZR9.js} +0 -0
  233. /package/dist/assets/{powerquery-BaD8gWNE.js → powerquery-CkY5Wq7J.js} +0 -0
  234. /package/dist/assets/{powershell-BMhG4JVe.js → powershell-uGIYLU3C.js} +0 -0
  235. /package/dist/assets/{protobuf-CdOP5kN3.js → protobuf-CavfmJu-.js} +0 -0
  236. /package/dist/assets/{pug-Ck60hNF9.js → pug-Drqnyitx.js} +0 -0
  237. /package/dist/assets/{qrcode-DV-_rjU8.js → qrcode-7uGsTEmi.js} +0 -0
  238. /package/dist/assets/{qsharp-BcaKFfP-.js → qsharp-C7yF-Dti.js} +0 -0
  239. /package/dist/assets/{r-rFNes0iK.js → r-HXLGP0_-.js} +0 -0
  240. /package/dist/assets/{redis-DkpQ3K6G.js → redis-C4y6mf2p.js} +0 -0
  241. /package/dist/assets/{redshift-Di9N5TI3.js → redshift-DdQrFPrv.js} +0 -0
  242. /package/dist/assets/{restructuredtext-By5ZzLt6.js → restructuredtext-CBrf2PNj.js} +0 -0
  243. /package/dist/assets/{rough.esm-c4PR5shF.js → rough.esm-6CnTHTkH.js} +0 -0
  244. /package/dist/assets/{ruby-fF5zGiLp.js → ruby-CVtMoX2B.js} +0 -0
  245. /package/dist/assets/{rust-C5b3AYY6.js → rust-Ckq4sbMP.js} +0 -0
  246. /package/dist/assets/{sb-CD07UNRs.js → sb-er66OpE3.js} +0 -0
  247. /package/dist/assets/{scala-jtn1ip9G.js → scala-BdWZz-hH.js} +0 -0
  248. /package/dist/assets/{scheme-C4vqMkn_.js → scheme-kTV_s2kP.js} +0 -0
  249. /package/dist/assets/{scss-I4Glxjbz.js → scss-Bymy2VJQ.js} +0 -0
  250. /package/dist/assets/{shell-DubUcuns.js → shell-bwEP1LQ1.js} +0 -0
  251. /package/dist/assets/{solidity-CNy2KSl2.js → solidity-DCddeBgL.js} +0 -0
  252. /package/dist/assets/{sophia-D9_URt84.js → sophia-BMN3AQig.js} +0 -0
  253. /package/dist/assets/{sparql-DviXpm4C.js → sparql-CSXOLjzi.js} +0 -0
  254. /package/dist/assets/{sql-vDRbAZgK.js → sql-COg8ewmK.js} +0 -0
  255. /package/dist/assets/{st-CnpnRqA7.js → st-CIaZtBS_.js} +0 -0
  256. /package/dist/assets/{swift-D_g8Ganz.js → swift-DXiOhUHu.js} +0 -0
  257. /package/dist/assets/{systemverilog-OuZa5h1M.js → systemverilog-BTDE6Dr2.js} +0 -0
  258. /package/dist/assets/{tcl-DBm9ucsV.js → tcl-B0zy9NvV.js} +0 -0
  259. /package/dist/assets/{twig-BRzEqX5Y.js → twig-D594l4Z1.js} +0 -0
  260. /package/dist/assets/{typespec-D4ZgGeX8.js → typespec-XKVjaPqo.js} +0 -0
  261. /package/dist/assets/{useWorkspaceMenuKeyboard-Brws6Ar9.js → useWorkspaceMenuKeyboard-Bpy_s69Z.js} +0 -0
  262. /package/dist/assets/{vb-DcP4s6WS.js → vb-B2wYoKRV.js} +0 -0
  263. /package/dist/assets/{wgsl-CnRJ_QUf.js → wgsl-D0Yf2LbK.js} +0 -0
  264. /package/dist/assets/{workspace-working-copy-D8-s_Sgh.js → workspace-working-copy-C3FSR3N6.js} +0 -0
@@ -1 +0,0 @@
1
- .xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;inset:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;inset:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}
@@ -1,2 +0,0 @@
1
- import{r as e}from"./chunk-DECur_0Z.js";import{i as t,t as n}from"./jsx-runtime-BthL93pI.js";import{c as r,s as i}from"./editor.api2-B9h6iFPK.js";import{r as a}from"./monaco.contribution-BXz-lfFB.js";import{A as o,C as s,E as c,N as l,O as u,T as d,b as f,g as p,l as m,m as h,n as g,o as _,pt as v,r as y,s as b,u as x,v as S}from"./file-icons-CHWt5nSy.js";import{v as C}from"./IconGlyphs-C2WFcoJS.js";import{d as w,t as T}from"./FileEditorMarkdownPreview-KbnE8VC8.js";import{i as E,l as D,n as O,p as k,r as A,t as j,u as M}from"./workspace-working-copy-D8-s_Sgh.js";import{A as ee,C as N,D as P,E as F,M as I,N as L,O as te,_ as R,a as ne,b as re,d as z,f as ie,g as ae,h as oe,j as se,k as ce,m as le,n as ue,o as de,p as B,r as fe,t as V,u as pe,v as me,w as H,y as he}from"./workspace-editor-model-D0Im34S5.js";import{t as ge}from"./useWorkspaceMenuKeyboard-Brws6Ar9.js";import{a as _e,c as ve,d as ye,f as be,h as xe,l as U,m as W,n as Se,r as Ce,s as G,t as K,u as q}from"./workspace-editor-monaco-BIpqcWf1.js";var J=e(t()),Y=n();function we({previewOpen:e}){return e?(0,Y.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,Y.jsx)(`path`,{d:`M9 3.5V11.5C9 11.776 8.776 12 8.5 12C8.224 12 8 11.776 8 11.5V4.831L5.376 7.83C5.187 8.048 4.814 8.048 4.624 7.83L2 4.831V11.5C2 11.776 1.776 12 1.5 12C1.224 12 1 11.776 1 11.5V3.5C1 3.292 1.129 3.105 1.324 3.032C1.521 2.96 1.74 3.014 1.876 3.171L5 6.741L8.124 3.171C8.261 3.014 8.478 2.959 8.676 3.032C8.871 3.105 9 3.292 9 3.5ZM14.854 9.146C14.659 8.951 14.342 8.951 14.147 9.146L13.001 10.292V3.5C13.001 3.224 12.777 3 12.501 3C12.225 3 12.001 3.224 12.001 3.5V10.293L10.855 9.147C10.66 8.952 10.343 8.952 10.148 9.147C9.953 9.342 9.953 9.659 10.148 9.854L12.148 11.854C12.246 11.952 12.757 11.952 12.855 11.854L14.855 9.854C15.05 9.659 15.05 9.342 14.855 9.147L14.854 9.146Z`})}):(0,Y.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,Y.jsx)(`path`,{d:`M12.5 1H3.5C2.122 1 1 2.122 1 3.5V12.5C1 13.878 2.122 15 3.5 15H12.5C13.878 15 15 13.878 15 12.5V3.5C15 2.122 13.878 1 12.5 1ZM14 12.5C14 13.327 13.327 14 12.5 14H3.5C2.673 14 2 13.327 2 12.5V3.5C2 2.673 2.673 2 3.5 2H12.5C13.327 2 14 2.673 14 3.5V12.5ZM12 3H4C3.448 3 3 3.448 3 4V6C3 6.552 3.448 7 4 7H12C12.552 7 13 6.552 13 6V4C13 3.448 12.552 3 12 3ZM12 6H4V4H12V6ZM12 8H9C8.448 8 8 8.448 8 9V12C8 12.552 8.448 13 9 13H12C12.552 13 13 12.552 13 12V9C13 8.448 12.552 8 12 8ZM12 12H9V9H12V12ZM7 8.5C7 8.776 6.776 9 6.5 9H3.5C3.224 9 3 8.776 3 8.5C3 8.224 3.224 8 3.5 8H6.5C6.776 8 7 8.224 7 8.5ZM7 10.5C7 10.776 6.776 11 6.5 11H3.5C3.224 11 3 10.776 3 10.5C3 10.224 3.224 10 3.5 10H6.5C6.776 10 7 10.224 7 10.5ZM7 12.5C7 12.776 6.776 13 6.5 13H3.5C3.224 13 3 12.776 3 12.5C3 12.224 3.224 12 3.5 12H6.5C6.776 12 7 12.224 7 12.5Z`})})}function Te(){return(0,Y.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,Y.jsx)(`path`,{d:`M5.5 2H2.5C1.673 2 1 2.673 1 3.5V12.5C1 13.327 1.673 14 2.5 14H5.5C6.327 14 7 13.327 7 12.5V3.5C7 2.673 6.327 2 5.5 2ZM2.5 3H5.5C5.775 3 6 3.224 6 3.5V5H2V3.5C2 3.224 2.225 3 2.5 3ZM5.5 13H2.5C2.225 13 2 12.776 2 12.5V6H6V12.5C6 12.776 5.775 13 5.5 13ZM13.5 2H10.5C9.673 2 9 2.673 9 3.5V12.5C9 13.327 9.673 14 10.5 14H13.5C14.327 14 15 13.327 15 12.5V3.5C15 2.673 14.327 2 13.5 2ZM10.5 3H13.5C13.775 3 14 3.224 14 3.5V8H10V3.5C10 3.224 10.225 3 10.5 3ZM13.5 13H10.5C10.225 13 10 12.776 10 12.5V10H14V12.5C14 12.776 13.775 13 13.5 13Z`})})}function X(){return(0,Y.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,Y.jsx)(`path`,{d:`M2.5 2C1.673 2 1 2.673 1 3.5V12.5C1 13.327 1.673 14 2.5 14H13.5C14.327 14 15 13.327 15 12.5V3.5C15 2.673 14.327 2 13.5 2H2.5ZM2 3.5C2 3.224 2.225 3 2.5 3H7.5V13H2.5C2.225 13 2 12.776 2 12.5V3.5ZM8.5 13V3H13.5C13.775 3 14 3.224 14 3.5V12.5C14 12.776 13.775 13 13.5 13H8.5ZM3.5 5H6V6H3.5V5ZM3.5 7H6V8H3.5V7ZM10 5H12.5V6H10V5ZM10 7H12.5V8H10V7ZM10 9H12.5V10H10V9Z`})})}function Ee(){return(0,Y.jsxs)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:[(0,Y.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M5 6.5V3.75C5 2.765 4.121 2.25 3.251 2.25C2.363 2.25 1.99 2.553 1.897 2.646C1.702 2.841 1.688 3.17 1.883 3.365C2.077 3.561 2.38 3.573 2.576 3.378C2.588 3.37 2.773 3.25 3.25 3.25C3.28 3.25 4 3.256 4 3.75V4.056C3.796 4.023 3.552 4 3.25 4C1.937 4 1.25 4.754 1.25 5.5C1.25 6.246 1.937 7 3.25 7C3.622 7 3.911 6.937 4.145 6.851C4.236 6.943 4.361 7 4.5 7C4.776 7 5 6.776 5 6.5ZM3.251 5C3.623 5 3.857 5.038 4.001 5.074V5.811C3.908 5.885 3.698 6 3.251 6C2.602 6 2.251 5.742 2.251 5.5C2.251 5.258 2.602 5 3.251 5Z`}),(0,Y.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.001 7C9.104 7 10.001 5.991 10.001 4.75C10.001 3.509 9.104 2.5 8.001 2.5C7.635 2.5 7.296 2.619 7.001 2.813V1.5C7.001 1.224 6.777 1 6.501 1C6.225 1 6.001 1.224 6.001 1.5V6.5C6.001 6.776 6.225 7 6.501 7C6.718 7 6.898 6.86 6.967 6.666C7.27 6.873 7.621 7 8.001 7ZM8.001 3.5C8.553 3.5 9.001 4.061 9.001 4.75C9.001 5.439 8.553 6 8.001 6C7.449 6 7.001 5.439 7.001 4.75C7.001 4.061 7.449 3.5 8.001 3.5Z`}),(0,Y.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.539 13.653C4.31 13.857 3.699 13.976 3.33 13.514C3.117 13.248 3 12.888 3 12.5C3 12.112 3.118 11.752 3.33 11.486C3.701 11.022 4.311 11.141 4.54 11.347C4.744 11.533 5.06 11.515 5.246 11.311C5.431 11.106 5.415 10.79 5.209 10.605C4.422 9.895 3.233 10.009 2.549 10.861C2.195 11.305 2 11.886 2 12.5C2 13.114 2.195 13.696 2.549 14.139C2.93 14.613 3.445 14.875 4 14.875C4.441 14.875 4.859 14.709 5.208 14.395C5.413 14.21 5.43 13.894 5.245 13.689C5.059 13.484 4.743 13.466 4.539 13.653Z`}),(0,Y.jsx)(`path`,{d:`M12.5 4H11.5C11.224 4 11 4.224 11 4.5C11 4.776 11.224 5 11.5 5H12.5C12.775 5 13 5.224 13 5.5V11.499C13 11.775 12.775 11.999 12.5 11.999H8.707L9.853 10.853C10.048 10.658 10.048 10.341 9.853 10.146C9.658 9.951 9.341 9.951 9.146 10.146L7.146 12.146C7.049 12.244 7 12.372 7 12.5C7 12.628 7.048 12.756 7.146 12.854L9.146 14.854C9.341 15.049 9.658 15.049 9.853 14.854C10.048 14.659 10.048 14.342 9.853 14.147L8.707 13.001H12.5C13.327 13.001 14 12.328 14 11.501V5.5C14 4.673 13.327 4 12.5 4Z`})]})}function De(e,t,n){return e.showMarkdownPreview?n?t.showMarkdownSource:t.openMarkdownPreview:n?t.showFileSource:t.openFilePreview}function Oe({actions:e,copy:t,diffOpen:n,markdownSplitOpen:r,openFile:i,sourcePreviewOpen:a,wordWrapEnabled:o,statusText:s,onReload:c,onSave:l,onToggleMarkdownSplit:u,onToggleSourcePreview:d,onToggleWordWrap:f,onToggleDiff:p}){let m=e.showMarkdownPreview||e.showSourcePreview,h=De(e,t,a),g=r?t.closeMarkdownSplitPreview:t.openMarkdownSplitPreview;return(0,Y.jsxs)(`div`,{className:`code-file-editor-actions`,children:[e.showStatus&&s&&(0,Y.jsx)(`span`,{className:`code-file-editor-status ${i.externalChanged?`warning`:``}`,children:s}),e.showSave&&(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action save`,onClick:()=>l(!1),disabled:i.saving,"aria-label":t.saveFile,title:t.saveFile}),e.showDiff&&(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action diff ${n?`active`:``}`,onClick:p,disabled:i.saving,"aria-label":n?t.closeDiff:t.openFileDiff,title:n?t.closeDiff:t.openFileDiff,children:(0,Y.jsx)(Te,{})}),m&&(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action source-preview`,onClick:d,disabled:i.saving,"aria-label":h,title:h,children:(0,Y.jsx)(we,{previewOpen:a})}),e.showMarkdownPreview&&(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action markdown-split ${r?`active`:``}`,onClick:u,disabled:i.saving,"aria-label":g,title:g,children:(0,Y.jsx)(X,{})}),e.showWordWrap&&(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action word-wrap ${o?`active`:``}`,onClick:f,disabled:i.saving,"aria-pressed":o,"aria-label":o?t.disableWordWrap:t.enableWordWrap,title:o?t.disableWordWrap:t.enableWordWrap,children:(0,Y.jsx)(Ee,{})}),e.showReload&&(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action reload`,onClick:c,disabled:i.saving,"aria-label":t.reloadFile,title:t.reloadFile}),e.showOverwrite&&(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action overwrite`,onClick:()=>l(!0),disabled:i.saving,"aria-label":t.overwriteChangedFile,title:t.overwriteChangedFile,children:(0,Y.jsx)(C,{className:`code-file-editor-action-svg`})})]})}function ke({openFile:e,copy:t,onRevealInExplorer:n}){let r=(0,J.useMemo)(()=>F(e.file.path),[e.file.path]),i=L(e.workspaceRoot),a=e.workspaceRoot?`${e.workspaceRoot.replace(/[\\/]+$/,``)}/${e.file.path}`:e.file.path;return r.length===0?(0,Y.jsx)(`span`,{"aria-hidden":`true`}):(0,Y.jsxs)(`nav`,{className:`code-file-editor-breadcrumbs`,title:a,"aria-label":t.filePath,children:[i&&(0,Y.jsxs)(`button`,{type:`button`,className:`code-file-editor-breadcrumb root`,onClick:()=>n(e.agentId,``,`directory`),"aria-label":t.revealInExplorer(i),children:[(0,Y.jsx)(`span`,{className:`code-file-editor-breadcrumb-name`,children:i}),(0,Y.jsx)(`span`,{className:`code-file-editor-breadcrumb-separator`,"aria-hidden":`true`})]}),r.map((r,i,a)=>{let o=i===a.length-1,s=P(a,i);return(0,Y.jsxs)(`button`,{type:`button`,className:`code-file-editor-breadcrumb ${o?`current`:``}`,onClick:()=>n(e.agentId,s,o?`file`:`directory`),"aria-label":t.revealInExplorer(s),children:[o&&(0,Y.jsx)(`img`,{className:`code-file-editor-breadcrumb-file-icon`,src:g(e.file.path),alt:``,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:`code-file-editor-breadcrumb-name`,children:r}),!o&&(0,Y.jsx)(`span`,{className:`code-file-editor-breadcrumb-separator`,"aria-hidden":`true`})]},`${i}-${r}`)})]})}function Z(){return(0,Y.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,Y.jsx)(`path`,{d:`M13.5 8.00023H3.70701L7.85301 3.85423C8.04801 3.65923 8.04801 3.34223 7.85301 3.14723C7.65801 2.95223 7.34101 2.95223 7.14601 3.14723L2.14601 8.14723C1.95101 8.34223 1.95101 8.65923 2.14601 8.85423L7.14601 13.8542C7.24401 13.9522 7.37201 14.0002 7.50001 14.0002C7.62801 14.0002 7.75601 13.9512 7.85401 13.8542C8.04901 13.6592 8.04901 13.3422 7.85401 13.1472L3.70801 9.00123H13.501C13.777 9.00123 14.001 8.77723 14.001 8.50123C14.001 8.22523 13.777 8.00123 13.501 8.00123L13.5 8.00023Z`})})}function Ae(){return(0,Y.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,Y.jsx)(`path`,{d:`M13.854 8.14576L8.854 3.14576C8.659 2.95076 8.342 2.95076 8.147 3.14576C7.952 3.34076 7.952 3.65776 8.147 3.85276L12.293 7.99876H2.5C2.224 7.99876 2 8.22276 2 8.49876C2 8.77476 2.224 8.99876 2.5 8.99876H12.293L8.147 13.1448C7.952 13.3398 7.952 13.6568 8.147 13.8518C8.245 13.9498 8.373 13.9978 8.501 13.9978C8.629 13.9978 8.757 13.9488 8.855 13.8518L13.855 8.85176C14.05 8.65676 14.05 8.33976 13.855 8.14476L13.854 8.14576Z`})})}function je(){return(0,Y.jsx)(`svg`,{className:`code-file-editor-action-svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,Y.jsx)(`path`,{d:`M13 13.5C13 13.776 12.776 14 12.5 14C9.46198 14 6.99998 11.538 6.99998 8.50001V3.70701L4.35398 6.35301C4.15898 6.54801 3.84198 6.54801 3.64698 6.35301C3.45198 6.15801 3.45198 5.84101 3.64698 5.64601L7.14698 2.14601C7.34198 1.95101 7.65898 1.95101 7.85398 2.14601L11.354 5.64601C11.549 5.84101 11.549 6.15801 11.354 6.35301C11.159 6.54801 10.842 6.54801 10.647 6.35301L8.00098 3.70701V8.50001C8.00098 10.985 10.016 13 12.501 13C12.777 13 13.001 13.224 13.001 13.5H13Z`})})}function Me({openFile:e,openFiles:t,copy:n,onBackToAgent:r,onSelectOpenFile:i,canNavigateBack:a,canNavigateForward:o,onNavigateHistory:s,onSetTabRef:c,onOpenTabContextMenu:l,onTabAuxClick:u,onTabKeyDown:d,onCloseTab:f,actions:p}){return(0,Y.jsxs)(`div`,{className:`code-file-editor-tab-strip`,children:[(0,Y.jsxs)(`div`,{className:`code-file-editor-navigation`,children:[e.sourceAgentId&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action code-file-editor-agent-return`,onClick:()=>r(e.sourceAgentId),"aria-label":n.backToAgent,title:n.backToAgent,"data-testid":`code-file-editor-back`,children:(0,Y.jsx)(je,{})}),(0,Y.jsx)(`span`,{className:`code-file-editor-navigation-divider`,"aria-hidden":`true`})]}),(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action code-file-editor-history-back`,onClick:()=>{s(-1)},disabled:!a,"aria-label":n.goBack,title:n.goBack,"data-testid":`code-file-editor-history-back`,children:(0,Y.jsx)(Z,{})}),(0,Y.jsx)(`button`,{type:`button`,className:`code-file-editor-action code-file-editor-history-forward`,onClick:()=>{s(1)},disabled:!o,"aria-label":n.goForward,title:n.goForward,"data-testid":`code-file-editor-history-forward`,children:(0,Y.jsx)(Ae,{})})]}),(0,Y.jsx)(`div`,{className:`code-file-editor-tabs`,role:`tablist`,children:t.map((t,r)=>{let a=H(t),o=a===H(e),s=k(t),p=M(t);return(0,Y.jsxs)(`div`,{id:ee(t),ref:e=>c(a,e),className:`code-file-editor-tab ${o?`active`:``} ${s}`.trim(),title:t.file.path,role:`tab`,"aria-selected":o,"aria-controls":`code-file-editor-panel`,"aria-label":se(t),tabIndex:o?0:-1,onClick:()=>i(t.agentId,t.file.path),onContextMenu:e=>l(e,r),onAuxClick:e=>u(e,r),onKeyDown:e=>d(e,r),children:[(0,Y.jsx)(`img`,{className:`code-file-type-icon file`,src:g(t.file.path),alt:``,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:`code-file-editor-tab-name`,children:B(t.file.path)}),(0,Y.jsxs)(`span`,{className:`code-file-editor-tab-tail`,children:[p&&(0,Y.jsx)(`span`,{className:`code-file-editor-dirty`,title:p===`external`?n.changedOnDisk:n.unsavedChanges}),(0,Y.jsx)(`button`,{type:`button`,tabIndex:-1,className:`code-file-editor-close`,onClick:e=>{e.stopPropagation(),f(r)},"aria-label":n.closeFile(t.file.path)})]})]},a)})}),p]})}function Ne({openFile:e,openFiles:t,editorMode:n,copy:r,statusText:i,onBackToAgent:a,onSelectOpenFile:o,canNavigateBack:s,canNavigateForward:c,onNavigateHistory:l,onSetTabRef:u,onOpenTabContextMenu:d,onTabAuxClick:f,onTabKeyDown:p,onCloseTab:m,onRevealInExplorer:h,onSave:g,onReload:_,onToggleSourcePreview:v,onToggleMarkdownSplit:y,onToggleWordWrap:b,onToggleDiff:x,canPreviewMarkdown:S,canPreviewSource:C,diffOpen:w,markdownPreviewVisible:T,markdownSplitOpen:E,sourcePreviewOpen:D,wordWrapEnabled:O}){let k=!!e.file.path&&!T;return(0,Y.jsxs)(`header`,{className:`code-file-editor-header`,children:[(0,Y.jsx)(Me,{openFile:e,openFiles:t,copy:r,onBackToAgent:a,onSelectOpenFile:o,canNavigateBack:s,canNavigateForward:c,onNavigateHistory:l,onSetTabRef:u,onOpenTabContextMenu:d,onTabAuxClick:f,onTabKeyDown:p,onCloseTab:m,actions:(0,Y.jsx)(Oe,{actions:ie(e,n,{canPreviewMarkdown:S,canPreviewSource:C,statusText:i,showBreadcrumbs:k}),copy:r,diffOpen:w,openFile:e,markdownSplitOpen:E,sourcePreviewOpen:D,wordWrapEnabled:O,statusText:i,onReload:_,onSave:g,onToggleMarkdownSplit:y,onToggleSourcePreview:v,onToggleWordWrap:b,onToggleDiff:x})}),k&&(0,Y.jsx)(`div`,{className:`code-file-editor-bar`,children:(0,Y.jsx)(ke,{openFile:e,copy:r,onRevealInExplorer:h})})]})}function Q({blame:e,loading:t,error:n,copy:r}){return!t&&!n&&(!e||e.isGitRepo&&e.lines.length>0)?null:(0,Y.jsx)(`div`,{className:`code-file-blame-toast ${n?`error`:``}`,"data-testid":`code-file-blame-state`,children:t?r.loadingBlame:n||(e&&!e.isGitRepo?r.notGitRepository:r.noCommittedLines)})}function Pe({x:e,y:t,copy:n,blameOpen:r,readOnly:i,showBlameContextAction:a,showLineChangesContextActions:o,onClose:s,onRunAction:c}){let l=(0,J.useRef)(null),u=ge({menuOpen:!0,menuRef:l,onClose:s});return(0,Y.jsxs)(`div`,{ref:l,className:`code-editor-context-menu`,"data-testid":`code-editor-context-menu`,role:`menu`,style:{left:e,top:t},onKeyDown:u,onMouseDown:e=>e.stopPropagation(),children:[a&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`toggle-blame`),children:r?n.hideBlame:n.annotateWithBlame}),(0,Y.jsx)(`div`,{className:`code-editor-context-separator`,role:`separator`})]}),o&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`line-changes-previous`),children:n.openLineChangesWithPreviousRevision}),(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`line-changes-working`),children:n.openLineChangesWithWorkingFile}),(0,Y.jsx)(`div`,{className:`code-editor-context-separator`,role:`separator`})]}),(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`cut`),disabled:i,children:n.cut}),(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`copy`),children:n.copy}),(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`paste`),disabled:i,children:n.paste}),(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>c(`select-all`),children:n.selectAll})]})}function Fe({label:e,saving:t,copy:n,onConfirmSave:r,onDiscard:i,onCancel:a}){return(0,Y.jsx)(`div`,{className:`code-file-save-confirm-backdrop`,"data-testid":`code-file-save-confirm`,role:`presentation`,onMouseDown:e=>e.stopPropagation(),children:(0,Y.jsxs)(`div`,{className:`code-file-save-confirm-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`code-file-save-confirm-title`,"aria-describedby":`code-file-save-confirm-description`,onKeyDown:e=>{e.key===`Escape`&&!t&&(e.preventDefault(),a())},children:[(0,Y.jsx)(`div`,{className:`code-file-save-confirm-brand`,"aria-hidden":`true`,children:`F`}),(0,Y.jsx)(`h2`,{id:`code-file-save-confirm-title`,children:n.saveBeforeCloseTitle(e)}),(0,Y.jsx)(`p`,{id:`code-file-save-confirm-description`,children:n.saveBeforeCloseDescription}),(0,Y.jsxs)(`div`,{className:`code-file-save-confirm-actions`,children:[(0,Y.jsx)(`button`,{type:`button`,className:`primary`,onClick:r,disabled:t,children:t?n.savingFile:n.save}),(0,Y.jsx)(`button`,{type:`button`,onClick:i,disabled:t,children:n.dontSave}),(0,Y.jsx)(`button`,{type:`button`,onClick:a,disabled:t,children:n.cancel})]})]})})}function Ie({menu:e,openFiles:t,copy:n,onRunAction:r}){return(0,Y.jsxs)(`div`,{className:`code-context-menu code-file-tab-context-menu`,"data-testid":`code-file-tab-context-menu`,role:`menu`,style:{left:e.x,top:e.y},children:[(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close`),children:n.close}),(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close-others`),disabled:t.length<=1,children:n.closeOthers}),(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close-right`),disabled:e.index>=t.length-1,children:n.closeToRight}),(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close-saved`),disabled:!j(t),children:n.closeSaved}),(0,Y.jsx)(`div`,{className:`code-context-menu-separator`,role:`separator`}),(0,Y.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>r(`close-all`),children:n.closeAll})]})}function Le({blame:e,blameError:t,blameLoading:n,blameOpen:r,copy:i,editorContextMenu:a,readOnly:o,openFiles:s,pendingCloseOpen:c,pendingCloseLabel:l,pendingCloseSaving:u,showBlameContextAction:d,showLineChangesContextActions:f,tabContextMenu:p,onCancelPendingClose:m,onCloseEditorContextMenu:h,onConfirmSaveAndClose:g,onDiscardAndClose:_,onRunEditorContextAction:v,onRunTabContextAction:y}){return(0,Y.jsxs)(Y.Fragment,{children:[a&&(0,Y.jsx)(Pe,{x:a.x,y:a.y,copy:i,blameOpen:r,readOnly:o,showBlameContextAction:d,showLineChangesContextActions:f,onClose:h,onRunAction:e=>void v(e)}),p&&(0,Y.jsx)(Ie,{menu:p,openFiles:s,copy:i,onRunAction:y}),c&&(0,Y.jsx)(Fe,{label:l,saving:u,copy:i,onConfirmSave:()=>void g(),onDiscard:_,onCancel:m}),r&&(0,Y.jsx)(Q,{blame:e,loading:n,error:t,copy:i})]})}function Re({filePath:e,line:t,authorProfileUrl:n,copy:r,onClose:i}){return(0,Y.jsxs)(`section`,{className:`code-file-blame-detail`,"data-testid":`code-file-blame-detail`,"aria-label":r.gitBlameDetails,children:[(0,Y.jsxs)(`div`,{className:`code-file-blame-detail-main`,children:[(0,Y.jsxs)(`div`,{className:`code-file-blame-detail-title`,children:[(0,Y.jsx)(`strong`,{children:t.summary||t.shortCommit}),(0,Y.jsx)(`code`,{title:t.commit,children:t.shortCommit})]}),(0,Y.jsx)(`div`,{className:`code-file-blame-detail-subtitle`,children:e})]}),(0,Y.jsxs)(`div`,{className:`code-file-blame-detail-rows`,children:[(0,Y.jsxs)(`div`,{className:`code-file-blame-detail-row`,children:[(0,Y.jsx)(`span`,{children:r.author}),n?(0,Y.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,children:t.author}):(0,Y.jsx)(`strong`,{children:t.author||r.unknown})]}),(0,Y.jsxs)(`div`,{className:`code-file-blame-detail-row`,children:[(0,Y.jsx)(`span`,{children:r.commit}),(0,Y.jsx)(`strong`,{title:t.commit,children:t.shortCommit})]}),(0,Y.jsxs)(`div`,{className:`code-file-blame-detail-row`,children:[(0,Y.jsx)(`span`,{children:r.date}),(0,Y.jsx)(`strong`,{children:ue(t.authorTime)||r.uncommitted})]}),(0,Y.jsxs)(`div`,{className:`code-file-blame-detail-row`,children:[(0,Y.jsx)(`span`,{children:r.line}),(0,Y.jsx)(`strong`,{children:t.lineNumber})]})]}),(0,Y.jsx)(`button`,{type:`button`,className:`code-file-blame-detail-close`,onClick:i,"aria-label":r.closeBlameDetails})]})}function ze(e,t){if(e.loading)return t.loadingDiff;if(e.error)return e.error;let n=e.diff;return n?n.isGitRepo?n.binary?t.binaryDiffUnavailable:n.truncated?t.diffTooLarge:n.patch.trim()?typeof n.originalContent!=`string`||typeof n.modifiedContent!=`string`?t.diffUnavailable:``:t.noFileDiff:t.notGitRepository:``}function Be(e){let t=e.diff;return!!(t&&t.isGitRepo&&!t.binary&&!t.truncated&&t.patch.trim()&&typeof t.originalContent==`string`&&typeof t.modifiedContent==`string`)}function Ve(e,t){let n=D(e.file.path,e.workspaceRoot);return i.from({scheme:`farming-diff`,path:n.startsWith(`/`)?n:`/${n}`,query:t})}function He(e,t,n,i){let a=Ve(e,t);return r.getModel(a)?.dispose(),r.createModel(n,i,a)}function Ue({openFile:e,diffState:t,copy:n,onClose:i}){let a=(0,J.useRef)(null),o=(0,J.useRef)(null),s=(0,J.useRef)(null),c=(0,J.useRef)(null),l=Be(t),u=(0,J.useMemo)(()=>ze(t,n),[n,t]);return(0,J.useEffect)(()=>{if(!l)return;let e=a.current;if(!e)return;Se(),K();let t=r.createDiffEditor(e,{theme:W(),automaticLayout:!1,renderSideBySide:!v(),originalEditable:!1,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fixedOverflowWidgets:!0,renderOverviewRuler:!0,enableSplitViewResizing:!v(),ignoreTrimWhitespace:!1,glyphMargin:!0,lineNumbersMinChars:4,unicodeHighlight:{ambiguousCharacters:!1,invisibleCharacters:!0,nonBasicASCII:!1}});o.current=t;let n=new ResizeObserver(()=>t.layout());n.observe(e);let i=new MutationObserver(()=>K(t));return i.observe(document.body,{attributes:!0,attributeFilter:[`data-appearance`]}),window.requestAnimationFrame(()=>t.layout()),()=>{n.disconnect(),i.disconnect(),t.dispose(),s.current?.dispose(),c.current?.dispose(),s.current=null,c.current=null,o.current=null}},[l]),(0,J.useEffect)(()=>{if(!l||!t.diff)return;let n=o.current;if(!n)return;s.current?.dispose(),c.current?.dispose();let r=ye(e.file.path,t.diff.modifiedContent),i=He(e,`original`,t.diff.originalContent??``,r),a=He(e,`modified`,t.diff.modifiedContent??``,r);s.current=i,c.current=a,n.setModel({original:i,modified:a}),window.requestAnimationFrame(()=>n.layout())},[t.diff,e,l]),(0,Y.jsxs)(`section`,{className:`code-file-diff-view`,"data-testid":`code-file-diff-view`,"aria-label":n.fileDiff,children:[(0,Y.jsxs)(`header`,{className:`code-file-diff-header`,children:[(0,Y.jsxs)(`div`,{className:`code-file-diff-title`,children:[(0,Y.jsx)(`strong`,{children:n.fileDiff}),(0,Y.jsx)(`span`,{children:e.file.path})]}),(0,Y.jsx)(`button`,{type:`button`,className:`code-file-diff-close`,"aria-label":n.closeDiff,onClick:i})]}),u&&(0,Y.jsx)(`div`,{className:`code-file-diff-state ${t.error?`error`:``}`,children:u}),(0,Y.jsx)(`div`,{ref:a,className:`code-file-diff-monaco ${l?``:`hidden`}`,"data-testid":`code-file-diff-monaco`})]})}function We({left:e,width:t,rows:n,copy:r,onShowDetail:i}){return n.length===0?null:(0,Y.jsx)(`div`,{className:`code-file-inline-blame-layer`,"aria-label":r.gitBlameAnnotations,children:n.map(({line:n,top:a})=>(0,Y.jsx)(`button`,{type:`button`,className:`code-file-inline-blame ${n.uncommitted?`uncommitted`:``}`,style:{left:e,top:a,width:t},title:`${n.shortCommit} ${n.author||r.unknown} ${n.summary}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),i(n)},children:z(n)},`${n.lineNumber}-${n.commit}-${n.author}`))})}function Ge(e,t){return e===`previous`?t.openLineChangesWithPreviousRevision:t.openLineChangesWithWorkingFile}function Ke({mode:e,lineNumber:t,loading:n,error:r,changes:i,copy:a,onClose:o}){let s=i?.commit?`${i.commit.shortHash} ${i.commit.summary||``}`.trim():``,c=n?a.loadingLineChanges:r||(i&&!i.available?a.noLineChanges:``),l=i?.patch?i.patch.split(`
2
- `):[];return(0,Y.jsxs)(`div`,{className:`code-file-line-changes-panel`,"data-testid":`code-file-line-changes-panel`,children:[(0,Y.jsxs)(`div`,{className:`code-file-line-changes-main`,children:[(0,Y.jsxs)(`div`,{className:`code-file-line-changes-title`,children:[(0,Y.jsx)(`strong`,{children:Ge(e,a)}),(0,Y.jsxs)(`code`,{children:[a.line,` `,t]})]}),s&&(0,Y.jsx)(`div`,{className:`code-file-line-changes-subtitle`,children:s}),c&&(0,Y.jsx)(`div`,{className:`code-file-line-changes-state ${r?`error`:``}`,children:c}),!n&&!r&&i?.available&&(0,Y.jsx)(`pre`,{className:`code-file-line-changes-patch`,"aria-label":a.lineChanges,children:l.map((e,t)=>(0,Y.jsx)(`span`,{className:`code-file-line-changes-line ${re(e)}`,children:e||` `},`${t}-${e}`))})]}),(0,Y.jsx)(`button`,{type:`button`,className:`code-file-line-changes-close`,"aria-label":a.closeLineChanges,onClick:o})]})}function qe({openFile:e,activeTabDomId:t,copy:n,sourcePreviewOpen:r}){let i=e.file.preview??null,a=r&&de(e.file.path)?{kind:`image`,mediaType:`image/svg+xml`}:null,o=i?.kind===`image`?i:a,s=i?.kind===`pdf`?i:null,c=i?.kind===`binary`?i:null;return o?(0,Y.jsx)(`section`,{className:`code-file-preview-panel`,"data-testid":`code-file-preview-panel`,role:`tabpanel`,"aria-labelledby":t,tabIndex:-1,children:(0,Y.jsx)(`div`,{className:`code-file-image-preview-frame`,children:(0,Y.jsx)(`img`,{className:`code-file-image-preview`,"data-testid":`code-file-image-preview`,src:p(e.agentId,e.file.path,e.file.sha1),alt:B(e.file.path),draggable:!1})})}):s?(0,Y.jsx)(`section`,{className:`code-file-preview-panel`,"data-testid":`code-file-preview-panel`,role:`tabpanel`,"aria-labelledby":t,tabIndex:-1,children:(0,Y.jsx)(`iframe`,{className:`code-file-pdf-preview`,"data-testid":`code-file-pdf-preview`,src:p(e.agentId,e.file.path,e.file.sha1),title:n.previewFor(e.file.path)})}):c?(0,Y.jsx)(`section`,{className:`code-file-preview-panel metadata`,"data-testid":`code-file-preview-panel`,role:`tabpanel`,"aria-labelledby":t,"aria-label":n.previewFor(e.file.path),tabIndex:-1,children:(0,Y.jsx)(`img`,{className:`code-file-metadata-preview-icon`,"data-testid":`code-file-metadata-preview-icon`,src:g(e.file.path),alt:``,"aria-hidden":`true`,draggable:!1})}):null}function Je({activeTabDomId:e,blame:t,blameAuthorProfileUrl:n,blameDetailLine:r,blameOpen:i,blameOverlay:a,copy:o,cursorPosition:s,diffState:c,editorMode:l,editorHostRef:u,lineChanges:d,markdownSplitOpen:f,markdownPreviewOpen:p,sourcePreviewOpen:m,openFile:h,onClearBlameDetail:g,onCloseLineChanges:_,onCloseDiff:v,onOpenFilePath:y,onShowBlameDetail:b}){let x=ce({diffOnly:l.diffOnly,diffOpen:c.open,markdownSplitOpen:f,markdownPreviewOpen:p,sourcePreviewOpen:m,visualPreview:l.visualPreview}),S=(0,J.useRef)(null),C=x.showEditorOverlays||x.showMarkdownPreview;return(0,Y.jsxs)(Y.Fragment,{children:[x.showDiffView&&(0,Y.jsx)(Ue,{openFile:h,diffState:c,copy:o,onClose:v}),(0,Y.jsxs)(`div`,{className:`code-file-editor-source-region ${x.showMarkdownSplit?`markdown-split`:``} ${x.showMonaco||x.showMarkdownSplit?``:`hidden`}`.trim(),"data-testid":x.showMarkdownSplit?`code-file-markdown-split`:void 0,children:[(0,Y.jsx)(`div`,{id:`code-file-editor-panel`,ref:u,className:`code-file-monaco`,"data-testid":`code-file-monaco`,role:`tabpanel`,"aria-labelledby":e,tabIndex:-1}),x.showMarkdownSplit&&(0,Y.jsx)(T,{ref:S,activeTabDomId:e,openFile:h,onOpenFilePath:y,copy:o})]}),x.showDiffOnlyPreview&&(0,Y.jsx)(`section`,{className:`code-file-preview-panel metadata`,"data-testid":`code-file-preview-panel`,role:`tabpanel`,"aria-labelledby":e,tabIndex:-1,children:(0,Y.jsx)(`div`,{className:`code-file-diff-state`,children:o.deletedFileDiffOnly})}),x.showMarkdownPreview&&(0,Y.jsx)(T,{activeTabDomId:e,openFile:h,onOpenFilePath:y,copy:o}),x.showEditorOverlays&&i&&t?.isGitRepo&&(0,Y.jsx)(We,{left:a.left,width:a.width,rows:a.rows,copy:o,onShowDetail:b}),(0,Y.jsx)(qe,{openFile:h,activeTabDomId:e,copy:o,sourcePreviewOpen:x.showSourcePreview}),x.showEditorOverlays&&i&&r&&(0,Y.jsx)(Re,{filePath:h.file.path,line:r,authorProfileUrl:n,copy:o,onClose:g}),x.showEditorOverlays&&d&&(0,Y.jsx)(Ke,{mode:d.mode,lineNumber:d.lineNumber,loading:d.loading,error:d.error,changes:d.changes,copy:o,onClose:_}),C&&(0,Y.jsx)(`div`,{className:`code-file-editor-statusbar`,"data-testid":`code-file-editor-statusbar`,children:(0,Y.jsx)(`span`,{className:`code-file-editor-cursor-position`,children:o.cursorPosition(s.lineNumber,s.column)})})]})}function Ye(e){return e instanceof y&&fe(e.status)}function Xe({openFile:e,disabled:t,onRevealLine:n}){let r=(0,J.useRef)(0),i=(0,J.useRef)(0),a=(0,J.useRef)(H(e)),o=(0,J.useRef)(t),[s,c]=(0,J.useState)(!1),[l,u]=(0,J.useState)(!1),[d,f]=(0,J.useState)(null),[p,m]=(0,J.useState)(null),[h,g]=(0,J.useState)(`unknown`),[v,y]=(0,J.useState)(null);a.current=H(e),o.current=t;let x=(0,J.useMemo)(()=>{let e=d?.lines??[];return{compact:V(e,!0),regular:V(e,!1)}},[d]),S=(0,J.useCallback)(()=>{y(null)},[]),C=(0,J.useCallback)(async()=>{if(t)return g(`unavailable`),null;let n=H(e),i=r.current+1;r.current=i,u(!0),m(null);try{let t=await _(e.agentId,e.file.path);return r.current!==i||a.current!==n||o.current?null:(f(t),g(t.isGitRepo&&t.lines.length>0?`available`:`unavailable`),t)}catch(e){return r.current!==i||a.current!==n||o.current?null:(f(null),m(e instanceof Error?e.message:`Failed to load blame`),g(Ye(e)?`unavailable`:`unknown`),null)}finally{r.current===i&&a.current===n&&!o.current&&u(!1)}},[t,e.agentId,e.file.path,e.file.sha1,e.workspaceRoot]),w=(0,J.useCallback)(async()=>{if(t)return g(`unavailable`),`unavailable`;let n=H(e),r=i.current+1;i.current=r;try{let t=await b(e.agentId,e.file.path);if(i.current!==r||a.current!==n)return null;let o=t.available?`available`:`unavailable`;return g(o),o}catch{return i.current!==r||a.current!==n?null:(g(`unavailable`),`unavailable`)}},[t,e]),T=(0,J.useCallback)(async()=>{if(t)return;if(s){c(!1),y(null);return}let n=H(e),r=h===`unknown`?await w():h;r!==null&&r!==`unavailable`&&a.current===n&&!o.current&&c(!0)},[h,s,w,t,e]),E=(0,J.useCallback)(e=>{n(e.lineNumber,{focusEditor:!1}),y({line:e})},[n]);return(0,J.useEffect)(()=>{f(null),u(!1),m(null),g(t?`unavailable`:`unknown`)},[t,e.agentId,e.file]),(0,J.useEffect)(()=>{t&&(c(!1),f(null),m(null),g(`unavailable`))},[t,e.agentId,e.file.path]),(0,J.useEffect)(()=>{if(!s)return;let e=!1;return C().then(t=>{e||(!t?.isGitRepo||t.lines.length===0)&&(c(!1),y(null))}),()=>{e=!0}},[s,C]),(0,J.useEffect)(()=>{y(null)},[s,e.agentId,e.file.path]),{blameOpen:s,blameLoading:l,blame:d,blameError:p,blameCapability:h,blameDetail:v,blameLabelWidths:x,checkBlameCapability:w,toggleBlame:T,showBlameDetail:E,clearBlameDetail:S}}function Ze({blame:e,blameLabelWidths:t,blameOpen:n,editorHostRef:i,editorRef:a,disabled:o}){let[s,c]=(0,J.useState)({left:0,width:112,rows:[]}),l=(0,J.useCallback)(()=>{let s=a.current,l=i.current;if(!s||!l||!n||!e?.isGitRepo||o){c({left:0,width:112,rows:[]}),s?.updateOptions({lineDecorationsWidth:10});return}let u=l.clientWidth<=520?t.compact:t.regular;s.updateOptions({lineDecorationsWidth:u+12});let d=s.getLayoutInfo(),f=l.offsetTop,p=s.getScrollTop(),m=s.getOption(r.EditorOption.lineHeight),h=l.offsetLeft+Math.max(0,d.contentLeft-u-8),g=I({visibleRanges:s.getVisibleRanges(),scrollTop:p,hostHeight:l.clientHeight,lineHeight:m});c({left:h,width:u,rows:le(e.lines,{...g,hostTop:f,scrollTop:p,hostHeight:l.clientHeight,lineHeight:m,getTopForLineNumber:e=>s.getTopForLineNumber(e)})})},[e,t,n,o,i,a]);return(0,J.useEffect)(()=>{let e=a.current;if(!e)return;l();let t=e.onDidScrollChange(l),n=e.onDidLayoutChange(l),r=window.requestAnimationFrame(l);return()=>{t.dispose(),n.dispose(),window.cancelAnimationFrame(r)}},[a,l]),{blameOverlay:s}}function Qe({blameCapability:e,blameOpen:t,canShowBlame:n,canShowLineChanges:i,editorRef:a,readOnly:o,onCheckBlameCapability:s,onClearBlameDetail:c,onCloseTabContextMenu:l,onOpenLineChanges:u,onToggleBlame:d}){let[f,p]=(0,J.useState)(null),m=(0,J.useCallback)(()=>{p(null)},[]),h=(0,J.useCallback)(e=>{let i=e.target.type,o=new Set([r.MouseTargetType.GUTTER_GLYPH_MARGIN,r.MouseTargetType.GUTTER_LINE_NUMBERS,r.MouseTargetType.GUTTER_LINE_DECORATIONS,r.MouseTargetType.GUTTER_VIEW_ZONE]),u=e.target.position?.lineNumber??a.current?.getPosition()?.lineNumber??1,d=o.has(i)?`gutter`:`editor`;e.event.preventDefault(),e.event.stopPropagation(),c(),l();let f={x:Math.max(8,Math.min(e.event.posx,window.innerWidth-220)),y:Math.max(8,Math.min(e.event.posy,window.innerHeight-230)),kind:d,lineNumber:u};if(d===`gutter`&&n&&!t){s().then(e=>{e!==null&&p(f)});return}p(f)},[t,n,a,s,c,l]),g=(0,J.useCallback)(async e=>{let t=a.current,r=f;if(m(),!t)return;let s=t.getModel(),c=t.getSelection();if(e===`toggle-blame`){if(!n)return;await d();return}if(e===`line-changes-previous`||e===`line-changes-working`){if(!i)return;let n=r?.lineNumber??t.getPosition()?.lineNumber??1;await u(e===`line-changes-previous`?`previous`:`working`,n);return}if(e===`select-all`&&s){t.setSelection(s.getFullModelRange()),t.focus();return}if(!(!s||!c)){if(e===`copy`||e===`cut`){let n=s.getValueInRange(c);n&&await navigator.clipboard?.writeText(n).catch(()=>{}),e===`cut`&&n&&!o&&t.executeEdits(`farming-context-menu`,[{range:c,text:``,forceMoveMarkers:!0}]),t.focus();return}if(e===`paste`&&!o){let e=await navigator.clipboard?.readText().catch(()=>``)??``;e&&t.executeEdits(`farming-context-menu`,[{range:c,text:e,forceMoveMarkers:!0}]),t.focus()}}},[n,i,m,f,a,u,d,o]),_=!!(f&&f.kind===`gutter`&&n&&(t||e===`available`)),v=!!(f&&f.kind===`gutter`&&i);return(0,J.useEffect)(()=>{let e=e=>{let t=e.target;t instanceof Element&&t.closest(`.code-editor-context-menu, .code-file-tab-context-menu, .code-file-blame-detail, .code-file-inline-blame, .code-file-line-changes-panel`)||(p(null),l())},t=e=>{e.key===`Escape`&&(p(null),l())};return document.addEventListener(`mousedown`,e,!0),document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`mousedown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[l]),{editorContextMenu:f,closeEditorContextMenu:m,openEditorContextMenu:h,runEditorContextAction:g,showBlameContextAction:_,showLineChangesContextActions:v}}function $e({openFile:e,diffDisabled:t,onClearBlameDetail:n}){let r=(0,J.useRef)(0),i=(0,J.useRef)(void 0),a=(0,J.useRef)(H(e)),[o,s]=(0,J.useState)({open:!1,loading:!1,error:null,diff:null});a.current=H(e);let c=(0,J.useCallback)(()=>{r.current+=1,s({open:!1,loading:!1,error:null,diff:null})},[]),l=(0,J.useCallback)(async()=>{if(t)return;let i=r.current+1,o=H(e);r.current=i,n(),s({open:!0,loading:!0,error:null,diff:null});try{let t=await m(e.agentId,e.file.path);if(r.current!==i||a.current!==o)return;s({open:!0,loading:!1,error:null,diff:t})}catch(e){if(r.current!==i||a.current!==o)return;s({open:!0,loading:!1,error:e instanceof Error?e.message:`Failed to load diff`,diff:null})}},[t,n,e]),u=(0,J.useCallback)(()=>{if(o.open){c();return}l()},[c,o.open,l]);return(0,J.useEffect)(()=>{r.current+=1,s({open:!1,loading:!1,error:null,diff:null})},[t,e.agentId,e.file]),(0,J.useEffect)(()=>{!e.diffRequestId||t||i.current===e.diffRequestId||(i.current=e.diffRequestId,l())},[t,l,e.diffRequestId]),{diffState:o,closeDiff:c,toggleDiff:u}}function et({openFile:e,disabled:t,onClearBlameDetail:n,onRevealLine:r}){let i=(0,J.useRef)(0),a=(0,J.useRef)(H(e)),[o,s]=(0,J.useState)(null);a.current=H(e);let c=(0,J.useCallback)(()=>{s(null)},[]),l=(0,J.useCallback)(async(o,c)=>{if(t)return;let l=i.current+1,u=H(e);i.current=l,n(),s(he(o,c)),r(c,{focusEditor:!1});try{let t=await h(e.agentId,e.file.path,c,o);if(i.current!==l||a.current!==u)return;s(me(o,c,t))}catch(e){if(i.current!==l||a.current!==u)return;s(R(o,c,e))}},[t,n,r,e]);return(0,J.useEffect)(()=>{i.current+=1,s(null)},[t,e.agentId,e.file]),{lineChanges:o,openLineChanges:l,closeLineChanges:c}}function tt({editorRef:e,onFocusEditor:t}){(0,J.useEffect)(()=>{if(!window.__FARMING_E2E__)return;let n={focus(){return t(),!!e.current},revealLine(t){let n=e.current,r=n?.getModel();if(!n||!r)return!1;let i=Math.min(Math.max(1,t),r.getLineCount());return n.setPosition({lineNumber:i,column:1}),n.revealLineInCenter(i),n.focus(),!0},insertText(t){let n=e.current,r=n?.getSelection();return!n||!r?!1:(n.pushUndoStop(),n.executeEdits(`farming-e2e`,[{range:r,text:t,forceMoveMarkers:!0}]),n.pushUndoStop(),n.focus(),!0)},undo(){let t=e.current;return t?(t.focus(),t.trigger(`farming-e2e`,`undo`,null),!0):!1},getValue(){return e.current?.getValue()??``},getScrollTop(){return e.current?.getScrollTop()??0},getMarkers(){let t=e.current?.getModel();return t?r.getModelMarkers({resource:t.uri}).map(e=>({code:String(e.code??``),message:e.message,severity:e.severity})):[]},getTypeScriptDiagnosticsOptions(){return a.getDiagnosticsOptions()}};return window.__farmingFileEditorTest=n,()=>{window.__farmingFileEditorTest===n&&delete window.__farmingFileEditorTest}},[e,t])}function nt({openFile:e,openFiles:t,readOnly:n,wordWrapEnabled:i,editorLabel:a,onChangeDraft:o,onFocusFilesSearch:l,onRecordNavigationCursor:u,onSaveShortcut:p,onOpenContextMenuRef:m}){let h=(0,J.useRef)(null),g=(0,J.useRef)(null),_=(0,J.useRef)(new Map),v=(0,J.useRef)(null),y=(0,J.useRef)(new Map),b=(0,J.useRef)(null),x=(0,J.useRef)(null),S=(0,J.useRef)(null),C=(0,J.useRef)(null),w=(0,J.useRef)(null),T=(0,J.useRef)(o),E=(0,J.useRef)(l),D=(0,J.useRef)(u),O=(0,J.useRef)(p),k=(0,J.useRef)(e.agentId),A=(0,J.useRef)(e.file.path),j=(0,J.useRef)(e.workspaceRoot),M=(0,J.useRef)(i),ee=(0,J.useRef)(a),P=(0,J.useRef)(null),F=(0,J.useRef)(0),I=(0,J.useRef)(0),[L,te]=(0,J.useState)({lineNumber:1,column:1});T.current=o,E.current=l,D.current=u,O.current=p,k.current=e.agentId,A.current=e.file.path,j.current=e.workspaceRoot,M.current=i,ee.current=a;let R=(0,J.useCallback)(e=>{let t=e?.getPosition();t&&te(e=>e.lineNumber===t.lineNumber&&e.column===t.column?e:{lineNumber:t.lineNumber,column:t.column})},[]),ne=(0,J.useCallback)(()=>{let e=()=>{let e=g.current;e&&e.focus()};e(),window.requestAnimationFrame(e)},[]),re=(0,J.useCallback)((e,t={})=>{let n=g.current;n&&(n.setPosition({lineNumber:e,column:1}),n.revealLineInCenter(e),t.focusEditor!==!1&&n.focus())},[]),z=(0,J.useCallback)(e=>{if(!e)return;let t=e.getVisibleRanges()[0]?.startLineNumber;if(!t||t<1)return;let n=e.getPosition(),r=j.current||`agent:${k.current}`,i=A.current;c({version:1,surface:`file`,resource:{kind:`file`,workspace:r,path:i},locator:{kind:`file-line`,id:i},position:{unit:`line-column`,value:t,...n?.column?{column:n.column}:{}}})},[]);return tt({editorRef:g,onFocusEditor:ne}),(0,J.useEffect)(()=>{let t=h.current;if(!t)return;Se(),K();let n=r.create(t,q({value:e.draft,language:ye(e.file.path,e.draft),ariaLabel:ee.current,wordWrapEnabled:M.current}));K(n);let i=()=>U(n,M.current),a=xe(),o=()=>i();typeof a.addEventListener==`function`?a.addEventListener(`change`,o):a.addListener(o),i(),g.current=n,b.current=n.onDidChangeModelContent(()=>{F.current>0||T.current(n.getValue())}),x.current=n.onDidChangeCursorPosition(e=>{if(R(n),z(n),I.current>0||e.reason!==r.CursorChangeReason.Explicit||e.source===`api`)return;let t=n.getSelection();D.current?.({agentId:k.current,filePath:A.current,lineNumber:e.position.lineNumber,column:e.position.column,endColumn:t?.endColumn})}),S.current=n.onDidScrollChange(()=>{z(n)}),ve(n,{getAgentId:()=>k.current,onFocusFilesSearch:e=>E.current(e),onSaveShortcut:()=>O.current()}),C.current=n.onContextMenu(e=>m.current(e));let s=e=>{let t=_e(n,e);t&&m.current(t)};t.addEventListener(`contextmenu`,s,!0),w.current=new ResizeObserver(()=>n.layout()),w.current.observe(t);let c=new MutationObserver(()=>K(n));return c.observe(document.body,{attributes:!0,attributeFilter:[`data-appearance`]}),()=>{let e=v.current;e&&_.current.set(e,n.saveViewState()),z(n),w.current?.disconnect(),w.current=null,c.disconnect(),C.current?.dispose(),C.current=null,t.removeEventListener(`contextmenu`,s,!0),typeof a.removeEventListener==`function`?a.removeEventListener(`change`,o):a.removeListener(o),x.current?.dispose(),x.current=null,S.current?.dispose(),S.current=null,b.current?.dispose(),b.current=null,n.dispose(),Ce(),_.current.clear(),g.current=null,v.current=null}},[m,z,R]),(0,J.useEffect)(()=>{let t=g.current;if(!t)return;let n=H(e),r=N(e),i=v.current;i&&i!==n&&_.current.set(i,t.saveViewState());let a=be(e);t.getModel()!==a&&t.setModel(a);let o=y.current.get(n);if((i!==n||o!==r)&&a.getValue()!==e.draft){F.current+=1;try{a.setValue(e.draft)}finally{--F.current}}if(y.current.set(n,r),i!==n){let r=_.current.get(n);if(r)t.restoreViewState(r);else{let n=d(e.workspaceRoot||`agent:${e.agentId}`,e.file.path),r=s(n);r?.surface===`file`&&r.resource.kind===`file`&&r.position.value<=a.getLineCount()?t.revealLineInCenter(r.position.value):r&&f(n)}v.current=n}R(t)},[e,R]),(0,J.useEffect)(()=>{G([...t,e],_.current)},[e,t]),(0,J.useEffect)(()=>{let t=g.current,n=e.cursor;if(!t||!n||P.current===n.requestId)return;let r=t.getModel(),i=oe(n,{lineCount:r?.getLineCount()??1,getLineMaxColumn:e=>r?.getLineMaxColumn(e)??1});I.current+=1;try{t.setSelection(i),t.revealLineInCenter(i.startLineNumber),t.focus()}finally{window.setTimeout(()=>{I.current=Math.max(0,I.current-1)},120)}P.current=n.requestId,te({lineNumber:i.startLineNumber,column:i.startColumn})},[e.cursor,e.file.path]),(0,J.useEffect)(()=>{let e=g.current;e&&e.updateOptions({readOnly:n,domReadOnly:n})},[n]),(0,J.useEffect)(()=>{let e=g.current;e&&U(e,i)},[i]),{editorHostRef:h,editorRef:g,cursorPosition:L,focusEditor:ne,revealLine:re}}function rt({openFile:e,openFiles:t,onCloseEditorTab:n,onFocusEditorTab:r,onFocusFilesSearch:i,onSaveFile:a}){let o=(0,J.useCallback)(e=>{i(e),window.requestAnimationFrame(()=>i(e)),window.setTimeout(()=>i(e),120)},[i]);return(0,J.useCallback)(i=>{if(i.altKey||!(i.ctrlKey||i.metaKey))return;if(i.key.toLowerCase()===`p`){i.preventDefault(),i.stopPropagation(),o(e.agentId);return}if(i.key.toLowerCase()===`s`){i.preventDefault(),i.stopPropagation(),a(!1);return}let s=t.findIndex(t=>H(t)===H(e));if(s!==-1){if(i.key===`PageUp`){i.preventDefault(),i.stopPropagation(),r((s-1+t.length)%t.length);return}if(i.key===`PageDown`){i.preventDefault(),i.stopPropagation(),r((s+1)%t.length);return}i.key.toLowerCase()===`w`&&(i.preventDefault(),i.stopPropagation(),n(s))}},[n,r,a,e,t,o])}function $(e){return H(e)}function it(e){return e.filter((e,t,n)=>n.findIndex(t=>$(t)===$(e))===t)}function at(e,t,n){let r=e[n];if(!r||$(r)!==$(t))return t;let i=e.filter(e=>$(e)!==$(r));return i[Math.max(0,n-1)]??i[n]??null}function ot(e,t,n){let r=new Set(n.map($)),i=e.filter(e=>!r.has($(e)));return i.find(e=>$(e)===$(t))??i[0]??null}function st(e,t){let n=it(e),r=n.filter(E);return{closeFiles:n,dirtyFiles:r,pendingClose:r.length>0?{files:r,closeFiles:n,nextFocusFile:t}:null,nextFocusFile:t}}function ct(e){return e.nextFocusFile&&e.closeFiles.some(t=>$(t)===$(e.nextFocusFile))?null:e.nextFocusFile}function lt(e,t,n){if(e===`close`){let e=t[n];return e?[e]:[]}return e===`close-others`?t.filter((e,t)=>t!==n):e===`close-right`?t.slice(n+1):e===`close-saved`?t.filter(O):[...t]}function ut({openFile:e,openFiles:t,filesLabel:n,onSelectOpenFile:r,onCloseOpenFile:i,onCloseOpenFiles:a,onDismissEditorContextMenu:o,onSaveOpenFile:s}){let c=(0,J.useRef)(new Map),l=(0,J.useRef)(null),[u,d]=(0,J.useState)(null),[f,p]=(0,J.useState)(null),[m,h]=(0,J.useState)(!1),g=(0,J.useCallback)(()=>{d(null)},[]),_=(0,J.useCallback)((e,t)=>{t?c.current.set(e,t):c.current.delete(e)},[]),v=(0,J.useCallback)(e=>{let n=t[e];n&&(l.current=H(n),r(n.agentId,n.file.path))},[r,t]),y=(0,J.useCallback)((e,t)=>{if(e.length===0)return;let n=e.map(e=>({agentId:e.agentId,filePath:e.file.path,workspaceRoot:e.workspaceRoot}));if(l.current=t?H(t):null,n.length===1){let e=n[0];e&&i(e.agentId,e.filePath,e.workspaceRoot);return}a(n)},[i,a]),b=(0,J.useCallback)((e,t)=>{let n=st(e,t),r=n.closeFiles;if(r.length!==0){if(n.pendingClose){p(n.pendingClose),h(!1);return}y(r,n.nextFocusFile)}},[y]),x=(0,J.useCallback)(n=>{let r=t[n];r&&b([r],at(t,e,n))},[e,t,b]),S=(0,J.useCallback)(n=>{b(n,ot(t,e,n))},[e,t,b]),C=(0,J.useCallback)((e,n)=>{e.preventDefault(),e.stopPropagation();let i=t[n];i&&r(i.agentId,i.file.path),o(),d({x:Math.max(8,Math.min(e.clientX,window.innerWidth-230)),y:Math.max(8,Math.min(e.clientY,window.innerHeight-190)),index:n})},[o,r,t]),w=(0,J.useCallback)(e=>{if(!u)return;let n=u.index;if(d(null),e===`close`){x(n);return}S(lt(e,t,n))},[x,S,t,u]),T=(0,J.useCallback)((e,n)=>{if(!(e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`ArrowLeft`){e.preventDefault(),v((n-1+t.length)%t.length);return}if(e.key===`ArrowRight`){e.preventDefault(),v((n+1)%t.length);return}if(e.key===`Home`){e.preventDefault(),v(0);return}if(e.key===`End`){e.preventDefault(),v(t.length-1);return}if(e.key===`Enter`||e.key===` `){e.preventDefault(),v(n);return}(e.key===`Delete`||e.key===`Backspace`)&&(e.preventDefault(),x(n))}},[x,v,t.length]),E=(0,J.useCallback)((e,t)=>{e.button===1&&(e.preventDefault(),e.stopPropagation(),x(t))},[x]),D=(0,J.useCallback)(async()=>{if(!f||m)return;h(!0);for(let e of f.files)if(!await s(e,!1)){h(!1);return}let e=ct(f),t=f.closeFiles;p(null),h(!1),y(t,e)},[y,s,f,m]),O=(0,J.useCallback)(()=>{if(!f)return;let e=ct(f),t=f.closeFiles;p(null),h(!1),y(t,e)},[y,f]),k=(0,J.useCallback)(()=>{p(null),h(!1)},[]),A=(0,J.useMemo)(()=>f?f.files.length===1?B(f.files[0]?.file.path??``):`${f.files.length} ${n}`:``,[n,f]);return(0,J.useEffect)(()=>{let t=H(e),n=c.current.get(t);n?.scrollIntoView({block:`nearest`,inline:`nearest`}),l.current===t&&(n?.focus(),l.current=null)},[e,t.length]),{tabContextMenu:u,pendingClose:f,pendingCloseSaving:m,pendingCloseLabel:A,closeTabContextMenu:g,setTabRef:_,focusEditorTab:v,closeEditorTab:x,openEditorTabContextMenu:C,runTabContextAction:w,handleEditorTabKeyDown:T,handleEditorTabAuxClick:E,confirmSaveAndClose:D,discardAndClose:O,cancelPendingClose:k}}var dt=1;function ft(){let e=dt;return dt+=1,e}function pt({openFile:e,readOnly:t,onUpdateOpenFile:n}){let r=(0,J.useCallback)(async(e,t=!1)=>{if(A(e))return!0;let r={agentId:e.agentId,filePath:e.file.path,workspaceRoot:e.workspaceRoot},i=ft(),a=n(r,e=>e.saving||!t&&!e.dirty?e:u(e,i));if(!a)return!1;if(a.saveRequestId!==i)return!a.dirty&&!a.saving;let s={...r,saveRequestId:i};try{let e=await S(a.agentId,a.file.path,a.draft,a.file.sha1,t),r=n(s,t=>o(t,i,e));return!!(r&&!r.dirty)}catch(e){let t=e instanceof y&&e.status===409;if(!(e instanceof y)||e.status>=500)try{let e=await x(a.agentId,a.file.path);if(e.content===a.draft){let t=n(s,t=>o(t,i,e));return!!(t&&!t.dirty)}}catch{}return n(s,n=>l(n,i,e instanceof Error?e.message:`Failed to save file`,t)),!1}},[n]);return{saveOpenWorkspaceFile:r,saveFile:(0,J.useCallback)(async(n=!1)=>{t||await r(e,n)},[e,t,r]),reloadFile:(0,J.useCallback)(async()=>{let t={agentId:e.agentId,filePath:e.file.path,workspaceRoot:e.workspaceRoot},r=ft(),i=n(t,e=>e.saving?e:u(e,r));if(!i||i.saveRequestId!==r)return;let a={...t,saveRequestId:r};try{let e=await x(i.agentId,i.file.path);n(a,t=>o(t,r,e))}catch(e){n(a,t=>l(t,r,e instanceof Error?e.message:`Failed to reload file`,!1))}},[n,e])}}var mt=``,ht=`farming.code.fileEditor.wordWrap`;function gt(){if(typeof window>`u`)return!1;try{return window.localStorage.getItem(ht)===`1`}catch{return!1}}function _t(e){if(!(typeof window>`u`))try{window.localStorage.setItem(ht,e?`1`:`0`)}catch{}}function vt({openFile:e,openFiles:t,onChangeDraft:n,onUpdateOpenFile:r,onSelectOpenFile:i,onOpenFilePath:a,canNavigateBack:o,canNavigateForward:s,onNavigateHistory:c,onCloseOpenFile:l,onCloseOpenFiles:u,onRevealInExplorer:d,onFocusFilesSearch:f,onRecordNavigationCursor:p,onBackToAgent:m,copy:h}){let g=(0,J.useRef)(()=>{}),_=(0,J.useRef)(()=>{}),v=ee(e),y=ae(e),[b,x]=(0,J.useState)({}),[S,C]=(0,J.useState)({}),[T,E]=(0,J.useState)(gt),D=H(e),O=!y.preview&&!y.diffOnly&&ne(e.file.path),k=!y.preview&&!y.diffOnly&&de(e.file.path),A=b[D],j=O||k?A!==!1:!1,M=O&&j,N=M&&S[D]===!0,P=M&&!N,F=k&&j,I=!y.canEditText||w(e.agentId)||e.file.readOnly===!0,L=y.canShowBlame&&e.file.external!==!0,R=y.canShowLineChanges&&e.file.external!==!0,{saveOpenWorkspaceFile:re,saveFile:z,reloadFile:ie}=pt({openFile:e,readOnly:I,onUpdateOpenFile:r}),{tabContextMenu:oe,pendingClose:se,pendingCloseSaving:ce,pendingCloseLabel:le,closeTabContextMenu:ue,setTabRef:B,focusEditorTab:fe,closeEditorTab:V,openEditorTabContextMenu:me,runTabContextAction:he,handleEditorTabKeyDown:ge,handleEditorTabAuxClick:_e,confirmSaveAndClose:ve,discardAndClose:ye,cancelPendingClose:be}=ut({openFile:e,openFiles:t,filesLabel:h.files,onSelectOpenFile:i,onCloseOpenFile:l,onCloseOpenFiles:u,onDismissEditorContextMenu:()=>_.current(),onSaveOpenFile:re}),xe=rt({openFile:e,openFiles:t,onCloseEditorTab:V,onFocusEditorTab:fe,onFocusFilesSearch:f,onSaveFile:z}),{editorHostRef:U,editorRef:W,cursorPosition:Se,revealLine:Ce}=nt({openFile:e,openFiles:t,readOnly:I,wordWrapEnabled:T,editorLabel:h.editorFor(e.file.path),onChangeDraft:n,onFocusFilesSearch:f,onRecordNavigationCursor:p,onSaveShortcut:()=>{z(!1)},onOpenContextMenuRef:g}),{blameOpen:G,blameLoading:K,blame:q,blameError:we,blameCapability:Te,blameDetail:X,blameLabelWidths:Ee,checkBlameCapability:De,toggleBlame:Oe,showBlameDetail:ke,clearBlameDetail:Z}=Xe({openFile:e,disabled:!L,onRevealLine:Ce}),{lineChanges:Ae,openLineChanges:je,closeLineChanges:Me}=et({openFile:e,disabled:!R,onClearBlameDetail:Z,onRevealLine:Ce}),{diffState:Q,closeDiff:Pe,toggleDiff:Fe}=$e({openFile:e,diffDisabled:!y.canShowDiff,onClearBlameDetail:Z}),Ie=P&&!Q.open,{blameOverlay:Re}=Ze({blame:q,blameLabelWidths:Ee,blameOpen:G,editorHostRef:U,editorRef:W,disabled:!L}),{editorContextMenu:ze,closeEditorContextMenu:Be,openEditorContextMenu:Ve,runEditorContextAction:He,showBlameContextAction:Ue,showLineChangesContextActions:We}=Qe({blameCapability:Te,blameOpen:G,canShowBlame:L,canShowLineChanges:R,editorRef:W,readOnly:I,onCheckBlameCapability:De,onClearBlameDetail:Z,onCloseTabContextMenu:ue,onOpenLineChanges:je,onToggleBlame:Oe});g.current=Ve,_.current=Be;let Ge=te(e)===`changedOnDisk`?h.changedOnDisk:null,Ke=X?pe(X.line.author,mt):``;return(0,J.useEffect)(()=>{if(!(typeof document>`u`))return document.body.classList.toggle(`code-mobile-markdown-reading`,M),()=>{document.body.classList.remove(`code-mobile-markdown-reading`)}},[M]),(0,J.useEffect)(()=>{let e=W.current;if(!e)return;let t=window.requestAnimationFrame(()=>e.layout());return()=>window.cancelAnimationFrame(t)},[W,N,P,j]),(0,Y.jsxs)(`section`,{className:`code-file-editor ${M?`markdown-reading`:``}`.trim(),"data-testid":`code-file-editor`,onKeyDownCapture:xe,children:[(0,Y.jsx)(Ne,{openFile:e,openFiles:t,editorMode:y,copy:h,statusText:Ge,onBackToAgent:m,onSelectOpenFile:i,canNavigateBack:o,canNavigateForward:s,onNavigateHistory:c,onSetTabRef:B,onOpenTabContextMenu:me,onTabAuxClick:_e,onTabKeyDown:ge,onCloseTab:V,onRevealInExplorer:d,onSave:z,onReload:ie,onToggleSourcePreview:()=>{if(!O&&!k)return;let e=!j;x(t=>({...t,[D]:e})),O&&!e&&C(e=>({...e,[D]:!1}))},onToggleMarkdownSplit:()=>{O&&(x(e=>({...e,[D]:!0})),C(e=>({...e,[D]:!N})))},onToggleWordWrap:()=>{E(e=>{let t=!e;return _t(t),t})},onToggleDiff:Fe,canPreviewMarkdown:O,canPreviewSource:k,diffOpen:Q.open,markdownPreviewVisible:Ie,markdownSplitOpen:N,sourcePreviewOpen:j,wordWrapEnabled:T}),e.error&&(0,Y.jsx)(`div`,{className:`code-file-editor-alert`,"data-testid":`code-file-editor-alert`,children:e.error}),(0,Y.jsx)(Je,{activeTabDomId:v,blame:q,blameAuthorProfileUrl:Ke,blameDetailLine:X?.line??null,blameOpen:G,blameOverlay:Re,copy:h,cursorPosition:Se,diffState:Q,editorMode:y,editorHostRef:U,lineChanges:Ae,markdownSplitOpen:N,markdownPreviewOpen:P,sourcePreviewOpen:F,openFile:e,onClearBlameDetail:Z,onCloseDiff:Pe,onCloseLineChanges:Me,onOpenFilePath:a,onShowBlameDetail:ke}),(0,Y.jsx)(Le,{blame:q,blameError:we,blameLoading:K,blameOpen:G,copy:h,editorContextMenu:ze,readOnly:I,openFiles:t,pendingCloseOpen:!!se,pendingCloseLabel:le,pendingCloseSaving:ce,showBlameContextAction:Ue,showLineChangesContextActions:We,tabContextMenu:oe,onCancelPendingClose:be,onCloseEditorContextMenu:Be,onConfirmSaveAndClose:ve,onDiscardAndClose:ye,onRunEditorContextAction:He,onRunTabContextAction:he})]})}export{vt as FileEditorPane};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-BthL93pI.js";var t=e();function n(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M3.14598 5.85423L7.64598 10.3542C7.84098 10.5492 8.15798 10.5492 8.35298 10.3542L12.853 5.85423C13.048 5.65923 13.048 5.34223 12.853 5.14723C12.658 4.95223 12.341 4.95223 12.146 5.14723L7.99998 9.29323L3.85398 5.14723C3.65898 4.95223 3.34198 4.95223 3.14698 5.14723C2.95198 5.34223 2.95098 5.65923 3.14598 5.85423Z`})})}function r(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M3.14603 9.85423C3.34103 10.0492 3.65803 10.0492 3.85303 9.85423L7.99903 5.70823L12.145 9.85423C12.34 10.0492 12.657 10.0492 12.852 9.85423C13.047 9.65923 13.047 9.34223 12.852 9.14723L8.35203 4.64723C8.15703 4.45223 7.84003 4.45223 7.64503 4.64723L3.14503 9.14723C2.95003 9.34223 2.95103 9.65923 3.14603 9.85423Z`})})}function i(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M9.14601 3.14623L4.64601 7.64623C4.45101 7.84123 4.45101 8.15823 4.64601 8.35323L9.14601 12.8532C9.34101 13.0482 9.65801 13.0482 9.85301 12.8532C10.048 12.6582 10.048 12.3412 9.85301 12.1462L5.70701 8.00023L9.85301 3.85423C10.048 3.65923 10.048 3.34223 9.85301 3.14723C9.65801 2.95223 9.34101 2.95223 9.14601 3.14723V3.14623Z`})})}function a(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M6.14601 3.14579C5.95101 3.34079 5.95101 3.65779 6.14601 3.85279L10.292 7.99879L6.14601 12.1448C5.95101 12.3398 5.95101 12.6568 6.14601 12.8518C6.34101 13.0468 6.65801 13.0468 6.85301 12.8518L11.353 8.35179C11.548 8.15679 11.548 7.83979 11.353 7.64478L6.85301 3.14479C6.65801 2.94979 6.34101 2.95079 6.14601 3.14579Z`})})}function o(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M13.5 8.00023H3.70701L7.85301 3.85423C8.04801 3.65923 8.04801 3.34223 7.85301 3.14723C7.65801 2.95223 7.34101 2.95223 7.14601 3.14723L2.14601 8.14723C1.95101 8.34223 1.95101 8.65923 2.14601 8.85423L7.14601 13.8542C7.24401 13.9522 7.37201 14.0002 7.50001 14.0002C7.62801 14.0002 7.75601 13.9512 7.85401 13.8542C8.04901 13.6592 8.04901 13.3422 7.85401 13.1472L3.70801 9.00123H13.501C13.777 9.00123 14.001 8.77723 14.001 8.50123C14.001 8.22523 13.777 8.00123 13.501 8.00123L13.5 8.00023Z`})})}function s(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M13.854 8.14576L8.854 3.14576C8.659 2.95076 8.342 2.95076 8.147 3.14576C7.952 3.34076 7.952 3.65776 8.147 3.85276L12.293 7.99876H2.5C2.224 7.99876 2 8.22276 2 8.49876C2 8.77476 2.224 8.99876 2.5 8.99876H12.293L8.147 13.1448C7.952 13.3398 7.952 13.6568 8.147 13.8518C8.245 13.9498 8.373 13.9978 8.501 13.9978C8.629 13.9978 8.757 13.9488 8.855 13.8518L13.855 8.85176C14.05 8.65676 14.05 8.33976 13.855 8.14476L13.854 8.14576Z`})})}function c(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M13.854 8.146C13.659 7.951 13.342 7.951 13.147 8.146L9.00096 12.292V2.5C9.00096 2.224 8.77696 2 8.50096 2C8.22496 2 8.00096 2.224 8.00096 2.5V12.293L3.85496 8.147C3.65996 7.952 3.34296 7.952 3.14796 8.147C2.95296 8.342 2.95296 8.659 3.14796 8.854L8.14796 13.854C8.24596 13.952 8.37396 14 8.50196 14C8.62996 14 8.75796 13.951 8.85596 13.854L13.856 8.854C14.051 8.659 14.051 8.342 13.856 8.147L13.854 8.146Z`})})}function l(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M13.854 7.14576L8.85401 2.14576C8.65901 1.95076 8.34201 1.95076 8.14701 2.14576L3.14601 7.14576C2.95101 7.34076 2.95101 7.65776 3.14601 7.85276C3.34101 8.04776 3.65801 8.04776 3.85301 7.85276L7.99901 3.70676V13.4998C7.99901 13.7758 8.22301 13.9998 8.49901 13.9998C8.77501 13.9998 8.99901 13.7758 8.99901 13.4998V3.70676L13.145 7.85276C13.243 7.95076 13.371 7.99876 13.499 7.99876C13.627 7.99876 13.755 7.94976 13.853 7.85276C14.048 7.65776 14.048 7.34076 13.853 7.14576H13.854Z`})})}function u(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M8.70701 8.00001L12.353 4.35401C12.548 4.15901 12.548 3.84201 12.353 3.64701C12.158 3.45201 11.841 3.45201 11.646 3.64701L8.00001 7.29301L4.35401 3.64701C4.15901 3.45201 3.84201 3.45201 3.64701 3.64701C3.45201 3.84201 3.45201 4.15901 3.64701 4.35401L7.29301 8.00001L3.64701 11.646C3.45201 11.841 3.45201 12.158 3.64701 12.353C3.74501 12.451 3.87301 12.499 4.00101 12.499C4.12901 12.499 4.25701 12.45 4.35501 12.353L8.00101 8.70701L11.647 12.353C11.745 12.451 11.873 12.499 12.001 12.499C12.129 12.499 12.257 12.45 12.355 12.353C12.55 12.158 12.55 11.841 12.355 11.646L8.70901 8.00001H8.70701Z`})})}function d(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M10.0195 10.7266C9.06578 11.5217 7.83875 12 6.5 12C3.46243 12 1 9.53757 1 6.5C1 3.46243 3.46243 1 6.5 1C9.53757 1 12 3.46243 12 6.5C12 7.83875 11.5217 9.06578 10.7266 10.0195L13.8535 13.1464C14.0488 13.3417 14.0488 13.6583 13.8535 13.8536C13.6583 14.0488 13.3417 14.0488 13.1464 13.8536L10.0195 10.7266ZM11 6.5C11 4.01472 8.98528 2 6.5 2C4.01472 2 2 4.01472 2 6.5C2 8.98528 4.01472 11 6.5 11C8.98528 11 11 8.98528 11 6.5Z`})})}function f(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M13.6572 3.13573C13.8583 2.9465 14.175 2.95614 14.3643 3.15722C14.5535 3.35831 14.5438 3.675 14.3428 3.86425L5.84277 11.8642C5.64597 12.0494 5.33756 12.0446 5.14648 11.8535L1.64648 8.35351C1.45121 8.15824 1.45121 7.84174 1.64648 7.64647C1.84174 7.45121 2.15825 7.45121 2.35351 7.64647L5.50976 10.8027L13.6572 3.13573Z`})})}function p(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M8 1.5C8 1.22386 7.77614 1 7.5 1C7.22386 1 7 1.22386 7 1.5V7H1.5C1.22386 7 1 7.22386 1 7.5C1 7.77614 1.22386 8 1.5 8H7V13.5C7 13.7761 7.22386 14 7.5 14C7.77614 14 8 13.7761 8 13.5V8H13.5C13.7761 8 14 7.77614 14 7.5C14 7.22386 13.7761 7 13.5 7H8V1.5Z`})})}function m(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M1.5 3h4.293l1.5 1.5H14.5l.5.5v7.5l-.5.5h-13l-.5-.5v-9l.5-.5Zm.5 1v8h12V5.5H6.879L5.379 4H2Z`})})}function h(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`}),(0,t.jsx)(`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`}),(0,t.jsx)(`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`}),(0,t.jsx)(`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`})]})}function g(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M5.5 1C4.673 1 4 1.673 4 2.5V4H2.5C1.673 4 1 4.673 1 5.5V13.5C1 14.327 1.673 15 2.5 15H10.5C11.327 15 12 14.327 12 13.5V12H13.5C14.327 12 15 11.327 15 10.5V2.5C15 1.673 14.327 1 13.5 1H5.5ZM5 2.5C5 2.224 5.224 2 5.5 2H13.5C13.776 2 14 2.224 14 2.5V10.5C14 10.776 13.776 11 13.5 11H12V5.5C12 4.673 11.327 4 10.5 4H5V2.5ZM2.5 5H10.5C10.776 5 11 5.224 11 5.5V13.5C11 13.776 10.776 14 10.5 14H2.5C2.224 14 2 13.776 2 13.5V5.5C2 5.224 2.224 5 2.5 5Z`})})}function _(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M18.75 1.5H5.25C3.1815 1.5 1.5 3.183 1.5 5.25V18.75C1.5 20.8185 3.1815 22.5 5.25 22.5H18.75C20.8185 22.5 22.5 20.8185 22.5 18.75V5.25C22.5 3.183 20.8185 1.5 18.75 1.5ZM21 18.75C21 19.9905 19.9905 21 18.75 21H5.25C4.0095 21 3 19.9905 3 18.75V5.25C3 4.0095 4.0095 3 5.25 3H18.75C19.9905 3 21 4.0095 21 5.25V18.75ZM10.281 13.281L5.781 17.781C5.634 17.928 5.442 18 5.25 18C5.058 18 4.866 17.9265 4.719 17.781C4.4265 17.4885 4.4265 17.013 4.719 16.7205L8.688 12.7515L4.719 8.7825C4.4265 8.49 4.4265 8.0145 4.719 7.722C5.0115 7.4295 5.487 7.4295 5.7795 7.722L10.2795 12.222C10.572 12.5145 10.572 12.99 10.2795 13.2825L10.281 13.281ZM19.5 17.25C19.5 17.664 19.164 18 18.75 18H11.25C10.836 18 10.5 17.664 10.5 17.25C10.5 16.836 10.836 16.5 11.25 16.5H18.75C19.164 16.5 19.5 16.836 19.5 17.25Z`})})}function v(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M14.56 7.44049C14.28 7.16049 13.9 7.00049 13.5 7.00049H13V4.00049C13 2.90049 12.1 2.00049 11 2.00049H3C1.9 2.00049 1 2.90049 1 4.00049V9.00049C1 10.1005 1.9 11.0005 3 11.0005V12.0005C3 12.8205 3.93 13.2905 4.59 12.8105L7 11.0505V11.5005C7 11.9005 7.16 12.2805 7.44 12.5605C7.72 12.8405 8.1 13.0005 8.5 13.0005H10.29L12.15 14.8505C12.19 14.9005 12.25 14.9405 12.31 14.9605C12.37 14.9905 12.43 15.0005 12.5 15.0005C12.57 15.0005 12.63 14.9905 12.69 14.9605C12.78 14.9205 12.86 14.8605 12.92 14.7805C12.97 14.7005 13 14.6005 13 14.5005V13.0005H13.5C13.9 13.0005 14.28 12.8405 14.56 12.5605C14.84 12.2805 15 11.9005 15 11.5005V8.50049C15 8.10049 14.84 7.72049 14.56 7.44049ZM6.75 10.0005L4 12.0005V10.0005H3C2.45 10.0005 2 9.55049 2 9.00049V4.00049C2 3.45049 2.45 3.00049 3 3.00049H11C11.55 3.00049 12 3.45049 12 4.00049V7.00049H8.5C8.1 7.00049 7.72 7.16049 7.44 7.44049C7.16 7.72049 7 8.10049 7 8.50049V10.0005H6.75ZM14 11.5005C14 11.6305 13.95 11.7605 13.85 11.8505C13.76 11.9505 13.63 12.0005 13.5 12.0005H12.5C12.37 12.0005 12.24 12.0505 12.15 12.1505C12.05 12.2405 12 12.3705 12 12.5005V13.2905L10.85 12.1505C10.81 12.1005 10.75 12.0605 10.69 12.0405C10.63 12.0105 10.57 12.0005 10.5 12.0005H8.5C8.37 12.0005 8.24 11.9505 8.15 11.8505C8.05 11.7605 8 11.6305 8 11.5005V8.50049C8 8.37049 8.05 8.24049 8.15 8.15049C8.24 8.05049 8.37 8.00049 8.5 8.00049H13.5C13.63 8.00049 13.76 8.05049 13.85 8.15049C13.95 8.24049 14 8.37049 14 8.50049V11.5005Z`})})}function y(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`circle`,{cx:`4.25`,cy:`4.25`,r:`1.75`}),(0,t.jsx)(`circle`,{cx:`11.75`,cy:`4.25`,r:`1.75`}),(0,t.jsx)(`circle`,{cx:`8`,cy:`11.75`,r:`1.75`}),(0,t.jsx)(`path`,{d:`M5.75 5.15 7.2 7.85M10.25 5.15 8.8 7.85M6 11.75H4.75A2.75 2.75 0 0 1 2 9V7.75M10 11.75h1.25A2.75 2.75 0 0 0 14 9V7.75`})]})}function b(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,t.jsx)(`path`,{d:`M8 2a6 6 0 0 0 0 12Z`,fill:`currentColor`,opacity:`0.38`}),(0,t.jsx)(`path`,{d:`M8 2v12`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`})]})}function x(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6.92 1.25h2.16l.32 1.66c.43.14.84.31 1.2.52l1.4-.95 1.53 1.53-.95 1.4c.21.37.39.77.52 1.2l1.65.31v2.16l-1.65.32c-.13.43-.31.84-.52 1.2l.95 1.4L12 13.53l-1.4-.95c-.36.21-.77.39-1.2.52l-.32 1.65H6.92L6.6 13.1a5.3 5.3 0 0 1-1.2-.52l-1.4.95L2.47 12l.95-1.4a5.3 5.3 0 0 1-.52-1.2l-1.65-.32V6.92L2.9 6.6c.13-.43.31-.83.52-1.2l-.95-1.4L4 2.47l1.4.95c.36-.21.77-.38 1.2-.52l.32-1.65Zm.83 1-.27 1.4-.3.08c-.55.14-1.06.36-1.5.65l-.27.18-1.18-.8-.47.47.8 1.18-.18.27c-.29.44-.51.95-.65 1.5l-.08.3-1.4.27v.66l1.4.27.08.3c.14.55.36 1.06.65 1.5l.18.27-.8 1.18.47.47 1.18-.8.27.18c.44.29.95.51 1.5.65l.3.08.27 1.4h.66l.27-1.4.3-.08c.55-.14 1.06-.36 1.5-.65l.27-.18 1.18.8.47-.47-.8-1.18.18-.27c.29-.44.51-.95.65-1.5l.08-.3 1.4-.27v-.66l-1.4-.27-.08-.3a4.3 4.3 0 0 0-.65-1.5l-.18-.27.8-1.18-.47-.47-1.18.8-.27-.18a4.3 4.3 0 0 0-1.5-.65l-.3-.08-.27-1.4h-.66ZM8 5.25a2.75 2.75 0 1 0 0 5.5 2.75 2.75 0 0 0 0-5.5ZM6.25 8a1.75 1.75 0 1 1 3.5 0 1.75 1.75 0 0 1-3.5 0Z`})})}function S(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M11.95 1.35a1.9 1.9 0 0 1 2.7 2.7L6.1 12.6 2 14l1.4-4.1 8.55-8.55Zm.7.7L4.28 10.42l-.63 1.85 1.85-.63 8.37-8.37a.9.9 0 0 0-1.22-1.22Z`})})}function C(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M14.452 1.548C14.087 1.183 13.608 1 13.13 1C12.652 1 12.173 1.183 11.808 1.548L6.979 6.377C6.697 6.659 6.498 7.011 6.401 7.398L6.027 8.896C5.883 9.473 6.329 10.002 6.886 10.002C6.958 10.002 7.031 9.993 7.106 9.975L8.604 9.601C8.99 9.504 9.343 9.305 9.625 9.023L14.454 4.194C15.184 3.464 15.184 2.28 14.454 1.549L14.452 1.548ZM13.745 3.485L8.916 8.314C8.763 8.467 8.57 8.576 8.36 8.629L7.04 8.962L7.371 7.64C7.424 7.43 7.532 7.237 7.686 7.084L12.516 2.255C12.68 2.091 12.899 2 13.131 2C13.363 2 13.582 2.091 13.746 2.255C14.085 2.594 14.085 3.146 13.746 3.486L13.745 3.485ZM13 7.768L14 6.768V11.5C14 12.878 12.879 14 11.5 14H4.5C3.121 14 2 12.878 2 11.5V4.5C2 3.122 3.121 2 4.5 2H9.236L8.236 3H4.5C3.673 3 3 3.673 3 4.5V11.5C3 12.327 3.673 13 4.5 13H11.5C12.327 13 13 12.327 13 11.5V7.768Z`})})}function w(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M7.99909 3C10.7605 3 12.9991 5.23858 12.9991 8C12.9991 10.7614 10.7605 13 7.99909 13C5.39117 13 3.2491 11.003 3.0195 8.45512C2.99471 8.1801 2.75167 7.97723 2.47664 8.00202C2.20161 8.0268 1.99875 8.26985 2.02353 8.54488C2.29916 11.6035 4.86898 14 7.99909 14C11.3128 14 13.9991 11.3137 13.9991 8C13.9991 4.68629 11.3128 2 7.99909 2C6.20656 2 4.59815 2.78613 3.49909 4.03138V2.5C3.49909 2.22386 3.27524 2 2.99909 2C2.72295 2 2.49909 2.22386 2.49909 2.5V5.5C2.49909 5.77614 2.72295 6 2.99909 6H3.08812C3.09498 6.00014 3.10184 6.00014 3.10868 6H5.99909C6.27524 6 6.49909 5.77614 6.49909 5.5C6.49909 5.22386 6.27524 5 5.99909 5H3.99863C4.91128 3.78495 6.36382 3 7.99909 3ZM7.99909 5.5C7.99909 5.22386 7.77524 5 7.49909 5C7.22295 5 6.99909 5.22386 6.99909 5.5V8.5C6.99909 8.77614 7.22295 9 7.49909 9H9.49909C9.77524 9 9.99909 8.77614 9.99909 8.5C9.99909 8.22386 9.77524 8 9.49909 8H7.99909V5.5Z`})})}function T(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M3.75 3C3.33579 3 3 3.33579 3 3.75V5.5C3 5.77614 2.77614 6 2.5 6C2.22386 6 2 5.77614 2 5.5V3.75C2 2.7835 2.7835 2 3.75 2H5.5C5.77614 2 6 2.22386 6 2.5C6 2.77614 5.77614 3 5.5 3H3.75ZM10 2.5C10 2.22386 10.2239 2 10.5 2H12.25C13.2165 2 14 2.7835 14 3.75V5.5C14 5.77614 13.7761 6 13.5 6C13.2239 6 13 5.77614 13 5.5V3.75C13 3.33579 12.6642 3 12.25 3H10.5C10.2239 3 10 2.77614 10 2.5ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12.25C3 12.6642 3.33579 13 3.75 13H5.5C5.77614 13 6 13.2239 6 13.5C6 13.7761 5.77614 14 5.5 14H3.75C2.7835 14 2 13.2165 2 12.25V10.5C2 10.2239 2.22386 10 2.5 10ZM13.5 10C13.7761 10 14 10.2239 14 10.5V12.25C14 13.2165 13.2165 14 12.25 14H10.5C10.2239 14 10 13.7761 10 13.5C10 13.2239 10.2239 13 10.5 13H12.25C12.6642 13 13 12.6642 13 12.25V10.5C13 10.2239 13.2239 10 13.5 10Z`})})}function E(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`path`,{d:`M2.5 2.5h4v4h-4zM9.5 2.5h4v4h-4zM2.5 9.5h4v4h-4z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinejoin:`round`}),(0,t.jsx)(`path`,{d:`M4 4h1v1H4zM11 4h1v1h-1zM4 11h1v1H4zM9.5 9.5h1.4v1.4H9.5zM12.1 9.5h1.4v1.4h-1.4zM9.5 12.1h1.4v1.4H9.5zM12.1 12.1h1.4v1.4h-1.4z`,fill:`currentColor`})]})}function D(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M3 5v14h8V5H3Zm6 12H5V7h4v10Zm4 2h8V5h-8v14Zm2-12h4v10h-4V7Z`})})}function O(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M5 3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5Zm0 2h14v14H5V5Zm2 3v2h10V8H7Zm0 4v2h10v-2H7Zm0 4v2h10v-2H7Z`})})}function k(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`path`,{d:`M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z`}),(0,t.jsx)(`path`,{d:`M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z`})]})}function A(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6.306 2.146l-4.02 4.02v.708l4.02 4.02.708-.707L3.807 6.98H5.69c2.813 0 4.605.605 5.705 1.729 1.102 1.125 1.615 2.877 1.615 5.421v.35h1v-.35c0-2.646-.527-4.72-1.9-6.121C10.735 6.605 8.617 5.98 5.69 5.98H3.887l3.127-3.126-.708-.708z`})})}function j(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`circle`,{cx:`4`,cy:`3`,r:`1.5`}),(0,t.jsx)(`circle`,{cx:`11.5`,cy:`4.5`,r:`1.5`}),(0,t.jsx)(`circle`,{cx:`11.5`,cy:`11.5`,r:`1.5`}),(0,t.jsx)(`path`,{d:`M4 4.5v3A4 4 0 0 0 8 11.5h2M5.5 4.5H10`})]})}function M(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.5 4l.5-.5h8l.5.5v8l-.5.5H4l-.5-.5V4zm1 .5v7h7v-7h-7z`})})}function N(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`path`,{d:`M8.85352 11.7021H7.85449L7.03809 9.54297H3.77246L3.00439 11.7021H2L4.9541 4H5.88867L8.85352 11.7021ZM6.74268 8.73193L5.53418 5.4502C5.49479 5.34277 5.4554 5.1709 5.41602 4.93457H5.39453C5.35872 5.15299 5.31755 5.32487 5.271 5.4502L4.07324 8.73193H6.74268Z`}),(0,t.jsx)(`path`,{d:`M13.756 11.7021H12.8752V10.8428H12.8537C12.4706 11.5016 11.9066 11.8311 11.1618 11.8311C10.6139 11.8311 10.1843 11.686 9.87273 11.396C9.56479 11.106 9.41082 10.721 9.41082 10.2412C9.41082 9.21354 10.016 8.61556 11.2262 8.44727L12.8752 8.21631C12.8752 7.28174 12.4974 6.81445 11.7419 6.81445C11.0794 6.81445 10.4815 7.04004 9.94793 7.49121V6.58887C10.4886 6.24512 11.1117 6.07324 11.8171 6.07324C13.1097 6.07324 13.756 6.75716 13.756 8.125V11.7021ZM12.8752 8.91992L11.5485 9.10254C11.1403 9.15983 10.8324 9.26188 10.6247 9.40869C10.417 9.55192 10.3132 9.80794 10.3132 10.1768C10.3132 10.4453 10.4081 10.6655 10.5978 10.8374C10.7912 11.0057 11.0472 11.0898 11.3659 11.0898C11.8027 11.0898 12.1626 10.9377 12.4455 10.6333C12.7319 10.3254 12.8752 9.93685 12.8752 9.46777V8.91992Z`})]})}function P(e){return(0,t.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:[(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0 11H1V13H15V11H16V14H15H1H0V11Z`}),(0,t.jsx)(`path`,{d:`M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z`}),(0,t.jsx)(`path`,{d:`M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z`})]})}function F(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10.012 2h.976v3.113l2.56-1.557.486.885L11.47 6l2.564 1.559-.485.885-2.561-1.557V10h-.976V6.887l-2.56 1.557-.486-.885L9.53 6 6.966 4.441l.485-.885 2.561 1.557V2zM2 10h4v4H2v-4z`})})}function I(e){return(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,...e,children:(0,t.jsx)(`path`,{d:`M8 1C4.14 1 1 4.14 1 8C1 11.86 4.14 15 8 15C11.86 15 15 11.86 15 8C15 4.14 11.86 1 8 1ZM8 14C4.691 14 2 11.309 2 8C2 4.691 4.691 2 8 2C11.309 2 14 4.691 14 8C14 11.309 11.309 14 8 14ZM10.854 5.854L8.708 8L10.854 10.146C11.049 10.341 11.049 10.658 10.854 10.853C10.756 10.951 10.628 10.999 10.5 10.999C10.372 10.999 10.244 10.95 10.146 10.853L8 8.707L5.854 10.853C5.756 10.951 5.628 10.999 5.5 10.999C5.372 10.999 5.244 10.95 5.146 10.853C4.951 10.658 4.951 10.341 5.146 10.146L7.292 8L5.146 5.854C4.951 5.659 4.951 5.342 5.146 5.147C5.341 4.952 5.658 4.952 5.853 5.147L7.999 7.293L10.145 5.147C10.34 4.952 10.657 4.952 10.852 5.147C11.047 5.342 11.047 5.659 10.852 5.854H10.854Z`})})}export{A,h as C,p as D,S as E,P as F,x as M,M as N,E as O,_ as P,j as S,C as T,O as _,l as a,T as b,f as c,a as d,r as f,D as g,g as h,s as i,d as j,F as k,n as l,b as m,c as n,N as o,u as p,o as r,v as s,y as t,i as u,I as v,w,m as x,k as y};