@microvac/ui 0.0.0-stage → 0.1.0-rc.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (609) hide show
  1. package/README.md +29 -2
  2. package/dist/android-chrome-192x192.png +0 -0
  3. package/dist/android-chrome-512x512.png +0 -0
  4. package/dist/announcement-preview.svg +11 -0
  5. package/dist/apple-touch-icon.png +0 -0
  6. package/dist/assets/ActiveAgentsPanel-BEx06tMt.js +1 -0
  7. package/dist/assets/AdapterManager-3kEEQWFJ.js +1 -0
  8. package/dist/assets/AdvancedToolsRoute-CgS6B-oh.js +39 -0
  9. package/dist/assets/AgentActionButtons-Cz3jCEd7.js +1 -0
  10. package/dist/assets/AgentAdvancedTab-BG6ZIAuN.js +131 -0
  11. package/dist/assets/AgentBulkSettingsSheet-BrrbvspS.js +1 -0
  12. package/dist/assets/AgentChat-Dw9iXD6H.js +1 -0
  13. package/dist/assets/AgentDetailPage-CuVIHv_q.js +39 -0
  14. package/dist/assets/AgentIdentityChip-BrVCcuHQ.js +1 -0
  15. package/dist/assets/AgentRosterFilters-GQ2bdXfW.js +2 -0
  16. package/dist/assets/Agents-clrVQnvc.js +2 -0
  17. package/dist/assets/Agents.production-DTopo7XB.js +2 -0
  18. package/dist/assets/AnimatedDialogContent-CDLfw-dJ.js +1 -0
  19. package/dist/assets/AppDetail-BcWBg5yW.js +1 -0
  20. package/dist/assets/AppNotConnected-NgfyHZ4L.js +1 -0
  21. package/dist/assets/ApprovalDetail-Dm_1V4tC.js +1 -0
  22. package/dist/assets/Approvals-i5AB3JPj.js +1 -0
  23. package/dist/assets/AppsConnect-D660Tpuo.js +1 -0
  24. package/dist/assets/AppsReview-DdTqOisY.js +1 -0
  25. package/dist/assets/ArtifactEmptyGraphic-DzxCruYA.js +1 -0
  26. package/dist/assets/Artifacts-CkXBz6nh.js +1 -0
  27. package/dist/assets/AssigneePickerInner-BNjyABBe.js +1 -0
  28. package/dist/assets/AssistantConnection-CNF6mDmO.js +1 -0
  29. package/dist/assets/AttentionInlineVerbs-BiyZ1ekZ.js +1 -0
  30. package/dist/assets/AttentionQueueRow-Bh0dKHpF.js +1 -0
  31. package/dist/assets/AuditHub-BK848cb4.js +1 -0
  32. package/dist/assets/AuditRuns-CUdlbP7S.js +1 -0
  33. package/dist/assets/Auth-DDqxm5gD.js +3 -0
  34. package/dist/assets/BoardChat-fvKqk0R7.js +18 -0
  35. package/dist/assets/BoardClaim-BEC5BZfz.js +1 -0
  36. package/dist/assets/BootstrapSetupUxLab-CXzErrin.js +1 -0
  37. package/dist/assets/Browse-DoovSMuF.js +1 -0
  38. package/dist/assets/BudgetPolicyCard-BYMlczCq.js +1 -0
  39. package/dist/assets/CaseDetail-UMAcSH_x.js +1 -0
  40. package/dist/assets/CaseStatus-BI0aMl9l.js +1 -0
  41. package/dist/assets/Cases-CMTkGghU.js +1 -0
  42. package/dist/assets/ChatEndpointDetail-CocNEInH.js +5 -0
  43. package/dist/assets/ChatEndpointSetup-Cyi2tI9K.js +1 -0
  44. package/dist/assets/ChatIdentityConfirm-Ba3JuTX1.js +1 -0
  45. package/dist/assets/CliAuth-D2jnueGH.js +1 -0
  46. package/dist/assets/Companies-K75I9dJs.js +1 -0
  47. package/dist/assets/CompanyAccess-Cw6nLUhE.js +1 -0
  48. package/dist/assets/CompanyActivity-BsgmVpWS.js +1 -0
  49. package/dist/assets/CompanyActivity.production-w-KGxvo6.js +1 -0
  50. package/dist/assets/CompanyConnections-yRPYSdm7.js +1 -0
  51. package/dist/assets/CompanyEnvironments-BA7kWdOJ.js +35 -0
  52. package/dist/assets/CompanyEnvironments-BrP-ENHg.css +1 -0
  53. package/dist/assets/CompanyExport-DfsK4b9c.js +4 -0
  54. package/dist/assets/CompanyImport-DJHAsmSF.js +1 -0
  55. package/dist/assets/CompanySettings-DwzHGXec.js +1 -0
  56. package/dist/assets/CompanySettingsPluginPage-Bpa81PF3.js +1 -0
  57. package/dist/assets/CompanySkills-eTqgbqQN.js +10 -0
  58. package/dist/assets/CompanySkills.production-CQSWfH0r.js +10 -0
  59. package/dist/assets/ConfigureBuiltInAgentModal-DgeD7t_i.js +1 -0
  60. package/dist/assets/CopyableGatewayUrl-B6K3rOal.js +1 -0
  61. package/dist/assets/CordisPluginSettings-DD3AnD2G.js +1 -0
  62. package/dist/assets/Costs-orBM8T-a.js +1 -0
  63. package/dist/assets/CrossIssueCollaborationUxLab-Bv9y9-NE.js +1 -0
  64. package/dist/assets/Dashboard-CrSBNKX1.js +2 -0
  65. package/dist/assets/DashboardLive-Cg8C9RiS.js +1 -0
  66. package/dist/assets/DecisionDateChips-BLZKZH71.js +1 -0
  67. package/dist/assets/DecisionHistoryPanel-yK-CP7Qg.js +1 -0
  68. package/dist/assets/DecisionQueuePage-BKXbERai.js +1 -0
  69. package/dist/assets/DesignGuide-2FswNsXz.js +25 -0
  70. package/dist/assets/DesignSandboxTaskThread-CGU--FXR.js +28 -0
  71. package/dist/assets/EmailConnectionAccess-CZ5QRKyg.js +1 -0
  72. package/dist/assets/EmailEndpointSetup-BI2vsd8Y.js +1 -0
  73. package/dist/assets/EnforcementBanner-B-iX466h.js +1 -0
  74. package/dist/assets/EntityRow-BsICt6pd.js +1 -0
  75. package/dist/assets/ExecutionWorkspaceDetail-CMqR9puh.js +19 -0
  76. package/dist/assets/ExternalAgentInviteDialog-De30ZrLP.js +50 -0
  77. package/dist/assets/FilterBar-rCmsTtG4.js +1 -0
  78. package/dist/assets/FolderControls-CmnB7Ap-.js +1 -0
  79. package/dist/assets/GatewayDetail-Duw9pJ10.js +2 -0
  80. package/dist/assets/GatewaysList-BBhVGhRq.js +1 -0
  81. package/dist/assets/GitHubConnectionRecovery-6VshLoNV.js +1 -0
  82. package/dist/assets/GoalDetail-CahntjlI.js +1 -0
  83. package/dist/assets/GoalTree-CU4GBFCh.js +1 -0
  84. package/dist/assets/Goals-CzM2NDFR.js +1 -0
  85. package/dist/assets/InstanceAccess-CZzkE65W.js +1 -0
  86. package/dist/assets/InstanceExperimentalSettings-DWumKtOK.js +1 -0
  87. package/dist/assets/InviteLanding-BIy2z50u.js +1 -0
  88. package/dist/assets/IssueChatLongThreadPerf-D4DJvdOG.js +2 -0
  89. package/dist/assets/JoinRequestQueue-C5rauGYm.js +1 -0
  90. package/dist/assets/Layout.production-BSDWnupa.js +1 -0
  91. package/dist/assets/McpConnect-BN8ST0RS.js +1 -0
  92. package/dist/assets/MembershipAction-DTjhGn-L.js +1 -0
  93. package/dist/assets/MetricCard-CeL9Pdn5.js +1 -0
  94. package/dist/assets/MissingPluginTabPlaceholder-CbQiSVnZ.js +1 -0
  95. package/dist/assets/NewAgent-BszrNpQk.js +1 -0
  96. package/dist/assets/NewAgentDialog-U9qAcTzc.js +1 -0
  97. package/dist/assets/NewGoalDialog-DqKbk4-i.js +1 -0
  98. package/dist/assets/NewProjectDialog-DrlUAF-N.js +1 -0
  99. package/dist/assets/OnboardingPrimitives-BkgPF4Mu.js +1 -0
  100. package/dist/assets/OnboardingWizard-CMBMcuXv.js +2 -0
  101. package/dist/assets/OrgChart.production-BLczTjRj.js +1 -0
  102. package/dist/assets/PaperclipCloudOAuthHandoff-BTtF8UPD.js +1 -0
  103. package/dist/assets/PluginManager-CCcqlfgK.js +1 -0
  104. package/dist/assets/PluginPage-B1empV69.js +1 -0
  105. package/dist/assets/PluginSettings-DtopaRqR.js +1 -0
  106. package/dist/assets/ProfileDetailRoute-BqvVpBZi.js +1 -0
  107. package/dist/assets/ProfileSettings-5__tVfGi.js +1 -0
  108. package/dist/assets/ProfileWizardRoute-vt-MRLuD.js +1 -0
  109. package/dist/assets/ProjectDetail-DJ4zjube.js +1 -0
  110. package/dist/assets/ProjectRepositoryInput-BJcnj3At.js +1 -0
  111. package/dist/assets/ProjectWorkspaceDetail-DEAO3q6v.js +29 -0
  112. package/dist/assets/ProjectWorkspacesContent-CZvO7p0i.js +1 -0
  113. package/dist/assets/Projects-Dm7-zXUH.js +1 -0
  114. package/dist/assets/QuotaBar-Drp3CaxX.js +1 -0
  115. package/dist/assets/RepositoryEditor-BT_VAkJu.js +1 -0
  116. package/dist/assets/Responsibilities-DbUEtGZu.js +4 -0
  117. package/dist/assets/ResponsibilityDetail--S8_GOkb.js +1 -0
  118. package/dist/assets/ResponsibleUserDenialUxLab-1PB3JNG0.js +1 -0
  119. package/dist/assets/ReviewQueueCard-B8w9aXKU.js +1 -0
  120. package/dist/assets/RoutineAuditActivity-BCo7pYe5.js +1 -0
  121. package/dist/assets/RoutineDetail-C9Dwn5G9.js +2 -0
  122. package/dist/assets/RoutineRunVariablesDialog-Baomcbe3.js +1 -0
  123. package/dist/assets/Routines-Dkv4gJno.js +1 -0
  124. package/dist/assets/Routines.production-Cs2Y-lpt.js +1 -0
  125. package/dist/assets/RoutinesToolbar-BNKfCrTo.js +1 -0
  126. package/dist/assets/Search-CVx4cl2o.js +1 -0
  127. package/dist/assets/Secrets-C2qv2HKZ.js +4 -0
  128. package/dist/assets/SkillBinaryFile-DDkhLlfC.js +1 -0
  129. package/dist/assets/SkillCardIcon-Cp_hws0N.js +2 -0
  130. package/dist/assets/SkillFolderTree-Cv0CmfYx.js +1 -0
  131. package/dist/assets/SkillSourceTree-DmjlUswf.js +2 -0
  132. package/dist/assets/SkillSources-nmlYypUU.js +2 -0
  133. package/dist/assets/SkillStudio-BK3y_3zr.js +9 -0
  134. package/dist/assets/SkillsNavigationTabs-DRwMP1eu.js +1 -0
  135. package/dist/assets/SpekoPhoneCallback-Cqi7AIyH.js +1 -0
  136. package/dist/assets/SpekoProviderSetup-CJI4oXk5.js +1 -0
  137. package/dist/assets/StatusCards-DKyyY81S.js +1 -0
  138. package/dist/assets/SummarySlotCard-f3RomdZS.js +1 -0
  139. package/dist/assets/TailscaleConnector-yQWLR1Ra.js +1 -0
  140. package/dist/assets/TaskChatLab-Dsr7eyj4.js +11 -0
  141. package/dist/assets/TaskSummaryList-eFDfK_QH.js +1 -0
  142. package/dist/assets/Timeline-BWA9dyk6.js +1 -0
  143. package/dist/assets/ToolsAdminGate-DpBg30hQ.js +1 -0
  144. package/dist/assets/TrustPresetSection-DtWjK9Kp.js +1 -0
  145. package/dist/assets/UserProfile-C66UI5xx.js +1 -0
  146. package/dist/assets/WebhookUrlWarning-CDygVnDH.js +1 -0
  147. package/dist/assets/WhatNeedsMe-BQ82RHus.js +1 -0
  148. package/dist/assets/Workspaces-DrjJes30.js +1 -0
  149. package/dist/assets/abnfDiagram-YUKMZFIV-Crkksu2D.js +1 -0
  150. package/dist/assets/apl-MHzTCvfx.js +1 -0
  151. package/dist/assets/arc-Dnq9Aszq.js +1 -0
  152. package/dist/assets/architecture-WOLXFQ4H-bHU8FW0c.js +1 -0
  153. package/dist/assets/architectureDiagram-47P4ROYG-Bj5Styf9.js +36 -0
  154. package/dist/assets/array-CL5Tisss.js +1 -0
  155. package/dist/assets/arrow-down-left-Ck9VQyqQ.js +1 -0
  156. package/dist/assets/asciiarmor-DFLNSgns.js +1 -0
  157. package/dist/assets/asn1-CfPVWRYE.js +1 -0
  158. package/dist/assets/asterisk-CJ4OeA7Y.js +1 -0
  159. package/dist/assets/blockDiagram-E7TT5TSB-OeHpNCQ-.js +140 -0
  160. package/dist/assets/brainfuck-NEHkmXMc.js +1 -0
  161. package/dist/assets/budgets-CAWPqcn4.js +1 -0
  162. package/dist/assets/building-complex-Dxiyk_pH.js +1 -0
  163. package/dist/assets/c4Diagram-CRA5TL53-QbK5p76P.js +38 -0
  164. package/dist/assets/channel-BSmZkKA8.js +1 -0
  165. package/dist/assets/character-CguPM7IG.js +1 -0
  166. package/dist/assets/chat-channels-CzTZV2fr.js +1 -0
  167. package/dist/assets/chunk-2BW5OAIV-Ckr4HfBO.js +10 -0
  168. package/dist/assets/chunk-2Q5K7J3B-CkPHWFj-.js +1 -0
  169. package/dist/assets/chunk-3YJQHVM4-C_uoPpLR.js +2 -0
  170. package/dist/assets/chunk-4EA7E6EY-BeMEfIRS.js +1 -0
  171. package/dist/assets/chunk-5VM5RSS4-2H3r6wq0.js +15 -0
  172. package/dist/assets/chunk-7TKQ45FW-DiwqWHvN.js +1 -0
  173. package/dist/assets/chunk-AW2ZBBNX-Cf57K3PO.js +88 -0
  174. package/dist/assets/chunk-DBDB3WZW-B2qouVQO.js +1 -0
  175. package/dist/assets/chunk-DUW6YSOI-slPglwIh.js +1 -0
  176. package/dist/assets/chunk-E2ZNV5FY-DG8wQ_NS.js +70 -0
  177. package/dist/assets/chunk-EU5HNXII-cxRrXRGV.js +213 -0
  178. package/dist/assets/chunk-FVRAUYC3-Dizswk0V.js +2 -0
  179. package/dist/assets/chunk-HJ2JQQFS-DL4lnpSv.js +1 -0
  180. package/dist/assets/chunk-HTAEGDNF-Zxjdb6kj.js +1 -0
  181. package/dist/assets/chunk-J5ZVWO5B-ClU583ja.js +1 -0
  182. package/dist/assets/chunk-JWPE2WC7--HEGjv3t.js +1 -0
  183. package/dist/assets/chunk-KQW6MTUR-BsVaJdnu.js +1 -0
  184. package/dist/assets/chunk-NGNAAXSQ-e5XI1hSt.js +128 -0
  185. package/dist/assets/chunk-NTY3LDVX-DyT9N5sM.js +1 -0
  186. package/dist/assets/chunk-VPRB5NB3-BNz5CtBn.js +129 -0
  187. package/dist/assets/chunk-XC4XBNZT-CCgIhjYS.js +62 -0
  188. package/dist/assets/chunk-XXDRQBXY-BdWplhUD.js +1 -0
  189. package/dist/assets/chunk-Y2CYZVJY-OvsAdhaO.js +1 -0
  190. package/dist/assets/circle-slash-uNv_ha0X.js +1 -0
  191. package/dist/assets/classDiagram-v2-K4WV4PDN-Cdh3CEl4.js +217 -0
  192. package/dist/assets/clike-CIx9nZSv.js +1 -0
  193. package/dist/assets/clojure-DFaIEz5O.js +1 -0
  194. package/dist/assets/cmake-koz-qBlo.js +1 -0
  195. package/dist/assets/cobol-Bo8Zw9gB.js +1 -0
  196. package/dist/assets/coffeescript-CXYzYf-Y.js +1 -0
  197. package/dist/assets/coins-BDAh8hDQ.js +1 -0
  198. package/dist/assets/collections-B58p51lw.js +3 -0
  199. package/dist/assets/commonlisp-C4OOCwkD.js +1 -0
  200. package/dist/assets/company-skill-routes-D5LJ1l8M.js +1 -0
  201. package/dist/assets/company-skill-summary-DnWVmP1S.js +1 -0
  202. package/dist/assets/configuration-warnings-CZKSfHJv.js +2 -0
  203. package/dist/assets/connection-owner-D8fNrFqC.js +1 -0
  204. package/dist/assets/cose-bilkent-JH36ORCC-DFyVDb92.js +1 -0
  205. package/dist/assets/crystal-BlJXQDvy.js +1 -0
  206. package/dist/assets/css-DEZwfVpY.js +1 -0
  207. package/dist/assets/cynefin-EF2NZ3EQ-BkwhfqJ0.js +1 -0
  208. package/dist/assets/cynefinDiagram-3GCD6N5R-DuGb_wq2.js +62 -0
  209. package/dist/assets/cypher-z2oFsVv2.js +1 -0
  210. package/dist/assets/cytoscape.esm-C2vp4vBx.js +321 -0
  211. package/dist/assets/d-Dkt6y7AQ.js +1 -0
  212. package/dist/assets/dagre-W4DXFKR2-Bxq_Mhia.js +4 -0
  213. package/dist/assets/defaultLocale-C2Bpu8Ih.js +1 -0
  214. package/dist/assets/definition-DxwMBXnu.js +1 -0
  215. package/dist/assets/diagram-2UJZ2QOL-B-P_hrXV.js +200 -0
  216. package/dist/assets/diagram-OVF4WLC6-Ds0BqQWH.js +24 -0
  217. package/dist/assets/diagram-PFPMY2P6-Dpqb2-Cb.js +30 -0
  218. package/dist/assets/diagram-UMYRVEAY-BJSoxjiu.js +24 -0
  219. package/dist/assets/diagram-YEKJPTXX-BxaG_9tT.js +41 -0
  220. package/dist/assets/diagram-ZIFT7M5P-6acvVOtc.js +3 -0
  221. package/dist/assets/diff-C60bAYOU.js +1 -0
  222. package/dist/assets/dist-0EWXio4m.js +1 -0
  223. package/dist/assets/dist-BGvZP_Cl.js +1 -0
  224. package/dist/assets/dist-BZ7AbEhN.js +1 -0
  225. package/dist/assets/dist-BlosHr86.js +6 -0
  226. package/dist/assets/dist-Bmr4uhSk.js +1 -0
  227. package/dist/assets/dist-C6yMfMNS.js +13 -0
  228. package/dist/assets/dist-CMZQedYl.js +1 -0
  229. package/dist/assets/dist-CTlCK4Pe.js +1 -0
  230. package/dist/assets/dist-C_N_-eaT.js +1 -0
  231. package/dist/assets/dist-CaUbG4Hl.js +1 -0
  232. package/dist/assets/dist-Cd7wdKYE.js +39 -0
  233. package/dist/assets/dist-Cn7-nxjU.js +1 -0
  234. package/dist/assets/dist-Cnj95_pX.js +1 -0
  235. package/dist/assets/dist-D9DR7k9k.js +3 -0
  236. package/dist/assets/dist-DIwsVdS2.js +2 -0
  237. package/dist/assets/dist-DVE0lLId.js +1 -0
  238. package/dist/assets/dist-DkAPL4CQ.js +1 -0
  239. package/dist/assets/dist-Dl6N3kpQ.js +1 -0
  240. package/dist/assets/dist-DmBvXBzK.js +1 -0
  241. package/dist/assets/dist-DpgXK0aZ.js +1 -0
  242. package/dist/assets/dist-gMRyU9GJ.js +7 -0
  243. package/dist/assets/dist-jQQX2kOU.js +1 -0
  244. package/dist/assets/dist-lUaUoFTq.js +1 -0
  245. package/dist/assets/dist-qw1ZF2vD.js +1 -0
  246. package/dist/assets/dist-rH4qrNAn.js +1 -0
  247. package/dist/assets/dockerfile-BttNdtK0.js +1 -0
  248. package/dist/assets/dtd-CCVZU5Da.js +1 -0
  249. package/dist/assets/dylan-3pmV5wzs.js +1 -0
  250. package/dist/assets/ebnf-bm-I2WIh.js +1 -0
  251. package/dist/assets/ebnfDiagram-VR2GEFS7-Ytj3Z5qC.js +1 -0
  252. package/dist/assets/ecl-BIv3PrZb.js +1 -0
  253. package/dist/assets/eiffel-DuLnr4-r.js +1 -0
  254. package/dist/assets/elk-IJKZMXRS-CJurNqqK.js +25 -0
  255. package/dist/assets/elm-njbaCU-L.js +1 -0
  256. package/dist/assets/erDiagram-O2IAPWRE-hyXckW2d.js +99 -0
  257. package/dist/assets/erlang-CuhOC2I8.js +1 -0
  258. package/dist/assets/eventmodeling-K75KTNOO-D3xQujrh.js +1 -0
  259. package/dist/assets/factor-CM3-9V3b.js +1 -0
  260. package/dist/assets/fcl-nWsMJ92o.js +1 -0
  261. package/dist/assets/flowDiagram-OXPTDLAJ-D4ojBTuY.js +1 -0
  262. package/dist/assets/folder-plus-BJZSMzuj.js +1 -0
  263. package/dist/assets/forth-BQ9HrCVY.js +1 -0
  264. package/dist/assets/fortran-DHJe28ev.js +1 -0
  265. package/dist/assets/ganttDiagram-R7TSEDQI-C8U_ITl4.js +292 -0
  266. package/dist/assets/gas-ByO0qYMr.js +1 -0
  267. package/dist/assets/gherkin-CwOmHL5K.js +1 -0
  268. package/dist/assets/gitGraph-VSP46ZUC-CDeq3yKT.js +1 -0
  269. package/dist/assets/gitGraphDiagram-XJZIOB7I-CST3EWE9.js +106 -0
  270. package/dist/assets/goals-BNJZ4nzg.js +1 -0
  271. package/dist/assets/googleAccessRemoval-CQIi1dvu.js +1 -0
  272. package/dist/assets/graphlib-DHhK3saS.js +1 -0
  273. package/dist/assets/groovy-ByXGF8cx.js +1 -0
  274. package/dist/assets/haskell-CHSpCNOy.js +1 -0
  275. package/dist/assets/haxe-P2jh68ck.js +1 -0
  276. package/dist/assets/http-0jwMmfWP.js +1 -0
  277. package/dist/assets/idl-DTVVj6r5.js +1 -0
  278. package/dist/assets/index-BJtnP7H1.js +706 -0
  279. package/dist/assets/index-z7lcCz2I.css +1 -0
  280. package/dist/assets/info-OHQRW6UA-CPvTWk7J.js +1 -0
  281. package/dist/assets/infoDiagram-5W2HQ5XZ-BPUiNdxI.js +2 -0
  282. package/dist/assets/init-BXPE0p7i.js +1 -0
  283. package/dist/assets/invite-memory-BKdqfr5K.js +1 -0
  284. package/dist/assets/ishikawaDiagram-K3B6WC7H-D5Z3rmaA.js +70 -0
  285. package/dist/assets/issue-detail-CZfjXs0M.js +119 -0
  286. package/dist/assets/javascript-Cblpdx44.js +1 -0
  287. package/dist/assets/journeyDiagram-COXZFDF6-CEkwEYdR.js +139 -0
  288. package/dist/assets/julia-KVJvUu_F.js +1 -0
  289. package/dist/assets/kanban-definition-P3RFRI5V-8h_R6Qjq.js +89 -0
  290. package/dist/assets/katex-Du_FPwxl.js +257 -0
  291. package/dist/assets/line-Ljt_vfsb.js +1 -0
  292. package/dist/assets/linear-BRQgexd0.js +1 -0
  293. package/dist/assets/link-DvgFK0mz.js +1 -0
  294. package/dist/assets/list-filter-BR4_dvwm.js +1 -0
  295. package/dist/assets/livescript-DSHsJPcD.js +1 -0
  296. package/dist/assets/log-in-Dvx9-FMC.js +1 -0
  297. package/dist/assets/lua-Vher-70I.js +1 -0
  298. package/dist/assets/mathematica-CE9SaVsW.js +1 -0
  299. package/dist/assets/mbox-JGl1Fgvq.js +1 -0
  300. package/dist/assets/mcpSkills-76szK_k1.js +1 -0
  301. package/dist/assets/mermaid-parser.core-BjFu937m.js +7 -0
  302. package/dist/assets/mermaid.core-B0t95EIS.js +42 -0
  303. package/dist/assets/mindmap-definition-LZFPQGKD-TVnHYUR4.js +96 -0
  304. package/dist/assets/mirc-BGWbO906.js +1 -0
  305. package/dist/assets/mllike-DuNQsEw8.js +1 -0
  306. package/dist/assets/model-DL5biheO.js +1 -0
  307. package/dist/assets/modelica-5XCgKQt8.js +1 -0
  308. package/dist/assets/mscgen-mVFg19ri.js +1 -0
  309. package/dist/assets/mumps-C7oS353s.js +1 -0
  310. package/dist/assets/nginx-DXVlpyCz.js +1 -0
  311. package/dist/assets/nsis-KFC6hioG.js +1 -0
  312. package/dist/assets/ntriples-5ckCopnn.js +1 -0
  313. package/dist/assets/octave-D1J2QQNt.js +1 -0
  314. package/dist/assets/onboarding-state-C5_mIw3o.js +1 -0
  315. package/dist/assets/ordinal-BJyFM1v8.js +1 -0
  316. package/dist/assets/oz-CPsllMDD.js +1 -0
  317. package/dist/assets/packet-JDAUHWVQ-aNGiRWLy.js +1 -0
  318. package/dist/assets/palette-tokens-CL5ZDrEd.js +1 -0
  319. package/dist/assets/pascal-B-I6JP0Y.js +1 -0
  320. package/dist/assets/path-D6mommQw.js +1 -0
  321. package/dist/assets/pegDiagram-BGZESJAR-DDadxqWQ.js +1 -0
  322. package/dist/assets/perl-CI8WIWBi.js +1 -0
  323. package/dist/assets/pie-XZMESJXO-CydFP1hd.js +1 -0
  324. package/dist/assets/pieDiagram-CAPJLFHJ-KhdUDwDS.js +39 -0
  325. package/dist/assets/pig-FQI0W3S3.js +1 -0
  326. package/dist/assets/portable-files-CloN_vbk.js +1 -0
  327. package/dist/assets/power-sYV-WuqQ.js +1 -0
  328. package/dist/assets/powershell-BAu6x78A.js +1 -0
  329. package/dist/assets/prod-C6Q7tISe.js +495 -0
  330. package/dist/assets/profile-summary-D4LPX-Dv.js +1 -0
  331. package/dist/assets/properties-BKTTDgau.js +1 -0
  332. package/dist/assets/protobuf-UWh8gh_j.js +1 -0
  333. package/dist/assets/pug-C20tNwmy.js +1 -0
  334. package/dist/assets/puppet-BAHVzCkO.js +1 -0
  335. package/dist/assets/python-C2DOnsac.js +1 -0
  336. package/dist/assets/q-Cooe-Nh8.js +1 -0
  337. package/dist/assets/quadrantDiagram-GDMTTRAM-B1X8K2Fs.js +7 -0
  338. package/dist/assets/r-CktBKya9.js +1 -0
  339. package/dist/assets/radar-ABXABTNO-BqodkLpx.js +1 -0
  340. package/dist/assets/railroad-I3PHUGI6-HmRKXDJj.js +1 -0
  341. package/dist/assets/railroad-abnf-LNEFI6M7-CkBttaHp.js +1 -0
  342. package/dist/assets/railroad-ebnf-DWYD2UWJ-C6DBawFA.js +1 -0
  343. package/dist/assets/railroad-peg-JR7BVNR7-Z9df3u5o.js +1 -0
  344. package/dist/assets/railroadDiagram-SM67HX2B-2vDUUppL.js +1 -0
  345. package/dist/assets/requirementDiagram-X7JNWC4A-DAuP39Hc.js +84 -0
  346. package/dist/assets/rolldown-runtime-DhZMWcEn.js +1 -0
  347. package/dist/assets/rough.esm-DnC5Tr1g.js +1 -0
  348. package/dist/assets/rpm-Csj9nLHl.js +1 -0
  349. package/dist/assets/ruby-bGx9eo-K.js +1 -0
  350. package/dist/assets/runtime-IAg0vdY9.js +4137 -0
  351. package/dist/assets/sankeyDiagram-UM26HJRW-ByS54QZK.js +40 -0
  352. package/dist/assets/sas-Drou_EQ9.js +1 -0
  353. package/dist/assets/saved-permissions-CPiYtxkZ.js +1 -0
  354. package/dist/assets/scheme-DcjG9bAf.js +1 -0
  355. package/dist/assets/scroll-text-CVSt6aO2.js +1 -0
  356. package/dist/assets/sdk-vrG4HtB4.js +1 -0
  357. package/dist/assets/search-CG-QtPVH.js +1 -0
  358. package/dist/assets/send-CH-0xdLm.js +1 -0
  359. package/dist/assets/sequenceDiagram-ZO4K6R2Y-DvWxKTLK.js +169 -0
  360. package/dist/assets/shared-D37zfckm.js +1 -0
  361. package/dist/assets/shell-BSKClwid.js +1 -0
  362. package/dist/assets/sieve-CcvsXPZo.js +1 -0
  363. package/dist/assets/simple-mode-B79cVo-x.js +1 -0
  364. package/dist/assets/sizeCapture-INFHLROL-XURNLuv_.js +1 -0
  365. package/dist/assets/skill-source-connect-return-eFTeuj7y.js +1 -0
  366. package/dist/assets/smalltalk-Cmg-4mjQ.js +1 -0
  367. package/dist/assets/smoke-lab-matrix-C5gR81E3.js +1 -0
  368. package/dist/assets/solr-Dj8ahEwG.js +1 -0
  369. package/dist/assets/sparql-LAJYmgfk.js +1 -0
  370. package/dist/assets/spreadsheet-B8doD_pL.js +1 -0
  371. package/dist/assets/sql-C3kWxFGw.js +1 -0
  372. package/dist/assets/src-DYjgETqR.js +1 -0
  373. package/dist/assets/stateDiagram-v2-TBUQTH76-DtiiZIXq.js +291 -0
  374. package/dist/assets/stex-CW6K5Nmu.js +1 -0
  375. package/dist/assets/stylus-BS-Ienrc.js +1 -0
  376. package/dist/assets/swift-BD82LMDK.js +1 -0
  377. package/dist/assets/swimlanes-N4OXWK64-BWSEtCbX.js +1 -0
  378. package/dist/assets/swimlanesDiagram-K3J5GTZL-Bl_9DvHU.js +8 -0
  379. package/dist/assets/tcl-RZa1cqc-.js +1 -0
  380. package/dist/assets/textile-C-BY_OGF.js +1 -0
  381. package/dist/assets/tiddlywiki-C9bm_Oju.js +1 -0
  382. package/dist/assets/tiki-DJOT-rFT.js +1 -0
  383. package/dist/assets/timeline-definition-YOQAKGHF-U4QcniMh.js +120 -0
  384. package/dist/assets/toml-Civ2fTsu.js +1 -0
  385. package/dist/assets/treeView-D4JQ5SDB-B2tdrtsj.js +1 -0
  386. package/dist/assets/treemap-SAJKECNS-DodN8j4n.js +1 -0
  387. package/dist/assets/troff-Lns35Xcq.js +1 -0
  388. package/dist/assets/ttcn-7vlxVTUK.js +1 -0
  389. package/dist/assets/ttcn-cfg-B8qhhp6o.js +1 -0
  390. package/dist/assets/turtle-DTIS1YQ7.js +1 -0
  391. package/dist/assets/useAgentlessOnboardingAutoOpen-DSWW7Juw.js +1 -0
  392. package/dist/assets/useAuthorizationWindow-tg3aKEU7.js +1 -0
  393. package/dist/assets/useDateRange-CnZQr2KO.js +1 -0
  394. package/dist/assets/useFastResponsesEnabled-B8tHSJ1y.js +1 -0
  395. package/dist/assets/usePageView-CtFMs34g.js +1 -0
  396. package/dist/assets/useProfilesData-CWHdMSuL.js +1 -0
  397. package/dist/assets/useReviewCount-W_bCZ2Hz.js +1 -0
  398. package/dist/assets/useRoutineFormOptions-CCLMmVSF.js +3 -0
  399. package/dist/assets/useSummaryDraftStream-NVNYNt72.js +3 -0
  400. package/dist/assets/useTailscaleConnections-Dy52nCY3.js +1 -0
  401. package/dist/assets/usecaseDiagram-VIAY4XPW-kEHhqgOj.js +362 -0
  402. package/dist/assets/vb-BO8UacKu.js +1 -0
  403. package/dist/assets/vbscript-DWLru3lT.js +1 -0
  404. package/dist/assets/velocity-BIIn-Nl2.js +1 -0
  405. package/dist/assets/vennDiagram-BLWOH2XV-NPJU0aCU.js +34 -0
  406. package/dist/assets/verilog-BVYlmXGg.js +1 -0
  407. package/dist/assets/vhdl-Cn8cC8Yb.js +1 -0
  408. package/dist/assets/wardley-7MLQ67FV-bUGKvIPT.js +1 -0
  409. package/dist/assets/wardleyDiagram-YMQ3BMBF-qtUDHfhb.js +78 -0
  410. package/dist/assets/webidl-ChvzbZ5-.js +1 -0
  411. package/dist/assets/xquery-BKN7qEbU.js +1 -0
  412. package/dist/assets/xychartDiagram-TAQBALBS-C-z57aZj.js +7 -0
  413. package/dist/assets/yacas-BG9ha7tU.js +1 -0
  414. package/dist/assets/z80-CB2cGLew.js +1 -0
  415. package/dist/brands/adapters/LICENSE +21 -0
  416. package/dist/brands/adapters/README.md +7 -0
  417. package/dist/brands/adapters/cursor-dark.svg +1 -0
  418. package/dist/brands/adapters/cursor.svg +1 -0
  419. package/dist/brands/adapters/gemini-color.svg +1 -0
  420. package/dist/brands/adapters/grok-dark.svg +1 -0
  421. package/dist/brands/adapters/grok.svg +1 -0
  422. package/dist/brands/adapters/hermesagent-dark.svg +1 -0
  423. package/dist/brands/adapters/hermesagent.svg +1 -0
  424. package/dist/brands/adapters/kimi-color-light.svg +1 -0
  425. package/dist/brands/adapters/kimi-color.svg +1 -0
  426. package/dist/brands/adapters/openai-dot.README.md +7 -0
  427. package/dist/brands/adapters/openai-dot.svg +3 -0
  428. package/dist/brands/adapters/pi-dark.svg +1 -0
  429. package/dist/brands/adapters/pi.svg +1 -0
  430. package/dist/brands/apps/1password-dark.svg +1 -0
  431. package/dist/brands/apps/1password.svg +1 -0
  432. package/dist/brands/apps/LOBE-LICENSE +21 -0
  433. package/dist/brands/apps/agentmail-dark.svg +16 -0
  434. package/dist/brands/apps/agentmail.svg +17 -0
  435. package/dist/brands/apps/airtable.svg +1 -0
  436. package/dist/brands/apps/anthropic-dark.svg +1 -0
  437. package/dist/brands/apps/anthropic.svg +1 -0
  438. package/dist/brands/apps/antigravity.svg +31 -0
  439. package/dist/brands/apps/api-key-generic.svg +1 -0
  440. package/dist/brands/apps/arcade.png +0 -0
  441. package/dist/brands/apps/asana.svg +12 -0
  442. package/dist/brands/apps/aws-dark.svg +1 -0
  443. package/dist/brands/apps/aws.svg +1 -0
  444. package/dist/brands/apps/bedrock.svg +1 -0
  445. package/dist/brands/apps/beehiiv.png +0 -0
  446. package/dist/brands/apps/bitly.svg +1 -0
  447. package/dist/brands/apps/box.svg +1 -0
  448. package/dist/brands/apps/braintrust-dark.png +0 -0
  449. package/dist/brands/apps/braintrust.png +0 -0
  450. package/dist/brands/apps/brex-dark.svg +1 -0
  451. package/dist/brands/apps/brex.svg +1 -0
  452. package/dist/brands/apps/browser-use.svg +6 -0
  453. package/dist/brands/apps/calendly.png +0 -0
  454. package/dist/brands/apps/candid.png +0 -0
  455. package/dist/brands/apps/circleback.png +0 -0
  456. package/dist/brands/apps/clickhouse-dark.svg +1 -0
  457. package/dist/brands/apps/clickhouse.svg +1 -0
  458. package/dist/brands/apps/clickup.png +0 -0
  459. package/dist/brands/apps/cloudflare.svg +1 -0
  460. package/dist/brands/apps/cloudinary-dark.svg +1 -0
  461. package/dist/brands/apps/cloudinary.svg +3 -0
  462. package/dist/brands/apps/coda.svg +1 -0
  463. package/dist/brands/apps/cognee.png +0 -0
  464. package/dist/brands/apps/composio-dark.svg +11 -0
  465. package/dist/brands/apps/composio.svg +16 -0
  466. package/dist/brands/apps/connection-pool.svg +1 -0
  467. package/dist/brands/apps/context7-dark.svg +8 -0
  468. package/dist/brands/apps/context7.svg +8 -0
  469. package/dist/brands/apps/daytona-dark.svg +1 -0
  470. package/dist/brands/apps/daytona.svg +1 -0
  471. package/dist/brands/apps/discord-dark.svg +1 -0
  472. package/dist/brands/apps/discord.svg +1 -0
  473. package/dist/brands/apps/ditto.png +0 -0
  474. package/dist/brands/apps/egnyte.svg +1 -0
  475. package/dist/brands/apps/embat.svg +1 -0
  476. package/dist/brands/apps/enterpret.png +0 -0
  477. package/dist/brands/apps/exa.svg +5 -0
  478. package/dist/brands/apps/executor.png +0 -0
  479. package/dist/brands/apps/firecrawl.svg +12 -0
  480. package/dist/brands/apps/fireflies.svg +76 -0
  481. package/dist/brands/apps/gauge.png +0 -0
  482. package/dist/brands/apps/github-copilot-dark.svg +1 -0
  483. package/dist/brands/apps/github-copilot.svg +1 -0
  484. package/dist/brands/apps/github-dark.svg +10 -0
  485. package/dist/brands/apps/github.svg +10 -0
  486. package/dist/brands/apps/gmail.svg +1 -0
  487. package/dist/brands/apps/google-calendar.svg +1 -0
  488. package/dist/brands/apps/google-chat.svg +1 -0
  489. package/dist/brands/apps/google-docs.svg +1 -0
  490. package/dist/brands/apps/google-drive.svg +1 -0
  491. package/dist/brands/apps/google-people.svg +1 -0
  492. package/dist/brands/apps/google-sheets.svg +1 -0
  493. package/dist/brands/apps/google-slides.svg +1 -0
  494. package/dist/brands/apps/google-workspace-search.svg +1 -0
  495. package/dist/brands/apps/google.svg +1 -0
  496. package/dist/brands/apps/gsc-wizard.png +0 -0
  497. package/dist/brands/apps/honcho.svg +33 -0
  498. package/dist/brands/apps/hugging-face.svg +8 -0
  499. package/dist/brands/apps/imessage-photon.png +0 -0
  500. package/dist/brands/apps/jam-dev-dark.svg +1 -0
  501. package/dist/brands/apps/jam-dev.svg +1 -0
  502. package/dist/brands/apps/jira-dark.svg +1 -0
  503. package/dist/brands/apps/jira.svg +4 -0
  504. package/dist/brands/apps/kernel.svg +3 -0
  505. package/dist/brands/apps/klaviyo.png +0 -0
  506. package/dist/brands/apps/linear-dark.svg +5 -0
  507. package/dist/brands/apps/linear.svg +5 -0
  508. package/dist/brands/apps/local-falcon.png +0 -0
  509. package/dist/brands/apps/make-dark.svg +1 -0
  510. package/dist/brands/apps/make.svg +1 -0
  511. package/dist/brands/apps/manifest.json +756 -0
  512. package/dist/brands/apps/manufact-dark.svg +6 -0
  513. package/dist/brands/apps/manufact.svg +5 -0
  514. package/dist/brands/apps/mem0.svg +1 -0
  515. package/dist/brands/apps/microsoft-teams.svg +68 -0
  516. package/dist/brands/apps/miro-dark.svg +1 -0
  517. package/dist/brands/apps/miro.svg +4 -0
  518. package/dist/brands/apps/mixpanel-dark.svg +1 -0
  519. package/dist/brands/apps/mixpanel.svg +1 -0
  520. package/dist/brands/apps/monday-dark.png +0 -0
  521. package/dist/brands/apps/monday.png +0 -0
  522. package/dist/brands/apps/neon.png +0 -0
  523. package/dist/brands/apps/netlify-dark.svg +1 -0
  524. package/dist/brands/apps/netlify.svg +16 -0
  525. package/dist/brands/apps/notion-dark.svg +1 -0
  526. package/dist/brands/apps/notion.svg +1 -0
  527. package/dist/brands/apps/oauth-generic.svg +1 -0
  528. package/dist/brands/apps/openai-dark.svg +1 -0
  529. package/dist/brands/apps/openai.svg +1 -0
  530. package/dist/brands/apps/openrouter-dark.svg +3 -0
  531. package/dist/brands/apps/openrouter.svg +3 -0
  532. package/dist/brands/apps/oreilly.svg +1 -0
  533. package/dist/brands/apps/pagerduty.svg +4 -0
  534. package/dist/brands/apps/paperclip-notebook-dark.svg +1 -0
  535. package/dist/brands/apps/paperclip-notebook.svg +1 -0
  536. package/dist/brands/apps/parallel-dark.svg +11 -0
  537. package/dist/brands/apps/parallel.svg +11 -0
  538. package/dist/brands/apps/planetscale-dark.svg +1 -0
  539. package/dist/brands/apps/planetscale.svg +1 -0
  540. package/dist/brands/apps/posthog-dark.svg +1 -0
  541. package/dist/brands/apps/posthog.svg +1 -0
  542. package/dist/brands/apps/postman.svg +1 -0
  543. package/dist/brands/apps/railway-dark.svg +1 -0
  544. package/dist/brands/apps/railway.svg +1 -0
  545. package/dist/brands/apps/razorpay-dark.svg +1 -0
  546. package/dist/brands/apps/razorpay.svg +1 -0
  547. package/dist/brands/apps/resend-dark.svg +1 -0
  548. package/dist/brands/apps/resend.svg +1 -0
  549. package/dist/brands/apps/sanity-dark.svg +1 -0
  550. package/dist/brands/apps/sanity.svg +1 -0
  551. package/dist/brands/apps/sentry-dark.svg +1 -0
  552. package/dist/brands/apps/sentry.svg +1 -0
  553. package/dist/brands/apps/shopify.svg +24 -0
  554. package/dist/brands/apps/similarweb-dark.svg +1 -0
  555. package/dist/brands/apps/similarweb.svg +1 -0
  556. package/dist/brands/apps/slack.png +0 -0
  557. package/dist/brands/apps/slack.svg +17 -0
  558. package/dist/brands/apps/speko.svg +16 -0
  559. package/dist/brands/apps/stripe.svg +11 -0
  560. package/dist/brands/apps/supabase.svg +15 -0
  561. package/dist/brands/apps/superagent.png +0 -0
  562. package/dist/brands/apps/supermemory.png +0 -0
  563. package/dist/brands/apps/tailscale.png +0 -0
  564. package/dist/brands/apps/tavily.png +0 -0
  565. package/dist/brands/apps/telegram.svg +12 -0
  566. package/dist/brands/apps/telem-dark.svg +9 -0
  567. package/dist/brands/apps/telem.svg +9 -0
  568. package/dist/brands/apps/ticket-tailor-dark.svg +1 -0
  569. package/dist/brands/apps/ticket-tailor.svg +1 -0
  570. package/dist/brands/apps/ticktick.svg +1 -0
  571. package/dist/brands/apps/todoist.svg +1 -0
  572. package/dist/brands/apps/unikraft.svg +1 -0
  573. package/dist/brands/apps/vercel-dark.svg +1 -0
  574. package/dist/brands/apps/vercel.svg +1 -0
  575. package/dist/brands/apps/webflow.svg +1 -0
  576. package/dist/brands/apps/windsor-ai.png +0 -0
  577. package/dist/brands/apps/wix-dark.svg +12 -0
  578. package/dist/brands/apps/wix.svg +12 -0
  579. package/dist/brands/apps/xai-dark.svg +1 -0
  580. package/dist/brands/apps/xai.svg +1 -0
  581. package/dist/brands/apps/xero.svg +1 -0
  582. package/dist/brands/apps/youcom-dark.svg +13 -0
  583. package/dist/brands/apps/youcom.svg +13 -0
  584. package/dist/brands/apps/zapier.svg +1 -0
  585. package/dist/brands/apps/zep.png +0 -0
  586. package/dist/brands/claude-color.svg +17 -0
  587. package/dist/brands/codex-color.svg +17 -0
  588. package/dist/brands/opencode-logo-dark-square.svg +18 -0
  589. package/dist/brands/opencode-logo-light-square.svg +18 -0
  590. package/dist/favicon-16x16.png +0 -0
  591. package/dist/favicon-32x32.png +0 -0
  592. package/dist/favicon.ico +0 -0
  593. package/dist/favicon.svg +7 -0
  594. package/dist/fonts/InterVariable-Italic.woff2 +0 -0
  595. package/dist/fonts/InterVariable.woff2 +0 -0
  596. package/dist/fonts/NOTICE.md +30 -0
  597. package/dist/fonts/PaperMono-OFL.txt +93 -0
  598. package/dist/fonts/PaperMono-Variable.woff2 +0 -0
  599. package/dist/index.html +165 -0
  600. package/dist/microvac-push-sw.js +37 -0
  601. package/dist/paperclip-thinking.svg +17 -0
  602. package/dist/site.webmanifest +30 -0
  603. package/dist/storybook/grok-comparison.csv +4 -0
  604. package/dist/sw.js +176 -0
  605. package/dist/worktree-favicon-16x16.png +0 -0
  606. package/dist/worktree-favicon-32x32.png +0 -0
  607. package/dist/worktree-favicon.ico +0 -0
  608. package/dist/worktree-favicon.svg +9 -0
  609. package/package.json +20 -4
