@inkeep/open-knowledge 0.46.0-beta.3 → 0.46.0-beta.4

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 (367) hide show
  1. package/dist/{acp-harness-probe-BfAZQjw4.mjs → acp-harness-probe-BQ3_wze1.mjs} +2 -2
  2. package/dist/assets/skills/discovery/SKILL.md +1 -1
  3. package/dist/assets/skills/project/SKILL.md +1 -1
  4. package/dist/cli.mjs +20 -20
  5. package/dist/constants-7P_R76Oj.mjs +2 -0
  6. package/dist/{fs-traced-DDm-belY.mjs → fs-traced-B-x7hAhD.mjs} +2 -2
  7. package/dist/fs-traced-Bi88qem0.mjs +1 -0
  8. package/dist/{git-handle-CZzO__rr.mjs → git-handle-BnrTPYj_.mjs} +2 -2
  9. package/dist/git-handle-CHFcUjId.mjs +1 -0
  10. package/dist/index.mjs +1 -1
  11. package/dist/init-C9mmgvW-.mjs +1 -0
  12. package/dist/{init-BbpX_tfM.mjs → init-D0wKKFay.mjs} +4 -4
  13. package/dist/{launch-json-removal-BJBj0U4b.mjs → launch-json-removal-CmpnCINi.mjs} +2 -2
  14. package/dist/loader-D297fMOD.mjs +1 -0
  15. package/dist/{loader-B21NAhXF.mjs → loader-Sk1Z2HXI.mjs} +2 -2
  16. package/dist/md-manager-B9dAVpPF.mjs +2 -0
  17. package/dist/{open-browser-B9YVDd4n.mjs → open-browser-DZWA0mkS.mjs} +2 -2
  18. package/dist/parse-worker.mjs +1 -1
  19. package/dist/{preview-CIemkVcT.mjs → preview-B4nElYVr.mjs} +2 -2
  20. package/dist/preview-DacomZcF.mjs +1 -0
  21. package/dist/public/assets/{ActivityModeContent-CUdU1LSM.js → ActivityModeContent-DKkJMuA9.js} +1 -1
  22. package/dist/public/assets/{AgentDiffPane-C406On9h.js → AgentDiffPane-DkzTKjWa.js} +2 -2
  23. package/dist/public/assets/{AgentThreadClientBinder-B69qnNWb.js → AgentThreadClientBinder-BqONUtGD.js} +1 -1
  24. package/dist/public/assets/{BugReportHistory-DrMLEEP8.js → BugReportHistory-D_60pb7r.js} +1 -1
  25. package/dist/public/assets/{BugReportHistoryDialog-Cf_ZrCjH.js → BugReportHistoryDialog-BzJsPoev.js} +1 -1
  26. package/dist/public/assets/CodeMirrorPropInput-CyIlgGaP.js +3 -0
  27. package/dist/public/assets/{ConsentDialogBody-CiXNBNFL.js → ConsentDialogBody-DWXqUhzJ.js} +1 -1
  28. package/dist/public/assets/{DocumentContext-Bwk1Rcb4.js → DocumentContext-QeD0oigI.js} +11 -11
  29. package/dist/public/assets/{EditorModeToggle-Cc_1CSwt.js → EditorModeToggle-12SdK7ya.js} +2 -2
  30. package/dist/public/assets/{EnableSyncConfirmDialog-CUbRSvVb.js → EnableSyncConfirmDialog-GUnrwfa0.js} +1 -1
  31. package/dist/public/assets/FeedbackForm-B34f3kZF.js +1 -0
  32. package/dist/public/assets/GraphPanel-DE5iijrO.js +44 -0
  33. package/dist/public/assets/{LintConfigEditor-CQvHNEOM.js → LintConfigEditor-BNN0UkHw.js} +1 -1
  34. package/dist/public/assets/{ManagedArtifactProperties-t_bI4fe1.js → ManagedArtifactProperties-Bab8809-.js} +1 -1
  35. package/dist/public/assets/{McpConsentDialogBody-CajikYp7.js → McpConsentDialogBody-xnaSaj_X.js} +1 -1
  36. package/dist/public/assets/{MermaidDocEditor-CftPmzt6.js → MermaidDocEditor-Bw26glK9.js} +1 -1
  37. package/dist/public/assets/PropertyPanel-ANMzlUf0.js +2 -0
  38. package/dist/public/assets/{RegisteredAgentIcon-DplzDEhh.js → RegisteredAgentIcon-CyQDojW_.js} +1 -1
  39. package/dist/public/assets/{ReportBugDialogBody-CYyFn3-x.js → ReportBugDialogBody-SYqc1dep.js} +2 -2
  40. package/dist/public/assets/{SchemaConfigEditor-BpLYvsCk.js → SchemaConfigEditor-RgV92dU4.js} +1 -1
  41. package/dist/public/assets/{SettingsDialogBody-C_wnfFY5.js → SettingsDialogBody-Bhk4NQJN.js} +4 -4
  42. package/dist/public/assets/{ShareBranchSwitchDialog-5gKA4BCe.js → ShareBranchSwitchDialog-BXjj8rUu.js} +1 -1
  43. package/dist/public/assets/{ShareReceiveDialog-DCFP2qk5.js → ShareReceiveDialog-CXqdzDYu.js} +1 -1
  44. package/dist/public/assets/{ShareReceiveMissDialog-CcEXE75K.js → ShareReceiveMissDialog-BaHsueef.js} +1 -1
  45. package/dist/public/assets/{SkillEditorActions-BUn81ISW.js → SkillEditorActions-CDWxVAy1.js} +1 -1
  46. package/dist/public/assets/{SourceEditor-DF-FFwuv.js → SourceEditor-CZhPtXfy.js} +1 -1
  47. package/dist/public/assets/{TerminalPanel-CEIHsphK.js → TerminalPanel-DiVhC52x.js} +3 -3
  48. package/dist/public/assets/TerminalSessionsHost-8wTgxl0R.js +2 -0
  49. package/dist/public/assets/{TerminalWindowApp-B1hXJvlw.js → TerminalWindowApp-CQunMofw.js} +1 -1
  50. package/dist/public/assets/ThreadView-BI4embLm.js +6 -0
  51. package/dist/public/assets/{TimelineDiffPane-D-69ryad.js → TimelineDiffPane-Dd-khPXZ.js} +2 -2
  52. package/dist/public/assets/{abnfDiagram-VRR7QNED-BA0sca5y.js → abnfDiagram-VRR7QNED-Cyah47m9.js} +1 -1
  53. package/dist/public/assets/{agent-diff-store-qaTtNJLp.js → agent-diff-store-CcwDxQK9.js} +1 -1
  54. package/dist/public/assets/{agent-visibility-CANQ951p.js → agent-visibility-mwTztYpe.js} +1 -1
  55. package/dist/public/assets/{arc-DIcYIkPb.js → arc-B3aheyNj.js} +1 -1
  56. package/dist/public/assets/architecture-TIHT7OUA-BfFQVb2N.js +1 -0
  57. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-CyZsfJqr.js → architectureDiagram-ZJ3FMSHR-lZYHIfAt.js} +1 -1
  58. package/dist/public/assets/auth-state-cache-Bkm-5pQl.js +11 -0
  59. package/dist/public/assets/{blockDiagram-677ZJIJ3-BL4J4ddi.js → blockDiagram-677ZJIJ3-mULu-3uH.js} +1 -1
  60. package/dist/public/assets/{c4Diagram-LMCZKHZV-DtpyWL_l.js → c4Diagram-LMCZKHZV-DN4YpCzk.js} +1 -1
  61. package/dist/public/assets/{calendar-2iQWonjM.js → calendar-DqGTQwGe.js} +1 -1
  62. package/dist/public/assets/channel-D04u7HkE.js +1 -0
  63. package/dist/public/assets/{checkbox-DY-vIhnZ.js → checkbox-BkZH9Oy1.js} +1 -1
  64. package/dist/public/assets/chunk-2Q5K7J3B-Cczs20mb.js +1 -0
  65. package/dist/public/assets/{chunk-32BRIVSS-J_rdnOiy.js → chunk-32BRIVSS-DqkgLIEw.js} +1 -1
  66. package/dist/public/assets/{chunk-52WLFC77-BOMCKXNP.js → chunk-52WLFC77-9s8UsQXp.js} +1 -1
  67. package/dist/public/assets/{chunk-5FCAYU7R-8Y9BJKC-.js → chunk-5FCAYU7R-CkSFjjQr.js} +1 -1
  68. package/dist/public/assets/{chunk-5HE753X5-CQEApaqU.js → chunk-5HE753X5-C1Ig4mMr.js} +1 -1
  69. package/dist/public/assets/{chunk-5JV3BV7I-Wp4ieThX.js → chunk-5JV3BV7I-CIggZV0d.js} +1 -1
  70. package/dist/public/assets/{chunk-5TONJI2A-Dht2oB5p.js → chunk-5TONJI2A-BklATmUd.js} +1 -1
  71. package/dist/public/assets/{chunk-5VM5RSS4-BtUIXst7.js → chunk-5VM5RSS4-g5HeYq-z.js} +1 -1
  72. package/dist/public/assets/{chunk-7BUUIJ7U-B7ItXXvn.js → chunk-7BUUIJ7U-Dw__VSpN.js} +1 -1
  73. package/dist/public/assets/{chunk-BIQX33UG-B4CjyNhu.js → chunk-BIQX33UG-CRLx_yn0.js} +1 -1
  74. package/dist/public/assets/{chunk-BO2N2NFS-DMgXoikU.js → chunk-BO2N2NFS-BptiXfus.js} +3 -3
  75. package/dist/public/assets/{chunk-C7G6YPKG-Bhzd4FsL.js → chunk-C7G6YPKG-CmP7ozUj.js} +1 -1
  76. package/dist/public/assets/{chunk-CQNSW5MT-CVrDoms_.js → chunk-CQNSW5MT-BZUHEMrz.js} +1 -1
  77. package/dist/public/assets/{chunk-CYSBUYHQ-N9puYKAt.js → chunk-CYSBUYHQ-BRTRwmYZ.js} +1 -1
  78. package/dist/public/assets/{chunk-EMLP6XTP-ACA6yW7o.js → chunk-EMLP6XTP-DHUO1B6Q.js} +1 -1
  79. package/dist/public/assets/{chunk-EX3LRPZG-BIvLDOrf.js → chunk-EX3LRPZG-aq_XJzX2.js} +1 -1
  80. package/dist/public/assets/{chunk-FWX5IMBZ-1CESfm5O.js → chunk-FWX5IMBZ-rnR9hrS_.js} +2 -2
  81. package/dist/public/assets/{chunk-HOUHSVGY-DTcG17JD.js → chunk-HOUHSVGY-D0096-9K.js} +1 -1
  82. package/dist/public/assets/{chunk-ICXQ74PX-CDyWyZCQ.js → chunk-ICXQ74PX-BUnmDgqa.js} +1 -1
  83. package/dist/public/assets/{chunk-JG7HCLWE-gt52jYPR.js → chunk-JG7HCLWE-BwRUs0j6.js} +1 -1
  84. package/dist/public/assets/{chunk-JWPE2WC7-BIGkO1cG.js → chunk-JWPE2WC7-BOwE-mq8.js} +1 -1
  85. package/dist/public/assets/{chunk-MOJQB5TN-dX_Ns_6-.js → chunk-MOJQB5TN-CYyw3U64.js} +1 -1
  86. package/dist/public/assets/{chunk-MOZMSUNE-DtIvb1II.js → chunk-MOZMSUNE-_aAOLW1j.js} +1 -1
  87. package/dist/public/assets/{chunk-OGEWGWER-BgCGYbch.js → chunk-OGEWGWER-DLH_3q-Z.js} +1 -1
  88. package/dist/public/assets/{chunk-OSBZ3O6U-BjU8eaT1.js → chunk-OSBZ3O6U-BOkYzK-N.js} +1 -1
  89. package/dist/public/assets/{chunk-PUDLZKDR-BtLyPGmD.js → chunk-PUDLZKDR-Co9OjZVi.js} +1 -1
  90. package/dist/public/assets/{chunk-Q4XR5HBZ-B32WTAPs.js → chunk-Q4XR5HBZ-CjNiHUWo.js} +1 -1
  91. package/dist/public/assets/{chunk-QBLGF6JB-CprENtRb.js → chunk-QBLGF6JB-Cf-f1lin.js} +1 -1
  92. package/dist/public/assets/{chunk-R7FJI6CG-DCV9Dvbs.js → chunk-R7FJI6CG-C_nyMdyL.js} +1 -1
  93. package/dist/public/assets/{chunk-RYQCIY6F-DAyLri1b.js → chunk-RYQCIY6F-DXXN4Rzo.js} +1 -1
  94. package/dist/public/assets/{chunk-U6XO7XAA-DSdpZQB7.js → chunk-U6XO7XAA-Hw5M1kkd.js} +1 -1
  95. package/dist/public/assets/{chunk-V7JOEXUC-9lX7N0EN.js → chunk-V7JOEXUC-CLdet7qK.js} +1 -1
  96. package/dist/public/assets/chunk-VAUOI2AC-D9H5NlkH.js +1 -0
  97. package/dist/public/assets/{chunk-VR4S4FIN-CcTJJ1HA.js → chunk-VR4S4FIN-CnZ3Jw81.js} +1 -1
  98. package/dist/public/assets/{chunk-WYO6CB5R-9yPqK9ib.js → chunk-WYO6CB5R-C-c-Ja6D.js} +1 -1
  99. package/dist/public/assets/chunk-XXDRQBXY-BjAUTr8E.js +1 -0
  100. package/dist/public/assets/{chunk-YOTPTUD7-DBti7bK5.js → chunk-YOTPTUD7-CBowI675.js} +1 -1
  101. package/dist/public/assets/{chunk-ZGVPDNZ5-5ruaVNfo.js → chunk-ZGVPDNZ5-DfBSa8vW.js} +1 -1
  102. package/dist/public/assets/{chunk-ZIRB5QZD-DmY1977n.js → chunk-ZIRB5QZD-Cas2Em51.js} +1 -1
  103. package/dist/public/assets/classDiagram-OUVF2IWQ-BCgYs9Pk.js +1 -0
  104. package/dist/public/assets/classDiagram-v2-EOCWNBFH-BpVLL4-U.js +1 -0
  105. package/dist/public/assets/{client-version-BCgL1GiY.js → client-version-g_nEG2h2.js} +1 -1
  106. package/dist/public/assets/comment-chips--aitTdum.js +7 -0
  107. package/dist/public/assets/{config-provider-CJmVSUcR.js → config-provider-CedEU5Ch.js} +2 -2
  108. package/dist/public/assets/{cose-bilkent-JH36ORCC-D8nyC_t4.js → cose-bilkent-JH36ORCC-CzZaHQ2l.js} +1 -1
  109. package/dist/public/assets/cynefin-VYW2F7L2-BVFEANjh.js +1 -0
  110. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-B4B58YEO.js → cynefinDiagram-TSTJHNR4-7PYslCmH.js} +1 -1
  111. package/dist/public/assets/{dagre-DjTdhlGF.js → dagre-BeM31D08.js} +1 -1
  112. package/dist/public/assets/{dagre-VKFMJZFB-DQHmtQOE.js → dagre-VKFMJZFB-DsY-o9S9.js} +1 -1
  113. package/dist/public/assets/{diagram-FQU43EPY-B28ABQG6.js → diagram-FQU43EPY-Cc40Oq-m.js} +1 -1
  114. package/dist/public/assets/{diagram-G47NLZAW-1MthGQcj.js → diagram-G47NLZAW-DdbiGkJk.js} +1 -1
  115. package/dist/public/assets/{diagram-NH7WQ7WH-B_Fhjw29.js → diagram-NH7WQ7WH-BoEA_7qN.js} +1 -1
  116. package/dist/public/assets/{diagram-OA4YK3LP-1B7_yz5p.js → diagram-OA4YK3LP-ChsGI8c4.js} +1 -1
  117. package/dist/public/assets/{diagram-WEI45ONY-DzfuKRxf.js → diagram-WEI45ONY-znZ94tAq.js} +1 -1
  118. package/dist/public/assets/{dialog-TkFkuYVg.js → dialog-6-bc7qPg.js} +1 -1
  119. package/dist/public/assets/{dist-BObw0jPE.js → dist-B25wDFyk.js} +1 -1
  120. package/dist/public/assets/{dist-C7rVxfRB.js → dist-BMMI5Kdg.js} +1 -1
  121. package/dist/public/assets/{dist-DGzvBIzr.js → dist-C4Kl8QaT.js} +1 -1
  122. package/dist/public/assets/{dist-D1zECWv_.js → dist-C7VIqwIG.js} +1 -1
  123. package/dist/public/assets/{dist-BR00oFrA2.js → dist-CsRIthsw2.js} +1 -1
  124. package/dist/public/assets/{dist-Dhbvx6Ut.js → dist-Cv2LF2DL.js} +178 -176
  125. package/dist/public/assets/{dist-CP0xcBf_.js → dist-CxGvJvCN.js} +1 -1
  126. package/dist/public/assets/{dist-DifRwKW-.js → dist-DPWWCZ4h.js} +1 -1
  127. package/dist/public/assets/{dist-Cqbn6bM9.js → dist-Dcu3hl7e.js} +1 -1
  128. package/dist/public/assets/{dist-CiPafPDy.js → dist-DdFyq-YY.js} +1 -1
  129. package/dist/public/assets/{dist-ChSSPf9y.js → dist-DlSSwTCj.js} +1 -1
  130. package/dist/public/assets/{dist-CslAqn54.js → dist-DmIoqGC0.js} +1 -1
  131. package/dist/public/assets/{dist-DL8cni8v.js → dist-Dolq1sN0.js} +1 -1
  132. package/dist/public/assets/{dist-ioWbCXab.js → dist-P9LB04An.js} +1 -1
  133. package/dist/public/assets/{doc-hash-BzYXjFJp.js → doc-hash-unBeSU8C.js} +1 -1
  134. package/dist/public/assets/{documents-events-NL4RG6fU.js → documents-events-DJXnk07Z.js} +1 -1
  135. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-BjazoYYO.js → ebnfDiagram-CCIWWBDH-DX6whEUG.js} +1 -1
  136. package/dist/public/assets/{erDiagram-Q63AITRT-DvgiLWl5.js → erDiagram-Q63AITRT-CgloxApp.js} +1 -1
  137. package/dist/public/assets/{esm-HV7Pxfbn.js → esm-QF0-_nlB.js} +1 -1
  138. package/dist/public/assets/eventmodeling-45OFAUF4-usNuB_rF.js +1 -0
  139. package/dist/public/assets/{file-tree-adapter-C3r5x-03.js → file-tree-adapter-C9l0Uy9t.js} +1 -1
  140. package/dist/public/assets/{file-tree-utils-DnNGot8D.js → file-tree-utils-Cy6smqXE.js} +1 -1
  141. package/dist/public/assets/flowDiagram-23GEKE2U-CDs0Vlps.js +1 -0
  142. package/dist/public/assets/{follow-file-BghdVu5J.js → follow-file-BVJ6G9Hs.js} +1 -1
  143. package/dist/public/assets/{ganttDiagram-NO4QXBWP-CJgOU-j1.js → ganttDiagram-NO4QXBWP-BZQXYXPf.js} +1 -1
  144. package/dist/public/assets/gitGraph-TEB2WS4Q-DXc_YvuI.js +1 -0
  145. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-DYP87cJL.js → gitGraphDiagram-IHSO6WYX-DnT15zfc.js} +1 -1
  146. package/dist/public/assets/{globals-C7y6kfQ9.js → globals-CdX3jOLC.js} +2 -2
  147. package/dist/public/assets/globals-Cf_md-qZ.css +1 -0
  148. package/dist/public/assets/{graphlib-DYCc0Y9o.js → graphlib-CIYGRnfF.js} +1 -1
  149. package/dist/public/assets/{highlighted-body-OFNGDK62-C9GzQB8c.js → highlighted-body-OFNGDK62-DN5QVB2g.js} +1 -1
  150. package/dist/public/assets/index-BnCzVIZM.js +2014 -0
  151. package/dist/public/assets/info-DKCQHKI2-C0DL9Ht0.js +1 -0
  152. package/dist/public/assets/{infoDiagram-FWYZ7A6U-CbZOQ254.js → infoDiagram-FWYZ7A6U-CPJF9vn1.js} +1 -1
  153. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-CUWPHUOP.js → ishikawaDiagram-FXEZZL3T-CPmyb7Oh.js} +1 -1
  154. package/dist/public/assets/{journeyDiagram-5HDEW3XC-RLUp44OU.js → journeyDiagram-5HDEW3XC-DHsl5S9z.js} +1 -1
  155. package/dist/public/assets/{kanban-definition-HUTT4EX6-D4TPhDQW.js → kanban-definition-HUTT4EX6-BS2xX-qh.js} +1 -1
  156. package/dist/public/assets/{line-KTG0S8eM.js → line-PfwSO0Y4.js} +1 -1
  157. package/dist/public/assets/{linear-D6fTctUn.js → linear-DY7zcaob.js} +1 -1
  158. package/dist/public/assets/{lint-config-client-CrVQnAJl.js → lint-config-client-SBOLqEAH.js} +1 -1
  159. package/dist/public/assets/{map-Rw6uJqFR.js → map-B5g_BAkn.js} +1 -1
  160. package/dist/public/assets/{markdownlint-rule-browser-Cb6F_hct.js → markdownlint-rule-browser-u-niNZkQ.js} +1 -1
  161. package/dist/public/assets/mermaid-GHXKKRXX-C9klxgAS.js +1 -0
  162. package/dist/public/assets/{mermaid-parser.core-CusxBOjy.js → mermaid-parser.core-DtiAO5KW.js} +2 -2
  163. package/dist/public/assets/{mermaid.core-okCkIUps.js → mermaid.core-2-fa7F6R.js} +3 -3
  164. package/dist/public/assets/{mindmap-definition-LN4V7U3C-D-eGlMvq.js → mindmap-definition-LN4V7U3C-CTVrQgzc.js} +1 -1
  165. package/dist/public/assets/{navigation-targets-CILnJhFW.js → navigation-targets-CRrgSRY3.js} +1 -1
  166. package/dist/public/assets/{now-DRL8tqfF.js → now-bAD2ZsK-.js} +1 -1
  167. package/dist/public/assets/{open-managed-artifact-tab-CoiXLY4g.js → open-managed-artifact-tab-DKpdEiZk.js} +1 -1
  168. package/dist/public/assets/{ordinal-DnmHW-WD.js → ordinal-Dj8tTCMd.js} +1 -1
  169. package/dist/public/assets/packet-7NZHBO7P-BpFruX6n.js +1 -0
  170. package/dist/public/assets/{panel-C8ZhM4q-.js → panel-BbxjQP3-.js} +1 -1
  171. package/dist/public/assets/{pegDiagram-2B236MQR-Bjnm3xCN.js → pegDiagram-2B236MQR-DVy6JL4F.js} +1 -1
  172. package/dist/public/assets/{pending-receive-nav-store-BYGxrnRS.js → pending-receive-nav-store-EO01lM9G.js} +1 -1
  173. package/dist/public/assets/pie-RZYD4A2V-lVpCCOkJ.js +1 -0
  174. package/dist/public/assets/{pieDiagram-ENE6RG2P-BkLpbnFN.js → pieDiagram-ENE6RG2P-Kxbx45IP.js} +1 -1
  175. package/dist/public/assets/{project-paths-Dwo4Of8C.js → project-paths-DdZAF_-I.js} +1 -1
  176. package/dist/public/assets/{prop-types-BX5rHy8u.js → prop-types-DDnDOUmp.js} +1 -1
  177. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-eMGNkhp-.js → quadrantDiagram-ABIIQ3AL-BbCFEjhq.js} +1 -1
  178. package/dist/public/assets/radar-I7S5WNFK-Bd-i9axl.js +1 -0
  179. package/dist/public/assets/railroad-3IZDKUUU-D6ewe_eA.js +1 -0
  180. package/dist/public/assets/railroad-abnf-AHOZXSZD-DKqyYXL-.js +1 -0
  181. package/dist/public/assets/railroad-ebnf-EBAXGLYW-CtMezBX2.js +1 -0
  182. package/dist/public/assets/railroad-peg-LSFZ7HO6-DJ-63J6n.js +1 -0
  183. package/dist/public/assets/{railroadDiagram-RFXS5EU6-Cs70gdc4.js → railroadDiagram-RFXS5EU6-6SEpaCgo.js} +1 -1
  184. package/dist/public/assets/{receive-store-Cuer2-MQ.js → receive-store-CCj5OCl8.js} +1 -1
  185. package/dist/public/assets/{requirementDiagram-TGXJPOKE-yQhnovOU.js → requirementDiagram-TGXJPOKE-brbJ6VUS.js} +1 -1
  186. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-C7R3anws.js → sankeyDiagram-HTMAVEWB-DT0MK3ep.js} +1 -1
  187. package/dist/public/assets/{schema-fields-view-intent-D_s-Cynn.js → schema-fields-view-intent-CDu72Aty.js} +1 -1
  188. package/dist/public/assets/{selection-context-BLRRQXPM.js → selection-context-CsoqdVq1.js} +1 -1
  189. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-CEdbVotz.js → sequenceDiagram-DBY2YBRQ-BPJt9blB.js} +1 -1
  190. package/dist/public/assets/{sizeCapture-X5ZJPWSS-DAh96RVo.js → sizeCapture-X5ZJPWSS-1l7G4SwD.js} +1 -1
  191. package/dist/public/assets/skill-actions-4cV_4pjw.js +1 -0
  192. package/dist/public/assets/{skills-api-By8un6BC.js → skills-api-141pFhWO.js} +1 -1
  193. package/dist/public/assets/{src-oESxEYNL.js → src-0hFiTIuh.js} +1 -1
  194. package/dist/public/assets/{src--OxBHrEw.js → src-CaBa9Z1L.js} +1 -1
  195. package/dist/public/assets/{stateDiagram-2N3HPSRC-q96Dmt4i.js → stateDiagram-2N3HPSRC-QGlUFt6h.js} +1 -1
  196. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-D_6D-nLI.js +1 -0
  197. package/dist/public/assets/{swimlanes-5IMT3BWC--g7Ac5Wk.js → swimlanes-5IMT3BWC-BHsr6MBF.js} +2 -2
  198. package/dist/public/assets/swimlanesDiagram-G3AALYLV-cqXTLbrM.js +8 -0
  199. package/dist/public/assets/{tag-pill-input-BIioVLJo.js → tag-pill-input-C4VKdytg.js} +1 -1
  200. package/dist/public/assets/{target-navigation-intent-YwxjtaLV.js → target-navigation-intent-BzJodEAL.js} +1 -1
  201. package/dist/public/assets/{telemetry-impl-BFTBY40l.js → telemetry-impl-DV07MMfz.js} +2 -2
  202. package/dist/public/assets/{telemetry-startup-DI3YRseI.js → telemetry-startup-Cy1VVosp.js} +1 -1
  203. package/dist/public/assets/terminal-launch-events-Bz4DL9DZ.js +1 -0
  204. package/dist/public/assets/{terminal-telemetry-BLN1ghOs.js → terminal-telemetry-CXqhqIkk.js} +1 -1
  205. package/dist/public/assets/{thread-client-C0O75Kza.js → thread-client-CSOJeVWW.js} +1 -1
  206. package/dist/public/assets/{timeline-definition-FHXFAJF6-DqrkK_6w.js → timeline-definition-FHXFAJF6-DitS4FqW.js} +1 -1
  207. package/dist/public/assets/treeView-QDETBFTQ-CuznZlQn.js +1 -0
  208. package/dist/public/assets/treemap-6X3UGDF4-DCd6umeO.js +1 -0
  209. package/dist/public/assets/typing-burst-detector-DuRvcTVz.js +8 -0
  210. package/dist/public/assets/{uninstall-ousBF288.js → uninstall-9ZXPO59t.js} +1 -1
  211. package/dist/public/assets/use-activity-panel-BBGq_DFB.js +1 -0
  212. package/dist/public/assets/{use-apply-config-color-theme-VdlJaZ0G.js → use-apply-config-color-theme-zM7Oux5u.js} +2 -2
  213. package/dist/public/assets/{use-collab-url-DU2XMK58.js → use-collab-url-81TC8Fvz.js} +1 -1
  214. package/dist/public/assets/{use-live-xterm-theme-DVzY8LXJ.js → use-live-xterm-theme-DeW6SO6V.js} +1 -1
  215. package/dist/public/assets/use-settings-route-KYTTaHV0.js +1 -0
  216. package/dist/public/assets/{use-terminal-enabled-BoKa-wLe.js → use-terminal-enabled-qjUlZ0f0.js} +1 -1
  217. package/dist/public/assets/use-timeline-entry-diff-svkep662.js +6 -0
  218. package/dist/public/assets/{use-workspace-DwK7HqI3.js → use-workspace-CNU53RmX.js} +1 -1
  219. package/dist/public/assets/{vennDiagram-L72KCM5P-DFSXk11G.js → vennDiagram-L72KCM5P-D7jabRjK.js} +1 -1
  220. package/dist/public/assets/wardley-OPB4EBWU-DH0Qf9r4.js +1 -0
  221. package/dist/public/assets/{wardleyDiagram-EHGQE667-Bw65HviB.js → wardleyDiagram-EHGQE667-C3olh_ef.js} +1 -1
  222. package/dist/public/assets/{workspace-paths-DSoqUSNl.js → workspace-paths-DGKkpMQ9.js} +1 -1
  223. package/dist/public/assets/{xychartDiagram-FW5EYKEG-CEVfZ0d5.js → xychartDiagram-FW5EYKEG-WqIWQJdh.js} +1 -1
  224. package/dist/public/index.html +93 -92
  225. package/dist/public/uninstall.html +10 -10
  226. package/dist/{repair-launch-json-DcxpqtPk.mjs → repair-launch-json-B-4hsfw8.mjs} +2 -2
  227. package/dist/{repair-mcp-configs-CR0w_9a_.mjs → repair-mcp-configs--yGPDCBl.mjs} +2 -2
  228. package/dist/repair-skills-C40390Fl.mjs +1 -0
  229. package/dist/{repair-skills-SFM8UbHd.mjs → repair-skills-CH8FwF78.mjs} +2 -2
  230. package/dist/{server-lock-DKdlkhpB.mjs → server-lock-D6rSSnhg.mjs} +2 -2
  231. package/dist/server-lock-RCr-Pegf.mjs +1 -0
  232. package/dist/{sleep-DDnWCWup.mjs → sleep-IcuyYCzq.mjs} +24 -24
  233. package/dist/{src-BK8Vvk9Y.mjs → src-2StQCkyf.mjs} +123 -121
  234. package/dist/{src-D5b5YKY3.mjs → src-CwNOE4ri.mjs} +1 -1
  235. package/dist/src-DV_Dbu6a.mjs +3275 -0
  236. package/dist/{src-CBz1zxch.mjs → src-y0VSl78g.mjs} +6 -6
  237. package/dist/start-Bc5XMp-q.mjs +1 -0
  238. package/dist/{start-BgSe0IWK.mjs → start-D-Yu2Dgc.mjs} +3 -3
  239. package/dist/{write-project-skill-IitZHJK2.mjs → write-project-skill-W6wm8WGO.mjs} +4 -4
  240. package/package.json +5 -5
  241. package/dist/constants-CrnIZ43q.mjs +0 -2
  242. package/dist/fs-traced-CeWo_16n.mjs +0 -1
  243. package/dist/git-handle-CEBr8e47.mjs +0 -1
  244. package/dist/init-DUJ-mhxU.mjs +0 -1
  245. package/dist/loader-D4TBMIRP.mjs +0 -1
  246. package/dist/md-manager-R-9E_3qL.mjs +0 -2
  247. package/dist/preview-EXWt03kG.mjs +0 -1
  248. package/dist/public/assets/CodeMirrorPropInput-BQX8xzkZ.js +0 -3
  249. package/dist/public/assets/FeedbackForm-DyWcK0_u.js +0 -1
  250. package/dist/public/assets/GraphPanel-C0b5lyLq.js +0 -44
  251. package/dist/public/assets/PropertyPanel-DjnXiFVP.js +0 -2
  252. package/dist/public/assets/TerminalSessionsHost-fGKRakWG.js +0 -2
  253. package/dist/public/assets/ThreadView-CQui3mRB.js +0 -6
  254. package/dist/public/assets/architecture-TIHT7OUA-DhKVyAdC.js +0 -1
  255. package/dist/public/assets/auth-state-cache-WFzLfVsU.js +0 -11
  256. package/dist/public/assets/channel-D7XYjy4a.js +0 -1
  257. package/dist/public/assets/chunk-2Q5K7J3B-BpVQiBsM.js +0 -1
  258. package/dist/public/assets/chunk-VAUOI2AC-buA1NS7h.js +0 -1
  259. package/dist/public/assets/chunk-XXDRQBXY-Dpdm1nrz.js +0 -1
  260. package/dist/public/assets/classDiagram-OUVF2IWQ-BdRcUr99.js +0 -1
  261. package/dist/public/assets/classDiagram-v2-EOCWNBFH-4fffeoHu.js +0 -1
  262. package/dist/public/assets/cynefin-VYW2F7L2-BlrdxSfe.js +0 -1
  263. package/dist/public/assets/eventmodeling-45OFAUF4-D8s6Yevv.js +0 -1
  264. package/dist/public/assets/flowDiagram-23GEKE2U-hlKdkNzZ.js +0 -1
  265. package/dist/public/assets/gitGraph-TEB2WS4Q-B-5iqxxO.js +0 -1
  266. package/dist/public/assets/globals-BtCTpjIr.css +0 -1
  267. package/dist/public/assets/index-DuOqh37t.js +0 -2013
  268. package/dist/public/assets/info-DKCQHKI2-CkzkGEPY.js +0 -1
  269. package/dist/public/assets/mermaid-GHXKKRXX-WtDC9WMV.js +0 -1
  270. package/dist/public/assets/packet-7NZHBO7P-DDIvLOTX.js +0 -1
  271. package/dist/public/assets/pie-RZYD4A2V-DnssmCEa.js +0 -1
  272. package/dist/public/assets/radar-I7S5WNFK-0J5y2_MO.js +0 -1
  273. package/dist/public/assets/railroad-3IZDKUUU-BgsONsxl.js +0 -1
  274. package/dist/public/assets/railroad-abnf-AHOZXSZD-BhBo_9j9.js +0 -1
  275. package/dist/public/assets/railroad-ebnf-EBAXGLYW-B5mHA2IL.js +0 -1
  276. package/dist/public/assets/railroad-peg-LSFZ7HO6-BV4uZ4WL.js +0 -1
  277. package/dist/public/assets/skill-actions-DEa7Mqcd.js +0 -1
  278. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-BCNHhMpC.js +0 -1
  279. package/dist/public/assets/swimlanesDiagram-G3AALYLV-hRuoLGg3.js +0 -8
  280. package/dist/public/assets/terminal-launch-events-7D-deCwp.js +0 -1
  281. package/dist/public/assets/treeView-QDETBFTQ-N2YNex2I.js +0 -1
  282. package/dist/public/assets/treemap-6X3UGDF4-DkzYKeau.js +0 -1
  283. package/dist/public/assets/typing-burst-detector-CaC_du54.js +0 -8
  284. package/dist/public/assets/use-activity-panel-CVU0EVdO.js +0 -1
  285. package/dist/public/assets/use-settings-route-FnSIe1ir.js +0 -1
  286. package/dist/public/assets/use-timeline-entry-diff-CF4QQ4Me.js +0 -6
  287. package/dist/public/assets/wardley-OPB4EBWU-OOiOMSoP.js +0 -1
  288. package/dist/repair-skills-Zy_JOsHR.mjs +0 -1
  289. package/dist/server-lock-Dp1Aw6AQ.mjs +0 -1
  290. package/dist/src-BIJtc8LA.mjs +0 -3275
  291. package/dist/start-D2rWspqr.mjs +0 -1
  292. /package/dist/public/assets/{ActivityPanelDiffView-B03Wzvap.js → ActivityPanelDiffView-DYFlG61N.js} +0 -0
  293. /package/dist/public/assets/{AppMenubar-Bisp0k8X.js → AppMenubar-DHWqgWXl.js} +0 -0
  294. /package/dist/public/assets/{ConfigSharingInfoTooltip-DMbsfWD9.js → ConfigSharingInfoTooltip-BMJ7SIjf.js} +0 -0
  295. /package/dist/public/assets/{__vite-browser-external-BckCY-VI.js → __vite-browser-external-z7jTWlYs.js} +0 -0
  296. /package/dist/public/assets/{agent-presence-CEfNcJUY.js → agent-presence-BdWbAeV-.js} +0 -0
  297. /package/dist/public/assets/{array-D9gZmznT.js → array-CC6md2n_.js} +0 -0
  298. /package/dist/public/assets/{badge-Dba4cvJR.js → badge-DXHoKHez.js} +0 -0
  299. /package/dist/public/assets/{chunk-KEIR6QF5-zkgbDrf9.js → chunk-KEIR6QF5-BppCe61B.js} +0 -0
  300. /package/dist/public/assets/{chunk-Y2CYZVJY-BAUBUeAF.js → chunk-Y2CYZVJY-CP7lNZai.js} +0 -0
  301. /package/dist/public/assets/{clike-ccBqxK3t.js → clike-BAopx-wt.js} +0 -0
  302. /package/dist/public/assets/{clipboard-adapter-Cxzkvc1d.js → clipboard-adapter-ZCy01ehf.js} +0 -0
  303. /package/dist/public/assets/{colors-BZ7r12jC.js → colors-QyrgP4ww.js} +0 -0
  304. /package/dist/public/assets/{config-context-gd3BC-iY.js → config-context-D3FvmHZm.js} +0 -0
  305. /package/dist/public/assets/{copilot-CjOGWDvv.js → copilot-BiqH8PgI.js} +0 -0
  306. /package/dist/public/assets/{cursor-B8rehP9c.js → cursor-BDHSyD-9.js} +0 -0
  307. /package/dist/public/assets/{cytoscape.esm-GtliGICm.js → cytoscape.esm-Ci36Fm6r.js} +0 -0
  308. /package/dist/public/assets/{defaultLocale-CqKPYlUZ.js → defaultLocale-ByXO85kN.js} +0 -0
  309. /package/dist/public/assets/{desktop-bridge-types--ZPzhkC9.js → desktop-bridge-types-DHaZbwZ0.js} +0 -0
  310. /package/dist/public/assets/{diff-oW0nWZgn.js → diff-KHO8LkSI.js} +0 -0
  311. /package/dist/public/assets/{dist-BLAMau9Z.js → dist-B8I5m7M1.js} +0 -0
  312. /package/dist/public/assets/{dist-q14fBS3T.js → dist-BCZq3DKc.js} +0 -0
  313. /package/dist/public/assets/{dist-zCmaEyrL.js → dist-Bpk5HQQh.js} +0 -0
  314. /package/dist/public/assets/{dist-B1Jbz0yl.js → dist-Cljnhi3D.js} +0 -0
  315. /package/dist/public/assets/{dist-DNwOaDhC.js → dist-D7mv9smG.js} +0 -0
  316. /package/dist/public/assets/{documents-fetch-CLL0O1of.js → documents-fetch-Db-Ikele.js} +0 -0
  317. /package/dist/public/assets/{external-link-T4Nj1gcG.js → external-link-Ct0_ujyY.js} +0 -0
  318. /package/dist/public/assets/{field-DVIFAnvR.js → field-BNyAQHKf.js} +0 -0
  319. /package/dist/public/assets/{file-tree-rename-validation-wADtjYEi.js → file-tree-rename-validation-DDA1ck2Y.js} +0 -0
  320. /package/dist/public/assets/{form-coxG-8Qw.js → form-gDsa08Xi.js} +0 -0
  321. /package/dist/public/assets/{format-CejNFduS.js → format-4tjAvLkN.js} +0 -0
  322. /package/dist/public/assets/{go-CCS4kWKN.js → go-7c8IMl4m.js} +0 -0
  323. /package/dist/public/assets/{init-CMTNTj66.js → init-CL1Yxhhi.js} +0 -0
  324. /package/dist/public/assets/{input-D0ZW0Opq.js → input-D4OPkja2.js} +0 -0
  325. /package/dist/public/assets/{isObject-Ho9jn-6g.js → isObject-5PVyZ800.js} +0 -0
  326. /package/dist/public/assets/{libesm-Db-3Gx3Z.js → libesm-WVpTb_tB.js} +0 -0
  327. /package/dist/public/assets/{lint-plugin-meta-DKTiO7RO.js → lint-plugin-meta-BoxMoaxR.js} +0 -0
  328. /package/dist/public/assets/{lru-string-cache-BZxOuxTi.js → lru-string-cache-7Y9kMeow.js} +0 -0
  329. /package/dist/public/assets/{lua-DgAwqJ0D.js → lua-DnREcbBQ.js} +0 -0
  330. /package/dist/public/assets/{mcp-consent-store-wvrClpLC.js → mcp-consent-store-CDAQY6Np.js} +0 -0
  331. /package/dist/public/assets/{min-BQPeeNfF.js → min-DVq-2erP.js} +0 -0
  332. /package/dist/public/assets/{minus-SecfYzeQ.js → minus-CI_HyT1V.js} +0 -0
  333. /package/dist/public/assets/{overlay-layers-y-dNUWSd.js → overlay-layers-Dhz8IqAf.js} +0 -0
  334. /package/dist/public/assets/{panel-right-open-B7ziq39V.js → panel-right-open-CWgBRlZa.js} +0 -0
  335. /package/dist/public/assets/{panzoom.es-CxTS7ZPP.js → panzoom.es-D0o6IaL6.js} +0 -0
  336. /package/dist/public/assets/{paperclip-CX7J_G-w.js → paperclip-FiPqbd6f.js} +0 -0
  337. /package/dist/public/assets/{parse-api-error-C_gwkKmG.js → parse-api-error-BtEL2kxi.js} +0 -0
  338. /package/dist/public/assets/{path-DoEWlp6O.js → path-BGTOauh6.js} +0 -0
  339. /package/dist/public/assets/{pdf-Da_O_GF5.js → pdf-DLVdEoR9.js} +0 -0
  340. /package/dist/public/assets/{pdf.worker-Pbs_-93C.js → pdf.worker-Cuhr1SjJ.js} +0 -0
  341. /package/dist/public/assets/{perl-DMwerdcj.js → perl-D6YK7dbe.js} +0 -0
  342. /package/dist/public/assets/{properties-Du1Kuwqc.js → properties-BPzWpIa7.js} +0 -0
  343. /package/dist/public/assets/{r-wSvpRg5h.js → r-tzVlUzeq.js} +0 -0
  344. /package/dist/public/assets/{refresh-cw-BfeWGCsv.js → refresh-cw-DClG_qgN.js} +0 -0
  345. /package/dist/public/assets/{rough.esm-esi5HKC4.js → rough.esm-kQd3CdGR.js} +0 -0
  346. /package/dist/public/assets/{ruby-DuM6hMQW.js → ruby-_eAC-08N.js} +0 -0
  347. /package/dist/public/assets/{share-metadata-rows-CbXHISQ4.js → share-metadata-rows-Ds3RIKZ4.js} +0 -0
  348. /package/dist/public/assets/{shell-BZ7mgeL0.js → shell-CRkrz4LQ.js} +0 -0
  349. /package/dist/public/assets/{skeleton-BG12Hmzn.js → skeleton-Mo1oLtEu.js} +0 -0
  350. /package/dist/public/assets/{sliders-horizontal-34K0eDW2.js → sliders-horizontal-BNv-Koqw.js} +0 -0
  351. /package/dist/public/assets/{sortable.esm-C565D25d.js → sortable.esm-_jt9EfAF.js} +0 -0
  352. /package/dist/public/assets/{sql-BXdRuz6d.js → sql-BtxU5QDI.js} +0 -0
  353. /package/dist/public/assets/{src-DNE52RZP.js → src-BJaEWo8x.js} +0 -0
  354. /package/dist/public/assets/{startup-marks-CqVzdU1y.js → startup-marks-CyxDWRgR.js} +0 -0
  355. /package/dist/public/assets/{stex-CniH6-Mv.js → stex-EWGki41Z.js} +0 -0
  356. /package/dist/public/assets/{swift-DZwxTp-L.js → swift-BmtuXdIg.js} +0 -0
  357. /package/dist/public/assets/{textarea-tdCJViKf.js → textarea-bScbzsdX.js} +0 -0
  358. /package/dist/public/assets/{thread-draft-staging-BuvCYJwg.js → thread-draft-staging-CKJIG41d.js} +0 -0
  359. /package/dist/public/assets/{timeline-diff-store-CYckprSS.js → timeline-diff-store-BwCud4Ug.js} +0 -0
  360. /package/dist/public/assets/{toml-C5KR4pi6.js → toml-yD0H4nkp.js} +0 -0
  361. /package/dist/public/assets/{trash-2-BUuL4OCw.js → trash-2-DE3a7L75.js} +0 -0
  362. /package/dist/public/assets/{triangle-alert-Clgvyc7B.js → triangle-alert-Bcc1P5yx.js} +0 -0
  363. /package/dist/public/assets/{use-installed-clis-UlK7P1aH.js → use-installed-clis-8r2iSkgN.js} +0 -0
  364. /package/dist/public/assets/{useLintConfigViewMode-DKPENttR.js → useLintConfigViewMode-CyzSEZ5z.js} +0 -0
  365. /package/dist/public/assets/{worktree-store-LSx9q9Ga.js → worktree-store-B-NxI13K.js} +0 -0
  366. /package/dist/public/assets/{wrench-BfoTvqT9.js → wrench-4e3jxe5l.js} +0 -0
  367. /package/dist/public/assets/{x-DVkpYo5d.js → x-Du5jsNHa.js} +0 -0
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-BIQX33UG-B4CjyNhu.js";export{e as createInfoServices};
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-BO2N2NFS-DMgXoikU.js";export{e as Mermaid};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-EMLP6XTP-ACA6yW7o.js";export{e as createPacketServices};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-YOTPTUD7-DBti7bK5.js";export{e as createPieServices};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-QBLGF6JB-CprENtRb.js";export{e as createRadarServices};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-5TONJI2A-Dht2oB5p.js";export{e as createRailroadServices};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-5HE753X5-CQEApaqU.js";export{e as createRailroadAbnfServices};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-U6XO7XAA-DSdpZQB7.js";export{e as createRailroadEbnfServices};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-JG7HCLWE-gt52jYPR.js";export{e as createRailroadPegServices};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./createLucideIcon-DAkhoPjT.js";import{t as s}from"./button-Gol9BgNB.js";import{a as c,c as l,i as u,n as d,o as f,r as p,s as m,t as h}from"./dialog-TkFkuYVg.js";import{a as g,d as _,f as v,i as y,o as b,p as x,u as S}from"./dropdown-menu-xw8WTdb-.js";import{t as C}from"./label-DyipnO5I.js";import{C as w,a as T,f as E,h as D,m as O,n as k,o as A,p as j,r as M,s as N,t as P}from"./agent-visibility-CANQ951p.js";import{An as F,Bt as I,Cn as L,Dn as R,I as z,On as B,Rt as V,Sn as H,Tn as U,Vt as W,an as G,bi as K,bn as q,cn as ee,ct as te,en as ne,kn as re,kt as ie,lt as J,sn as ae,xn as oe}from"./dist-Dhbvx6Ut.js";import{t as Y}from"./RegisteredAgentIcon-DplzDEhh.js";import{a as se,d as ce,l as le,n as ue,r as de,t as fe,u as pe}from"./workspace-paths-DSoqUSNl.js";import{t as me}from"./copy-9EDFYcyR.js";import{t as he}from"./folder-open-wLd69QUc.js";import{t as ge}from"./loader-circle-Cg5SU7AZ.js";import{t as _e}from"./refresh-cw-BfeWGCsv.js";import{t as ve}from"./sliders-horizontal-34K0eDW2.js";import{t as ye}from"./trash-2-BUuL4OCw.js";import{n as X}from"./dist-BLAMau9Z.js";import{t as be}from"./input-D0ZW0Opq.js";import{t as xe}from"./dist-q14fBS3T.js";import{i as Se}from"./use-settings-route-FnSIe1ir.js";import{t as Ce}from"./parse-api-error-C_gwkKmG.js";import{c as we,l as Te}from"./documents-events-NL4RG6fU.js";import{n as Ee}from"./config-context-gd3BC-iY.js";import{t as De}from"./use-workspace-DwK7HqI3.js";import{n as Oe}from"./clipboard-adapter-Cxzkvc1d.js";import{a as ke,d as Ae,f as je,n as Me,s as Ne,t as Pe}from"./skills-api-By8un6BC.js";var Fe=o(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),Ie=o(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Le=o(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Re=o(`power-off`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Z=t(),Q=e(n(),1),$=a();function ze(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function Be(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=Ce(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function Ve(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?ze(e):Be()}var He=`ok:skill:cowork:installed`,Ue=`1`,We=250,Ge=`/api/skill/install-state`;function Ke(e){return`${He}:v${e}`}var qe=new Map;async function Je(e={},t={}){let n=t.force?`__force__`:`__default__`,r=qe.get(n);if(r)return r;let i=Ye(e,t);return qe.set(n,i),i.finally(()=>{qe.get(n)===i&&qe.delete(n)}),i}async function Ye(e,t){let n=e.installer===void 0?Ve():e.installer,r=Xe(e.storage),i=e.fetchSnapshot??Qe,a=e.serverTimeoutMs??We,o=null;if(!t.force){try{o=await $e(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=Ke(o?.currentVersion??e.fallbackSkillVersion??Ze());if(!t.force&&r?.getItem(s)===Ue)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,Ue)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function Xe(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Ze(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function Qe(){let e;try{e=await fetch(Ge,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function $e(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function et(e){return Je({},e)}function tt(){return Je({},{force:!0})}async function nt(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function rt(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return nt({target:`claude-cowork`,url:G({mode:`cowork`},e)},n);case`claude-code`:return nt({target:`claude-code`,url:G({mode:`code`},e)},n);case`codex`:return nt({target:`codex`,url:ae(e)},n);case`cursor`:return nt({target:`cursor`,url:ee(e),workspacePath:e.projectDir},n);case`copilot`:return{ok:!1,reason:`invalid-payload`,detail:`copilot is terminal-only; launch via requestTerminalLaunch`};case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};case`pi`:return{ok:!1,reason:`invalid-payload`,detail:`pi is terminal-only; launch via requestTerminalLaunch`};case`antigravity`:return{ok:!1,reason:`invalid-payload`,detail:`antigravity is terminal-only; launch via requestTerminalLaunch`};case`openclaw`:return{ok:!1,reason:`invalid-payload`,detail:`openclaw is terminal-only; launch via requestTerminalLaunch`};case`hermes`:return{ok:!1,reason:`invalid-payload`,detail:`hermes is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function it(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}var at=`open-knowledge:agent-thread-launch`;function ot(e,t=typeof window>`u`?new EventTarget:window){t.dispatchEvent(new CustomEvent(at,{detail:e}))}function st(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.agentId==`string`&&e(n)};return t.addEventListener(at,n),()=>t.removeEventListener(at,n)}function ct(e){if(!e.docName||!e.workspace)return null;let t=fe(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:ue(n,t,r)}}function lt(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function ut(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function dt(e){return j(e.installUrl).then(()=>void 0)}function ft(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function pt(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function mt(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:n}=e.workspace;if(e.docName){let r=e.docRelativePath??fe(e.docName),i={scope:`doc`,docRelativePath:r,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?i:{...i,selection:e.selection},projectDir:t,docPath:ue(t,r,n)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function ht(e){return`Opened in ${e}.`}function gt(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function _t(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function vt(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function yt(e,t,n,r){if(e.scope===`doc`){let i={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r};return e.selection===void 0?i:{...i,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}}function bt(e,t,n,r){return e.compose?ne(yt(e.compose,t,n,r)):e.selection?R({...e.selection,target:t,transport:r}):e.skill?B(e.skill.name,e.skill.scope,n):e.ask?q(e.ask.relativePath,e.ask.instruction,n,t,r):K(e.docContext===null?e.folderRelativePath?U(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?H(n,e.instruction,r):oe(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):L(e.docContext.relativePath,n,e.instruction,r))}function xt(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${te} ${bt(e,I[t].handoffTarget,!1,`terminal`)}`:re(e.docContext?.relativePath??null)}function St(e){let t=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||t?`${J} ${bt(e,`claude-code`,!1,`terminal`)}`:F(e.docContext?.relativePath??null)}function Ct(e){let t=e.docContext?.relativePath;return typeof t!=`string`||t===``?null:t.replace(/\.(md|mdx)$/,``)}function wt(e){let t=[e.compose?.instruction,e.selection?.instruction,e.ask?.instruction,e.createDescription,e.instruction];for(let e of t)if(typeof e==`string`&&e.trim()!==``)return e;return null}function Tt(e,t){ot({agentSource:t?.agent?.source??`registry`,agentId:t?.agent?.id??``,prompt:St(e),docName:Ct(e),titleHint:wt(e)})}async function Et(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`OpenKnowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:bt(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=vt(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(ht(u));else{let i=_t(r),a=gt(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{Et(e,t,n,r+1)}}})}return a}function Dt(e){return O.find(t=>t.id===e)?.displayName??e}function Ot(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function kt(){return{dispatchHandoff:rt,recordHandoff:it,toast:{success:e=>{X.success(e)},error:(e,t)=>{X.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>Ot(),getDisplayName:Dt,ensureCoworkSkillInstalled:et,autoOpen:!0}}function At(){let e=(0,$.c)(2),{merged:t}=Ee(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>Et(e,t,{...kt(),autoOpen:n}),reinstallCoworkSkill:tt},e[0]=n,e[1]=r),r}var jt=[...new Set(O.flatMap(e=>e.schemes))];function Mt(e,t){let n=t.now?.()??Date.now(),r={};for(let t of O){let i=t.schemes[0],a=i===void 0?void 0:e[i];if(!a){r[t.id]={installed:null};continue}r[t.id]={installed:a.installed,...a.displayName===void 0?{}:{displayName:a.displayName},lastChecked:n}}return r}function Nt(e){return Mt({},e)}async function Pt(e){let t=e.schemes??jt,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var Ft=Object.fromEntries(jt.map(e=>[e,{installed:!1}]));async function It(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return Ft}if(!t.ok)return Ft;let n;try{n=await t.json()}catch{return Ft}if(typeof n!=`object`||!n||Array.isArray(n))return Ft;let r=n,i={};for(let e of jt)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function Lt(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function Rt(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=Nt({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=Mt(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!Lt(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function zt(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function Bt(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>Pt({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>It({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function Vt(){let e=(0,$.c)(5),[t,n]=(0,Q.useState)(Ht),r=(0,Q.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=Rt(Bt());r.current=e;let t=e.subscribe(n);e.probe();let i=()=>{e.probe()};return window.addEventListener(`focus`,i),()=>{window.removeEventListener(`focus`,i),t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,Q.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function Ht(){return Nt({isElectronHost:zt(),now:Date.now})}var Ut=(0,Q.createContext)(null);function Wt(e){let t=(0,$.c)(3),{value:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,Z.jsx)(Ut,{value:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function Gt(){return(0,Q.use)(Ut)}function Kt(e){let t=(0,$.c)(48),{itemName:n,isSubmitting:a,onDelete:o,customTitle:h,customDescription:g,customDetail:_,customConfirmLabel:v,customConfirmLabelBusy:y,children:b}=e,{_:x}=i(),S;t[0]!==x||t[1]!==n?(S=n??x({id:`L3CEC1`}),t[0]=x,t[1]=n,t[2]=S):S=t[2];let C=S,w;t[3]!==x||t[4]!==v?(w=v??x({id:`cnGeoo`}),t[3]=x,t[4]=v,t[5]=w):w=t[5];let T=w,E;t[6]!==x||t[7]!==v||t[8]!==y?(E=y??v??x({id:`s3caR3`}),t[6]=x,t[7]=v,t[8]=y,t[9]=E):E=t[9];let D=E,O;t[10]!==x||t[11]!==h||t[12]!==C?(O=h??x({id:`77SdEP`,values:{itemName:C}}),t[10]=x,t[11]=h,t[12]=C,t[13]=O):O=t[13];let k;t[14]===O?k=t[15]:(k=(0,Z.jsx)(l,{children:O}),t[14]=O,t[15]=k);let A;t[16]!==x||t[17]!==g||t[18]!==C?(A=g??x({id:`16D5Zj`,values:{itemName:C}}),t[16]=x,t[17]=g,t[18]=C,t[19]=A):A=t[19];let j;t[20]===A?j=t[21]:(j=(0,Z.jsx)(c,{className:`whitespace-pre-wrap`,children:A}),t[20]=A,t[21]=j);let M;t[22]===_?M=t[23]:(M=_?(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`delete-confirmation-detail`,children:_}):null,t[22]=_,t[23]=M);let N;t[24]!==k||t[25]!==j||t[26]!==M?(N=(0,Z.jsxs)(m,{children:[k,j,M]}),t[24]=k,t[25]=j,t[26]=M,t[27]=N):N=t[27];let P;t[28]===b?P=t[29]:(P=b?(0,Z.jsx)(d,{children:b}):null,t[28]=b,t[29]=P);let F;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Z.jsx)(r,{id:`dEgA5A`}),t[30]=F):F=t[30];let I;t[31]===a?I=t[32]:(I=(0,Z.jsx)(p,{asChild:!0,children:(0,Z.jsx)(s,{variant:`outline`,disabled:a,children:F})}),t[31]=a,t[32]=I);let L;t[33]!==T||t[34]!==D||t[35]!==a?(L=a?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ge,{className:`size-4 animate-spin`}),` `,D]}):T,t[33]=T,t[34]=D,t[35]=a,t[36]=L):L=t[36];let R;t[37]!==a||t[38]!==o||t[39]!==L?(R=(0,Z.jsx)(s,{variant:`destructive`,onClick:o,disabled:a,children:L}),t[37]=a,t[38]=o,t[39]=L,t[40]=R):R=t[40];let z;t[41]!==I||t[42]!==R?(z=(0,Z.jsxs)(f,{children:[I,R]}),t[41]=I,t[42]=R,t[43]=z):z=t[43];let B;return t[44]!==P||t[45]!==z||t[46]!==N?(B=(0,Z.jsxs)(u,{children:[N,P,z]}),t[44]=P,t[45]=z,t[46]=N,t[47]=B):B=t[47],B}function qt(e){return e?xe._({id:`wTcjov`}):null}function Jt(e){let t=(0,$.c)(47),{_:n}=i(),a=de(),o=Gt(),s=w(),c=E();if(a)return null;let{input:l,installStates:u,dispatch:d,onBeforeLaunch:f}=e,p=l===null,m,h,C,O,j,F,L,R,z,B,V;if(t[0]!==n||t[1]!==d||t[2]!==l||t[3]!==p||t[4]!==u||t[5]!==f||t[6]!==c||t[7]!==s||t[8]!==o){let e=qt(p),i;t[20]===c?i=t[21]:(i=e=>P(c,e.id),t[20]=c,t[21]=i);let a=D.filter(i),w;t[22]===c?w=t[23]:(w=e=>k(c,e.source,e.id,!0,e.supported),t[22]=c,t[23]=w);let E=s.filter(w),H=o?W.filter(e=>M(c,e,o.installedClis)):[];C=a.length>0,O=o!==null&&H.length>0,j=E.length>0,h=_,t[24]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Z.jsxs)(x,{children:[(0,Z.jsx)(le,{"aria-hidden":`true`}),(0,Z.jsx)(r,{id:`O7_W_a`})]}),t[24]=V):V=t[24],m=v,F=`max-h-80`,L=j?(0,Z.jsxs)(y,{"aria-label":n({id:`vPKX2i`}),children:[(0,Z.jsxs)(b,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(r,{id:`RXEbZy`}),(0,Z.jsx)(N,{})]}),E.map(t=>{let i=t.name;return(0,Z.jsxs)(g,{onSelect:()=>{l!==null&&(f?.(),Tt(l,{agent:{source:t.source,id:t.id}}))},disabled:p,"data-testid":`file-tree-open-in-thread-${t.id}`,"aria-label":e?n({id:`gtGQ9S`,values:{agentName:i,hint:e}}):void 0,children:[(0,Z.jsx)(Y,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(r,{id:`5PrrYw`,values:{agentName:i}})}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[25]!==C||t[26]!==O||t[27]!==j?(R=j&&(O||C)?(0,Z.jsx)(S,{}):null,t[25]=C,t[26]=O,t[27]=j,t[28]=R):R=t[28],z=O?(0,Z.jsxs)(y,{"aria-label":n({id:`ALhMYW`}),children:[(0,Z.jsx)(b,{children:(0,Z.jsx)(r,{id:`ALhMYW`})}),H.map(t=>{let{displayName:r}=I[t];return(0,Z.jsxs)(g,{onSelect:()=>{l!==null&&(f?.(),o.launchInTerminal(l,t))},disabled:p,"data-testid":`file-tree-open-in-terminal-${t}`,"aria-label":n(e?{id:`AIn2Yv`,values:{displayName:r,hint:e}}:{id:`QYfQdv`,values:{displayName:r}}),children:[(0,Z.jsx)(A,{id:T(t),"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:r}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,B=C?(0,Z.jsxs)(Z.Fragment,{children:[O?(0,Z.jsx)(S,{}):null,(0,Z.jsxs)(y,{"aria-label":n({id:`BBqGS9`}),children:[(0,Z.jsx)(b,{children:(0,Z.jsx)(r,{id:`BBqGS9`})}),a.map(t=>{let r=!p,{displayName:i}=t,a=n(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Z.jsxs)(g,{disabled:!r,onSelect:()=>{if(l){if(f?.(),u[t.id]?.installed!==!0){dt(t);return}d(t.id,l)}},"data-testid":`file-tree-open-in-${t.id}`,"aria-label":a,children:[(0,Z.jsx)(A,{id:t.id,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=n,t[1]=d,t[2]=l,t[3]=p,t[4]=u,t[5]=f,t[6]=c,t[7]=s,t[8]=o,t[9]=m,t[10]=h,t[11]=C,t[12]=O,t[13]=j,t[14]=F,t[15]=L,t[16]=R,t[17]=z,t[18]=B,t[19]=V}else m=t[9],h=t[10],C=t[11],O=t[12],j=t[13],F=t[14],L=t[15],R=t[16],z=t[17],B=t[18],V=t[19];let H;t[29]!==C||t[30]!==O||t[31]!==j?(H=j||O||C?(0,Z.jsx)(S,{}):null,t[29]=C,t[30]=O,t[31]=j,t[32]=H):H=t[32];let U;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(ve,{"aria-hidden":`true`}),t[33]=U):U=t[33];let G;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Z.jsxs)(g,{onSelect:Se,"data-testid":`file-tree-open-in-settings`,children:[U,(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(r,{id:`jRAGrQ`})})]}),t[34]=G):G=t[34];let K;t[35]!==m||t[36]!==F||t[37]!==L||t[38]!==R||t[39]!==z||t[40]!==B||t[41]!==H?(K=(0,Z.jsxs)(m,{className:F,children:[L,R,z,B,H,G]}),t[35]=m,t[36]=F,t[37]=L,t[38]=R,t[39]=z,t[40]=B,t[41]=H,t[42]=K):K=t[42];let q;return t[43]!==h||t[44]!==V||t[45]!==K?(q=(0,Z.jsxs)(h,{children:[V,K]}),t[43]=h,t[44]=V,t[45]=K,t[46]=q):q=t[46],q}function Yt(e){let t=(0,$.c)(8),n=e?.enabled??!0,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={status:`idle`},t[0]=r):r=t[0];let[i,a]=(0,Q.useState)(r),[o,s]=(0,Q.useState)(0),c,l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=()=>s($t),t=Te(e),n=we(t=>{t.includes(`files`)&&e()});return()=>{t(),n()}},l=[],t[1]=c,t[2]=l):(c=t[1],l=t[2]),(0,Q.useEffect)(c,l);let u;t[3]===n?u=t[4]:(u=()=>{if(!n)return;let e=!1;return a(Qt),fetch(`/api/skills`).then(Xt).then(t=>{if(e)return;let n=V.safeParse(t);if(!n.success){console.error(`[ok-skills] /api/skills response failed schema validation:`,n.error.issues),a({status:`error`,message:`Server returned an incomplete skills response.`});return}a({status:`ready`,data:n.data.skills})}).catch(t=>{e||a({status:`error`,message:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},t[3]=n,t[4]=u);let d;return t[5]!==n||t[6]!==o?(d=[o,n],t[5]=n,t[6]=o,t[7]=d):d=t[7],(0,Q.useEffect)(u,d),i}async function Xt(e){if(!e.ok){let t=await e.json().catch(Zt);throw Error(Ce(t)??`HTTP ${e.status}`)}return e.json()}function Zt(){return null}function Qt(e){return e.status===`ready`?e:{status:`loading`}}function $t(e){return e+1}function en(e){let t=(0,$.c)(16),{skill:n,onOpenChange:r,onDeleted:a}=e,{_:o}=i(),[s,c]=(0,Q.useState)(!1),l;t[0]!==o||t[1]!==a||t[2]!==r?(l=async function(e){c(!0);let t=await Pe(e.scope,e.name);if(c(!1),!t.ok){let{error:e}=t;X.error(o({id:`AtBdnD`,values:{error:e}}));return}X.success(o({id:`h9QFb9`,values:{0:e.name}})),a(),r(!1)},t[0]=o,t[1]=a,t[2]=r,t[3]=l):l=t[3];let u=l,d=n!==null,f;t[4]!==s||t[5]!==r?(f=e=>{!e&&!s&&r(!1)},t[4]=s,t[5]=r,t[6]=f):f=t[6];let p;t[7]!==o||t[8]!==s||t[9]!==u||t[10]!==n?(p=n?(0,Z.jsx)(Kt,{itemName:o({id:`ExUzM4`,values:{0:n.name}}),isSubmitting:s,onDelete:()=>u(n),customDescription:o({id:`E1Da_b`,values:{0:n.path}})}):null,t[7]=o,t[8]=s,t[9]=u,t[10]=n,t[11]=p):p=t[11];let m;return t[12]!==d||t[13]!==f||t[14]!==p?(m=(0,Z.jsx)(h,{open:d,onOpenChange:f,children:p}),t[12]=d,t[13]=f,t[14]=p,t[15]=m):m=t[15],m}function tn(e){let t=(0,$.c)(68),{skill:n,existingNames:a,onOpenChange:o,onRenamed:d}=e,{_:p}=i(),g=n!==null,_=(0,Q.useId)(),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(!1),S;t[0]===n?S=t[1]:(S=()=>{n&&y(n.name)},t[0]=n,t[1]=S);let w=n?.scope,T=n?.name,E;if(t[2]!==w||t[3]!==T?(E=[w,T],t[2]=w,t[3]=T,t[4]=E):E=t[4],(0,Q.useEffect)(S,E),!n)return null;let D,O,k,A;t[5]!==a||t[6]!==v||t[7]!==n.name?(k=v.trim(),A=k===n.name,D=k===``||!ie.test(k),O=!D&&!A&&a.has(k),t[5]=a,t[6]=v,t[7]=n.name,t[8]=D,t[9]=O,t[10]=k,t[11]=A):(D=t[8],O=t[9],k=t[10],A=t[11]);let j=O,M=!D&&!j&&!A&&!b,N;t[12]!==p||t[13]!==M||t[14]!==o||t[15]!==d||t[16]!==n||t[17]!==k?(N=async function(){if(!n||!M)return;x(!0);let e=await Ne({scope:n.scope,fromName:n.name,toName:k});if(x(!1),!e.ok){X.error(p({id:`zKxoPm`,values:{0:n.name,1:e.error}}));return}X.success(p({id:`dUCQo4`,values:{trimmed:k}})),d?.(k),o(!1)},t[12]=p,t[13]=M,t[14]=o,t[15]=d,t[16]=n,t[17]=k,t[18]=N):N=t[18];let P=N,F;t[19]===o?F=t[20]:(F=e=>e?null:o(!1),t[19]=o,t[20]=F);let I;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Z.jsx)(l,{children:(0,Z.jsx)(r,{id:`dw_3cv`})}),t[21]=I):I=t[21];let L;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsxs)(m,{children:[I,(0,Z.jsx)(c,{children:(0,Z.jsx)(r,{id:`R9IDFz`})})]}),t[22]=L):L=t[22];let R;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Z.jsx)(r,{id:`6YtxFj`}),t[23]=R):R=t[23];let z;t[24]===_?z=t[25]:(z=(0,Z.jsx)(C,{htmlFor:_,children:R}),t[24]=_,t[25]=z);let B;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>y(e.target.value),t[26]=B):B=t[26];let V;t[27]===P?V=t[28]:(V=e=>{e.key===`Enter`&&P()},t[27]=P,t[28]=V);let H=D||j,U=D&&k!==``||j?`${_}-error`:void 0,W;t[29]!==_||t[30]!==v||t[31]!==V||t[32]!==H||t[33]!==U?(W=(0,Z.jsx)(be,{id:_,value:v,onChange:B,onKeyDown:V,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,"aria-invalid":H,"aria-describedby":U,className:`font-mono`}),t[29]=_,t[30]=v,t[31]=V,t[32]=H,t[33]=U,t[34]=W):W=t[34];let G;t[35]!==j||t[36]!==_||t[37]!==D||t[38]!==k?(G=D&&k!==``?(0,Z.jsx)(`p`,{id:`${_}-error`,className:`text-xs text-destructive`,children:(0,Z.jsx)(r,{id:`A50vr3`,components:{0:(0,Z.jsx)(`code`,{className:`font-mono`})}})}):j?(0,Z.jsx)(`p`,{id:`${_}-error`,className:`text-xs text-destructive`,children:(0,Z.jsx)(r,{id:`YJ1BTp`})}):null,t[35]=j,t[36]=_,t[37]=D,t[38]=k,t[39]=G):G=t[39];let K;t[40]!==z||t[41]!==W||t[42]!==G?(K=(0,Z.jsxs)(`div`,{className:`space-y-1.5`,children:[z,W,G]}),t[40]=z,t[41]=W,t[42]=G,t[43]=K):K=t[43];let q;t[44]===o?q=t[45]:(q=()=>o(!1),t[44]=o,t[45]=q);let ee;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,Z.jsx)(r,{id:`dEgA5A`}),t[46]=ee):ee=t[46];let te;t[47]!==b||t[48]!==q?(te=(0,Z.jsx)(s,{variant:`ghost`,onClick:q,disabled:b,children:ee}),t[47]=b,t[48]=q,t[49]=te):te=t[49];let ne;t[50]===P?ne=t[51]:(ne=()=>void P(),t[50]=P,t[51]=ne);let re=!M,J;t[52]===b?J=t[53]:(J=b?(0,Z.jsx)(r,{id:`tHKQ6j`}):(0,Z.jsx)(r,{id:`2wxgft`}),t[52]=b,t[53]=J);let ae;t[54]!==ne||t[55]!==re||t[56]!==J?(ae=(0,Z.jsx)(s,{onClick:ne,disabled:re,children:J}),t[54]=ne,t[55]=re,t[56]=J,t[57]=ae):ae=t[57];let oe;t[58]!==te||t[59]!==ae?(oe=(0,Z.jsxs)(f,{children:[te,ae]}),t[58]=te,t[59]=ae,t[60]=oe):oe=t[60];let Y;t[61]!==K||t[62]!==oe?(Y=(0,Z.jsxs)(u,{children:[L,K,oe]}),t[61]=K,t[62]=oe,t[63]=Y):Y=t[63];let se;return t[64]!==g||t[65]!==Y||t[66]!==F?(se=(0,Z.jsx)(h,{open:g,onOpenChange:F,children:Y}),t[64]=g,t[65]=Y,t[66]=F,t[67]=se):se=t[67],se}function nn(e){let t=(0,$.c)(15),{skill:n,onOpenChange:a,onUpdated:o}=e,{_:g}=i(),[_,v]=(0,Q.useState)(!1),y;t[0]!==g||t[1]!==a||t[2]!==o?(y=async function(e){v(!0);let t=await je({scope:e.scope,name:e.name});v(!1);let n=se(e.name);if(!t.ok){X.error(g({id:`FRqZ9v`,values:{0:t.error}}));return}X.success(t.checkpointRef?g({id:`My9uXI`,values:{0:t.version,display:n}}):g({id:`mPneVR`,values:{0:t.version,display:n}})),o(),a(!1)},t[0]=g,t[1]=a,t[2]=o,t[3]=y):y=t[3];let b=y,x=n!==null,S;t[4]!==a||t[5]!==_?(S=e=>{!e&&!_&&a(!1)},t[4]=a,t[5]=_,t[6]=S):S=t[6];let C;t[7]!==b||t[8]!==n||t[9]!==_?(C=n?(0,Z.jsxs)(u,{className:`sm:max-w-lg`,children:[(0,Z.jsxs)(m,{children:[(0,Z.jsx)(l,{children:(0,Z.jsx)(r,{id:`iAoh55`,values:{0:se(n.name)}})}),(0,Z.jsx)(c,{children:n.installedVersion?(0,Z.jsx)(r,{id:`47EXvY`,values:{0:n.bundledVersion??``,1:n.installedVersion}}):(0,Z.jsx)(r,{id:`nD7Fx9`,values:{0:n.bundledVersion??``}})})]}),(0,Z.jsx)(d,{}),(0,Z.jsxs)(f,{children:[(0,Z.jsx)(p,{asChild:!0,children:(0,Z.jsx)(s,{variant:`outline`,disabled:_,children:(0,Z.jsx)(r,{id:`dEgA5A`})})}),(0,Z.jsx)(s,{onClick:()=>void b(n),disabled:_,children:_?(0,Z.jsx)(r,{id:`JL3si7`}):(0,Z.jsx)(r,{id:`EkH9pt`})})]})]}):null,t[7]=b,t[8]=n,t[9]=_,t[10]=C):C=t[10];let w;return t[11]!==x||t[12]!==S||t[13]!==C?(w=(0,Z.jsx)(h,{open:x,onOpenChange:S,children:C}),t[11]=x,t[12]=S,t[13]=C,t[14]=w):w=t[14],w}function rn(){let e=(0,$.c)(30),{_:t}=i(),[n,r]=(0,Q.useState)(null),[a,o]=(0,Q.useState)(null),[s,c]=(0,Q.useState)(null),[l,u]=(0,Q.useState)(null),d;e[0]===t?d=e[1]:(d=async function(e,n){u(e.name);let r=await ke({scope:e.scope,name:e.name,...n?{targets:[...n]}:{}});if(u(null),!r.ok)return X.error(t({id:`Mj8R8K`,values:{0:r.error}})),r;let i=an,a=new Set(r.hosts),o=r.hosts.filter(t=>!e.hosts.includes(t)),s=e.hosts.filter(e=>!a.has(e)),c=e=>{let t=r.warningCodes.indexOf(e);return t>=0?r.warnings[t]:void 0},l=c(`no-targets`);if(l)return X.warning(l),r;if(o.length>0){let e=c(`scripts-present`);e&&X.warning(e)}return r.hosts.length===0?X.success(t({id:`0LBDjY`,values:{0:e.name}})):o.length>0&&s.length===0?X.success(t({id:`PPFQ3o`,values:{0:e.name,1:i(o)}})):s.length>0&&o.length===0?X.success(t({id:`OOIVJo`,values:{0:e.name,1:i(s)}})):o.length>0&&s.length>0?X.success(t({id:`OxplNM`,values:{0:e.name,1:i(o),2:i(s)}})):X.success(t({id:`wDgmsr`,values:{0:e.name,1:i(r.hosts)}})),r},e[0]=t,e[1]=d);let f=d,p;e[2]===t?p=e[3]:(p=async function(e){u(e.name);let n=await Ae({scope:e.scope,name:e.name});return u(null),n.ok?X.success(t({id:`0LBDjY`,values:{0:e.name}})):X.error(t({id:`nJq7et`,values:{0:n.error}})),n},e[2]=t,e[3]=p);let m=p,h;e[4]===t?h=e[5]:(h=async function(e,n){let r=await Me({scope:e.scope,name:e.name,existingNames:n});if(!r.ok){X.error(t({id:`UPjaXD`,values:{0:e.name,1:r.error}}));return}X.success(t({id:`0g7rCZ`,values:{0:r.name}}))},e[4]=t,e[5]=h);let g=h,_,v;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{e||r(null)},v=()=>r(null),e[6]=_,e[7]=v):(_=e[6],v=e[7]);let y;e[8]===n?y=e[9]:(y=(0,Z.jsx)(en,{skill:n,onOpenChange:_,onDeleted:v}),e[8]=n,e[9]=y);let b=a?.skill??null,x=a?.existingNames??sn,S,C;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{e||o(null)},C=()=>o(null),e[10]=S,e[11]=C):(S=e[10],C=e[11]);let w;e[12]!==b||e[13]!==x?(w=(0,Z.jsx)(tn,{skill:b,existingNames:x,onOpenChange:S,onRenamed:C}),e[12]=b,e[13]=x,e[14]=w):w=e[14];let T,E;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>{e||c(null)},E=()=>c(null),e[15]=T,e[16]=E):(T=e[15],E=e[16]);let D;e[17]===s?D=e[18]:(D=(0,Z.jsx)(nn,{skill:s,onOpenChange:T,onUpdated:E}),e[17]=s,e[18]=D);let O;e[19]!==w||e[20]!==D||e[21]!==y?(O=(0,Z.jsxs)(Z.Fragment,{children:[y,w,D]}),e[19]=w,e[20]=D,e[21]=y,e[22]=O):O=e[22];let k=O,A;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(A=(e,t)=>o({skill:e,existingNames:t}),e[23]=A):A=e[23];let j;return e[24]!==k||e[25]!==g||e[26]!==f||e[27]!==l||e[28]!==m?(j={installingName:l,install:f,uninstall:m,duplicate:g,requestDelete:r,requestRename:A,requestUpdate:c,dialogs:k},e[24]=k,e[25]=g,e[26]=f,e[27]=l,e[28]=m,e[29]=j):j=e[29],j}function an(e){return e.map(on).join(`, `)}function on(e){return z[e]??e}var sn=new Set;function cn(e){let t=(0,$.c)(19),{skill:n,onEdit:i,onInstall:a,onUninstall:o,onDelete:s}=e,c,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(pe,{"aria-hidden":!0}),l=(0,Z.jsx)(r,{id:`ePK91l`}),t[0]=c,t[1]=l):(c=t[0],l=t[1]);let u;t[2]===i?u=t[3]:(u=(0,Z.jsxs)(g,{onSelect:i,children:[c,l]}),t[2]=i,t[3]=u);let d;t[4]!==a||t[5]!==n.installed?(d=a&&!n.installed?(0,Z.jsxs)(g,{onSelect:a,children:[(0,Z.jsx)(Fe,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`TKQ7K-`})]}):null,t[4]=a,t[5]=n.installed,t[6]=d):d=t[6];let f;t[7]!==o||t[8]!==n.installed?(f=n.installed?(0,Z.jsxs)(g,{onSelect:o,children:[(0,Z.jsx)(Re,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`fo0VXg`})]}):null,t[7]=o,t[8]=n.installed,t[9]=f):f=t[9];let p,m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(ye,{"aria-hidden":!0}),m=(0,Z.jsx)(r,{id:`cnGeoo`}),t[10]=p,t[11]=m):(p=t[10],m=t[11]);let h;t[12]===s?h=t[13]:(h=(0,Z.jsxs)(g,{variant:`destructive`,onSelect:s,children:[p,m]}),t[12]=s,t[13]=h);let _;return t[14]!==u||t[15]!==d||t[16]!==f||t[17]!==h?(_=(0,Z.jsxs)(Z.Fragment,{children:[u,d,f,h]}),t[14]=u,t[15]=d,t[16]=f,t[17]=h,t[18]=_):_=t[18],_}function ln(e){let t=(0,$.c)(94),{skill:n,actions:a,existingNames:o}=e,{_:s}=i(),c=De(),l=Vt().states,{dispatch:u}=At(),d=typeof window<`u`?window.okDesktop:void 0,f=n.absolutePath,p;t[0]===s?p=t[1]:(p=async function(e){try{await Oe(e),X.success(s({id:`SXCSQd`}))}catch{X.error(s({id:`cRHuuI`}))}},t[0]=s,t[1]=p);let m=p;if(n.managed){let e,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(b,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[(0,Z.jsx)(Ie,{className:`size-3`,"aria-hidden":!0}),(0,Z.jsx)(r,{id:`VITWk5`})]}),i=(0,Z.jsx)(S,{}),t[2]=e,t[3]=i):(e=t[2],i=t[3]);let a;t[4]===f?a=t[5]:(a=d&&f?(0,Z.jsxs)(g,{onSelect:()=>void d.shell.showItemInFolder(f),children:[(0,Z.jsx)(he,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`LtSYdi`})]}):null,t[4]=f,t[5]=a);let o;t[6]!==n.name||t[7]!==n.scope||t[8]!==c?(o=pt({skillName:n.name,scope:n.scope,workspace:c}),t[6]=n.name,t[7]=n.scope,t[8]=c,t[9]=o):o=t[9];let s;t[10]!==u||t[11]!==l||t[12]!==o?(s=(0,Z.jsx)(Jt,{input:o,installStates:l,isElectronHost:d!=null,dispatch:u}),t[10]=u,t[11]=l,t[12]=o,t[13]=s):s=t[13];let p;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsxs)(x,{children:[(0,Z.jsx)(me,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`zd00pH`})]}),t[14]=p):p=t[14];let h;t[15]!==f||t[16]!==m?(h=f?(0,Z.jsx)(g,{onSelect:()=>void m(f),children:(0,Z.jsx)(r,{id:`z2funE`})}):null,t[15]=f,t[16]=m,t[17]=h):h=t[17];let y;t[18]!==m||t[19]!==n.path?(y=()=>void m(n.path),t[18]=m,t[19]=n.path,t[20]=y):y=t[20];let C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(r,{id:`xloBjn`}),t[21]=C):C=t[21];let w;t[22]===y?w=t[23]:(w=(0,Z.jsx)(g,{onSelect:y,children:C}),t[22]=y,t[23]=w);let T;t[24]!==w||t[25]!==h?(T=(0,Z.jsxs)(_,{children:[p,(0,Z.jsxs)(v,{children:[h,w]})]}),t[24]=w,t[25]=h,t[26]=T):T=t[26];let E;return t[27]!==T||t[28]!==a||t[29]!==s?(E=(0,Z.jsxs)(Z.Fragment,{children:[e,i,a,s,T]}),t[27]=T,t[28]=a,t[29]=s,t[30]=E):E=t[30],E}let h;t[31]===f?h=t[32]:(h=d&&f?(0,Z.jsxs)(g,{onSelect:()=>void d.shell.showItemInFolder(f),children:[(0,Z.jsx)(he,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`LtSYdi`})]}):null,t[31]=f,t[32]=h);let y;t[33]!==n.name||t[34]!==n.scope||t[35]!==c?(y=pt({skillName:n.name,scope:n.scope,workspace:c}),t[33]=n.name,t[34]=n.scope,t[35]=c,t[36]=y):y=t[36];let C;t[37]!==u||t[38]!==l||t[39]!==y?(C=(0,Z.jsx)(Jt,{input:y,installStates:l,isElectronHost:d!=null,dispatch:u}),t[37]=u,t[38]=l,t[39]=y,t[40]=C):C=t[40];let w;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsxs)(x,{children:[(0,Z.jsx)(me,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`zd00pH`})]}),t[41]=w):w=t[41];let T;t[42]!==f||t[43]!==m?(T=f?(0,Z.jsx)(g,{onSelect:()=>void m(f),children:(0,Z.jsx)(r,{id:`z2funE`})}):null,t[42]=f,t[43]=m,t[44]=T):T=t[44];let E;t[45]!==m||t[46]!==n.path?(E=()=>void m(n.path),t[45]=m,t[46]=n.path,t[47]=E):E=t[47];let D;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Z.jsx)(r,{id:`xloBjn`}),t[48]=D):D=t[48];let O;t[49]===E?O=t[50]:(O=(0,Z.jsx)(g,{onSelect:E,children:D}),t[49]=E,t[50]=O);let k;t[51]!==T||t[52]!==O?(k=(0,Z.jsxs)(_,{children:[w,(0,Z.jsxs)(v,{children:[T,O]})]}),t[51]=T,t[52]=O,t[53]=k):k=t[53];let A;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Z.jsx)(S,{}),t[54]=A):A=t[54];let j;t[55]!==a||t[56]!==o||t[57]!==n?(j=()=>void a.duplicate(n,o),t[55]=a,t[56]=o,t[57]=n,t[58]=j):j=t[58];let M,N;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Z.jsx)(ce,{"aria-hidden":!0}),N=(0,Z.jsx)(r,{id:`euc6Ns`}),t[59]=M,t[60]=N):(M=t[59],N=t[60]);let P;t[61]===j?P=t[62]:(P=(0,Z.jsxs)(g,{onSelect:j,children:[M,N]}),t[61]=j,t[62]=P);let F;t[63]!==a||t[64]!==o||t[65]!==n?(F=()=>a.requestRename(n,o),t[63]=a,t[64]=o,t[65]=n,t[66]=F):F=t[66];let I,L;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Z.jsx)(Le,{"aria-hidden":!0}),L=(0,Z.jsx)(r,{id:`2wxgft`}),t[67]=I,t[68]=L):(I=t[67],L=t[68]);let R;t[69]===F?R=t[70]:(R=(0,Z.jsxs)(g,{onSelect:F,children:[I,L]}),t[69]=F,t[70]=R);let z;t[71]!==a||t[72]!==n?(z=n.updateAvailable?(0,Z.jsxs)(g,{onSelect:()=>a.requestUpdate(n),children:[(0,Z.jsx)(_e,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`6g2jsp`})]}):null,t[71]=a,t[72]=n,t[73]=z):z=t[73];let B;t[74]!==a||t[75]!==n?(B=n.installed?(0,Z.jsxs)(g,{onSelect:()=>void a.uninstall(n),children:[(0,Z.jsx)(Re,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`fo0VXg`})]}):(0,Z.jsxs)(g,{onSelect:()=>void a.install(n),children:[(0,Z.jsx)(Fe,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`TKQ7K-`})]}),t[74]=a,t[75]=n,t[76]=B):B=t[76];let V;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Z.jsx)(S,{}),t[77]=V):V=t[77];let H;t[78]!==a||t[79]!==n?(H=()=>a.requestDelete(n),t[78]=a,t[79]=n,t[80]=H):H=t[80];let U,W;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(ye,{"aria-hidden":!0}),W=(0,Z.jsx)(r,{id:`cnGeoo`}),t[81]=U,t[82]=W):(U=t[81],W=t[82]);let G;t[83]===H?G=t[84]:(G=(0,Z.jsxs)(g,{variant:`destructive`,onSelect:H,children:[U,W]}),t[83]=H,t[84]=G);let K;return t[85]!==k||t[86]!==P||t[87]!==R||t[88]!==h||t[89]!==z||t[90]!==B||t[91]!==G||t[92]!==C?(K=(0,Z.jsxs)(Z.Fragment,{children:[h,C,k,A,P,R,z,B,V,G]}),t[85]=k,t[86]=P,t[87]=R,t[88]=h,t[89]=z,t[90]=B,t[91]=G,t[92]=C,t[93]=K):K=t[93],K}export{Fe as C,Ie as S,Dt as _,Jt as a,At as b,Gt as c,ut as d,ft as f,xt as g,pt as h,Yt as i,Vt as l,lt as m,ln as n,Kt as o,ct as p,rn as r,Wt as s,cn as t,mt as u,dt as v,st as x,Tt as y};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-BAUBUeAF.js";import"./src--OxBHrEw.js";import"./chunk-WYO6CB5R-9yPqK9ib.js";import"./chunk-ICXQ74PX-CDyWyZCQ.js";import"./chunk-HOUHSVGY-DTcG17JD.js";import"./chunk-Q4XR5HBZ-B32WTAPs.js";import"./chunk-7BUUIJ7U-B7ItXXvn.js";import"./chunk-OGEWGWER-BgCGYbch.js";import"./chunk-32BRIVSS-J_rdnOiy.js";import"./chunk-XXDRQBXY-Dpdm1nrz.js";import"./chunk-VR4S4FIN-CcTJJ1HA.js";import"./chunk-C7G6YPKG-Bhzd4FsL.js";import"./chunk-ZGVPDNZ5-5ruaVNfo.js";import"./chunk-52WLFC77-BOMCKXNP.js";import"./chunk-FWX5IMBZ-1CESfm5O.js";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-BIvLDOrf.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1,8 +0,0 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-BAUBUeAF.js";import"./src--OxBHrEw.js";import"./chunk-WYO6CB5R-9yPqK9ib.js";import"./chunk-ICXQ74PX-CDyWyZCQ.js";import"./chunk-HOUHSVGY-DTcG17JD.js";import"./chunk-Q4XR5HBZ-B32WTAPs.js";import"./chunk-7BUUIJ7U-B7ItXXvn.js";import"./chunk-OGEWGWER-BgCGYbch.js";import"./chunk-32BRIVSS-J_rdnOiy.js";import"./chunk-XXDRQBXY-Dpdm1nrz.js";import"./chunk-VR4S4FIN-CcTJJ1HA.js";import"./chunk-C7G6YPKG-Bhzd4FsL.js";import"./chunk-ZGVPDNZ5-5ruaVNfo.js";import"./chunk-52WLFC77-BOMCKXNP.js";import"./chunk-FWX5IMBZ-1CESfm5O.js";import"./chunk-ZIRB5QZD-DmY1977n.js";import{r as t,t as n}from"./chunk-PUDLZKDR-BtLyPGmD.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)}
2
- .swimlane.cluster rect {
3
- stroke: ${e.clusterBorder} !important;
4
- }
5
- [data-look="neo"].cluster rect {
6
- filter: none;
7
- }
8
- `,`getStyles`)});export{r as diagram};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{s as i,t as a}from"./createLucideIcon-DAkhoPjT.js";import{r as o}from"./button-Gol9BgNB.js";import{h as s,r as c,t as l}from"./agent-visibility-CANQ951p.js";import{Vt as u}from"./dist-Dhbvx6Ut.js";import{t as d}from"./input-D0ZW0Opq.js";import{c as f,d as p,m as ee}from"./sortable.esm-C565D25d.js";import"./textarea-tdCJViKf.js";var m=a(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),h=a(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),g=a(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),_=e(n(),1),v={},y=new Set;function b(){return v}function te(e){v={...v,...e};for(let e of y)e()}function ne(e){return y.add(e),()=>{y.delete(e)}}function x(){return(0,_.useSyncExternalStore)(ne,b,b)}var S=`ok-ask-ai-agent-v2`,C=`ok-ask-ai-default-agent-v1`,w=`ok-preferred-agent-v1`,T=`terminal-cli`;function E(e){return`${T}:${e}`}var D=`in-app-thread`;function O(e){return`${D}:${e.source}:${e.id}`}function k(e){if(e===null)return null;if(e===`in-app-thread`)return{kind:`default`};let t=`${D}:`;if(!e.startsWith(t))return null;let n=e.slice(t.length),r=n.indexOf(`:`);if(r<=0)return null;let i=n.slice(0,r),a=n.slice(r+1);return i!==`registry`&&i!==`custom`||a===``?null:{kind:`concrete`,source:i,id:a}}function A(e){return e===null?null:e===`terminal-cli`?`claude`:u.find(t=>e===E(t))??null}function j(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function M(e){let t=j(e);if(!t)return null;try{let e=t.getItem(S);return e===null?t.getItem(C)??t.getItem(w):e}catch{return null}}function N(e,t){let n=j(t);if(n)try{n.setItem(S,e)}catch(e){console.warn(`[ask-ai] Failed to persist default agent:`,e)}}function P(e,t){return u.filter(n=>c(e,n,t))}function F(e){return s.filter(t=>l(e,t.id)).map(e=>e.id)}function I(e){let{sticky:t,effectiveThreadAgent:n,enabledClis:r,enabledDesktopTargets:i,installedClis:a,terminalAvailable:o,threadsAvailable:s,desktopSelectable:c,preferBareTerminal:l,bareTerminalFallback:u}=e;if(l&&o)return{kind:`terminal`};if(s&&k(t)!==null&&n!==null)return{kind:`thread`,agent:n};if(o){let e=A(t);if(e!==null&&r.includes(e))return{kind:`cli`,cli:e}}return c&&t!==null&&i.includes(t)?{kind:`desktop`,target:t}:s&&n!==null?{kind:`thread`,agent:n}:o&&r.length>0?{kind:`cli`,cli:r.find(e=>a[e]===!0)??r[0]}:c&&i.length>0?{kind:`desktop`,target:i[0]}:u&&o?{kind:`terminal`}:{kind:`none`}}var L=r(),R=t();function z(e){let t=(0,L.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,R.jsx)(`div`,{"data-slot":`input-group`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}var B=o(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function re(e){let t=(0,L.c)(11),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,align:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let o=a===void 0?`inline-start`:a,s;t[4]!==o||t[5]!==n?(s=i(B({align:o}),n),t[4]=o,t[5]=n,t[6]=s):s=t[6];let c;return t[7]!==o||t[8]!==r||t[9]!==s?(c=(0,R.jsx)(`div`,{"data-slot":`input-group-addon`,"data-align":o,className:s,onMouseDown:V,...r}),t[7]=o,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function V(e){e.target.closest(`button`)||(e.preventDefault(),e.currentTarget.parentElement?.querySelector(`input`)?.focus())}o(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function H(e){let t=(0,L.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,R.jsx)(`span`,{className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function U(e){let t=(0,L.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,R.jsx)(d,{"data-slot":`input-group-control`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}var W=`mr-1.5 flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none transition hover:bg-foreground/10 hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50`,G=`border-border bg-background text-foreground hover:bg-background focus-visible:bg-background`,K={start:[f.Space],cancel:[f.Esc],end:[f.Space,f.Enter]};function q(e){return i(W,e?`opacity-100`:`pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100`)}function J(e){return e?void 0:-1}function Y({className:e,isDragging:t}){return i(e,t&&G)}function X(e){return e.code===f.Enter&&e.target===e.currentTarget}function ie({event:e,hasKeyboardActivation:t,isDragging:n}){return e.defaultPrevented?`ignore`:!n&&t&&X(e)?`activate-tab`:`delegate-sortable`}function ae({activeWidth:e,isDragging:t,outerStyle:n,transform:r,transition:i}){let a=t&&e?e:void 0;return{...n,transform:ee.Transform.toString(r?{...r,scaleX:1,scaleY:1}:null),transition:i,flexBasis:a??n?.flexBasis,maxWidth:a??n?.maxWidth,minWidth:a??n?.minWidth,opacity:n?.opacity,width:a??n?.width,zIndex:t?20:n?.zIndex}}function oe(e,t){let n=e?.querySelectorAll(t)??[],r=1/0,i=-1/0;for(let e of n){let t=e.getBoundingClientRect();r=Math.min(r,t.left),i=Math.max(i,t.right)}return Number.isFinite(r)&&Number.isFinite(i)?{left:r,right:i}:null}function se(e){return({activeNodeRect:t,transform:n})=>{let r={...n,y:0};if(!e||!t)return r;let i=e.left-t.left,a=e.right-t.right;return r.x=Math.min(Math.max(r.x,i),a),r}}var ce=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(r){let e=1/0,i=-1/0,a=null,o=null;for(let r of t){let t=n.get(r.id);t&&(t.left<e&&(e=t.left,a=r),t.right>i&&(i=t.right,o=r))}if(!Number.isFinite(e)||!Number.isFinite(i))return[];let s=r.x<e?a:r.x>i?o:null;if(s)return[{id:s.id,data:{droppableContainer:s,value:0}}]}return p(e)};function Z(e){Math.abs(e.deltaX)>=Math.abs(e.deltaY)||e.currentTarget.scrollWidth<=e.currentTarget.clientWidth||(e.preventDefault(),e.currentTarget.scrollLeft+=e.deltaY)}var Q=`open-knowledge:new-preferred-session`;function le(e=typeof window>`u`?new EventTarget:window){e.dispatchEvent(new CustomEvent(Q))}function ue(e,t=typeof window>`u`?new EventTarget:window){let n=()=>e();return t.addEventListener(Q,n),()=>t.removeEventListener(Q,n)}var $=`open-knowledge:terminal-launch`;function de(e,t,n,r=typeof window>`u`?new EventTarget:window){r.dispatchEvent(new CustomEvent($,{detail:{prompt:e,cli:t,stage:n?.stage===!0}}))}function fe(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.prompt==`string`&&e(n.prompt,n.cli,{stage:n.stage===!0})};return t.addEventListener($,n),()=>t.removeEventListener($,n)}export{h as A,M as C,te as D,O as E,x as O,D as S,E as T,U as _,Z as a,P as b,Y as c,q as d,J as f,re as g,z as h,ue as i,m as j,g as k,ie as l,ce as m,fe as n,K as o,oe as p,le as r,se as s,de as t,ae as u,H as v,N as w,I as x,F as y};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-CQNSW5MT-CVrDoms_.js";export{e as createTreeViewServices};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-R7FJI6CG-DCV9Dvbs.js";export{e as createTreemapServices};
@@ -1,8 +0,0 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{C as n,G as r,It as i,Rt as a,Tn as o,W as s,Wt as c,_t as l,dt as u,pt as d,r as f,xt as p}from"./DocumentContext-Bwk1Rcb4.js";import{t as m}from"./react-f2sANaYj.js";import{n as h,r as g}from"./dist-Nvb76hAm.js";import{r as _,t as v}from"./useQuery-ZeEDLtxh.js";import{t as y}from"./compiler-runtime-BfE3aGVn.js";import{s as b}from"./createLucideIcon-DAkhoPjT.js";import{t as x}from"./button-Gol9BgNB.js";import{i as S,n as C,t as w}from"./tooltip-B4J7VHmA.js";import{n as T,r as E,t as D}from"./collapsible-B1mS1n9y.js";import{A as O,E as k,P as A,lt as j}from"./CodeMirrorPropInput-BQX8xzkZ.js";import{n as M,t as N}from"./toggle-group-CjXmmTGy.js";import{Cr as P,Jt as F,Mn as I,Nn as L,R,Yt as z,gt as B,ti as V,ui as H,yt as U,z as W}from"./dist-Dhbvx6Ut.js";import{t as G}from"./chevron-right-C8oTR6gu.js";import{n as ee}from"./CopyButton-1Q6Wnnjb.js";import{i as te,r as ne}from"./prop-types-BX5rHy8u.js";import{l as re}from"./workspace-paths-DSoqUSNl.js";import{t as ie}from"./refresh-cw-BfeWGCsv.js";import{t as ae}from"./triangle-alert-Clgvyc7B.js";import{t as oe}from"./wrench-BfoTvqT9.js";import{n as se}from"./dist-BLAMau9Z.js";import{t as K}from"./dist-q14fBS3T.js";import{o as ce}from"./use-settings-route-FnSIe1ir.js";import{c as le}from"./documents-events-NL4RG6fU.js";import{a as q,i as ue}from"./startup-marks-CqVzdU1y.js";import{a as de,s as fe}from"./doc-hash-BzYXjFJp.js";import{t as J}from"./badge-Dba4cvJR.js";import{C as pe,y as me}from"./config-provider-CJmVSUcR.js";import{Dt as he,Ft as ge,It as _e,J as ve,Q as ye,X as be}from"./dist-DNwOaDhC.js";import{a as xe,i as Se,n as Ce,o as we,r as Te,s as Ee,t as De}from"./panel-C8ZhM4q-.js";import{t as Oe}from"./lint-plugin-meta-DKTiO7RO.js";import{t as ke}from"./skeleton-BG12Hmzn.js";import{a as Ae,c as je,d as Me}from"./lint-config-client-CrVQnAJl.js";var Ne=56,Pe=2,Fe=150,Ie=2e3;function Le(e,t,n){return e.top+e.height/2-(n+t)/2}function Re(e,t){let n=Math.max(0,t.scrollHeight-t.clientHeight);return Math.max(0,Math.min(e,n))}function ze(e){let{docName:t,container:n,measureTarget:r,placement:i,intent:a,grade:o,landedMode:s,transition:c,onOutcome:u,onDiscardQueuedTarget:f,toolbarOffset:m=Ne,driftThresholdPx:h=Pe,quietMs:g=Fe,abandonAfterMs:_=Ie}=e,v=e.contentColumn??n.firstElementChild,y=d(t),b=l(t,{yieldsToNavigation:a===`toggle`,supersede:()=>P(`superseded`)}),x=n.style.overflowAnchor;n.style.overflowAnchor=`none`,c&&q(`ok/mode-switch/transition`,{from:c.from,to:c.to,grade:o});let S=!1,C=null,w,T,E=0,D,O=()=>{let e=r();return e===null?null:Re(i===`center`?Le(e,n.clientHeight,m):e.top-m,n)},k=()=>{let e=O();if(e===null)return{measurable:!1,moved:!1};C=e;let t=Math.abs(n.scrollTop-e)>h;return t&&(n.scrollTop=e),{measurable:!0,moved:t}},A=()=>n.scrollTop-(O()??C??n.scrollTop),j=()=>{w&&clearTimeout(w),T&&clearTimeout(T),E&&cancelAnimationFrame(E),D?.disconnect(),n.removeEventListener(`wheel`,I),n.removeEventListener(`touchstart`,I),n.removeEventListener(`contentvisibilityautostatechange`,L,!0),n.style.overflowAnchor=x,y.release(),b.release()},M=()=>{if(S)return;S=!0;let e;try{k(),e=A(),C!==null&&p({docName:t,container:n,targetScrollTop:n.scrollTop,mode:s})}finally{j()}q(`ok/landing/land`,{grade:o,delta:e}),u?.({status:`landed`,delta:e})},N=()=>{if(S)return;S=!0;let e=C??n.scrollTop,t;try{t=A()}finally{j()}q(`ok/landing/abandoned`,{grade:o,target:e,delta:t}),u?.({status:`abandoned`,delta:t})},P=e=>{S||(S=!0,j(),e===`mode-flip`&&f?.(),u?.({status:`cancelled`,reason:e}))},F=()=>{w&&clearTimeout(w),w=setTimeout(M,g)};function I(){P(`user-scroll`)}function L(){if(S)return;let{measurable:e,moved:t}=k();e&&(t||w===void 0)&&F()}try{k().measurable&&F(),n.addEventListener(`contentvisibilityautostatechange`,L,!0),n.addEventListener(`wheel`,I,{passive:!0}),n.addEventListener(`touchstart`,I,{passive:!0}),typeof ResizeObserver<`u`&&v&&(D=new ResizeObserver(L),D.observe(v)),E=requestAnimationFrame(L),T=setTimeout(N,_)}catch(e){throw S=!0,j(),e}return{cancel:P}}function Be(e){switch(e){case`bulletList`:case`orderedList`:case`taskList`:case`list`:return`list`;case`codeBlock`:case`code`:return`code`;case`horizontalRule`:case`thematicBreak`:return`thematicBreak`;case`jsxComponent`:case`mdxJsxFlowElement`:case`mdxJsxTextElement`:return`jsx`;case`htmlBlock`:case`html`:return`html`;default:return e}}function Ve(e){return typeof e!=`object`||!e?``:`value`in e&&typeof e.value==`string`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(Ve).join(``):``}function He(e,t){let{frontmatter:n,body:r}=H(e),i=n===``?0:n.split(`
2
- `).length-1;try{return{blocks:t.parseToEditorMdast(r).children.map(e=>({start:(e.position?.start.line??1/0)+i,end:(e.position?.end.line??-1/0)+i,kind:Be(e.type),text:Ve(e)})),fmLineCount:i}}catch{return performance.mark(`ok/block-spans/parse-failed`),{blocks:[],fmLineCount:i}}}function Ue(e,t){let{blocks:n,fmLineCount:r}=He(e,t);return{spans:n.map(e=>({start:e.start,end:e.end})),fmLineCount:r}}function We(e,t){if(e.length===0)return null;let n=0,r=e.length-1,i=e.length-1;for(;n<=r;){let a=n+r>>1,o=e[a];o!==void 0&&o.end>=t?(i=a,r=a-1):n=a+1}return i}function Ge(e){let t=e.childCount>0?e.child(e.childCount-1):null;return t!==null&&t.type.name===`paragraph`&&t.content.size===0?e.childCount-1:e.childCount}function Ke(e,t,n){let r=e.childCount,i=Math.max(0,Math.min(t,r)),a=Math.max(i,Math.min(n,r));if(a<=i)return null;let o=0;for(let t=0;t<i;t++)o+=e.child(t).nodeSize;let s=o;for(let t=i;t<a;t++)o+=e.child(t).nodeSize;let c=o,l=e.content.size,u=Math.max(0,Math.min(s,l)),d=Math.max(u,Math.min(c,l));return d<=u?null:{from:u,to:d}}function qe(e){let t=[0];for(let n=0;n<e.length;n++)e[n]===`
3
- `&&t.push(n+1);return t}function Je(e,t,n){return t<=1?0:t-1>=e.length?n:e[t-1]??n}function Ye(e,t){let n=0,r=e.length-1,i=1;for(;n<=r;){let a=n+r>>1;(e[a]??0)<=t?(i=a+1,n=a+1):r=a-1}return i}function Xe(e,t,n){return Math.max(t,Math.min(e,n))}function Ze(e,t){let n=e=>e.replace(/\s+/g,` `).trim();return n(e)===n(t)}function Qe(e,t){return t.inRange?t.tripwireOk?Ze(e.content,t.text)?`exact`:e.kind===t.kind?`same-type-ordinal`:`ordinal`:`ordinal`:`clamped`}function $e(e){let t=null,n=null;function r(r){return n!==null&&t===r?n:(n={blocks:He(r,e).blocks,lineStarts:qe(r)},t=r,n)}return{captureFromWysiwyg(e,t,n){if(e.childCount===0)return null;let r=Xe(t,0,e.content.size),i=0,a=e.childCount-1,o=0;for(let t=0;t<e.childCount;t++){let n=e.child(t).nodeSize;if(r<i+n){a=t,o=i+1;break}i+=n,o=i+1}let s=e.child(a),c={blockIndex:a,kind:Be(s.type.name),content:s.textContent};return n?.refine&&(c.selectionInBlock=Math.max(0,r-o)),c},captureFromSource(e,t,n){let{blocks:i,lineStarts:a}=r(e);if(i.length===0)return null;let o=Xe(t,0,e.length),s=We(i,Ye(a,o));if(s===null)return null;let c=i[s];if(!c)return null;let l={blockIndex:s,kind:c.kind,content:c.text};if(n?.refine){let t=Je(a,c.start,e.length);l.selectionInBlock=Math.max(0,o-t)}return l},resolveInSource(e,{source:t,doc:n}){let{blocks:i,lineStarts:a}=r(t);if(i.length===0)return null;let o=e.blockIndex>=0&&e.blockIndex<i.length,s=Ge(n)===i.length,c=i[Xe(e.blockIndex,0,i.length-1)],l=Je(a,c.start,t.length),u=Math.min(Je(a,c.end+1,t.length),t.length),d=Qe(e,{inRange:o,tripwireOk:s,kind:c.kind,text:c.text}),f=l;return d===`exact`&&e.selectionInBlock!==void 0&&(f=Xe(l+e.selectionInBlock,l,u)),{blockStart:l,blockEnd:u,point:f,confidence:d}},resolveInWysiwyg(e,{source:t,doc:n}){let i=Ge(n);if(i===0)return null;let{blocks:a}=r(t),o=e.blockIndex>=0&&e.blockIndex<i,s=i===a.length,c=Xe(e.blockIndex,0,i-1),l=Ke(n,c,c+1);if(l===null)return null;let u=n.child(c),d=Qe(e,{inRange:o,tripwireOk:s,kind:Be(u.type.name),text:u.textContent});return{blockStart:l.from,blockEnd:l.to,point:l.from,confidence:d}}}}var et=ge.define(),tt=ge.define(),nt=ve.mark({class:s}),rt=_e.define({create(){return ve.none},update(e,t){let n=e.map(t.changes);for(let e of t.effects)e.is(et)?n=ve.set([nt.range(e.value.from,e.value.to)]):e.is(tt)&&(n=ve.none);return n},provide:e=>be.decorations.from(e)}),it=new WeakMap,at=ye.define(e=>({destroy(){let t=it.get(e);t!==void 0&&(clearTimeout(t),it.delete(e))}}));function ot(e,t,n,i){let a=r(e.state.doc.length,t,n,i);if(!a)return;e.dispatch({effects:et.of(a)});let o=it.get(e);o!==void 0&&clearTimeout(o);let s=setTimeout(()=>{it.delete(e),e.dispatch({effects:tt.of(null)})},R);it.set(e,s)}function st(){return[rt,at]}var ct=3e4;function lt(){let e=new Map,t=e=>e?Date.now()-e.rememberedAt>ct?null:e.navigation:null;return{remember(t,n){e.set(t,{navigation:n,rememberedAt:Date.now()})},peek(n){return t(e.get(n))},consume(n){let r=e.get(n);return e.delete(n),t(r)},clear(t){e.delete(t)},clearForTest(){e.clear()}}}var ut=lt(),dt=lt(),ft=ut.remember,pt=ut.peek,mt=ut.consume,ht=ut.clear;ut.clearForTest;var gt=dt.remember,_t=dt.peek,vt=dt.consume,yt=dt.clear;dt.clearForTest;function bt(e,t,n){return{start:pe(e,t),end:pe(e,n)}}function xt(e,t){let n=me(e.start,t),r=me(e.end,t);return n===null||r===null||r.index<=n.index?null:n.index}var St=`open-knowledge:view-in-source`,Y=56,Ct=null;function wt(){return Ct??=$e(O()),Ct}function Tt(e,t,n,r,i=`toggle`){let a=r.captureFromWysiwyg(e,t,{refine:i===`jump`});if(!a)return null;let o=r.resolveInSource(a,{source:n.toString(),doc:e});return{kind:`selection-offset`,intent:i,anchor:a,pin:o?bt(n,o.blockStart,o.blockEnd):void 0}}function Et(e){let{editor:t,docName:n,ytext:r}=e,i=k(t);if(!i)return;let a=i.state.selection.from,o=Tt(i.state.doc,a,r,wt(),`jump`);o&&ft(n,o),window.dispatchEvent(new CustomEvent(St,{detail:{docName:n}}))}function Dt(e,t,n,r,i){let a=r.captureFromSource(e,t);if(!a)return null;let o=i?r.resolveInSource(a,{source:e,doc:i}):null;return{kind:`selection-offset`,anchor:a,pin:o?bt(n,o.blockStart,o.blockEnd):void 0}}function Ot(e,t){let{source:n,pmDoc:r,ydoc:i,resolver:a}=t;if(e.pin){let t=xt(e.pin,i);if(t===null){let t=a.resolveInWysiwyg(e.anchor,{source:n,doc:r});return t?{...t,point:t.blockStart,confidence:`clamped`}:null}let o=a.captureFromSource(n,t);if(o)return a.resolveInWysiwyg(o,{source:n,doc:r})}return a.resolveInWysiwyg(e.anchor,{source:n,doc:r})}function kt(e,t){let{source:n,pmDoc:r,ydoc:i,resolver:a}=t;if(e.pin){let t=xt(e.pin,i);if(t===null){let t=a.resolveInSource(e.anchor,{source:n,doc:r});return t?{...t,point:t.blockStart,confidence:`clamped`}:null}let o=a.captureFromSource(n,t);if(o)return a.resolveInSource(o,{source:n,doc:r})}return a.resolveInSource(e.anchor,{source:n,doc:r})}function At(e,t){try{return e.coordsAtPos(t)}catch{return null}}function jt(e,t,n){let r=Math.max(0,Math.min(n,e.state.doc.length)),i=t.getBoundingClientRect().top,a=At(e,r);if(a)return{top:a.top-i+t.scrollTop,height:a.bottom-a.top};try{let n=e.lineBlockAt(r);return{top:e.documentTop-i+t.scrollTop+n.top,height:n.height}}catch{return null}}function Mt(e,t){if(e.isDestroyed)return null;try{let n=e.nodeDOM(t);if(n instanceof HTMLElement)return n;let{node:r}=e.domAtPos(t);return r instanceof HTMLElement?r:r.parentElement}catch{return null}}function Nt(e,t,n){if(e.isDestroyed)return null;let r=Mt(e,Math.max(0,Math.min(n,e.state.doc.content.size)));if(!r)return null;let i=r.getBoundingClientRect(),a=t.getBoundingClientRect().top;return{top:i.top-a+t.scrollTop,height:i.height}}function Pt(){return typeof document>`u`?null:u()}function Ft(e,t){let n=t.getBoundingClientRect(),r=n.left+n.width/2;for(let t of[Y+1,Y+12,Y+40]){let i=e.posAtCoords({left:r,top:n.top+t});if(i)return i.pos}return null}function It(e,t){let n=t.getBoundingClientRect(),r=n.left+n.width/2;for(let t of[Y+1,Y+12,Y+40]){let i=e.posAtCoords({x:r,y:n.top+t});if(i!==null)return i}return null}function Lt(e){let{from:t,to:n,docName:r,ytext:i}=e;t===`wysiwyg`&&n===`source`?Rt(r,i):t===`source`&&n===`wysiwyg`&&zt(r,i)}function Rt(e,t){let n=pt(e);if(n&&n.kind!==`selection-offset`)return;let r=c(e);if(!r)return;let i=k(r);if(!i)return;let a=Pt();if(!a)return;let o=Ft(i,a);if(o===null)return;let s=Tt(i.state.doc,o,t,wt());s&&ft(e,s)}function zt(e,t){let n=i(e);if(!n)return;let r=Pt();if(!r)return;let a=It(n,r);if(a===null)return;let o=c(e),s=o?k(o)?.state.doc:void 0,l=Dt(t.toString(),a,t,wt(),s);l&&gt(e,l)}function Bt(e){let{view:t,docName:n,navigation:r,ydoc:i,transition:a}=e,o=c(n),s=o?k(o)?.state.doc:void 0;if(!s)return null;let u=kt(r,{source:t.state.doc.toString(),pmDoc:s,ydoc:i,resolver:wt()});if(!u)return null;let d=Pt();if(!d)return null;let f=u,p=r.intent===`jump`,m=p?f.point:f.blockStart;t.dispatch({effects:be.scrollIntoView(m,{y:`start`})});let h=!1,g=null,_=l(n,{yieldsToNavigation:!p,supersede:()=>{h=!0,_.release()}}),v=e=>{if(!h){if(At(t,m)===null&&e<8){requestAnimationFrame(()=>v(e+1));return}try{p&&(t.dispatch({selection:he.cursor(m)}),t.focus())}finally{_.release()}g=ze({docName:n,container:d,contentColumn:t.contentDOM,measureTarget:()=>jt(t,d,m),placement:p?`center`:`top`,intent:p?`jump`:`toggle`,grade:f.confidence,landedMode:`source`,transition:a,toolbarOffset:Y,onOutcome:p?e=>{e.status===`landed`&&ot(t,f.blockStart,f.blockEnd,f.confidence)}:void 0,onDiscardQueuedTarget:()=>ht(n)})}};return v(0),{cancel:e=>{h=!0,_.release(),g?.cancel(e)}}}function Vt(e){let{editor:t,docName:n,navigation:r,ydoc:i,transition:a}=e,o=k(t);if(!o)return null;let s=Ot(r,{source:i.getText(`source`).toString(),pmDoc:o.state.doc,ydoc:i,resolver:wt()});if(!s)return null;let c=Pt();if(!c)return null;let l=s;return ze({docName:n,container:c,contentColumn:o.dom,measureTarget:()=>Nt(o,c,l.point),placement:`top`,intent:`toggle`,grade:l.confidence,landedMode:`wysiwyg`,transition:a,toolbarOffset:Y,onDiscardQueuedTarget:()=>yt(n)})}var X=e(m(),1),Z=y(),Ht=null,Ut=[];function Wt(e){if(e===Ht)return Ut;let t=Gt(e);return Ht=e,Ut=t,t}function Gt(e){let t=[],n=new Map,r=L();for(let i=Kt(e);i<=e.lines;i++){let a=e.line(i);if(r(a.text))continue;let o=V(a.text,n);o&&t.push({slug:o.slug,from:a.from})}return t}function Kt(e){if(!qt(e.line(1).text))return 1;for(let t=2;t<=e.lines;t++)if(qt(e.line(t).text))return t+1;return 1}function qt(e){return W.test(e.endsWith(`\r`)?e.slice(0,-1):e)}function Jt(e){let t=document.getElementById(e);return t?t.getBoundingClientRect().top:null}function Yt(e){let t=new Map;for(let n of Wt(e.state.doc))t.set(n.slug,n.from);let n=e.documentTop;return r=>{let i=t.get(r);return i===void 0?null:n+e.lineBlockAt(i).top}}function Xt(e,t){let n=(0,Z.c)(9),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let{isSourceMode:o,docName:s}=r,c=o===void 0?!1:o,[l,u]=(0,X.useState)(void 0),d=(0,X.useRef)(null),f;n[2]===s?f=n[3]:(f=()=>s?i(s):null,n[2]=s,n[3]=f);let p=(0,X.useSyncExternalStore)(a,f,Zt),m,h;return n[4]!==c||n[5]!==e||n[6]!==p?(m=()=>{if(e.length===0||c&&!p){u(void 0);return}let t=function(){let t=c&&p?Yt(p):Jt,n=window.innerHeight/2,r,i;for(let a of e){let e=t(a);e!==null&&(e<0?r=a:i===void 0&&e<n&&(i=a))}u(i??r??e[0])},n=function(){d.current===null&&(d.current=requestAnimationFrame(()=>{d.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),d.current!==null&&(cancelAnimationFrame(d.current),d.current=null)}},h=[e,c,p],n[4]=c,n[5]=e,n[6]=p,n[7]=m,n[8]=h):(m=n[7],h=n[8]),(0,X.useEffect)(m,h),l}function Zt(){return null}var Q=t(),Qt=300;async function $t(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new A(K._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=U.safeParse(n);throw e.success?Error(e.data.title):new A(K._({id:`zlErBl`}),{status:t.status})}let r=B.safeParse(n);if(!r.success)throw new A(K._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var en=32,tn=12,nn=6,rn=`open-knowledge:outline-nav`;function an(e){let t=(0,Z.c)(2),n;return t[0]===e?n=t[1]:(n=(0,Q.jsx)(ue,{name:`outline-panel`,children:(0,Q.jsx)(on,{...e})}),t[0]=e,t[1]=n),n}function on(e){let t=(0,Z.c)(53),{docName:n,isSourceMode:r,className:i}=e,a=i===void 0?``:i,{_:o}=g(),{pages:s,loading:c}=te(),l=_(),{activeProvider:u,activeDocName:d}=f(),p,m;t[0]===n?(p=t[1],m=t[2]):(p=[`page-headings`,n],m=()=>$t(n),t[0]=n,t[1]=p,t[2]=m);let y;t[3]!==n||t[4]!==c||t[5]!==s?(y=!c&&(s.has(n)||P(n)),t[3]=n,t[4]=c,t[5]=s,t[6]=y):y=t[6];let x;t[7]!==p||t[8]!==m||t[9]!==y?(x={queryKey:p,queryFn:m,enabled:y,staleTime:1/0},t[7]=p,t[8]=m,t[9]=y,t[10]=x):x=t[10];let{data:S,isLoading:C,error:w}=v(x),T;t[11]===S?T=t[12]:(T=S===void 0?[]:S,t[11]=S,t[12]=T);let E=T,D,O;t[13]!==d||t[14]!==u||t[15]!==n||t[16]!==l?(D=()=>{if(!u||d!==n)return;let e=u.document,t=null,r=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,l.invalidateQueries({queryKey:[`page-headings`,n]})},Qt)};return e.on(`update`,r),()=>{e.off(`update`,r),t!==null&&clearTimeout(t)}},O=[u,d,n,l],t[13]=d,t[14]=u,t[15]=n,t[16]=l,t[17]=D,t[18]=O):(D=t[17],O=t[18]),(0,X.useEffect)(D,O);let k;t[19]===E?k=t[20]:(k=E.map(sn),t[19]=E,t[20]=k);let A=k,j;t[21]!==n||t[22]!==r?(j={isSourceMode:r,docName:n},t[21]=n,t[22]=r,t[23]=j):j=t[23];let M=Xt(A,j),N;t[24]!==M||t[25]!==E?(N=M?E.findIndex(e=>e.slug===M):-1,t[24]=M,t[25]=E,t[26]=N):N=t[26];let F=N,I;t[27]!==n||t[28]!==r?(I=function(e,t){let i={index:e,slug:t,mode:r?`source`:`wysiwyg`};i.mode===`source`&&ft(n,{kind:`outline`,detail:i}),window.dispatchEvent(new CustomEvent(rn,{detail:i}))},t[27]=n,t[28]=r,t[29]=I):I=t[29];let L=I,R=((F>=0?E[F].level:1)-1)*tn+(tn-nn)/2,z=F*en+(en-nn)/2,B;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,Q.jsx)(Ee,{children:(0,Q.jsx)(h,{id:`dD7NPy`})}),t[30]=B):B=t[30];let V;t[31]!==E.length||t[32]!==C?(V=!C&&(0,Q.jsx)(Te,{children:E.length}),t[31]=E.length,t[32]=C,t[33]=V):V=t[33];let H;t[34]===V?H=t[35]:(H=(0,Q.jsxs)(we,{children:[B,V]}),t[34]=V,t[35]=H);let U;t[36]!==o||t[37]!==F||t[38]!==M||t[39]!==w||t[40]!==L||t[41]!==E||t[42]!==C||t[43]!==R||t[44]!==z?(U=w?(0,Q.jsx)(xe,{className:`px-2`,children:w instanceof Error?w.message:o({id:`GuqOb1`})}):E.length===0&&!C?(0,Q.jsx)(Se,{className:`px-2`,children:(0,Q.jsx)(h,{id:`0BB9ID`})}):(0,Q.jsxs)(`nav`,{"aria-label":o({id:`BymzO4`}),className:`relative`,children:[F>=0&&(0,Q.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-0 top-0 rounded-full bg-primary motion-safe:[transition:transform_0.25s_var(--ease-out-strong)]`,style:{width:nn,height:nn,transform:`translate(${R}px, ${z}px)`}}),E.map((e,t)=>{let n=e.slug===M;return(0,Q.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>L(t,e.slug),className:b(`w-full cursor-pointer truncate py-1.5 pe-2 text-left text-sm transition-colors`,n?`font-medium text-primary`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${(e.level-1)*tn+20}px`},title:e.text,children:e.text},t)})]}),t[36]=o,t[37]=F,t[38]=M,t[39]=w,t[40]=L,t[41]=E,t[42]=C,t[43]=R,t[44]=z,t[45]=U):U=t[45];let W;t[46]!==C||t[47]!==U?(W=(0,Q.jsx)(Ce,{className:`px-3 py-2`,"aria-busy":C,children:U}),t[46]=C,t[47]=U,t[48]=W):W=t[48];let G;return t[49]!==a||t[50]!==H||t[51]!==W?(G=(0,Q.jsxs)(De,{className:a,children:[H,W]}),t[49]=a,t[50]=H,t[51]=W,t[52]=G):G=t[52],G}function sn(e){return e.slug}function cn(e){let t=(0,Z.c)(10),{scope:n,onScopeChange:r}=e,{_:i}=g(),a;t[0]===r?a=t[1]:(a=e=>{e&&r(e)},t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=i({id:`aBgwis`}),t[2]=i,t[3]=o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(M,{value:`doc`,className:`flex-1`,"data-testid":`panel-scope-doc`,children:(0,Q.jsx)(h,{id:`UpCz01`})}),t[4]=s):s=t[4];let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(M,{value:`project`,className:`flex-1`,"data-testid":`panel-scope-project`,children:(0,Q.jsx)(h,{id:`e0NrBM`})}),t[5]=c):c=t[5];let l;return t[6]!==n||t[7]!==a||t[8]!==o?(l=(0,Q.jsx)(`div`,{className:`shrink-0 px-4 pb-2`,children:(0,Q.jsxs)(N,{type:`single`,variant:`segmented`,size:`sm`,spacing:1,value:n,onValueChange:a,"aria-label":o,className:`w-full rounded-md bg-muted p-0.5 dark:bg-background`,children:[s,c]})}),t[6]=n,t[7]=a,t[8]=o,t[9]=l):l=t[9],l}var ln=`audit-superseded`;async function un(e={kind:`project`}){return fn(e,z,!1)}async function dn(e={kind:`project`},t){return fn(e,F,!0,t)}async function fn(e,t,n,r){try{let i=new URLSearchParams;e.kind===`path`?i.set(`path`,e.path):e.kind===`doc`&&i.set(`doc`,e.docName),n&&i.set(`counts`,`1`);let a=i.size===0?``:`?${i}`,o=await fetch(`/api/audit${a}`,r===void 0?void 0:{signal:r});if(!o.ok)return o.status===409?ln:(console.warn(`[audit] request failed`,o.status,o.statusText),null);let s;try{s=await o.json()}catch{return r?.aborted===!0||console.warn(`[audit] response body is not valid JSON`),null}let c=t.safeParse(s);return c.success?c.data:(console.warn(`[audit] response failed schema validation`,c.error.issues),null)}catch(e){return r?.aborted===!0||console.warn(`[audit] fetch threw`,e),null}}function pn(e){let t=(0,Z.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],t[0]=n):n=t[0];let[r,i]=(0,X.useState)(n),a,o;return t[1]===e?(a=t[2],o=t[3]):(a=()=>{if(i(gn),e===null)return;let t=!1,n=()=>{un({kind:`doc`,docName:e}).then(e=>{if(t||e===null||e===`audit-superseded`)return;let n=e.files.flatMap(hn).filter(mn);i(e=>e.length===0&&n.length===0?e:n)})};n();let r=le(e=>{e.includes(`backlinks`)&&n()});return()=>{t=!0,r()}},o=[e],t[1]=e,t[2]=a,t[3]=o),(0,X.useEffect)(a,o),r}function mn(e){return e.source===`links`}function hn(e){return e.diagnostics}function gn(e){return e.length===0?e:[]}var _n={errorCount:0,warningCount:0},$=new Map,vn=new Set,yn=new Map;function bn(){let e=new Map;for(let[t,n]of $){let r=n.lint.errorCount+n.links.errorCount,i=n.lint.warningCount+n.links.warningCount;r===0&&i===0||e.set(t,{errorCount:r,warningCount:i})}yn=e;for(let e of vn)e()}var xn=I;function Sn(e){return vn.add(e),()=>{vn.delete(e)}}function Cn(){return yn}function wn(e){$.clear();for(let t of e)$.set(de(t.file),xn(t.diagnostics));bn()}function Tn(e){$.clear();for(let t of e)$.set(de(t.file),{lint:t.lint,links:t.links});bn()}function En(e,t){$.set(e,xn(t)),bn()}function Dn(e,t,n){let r=$.get(e)??{lint:_n,links:_n},i=r[t];i.errorCount===n.errorCount&&i.warningCount===n.warningCount||($.set(e,{...r,[t]:n}),bn())}var On=`open-knowledge:lint-nav`;function kn(e,t){return e.range.start.line-t.range.start.line||e.range.start.character-t.range.start.character}function An(e){return{line:e.range.start.line+1,column:e.range.start.character+1}}function jn(e){let t=(0,Z.c)(35),{diagnostic:n,instanceCount:r}=e,{_:i}=g(),a=n.severity===`error`?ee:ae,s=n.range.start.line+1,c=n.source===`links`,l=r!==void 0&&r>1,u=n.severity===`error`?`text-destructive`:`text-amber-500`,d;t[0]===u?d=t[1]:(d=b(`mt-0.5 size-3.5 shrink-0`,u),t[0]=u,t[1]=d);let f;t[2]!==a||t[3]!==d?(f=(0,Q.jsx)(a,{"aria-hidden":`true`,className:d}),t[2]=a,t[3]=d,t[4]=f):f=t[4];let p;t[5]===n.message?p=t[6]:(p=(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 text-foreground`,children:n.message}),t[5]=n.message,t[6]=p);let m;t[7]!==l||t[8]!==r?(m=l?(0,Q.jsxs)(`span`,{className:`mt-0.5 flex shrink-0 items-center gap-1`,children:[(0,Q.jsx)(J,{variant:`gray`,"data-testid":`problems-instance-count`,className:`h-4 px-1 font-sans text-[10px] leading-none`,children:(0,Q.jsx)(h,{id:`iZCZmF`,values:{instanceCount:r}})}),(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`})]}):null,t[7]=l,t[8]=r,t[9]=m):m=t[9];let _;t[10]!==f||t[11]!==p||t[12]!==m?(_=(0,Q.jsxs)(`span`,{className:`flex items-start gap-1.5 text-sm`,children:[f,p,m]}),t[10]=f,t[11]=p,t[12]=m,t[13]=_):_=t[13];let v=c&&`gap-0.5`,y;t[14]===v?y=t[15]:(y=b(`h-4 shrink-0 px-1 font-sans text-[10px] uppercase leading-none`,v),t[14]=v,t[15]=y);let x;t[16]===c?x=t[17]:(x=c?(0,Q.jsx)(o,{"aria-hidden":`true`,className:`size-2.5`}):null,t[16]=c,t[17]=x);let S;t[18]!==n.source||t[19]!==y||t[20]!==x?(S=(0,Q.jsxs)(J,{variant:`gray`,"data-testid":`problems-source-tag`,className:y,children:[x,n.source]}),t[18]=n.source,t[19]=y,t[20]=x,t[21]=S):S=t[21];let C;t[22]!==i||t[23]!==n.code||t[24]!==s||t[25]!==l?(C=l?n.code:`${n.code} · ${i({id:`enPTnx`,values:{displayLine:s}})}`,t[22]=i,t[23]=n.code,t[24]=s,t[25]=l,t[26]=C):C=t[26];let w;t[27]===C?w=t[28]:(w=(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:C}),t[27]=C,t[28]=w);let T;t[29]!==S||t[30]!==w?(T=(0,Q.jsxs)(`span`,{className:`flex items-center gap-1.5 ps-5 font-mono text-xs text-muted-foreground`,children:[S,w]}),t[29]=S,t[30]=w,t[31]=T):T=t[31];let E;return t[32]!==T||t[33]!==_?(E=(0,Q.jsxs)(Q.Fragment,{children:[_,T]}),t[32]=T,t[33]=_,t[34]=E):E=t[34],E}function Mn(e){let t=new Map;for(let n of e){let e=`${n.source}/${n.code}\u0000${n.linkTarget??``}\u0000${n.message}`,r=t.get(e);r===void 0?t.set(e,{key:e,instances:[n]}):r.instances.push(n)}return[...t.values()]}function Nn(e){let t=(0,Z.c)(43),{group:n,onNavigate:r,navTitle:i,renderActions:a}=e,{_:o}=g(),s=n.instances[0];if(n.instances.length===1){let e;t[0]!==s||t[1]!==a?(e=a(s),t[0]=s,t[1]=a,t[2]=e):e=t[2];let n=e,o;t[3]!==s||t[4]!==r?(o=()=>r(s),t[3]=s,t[4]=r,t[5]=o):o=t[5];let c;t[6]!==s||t[7]!==i?(c=i(s),t[6]=s,t[7]=i,t[8]=c):c=t[8];let l;t[9]===s?l=t[10]:(l=(0,Q.jsx)(jn,{diagnostic:s}),t[9]=s,t[10]=l);let u;t[11]!==o||t[12]!==c||t[13]!==l?(u=(0,Q.jsx)(`button`,{type:`button`,onClick:o,className:`flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left`,title:c,children:l}),t[11]=o,t[12]=c,t[13]=l,t[14]=u):u=t[14];let d;t[15]===n?d=t[16]:(d=n===null?null:(0,Q.jsx)(`div`,{className:`absolute bottom-1 right-1 flex items-center gap-1 rounded bg-muted opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 motion-reduce:transition-none`,children:n}),t[15]=n,t[16]=d);let f;return t[17]!==u||t[18]!==d?(f=(0,Q.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[u,d]}),t[17]=u,t[18]=d,t[19]=f):f=t[19],f}let c;t[20]!==s||t[21]!==n.instances.length?(c=(0,Q.jsx)(E,{className:`group flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left transition-colors hover:bg-muted`,children:(0,Q.jsx)(jn,{diagnostic:s,instanceCount:n.instances.length})}),t[20]=s,t[21]=n.instances.length,t[22]=c):c=t[22];let l;t[23]!==o||t[24]!==s.message?(l=o({id:`EUiJEM`,values:{0:s.message}}),t[23]=o,t[24]=s.message,t[25]=l):l=t[25];let u;if(t[26]!==o||t[27]!==n.instances||t[28]!==i||t[29]!==r||t[30]!==a){let e;t[32]!==o||t[33]!==i||t[34]!==r||t[35]!==a?(e=e=>{let t=a(e),n=e.range.start.line+1;return(0,Q.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>r(e),className:`flex w-full cursor-pointer rounded px-2 py-1 text-left font-mono text-xs text-muted-foreground`,title:i(e),"aria-label":o({id:`uCe4AX`,values:{0:e.message,displayLine:n}}),children:o({id:`enPTnx`,values:{displayLine:n}})}),t===null?null:(0,Q.jsx)(`div`,{className:`absolute bottom-0.5 right-1 flex items-center gap-1 rounded bg-muted opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 motion-reduce:transition-none`,children:t})]},Pn(e))},t[32]=o,t[33]=i,t[34]=r,t[35]=a,t[36]=e):e=t[36],u=n.instances.map(e),t[26]=o,t[27]=n.instances,t[28]=i,t[29]=r,t[30]=a,t[31]=u}else u=t[31];let d;t[37]!==l||t[38]!==u?(d=(0,Q.jsx)(T,{className:`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in] motion-reduce:animate-none`,children:(0,Q.jsx)(`ul`,{"aria-label":l,className:`flex flex-col gap-0.5 pb-1 ps-5`,"data-testid":`problems-duplicate-instances`,children:u})}),t[37]=l,t[38]=u,t[39]=d):d=t[39];let f;return t[40]!==c||t[41]!==d?(f=(0,Q.jsx)(`li`,{className:`rounded`,"data-testid":`problems-duplicate-group`,children:(0,Q.jsxs)(D,{children:[c,d]})}),t[40]=c,t[41]=d,t[42]=f):f=t[42],f}function Pn(e){return`${e.source}/${e.code}-${e.range.start.line}-${e.range.start.character}-${e.message}`}function Fn(e){return e.reduce((e,t)=>e+ +((t.fixes?.length??0)>0),0)}function In(e){let t=(0,Z.c)(11),{target:n,creating:r,disabled:i,onCreate:a}=e,{_:o}=g(),s;t[0]!==o||t[1]!==n?(s=o({id:`oWsZk8`,values:{target:n}}),t[0]=o,t[1]=n,t[2]=s):s=t[2];let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(j,{"aria-hidden":`true`,className:`size-3`}),t[3]=c):c=t[3];let l;t[4]===r?l=t[5]:(l=r?(0,Q.jsx)(h,{id:`E9bKSA`}):(0,Q.jsx)(h,{id:`XRuL0i`}),t[4]=r,t[5]=l);let u;return t[6]!==i||t[7]!==a||t[8]!==s||t[9]!==l?(u=(0,Q.jsxs)(x,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:i,onClick:a,"aria-label":s,"data-testid":`problems-create-page`,children:[c,l]}),t[6]=i,t[7]=a,t[8]=s,t[9]=l,t[10]=u):u=t[10],u}function Ln(e){let t=(0,Z.c)(8),{tip:n,testId:r,children:i}=e,a;t[0]===i?a=t[1]:(a=(0,Q.jsx)(S,{asChild:!0,children:(0,Q.jsx)(`span`,{className:`inline-flex shrink-0`,children:i})}),t[0]=i,t[1]=a);let o;t[2]!==r||t[3]!==n?(o=(0,Q.jsx)(C,{"data-testid":r,children:n}),t[2]=r,t[3]=n,t[4]=o):o=t[4];let s;return t[5]!==a||t[6]!==o?(s=(0,Q.jsxs)(w,{children:[a,o]}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function Rn(e){let t=(0,Z.c)(21),{count:n,problemCount:r,aiAvailable:i,disabled:a,onClick:o,children:s}=e,{_:c}=g(),l;t[0]!==i||t[1]!==n||t[2]!==r?(l=n>0?(0,Q.jsx)(h,{id:`vjwsDi`,values:{count:n}}):r===0?(0,Q.jsx)(h,{id:`gAhHu7`}):i?(0,Q.jsx)(h,{id:`zA9zRL`}):(0,Q.jsx)(h,{id:`X3MMeA`}),t[0]=i,t[1]=n,t[2]=r,t[3]=l):l=t[3];let u;t[4]!==c||t[5]!==s||t[6]!==n||t[7]!==r?(u=s===void 0?r===0?c({id:`4m-xuX`}):n===0?c({id:`SqIoy_`}):void 0:void 0,t[4]=c,t[5]=s,t[6]=n,t[7]=r,t[8]=u):u=t[8];let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(oe,{"aria-hidden":`true`,className:`size-3`}),t[9]=d):d=t[9];let f;t[10]!==s||t[11]!==n?(f=s??(0,Q.jsx)(h,{id:`RZXTlY`,values:{count:n}}),t[10]=s,t[11]=n,t[12]=f):f=t[12];let p;t[13]!==a||t[14]!==o||t[15]!==u||t[16]!==f?(p=(0,Q.jsxs)(x,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:a,onClick:o,"aria-label":u,"data-testid":`problems-auto-fix`,children:[d,f]}),t[13]=a,t[14]=o,t[15]=u,t[16]=f,t[17]=p):p=t[17];let m;return t[18]!==l||t[19]!==p?(m=(0,Q.jsx)(Ln,{testId:`problems-auto-fix-tip`,tip:l,children:p}),t[18]=l,t[19]=p,t[20]=m):m=t[20],m}function zn(e){let t=(0,Z.c)(12),{count:n,disabled:r,onClick:i}=e,a;t[0]===n?a=t[1]:(a=(0,Q.jsx)(h,{id:`mgDKWS`,values:{count:n}}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(re,{"aria-hidden":`true`,className:`size-3`}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,Q.jsx)(h,{id:`gyHDWC`,values:{count:n}}),t[3]=n,t[4]=s);let c;t[5]!==r||t[6]!==i||t[7]!==s?(c=(0,Q.jsxs)(x,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:r,onClick:i,"data-testid":`problems-fix-with-ai`,children:[o,s]}),t[5]=r,t[6]=i,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,Q.jsx)(Ln,{testId:`problems-fix-with-ai-tip`,tip:a,children:c}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}function Bn(e){let t=(0,Z.c)(18),{docName:r,diagnostics:i,onFix:a,onAutoFix:o,onAskAi:s,onFixWithAi:c}=e,{_:l}=g(),[u,d]=(0,X.useState)(`doc`),{data:f}=Me(),p=f===null?null:f.effective.enabled?Oe.filter(e=>f.effective.plugins[e.id].enabled):[],m=p!==null&&p.length===0,_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_={status:`idle`},t[0]=_):_=t[0];let[v,y]=(0,X.useState)(_),[b,T]=(0,X.useState)(null),E=ne(),[D,O]=(0,X.useState)(null),k=(0,X.useRef)(!0),A,j;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>(k.current=!0,()=>{k.current=!1}),j=[],t[1]=A,t[2]=j):(A=t[1],j=t[2]),(0,X.useEffect)(A,j);let M=(0,X.useRef)(qn),N;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(N={status:`idle`},t[3]=N):N=t[3];let P=(0,X.useRef)(N),F;t[4]===v?F=t[5]:(F=()=>{v.status!==`loading`&&(P.current=v)},t[4]=v,t[5]=F),(0,X.useEffect)(F);let I=(0,X.useRef)(0),L=[...i].sort(kn),R=Fn(L),z=async function(e){let t=e.linkTarget;if(!(t===void 0||D!==null||E===null)){O(t);try{await n({initialDir:``,suggestedName:t},{addPage:E.addPage})}catch(e){let t=e;se.error(t instanceof Error?t.message:l({id:`tfi40B`})),k.current&&O(null);return}se.success(l({id:`EWCJFu`,values:{target:t}})),k.current&&O(null),k.current&&v.status===`loaded`&&await B()}};async function B(){I.current+=1;let e=I.current,t=P.current;y({status:`loading`});let n=await un();if(n===`audit-superseded`){I.current===e&&k.current&&y(t.status===`idle`?{status:`failed`}:t);return}n!==null&&wn(n.files),k.current&&y(n===null?{status:`failed`}:{status:`loaded`,result:n})}let V=v.status===`loaded`?v.result.files.filter(Gn):[],H=async function(){if(b!==null||V.length===0)return;T({done:0,total:V.length});let e=[];for(let t of V){let n=await Ae(de(t.file));if(!k.current)return;n.ok||e.push({file:t.file,detail:n.errorDetail}),T(Wn)}if(T(null),e.length>0){let t=e[0];se.error(l({id:`fru3T7`,values:{0:e.length,1:V.length}}),{description:t===void 0?void 0:`${t.file}${t.detail===null?``:` — ${t.detail}`}`})}try{await B()}catch{k.current&&y({status:`failed`})}},U=function(e){d(e),e===`project`&&v.status===`idle`&&B()};(0,X.useEffect)(()=>{M.current=()=>{v.status===`idle`||v.status===`failed`||B()}});let W;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(W=[],t[6]=W):W=t[6],(0,X.useEffect)(()=>je(()=>M.current()),W);let G;t[7]===r?G=t[8]:(G=function(e){let t=An(e);ft(r,{kind:`lint`,detail:t}),window.dispatchEvent(new CustomEvent(On,{detail:t}))},t[7]=r,t[8]=G);let ee=G,te;t[9]!==r||t[10]!==ee?(te=function(e,t){let n=de(e);if(n===r){ee(t);return}ft(n,{kind:`lint`,detail:An(t)}),window.location.hash=fe(n)},t[9]=r,t[10]=ee,t[11]=te):te=t[11];let ie=te,ae=function(e){let t=a!==void 0&&(e.fixes?.length??0)>0,n=e.linkTarget!==void 0&&E!==null;if(!t&&!n&&s===void 0)return null;let r=`${e.source}/${e.code}`;return(0,Q.jsxs)(Q.Fragment,{children:[n?(0,Q.jsx)(In,{target:e.linkTarget??``,creating:D===e.linkTarget,disabled:D!==null,onCreate:()=>void z(e)}):null,t?(0,Q.jsxs)(x,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>a?.(e),"aria-label":l({id:`fZj9em`,values:{flatId:r}}),"data-testid":`problems-fix`,children:[(0,Q.jsx)(oe,{"aria-hidden":`true`,className:`size-3`}),(0,Q.jsx)(h,{id:`c4fVUV`})]}):null,s===void 0?null:(0,Q.jsxs)(x,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>s(e),"aria-label":l({id:`hh4mVC`,values:{flatId:r}}),"data-testid":`problems-ask-ai`,children:[(0,Q.jsx)(re,{"aria-hidden":`true`,className:`size-3`}),(0,Q.jsx)(h,{id:`xWEvuo`})]})]})},K;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,Q.jsx)(Ee,{children:(0,Q.jsx)(h,{id:`OXdGnd`})}),t[12]=K):K=t[12];let le=p!==null&&p.length>0&&(0,Q.jsxs)(w,{children:[(0,Q.jsx)(S,{className:`shrink-0 cursor-default rounded-md bg-muted-foreground/5 px-2 py-1 font-mono text-xs text-muted-foreground`,"data-testid":`problems-active-plugins`,children:(0,Q.jsx)(h,{id:`yxF19Y`,values:{0:p.length}})}),(0,Q.jsx)(C,{"data-testid":`problems-active-plugins-tooltip`,children:(0,Q.jsx)(h,{id:`ws5o1F`,values:{0:p.map(Un).join(`, `)}})})]}),q;t[13]===le?q=t[14]:(q=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[K,le]}),t[13]=le,t[14]=q);let ue=u===`doc`&&L.length>0&&(0,Q.jsx)(Te,{children:L.length}),J;return t[15]!==q||t[16]!==ue?(J=(0,Q.jsxs)(we,{children:[q,ue]}),t[15]=q,t[16]=ue,t[17]=J):J=t[17],(0,Q.jsxs)(De,{children:[J,(0,Q.jsx)(cn,{scope:u,onScopeChange:U}),u===`doc`?(0,Q.jsx)(Ce,{className:`px-2 py-2`,children:L.length===0?m?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Se,{className:`px-2`,"data-testid":`problems-no-plugins`,children:(0,Q.jsx)(h,{id:`Hngy37`})}),(0,Q.jsx)(`div`,{className:`px-2 pt-2`,children:(0,Q.jsx)(x,{variant:`outline`,size:`sm`,onClick:ce,"data-testid":`problems-enable-plugins`,children:(0,Q.jsx)(h,{id:`rnX-1S`})})})]}):(0,Q.jsx)(Se,{className:`px-2`,children:(0,Q.jsx)(h,{id:`ZI8uvA`})}):(0,Q.jsxs)(Q.Fragment,{children:[o!==void 0||c!==void 0?(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1 px-2 pb-1`,children:[o!==void 0&&(0,Q.jsx)(Rn,{count:R,problemCount:L.length,aiAvailable:c!==void 0,disabled:R===0,onClick:o}),c!==void 0&&(0,Q.jsx)(zn,{count:L.length,disabled:!1,onClick:()=>c(`doc`)})]}):null,(0,Q.jsx)(`ul`,{"aria-label":l({id:`OXdGnd`}),className:`flex flex-col gap-0.5`,children:Mn(L).map(e=>(0,Q.jsx)(Nn,{group:e,onNavigate:ee,navTitle:e=>l({id:`vbMHjo`,values:{0:e.range.start.line+1}}),renderActions:ae},e.key))})]})}):(0,Q.jsx)(Jn,{audit:v,onRefresh:()=>void B(),onNavigate:ie,fixableCount:V.reduce(Hn,0),problemCount:v.status===`loaded`?v.result.files.reduce(Vn,0):0,fixing:b,onAutoFix:()=>void H(),onFixWithAi:c===void 0||v.status!==`loaded`?void 0:()=>c(`project`),onCreateTarget:E===null?void 0:e=>void z(e),creatingTarget:D})]})}function Vn(e,t){return e+t.diagnostics.length}function Hn(e,t){return e+Fn(t.diagnostics)}function Un(e){return e.label}function Wn(e){return e===null?e:{...e,done:e.done+1}}function Gn(e){return e.diagnostics.some(Kn)}function Kn(e){return(e.fixes?.length??0)>0}function qn(){}function Jn(e){let t=(0,Z.c)(57),{audit:n,onRefresh:r,onNavigate:i,fixableCount:a,problemCount:o,fixing:s,onAutoFix:c,onFixWithAi:l,onCreateTarget:u,creatingTarget:d}=e,{_:f}=g(),p=n.status===`loading`||n.status===`idle`,m;t[0]!==n.result||t[1]!==n.status?(m=n.status===`loaded`&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(h,{id:`DsDwR-`,values:{0:n.result.errorCount}}),` · `,(0,Q.jsx)(h,{id:`W1SI2K`,values:{0:n.result.warningCount}})]}),t[0]=n.result,t[1]=n.status,t[2]=m):m=t[2];let _;t[3]===m?_=t[4]:(_=(0,Q.jsx)(`p`,{className:`min-w-0 truncate text-xs text-muted-foreground`,"data-testid":`problems-audit-summary`,children:m}),t[3]=m,t[4]=_);let v;t[5]===f?v=t[6]:(v=f({id:`I7y_vn`}),t[5]=f,t[6]=v);let y=p||s!==null,b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Q.jsx)(ie,{"aria-hidden":`true`,className:`size-3.5`}),t[7]=b):b=t[7];let T;t[8]!==r||t[9]!==v||t[10]!==y?(T=(0,Q.jsx)(S,{asChild:!0,children:(0,Q.jsx)(x,{variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground`,"aria-label":v,"data-testid":`problems-audit-refresh`,disabled:y,onClick:r,children:b})}),t[8]=r,t[9]=v,t[10]=y,t[11]=T):T=t[11];let E;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(C,{"data-testid":`problems-audit-refresh-tooltip`,children:(0,Q.jsx)(h,{id:`I7y_vn`})}),t[12]=E):E=t[12];let D;t[13]===T?D=t[14]:(D=(0,Q.jsxs)(w,{children:[T,E]}),t[13]=T,t[14]=D);let O;t[15]!==_||t[16]!==D?(O=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[_,D]}),t[15]=_,t[16]=D,t[17]=O):O=t[17];let k;t[18]!==f||t[19]!==s?(k=s===null?null:(0,Q.jsx)(`span`,{className:`sr-only`,role:`status`,children:f({id:`gZElfU`,values:{0:s.done,1:s.total}})}),t[18]=f,t[19]=s,t[20]=k):k=t[20];let A=l!==void 0,j=p||s!==null||a===0,M;t[21]===s?M=t[22]:(M=s===null?void 0:(0,Q.jsx)(h,{id:`S9t1PI`,values:{0:s.done,1:s.total}}),t[21]=s,t[22]=M);let N;t[23]!==a||t[24]!==c||t[25]!==o||t[26]!==A||t[27]!==j||t[28]!==M?(N=(0,Q.jsx)(Rn,{count:a,problemCount:o,aiAvailable:A,disabled:j,onClick:c,children:M}),t[23]=a,t[24]=c,t[25]=o,t[26]=A,t[27]=j,t[28]=M,t[29]=N):N=t[29];let P;t[30]!==s||t[31]!==l||t[32]!==o?(P=l!==void 0&&o>0?(0,Q.jsx)(zn,{count:o,disabled:s!==null,onClick:l}):null,t[30]=s,t[31]=l,t[32]=o,t[33]=P):P=t[33];let F;t[34]!==k||t[35]!==N||t[36]!==P?(F=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1`,children:[k,N,P]}),t[34]=k,t[35]=N,t[36]=P,t[37]=F):F=t[37];let I;t[38]!==F||t[39]!==O?(I=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1 px-2 pb-1`,children:[O,F]}),t[38]=F,t[39]=O,t[40]=I):I=t[40];let L;t[41]!==f||t[42]!==p?(L=p&&(0,Q.jsx)(`div`,{className:`flex flex-col gap-1`,role:`status`,"aria-busy":`true`,"aria-label":f({id:`dx-TwN`}),children:[1,2,3].map(Yn)}),t[41]=f,t[42]=p,t[43]=L):L=t[43];let R;t[44]===n.status?R=t[45]:(R=n.status===`failed`&&(0,Q.jsx)(xe,{className:`px-2 text-xs`,children:(0,Q.jsx)(h,{id:`IFezUv`})}),t[44]=n.status,t[45]=R);let z;t[46]!==n.result||t[47]!==n.status||t[48]!==d||t[49]!==u||t[50]!==i?(z=n.status===`loaded`&&(0,Q.jsx)(Xn,{result:n.result,onNavigate:i,onCreateTarget:u,creatingTarget:d}),t[46]=n.result,t[47]=n.status,t[48]=d,t[49]=u,t[50]=i,t[51]=z):z=t[51];let B;return t[52]!==I||t[53]!==L||t[54]!==R||t[55]!==z?(B=(0,Q.jsxs)(Ce,{className:`px-2 py-2`,"data-testid":`problems-project-scope`,children:[I,L,R,z]}),t[52]=I,t[53]=L,t[54]=R,t[55]=z,t[56]=B):B=t[56],B}function Yn(e){return(0,Q.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded px-2 py-1.5`,children:[(0,Q.jsx)(ke,{className:`mt-0.5 size-3.5 shrink-0 rounded`}),(0,Q.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,Q.jsx)(ke,{className:`h-3 w-28`}),(0,Q.jsx)(ke,{className:`h-3 w-40`})]})]},e)}function Xn(e){let t=(0,Z.c)(12),{result:n,onNavigate:r,onCreateTarget:i,creatingTarget:a}=e,{_:o}=g(),s;t[0]!==o||t[1]!==n.warnings?(s=n.warnings.length>0&&(0,Q.jsx)(`ul`,{"aria-label":o({id:`Rsdhj9`}),className:`flex flex-col gap-0.5 pb-1`,children:n.warnings.map(Zn)}),t[0]=o,t[1]=n.warnings,t[2]=s):s=t[2];let c;t[3]!==a||t[4]!==i||t[5]!==r||t[6]!==n.fileCount||t[7]!==n.files?(c=n.files.length===0?(0,Q.jsx)(Se,{className:`px-2`,children:(0,Q.jsx)(h,{id:`k_Dqw1`,values:{0:n.fileCount}})}):n.files.map(e=>(0,Q.jsx)(Qn,{file:e,onNavigate:r,onCreateTarget:i,creatingTarget:a},e.file)),t[3]=a,t[4]=i,t[5]=r,t[6]=n.fileCount,t[7]=n.files,t[8]=c):c=t[8];let l;return t[9]!==s||t[10]!==c?(l=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Zn(e,t){return(0,Q.jsxs)(`li`,{className:`flex items-start gap-1.5 px-2 text-xs`,children:[(0,Q.jsx)(ae,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-amber-500`}),(0,Q.jsx)(`span`,{className:`min-w-0 text-foreground`,children:e})]},`${t}-${e}`)}function Qn(e){let t=(0,Z.c)(41),{file:n,onNavigate:r,onCreateTarget:i,creatingTarget:a}=e,{_:o}=g(),s,c,l,u,d,f,p,m,h;if(t[0]!==o||t[1]!==a||t[2]!==n.diagnostics||t[3]!==n.file||t[4]!==i||t[5]!==r){let e=[...n.diagnostics].sort(kn);c=D,p=!0,m=`problems-audit-group`;let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),t[15]=g):g=t[15];let _;t[16]===n.file?_=t[17]:(_=(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-foreground`,title:n.file,children:n.file}),t[16]=n.file,t[17]=_),h=(0,Q.jsxs)(E,{className:`group flex w-full cursor-pointer items-center gap-1.5 rounded px-2 py-1.5 text-left transition-colors hover:bg-muted`,children:[g,_,(0,Q.jsx)(J,{variant:`gray`,"data-testid":`problems-audit-file-count`,className:`shrink-0`,children:e.length})]}),s=T,f=`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in] motion-reduce:animate-none`,t[18]!==o||t[19]!==n.file?(l=o({id:`zAJzIg`,values:{0:n.file}}),t[18]=o,t[19]=n.file,t[20]=l):l=t[20],u=`flex flex-col gap-0.5 pb-1 ps-3`;let v;t[21]!==o||t[22]!==a||t[23]!==n.file||t[24]!==i||t[25]!==r?(v=e=>(0,Q.jsx)(Nn,{group:e,onNavigate:e=>r(n.file,e),navTitle:e=>o({id:`xKDsGS`,values:{0:e.range.start.line+1,1:n.file}}),renderActions:e=>e.linkTarget===void 0||i===void 0?null:(0,Q.jsx)(In,{target:e.linkTarget,creating:a===e.linkTarget,disabled:a!==null,onCreate:()=>i(e)})},e.key),t[21]=o,t[22]=a,t[23]=n.file,t[24]=i,t[25]=r,t[26]=v):v=t[26],d=Mn(e).map(v),t[0]=o,t[1]=a,t[2]=n.diagnostics,t[3]=n.file,t[4]=i,t[5]=r,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h}else s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14];let _;t[27]!==l||t[28]!==u||t[29]!==d?(_=(0,Q.jsx)(`ul`,{"aria-label":l,className:u,children:d}),t[27]=l,t[28]=u,t[29]=d,t[30]=_):_=t[30];let v;t[31]!==s||t[32]!==f||t[33]!==_?(v=(0,Q.jsx)(s,{className:f,children:_}),t[31]=s,t[32]=f,t[33]=_,t[34]=v):v=t[34];let y;return t[35]!==c||t[36]!==p||t[37]!==m||t[38]!==h||t[39]!==v?(y=(0,Q.jsxs)(c,{defaultOpen:p,"data-testid":m,children:[h,v]}),t[35]=c,t[36]=p,t[37]=m,t[38]=h,t[39]=v,t[40]=y):y=t[40],y}var $n={words:0,chars:0,tokens:0},er=/[ -〿぀-ゟ゠-ヿ㐀-䶿一-鿿豈-﫿＀-￯฀-๿ក-៿]/,tr=/[\p{L}\p{N}]/u,nr=new Set([`text`,`inlineCode`,`code`,`tag`]),rr=new Set([`html`,`definition`,`footnoteDefinition`,`yaml`,`toml`,`image`,`imageReference`,`mdxFlowExpression`,`mdxTextExpression`,`mdxjsEsm`,`rawMdxFallback`,`rawMdxFallbackMdast`]),ir=new Set([`paragraph`,`heading`,`blockquote`,`list`,`listItem`,`thematicBreak`,`table`,`tableRow`,`tableCell`,`mdxJsxFlowElement`,`commentBlock`]);function ar(e,t){if(!e)return;let n=e.type;if(!rr.has(n)){if(nr.has(n)){e.value&&(t.push(e.value),n===`code`&&t.push(`
4
- `));return}if(n===`wikiLink`||n===`wikiLinkEmbed`){let n=e.data?.alias??e.value??``;n&&t.push(n);return}if(Array.isArray(e.children)){for(let n of e.children)ar(n,t);if(ir.has(n)&&t.length>0){let e=t[t.length-1];e&&!e.endsWith(`
5
- `)&&t.push(`
6
- `)}}}}function or(e){try{let t=O().parseToMdast(e),n=[];return ar(t,n),n.join(``).trim()}catch(t){return console.warn(`[document-stats] mdast parse failed, falling back to raw text`,t),e.trim()}}function sr(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))tr.test(n)&&t++;return t}function cr(e){let t=globalThis.Intl.Segmenter;if(!t)return sr(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function lr(e){let t=er.test(e)?1.5:4;return Math.ceil(e.length/t)}function ur(e){return e?{words:er.test(e)?cr(e):sr(e),chars:e.length,tokens:lr(e)}:{words:0,chars:0,tokens:0}}function dr(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=H(e);return t.trim()?ur(or(t)):{words:0,chars:0,tokens:0}}function fr(e,{isMarkdown:t}){let n=e.trim();return n?ur(t?or(e):n):$n}var pr=new Map,mr=new Set,hr=(e,t)=>`${t}:${e}`;function gr(){for(let e of mr)e()}function _r(e,t,n){let r=hr(e,t);if(n===null){pr.delete(r)&&gr();return}let i=pr.get(r);i&&i.words===n.words&&i.chars===n.chars&&i.tokens===n.tokens||(pr.set(r,n),gr())}function vr(e,t){return e===null?null:pr.get(hr(e,t))??null}function yr(e){return mr.add(e),()=>{mr.delete(e)}}function br(e){let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
7
- `,` `);return i.trim()?fr(i,{isMarkdown:!1}):null}function xr(e){let t=[];for(let n of e.state.selection.ranges)n.empty||t.push(e.state.sliceDoc(n.from,n.to));if(t.length===0)return null;let n=t.join(`
8
- `);return n.trim()?fr(n,{isMarkdown:!0}):null}export{pt as A,Et as C,ht as D,St as E,Ke as F,Ge as I,Ue as L,ft as M,st as N,mt as O,We as P,Lt as S,Vt as T,dn as _,yr as a,an as b,On as c,En as d,Dn as f,un as g,ln as h,br as i,_t as j,vt as k,Bn as l,Sn as m,_r as n,$n as o,Tn as p,xr as r,dr as s,vr as t,Cn as u,pn as v,Bt as w,Wt as x,rn as y};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{r as t}from"./DocumentContext-Bwk1Rcb4.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{P as i}from"./CodeMirrorPropInput-BQX8xzkZ.js";import{a,i as o,yt as s}from"./dist-Dhbvx6Ut.js";import{c}from"./documents-events-NL4RG6fU.js";import{n as l}from"./agent-presence-CEfNcJUY.js";import{t as u}from"./lru-string-cache-BZxOuxTi.js";var d=r(),f=e(n(),1),p=500,m=64;async function h(e){let t=`/api/agent-activity?agentId=${encodeURIComponent(e)}`,n=await fetch(t),r;try{r=await n.json()}catch(e){throw new i(`Could not parse /api/agent-activity response.`,{cause:e,status:n.status})}if(!n.ok){let e=s.safeParse(r);throw e.success?Error(e.data.title):new i(`/api/agent-activity returned a non-RFC-9457 error response.`,{cause:e.error,status:n.status})}let a=o.safeParse(r);if(!a.success)throw new i(`/api/agent-activity returned a body that did not match AgentActivitySuccessSchema.`,{cause:a.error,status:n.status});return a.data}async function g(e,t,n){let r=`/api/agent-burst-diff?agentId=${encodeURIComponent(e)}&docName=${encodeURIComponent(t)}&keptCount=${n}`,o=await fetch(r),c;try{c=await o.json()}catch(e){throw new i(`Could not parse /api/agent-burst-diff response.`,{cause:e,status:o.status})}if(!o.ok){let e=s.safeParse(c);throw e.success?Error(e.data.title):new i(`/api/agent-burst-diff returned a non-RFC-9457 error response.`,{cause:e.error,status:o.status})}let l=a.safeParse(c);if(!l.success)throw new i(`/api/agent-burst-diff returned a body that did not match AgentBurstDiffSuccessSchema.`,{cause:l.error,status:o.status});let{diff:u,before:d,after:f}=l.data;return{diff:u,before:d,after:f}}function _(e){let n=(0,d.c)(23),{systemProvider:r}=t(),[i,a]=(0,f.useState)(null),[o,s]=(0,f.useState)(`idle`),[l,_]=(0,f.useState)(null),b;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=new u(m),n[0]=b):b=n[0];let x=(0,f.useRef)(b),S=(0,f.useRef)(0),C;n[1]===r?C=n[2]:(C=e=>{let t=S.current+=1;s(`loading`),_(null),h(e).then(n=>{if(S.current!==t)return;let i=y(r,e);a({...n,writingDocs:i}),s(`ready`)}).catch(e=>{S.current===t&&(_(e instanceof Error?e.message:String(e)),s(`error`))})},n[1]=r,n[2]=C);let w=C,T;n[3]!==e||n[4]!==w?(T=()=>{if(!e){S.current+=1,a(null),s(`idle`),_(null),x.current.clear();return}x.current.clear(),w(e);let t=null,n=c(n=>{n.includes(`session-activity`)&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null,w(e)},p))});return()=>{t&&clearTimeout(t),n()}},n[3]=e,n[4]=w,n[5]=T):T=n[5];let E;n[6]===e?E=n[7]:(E=[e],n[6]=e,n[7]=E),(0,f.useEffect)(T,E);let D,O;n[8]!==e||n[9]!==r?(D=()=>{if(!e||!r)return;let t=()=>{if(!r.awareness)return;let t=y(r,e);a(e=>!e||v(e.writingDocs,t)?e:{...e,writingDocs:t})},n=r.awareness;if(!n||typeof n.on!=`function`){t();return}n.on(`update`,t),t();let i=setInterval(t,1e3);return()=>{clearInterval(i),typeof n.off==`function`&&n.off(`update`,t)}},O=[e,r],n[8]=e,n[9]=r,n[10]=D,n[11]=O):(D=n[10],O=n[11]),(0,f.useEffect)(D,O);let k;n[12]===e?k=n[13]:(k=async(t,n)=>{if(!e)return``;let r=`${t}\0${n}`,i=x.current.get(r);if(i!==void 0)return i;let{diff:a}=await g(e,t,n);return x.current.set(r,a),a},n[12]=e,n[13]=k);let A=k,j;n[14]!==e||n[15]!==w?(j=()=>{e&&w(e)},n[14]=e,n[15]=w,n[16]=j):j=n[16];let M=j,N;return n[17]!==i||n[18]!==l||n[19]!==A||n[20]!==M||n[21]!==o?(N={data:i,status:o,error:l,reload:M,fetchBurstDiff:A},n[17]=i,n[18]=l,n[19]=A,n[20]=M,n[21]=o,n[22]=N):N=n[22],N}function v(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function y(e,t){let n=new Set;if(!e)return n;let r=e.awareness;if(!l(r))return n;let i=[t,t.startsWith(`agent-`)?t.slice(6):`agent-${t}`];for(let e of r.getStates().values()){let t=e.agentPresence;if(t)for(let e of i){let r=t[e];r&&r.mode===`writing`&&r.currentDoc&&n.add(r.currentDoc)}}return n}export{_ as n,g as t};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{Zi as r}from"./dist-Dhbvx6Ut.js";var i=e(t(),1),a=n(),o={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},s=Object.keys(o),c=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`OFBmkg`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`new-folder`,category:`general`,title:{id:`96G6Re`},description:{id:`3cOo2C`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ N`,windowsLinux:`Ctrl Shift N`}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-editor-mode`,category:`general`,title:{id:`vPXOUw`},description:{id:`buNXgr`},scope:{id:`uBAxNB`},bindings:[{mac:`⌥⌘ M`,windowsLinux:`Ctrl Alt M`,match:{code:`KeyM`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`dPOFid`},description:{id:`l9HUtd`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0}}]},{id:`open-ask-ai`,category:`general`,title:{id:`xWEvuo`},description:{id:`5OTgC7`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`new-terminal-tab`,category:`general`,title:{id:`YkvmF4`},description:{id:`j2kt1j`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ J`,windowsLinux:`Ctrl Shift J`,match:{key:`j`,mod:!0,shiftKey:!0}}]},{id:`navigate-back`,category:`navigation`,title:{id:`iH8pgl`},description:{id:`cjtjry`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ [`,windowsLinux:`Alt ←`}]},{id:`navigate-forward`,category:`navigation`,title:{id:`rxWGWX`},description:{id:`XK5cbh`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ ]`,windowsLinux:`Alt →`}]},{id:`tab-new`,category:`navigation`,title:{id:`3YvS-c`},description:{id:`t6w1cq`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ T`,windowsLinux:`Ctrl T`,match:{key:`t`,mod:!0}}]},{id:`tab-next`,category:`navigation`,title:{id:`l46MqT`},description:{id:`thnPBX`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃ Tab`,windowsLinux:`Ctrl Tab`,match:{key:`Tab`,ctrlKey:!0}}]},{id:`tab-previous`,category:`navigation`,title:{id:`Mh_4hd`},description:{id:`DJd000`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃⇧ Tab`,windowsLinux:`Ctrl Shift Tab`,match:{key:`Tab`,ctrlKey:!0,shiftKey:!0}}]},{id:`tab-jump`,category:`navigation`,title:{id:`_6FVBz`},description:{id:`wGSHzy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 1-8`,windowsLinux:`Ctrl 1-8`}]},{id:`tab-jump-last`,category:`navigation`,title:{id:`N1KkEO`},description:{id:`ZQJ1IV`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 9`,windowsLinux:`Ctrl 9`}]},{id:`tab-reopen-closed`,category:`navigation`,title:{id:`hpzRlK`},description:{id:`E5WeIy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ T`,windowsLinux:`Ctrl Shift T`,match:{key:`t`,mod:!0,shiftKey:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`open-file`,category:`workspace`,title:{id:`9npOH9`},description:{id:`H08D2X`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ O`,windowsLinux:`Ctrl Shift O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-copy`,category:`workspace`,title:{id:`eGUbmF`},description:{id:`7uBlRT`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ C`,windowsLinux:`Ctrl C`}]},{id:`file-tree-paste`,category:`workspace`,title:{id:`_tjopj`},description:{id:`e4PbgC`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ V`,windowsLinux:`Ctrl V`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-delete`,category:`workspace`,title:{id:`VxO6wR`},description:{id:`osRqlv`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ Backspace`,windowsLinux:`Delete`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`add-link`,category:`wysiwyg`,title:{id:`VzGJRl`},description:{id:`u7U_Ij`},scope:{id:`v77jrg`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`view-source-at-cursor`,category:`wysiwyg`,title:{id:`zq2eBA`},description:{id:`cU-seF`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ E`,windowsLinux:`Ctrl Alt E`,match:{code:`KeyE`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`edit-with-ai`,category:`general`,title:{id:`G4-bgo`},description:{id:`a3H_MR`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ I`,windowsLinux:`Ctrl Shift I`,match:{key:`i`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`TDeOpa`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`}]},{id:`code-field-history`,category:`wysiwyg`,title:{id:`VXGFMg`},description:{id:`BkGtRl`},scope:{id:`FWSjnp`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}],l=c,u=new Map(c.map(e=>[e.id,e]));function d(e){let t=u.get(e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function f(){return r()?`mac`:`windowsLinux`}var p=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function m(e){return e.split(` / `).map(e=>p.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function h(e,t=f()){return t===`mac`?e.mac:e.windowsLinux}function g(e,t=f()){return m(h(e,t))}function _(e,t=f()){return h(d(e).bindings[0],t)}function v(e,t=f()){return g(d(e).bindings[0],t)}function y(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function b(e,t,n=f()){return d(t).bindings.some(t=>{let r=x(t.match,n);return r?C(e,r,n):!1})}function x(e,t){return e?S(e)?e:e[t]??null:null}function S(e){return`key`in e||`code`in e}function C(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.metaKey??(t.mod?n===`mac`:!1),i=t.ctrlKey??(t.mod?n===`windowsLinux`:!1),a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}var w=`#settings`;function T(e){return`#settings/${e}`}var E=`open-knowledge:settings-section-intent`;function D(e){if(typeof window>`u`)return()=>{};let t=t=>{let{detail:n}=t;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function O(e){if(typeof window>`u`)return;let t=T(e);if(I(window.location.hash)){window.history.replaceState(null,``,t),window.dispatchEvent(new CustomEvent(E,{detail:e}));return}window.location.hash!==t&&(window.location.hash=t)}var k=`configure-agents`;function A(){O(k)}var j=`plugins-manage`;function M(){O(j)}function N(e){return`plugin:${e}`}function P(e){O(N(e))}function F(e){return y(e.target)?!1:b(e,`settings`)}function I(e){let t=e.replace(/^#/,``);return t===`settings`?!0:t.startsWith(`settings/`)&&t.length>9}function L(e){let t=e.replace(/^#/,``);if(!t.startsWith(`settings/`))return null;let n=t.slice(9);return n.length>0?n:null}function R(){return typeof window>`u`?``:window.location.hash}function z(){let e=(0,a.c)(5),[t,n]=(0,i.useState)(H),[r,o]=(0,i.useState)(V),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{(0,i.startTransition)(()=>{let e=R();n(I(e)),o(L(e))})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},c=[],e[0]=s,e[1]=c):(s=e[0],c=e[1]),(0,i.useEffect)(s,c);let l=B,u;return e[2]!==t||e[3]!==r?(u={open:t,section:r,close:l},e[2]=t,e[3]=r,e[4]=u):u=e[4],u}function B(){typeof window>`u`||I(R())&&window.history.back()}function V(){return L(R())}function H(){return I(R())}export{y as _,P as a,z as c,s as d,_ as f,m as g,v as h,A as i,l,g as m,I as n,M as o,h as p,F as r,D as s,w as t,o as u,b as v};
@@ -1,6 +0,0 @@
1
- import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{m as r,r as i}from"./DocumentContext-Bwk1Rcb4.js";import{t as a}from"./react-f2sANaYj.js";import{t as o}from"./react-dom-DPxgxlDT.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{A as c,J as l,tt as u}from"./CodeMirrorPropInput-BQX8xzkZ.js";import{Ki as d,Ni as f,Y as p,aa as m,ba as h,ga as g,ia as _,la as v,ma as y,ua as b,ui as x,va as S,ya as C}from"./dist-Dhbvx6Ut.js";import{t as ee}from"./libesm-Db-3Gx3Z.js";var w=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.unescapeToken=t,e.escapeToken=n;function t(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function n(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.Pointer=function(){function e(e){e===void 0&&(e=[``]),this.tokens=e}return e.fromJSON=function(n){var r=n.split(`/`).map(t);if(r[0]!==``)throw Error(`Invalid JSON Pointer: ${n}`);return new e(r)},e.prototype.toString=function(){return this.tokens.map(n).join(`/`)},e.prototype.evaluate=function(e){for(var t=null,n=``,r=e,i=1,a=this.tokens.length;i<a;i++)t=r,n=this.tokens[i],!(n==`__proto__`||n==`constructor`||n==`prototype`)&&(r=(t||{})[n]);return{parent:t,key:n,value:r}},e.prototype.get=function(e){return this.evaluate(e).value},e.prototype.set=function(e,t){var n=this.evaluate(e);n.parent&&(n.parent[n.key]=t)},e.prototype.push=function(e){this.tokens.push(e)},e.prototype.add=function(t){return new e(this.tokens.concat(String(t)))},e.prototype.parent=function(){return new e(this.tokens.length>1?this.tokens.slice(0,-1):[``])},e}()})),T=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasOwnProperty=void 0,e.objectType=t,e.clone=r,e.hasOwnProperty=Object.prototype.hasOwnProperty;function t(e){return e===void 0?`undefined`:e===null?`null`:Array.isArray(e)?`array`:typeof e}function n(e){return typeof e==`object`&&!!e}function r(t){if(!n(t))return t;if(t.constructor==Array){for(var i=t.length,a=Array(i),o=0;o<i;o++)a[o]=r(t[o]);return a}if(t.constructor==Date)return new Date(+t);var s={};for(var c in t)e.hasOwnProperty.call(t,c)&&(s[c]=r(t[c]));return s}})),E=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isDestructive=n,e.subtract=r,e.intersection=i,e.diffArrays=l,e.diffObjects=u,e.diffAny=d;var t=T();function n(e){var t=e.op;return t===`remove`||t===`replace`||t===`copy`||t===`move`}function r(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&!(t.hasOwnProperty.call(n,i)&&n[i]!==void 0)&&r.push(i);return r}function i(e){for(var n=e.length,r={},i=0;i<n;i++){var a=e[i];for(var o in a)t.hasOwnProperty.call(a,o)&&a[o]!==void 0&&(r[o]=(r[o]||0)+1)}for(var o in r)r[o]<n&&delete r[o];return Object.keys(r)}function a(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&t.hasOwnProperty.call(n,i)&&n[i]!==void 0&&r.push(i);return r}function o(e){return e.op===`add`}function s(e){return e.op===`remove`}function c(e,t){return{operations:e.operations.concat(t),cost:e.cost+1}}function l(e,t,n,r){r===void 0&&(r=d);var i=Math.max(e.length,t.length),a=new Map([[0,{operations:[],cost:0}]]);function l(o,s){var u=o*i+s,d=a.get(u);if(d===void 0){if(o>0&&s>0&&!r(e[o-1],t[s-1],n.add(String(o-1))).length)d=l(o-1,s-1);else{var f=[];if(o>0){var p=l(o-1,s),m={op:`remove`,index:o-1};f.push(c(p,m))}if(s>0){var h=l(o,s-1),g={op:`add`,index:o-1,value:t[s-1]};f.push(c(h,g))}if(o>0&&s>0){var _=l(o-1,s-1),v={op:`replace`,index:o-1,original:e[o-1],value:t[s-1]};f.push(c(_,v))}d=f.sort(function(e,t){return e.cost-t.cost})[0]}a.set(u,d)}return d}var u=isNaN(e.length)||e.length<=0?0:e.length;return l(u,isNaN(t.length)||t.length<=0?0:t.length).operations.reduce(function(e,t){var i=e[0],a=e[1];if(o(t)){var c=t.index+1+a,l=c<u+a?String(c):`-`,d={op:t.op,path:n.add(l).toString(),value:t.value};return[i.concat(d),a+1]}else if(s(t)){var d={op:t.op,path:n.add(String(t.index+a)).toString()};return[i.concat(d),a-1]}else{var f=n.add(String(t.index+a)),p=r(t.original,t.value,f);return[i.concat.apply(i,p),a]}},[[],0])[0]}function u(e,t,n,i){i===void 0&&(i=d);var o=[];return r(e,t).forEach(function(e){o.push({op:`remove`,path:n.add(e).toString()})}),r(t,e).forEach(function(e){o.push({op:`add`,path:n.add(e).toString(),value:t[e]})}),a(e,t).forEach(function(r){o.push.apply(o,i(e[r],t[r],n.add(r)))}),o}function d(e,n,r,i){if(i===void 0&&(i=d),e===n)return[];var a=(0,t.objectType)(e),o=(0,t.objectType)(n);return a==`array`&&o==`array`?l(e,n,r,i):a==`object`&&o==`object`?u(e,n,r,i):[{op:`replace`,path:r.toString(),value:n}]}})),te=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.InvalidOperationError=e.TestError=e.MissingError=void 0,e.add=l,e.remove=u,e.replace=d,e.move=f,e.copy=p,e.test=m,e.apply=g;var n=w(),r=T(),i=E(),a=function(e){t(n,e);function n(t){var n=e.call(this,`Value required at path: ${t}`)||this;return n.path=t,n.name=`MissingError`,n}return n}(Error);e.MissingError=a;var o=function(e){t(n,e);function n(t,n){var r=e.call(this,`Test failed: ${t} != ${n}`)||this;return r.actual=t,r.expected=n,r.name=`TestError`,r}return n}(Error);e.TestError=o;function s(e,t,n){if(Array.isArray(e))if(t==`-`)e.push(n);else{var r=parseInt(t,10);e.splice(r,0,n)}else e[t]=n}function c(e,t){if(Array.isArray(e)){var n=parseInt(t,10);e.splice(n,1)}else delete e[t]}function l(e,t,i){var o=n.Pointer.fromJSON(t.path);if(i?.implicitArrayCreation&&o.tokens[o.tokens.length-1]===`-`){var c=o.parent().evaluate(e);c.value===void 0&&(0,r.objectType)(c.parent)===`object`&&(c.parent[c.key]=[])}var l=o.evaluate(e);return l.parent===void 0||i?.implicitArrayCreation&&l.key===`-`&&!Array.isArray(l.parent)?new a(t.path):(s(l.parent,l.key,(0,r.clone)(t.value)),null)}function u(e,t,r){var i=n.Pointer.fromJSON(t.path).evaluate(e);return i.value===void 0?new a(t.path):(c(i.parent,i.key),null)}function d(e,t,i){var o=n.Pointer.fromJSON(t.path).evaluate(e);if(o.parent===null)return new a(t.path);if(Array.isArray(o.parent)){if(parseInt(o.key,10)>=o.parent.length)return new a(t.path)}else if(o.value===void 0)return new a(t.path);return o.parent[o.key]=(0,r.clone)(t.value),null}function f(e,t,r){var i=n.Pointer.fromJSON(t.from).evaluate(e);if(i.value===void 0)return new a(t.from);var o=n.Pointer.fromJSON(t.path).evaluate(e);return o.parent===void 0?new a(t.path):(c(i.parent,i.key),s(o.parent,o.key,i.value),null)}function p(e,t,i){var o=n.Pointer.fromJSON(t.from).evaluate(e);if(o.value===void 0)return new a(t.from);var c=n.Pointer.fromJSON(t.path).evaluate(e);return c.parent===void 0?new a(t.path):(s(c.parent,c.key,(0,r.clone)(o.value)),null)}function m(e,t,r){var a=n.Pointer.fromJSON(t.path).evaluate(e);return(0,i.diffAny)(a.value,t.value,new n.Pointer).length?new o(a.value,t.value):null}var h=function(e){t(n,e);function n(t){var n=e.call(this,`Invalid operation: ${t.op}`)||this;return n.operation=t,n.name=`InvalidOperationError`,n}return n}(Error);e.InvalidOperationError=h;function g(e,t,n){switch(t.op){case`add`:return l(e,t,n);case`remove`:return u(e,t,n);case`replace`:return d(e,t,n);case`move`:return f(e,t,n);case`copy`:return p(e,t,n);case`test`:return m(e,t,n)}return new h(t)}})),ne=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=w();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=te(),r=E();function i(e,t,r){return t.map(function(t){return(0,n.apply)(e,t,r)})}function a(e){function t(n,i,a){var o=e(n,i,a);return Array.isArray(o)?o:(0,r.diffAny)(n,i,a,t)}return t}function o(e,n,i){var o=new t.Pointer;return(i?a(i):r.diffAny)(e,n,o)}})),D=e(a(),1),re=e(o(),1),O=s(),k=ne();function A(){}A.prototype={diff:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.callback;typeof n==`function`&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var o=t.length,s=e.length,c=1,l=o+s;n.maxEditLength&&(l=Math.min(l,n.maxEditLength));var u=n.timeout??1/0,d=Date.now()+u,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=s&&p+1>=o)return a([{value:this.join(t),count:t.length}]);var m=-1/0,h=1/0;function g(){for(var n=Math.max(m,-c);n<=Math.min(h,c);n+=2){var r=void 0,l=f[n-1],u=f[n+1];l&&(f[n-1]=void 0);var d=!1;if(u){var g=u.oldPos-n;d=u&&0<=g&&g<o}var _=l&&l.oldPos+1<s;if(!d&&!_){f[n]=void 0;continue}if(r=!_||d&&l.oldPos+1<u.oldPos?i.addToPath(u,!0,void 0,0):i.addToPath(l,void 0,!0,1),p=i.extractCommon(r,t,e,n),r.oldPos+1>=s&&p+1>=o)return a(ie(i,r.lastComponent,t,e,i.useLongestToken));f[n]=r,r.oldPos+1>=s&&(h=Math.min(h,n-1)),p+1>=o&&(m=Math.max(m,n+1))}c++}if(r)(function e(){setTimeout(function(){if(c>l||Date.now()>d)return r();g()||e()},0)})();else for(;c<=l&&Date.now()<=d;){var _=g();if(_)return _}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.oldPos,s=o-r,c=0;s+1<i&&o+1<a&&this.equals(t[s+1],n[o+1]);)s++,o++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split(``)},join:function(e){return e.join(``)}};function ie(e,t,n,r,i){for(var a=[],o;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,c=a.length,l=0,u=0;s<c;s++){var d=a[s];if(!d.removed){if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}else if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,s&&a[s-1].added){var p=a[s-1];a[s-1]=a[s],a[s]=p}}var m=a[c-1];return c>1&&typeof m.value==`string`&&(m.added||m.removed)&&e.equals(``,m.value)&&(a[c-2].value+=m.value,a.pop()),a}var j=new A;function ae(e,t,n){return j.diff(e,t,n)}var M=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,N=/\S/,P=new A;P.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!N.test(e)&&!N.test(t)},P.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&M.test(t[n])&&M.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function oe(e,t,n){return P.diff(e,t,n)}var F=new A;F.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
2
- `));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var I=new A;I.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var se=new A;se.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function L(e){"@babel/helpers - typeof";return L=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},L(e)}var ce=Object.prototype.toString,R=new A;R.useLongestToken=!0,R.tokenize=F.tokenize,R.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(e,t){return t===void 0?n:t}:r;return typeof e==`string`?e:JSON.stringify(z(e,null,null,i),i,` `)},R.equals=function(e,t){return A.prototype.equals.call(R,e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`))};function z(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var o;if(ce.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=z(e[a],t,n,r,i);return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),L(e)===`object`&&e!==null){t.push(e),o={},n.push(o);var s=[],c;for(c in e)e.hasOwnProperty(c)&&s.push(c);for(s.sort(),a=0;a<s.length;a+=1)c=s[a],o[c]=z(e[c],t,n,r,c);t.pop(),n.pop()}else o=e;return o}var B=new A;B.tokenize=function(e){return e.slice()},B.join=B.removeEmpty=function(e){return e};function V(e,t){let n=t.content.findDiffStart(e.content);if(n===null)return!1;let{a:r,b:i}=t.content.findDiffEnd(e.content),a=n-Math.min(r,i);return a>0&&(e.resolve(n-a).depth<t.resolve(r+a).depth?n-=a:(r+=a,i+=a)),new S(n,i,t.slice(n,r))}function le(e){if(!e.steps.length)return;let t=new C(e.docs[0]),n=e.steps.slice();for(;n.length;){let e=n.shift();for(;n.length&&e.merge(n[0]);){let r=n.shift();e=e instanceof S&&r instanceof S?V(t.doc,r.apply(e.apply(t.doc).doc).doc):e.merge(r)}t.step(e)}return t}function H(e){let t=new C(e);return t.removeMark(0,e.nodeSize-2),t.doc}function U(e,t){let n=t.split(`/`);for(n.shift();n.length;){if(typeof e!=`object`)throw Error();let t=n.shift();e=e[t]}return e}function W(e){return JSON.parse(JSON.stringify(e))}var ue=class{fromDoc;toDoc;complexSteps;wordDiffs;simplifyDiff;schema;tr;currentJSON;finalJSON;ops;constructor(e,t,n={}){let r={complexSteps:!0,wordDiffs:!1,simplifyDiff:!0,...n};this.fromDoc=e,this.toDoc=t,this.complexSteps=r.complexSteps,this.wordDiffs=r.wordDiffs,this.simplifyDiff=r.simplifyDiff,this.schema=e.type.schema,this.tr=new C(e),this.currentJSON={},this.finalJSON={},this.ops=[]}init(){return this.complexSteps?(this.currentJSON=H(this.fromDoc).toJSON(),this.finalJSON=H(this.toDoc).toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps(),this.recreateChangeMarkSteps()):(this.currentJSON=this.fromDoc.toJSON(),this.finalJSON=this.toDoc.toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps()),this.simplifyDiff&&(this.tr=le(this.tr)||this.tr),this.tr}recreateChangeContentSteps(){let e=[];for(;this.ops.length;){let t=this.ops.shift();e.push(t);let n,r=W(this.currentJSON),i=t.path.split(`/`);for(;n==null;){(0,k.applyPatch)(r,[t]);try{n=this.schema.nodeFromJSON(r),n.check()}catch{if(n=null,this.ops.length>0)t=this.ops.shift(),e.push(t);else throw Error(`No valid diff possible applying ${t.path}`)}}this.complexSteps&&e.length===1&&(i.includes(`attrs`)||i.includes(`type`))?(this.addSetNodeMarkup(),e=[]):e.length===1&&t.op===`replace`&&i[i.length-1]===`text`?(this.addReplaceTextSteps(t,r),e=[]):this.addReplaceStep(n,r)&&(e=[])}}addSetNodeMarkup(){let e=this.schema.nodeFromJSON(this.currentJSON),t=this.schema.nodeFromJSON(this.finalJSON),n=t.content.findDiffStart(e.content),r=e.nodeAt(n),i=t.nodeAt(n);if(n!=null){let e=r.type===i.type?null:i.type;try{this.tr.setNodeMarkup(n,e,i.attrs,i.marks)}catch(t){if(e&&t.message.includes(`Invalid content`))this.tr.replaceWith(n,n+r.nodeSize,i);else throw t}return this.currentJSON=H(this.tr.doc).toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),!0}return!1}recreateChangeMarkSteps(){this.toDoc.descendants((e,t)=>{if(!e.isInline)return!0;this.tr.doc.nodesBetween(t,t+e.nodeSize,(n,r)=>{if(!n.isInline)return!0;let i=Math.max(t,r),a=Math.min(t+e.nodeSize,r+n.nodeSize);n.marks.forEach(t=>{t.isInSet(e.marks)||this.tr.removeMark(i,a,t)}),e.marks.forEach(e=>{e.isInSet(n.marks)||this.tr.addMark(i,a,e)})})})}addReplaceStep(e,t){let n=V(this.schema.nodeFromJSON(this.currentJSON),e);if(!n)return!1;if(!this.tr.maybeStep(n).failed)return this.currentJSON=t,!0;throw Error(`No valid step found.`)}addReplaceTextSteps(e,t){let n={...e,value:`xx`},r={...e,value:`yy`},i=W(this.currentJSON),a=W(this.currentJSON);(0,k.applyPatch)(i,[n]),(0,k.applyPatch)(a,[r]);let o=this.schema.nodeFromJSON(i),s=this.schema.nodeFromJSON(a),c=e.value,l=U(this.currentJSON,e.path),u=this.wordDiffs?oe(l,c):ae(l,c),d=o.content.findDiffStart(s.content),f=o.resolve(d+1).marks();for(;u.length;){let e=u.shift();if(e.added){let t=this.schema.nodeFromJSON({type:`text`,text:e.value}).mark(f);if(u.length&&u[0].removed){let e=u.shift();this.tr.replaceWith(d,d+e.value.length,t)}else this.tr.insert(d,t);d+=e.value.length}else if(e.removed)if(u.length&&u[0].added){let t=u.shift(),n=this.schema.nodeFromJSON({type:`text`,text:t.value}).mark(f);this.tr.replaceWith(d,d+e.value.length,n),d+=t.value.length}else this.tr.delete(d,d+e.value.length);else d+=e.value.length}this.currentJSON=t}};function de(e,t,n={}){return new ue(e,t,n).init()}var G=new Set([`list`,`bulletList`,`orderedList`,`taskList`]);function K(e){let t=[];return e.forEach((e,n)=>{if(G.has(e.type.name)){let r=n+1,i=0;e.forEach(e=>{let n=r+i;t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`}),i+=e.nodeSize})}else t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`})}),t}function fe(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;a--)for(let n=r-1;n>=0;n--)i[a][n]=e[a].key===t[n].key?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o].key===t[s].key?(a.push({type:`same`,b:t[s]}),o++,s++):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,a:e[o]}),o++):(a.push({type:`ins`,b:t[s]}),s++);for(;o<n;)a.push({type:`del`,a:e[o++]});for(;s<r;)a.push({type:`ins`,b:t[s++]});return a}function pe(e,t){let n=fe(K(e),K(t)),r=[],i=0;for(let e of n)e.type===`same`?i=e.b.to:e.type===`ins`?(r.push({fromA:0,toA:0,fromB:e.b.from,toB:e.b.to}),i=e.b.to):r.push({fromA:e.a.from,toA:e.a.to,fromB:i,toB:i});return r}var me=400;function q(e,t,n){return t.nodeFromJSON(e.parseWithFallback(n))}function he(e,t){let n=t.filter(e=>e.toB>e.fromB),r=[];return e.steps.forEach((t,i)=>{let a=t instanceof y?`add`:t instanceof g?`remove`:null;if(a===null)return;let o=t,s=e.mapping.slice(i+1),c=s.map(o.from,-1),l=s.map(o.to,1);if(l<=c||n.some(e=>e.fromB<=c&&l<=e.toB))return;let u=e.mapping.slice(0,i).invert(),d=u.map(o.from),f=u.map(o.to);f<=d||r.push({fromA:d,toA:f,fromB:c,toB:l,markName:o.mark.type.name,kind:a})}),r}function ge(e,t,n,r){if(e.length>2e5||t.length>2e5)return{ok:!1,reason:`ceiling`};let i,a;try{i=q(r,n,e),a=q(r,n,t)}catch{return{ok:!1,reason:`parse`}}let o=a,s=null;try{s=de(i,a,{complexSteps:!0,wordDiffs:!0,simplifyDiff:!0}),o=s.doc}catch{}let c=pe(i,o),l=s?he(s,c):[];return c.length+l.length>me?{ok:!1,reason:`ceiling`}:{ok:!0,afterDoc:o,beforeDoc:i,changes:c,markChanges:l}}var _e=`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`;function ve(e){return e.changes.length+2*e.markChanges.length}function J(e){let t=!1;return e.forEach(e=>{e.isBlock&&(t=!0)}),t}function ye(e){if(e.childCount===0)return!1;let t=!0;return e.forEach(e=>{e.type.name!==`listItem`&&e.type.name!==`taskItem`&&(t=!1)}),t}function Y(e,t,n){let r=document.createElement(n?`div`:`span`);r.className=n?`ok-diff-del ok-diff-del-block`:`ok-diff-del`,r.setAttribute(`data-diff-deleted`,``);let i=e.serializeFragment(t);if(n&&ye(t)){let e=document.createElement(`ul`);e.appendChild(i),r.appendChild(e)}else r.appendChild(i);return r}function be(e,t,n,r,i){let a=h.fromSchema(i),o=[];for(let e of r){let n=t.slice(e.fromA,e.toA),r=J(n.content);o.push(_.widget(e.fromB,()=>Y(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]})),o.push(_.inline(e.fromB,e.toB,{class:`ok-diff-ins`},{inclusiveEnd:!0}))}for(let e of n)if(e.toB>e.fromB&&o.push(_.node(e.fromB,e.toB,{class:`ok-diff-ins-block`})),e.toA>e.fromA){let n=t.slice(e.fromA,e.toA),r=J(n.content);o.push(_.widget(e.fromB,()=>Y(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]}))}return m.create(e,o)}var xe=new Set([`slashCommand`,`blockDragHandle`,`blockMover`,`tableInsertControls`,`fileHandler`,`gfmAutolink`,`inlineLinkInputRule`,`keyboardNav`,`tiptapFindReplace`,`selectionState`,`sourceDirtyObserver`,`tabFocusTrap`]),X=r.filter(e=>!xe.has(e.name)).map(e=>e.name===`jsxComponent`?p:e),Z=n(),Q=d(X);function Se(e,t){return ge(e,t,Q,c())}var Ce=f.create({name:`renderedDiffDecorations`,addOptions(){return{decorations:m.empty}},addProseMirrorPlugins(){let e=this.options.decorations;return[new v({key:new b(`renderedDiffDecorations`),props:{decorations:()=>e}})]}});function we(e){let t=(0,O.c)(31),{diff:n}=e,r,i,a,o;if(t[0]!==n.afterDoc||t[1]!==n.beforeDoc||t[2]!==n.changes||t[3]!==n.markChanges){let e=be(n.afterDoc,n.beforeDoc,n.changes,n.markChanges,Q);o=u,a=!1,r=X,i=Ce.configure({decorations:e}),t[0]=n.afterDoc,t[1]=n.beforeDoc,t[2]=n.changes,t[3]=n.markChanges,t[4]=r,t[5]=i,t[6]=a,t[7]=o}else r=t[4],i=t[5],a=t[6],o=t[7];let s;t[8]!==r||t[9]!==i?(s=[...r,i],t[8]=r,t[9]=i,t[10]=s):s=t[10];let c;t[11]===n.afterDoc?c=t[12]:(c=n.afterDoc.toJSON(),t[11]=n.afterDoc,t[12]=c);let d;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(d={attributes:{class:`pt-4`}},t[13]=d):d=t[13];let f;t[14]!==a||t[15]!==s||t[16]!==c?(f={editable:a,extensions:s,content:c,editorProps:d},t[14]=a,t[15]=s,t[16]=c,t[17]=f):f=t[17];let p;t[18]===n?p=t[19]:(p=[n],t[18]=n,t[19]=p);let m=o(f,p),[h]=(0,D.useState)(Te),g=(0,D.useRef)(null),_,v;t[20]===h?(_=t[21],v=t[22]):(_=()=>{let e=g.current;if(e)return e.appendChild(h),()=>{h.parentNode===e&&e.removeChild(h)}},v=[h],t[20]=h,t[21]=_,t[22]=v),(0,D.useLayoutEffect)(_,v);let y;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(`div`,{className:`tiptap-editor`,children:(0,Z.jsx)(`div`,{ref:g,style:{display:`contents`}})}),t[23]=y):y=t[23];let b;t[24]===m?b=t[25]:(b=(0,Z.jsx)(l,{editor:m,className:`tiptap-editor-portal-content`}),t[24]=m,t[25]=b);let x;t[26]!==h||t[27]!==b?(x=(0,re.createPortal)(b,h),t[26]=h,t[27]=b,t[28]=x):x=t[28];let S;return t[29]===x?S=t[30]:(S=(0,Z.jsxs)(`div`,{className:`editor-doc-scroll min-h-0 flex-1`,"data-testid":`rendered-diff-view`,children:[y,x]}),t[29]=x,t[30]=S),S}function Te(){let e=document.createElement(`div`);return e.style.display=`contents`,e}function Ee(e){let t=0,n=!1;for(let r of e.split(`
3
- `)){let e=r.startsWith(`+`)&&!r.startsWith(`+++`)||r.startsWith(`-`)&&!r.startsWith(`---`);e&&!n&&(t+=1),n=e}return t}function De(e){let t=Array.from(e.querySelectorAll(`.diff-code-insert, .diff-code-delete`)),n=[],r=null;for(let e of t){let t=e.closest(`tr`);t&&((r===null||t.previousElementSibling!==r)&&n.push(e),r=t)}return n}function $(e){let t=0,n=0;for(let r of e.split(`
4
- `))r.startsWith(`+`)&&!r.startsWith(`+++`)?t++:r.startsWith(`-`)&&!r.startsWith(`---`)&&n++;return{additions:t,deletions:n}}function Oe(e,t){return`${e}\u0000${t}`}function ke(e,t,n){let r=x(e).body,i=x(t).body;return r===i?``:ee(n,r,i,``,``,{context:Math.max(r.split(`
5
- `).length,i.split(`
6
- `).length)})}function Ae(e,t,n,r,a){let o=(0,O.c)(10),s=r===void 0?`vs-live`:r,c=a===void 0?null:a,{activeProvider:l}=i(),u;o[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={status:`idle`,diff:null},o[0]=u):u=o[0];let[d,f]=(0,D.useState)(u),p=(0,D.useRef)(l),m;o[1]===l?m=o[2]:(m=()=>{p.current=l},o[1]=l,o[2]=m),(0,D.useEffect)(m);let h,g;return o[3]!==n||o[4]!==t||o[5]!==s||o[6]!==c||o[7]!==e?(h=()=>{if(!e){f({status:`idle`,diff:null});return}let r=e,i=!1;f({status:`loading`,diff:null});let a=async function(e){let r=Oe(t,e),i=n.get(r);if(i!==void 0)return i;let a=await fetch(`/api/history/${e}?docName=${encodeURIComponent(t)}`);if(!a.ok)return console.error(`[timeline-diff] history fetch returned non-ok response`,{sha:e,docName:t,status:a.status}),null;let o=(await a.json()).content??``;return n.set(r,o),o};return(async function(){try{let e=await a(r);if(i)return;if(e===null){f({status:`error`,diff:null});return}let n,o;if(s===`vs-parent`){let t=c?await a(c):``;if(i)return;if(t===null){f({status:`error`,diff:null});return}n=t,o=e}else n=e,o=p.current?.document.getText(`source`).toString()??``;let l=x(n).body,u=x(o).body,d=ke(n,o,t);if(i)return;let{additions:m,deletions:h}=$(d);f({status:`ready`,diff:d,additions:m,deletions:h,before:l,after:u})}catch(e){i||(console.error(`[timeline-diff] failed to load entry diff`,{sha:r,docName:t,mode:s,err:e}),f({status:`error`,diff:null}))}})(),()=>{i=!0}},g=[e,t,n,s,c],o[3]=n,o[4]=t,o[5]=s,o[6]=c,o[7]=e,o[8]=h,o[9]=g):(h=o[8],g=o[9]),(0,D.useEffect)(h,g),d}export{we as a,ve as c,Ee as i,Ae as n,Se as o,De as r,_e as s,$ as t};
@@ -1 +0,0 @@
1
- import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-5FCAYU7R-8Y9BJKC-.js";export{e as createWardleyServices};
@@ -1 +0,0 @@
1
- import{t as e}from"./repair-skills-SFM8UbHd.mjs";export{e as repairSkills};
@@ -1 +0,0 @@
1
- import{a as e,o as t,r as n}from"./server-lock-DKdlkhpB.mjs";export{n as markServerLockDraining,e as releaseServerLock,t as updateServerLockPort};