@inkeep/open-knowledge 0.49.0-beta.17 → 0.49.0-beta.19
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.
- package/dist/THIRD_PARTY_NOTICES.md +65 -0
- package/dist/{acp-harness-probe-D4sxfShG.mjs → acp-harness-probe-LaCFnpTK.mjs} +2 -2
- package/dist/cli.mjs +7 -7
- package/dist/constants-dgudSCTU.mjs +2 -0
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +1 -1
- package/dist/{init-BSftZaYd.mjs → init-B-WdJcX1.mjs} +3 -3
- package/dist/init-D4DAuk30.mjs +1 -0
- package/dist/{launch-json-removal-BAZK0l8a.mjs → launch-json-removal-Q2Y-B9Ol.mjs} +2 -2
- package/dist/loader-D85DW2Ky.mjs +1 -0
- package/dist/{loader-Dc3JqrRk.mjs → loader-SiciGS_a.mjs} +2 -2
- package/dist/{open-browser-DNGjsMld.mjs → open-browser-WfQL3wzU.mjs} +2 -2
- package/dist/preview-CgxcxU-Z.mjs +1 -0
- package/dist/{preview-oQZVmLMv.mjs → preview-DA_7mMHF.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-n6upvTW8.js → ActivityModeContent-BbbMd0Aa.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-pp-kY810.js → AgentDiffPane-BnU8Fq1H.js} +2 -2
- package/dist/public/assets/{AgentThreadClientBinder-Biv4Zdo5.js → AgentThreadClientBinder-Dg7kpSW2.js} +1 -1
- package/dist/public/assets/{AppMenubar-CbB3Kvzl.js → AppMenubar-DgbuW3Mn.js} +1 -1
- package/dist/public/assets/{BugReportHistory-ByqtNKfa.js → BugReportHistory-CF0synre.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-DjkEJgWk.js → BugReportHistoryDialog-RyYP9c6e.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-Bg-4Rhrv.js → ChangedOutsideBadge-Cjb9sWFy.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-BN9DkK26.js → CodeMirrorPropInput-DAKQ_zlh.js} +3 -3
- package/dist/public/assets/{ConfigSharingInfoTooltip-Q3RTOsMb.js → ConfigSharingInfoTooltip-C34Mqu2n.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-Z8_xWIxM.js → ConsentDialogBody-D2cqdMrg.js} +1 -1
- package/dist/public/assets/{CopyButton-DfXJBl0I.js → CopyButton-DysciFW5.js} +1 -1
- package/dist/public/assets/{DiffView-Bl0_dOLv.js → DiffView-vtrGUscK.js} +1 -1
- package/dist/public/assets/{DocumentContext-AhoahLLY.js → DocumentContext-DDYJbJQf.js} +21 -21
- package/dist/public/assets/{EditorModeToggle-BuMW2IKR.js → EditorModeToggle-tM6Tv09P.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CZGyy-gQ.js → EnableSyncConfirmDialog-BuxbaI9r.js} +1 -1
- package/dist/public/assets/FeedbackForm-B7ifPAA-.js +1 -0
- package/dist/public/assets/{GraphPanel-Chl4d5Cn.js → GraphPanel-Duz6DAfx.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-9TmZa8Xu.js → ImportSkillDialog-Dx0-Kt1V.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-NG9lVrVr.js → LintConfigEditor-C5hc4tDU.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CqCnvP1t.js +2 -0
- package/dist/public/assets/ManagedArtifactProperties-DfZxJ-R5.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-CXTJ3hvD.js → McpConsentDialogBody-DH2Kth2j.js} +1 -1
- package/dist/public/assets/{Mermaid-5Egs9Kop.js → Mermaid-EN9ImzAU.js} +2 -2
- package/dist/public/assets/{MermaidDocEditor-CuBhijnc.js → MermaidDocEditor-jeR8fGZU.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-C86VMw2X.js → RegisteredAgentIcon-B0CO1bW-.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-BziQ7PHj.js → ReportBugDialogBody-DfM9Liz9.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-CteLTKvM.js → SchemaConfigEditor-CeLaMMN1.js} +1 -1
- package/dist/public/assets/SessionsHost-CHtrAFfJ.js +2 -0
- package/dist/public/assets/{SettingsDialogBody-CmI-JgZq.js → SettingsDialogBody-BlfbmqFK.js} +2 -2
- package/dist/public/assets/{ShareBranchSwitchDialog-lme5IS3-.js → ShareBranchSwitchDialog-BfXB6yAf.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-B3NOY4at.js → ShareReceiveDialog-DhyJYkDM.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-BRfn7AHn.js → ShareReceiveMissDialog-BZC_iNtu.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-DRHIV9HK.js → SkillEditBanner-B_rCSPhd.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DWokCMi-.js → SkillOriginInline-CayMH5aY.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-B2sDzDyo.js → SkillToolbarControls-0FXJPu-r.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-CJnETn-Y.js → SlidesToolbarControls-BLaXC3GF.js} +1 -1
- package/dist/public/assets/SourceEditor-pZVXflVl.js +1 -0
- package/dist/public/assets/{TerminalPanel-Dilr8t7_.js → TerminalPanel-B2LAcV5N.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-yPU9388A.js → TerminalWindowApp-DRvxLVN8.js} +1 -1
- package/dist/public/assets/{TextDocEditor-ET923el3.js → TextDocEditor-Dhe_1jpj.js} +1 -1
- package/dist/public/assets/ThreadView-CELe2BYG.js +10 -0
- package/dist/public/assets/{TimelineDiffPane-C65Oyf_V.js → TimelineDiffPane-CAtjmwzw.js} +2 -2
- package/dist/public/assets/{abnfDiagram-VRR7QNED-D_khKPsq.js → abnfDiagram-VRR7QNED-BT4E4K73.js} +1 -1
- package/dist/public/assets/{agent-diff-store-CgZBsYlZ.js → agent-diff-store-B87ed59m.js} +1 -1
- package/dist/public/assets/agent-visibility-DUGhAO32.js +1 -0
- package/dist/public/assets/{arc-BSg5_L5f.js → arc-DWS63c4g.js} +1 -1
- package/dist/public/assets/architecture-TIHT7OUA-DKDnEx-J.js +1 -0
- package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-DSHzhG2V.js → architectureDiagram-ZJ3FMSHR-C7ATAQRT.js} +1 -1
- package/dist/public/assets/arrow-up-right-0IN5lFEX.js +1 -0
- package/dist/public/assets/{auth-state-cache-D4EZ8bSX.js → auth-state-cache-CWF3NDeJ.js} +2 -2
- package/dist/public/assets/{blockDiagram-677ZJIJ3-C74Ofxze.js → blockDiagram-677ZJIJ3-0XzCwsjs.js} +1 -1
- package/dist/public/assets/{braces-PuTG97X6.js → braces-Ytg60O62.js} +1 -1
- package/dist/public/assets/{c4Diagram-LMCZKHZV-CK9kFunN.js → c4Diagram-LMCZKHZV-DF_YvBJq.js} +1 -1
- package/dist/public/assets/{calendar-DNCCx2Tn.js → calendar-BFaqjDfb.js} +1 -1
- package/dist/public/assets/{case-sensitive-DyF7sIpA.js → case-sensitive-DvBZDISP.js} +1 -1
- package/dist/public/assets/channel-wzRnnGj4.js +1 -0
- package/dist/public/assets/check-BLuQ2zvV.js +1 -0
- package/dist/public/assets/{checkbox-k5Do5hry.js → checkbox-V0IoPAe3.js} +1 -1
- package/dist/public/assets/{chevron-down-CRb8csep.js → chevron-down-DrpHBSgH.js} +1 -1
- package/dist/public/assets/chevron-left-BUr-yKA4.js +1 -0
- package/dist/public/assets/chevron-right-BU8AeJST.js +1 -0
- package/dist/public/assets/{chevron-up-BZk9M0QL.js → chevron-up-CsH_dTwv.js} +1 -1
- package/dist/public/assets/chunk-2Q5K7J3B-Wikzf0nz.js +1 -0
- package/dist/public/assets/{chunk-32BRIVSS-D5tveMQf.js → chunk-32BRIVSS-BBQ-hEPd.js} +1 -1
- package/dist/public/assets/{chunk-52WLFC77-N9WIMthM.js → chunk-52WLFC77-DuzENKI7.js} +1 -1
- package/dist/public/assets/{chunk-5FCAYU7R-CGBHAdlb.js → chunk-5FCAYU7R-D--noBEp.js} +1 -1
- package/dist/public/assets/{chunk-5HE753X5-BhvmdbMf.js → chunk-5HE753X5-BmVsWMWw.js} +1 -1
- package/dist/public/assets/{chunk-5JV3BV7I-DikkyPAk.js → chunk-5JV3BV7I-BPYqpeB9.js} +1 -1
- package/dist/public/assets/{chunk-5TONJI2A-B5plHHlX.js → chunk-5TONJI2A-DltPJUSb.js} +1 -1
- package/dist/public/assets/{chunk-5VM5RSS4-ceHGEZQp.js → chunk-5VM5RSS4-BfP_UIjE.js} +1 -1
- package/dist/public/assets/{chunk-7BUUIJ7U-D8nVDVZR.js → chunk-7BUUIJ7U-CY9HO1D_.js} +1 -1
- package/dist/public/assets/{chunk-BIQX33UG-BOQ76aQ_.js → chunk-BIQX33UG-CYDmLpMo.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-C1rQfpaL.js → chunk-BO2N2NFS-BsdqXBeH.js} +13 -13
- package/dist/public/assets/{chunk-C7G6YPKG-CKvpw2W_.js → chunk-C7G6YPKG-BG-T54dx.js} +1 -1
- package/dist/public/assets/{chunk-CQNSW5MT-BqvGPWlP.js → chunk-CQNSW5MT-B2t29R4y.js} +1 -1
- package/dist/public/assets/{chunk-CYSBUYHQ-CU_8tGva.js → chunk-CYSBUYHQ-s_ScbNzb.js} +1 -1
- package/dist/public/assets/{chunk-EMLP6XTP-CWTQl3Ut.js → chunk-EMLP6XTP-BNzghYiW.js} +1 -1
- package/dist/public/assets/{chunk-EX3LRPZG-D5na3HWw.js → chunk-EX3LRPZG-DOXxHijP.js} +1 -1
- package/dist/public/assets/{chunk-FWX5IMBZ-BJV077Xm.js → chunk-FWX5IMBZ-C-_in5O6.js} +2 -2
- package/dist/public/assets/{chunk-HOUHSVGY-leOe2Wfc.js → chunk-HOUHSVGY-BLbx-9Cm.js} +1 -1
- package/dist/public/assets/{chunk-ICXQ74PX-DrDor7Ec.js → chunk-ICXQ74PX-CT_UjeBu.js} +1 -1
- package/dist/public/assets/{chunk-JG7HCLWE-Dk9CVnqI.js → chunk-JG7HCLWE-B0c_hwBR.js} +1 -1
- package/dist/public/assets/{chunk-JWPE2WC7-BN90edxN.js → chunk-JWPE2WC7-C89PFunr.js} +1 -1
- package/dist/public/assets/{chunk-MOJQB5TN-DIPg-dvq.js → chunk-MOJQB5TN-3AJz0oxu.js} +1 -1
- package/dist/public/assets/{chunk-MOZMSUNE-cMtFub1B.js → chunk-MOZMSUNE-CfcFCsPH.js} +1 -1
- package/dist/public/assets/{chunk-OGEWGWER-C_XS83lr.js → chunk-OGEWGWER-CFjtHjSl.js} +1 -1
- package/dist/public/assets/{chunk-OSBZ3O6U-BG79ras7.js → chunk-OSBZ3O6U-C7Q07ixC.js} +1 -1
- package/dist/public/assets/{chunk-PUDLZKDR-CeLQoV1n.js → chunk-PUDLZKDR-BGahXoNe.js} +1 -1
- package/dist/public/assets/{chunk-Q4XR5HBZ-BjjkOTzY.js → chunk-Q4XR5HBZ-biPgC2C1.js} +1 -1
- package/dist/public/assets/{chunk-QBLGF6JB-BfFAi7o_.js → chunk-QBLGF6JB-Bd2KWVj9.js} +1 -1
- package/dist/public/assets/{chunk-R7FJI6CG-BKu7NzzM.js → chunk-R7FJI6CG-BU13FFbO.js} +1 -1
- package/dist/public/assets/{chunk-RYQCIY6F-dUeuj7ml.js → chunk-RYQCIY6F-DGsn_2cw.js} +1 -1
- package/dist/public/assets/{chunk-U6XO7XAA-Be8rJApJ.js → chunk-U6XO7XAA-DEpEBtwM.js} +1 -1
- package/dist/public/assets/{chunk-V7JOEXUC-CFm_9_CW.js → chunk-V7JOEXUC-DGxur8ZW.js} +1 -1
- package/dist/public/assets/chunk-VAUOI2AC-DpeuLCbu.js +1 -0
- package/dist/public/assets/{chunk-VR4S4FIN-BcfdRShv.js → chunk-VR4S4FIN-DOd4oQIX.js} +1 -1
- package/dist/public/assets/{chunk-WYO6CB5R-kBTn4Bj4.js → chunk-WYO6CB5R-Dj0234fq.js} +2 -2
- package/dist/public/assets/chunk-XXDRQBXY-CZqAAXUK.js +1 -0
- package/dist/public/assets/{chunk-YOTPTUD7--a72WylF.js → chunk-YOTPTUD7-C30yZrh0.js} +1 -1
- package/dist/public/assets/{chunk-ZGVPDNZ5-Bteg-rhd.js → chunk-ZGVPDNZ5-YEqz23C6.js} +1 -1
- package/dist/public/assets/{chunk-ZIRB5QZD-CJWSWsWI.js → chunk-ZIRB5QZD-D_Sq2Pbf.js} +1 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-jai99ZcL.js +1 -0
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-B6bv8jQ6.js +1 -0
- package/dist/public/assets/{client-version-gKRInXGv.js → client-version-BCNpEu2n.js} +1 -1
- package/dist/public/assets/{cm-theme-CEMjBDMc.js → cm-theme-BouxP4zt.js} +1 -1
- package/dist/public/assets/code-highlighter-impl-BYAPyAoO.js +144 -0
- package/dist/public/assets/{comment-chips-DTq4YCCg.js → comment-chips--sXRK7j6.js} +1 -1
- package/dist/public/assets/{config-context-1rmAj5Zi.js → config-context-D-k7Feh7.js} +1 -1
- package/dist/public/assets/{config-provider-rDSDXt7j.js → config-provider-jFlM_kWt.js} +3 -3
- package/dist/public/assets/{cose-bilkent-JH36ORCC-xObutf9P.js → cose-bilkent-JH36ORCC-CE39J3kc.js} +1 -1
- package/dist/public/assets/cynefin-VYW2F7L2-DKtMkKMv.js +1 -0
- package/dist/public/assets/{cynefinDiagram-TSTJHNR4-BSZ6QtvY.js → cynefinDiagram-TSTJHNR4-DrYykUwe.js} +1 -1
- package/dist/public/assets/{dagre-Cqtp1SYG.js → dagre-D8D-4Y8L.js} +1 -1
- package/dist/public/assets/{dagre-VKFMJZFB-Ch3PVDjG.js → dagre-VKFMJZFB-BBs4IH3J.js} +1 -1
- package/dist/public/assets/{diagram-FQU43EPY-BUpSpRIE.js → diagram-FQU43EPY-B0s2m7E-.js} +1 -1
- package/dist/public/assets/{diagram-G47NLZAW-CKUH8xVt.js → diagram-G47NLZAW-BbP-tBhd.js} +1 -1
- package/dist/public/assets/{diagram-NH7WQ7WH-CYGNz2sT.js → diagram-NH7WQ7WH-kp48H_e8.js} +1 -1
- package/dist/public/assets/{diagram-OA4YK3LP-DEgoBqaw.js → diagram-OA4YK3LP-Sh8MTEDH.js} +1 -1
- package/dist/public/assets/{diagram-WEI45ONY-CeOjV9QL.js → diagram-WEI45ONY-CHaTUq63.js} +1 -1
- package/dist/public/assets/{dialog-CcXKVLIB.js → dialog-C6agJYxQ.js} +1 -1
- package/dist/public/assets/{dist-BA4Ebfzd.js → dist-10-BopoT.js} +1 -1
- package/dist/public/assets/dist-B5Efgy8u.js +23 -0
- package/dist/public/assets/{dist-TZRViVSr.js → dist-BBHnhLg7.js} +1 -1
- package/dist/public/assets/{dist-DabikqIh2.js → dist-BLMHNKEA.js} +1 -1
- package/dist/public/assets/dist-BMhliXXv.js +1 -0
- package/dist/public/assets/dist-BffqGJEV.js +1 -0
- package/dist/public/assets/{dist-uCz6hXhc.js → dist-BzlU6YYd.js} +1 -1
- package/dist/public/assets/{dist-B4trhYTE.js → dist-CgtlFWkf.js} +1 -1
- package/dist/public/assets/dist-ChcSYE9s.js +1 -0
- package/dist/public/assets/{dist-R1uAe8ee.js → dist-DFRu_FnY.js} +1 -1
- package/dist/public/assets/dist-DNKLFEzM.js +9 -0
- package/dist/public/assets/{dist-DPrOTK3n2.js → dist-SMRIgJ7J2.js} +187 -195
- package/dist/public/assets/dist-SYn7UuDc.js +1 -0
- package/dist/public/assets/dist-e-KRYl_U.js +1 -0
- package/dist/public/assets/{doc-paths-CWjzUJaI.js → doc-paths--BtzZubq.js} +1 -1
- package/dist/public/assets/{documents-events-H7SxtX3p.js → documents-events-CN6qju_L.js} +1 -1
- package/dist/public/assets/{download-QOlmqXQ8.js → download-Bq4sKAdj.js} +1 -1
- package/dist/public/assets/{dropdown-menu-DRytYgB4.js → dropdown-menu-BhMtMvZp.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-CCIWWBDH-DyhbJMNB.js → ebnfDiagram-CCIWWBDH-C5sFbOCC.js} +1 -1
- package/dist/public/assets/{erDiagram-Q63AITRT-CISX1BU6.js → erDiagram-Q63AITRT-IzYkNb6y.js} +1 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-DYp_ccag.js +1 -0
- package/dist/public/assets/{eye-CArKS_Md.js → eye-DYUvwA0Z.js} +1 -1
- package/dist/public/assets/{field-GJ7NzaJt.js → field-Ds_anNod.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CjXr6ajD.js → file-tree-adapter-F3EuvfSm.js} +1 -1
- package/dist/public/assets/{file-tree-utils-k-AZyfkA.js → file-tree-utils-D09ASMfu.js} +1 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-BoiEI6fi.js +1 -0
- package/dist/public/assets/{folder-DxrU2PLH.js → folder-Cnftw7jd.js} +1 -1
- package/dist/public/assets/{folder-config-api-Br4F_K_L.js → folder-config-api-Dhk4j3NE.js} +1 -1
- package/dist/public/assets/{folder-open-ee990ToL.js → folder-open-DoQalFip.js} +1 -1
- package/dist/public/assets/{follow-file-2dfYZkFe.js → follow-file-CAeEGFfs.js} +1 -1
- package/dist/public/assets/{ganttDiagram-NO4QXBWP-D6fKxYAj.js → ganttDiagram-NO4QXBWP-PZlgotcv.js} +1 -1
- package/dist/public/assets/{git-branch-B0WeYwW-.js → git-branch-BWBPTGqT.js} +1 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-afDp1_T4.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-qhZlkCwW.js → gitGraphDiagram-IHSO6WYX-CnOfuKSB.js} +1 -1
- package/dist/public/assets/globals-DxmPV08s.css +1 -0
- package/dist/public/assets/{graphlib-CltjDiBv.js → graphlib-fvEEtLhE.js} +1 -1
- package/dist/public/assets/{hash-CDGtqqEo.js → hash-BZXl_HqD.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62-BUmudHfs.js → highlighted-body-OFNGDK62-BaYzQjQZ.js} +1 -1
- package/dist/public/assets/html-void-elements-Bkr32DGT.js +1 -0
- package/dist/public/assets/i18n-JC-m40ty.js +1 -0
- package/dist/public/assets/index-BtnR5gf6.js +2097 -0
- package/dist/public/assets/info-DKCQHKI2-CrDaHnZ5.js +1 -0
- package/dist/public/assets/{info-BnJuC0vW.js → info-Jj1j2YxC.js} +1 -1
- package/dist/public/assets/{infoDiagram-FWYZ7A6U-Ds6lhUVr.js → infoDiagram-FWYZ7A6U-Dvre6R3A.js} +1 -1
- package/dist/public/assets/{input-group-8jkSntF3.js → input-group-CFpex2uW.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-BPjCb-CY.js → ishikawaDiagram-FXEZZL3T-CGbM4PcO.js} +1 -1
- package/dist/public/assets/{journeyDiagram-5HDEW3XC-CWW-IGFT.js → journeyDiagram-5HDEW3XC-DE9Pf5_r.js} +1 -1
- package/dist/public/assets/{kanban-definition-HUTT4EX6-9DWv9ZC3.js → kanban-definition-HUTT4EX6-jPGc8KH6.js} +1 -1
- package/dist/public/assets/lib-BHGXbMkc.js +9 -0
- package/dist/public/assets/lib-DcrRfjuF.js +29 -0
- package/dist/public/assets/{line-BpUHNPvt.js → line-BJ5gC8Dy.js} +1 -1
- package/dist/public/assets/{linear-D9gTM_xH.js → linear-EWMuktsp.js} +1 -1
- package/dist/public/assets/{lint-config-client-Dn6suOfe.js → lint-config-client-DMsg3XE_.js} +1 -1
- package/dist/public/assets/{list-plus-DMZ39tO_.js → list-plus-IYEFhKGU.js} +1 -1
- package/dist/public/assets/loader-circle-Coob8S41.js +1 -0
- package/dist/public/assets/{local-menu-action-bus-iy6v2osW.js → local-menu-action-bus-DLozq_c4.js} +1 -1
- package/dist/public/assets/{map-Ct5PeyyT.js → map-DuXZfTxZ.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-kSmxbTRp.js → markdownlint-rule-browser-ClWCRE-k.js} +1 -1
- package/dist/public/assets/mermaid-GHXKKRXX-Dif_zbtJ.js +1 -0
- package/dist/public/assets/{mermaid-parser.core-BFnosmj6.js → mermaid-parser.core-BVNQnpl1.js} +2 -2
- package/dist/public/assets/{mermaid.core-BDdIvnQn.js → mermaid.core-T6rBx5Mh.js} +3 -3
- package/dist/public/assets/messages-B9zTnkA3.js +1 -0
- package/dist/public/assets/messages-Bd3HU76L.js +1 -0
- package/dist/public/assets/messages-Bnwsf6MS.js +1 -0
- package/dist/public/assets/messages-CEgBwkdX.js +1 -0
- package/dist/public/assets/messages-CK0Pc8my.js +1 -0
- package/dist/public/assets/messages-Cw-hzRlQ.js +1 -0
- package/dist/public/assets/messages-D8aFcS0Q.js +1 -0
- package/dist/public/assets/messages-DJuwZsJ_.js +1 -0
- package/dist/public/assets/messages-F0FOdCUY.js +1 -0
- package/dist/public/assets/messages-M26F5_z4.js +1 -0
- package/dist/public/assets/messages-nZ_l4mfK.js +1 -0
- package/dist/public/assets/{mindmap-definition-LN4V7U3C-DX4UIJ16.js → mindmap-definition-LN4V7U3C-CumX92oT.js} +1 -1
- package/dist/public/assets/minus-DPAjfzCa.js +1 -0
- package/dist/public/assets/{miss-dialog-store-DJRgNfjG.js → miss-dialog-store--ihxgGwV.js} +1 -1
- package/dist/public/assets/{navigation-targets-Ba5Bru24.js → navigation-targets-DdXUwF8B.js} +1 -1
- package/dist/public/assets/{now-BfOBLGzk.js → now-z5ELVWrb.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DwwjW03V.js → open-managed-artifact-tab-cqLHNiqt.js} +1 -1
- package/dist/public/assets/{ordinal-Clehsfbq.js → ordinal-BXAn9evv.js} +1 -1
- package/dist/public/assets/packet-7NZHBO7P-DbOy7CAU.js +1 -0
- package/dist/public/assets/{panel-right-open-D4VBDtOp.js → panel-right-open-BhUOm1Eq.js} +1 -1
- package/dist/public/assets/{paperclip-CLX0WpG3.js → paperclip-9gdTBktj.js} +1 -1
- package/dist/public/assets/{pegDiagram-2B236MQR-KbnUE00J.js → pegDiagram-2B236MQR-CTdEF3cw.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-BQgyh_41.js → pending-receive-nav-store-lANycvJO.js} +1 -1
- package/dist/public/assets/pie-RZYD4A2V-Bj39C3bk.js +1 -0
- package/dist/public/assets/{pieDiagram-ENE6RG2P-BSQjKVIo.js → pieDiagram-ENE6RG2P-DEG5bAYb.js} +1 -1
- package/dist/public/assets/{project-paths-BA2dpw2i.js → project-paths-BcFu3O1A.js} +1 -1
- package/dist/public/assets/{prop-types-DdiRqdud.js → prop-types-C25REwA7.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-FpTddTRX.js → quadrantDiagram-ABIIQ3AL-DqmV_ECa.js} +1 -1
- package/dist/public/assets/radar-I7S5WNFK-8Y-4N9H-.js +1 -0
- package/dist/public/assets/railroad-3IZDKUUU-DbyANRn-.js +1 -0
- package/dist/public/assets/railroad-abnf-AHOZXSZD-CelDcVQi.js +1 -0
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-GO9BaS2J.js +1 -0
- package/dist/public/assets/railroad-peg-LSFZ7HO6-DINlAt_U.js +1 -0
- package/dist/public/assets/{railroadDiagram-RFXS5EU6-12xH5l2l.js → railroadDiagram-RFXS5EU6-D1VOXkhy.js} +1 -1
- package/dist/public/assets/{receive-store-CbuU-nbY.js → receive-store-DJ3Z6bz8.js} +1 -1
- package/dist/public/assets/{refresh-cw-_2dDOCdN.js → refresh-cw-REpEMEB2.js} +1 -1
- package/dist/public/assets/{requirementDiagram-TGXJPOKE-B3aIYt8o.js → requirementDiagram-TGXJPOKE-CWGls4-H.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-HTMAVEWB-BqwgLAql.js → sankeyDiagram-HTMAVEWB-D00ONs8l.js} +1 -1
- package/dist/public/assets/{schema-fields-view-intent-BBuKxRbl.js → schema-fields-view-intent-CgNFg8m7.js} +1 -1
- package/dist/public/assets/{select-BU4xT6VN.js → select-CRztynyQ.js} +1 -1
- package/dist/public/assets/{selection-context-BJWMsPmX.js → selection-context-BsLqP9oO.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-cPDkPtWk.js → sequenceDiagram-DBY2YBRQ-BBwn6ouJ.js} +1 -1
- package/dist/public/assets/{sizeCapture-X5ZJPWSS-DYI0x1uf.js → sizeCapture-X5ZJPWSS-eBkr-Eez.js} +1 -1
- package/dist/public/assets/{skill-actions-hp7tjN8x.js → skill-actions-DXxYflbH.js} +2 -2
- package/dist/public/assets/{skill-scope-BjCR3NWy.js → skill-scope-DG4fOw_k.js} +1 -1
- package/dist/public/assets/{skills-api-Bs4nS7E3.js → skills-api-Djw9cUyq.js} +1 -1
- package/dist/public/assets/{square-pen-CLflIRwR.js → square-pen-D3oI-YUs.js} +1 -1
- package/dist/public/assets/{src-uUlC2ieD.js → src-CJ94lzX3.js} +1 -1
- package/dist/public/assets/{src-Cj_ozY2I.js → src-uuqOVDKA.js} +1 -1
- package/dist/public/assets/{stateDiagram-2N3HPSRC-Cl5jHCUD.js → stateDiagram-2N3HPSRC-CuLDPCky.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-_9elEbD9.js +1 -0
- package/dist/public/assets/{swimlanes-5IMT3BWC-CD7Eu7Pn.js → swimlanes-5IMT3BWC-Bwx6YXUK.js} +2 -2
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-B_LHFsm2.js +8 -0
- package/dist/public/assets/{tag-pill-input-CqZT0rvq.js → tag-pill-input-Ckot4BtE.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-Cba6K6oJ.js → target-navigation-intent-DgeN3LEN.js} +1 -1
- package/dist/public/assets/{telemetry-impl-BWM40APK.js → telemetry-impl-CQgbydAH.js} +2 -2
- package/dist/public/assets/{telemetry-startup-BeDw1PMK.js → telemetry-startup-BJn8ZOlL.js} +1 -1
- package/dist/public/assets/terminal-DQu0Rduz.js +1 -0
- package/dist/public/assets/{terminal-launch-events-DdMesZ76.js → terminal-launch-events-8IGUYuVb.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-BdPNvYrr.js → terminal-telemetry-Bup2OV8O.js} +1 -1
- package/dist/public/assets/text-viewer-languages-DVJ3G2Gh.js +2 -0
- package/dist/public/assets/{thread-client-CkbDHaAL.js → thread-client-B3j1-NNf.js} +1 -1
- package/dist/public/assets/{timeline-definition-FHXFAJF6-usqWKMi8.js → timeline-definition-FHXFAJF6-DecPknli.js} +1 -1
- package/dist/public/assets/{trash-2-DaXJ0Umv.js → trash-2-XqjnGI2m.js} +1 -1
- package/dist/public/assets/treeView-QDETBFTQ-BWkcCjcr.js +1 -0
- package/dist/public/assets/treemap-6X3UGDF4-Bz0LgCcV.js +1 -0
- package/dist/public/assets/{triangle-alert-BXiy8iCO.js → triangle-alert-CA0Kx2Dz.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-1DBUBU0D.js → typing-burst-detector-CwZ5zmQX.js} +2 -2
- package/dist/public/assets/{undo-2-y0RjQHDE.js → undo-2-CtBobs44.js} +1 -1
- package/dist/public/assets/{uninstall-D1Tk1Qqr.js → uninstall-Qc16IsSB.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BqhbnAvy.js → use-activity-panel-B89gtKy-.js} +1 -1
- package/dist/public/assets/{use-collab-url-JGs-jjqU.js → use-collab-url-1XQxLP3g.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-HFSp-SRO.js → use-live-xterm-theme-3-VRWhHM.js} +1 -1
- package/dist/public/assets/{use-open-skill-BTMPhN9U.js → use-open-skill-mzHyxSnO.js} +1 -1
- package/dist/public/assets/{use-settings-route-CCJsQ2fk.js → use-settings-route-BT3ZJmxN.js} +1 -1
- package/dist/public/assets/{use-skill-directory-BbBarJwR.js → use-skill-directory-ulXPC4xN.js} +1 -1
- package/dist/public/assets/{use-skill-origin-C-J-8dk_.js → use-skill-origin-DQf3raAN.js} +1 -1
- package/dist/public/assets/{use-skills-KNFnIiiN.js → use-skills-BrkAxYWH.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-Bjyjp4IN.js → use-terminal-enabled-CcplYRWj.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-ghPGxcIE.js → use-timeline-entry-diff-I6_us7Op.js} +1 -1
- package/dist/public/assets/{use-workspace-C7CSsYNe.js → use-workspace-J_BwpJRd.js} +1 -1
- package/dist/public/assets/{vennDiagram-L72KCM5P-Dttl5H6Y.js → vennDiagram-L72KCM5P-Bg5DY_Cn.js} +1 -1
- package/dist/public/assets/wardley-OPB4EBWU-Bx1-jXoM.js +1 -0
- package/dist/public/assets/{wardleyDiagram-EHGQE667-DwgG2hBB.js → wardleyDiagram-EHGQE667-DJ8tw7ym.js} +1 -1
- package/dist/public/assets/{wrench-BPduNbqB.js → wrench-CNmrVb8V.js} +1 -1
- package/dist/public/assets/x-OtqSgHKA.js +1 -0
- package/dist/public/assets/{xychartDiagram-FW5EYKEG-Bg_jujbe.js → xychartDiagram-FW5EYKEG-7eWDzOaJ.js} +1 -1
- package/dist/public/index.html +136 -134
- package/dist/public/uninstall.html +19 -17
- package/dist/{repair-launch-json-Azr3s4iC.mjs → repair-launch-json-BhfuON41.mjs} +2 -2
- package/dist/{repair-mcp-configs-SxtozYrl.mjs → repair-mcp-configs-KbR755nR.mjs} +2 -2
- package/dist/repair-skills-BxDCyrpW.mjs +1 -0
- package/dist/{repair-skills-DUZhp7YP.mjs → repair-skills-xb6EtJ_i.mjs} +2 -2
- package/dist/{skill-teardown-B2XAb7rJ.mjs → skill-teardown-Bp4PXaVu.mjs} +2 -2
- package/dist/{src-nnByndhY.mjs → src-B38CDuzq.mjs} +2 -2
- package/dist/{src-DZT47hO7.mjs → src-Cz6nVs_k.mjs} +1 -1
- package/dist/{src-DEM_c4GV.mjs → src-D8NOF4IF.mjs} +399 -399
- package/dist/{start-CBuODZiA.mjs → start-BMNnP_zz.mjs} +3 -3
- package/dist/start-C7YmGnYp.mjs +1 -0
- package/dist/{write-project-skill-RvzxhWzq.mjs → write-project-skill-CstNID_e.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-DDh7JRiH.mjs +0 -2
- package/dist/init-BrB3nqhq.mjs +0 -1
- package/dist/loader-CMSDvZCy.mjs +0 -1
- package/dist/preview-SRNPwqmv.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CB4KdOF8.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-CgXKNk8O.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-ClyfR13Q.js +0 -2
- package/dist/public/assets/SessionsHost-CAk6iGd_.js +0 -2
- package/dist/public/assets/SourceEditor-CAlDF7Kt.js +0 -1
- package/dist/public/assets/ThreadView-BE_8u65Q.js +0 -8
- package/dist/public/assets/agent-visibility-Db4MN-dd.js +0 -1
- package/dist/public/assets/architecture-TIHT7OUA-lqj_x00I.js +0 -1
- package/dist/public/assets/arrow-up-right-Gp4MuO-g.js +0 -1
- package/dist/public/assets/channel-CxSvaQye.js +0 -1
- package/dist/public/assets/check-DLRoQSSY.js +0 -1
- package/dist/public/assets/chevron-left-BRFq0qcJ.js +0 -1
- package/dist/public/assets/chevron-right-BjiB8LDf.js +0 -1
- package/dist/public/assets/chunk-2Q5K7J3B-BBDHGzDT.js +0 -1
- package/dist/public/assets/chunk-VAUOI2AC-CkMch8zt.js +0 -1
- package/dist/public/assets/chunk-XXDRQBXY-D7AOmAQy.js +0 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-CRB5-ZdL.js +0 -1
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-De2UqgR8.js +0 -1
- package/dist/public/assets/cynefin-VYW2F7L2-DfJvFSNr.js +0 -1
- package/dist/public/assets/dist-8RD7Tv4S.js +0 -1
- package/dist/public/assets/dist-B-mKvwgg.js +0 -1
- package/dist/public/assets/dist-BaXc7LtC.js +0 -1
- package/dist/public/assets/dist-BaY_jSiN.js +0 -9
- package/dist/public/assets/dist-C06PewhS.js +0 -1
- package/dist/public/assets/dist-C2LaS-vN.js +0 -23
- package/dist/public/assets/dist-CRwqp1kW.js +0 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-CylxYPTv.js +0 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-CWuu50Yk.js +0 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-D1FPGcxf.js +0 -1
- package/dist/public/assets/globals-CrUZfUVm.css +0 -1
- package/dist/public/assets/i18n-CHftDxDL.js +0 -1
- package/dist/public/assets/index-D9hPlEJA.js +0 -2097
- package/dist/public/assets/info-DKCQHKI2-CcfoV-RV.js +0 -1
- package/dist/public/assets/lib-CtlgmvnR.js +0 -29
- package/dist/public/assets/loader-circle-DIKwidm8.js +0 -1
- package/dist/public/assets/mermaid-GHXKKRXX-B_btJJuL.js +0 -1
- package/dist/public/assets/messages-BILUjz8f.js +0 -1
- package/dist/public/assets/messages-BjB6-hIv.js +0 -1
- package/dist/public/assets/messages-C3_4lmjV.js +0 -1
- package/dist/public/assets/messages-C3vPC7TS.js +0 -1
- package/dist/public/assets/messages-CV_K588q.js +0 -1
- package/dist/public/assets/messages-CYFqiGZZ.js +0 -1
- package/dist/public/assets/messages-Do4l3D_j.js +0 -1
- package/dist/public/assets/messages-DoIRtVOU.js +0 -1
- package/dist/public/assets/messages-HxZqeGVD.js +0 -1
- package/dist/public/assets/messages-RO6UphD8.js +0 -1
- package/dist/public/assets/messages-wypNkXwX.js +0 -1
- package/dist/public/assets/minus-DzV1Xdva.js +0 -1
- package/dist/public/assets/packet-7NZHBO7P-P_QuUvCU.js +0 -1
- package/dist/public/assets/pie-RZYD4A2V-BAgvHjr6.js +0 -1
- package/dist/public/assets/radar-I7S5WNFK-CD_Ktumt.js +0 -1
- package/dist/public/assets/railroad-3IZDKUUU-D9xUiDqw.js +0 -1
- package/dist/public/assets/railroad-abnf-AHOZXSZD-BYSfqgSZ.js +0 -1
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-D6OcRAMK.js +0 -1
- package/dist/public/assets/railroad-peg-LSFZ7HO6-QFl0rwvI.js +0 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-CRekuG26.js +0 -1
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-J3LCiUf7.js +0 -8
- package/dist/public/assets/terminal-N6WHmTOJ.js +0 -1
- package/dist/public/assets/text-viewer-languages-BmF39alz.js +0 -2
- package/dist/public/assets/treeView-QDETBFTQ-CjsH23fm.js +0 -1
- package/dist/public/assets/treemap-6X3UGDF4-B13JQvEF.js +0 -1
- package/dist/public/assets/wardley-OPB4EBWU-MMAa33SU.js +0 -1
- package/dist/public/assets/x-CqpcnhWG.js +0 -1
- package/dist/repair-skills--hN1CbbJ.mjs +0 -1
- package/dist/start-Cp9lt_vZ.mjs +0 -1
- /package/dist/public/assets/{ActivityPanelDiffView-DCOzeJ88.js → ActivityPanelDiffView-CPRjA-1R.js} +0 -0
- /package/dist/public/assets/{SkillModeBanner-w66P3TkR.js → SkillModeBanner-DzwdRe8-.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-CMguwo5b.js → __vite-browser-external-neOsIWyW.js} +0 -0
- /package/dist/public/assets/{agent-presence-BwRP12AH.js → agent-presence-1vhA03qX.js} +0 -0
- /package/dist/public/assets/{array-DwdVlTkF.js → array-C_NrAdxI.js} +0 -0
- /package/dist/public/assets/{asset-dispatch-CNWIuI7Y.js → asset-dispatch-qrq0uplE.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-qhsqWxXr.js → auth-prompt-store-CcGlao2A.js} +0 -0
- /package/dist/public/assets/{badge-DR05DWAy.js → badge-BVZ2oTto.js} +0 -0
- /package/dist/public/assets/{chunk-KEIR6QF5-CruR3qxO.js → chunk-KEIR6QF5-CUEbS00h.js} +0 -0
- /package/dist/public/assets/{chunk-Y2CYZVJY-B79Syyvi.js → chunk-Y2CYZVJY-DD_NReQM.js} +0 -0
- /package/dist/public/assets/{clike-VfSCFzJ-.js → clike-fkc4XEp3.js} +0 -0
- /package/dist/public/assets/{clipboard-adapter-D8nxEygB.js → clipboard-adapter-BTORRh1U.js} +0 -0
- /package/dist/public/assets/{colors-CK0BOVxF.js → colors-CQ-pUTip.js} +0 -0
- /package/dist/public/assets/{copilot-Cp15XCYu.js → copilot-CHW7txhf.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-BbgVV4EV.js → createLucideIcon-BbftclCc.js} +0 -0
- /package/dist/public/assets/{cursor-CQIJPvnZ.js → cursor-lV4EgEIO.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-DMJgKOfr.js → cytoscape.esm-BFZHbRez.js} +0 -0
- /package/dist/public/assets/{defaultLocale-DKHHE2Ij.js → defaultLocale-B_FbTTbl.js} +0 -0
- /package/dist/public/assets/{desktop-bridge-types-ramF7tJC.js → desktop-bridge-types-D2lP_C4_.js} +0 -0
- /package/dist/public/assets/{diff-BetFikpI.js → diff-C18NQUVj.js} +0 -0
- /package/dist/public/assets/{dist-CuX_Rrkr.js → dist-B7yUMXxJ.js} +0 -0
- /package/dist/public/assets/{dist-C06Ap4fK.js → dist-BPSCL3GQ.js} +0 -0
- /package/dist/public/assets/{dist-18L8ocZ2.js → dist-BWQ444Pw.js} +0 -0
- /package/dist/public/assets/{dist-mSvoNcEp.js → dist-CRq7u4Aw.js} +0 -0
- /package/dist/public/assets/{dist-RSOBQKjU.js → dist-CrwFIHTH.js} +0 -0
- /package/dist/public/assets/{documents-fetch-CtTxHqu_.js → documents-fetch-BWxQ88TF.js} +0 -0
- /package/dist/public/assets/{external-link-Cze_gp1i.js → external-link-BkZU8kDC.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-Dp_emyCt.js → file-tree-rename-validation-CHpqbXz_.js} +0 -0
- /package/dist/public/assets/{form-DKv3NNbf.js → form-uH0T1Qcu.js} +0 -0
- /package/dist/public/assets/{format-B35NAkHU.js → format-CqpPD7fR.js} +0 -0
- /package/dist/public/assets/{gherkin-Bm-FJVNe.js → gherkin-CMIKyHk7.js} +0 -0
- /package/dist/public/assets/{globals-DktXHqb9.js → globals-D6-8KHKf.js} +0 -0
- /package/dist/public/assets/{go-CKVc437z.js → go-BZZXdOuI.js} +0 -0
- /package/dist/public/assets/{init-EmgYNkpL.js → init-DtLQcSuO.js} +0 -0
- /package/dist/public/assets/{input-f7fQRB6C.js → input-CX1W4pdJ.js} +0 -0
- /package/dist/public/assets/{isObject-CPq0L377.js → isObject-CJkdVXYX.js} +0 -0
- /package/dist/public/assets/{katex-7OG0ksww.js → katex-BE6VA85g.js} +0 -0
- /package/dist/public/assets/{libesm-mJv9HK9s.js → libesm-DO519K1n.js} +0 -0
- /package/dist/public/assets/{lint-plugin-meta-Crx9nyCJ.js → lint-plugin-meta-BUTpI0_4.js} +0 -0
- /package/dist/public/assets/{lru-string-cache-Bc1KPwlG.js → lru-string-cache-a0Cuo2yI.js} +0 -0
- /package/dist/public/assets/{lua-DzLDiP5w.js → lua-CFX1gUBY.js} +0 -0
- /package/dist/public/assets/{markdownit-DoX6x6DK.js → markdownit-CIgVFnWs.js} +0 -0
- /package/dist/public/assets/{mcp-consent-store-CkZ3JHza.js → mcp-consent-store-Dxs6JZLB.js} +0 -0
- /package/dist/public/assets/{min-C0lkNog_.js → min-DCU_CWsT.js} +0 -0
- /package/dist/public/assets/{overlay-layers-oPln_qw0.js → overlay-layers-AaBEWClb.js} +0 -0
- /package/dist/public/assets/{panel-DwaSkgpQ.js → panel-9S5Pf2VO.js} +0 -0
- /package/dist/public/assets/{panzoom.es-BuPYtP8p.js → panzoom.es-DMxgpZcZ.js} +0 -0
- /package/dist/public/assets/{parse-api-error-cKrN25NM.js → parse-api-error-DkZQPwyl.js} +0 -0
- /package/dist/public/assets/{path-vqW-z8T-.js → path-DIlZIGue.js} +0 -0
- /package/dist/public/assets/{pdf-DotDPaoK.js → pdf-Cy3gQIcO.js} +0 -0
- /package/dist/public/assets/{pdf.worker-C4ihG_G5.js → pdf.worker-BdzhldWt.js} +0 -0
- /package/dist/public/assets/{perl-fNWW9euq.js → perl-BgmVruQ7.js} +0 -0
- /package/dist/public/assets/{properties-Cf5aBlHO.js → properties-BdJtqVJl.js} +0 -0
- /package/dist/public/assets/{r-DhZe-FVk.js → r-fecYfHVx.js} +0 -0
- /package/dist/public/assets/{rough.esm-BendJciT.js → rough.esm-COSPye1d.js} +0 -0
- /package/dist/public/assets/{ruby-CQWcsOX5.js → ruby-D4ycjIcU.js} +0 -0
- /package/dist/public/assets/{share-metadata-rows-CcFPZR4t.js → share-metadata-rows-Btw33WmH.js} +0 -0
- /package/dist/public/assets/{shell-OsBsDhE7.js → shell-S4EbCTPW.js} +0 -0
- /package/dist/public/assets/{skeleton-DGDFt7g1.js → skeleton-DDVOgHvc.js} +0 -0
- /package/dist/public/assets/{sortable.esm-DHKl87XW.js → sortable.esm-CRNKDjgg.js} +0 -0
- /package/dist/public/assets/{sql-vZZQK8OH.js → sql-wdiPK9a0.js} +0 -0
- /package/dist/public/assets/{src-C9yMkITM.js → src-BWFYg8Yg.js} +0 -0
- /package/dist/public/assets/{startup-marks-BLN7_giM.js → startup-marks-BSFaenPs.js} +0 -0
- /package/dist/public/assets/{stex-BxL9zHYm.js → stex-DO4KgX7A.js} +0 -0
- /package/dist/public/assets/{swift-DfLF96S5.js → swift-ClTSRUoT.js} +0 -0
- /package/dist/public/assets/{terminal-command-events-BMsp915C.js → terminal-command-events-7vlkZt-0.js} +0 -0
- /package/dist/public/assets/{textarea-CDztjpzM.js → textarea-B18-RfF_.js} +0 -0
- /package/dist/public/assets/{thread-draft-staging-B8sdbzWG.js → thread-draft-staging-CLYszvki.js} +0 -0
- /package/dist/public/assets/{timeline-diff-store-CdUa_mgQ.js → timeline-diff-store-Buwf-OFI.js} +0 -0
- /package/dist/public/assets/{toml-CIem2qnh.js → toml-Dzi4mOhV.js} +0 -0
- /package/dist/public/assets/{use-installed-clis-Dno6QhYH.js → use-installed-clis-BQyVc15P.js} +0 -0
- /package/dist/public/assets/{useLintConfigViewMode-Qe3K_Gka.js → useLintConfigViewMode-MCAU0u93.js} +0 -0
- /package/dist/public/assets/{workspace-paths-ptn1w1-t.js → workspace-paths-DokE-xT8.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{$n as n,L as r,gr as i,i as a}from"./DocumentContext-AhoahLLY.js";import{t as o}from"./react-f2sANaYj.js";import{n as s,r as c}from"./dist-Nvb76hAm.js";import{t as l}from"./compiler-runtime-BfE3aGVn.js";import{s as u}from"./local-menu-action-bus-iy6v2osW.js";import{t as d}from"./utils-CPqDy6Hr.js";import{c as f,i as p,n as m,o as h,s as g,t as _}from"./ChangedOutsideBadge-Bg-4Rhrv.js";import{t as v}from"./button-RQ5o7P7w.js";import{c as y,i as b,l as x,o as S,t as C}from"./dist-Bi80hc1t.js";import{i as w,n as T,t as E}from"./tooltip-x7BNUa3s.js";import{a as D,c as O,i as k,n as A,o as j,r as M,s as N,t as P}from"./dialog-CcXKVLIB.js";import{_ as F,a as I,c as L,d as R,f as z,g as B,h as V,i as H,l as U,m as W,n as G,o as K,p as ee,r as q,s as J,t as Y,u as te}from"./dist-G89kioZo.js";import{a as X,d as ne,f as re,i as ie,n as ae,o as oe,p as se,u as ce}from"./dropdown-menu-DRytYgB4.js";import{t as le}from"./label-BT2yjpKR.js";import{C as ue,a as de,f as fe,h as pe,m as me,n as he,o as ge,p as _e,r as ve,s as ye,t as be}from"./agent-visibility-Db4MN-dd.js";import{$t as xe,Ca as Se,Cn as Ce,Ct as we,En as Te,Ja as Ee,Jt as De,Ka as Oe,Nt as ke,Pt as Ae,Tn as je,Tr as Me,Za as Ne,_n as Pe,gn as Fe,it as Ie,kt as Le,nn as Re,pi as ze,rt as Be,tn as Ve,vn as He,wn as Ue,xn as We,yn as Ge}from"./dist-DPrOTK3n2.js";import{t as Ke}from"./createLucideIcon-BbgVV4EV.js";import{t as qe}from"./RegisteredAgentIcon-C86VMw2X.js";import{n as Je,r as Ye}from"./ManagedArtifactProperties-ClyfR13Q.js";import{t as Xe}from"./check-DLRoQSSY.js";import{t as Ze}from"./chevron-right-BjiB8LDf.js";import{n as Qe}from"./CopyButton-DfXJBl0I.js";import{t as $e}from"./folder-open-ee990ToL.js";import{t as et}from"./folder-DxrU2PLH.js";import{t as tt}from"./list-plus-DMZ39tO_.js";import{t as nt}from"./trash-2-DaXJ0Umv.js";import{n as rt}from"./dist-RSOBQKjU.js";import{t as it}from"./input-f7fQRB6C.js";import{t as at}from"./dist-mSvoNcEp.js";import{i as ot}from"./use-settings-route-CCJsQ2fk.js";import{t as st}from"./parse-api-error-cKrN25NM.js";import{J as ct,q as lt,x as ut}from"./navigation-targets-Ba5Bru24.js";import{c as dt,n as ft,o as pt}from"./documents-events-H7SxtX3p.js";import{a as mt,c as ht,f as gt,n as _t,r as vt}from"./skill-scope-BjCR3NWy.js";import{t as yt}from"./badge-DR05DWAy.js";import{C as bt,O as xt,S as St,a as Ct,b as wt,j as Tt,k as Et,l as Dt,n as Ot,p as kt,r as At,t as jt,v as Mt,y as Nt}from"./skills-api-Bs4nS7E3.js";import{n as Pt}from"./config-context-1rmAj5Zi.js";import{t as Ft}from"./use-skills-KNFnIiiN.js";import{t as It}from"./use-open-skill-BTMPhN9U.js";import{t as Lt}from"./use-workspace-C7CSsYNe.js";import{n as Rt,t as zt}from"./workspace-paths-ptn1w1-t.js";import{n as Bt}from"./clipboard-adapter-D8nxEygB.js";import{t as Vt}from"./DiffView-Bl0_dOLv.js";var Z=e(o(),1),Q=t(),Ht=`ContextMenu`,[Ut,Wt]=y(Ht,[F]),Gt=F(),[Kt,qt]=Ut(Ht),Jt=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=Z.useState(!1),c=Gt(t),l=C(r),u=Z.useCallback(e=>{s(e),l(e)},[l]);return(0,Q.jsx)(Kt,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,Q.jsx)(z,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};Jt.displayName=Ht;var Yt=`ContextMenuTrigger`,Xt=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=qt(Yt,n),o=Gt(n),s=Z.useRef({x:0,y:0}),c=Z.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=Z.useRef(0),u=Z.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return Z.useEffect(()=>u,[u]),Z.useEffect(()=>void(r&&u()),[r,u]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Y,{...o,virtualRef:c}),(0,Q.jsx)(x.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:S(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:S(e.onPointerDown,En(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:S(e.onPointerMove,En(u)),onPointerCancel:r?e.onPointerCancel:S(e.onPointerCancel,En(u)),onPointerUp:r?e.onPointerUp:S(e.onPointerUp,En(u))})]})});Xt.displayName=Yt;var Zt=`ContextMenuPortal`,Qt=e=>{let{__scopeContextMenu:t,...n}=e,r=Gt(t);return(0,Q.jsx)(U,{...r,...n})};Qt.displayName=Zt;var $t=`ContextMenuContent`,en=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=qt($t,n),a=Gt(n),o=Z.useRef(!1);return(0,Q.jsx)(H,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});en.displayName=$t;var tn=`ContextMenuGroup`,nn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(I,{...i,...r,ref:t})});nn.displayName=tn;var rn=`ContextMenuLabel`,an=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(L,{...i,...r,ref:t})});an.displayName=rn;var on=`ContextMenuItem`,sn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(K,{...i,...r,ref:t})});sn.displayName=on;var cn=`ContextMenuCheckboxItem`,ln=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(q,{...i,...r,ref:t})});ln.displayName=cn;var un=`ContextMenuRadioGroup`,dn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(te,{...i,...r,ref:t})});dn.displayName=un;var fn=`ContextMenuRadioItem`,pn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(R,{...i,...r,ref:t})});pn.displayName=fn;var mn=`ContextMenuItemIndicator`,hn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(J,{...i,...r,ref:t})});hn.displayName=mn;var gn=`ContextMenuSeparator`,_n=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(ee,{...i,...r,ref:t})});_n.displayName=gn;var vn=`ContextMenuArrow`,yn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(G,{...i,...r,ref:t})});yn.displayName=vn;var bn=`ContextMenuSub`,xn=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=Gt(t),[s,c]=b({prop:i,defaultProp:a??!1,onChange:r,caller:bn});return(0,Q.jsx)(W,{...o,open:s,onOpenChange:c,children:n})};xn.displayName=bn;var Sn=`ContextMenuSubTrigger`,Cn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(B,{...i,...r,ref:t})});Cn.displayName=Sn;var wn=`ContextMenuSubContent`,Tn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(V,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Tn.displayName=wn;function En(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Dn=Jt,On=Xt,kn=Qt,An=en,jn=nn,Mn=an,Nn=sn,Pn=ln,Fn=hn,In=_n,Ln=xn,Rn=Cn,zn=Tn,Bn=Ke(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Vn=Ke(`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`}]]),Hn=Ke(`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`}]]),Un=Ke(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),$=l();function Wn(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 Gn(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=st(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 Kn(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?Wn(e):Gn()}var qn=`ok:skill:cowork:installed`,Jn=`1`,Yn=250,Xn=`/api/skill/install-state`;function Zn(e){return`${qn}:v${e}`}var Qn=new Map;async function $n(e={},t={}){let n=t.force?`__force__`:`__default__`,r=Qn.get(n);if(r)return r;let i=er(e,t);return Qn.set(n,i),i.finally(()=>{Qn.get(n)===i&&Qn.delete(n)}),i}async function er(e,t){let n=e.installer===void 0?Kn():e.installer,r=tr(e.storage),i=e.fetchSnapshot??rr,a=e.serverTimeoutMs??Yn,o=null;if(!t.force){try{o=await ir(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=Zn(o?.currentVersion??e.fallbackSkillVersion??nr());if(!t.force&&r?.getItem(s)===Jn)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,Jn)}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 tr(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function nr(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function rr(){let e;try{e=await fetch(Xn,{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 ir(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function ar(e){return $n({},e)}function or(){return $n({},{force:!0})}async function sr(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 cr(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return sr({target:`claude-cowork`,url:xe({mode:`cowork`},e)},n);case`claude-code`:return sr({target:`claude-code`,url:xe({mode:`code`},e)},n);case`codex`:return sr({target:`codex`,url:Ve(e)},n);case`cursor`:return sr({target:`cursor`,url:Re(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 lr(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 ur=`open-knowledge:agent-thread-launch`;function dr(e,t=typeof window>`u`?new EventTarget:window){t.dispatchEvent(new CustomEvent(ur,{detail:e}))}function fr(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(ur,n),()=>t.removeEventListener(ur,n)}function pr(e){if(!e.docName||!e.workspace)return null;let t=zt(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:Rt(n,t,r)}}function mr(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function hr(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function gr(e){return _e(e.installUrl).then(()=>void 0)}function _r(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function vr(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function yr(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:n}=e.workspace;if(e.docName){let r=e.docRelativePath??zt(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:Rt(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 br(e){return`Opened in ${e}.`}function xr(e,t=1){return t>=3?at._({id:`bi2C2s`,values:{displayName:e}}):t===2?at._({id:`1J0c0X`,values:{displayName:e}}):at._({id:`Xs7IcT`,values:{displayName:e}})}function Sr(e){return e>=3?null:e===2?at._({id:`Xp94R1`}):at._({id:`6gRgw8`})}function Cr(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 wr(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 Tr(e,t,n,r){return e.compose?De(wr(e.compose,t,n,r)):e.selection?Ce({...e.selection,target:t,transport:r}):e.skill?Ue(e.skill.name,e.skill.scope,n):e.ask?Fe(e.ask.relativePath,e.ask.instruction,n,t,r):ze(e.docContext===null?e.folderRelativePath?We(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?He(n,e.instruction,r):Pe(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):Ge(e.docContext.relativePath,n,e.instruction,r))}function Er(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${Be} ${Tr(e,ke[t].handoffTarget,!1,`terminal`)}`:je(e.docContext?.relativePath??null)}function Dr(e){let t=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||t?`${Ie} ${Tr(e,`claude-code`,!1,`terminal`)}`:Te(e.docContext?.relativePath??null)}function Or(e){let t=e.docContext?.relativePath;return typeof t!=`string`||t===``?null:t.replace(/\.(md|mdx)$/,``)}function kr(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 Ar(e,t){dr({agentSource:t?.agent?.source??`registry`,agentId:t?.agent?.id??``,prompt:Dr(e),docName:Or(e),titleHint:kr(e)})}async function jr(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(at._({id:`wbpoGe`,values:{message:t}})),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(at._({id:`PezM4_`})),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(at._({id:`wbpoGe`,values:{message:t}})),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:Tr(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=Cr(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(br(u));else{let i=Sr(r),a=xr(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{jr(e,t,n,r+1)}}})}return a}function Mr(e){return me.find(t=>t.id===e)?.displayName??e}function Nr(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function Pr(){return{dispatchHandoff:cr,recordHandoff:lr,toast:{success:e=>{rt.success(e)},error:(e,t)=>{rt.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>Nr(),getDisplayName:Mr,ensureCoworkSkillInstalled:ar,autoOpen:!0}}function Fr(){let e=(0,$.c)(2),{merged:t}=Pt(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>jr(e,t,{...Pr(),autoOpen:n}),reinstallCoworkSkill:or},e[0]=n,e[1]=r),r}function Ir(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Dn,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function Lr(e){let t=(0,$.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 i;t[3]===n?i=t[4]:(i=d(`select-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(On,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Rr(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(jn,{"data-slot":`context-menu-group`,...n}),t[2]=n,t[3]=r),r}function zr(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Ln,{"data-slot":`context-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Br(e){let t=(0,$.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 i;t[3]===n?i=t[4]:(i=d(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(kn,{children:(0,Q.jsx)(An,{"data-slot":`context-menu-content`,className:i,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Vr(e){let t=(0,$.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=d(`group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Q.jsx)(Nn,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function Hr(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=d(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(Ze,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Q.jsxs)(Rn,{"data-slot":`context-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function Ur(e){let t=(0,$.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 i;t[3]===n?i=t[4]:(i=d(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(zn,{"data-slot":`context-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Wr(e){let t=(0,$.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:i,children:r,checked:n,inset:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===i?s=t[7]:(s=d(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[6]=i,t[7]=s);let c;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2`,children:(0,Q.jsx)(Fn,{children:(0,Q.jsx)(Xe,{})})}),t[8]=c):c=t[8];let l;return t[9]!==n||t[10]!==r||t[11]!==a||t[12]!==o||t[13]!==s?(l=(0,Q.jsxs)(Pn,{"data-slot":`context-menu-checkbox-item`,"data-inset":a,className:s,checked:n,...o,children:[c,r]}),t[9]=n,t[10]=r,t[11]=a,t[12]=o,t[13]=s,t[14]=l):l=t[14],l}function Gr(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=d(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Q.jsx)(Mn,{"data-slot":`context-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function Kr(e){let t=(0,$.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 i;t[3]===n?i=t[4]:(i=d(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(In,{"data-slot":`context-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function qr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Rr,{...r}):(0,Q.jsx)(ie,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Jr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Vr,{...r}):(0,Q.jsx)(X,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Yr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Wr,{...r}):(0,Q.jsx)(ae,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Xr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Gr,{...r}):(0,Q.jsx)(oe,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Zr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Kr,{...r}):(0,Q.jsx)(ce,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Qr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(zr,{...r}):(0,Q.jsx)(ne,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function $r(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Ur,{...r}):(0,Q.jsx)(re,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ei(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Hr,{...r}):(0,Q.jsx)(se,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}var ti=Object.freeze({hosts:null,source:null}),ni=new Map,ri=new Map;function ii(e,t){return`${e}:${t}`}function ai(e){return ni.get(e)??ti}function oi(e,t){let n=ri.get(e)??new Set;return ri.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&ri.delete(e)}}function si(e,t){let n=ai(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?ni.delete(e):ni.set(e,r);for(let t of ri.get(e)??[])t()}}var ci=Le.options,li=`min-w-[24rem]`;function ui(e,t){let n=(0,$.c)(45),r=t.installingName===e.name,i=(0,Z.useRef)(e),[a,o]=(0,Z.useState)(!1),s=(0,Z.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,Z.useEffect)(c,l);let u,d;n[3]===e?(u=n[4],d=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},d=[e],n[3]=e,n[4]=u,n[5]=d),(0,Z.useEffect)(u,d);let f=r||a,p;n[6]!==e.name||n[7]!==e.scope?(p=ii(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=p):p=n[8];let m=p,h,g;n[9]===m?(h=n[10],g=n[11]):(h=e=>oi(m,e),g=()=>ai(m),n[9]=m,n[10]=h,n[11]=g);let _=(0,Z.useSyncExternalStore)(h,g),v=_.hosts,y=_.source,b,x;n[12]!==y||n[13]!==m||n[14]!==e.hosts?(b=()=>{y!==null&&e.hosts[0]===y&&si(m,{source:null})},x=[e.hosts,y,m],n[12]=y,n[13]=m,n[14]=e.hosts,n[15]=b,n[16]=x):(b=n[15],x=n[16]),(0,Z.useEffect)(b,x);let S=e.linkMode===!0,C=v??e.hosts,w;n[17]===C?w=n[18]:(w=new Set(C),n[17]=C,n[18]=w);let T=w,E=v?v.length>0:e.installed,D=(0,Z.useRef)(e.hosts),O,k;n[19]!==v||n[20]!==e.hosts?(O=()=>{v===null&&(D.current=e.hosts)},k=[v,e.hosts],n[19]=v,n[20]=e.hosts,n[21]=O,n[22]=k):(O=n[21],k=n[22]),(0,Z.useEffect)(O,k);let A;n[23]===e.hosts?A=n[24]:(A=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=A);let j=A,M,N;n[25]!==m||n[26]!==j?(M=()=>{let e=ai(m).hosts;e&&[...e].sort().join(`,`)===j&&si(m,{hosts:null})},N=[j,m],n[25]=m,n[26]=j,n[27]=M,n[28]=N):(M=n[27],N=n[28]),(0,Z.useEffect)(M,N);let P=(0,Z.useRef)(null),F=(0,Z.useRef)(null),I,L;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>()=>{P.current&&clearTimeout(P.current),F.current?.(),F.current=null},L=[],n[29]=I,n[30]=L):(I=n[29],L=n[30]),(0,Z.useEffect)(I,L);let R;n[31]!==t||n[32]!==m||n[33]!==e?(R=function(n,r){D.current=n,si(m,{hosts:n}),P.current&&clearTimeout(P.current);let i=async()=>{F.current=null,P.current=null;let r=await t.install(e,n.filter(Me));if(!r.ok){si(m,{hosts:null});return}D.current=[...r.hosts],si(m,{hosts:[...r.hosts]})};r?(F.current=()=>void i(),P.current=setTimeout(()=>void i(),350)):(F.current=null,i())},n[31]=t,n[32]=m,n[33]=e,n[34]=R):R=n[34];let z=R,B;return n[35]!==t||n[36]!==z||n[37]!==T||n[38]!==E||n[39]!==f||n[40]!==y||n[41]!==m||n[42]!==S||n[43]!==e?(B={hostSet:T,installed:E,installing:f,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),z([...n],!0)},installAll(){let t=D.current.filter(pi),n=e.installableEditors??ci,r=ci.filter(e=>n.includes(e)||D.current.includes(e));z([...t,...r],!1)},linkMode:S,sourceHost:y??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>Nt({scope:e.scope,name:e.name,dir:n,mode:r})).then(fi)},unplaceAt(n){t.runLocationWrite(e,()=>Et({scope:e.scope,name:e.name,path:n})).then(di)},setSource(n){si(m,{source:n}),t.runLocationWrite(e,()=>xt({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(si(m,{source:null}),rt.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=z,n[37]=T,n[38]=E,n[39]=f,n[40]=y,n[41]=m,n[42]=S,n[43]=e,n[44]=B):B=n[44],B}function di(e){e.ok||rt.error(e.error)}function fi(e){e.ok||rt.error(e.error)}function pi(e){return!ci.includes(e)}function mi(e){let t=(0,$.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,Q.jsx)(w,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,Q.jsx)(T,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(E,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function hi(e){let t=(0,$.c)(165),{toggles:n,skill:r,onResolveFork:i,onRunStart:a,menuKind:o}=e,l=o===void 0?`dropdown`:o,{_:u}=c(),{hostSet:d,toggleEditor:f,installAll:p}=n,h;t[0]===r?h=t[1]:(h=e=>r?`${ht(e,r.scope)}/${r.name}`:null,t[0]=r,t[1]=h);let g=h,y=Ft(),b;t[2]!==y.data||t[3]!==y.status||t[4]!==r?(b=r!==void 0&&((r.hosts??[]).includes(`agents`)||y.status===`ready`&&y.data.some(Di)),t[2]=y.data,t[3]=y.status,t[4]=r,t[5]=b):b=t[5];let x=b,S;t[6]!==y.data||t[7]!==y.status||t[8]!==r?(S=r?.hostAliases??(r&&y.status===`ready`?Object.assign({},...y.data.filter(e=>e.scope===r.scope).map(Ei)):{}),t[6]=y.data,t[7]=y.status,t[8]=r,t[9]=S):S=t[9];let C=S,w;t[10]!==y.data||t[11]!==y.status||t[12]!==r?(w=r?.installableEditors??(r&&y.status===`ready`?y.data.find(e=>e.scope===r.scope)?.installableEditors:void 0),t[10]=y.data,t[11]=y.status,t[12]=r,t[13]=w):w=t[13];let T=w,E,D,O,k,A,j,M;if(t[14]!==u||t[15]!==C||t[16]!==y.data||t[17]!==y.status||t[18]!==d||t[19]!==x||t[20]!==p||t[21]!==T||t[22]!==l||t[23]!==i||t[24]!==a||t[25]!==g||t[26]!==r||t[27]!==f||t[28]!==n){let e=T?new Set(T):null,o;t[36]===C?o=t[37]:(o=e=>!(e in C),t[36]=C,t[37]=o);let c=(x?[`agents`,...ci]:ci).filter(o).filter(t=>t===`agents`||e===null||e.has(t)||d.has(t)),h;t[38]===g?h=t[39]:(h=e=>g(e),t[38]=g,t[39]=h);let b=new Set(c.map(h)),S=r?.scope===`global`?`~/`:``,w;t[40]!==S||t[41]!==r?(w=r?.path?.includes(`/`)?`${S}${r.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,t[40]=S,t[41]=r,t[42]=w):w=t[42];let N=w,P=N!==null&&!b.has(N)?N:null,F=P===null?n.sourceHost??r?.hosts?.[0]:void 0,I;t[43]===C?I=t[44]:(I=e=>_t(C,e),t[43]=C,t[44]=I);let L=I,R=Ti,z;t[45]!==u||t[46]!==L?(z=e=>{let t=L(e);return t.length===0?!0:window.confirm(u({id:`Uobeu9`,values:{0:t.map(R).join(`, `),rootRel:e}}))},t[45]=u,t[46]=L,t[47]=z):z=t[47];let B=z,V;t[48]!==u||t[49]!==r?(V=(e,t)=>{let n=e.includes(`/`)?e:ht(e,r?.scope??`project`);return(0,Q.jsx)(mi,{hint:u({id:`0dslv8`,values:{0:R(e),1:R(e),2:r?.name??``,poolRootRel:t,subRoot:n}}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":u({id:`G6Lrs_`,values:{0:R(e)}}),onClick:i=>{i.preventDefault(),i.stopPropagation(),window.confirm(u({id:`iiqOKM`,values:{0:R(e),1:r.name,2:R(e),subRoot:n,poolRootRel:t}}))&&wt({scope:r.scope,root:n,action:`unlink`,exclude:[r.name]}).then(e=>{e.ok?pt():rt.error(u({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,Q.jsx)(m,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[48]=u,t[49]=r,t[50]=V):V=t[50];let H=V,U;t[51]===r?.conflictHosts?U=t[52]:(U=r?.conflictHosts??[],t[51]=r?.conflictHosts,t[52]=U);let W;t[53]===U?W=t[54]:(W=new Set(U),t[53]=U,t[54]=W);let G=W,K;t[55]===r?.driftPaths?K=t[56]:(K=r?.driftPaths??[],t[55]=r?.driftPaths,t[56]=K);let ee;t[57]===K?ee=t[58]:(ee=new Set(K),t[57]=K,t[58]=ee);let q=ee;E=n.installing;let J=wi,Y;t[59]===r?.symlinkedHosts?Y=t[60]:(Y=r?.symlinkedHosts??[],t[59]=r?.symlinkedHosts,t[60]=Y);let te;t[61]===Y?te=t[62]:(te=new Set(Y),t[61]=Y,t[62]=te);let X=te,ne=[...[...d].filter(e=>e!==F&&!(e in C)&&!G.has(e)&&!e.includes(`/`)).map(e=>X.has(e)?`link`:`copy`),...(r?.customPlacements??[]).map(Ci)],re=ne.filter(Si).length;O=ne.length===0?n.linkMode?`link`:`copy`:re*2>=ne.length?`link`:`copy`;let ie;t[63]!==C||t[64]!==G||t[65]!==d||t[66]!==X||t[67]!==g||t[68]!==F?(ie=[...d].filter(e=>e!==F&&!(e in C)&&!G.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:g(e)??R(e),mode:X.has(e)?`link`:`copy`})),t[63]=C,t[64]=G,t[65]=d,t[66]=X,t[67]=g,t[68]=F,t[69]=ie):ie=t[69];let ae;t[70]===r?.customPlacements?ae=t[71]:(ae=r?.customPlacements??[],t[70]=r?.customPlacements,t[71]=ae);let oe;if(t[72]!==S||t[73]!==ie||t[74]!==ae){let e;t[76]===S?e=t[77]:(e=e=>({target:vt(e),display:`${S}${e.path}`,mode:e.mode}),t[76]=S,t[77]=e),oe=[...ie,...ae.map(e)],t[72]=S,t[73]=ie,t[74]=ae,t[75]=oe}else oe=t[75];D=oe;let se;t[78]!==u||t[79]!==a||t[80]!==n?(se=(e,t,r)=>{let i=r===`link`?`copy`:`link`;return(0,Q.jsx)(mi,{hint:u(r===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(u(i===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(a?.(),n.convertLocation?.(e,i))},"data-testid":`skill-convert-${e}`,children:r===`link`?(0,Q.jsx)(s,{id:`uUCrBv`}):(0,Q.jsx)(s,{id:`iaPtht`})})})},t[78]=u,t[79]=a,t[80]=n,t[81]=se):se=t[81];let ce=se,le;t[82]===r?.customPlacements?le=t[83]:(le=r?.customPlacements??[],t[82]=r?.customPlacements,t[83]=le);let ue=new Map(le.map(xi)),de=new Set(ue.keys());if(y.status===`ready`&&r){for(let e of y.data)if(e.scope===r.scope)for(let t of e.customPlacements??[]){let e=vt(t);e!==``&&de.add(e)}}let fe=r===void 0?[]:[...de].sort().map(e=>({root:e,display:`${S}${e}/${r.name}`,placed:ue.get(e)??null})).filter(e=>!b.has(e.display)&&e.display!==N&&!(e.root in C)),pe;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Q.jsx)(s,{id:`npcziF`}),t[84]=pe):pe=t[84];let me;t[85]===u?me=t[86]:(me=u({id:`6f_UX4`}),t[85]=u,t[86]=me);let he;t[87]===p?he=t[88]:(he=()=>p(),t[87]=p,t[88]=he);let ge;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Q.jsx)(s,{id:`N40H-G`}),t[89]=ge):ge=t[89];let _e;t[90]!==E||t[91]!==he?(_e=(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:E,onClick:he,"data-testid":`skill-install-all`,children:ge}),t[90]=E,t[91]=he,t[92]=_e):_e=t[92];let ve;t[93]!==me||t[94]!==_e?(ve=(0,Q.jsx)(mi,{hint:me,children:_e}),t[93]=me,t[94]=_e,t[95]=ve):ve=t[95],t[96]!==l||t[97]!==ve?(k=(0,Q.jsxs)(Xr,{menuKind:l,className:`flex items-center justify-between gap-2`,children:[pe,ve]}),t[96]=l,t[97]=ve,t[98]=k):k=t[98],t[99]!==u||t[100]!==H||t[101]!==E||t[102]!==l||t[103]!==P||t[104]!==L?(A=P===null?null:(0,Q.jsx)(mi,{hint:u({id:`pXB6SL`}),children:(0,Q.jsxs)(Yr,{menuKind:l,disabled:E,checked:!0,onSelect:bi,"data-testid":`skill-source-row`,children:[(0,Q.jsx)(et,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:P}),(()=>{let e=J(P).split(`/`).slice(0,-1).join(`/`),t=L(e);return t.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>H(t,e))}):null})(),(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(s,{id:`tiFPjk`})})]})]})}),t[99]=u,t[100]=H,t[101]=E,t[102]=l,t[103]=P,t[104]=L,t[105]=A):A=t[105];let ye;t[106]!==u||t[107]!==H||t[108]!==E||t[109]!==B||t[110]!==G||t[111]!==ce||t[112]!==q||t[113]!==O||t[114]!==d||t[115]!==X||t[116]!==l||t[117]!==i||t[118]!==g||t[119]!==r?.hosts||t[120]!==F||t[121]!==L||t[122]!==f||t[123]!==n?(ye=e=>{let t=g(e),a=e===`agents`?`.agents`:Se[e],o=J(t).split(`/`).slice(0,-1).join(`/`),c=L(o);return(0,Q.jsx)(mi,{hint:G.has(e)?u({id:`8HvJlU`,values:{0:t??a}}):e===F?t?u({id:`ssk6rl`,values:{path:t}}):a:d.has(e)?u(t?{id:`9ieZhu`,values:{path:t}}:{id:`n3T3EE`,values:{label:a}}):u(t?O===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}:{id:`Pp0Vgd`,values:{label:a}}),children:(0,Q.jsxs)(Yr,{menuKind:l,disabled:E,checked:d.has(e),onCheckedChange:t=>{G.has(e)||t===!0&&!B(o)||f(e,t===!0)},onSelect:yi,className:`group`,"data-testid":`skill-install-editor-${e}`,children:[(0,Q.jsx)(m,{host:e,"aria-hidden":!0,className:`size-4`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:t??a}),c.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${e}`,children:c.map(e=>H(e,o))}):null,G.has(e)?(0,Q.jsx)(mi,{hint:u({id:`_O7dJS`}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:t=>{t.preventDefault(),i?.(e)},"data-testid":`skill-fork-chip-${e}`,children:(0,Q.jsx)(s,{id:`jng7Ko`})})}):e===F?(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(s,{id:`tiFPjk`})}):d.has(e)&&r?.hosts?(0,Q.jsxs)(Q.Fragment,{children:[!E&&(X.has(e)?`link`:`copy`)!==O?ce(e,t??a,X.has(e)?`link`:`copy`):null,(0,Q.jsx)(mi,{hint:u({id:`nBgzKO`}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e)},"data-testid":`skill-set-source-${e}`,children:(0,Q.jsx)(s,{id:`VNNRfN`})})})]}):null,!E&&q.has(J(t))?(0,Q.jsx)(mi,{hint:u({id:`iz1LdD`}),children:(0,Q.jsx)(_,{testId:`skill-drift-${e}`})}):null]})]})},e)},t[106]=u,t[107]=H,t[108]=E,t[109]=B,t[110]=G,t[111]=ce,t[112]=q,t[113]=O,t[114]=d,t[115]=X,t[116]=l,t[117]=i,t[118]=g,t[119]=r?.hosts,t[120]=F,t[121]=L,t[122]=f,t[123]=n,t[124]=ye):ye=t[124],j=c.map(ye);let be;t[125]!==u||t[126]!==H||t[127]!==E||t[128]!==B||t[129]!==ce||t[130]!==q||t[131]!==O||t[132]!==l||t[133]!==L||t[134]!==n?(be=e=>(0,Q.jsx)(mi,{hint:e.placed===null?u(O===`link`?{id:`ybWWR2`,values:{0:e.display}}:{id:`fDjZxw`,values:{0:e.display}}):u({id:`C0cll5`,values:{0:e.display}}),children:(0,Q.jsxs)(Yr,{menuKind:l,disabled:E,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!B(e.root))return;n.placeAt(e.root,O)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:vi,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,Q.jsx)(m,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,Q.jsx)(et,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),L(e.root).length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:L(e.root).map(t=>H(t,e.root))}):null,!E&&e.placed!==null&&q.has(e.placed.path)?(0,Q.jsx)(mi,{hint:u({id:`iz1LdD`}),children:(0,Q.jsx)(_,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,Q.jsxs)(Q.Fragment,{children:[!E&&e.placed.mode!==O?ce(e.root,e.display,e.placed.mode):null,(0,Q.jsx)(mi,{hint:u({id:`nBgzKO`}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,Q.jsx)(s,{id:`VNNRfN`})})})]})]})]})},e.root),t[125]=u,t[126]=H,t[127]=E,t[128]=B,t[129]=ce,t[130]=q,t[131]=O,t[132]=l,t[133]=L,t[134]=n,t[135]=be):be=t[135],M=fe.map(be),t[14]=u,t[15]=C,t[16]=y.data,t[17]=y.status,t[18]=d,t[19]=x,t[20]=p,t[21]=T,t[22]=l,t[23]=i,t[24]=a,t[25]=g,t[26]=r,t[27]=f,t[28]=n,t[29]=E,t[30]=D,t[31]=O,t[32]=k,t[33]=A,t[34]=j,t[35]=M}else E=t[29],D=t[30],O=t[31],k=t[32],A=t[33],j=t[34],M=t[35];let N;t[136]!==u||t[137]!==E||t[138]!==D||t[139]!==O||t[140]!==a||t[141]!==n?(N=D.length>0&&n.convertLocations?(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=O===`link`?`copy`:`link`,r=D.filter(e=>e.mode!==t);if(r.length===0)return;let i=u(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),o=u(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),s=r.map(_i).join(`
|
|
2
|
-
`);window.confirm(`${i}\n\n${o}\n\n${s}\n\n${u({id:`Cu6GXQ`})}`)&&(a?.(),n.convertLocations?.(r.map(e=>({target:e.target,mode:t}))))},disabled:E,"data-testid":`skill-convert-all`,children:O===`link`?(0,Q.jsx)(s,{id:`rcJmK8`}):(0,Q.jsx)(s,{id:`LBv_TR`})}),(0,Q.jsx)(mi,{hint:u({id:`0J6nhG`}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,"aria-label":u({id:`qJSo0_`}),className:`size-4 shrink-0 rounded-full border border-border/60 p-0 font-normal text-[9px] text-muted-foreground hover:border-foreground/40 hover:bg-transparent hover:text-foreground`,onClick:gi,"data-testid":`skill-convert-all-help`,children:`?`})})]}):null,t[136]=u,t[137]=E,t[138]=D,t[139]=O,t[140]=a,t[141]=n,t[142]=N):N=t[142];let P;t[143]===l?P=t[144]:(P=(0,Q.jsx)(Zr,{menuKind:l}),t[143]=l,t[144]=P);let F;t[145]===u?F=t[146]:(F=u({id:`jqe7Yq`}),t[145]=u,t[146]=F);let I;t[147]===r?.scope?I=t[148]:(I=()=>{window.location.hash=r?.scope===`global`?`#settings/user-skills`:`#settings/skills`},t[147]=r?.scope,t[148]=I);let L,R;t[149]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsx)(Un,{"aria-hidden":!0}),R=(0,Q.jsx)(s,{id:`ZBF9fn`}),t[149]=L,t[150]=R):(L=t[149],R=t[150]);let z;t[151]!==l||t[152]!==I?(z=(0,Q.jsxs)(Jr,{menuKind:l,onSelect:I,children:[L,R]}),t[151]=l,t[152]=I,t[153]=z):z=t[153];let B;t[154]!==F||t[155]!==z?(B=(0,Q.jsx)(mi,{hint:F,children:z}),t[154]=F,t[155]=z,t[156]=B):B=t[156];let V;return t[157]!==N||t[158]!==P||t[159]!==B||t[160]!==k||t[161]!==A||t[162]!==j||t[163]!==M?(V=(0,Q.jsxs)(Q.Fragment,{children:[k,A,j,M,N,P,B]}),t[157]=N,t[158]=P,t[159]=B,t[160]=k,t[161]=A,t[162]=j,t[163]=M,t[164]=V):V=t[164],V}function gi(e){return e.preventDefault()}function _i(e){return e.display}function vi(e){return e.preventDefault()}function yi(e){return e.preventDefault()}function bi(e){return e.preventDefault()}function xi(e){return[vt(e),e]}function Si(e){return e===`link`}function Ci(e){return e.mode}function wi(e){return(e??``).replace(/^~\//,``)}function Ti(e){return e===`agents`?`.agents`:Se[e]??e}function Ei(e){return e.hostAliases??{}}function Di(e){return e.hosts.includes(`agents`)||e.path.startsWith(`.agents/`)}function Oi(e){let t=(0,$.c)(23),{onAddProperty:n,className:r,problemCount:i,problemMessages:a}=e,o=i===void 0?0:i,{_:l}=c(),u=o>0,f;t[0]!==l||t[1]!==u||t[2]!==o?(f=l(u?{id:`3KOHFt`,values:{problemCount:o}}:{id:`81H_23`}),t[0]=l,t[1]=u,t[2]=o,t[3]=f):f=t[3];let p=f,m;t[4]===r?m=t[5]:(m=d(`relative`,r),t[4]=r,t[5]=m);let h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(tt,{}),t[6]=h):h=t[6];let g;t[7]!==u||t[8]!==o?(g=u?(0,Q.jsx)(yt,{variant:`notification`,"aria-hidden":`true`,"data-testid":`add-properties-problem-badge`,className:`pointer-events-none absolute -top-0.5 -right-0.5 size-3.5 rounded-full p-0 font-sans text-[9px] leading-none tabular-nums`,children:o>9?`9+`:o}):null,t[7]=u,t[8]=o,t[9]=g):g=t[9];let _;t[10]===g?_=t[11]:(_=(0,Q.jsxs)(w,{children:[h,g]}),t[10]=g,t[11]=_);let y;t[12]!==p||t[13]!==n||t[14]!==m||t[15]!==_?(y=(0,Q.jsx)(v,{variant:`ghost`,size:`icon`,"aria-label":p,onClick:n,"data-testid":`add-properties-button`,className:m,asChild:!0,children:_}),t[12]=p,t[13]=n,t[14]=m,t[15]=_,t[16]=y):y=t[16];let b;t[17]!==u||t[18]!==a?(b=(0,Q.jsx)(T,{side:`bottom`,children:u?(0,Q.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,Q.jsx)(`span`,{className:`font-medium`,children:(0,Q.jsx)(s,{id:`AwrGuz`})}),a?.map(ki),(0,Q.jsx)(`span`,{className:`pt-0.5 opacity-70`,children:(0,Q.jsx)(s,{id:`yh5-4s`})})]}):(0,Q.jsx)(s,{id:`81H_23`})}),t[17]=u,t[18]=a,t[19]=b):b=t[19];let x;return t[20]!==y||t[21]!==b?(x=(0,Q.jsxs)(E,{children:[y,b]}),t[20]=y,t[21]=b,t[22]=x):x=t[22],x}function ki(e,t){return(0,Q.jsx)(`span`,{className:`opacity-90`,children:e},t)}function Ai(e){return e?at._({id:`wTcjov`}):null}function ji(e){let t=(0,$.c)(46),{_:i}=c(),a=r(),o=h(),l=ue(),d=fe();if(a)return null;let{input:f,installStates:p,dispatch:m}=e,g=f===null,_,v,y,b,x,S,C,w,T,E,D;if(t[0]!==i||t[1]!==m||t[2]!==f||t[3]!==g||t[4]!==p||t[5]!==d||t[6]!==l||t[7]!==o){let e=Ai(g),r;t[19]===d?r=t[20]:(r=e=>be(d,e.id),t[19]=d,t[20]=r);let a=pe.filter(r),c;t[21]===d?c=t[22]:(c=e=>he(d,e.source,e.id,!0,e.supported),t[21]=d,t[22]=c);let u=l.filter(c),h=o?Ae.filter(e=>ve(d,e,o.installedClis)):[];y=a.length>0,b=o!==null&&h.length>0,x=u.length>0,v=zr,t[23]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Q.jsxs)(Hr,{children:[(0,Q.jsx)(n,{"aria-hidden":`true`}),(0,Q.jsx)(s,{id:`O7_W_a`})]}),t[23]=D):D=t[23],_=Ur,S=`max-h-80`,C=x?(0,Q.jsxs)(Rr,{"aria-label":i({id:`vPKX2i`}),children:[(0,Q.jsxs)(Gr,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(s,{id:`RXEbZy`}),(0,Q.jsx)(ye,{})]}),u.map(t=>{let n=t.name;return(0,Q.jsxs)(Vr,{onSelect:()=>{f!==null&&Ar(f,{agent:{source:t.source,id:t.id}})},disabled:g,"data-testid":`empty-space-open-in-thread-${t.id}`,"aria-label":e?i({id:`gtGQ9S`,values:{agentName:n,hint:e}}):void 0,children:[(0,Q.jsx)(qe,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`5PrrYw`,values:{agentName:n}})}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[24]!==y||t[25]!==b||t[26]!==x?(w=x&&(b||y)?(0,Q.jsx)(Kr,{}):null,t[24]=y,t[25]=b,t[26]=x,t[27]=w):w=t[27],T=b?(0,Q.jsxs)(Rr,{"aria-label":i({id:`ALhMYW`}),children:[(0,Q.jsx)(Gr,{children:(0,Q.jsx)(s,{id:`ALhMYW`})}),h.map(t=>{let{displayName:n}=ke[t];return(0,Q.jsxs)(Vr,{onSelect:()=>{f!==null&&o.launchInTerminal(f,t)},disabled:g,"data-testid":`empty-space-open-in-terminal-${t}`,"aria-label":i(e?{id:`AIn2Yv`,values:{displayName:n,hint:e}}:{id:`QYfQdv`,values:{displayName:n}}),children:[(0,Q.jsx)(ge,{id:de(t),"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:n}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,E=y?(0,Q.jsxs)(Q.Fragment,{children:[b?(0,Q.jsx)(Kr,{}):null,(0,Q.jsxs)(Rr,{"aria-label":i({id:`BBqGS9`}),children:[(0,Q.jsx)(Gr,{children:(0,Q.jsx)(s,{id:`BBqGS9`})}),a.map(t=>{let n=!g,{displayName:r}=t,a=i(e?{id:`1ZpfyB`,values:{displayName:r,hint:e}}:{id:`WqLq6M`,values:{displayName:r}});return(0,Q.jsxs)(Vr,{disabled:!n,onSelect:()=>{if(f){if(p[t.id]?.installed!==!0){gr(t);return}m(t.id,f)}},"data-testid":`empty-space-open-in-${t.id}`,"aria-label":a,children:[(0,Q.jsx)(ge,{id:t.id,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=i,t[1]=m,t[2]=f,t[3]=g,t[4]=p,t[5]=d,t[6]=l,t[7]=o,t[8]=_,t[9]=v,t[10]=y,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=E,t[18]=D}else _=t[8],v=t[9],y=t[10],b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],E=t[17],D=t[18];let O;t[28]!==y||t[29]!==b||t[30]!==x?(O=x||b||y?(0,Q.jsx)(Kr,{}):null,t[28]=y,t[29]=b,t[30]=x,t[31]=O):O=t[31];let k;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Q.jsx)(u,{"aria-hidden":`true`}),t[32]=k):k=t[32];let A;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsxs)(Vr,{onSelect:ot,"data-testid":`empty-space-open-in-settings`,children:[k,(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`jRAGrQ`})})]}),t[33]=A):A=t[33];let j;t[34]!==_||t[35]!==S||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==O?(j=(0,Q.jsxs)(_,{className:S,children:[C,w,T,E,O,A]}),t[34]=_,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=O,t[41]=j):j=t[41];let M;return t[42]!==v||t[43]!==D||t[44]!==j?(M=(0,Q.jsxs)(v,{children:[D,j]}),t[42]=v,t[43]=D,t[44]=j,t[45]=M):M=t[45],M}function Mi(e){return e===`darwin`?at._({id:`LtSYdi`}):e===`win32`?at._({id:`qi1F96`}):at._({id:`e1Rn_k`})}function Ni(e){return e?at._({id:`wTcjov`}):null}function Pi(e){let t=(0,$.c)(47),{_:i}=c(),a=r(),o=h(),l=ue(),d=fe();if(a)return null;let{input:f,installStates:p,dispatch:m,onBeforeLaunch:g}=e,_=f===null,v,y,b,x,S,C,w,T,E,D,O;if(t[0]!==i||t[1]!==m||t[2]!==f||t[3]!==_||t[4]!==p||t[5]!==g||t[6]!==d||t[7]!==l||t[8]!==o){let e=Ni(_),r;t[20]===d?r=t[21]:(r=e=>be(d,e.id),t[20]=d,t[21]=r);let a=pe.filter(r),c;t[22]===d?c=t[23]:(c=e=>he(d,e.source,e.id,!0,e.supported),t[22]=d,t[23]=c);let u=l.filter(c),h=o?Ae.filter(e=>ve(d,e,o.installedClis)):[];b=a.length>0,x=o!==null&&h.length>0,S=u.length>0,y=ne,t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Q.jsxs)(se,{children:[(0,Q.jsx)(n,{"aria-hidden":`true`}),(0,Q.jsx)(s,{id:`O7_W_a`})]}),t[24]=O):O=t[24],v=re,C=`max-h-80`,w=S?(0,Q.jsxs)(ie,{"aria-label":i({id:`vPKX2i`}),children:[(0,Q.jsxs)(oe,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(s,{id:`RXEbZy`}),(0,Q.jsx)(ye,{})]}),u.map(t=>{let n=t.name;return(0,Q.jsxs)(X,{onSelect:()=>{f!==null&&(g?.(),Ar(f,{agent:{source:t.source,id:t.id}}))},disabled:_,"data-testid":`file-tree-open-in-thread-${t.id}`,"aria-label":e?i({id:`gtGQ9S`,values:{agentName:n,hint:e}}):void 0,children:[(0,Q.jsx)(qe,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`5PrrYw`,values:{agentName:n}})}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[25]!==b||t[26]!==x||t[27]!==S?(T=S&&(x||b)?(0,Q.jsx)(ce,{}):null,t[25]=b,t[26]=x,t[27]=S,t[28]=T):T=t[28],E=x?(0,Q.jsxs)(ie,{"aria-label":i({id:`ALhMYW`}),children:[(0,Q.jsx)(oe,{children:(0,Q.jsx)(s,{id:`ALhMYW`})}),h.map(t=>{let{displayName:n}=ke[t];return(0,Q.jsxs)(X,{onSelect:()=>{f!==null&&(g?.(),o.launchInTerminal(f,t))},disabled:_,"data-testid":`file-tree-open-in-terminal-${t}`,"aria-label":i(e?{id:`AIn2Yv`,values:{displayName:n,hint:e}}:{id:`QYfQdv`,values:{displayName:n}}),children:[(0,Q.jsx)(ge,{id:de(t),"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:n}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,D=b?(0,Q.jsxs)(Q.Fragment,{children:[x?(0,Q.jsx)(ce,{}):null,(0,Q.jsxs)(ie,{"aria-label":i({id:`BBqGS9`}),children:[(0,Q.jsx)(oe,{children:(0,Q.jsx)(s,{id:`BBqGS9`})}),a.map(t=>{let n=!_,{displayName:r}=t,a=i(e?{id:`1ZpfyB`,values:{displayName:r,hint:e}}:{id:`WqLq6M`,values:{displayName:r}});return(0,Q.jsxs)(X,{disabled:!n,onSelect:()=>{if(f){if(g?.(),p[t.id]?.installed!==!0){gr(t);return}m(t.id,f)}},"data-testid":`file-tree-open-in-${t.id}`,"aria-label":a,children:[(0,Q.jsx)(ge,{id:t.id,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=i,t[1]=m,t[2]=f,t[3]=_,t[4]=p,t[5]=g,t[6]=d,t[7]=l,t[8]=o,t[9]=v,t[10]=y,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=E,t[18]=D,t[19]=O}else v=t[9],y=t[10],b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],E=t[17],D=t[18],O=t[19];let k;t[29]!==b||t[30]!==x||t[31]!==S?(k=S||x||b?(0,Q.jsx)(ce,{}):null,t[29]=b,t[30]=x,t[31]=S,t[32]=k):k=t[32];let A;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(u,{"aria-hidden":`true`}),t[33]=A):A=t[33];let j;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsxs)(X,{onSelect:ot,"data-testid":`file-tree-open-in-settings`,children:[A,(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`jRAGrQ`})})]}),t[34]=j):j=t[34];let M;t[35]!==v||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==D||t[41]!==k?(M=(0,Q.jsxs)(v,{className:C,children:[w,T,E,D,k,j]}),t[35]=v,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=k,t[42]=M):M=t[42];let N;return t[43]!==y||t[44]!==O||t[45]!==M?(N=(0,Q.jsxs)(y,{children:[O,M]}),t[43]=y,t[44]=O,t[45]=M,t[46]=N):N=t[46],N}function Fi(e){let t=Ee(e);if(t)return{scope:`project`,name:t.name,rel:t.rel};let n=Oe(e);return n?{scope:`global`,name:n.name,rel:n.rel}:null}function Ii(e,t,n){return e.filter(e=>{let r=ut(e);if(r.kind===`skill-file`)return r.scope===t&&r.name===n;if(r.kind!==`doc`)return!1;let i=Fi(r.docName);return i?.scope===t&&i.name===n})}function Li(e,t,n){let r=lt(t,n);return e.filter(e=>{let i=ut(e);return i.kind===`skill-file`?i.scope===t.scope&&i.name===t.name&&i.path===n:i.kind===`doc`&&i.docName===r})}function Ri(e,t,n){let r=Fi(e);if(!r||r.rel===null)return null;let i=t.find(e=>e.scope===r.scope&&e.name===r.name);if(!i||i.managed)return null;let a=`references/${r.rel}${n}`;return lt(i,a)===e?{skill:i,filePath:a}:null}function zi(e,t){let n=new Map(t.map(e=>[`${e.scope}\u0000${e.name}`,e])),r=[];for(let t of e){let e=Fi(t);if(!e||n.has(`${e.scope}\u0000${e.name}`))continue;let i=e.scope===`project`?`global`:`project`,a=n.get(`${i}\u0000${e.name}`);e.rel===null&&a!==void 0?r.push({kind:`retarget`,fromDocName:t,toDocName:ct(a)}):r.push({kind:`close`,docName:t})}return r}function Bi(){let e=(0,$.c)(15),{openTabs:t,closeDocument:n}=a(),r=Je(),i;e[0]===t?i=e[1]:(i=t.some(Hi),e[0]=t,e[1]=i);let o=i,s;e[2]===o?s=e[3]:(s={enabled:o},e[2]=o,e[3]=s);let c=Ft(s),l=(0,Z.useRef)(null),u;e[4]!==n||e[5]!==t||e[6]!==r||e[7]!==c.data||e[8]!==c.status?(u=()=>{if(c.status!==`ready`)return;let e=c.data,i=`${t.join(``)}\u0002${e.map(Vi).sort().join(``)}`;if(l.current===i)return;l.current=i;let a=zi(t,e);for(let e of a)e.kind===`retarget`?r(e.fromDocName,e.toDocName):n(e.docName)},e[4]=n,e[5]=t,e[6]=r,e[7]=c.data,e[8]=c.status,e[9]=u):u=e[9];let d;e[10]!==n||e[11]!==t||e[12]!==r||e[13]!==c?(d=[c,t,r,n],e[10]=n,e[11]=t,e[12]=r,e[13]=c,e[14]=d):d=e[14],(0,Z.useEffect)(u,d)}function Vi(e){return`${e.scope}\u0000${e.name}`}function Hi(e){return Fi(e)!==null}function Ui(e){let t=(0,$.c)(19),{skill:n,onOpenChange:r,onDeleted:i}=e,{_:o}=c(),{setSkillsSidebar:s,closeTabs:l,openTabs:u}=a(),[d,f]=(0,Z.useState)(!1),m;t[0]!==o||t[1]!==l||t[2]!==i||t[3]!==r||t[4]!==u||t[5]!==s?(m=async function(e){s(!0),f(!0);let t=await Ot(e.scope,e.name);if(f(!1),!t.ok){let{error:e}=t;rt.error(o({id:`AtBdnD`,values:{error:e}}));return}rt.success(o({id:`h9QFb9`,values:{0:e.name}})),l(Ii(u,e.scope,e.name),{force:!0}),i(),r(!1)},t[0]=o,t[1]=l,t[2]=i,t[3]=r,t[4]=u,t[5]=s,t[6]=m):m=t[6];let h=m,g=n!==null,_;t[7]!==d||t[8]!==r?(_=e=>{!e&&!d&&r(!1)},t[7]=d,t[8]=r,t[9]=_):_=t[9];let v;t[10]!==o||t[11]!==d||t[12]!==h||t[13]!==n?(v=n?(0,Q.jsx)(p,{itemName:o({id:`ExUzM4`,values:{0:n.name}}),isSubmitting:d,onDelete:()=>h(n),customDescription:n.origin?.source&&/\/plugins\/(?:cache|marketplaces)\//.test(n.origin.source)?o({id:`WnsbUT`,values:{0:n.path}}):o({id:`E1Da_b`,values:{0:n.path}})}):null,t[10]=o,t[11]=d,t[12]=h,t[13]=n,t[14]=v):v=t[14];let y;return t[15]!==g||t[16]!==_||t[17]!==v?(y=(0,Q.jsx)(P,{open:g,onOpenChange:_,children:v}),t[15]=g,t[16]=_,t[17]=v,t[18]=y):y=t[18],y}function Wi(e){let t=e.split(`/`);return t.some(e=>e===``||e===`.`||e===`..`)||t.length===0||t.length===1&&t[0].toLowerCase()===`skill.md`?!1:!/\s/.test(e)}function Gi(e){let t=(0,$.c)(66),{target:n,onOpenChange:r}=e,{_:i}=c(),{openTarget:o}=a(),l=(0,Z.useId)(),[u,d]=(0,Z.useState)(``),[f,p]=(0,Z.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.prefix??`references/`)},t[0]=n,t[1]=m);let h=n?.skill.scope,g=n?.skill.name,_=n?.prefix,y;if(t[2]!==h||t[3]!==g||t[4]!==_?(y=[h,g,_],t[2]=h,t[3]=g,t[4]=_,t[5]=y):y=t[5],(0,Z.useEffect)(m,y),!n)return null;let b,x,S,C;t[6]!==u||t[7]!==f?(C=u.trim(),x=C===``||!Wi(C),b=!x&&!f,S=C.includes(`/`)?C.split(`/`).slice(0,-1).join(`/`):null,t[6]=u,t[7]=f,t[8]=b,t[9]=x,t[10]=S,t[11]=C):(b=t[8],x=t[9],S=t[10],C=t[11]);let w=S,T;t[12]!==i||t[13]!==b||t[14]!==r||t[15]!==o||t[16]!==n||t[17]!==C?(T=async function(){if(!n||!b)return;p(!0);let e=/\.mdx?$/i.test(C),t=await Tt({scope:n.skill.scope,name:n.skill.name,path:C,content:e?`# ${C.split(`/`).pop()?.replace(/\.mdx?$/i,``)??``}\n`:``});if(p(!1),!t.ok){rt.error(i({id:`a_2_uB`,values:{0:t.error,trimmed:C}}));return}if(rt.success(i({id:`MXSt4t`,values:{0:t.path}})),e){let e=lt(n.skill,C);o({kind:`doc`,target:e,docName:e})}r(!1)},t[12]=i,t[13]=b,t[14]=r,t[15]=o,t[16]=n,t[17]=C,t[18]=T):T=t[18];let E=T,A;t[19]!==r||t[20]!==f?(A=e=>{!e&&!f&&r(!1)},t[19]=r,t[20]=f,t[21]=A):A=t[21];let M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`wQvvZY`})}),t[22]=M):M=t[22];let F;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsxs)(N,{children:[M,(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`lM4c-I`})})]}),t[23]=F):F=t[23];let I;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Q.jsx)(s,{id:`I6gXOa`}),t[24]=I):I=t[24];let L;t[25]===l?L=t[26]:(L=(0,Q.jsx)(le,{htmlFor:l,children:I}),t[25]=l,t[26]=L);let R;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>d(e.target.value),t[27]=R):R=t[27];let z=x&&C!==``,B;t[28]===E?B=t[29]:(B=e=>{e.key===`Enter`&&E()},t[28]=E,t[29]=B);let V;t[30]!==l||t[31]!==u||t[32]!==z||t[33]!==B?(V=(0,Q.jsx)(it,{id:l,value:u,onChange:R,placeholder:`references/notes.md`,"aria-invalid":z,onKeyDown:B}),t[30]=l,t[31]=u,t[32]=z,t[33]=B,t[34]=V):V=t[34];let H;t[35]!==w||t[36]!==x||t[37]!==C?(H=x&&C!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(s,{id:`fVzizW`})}):w?(0,Q.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:(0,Q.jsx)(s,{id:`9lso1Y`,values:{folderPart:w},components:{0:(0,Q.jsx)(`span`,{className:`font-mono text-foreground/80`})}})}):null,t[35]=w,t[36]=x,t[37]=C,t[38]=H):H=t[38];let U;t[39]!==L||t[40]!==V||t[41]!==H?(U=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[L,V,H]}),t[39]=L,t[40]=V,t[41]=H,t[42]=U):U=t[42];let W;t[43]===r?W=t[44]:(W=()=>r(!1),t[43]=r,t[44]=W);let G;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Q.jsx)(s,{id:`dEgA5A`}),t[45]=G):G=t[45];let K;t[46]!==f||t[47]!==W?(K=(0,Q.jsx)(v,{variant:`outline`,onClick:W,disabled:f,children:G}),t[46]=f,t[47]=W,t[48]=K):K=t[48];let ee;t[49]===E?ee=t[50]:(ee=()=>void E(),t[49]=E,t[50]=ee);let q=!b,J;t[51]===f?J=t[52]:(J=f?(0,Q.jsx)(s,{id:`E9bKSA`}):(0,Q.jsx)(s,{id:`hYgDIe`}),t[51]=f,t[52]=J);let Y;t[53]!==ee||t[54]!==q||t[55]!==J?(Y=(0,Q.jsx)(v,{onClick:ee,disabled:q,children:J}),t[53]=ee,t[54]=q,t[55]=J,t[56]=Y):Y=t[56];let te;t[57]!==K||t[58]!==Y?(te=(0,Q.jsxs)(j,{children:[K,Y]}),t[57]=K,t[58]=Y,t[59]=te):te=t[59];let X;t[60]!==U||t[61]!==te?(X=(0,Q.jsxs)(k,{className:`sm:max-w-md`,children:[F,U,te]}),t[60]=U,t[61]=te,t[62]=X):X=t[62];let ne;return t[63]!==X||t[64]!==A?(ne=(0,Q.jsx)(P,{open:!0,onOpenChange:A,children:X}),t[63]=X,t[64]=A,t[65]=ne):ne=t[65],ne}function Ki(e){let t=(0,$.c)(18),{target:n,onOpenChange:r}=e,{_:i}=c(),{setSkillsSidebar:o,closeTabs:s,openTabs:l}=a(),[u,d]=(0,Z.useState)(!1),f;t[0]!==i||t[1]!==s||t[2]!==r||t[3]!==l||t[4]!==o?(f=async function(e){let{skill:t,filePath:n}=e;o(!0),d(!0);let a=await At({scope:t.scope,name:t.name,path:n});if(d(!1),!a.ok){rt.error(i({id:`CBT70t`,values:{0:a.error}}));return}if(!a.existed){rt.error(i({id:`q4efaG`,values:{filePath:n}})),r(!1);return}rt.success(i({id:`gOmloS`,values:{filePath:n}})),s(Li(l,t,n),{force:!0}),r(!1)},t[0]=i,t[1]=s,t[2]=r,t[3]=l,t[4]=o,t[5]=f):f=t[5];let m=f,h=n!==null,g;t[6]!==u||t[7]!==r?(g=e=>{!e&&!u&&r(!1)},t[6]=u,t[7]=r,t[8]=g):g=t[8];let _;t[9]!==i||t[10]!==u||t[11]!==m||t[12]!==n?(_=n?(0,Q.jsx)(p,{itemName:i({id:`wZPUJx`,values:{0:n.filePath}}),isSubmitting:u,onDelete:()=>m(n),customDescription:i({id:`ppzof_`,values:{0:mt(n.skill.path),1:n.filePath,2:n.skill.name}})}):null,t[9]=i,t[10]=u,t[11]=m,t[12]=n,t[13]=_):_=t[13];let v;return t[14]!==h||t[15]!==g||t[16]!==_?(v=(0,Q.jsx)(P,{open:h,onOpenChange:g,children:_}),t[14]=h,t[15]=g,t[16]=_,t[17]=v):v=t[17],v}function qi(e){let t=(0,$.c)(64),{target:n,onOpenChange:r}=e,{_:i}=c(),a=Je(),o=(0,Z.useId)(),[l,u]=(0,Z.useState)(``),[d,f]=(0,Z.useState)(!1),p;t[0]===n?p=t[1]:(p=()=>{n&&u(n.filePath)},t[0]=n,t[1]=p);let m=n?.skill.scope,h=n?.skill.name,g=n?.filePath,_;if(t[2]!==m||t[3]!==h||t[4]!==g?(_=[m,h,g],t[2]=m,t[3]=h,t[4]=g,t[5]=_):_=t[5],(0,Z.useEffect)(p,_),!n)return null;let y,b,x;t[6]!==l||t[7]!==n.filePath?(b=l.trim(),x=b===n.filePath,y=b===``||!Wi(b),t[6]=l,t[7]=n.filePath,t[8]=y,t[9]=b,t[10]=x):(y=t[8],b=t[9],x=t[10]);let S=y,C=!S&&!x&&!d,w;t[11]!==i||t[12]!==C||t[13]!==r||t[14]!==a||t[15]!==n||t[16]!==b?(w=async function(){if(!n||!C)return;f(!0);let e=await St({scope:n.skill.scope,name:n.skill.name,from:n.filePath,to:b});if(f(!1),!e.ok){rt.error(i({id:`11ukmX`,values:{0:e.error}}));return}e.fromDocName!==void 0&&e.toDocName!==void 0&&a(e.fromDocName,e.toDocName),rt.success(i({id:`XszXjc`,values:{0:e.to}})),r(!1)},t[11]=i,t[12]=C,t[13]=r,t[14]=a,t[15]=n,t[16]=b,t[17]=w):w=t[17];let T=w,E;t[18]!==r||t[19]!==d?(E=e=>{!e&&!d&&r(!1)},t[18]=r,t[19]=d,t[20]=E):E=t[20];let A;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`yckias`})}),t[21]=A):A=t[21];let M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsxs)(N,{children:[A,(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`HzVAoz`})})]}),t[22]=M):M=t[22];let F;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(s,{id:`I6gXOa`}),t[23]=F):F=t[23];let I;t[24]===o?I=t[25]:(I=(0,Q.jsx)(le,{htmlFor:o,children:F}),t[24]=o,t[25]=I);let L;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>u(e.target.value),t[26]=L):L=t[26];let R=S&&b!==``,z;t[27]===T?z=t[28]:(z=e=>{e.key===`Enter`&&T()},t[27]=T,t[28]=z);let B;t[29]!==o||t[30]!==l||t[31]!==R||t[32]!==z?(B=(0,Q.jsx)(it,{id:o,value:l,onChange:L,"aria-invalid":R,onKeyDown:z}),t[29]=o,t[30]=l,t[31]=R,t[32]=z,t[33]=B):B=t[33];let V;t[34]!==S||t[35]!==b?(V=S&&b!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(s,{id:`fVzizW`})}):null,t[34]=S,t[35]=b,t[36]=V):V=t[36];let H;t[37]!==I||t[38]!==B||t[39]!==V?(H=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[I,B,V]}),t[37]=I,t[38]=B,t[39]=V,t[40]=H):H=t[40];let U;t[41]===r?U=t[42]:(U=()=>r(!1),t[41]=r,t[42]=U);let W;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(s,{id:`dEgA5A`}),t[43]=W):W=t[43];let G;t[44]!==d||t[45]!==U?(G=(0,Q.jsx)(v,{variant:`outline`,onClick:U,disabled:d,children:W}),t[44]=d,t[45]=U,t[46]=G):G=t[46];let K;t[47]===T?K=t[48]:(K=()=>void T(),t[47]=T,t[48]=K);let ee=!C,q;t[49]===d?q=t[50]:(q=d?(0,Q.jsx)(s,{id:`tHKQ6j`}):(0,Q.jsx)(s,{id:`2wxgft`}),t[49]=d,t[50]=q);let J;t[51]!==K||t[52]!==ee||t[53]!==q?(J=(0,Q.jsx)(v,{onClick:K,disabled:ee,children:q}),t[51]=K,t[52]=ee,t[53]=q,t[54]=J):J=t[54];let Y;t[55]!==G||t[56]!==J?(Y=(0,Q.jsxs)(j,{children:[G,J]}),t[55]=G,t[56]=J,t[57]=Y):Y=t[57];let te;t[58]!==H||t[59]!==Y?(te=(0,Q.jsxs)(k,{className:`sm:max-w-md`,children:[M,H,Y]}),t[58]=H,t[59]=Y,t[60]=te):te=t[60];let X;return t[61]!==te||t[62]!==E?(X=(0,Q.jsx)(P,{open:!0,onOpenChange:E,children:te}),t[61]=te,t[62]=E,t[63]=X):X=t[63],X}function Ji(e){let t=(0,$.c)(59),{target:n,onOpenChange:r}=e,{_:i}=c(),a=(0,Z.useId)(),[o,l]=(0,Z.useState)(null),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)(!1),[g,_]=(0,Z.useState)(``),[y,b]=(0,Z.useState)(!1),x;t[0]===n?x=t[1]:(x=()=>{if(l(null),d(null),p(!1),h(!1),!n)return;let{skill:e,editor:t}=n,r=e.absolutePath?.slice(0,-`/${e.path}`.length)??null;if(r===null){p(!0);return}let i=`${r}/${e.path.replace(/\/SKILL\.mdx?$/i,``)}`,a=`${r}/${ht(t,e.scope)}/${e.name}`,o=new AbortController;for(let[t,n]of[[i,d],[a,l]])Dt({source:t,name:e.name},o.signal).then(e=>{o.signal.aborted||(e.ok?n(e.skillMd):p(!0))}).catch(()=>{o.signal.aborted||p(!0)});return()=>o.abort()},t[0]=n,t[1]=x);let S=n?.skill.scope,C=n?.skill.name,w=n?.editor,T;if(t[2]!==S||t[3]!==C||t[4]!==w?(T=[S,C,w],t[2]=S,t[3]=C,t[4]=w,t[5]=T):T=t[5],(0,Z.useEffect)(x,T),!n)return null;let{skill:E,editor:M}=n,F;t[6]!==i||t[7]!==M||t[8]!==r||t[9]!==E.name||t[10]!==E.scope||t[11]!==n||t[12]!==g?(F=async function(e){if(!n)return;b(!0);let t=await bt({scope:E.scope,name:E.name,editor:M,action:e,...e===`rename`?{toName:g.trim()}:{}});if(b(!1),!t.ok){rt.error(i({id:`MIF36T`,values:{0:t.error}}));return}rt.success(i(e===`align`?{id:`QKgePK`,values:{editor:M}}:e===`make-source`?{id:`It9oAP`,values:{editor:M}}:{id:`b2ezG_`,values:{0:g.trim()}})),r(!1)},t[6]=i,t[7]=M,t[8]=r,t[9]=E.name,t[10]=E.scope,t[11]=n,t[12]=g,t[13]=F):F=t[13];let I=F,L,R;t[14]!==E.name||t[15]!==g?(R=g.trim(),L=R===``||!we.test(R)||R===E.name,t[14]=E.name,t[15]=g,t[16]=L,t[17]=R):(L=t[16],R=t[17]);let z=L,B;t[18]!==y||t[19]!==r?(B=e=>{!e&&!y&&r(!1)},t[18]=y,t[19]=r,t[20]=B):B=t[20];let V;t[21]!==M||t[22]!==E.name?(V=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`q8aCbb`,values:{0:E.name,editor:M}})}),t[21]=M,t[22]=E.name,t[23]=V):V=t[23];let H;t[24]===M?H=t[25]:(H=(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`QASTNu`,values:{editor:M}})}),t[24]=M,t[25]=H);let U;t[26]!==H||t[27]!==V?(U=(0,Q.jsxs)(N,{children:[V,H]}),t[26]=H,t[27]=V,t[28]=U):U=t[28];let W;t[29]!==u||t[30]!==o||t[31]!==f?(W=u!==null&&o!==null?(0,Q.jsx)(Vt,{oldContent:u,newContent:o,layout:`unified`}):f?(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center px-6 text-center text-muted-foreground text-sm`,children:(0,Q.jsx)(s,{id:`5BlXTD`})}):(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center text-muted-foreground text-sm`,children:(0,Q.jsx)(s,{id:`1V17kO`})}),t[29]=u,t[30]=o,t[31]=f,t[32]=W):W=t[32];let G;t[33]!==I||t[34]!==M||t[35]!==a||t[36]!==z||t[37]!==m||t[38]!==E.name||t[39]!==g||t[40]!==R?(G=m?(0,Q.jsxs)(`div`,{className:`mt-3 space-y-1.5`,children:[(0,Q.jsx)(le,{htmlFor:a,children:(0,Q.jsx)(s,{id:`pSimwP`,values:{editor:M}})}),(0,Q.jsx)(it,{id:a,value:g,onChange:e=>_(e.target.value),placeholder:`${E.name}-${M}`,"aria-invalid":z&&R!==``,onKeyDown:e=>{e.key===`Enter`&&!z&&I(`rename`)}})]}):null,t[33]=I,t[34]=M,t[35]=a,t[36]=z,t[37]=m,t[38]=E.name,t[39]=g,t[40]=R,t[41]=G):G=t[41];let K;t[42]!==W||t[43]!==G?(K=(0,Q.jsxs)(A,{className:`min-h-0 flex-1 overflow-auto`,children:[W,G]}),t[42]=W,t[43]=G,t[44]=K):K=t[44];let ee;t[45]!==I||t[46]!==y||t[47]!==M||t[48]!==z||t[49]!==m||t[50]!==E.name?(ee=(0,Q.jsx)(j,{children:m?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(v,{variant:`outline`,onClick:()=>h(!1),disabled:y,children:(0,Q.jsx)(s,{id:`iH8pgl`})}),(0,Q.jsx)(v,{onClick:()=>void I(`rename`),disabled:y||z,children:(0,Q.jsx)(s,{id:`AT0e50`})})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(v,{variant:`outline`,onClick:()=>{_(`${E.name}-${M}`),h(!0)},disabled:y,children:(0,Q.jsx)(s,{id:`AT0e50`})}),(0,Q.jsx)(v,{variant:`outline`,onClick:()=>void I(`make-source`),disabled:y,children:(0,Q.jsx)(s,{id:`xWomUD`,values:{editor:M}})}),(0,Q.jsx)(v,{onClick:()=>void I(`align`),disabled:y,children:(0,Q.jsx)(s,{id:`PZn2LP`})})]})}),t[45]=I,t[46]=y,t[47]=M,t[48]=z,t[49]=m,t[50]=E.name,t[51]=ee):ee=t[51];let q;t[52]!==U||t[53]!==K||t[54]!==ee?(q=(0,Q.jsxs)(k,{className:`flex max-h-[85vh] w-full max-w-3xl flex-col`,children:[U,K,ee]}),t[52]=U,t[53]=K,t[54]=ee,t[55]=q):q=t[55];let J;return t[56]!==q||t[57]!==B?(J=(0,Q.jsx)(P,{open:!0,onOpenChange:B,children:q}),t[56]=q,t[57]=B,t[58]=J):J=t[58],J}function Yi(e){let t=(0,$.c)(75),{skill:n,existingNames:r,onOpenChange:i,onRenamed:a}=e,o=Ye(),c=n!==null,l=(0,Z.useId)(),[u,d]=(0,Z.useState)(``),[f,p]=(0,Z.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.name)},t[0]=n,t[1]=m);let h=n?.scope,g=n?.name,_;if(t[2]!==h||t[3]!==g?(_=[h,g],t[2]=h,t[3]=g,t[4]=_):_=t[4],(0,Z.useEffect)(m,_),!n)return null;let y,b,x,S,C,w;if(t[5]!==r||t[6]!==u||t[7]!==n.name){C=u.trim(),w=C===n.name;let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=/\s/,t[14]=e):e=t[14];let i;t[15]===u?i=t[16]:(i=e.test(u),t[15]=u,t[16]=i),y=i,S=C.length>64,b=C===``||!we.test(C)||S,x=!b&&!w&&r.has(C),t[5]=r,t[6]=u,t[7]=n.name,t[8]=y,t[9]=b,t[10]=x,t[11]=S,t[12]=C,t[13]=w}else y=t[8],b=t[9],x=t[10],S=t[11],C=t[12],w=t[13];let T=x,E=!b&&!T&&!w&&!f,A;t[17]!==E||t[18]!==i||t[19]!==a||t[20]!==o||t[21]!==n||t[22]!==C?(A=async function(){if(!n||!E)return;p(!0);let e=await o({scope:n.scope,name:n.name},C);p(!1),e.ok&&(a?.(C),i(!1))},t[17]=E,t[18]=i,t[19]=a,t[20]=o,t[21]=n,t[22]=C,t[23]=A):A=t[23];let M=A,F;t[24]===i?F=t[25]:(F=e=>e?null:i(!1),t[24]=i,t[25]=F);let I;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`dw_3cv`})}),t[26]=I):I=t[26];let L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsxs)(N,{children:[I,(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`R9IDFz`})})]}),t[27]=L):L=t[27];let R;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Q.jsx)(s,{id:`6YtxFj`}),t[28]=R):R=t[28];let z;t[29]===l?z=t[30]:(z=(0,Q.jsx)(le,{htmlFor:l,children:R}),t[29]=l,t[30]=z);let B;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>d(e.target.value),t[31]=B):B=t[31];let V;t[32]===M?V=t[33]:(V=e=>{e.key===`Enter`&&M()},t[32]=M,t[33]=V);let H=b||T,U=b&&C!==``||T?`${l}-error`:void 0,W;t[34]!==l||t[35]!==u||t[36]!==V||t[37]!==H||t[38]!==U?(W=(0,Q.jsx)(it,{id:l,value:u,onChange:B,onKeyDown:V,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,maxLength:64,"aria-invalid":H,"aria-describedby":U,className:`font-mono`}),t[34]=l,t[35]=u,t[36]=V,t[37]=H,t[38]=U,t[39]=W):W=t[39];let G;t[40]!==T||t[41]!==y||t[42]!==l||t[43]!==b||t[44]!==S||t[45]!==C?(G=b&&C!==``?(0,Q.jsx)(`p`,{id:`${l}-error`,className:`text-xs text-destructive`,children:y?(0,Q.jsx)(s,{id:`iUwpZI`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}}):S?(0,Q.jsx)(s,{id:`lK9c4T`}):(0,Q.jsx)(s,{id:`A50vr3`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}})}):T?(0,Q.jsx)(`p`,{id:`${l}-error`,className:`text-xs text-destructive`,children:(0,Q.jsx)(s,{id:`YJ1BTp`})}):null,t[40]=T,t[41]=y,t[42]=l,t[43]=b,t[44]=S,t[45]=C,t[46]=G):G=t[46];let K;t[47]!==z||t[48]!==W||t[49]!==G?(K=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[z,W,G]}),t[47]=z,t[48]=W,t[49]=G,t[50]=K):K=t[50];let ee;t[51]===i?ee=t[52]:(ee=()=>i(!1),t[51]=i,t[52]=ee);let q;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,Q.jsx)(s,{id:`dEgA5A`}),t[53]=q):q=t[53];let J;t[54]!==f||t[55]!==ee?(J=(0,Q.jsx)(v,{variant:`outline`,className:`font-mono uppercase`,onClick:ee,disabled:f,children:q}),t[54]=f,t[55]=ee,t[56]=J):J=t[56];let Y;t[57]===M?Y=t[58]:(Y=()=>void M(),t[57]=M,t[58]=Y);let te=!E,X;t[59]===f?X=t[60]:(X=f?(0,Q.jsx)(s,{id:`tHKQ6j`}):(0,Q.jsx)(s,{id:`2wxgft`}),t[59]=f,t[60]=X);let ne;t[61]!==Y||t[62]!==te||t[63]!==X?(ne=(0,Q.jsx)(v,{onClick:Y,disabled:te,children:X}),t[61]=Y,t[62]=te,t[63]=X,t[64]=ne):ne=t[64];let re;t[65]!==J||t[66]!==ne?(re=(0,Q.jsxs)(j,{children:[J,ne]}),t[65]=J,t[66]=ne,t[67]=re):re=t[67];let ie;t[68]!==K||t[69]!==re?(ie=(0,Q.jsxs)(k,{children:[L,K,re]}),t[68]=K,t[69]=re,t[70]=ie):ie=t[70];let ae;return t[71]!==c||t[72]!==ie||t[73]!==F?(ae=(0,Q.jsx)(P,{open:c,onOpenChange:F,children:ie}),t[71]=c,t[72]=ie,t[73]=F,t[74]=ae):ae=t[74],ae}function Xi(){let e=(0,$.c)(5),{_:t}=c(),n=gt(),r=Je(),i=Ft(),a;return e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==i?(a=async(e,a)=>{if(a===e.scope)return!1;ft(e.scope,e.name);let o=await Mt({name:e.name,fromScope:e.scope,toScope:a});if(dt(e.scope,e.name),!o.ok)return rt.error(t({id:`07eGJB`,values:{0:o.error}})),!1;rt.success(t({id:`yhI6P0`,values:{0:e.name,1:n[a]}}));let s=i.status===`ready`?i.data.find(t=>t.scope===e.scope&&t.name===e.name):void 0;return r(s?ct(s):Ne(e.scope,e.name),a===`project`&&o.path!==void 0?`${o.path.replace(/\/+$/,``)}/SKILL`:Ne(a,e.name)),!0},e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Zi(e){let t=(0,$.c)(38),{target:n,onOpenChange:r}=e,i=gt(),a=Xi(),[o,c]=(0,Z.useState)(!1);if(!n)return null;let{scope:l,name:u,toScope:d}=n,f;t[0]!==o||t[1]!==r?(f=e=>!e&&!o&&r(!1),t[0]=o,t[1]=r,t[2]=f):f=t[2];let p=i[d],m;t[3]===p?m=t[4]:(m=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`SXEdCq`,values:{0:p}})}),t[3]=p,t[4]=m);let h=i[l],g=i[d],_=i[d],y;t[5]!==u||t[6]!==h||t[7]!==g||t[8]!==_?(y={0:h,1:g,2:_,name:u},t[5]=u,t[6]=h,t[7]=g,t[8]=_,t[9]=y):y=t[9];let b;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(b={0:(0,Q.jsx)(`code`,{className:`font-mono`})},t[10]=b):b=t[10];let x;t[11]===y?x=t[12]:(x=(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`7bIiJ7`,values:y,components:b})}),t[11]=y,t[12]=x);let S;t[13]!==m||t[14]!==x?(S=(0,Q.jsxs)(N,{children:[m,x]}),t[13]=m,t[14]=x,t[15]=S):S=t[15];let C;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(s,{id:`dEgA5A`}),t[16]=C):C=t[16];let w;t[17]===o?w=t[18]:(w=(0,Q.jsx)(M,{asChild:!0,children:(0,Q.jsx)(v,{variant:`outline`,disabled:o,children:C})}),t[17]=o,t[18]=w);let T;t[19]!==a||t[20]!==u||t[21]!==r||t[22]!==l||t[23]!==d?(T=async()=>{c(!0),await a({scope:l,name:u},d),c(!1),r(!1)},t[19]=a,t[20]=u,t[21]=r,t[22]=l,t[23]=d,t[24]=T):T=t[24];let E;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(s,{id:`QWdKwH`}),t[25]=E):E=t[25];let A;t[26]!==o||t[27]!==T?(A=(0,Q.jsx)(v,{"data-testid":`skill-scope-move-confirm`,disabled:o,onClick:T,children:E}),t[26]=o,t[27]=T,t[28]=A):A=t[28];let F;t[29]!==w||t[30]!==A?(F=(0,Q.jsxs)(j,{children:[w,A]}),t[29]=w,t[30]=A,t[31]=F):F=t[31];let I;t[32]!==S||t[33]!==F?(I=(0,Q.jsxs)(k,{className:`sm:max-w-md`,children:[S,F]}),t[32]=S,t[33]=F,t[34]=I):I=t[34];let L;return t[35]!==f||t[36]!==I?(L=(0,Q.jsx)(P,{open:!0,onOpenChange:f,children:I}),t[35]=f,t[36]=I,t[37]=L):L=t[37],L}function Qi(){let e=(0,$.c)(50),{_:t}=c(),n=It(),[r,i]=(0,Z.useState)(null),[a,o]=(0,Z.useState)(null),[s,l]=(0,Z.useState)(null),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(null),[m,h]=(0,Z.useState)(null),[g,_]=(0,Z.useState)(null),[v,y]=(0,Z.useState)(null),b;e[0]===t?b=e[1]:(b=async function(e,n,r){y(e.name);let i=await kt({scope:e.scope,name:e.name,...n?{targets:[...n]}:{},...r?.linkMode===void 0?{}:{linkMode:r.linkMode}});if(y(null),!i.ok)return rt.error(t({id:`Mj8R8K`,values:{0:i.error}})),i;let a=$i,o=new Set(i.hosts),s=i.hosts.filter(t=>!e.hosts.includes(t)),c=e.hosts.filter(e=>!o.has(e)),l=e=>{let t=i.warningCodes.indexOf(e);return t>=0?i.warnings[t]:void 0},u=l(`no-targets`);if(u)return rt.warning(u),i;if(s.length>0){let e=l(`scripts-present`);e&&rt.warning(e);let t=l(`no-description`);t&&rt.warning(t)}return i.hosts.length===0?rt.success(t({id:`4pDZ2N`,values:{0:e.name}})):s.length>0&&c.length===0?rt.success(t({id:`PPFQ3o`,values:{0:e.name,1:a(s)}})):c.length>0&&s.length===0?rt.success(t({id:`OOIVJo`,values:{0:e.name,1:a(c)}})):s.length>0&&c.length>0?rt.success(t({id:`OxplNM`,values:{0:e.name,1:a(s),2:a(c)}})):rt.success(t({id:`wDgmsr`,values:{0:e.name,1:a(i.hosts)}})),i},e[0]=t,e[1]=b);let x=b,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=async function(e,t){if(t.length!==0){y(e.name);for(let{target:n,mode:r}of t){let t=await jt({scope:e.scope,name:e.name,target:n,mode:r});if(!t.ok){rt.error(t.error);break}}y(null)}},e[2]=S):S=e[2];let C=S,w;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(w=async function(e,t){y(e.name);let n=await t();return y(null),n},e[3]=w):w=e[3];let T=w,E;e[4]!==t||e[5]!==n?(E=async function(e,r){let i=await Ct({scope:e.scope,name:e.name,existingNames:r});if(!i.ok){rt.error(t({id:`UPjaXD`,values:{0:e.name,1:i.error}}));return}rt.success(t({id:`0g7rCZ`,values:{0:i.name}})),n(e.scope,i.name)},e[4]=t,e[5]=n,e[6]=E):E=e[6];let D=E,O,k;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{e||i(null)},k=()=>i(null),e[7]=O,e[8]=k):(O=e[7],k=e[8]);let A;e[9]===r?A=e[10]:(A=(0,Q.jsx)(Ui,{skill:r,onOpenChange:O,onDeleted:k}),e[9]=r,e[10]=A);let j=a?.skill??null,M=a?.existingNames??ta,N,P;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>{e||o(null)},N=()=>o(null),e[11]=N,e[12]=P):(N=e[11],P=e[12]);let F;e[13]!==j||e[14]!==M?(F=(0,Q.jsx)(Yi,{skill:j,existingNames:M,onOpenChange:P,onRenamed:N}),e[13]=j,e[14]=M,e[15]=F):F=e[15];let I;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>{e||l(null)},e[16]=I):I=e[16];let L;e[17]===s?L=e[18]:(L=(0,Q.jsx)(Zi,{target:s,onOpenChange:I}),e[17]=s,e[18]=L);let R;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{e||d(null)},e[19]=R):R=e[19];let z;e[20]===u?z=e[21]:(z=(0,Q.jsx)(qi,{target:u,onOpenChange:R}),e[20]=u,e[21]=z);let B;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>{e||p(null)},e[22]=B):B=e[22];let V;e[23]===f?V=e[24]:(V=(0,Q.jsx)(Ki,{target:f,onOpenChange:B}),e[23]=f,e[24]=V);let H;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>{e||h(null)},e[25]=H):H=e[25];let U;e[26]===m?U=e[27]:(U=(0,Q.jsx)(Gi,{target:m,onOpenChange:H}),e[26]=m,e[27]=U);let W;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>{e||_(null)},e[28]=W):W=e[28];let G;e[29]===g?G=e[30]:(G=(0,Q.jsx)(Ji,{target:g,onOpenChange:W}),e[29]=g,e[30]=G);let K;e[31]!==F||e[32]!==L||e[33]!==z||e[34]!==V||e[35]!==U||e[36]!==G||e[37]!==A?(K=(0,Q.jsxs)(Q.Fragment,{children:[A,F,L,z,V,U,G]}),e[31]=F,e[32]=L,e[33]=z,e[34]=V,e[35]=U,e[36]=G,e[37]=A,e[38]=K):K=e[38];let ee=K,q,J,Y,te,X,ne;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(q=(e,t)=>o({skill:e,existingNames:t}),J=(e,t)=>l({scope:e.scope,name:e.name,toScope:t}),Y=(e,t)=>d({skill:e,filePath:t}),te=(e,t)=>p({skill:e,filePath:t}),X=(e,t)=>h(t===void 0?{skill:e}:{skill:e,prefix:t}),ne=(e,t)=>_({skill:e,editor:t}),e[39]=q,e[40]=J,e[41]=Y,e[42]=te,e[43]=X,e[44]=ne):(q=e[39],J=e[40],Y=e[41],te=e[42],X=e[43],ne=e[44]);let re;return e[45]!==ee||e[46]!==D||e[47]!==x||e[48]!==v?(re={installingName:v,install:x,convertLocations:C,runLocationWrite:T,duplicate:D,requestDelete:i,requestRename:q,requestScopeMove:J,requestFileRename:Y,requestFileDelete:te,requestFileCreate:X,requestForkResolve:ne,dialogs:ee},e[45]=ee,e[46]=D,e[47]=x,e[48]=v,e[49]=re):re=e[49],re}function $i(e){return e.map(ea).join(`, `)}function ea(e){return Se[e]??e}var ta=new Set;function na(e){let t=(0,$.c)(7),{absolutePath:n,menuKind:r}=e,i=r===void 0?`dropdown`:r,a=typeof window<`u`?window.okDesktop:void 0;if(!a||!n)return null;let o;t[0]===n?o=t[1]:(o=()=>void a.shell.showItemInFolder(n),t[0]=n,t[1]=o);let s,c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)($e,{"aria-hidden":!0}),c=Mi(a.platform),t[2]=s,t[3]=c):(s=t[2],c=t[3]);let l;return t[4]!==i||t[5]!==o?(l=(0,Q.jsxs)(Jr,{menuKind:i,onSelect:o,children:[s,c]}),t[4]=i,t[5]=o,t[6]=l):l=t[6],l}function ra(e){let t=(0,$.c)(68),{skill:n,filePath:r,actions:i,menuKind:a}=e,o=a===void 0?`dropdown`:a,{_:l}=c(),u;t[0]!==r||t[1]!==n.absolutePath?(u=n.absolutePath?`${mt(n.absolutePath)}/${r}`:void 0,t[0]=r,t[1]=n.absolutePath,t[2]=u):u=t[2];let d=u,f;t[3]===n.path?f=t[4]:(f=mt(n.path),t[3]=n.path,t[4]=f);let p=`${f}/${r}`,m;t[5]===l?m=t[6]:(m=async function(e){try{await Bt(e),rt.success(l({id:`SXCSQd`}))}catch{rt.error(l({id:`cRHuuI`}))}},t[5]=l,t[6]=m);let h=m,g;t[7]!==i||t[8]!==r||t[9]!==n?(g=()=>i.requestFileRename(n,r),t[7]=i,t[8]=r,t[9]=n,t[10]=g):g=t[10];let _,v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Q.jsx)(Hn,{"aria-hidden":!0}),v=(0,Q.jsx)(s,{id:`2wxgft`}),t[11]=_,t[12]=v):(_=t[11],v=t[12]);let y;t[13]!==o||t[14]!==g?(y=(0,Q.jsxs)(Jr,{menuKind:o,onSelect:g,children:[_,v]}),t[13]=o,t[14]=g,t[15]=y):y=t[15];let b;t[16]!==d||t[17]!==o?(b=(0,Q.jsx)(na,{absolutePath:d,menuKind:o}),t[16]=d,t[17]=o,t[18]=b):b=t[18];let x,S;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(Qe,{"aria-hidden":!0}),S=(0,Q.jsx)(s,{id:`zd00pH`}),t[19]=x,t[20]=S):(x=t[19],S=t[20]);let C;t[21]===o?C=t[22]:(C=(0,Q.jsxs)(ei,{menuKind:o,children:[x,S]}),t[21]=o,t[22]=C);let w;t[23]!==d||t[24]!==h||t[25]!==o?(w=d?(0,Q.jsx)(Jr,{menuKind:o,onSelect:()=>void h(d),children:(0,Q.jsx)(s,{id:`z2funE`})}):null,t[23]=d,t[24]=h,t[25]=o,t[26]=w):w=t[26];let T;t[27]!==h||t[28]!==p?(T=()=>void h(p),t[27]=h,t[28]=p,t[29]=T):T=t[29];let E;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(s,{id:`xloBjn`}),t[30]=E):E=t[30];let D;t[31]!==o||t[32]!==T?(D=(0,Q.jsx)(Jr,{menuKind:o,onSelect:T,children:E}),t[31]=o,t[32]=T,t[33]=D):D=t[33];let O;t[34]!==o||t[35]!==w||t[36]!==D?(O=(0,Q.jsxs)(qr,{menuKind:o,children:[w,D]}),t[34]=o,t[35]=w,t[36]=D,t[37]=O):O=t[37];let k;t[38]!==o||t[39]!==O?(k=(0,Q.jsx)($r,{menuKind:o,children:O}),t[38]=o,t[39]=O,t[40]=k):k=t[40];let A;t[41]!==o||t[42]!==C||t[43]!==k?(A=(0,Q.jsxs)(Qr,{menuKind:o,children:[C,k]}),t[41]=o,t[42]=C,t[43]=k,t[44]=A):A=t[44];let j;t[45]!==o||t[46]!==A||t[47]!==y||t[48]!==b?(j=(0,Q.jsxs)(qr,{menuKind:o,children:[y,b,A]}),t[45]=o,t[46]=A,t[47]=y,t[48]=b,t[49]=j):j=t[49];let M;t[50]===o?M=t[51]:(M=(0,Q.jsx)(Zr,{menuKind:o}),t[50]=o,t[51]=M);let N;t[52]!==i||t[53]!==r||t[54]!==n?(N=()=>i.requestFileDelete(n,r),t[52]=i,t[53]=r,t[54]=n,t[55]=N):N=t[55];let P,F;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsx)(nt,{"aria-hidden":!0}),F=(0,Q.jsx)(s,{id:`cnGeoo`}),t[56]=P,t[57]=F):(P=t[56],F=t[57]);let I;t[58]!==o||t[59]!==N?(I=(0,Q.jsxs)(Jr,{menuKind:o,variant:`destructive`,onSelect:N,children:[P,F]}),t[58]=o,t[59]=N,t[60]=I):I=t[60];let L;t[61]!==o||t[62]!==I?(L=(0,Q.jsx)(qr,{menuKind:o,children:I}),t[61]=o,t[62]=I,t[63]=L):L=t[63];let R;return t[64]!==j||t[65]!==M||t[66]!==L?(R=(0,Q.jsxs)(Q.Fragment,{children:[j,M,L]}),t[64]=j,t[65]=M,t[66]=L,t[67]=R):R=t[67],R}function ia(e){let t=(0,$.c)(15),{skill:n,actions:r,existingNames:i,menuKind:a}=e,o=a===void 0?`dropdown`:a,s=Lt(),c=g().states,{dispatch:l}=Fr(),u=typeof window<`u`?window.okDesktop:void 0,d;t[0]!==n.name||t[1]!==n.scope||t[2]!==s?(d=vr({skillName:n.name,scope:n.scope,workspace:s}),t[0]=n.name,t[1]=n.scope,t[2]=s,t[3]=d):d=t[3];let f=d,p;t[4]!==l||t[5]!==f||t[6]!==c||t[7]!==o?(p=o===`context`?(0,Q.jsx)(ji,{input:f,installStates:c,dispatch:l}):(0,Q.jsx)(Pi,{input:f,installStates:c,isElectronHost:u!=null,dispatch:l}),t[4]=l,t[5]=f,t[6]=c,t[7]=o,t[8]=p):p=t[8];let m;return t[9]!==r||t[10]!==i||t[11]!==o||t[12]!==n||t[13]!==p?(m=(0,Q.jsx)(aa,{actions:r,existingNames:i,menuKind:o,skill:n,openWithAi:p}),t[9]=r,t[10]=i,t[11]=o,t[12]=n,t[13]=p,t[14]=m):m=t[14],m}function aa(e){let t=(0,$.c)(124),{actions:n,existingNames:r,menuKind:a,openWithAi:o,skill:l}=e,{_:u}=c(),d=gt(),p=ui(l,n),m=l.absolutePath,h;t[0]===u?h=t[1]:(h=async function(e){try{await Bt(e),rt.success(u({id:`SXCSQd`}))}catch{rt.error(u({id:`cRHuuI`}))}},t[0]=u,t[1]=h);let g=h,_;t[2]!==m||t[3]!==a?(_=(0,Q.jsx)(na,{absolutePath:m,menuKind:a}),t[2]=m,t[3]=a,t[4]=_):_=t[4];let v,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Q.jsx)(Qe,{"aria-hidden":!0}),y=(0,Q.jsx)(s,{id:`zd00pH`}),t[5]=v,t[6]=y):(v=t[5],y=t[6]);let b;t[7]===a?b=t[8]:(b=(0,Q.jsxs)(ei,{menuKind:a,children:[v,y]}),t[7]=a,t[8]=b);let x;t[9]!==m||t[10]!==g||t[11]!==a?(x=m?(0,Q.jsx)(Jr,{menuKind:a,onSelect:()=>void g(m),children:(0,Q.jsx)(s,{id:`z2funE`})}):null,t[9]=m,t[10]=g,t[11]=a,t[12]=x):x=t[12];let S;t[13]!==g||t[14]!==l.path?(S=()=>void g(l.path),t[13]=g,t[14]=l.path,t[15]=S):S=t[15];let C;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(s,{id:`xloBjn`}),t[16]=C):C=t[16];let w;t[17]!==a||t[18]!==S?(w=(0,Q.jsx)(Jr,{menuKind:a,onSelect:S,children:C}),t[17]=a,t[18]=S,t[19]=w):w=t[19];let T;t[20]!==a||t[21]!==x||t[22]!==w?(T=(0,Q.jsxs)(qr,{menuKind:a,children:[x,w]}),t[20]=a,t[21]=x,t[22]=w,t[23]=T):T=t[23];let E;t[24]!==a||t[25]!==T?(E=(0,Q.jsx)($r,{menuKind:a,children:T}),t[24]=a,t[25]=T,t[26]=E):E=t[26];let D;t[27]!==a||t[28]!==E||t[29]!==b?(D=(0,Q.jsxs)(Qr,{menuKind:a,children:[b,E]}),t[27]=a,t[28]=E,t[29]=b,t[30]=D):D=t[30];let O;t[31]!==a||t[32]!==o||t[33]!==D||t[34]!==_?(O=(0,Q.jsxs)(qr,{menuKind:a,children:[_,o,D]}),t[31]=a,t[32]=o,t[33]=D,t[34]=_,t[35]=O):O=t[35];let k;t[36]===a?k=t[37]:(k=(0,Q.jsx)(Zr,{menuKind:a}),t[36]=a,t[37]=k);let A;t[38]!==n||t[39]!==r||t[40]!==l?(A=()=>void n.duplicate(l,r),t[38]=n,t[39]=r,t[40]=l,t[41]=A):A=t[41];let j,M;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsx)(i,{"aria-hidden":!0}),M=(0,Q.jsx)(s,{id:`euc6Ns`}),t[42]=j,t[43]=M):(j=t[42],M=t[43]);let N;t[44]!==a||t[45]!==A?(N=(0,Q.jsxs)(Jr,{menuKind:a,onSelect:A,children:[j,M]}),t[44]=a,t[45]=A,t[46]=N):N=t[46];let P;t[47]!==n||t[48]!==r||t[49]!==l?(P=()=>n.requestRename(l,r),t[47]=n,t[48]=r,t[49]=l,t[50]=P):P=t[50];let F,I;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(Hn,{"aria-hidden":!0}),I=(0,Q.jsx)(s,{id:`2wxgft`}),t[51]=F,t[52]=I):(F=t[51],I=t[52]);let L;t[53]!==a||t[54]!==P?(L=(0,Q.jsxs)(Jr,{menuKind:a,onSelect:P,children:[F,I]}),t[53]=a,t[54]=P,t[55]=L):L=t[55];let R;t[56]!==n||t[57]!==l?(R=()=>n.requestFileCreate(l),t[56]=n,t[57]=l,t[58]=R):R=t[58];let z,B;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Q.jsx)(f,{"aria-hidden":!0}),B=(0,Q.jsx)(s,{id:`HdkSiO`}),t[59]=z,t[60]=B):(z=t[59],B=t[60]);let V;t[61]!==a||t[62]!==R?(V=(0,Q.jsxs)(Jr,{menuKind:a,onSelect:R,children:[z,B]}),t[61]=a,t[62]=R,t[63]=V):V=t[63];let H,U;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Q.jsx)(Vn,{"aria-hidden":!0}),U=(0,Q.jsx)(s,{id:`TKQ7K-`}),t[64]=H,t[65]=U):(H=t[64],U=t[65]);let W;t[66]===a?W=t[67]:(W=(0,Q.jsxs)(ei,{menuKind:a,children:[H,U]}),t[66]=a,t[67]=W);let G;t[68]!==n||t[69]!==l?(G=e=>n.requestForkResolve(l,e),t[68]=n,t[69]=l,t[70]=G):G=t[70];let K;t[71]!==p||t[72]!==a||t[73]!==l||t[74]!==G?(K=(0,Q.jsx)(hi,{toggles:p,skill:l,menuKind:a,onResolveFork:G}),t[71]=p,t[72]=a,t[73]=l,t[74]=G,t[75]=K):K=t[75];let ee;t[76]!==a||t[77]!==K?(ee=(0,Q.jsx)(qr,{menuKind:a,children:K}),t[76]=a,t[77]=K,t[78]=ee):ee=t[78];let q;t[79]!==a||t[80]!==ee?(q=(0,Q.jsx)($r,{menuKind:a,className:li,children:ee}),t[79]=a,t[80]=ee,t[81]=q):q=t[81];let J;t[82]!==a||t[83]!==W||t[84]!==q?(J=(0,Q.jsxs)(Qr,{menuKind:a,children:[W,q]}),t[82]=a,t[83]=W,t[84]=q,t[85]=J):J=t[85];let Y;t[86]!==n||t[87]!==l?(Y=()=>n.requestScopeMove(l,l.scope===`project`?`global`:`project`),t[86]=n,t[87]=l,t[88]=Y):Y=t[88];let te;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,Q.jsx)(Bn,{"aria-hidden":!0}),t[89]=te):te=t[89];let X;t[90]!==d.global||t[91]!==d.project||t[92]!==l.scope?(X=l.scope===`project`?(0,Q.jsx)(s,{id:`bpytj4`,values:{0:d.global}}):(0,Q.jsx)(s,{id:`bpytj4`,values:{0:d.project}}),t[90]=d.global,t[91]=d.project,t[92]=l.scope,t[93]=X):X=t[93];let ne;t[94]!==a||t[95]!==Y||t[96]!==X?(ne=(0,Q.jsxs)(Jr,{menuKind:a,onSelect:Y,children:[te,X]}),t[94]=a,t[95]=Y,t[96]=X,t[97]=ne):ne=t[97];let re;t[98]!==a||t[99]!==N||t[100]!==L||t[101]!==V||t[102]!==J||t[103]!==ne?(re=(0,Q.jsxs)(qr,{menuKind:a,children:[N,L,V,J,ne]}),t[98]=a,t[99]=N,t[100]=L,t[101]=V,t[102]=J,t[103]=ne,t[104]=re):re=t[104];let ie;t[105]===a?ie=t[106]:(ie=(0,Q.jsx)(Zr,{menuKind:a}),t[105]=a,t[106]=ie);let ae;t[107]!==n||t[108]!==l?(ae=()=>n.requestDelete(l),t[107]=n,t[108]=l,t[109]=ae):ae=t[109];let oe,se;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,Q.jsx)(nt,{"aria-hidden":!0}),se=(0,Q.jsx)(s,{id:`cnGeoo`}),t[110]=oe,t[111]=se):(oe=t[110],se=t[111]);let ce;t[112]!==a||t[113]!==ae?(ce=(0,Q.jsxs)(Jr,{menuKind:a,variant:`destructive`,onSelect:ae,children:[oe,se]}),t[112]=a,t[113]=ae,t[114]=ce):ce=t[114];let le;t[115]!==a||t[116]!==ce?(le=(0,Q.jsx)(qr,{menuKind:a,children:ce}),t[115]=a,t[116]=ce,t[117]=le):le=t[117];let ue;return t[118]!==O||t[119]!==k||t[120]!==re||t[121]!==ie||t[122]!==le?(ue=(0,Q.jsxs)(Q.Fragment,{children:[O,k,re,ie,le]}),t[118]=O,t[119]=k,t[120]=re,t[121]=ie,t[122]=le,t[123]=ue):ue=t[123],ue}export{mr as A,Ur as C,hr as D,yr as E,Fr as F,fr as I,Un as L,Mr as M,gr as N,_r as O,Ar as P,Bn as R,zr as S,Lr as T,Wr as _,Zi as a,Vr as b,Pi as c,Oi as d,ci as f,Ir as g,ui as h,Qi as i,Er as j,pr as k,Mi as l,hi as m,ra as n,Ri as o,li as p,na as r,Bi as s,ia as t,ji as u,Br as v,Hr as w,Kr as x,Rr as y};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{L as n,i as r,ir as i,xr as a}from"./DocumentContext-DDYJbJQf.js";import{t as o}from"./react-f2sANaYj.js";import{n as s,r as c}from"./dist-Nvb76hAm.js";import{t as l}from"./compiler-runtime-BfE3aGVn.js";import{s as u}from"./local-menu-action-bus-DLozq_c4.js";import{t as d}from"./utils-CPqDy6Hr.js";import{c as f,i as p,n as m,o as h,s as g,t as _}from"./ChangedOutsideBadge-Cjb9sWFy.js";import{t as v}from"./button-RQ5o7P7w.js";import{c as y,i as b,l as x,o as S,t as C}from"./dist-Bi80hc1t.js";import{i as w,n as T,t as E}from"./tooltip-x7BNUa3s.js";import{a as D,c as O,i as k,n as A,o as j,r as M,s as N,t as P}from"./dialog-C6agJYxQ.js";import{_ as F,a as I,c as L,d as R,f as z,g as B,h as V,i as H,l as U,m as W,n as G,o as K,p as ee,r as q,s as J,t as Y,u as te}from"./dist-G89kioZo.js";import{a as X,d as ne,f as re,i as ie,n as ae,o as oe,p as se,u as ce}from"./dropdown-menu-BhMtMvZp.js";import{t as le}from"./label-BT2yjpKR.js";import{C as ue,a as de,f as fe,h as pe,m as me,n as he,o as ge,p as _e,r as ve,s as ye,t as be}from"./agent-visibility-DUGhAO32.js";import{$t as xe,Ca as Se,Cn as Ce,Ct as we,En as Te,Ja as Ee,Jt as De,Ka as Oe,Nt as ke,Pt as Ae,Tn as je,Tr as Me,Za as Ne,_n as Pe,gn as Fe,it as Ie,kt as Le,nn as Re,pi as ze,rt as Be,tn as Ve,vn as He,wn as Ue,xn as We,yn as Ge}from"./dist-SMRIgJ7J2.js";import{t as Ke}from"./createLucideIcon-BbftclCc.js";import{t as qe}from"./RegisteredAgentIcon-B0CO1bW-.js";import{n as Je,r as Ye}from"./ManagedArtifactProperties-CqCnvP1t.js";import{t as Xe}from"./check-BLuQ2zvV.js";import{t as Ze}from"./chevron-right-BU8AeJST.js";import{n as Qe}from"./CopyButton-DysciFW5.js";import{t as $e}from"./folder-open-DoQalFip.js";import{t as et}from"./folder-Cnftw7jd.js";import{t as tt}from"./list-plus-IYEFhKGU.js";import{t as nt}from"./trash-2-XqjnGI2m.js";import{n as rt}from"./dist-CrwFIHTH.js";import{t as it}from"./input-CX1W4pdJ.js";import{t as at}from"./dist-CRq7u4Aw.js";import{i as ot}from"./use-settings-route-BT3ZJmxN.js";import{t as st}from"./parse-api-error-DkZQPwyl.js";import{J as ct,q as lt,x as ut}from"./navigation-targets-DdXUwF8B.js";import{c as dt,n as ft,o as pt}from"./documents-events-CN6qju_L.js";import{a as mt,c as ht,f as gt,n as _t,r as vt}from"./skill-scope-DG4fOw_k.js";import{t as yt}from"./badge-BVZ2oTto.js";import{C as bt,O as xt,S as St,a as Ct,b as wt,j as Tt,k as Et,l as Dt,n as Ot,p as kt,r as At,t as jt,v as Mt,y as Nt}from"./skills-api-Djw9cUyq.js";import{n as Pt}from"./config-context-D-k7Feh7.js";import{t as Ft}from"./use-skills-BrkAxYWH.js";import{t as It}from"./use-open-skill-mzHyxSnO.js";import{t as Lt}from"./use-workspace-J_BwpJRd.js";import{n as Rt,t as zt}from"./workspace-paths-DokE-xT8.js";import{n as Bt}from"./clipboard-adapter-BTORRh1U.js";import{t as Vt}from"./DiffView-vtrGUscK.js";var Z=e(o(),1),Q=t(),Ht=`ContextMenu`,[Ut,Wt]=y(Ht,[F]),Gt=F(),[Kt,qt]=Ut(Ht),Jt=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=Z.useState(!1),c=Gt(t),l=C(r),u=Z.useCallback(e=>{s(e),l(e)},[l]);return(0,Q.jsx)(Kt,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,Q.jsx)(z,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};Jt.displayName=Ht;var Yt=`ContextMenuTrigger`,Xt=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=qt(Yt,n),o=Gt(n),s=Z.useRef({x:0,y:0}),c=Z.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=Z.useRef(0),u=Z.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return Z.useEffect(()=>u,[u]),Z.useEffect(()=>void(r&&u()),[r,u]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Y,{...o,virtualRef:c}),(0,Q.jsx)(x.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:S(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:S(e.onPointerDown,En(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:S(e.onPointerMove,En(u)),onPointerCancel:r?e.onPointerCancel:S(e.onPointerCancel,En(u)),onPointerUp:r?e.onPointerUp:S(e.onPointerUp,En(u))})]})});Xt.displayName=Yt;var Zt=`ContextMenuPortal`,Qt=e=>{let{__scopeContextMenu:t,...n}=e,r=Gt(t);return(0,Q.jsx)(U,{...r,...n})};Qt.displayName=Zt;var $t=`ContextMenuContent`,en=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=qt($t,n),a=Gt(n),o=Z.useRef(!1);return(0,Q.jsx)(H,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});en.displayName=$t;var tn=`ContextMenuGroup`,nn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(I,{...i,...r,ref:t})});nn.displayName=tn;var rn=`ContextMenuLabel`,an=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(L,{...i,...r,ref:t})});an.displayName=rn;var on=`ContextMenuItem`,sn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(K,{...i,...r,ref:t})});sn.displayName=on;var cn=`ContextMenuCheckboxItem`,ln=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(q,{...i,...r,ref:t})});ln.displayName=cn;var un=`ContextMenuRadioGroup`,dn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(te,{...i,...r,ref:t})});dn.displayName=un;var fn=`ContextMenuRadioItem`,pn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(R,{...i,...r,ref:t})});pn.displayName=fn;var mn=`ContextMenuItemIndicator`,hn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(J,{...i,...r,ref:t})});hn.displayName=mn;var gn=`ContextMenuSeparator`,_n=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(ee,{...i,...r,ref:t})});_n.displayName=gn;var vn=`ContextMenuArrow`,yn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(G,{...i,...r,ref:t})});yn.displayName=vn;var bn=`ContextMenuSub`,xn=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=Gt(t),[s,c]=b({prop:i,defaultProp:a??!1,onChange:r,caller:bn});return(0,Q.jsx)(W,{...o,open:s,onOpenChange:c,children:n})};xn.displayName=bn;var Sn=`ContextMenuSubTrigger`,Cn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(B,{...i,...r,ref:t})});Cn.displayName=Sn;var wn=`ContextMenuSubContent`,Tn=Z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Gt(n);return(0,Q.jsx)(V,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Tn.displayName=wn;function En(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Dn=Jt,On=Xt,kn=Qt,An=en,jn=nn,Mn=an,Nn=sn,Pn=ln,Fn=hn,In=_n,Ln=xn,Rn=Cn,zn=Tn,Bn=Ke(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Vn=Ke(`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`}]]),Hn=Ke(`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`}]]),Un=Ke(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),$=l();function Wn(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 Gn(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=st(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 Kn(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?Wn(e):Gn()}var qn=`ok:skill:cowork:installed`,Jn=`1`,Yn=250,Xn=`/api/skill/install-state`;function Zn(e){return`${qn}:v${e}`}var Qn=new Map;async function $n(e={},t={}){let n=t.force?`__force__`:`__default__`,r=Qn.get(n);if(r)return r;let i=er(e,t);return Qn.set(n,i),i.finally(()=>{Qn.get(n)===i&&Qn.delete(n)}),i}async function er(e,t){let n=e.installer===void 0?Kn():e.installer,r=tr(e.storage),i=e.fetchSnapshot??rr,a=e.serverTimeoutMs??Yn,o=null;if(!t.force){try{o=await ir(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=Zn(o?.currentVersion??e.fallbackSkillVersion??nr());if(!t.force&&r?.getItem(s)===Jn)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,Jn)}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 tr(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function nr(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function rr(){let e;try{e=await fetch(Xn,{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 ir(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function ar(e){return $n({},e)}function or(){return $n({},{force:!0})}async function sr(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 cr(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return sr({target:`claude-cowork`,url:xe({mode:`cowork`},e)},n);case`claude-code`:return sr({target:`claude-code`,url:xe({mode:`code`},e)},n);case`codex`:return sr({target:`codex`,url:Ve(e)},n);case`cursor`:return sr({target:`cursor`,url:Re(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 lr(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 ur=`open-knowledge:agent-thread-launch`;function dr(e,t=typeof window>`u`?new EventTarget:window){t.dispatchEvent(new CustomEvent(ur,{detail:e}))}function fr(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(ur,n),()=>t.removeEventListener(ur,n)}function pr(e){if(!e.docName||!e.workspace)return null;let t=zt(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:Rt(n,t,r)}}function mr(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function hr(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function gr(e){return _e(e.installUrl).then(()=>void 0)}function _r(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function vr(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function yr(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:n}=e.workspace;if(e.docName){let r=e.docRelativePath??zt(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:Rt(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 br(e){return`Opened in ${e}.`}function xr(e,t=1){return t>=3?at._({id:`bi2C2s`,values:{displayName:e}}):t===2?at._({id:`1J0c0X`,values:{displayName:e}}):at._({id:`Xs7IcT`,values:{displayName:e}})}function Sr(e){return e>=3?null:e===2?at._({id:`Xp94R1`}):at._({id:`6gRgw8`})}function Cr(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 wr(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 Tr(e,t,n,r){return e.compose?De(wr(e.compose,t,n,r)):e.selection?Ce({...e.selection,target:t,transport:r}):e.skill?Ue(e.skill.name,e.skill.scope,n):e.ask?Fe(e.ask.relativePath,e.ask.instruction,n,t,r):ze(e.docContext===null?e.folderRelativePath?We(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?He(n,e.instruction,r):Pe(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):Ge(e.docContext.relativePath,n,e.instruction,r))}function Er(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${Be} ${Tr(e,ke[t].handoffTarget,!1,`terminal`)}`:je(e.docContext?.relativePath??null)}function Dr(e){let t=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||t?`${Ie} ${Tr(e,`claude-code`,!1,`terminal`)}`:Te(e.docContext?.relativePath??null)}function Or(e){let t=e.docContext?.relativePath;return typeof t!=`string`||t===``?null:t.replace(/\.(md|mdx)$/,``)}function kr(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 Ar(e,t){dr({agentSource:t?.agent?.source??`registry`,agentId:t?.agent?.id??``,prompt:Dr(e),docName:Or(e),titleHint:kr(e)})}async function jr(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(at._({id:`wbpoGe`,values:{message:t}})),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(at._({id:`PezM4_`})),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(at._({id:`wbpoGe`,values:{message:t}})),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:Tr(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=Cr(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(br(u));else{let i=Sr(r),a=xr(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{jr(e,t,n,r+1)}}})}return a}function Mr(e){return me.find(t=>t.id===e)?.displayName??e}function Nr(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function Pr(){return{dispatchHandoff:cr,recordHandoff:lr,toast:{success:e=>{rt.success(e)},error:(e,t)=>{rt.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>Nr(),getDisplayName:Mr,ensureCoworkSkillInstalled:ar,autoOpen:!0}}function Fr(){let e=(0,$.c)(2),{merged:t}=Pt(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>jr(e,t,{...Pr(),autoOpen:n}),reinstallCoworkSkill:or},e[0]=n,e[1]=r),r}function Ir(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Dn,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function Lr(e){let t=(0,$.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 i;t[3]===n?i=t[4]:(i=d(`select-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(On,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Rr(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(jn,{"data-slot":`context-menu-group`,...n}),t[2]=n,t[3]=r),r}function zr(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Ln,{"data-slot":`context-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Br(e){let t=(0,$.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 i;t[3]===n?i=t[4]:(i=d(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(kn,{children:(0,Q.jsx)(An,{"data-slot":`context-menu-content`,className:i,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Vr(e){let t=(0,$.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=d(`group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Q.jsx)(Nn,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function Hr(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=d(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(Ze,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Q.jsxs)(Rn,{"data-slot":`context-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function Ur(e){let t=(0,$.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 i;t[3]===n?i=t[4]:(i=d(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(zn,{"data-slot":`context-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Wr(e){let t=(0,$.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:i,children:r,checked:n,inset:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===i?s=t[7]:(s=d(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[6]=i,t[7]=s);let c;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2`,children:(0,Q.jsx)(Fn,{children:(0,Q.jsx)(Xe,{})})}),t[8]=c):c=t[8];let l;return t[9]!==n||t[10]!==r||t[11]!==a||t[12]!==o||t[13]!==s?(l=(0,Q.jsxs)(Pn,{"data-slot":`context-menu-checkbox-item`,"data-inset":a,className:s,checked:n,...o,children:[c,r]}),t[9]=n,t[10]=r,t[11]=a,t[12]=o,t[13]=s,t[14]=l):l=t[14],l}function Gr(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=d(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Q.jsx)(Mn,{"data-slot":`context-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function Kr(e){let t=(0,$.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 i;t[3]===n?i=t[4]:(i=d(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(In,{"data-slot":`context-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function qr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Rr,{...r}):(0,Q.jsx)(ie,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Jr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Vr,{...r}):(0,Q.jsx)(X,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Yr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Wr,{...r}):(0,Q.jsx)(ae,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Xr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Gr,{...r}):(0,Q.jsx)(oe,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Zr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Kr,{...r}):(0,Q.jsx)(ce,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Qr(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(zr,{...r}):(0,Q.jsx)(ne,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function $r(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Ur,{...r}):(0,Q.jsx)(re,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ei(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(Hr,{...r}):(0,Q.jsx)(se,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}var ti=Object.freeze({hosts:null,source:null}),ni=new Map,ri=new Map;function ii(e,t){return`${e}:${t}`}function ai(e){return ni.get(e)??ti}function oi(e,t){let n=ri.get(e)??new Set;return ri.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&ri.delete(e)}}function si(e,t){let n=ai(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?ni.delete(e):ni.set(e,r);for(let t of ri.get(e)??[])t()}}var ci=Le.options,li=`min-w-[24rem]`;function ui(e,t){let n=(0,$.c)(45),r=t.installingName===e.name,i=(0,Z.useRef)(e),[a,o]=(0,Z.useState)(!1),s=(0,Z.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,Z.useEffect)(c,l);let u,d;n[3]===e?(u=n[4],d=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},d=[e],n[3]=e,n[4]=u,n[5]=d),(0,Z.useEffect)(u,d);let f=r||a,p;n[6]!==e.name||n[7]!==e.scope?(p=ii(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=p):p=n[8];let m=p,h,g;n[9]===m?(h=n[10],g=n[11]):(h=e=>oi(m,e),g=()=>ai(m),n[9]=m,n[10]=h,n[11]=g);let _=(0,Z.useSyncExternalStore)(h,g),v=_.hosts,y=_.source,b,x;n[12]!==y||n[13]!==m||n[14]!==e.hosts?(b=()=>{y!==null&&e.hosts[0]===y&&si(m,{source:null})},x=[e.hosts,y,m],n[12]=y,n[13]=m,n[14]=e.hosts,n[15]=b,n[16]=x):(b=n[15],x=n[16]),(0,Z.useEffect)(b,x);let S=e.linkMode===!0,C=v??e.hosts,w;n[17]===C?w=n[18]:(w=new Set(C),n[17]=C,n[18]=w);let T=w,E=v?v.length>0:e.installed,D=(0,Z.useRef)(e.hosts),O,k;n[19]!==v||n[20]!==e.hosts?(O=()=>{v===null&&(D.current=e.hosts)},k=[v,e.hosts],n[19]=v,n[20]=e.hosts,n[21]=O,n[22]=k):(O=n[21],k=n[22]),(0,Z.useEffect)(O,k);let A;n[23]===e.hosts?A=n[24]:(A=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=A);let j=A,M,N;n[25]!==m||n[26]!==j?(M=()=>{let e=ai(m).hosts;e&&[...e].sort().join(`,`)===j&&si(m,{hosts:null})},N=[j,m],n[25]=m,n[26]=j,n[27]=M,n[28]=N):(M=n[27],N=n[28]),(0,Z.useEffect)(M,N);let P=(0,Z.useRef)(null),F=(0,Z.useRef)(null),I,L;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>()=>{P.current&&clearTimeout(P.current),F.current?.(),F.current=null},L=[],n[29]=I,n[30]=L):(I=n[29],L=n[30]),(0,Z.useEffect)(I,L);let R;n[31]!==t||n[32]!==m||n[33]!==e?(R=function(n,r){D.current=n,si(m,{hosts:n}),P.current&&clearTimeout(P.current);let i=async()=>{F.current=null,P.current=null;let r=await t.install(e,n.filter(Me));if(!r.ok){si(m,{hosts:null});return}D.current=[...r.hosts],si(m,{hosts:[...r.hosts]})};r?(F.current=()=>void i(),P.current=setTimeout(()=>void i(),350)):(F.current=null,i())},n[31]=t,n[32]=m,n[33]=e,n[34]=R):R=n[34];let z=R,B;return n[35]!==t||n[36]!==z||n[37]!==T||n[38]!==E||n[39]!==f||n[40]!==y||n[41]!==m||n[42]!==S||n[43]!==e?(B={hostSet:T,installed:E,installing:f,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),z([...n],!0)},installAll(){let t=D.current.filter(pi),n=e.installableEditors??ci,r=ci.filter(e=>n.includes(e)||D.current.includes(e));z([...t,...r],!1)},linkMode:S,sourceHost:y??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>Nt({scope:e.scope,name:e.name,dir:n,mode:r})).then(fi)},unplaceAt(n){t.runLocationWrite(e,()=>Et({scope:e.scope,name:e.name,path:n})).then(di)},setSource(n){si(m,{source:n}),t.runLocationWrite(e,()=>xt({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(si(m,{source:null}),rt.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=z,n[37]=T,n[38]=E,n[39]=f,n[40]=y,n[41]=m,n[42]=S,n[43]=e,n[44]=B):B=n[44],B}function di(e){e.ok||rt.error(e.error)}function fi(e){e.ok||rt.error(e.error)}function pi(e){return!ci.includes(e)}function mi(e){let t=(0,$.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,Q.jsx)(w,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,Q.jsx)(T,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(E,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function hi(e){let t=(0,$.c)(165),{toggles:n,skill:r,onResolveFork:i,onRunStart:a,menuKind:o}=e,l=o===void 0?`dropdown`:o,{_:u}=c(),{hostSet:d,toggleEditor:f,installAll:p}=n,h;t[0]===r?h=t[1]:(h=e=>r?`${ht(e,r.scope)}/${r.name}`:null,t[0]=r,t[1]=h);let g=h,y=Ft(),b;t[2]!==y.data||t[3]!==y.status||t[4]!==r?(b=r!==void 0&&((r.hosts??[]).includes(`agents`)||y.status===`ready`&&y.data.some(Di)),t[2]=y.data,t[3]=y.status,t[4]=r,t[5]=b):b=t[5];let x=b,S;t[6]!==y.data||t[7]!==y.status||t[8]!==r?(S=r?.hostAliases??(r&&y.status===`ready`?Object.assign({},...y.data.filter(e=>e.scope===r.scope).map(Ei)):{}),t[6]=y.data,t[7]=y.status,t[8]=r,t[9]=S):S=t[9];let C=S,w;t[10]!==y.data||t[11]!==y.status||t[12]!==r?(w=r?.installableEditors??(r&&y.status===`ready`?y.data.find(e=>e.scope===r.scope)?.installableEditors:void 0),t[10]=y.data,t[11]=y.status,t[12]=r,t[13]=w):w=t[13];let T=w,E,D,O,k,A,j,M;if(t[14]!==u||t[15]!==C||t[16]!==y.data||t[17]!==y.status||t[18]!==d||t[19]!==x||t[20]!==p||t[21]!==T||t[22]!==l||t[23]!==i||t[24]!==a||t[25]!==g||t[26]!==r||t[27]!==f||t[28]!==n){let e=T?new Set(T):null,o;t[36]===C?o=t[37]:(o=e=>!(e in C),t[36]=C,t[37]=o);let c=(x?[`agents`,...ci]:ci).filter(o).filter(t=>t===`agents`||e===null||e.has(t)||d.has(t)),h;t[38]===g?h=t[39]:(h=e=>g(e),t[38]=g,t[39]=h);let b=new Set(c.map(h)),S=r?.scope===`global`?`~/`:``,w;t[40]!==S||t[41]!==r?(w=r?.path?.includes(`/`)?`${S}${r.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,t[40]=S,t[41]=r,t[42]=w):w=t[42];let N=w,P=N!==null&&!b.has(N)?N:null,F=P===null?n.sourceHost??r?.hosts?.[0]:void 0,I;t[43]===C?I=t[44]:(I=e=>_t(C,e),t[43]=C,t[44]=I);let L=I,R=Ti,z;t[45]!==u||t[46]!==L?(z=e=>{let t=L(e);return t.length===0?!0:window.confirm(u({id:`Uobeu9`,values:{0:t.map(R).join(`, `),rootRel:e}}))},t[45]=u,t[46]=L,t[47]=z):z=t[47];let B=z,V;t[48]!==u||t[49]!==r?(V=(e,t)=>{let n=e.includes(`/`)?e:ht(e,r?.scope??`project`);return(0,Q.jsx)(mi,{hint:u({id:`0dslv8`,values:{0:R(e),1:R(e),2:r?.name??``,poolRootRel:t,subRoot:n}}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":u({id:`G6Lrs_`,values:{0:R(e)}}),onClick:i=>{i.preventDefault(),i.stopPropagation(),window.confirm(u({id:`iiqOKM`,values:{0:R(e),1:r.name,2:R(e),subRoot:n,poolRootRel:t}}))&&wt({scope:r.scope,root:n,action:`unlink`,exclude:[r.name]}).then(e=>{e.ok?pt():rt.error(u({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,Q.jsx)(m,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[48]=u,t[49]=r,t[50]=V):V=t[50];let H=V,U;t[51]===r?.conflictHosts?U=t[52]:(U=r?.conflictHosts??[],t[51]=r?.conflictHosts,t[52]=U);let W;t[53]===U?W=t[54]:(W=new Set(U),t[53]=U,t[54]=W);let G=W,K;t[55]===r?.driftPaths?K=t[56]:(K=r?.driftPaths??[],t[55]=r?.driftPaths,t[56]=K);let ee;t[57]===K?ee=t[58]:(ee=new Set(K),t[57]=K,t[58]=ee);let q=ee;E=n.installing;let J=wi,Y;t[59]===r?.symlinkedHosts?Y=t[60]:(Y=r?.symlinkedHosts??[],t[59]=r?.symlinkedHosts,t[60]=Y);let te;t[61]===Y?te=t[62]:(te=new Set(Y),t[61]=Y,t[62]=te);let X=te,ne=[...[...d].filter(e=>e!==F&&!(e in C)&&!G.has(e)&&!e.includes(`/`)).map(e=>X.has(e)?`link`:`copy`),...(r?.customPlacements??[]).map(Ci)],re=ne.filter(Si).length;O=ne.length===0?n.linkMode?`link`:`copy`:re*2>=ne.length?`link`:`copy`;let ie;t[63]!==C||t[64]!==G||t[65]!==d||t[66]!==X||t[67]!==g||t[68]!==F?(ie=[...d].filter(e=>e!==F&&!(e in C)&&!G.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:g(e)??R(e),mode:X.has(e)?`link`:`copy`})),t[63]=C,t[64]=G,t[65]=d,t[66]=X,t[67]=g,t[68]=F,t[69]=ie):ie=t[69];let ae;t[70]===r?.customPlacements?ae=t[71]:(ae=r?.customPlacements??[],t[70]=r?.customPlacements,t[71]=ae);let oe;if(t[72]!==S||t[73]!==ie||t[74]!==ae){let e;t[76]===S?e=t[77]:(e=e=>({target:vt(e),display:`${S}${e.path}`,mode:e.mode}),t[76]=S,t[77]=e),oe=[...ie,...ae.map(e)],t[72]=S,t[73]=ie,t[74]=ae,t[75]=oe}else oe=t[75];D=oe;let se;t[78]!==u||t[79]!==a||t[80]!==n?(se=(e,t,r)=>{let i=r===`link`?`copy`:`link`;return(0,Q.jsx)(mi,{hint:u(r===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(u(i===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(a?.(),n.convertLocation?.(e,i))},"data-testid":`skill-convert-${e}`,children:r===`link`?(0,Q.jsx)(s,{id:`uUCrBv`}):(0,Q.jsx)(s,{id:`iaPtht`})})})},t[78]=u,t[79]=a,t[80]=n,t[81]=se):se=t[81];let ce=se,le;t[82]===r?.customPlacements?le=t[83]:(le=r?.customPlacements??[],t[82]=r?.customPlacements,t[83]=le);let ue=new Map(le.map(xi)),de=new Set(ue.keys());if(y.status===`ready`&&r){for(let e of y.data)if(e.scope===r.scope)for(let t of e.customPlacements??[]){let e=vt(t);e!==``&&de.add(e)}}let fe=r===void 0?[]:[...de].sort().map(e=>({root:e,display:`${S}${e}/${r.name}`,placed:ue.get(e)??null})).filter(e=>!b.has(e.display)&&e.display!==N&&!(e.root in C)),pe;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Q.jsx)(s,{id:`npcziF`}),t[84]=pe):pe=t[84];let me;t[85]===u?me=t[86]:(me=u({id:`6f_UX4`}),t[85]=u,t[86]=me);let he;t[87]===p?he=t[88]:(he=()=>p(),t[87]=p,t[88]=he);let ge;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Q.jsx)(s,{id:`N40H-G`}),t[89]=ge):ge=t[89];let _e;t[90]!==E||t[91]!==he?(_e=(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:E,onClick:he,"data-testid":`skill-install-all`,children:ge}),t[90]=E,t[91]=he,t[92]=_e):_e=t[92];let ve;t[93]!==me||t[94]!==_e?(ve=(0,Q.jsx)(mi,{hint:me,children:_e}),t[93]=me,t[94]=_e,t[95]=ve):ve=t[95],t[96]!==l||t[97]!==ve?(k=(0,Q.jsxs)(Xr,{menuKind:l,className:`flex items-center justify-between gap-2`,children:[pe,ve]}),t[96]=l,t[97]=ve,t[98]=k):k=t[98],t[99]!==u||t[100]!==H||t[101]!==E||t[102]!==l||t[103]!==P||t[104]!==L?(A=P===null?null:(0,Q.jsx)(mi,{hint:u({id:`pXB6SL`}),children:(0,Q.jsxs)(Yr,{menuKind:l,disabled:E,checked:!0,onSelect:bi,"data-testid":`skill-source-row`,children:[(0,Q.jsx)(et,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:P}),(()=>{let e=J(P).split(`/`).slice(0,-1).join(`/`),t=L(e);return t.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>H(t,e))}):null})(),(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(s,{id:`tiFPjk`})})]})]})}),t[99]=u,t[100]=H,t[101]=E,t[102]=l,t[103]=P,t[104]=L,t[105]=A):A=t[105];let ye;t[106]!==u||t[107]!==H||t[108]!==E||t[109]!==B||t[110]!==G||t[111]!==ce||t[112]!==q||t[113]!==O||t[114]!==d||t[115]!==X||t[116]!==l||t[117]!==i||t[118]!==g||t[119]!==r?.hosts||t[120]!==F||t[121]!==L||t[122]!==f||t[123]!==n?(ye=e=>{let t=g(e),a=e===`agents`?`.agents`:Se[e],o=J(t).split(`/`).slice(0,-1).join(`/`),c=L(o);return(0,Q.jsx)(mi,{hint:G.has(e)?u({id:`8HvJlU`,values:{0:t??a}}):e===F?t?u({id:`ssk6rl`,values:{path:t}}):a:d.has(e)?u(t?{id:`9ieZhu`,values:{path:t}}:{id:`n3T3EE`,values:{label:a}}):u(t?O===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}:{id:`Pp0Vgd`,values:{label:a}}),children:(0,Q.jsxs)(Yr,{menuKind:l,disabled:E,checked:d.has(e),onCheckedChange:t=>{G.has(e)||t===!0&&!B(o)||f(e,t===!0)},onSelect:yi,className:`group`,"data-testid":`skill-install-editor-${e}`,children:[(0,Q.jsx)(m,{host:e,"aria-hidden":!0,className:`size-4`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:t??a}),c.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${e}`,children:c.map(e=>H(e,o))}):null,G.has(e)?(0,Q.jsx)(mi,{hint:u({id:`_O7dJS`}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:t=>{t.preventDefault(),i?.(e)},"data-testid":`skill-fork-chip-${e}`,children:(0,Q.jsx)(s,{id:`jng7Ko`})})}):e===F?(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(s,{id:`tiFPjk`})}):d.has(e)&&r?.hosts?(0,Q.jsxs)(Q.Fragment,{children:[!E&&(X.has(e)?`link`:`copy`)!==O?ce(e,t??a,X.has(e)?`link`:`copy`):null,(0,Q.jsx)(mi,{hint:u({id:`nBgzKO`}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e)},"data-testid":`skill-set-source-${e}`,children:(0,Q.jsx)(s,{id:`VNNRfN`})})})]}):null,!E&&q.has(J(t))?(0,Q.jsx)(mi,{hint:u({id:`iz1LdD`}),children:(0,Q.jsx)(_,{testId:`skill-drift-${e}`})}):null]})]})},e)},t[106]=u,t[107]=H,t[108]=E,t[109]=B,t[110]=G,t[111]=ce,t[112]=q,t[113]=O,t[114]=d,t[115]=X,t[116]=l,t[117]=i,t[118]=g,t[119]=r?.hosts,t[120]=F,t[121]=L,t[122]=f,t[123]=n,t[124]=ye):ye=t[124],j=c.map(ye);let be;t[125]!==u||t[126]!==H||t[127]!==E||t[128]!==B||t[129]!==ce||t[130]!==q||t[131]!==O||t[132]!==l||t[133]!==L||t[134]!==n?(be=e=>(0,Q.jsx)(mi,{hint:e.placed===null?u(O===`link`?{id:`ybWWR2`,values:{0:e.display}}:{id:`fDjZxw`,values:{0:e.display}}):u({id:`C0cll5`,values:{0:e.display}}),children:(0,Q.jsxs)(Yr,{menuKind:l,disabled:E,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!B(e.root))return;n.placeAt(e.root,O)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:vi,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,Q.jsx)(m,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,Q.jsx)(et,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),L(e.root).length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:L(e.root).map(t=>H(t,e.root))}):null,!E&&e.placed!==null&&q.has(e.placed.path)?(0,Q.jsx)(mi,{hint:u({id:`iz1LdD`}),children:(0,Q.jsx)(_,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,Q.jsxs)(Q.Fragment,{children:[!E&&e.placed.mode!==O?ce(e.root,e.display,e.placed.mode):null,(0,Q.jsx)(mi,{hint:u({id:`nBgzKO`}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,Q.jsx)(s,{id:`VNNRfN`})})})]})]})]})},e.root),t[125]=u,t[126]=H,t[127]=E,t[128]=B,t[129]=ce,t[130]=q,t[131]=O,t[132]=l,t[133]=L,t[134]=n,t[135]=be):be=t[135],M=fe.map(be),t[14]=u,t[15]=C,t[16]=y.data,t[17]=y.status,t[18]=d,t[19]=x,t[20]=p,t[21]=T,t[22]=l,t[23]=i,t[24]=a,t[25]=g,t[26]=r,t[27]=f,t[28]=n,t[29]=E,t[30]=D,t[31]=O,t[32]=k,t[33]=A,t[34]=j,t[35]=M}else E=t[29],D=t[30],O=t[31],k=t[32],A=t[33],j=t[34],M=t[35];let N;t[136]!==u||t[137]!==E||t[138]!==D||t[139]!==O||t[140]!==a||t[141]!==n?(N=D.length>0&&n.convertLocations?(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=O===`link`?`copy`:`link`,r=D.filter(e=>e.mode!==t);if(r.length===0)return;let i=u(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),o=u(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),s=r.map(_i).join(`
|
|
2
|
+
`);window.confirm(`${i}\n\n${o}\n\n${s}\n\n${u({id:`Cu6GXQ`})}`)&&(a?.(),n.convertLocations?.(r.map(e=>({target:e.target,mode:t}))))},disabled:E,"data-testid":`skill-convert-all`,children:O===`link`?(0,Q.jsx)(s,{id:`rcJmK8`}):(0,Q.jsx)(s,{id:`LBv_TR`})}),(0,Q.jsx)(mi,{hint:u({id:`0J6nhG`}),children:(0,Q.jsx)(v,{variant:`ghost`,size:`sm`,"aria-label":u({id:`qJSo0_`}),className:`size-4 shrink-0 rounded-full border border-border/60 p-0 font-normal text-[9px] text-muted-foreground hover:border-foreground/40 hover:bg-transparent hover:text-foreground`,onClick:gi,"data-testid":`skill-convert-all-help`,children:`?`})})]}):null,t[136]=u,t[137]=E,t[138]=D,t[139]=O,t[140]=a,t[141]=n,t[142]=N):N=t[142];let P;t[143]===l?P=t[144]:(P=(0,Q.jsx)(Zr,{menuKind:l}),t[143]=l,t[144]=P);let F;t[145]===u?F=t[146]:(F=u({id:`jqe7Yq`}),t[145]=u,t[146]=F);let I;t[147]===r?.scope?I=t[148]:(I=()=>{window.location.hash=r?.scope===`global`?`#settings/user-skills`:`#settings/skills`},t[147]=r?.scope,t[148]=I);let L,R;t[149]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsx)(Un,{"aria-hidden":!0}),R=(0,Q.jsx)(s,{id:`ZBF9fn`}),t[149]=L,t[150]=R):(L=t[149],R=t[150]);let z;t[151]!==l||t[152]!==I?(z=(0,Q.jsxs)(Jr,{menuKind:l,onSelect:I,children:[L,R]}),t[151]=l,t[152]=I,t[153]=z):z=t[153];let B;t[154]!==F||t[155]!==z?(B=(0,Q.jsx)(mi,{hint:F,children:z}),t[154]=F,t[155]=z,t[156]=B):B=t[156];let V;return t[157]!==N||t[158]!==P||t[159]!==B||t[160]!==k||t[161]!==A||t[162]!==j||t[163]!==M?(V=(0,Q.jsxs)(Q.Fragment,{children:[k,A,j,M,N,P,B]}),t[157]=N,t[158]=P,t[159]=B,t[160]=k,t[161]=A,t[162]=j,t[163]=M,t[164]=V):V=t[164],V}function gi(e){return e.preventDefault()}function _i(e){return e.display}function vi(e){return e.preventDefault()}function yi(e){return e.preventDefault()}function bi(e){return e.preventDefault()}function xi(e){return[vt(e),e]}function Si(e){return e===`link`}function Ci(e){return e.mode}function wi(e){return(e??``).replace(/^~\//,``)}function Ti(e){return e===`agents`?`.agents`:Se[e]??e}function Ei(e){return e.hostAliases??{}}function Di(e){return e.hosts.includes(`agents`)||e.path.startsWith(`.agents/`)}function Oi(e){let t=(0,$.c)(23),{onAddProperty:n,className:r,problemCount:i,problemMessages:a}=e,o=i===void 0?0:i,{_:l}=c(),u=o>0,f;t[0]!==l||t[1]!==u||t[2]!==o?(f=l(u?{id:`3KOHFt`,values:{problemCount:o}}:{id:`81H_23`}),t[0]=l,t[1]=u,t[2]=o,t[3]=f):f=t[3];let p=f,m;t[4]===r?m=t[5]:(m=d(`relative`,r),t[4]=r,t[5]=m);let h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(tt,{}),t[6]=h):h=t[6];let g;t[7]!==u||t[8]!==o?(g=u?(0,Q.jsx)(yt,{variant:`notification`,"aria-hidden":`true`,"data-testid":`add-properties-problem-badge`,className:`pointer-events-none absolute -top-0.5 -right-0.5 size-3.5 rounded-full p-0 font-sans text-[9px] leading-none tabular-nums`,children:o>9?`9+`:o}):null,t[7]=u,t[8]=o,t[9]=g):g=t[9];let _;t[10]===g?_=t[11]:(_=(0,Q.jsxs)(w,{children:[h,g]}),t[10]=g,t[11]=_);let y;t[12]!==p||t[13]!==n||t[14]!==m||t[15]!==_?(y=(0,Q.jsx)(v,{variant:`ghost`,size:`icon`,"aria-label":p,onClick:n,"data-testid":`add-properties-button`,className:m,asChild:!0,children:_}),t[12]=p,t[13]=n,t[14]=m,t[15]=_,t[16]=y):y=t[16];let b;t[17]!==u||t[18]!==a?(b=(0,Q.jsx)(T,{side:`bottom`,children:u?(0,Q.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,Q.jsx)(`span`,{className:`font-medium`,children:(0,Q.jsx)(s,{id:`AwrGuz`})}),a?.map(ki),(0,Q.jsx)(`span`,{className:`pt-0.5 opacity-70`,children:(0,Q.jsx)(s,{id:`yh5-4s`})})]}):(0,Q.jsx)(s,{id:`81H_23`})}),t[17]=u,t[18]=a,t[19]=b):b=t[19];let x;return t[20]!==y||t[21]!==b?(x=(0,Q.jsxs)(E,{children:[y,b]}),t[20]=y,t[21]=b,t[22]=x):x=t[22],x}function ki(e,t){return(0,Q.jsx)(`span`,{className:`opacity-90`,children:e},t)}function Ai(e){return e?at._({id:`wTcjov`}):null}function ji(e){let t=(0,$.c)(46),{_:r}=c(),a=n(),o=h(),l=ue(),d=fe();if(a)return null;let{input:f,installStates:p,dispatch:m}=e,g=f===null,_,v,y,b,x,S,C,w,T,E,D;if(t[0]!==r||t[1]!==m||t[2]!==f||t[3]!==g||t[4]!==p||t[5]!==d||t[6]!==l||t[7]!==o){let e=Ai(g),n;t[19]===d?n=t[20]:(n=e=>be(d,e.id),t[19]=d,t[20]=n);let a=pe.filter(n),c;t[21]===d?c=t[22]:(c=e=>he(d,e.source,e.id,!0,e.supported),t[21]=d,t[22]=c);let u=l.filter(c),h=o?Ae.filter(e=>ve(d,e,o.installedClis)):[];y=a.length>0,b=o!==null&&h.length>0,x=u.length>0,v=zr,t[23]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Q.jsxs)(Hr,{children:[(0,Q.jsx)(i,{"aria-hidden":`true`}),(0,Q.jsx)(s,{id:`O7_W_a`})]}),t[23]=D):D=t[23],_=Ur,S=`max-h-80`,C=x?(0,Q.jsxs)(Rr,{"aria-label":r({id:`vPKX2i`}),children:[(0,Q.jsxs)(Gr,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(s,{id:`RXEbZy`}),(0,Q.jsx)(ye,{})]}),u.map(t=>{let n=t.name;return(0,Q.jsxs)(Vr,{onSelect:()=>{f!==null&&Ar(f,{agent:{source:t.source,id:t.id}})},disabled:g,"data-testid":`empty-space-open-in-thread-${t.id}`,"aria-label":e?r({id:`gtGQ9S`,values:{agentName:n,hint:e}}):void 0,children:[(0,Q.jsx)(qe,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`5PrrYw`,values:{agentName:n}})}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[24]!==y||t[25]!==b||t[26]!==x?(w=x&&(b||y)?(0,Q.jsx)(Kr,{}):null,t[24]=y,t[25]=b,t[26]=x,t[27]=w):w=t[27],T=b?(0,Q.jsxs)(Rr,{"aria-label":r({id:`ALhMYW`}),children:[(0,Q.jsx)(Gr,{children:(0,Q.jsx)(s,{id:`ALhMYW`})}),h.map(t=>{let{displayName:n}=ke[t];return(0,Q.jsxs)(Vr,{onSelect:()=>{f!==null&&o.launchInTerminal(f,t)},disabled:g,"data-testid":`empty-space-open-in-terminal-${t}`,"aria-label":r(e?{id:`AIn2Yv`,values:{displayName:n,hint:e}}:{id:`QYfQdv`,values:{displayName:n}}),children:[(0,Q.jsx)(ge,{id:de(t),"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:n}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,E=y?(0,Q.jsxs)(Q.Fragment,{children:[b?(0,Q.jsx)(Kr,{}):null,(0,Q.jsxs)(Rr,{"aria-label":r({id:`BBqGS9`}),children:[(0,Q.jsx)(Gr,{children:(0,Q.jsx)(s,{id:`BBqGS9`})}),a.map(t=>{let n=!g,{displayName:i}=t,a=r(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Q.jsxs)(Vr,{disabled:!n,onSelect:()=>{if(f){if(p[t.id]?.installed!==!0){gr(t);return}m(t.id,f)}},"data-testid":`empty-space-open-in-${t.id}`,"aria-label":a,children:[(0,Q.jsx)(ge,{id:t.id,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=r,t[1]=m,t[2]=f,t[3]=g,t[4]=p,t[5]=d,t[6]=l,t[7]=o,t[8]=_,t[9]=v,t[10]=y,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=E,t[18]=D}else _=t[8],v=t[9],y=t[10],b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],E=t[17],D=t[18];let O;t[28]!==y||t[29]!==b||t[30]!==x?(O=x||b||y?(0,Q.jsx)(Kr,{}):null,t[28]=y,t[29]=b,t[30]=x,t[31]=O):O=t[31];let k;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Q.jsx)(u,{"aria-hidden":`true`}),t[32]=k):k=t[32];let A;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsxs)(Vr,{onSelect:ot,"data-testid":`empty-space-open-in-settings`,children:[k,(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`jRAGrQ`})})]}),t[33]=A):A=t[33];let j;t[34]!==_||t[35]!==S||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==O?(j=(0,Q.jsxs)(_,{className:S,children:[C,w,T,E,O,A]}),t[34]=_,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=O,t[41]=j):j=t[41];let M;return t[42]!==v||t[43]!==D||t[44]!==j?(M=(0,Q.jsxs)(v,{children:[D,j]}),t[42]=v,t[43]=D,t[44]=j,t[45]=M):M=t[45],M}function Mi(e){return e===`darwin`?at._({id:`LtSYdi`}):e===`win32`?at._({id:`qi1F96`}):at._({id:`e1Rn_k`})}function Ni(e){return e?at._({id:`wTcjov`}):null}function Pi(e){let t=(0,$.c)(47),{_:r}=c(),a=n(),o=h(),l=ue(),d=fe();if(a)return null;let{input:f,installStates:p,dispatch:m,onBeforeLaunch:g}=e,_=f===null,v,y,b,x,S,C,w,T,E,D,O;if(t[0]!==r||t[1]!==m||t[2]!==f||t[3]!==_||t[4]!==p||t[5]!==g||t[6]!==d||t[7]!==l||t[8]!==o){let e=Ni(_),n;t[20]===d?n=t[21]:(n=e=>be(d,e.id),t[20]=d,t[21]=n);let a=pe.filter(n),c;t[22]===d?c=t[23]:(c=e=>he(d,e.source,e.id,!0,e.supported),t[22]=d,t[23]=c);let u=l.filter(c),h=o?Ae.filter(e=>ve(d,e,o.installedClis)):[];b=a.length>0,x=o!==null&&h.length>0,S=u.length>0,y=ne,t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Q.jsxs)(se,{children:[(0,Q.jsx)(i,{"aria-hidden":`true`}),(0,Q.jsx)(s,{id:`O7_W_a`})]}),t[24]=O):O=t[24],v=re,C=`max-h-80`,w=S?(0,Q.jsxs)(ie,{"aria-label":r({id:`vPKX2i`}),children:[(0,Q.jsxs)(oe,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(s,{id:`RXEbZy`}),(0,Q.jsx)(ye,{})]}),u.map(t=>{let n=t.name;return(0,Q.jsxs)(X,{onSelect:()=>{f!==null&&(g?.(),Ar(f,{agent:{source:t.source,id:t.id}}))},disabled:_,"data-testid":`file-tree-open-in-thread-${t.id}`,"aria-label":e?r({id:`gtGQ9S`,values:{agentName:n,hint:e}}):void 0,children:[(0,Q.jsx)(qe,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`5PrrYw`,values:{agentName:n}})}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[25]!==b||t[26]!==x||t[27]!==S?(T=S&&(x||b)?(0,Q.jsx)(ce,{}):null,t[25]=b,t[26]=x,t[27]=S,t[28]=T):T=t[28],E=x?(0,Q.jsxs)(ie,{"aria-label":r({id:`ALhMYW`}),children:[(0,Q.jsx)(oe,{children:(0,Q.jsx)(s,{id:`ALhMYW`})}),h.map(t=>{let{displayName:n}=ke[t];return(0,Q.jsxs)(X,{onSelect:()=>{f!==null&&(g?.(),o.launchInTerminal(f,t))},disabled:_,"data-testid":`file-tree-open-in-terminal-${t}`,"aria-label":r(e?{id:`AIn2Yv`,values:{displayName:n,hint:e}}:{id:`QYfQdv`,values:{displayName:n}}),children:[(0,Q.jsx)(ge,{id:de(t),"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:n}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,D=b?(0,Q.jsxs)(Q.Fragment,{children:[x?(0,Q.jsx)(ce,{}):null,(0,Q.jsxs)(ie,{"aria-label":r({id:`BBqGS9`}),children:[(0,Q.jsx)(oe,{children:(0,Q.jsx)(s,{id:`BBqGS9`})}),a.map(t=>{let n=!_,{displayName:i}=t,a=r(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Q.jsxs)(X,{disabled:!n,onSelect:()=>{if(f){if(g?.(),p[t.id]?.installed!==!0){gr(t);return}m(t.id,f)}},"data-testid":`file-tree-open-in-${t.id}`,"aria-label":a,children:[(0,Q.jsx)(ge,{id:t.id,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=r,t[1]=m,t[2]=f,t[3]=_,t[4]=p,t[5]=g,t[6]=d,t[7]=l,t[8]=o,t[9]=v,t[10]=y,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=E,t[18]=D,t[19]=O}else v=t[9],y=t[10],b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],E=t[17],D=t[18],O=t[19];let k;t[29]!==b||t[30]!==x||t[31]!==S?(k=S||x||b?(0,Q.jsx)(ce,{}):null,t[29]=b,t[30]=x,t[31]=S,t[32]=k):k=t[32];let A;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(u,{"aria-hidden":`true`}),t[33]=A):A=t[33];let j;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsxs)(X,{onSelect:ot,"data-testid":`file-tree-open-in-settings`,children:[A,(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`jRAGrQ`})})]}),t[34]=j):j=t[34];let M;t[35]!==v||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==D||t[41]!==k?(M=(0,Q.jsxs)(v,{className:C,children:[w,T,E,D,k,j]}),t[35]=v,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=k,t[42]=M):M=t[42];let N;return t[43]!==y||t[44]!==O||t[45]!==M?(N=(0,Q.jsxs)(y,{children:[O,M]}),t[43]=y,t[44]=O,t[45]=M,t[46]=N):N=t[46],N}function Fi(e){let t=Ee(e);if(t)return{scope:`project`,name:t.name,rel:t.rel};let n=Oe(e);return n?{scope:`global`,name:n.name,rel:n.rel}:null}function Ii(e,t,n){return e.filter(e=>{let r=ut(e);if(r.kind===`skill-file`)return r.scope===t&&r.name===n;if(r.kind!==`doc`)return!1;let i=Fi(r.docName);return i?.scope===t&&i.name===n})}function Li(e,t,n){let r=lt(t,n);return e.filter(e=>{let i=ut(e);return i.kind===`skill-file`?i.scope===t.scope&&i.name===t.name&&i.path===n:i.kind===`doc`&&i.docName===r})}function Ri(e,t,n){let r=Fi(e);if(!r||r.rel===null)return null;let i=t.find(e=>e.scope===r.scope&&e.name===r.name);if(!i||i.managed)return null;let a=`references/${r.rel}${n}`;return lt(i,a)===e?{skill:i,filePath:a}:null}function zi(e,t){let n=new Map(t.map(e=>[`${e.scope}\u0000${e.name}`,e])),r=[];for(let t of e){let e=Fi(t);if(!e||n.has(`${e.scope}\u0000${e.name}`))continue;let i=e.scope===`project`?`global`:`project`,a=n.get(`${i}\u0000${e.name}`);e.rel===null&&a!==void 0?r.push({kind:`retarget`,fromDocName:t,toDocName:ct(a)}):r.push({kind:`close`,docName:t})}return r}function Bi(){let e=(0,$.c)(15),{openTabs:t,closeDocument:n}=r(),i=Je(),a;e[0]===t?a=e[1]:(a=t.some(Hi),e[0]=t,e[1]=a);let o=a,s;e[2]===o?s=e[3]:(s={enabled:o},e[2]=o,e[3]=s);let c=Ft(s),l=(0,Z.useRef)(null),u;e[4]!==n||e[5]!==t||e[6]!==i||e[7]!==c.data||e[8]!==c.status?(u=()=>{if(c.status!==`ready`)return;let e=c.data,r=`${t.join(``)}\u0002${e.map(Vi).sort().join(``)}`;if(l.current===r)return;l.current=r;let a=zi(t,e);for(let e of a)e.kind===`retarget`?i(e.fromDocName,e.toDocName):n(e.docName)},e[4]=n,e[5]=t,e[6]=i,e[7]=c.data,e[8]=c.status,e[9]=u):u=e[9];let d;e[10]!==n||e[11]!==t||e[12]!==i||e[13]!==c?(d=[c,t,i,n],e[10]=n,e[11]=t,e[12]=i,e[13]=c,e[14]=d):d=e[14],(0,Z.useEffect)(u,d)}function Vi(e){return`${e.scope}\u0000${e.name}`}function Hi(e){return Fi(e)!==null}function Ui(e){let t=(0,$.c)(19),{skill:n,onOpenChange:i,onDeleted:a}=e,{_:o}=c(),{setSkillsSidebar:s,closeTabs:l,openTabs:u}=r(),[d,f]=(0,Z.useState)(!1),m;t[0]!==o||t[1]!==l||t[2]!==a||t[3]!==i||t[4]!==u||t[5]!==s?(m=async function(e){s(!0),f(!0);let t=await Ot(e.scope,e.name);if(f(!1),!t.ok){let{error:e}=t;rt.error(o({id:`AtBdnD`,values:{error:e}}));return}rt.success(o({id:`h9QFb9`,values:{0:e.name}})),l(Ii(u,e.scope,e.name),{force:!0}),a(),i(!1)},t[0]=o,t[1]=l,t[2]=a,t[3]=i,t[4]=u,t[5]=s,t[6]=m):m=t[6];let h=m,g=n!==null,_;t[7]!==d||t[8]!==i?(_=e=>{!e&&!d&&i(!1)},t[7]=d,t[8]=i,t[9]=_):_=t[9];let v;t[10]!==o||t[11]!==d||t[12]!==h||t[13]!==n?(v=n?(0,Q.jsx)(p,{itemName:o({id:`ExUzM4`,values:{0:n.name}}),isSubmitting:d,onDelete:()=>h(n),customDescription:n.origin?.source&&/\/plugins\/(?:cache|marketplaces)\//.test(n.origin.source)?o({id:`WnsbUT`,values:{0:n.path}}):o({id:`E1Da_b`,values:{0:n.path}})}):null,t[10]=o,t[11]=d,t[12]=h,t[13]=n,t[14]=v):v=t[14];let y;return t[15]!==g||t[16]!==_||t[17]!==v?(y=(0,Q.jsx)(P,{open:g,onOpenChange:_,children:v}),t[15]=g,t[16]=_,t[17]=v,t[18]=y):y=t[18],y}function Wi(e){let t=e.split(`/`);return t.some(e=>e===``||e===`.`||e===`..`)||t.length===0||t.length===1&&t[0].toLowerCase()===`skill.md`?!1:!/\s/.test(e)}function Gi(e){let t=(0,$.c)(66),{target:n,onOpenChange:i}=e,{_:a}=c(),{openTarget:o}=r(),l=(0,Z.useId)(),[u,d]=(0,Z.useState)(``),[f,p]=(0,Z.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.prefix??`references/`)},t[0]=n,t[1]=m);let h=n?.skill.scope,g=n?.skill.name,_=n?.prefix,y;if(t[2]!==h||t[3]!==g||t[4]!==_?(y=[h,g,_],t[2]=h,t[3]=g,t[4]=_,t[5]=y):y=t[5],(0,Z.useEffect)(m,y),!n)return null;let b,x,S,C;t[6]!==u||t[7]!==f?(C=u.trim(),x=C===``||!Wi(C),b=!x&&!f,S=C.includes(`/`)?C.split(`/`).slice(0,-1).join(`/`):null,t[6]=u,t[7]=f,t[8]=b,t[9]=x,t[10]=S,t[11]=C):(b=t[8],x=t[9],S=t[10],C=t[11]);let w=S,T;t[12]!==a||t[13]!==b||t[14]!==i||t[15]!==o||t[16]!==n||t[17]!==C?(T=async function(){if(!n||!b)return;p(!0);let e=/\.mdx?$/i.test(C),t=await Tt({scope:n.skill.scope,name:n.skill.name,path:C,content:e?`# ${C.split(`/`).pop()?.replace(/\.mdx?$/i,``)??``}\n`:``});if(p(!1),!t.ok){rt.error(a({id:`a_2_uB`,values:{0:t.error,trimmed:C}}));return}if(rt.success(a({id:`MXSt4t`,values:{0:t.path}})),e){let e=lt(n.skill,C);o({kind:`doc`,target:e,docName:e})}i(!1)},t[12]=a,t[13]=b,t[14]=i,t[15]=o,t[16]=n,t[17]=C,t[18]=T):T=t[18];let E=T,A;t[19]!==i||t[20]!==f?(A=e=>{!e&&!f&&i(!1)},t[19]=i,t[20]=f,t[21]=A):A=t[21];let M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`wQvvZY`})}),t[22]=M):M=t[22];let F;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsxs)(N,{children:[M,(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`lM4c-I`})})]}),t[23]=F):F=t[23];let I;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Q.jsx)(s,{id:`I6gXOa`}),t[24]=I):I=t[24];let L;t[25]===l?L=t[26]:(L=(0,Q.jsx)(le,{htmlFor:l,children:I}),t[25]=l,t[26]=L);let R;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>d(e.target.value),t[27]=R):R=t[27];let z=x&&C!==``,B;t[28]===E?B=t[29]:(B=e=>{e.key===`Enter`&&E()},t[28]=E,t[29]=B);let V;t[30]!==l||t[31]!==u||t[32]!==z||t[33]!==B?(V=(0,Q.jsx)(it,{id:l,value:u,onChange:R,placeholder:`references/notes.md`,"aria-invalid":z,onKeyDown:B}),t[30]=l,t[31]=u,t[32]=z,t[33]=B,t[34]=V):V=t[34];let H;t[35]!==w||t[36]!==x||t[37]!==C?(H=x&&C!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(s,{id:`fVzizW`})}):w?(0,Q.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:(0,Q.jsx)(s,{id:`9lso1Y`,values:{folderPart:w},components:{0:(0,Q.jsx)(`span`,{className:`font-mono text-foreground/80`})}})}):null,t[35]=w,t[36]=x,t[37]=C,t[38]=H):H=t[38];let U;t[39]!==L||t[40]!==V||t[41]!==H?(U=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[L,V,H]}),t[39]=L,t[40]=V,t[41]=H,t[42]=U):U=t[42];let W;t[43]===i?W=t[44]:(W=()=>i(!1),t[43]=i,t[44]=W);let G;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Q.jsx)(s,{id:`dEgA5A`}),t[45]=G):G=t[45];let K;t[46]!==f||t[47]!==W?(K=(0,Q.jsx)(v,{variant:`outline`,onClick:W,disabled:f,children:G}),t[46]=f,t[47]=W,t[48]=K):K=t[48];let ee;t[49]===E?ee=t[50]:(ee=()=>void E(),t[49]=E,t[50]=ee);let q=!b,J;t[51]===f?J=t[52]:(J=f?(0,Q.jsx)(s,{id:`E9bKSA`}):(0,Q.jsx)(s,{id:`hYgDIe`}),t[51]=f,t[52]=J);let Y;t[53]!==ee||t[54]!==q||t[55]!==J?(Y=(0,Q.jsx)(v,{onClick:ee,disabled:q,children:J}),t[53]=ee,t[54]=q,t[55]=J,t[56]=Y):Y=t[56];let te;t[57]!==K||t[58]!==Y?(te=(0,Q.jsxs)(j,{children:[K,Y]}),t[57]=K,t[58]=Y,t[59]=te):te=t[59];let X;t[60]!==U||t[61]!==te?(X=(0,Q.jsxs)(k,{className:`sm:max-w-md`,children:[F,U,te]}),t[60]=U,t[61]=te,t[62]=X):X=t[62];let ne;return t[63]!==X||t[64]!==A?(ne=(0,Q.jsx)(P,{open:!0,onOpenChange:A,children:X}),t[63]=X,t[64]=A,t[65]=ne):ne=t[65],ne}function Ki(e){let t=(0,$.c)(18),{target:n,onOpenChange:i}=e,{_:a}=c(),{setSkillsSidebar:o,closeTabs:s,openTabs:l}=r(),[u,d]=(0,Z.useState)(!1),f;t[0]!==a||t[1]!==s||t[2]!==i||t[3]!==l||t[4]!==o?(f=async function(e){let{skill:t,filePath:n}=e;o(!0),d(!0);let r=await At({scope:t.scope,name:t.name,path:n});if(d(!1),!r.ok){rt.error(a({id:`CBT70t`,values:{0:r.error}}));return}if(!r.existed){rt.error(a({id:`q4efaG`,values:{filePath:n}})),i(!1);return}rt.success(a({id:`gOmloS`,values:{filePath:n}})),s(Li(l,t,n),{force:!0}),i(!1)},t[0]=a,t[1]=s,t[2]=i,t[3]=l,t[4]=o,t[5]=f):f=t[5];let m=f,h=n!==null,g;t[6]!==u||t[7]!==i?(g=e=>{!e&&!u&&i(!1)},t[6]=u,t[7]=i,t[8]=g):g=t[8];let _;t[9]!==a||t[10]!==u||t[11]!==m||t[12]!==n?(_=n?(0,Q.jsx)(p,{itemName:a({id:`wZPUJx`,values:{0:n.filePath}}),isSubmitting:u,onDelete:()=>m(n),customDescription:a({id:`ppzof_`,values:{0:mt(n.skill.path),1:n.filePath,2:n.skill.name}})}):null,t[9]=a,t[10]=u,t[11]=m,t[12]=n,t[13]=_):_=t[13];let v;return t[14]!==h||t[15]!==g||t[16]!==_?(v=(0,Q.jsx)(P,{open:h,onOpenChange:g,children:_}),t[14]=h,t[15]=g,t[16]=_,t[17]=v):v=t[17],v}function qi(e){let t=(0,$.c)(64),{target:n,onOpenChange:r}=e,{_:i}=c(),a=Je(),o=(0,Z.useId)(),[l,u]=(0,Z.useState)(``),[d,f]=(0,Z.useState)(!1),p;t[0]===n?p=t[1]:(p=()=>{n&&u(n.filePath)},t[0]=n,t[1]=p);let m=n?.skill.scope,h=n?.skill.name,g=n?.filePath,_;if(t[2]!==m||t[3]!==h||t[4]!==g?(_=[m,h,g],t[2]=m,t[3]=h,t[4]=g,t[5]=_):_=t[5],(0,Z.useEffect)(p,_),!n)return null;let y,b,x;t[6]!==l||t[7]!==n.filePath?(b=l.trim(),x=b===n.filePath,y=b===``||!Wi(b),t[6]=l,t[7]=n.filePath,t[8]=y,t[9]=b,t[10]=x):(y=t[8],b=t[9],x=t[10]);let S=y,C=!S&&!x&&!d,w;t[11]!==i||t[12]!==C||t[13]!==r||t[14]!==a||t[15]!==n||t[16]!==b?(w=async function(){if(!n||!C)return;f(!0);let e=await St({scope:n.skill.scope,name:n.skill.name,from:n.filePath,to:b});if(f(!1),!e.ok){rt.error(i({id:`11ukmX`,values:{0:e.error}}));return}e.fromDocName!==void 0&&e.toDocName!==void 0&&a(e.fromDocName,e.toDocName),rt.success(i({id:`XszXjc`,values:{0:e.to}})),r(!1)},t[11]=i,t[12]=C,t[13]=r,t[14]=a,t[15]=n,t[16]=b,t[17]=w):w=t[17];let T=w,E;t[18]!==r||t[19]!==d?(E=e=>{!e&&!d&&r(!1)},t[18]=r,t[19]=d,t[20]=E):E=t[20];let A;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`yckias`})}),t[21]=A):A=t[21];let M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsxs)(N,{children:[A,(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`HzVAoz`})})]}),t[22]=M):M=t[22];let F;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(s,{id:`I6gXOa`}),t[23]=F):F=t[23];let I;t[24]===o?I=t[25]:(I=(0,Q.jsx)(le,{htmlFor:o,children:F}),t[24]=o,t[25]=I);let L;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>u(e.target.value),t[26]=L):L=t[26];let R=S&&b!==``,z;t[27]===T?z=t[28]:(z=e=>{e.key===`Enter`&&T()},t[27]=T,t[28]=z);let B;t[29]!==o||t[30]!==l||t[31]!==R||t[32]!==z?(B=(0,Q.jsx)(it,{id:o,value:l,onChange:L,"aria-invalid":R,onKeyDown:z}),t[29]=o,t[30]=l,t[31]=R,t[32]=z,t[33]=B):B=t[33];let V;t[34]!==S||t[35]!==b?(V=S&&b!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(s,{id:`fVzizW`})}):null,t[34]=S,t[35]=b,t[36]=V):V=t[36];let H;t[37]!==I||t[38]!==B||t[39]!==V?(H=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[I,B,V]}),t[37]=I,t[38]=B,t[39]=V,t[40]=H):H=t[40];let U;t[41]===r?U=t[42]:(U=()=>r(!1),t[41]=r,t[42]=U);let W;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(s,{id:`dEgA5A`}),t[43]=W):W=t[43];let G;t[44]!==d||t[45]!==U?(G=(0,Q.jsx)(v,{variant:`outline`,onClick:U,disabled:d,children:W}),t[44]=d,t[45]=U,t[46]=G):G=t[46];let K;t[47]===T?K=t[48]:(K=()=>void T(),t[47]=T,t[48]=K);let ee=!C,q;t[49]===d?q=t[50]:(q=d?(0,Q.jsx)(s,{id:`tHKQ6j`}):(0,Q.jsx)(s,{id:`2wxgft`}),t[49]=d,t[50]=q);let J;t[51]!==K||t[52]!==ee||t[53]!==q?(J=(0,Q.jsx)(v,{onClick:K,disabled:ee,children:q}),t[51]=K,t[52]=ee,t[53]=q,t[54]=J):J=t[54];let Y;t[55]!==G||t[56]!==J?(Y=(0,Q.jsxs)(j,{children:[G,J]}),t[55]=G,t[56]=J,t[57]=Y):Y=t[57];let te;t[58]!==H||t[59]!==Y?(te=(0,Q.jsxs)(k,{className:`sm:max-w-md`,children:[M,H,Y]}),t[58]=H,t[59]=Y,t[60]=te):te=t[60];let X;return t[61]!==te||t[62]!==E?(X=(0,Q.jsx)(P,{open:!0,onOpenChange:E,children:te}),t[61]=te,t[62]=E,t[63]=X):X=t[63],X}function Ji(e){let t=(0,$.c)(59),{target:n,onOpenChange:r}=e,{_:i}=c(),a=(0,Z.useId)(),[o,l]=(0,Z.useState)(null),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)(!1),[g,_]=(0,Z.useState)(``),[y,b]=(0,Z.useState)(!1),x;t[0]===n?x=t[1]:(x=()=>{if(l(null),d(null),p(!1),h(!1),!n)return;let{skill:e,editor:t}=n,r=e.absolutePath?.slice(0,-`/${e.path}`.length)??null;if(r===null){p(!0);return}let i=`${r}/${e.path.replace(/\/SKILL\.mdx?$/i,``)}`,a=`${r}/${ht(t,e.scope)}/${e.name}`,o=new AbortController;for(let[t,n]of[[i,d],[a,l]])Dt({source:t,name:e.name},o.signal).then(e=>{o.signal.aborted||(e.ok?n(e.skillMd):p(!0))}).catch(()=>{o.signal.aborted||p(!0)});return()=>o.abort()},t[0]=n,t[1]=x);let S=n?.skill.scope,C=n?.skill.name,w=n?.editor,T;if(t[2]!==S||t[3]!==C||t[4]!==w?(T=[S,C,w],t[2]=S,t[3]=C,t[4]=w,t[5]=T):T=t[5],(0,Z.useEffect)(x,T),!n)return null;let{skill:E,editor:M}=n,F;t[6]!==i||t[7]!==M||t[8]!==r||t[9]!==E.name||t[10]!==E.scope||t[11]!==n||t[12]!==g?(F=async function(e){if(!n)return;b(!0);let t=await bt({scope:E.scope,name:E.name,editor:M,action:e,...e===`rename`?{toName:g.trim()}:{}});if(b(!1),!t.ok){rt.error(i({id:`MIF36T`,values:{0:t.error}}));return}rt.success(i(e===`align`?{id:`QKgePK`,values:{editor:M}}:e===`make-source`?{id:`It9oAP`,values:{editor:M}}:{id:`b2ezG_`,values:{0:g.trim()}})),r(!1)},t[6]=i,t[7]=M,t[8]=r,t[9]=E.name,t[10]=E.scope,t[11]=n,t[12]=g,t[13]=F):F=t[13];let I=F,L,R;t[14]!==E.name||t[15]!==g?(R=g.trim(),L=R===``||!we.test(R)||R===E.name,t[14]=E.name,t[15]=g,t[16]=L,t[17]=R):(L=t[16],R=t[17]);let z=L,B;t[18]!==y||t[19]!==r?(B=e=>{!e&&!y&&r(!1)},t[18]=y,t[19]=r,t[20]=B):B=t[20];let V;t[21]!==M||t[22]!==E.name?(V=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`q8aCbb`,values:{0:E.name,editor:M}})}),t[21]=M,t[22]=E.name,t[23]=V):V=t[23];let H;t[24]===M?H=t[25]:(H=(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`QASTNu`,values:{editor:M}})}),t[24]=M,t[25]=H);let U;t[26]!==H||t[27]!==V?(U=(0,Q.jsxs)(N,{children:[V,H]}),t[26]=H,t[27]=V,t[28]=U):U=t[28];let W;t[29]!==u||t[30]!==o||t[31]!==f?(W=u!==null&&o!==null?(0,Q.jsx)(Vt,{oldContent:u,newContent:o,layout:`unified`}):f?(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center px-6 text-center text-muted-foreground text-sm`,children:(0,Q.jsx)(s,{id:`5BlXTD`})}):(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center text-muted-foreground text-sm`,children:(0,Q.jsx)(s,{id:`1V17kO`})}),t[29]=u,t[30]=o,t[31]=f,t[32]=W):W=t[32];let G;t[33]!==I||t[34]!==M||t[35]!==a||t[36]!==z||t[37]!==m||t[38]!==E.name||t[39]!==g||t[40]!==R?(G=m?(0,Q.jsxs)(`div`,{className:`mt-3 space-y-1.5`,children:[(0,Q.jsx)(le,{htmlFor:a,children:(0,Q.jsx)(s,{id:`pSimwP`,values:{editor:M}})}),(0,Q.jsx)(it,{id:a,value:g,onChange:e=>_(e.target.value),placeholder:`${E.name}-${M}`,"aria-invalid":z&&R!==``,onKeyDown:e=>{e.key===`Enter`&&!z&&I(`rename`)}})]}):null,t[33]=I,t[34]=M,t[35]=a,t[36]=z,t[37]=m,t[38]=E.name,t[39]=g,t[40]=R,t[41]=G):G=t[41];let K;t[42]!==W||t[43]!==G?(K=(0,Q.jsxs)(A,{className:`min-h-0 flex-1 overflow-auto`,children:[W,G]}),t[42]=W,t[43]=G,t[44]=K):K=t[44];let ee;t[45]!==I||t[46]!==y||t[47]!==M||t[48]!==z||t[49]!==m||t[50]!==E.name?(ee=(0,Q.jsx)(j,{children:m?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(v,{variant:`outline`,onClick:()=>h(!1),disabled:y,children:(0,Q.jsx)(s,{id:`iH8pgl`})}),(0,Q.jsx)(v,{onClick:()=>void I(`rename`),disabled:y||z,children:(0,Q.jsx)(s,{id:`AT0e50`})})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(v,{variant:`outline`,onClick:()=>{_(`${E.name}-${M}`),h(!0)},disabled:y,children:(0,Q.jsx)(s,{id:`AT0e50`})}),(0,Q.jsx)(v,{variant:`outline`,onClick:()=>void I(`make-source`),disabled:y,children:(0,Q.jsx)(s,{id:`xWomUD`,values:{editor:M}})}),(0,Q.jsx)(v,{onClick:()=>void I(`align`),disabled:y,children:(0,Q.jsx)(s,{id:`PZn2LP`})})]})}),t[45]=I,t[46]=y,t[47]=M,t[48]=z,t[49]=m,t[50]=E.name,t[51]=ee):ee=t[51];let q;t[52]!==U||t[53]!==K||t[54]!==ee?(q=(0,Q.jsxs)(k,{className:`flex max-h-[85vh] w-full max-w-3xl flex-col`,children:[U,K,ee]}),t[52]=U,t[53]=K,t[54]=ee,t[55]=q):q=t[55];let J;return t[56]!==q||t[57]!==B?(J=(0,Q.jsx)(P,{open:!0,onOpenChange:B,children:q}),t[56]=q,t[57]=B,t[58]=J):J=t[58],J}function Yi(e){let t=(0,$.c)(75),{skill:n,existingNames:r,onOpenChange:i,onRenamed:a}=e,o=Ye(),c=n!==null,l=(0,Z.useId)(),[u,d]=(0,Z.useState)(``),[f,p]=(0,Z.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.name)},t[0]=n,t[1]=m);let h=n?.scope,g=n?.name,_;if(t[2]!==h||t[3]!==g?(_=[h,g],t[2]=h,t[3]=g,t[4]=_):_=t[4],(0,Z.useEffect)(m,_),!n)return null;let y,b,x,S,C,w;if(t[5]!==r||t[6]!==u||t[7]!==n.name){C=u.trim(),w=C===n.name;let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=/\s/,t[14]=e):e=t[14];let i;t[15]===u?i=t[16]:(i=e.test(u),t[15]=u,t[16]=i),y=i,S=C.length>64,b=C===``||!we.test(C)||S,x=!b&&!w&&r.has(C),t[5]=r,t[6]=u,t[7]=n.name,t[8]=y,t[9]=b,t[10]=x,t[11]=S,t[12]=C,t[13]=w}else y=t[8],b=t[9],x=t[10],S=t[11],C=t[12],w=t[13];let T=x,E=!b&&!T&&!w&&!f,A;t[17]!==E||t[18]!==i||t[19]!==a||t[20]!==o||t[21]!==n||t[22]!==C?(A=async function(){if(!n||!E)return;p(!0);let e=await o({scope:n.scope,name:n.name},C);p(!1),e.ok&&(a?.(C),i(!1))},t[17]=E,t[18]=i,t[19]=a,t[20]=o,t[21]=n,t[22]=C,t[23]=A):A=t[23];let M=A,F;t[24]===i?F=t[25]:(F=e=>e?null:i(!1),t[24]=i,t[25]=F);let I;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`dw_3cv`})}),t[26]=I):I=t[26];let L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsxs)(N,{children:[I,(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`R9IDFz`})})]}),t[27]=L):L=t[27];let R;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Q.jsx)(s,{id:`6YtxFj`}),t[28]=R):R=t[28];let z;t[29]===l?z=t[30]:(z=(0,Q.jsx)(le,{htmlFor:l,children:R}),t[29]=l,t[30]=z);let B;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>d(e.target.value),t[31]=B):B=t[31];let V;t[32]===M?V=t[33]:(V=e=>{e.key===`Enter`&&M()},t[32]=M,t[33]=V);let H=b||T,U=b&&C!==``||T?`${l}-error`:void 0,W;t[34]!==l||t[35]!==u||t[36]!==V||t[37]!==H||t[38]!==U?(W=(0,Q.jsx)(it,{id:l,value:u,onChange:B,onKeyDown:V,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,maxLength:64,"aria-invalid":H,"aria-describedby":U,className:`font-mono`}),t[34]=l,t[35]=u,t[36]=V,t[37]=H,t[38]=U,t[39]=W):W=t[39];let G;t[40]!==T||t[41]!==y||t[42]!==l||t[43]!==b||t[44]!==S||t[45]!==C?(G=b&&C!==``?(0,Q.jsx)(`p`,{id:`${l}-error`,className:`text-xs text-destructive`,children:y?(0,Q.jsx)(s,{id:`iUwpZI`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}}):S?(0,Q.jsx)(s,{id:`lK9c4T`}):(0,Q.jsx)(s,{id:`A50vr3`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}})}):T?(0,Q.jsx)(`p`,{id:`${l}-error`,className:`text-xs text-destructive`,children:(0,Q.jsx)(s,{id:`YJ1BTp`})}):null,t[40]=T,t[41]=y,t[42]=l,t[43]=b,t[44]=S,t[45]=C,t[46]=G):G=t[46];let K;t[47]!==z||t[48]!==W||t[49]!==G?(K=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[z,W,G]}),t[47]=z,t[48]=W,t[49]=G,t[50]=K):K=t[50];let ee;t[51]===i?ee=t[52]:(ee=()=>i(!1),t[51]=i,t[52]=ee);let q;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,Q.jsx)(s,{id:`dEgA5A`}),t[53]=q):q=t[53];let J;t[54]!==f||t[55]!==ee?(J=(0,Q.jsx)(v,{variant:`outline`,className:`font-mono uppercase`,onClick:ee,disabled:f,children:q}),t[54]=f,t[55]=ee,t[56]=J):J=t[56];let Y;t[57]===M?Y=t[58]:(Y=()=>void M(),t[57]=M,t[58]=Y);let te=!E,X;t[59]===f?X=t[60]:(X=f?(0,Q.jsx)(s,{id:`tHKQ6j`}):(0,Q.jsx)(s,{id:`2wxgft`}),t[59]=f,t[60]=X);let ne;t[61]!==Y||t[62]!==te||t[63]!==X?(ne=(0,Q.jsx)(v,{onClick:Y,disabled:te,children:X}),t[61]=Y,t[62]=te,t[63]=X,t[64]=ne):ne=t[64];let re;t[65]!==J||t[66]!==ne?(re=(0,Q.jsxs)(j,{children:[J,ne]}),t[65]=J,t[66]=ne,t[67]=re):re=t[67];let ie;t[68]!==K||t[69]!==re?(ie=(0,Q.jsxs)(k,{children:[L,K,re]}),t[68]=K,t[69]=re,t[70]=ie):ie=t[70];let ae;return t[71]!==c||t[72]!==ie||t[73]!==F?(ae=(0,Q.jsx)(P,{open:c,onOpenChange:F,children:ie}),t[71]=c,t[72]=ie,t[73]=F,t[74]=ae):ae=t[74],ae}function Xi(){let e=(0,$.c)(5),{_:t}=c(),n=gt(),r=Je(),i=Ft(),a;return e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==i?(a=async(e,a)=>{if(a===e.scope)return!1;ft(e.scope,e.name);let o=await Mt({name:e.name,fromScope:e.scope,toScope:a});if(dt(e.scope,e.name),!o.ok)return rt.error(t({id:`07eGJB`,values:{0:o.error}})),!1;rt.success(t({id:`yhI6P0`,values:{0:e.name,1:n[a]}}));let s=i.status===`ready`?i.data.find(t=>t.scope===e.scope&&t.name===e.name):void 0;return r(s?ct(s):Ne(e.scope,e.name),a===`project`&&o.path!==void 0?`${o.path.replace(/\/+$/,``)}/SKILL`:Ne(a,e.name)),!0},e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Zi(e){let t=(0,$.c)(38),{target:n,onOpenChange:r}=e,i=gt(),a=Xi(),[o,c]=(0,Z.useState)(!1);if(!n)return null;let{scope:l,name:u,toScope:d}=n,f;t[0]!==o||t[1]!==r?(f=e=>!e&&!o&&r(!1),t[0]=o,t[1]=r,t[2]=f):f=t[2];let p=i[d],m;t[3]===p?m=t[4]:(m=(0,Q.jsx)(O,{children:(0,Q.jsx)(s,{id:`SXEdCq`,values:{0:p}})}),t[3]=p,t[4]=m);let h=i[l],g=i[d],_=i[d],y;t[5]!==u||t[6]!==h||t[7]!==g||t[8]!==_?(y={0:h,1:g,2:_,name:u},t[5]=u,t[6]=h,t[7]=g,t[8]=_,t[9]=y):y=t[9];let b;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(b={0:(0,Q.jsx)(`code`,{className:`font-mono`})},t[10]=b):b=t[10];let x;t[11]===y?x=t[12]:(x=(0,Q.jsx)(D,{children:(0,Q.jsx)(s,{id:`7bIiJ7`,values:y,components:b})}),t[11]=y,t[12]=x);let S;t[13]!==m||t[14]!==x?(S=(0,Q.jsxs)(N,{children:[m,x]}),t[13]=m,t[14]=x,t[15]=S):S=t[15];let C;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(s,{id:`dEgA5A`}),t[16]=C):C=t[16];let w;t[17]===o?w=t[18]:(w=(0,Q.jsx)(M,{asChild:!0,children:(0,Q.jsx)(v,{variant:`outline`,disabled:o,children:C})}),t[17]=o,t[18]=w);let T;t[19]!==a||t[20]!==u||t[21]!==r||t[22]!==l||t[23]!==d?(T=async()=>{c(!0),await a({scope:l,name:u},d),c(!1),r(!1)},t[19]=a,t[20]=u,t[21]=r,t[22]=l,t[23]=d,t[24]=T):T=t[24];let E;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(s,{id:`QWdKwH`}),t[25]=E):E=t[25];let A;t[26]!==o||t[27]!==T?(A=(0,Q.jsx)(v,{"data-testid":`skill-scope-move-confirm`,disabled:o,onClick:T,children:E}),t[26]=o,t[27]=T,t[28]=A):A=t[28];let F;t[29]!==w||t[30]!==A?(F=(0,Q.jsxs)(j,{children:[w,A]}),t[29]=w,t[30]=A,t[31]=F):F=t[31];let I;t[32]!==S||t[33]!==F?(I=(0,Q.jsxs)(k,{className:`sm:max-w-md`,children:[S,F]}),t[32]=S,t[33]=F,t[34]=I):I=t[34];let L;return t[35]!==f||t[36]!==I?(L=(0,Q.jsx)(P,{open:!0,onOpenChange:f,children:I}),t[35]=f,t[36]=I,t[37]=L):L=t[37],L}function Qi(){let e=(0,$.c)(50),{_:t}=c(),n=It(),[r,i]=(0,Z.useState)(null),[a,o]=(0,Z.useState)(null),[s,l]=(0,Z.useState)(null),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(null),[m,h]=(0,Z.useState)(null),[g,_]=(0,Z.useState)(null),[v,y]=(0,Z.useState)(null),b;e[0]===t?b=e[1]:(b=async function(e,n,r){y(e.name);let i=await kt({scope:e.scope,name:e.name,...n?{targets:[...n]}:{},...r?.linkMode===void 0?{}:{linkMode:r.linkMode}});if(y(null),!i.ok)return rt.error(t({id:`Mj8R8K`,values:{0:i.error}})),i;let a=$i,o=new Set(i.hosts),s=i.hosts.filter(t=>!e.hosts.includes(t)),c=e.hosts.filter(e=>!o.has(e)),l=e=>{let t=i.warningCodes.indexOf(e);return t>=0?i.warnings[t]:void 0},u=l(`no-targets`);if(u)return rt.warning(u),i;if(s.length>0){let e=l(`scripts-present`);e&&rt.warning(e);let t=l(`no-description`);t&&rt.warning(t)}return i.hosts.length===0?rt.success(t({id:`4pDZ2N`,values:{0:e.name}})):s.length>0&&c.length===0?rt.success(t({id:`PPFQ3o`,values:{0:e.name,1:a(s)}})):c.length>0&&s.length===0?rt.success(t({id:`OOIVJo`,values:{0:e.name,1:a(c)}})):s.length>0&&c.length>0?rt.success(t({id:`OxplNM`,values:{0:e.name,1:a(s),2:a(c)}})):rt.success(t({id:`wDgmsr`,values:{0:e.name,1:a(i.hosts)}})),i},e[0]=t,e[1]=b);let x=b,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=async function(e,t){if(t.length!==0){y(e.name);for(let{target:n,mode:r}of t){let t=await jt({scope:e.scope,name:e.name,target:n,mode:r});if(!t.ok){rt.error(t.error);break}}y(null)}},e[2]=S):S=e[2];let C=S,w;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(w=async function(e,t){y(e.name);let n=await t();return y(null),n},e[3]=w):w=e[3];let T=w,E;e[4]!==t||e[5]!==n?(E=async function(e,r){let i=await Ct({scope:e.scope,name:e.name,existingNames:r});if(!i.ok){rt.error(t({id:`UPjaXD`,values:{0:e.name,1:i.error}}));return}rt.success(t({id:`0g7rCZ`,values:{0:i.name}})),n(e.scope,i.name)},e[4]=t,e[5]=n,e[6]=E):E=e[6];let D=E,O,k;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{e||i(null)},k=()=>i(null),e[7]=O,e[8]=k):(O=e[7],k=e[8]);let A;e[9]===r?A=e[10]:(A=(0,Q.jsx)(Ui,{skill:r,onOpenChange:O,onDeleted:k}),e[9]=r,e[10]=A);let j=a?.skill??null,M=a?.existingNames??ta,N,P;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>{e||o(null)},N=()=>o(null),e[11]=N,e[12]=P):(N=e[11],P=e[12]);let F;e[13]!==j||e[14]!==M?(F=(0,Q.jsx)(Yi,{skill:j,existingNames:M,onOpenChange:P,onRenamed:N}),e[13]=j,e[14]=M,e[15]=F):F=e[15];let I;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>{e||l(null)},e[16]=I):I=e[16];let L;e[17]===s?L=e[18]:(L=(0,Q.jsx)(Zi,{target:s,onOpenChange:I}),e[17]=s,e[18]=L);let R;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{e||d(null)},e[19]=R):R=e[19];let z;e[20]===u?z=e[21]:(z=(0,Q.jsx)(qi,{target:u,onOpenChange:R}),e[20]=u,e[21]=z);let B;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>{e||p(null)},e[22]=B):B=e[22];let V;e[23]===f?V=e[24]:(V=(0,Q.jsx)(Ki,{target:f,onOpenChange:B}),e[23]=f,e[24]=V);let H;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>{e||h(null)},e[25]=H):H=e[25];let U;e[26]===m?U=e[27]:(U=(0,Q.jsx)(Gi,{target:m,onOpenChange:H}),e[26]=m,e[27]=U);let W;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>{e||_(null)},e[28]=W):W=e[28];let G;e[29]===g?G=e[30]:(G=(0,Q.jsx)(Ji,{target:g,onOpenChange:W}),e[29]=g,e[30]=G);let K;e[31]!==F||e[32]!==L||e[33]!==z||e[34]!==V||e[35]!==U||e[36]!==G||e[37]!==A?(K=(0,Q.jsxs)(Q.Fragment,{children:[A,F,L,z,V,U,G]}),e[31]=F,e[32]=L,e[33]=z,e[34]=V,e[35]=U,e[36]=G,e[37]=A,e[38]=K):K=e[38];let ee=K,q,J,Y,te,X,ne;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(q=(e,t)=>o({skill:e,existingNames:t}),J=(e,t)=>l({scope:e.scope,name:e.name,toScope:t}),Y=(e,t)=>d({skill:e,filePath:t}),te=(e,t)=>p({skill:e,filePath:t}),X=(e,t)=>h(t===void 0?{skill:e}:{skill:e,prefix:t}),ne=(e,t)=>_({skill:e,editor:t}),e[39]=q,e[40]=J,e[41]=Y,e[42]=te,e[43]=X,e[44]=ne):(q=e[39],J=e[40],Y=e[41],te=e[42],X=e[43],ne=e[44]);let re;return e[45]!==ee||e[46]!==D||e[47]!==x||e[48]!==v?(re={installingName:v,install:x,convertLocations:C,runLocationWrite:T,duplicate:D,requestDelete:i,requestRename:q,requestScopeMove:J,requestFileRename:Y,requestFileDelete:te,requestFileCreate:X,requestForkResolve:ne,dialogs:ee},e[45]=ee,e[46]=D,e[47]=x,e[48]=v,e[49]=re):re=e[49],re}function $i(e){return e.map(ea).join(`, `)}function ea(e){return Se[e]??e}var ta=new Set;function na(e){let t=(0,$.c)(7),{absolutePath:n,menuKind:r}=e,i=r===void 0?`dropdown`:r,a=typeof window<`u`?window.okDesktop:void 0;if(!a||!n)return null;let o;t[0]===n?o=t[1]:(o=()=>void a.shell.showItemInFolder(n),t[0]=n,t[1]=o);let s,c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)($e,{"aria-hidden":!0}),c=Mi(a.platform),t[2]=s,t[3]=c):(s=t[2],c=t[3]);let l;return t[4]!==i||t[5]!==o?(l=(0,Q.jsxs)(Jr,{menuKind:i,onSelect:o,children:[s,c]}),t[4]=i,t[5]=o,t[6]=l):l=t[6],l}function ra(e){let t=(0,$.c)(68),{skill:n,filePath:r,actions:i,menuKind:a}=e,o=a===void 0?`dropdown`:a,{_:l}=c(),u;t[0]!==r||t[1]!==n.absolutePath?(u=n.absolutePath?`${mt(n.absolutePath)}/${r}`:void 0,t[0]=r,t[1]=n.absolutePath,t[2]=u):u=t[2];let d=u,f;t[3]===n.path?f=t[4]:(f=mt(n.path),t[3]=n.path,t[4]=f);let p=`${f}/${r}`,m;t[5]===l?m=t[6]:(m=async function(e){try{await Bt(e),rt.success(l({id:`SXCSQd`}))}catch{rt.error(l({id:`cRHuuI`}))}},t[5]=l,t[6]=m);let h=m,g;t[7]!==i||t[8]!==r||t[9]!==n?(g=()=>i.requestFileRename(n,r),t[7]=i,t[8]=r,t[9]=n,t[10]=g):g=t[10];let _,v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Q.jsx)(Hn,{"aria-hidden":!0}),v=(0,Q.jsx)(s,{id:`2wxgft`}),t[11]=_,t[12]=v):(_=t[11],v=t[12]);let y;t[13]!==o||t[14]!==g?(y=(0,Q.jsxs)(Jr,{menuKind:o,onSelect:g,children:[_,v]}),t[13]=o,t[14]=g,t[15]=y):y=t[15];let b;t[16]!==d||t[17]!==o?(b=(0,Q.jsx)(na,{absolutePath:d,menuKind:o}),t[16]=d,t[17]=o,t[18]=b):b=t[18];let x,S;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(Qe,{"aria-hidden":!0}),S=(0,Q.jsx)(s,{id:`zd00pH`}),t[19]=x,t[20]=S):(x=t[19],S=t[20]);let C;t[21]===o?C=t[22]:(C=(0,Q.jsxs)(ei,{menuKind:o,children:[x,S]}),t[21]=o,t[22]=C);let w;t[23]!==d||t[24]!==h||t[25]!==o?(w=d?(0,Q.jsx)(Jr,{menuKind:o,onSelect:()=>void h(d),children:(0,Q.jsx)(s,{id:`z2funE`})}):null,t[23]=d,t[24]=h,t[25]=o,t[26]=w):w=t[26];let T;t[27]!==h||t[28]!==p?(T=()=>void h(p),t[27]=h,t[28]=p,t[29]=T):T=t[29];let E;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(s,{id:`xloBjn`}),t[30]=E):E=t[30];let D;t[31]!==o||t[32]!==T?(D=(0,Q.jsx)(Jr,{menuKind:o,onSelect:T,children:E}),t[31]=o,t[32]=T,t[33]=D):D=t[33];let O;t[34]!==o||t[35]!==w||t[36]!==D?(O=(0,Q.jsxs)(qr,{menuKind:o,children:[w,D]}),t[34]=o,t[35]=w,t[36]=D,t[37]=O):O=t[37];let k;t[38]!==o||t[39]!==O?(k=(0,Q.jsx)($r,{menuKind:o,children:O}),t[38]=o,t[39]=O,t[40]=k):k=t[40];let A;t[41]!==o||t[42]!==C||t[43]!==k?(A=(0,Q.jsxs)(Qr,{menuKind:o,children:[C,k]}),t[41]=o,t[42]=C,t[43]=k,t[44]=A):A=t[44];let j;t[45]!==o||t[46]!==A||t[47]!==y||t[48]!==b?(j=(0,Q.jsxs)(qr,{menuKind:o,children:[y,b,A]}),t[45]=o,t[46]=A,t[47]=y,t[48]=b,t[49]=j):j=t[49];let M;t[50]===o?M=t[51]:(M=(0,Q.jsx)(Zr,{menuKind:o}),t[50]=o,t[51]=M);let N;t[52]!==i||t[53]!==r||t[54]!==n?(N=()=>i.requestFileDelete(n,r),t[52]=i,t[53]=r,t[54]=n,t[55]=N):N=t[55];let P,F;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsx)(nt,{"aria-hidden":!0}),F=(0,Q.jsx)(s,{id:`cnGeoo`}),t[56]=P,t[57]=F):(P=t[56],F=t[57]);let I;t[58]!==o||t[59]!==N?(I=(0,Q.jsxs)(Jr,{menuKind:o,variant:`destructive`,onSelect:N,children:[P,F]}),t[58]=o,t[59]=N,t[60]=I):I=t[60];let L;t[61]!==o||t[62]!==I?(L=(0,Q.jsx)(qr,{menuKind:o,children:I}),t[61]=o,t[62]=I,t[63]=L):L=t[63];let R;return t[64]!==j||t[65]!==M||t[66]!==L?(R=(0,Q.jsxs)(Q.Fragment,{children:[j,M,L]}),t[64]=j,t[65]=M,t[66]=L,t[67]=R):R=t[67],R}function ia(e){let t=(0,$.c)(15),{skill:n,actions:r,existingNames:i,menuKind:a}=e,o=a===void 0?`dropdown`:a,s=Lt(),c=g().states,{dispatch:l}=Fr(),u=typeof window<`u`?window.okDesktop:void 0,d;t[0]!==n.name||t[1]!==n.scope||t[2]!==s?(d=vr({skillName:n.name,scope:n.scope,workspace:s}),t[0]=n.name,t[1]=n.scope,t[2]=s,t[3]=d):d=t[3];let f=d,p;t[4]!==l||t[5]!==f||t[6]!==c||t[7]!==o?(p=o===`context`?(0,Q.jsx)(ji,{input:f,installStates:c,dispatch:l}):(0,Q.jsx)(Pi,{input:f,installStates:c,isElectronHost:u!=null,dispatch:l}),t[4]=l,t[5]=f,t[6]=c,t[7]=o,t[8]=p):p=t[8];let m;return t[9]!==r||t[10]!==i||t[11]!==o||t[12]!==n||t[13]!==p?(m=(0,Q.jsx)(aa,{actions:r,existingNames:i,menuKind:o,skill:n,openWithAi:p}),t[9]=r,t[10]=i,t[11]=o,t[12]=n,t[13]=p,t[14]=m):m=t[14],m}function aa(e){let t=(0,$.c)(124),{actions:n,existingNames:r,menuKind:i,openWithAi:o,skill:l}=e,{_:u}=c(),d=gt(),p=ui(l,n),m=l.absolutePath,h;t[0]===u?h=t[1]:(h=async function(e){try{await Bt(e),rt.success(u({id:`SXCSQd`}))}catch{rt.error(u({id:`cRHuuI`}))}},t[0]=u,t[1]=h);let g=h,_;t[2]!==m||t[3]!==i?(_=(0,Q.jsx)(na,{absolutePath:m,menuKind:i}),t[2]=m,t[3]=i,t[4]=_):_=t[4];let v,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Q.jsx)(Qe,{"aria-hidden":!0}),y=(0,Q.jsx)(s,{id:`zd00pH`}),t[5]=v,t[6]=y):(v=t[5],y=t[6]);let b;t[7]===i?b=t[8]:(b=(0,Q.jsxs)(ei,{menuKind:i,children:[v,y]}),t[7]=i,t[8]=b);let x;t[9]!==m||t[10]!==g||t[11]!==i?(x=m?(0,Q.jsx)(Jr,{menuKind:i,onSelect:()=>void g(m),children:(0,Q.jsx)(s,{id:`z2funE`})}):null,t[9]=m,t[10]=g,t[11]=i,t[12]=x):x=t[12];let S;t[13]!==g||t[14]!==l.path?(S=()=>void g(l.path),t[13]=g,t[14]=l.path,t[15]=S):S=t[15];let C;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(s,{id:`xloBjn`}),t[16]=C):C=t[16];let w;t[17]!==i||t[18]!==S?(w=(0,Q.jsx)(Jr,{menuKind:i,onSelect:S,children:C}),t[17]=i,t[18]=S,t[19]=w):w=t[19];let T;t[20]!==i||t[21]!==x||t[22]!==w?(T=(0,Q.jsxs)(qr,{menuKind:i,children:[x,w]}),t[20]=i,t[21]=x,t[22]=w,t[23]=T):T=t[23];let E;t[24]!==i||t[25]!==T?(E=(0,Q.jsx)($r,{menuKind:i,children:T}),t[24]=i,t[25]=T,t[26]=E):E=t[26];let D;t[27]!==i||t[28]!==E||t[29]!==b?(D=(0,Q.jsxs)(Qr,{menuKind:i,children:[b,E]}),t[27]=i,t[28]=E,t[29]=b,t[30]=D):D=t[30];let O;t[31]!==i||t[32]!==o||t[33]!==D||t[34]!==_?(O=(0,Q.jsxs)(qr,{menuKind:i,children:[_,o,D]}),t[31]=i,t[32]=o,t[33]=D,t[34]=_,t[35]=O):O=t[35];let k;t[36]===i?k=t[37]:(k=(0,Q.jsx)(Zr,{menuKind:i}),t[36]=i,t[37]=k);let A;t[38]!==n||t[39]!==r||t[40]!==l?(A=()=>void n.duplicate(l,r),t[38]=n,t[39]=r,t[40]=l,t[41]=A):A=t[41];let j,M;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsx)(a,{"aria-hidden":!0}),M=(0,Q.jsx)(s,{id:`euc6Ns`}),t[42]=j,t[43]=M):(j=t[42],M=t[43]);let N;t[44]!==i||t[45]!==A?(N=(0,Q.jsxs)(Jr,{menuKind:i,onSelect:A,children:[j,M]}),t[44]=i,t[45]=A,t[46]=N):N=t[46];let P;t[47]!==n||t[48]!==r||t[49]!==l?(P=()=>n.requestRename(l,r),t[47]=n,t[48]=r,t[49]=l,t[50]=P):P=t[50];let F,I;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(Hn,{"aria-hidden":!0}),I=(0,Q.jsx)(s,{id:`2wxgft`}),t[51]=F,t[52]=I):(F=t[51],I=t[52]);let L;t[53]!==i||t[54]!==P?(L=(0,Q.jsxs)(Jr,{menuKind:i,onSelect:P,children:[F,I]}),t[53]=i,t[54]=P,t[55]=L):L=t[55];let R;t[56]!==n||t[57]!==l?(R=()=>n.requestFileCreate(l),t[56]=n,t[57]=l,t[58]=R):R=t[58];let z,B;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Q.jsx)(f,{"aria-hidden":!0}),B=(0,Q.jsx)(s,{id:`HdkSiO`}),t[59]=z,t[60]=B):(z=t[59],B=t[60]);let V;t[61]!==i||t[62]!==R?(V=(0,Q.jsxs)(Jr,{menuKind:i,onSelect:R,children:[z,B]}),t[61]=i,t[62]=R,t[63]=V):V=t[63];let H,U;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Q.jsx)(Vn,{"aria-hidden":!0}),U=(0,Q.jsx)(s,{id:`TKQ7K-`}),t[64]=H,t[65]=U):(H=t[64],U=t[65]);let W;t[66]===i?W=t[67]:(W=(0,Q.jsxs)(ei,{menuKind:i,children:[H,U]}),t[66]=i,t[67]=W);let G;t[68]!==n||t[69]!==l?(G=e=>n.requestForkResolve(l,e),t[68]=n,t[69]=l,t[70]=G):G=t[70];let K;t[71]!==p||t[72]!==i||t[73]!==l||t[74]!==G?(K=(0,Q.jsx)(hi,{toggles:p,skill:l,menuKind:i,onResolveFork:G}),t[71]=p,t[72]=i,t[73]=l,t[74]=G,t[75]=K):K=t[75];let ee;t[76]!==i||t[77]!==K?(ee=(0,Q.jsx)(qr,{menuKind:i,children:K}),t[76]=i,t[77]=K,t[78]=ee):ee=t[78];let q;t[79]!==i||t[80]!==ee?(q=(0,Q.jsx)($r,{menuKind:i,className:li,children:ee}),t[79]=i,t[80]=ee,t[81]=q):q=t[81];let J;t[82]!==i||t[83]!==W||t[84]!==q?(J=(0,Q.jsxs)(Qr,{menuKind:i,children:[W,q]}),t[82]=i,t[83]=W,t[84]=q,t[85]=J):J=t[85];let Y;t[86]!==n||t[87]!==l?(Y=()=>n.requestScopeMove(l,l.scope===`project`?`global`:`project`),t[86]=n,t[87]=l,t[88]=Y):Y=t[88];let te;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,Q.jsx)(Bn,{"aria-hidden":!0}),t[89]=te):te=t[89];let X;t[90]!==d.global||t[91]!==d.project||t[92]!==l.scope?(X=l.scope===`project`?(0,Q.jsx)(s,{id:`bpytj4`,values:{0:d.global}}):(0,Q.jsx)(s,{id:`bpytj4`,values:{0:d.project}}),t[90]=d.global,t[91]=d.project,t[92]=l.scope,t[93]=X):X=t[93];let ne;t[94]!==i||t[95]!==Y||t[96]!==X?(ne=(0,Q.jsxs)(Jr,{menuKind:i,onSelect:Y,children:[te,X]}),t[94]=i,t[95]=Y,t[96]=X,t[97]=ne):ne=t[97];let re;t[98]!==i||t[99]!==N||t[100]!==L||t[101]!==V||t[102]!==J||t[103]!==ne?(re=(0,Q.jsxs)(qr,{menuKind:i,children:[N,L,V,J,ne]}),t[98]=i,t[99]=N,t[100]=L,t[101]=V,t[102]=J,t[103]=ne,t[104]=re):re=t[104];let ie;t[105]===i?ie=t[106]:(ie=(0,Q.jsx)(Zr,{menuKind:i}),t[105]=i,t[106]=ie);let ae;t[107]!==n||t[108]!==l?(ae=()=>n.requestDelete(l),t[107]=n,t[108]=l,t[109]=ae):ae=t[109];let oe,se;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,Q.jsx)(nt,{"aria-hidden":!0}),se=(0,Q.jsx)(s,{id:`cnGeoo`}),t[110]=oe,t[111]=se):(oe=t[110],se=t[111]);let ce;t[112]!==i||t[113]!==ae?(ce=(0,Q.jsxs)(Jr,{menuKind:i,variant:`destructive`,onSelect:ae,children:[oe,se]}),t[112]=i,t[113]=ae,t[114]=ce):ce=t[114];let le;t[115]!==i||t[116]!==ce?(le=(0,Q.jsx)(qr,{menuKind:i,children:ce}),t[115]=i,t[116]=ce,t[117]=le):le=t[117];let ue;return t[118]!==O||t[119]!==k||t[120]!==re||t[121]!==ie||t[122]!==le?(ue=(0,Q.jsxs)(Q.Fragment,{children:[O,k,re,ie,le]}),t[118]=O,t[119]=k,t[120]=re,t[121]=ie,t[122]=le,t[123]=ue):ue=t[123],ue}export{mr as A,Ur as C,hr as D,yr as E,Fr as F,fr as I,Un as L,Mr as M,gr as N,_r as O,Ar as P,Bn as R,zr as S,Lr as T,Wr as _,Zi as a,Vr as b,Pi as c,Oi as d,ci as f,Ir as g,ui as h,Qi as i,Er as j,pr as k,Mi as l,hi as m,ra as n,Ri as o,li as p,na as r,Bi as s,ia as t,ji as u,Br as v,Hr as w,Kr as x,Rr as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./dist-Nvb76hAm.js";import{Aa as t,Ea as n,kt as r,wa as i}from"./dist-
|
|
1
|
+
import{r as e}from"./dist-Nvb76hAm.js";import{Aa as t,Ea as n,kt as r,wa as i}from"./dist-SMRIgJ7J2.js";function a(e){return e.path.split(`/`).slice(0,-1).join(`/`)}var o=[`project`,`global`];function s(e){return{project:new Set(e.filter(e=>e.scope===`project`).map(e=>e.name)),global:new Set(e.filter(e=>e.scope===`global`).map(e=>e.name))}}function c(e){return e.startsWith(`open-knowledge-pack-`)?e.slice(t.length):e}function l(e){let t=e.path.replace(/\/SKILL\.mdx?$/i,``);return e.scope===`global`?`~/${t}`:t}function u(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,`~`).replace(/^\/root/,`~`)}function d(e){let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):e}function f(){let{_:t}=e();return{project:t({id:`e0NrBM`}),global:t({id:`2GT3Hf`})}}function p(){let{_:t}=e();return{project:t({id:`Es3G-g`}),global:t({id:`fvrHin`})}}function m(e,t){if(e.includes(`/`))return t===`global`?`~/${e}`:e;let r=e===`agents`?`.agents/skills`:(t===`global`?n:i)[e]??`.${e}/skills`;return t===`global`?`~/${r}`:r}function h(e,t){return!e||t===``?[]:Object.keys(e).filter(n=>e[n]===t)}function g(e){let t=e.hostAliases??{},n=e=>e.split(`/`).slice(0,-1).join(`/`),r=new Set(e.hosts),i=new Set([...e.hosts.filter(e=>!e.includes(`/`)).map(t=>m(t,e.scope).replace(/^~\//,``)),...(e.customPlacements??[]).map(e=>n(e.path)),...e.path.includes(`/`)?[n(e.path.replace(/\/SKILL\.mdx?$/i,``))]:[]]);return Object.entries(t).filter(([e,t])=>!r.has(e)&&i.has(t)).map(([e])=>e)}function _(e){let t=new Set(e.symlinkedHosts??[]),n=[],r=new Set,i=(e,t)=>{r.has(e)||(r.add(e),n.push({dir:e,symlink:t}))};i(l(e),t.has(e.hosts[0]??``));for(let n of e.hosts)i(`${m(n,e.scope)}/${e.name}`,t.has(n));for(let t of e.customPlacements??[])i(t.path,t.mode===`link`);return n}function v(e,t=e.hosts){let n=r.options,i=g(e);return[...t.includes(`agents`)?[`agents`]:[],...n.filter(e=>t.includes(e)||i.includes(e)),...(e.customPlacements??[]).map(e=>a(e))]}export{d as a,m as c,p as d,f,v as i,s as l,h as n,c as o,a as r,_ as s,o as t,u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jt as e}from"./dist-DPrOTK3n2.js";import{t}from"./parse-api-error-cKrN25NM.js";import{o as n}from"./documents-events-H7SxtX3p.js";async function r(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function i(e,t){try{let n=await fetch(e,t?{signal:t}:void 0);return n.ok?{ok:!0,...await n.json()}:{ok:!1,error:await r(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function a(e,t,n){try{let i=await fetch(e,{method:t,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});return i.ok?{ok:!0,...await i.json().catch(()=>null)??{}}:{ok:!1,error:await r(i)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(e){let t=e.trim();return t.length<2?{ok:!0,results:[],backend:`skills.sh`,degraded:!1}:i(`/api/skills/search?q=${encodeURIComponent(t)}`)}async function s(){return i(`/api/skills/popular?limit=24`)}async function c(t,n){let r=await i(t?`/api/skills?scope=${t}`:`/api/skills`,n);if(!r.ok)return r;let{ok:a,...o}=r,s=e.safeParse(o);return s.success?{ok:!0,skills:s.data.skills}:{ok:!1,error:`The skills list did not match its schema.`}}async function l(e){return i(`/api/skills/detail?${new URLSearchParams({source:e.source,name:e.name}).toString()}`)}async function u(e,t){return i(`/api/skills/preview?${new URLSearchParams({source:e.source,name:e.name}).toString()}`,t)}async function d(e,t){return i(`/api/skills/resolve-ref?${new URLSearchParams({ref:e.ref,scope:e.scope,from:e.from}).toString()}`,t)}async function f(e,t){return i(`/api/skills/discover?source=${encodeURIComponent(e)}`,t)}async function p(){return i(`/api/skills/installed`)}async function m(e){try{let t=await fetch(`/api/skill/edit-external`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let n=await t.json().catch(()=>null);return!n||typeof n.docName!=`string`?{ok:!1,error:`Server returned a malformed response.`}:{ok:!0,docName:n.docName}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function h(e){try{let t=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,created:i?.created??!1,warnings:i?.warnings??[],...typeof i?.path==`string`?{path:i.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function g(e){try{let r=await fetch(`/api/skill/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok){let e=await r.json().catch(()=>null),n=t(e)??`HTTP ${r.status}`,i=typeof e?.detail==`string`&&/multiple skills/i.test(String(e?.title??``))?String(e.detail).split(`, `).map(e=>e.trim()).filter(Boolean):void 0;return i?{ok:!1,error:n,skills:i}:{ok:!1,error:n}}let i=await r.json().catch(()=>null);return!i||typeof i.name!=`string`?{ok:!1,error:`Server returned a malformed import response.`}:(n(),{ok:!0,name:i.name,alreadyImported:i?.alreadyImported??!1,collisionRenamedFrom:i?.collisionRenamedFrom,warnings:i?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let t=await fetch(`/api/skills/import-bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return!i||!Array.isArray(i.results)?{ok:!1,error:`Server returned a malformed import response.`}:(n(),{ok:!0,...i})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function v(e,t){try{let i=await fetch(`/api/skill-upload?scope=${encodeURIComponent(t)}`,{method:`POST`,body:e});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return!a||typeof a.name!=`string`?{ok:!1,error:`Server returned a malformed upload response.`}:(n(),{ok:!0,name:a.name,alreadyImported:a?.alreadyImported??!1,collisionRenamedFrom:a?.collisionRenamedFrom,warnings:a?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function y(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function b(e){try{let t=y(e.name,e.existingNames),i=await fetch(`/api/skill/duplicate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,toName:t})});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return typeof a?.name==`string`?(n(),{ok:!0,name:a.name}):{ok:!1,error:`Server returned a malformed duplicate response.`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function x(e){let{name:t,fromScope:i,toScope:a}=e;if(i===a)return{ok:!0,scope:a};try{let e=await fetch(`/api/skill/move-scope`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:t,fromScope:i,toScope:a})});if(!e.ok)return{ok:!1,error:await r(e)};let o=await e.json().catch(()=>null);return n(),{ok:!0,scope:a,...typeof o?.path==`string`?{path:o.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function S(e){try{let t=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,committed:i?.committed??!1,...typeof i?.to==`string`?{to:i.to}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function C(e,t){try{let i=`?name=${encodeURIComponent(t)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${i}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await r(a)};let o=await a.json().catch(()=>null);return n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function w(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,fork:{editor:e.editor,action:e.action,...e.toName===void 0?{}:{toName:e.toName}}});return t.ok?(n(),{ok:!0}):t}async function T(e){try{let t=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,path:i?.path??e.path}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function E(e){try{let t=await fetch(`/api/skill-file/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,from:i?.from??e.from,to:i?.to??e.to,...i?.fromDocName===void 0?{}:{fromDocName:i.fromDocName},...i?.toDocName===void 0?{}:{toDocName:i.toDocName}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function D(e){try{let t=new URLSearchParams({scope:e.scope,name:e.name,path:e.path}),i=await fetch(`/api/skill-file?${t.toString()}`,{method:`DELETE`});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return n(),{ok:!0,existed:a?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function O(e,t,n){try{let i=new URLSearchParams({name:t,scope:e,...n?{host:n}:{}}),a=await fetch(`/api/skill?${i.toString()}`);return a.ok?{ok:!0,files:(await a.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await r(a)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function k(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path,...e.host?{host:e.host}:{}}),n=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!n.ok)return{ok:!1,status:n.status,error:await r(n)};let i=await n.json().catch(()=>null);return typeof i?.text==`string`?{ok:!0,text:i.text}:{ok:!1,status:n.status,error:`HTTP ${n.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function A(e,t){return k({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function j(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,hosts:i?.hosts??[],scripts:i?.scripts??!1,warnings:i?.warnings??[],warningCodes:i?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function M(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,place:{dir:e.dir,mode:e.mode}})});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,placedAt:i?.placedAt??e.dir}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function N(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,unplace:{path:e.path}});return t.ok?(n(),{ok:!0}):t}async function P(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,setSource:e.target});return t.ok?(n(),{ok:!0}):t}async function F(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,convert:{target:e.target,mode:e.mode}});return t.ok?(n(),{ok:!0}):t}async function I(e){try{let t=await fetch(`/api/skill-targets`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({folderAction:e})});return t.ok?{ok:!0}:{ok:!1,error:await r(t)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function L(e){try{let t=await fetch(`/api/skill/reimport`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return e.dryRun||n(),{ok:!0,updated:i?.updated??!1,source:i?.source??``,localBody:i?.localBody,upstreamBody:i?.upstreamBody,...i?.gitTracked===void 0?{}:{gitTracked:i.gitTracked},warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function R(e){try{let t=await fetch(`/api/skill/revert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{v as A,w as C,o as D,h as E,P as O,E as S,R as T,S as _,b as a,I as b,l as c,g as d,_ as f,A as g,c as h,f as i,T as j,N as k,u as l,p as m,C as n,m as o,j as p,D as r,s,F as t,O as u,x as v,d as w,L as x,M as y};
|
|
1
|
+
import{jt as e}from"./dist-SMRIgJ7J2.js";import{t}from"./parse-api-error-DkZQPwyl.js";import{o as n}from"./documents-events-CN6qju_L.js";async function r(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function i(e,t){try{let n=await fetch(e,t?{signal:t}:void 0);return n.ok?{ok:!0,...await n.json()}:{ok:!1,error:await r(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function a(e,t,n){try{let i=await fetch(e,{method:t,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});return i.ok?{ok:!0,...await i.json().catch(()=>null)??{}}:{ok:!1,error:await r(i)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(e){let t=e.trim();return t.length<2?{ok:!0,results:[],backend:`skills.sh`,degraded:!1}:i(`/api/skills/search?q=${encodeURIComponent(t)}`)}async function s(){return i(`/api/skills/popular?limit=24`)}async function c(t,n){let r=await i(t?`/api/skills?scope=${t}`:`/api/skills`,n);if(!r.ok)return r;let{ok:a,...o}=r,s=e.safeParse(o);return s.success?{ok:!0,skills:s.data.skills}:{ok:!1,error:`The skills list did not match its schema.`}}async function l(e){return i(`/api/skills/detail?${new URLSearchParams({source:e.source,name:e.name}).toString()}`)}async function u(e,t){return i(`/api/skills/preview?${new URLSearchParams({source:e.source,name:e.name}).toString()}`,t)}async function d(e,t){return i(`/api/skills/resolve-ref?${new URLSearchParams({ref:e.ref,scope:e.scope,from:e.from}).toString()}`,t)}async function f(e,t){return i(`/api/skills/discover?source=${encodeURIComponent(e)}`,t)}async function p(){return i(`/api/skills/installed`)}async function m(e){try{let t=await fetch(`/api/skill/edit-external`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let n=await t.json().catch(()=>null);return!n||typeof n.docName!=`string`?{ok:!1,error:`Server returned a malformed response.`}:{ok:!0,docName:n.docName}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function h(e){try{let t=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,created:i?.created??!1,warnings:i?.warnings??[],...typeof i?.path==`string`?{path:i.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function g(e){try{let r=await fetch(`/api/skill/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok){let e=await r.json().catch(()=>null),n=t(e)??`HTTP ${r.status}`,i=typeof e?.detail==`string`&&/multiple skills/i.test(String(e?.title??``))?String(e.detail).split(`, `).map(e=>e.trim()).filter(Boolean):void 0;return i?{ok:!1,error:n,skills:i}:{ok:!1,error:n}}let i=await r.json().catch(()=>null);return!i||typeof i.name!=`string`?{ok:!1,error:`Server returned a malformed import response.`}:(n(),{ok:!0,name:i.name,alreadyImported:i?.alreadyImported??!1,collisionRenamedFrom:i?.collisionRenamedFrom,warnings:i?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let t=await fetch(`/api/skills/import-bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return!i||!Array.isArray(i.results)?{ok:!1,error:`Server returned a malformed import response.`}:(n(),{ok:!0,...i})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function v(e,t){try{let i=await fetch(`/api/skill-upload?scope=${encodeURIComponent(t)}`,{method:`POST`,body:e});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return!a||typeof a.name!=`string`?{ok:!1,error:`Server returned a malformed upload response.`}:(n(),{ok:!0,name:a.name,alreadyImported:a?.alreadyImported??!1,collisionRenamedFrom:a?.collisionRenamedFrom,warnings:a?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function y(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function b(e){try{let t=y(e.name,e.existingNames),i=await fetch(`/api/skill/duplicate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,toName:t})});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return typeof a?.name==`string`?(n(),{ok:!0,name:a.name}):{ok:!1,error:`Server returned a malformed duplicate response.`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function x(e){let{name:t,fromScope:i,toScope:a}=e;if(i===a)return{ok:!0,scope:a};try{let e=await fetch(`/api/skill/move-scope`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:t,fromScope:i,toScope:a})});if(!e.ok)return{ok:!1,error:await r(e)};let o=await e.json().catch(()=>null);return n(),{ok:!0,scope:a,...typeof o?.path==`string`?{path:o.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function S(e){try{let t=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,committed:i?.committed??!1,...typeof i?.to==`string`?{to:i.to}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function C(e,t){try{let i=`?name=${encodeURIComponent(t)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${i}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await r(a)};let o=await a.json().catch(()=>null);return n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function w(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,fork:{editor:e.editor,action:e.action,...e.toName===void 0?{}:{toName:e.toName}}});return t.ok?(n(),{ok:!0}):t}async function T(e){try{let t=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,path:i?.path??e.path}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function E(e){try{let t=await fetch(`/api/skill-file/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,from:i?.from??e.from,to:i?.to??e.to,...i?.fromDocName===void 0?{}:{fromDocName:i.fromDocName},...i?.toDocName===void 0?{}:{toDocName:i.toDocName}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function D(e){try{let t=new URLSearchParams({scope:e.scope,name:e.name,path:e.path}),i=await fetch(`/api/skill-file?${t.toString()}`,{method:`DELETE`});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return n(),{ok:!0,existed:a?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function O(e,t,n){try{let i=new URLSearchParams({name:t,scope:e,...n?{host:n}:{}}),a=await fetch(`/api/skill?${i.toString()}`);return a.ok?{ok:!0,files:(await a.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await r(a)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function k(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path,...e.host?{host:e.host}:{}}),n=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!n.ok)return{ok:!1,status:n.status,error:await r(n)};let i=await n.json().catch(()=>null);return typeof i?.text==`string`?{ok:!0,text:i.text}:{ok:!1,status:n.status,error:`HTTP ${n.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function A(e,t){return k({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function j(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,hosts:i?.hosts??[],scripts:i?.scripts??!1,warnings:i?.warnings??[],warningCodes:i?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function M(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,place:{dir:e.dir,mode:e.mode}})});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,placedAt:i?.placedAt??e.dir}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function N(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,unplace:{path:e.path}});return t.ok?(n(),{ok:!0}):t}async function P(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,setSource:e.target});return t.ok?(n(),{ok:!0}):t}async function F(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,convert:{target:e.target,mode:e.mode}});return t.ok?(n(),{ok:!0}):t}async function I(e){try{let t=await fetch(`/api/skill-targets`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({folderAction:e})});return t.ok?{ok:!0}:{ok:!1,error:await r(t)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function L(e){try{let t=await fetch(`/api/skill/reimport`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return e.dryRun||n(),{ok:!0,updated:i?.updated??!1,source:i?.source??``,localBody:i?.localBody,upstreamBody:i?.upstreamBody,...i?.gitTracked===void 0?{}:{gitTracked:i.gitTracked},warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function R(e){try{let t=await fetch(`/api/skill/revert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{v as A,w as C,o as D,h as E,P as O,E as S,R as T,S as _,b as a,I as b,l as c,g as d,_ as f,A as g,c as h,f as i,T as j,N as k,u as l,p as m,C as n,m as o,j as p,D as r,s,F as t,O as u,x as v,d as w,L as x,M as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-BbftclCc.js";var t=e(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-CYidjpOJ.js";import{n}from"./chunk-Y2CYZVJY-
|
|
1
|
+
import{o as e,t}from"./chunk-CYidjpOJ.js";import{n}from"./chunk-Y2CYZVJY-DD_NReQM.js";import"./src-BWFYg8Yg.js";var r=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),i=e(r(),1),a={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},o={trace:n((...e)=>{},`trace`),debug:n((...e)=>{},`debug`),info:n((...e)=>{},`info`),warn:n((...e)=>{},`warn`),error:n((...e)=>{},`error`),fatal:n((...e)=>{},`fatal`)},s=n(function(e=`fatal`){let t=a.fatal;typeof e==`string`?e.toLowerCase()in a&&(t=a[e]):typeof e==`number`&&(t=e),o.trace=()=>{},o.debug=()=>{},o.info=()=>{},o.warn=()=>{},o.error=()=>{},o.fatal=()=>{},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,c(`FATAL`))),t<=a.error&&(o.error=console.error?console.error.bind(console,c(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,c(`ERROR`))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,c(`WARN`))),t<=a.info&&(o.info=console.info?console.info.bind(console,c(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,c(`INFO`))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`DEBUG`))),t<=a.trace&&(o.trace=console.debug?console.debug.bind(console,c(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`TRACE`)))},`setLogLevel`),c=n(e=>`%c${(0,i.default)().format(`ss.SSS`)} : ${e} : `,`format`),{abs:l,max:u,min:d}=Math;[`w`,`e`].map(f),[`n`,`s`].map(f),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(f);function f(e){return{type:e}}export{s as n,r,o as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{R as e}from"./CodeMirrorPropInput-
|
|
1
|
+
import{R as e}from"./CodeMirrorPropInput-DAKQ_zlh.js";import{E as t,H as n,I as r,S as i,T as a,U as o,W as s,h as c,nt as l,rt as u,x as d}from"./config-provider-jFlM_kWt.js";import{$ as f,Dt as p,J as m,Mt as h,Q as g,St as _,X as v,kt as y}from"./dist-B7yUMXxJ.js";var b=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:r(this.yanchor),yhead:r(this.yhead)}}static fromJSON(t){return new e(a(t.yanchor),a(t.yhead))}},x=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new c(e)}toYPos(e,n=0){return t(this.ytext,e,n)}fromYPos(e){let t=i(a(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new b(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?p.cursor(n.pos,n.assoc):p.range(t.pos,n.pos)}},S=y.define({combine(e){return e[e.length-1]}}),C=_.define(),w=class{constructor(e){this.view=e,this.conf=e.state.facet(S),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[C.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(C)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
|
|
2
2
|
`);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},T=g.fromClass(w),E=v.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),D=_.define(),O=class extends f{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return n(`span`,[s(`class`,`cm-ySelectionCaret`),s(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[o(``),n(`div`,[s(`class`,`cm-ySelectionCaretDot`)]),o(``),n(`div`,[s(`class`,`cm-ySelectionInfo`)],[o(this.name)]),o(``)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},k=class{constructor(e){this.conf=e.state.facet(S),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[D.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=h.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let n=this.conf.ytext,r=n.doc,o=this.conf.awareness,s=[],c=this.conf.awareness.getLocalState();if(c!=null){let r=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=r?e.state.selection.main:null,s=c.cursor==null?null:a(c.cursor.anchor),l=c.cursor==null?null:a(c.cursor.head);if(i!=null){let e=t(n,i.anchor),r=t(n,i.head);(c.cursor==null||!d(s,e)||!d(l,r))&&o.setLocalStateField(`cursor`,{anchor:e,head:r})}else c.cursor!=null&&r&&o.setLocalStateField(`cursor`,null)}o.getStates().forEach((t,a)=>{if(a===o.doc.clientID)return;let c=t.cursor;if(c==null||c.anchor==null||c.head==null)return;let d=i(c.anchor,r),f=i(c.head,r);if(d==null||f==null||d.type!==n||f.type!==n)return;let{color:p=`#30bced`,name:h=`Anonymous`}=t.user||{},g=t.user&&t.user.colorLight||p+`33`,_=u(d.index,f.index),v=l(d.index,f.index),y=e.view.state.doc.lineAt(_),b=e.view.state.doc.lineAt(v);if(y.number===b.number)s.push({from:_,to:v,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})});else{s.push({from:_,to:y.from+y.length,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})}),s.push({from:b.from,to:v,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})});for(let t=y.number+1;t<b.number;t++){let n=e.view.state.doc.line(t).from;s.push({from:n,to:n,value:m.line({attributes:{style:`background-color: ${g}`,class:`cm-yLineSelection`}})})}}s.push({from:f.index,to:f.index,value:m.widget({side:f.index-d.index>0?-1:1,block:!1,widget:new O(p,h)})})}),this.decorations=m.set(s,!0)}},A=g.fromClass(k,{decorations:e=>e.decorations}),j=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},M=y.define({combine(e){return e[e.length-1]}});_.define();var N=class{constructor(t){this.view=t,this.conf=t.state.facet(M),this._undoManager=this.conf.undoManager,this.syncConf=t.state.facet(S),this._beforeChangeSelection=null,this._mux=e(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:e})=>{let n=e.meta.get(this);if(n){let e=this.syncConf.fromYRange(n);t.dispatch(t.state.update({selection:e,effects:[v.scrollIntoView(e)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(C)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},P=g.fromClass(N),F=({state:e,dispatch:t})=>e.facet(M).undo()||!0,I=({state:e,dispatch:t})=>e.facet(M).redo()||!0,L=[{key:`Mod-z`,run:F,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:I,preventDefault:!0},{key:`Mod-Shift-z`,run:I,preventDefault:!0}],R=(e,t,{undoManager:n=new c(e)}={})=>{let r=new x(e,t),i=[S.of(r),T];return t&&i.push(E,A),n!==!1&&i.push(M.of(new j(n)),P,v.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?F(t):e.inputType===`historyRedo`?I(t):!1}})),i};export{L as n,R as t};
|