@@ -0,0 +1,10 @@
1
+ var Pr=Object.defineProperty;var n=(t,l)=>Pr(t,"name",{value:l,configurable:!0});import{a as $n}from"./rolldown-runtime-DhZMWcEn.js";import{R as Er,di as $r,mi as qr,vi as Rr}from"./issue-detail-CZfjXs0M.js";import{x as zr}from"./collections-B58p51lw.js";import{a as _r,c as Ur,d as qn,f as Kt,i as Or,l as Qr,n as Vr,o as Hr,r as Gr,t as Wr,u as Ls}from"./SkillFolderTree-Cv0CmfYx.js";import{$A as Yr,$S as _t,$w as Xr,AC as Zr,AT as yn,BC as Rn,Cw as Jr,Ev as Vs,Fu as ea,GS as j,Gb as Ke,Gw as Ut,HC as ct,H_ as se,Hm as sa,IT as Te,Iw as ta,Kw as na,LC as It,LS as ra,ME as aa,MT as zn,Mi as Os,NC as la,NE as N,Nw as ia,QC as oa,Qw as da,Sp as ca,To as Ot,Wm as z,Ww as Qt,XC as _n,YC as ua,Yb as ma,Yw as Vt,ZC as At,__ as Oe,_v as os,aE as xa,ab as Un,bE as X,bp as On,bv as Hs,cT as Qn,cv as ha,di as pa,dy as Mt,fy as Ts,gC as ga,g_ as Pt,hC as Vn,hE as G,hv as Gs,hw as fa,iC as ba,iD as ja,ib as va,jT as Bs,jb as kn,ji as Hn,kT as Gn,ki as Wn,lT as Yn,ly as Ks,my as As,nT as ya,nj as ka,oE as Na,o_ as wa,on as cs,pb as Be,pv as Ws,qC as Et,rT as $t,rb as lt,sC as Sa,sy as Ms,tT as Ds,tl as Ca,ub as Qs,ui as Ia,uy as Ys,vT as Fa,vb as Qe,x as qt,xC as Xn,xE as de,xb as Ve,xv as Da,xw as La,yb as He,yl as Ta,yv as Rt,zE as A}from"./index-BJtnP7H1.js";import{t as Zn}from"./company-skill-summary-DnWVmP1S.js";import{a as it,c as Ba,i as Ka,l as Jn,n as Aa,o as Ft,r as Dt,t as Ht}from"./SkillCardIcon-Cp_hws0N.js";import{t as Ma}from"./SkillBinaryFile-DDkhLlfC.js";import{_ as Pa,a as Ea,b as ds,c as $a,d as qa,g as Ra,i as za,l as _a,m as Ua,n as Oa,p as Qa,r as Va,s as Ha,t as Ga,u as Wa,v as er,x as ye,y as Nn}from"./FolderControls-CmnB7Ap-.js";import{a as zt,i as Lt,n as Ya,o as Xa,r as Ps,t as Za}from"./company-skill-routes-D5LJ1l8M.js";import{t as Ja}from"./SkillsNavigationTabs-DRwMP1eu.js";var e=$n(Yr(),1),wn={agents:"Most agents",stars:"Most stars",forks:"Most forks",recent:"Recently updated",alphabetical:"Alphabetical"},el=["agents","stars","forks","recent","alphabetical"];function sl({viewTitle:t,viewDescription:l,searchLabel:o,search:i,onSearchChange:x,sort:h,onSortChange:r,availableSources:c,sourceBadgeFilter:a,setSourceBadgeFilter:S,onScan:k,scanPending:C,onCreate:v,onBrowseDiscover:w,onImport:K,onImportFromProject:y,folderControl:_,onCreateFolder:b,selectMode:I,onToggleSelectMode:te,navigation:Z}){return(0,e.jsxs)("div",{"data-canonical-toolbar":"skills",role:"toolbar","aria-label":"Skills controls",className:"flex flex-wrap items-center gap-2 border-b border-border px-4 py-3",children:[(0,e.jsxs)("div",{className:"w-full",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold text-foreground",children:t}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:l})]}),(0,e.jsx)(zr,{query:i,onQueryChange:x,label:o,placeholder:`${o}…`}),(0,e.jsxs)(Ws,{children:[(0,e.jsx)(Vs,{asChild:!0,children:(0,e.jsxs)(N,{variant:"outline",size:"sm",children:[(0,e.jsx)("span",{className:"text-muted-foreground",children:"Sort"}),(0,e.jsx)("span",{children:wn[h]}),(0,e.jsx)(Bs,{className:"ml-1 h-3.5 w-3.5"})]})}),(0,e.jsx)(Gs,{align:"end",children:(0,e.jsx)(Rt,{value:h,onValueChange:n(P=>r(P),"onValueChange"),children:el.map(P=>(0,e.jsx)(Hs,{value:P,children:wn[P]},P))})})]}),c.length>1?(0,e.jsxs)(Ws,{children:[(0,e.jsx)(Vs,{asChild:!0,children:(0,e.jsxs)(N,{variant:"outline",size:"sm",children:[(0,e.jsx)("span",{className:"text-muted-foreground",children:"Source"}),(0,e.jsx)("span",{children:a==="all"?"All":c.find(P=>P.value===a)?.label??"All"}),(0,e.jsx)(Bs,{className:"ml-1 h-3.5 w-3.5"})]})}),(0,e.jsx)(Gs,{align:"end",children:(0,e.jsxs)(Rt,{value:a,onValueChange:S,children:[(0,e.jsx)(Hs,{value:"all",children:"All sources"}),c.map(P=>(0,e.jsx)(Hs,{value:P.value,children:P.label},P.value))]})})]}):null,(0,e.jsx)(N,{variant:"ghost",size:"icon-sm",onClick:n(()=>k(),"onClick"),disabled:C,"aria-label":"Scan project workspaces for skills",title:"Scan project workspaces for skills",children:(0,e.jsx)(ct,{className:A("h-4 w-4",C&&"animate-spin")})}),_,b?(0,e.jsxs)(N,{variant:"outline",size:"sm",onClick:b,children:[(0,e.jsx)(Et,{className:"mr-1 h-3.5 w-3.5"}),"New folder"]}):null,te?(0,e.jsx)(N,{variant:"outline",size:"sm","aria-pressed":I,onClick:te,children:I?"Done":"Select"}):null,(0,e.jsxs)(Ws,{children:[(0,e.jsx)(Vs,{asChild:!0,children:(0,e.jsxs)(N,{size:"sm",variant:"default","data-toolbar-primary":!0,children:[(0,e.jsx)(Et,{className:"mr-1 h-3.5 w-3.5"}),"New",(0,e.jsx)(Bs,{className:"ml-1 h-3.5 w-3.5"})]})}),(0,e.jsxs)(Gs,{align:"end",children:[(0,e.jsxs)(os,{onSelect:v,children:[(0,e.jsx)(_n,{className:"mr-2 h-4 w-4"}),"Create new skill"]}),(0,e.jsxs)(os,{onSelect:w,children:[(0,e.jsx)(Yn,{className:"mr-2 h-4 w-4"}),"Discover skills"]}),(0,e.jsx)(os,{asChild:!0,children:(0,e.jsxs)(Ke,{to:"/skills/sources/new",children:[(0,e.jsx)(Ot,{className:"mr-2 h-4 w-4"}),"Import from GitHub"]})}),(0,e.jsx)(os,{asChild:!0,children:(0,e.jsx)(Ke,{to:"/skills/sources",children:"Manage sources"})}),(0,e.jsxs)(os,{onSelect:K,children:[(0,e.jsx)(ta,{className:"mr-2 h-4 w-4"}),"Import from path or URL"]}),(0,e.jsxs)(os,{onSelect:y,children:[(0,e.jsx)(qr,{className:"mr-2 h-4 w-4"}),"Import skills from project"]})]})]}),Z?(0,e.jsx)("div",{className:"w-full",children:Z}):null]})}n(sl,"SkillsToolbar");function tl(t,l,o,i=[t]){if(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(o))return o;const x=l==="SKILL.md"&&t.sourceType==="github"&&t.metadata?.packageMode==="repository"&&typeof t.metadata.skillSourcePath=="string"?`.paperclip-repository/${t.metadata.skillSourcePath}`:l;try{const h=new URL(o,`https://skill.invalid/${x.split("/").map(encodeURIComponent).join("/")}`),r=decodeURIComponent(h.pathname.slice(1));return t.fileInventory.some(c=>c.path===r)?`${Ps(t,i,r)}${h.search}${h.hash}`:null}catch{return null}}n(tl,"skillFileLinkHref");var m=$n(ka(),1),Sn=16,Cn=24,In="min-h-9";function Fn(t){return(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...t,children:(0,e.jsx)("path",{d:"M12 4 21 19H3z"})})}n(Fn,"VercelMark");function sr(t){const l=t.replace(/\r\n/g,`
2
+ `);if(!l.startsWith(`---
3
+ `))return l.trim();const o=l.indexOf(`
4
+ ---
5
+ `,4);return o<0?l.trim():l.slice(o+5).trim()}n(sr,"stripFrontmatter");function ot(t){const l=t.replace(/\r\n/g,`
6
+ `);if(!l.startsWith(`---
7
+ `))return{frontmatter:null,body:l};const o=l.indexOf(`
8
+ ---
9
+ `,4);return o<0?{frontmatter:null,body:l}:{frontmatter:l.slice(4,o).trim(),body:l.slice(o+5).trimStart()}}n(ot,"splitFrontmatter");function nl(t,l){const o=ot(t);return o.frontmatter?["---",o.frontmatter,"---","",l].join(`
10
+ `):l}n(nl,"mergeFrontmatter");function tr(t){const l={name:"",path:null,kind:"dir",children:[]};for(const i of t){const x=i.path.split("/").filter(Boolean);let h=l,r="";for(const[c,a]of x.entries()){r=r?`${r}/${a}`:a;const S=c===x.length-1;let k=h.children.find(C=>C.name===a);k||(k={name:a,path:S?i.path:r,kind:S?"file":"dir",fileKind:S?i.kind:void 0,children:[]},h.children.push(k)),h=k}}function o(i){i.children.sort((x,h)=>x.kind!==h.kind?x.kind==="dir"?-1:1:x.name==="SKILL.md"?-1:h.name==="SKILL.md"?1:x.name.localeCompare(h.name)),i.children.forEach(o)}return n(o,"sortNode"),o(l),l.children}n(tr,"buildTree");function Gt(t,l){const o=l?.toLowerCase()??"",i=o.includes("skills.sh")||o.includes("vercel-labs/skills");switch(t){case"skills_sh":return{icon:Fn,label:l??"skills.sh",managedLabel:"skills.sh managed"};case"github":return i?{icon:Fn,label:l??"skills.sh",managedLabel:"skills.sh managed"}:{icon:Ot,label:l??"GitHub",managedLabel:"GitHub managed"};case"url":return{icon:La,label:l??"URL",managedLabel:"URL managed"};case"local":return{icon:Qt,label:l??"Folder",managedLabel:"Folder managed"};case"paperclip":return{icon:oa,label:l??"Microvac",managedLabel:"Microvac managed"};default:return{icon:Te,label:l??"Catalog",managedLabel:"Catalog managed"}}}n(Gt,"sourceMeta");function dt(t){return t?t.slice(0,7):null}n(dt,"shortRef");function rl(t){const l=[`${t.discovered} found`,`${t.imported.length} imported`,`${t.updated.length} updated`];return t.conflicts.length>0&&l.push(`${t.conflicts.length} conflicts`),t.skipped.length>0&&l.push(`${t.skipped.length} skipped`),`${l.join(", ")} across ${t.scannedWorkspaces} workspace${t.scannedWorkspaces===1?"":"s"}.`}n(rl,"formatProjectScanSummary");function al(t){return t==="script"||t==="reference"?da:Vt}n(al,"fileIcon");function Dn(t){const l=t.split("/").filter(Boolean),o=[];for(let i=0;i<l.length-1;i+=1)o.push(l.slice(0,i+1).join("/"));return o}n(Dn,"parentDirectoryPaths");function Ln(t,l){if(!t||typeof t!="object")return null;const o=t[l];if(typeof o!="string")return null;const i=o.trim();return i.length>0?i:null}n(Ln,"readonlyMetadataValue");function ll(t){const l=Ln(t,"sourceKind")??Ln(t,"catalogKind");return l==="bundled"?"bundled":l==="optional"?"optional":null}n(ll,"readonlyMetadataKind");function il(t){if(t.sourceBadge==="paperclip"||t.sourceType==="local_path"&&!t.sourceBadge.toString().includes("github"))return"company";if(t.sourceType==="catalog"||t.sourceBadge==="catalog"){const l=t.catalogKind??ll(t.metadata);return l==="bundled"?"bundled":l==="optional"?"optional":"company"}return t.sourceBadge==="github"||t.sourceBadge==="skills_sh"||t.sourceBadge==="url"||t.sourceBadge==="local"?"external":"company"}n(il,"classifySource");function nr({level:t}){const l={markdown_only:{icon:Zr,label:"Markdown only",tooltip:"Text only — no scripts, no binaries, no assets.",className:"border-border bg-muted/40 text-muted-foreground"},assets:{icon:Qt,label:"Includes assets",tooltip:"Ships images, fonts, or other non-script files.",className:"border-cyan-500/30 bg-cyan-500/10 text-cyan-800 dark:text-cyan-200"},scripts_executables:{icon:Vn,label:"Includes scripts",tooltip:"Ships executable scripts. Review before installing.",className:"border-amber-500/40 bg-amber-500/10 text-amber-800 dark:text-amber-200"}},o=l[t]??l.markdown_only,i=o.icon;return(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ve,{asChild:!0,children:(0,e.jsxs)(se,{variant:"outline",className:A("text-(length:--text-micro)",o.className),children:[(0,e.jsx)(i,{className:"h-3 w-3","aria-hidden":"true"}),o.label]})}),(0,e.jsx)(He,{children:o.tooltip})]})}n(nr,"TrustChip");function rr({compatibility:t}){if(t==="compatible")return null;const l={unknown:{icon:Fa,label:"Unknown format",tooltip:"Microvac could not validate this skill as Agent Skills markdown. Install at your own risk.",className:"border-yellow-500/40 bg-yellow-500/10 text-yellow-800 dark:text-yellow-200"},invalid:{icon:$r,label:"Invalid",tooltip:"This skill cannot be installed — content is not valid Agent Skills markdown.",className:"border-destructive/40 bg-destructive/10 text-destructive"}}[t],o=l.icon;return(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ve,{asChild:!0,children:(0,e.jsxs)(se,{variant:"outline",className:A("text-(length:--text-micro)",l.className),children:[(0,e.jsx)(o,{className:"h-3 w-3","aria-hidden":"true"}),l.label]})}),(0,e.jsx)(He,{children:l.tooltip})]})}n(rr,"CompatChip");function ol({packageName:t,packageVersion:l}){return t?(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ve,{asChild:!0,children:(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border bg-muted/30 px-1.5 py-0.5 font-mono text-(length:--text-nano) text-muted-foreground",children:[(0,e.jsx)(Te,{className:"h-3 w-3","aria-hidden":"true"}),(0,e.jsxs)("span",{children:[t,l?` v${l}`:""]})]})}),(0,e.jsx)(He,{children:"Installed from the app-shipped skills catalog. Provenance is signed by package version and content hash."})]}):null}n(ol,"ProvenanceBadge");function dl(t){return t<1024?`${t} B`:t<1048576?`${(t/1024).toFixed(1)} KB`:`${(t/1048576).toFixed(1)} MB`}n(dl,"formatBytes");function cl(t){return Ia(t)}n(cl,"resolveDiscoveryTab");function ul(t,l){return pa(t,l)}n(ul,"withDiscoveryTab");function ml(t,l){return[{label:"Skills",href:"/skills"},...(t.folderId?Qa(ds(l),t.folderId):[]).map((o,i)=>({label:i===0?Ra(o):o.name,href:`/skills?folder=${encodeURIComponent(o.id)}`})),{label:t.name}]}n(ml,"skillDetailBreadcrumbs");function Tn(t,l){return t.packageVersion?`v${t.packageVersion}`:l?"core":t.sourceRef?dt(t.sourceRef):null}n(Tn,"discoveryVersionLabel");function Bn(t){const l=[],o=new Set;for(const i of t){const x=i?.trim();!x||o.has(x)||(o.add(x),l.push(x))}return l}n(Bn,"uniqueCategories");function Kn(t){return[...t].sort().join(",")}n(Kn,"categorySetKey");function xl(t){return`${t.sharingScope==="private"?"Sharing: private":"Sharing: organization"} | ${t.categories.length?`Categories: ${t.categories.join(", ")}`:"Categories: none"}`}n(xl,"skillSettingsToastBody");function Tt(t){return t.trim().toLowerCase()}n(Tt,"discoveryCardIdentity");function hl(t,l){const o=new Map;for(const r of t){const c=Tt(r.key),a=o.get(c);(!a||new Date(r.updatedAt).getTime()>new Date(a.updatedAt).getTime())&&o.set(c,r)}const i=new Map;for(const r of l){const c=Tt(r.key);i.has(c)||i.set(c,r)}const x=[],h=new Set;for(const r of o.values()){const c=Tt(r.key);h.add(c);const a=i.get(c)??null,S=r.catalogKind==="bundled"||a?.kind==="bundled";x.push({key:r.key,skillId:r.id,folderId:r.folderId??null,catalogRef:a?a.id:null,name:r.name,slug:r.slug,author:r.authorName??r.sourceLabel??"you",version:Tn(r,S),tagline:r.tagline??null,description:r.description??null,categories:Bn([...r.categories??[],a?.category]),iconUrl:r.iconUrl,color:r.color,starCount:r.starCount??0,agentCount:r.attachedAgentCount??0,forkCount:r.forkCount??0,installed:!0,required:S,forkedFrom:!!r.forkedFromSkillId,updatedAt:new Date(r.updatedAt).getTime()||0,sourceBadge:r.sourceBadge,sourceLabel:r.sourceLabel,sourceKind:r.catalogKind??a?.kind??null})}for(const[r,c]of i){if(h.has(r))continue;const a=c.kind==="bundled";x.push({key:c.key,skillId:null,folderId:null,catalogRef:c.id,name:c.name,slug:c.slug,author:c.packageName??"Microvac",version:Tn({packageVersion:c.packageVersion??null,sourceRef:null},a),tagline:null,description:c.description,categories:Bn([c.category,...c.tags??[]]),iconUrl:null,color:null,starCount:0,agentCount:0,forkCount:0,installed:!1,required:a,forkedFrom:!1,updatedAt:0,sourceBadge:"catalog",sourceLabel:c.packageName??"Catalog",sourceKind:c.kind})}return x}n(hl,"buildDiscoveryCards");function An(t,l){return l==="installed"?t.filter(o=>o.installed):t}n(An,"cardsForTab");function pl(t,l,o){const i=n((x,h)=>x.name.localeCompare(h.name),"byName");return[...t].sort((x,h)=>{if(o&&x.required!==h.required)return x.required?1:-1;switch(l){case"stars":return h.starCount-x.starCount||i(x,h);case"forks":return h.forkCount-x.forkCount||i(x,h);case"recent":return h.updatedAt-x.updatedAt||i(x,h);case"alphabetical":return i(x,h);default:return h.agentCount-x.agentCount||i(x,h)}})}n(pl,"sortDiscoveryCards");function Mn(t,l){return l?[t.name,t.slug,t.author,t.tagline??"",t.description??"",t.categories.join(" ")].join(" ").toLowerCase().includes(l.toLowerCase()):!0}n(Mn,"discoveryMatchesSearch");function Pn({icon:t,value:l}){return(0,e.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,e.jsx)(t,{className:"h-3 w-3","aria-hidden":"true"}),l]})}n(Pn,"SkillStat");function ar({label:t}){return(0,e.jsx)(se,{variant:"outline",className:"border-border bg-muted/40 text-(length:--text-nano) capitalize text-muted-foreground",children:t})}n(ar,"SkillCategoryChip");function gl({card:t,folders:l,selected:o=!1,selectMode:i=!1,showFolderBadge:x=!1,onOpen:h,onSelectChange:r,onMove:c,onCreateFolderAndMove:a,onOpenMove:S}){const k=Gt(t.sourceBadge??"catalog",t.sourceLabel??null),C=k.icon,v=x&&t.installed?t.folderId?l?.find(y=>y.id===t.folderId)??null:null:void 0,w=t.folderId?l?.find(y=>y.id===t.folderId)??null:null,K=t.installed&&!t.required&&!(w&&Ua(w));return(0,e.jsxs)("div",{onClick:n(()=>h(t),"onClick"),onKeyDown:n(y=>{y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),h(t))},"onKeyDown"),role:"button",tabIndex:0,className:A("group flex h-full min-h-(--sz-11_5rem) flex-col rounded-lg border border-border bg-card p-4 text-left cursor-pointer transition-colors hover:border-foreground/20 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",t.required&&"bg-muted/30"),children:[(0,e.jsxs)("div",{className:"flex items-start gap-3",children:[i&&K?(0,e.jsx)("input",{type:"checkbox",className:"mt-1 h-4 w-4 rounded border-border",checked:o,"aria-label":`Select ${t.name}`,onClick:n(y=>y.stopPropagation(),"onClick"),onChange:n(y=>r?.(t,y.target.checked),"onChange")}):null,(0,e.jsx)(Ht,{card:t}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("div",{className:"truncate font-mono text-sm font-medium text-foreground",children:t.name}),(0,e.jsxs)("div",{className:"truncate text-xs text-muted-foreground",children:["by ",t.author,t.version?` · ${t.version}`:""]}),v!==void 0?(0,e.jsxs)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[(0,e.jsx)(Ha,{color:v?.color,className:"h-2 w-2"}),(0,e.jsx)("span",{className:"truncate",children:v?v.name:"Unfiled"})]}):null]}),K&&l&&c&&a?(0,e.jsxs)(Ws,{children:[(0,e.jsx)(Vs,{asChild:!0,children:(0,e.jsx)(N,{variant:"ghost",size:"icon-sm",className:"-mr-1 -mt-1 opacity-70 group-hover:opacity-100","aria-label":`More actions for ${t.name}`,onClick:n(y=>y.stopPropagation(),"onClick"),children:(0,e.jsx)(ya,{className:"h-4 w-4"})})}),(0,e.jsxs)(Gs,{align:"end",onClick:n(y=>y.stopPropagation(),"onClick"),children:[S?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(os,{onSelect:n(()=>S(t),"onSelect"),children:[(0,e.jsx)(qn,{className:"h-3.5 w-3.5"}),"Move to folder…"]}),(0,e.jsx)(Da,{})]}):null,(0,e.jsx)(_a,{folders:l,currentFolderId:t.folderId,onMove:n(y=>c(t,y),"onMove"),onCreateAndMove:n(()=>a(t),"onCreateAndMove")})]})]}):null]}),t.forkedFrom?(0,e.jsxs)("div",{className:"mt-2 inline-flex items-center gap-1 text-(length:--text-micro) text-muted-foreground",children:[(0,e.jsx)(Ls,{className:"h-3 w-3","aria-hidden":"true"}),"Forked"]}):null,(0,e.jsx)("p",{className:"mt-2 line-clamp-2 min-h-8 text-xs text-muted-foreground",children:Zn({tagline:t.tagline,description:t.description,key:t.key,name:t.name})??""}),(0,e.jsxs)("div",{className:"mt-auto pt-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 text-(length:--text-micro) text-muted-foreground",children:[(0,e.jsx)("span",{children:t.installed?t.agentCount>0?`Enabled for ${t.agentCount} ${t.agentCount===1?"agent":"agents"}`:"Not enabled for any agents":"Available to install"}),t.starCount>0?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,e.jsx)(Pn,{icon:Xn,value:String(t.starCount)})]}):null,t.forkCount>0?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,e.jsx)(Pn,{icon:Ls,value:String(t.forkCount)})]}):null]}),(0,e.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1",children:[t.installed?(0,e.jsx)(se,{variant:"secondary",className:"text-(length:--text-nano)",children:"Installed"}):null,(0,e.jsxs)(se,{variant:"outline",className:"max-w-full text-(length:--text-nano) text-muted-foreground",children:[(0,e.jsx)(C,{className:"h-3 w-3","aria-hidden":"true"}),(0,e.jsx)("span",{className:"truncate",children:k.label})]}),t.categories.slice(0,2).map(y=>(0,e.jsx)(ar,{label:y},y)),t.required?(0,e.jsxs)(se,{variant:"outline",className:"ml-auto border-border bg-muted/60 text-(length:--text-nano) text-muted-foreground",children:[(0,e.jsx)(fa,{className:"h-3 w-3","aria-hidden":"true"}),"Bundled"]}):t.sourceKind==="optional"?(0,e.jsx)(se,{variant:"outline",className:"ml-auto text-(length:--text-nano) text-muted-foreground",children:"Optional"}):null]})]})]})}n(gl,"SkillCard");function fl({categories:t,total:l,active:o,onSelect:i}){return(0,e.jsxs)("nav",{className:"flex flex-col gap-0.5 px-2",children:[(0,e.jsxs)("button",{type:"button",onClick:n(()=>i(null),"onClick"),className:A("flex items-center justify-between rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-accent/40",o==null?"bg-accent/60 font-medium text-foreground":"text-muted-foreground"),children:[(0,e.jsx)("span",{children:"All"}),(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:l})]}),t.map(x=>(0,e.jsxs)("button",{type:"button",onClick:n(()=>i(x.slug),"onClick"),className:A("flex items-center justify-between rounded-md px-2 py-1.5 text-sm capitalize transition-colors hover:bg-accent/40",o===x.slug?"bg-accent/60 font-medium text-foreground":"text-muted-foreground"),children:[(0,e.jsx)("span",{className:"truncate",children:x.slug}),(0,e.jsx)("span",{className:"ml-2 shrink-0 text-xs text-muted-foreground",children:x.count})]},x.slug))]})}n(fl,"CategoryNav");function bl({collectionView:t,navigation:l,tab:o,categories:i,categoryTotal:x,activeCategory:h,onCategoryChange:r,search:c,onSearchChange:a,sort:S,onSortChange:k,cards:C,onOpenCard:v,loading:w,error:K,onRetry:y,retrying:_=!1,totalCount:b,onCreate:I,onImport:te,onImportFromProject:Z,onBrowseDiscover:P,onScan:oe,scanPending:f,scanStatus:q,folderResult:E,folderSelection:L="all",foldersLoading:W=!1,selectMode:Ce=!1,selectedSkillIds:Ae=[],onFolderSelect:he,onCreateFolder:Me,onRenameFolder:Pe,onEditFolder:us,onMoveFolder:pe,onDeleteFolder:Ge,onToggleSelectMode:ce,onSelectCard:ge,onMoveCard:ms,onCreateFolderAndMoveCard:fe,onMoveSelected:We,onCreateFolderAndMoveSelected:Es,onClearSelected:Ye,onOpenMobileFolders:xs,onCreateFolderIn:hs,onEnsureMyFolder:ps,onOpenMoveCard:Xe,folderNudgeStorageKey:ne,showBrowseRails:ue=!0}){const ke=o==="installed",be=t==="authored",gs=be?"My Skills":ke?"Installed skills":"Discover skills",fs=be?"Skills you can open, edit and test in Studio.":ke?"Skills available to this organization.":"Browse skills from every available source.",V=be?"Search my skills":ke?"Search installed skills":"Search discoverable skills",[O,me]=(0,m.useState)("all"),Ee=(0,m.useMemo)(()=>{const g=new Map;for(const U of C)U.sourceKind&&g.set(`kind:${U.sourceKind}`,U.sourceKind==="bundled"?"Bundled":"Optional"),U.sourceBadge&&g.set(`badge:${U.sourceBadge}`,Gt(U.sourceBadge,null).label);return Array.from(g,([U,Y])=>({value:U,label:Y})).sort((U,Y)=>U.label.localeCompare(Y.label))},[C]);(0,m.useEffect)(()=>{O!=="all"&&!Ee.some(g=>g.value===O)&&me("all")},[Ee,O]);const Ne=(0,m.useMemo)(()=>O==="all"?C:C.filter(g=>{const[U,Y]=O.split(":",2);return U==="kind"?g.sourceKind===Y:g.sourceBadge===Y}),[C,O]),Ze=O!=="all",bs=!!(hs&&Pe&&us&&pe&&Ge),je=!!(ue&&E&&E.folders.length>0&&he&&bs),ve=(0,m.useMemo)(()=>{if(!E||L==="all"||L==="unfiled")return null;const g=E.folders.find(U=>U.id===L);return g?.systemKey?.startsWith("project:")?g:null},[E,L]),$e=ve?.systemKey?.slice(8)||null;return(0,e.jsxs)("div",{className:"flex min-h-(--sz-calc-30) md:h-(--sz-calc-33) md:min-h-0 md:overflow-hidden",children:[je?(0,e.jsx)("div",{className:"hidden shrink-0 pl-4 pt-4 md:block",children:(0,e.jsx)(Gr,{result:E,selection:L,loading:W,tags:i,activeTag:h,onSelect:he,onSelectTag:r,onCreateFolder:hs,onRenameFolder:Pe,onEditFolder:us,onMoveFolder:pe,onDeleteFolder:Ge,onEnsureMyFolder:ps})}):null,ue?(0,e.jsxs)("aside",{className:A("hidden w-60 shrink-0 flex-col overflow-hidden border-r border-border md:flex",je&&"md:hidden"),children:[(0,e.jsxs)("div",{className:"border-b border-border px-4 py-4",children:[(0,e.jsx)("h2",{className:"text-sm font-semibold text-foreground",children:"Browse by category"}),(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Filter ",ke?"installed":"discoverable"," skills."]})]}),(0,e.jsx)("div",{className:"px-4 pb-1 pt-3 text-(length:--text-micro) font-medium uppercase tracking-wide text-muted-foreground",children:"Categories"}),(0,e.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto pb-4",children:(0,e.jsx)(fl,{categories:i,total:x,active:h,onSelect:r})})]}):null,(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[(0,e.jsx)(sl,{navigation:l,viewTitle:gs,viewDescription:fs,searchLabel:V,search:c,onSearchChange:a,sort:S,onSortChange:k,availableSources:Ee,sourceBadgeFilter:O,setSourceBadgeFilter:me,onScan:oe,scanPending:f,onCreate:I,onBrowseDiscover:P,onImport:te,onImportFromProject:Z,onCreateFolder:je?void 0:Me,selectMode:Ce,onToggleSelectMode:ce,folderControl:ue&&E&&he?(0,e.jsx)("div",{className:"w-full md:hidden",children:(0,e.jsx)(za,{result:E,selection:L,allLabel:"All skills",onClick:xs??(()=>{})})}):void 0}),ue&&i.length>0?(0,e.jsx)("div",{className:"border-b border-border px-4 py-2 md:hidden",children:(0,e.jsxs)(Ws,{children:[(0,e.jsx)(Vs,{asChild:!0,children:(0,e.jsxs)(N,{variant:"outline",size:"sm",className:"w-full justify-between",children:[(0,e.jsx)("span",{className:"capitalize",children:h??"All categories"}),(0,e.jsx)(Bs,{className:"h-3.5 w-3.5"})]})}),(0,e.jsx)(Gs,{align:"start",className:"max-h-72 overflow-auto",children:(0,e.jsxs)(Rt,{value:h??"__all__",onValueChange:n(g=>r(g==="__all__"?null:g),"onValueChange"),children:[(0,e.jsxs)(Hs,{value:"__all__",children:["All (",x,")"]}),i.map(g=>(0,e.jsxs)(Hs,{value:g.slug,className:"capitalize",children:[g.slug," (",g.count,")"]},g.slug))]})})]})}):null,(0,e.jsxs)("div",{className:"min-h-0 flex-1 overflow-auto p-4",children:[q?(0,e.jsx)("p",{className:"mb-3 text-xs text-muted-foreground",children:q}):null,je&&he?(0,e.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-2",children:[(0,e.jsx)(Wr,{result:E,selection:L,onSelect:he}),ve&&$e?(0,e.jsxs)(N,{variant:"ghost",size:"sm",onClick:n(()=>oe($e),"onClick"),disabled:f,"aria-label":`Refresh ${ve.name} project skills`,title:`Refresh skills from ${ve.name}`,children:[(0,e.jsx)(ct,{className:A("h-3.5 w-3.5",f&&"animate-spin")}),"Refresh"]}):null]}):null,ne&&Me&&E&&E.folders.length===0&&!w&&C.length>0?(0,e.jsx)(Ga,{storageKey:ne,itemLabelPlural:"skills",onCreateFolder:Me}):null,Ce&&We&&Es&&Ye?(0,e.jsx)("div",{className:"mb-3",children:(0,e.jsx)(Oa,{selectedCount:Ae.length,folders:E?.folders??[],onMove:We,onCreateAndMove:Es,onClear:Ye,onDone:ce??Ye})}):null,K?(0,e.jsx)("div",{className:"py-6",children:(0,e.jsx)(Un,{error:K,action:"load skills",onRetry:y,retrying:_})}):w?(0,e.jsx)(Be,{variant:"list"}):Ne.length===0?(0,e.jsxs)("div",{className:"py-12",children:[(0,e.jsx)(cs,{icon:Jr,message:b===0?ke?be?"No skills yet. Create a skill to start working in Studio.":"No installed skills yet. Discover a skill or create one.":"No skills are available to discover yet.":c||h||Ze?"No skills match your filters.":"No skills in this view yet."}),b===0?(0,e.jsxs)("div",{className:"mt-3 flex flex-col items-center gap-2",children:[ke?(0,e.jsxs)(N,{size:"sm",onClick:P,children:[(0,e.jsx)(Yn,{className:"mr-1.5 h-3.5 w-3.5"})," Discover skills"]}):null,(0,e.jsx)(N,{size:"sm",variant:"outline",asChild:!0,children:(0,e.jsx)(Ke,{to:"/skills/sources/new",children:"Import from GitHub"})}),(0,e.jsx)(N,{size:"sm",variant:"ghost",onClick:I,children:"Create a skill"})]}):c||h||Ze?(0,e.jsx)("div",{className:"mt-3 flex justify-center",children:(0,e.jsx)(N,{size:"sm",variant:"ghost",onClick:n(()=>{a(""),r(null),me("all")},"onClick"),children:"Clear filters"})}):null]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("p",{className:"mb-3 text-xs text-muted-foreground",children:[Ne.length," ",Ne.length===1?"skill":"skills",h?(0,e.jsxs)("span",{className:"capitalize",children:[" · ",h]}):null]}),(0,e.jsx)("div",{className:"grid gap-3 [grid-template-columns:repeat(auto-fill,minmax(19rem,1fr))]",children:Ne.map(g=>(0,e.jsx)(gl,{card:g,folders:E?.folders,selected:Ae.includes(g.skillId??""),selectMode:Ce,showFolderBadge:!!(E&&c.trim()),onOpen:v,onSelectChange:ge,onMove:ms,onCreateFolderAndMove:fe,onOpenMove:Xe},g.key))})]})]})]})]})}n(bl,"DiscoveryGrid");function jl({initialDraft:t,onCreate:l,isPending:o,error:i,onCancel:x}){const[h,r]=(0,m.useState)(0),[c,a]=(0,m.useState)(t),[S,k]=(0,m.useState)(t.slug.trim().length>0),C=c.categories.join(", "),v=["Basics","Design","Content","Review"];(0,m.useEffect)(()=>{r(0),a(t),k(t.slug.trim().length>0)},[t]);function w(b){a(I=>({...I,...b}))}n(w,"patchDraft");const K=c.name.trim().length>0,y=c.slug.trim()||Ft(c.name);function _(){l(Ba(c))}return n(_,"submit"),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"flex items-center gap-2 border-b border-border pb-3",children:v.map((b,I)=>(0,e.jsx)("button",{type:"button",onClick:n(()=>r(I),"onClick"),className:A("rounded-md px-2 py-1 text-xs",h===I?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"),children:b},b))}),c.forkedFromName?(0,e.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground",children:[(0,e.jsx)(Ls,{className:"h-3.5 w-3.5"}),"Forking ",c.forkedFromName]}):null,h===0?(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsx)(Oe,{value:c.name,onChange:n(b=>{const I=b.target.value;w({name:I,slug:S?c.slug:Ft(I),markdown:c.markdown===it(c.name,c.tagline)?it(I,c.tagline):c.markdown})},"onChange"),placeholder:"Skill name",className:"h-9"}),(0,e.jsx)(Oe,{value:c.slug,onChange:n(b=>{const I=Ft(b.target.value);k(I.length>0),w({slug:I})},"onChange"),placeholder:"skill-shortname",className:"h-9 font-mono"}),(0,e.jsx)(Pt,{value:c.tagline,onChange:n(b=>{const I=b.target.value;w({tagline:I,description:c.description?c.description:I,markdown:c.markdown===it(c.name,c.tagline)?it(c.name,I):c.markdown})},"onChange"),placeholder:"One-line promise for the skill",className:"min-h-20"})]}):h===1?(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)(Ht,{size:48,card:{key:y||c.name||"new-skill",name:c.name||"New Skill",slug:y||"skill",iconUrl:null,color:c.color}}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"truncate text-sm font-medium",children:c.name||"New Skill"}),(0,e.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:c.tagline||"No tagline yet."})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"mb-2 block text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Color"}),(0,e.jsxs)("div",{className:"flex flex-wrap gap-2",children:[Aa.map(b=>(0,e.jsx)("button",{type:"button",onClick:n(()=>w({color:b}),"onClick"),className:A("h-7 w-7 rounded-md border",c.color===b?"border-foreground":"border-border"),style:{backgroundColor:b},"aria-label":`Use ${b}`},b)),(0,e.jsx)(Oe,{value:c.color,onChange:n(b=>w({color:b.target.value}),"onChange"),className:"h-7 w-28 font-mono text-xs"})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"mb-2 block text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Categories"}),(0,e.jsx)(Oe,{value:C,onChange:n(b=>w({categories:Jn(b.target.value)}),"onChange"),placeholder:"engineering, review, memory",className:"h-9"})]})]}):h===2?(0,e.jsx)("div",{className:"space-y-2",children:(0,e.jsx)(Pt,{value:c.markdown,onChange:n(b=>w({markdown:b.target.value}),"onChange"),className:"h-(--sz-calc-34) resize-y font-mono text-xs"})}):(0,e.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,e.jsxs)("div",{className:"grid grid-cols-(--gtc-26) gap-y-2",children:[(0,e.jsx)("span",{className:"text-muted-foreground",children:"Name"}),(0,e.jsx)("span",{children:c.name||"Untitled"}),(0,e.jsx)("span",{className:"text-muted-foreground",children:"Slug"}),(0,e.jsx)("span",{className:"font-mono",children:y||"skill"}),(0,e.jsx)("span",{className:"text-muted-foreground",children:"Scope"}),(0,e.jsx)("span",{children:c.sharingScope==="private"?"Private":"Organization"}),(0,e.jsx)("span",{className:"text-muted-foreground",children:"Categories"}),(0,e.jsx)("span",{children:c.categories.length?c.categories.join(", "):"none"})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("label",{className:"block text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Sharing"}),(0,e.jsxs)("div",{className:"grid gap-2 sm:grid-cols-3",children:[["company","private"].map(b=>(0,e.jsxs)("button",{type:"button",onClick:n(()=>w({sharingScope:b}),"onClick"),className:A("rounded-md border px-3 py-2 text-left text-sm",c.sharingScope===b?"border-foreground bg-accent/50":"border-border"),children:[(0,e.jsx)("span",{className:"block font-medium",children:b==="company"?"Organization":"Private"}),(0,e.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:b==="company"?"Visible inside this organization.":"Only visible in your library."})]},b)),(0,e.jsxs)("button",{type:"button",disabled:!0,className:"rounded-md border border-dashed border-border px-3 py-2 text-left text-sm text-muted-foreground",children:[(0,e.jsx)("span",{className:"block font-medium",children:"Public link"}),(0,e.jsx)("span",{className:"mt-1 block text-xs",children:"Coming later."})]})]})]})]}),i?(0,e.jsx)("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:i}):null,(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-border pt-3",children:[(0,e.jsx)(N,{variant:"ghost",size:"sm",onClick:x,disabled:o,children:"Cancel"}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(N,{variant:"ghost",size:"sm",onClick:n(()=>r(b=>Math.max(0,b-1)),"onClick"),disabled:o||h===0,children:"Back"}),h<v.length-1?(0,e.jsx)(N,{size:"sm",onClick:n(()=>r(b=>Math.min(v.length-1,b+1)),"onClick"),disabled:!K,children:"Next"}):(0,e.jsx)(N,{size:"sm",onClick:_,disabled:o||!K,children:o?"Creating...":c.forkedFromSkillId?"Create fork":"Create skill"})]})]})]})}n(jl,"NewSkillWizard");function vl({skill:t,packageName:l,packageVersion:o,installedSkill:i,installedSkillId:x,fileQuery:h,selectedPath:r,onInstall:c,onUpdate:a,onOpenInstalled:S,loadingPrimaryAction:k}){const C=Qs(h);if(!t)return(0,e.jsx)(cs,{icon:Te,message:"Select a catalog skill to inspect."});const v=i?.originHash??null,w=!!(i&&v&&v!==t.contentHash),K=!!i;let y;t.compatibility==="invalid"?y=(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ve,{asChild:!0,children:(0,e.jsx)("span",{children:(0,e.jsxs)(N,{disabled:!0,children:[(0,e.jsx)($t,{className:"mr-1.5 h-3.5 w-3.5"}),"Install skill"]})})}),(0,e.jsx)(He,{children:"This skill cannot be installed — its content is not valid Agent Skills markdown."})]}):K?w?y=(0,e.jsxs)(N,{onClick:a,disabled:k,className:"border-amber-500/40 bg-amber-500/20 text-amber-900 dark:text-amber-100 hover:bg-amber-500/30",children:[(0,e.jsx)(Kt,{className:"mr-1.5 h-3.5 w-3.5"}),"Update from catalog"]}):y=(0,e.jsxs)(N,{variant:"ghost",onClick:n(()=>x&&S(x),"onClick"),children:[(0,e.jsx)(zn,{className:"mr-1.5 h-3.5 w-3.5"}),"Installed · Open in library"]}):y=(0,e.jsxs)(N,{onClick:c,disabled:k,children:[t.trustLevel==="scripts_executables"?(0,e.jsx)(Vn,{className:"mr-1.5 h-3.5 w-3.5"}):(0,e.jsx)($t,{className:"mr-1.5 h-3.5 w-3.5"}),k?"Preparing...":"Install skill in this organization"]});const _=h.data?.markdown?sr(h.data.content):h.data?.content??"";return(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("div",{className:"border-b border-border px-5 py-4",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("h1",{className:"flex items-center gap-2 truncate text-2xl font-semibold",children:[(0,e.jsx)(Te,{className:A("h-5 w-5 shrink-0 text-muted-foreground",t.kind==="optional"&&"opacity-70"),"aria-hidden":"true"}),t.name]}),(0,e.jsx)("p",{className:"mt-2 max-w-3xl text-sm text-muted-foreground",children:t.description}),(0,e.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,e.jsx)("span",{className:"rounded border border-border bg-muted/40 px-1.5 py-0.5 uppercase tracking-wide",children:t.kind}),(0,e.jsx)("span",{children:"·"}),(0,e.jsx)("span",{children:t.category}),(0,e.jsx)("span",{children:"·"}),(0,e.jsx)(ol,{packageName:l,packageVersion:o})]})]}),(0,e.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:y})]}),(0,e.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2 border-t border-border pt-4",children:[(0,e.jsx)(nr,{level:t.trustLevel}),(0,e.jsx)(rr,{compatibility:t.compatibility}),w?(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ve,{asChild:!0,children:(0,e.jsxs)(se,{variant:"outline",className:"border-amber-500/40 bg-amber-500/10 text-(length:--text-micro) text-amber-800 dark:text-amber-200",children:[(0,e.jsx)(Kt,{className:"h-3 w-3","aria-hidden":"true"}),"Update available"]})}),(0,e.jsx)(He,{children:"Catalog content hash has changed since this skill was installed."})]}):null,t.requires.length>0?(0,e.jsxs)(se,{variant:"outline",className:"border-border bg-muted/40 text-(length:--text-micro) text-muted-foreground",children:["Requires: ",t.requires.join(", ")]}):null,t.recommendedForRoles.length>0?(0,e.jsxs)(se,{variant:"outline",className:"border-border bg-muted/40 text-(length:--text-micro) text-muted-foreground",children:["Roles: ",t.recommendedForRoles.join(" · ")]}):null,t.tags.length>0?(0,e.jsxs)(se,{variant:"outline",className:"border-border bg-muted/40 text-(length:--text-micro) text-muted-foreground",children:["Tags: ",t.tags.join(" · ")]}):null]}),(0,e.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,e.jsx)("span",{className:"uppercase tracking-(--tracking-caps)",children:"Key"}),(0,e.jsx)("span",{className:"font-mono",children:t.key}),(0,e.jsx)("span",{className:"uppercase tracking-(--tracking-caps)",children:"·"}),(0,e.jsx)("span",{className:"uppercase tracking-(--tracking-caps)",children:"Hash"}),(0,e.jsxs)("span",{className:"font-mono",children:[t.contentHash.slice(0,24),"…"]}),(0,e.jsx)(ea,{text:t.contentHash,copiedLabel:"Copied hash",ariaLabel:"Copy content hash",title:"Copy content hash",className:"inline-flex h-6 w-6 items-center justify-center rounded-sm border border-border text-muted-foreground hover:bg-accent hover:text-foreground",children:(0,e.jsx)(Qn,{className:"h-3 w-3"})})]})]}),(0,e.jsx)("div",{className:"border-b border-border px-5 py-3",children:(0,e.jsx)("div",{className:"truncate font-mono text-sm",children:r})}),(0,e.jsx)("div",{className:"min-h-(--sz-400px) px-5 py-5",children:h.isLoading||C.kind==="reconnecting"?(0,e.jsx)(Be,{variant:"detail"}):C.kind==="error"?(0,e.jsx)(Un,{error:h.error,action:"load the file",onRetry:C.retry,retrying:C.isFetching}):h.data?h.data.markdown?(0,e.jsx)(qt,{softBreaks:!1,linkIssueReferences:!1,children:_}):(0,e.jsx)("pre",{className:A("overflow-x-auto whitespace-pre-wrap wrap-break-word border-0 bg-transparent p-0 font-mono text-sm text-foreground",_t),children:(0,e.jsx)("code",{children:h.data.content})}):(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:"Select a file to inspect."})})]})}n(vl,"CatalogDetailPane");function yl(t){return new Set(t.filter(l=>l.supportsSkills&&!l.required).map(l=>l.id))}n(yl,"defaultInstallAgentSelection");function kl({open:t,onOpenChange:l,skill:o,packageName:i,packageVersion:x,conflict:h,defaultSlug:r,defaultForce:c,defaultAction:a,agents:S,isPending:k,error:C,onConfirm:v}){const[w,K]=(0,m.useState)(""),[y,_]=(0,m.useState)(!1),[b,I]=(0,m.useState)(!1),[te,Z]=(0,m.useState)(new Set),[P,oe]=(0,m.useState)(!1),f=(0,m.useRef)(!1);if((0,m.useEffect)(()=>{t&&(K(r??""),_(c),I(a==="replace"||c))},[t,r,c,a]),(0,m.useEffect)(()=>{t&&!f.current&&oe(!1),f.current=t},[t]),(0,m.useEffect)(()=>{!t||P||Z(a==="install"?yl(S):new Set)},[t,P,a,S]),!o)return null;let q="Install skill",E="default";return a==="update"?q="Install update":a==="replace"&&(q="Replace existing skill",E="destructive"),k&&(q="Installing…"),(0,e.jsx)(Ms,{open:t,onOpenChange:n(L=>k?null:l(L),"onOpenChange"),children:(0,e.jsxs)(Ks,{className:"sm:max-w-2xl",showCloseButton:!k,children:[(0,e.jsxs)(Ts,{children:[(0,e.jsxs)(As,{children:[a==="update"?"Update":a==="replace"?"Replace":"Install"," · ",o.name]}),(0,e.jsxs)(Ys,{children:[(0,e.jsx)("span",{className:"capitalize",children:o.kind})," · ",o.category,i?(0,e.jsxs)(e.Fragment,{children:[" · ",i,x?` v${x}`:""]}):null]})]}),(0,e.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,e.jsx)("div",{className:"rounded-md border border-border p-3",children:(0,e.jsxs)("div",{className:"grid grid-cols-(--gtc-26) gap-y-2 text-xs",children:[(0,e.jsx)("div",{className:"text-muted-foreground",children:"Trust"}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(nr,{level:o.trustLevel}),o.trustLevel==="markdown_only"?(0,e.jsx)("span",{className:"text-muted-foreground",children:"Safe"}):o.trustLevel==="scripts_executables"?(0,e.jsx)("span",{className:"text-amber-800 dark:text-amber-200",children:"Review required"}):(0,e.jsx)("span",{className:"text-muted-foreground",children:"Non-script assets"})]}),(0,e.jsx)("div",{className:"text-muted-foreground",children:"Compatibility"}),(0,e.jsx)("div",{className:"flex items-center gap-2",children:o.compatibility==="compatible"?(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 text-muted-foreground",children:[(0,e.jsx)(zn,{className:"h-3 w-3","aria-hidden":"true"}),"Compatible"]}):(0,e.jsx)(rr,{compatibility:o.compatibility})}),(0,e.jsx)("div",{className:"text-muted-foreground",children:"Requires"}),(0,e.jsx)("div",{className:"text-foreground",children:o.requires.length===0?"none":o.requires.join(", ")}),(0,e.jsx)("div",{className:"text-muted-foreground",children:"Roles"}),(0,e.jsx)("div",{className:"text-foreground",children:o.recommendedForRoles.length===0?"any":o.recommendedForRoles.join(" · ")}),(0,e.jsx)("div",{className:"text-muted-foreground",children:"Provenance"}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("div",{className:"truncate",children:[i??"—",x?` v${x}`:""]}),(0,e.jsx)("div",{className:"truncate font-mono text-(length:--text-micro) text-muted-foreground",children:o.contentHash})]})]})}),(0,e.jsxs)("div",{className:"rounded-md border border-border",children:[(0,e.jsxs)("div",{className:"border-b border-border px-3 py-2 text-xs uppercase tracking-wide text-muted-foreground",children:["Files (",o.files.length,")"]}),(0,e.jsx)("div",{className:"max-h-48 overflow-y-auto",children:o.files.map(L=>(0,e.jsxs)("div",{className:"grid grid-cols-(--gtc-27) items-center gap-x-3 border-b border-border/50 px-3 py-1.5 text-xs last:border-b-0",children:[(0,e.jsx)("span",{className:"truncate font-mono text-muted-foreground",children:L.path}),(0,e.jsx)("span",{className:"rounded border border-border bg-muted/40 px-1 py-0.5 text-(length:--text-nano) uppercase text-muted-foreground",children:L.kind}),(0,e.jsx)("span",{className:"text-(length:--text-micro) text-muted-foreground",children:dl(L.sizeBytes)})]},L.path))})]}),h?(0,e.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/10 p-3 text-xs text-amber-800 dark:text-amber-200",children:["An existing skill with key ",(0,e.jsx)("span",{className:"font-mono",children:h.key})," is installed (",h.sourceLabel??h.sourceType,"). Installing will ",a==="update"?"overwrite the catalog content":"replace the existing skill","."]}):null,a==="install"?(0,e.jsxs)("div",{className:"rounded-md border border-border p-3",children:[(0,e.jsx)("div",{className:"mb-1 text-xs uppercase tracking-wide text-muted-foreground",children:"Enable for agents"}),(0,e.jsx)("p",{className:"mb-2 text-xs text-muted-foreground",children:"Installing adds the skill to the organization library. Agents can only use it once it is enabled for them."}),(0,e.jsx)(On,{agents:S,selectedAgentIds:te,onChange:n(L=>{oe(!0),Z(L)},"onChange"),showSelectionPreview:!1,emptyMessage:"No agents in this organization support skills yet.",isAgentDisabled:n(L=>{const W=L;return W.required||!W.supportsSkills},"isAgentDisabled"),getDescription:n(L=>{const W=L;return`${W.adapterType}${W.required?" · required":""}${W.supportsSkills?"":" · skills not supported"}`},"getDescription")})]}):null,(0,e.jsxs)("button",{type:"button",onClick:n(()=>I(L=>!L),"onClick"),className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[b?(0,e.jsx)(Bs,{className:"h-3 w-3"}):(0,e.jsx)(Gn,{className:"h-3 w-3"}),"Advanced"]}),b?(0,e.jsxs)("div",{className:"space-y-3 rounded-md border border-border p-3 text-xs",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"mb-1 block uppercase tracking-wide text-muted-foreground",children:"Slug override"}),(0,e.jsx)(Oe,{value:w,onChange:n(L=>K(L.target.value),"onChange"),placeholder:r??o.slug,className:"h-8"})]}),(0,e.jsxs)("label",{className:"flex items-center gap-2",children:[(0,e.jsx)(ca,{checked:y,onCheckedChange:n(L=>_(!!L),"onCheckedChange")}),(0,e.jsx)("span",{children:"Force replace existing same-key skill"})]})]}):null,C?(0,e.jsx)("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-xs text-destructive",children:C}):null]}),(0,e.jsxs)(Mt,{children:[(0,e.jsx)(N,{variant:"ghost",onClick:n(()=>l(!1),"onClick"),disabled:k,children:"Cancel"}),(0,e.jsx)(N,{variant:E,onClick:n(()=>v({slug:w.trim().length>0?w.trim():null,force:y,agentIds:a==="install"?Array.from(te):[]}),"onClick"),disabled:k,children:q})]})]})})}n(kl,"InstallPreviewDialog");function En({agents:t,attachedAgentIds:l,versions:o,selectedVersionId:i,pending:x,onSubmit:h,fullWidth:r=!1}){const[c,a]=(0,m.useState)(i),S=(0,m.useMemo)(()=>new Set(l),[l]),k=t.filter(v=>v.supportsSkills),C=[...o].sort((v,w)=>w.revisionNumber-v.revisionNumber);return(0,e.jsx)(On,{agents:t,selectedAgentIds:S,onSave:n(v=>h(Array.from(v),c),"onSave"),pending:x,triggerLabel:"Add to agent",triggerIcon:(0,e.jsx)(Et,{className:"mr-1.5 h-3.5 w-3.5"}),triggerVariant:"default",triggerSize:"sm",triggerFullWidth:r,triggerClassName:A(r&&"w-full"),contentAlign:"end",showSelectionPreview:!1,onOpenChange:n(v=>{v&&a(i)},"onOpenChange"),headerContent:C.length>0?(0,e.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-xs",children:[(0,e.jsx)("span",{className:"shrink-0 text-muted-foreground",children:"Version"}),(0,e.jsxs)("select",{value:c??"__latest__",onChange:n(v=>a(v.target.value==="__latest__"?null:v.target.value),"onChange"),className:"h-8 min-w-0 flex-1 rounded-md border border-border bg-background px-2 text-xs text-foreground",children:[(0,e.jsx)("option",{value:"__latest__",children:"Latest"}),C.map(v=>(0,e.jsxs)("option",{value:v.id,children:["v",v.revisionNumber,v.label?` · ${v.label}`:""]},v.id))]})]}):null,emptyMessage:k.length===0?"No agents in this organization support skills yet.":"No agents yet.",isAgentDisabled:n(v=>{const w=v;return w.required||!w.supportsSkills},"isAgentDisabled"),getDescription:n(v=>{const w=v;return`${w.adapterType}${w.required?" · required":""}${w.supportsSkills?"":" · skills not supported"}`},"getDescription"),renderNameSuffix:n(v=>v.paused?(0,e.jsxs)(se,{variant:"outline",className:"[&>svg]:size-2.5 border-amber-500/30 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-wide text-amber-500",children:[(0,e.jsx)(At,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Paused"]}):null,"renderNameSuffix")})}n(En,"AttachAgentsPopover");function Wt({nodes:t,skillId:l,selectedPath:o,expandedDirs:i,onToggleDir:x,onSelectPath:h,fileHref:r=n((a,S)=>Ps(a,S),"fileHref"),depth:c=0}){return(0,e.jsx)("div",{children:t.map(a=>{const S=a.kind==="dir"&&a.path?i.has(a.path):!1;if(a.kind==="dir")return(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:A("group grid w-full grid-cols-(--gtc-3) items-center gap-x-1 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground",In),children:[(0,e.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 py-1 text-left",style:{paddingLeft:`${Sn+c*Cn}px`},onClick:n(()=>a.path&&x(a.path),"onClick"),children:[(0,e.jsx)("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:S?(0,e.jsx)(Ut,{className:"h-3.5 w-3.5"}):(0,e.jsx)(Qt,{className:"h-3.5 w-3.5"})}),(0,e.jsx)("span",{className:"truncate",children:a.name})]}),(0,e.jsx)("button",{type:"button",className:"flex h-9 w-9 items-center justify-center self-center rounded-sm text-muted-foreground opacity-70 transition-(--tp-background-color-color-opacity) hover:bg-accent hover:text-foreground group-hover:opacity-100",onClick:n(()=>a.path&&x(a.path),"onClick"),children:S?(0,e.jsx)(Bs,{className:"h-3.5 w-3.5"}):(0,e.jsx)(Gn,{className:"h-3.5 w-3.5"})})]}),S&&(0,e.jsx)(Wt,{nodes:a.children,skillId:l,selectedPath:o,expandedDirs:i,onToggleDir:x,onSelectPath:h,fileHref:r,depth:c+1})]},a.path??a.name);const k=al(a.fileKind??"other");return(0,e.jsxs)(Ke,{className:A("flex w-full items-center gap-2 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground",In,a.path===o&&"text-foreground"),style:{paddingInlineStart:`${Sn+c*Cn}px`},to:r(l,a.path),onClick:n(()=>a.path&&h(a.path),"onClick"),children:[(0,e.jsx)("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:(0,e.jsx)(k,{className:"h-3.5 w-3.5"})}),(0,e.jsx)("span",{className:"truncate",children:a.name})]},a.path??a.name)})})}n(Wt,"SkillTree");var Nl=[{value:"overview",label:"Overview",icon:Vt},{value:"files",label:"Files",icon:Ut},{value:"versions",label:"Versions",icon:Rn},{value:"agents",label:"Agents",icon:Sa}];function Bt(t){return t?.usedByAgents.find(l=>l.versionId)?.versionId??null}n(Bt,"currentVersionSelection");function Xs(t){return t?`v${t.revisionNumber}${t.label?` · ${t.label}`:""}`:"Latest"}n(Xs,"versionLabel");function wl(t,l){const o=[...t].sort((x,h)=>h.revisionNumber-x.revisionNumber),i=l?o.find(x=>x.id===l)??null:o[0]??null;return i?{leftVersionId:(o.find(x=>x.revisionNumber<i.revisionNumber)??null)?.id??null,rightVersionId:i.id}:{leftVersionId:null,rightVersionId:null}}n(wl,"getSkillVersionDiffSelection");function Sl({open:t,onOpenChange:l,versions:o,leftVersionId:i,rightVersionId:x,onLeftVersionChange:h,onRightVersionChange:r}){const c=[...o].sort((f,q)=>q.revisionNumber-f.revisionNumber),a=c.find(f=>f.id===i),S=c.find(f=>f.id===x),k=de({queryKey:[...j.companySkills.versions(a?.companyId??"",a?.companySkillId??""),i],queryFn:n(()=>z.version(a.companyId,a.companySkillId,a.id),"queryFn"),enabled:t&&!!a}),C=de({queryKey:[...j.companySkills.versions(S?.companyId??"",S?.companySkillId??""),x],queryFn:n(()=>z.version(S.companyId,S.companySkillId,S.id),"queryFn"),enabled:t&&!!S}),v=k.data??null,w=C.data??null,K=(0,m.useMemo)(()=>{const f=new Set;for(const q of v?.fileInventory??[])f.add(q.path);for(const q of w?.fileInventory??[])f.add(q.path);return Array.from(f).sort((q,E)=>q==="SKILL.md"?-1:E==="SKILL.md"?1:q.localeCompare(E))},[v,w]),[y,_]=(0,m.useState)("SKILL.md"),b=K.includes(y)?y:K[0]??"SKILL.md",I=v?.fileInventory.find(f=>f.path===b),te=w?.fileInventory.find(f=>f.path===b),Z=(0,m.useMemo)(()=>Er(I?.content??"",te?.content??""),[I?.content,te?.content]),P={context:"bg-transparent",removed:"bg-red-500/10 text-red-900 dark:text-red-100",added:"bg-green-500/10 text-green-900 dark:text-green-100"},oe={context:" ",removed:"-",added:"+"};return(0,m.useEffect)(()=>{t&&K.length>0&&!K.includes(y)&&_(K[0])},[K,t,y]),(0,e.jsx)(Ms,{open:t,onOpenChange:l,children:(0,e.jsxs)(Ks,{className:"flex max-h-(--sz-85vh) w-full !max-w-(--pct-90) flex-col overflow-hidden",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[(0,e.jsxs)(Ts,{className:"shrink-0",children:[(0,e.jsx)(As,{children:"Diff · skill files"}),(k.error||C.error)&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:(k.error??C.error)?.message}),(k.isLoading||C.isLoading)&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading selected versions…"})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[(0,e.jsxs)("label",{className:"flex min-w-0 items-center gap-2",children:[(0,e.jsx)(se,{variant:"outline",className:"border-red-500/30 bg-red-500/10 uppercase tracking-wider text-red-400",children:"Old"}),(0,e.jsxs)("select",{value:i??"",onChange:n(f=>h(f.target.value||null),"onChange"),className:"h-8 w-full max-w-44 rounded-md border border-border bg-background px-2 text-xs sm:w-44",children:[(0,e.jsx)("option",{value:"",children:"Initial"}),c.map(f=>(0,e.jsx)("option",{value:f.id,children:Xs(f)},f.id))]})]}),(0,e.jsxs)("label",{className:"flex min-w-0 items-center gap-2",children:[(0,e.jsx)(se,{variant:"outline",className:"border-green-500/30 bg-green-500/10 uppercase tracking-wider text-green-400",children:"New"}),(0,e.jsx)("select",{value:w?.id??"",onChange:n(f=>r(f.target.value||null),"onChange"),className:"h-8 w-full max-w-44 rounded-md border border-border bg-background px-2 text-xs sm:w-44",children:c.map(f=>(0,e.jsx)("option",{value:f.id,children:Xs(f)},f.id))})]})]})]}),K.length>0?(0,e.jsx)("div",{className:"md:hidden",children:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-xs",children:[(0,e.jsx)("span",{className:"shrink-0 text-muted-foreground",children:"File"}),(0,e.jsx)("select",{"aria-label":"Diff file",value:b,onChange:n(f=>_(f.target.value),"onChange"),className:"h-8 min-w-0 flex-1 rounded-md border border-border bg-background px-2 font-mono text-xs text-foreground",children:K.map(f=>(0,e.jsx)("option",{value:f,children:f},f))})]})}):null,(0,e.jsxs)("div",{className:"flex min-h-0 flex-1 gap-3",children:[(0,e.jsx)("aside",{className:"hidden w-56 shrink-0 overflow-auto border-r border-border pr-3 md:block",children:K.map(f=>(0,e.jsxs)("button",{type:"button",onClick:n(()=>_(f),"onClick"),className:A("flex w-full items-center gap-2 px-2 py-1.5 text-left font-mono text-xs text-muted-foreground hover:bg-accent/40 hover:text-foreground",b===f&&"bg-accent/50 text-foreground"),children:[(0,e.jsx)(Vt,{className:"h-3.5 w-3.5 shrink-0"}),(0,e.jsx)("span",{className:"truncate",children:f})]},f))}),(0,e.jsx)("div",{className:"min-w-0 flex-1 overflow-auto rounded-md border border-border text-xs",children:w?v?.id===w.id?(0,e.jsx)("div",{className:"p-6 text-center text-sm text-muted-foreground",children:"Both sides are the same version."}):(0,e.jsxs)("div",{className:"font-mono text-xs leading-6",children:[(0,e.jsxs)("div",{className:"grid grid-cols-(--gtc-1) border-b border-border/60 bg-muted/30 px-3 py-2 text-(length:--text-micro) uppercase tracking-wide text-muted-foreground",children:[(0,e.jsx)("span",{children:"Old"}),(0,e.jsx)("span",{children:"New"}),(0,e.jsx)("span",{}),(0,e.jsx)("span",{children:b})]}),Z.map((f,q)=>(0,e.jsxs)("div",{className:A("grid grid-cols-(--gtc-1) gap-0 border-b border-border/30 px-3",P[f.kind]),children:[(0,e.jsx)("span",{className:"select-none border-r border-border/30 pr-3 text-right text-muted-foreground",children:f.oldLineNumber??""}),(0,e.jsx)("span",{className:"select-none border-r border-border/30 px-3 text-right text-muted-foreground",children:f.newLineNumber??""}),(0,e.jsx)("span",{className:"select-none px-3 text-center text-muted-foreground",children:oe[f.kind]}),(0,e.jsx)("pre",{className:A("overflow-x-auto whitespace-pre-wrap break-words px-3 py-0 text-inherit",_t),children:f.text.length>0?f.text:" "})]},`${f.kind}-${q}-${f.oldLineNumber??"x"}-${f.newLineNumber??"x"}`))]}):(0,e.jsx)("div",{className:"p-6 text-center text-sm text-muted-foreground",children:"Select a version to compare."})})]})]})})}n(Sl,"SkillVersionDiffDialog");function Cl({folderPath:t,onMove:l}){const{copied:o,failed:i,copy:x}=Ca(),h=t&&t.length>0?t:"Unfiled";return(0,e.jsxs)("section",{children:[(0,e.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Location"}),(0,e.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-muted/30 px-2.5 py-1.5",children:[(0,e.jsx)(Ut,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",title:h,children:h})]}),(0,e.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,e.jsxs)(N,{size:"sm",variant:"outline",onClick:n(()=>{x(h)},"onClick"),children:[(0,e.jsx)(Qn,{className:"mr-1.5 h-3.5 w-3.5"}),o?"Copied":i?"Copy failed":"Copy path"]}),l?(0,e.jsxs)(N,{size:"sm",variant:"outline",onClick:l,children:[(0,e.jsx)(qn,{className:"mr-1.5 h-3.5 w-3.5"}),"Move"]}):null]})]})}n(Cl,"SkillLocationCard");function Il({categories:t,pending:l,onSave:o}){const[i,x]=(0,m.useState)("");function h(r){const c=r.trim().toLowerCase();if(!c||t.includes(c)){x("");return}o([...t,c]),x("")}return n(h,"addTag"),(0,e.jsxs)("section",{children:[(0,e.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:[(0,e.jsx)(ia,{className:"h-3 w-3"}),"Tags"]}),(0,e.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[t.map(r=>(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-border bg-accent/40 px-2 py-0.5 text-xs text-foreground",children:[r,(0,e.jsx)("button",{type:"button","aria-label":`Remove tag ${r}`,disabled:l,onClick:n(()=>o(t.filter(c=>c!==r)),"onClick"),className:"text-muted-foreground hover:text-foreground disabled:opacity-50",children:(0,e.jsx)(ba,{className:"h-3 w-3"})})]},r)),t.length===0?(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"No tags yet."}):null]}),(0,e.jsx)(Oe,{value:i,onChange:n(r=>x(r.target.value),"onChange"),onKeyDown:n(r=>{r.key==="Enter"&&(r.preventDefault(),h(i))},"onKeyDown"),onBlur:n(()=>i.trim()&&h(i),"onBlur"),placeholder:"Add a tag…",disabled:l,className:"mt-2 h-8 text-sm"})]})}n(Il,"SkillTagsEditor");function Fl({detail:t,folderDisplayPath:l,catalogSource:o,routeSkills:i,loading:x,activeTab:h,onTabChange:r,selectedPath:c,file:a,fileLoading:S,viewMode:k,editMode:C,draft:v,setViewMode:w,setEditMode:K,setDraft:y,onSave:_,savePending:b,versions:I,versionsLoading:te,attachAgents:Z,onSubmitAttach:P,attachPending:oe,expandedDirs:f,onToggleDir:q,onSelectPath:E,updateStatus:L,updateStatusLoading:W,onCheckUpdates:Ce,checkUpdatesPending:Ae,onInstallUpdate:he,installUpdatePending:Me,onToggleStar:Pe,starPending:us,onFork:pe,onUpdateSettings:Ge,updateSettingsPending:ce,onMoveToFolder:ge,onDelete:ms,deletePending:fe,studioHref:We}){const[Es,Ye]=(0,m.useState)(!1),[xs,hs]=(0,m.useState)(!1),[ps,Xe]=(0,m.useState)("company"),[ne,ue]=(0,m.useState)(""),ke=(0,m.useRef)(null),[be,gs]=(0,m.useState)(!1),[fs,V]=(0,m.useState)(!1);(0,m.useEffect)(()=>{const p=ke.current;!p||be||V(p.scrollHeight-p.clientHeight>1)},[t?.description,t?.tagline,t?.id,be]),(0,m.useEffect)(()=>{gs(!1)},[t?.id]),(0,m.useEffect)(()=>{!t||xs||(Xe(t.sharingScope==="public_link"?"company":t.sharingScope),ue(t.categories.join(", ")))},[t,xs]);const O=[...I].sort((p,M)=>M.revisionNumber-p.revisionNumber),[me,Ee]=(0,m.useState)(null),[Ne,Ze]=(0,m.useState)(null);function bs(p){const M=wl(O,p);Ee(M.leftVersionId),Ze(M.rightVersionId),Ye(!!M.rightVersionId)}n(bs,"openVersionDiff");const je=a?.markdown?ot(a.content).body:a?.content??"",ve=C&&!!a?.editable&&v!==je;(0,m.useEffect)(()=>{if(!ve)return;const p=n(M=>{M.preventDefault(),M.returnValue=""},"handler");return window.addEventListener("beforeunload",p),()=>window.removeEventListener("beforeunload",p)},[ve]);const $e=(0,m.useCallback)(p=>t?tl(t,c,p,i??[t]):null,[t,c,i]);if(!t)return x?(0,e.jsx)(Be,{variant:"detail"}):(0,e.jsx)(cs,{icon:Te,message:"Skill not found."});const g=t,U=We??zt(g.id),Y=Gt(g.sourceBadge,g.sourceLabel),qe=Y.icon,js=a?.markdown?sr(a.content):a?.content??"",vs=dt(g.sourceRef),Zs=dt(L?.latestRef),ys=I.find(p=>p.id===Bt(g))??null,Je=Zn(g)??Y.label,ks=Jn(ne),ut=Kn(ks)!==Kn(g.categories),Js=ps!==(g.sharingScope==="public_link"?"company":g.sharingScope),Ie=ut||Js,es=new Map(Z.map(p=>[p.id,p])),$=o&&o.type==="github"?o:null,Ns=$?$.hostname==="github.com"?"GitHub":$.hostname:null,ws=$?`${$.owner}/${$.repo}${$.path?`/${$.path}`:""}`:null,Re=$?$.url??`https://${$.hostname}/${$.owner}/${$.repo}/tree/${$.ref}/${$.path}`.replace(/\/$/,""):null,re=g.sourcePath||g.sourceLocator||null,$s=g.homepageUrl??(re&&/^(https?:\/\/|[\w.-]+\.[a-z]{2,}\/)/i.test(re)?re.startsWith("http")?re:`https://${re}`:null);function qs(){return(0,e.jsxs)("div",{className:"grid min-h-(--sz-560px) gap-0 lg:grid-cols-(--gtc-28)",children:[(0,e.jsxs)("aside",{className:"border-b border-border pb-3 lg:border-b-0 lg:border-r lg:pb-0 lg:pr-3",children:[(0,e.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Files"}),(0,e.jsx)(Wt,{nodes:tr(g.fileInventory),skillId:g.id,selectedPath:c,expandedDirs:f,onToggleDir:q,onSelectPath:E,fileHref:n((p,M)=>Ps(g,i??[g],M),"fileHref")})]}),(0,e.jsxs)("section",{className:"min-w-0 lg:pl-5",children:[(0,e.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3 border-b border-border pb-3",children:[(0,e.jsx)("div",{className:"min-w-0 truncate font-mono text-sm",children:a?.path??c}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[a?.markdown&&!C?(0,e.jsxs)("div",{className:"flex items-center border border-border",children:[(0,e.jsx)("button",{className:A("px-3 py-1.5 text-sm",k==="preview"?"text-foreground":"text-muted-foreground"),onClick:n(()=>w("preview"),"onClick"),children:(0,e.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(Xr,{className:"h-3.5 w-3.5"})," View"]})}),(0,e.jsx)("button",{className:A("border-l border-border px-3 py-1.5 text-sm",k==="code"?"text-foreground":"text-muted-foreground"),onClick:n(()=>w("code"),"onClick"),children:(0,e.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(Rr,{className:"h-3.5 w-3.5"})," Code"]})})]}):null,g.editable&&a?.editable?C?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(N,{variant:"ghost",size:"sm",onClick:n(()=>K(!1),"onClick"),disabled:b,children:"Cancel"}),(0,e.jsxs)(N,{size:"sm",onClick:_,disabled:b||!ve,children:[(0,e.jsx)(It,{className:"mr-1.5 h-3.5 w-3.5"}),b?"Saving...":"Save"]})]}):(0,e.jsxs)(N,{variant:"ghost",size:"sm",onClick:n(()=>K(!0),"onClick"),children:[(0,e.jsx)(_n,{className:"mr-1.5 h-3.5 w-3.5"})," Edit"]}):g.editable?null:(0,e.jsxs)(N,{type:"button",variant:"outline",size:"sm",onClick:pe,title:g.editableReason??"Fork this skill to edit it.",children:[(0,e.jsx)(Ls,{className:"mr-1.5 h-3.5 w-3.5"}),g.sourceType==="github"?"Make a copy":"Fork"]})]})]}),S?(0,e.jsx)(Be,{variant:"detail"}):a?a.encoding==="base64"?(0,e.jsx)(Ma,{file:a}):C&&a.editable?a.markdown?(0,e.jsx)(sa,{value:v,onChange:y,bordered:!1,className:"min-h-(--sz-520px)"}):(0,e.jsx)(Pt,{value:v,onChange:n(p=>y(p.target.value),"onChange"),className:"min-h-(--sz-520px) rounded-none border-0 bg-transparent px-0 py-0 font-mono text-sm shadow-none focus-visible:ring-0"}):a.markdown&&k==="preview"?(0,e.jsx)(qt,{softBreaks:!1,linkIssueReferences:!1,resolveLinkHref:$e,children:js}):(0,e.jsx)("pre",{className:A("overflow-x-auto whitespace-pre-wrap wrap-break-word border-0 bg-transparent p-0 font-mono text-sm text-foreground",_t),children:(0,e.jsx)("code",{children:a.content})}):(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:"Select a file to inspect."})]})]})}n(qs,"renderFilesBody");function ae(){return(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("section",{children:[(0,e.jsx)("h2",{className:"mb-2 text-sm font-medium",children:"About"}),S?(0,e.jsx)(Be,{variant:"detail"}):a?.markdown?(0,e.jsx)(qt,{softBreaks:!1,linkIssueReferences:!1,children:js||g.description||"No overview yet."}):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:g.description??"No overview yet."})]}),(0,e.jsxs)("section",{className:"grid min-w-0 gap-3 text-sm sm:grid-cols-2",children:[(0,e.jsxs)("div",{className:"min-w-0 border-b border-border py-2",children:[(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:"Key"}),(0,e.jsx)("div",{className:"mt-1 truncate font-mono",children:g.key})]}),(0,e.jsxs)("div",{className:"min-w-0 border-b border-border py-2",children:[(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:"Source"}),(0,e.jsx)("div",{className:"mt-1 min-w-0 [overflow-wrap:anywhere]",children:re??Y.label})]}),(0,e.jsxs)("div",{className:"min-w-0 border-b border-border py-2",children:[(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:"Version"}),(0,e.jsx)("div",{className:"mt-1",children:Xs(g.currentVersion??null)})]}),(0,e.jsxs)("div",{className:"min-w-0 border-b border-border py-2",children:[(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:"Mode"}),(0,e.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:g.editable?"Editable":(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{children:"Read only"}),(0,e.jsxs)(N,{type:"button",variant:"outline",size:"xs",onClick:pe,children:[(0,e.jsx)(Ls,{className:"mr-1 h-3 w-3"}),g.sourceType==="github"?"Make a copy":"Fork"]})]})})]})]})]})}n(ae,"renderOverviewBody");function ze(){return(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:te?"Loading versions...":`${I.length} ${I.length===1?"version":"versions"}`}),(0,e.jsxs)(N,{type:"button",variant:"outline",size:"sm",onClick:n(()=>bs(),"onClick"),disabled:O.length<2,children:[(0,e.jsx)(Rn,{className:"mr-1.5 h-3.5 w-3.5"})," Compare"]})]}),(0,e.jsx)("div",{className:"border-y border-border",children:te?(0,e.jsx)(Be,{variant:"list"}):O.length===0?(0,e.jsx)("div",{className:"py-6 text-sm text-muted-foreground",children:"No saved versions yet."}):O.map(p=>(0,e.jsxs)("div",{className:"grid gap-2 border-b border-border px-0 py-3 text-sm last:border-b-0 sm:grid-cols-(--gtc-13)",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"font-medium",children:Xs(p)}),(0,e.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[ja(p.createdAt)," · ",p.fileInventory.length," files"]})]}),(0,e.jsx)(N,{type:"button",variant:"ghost",size:"sm",onClick:n(()=>bs(p.id),"onClick"),children:"View diff"})]},p.id))}),(0,e.jsx)(Sl,{open:Es,onOpenChange:Ye,versions:O,leftVersionId:me,rightVersionId:Ne,onLeftVersionChange:Ee,onRightVersionChange:Ze})]})}n(ze,"renderVersionsBody");function Q(){const p=g.usedByAgents;return(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:[p.length," ",p.length===1?"agent":"agents"," attached",ys?` · ${Xs(ys)}`:" · Latest"]}),(0,e.jsx)(En,{agents:Z,attachedAgentIds:p.map(M=>M.id),versions:I,selectedVersionId:Bt(g),pending:oe,onSubmit:P})]}),p.length===0?(0,e.jsx)("div",{className:"rounded-md border border-dashed border-border py-8 text-center text-sm text-muted-foreground",children:"No agents are using this skill yet. Use “Add to agent” to attach it."}):(0,e.jsx)("div",{className:"border-y border-border",children:p.map(M=>{const le=es.get(M.id);return(0,e.jsxs)("div",{className:"flex items-center gap-3 border-b border-border py-3 text-sm last:border-b-0",children:[(0,e.jsx)(kn,{agent:le,size:16,className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)("span",{className:"truncate font-medium",children:M.name}),le?.paused?(0,e.jsxs)(se,{variant:"outline",className:"[&>svg]:size-2.5 border-amber-500/30 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-wide text-amber-500",children:[(0,e.jsx)(At,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Paused"]}):null]}),(0,e.jsx)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:M.adapterType})]}),(0,e.jsx)(Ke,{to:`/agents/${M.urlKey}/skills`,className:"shrink-0 text-xs text-muted-foreground no-underline hover:text-foreground",children:"View"})]},M.id)})})]})}n(Q,"renderAgentsBody");const et=h==="files"?qs():h==="versions"?ze():h==="agents"?Q():ae();return(0,e.jsxs)("div",{className:"min-h-(--sz-calc-30)",children:[(0,e.jsx)("div",{className:"border-b border-border px-4 py-5",children:(0,e.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,e.jsx)(Ht,{card:{key:t.key,name:t.name,slug:t.slug,iconUrl:t.iconUrl,color:t.color},size:44}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,e.jsx)("h1",{className:"truncate text-2xl font-semibold",children:t.name}),(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ve,{asChild:!0,children:(0,e.jsx)("span",{className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground","aria-label":`Installed from ${Y.label}`,children:(0,e.jsx)(qe,{className:"h-4 w-4"})})}),(0,e.jsxs)(He,{children:["Installed from ",Y.label]})]})]}),t.authorName?(0,e.jsxs)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:["by ",(0,e.jsx)("span",{className:"text-foreground",children:t.authorName})]}):null,Je?(0,e.jsxs)("div",{className:"mt-1 max-w-2xl",children:[(0,e.jsx)("p",{ref:ke,className:A("text-sm text-muted-foreground",!be&&"line-clamp-4"),children:Je}),fs?(0,e.jsx)("button",{type:"button",onClick:n(()=>gs(p=>!p),"onClick"),className:"mt-0.5 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:be?"Show less":"View all"}):null]}):null]})]}),(0,e.jsx)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:t.categories.slice(0,4).map(p=>(0,e.jsx)(ar,{label:p},p))})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-1",children:[(0,e.jsx)(N,{variant:"outline",size:"sm",asChild:!0,children:(0,e.jsxs)(Ke,{to:U,children:[(0,e.jsx)(na,{className:"mr-1.5 h-3.5 w-3.5"}),"Open in Studio"]})}),(0,e.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border border-border",children:[(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ve,{asChild:!0,children:(0,e.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs text-muted-foreground",children:[(0,e.jsx)($t,{className:"h-3.5 w-3.5","aria-hidden":"true"}),(0,e.jsx)("span",{className:"font-medium text-foreground",children:t.attachedAgentCount}),(0,e.jsx)("span",{className:"hidden sm:inline",children:t.attachedAgentCount===1?"install":"installs"})]})}),(0,e.jsx)(He,{children:"Agents in this organization that currently have this skill installed."})]}),(0,e.jsxs)("button",{type:"button",onClick:Pe,disabled:us,className:"inline-flex items-center gap-1.5 border-l border-border px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground disabled:opacity-50",title:t.starredByCurrentActor?"Unstar this skill":"Star this skill",children:[(0,e.jsx)(Xn,{className:A("h-3.5 w-3.5",t.starredByCurrentActor&&"fill-current text-yellow-400")}),(0,e.jsx)("span",{className:"hidden sm:inline",children:t.starredByCurrentActor?"Starred":"Star"}),(0,e.jsx)("span",{className:"font-medium text-foreground",children:t.starCount})]}),(0,e.jsxs)("button",{type:"button",onClick:pe,className:"inline-flex items-center gap-1.5 border-l border-border px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground",title:"Fork this skill",children:[(0,e.jsx)(Ls,{className:"h-3.5 w-3.5"}),(0,e.jsx)("span",{className:"hidden sm:inline",children:g.sourceType==="github"?"Make a copy":"Fork"}),(0,e.jsx)("span",{className:"font-medium text-foreground",children:t.forkCount})]})]})]})]})}),(0,e.jsxs)("div",{className:"grid gap-6 px-4 py-4 xl:grid-cols-(--gtc-29)",children:[(0,e.jsxs)("main",{className:"min-w-0",children:[(0,e.jsx)(Wn,{value:h,onValueChange:n(p=>r(p),"onValueChange"),children:(0,e.jsx)(Hn,{variant:"line",className:"mb-5 w-full max-w-full justify-start overflow-x-auto border-b border-border p-0 pb-1.5 [scrollbar-width:none]",children:Nl.map(p=>{const M=p.icon;return(0,e.jsxs)(Os,{value:p.value,className:"px-3",children:[(0,e.jsx)(M,{className:"mr-1.5 h-3.5 w-3.5"}),p.label]},p.value)})})}),et]}),(0,e.jsxs)("aside",{className:"min-w-0 space-y-6 border-t border-border pt-4 xl:border-l xl:border-t-0 xl:pl-5 xl:pt-0",children:[(0,e.jsx)(Qr,{skill:t}),(0,e.jsx)(Cl,{folderPath:l??er(t.folderPath),onMove:ge}),(0,e.jsx)(Il,{categories:t.categories,pending:ce,onSave:n(p=>Ge({categories:p,sharingScope:t.sharingScope==="public_link"?"company":t.sharingScope}),"onSave")}),(0,e.jsxs)("section",{children:[(0,e.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Agents"}),(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsx)(En,{agents:Z,attachedAgentIds:t.usedByAgents.map(p=>p.id),versions:I,selectedVersionId:Bt(t),pending:oe,onSubmit:P,fullWidth:!0}),t.usedByAgents.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"No agents attached yet."}):(0,e.jsxs)("div",{className:"space-y-0.5",children:[t.usedByAgents.slice(0,3).map(p=>{const M=es.get(p.id);return(0,e.jsxs)(Ke,{to:`/agents/${p.urlKey}/skills`,className:"flex items-center gap-2 rounded-md px-1.5 py-1 text-sm no-underline hover:bg-accent/40",children:[(0,e.jsx)(kn,{agent:M,size:16,className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:p.name}),M?.paused?(0,e.jsx)(At,{className:"h-3 w-3 shrink-0 text-amber-500","aria-label":"Paused"}):null]},p.id)}),t.usedByAgents.length>3?(0,e.jsxs)("p",{className:"px-1.5 pt-0.5 text-xs text-muted-foreground",children:["and ",t.usedByAgents.length-3," more"]}):null]})]})]}),(0,e.jsxs)("section",{children:[(0,e.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Source"}),$?(0,e.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[(0,e.jsx)(Ot,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-foreground",children:Ns}),(0,e.jsxs)("a",{href:Re??void 0,target:"_blank",rel:"noreferrer",title:ws??void 0,className:"mt-0.5 flex max-w-full items-start gap-1 text-xs text-muted-foreground no-underline transition-colors [overflow-wrap:anywhere] hover:text-foreground",children:[(0,e.jsx)("span",{className:"min-w-0 [overflow-wrap:anywhere]",children:ws}),(0,e.jsx)(Ds,{className:"h-3 w-3 shrink-0","aria-hidden":"true"})]}),(0,e.jsxs)("div",{className:"mt-0.5 truncate font-mono text-(length:--text-micro) text-muted-foreground",title:$.commit,children:[$.ref,$.commit?` · ${$.commit.slice(0,7)}`:""]})]})]}):(0,e.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[(0,e.jsx)(qe,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-foreground",children:Y.label}),re?$s?(0,e.jsxs)("a",{href:$s,target:"_blank",rel:"noreferrer",title:re??void 0,className:"mt-0.5 flex max-w-full items-start gap-1 text-xs text-muted-foreground no-underline transition-colors [overflow-wrap:anywhere] hover:text-foreground",children:[(0,e.jsx)("span",{className:"min-w-0 [overflow-wrap:anywhere]",children:re}),(0,e.jsx)(Ds,{className:"h-3 w-3 shrink-0","aria-hidden":"true"})]}):(0,e.jsx)("div",{className:"mt-0.5 min-w-0 text-xs text-muted-foreground [overflow-wrap:anywhere]",title:re??void 0,children:re}):(0,e.jsx)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:Y.managedLabel})]})]})]}),t.sourceType==="github"?(0,e.jsxs)("section",{children:[(0,e.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updates"}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ve,{asChild:!0,children:(0,e.jsx)(ua,{className:"h-3.5 w-3.5 shrink-0","aria-label":"Pinned source revision"})}),(0,e.jsx)(He,{children:"Pinned source revision"})]}),(0,e.jsx)("span",{className:"truncate font-mono text-foreground",children:vs??"untracked"})]}),(0,e.jsxs)(N,{variant:"outline",size:"sm",className:"w-full",onClick:Ce,disabled:Ae||W,children:[(0,e.jsx)(ct,{className:A("mr-1.5 h-3.5 w-3.5",(Ae||W)&&"animate-spin")}),"Check for updates"]}),L?.supported&&L.hasUpdate?(0,e.jsxs)(N,{size:"sm",className:"w-full",onClick:he,disabled:Me,children:[(0,e.jsx)(Kt,{className:A("mr-1.5 h-3.5 w-3.5",Me&&"animate-spin")}),"Install update",Zs?` ${Zs}`:""]}):L?.supported&&!L.hasUpdate&&!W?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Up to date."}):null]})]}):null,(0,e.jsx)("section",{children:(0,e.jsxs)("button",{type:"button",onClick:n(()=>{Xe(t.sharingScope==="public_link"?"company":t.sharingScope),ue(t.categories.join(", ")),hs(!0)},"onClick"),className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-accent/30 hover:text-foreground",children:[(0,e.jsx)(la,{className:"h-4 w-4 shrink-0"}),(0,e.jsx)("span",{className:"flex-1",children:"Settings"})]})})]})]}),ve?(0,e.jsxs)("div",{className:"fixed bottom-(--sz-calc-14) left-1/2 z-40 flex max-w-(--sz-calc-4) -translate-x-1/2 flex-wrap items-center justify-center gap-3 rounded-2xl border border-border bg-background/95 px-4 py-2 shadow-lg backdrop-blur sm:rounded-full md:bottom-6",children:[(0,e.jsx)("span",{className:"text-sm text-muted-foreground",children:"Unsaved changes"}),(0,e.jsx)(N,{variant:"ghost",size:"sm",onClick:n(()=>{y(je),K(!1)},"onClick"),disabled:b,children:"Discard"}),(0,e.jsxs)(N,{size:"sm",onClick:_,disabled:b,children:[(0,e.jsx)(It,{className:"mr-1.5 h-3.5 w-3.5"}),b?"Saving…":"Save changes"]})]}):null,(0,e.jsx)(Ms,{open:xs,onOpenChange:hs,children:(0,e.jsxs)(Ks,{className:"sm:max-w-md",children:[(0,e.jsxs)(Ts,{children:[(0,e.jsx)(As,{children:"Skill settings"}),(0,e.jsxs)(Ys,{children:["Manage how ",t.name," is grouped and shared."]})]}),(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("label",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Categories"}),(0,e.jsx)(Oe,{value:ne,onChange:n(p=>ue(p.target.value),"onChange"),placeholder:"engineering, review, memory",className:"h-9",disabled:ce}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Separate categories with commas. Leave empty to clear categories."})]}),(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("label",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Sharing"}),(0,e.jsxs)("select",{value:ps,onChange:n(p=>Xe(p.target.value),"onChange"),disabled:ce,className:"h-9 w-full rounded-md border border-border bg-background px-2 text-sm text-foreground",children:[(0,e.jsx)("option",{value:"company",children:"Organization — visible inside this organization"}),(0,e.jsx)("option",{value:"private",children:"Private — only visible in your library"})]}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Public link sharing is coming later."})]}),(0,e.jsxs)("div",{className:"flex justify-end gap-2 border-t border-border pt-4",children:[(0,e.jsx)(N,{type:"button",variant:"ghost",size:"sm",onClick:n(()=>{Xe(g.sharingScope==="public_link"?"company":g.sharingScope),ue(g.categories.join(", "))},"onClick"),disabled:!Ie||ce,children:"Reset"}),(0,e.jsxs)(N,{type:"button",size:"sm",onClick:n(()=>Ge({sharingScope:ps,categories:ks}),"onClick"),disabled:!Ie||ce,children:[(0,e.jsx)(It,{className:"mr-1.5 h-3.5 w-3.5"}),ce?"Saving…":"Save settings"]})]}),t.editable?(0,e.jsxs)("div",{className:"rounded-md border border-destructive/40 p-3",children:[(0,e.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-destructive",children:"Danger zone"}),(0,e.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,e.jsx)("p",{className:"min-w-0 text-xs text-muted-foreground",children:"Remove this skill from the organization library."}),(0,e.jsxs)(N,{variant:"destructive",size:"sm",className:"shrink-0",onClick:ms,disabled:fe,title:t.usedByAgents.length>0?"Detach this skill from all agents before removing it.":void 0,children:[(0,e.jsx)(ga,{className:"mr-1.5 h-3.5 w-3.5"}),fe?"Removing…":"Remove"]})]})]}):null]})]})})]})}n(Fl,"SkillDetailPage");function zl({collectionView:t}={}){const{"*":l}=xa(),o=ma(),i=aa(),[x,h]=Na(),{selectedCompanyId:r}=ra(),{setBreadcrumbs:c}=va(),{pushToast:a}=ha(),S=Ta(),{enabled:k}=wa(),C=Hr(),v=n((s,d,u,D)=>{C.capture(s,D)||a({tone:"error",title:d,body:s instanceof Error?G(s).body:u})},"reportSkillError"),[w,K]=(0,m.useState)(""),[y,_]=(0,m.useState)(""),[b,I]=(0,m.useState)(!1),[te,Z]=(0,m.useState)(null),[P,oe]=(0,m.useState)({}),[f,q]=(0,m.useState)("preview"),[E,L]=(0,m.useState)(!1),[W,Ce]=(0,m.useState)(""),[Ae,he]=(0,m.useState)(null),[Me,Pe]=(0,m.useState)(null),[us,pe]=(0,m.useState)(null),[Ge,ce]=(0,m.useState)(!1),[ge,ms]=(0,m.useState)(null),[fe,We]=(0,m.useState)(null),[Es,Ye]=(0,m.useState)(""),[xs,hs]=(0,m.useState)("all"),[ps,Xe]=(0,m.useState)(""),[ne,ue]=(0,m.useState)("SKILL.md"),[ke,be]=(0,m.useState)(null),[gs,fs]=(0,m.useState)({}),[V,O]=(0,m.useState)({open:!1,catalogSkill:null,conflict:null,defaultSlug:null,defaultForce:!1,defaultAction:"install",error:null}),[me,Ee]=(0,m.useState)(""),[Ne,Ze]=(0,m.useState)(t==="authored"?"recent":"agents"),[bs,je]=(0,m.useState)(null),[ve,$e]=(0,m.useState)(!1),[g,U]=(0,m.useState)(!1),[Y,qe]=(0,m.useState)(!1),[js,vs]=(0,m.useState)(null),[Zs,ys]=(0,m.useState)(null),[Je,ks]=(0,m.useState)(null),[ut,Js]=(0,m.useState)(!1),[Ie,es]=(0,m.useState)(null),[$,Ns]=(0,m.useState)(!1),[ws,Re]=(0,m.useState)([]),[re,$s]=(0,m.useState)([]),qs=(0,m.useMemo)(()=>Za(l),[l]),ae=l==="studio/new",ze=ae?null:qs.skillToken,Q=qs.filePath,et=x.get("view"),p=et==="catalog"?"catalog":"installed",M=x.get("source")??"all";["all","company","bundled","optional","external"].includes(M);const le=x.get("catalog"),Rs=x.get("tab"),mt=cl(Rs??(et==="catalog"?"catalog":null)),Ss=["all","installed","catalog","bundled"].includes(Rs)?Rs:"installed",Fe=t==="authored"?"installed":k?mt:Ss==="installed"?"installed":"discover",lr=["overview","files","versions","agents"].includes(Rs)?Rs:qs.hasExplicitFilePath||Q!=="SKILL.md"?"files":"overview",ir=x.get("category"),xe=ae&&x.get("forkFrom")?.trim()||null,xt=ae&&x.get("folderId")?.trim()||null,ss=!ae&&!ze&&!le,ht=qa(x.get("folder")),pt=!k,ts=pt?ir:null,J=pt?ht:"all";function or(s){h(d=>ul(d,s))}n(or,"setDiscoveryTab");function Yt(s){h(d=>{const u=new URLSearchParams(d);return s==="installed"?u.delete("tab"):u.set("tab",s),u.delete("category"),s!=="installed"&&u.delete("folder"),u})}n(Yt,"setLegacyDiscoveryTab");function Cs(s){h(d=>{const u=new URLSearchParams(d);u.set("tab","installed"),u.delete("category");const D=Wa(s);return D?u.set("folder",D):u.delete("folder"),u})}n(Cs,"setFolderSelection");function Is(s=[],d=null){$s(s),vs(null),ys(d),qe(!0)}n(Is,"openCreateFolder");function Xt(s){h(d=>{const u=new URLSearchParams(d);return s==="overview"?u.delete("tab"):u.set("tab",s),u})}n(Xt,"setDetailTab");function dr(s){h(d=>{const u=new URLSearchParams(d);return s?u.set("category",s):u.delete("category"),u})}n(dr,"setDiscoveryCategory");function cr(s,d="SKILL.md"){h(u=>{const D=new URLSearchParams(u);return s?D.set("catalog",s):D.delete("catalog"),D}),ue(d)}n(cr,"selectCatalog"),(0,m.useEffect)(()=>{ae&&je(null)},[ae,xe]),(0,m.useEffect)(()=>{if(!k)return;const s=x.get("tab"),d=ss&&["all","catalog","bundled"].includes(s??""),u=ss&&(x.has("category")||x.has("folder"));!x.has("view")&&!d&&!u||h(D=>{const T=new URLSearchParams(D);return(d||T.get("view")==="catalog"&&!T.has("tab"))&&T.set("tab","discover"),T.delete("view"),ss&&(T.delete("category"),T.delete("folder")),T},{replace:!0})},[ss,x,h,k]),(0,m.useEffect)(()=>{k&&(Ns(!1),Re([]))},[k]);const ns=de({queryKey:j.companySkills.list(r??""),queryFn:n(()=>z.list(r),"queryFn"),enabled:!!r}),we=de({queryKey:j.folders.list(r??"","skill"),queryFn:n(()=>ye.list(r,"skill"),"queryFn"),enabled:!!(r&&(ss&&Fe==="installed"||ze))}),st=Qs(ns),ie=ns.data??[],zs=(0,m.useMemo)(()=>Ya(ze,ie),[ze,ie]),F=zs.skill?.id??null,rs=de({queryKey:j.companySkills.detail(r??"",F??""),queryFn:n(()=>z.detail(r,F),"queryFn"),enabled:!!(r&&F)}),ur=Qs(rs),_e=de({queryKey:j.companySkills.file(r??"",F??"",Q),queryFn:n(()=>z.file(r,F,Q),"queryFn"),enabled:!!(r&&F&&Q)}),Zt=de({queryKey:j.companySkills.versions(r??"",F??""),queryFn:n(()=>z.versions(r,F),"queryFn"),enabled:!!(r&&F)}),as=de({queryKey:j.companySkills.detail(r??"",xe??""),queryFn:n(()=>z.detail(r,xe),"queryFn"),enabled:!!(r&&ae&&xe)}),mr=(0,m.useMemo)(()=>{if(!ae)return Dt();const s=xe?as.data?Ka(as.data):Dt():Dt();return xt?{...s,folderId:xt}:s},[ae,as.data,xe,xt]),xr=(0,m.useMemo)(()=>{if(J==="all"||J==="unfiled")return null;const s=ds(we.data).byId.get(J);return!s||s.path==="bundled"||s.path.startsWith("bundled/")||s.path==="projects"||s.path.startsWith("projects/")?null:s.id},[we.data,J]),tt=de({queryKey:j.companySkills.updateStatus(r??"",F??""),queryFn:n(()=>z.updateStatus(r,F),"queryFn"),enabled:!!(r&&F&&(rs.data?.sourceType==="github"||Ae?.sourceType==="github")),staleTime:6e4});(0,m.useEffect)(()=>{if(!zs.skill||!zs.shouldRedirect||ns.isLoading)return;const s=x.toString();o({pathname:Ps(zs.skill,ie,Q),search:s?`?${s}`:""},{replace:!0})},[ie,o,zs,x,Q,ns.isLoading]),(0,m.useEffect)(()=>{Z(F)},[F]),(0,m.useEffect)(()=>{if(!F||Q==="SKILL.md")return;const s=Dn(Q);s.length!==0&&oe(d=>{const u=new Set(d[F]??[]);let D=!1;for(const T of s)u.has(T)||(u.add(T),D=!0);return D?{...d,[F]:u}:d})},[Q,F]),(0,m.useEffect)(()=>{L(!1)},[F,Q]),(0,m.useEffect)(()=>{rs.data&&he(rs.data)},[rs.data]),(0,m.useEffect)(()=>{_e.data&&(Pe(_e.data),Ce(_e.data.markdown?ot(_e.data.content).body:_e.data.content))},[_e.data]),(0,m.useEffect)(()=>{F||(he(null),Pe(null))},[F]);const B=rs.data??Ae;(0,m.useEffect)(()=>{c([{label:"Skills",href:"/skills"},...t==="authored"?[{label:"My Skills"}]:ae?[{label:xe?"Fork skill":"New skill"}]:B?ml(B,we.data).slice(1):ze?[{label:"Detail"}]:[]])},[B,t,ae,ze,c,we.data,xe]);const nt=_e.data??Me;function Fs(s,d){return Ps(s,Xa(ie,s),d)}n(Fs,"routeForSkill");function gt(s,d){const u=ie.find(D=>D.id===s)??(B?.id===s?B:null);return u?Fs(u,d):Ps(s,d)}n(gt,"routeForSkillId");function hr(){ms(F),We(B??null),ce(!0)}n(hr,"openDeleteDialog");function rt(s){ce(s),s||(ms(null),We(null))}n(rt,"closeDeleteDialog");const ft=X({mutationFn:n(s=>z.importFromSource(r,s),"mutationFn"),onSuccess:n(async s=>{await i.invalidateQueries({queryKey:j.companySkills.list(r)}),s.imported[0]&&o(Fs(s.imported[0])),a({tone:"success",title:"Skills imported",body:`${s.imported.length} skill${s.imported.length===1?"":"s"} added.`}),s.warnings[0]&&a({tone:"warn",title:"Import warnings",body:s.warnings[0]}),_("")},"onSuccess"),onError:n(s=>{v(s,"Skill import failed","Failed to import skill source.","Importing skills")},"onError")}),Jt=X({mutationFn:n(s=>z.scanProjects(r,s?{projectIds:[s]}:{}),"mutationFn"),onMutate:n(s=>{pe(s?"Refreshing project skills...":"Scanning project workspaces for skills...")},"onMutate"),onSuccess:n(async s=>{pe("Refreshing skills list..."),await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.folders.list(r,"skill")})]);const d=rl(s);pe(d),a({tone:"success",title:"Project skill scan complete",body:d}),s.conflicts[0]?a({tone:"warn",title:"Skill conflicts found",body:s.conflicts[0].reason}):s.warnings[0]&&a({tone:"warn",title:"Scan warnings",body:s.warnings[0]})},"onSuccess"),onError:n(s=>{pe(null),v(s,"Project skill scan failed","Failed to scan project workspaces.","Scanning projects for skills")},"onError")}),en=X({mutationFn:n(s=>z.create(r,s),"mutationFn"),onSuccess:n(async s=>{await i.invalidateQueries({queryKey:j.companySkills.list(r)}),o(Fs(s)),je(null),a({tone:"success",title:s.forkedFromSkillId?"Skill fork created":"Skill created",body:`${s.name} is now editable in the Microvac workspace.`})},"onSuccess"),onError:n(s=>{const d=G(s).body;je(d),v(s,"Skill creation failed","Failed to create skill.","Creating a skill")},"onError")}),sn=X({mutationFn:n(()=>z.updateFile(r,F,Q,nt?.markdown?nl(nt.content,W):W),"mutationFn"),onSuccess:n(async s=>{await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.companySkills.detail(r,F)}),i.invalidateQueries({queryKey:j.companySkills.file(r,F,Q)})]),Ce(s.markdown?ot(s.content).body:s.content),L(!1),a({tone:"success",title:"Skill saved",body:s.path})},"onSuccess"),onError:n(s=>{a({tone:"error",title:"Save failed",body:G(s).body})},"onError")}),tn=X({mutationFn:n(()=>{if(!B)throw new Error("Select a skill first.");return B.starredByCurrentActor?z.unstar(r,B.id):z.star(r,B.id)},"mutationFn"),onSuccess:n(async()=>{B&&await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.companySkills.detail(r,B.id)})])},"onSuccess"),onError:n(s=>{a({tone:"error",title:"Star failed",body:G(s).body})},"onError")}),nn=X({mutationFn:n(s=>z.update(r,s.skillId,s.updates),"mutationFn"),onSuccess:n(async s=>{i.setQueryData(j.companySkills.detail(r,s.id),d=>d&&{...d,...s}),i.setQueryData(j.companySkills.list(r),d=>d?.map(u=>u.id===s.id?{...u,...s}:u)),await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.companySkills.detail(r,s.id)})]),a({tone:"success",title:"Skill settings updated",body:xl(s)})},"onSuccess"),onError:n(s=>{a({tone:"error",title:"Skill settings update failed",body:G(s).body})},"onError")}),rn=X({mutationFn:n(()=>z.installUpdate(r,F),"mutationFn"),onSuccess:n(async s=>{await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.companySkills.detail(r,F)}),i.invalidateQueries({queryKey:j.companySkills.updateStatus(r,F)}),i.invalidateQueries({queryKey:j.companySkills.file(r,F,Q)})]),o(Fs(s,Q)),a({tone:"success",title:"Skill updated",body:s.sourceRef?`Pinned to ${dt(s.sourceRef)}`:s.name})},"onSuccess"),onError:n(s=>{v(s,"Update failed","Failed to install skill update.","Updating this skill")},"onError")}),De=de({queryKey:j.companySkills.catalog(),queryFn:n(()=>z.catalogList(),"queryFn"),enabled:!!r,staleTime:6e4}),bt=Qs(De),jt=[st,bt].find(s=>s.kind==="error"),vt=de({queryKey:j.companySkills.catalogDetail(le??""),queryFn:n(()=>z.catalogDetail(le),"queryFn"),enabled:!!(r&&le),staleTime:6e4}),pr=Qs(vt),gr=de({queryKey:j.companySkills.catalogFile(le??"",ne),queryFn:n(()=>z.catalogFile(le,ne),"queryFn"),enabled:!!(r&&le&&ne),staleTime:6e4}),an=de({queryKey:j.agents.list(r??""),queryFn:n(()=>lt.list(r),"queryFn"),enabled:!!r}),_s=(0,m.useMemo)(()=>new Map(ie.map(s=>[s.key,s])),[ie]);(0,m.useMemo)(()=>{const s=new Set;for(const d of De.data??[])s.add(d.category);return Array.from(s).sort()},[De.data]);const ls=(0,m.useMemo)(()=>hl(ie,De.data??[]),[ie,De.data]),Ue=(0,m.useMemo)(()=>t==="authored"?An(ls,"installed"):k?An(ls,mt):Ss==="installed"?ls.filter(s=>s.installed):Ss==="catalog"?ls.filter(s=>s.catalogRef!=null):Ss==="bundled"?ls.filter(s=>s.required):ls,[t,ls,mt,Ss,k]),fr=(0,m.useMemo)(()=>{const s=new Map;for(const d of Ue)for(const u of d.categories)s.set(u,(s.get(u)??0)+1);return Array.from(s.entries()).map(([d,u])=>({slug:d,count:u})).sort((d,u)=>u.count-d.count||d.slug.localeCompare(u.slug))},[Ue]),ln=me.trim().length>0,yt=(0,m.useMemo)(()=>{if(J==="all"||J==="unfiled")return null;const s=ds(we.data);return s.byId.has(J)?Nn(s,J):null},[we.data,J]),br=(0,m.useMemo)(()=>pl(Ue.filter(s=>ts&&!s.categories.includes(ts)||Fe==="installed"&&!ln&&(J==="unfiled"&&s.folderId||yt&&(!s.folderId||!yt.has(s.folderId)))?!1:Mn(s,me.trim())),Ne,Fe==="discover"),[me,ln,Ne,Ue,Fe,yt,ts,J]),R=vt.data??(De.data??[]).find(s=>s.id===le||s.key===le)??null;(0,m.useEffect)(()=>{be(R?.id??null)},[R?.id]),(0,m.useEffect)(()=>{if(!R||ne==="SKILL.md")return;const s=Dn(ne);s.length!==0&&fs(d=>{const u=new Set(d[R.id]??[]);let D=!1;for(const T of s)u.has(T)||(u.add(T),D=!0);return D?{...d,[R.id]:u}:d})},[ne,R]),(0,m.useMemo)(()=>{const s={all:ie.length,company:0,bundled:0,optional:0,external:0};for(const d of ie){const u=il(d);s[u]+=1}return s},[ie]);const kt=X({mutationFn:n(s=>z.installCatalog(r,{catalogSkillId:s.catalogSkillId,slug:s.slug,force:s.force}),"mutationFn"),onSuccess:n(async(s,d)=>{const u=s.action==="created"?d.agentIds:[];let D=0,T=0;for(const Le of u)try{await lt.syncSkills(Le,[{key:s.skill.key,versionId:null}],"add",r??void 0),D+=1}catch{T+=1}await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.companySkills.detail(r,s.skill.id)})]),O(Le=>({...Le,open:!1,error:null})),a({tone:"success",title:s.action==="created"?"Skill installed":s.action==="updated"?"Skill updated":"Skill is up to date",body:s.action==="created"?D>0?`${s.skill.name} — enabled for ${D} agent${D===1?"":"s"}.`:`${s.skill.name} is in the library but not enabled for any agent yet. Use "Add to agent" to enable it.`:s.skill.name}),T>0&&a({tone:"warn",title:"Skill installed, but enabling failed",body:`Could not enable ${s.skill.name} for ${T} agent${T===1?"":"s"}. Use "Add to agent" on the skill page.`}),s.warnings[0]&&a({tone:"warn",title:"Install warnings",body:s.warnings[0]}),s.action==="created"&&o(Fs(s.skill))},"onSuccess"),onError:n(s=>{const d=G(s).body;O(u=>({...u,error:d})),C.capture(s,"Installing this skill")},"onError")}),on=X({mutationFn:n(s=>ye.create(r,{kind:"skill",parentId:Zs,...s}),"mutationFn"),onSuccess:n(async s=>{if(qe(!1),vs(null),ys(null),await i.invalidateQueries({queryKey:j.folders.list(r,"skill")}),re.length>0){const d=re;$s([]);try{await Promise.all(d.map(u=>ye.moveItem(r,{kind:"skill",itemId:u,folderId:s.id}))),await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.folders.list(r,"skill")})])}catch(u){a({tone:"error",title:"Folder created, move failed",body:G(u).body});return}}else Cs(s.id);a({tone:"success",title:"Folder created",body:s.name})},"onSuccess"),onError:n(s=>{a({tone:"error",title:"Folder save failed",body:G(s).body})},"onError")}),Nt=X({mutationFn:n(({folderId:s,payload:d})=>ye.update(r,s,d),"mutationFn"),onSuccess:n(async()=>{qe(!1),vs(null),await i.invalidateQueries({queryKey:j.folders.list(r,"skill")})},"onSuccess"),onError:n(s=>{a({tone:"error",title:"Folder save failed",body:G(s).body})},"onError")}),dn=X({mutationFn:n(({folderId:s,parentId:d})=>ye.moveFolder(r,s,{parentId:d,position:0}),"mutationFn"),onSuccess:n(async s=>{await i.invalidateQueries({queryKey:j.folders.list(r,"skill")}),Cs(s.id),a({tone:"success",title:"Folder moved",body:er(s.path)??s.name})},"onSuccess"),onError:n(s=>{a({tone:"error",title:"Folder move failed",body:G(s).body})},"onError")}),cn=X({mutationFn:n(s=>ye.delete(r,s),"mutationFn"),onSuccess:n(async(s,d)=>{ht===d&&Cs("all"),ks(null),await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.folders.list(r,"skill")})]),a({tone:"success",title:"Folder deleted",body:"Skills moved to Unfiled."})},"onSuccess"),onError:n(s=>{a({tone:"error",title:"Folder delete failed",body:G(s).body})},"onError")}),un=X({mutationFn:n(({itemId:s,folderId:d})=>ye.moveItem(r,{kind:"skill",itemId:s,folderId:d}),"mutationFn"),onSuccess:n(async()=>{await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.folders.list(r,"skill")})])},"onSuccess"),onError:n(s=>{a({tone:"error",title:"Move failed",body:G(s).body})},"onError")});async function jr(s){const d=ws;if(d.length!==0)try{await Promise.all(d.map(u=>ye.moveItem(r,{kind:"skill",itemId:u,folderId:s}))),Re([]),Ns(!1),await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.folders.list(r,"skill")})]),a({tone:"success",title:"Skills moved",body:`${d.length} skill${d.length===1?"":"s"} filed.`})}catch(u){a({tone:"error",title:"Failed to move skills",body:G(u).body})}}n(jr,"moveSelectedSkills");const at=X({mutationFn:n(()=>ye.ensureMy(r),"mutationFn"),onSuccess:n(async s=>{await i.invalidateQueries({queryKey:j.folders.list(r,"skill")}),Cs(s.id)},"onSuccess"),onError:n(s=>{a({tone:"error",title:"Couldn't open My Skills",body:G(s).body})},"onError")});async function vr(){const s=ds(we.data);if((J==="all"||J==="unfiled"?null:s.byId.get(J)??null)?.systemKey==="my"){try{const d=await at.mutateAsync();o(Lt(null,d.id))}catch{return}return}o(Lt(null,xr))}n(vr,"openNewSkill");async function yr(s){if((s?ds(we.data).byId.get(s):null)?.systemKey==="my"){try{Is([],(await at.mutateAsync()).id)}catch{return}return}Is([],s)}n(yr,"openCreateFolderIn");async function kr(s,d){if(d==="company"){dn.mutate({folderId:s.id,parentId:null});return}try{const u=await at.mutateAsync();dn.mutate({folderId:s.id,parentId:u.id})}catch{return}}n(kr,"moveFolderBetweenScopes");async function Nr(s,d){try{const u=await ye.create(r,{kind:"skill",parentId:s,name:d,color:null});return await i.invalidateQueries({queryKey:j.folders.list(r,"skill")}),u.id}catch(u){return a({tone:"error",title:"Folder create failed",body:G(u).body}),null}}n(Nr,"createFolderInline");async function wr(s){if(!Ie)return;const d=Ie.skillIds;try{await Promise.all(d.map(u=>ye.moveItem(r,{kind:"skill",itemId:u,folderId:s}))),await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.folders.list(r,"skill")}),...d.map(u=>i.invalidateQueries({queryKey:j.companySkills.detail(r,u)}))]),es(null),Re([]),Ns(!1),a({tone:"success",title:d.length===1?"Skill moved":"Skills moved",body:s?`Filed under ${Se?.folders.find(u=>u.id===s)?.name??"folder"}.`:"Moved to Unfiled."})}catch(u){a({tone:"error",title:"Move failed",body:G(u).body})}}n(wr,"performDialogMove");const mn=(0,m.useMemo)(()=>(an.data??[]).map(s=>{const d=S(s.adapterType),u=[],D=new Set((B?.usedByAgents??[]).map(T=>T.id));return{id:s.id,name:s.name,adapterType:s.adapterType,supportsSkills:!!d.supportsSkills,required:!1,icon:s.icon,paused:s.status==="paused"||s.pausedAt!=null,attached:D.has(s.id),requiredKeys:u}}),[an.data,S,B]),xn=X({mutationFn:n(async s=>lt.syncSkills(s.agentId,s.desiredSkills,"replace",r??void 0),"mutationFn"),onSuccess:n(async()=>{await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),i.invalidateQueries({queryKey:j.companySkills.detail(r,F??"")}),i.invalidateQueries({queryKey:j.companySkills.versions(r,F??"")})])},"onSuccess")});async function Sr(s,d=null){if(!B)return;const u=B.key,D=new Set(s),T=(B.usedByAgents??[]).map(H=>H.id),Le=new Set(T),St=new Map((B.usedByAgents??[]).map(H=>[H.id,H.versionId??null])),Kr=s.filter(H=>!Le.has(H)),Ar=T.filter(H=>!D.has(H)),Mr=s.filter(H=>Le.has(H)&&(St.get(H)??null)!==d),bn=new Set([...Kr,...Ar,...Mr]);if(bn.size!==0)try{for(const H of bn){const jn=await lt.skills(H,r??void 0),vn=(jn.desiredSkillEntries??jn.desiredSkills.map(Ct=>({key:Ct,versionId:null}))).filter(Ct=>Ct.key!==u);D.has(H)&&vn.push({key:u,versionId:d}),await xn.mutateAsync({agentId:H,desiredSkills:vn})}a({tone:"success",title:"Agents updated",body:`${s.length} agent(s) attached.`})}catch(H){a({tone:"error",title:"Update failed",body:G(H).body})}}n(Sr,"handleAttachSubmit");function hn(s){const d=_s.get(s.key)??null,u=d?.originHash??null,D=d?u&&u!==s.contentHash?"update":d.sourceType!=="catalog"?"replace":"update":"install";O({open:!0,catalogSkill:s,conflict:d,defaultSlug:d?.slug??s.slug,defaultForce:D==="replace",defaultAction:D,error:null})}n(hn,"openInstallDialog");const Us=X({mutationFn:n(()=>z.delete(r,ge),"mutationFn"),onSuccess:n(async s=>{rt(!1),he(null),Pe(null),await Promise.all([i.invalidateQueries({queryKey:j.companySkills.list(r)}),...ge?[i.invalidateQueries({queryKey:j.companySkills.detail(r,ge)}),i.invalidateQueries({queryKey:j.companySkills.updateStatus(r,ge)})]:[],...ge?[i.invalidateQueries({queryKey:j.companySkills.file(r,ge,Q)})]:[]]),await i.refetchQueries({queryKey:j.companySkills.list(r),type:"active"}),o("/skills",{replace:!0}),a({tone:"success",title:"Skill removed",body:`${s.name} was removed from the organization skill library.`})},"onSuccess"),onError:n(s=>{v(s,"Remove failed","Failed to remove skill.","Removing this skill")},"onError")}),Se=we.data??null,ee=ss&&Fe==="installed",is=ee&&!k,wt=(0,m.useMemo)(()=>{if(!Se||Fe!=="installed")return Se;const s=Ue.filter(T=>ts&&!T.categories.includes(ts)?!1:Mn(T,me.trim())),d=new Map;let u=0;for(const T of s)T.folderId?d.set(T.folderId,(d.get(T.folderId)??0)+1):u+=1;const D=ds(Se);return{...Se,allCount:s.length,unfiledCount:u,folders:Se.folders.map(T=>{let Le=0;for(const St of Nn(D,T.id))Le+=d.get(St)??0;return{...T,itemCount:Le}})}},[me,Ue,Fe,Se,ts]),Cr=(0,m.useMemo)(()=>Pa(ds(Se),B?.folderId),[Se,B?.folderId]);if(!r)return(0,e.jsx)(cs,{icon:Te,message:"Select an organization to manage skills."});function Ir(){const s=y.trim();if(s.length===0){I(!0);return}ft.mutate(s)}n(Ir,"handleAddSkillSource");function Fr(s){if(s.skillId){o(t==="authored"?zt(s.skillId):gt(s.skillId));return}s.catalogRef&&cr(s.catalogRef)}n(Fr,"openDiscoveryCard");const pn=new URLSearchParams(x);pn.delete("catalog");const gn=pn.toString(),Dr=gn?`/skills?${gn}`:"/skills",Lr=B?(De.data??[]).find(s=>s.key===B.key)?.source??null:null,fn=as.data?Fs(as.data):"/skills",Tr=xe?"Fork skill":"Create a new skill",Br=xe?"Review the fork metadata and create an editable organization copy.":"Create an editable organization skill in the Microvac workspace.";return(0,e.jsxs)(e.Fragment,{children:[C.denial?(0,e.jsx)("div",{className:"px-4 pt-4",children:(0,e.jsx)(_r,{denial:C.denial,onDismiss:C.reset})}):null,(0,e.jsx)(Ms,{open:Ge,onOpenChange:rt,children:(0,e.jsxs)(Ks,{className:"sm:max-w-md",children:[(0,e.jsxs)(Ts,{children:[(0,e.jsx)(As,{children:"Remove skill"}),(0,e.jsx)(Ys,{children:"Remove this skill from the organization library. If any agents still use it, removal will be blocked until it is detached."})]}),(0,e.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,e.jsx)("p",{children:fe?`You are about to remove ${fe.name}.`:"You are about to remove this skill."}),fe?.usedByAgents?.length?(0,e.jsxs)("div",{className:"rounded-md border border-border px-3 py-3 text-muted-foreground",children:["Currently used by ",fe.usedByAgents.map(s=>s.name).join(", "),"."]}):null,(fe?.usedByAgents.length??0)>0?(0,e.jsx)("p",{className:"text-muted-foreground",children:"Detach this skill from all agents to enable removal."}):null]}),(0,e.jsx)(Mt,{children:(fe?.usedByAgents.length??0)>0?(0,e.jsx)(N,{variant:"ghost",onClick:n(()=>rt(!1),"onClick"),children:"Close"}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(N,{variant:"ghost",onClick:n(()=>rt(!1),"onClick"),disabled:Us.isPending,children:"Cancel"}),(0,e.jsx)(N,{variant:"destructive",onClick:n(()=>Us.mutate(),"onClick"),disabled:Us.isPending||!ge,children:Us.isPending?"Removing...":"Remove skill"})]})})]})}),(0,e.jsx)(Ms,{open:b,onOpenChange:I,children:(0,e.jsxs)(Ks,{className:"sm:max-w-md",children:[(0,e.jsxs)(Ts,{children:[(0,e.jsx)(As,{children:"Add a skill source"}),(0,e.jsx)(Ys,{children:"Paste a local path, GitHub URL, or `skills.sh` command into the field first."})]}),(0,e.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,e.jsxs)("a",{href:"https://skills.sh",target:"_blank",rel:"noreferrer",className:"flex items-start justify-between rounded-md border border-border px-3 py-3 text-foreground no-underline transition-colors hover:bg-accent/40",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("span",{className:"block font-medium",children:"Browse skills.sh"}),(0,e.jsx)("span",{className:"mt-1 block text-muted-foreground",children:"Find install commands and paste one here."})]}),(0,e.jsx)(Ds,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]}),(0,e.jsxs)("a",{href:"https://github.com/search?q=SKILL.md&type=code",target:"_blank",rel:"noreferrer",className:"flex items-start justify-between rounded-md border border-border px-3 py-3 text-foreground no-underline transition-colors hover:bg-accent/40",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("span",{className:"block font-medium",children:"Search GitHub"}),(0,e.jsx)("span",{className:"mt-1 block text-muted-foreground",children:"Look for repositories with `SKILL.md`, then paste the repo URL here."})]}),(0,e.jsx)(Ds,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]})]}),(0,e.jsx)(Mt,{showCloseButton:!0})]})}),(0,e.jsx)(kl,{open:V.open,onOpenChange:n(s=>O(d=>({...d,open:s,error:s?d.error:null})),"onOpenChange"),skill:V.catalogSkill,packageName:V.catalogSkill?.packageName??V.conflict?.packageName??null,packageVersion:V.catalogSkill?.packageVersion??V.conflict?.packageVersion??null,conflict:V.conflict,defaultSlug:V.defaultSlug,defaultForce:V.defaultForce,defaultAction:V.defaultAction,agents:mn,isPending:kt.isPending,error:V.error,onConfirm:n(({slug:s,force:d,agentIds:u})=>{V.catalogSkill&&kt.mutate({catalogSkillId:V.catalogSkill.id,slug:s,force:d,agentIds:u})},"onConfirm")}),(0,e.jsx)(Ms,{open:ve,onOpenChange:$e,children:(0,e.jsxs)(Ks,{className:"sm:max-w-md",children:[(0,e.jsxs)(Ts,{children:[(0,e.jsx)(As,{children:"Import a skill"}),(0,e.jsx)(Ys,{children:"Paste a local path, GitHub URL, or `skills.sh` command to import a skill into this organization."})]}),(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 border-b border-border pb-2",children:[(0,e.jsx)(Oe,{value:y,onChange:n(s=>_(s.target.value),"onChange"),placeholder:"Paste path, GitHub URL, or skills.sh command",className:"h-9 rounded-none border-0 px-0 shadow-none focus-visible:ring-0"}),(0,e.jsx)(N,{size:"sm",onClick:Ir,disabled:ft.isPending,children:ft.isPending?(0,e.jsx)(ct,{className:"h-4 w-4 animate-spin"}):"Import"})]}),(0,e.jsxs)("a",{href:"https://skills.sh",target:"_blank",rel:"noreferrer",className:"flex items-start justify-between rounded-md border border-border px-3 py-3 text-sm text-foreground no-underline transition-colors hover:bg-accent/40",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("span",{className:"block font-medium",children:"Browse skills.sh"}),(0,e.jsx)("span",{className:"mt-1 block text-muted-foreground",children:"Find install commands and paste one here."})]}),(0,e.jsx)(Ds,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]}),(0,e.jsxs)("a",{href:"https://github.com/search?q=SKILL.md&type=code",target:"_blank",rel:"noreferrer",className:"flex items-start justify-between rounded-md border border-border px-3 py-3 text-sm text-foreground no-underline transition-colors hover:bg-accent/40",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("span",{className:"block font-medium",children:"Search GitHub"}),(0,e.jsx)("span",{className:"mt-1 block text-muted-foreground",children:"Look for repositories with `SKILL.md`, then paste the repo URL."})]}),(0,e.jsx)(Ds,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]})]})]})}),r?(0,e.jsx)(Or,{open:g,onOpenChange:U,companyId:r,onImportFromPath:n(()=>{U(!1),$e(!0)},"onImportFromPath")}):null,(0,e.jsx)(Ea,{open:Y,kind:"skill",folder:js,pending:on.isPending||Nt.isPending,onOpenChange:n(s=>{qe(s),s||ys(null)},"onOpenChange"),onSubmit:n(s=>{js?Nt.mutate({folderId:js.id,payload:s}):on.mutate(s)},"onSubmit")}),(0,e.jsx)(Va,{open:Je!==null,folder:Je,itemLabelPlural:"skills",pending:cn.isPending,onOpenChange:n(s=>{s||ks(null)},"onOpenChange"),onConfirm:n(()=>{Je&&cn.mutate(Je.id)},"onConfirm")}),(0,e.jsx)($a,{open:ut,onOpenChange:Js,result:wt,selection:ht,allLabel:"All skills",itemLabelPlural:"Skills",onSelect:Cs,onCreate:n(()=>Is(),"onCreate")}),(0,e.jsx)(Vr,{open:Ie!==null,onOpenChange:n(s=>{s||es(null)},"onOpenChange"),result:wt,title:Ie?.title??"Move to folder",subtitle:Ie?.subtitle??null,currentFolderId:Ie?.currentFolderId??null,onMove:n(s=>{wr(s)},"onMove"),onCreateFolder:Nr}),ae?(0,e.jsxs)("div",{className:"min-h-(--sz-calc-30)",children:[(0,e.jsxs)("div",{className:"border-b border-border px-4 py-5",children:[(0,e.jsxs)(Ke,{to:fn,className:"mb-3 inline-flex items-center gap-1.5 text-sm text-muted-foreground no-underline transition-colors hover:text-foreground",children:[(0,e.jsx)(yn,{className:"h-4 w-4"}),"Back"]}),(0,e.jsx)("h1",{className:"text-2xl font-semibold",children:Tr}),(0,e.jsx)("p",{className:"mt-1 max-w-2xl text-sm text-muted-foreground",children:Br})]}),(0,e.jsx)("div",{className:"px-4 py-4",children:(0,e.jsx)("div",{className:"max-w-3xl",children:xe&&as.isLoading?(0,e.jsx)(Be,{variant:"detail"}):xe&&!as.data?(0,e.jsx)(cs,{icon:Te,message:"Fork source skill not found."}):(0,e.jsx)(jl,{initialDraft:mr,onCreate:n(s=>en.mutate(s),"onCreate"),isPending:en.isPending,error:bs,onCancel:n(()=>o(fn),"onCancel")})})})]}):ss?(0,e.jsxs)(e.Fragment,{children:[k?null:(0,e.jsx)("div",{className:"px-4 pt-4",children:(0,e.jsx)(Wn,{value:Ss,onValueChange:n(s=>Yt(s),"onValueChange"),children:(0,e.jsxs)(Hn,{variant:"line","aria-label":"Skills view",children:[(0,e.jsx)(Os,{value:"all",children:"All"}),(0,e.jsx)(Os,{value:"installed",children:"Installed"}),(0,e.jsx)(Os,{value:"catalog",children:"Catalog"}),(0,e.jsx)(Os,{value:"bundled",children:"Bundled"})]})})}),t!=="authored"?(0,e.jsx)(Ur,{companyId:r}):null,(0,e.jsx)(bl,{collectionView:t,navigation:k?(0,e.jsx)(Ja,{activeView:t??Fe}):void 0,tab:Fe,categories:fr,categoryTotal:Ue.length,activeCategory:ts,onCategoryChange:dr,search:me,onSearchChange:Ee,sort:Ne,onSortChange:Ze,cards:br,onOpenCard:Fr,loading:ns.isLoading||De.isLoading||st.kind==="reconnecting"||bt.kind==="reconnecting",error:jt?.error,onRetry:jt?.retry,retrying:jt?.isFetching,totalCount:Ue.length,onCreate:n(()=>{vr()},"onCreate"),onImport:n(()=>$e(!0),"onImport"),onImportFromProject:n(()=>U(!0),"onImportFromProject"),onBrowseDiscover:n(()=>t==="authored"?o("/skills?tab=discover"):k?or("discover"):Yt("catalog"),"onBrowseDiscover"),onScan:n(s=>Jt.mutate(s),"onScan"),scanPending:Jt.isPending,scanStatus:us,folderResult:ee?wt:null,folderSelection:J,foldersLoading:we.isLoading,selectMode:is&&$,selectedSkillIds:is?ws:[],onFolderSelect:ee?Cs:void 0,onOpenMobileFolders:ee?()=>Js(!0):void 0,onCreateFolder:ee?()=>Is():void 0,onCreateFolderIn:ee?s=>{yr(s)}:void 0,onEnsureMyFolder:ee?()=>at.mutate():void 0,onOpenMoveCard:ee?s=>{s.skillId&&es({skillIds:[s.skillId],title:`Move "${s.name}"`,subtitle:"Choose a destination folder.",currentFolderId:s.folderId??null})}:void 0,onRenameFolder:ee?(s,d)=>Nt.mutate({folderId:s.id,payload:{name:d}}):void 0,onEditFolder:ee?s=>{vs(s),qe(!0)}:void 0,onMoveFolder:ee?(s,d)=>{kr(s,d)}:void 0,onDeleteFolder:ee?ks:void 0,onToggleSelectMode:is?()=>{Ns(s=>!s),$&&Re([])}:void 0,onSelectCard:is?(s,d)=>{s.skillId&&Re(u=>d?Array.from(new Set([...u,s.skillId])):u.filter(D=>D!==s.skillId))}:void 0,onMoveCard:ee?(s,d)=>{if(!s.skillId)return;const u=s.skillId,D=s.folderId??null;un.mutate({itemId:u,folderId:d}),a({tone:"success",title:"Skill moved",body:d?`Moved "${s.name}" to ${Se?.folders.find(T=>T.id===d)?.name??"folder"}.`:`Moved "${s.name}" to Unfiled.`,action:{label:"Undo",onClick:n(()=>un.mutate({itemId:u,folderId:D}),"onClick")}})}:void 0,onCreateFolderAndMoveCard:ee?s=>{s.skillId&&Is([s.skillId])}:void 0,onMoveSelected:is?s=>{jr(s)}:void 0,onCreateFolderAndMoveSelected:is?()=>Is(ws):void 0,onClearSelected:is?()=>Re([]):void 0,folderNudgeStorageKey:ee?`paperclip:skills-folder-nudge:${r??"none"}`:void 0,showBrowseRails:pt})]}):p==="installed"&&F?(0,e.jsx)(Fl,{detail:B,folderDisplayPath:Cr,catalogSource:Lr,routeSkills:ie,loading:ns.isLoading||rs.isLoading||st.kind==="reconnecting"||ur.kind==="reconnecting",activeTab:lr,onTabChange:Xt,selectedPath:Q,file:nt,fileLoading:_e.isLoading&&!nt,viewMode:f,editMode:E,draft:W,setViewMode:q,setEditMode:L,setDraft:Ce,onSave:n(()=>sn.mutate(),"onSave"),savePending:sn.isPending,versions:Zt.data??[],versionsLoading:Zt.isLoading,attachAgents:mn,onSubmitAttach:Sr,attachPending:xn.isPending,expandedDirs:P[F]??new Set,onToggleDir:n(s=>{oe(d=>{const u=new Set(d[F]??[]);return u.has(s)?u.delete(s):u.add(s),{...d,[F]:u}})},"onToggleDir"),onSelectPath:n(s=>{Xt("files"),o(gt(F,s))},"onSelectPath"),updateStatus:tt.data,updateStatusLoading:tt.isLoading,onCheckUpdates:n(()=>{tt.refetch()},"onCheckUpdates"),checkUpdatesPending:tt.isFetching,onInstallUpdate:n(()=>rn.mutate(),"onInstallUpdate"),installUpdatePending:rn.isPending,onToggleStar:n(()=>tn.mutate(),"onToggleStar"),starPending:tn.isPending,onFork:n(()=>B&&o(Lt(B.id)),"onFork"),onUpdateSettings:n(s=>B&&nn.mutate({skillId:B.id,updates:s}),"onUpdateSettings"),onMoveToFolder:B?()=>es({skillIds:[B.id],title:`Move "${B.name}"`,subtitle:"Choose a destination folder.",currentFolderId:B.folderId??null}):void 0,updateSettingsPending:nn.isPending,onDelete:hr,deletePending:Us.isPending,studioHref:zt(F)}):le?(0,e.jsxs)("div",{className:"min-h-(--sz-calc-30)",children:[(0,e.jsx)("div",{className:"border-b border-border px-4 py-3",children:(0,e.jsxs)(Ke,{to:Dr,className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground no-underline transition-colors hover:text-foreground",children:[(0,e.jsx)(yn,{className:"h-4 w-4"}),"Back to store"]})}),De.isLoading||vt.isLoading||bt.kind==="reconnecting"||pr.kind==="reconnecting"?(0,e.jsx)(Be,{variant:"detail"}):R?(0,e.jsxs)("div",{className:"grid gap-0 xl:grid-cols-(--gtc-30)",children:[(0,e.jsxs)("aside",{className:"border-b border-border px-3 py-4 xl:border-b-0 xl:border-r",children:[(0,e.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Files"}),(0,e.jsx)(Wt,{nodes:tr(R.files.map(s=>({path:s.path,kind:s.kind}))),skillId:R.id,selectedPath:ne,expandedDirs:gs[R.id]??new Set,onToggleDir:n(s=>fs(d=>{const u=new Set(d[R.id]??[]);return u.has(s)?u.delete(s):u.add(s),{...d,[R.id]:u}}),"onToggleDir"),onSelectPath:n(s=>ue(s),"onSelectPath"),fileHref:n(()=>`/skills?catalog=${encodeURIComponent(le)}`,"fileHref")})]}),(0,e.jsx)("div",{className:"min-w-0",children:(0,e.jsx)(vl,{skill:R,packageName:R.packageName??_s.get(R.key)?.packageName??null,packageVersion:R.packageVersion??_s.get(R.key)?.packageVersion??null,installedSkill:_s.get(R.key)??null,installedSkillId:_s.get(R.key)?.id??null,fileQuery:gr,selectedPath:ne,onInstall:n(()=>hn(R),"onInstall"),onUpdate:n(()=>hn(R),"onUpdate"),onOpenInstalled:n(s=>o(gt(s)),"onOpenInstalled"),loadingPrimaryAction:kt.isPending})})]}):(0,e.jsx)(cs,{icon:Te,message:"Catalog skill not found."})]}):(0,e.jsx)("div",{className:"min-h-(--sz-calc-30)",children:ns.isLoading||st.kind==="reconnecting"?(0,e.jsx)(Be,{variant:"detail"}):(0,e.jsx)(cs,{icon:Te,message:"Skill not found."})})]})}n(zl,"CompanySkills");export{zl as CompanySkills};