decocms 4.82.13 → 4.82.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 (276) hide show
  1. package/dist/client/assets/{AlertCircle-B6AELEdc.js → AlertCircle-CeOq_QOa.js} +1 -1
  2. package/dist/client/assets/{AreaChart-fCNs67j_.js → AreaChart-DWLsJ9L_.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-YK2fJPgi.js → ArrowUp-CCgnuK4p.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-BKVLcZTe.js → ArrowUpRight-BUF92paN.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-BfxYbuVE.js → CheckCircle-DU0E1kqe.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-CQLSXgt3.js → ChevronDown-DA-FKtUl.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-Fgy0rUS_.js → ChevronRight-CHBqaZbp.js} +1 -1
  8. package/dist/client/assets/ChevronUp-z2fewBpw.js +1 -0
  9. package/dist/client/assets/{Copy01-B0CQRE_5.js → Copy01-mdfV84Qi.js} +1 -1
  10. package/dist/client/assets/DotsVertical-CfEiDPnS.js +1 -0
  11. package/dist/client/assets/{Eye-CLtdCpUf.js → Eye-DwGaKloo.js} +1 -1
  12. package/dist/client/assets/{FilterLines-DeiGsRZY.js → FilterLines-DTtZUWPT.js} +1 -1
  13. package/dist/client/assets/{Globe01-B52VKYy7.js → Globe01-DjB8n-mo.js} +1 -1
  14. package/dist/client/assets/{Globe04-B0las6Jv.js → Globe04-DutdpBnz.js} +1 -1
  15. package/dist/client/assets/{HardDrive-CU-vvmKE.js → HardDrive-CGELqP5N.js} +1 -1
  16. package/dist/client/assets/{Image01-B-FQwXx8.js → Image01-BTSbKZvY.js} +1 -1
  17. package/dist/client/assets/{Key01-myvTSA8u.js → Key01-DkkbB1Yr.js} +1 -1
  18. package/dist/client/assets/{LayoutLeft-C0g0LezP.js → LayoutLeft-B1GHI-YD.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-d9EixhiS.js → LinkExternal01-DJ_9J6wi.js} +1 -1
  20. package/dist/client/assets/{Monitor01-BkDBzdlH.js → Monitor01-pmSL1YcM.js} +1 -1
  21. package/dist/client/assets/{Package-eNacrLmv.js → Package-CWS4_j2H.js} +1 -1
  22. package/dist/client/assets/{Palette-BiKqXWvc.js → Palette-DPL8s5xh.js} +1 -1
  23. package/dist/client/assets/{Play-CdkPhmTs.js → Play-DR0RovML.js} +1 -1
  24. package/dist/client/assets/{Plus-DWjKZ2wj.js → Plus-CztP4VvG.js} +1 -1
  25. package/dist/client/assets/{SearchLg-DBOWvxyl.js → SearchLg-BzyTJkaM.js} +1 -1
  26. package/dist/client/assets/{SearchMd-CKteZWzZ.js → SearchMd-D8besh0I.js} +1 -1
  27. package/dist/client/assets/{Settings02-CM0Uzs0U.js → Settings02-CuqicLOk.js} +1 -1
  28. package/dist/client/assets/{Shield01-aDvWVv5Z.js → Shield01-4kmCM8vo.js} +1 -1
  29. package/dist/client/assets/{Star01-B-8espqJ.js → Star01-DHUNj4ei.js} +1 -1
  30. package/dist/client/assets/{Stars01-DsfblQf3.js → Stars01-tn1arSwR.js} +1 -1
  31. package/dist/client/assets/{Stars02-DBH33Ez2.js → Stars02-Di59xUHt.js} +1 -1
  32. package/dist/client/assets/{Sun-MvOAGgKN.js → Sun-CC4UrAWz.js} +1 -1
  33. package/dist/client/assets/{SwitchHorizontal01-DUrn8gXV.js → SwitchHorizontal01-cKbBsGPr.js} +1 -1
  34. package/dist/client/assets/{Tool01-4pit7qOS.js → Tool01-DehbzRDq.js} +1 -1
  35. package/dist/client/assets/{Tool02-tJKj7JcW.js → Tool02-hbk9uCUP.js} +1 -1
  36. package/dist/client/assets/{Trash01-DEWgFvvg.js → Trash01-DtotiGOx.js} +1 -1
  37. package/dist/client/assets/TrendUp01-Bzv8tCE3.js +1 -0
  38. package/dist/client/assets/{Upload01-C8RP0Fvq.js → Upload01-mGXKgGjJ.js} +1 -1
  39. package/dist/client/assets/{User01-v0Bqr3nA.js → User01-CqaAq7aP.js} +1 -1
  40. package/dist/client/assets/{Users01-CPNZ7uMu.js → Users01-ZGhY-EtM.js} +1 -1
  41. package/dist/client/assets/{Users03-WVYBBENu.js → Users03-CJYVEqY6.js} +1 -1
  42. package/dist/client/assets/{X-Dm6kY_ek.js → X-C00VJyk9.js} +1 -1
  43. package/dist/client/assets/{XCircle-cwYbcP7y.js → XCircle-D5ueBEPv.js} +1 -1
  44. package/dist/client/assets/{XClose-DnNyN9T-.js → XClose-COXhcGxA.js} +1 -1
  45. package/dist/client/assets/{Zap-CNRURtEh.js → Zap-CyltBR5S.js} +1 -1
  46. package/dist/client/assets/{ZapSquare-Dj8pa8Fg.js → ZapSquare-DzvB1OVj.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-_psBJlXD.js → ZoomOut-DnsiYOYE.js} +1 -1
  48. package/dist/client/assets/{access-gate-CPecvlS5.js → access-gate-DUg1OQzh.js} +1 -1
  49. package/dist/client/assets/{add-section-modal-CcLBxmBX.js → add-section-modal-BN8Y54kh.js} +1 -1
  50. package/dist/client/assets/agent-icon-DD1XuUZV.js +1 -0
  51. package/dist/client/assets/agents-list-CYVjTPcg.js +1 -0
  52. package/dist/client/assets/ai-providers-7J7oaSIJ.js +1 -0
  53. package/dist/client/assets/{alert-XkDwazoe.js → alert-BAS3TA95.js} +1 -1
  54. package/dist/client/assets/{alert-dialog-3VMQ65hF.js → alert-dialog-pZnlrqwf.js} +1 -1
  55. package/dist/client/assets/app-editor-Dv5aoi2Q.js +1 -0
  56. package/dist/client/assets/{auth-dSVlMQ86.js → auth-BH7x9puf.js} +1 -1
  57. package/dist/client/assets/{auth-catchall-BVp4zpOf.js → auth-catchall-4ljJEgz3.js} +1 -1
  58. package/dist/client/assets/{auth-entry-C48ylSC_.js → auth-entry-CKXeCVAg.js} +1 -1
  59. package/dist/client/assets/{auth-split-layout-dbrXw6Uq.js → auth-split-layout-CUJ9nkHR.js} +1 -1
  60. package/dist/client/assets/{authenticate-and-persist-oauth-BHT9Kp62.js → authenticate-and-persist-oauth-Cv50WZiI.js} +1 -1
  61. package/dist/client/assets/{automation-list-row-PkSpkeID.js → automation-list-row-k6YDoU1F.js} +1 -1
  62. package/dist/client/assets/automation-runs-CnJwo9o6.js +87 -0
  63. package/dist/client/assets/automations-Dgs0AdsJ.js +1 -0
  64. package/dist/client/assets/{autosend-D_-616qs.js → autosend-BndTn1RX.js} +1 -1
  65. package/dist/client/assets/{avatar-UXZ4R5Yb.js → avatar-BV7BW59M.js} +1 -1
  66. package/dist/client/assets/{badge-CfAmvo-h.js → badge-DdEWwdjD.js} +1 -1
  67. package/dist/client/assets/{block-document-DbCz5f9N.js → block-document-DPR5iaEz.js} +2 -2
  68. package/dist/client/assets/{brand-context-G_6bLd5F.js → brand-context-D-BeYI94.js} +1 -1
  69. package/dist/client/assets/buckets-BmvZUYuX.js +1 -0
  70. package/dist/client/assets/bulk-category-panel-DWzVkVjS.js +1 -0
  71. package/dist/client/assets/calendar-BQIrOmm1.js +102 -0
  72. package/dist/client/assets/{capability-load-error-B9xkkNBq.js → capability-load-error-CBWml6hq.js} +1 -1
  73. package/dist/client/assets/{card-dLLzWD0r.js → card-f5iCgnuC.js} +1 -1
  74. package/dist/client/assets/category-editor-B9oFmSoe.js +1 -0
  75. package/dist/client/assets/{chat-context-CyCuyn4t.js → chat-context-BzTO5WN0.js} +13 -11
  76. package/dist/client/assets/checkbox-CxcJOsaQ.js +1 -0
  77. package/dist/client/assets/{cli-auth-success-zoB4TWhQ.js → cli-auth-success-BS60fauw.js} +1 -1
  78. package/dist/client/assets/collection-detail-CMxoDay1.js +1 -0
  79. package/dist/client/assets/collection-display-button-DlylAXm4.js +1 -0
  80. package/dist/client/assets/{collection-search-C4jDpdZf.js → collection-search-DLZgCv04.js} +1 -1
  81. package/dist/client/assets/{collection-table-wrapper-DIkftYUF.js → collection-table-wrapper-DNDfhvJo.js} +1 -1
  82. package/dist/client/assets/{collection-tabs-DvvibY6H.js → collection-tabs-DZpZSybV.js} +1 -1
  83. package/dist/client/assets/{command-EQNrbniG.js → command-tBDIrLoF.js} +1 -1
  84. package/dist/client/assets/commerce-onboarding-BSUs1HKX.js +1 -0
  85. package/dist/client/assets/{companions-core-fc2Z_sCB.js → companions-core-Cd0liGC_.js} +1 -1
  86. package/dist/client/assets/connect-desktop-dialog-BYBMu3N5.js +1 -0
  87. package/dist/client/assets/{connection-card-CtY9PRIw.js → connection-card-B9qVUyx7.js} +1 -1
  88. package/dist/client/assets/connection-detail-Kd3nzbnA.js +1 -0
  89. package/dist/client/assets/{connection-form-helpers-TGmycj7X.js → connection-form-helpers-DKt4iErs.js} +1 -1
  90. package/dist/client/assets/connections-BeoxUP3C.js +1 -0
  91. package/dist/client/assets/{decopilot-sse-pool-DHojW3EC.js → decopilot-sse-pool-C6iebzwQ.js} +1 -1
  92. package/dist/client/assets/{dialog-CmXDzme5.js → dialog-BJfLYuit.js} +1 -1
  93. package/dist/client/assets/{domain-settings-GxKzcerZ.js → domain-settings-CfHBsp-L.js} +1 -1
  94. package/dist/client/assets/{drawer-Ds-r7525.js → drawer-Baw0xzc3.js} +1 -1
  95. package/dist/client/assets/dropdown-menu-BhfnlfU6.js +1 -0
  96. package/dist/client/assets/{empty-state-CdKwtMyP.js → empty-state-BYiNNxsG.js} +1 -1
  97. package/dist/client/assets/{extract-connection-data-CK9iLAoG.js → extract-connection-data-J1VuF4OH.js} +1 -1
  98. package/dist/client/assets/file-explorer-CcD0ikH9.js +2 -0
  99. package/dist/client/assets/{file-type-icon-DjNFZnTs.js → file-type-icon-zRxoda45.js} +1 -1
  100. package/dist/client/assets/{files-CQYyuV1E.js → files-DD6Mi8Wg.js} +1 -1
  101. package/dist/client/assets/{form-x0k-kdB2.js → form-M4hxtBov.js} +1 -1
  102. package/dist/client/assets/general-CVTq53WI.js +1 -0
  103. package/dist/client/assets/{github-repo-picker-C-tZ-Bba.js → github-repo-picker-C1xhTE3Y.js} +1 -1
  104. package/dist/client/assets/{hooks-QHrmNjJQ.js → hooks-NPNZyDPQ.js} +6 -6
  105. package/dist/client/assets/{index-BjO8A-VO.js → index-4drSQZJw.js} +1 -1
  106. package/dist/client/assets/{index-BCiDnhhX.js → index-B8DLJIRD.js} +4 -4
  107. package/dist/client/assets/{index-CeqD0RVV.js → index-BAlJ2Lmy.js} +1 -1
  108. package/dist/client/assets/{index-Czi2ZhJ5.js → index-BF2PvN6y.js} +1 -1
  109. package/dist/client/assets/index-C0aFdpR9.js +2 -0
  110. package/dist/client/assets/{index-BcWQMJI4.js → index-CCfHA78w.js} +3 -3
  111. package/dist/client/assets/{index-CUVgjm02.js → index-CLMqgJD5.js} +1 -1
  112. package/dist/client/assets/{index-CzMEWsZX.js → index-CdQfFNYL.js} +1 -1
  113. package/dist/client/assets/{index-T-oY3h3t.js → index-CkWlYouF.js} +1 -1
  114. package/dist/client/assets/{index-DonY639O.js → index-Cl-Je6HH.js} +29 -29
  115. package/dist/client/assets/{index-C-B6S6Q9.js → index-ClUkG6N9.js} +1 -1
  116. package/dist/client/assets/index-DAYNblke.js +1 -0
  117. package/dist/client/assets/{index-DF3zg-P1.js → index-DIPAEwLP.js} +3 -3
  118. package/dist/client/assets/index-Dj5WILcq.css +1 -0
  119. package/dist/client/assets/{index-cG8paP3z.js → index-Dt28nlD4.js} +1 -1
  120. package/dist/client/assets/{index-redirect-_hpy7g8S.js → index-redirect-CmI0ALY4.js} +1 -1
  121. package/dist/client/assets/{input-BZTiU0ds.js → input-CfHOale8.js} +1 -1
  122. package/dist/client/assets/{integration-icon-BfKWLZT4.js → integration-icon-BzIpy5hd.js} +1 -1
  123. package/dist/client/assets/{invite-member-dialog-fPpySKy7.js → invite-member-dialog-Bi9Ad5RM.js} +1 -1
  124. package/dist/client/assets/{label-B1OfKy2N.js → label-q4Lz_o7x.js} +1 -1
  125. package/dist/client/assets/{layout-BzlkAZij.js → layout-BeXU4geV.js} +1 -1
  126. package/dist/client/assets/{login-CfYNPvDo.js → login-ULhcI_8j.js} +1 -1
  127. package/dist/client/assets/{mcp-oauth-CoKzxQiz.js → mcp-oauth-BD7eUVto.js} +1 -1
  128. package/dist/client/assets/members-CbH0lki7.js +1 -0
  129. package/dist/client/assets/{monaco-editor-BzdwB2U8.js → monaco-editor-C4mpNtzY.js} +1 -1
  130. package/dist/client/assets/{monitoring-stats-row-C0-lT8X-.js → monitoring-stats-row-CZzkQYId.js} +1 -1
  131. package/dist/client/assets/{multi-select-BYFsBcLx.js → multi-select-DCA9Da7k.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-D6L6RroV.js → oauth-callback-Dan_MKSA.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-ai-provider-NS24Yhk_.js → oauth-callback-ai-provider-B1ZRW88t.js} +1 -1
  134. package/dist/client/assets/{onboarding-CXfWXP3L.js → onboarding-BO_9ySh0.js} +1 -1
  135. package/dist/client/assets/{org-install-CFASOU4_.js → org-install-CpFIEnER.js} +1 -1
  136. package/dist/client/assets/{org-layout-gngtZKVa.js → org-layout-CULBOosB.js} +1 -1
  137. package/dist/client/assets/{organization-choice-DB-AR__E.js → organization-choice-DFVSxnej.js} +1 -1
  138. package/dist/client/assets/orgs-CBXFrHFa.js +1 -0
  139. package/dist/client/assets/{page-seo-form-DsaBxdUW.js → page-seo-form-DHenYYCe.js} +1 -1
  140. package/dist/client/assets/page-seo-sheet-ClW_iDoO.js +1 -0
  141. package/dist/client/assets/{popover-BzHpXFL_.js → popover-CXcO7_bx.js} +1 -1
  142. package/dist/client/assets/post-editor-DhFxw021.js +1 -0
  143. package/dist/client/assets/{primitives-BxBoeZTE.js → primitives-BmJhmJIK.js} +1 -1
  144. package/dist/client/assets/profile-NhoDC18k.js +1 -0
  145. package/dist/client/assets/project-app-view-utsK6OxP.js +1 -0
  146. package/dist/client/assets/record-editor-CecDBJXr.js +1 -0
  147. package/dist/client/assets/redirect-editor-dV0nhSya.js +1 -0
  148. package/dist/client/assets/registry-CT54Qzvf.js +2 -0
  149. package/dist/client/assets/{registry-layout-B8iHO94t.js → registry-layout-BWFRgJfZ.js} +2 -2
  150. package/dist/client/assets/{reports-DFt5o5JU.js → reports-B3SZ3Jl3.js} +2 -2
  151. package/dist/client/assets/{require-capability-CEBGt_Ot.js → require-capability-CNquWgoq.js} +1 -1
  152. package/dist/client/assets/{required-auth-layout-vPZ2d-Yx.js → required-auth-layout-DXZH_cMh.js} +1 -1
  153. package/dist/client/assets/{reset-password-l6ffdCqx.js → reset-password-CeKxEPEA.js} +1 -1
  154. package/dist/client/assets/roles-Ds1s8Crb.js +1 -0
  155. package/dist/client/assets/{search-input-ByuB0YyC.js → search-input-BBqHwy7J.js} +1 -1
  156. package/dist/client/assets/secrets-BJLITdOe.js +1 -0
  157. package/dist/client/assets/sections-editor-x_JJ-dXm.js +2 -0
  158. package/dist/client/assets/select-D45GDan5.js +1 -0
  159. package/dist/client/assets/{select-model-CebmAt-C.js → select-model-BdqTIzoZ.js} +1 -1
  160. package/dist/client/assets/self-tool-result-DveXGlAh.js +1 -0
  161. package/dist/client/assets/seo-editor-D_gFq0_r.js +1 -0
  162. package/dist/client/assets/{settings-layout-DUpflFya.js → settings-layout-CHmblNlb.js} +1 -1
  163. package/dist/client/assets/{settings-section-DS6otYn7.js → settings-section-amOjmhEI.js} +1 -1
  164. package/dist/client/assets/{shell-controls-B9xMPAfw.js → shell-controls-CgCFroeq.js} +1 -1
  165. package/dist/client/assets/{shell-layout-Bo6QxW8m.js → shell-layout-CdiwNTyI.js} +1 -1
  166. package/dist/client/assets/{sidebar-BFdShy9x.js → sidebar-C7aQbJG9.js} +1 -1
  167. package/dist/client/assets/{skeleton-BGZh750P.js → skeleton-Dxm-lG43.js} +1 -1
  168. package/dist/client/assets/sso-DJnUWhf6.js +1 -0
  169. package/dist/client/assets/{store-ioH_J-rE.js → store-NquDFej1.js} +1 -1
  170. package/dist/client/assets/store-registry-DUeHm7WT.js +2 -0
  171. package/dist/client/assets/{studio-tools-bThaob6p.js → studio-tools-CYfQ2AAQ.js} +1 -1
  172. package/dist/client/assets/{switch-C2KH_TaK.js → switch-CdTxZDmU.js} +1 -1
  173. package/dist/client/assets/{table-XKbQ5Wjx.js → table-0RqXTFkI.js} +1 -1
  174. package/dist/client/assets/{tabs-D-6eQ0wE.js → tabs-7Gp9khG9.js} +1 -1
  175. package/dist/client/assets/{textarea-PYu4eHQV.js → textarea-DqwqE7DK.js} +1 -1
  176. package/dist/client/assets/{toggle-group-BcxqPGrf.js → toggle-group-aSRsQY-d.js} +1 -1
  177. package/dist/client/assets/{toolbar-D90MFc80.js → toolbar-BWl3LL6D.js} +1 -1
  178. package/dist/client/assets/{toolbar-icon-button-D3m9VnTI.js → toolbar-icon-button-DCIRoG12.js} +1 -1
  179. package/dist/client/assets/{tooltip-O3iHy7-o.js → tooltip-WJkhQjcG.js} +1 -1
  180. package/dist/client/assets/{use-ai-providers-B4nhSJlr.js → use-ai-providers-C40YpJE-.js} +1 -1
  181. package/dist/client/assets/{use-automations-C01orYPa.js → use-automations-C9d02WY2.js} +1 -1
  182. package/dist/client/assets/{use-autosave-BhfvFfoI.js → use-autosave-C9WyysaS.js} +1 -1
  183. package/dist/client/assets/{use-capability--WeMT0KP.js → use-capability-CFtUu9S6.js} +1 -1
  184. package/dist/client/assets/use-clock-tick-BEOof-IF.js +1 -0
  185. package/dist/client/assets/{use-collections-K1HyCAfG.js → use-collections-zWVyDZcY.js} +1 -1
  186. package/dist/client/assets/{use-connection-twfWXxwG.js → use-connection-zVMbceFt.js} +1 -1
  187. package/dist/client/assets/{use-copy-DQ4y4418.js → use-copy-aL4eG47e.js} +1 -1
  188. package/dist/client/assets/{use-create-virtual-mcp-NwJ9x5Kd.js → use-create-virtual-mcp-CC9xkgX7.js} +1 -1
  189. package/dist/client/assets/{use-debounced-autosave-BdWGMbok.js → use-debounced-autosave-fAbS1zOg.js} +1 -1
  190. package/dist/client/assets/{use-debounced-value-xN0eyoO9.js → use-debounced-value-DNsl2JfP.js} +1 -1
  191. package/dist/client/assets/use-deco-credits-CcPnJVuR.js +1 -0
  192. package/dist/client/assets/{use-decopilot-events-BEOY-_n2.js → use-decopilot-events-CsMJmVbs.js} +1 -1
  193. package/dist/client/assets/{use-delete-connection-BlzYSB_f.js → use-delete-connection-R5JvHOU0.js} +1 -1
  194. package/dist/client/assets/{use-deployment-admin-DYO-CLsy.js → use-deployment-admin-C6_xz3oM.js} +1 -1
  195. package/dist/client/assets/{use-file-configs-Bs9N4w-Z.js → use-file-configs-DKMcr7Ka.js} +1 -1
  196. package/dist/client/assets/{use-infinite-scroll-Dt7gLdpr.js → use-infinite-scroll-BfgefGd-.js} +1 -1
  197. package/dist/client/assets/{use-join-requests-D0z99IAk.js → use-join-requests-DwZmJTC-.js} +1 -1
  198. package/dist/client/assets/{use-mcp-auth-status-C7G9bAkb.js → use-mcp-auth-status-DqdsBw6O.js} +1 -1
  199. package/dist/client/assets/{use-mcp-client-DrROXOcH.js → use-mcp-client-jqf5Iy9F.js} +1 -1
  200. package/dist/client/assets/{use-mcp-tools-D28ox9dJ.js → use-mcp-tools-FlPegk9r.js} +1 -1
  201. package/dist/client/assets/{use-members-mvfsRjey.js → use-members-4b0HekAB.js} +1 -1
  202. package/dist/client/assets/{use-mobile-nauPjzo2.js → use-mobile-Dzfwh2PG.js} +1 -1
  203. package/dist/client/assets/{use-navigate-to-agent-BJC_x779.js → use-navigate-to-agent-BdTIm_yX.js} +1 -1
  204. package/dist/client/assets/{use-org-auth-client-jU0nDPT-.js → use-org-auth-client-DNidmaGB.js} +1 -1
  205. package/dist/client/assets/{use-org-sso-j8hZyqdO.js → use-org-sso-XSU8Sbkk.js} +1 -1
  206. package/dist/client/assets/{use-organization-roles-thqey2Pm.js → use-organization-roles-DO-lRy6_.js} +1 -1
  207. package/dist/client/assets/{use-organization-settings-BJ1bjHsL.js → use-organization-settings-B5oAjTeU.js} +1 -1
  208. package/dist/client/assets/{use-registry-app-CeyrXTI4.js → use-registry-app-C86I4fwX.js} +1 -1
  209. package/dist/client/assets/{use-registry-connections-D94L7VqK.js → use-registry-connections-C5ZlG8AQ.js} +1 -1
  210. package/dist/client/assets/{use-secrets-C1Fme0Ya.js → use-secrets-CwCibfpX.js} +1 -1
  211. package/dist/client/assets/{use-status-sounds-B1YKt2sD.js → use-status-sounds-B3WHalkp.js} +1 -1
  212. package/dist/client/assets/{use-view-mode-gP4n4GFH.js → use-view-mode-CQEpkEmN.js} +1 -1
  213. package/dist/client/assets/{use-virtual-mcp-C964oRwj.js → use-virtual-mcp-rI-Jb4Ga.js} +1 -1
  214. package/dist/client/assets/useInfiniteQuery-6TwOL6Xo.js +1 -0
  215. package/dist/client/assets/{useRouterState-Bi7YKwTw.js → useRouterState-zOoyC2QF.js} +1 -1
  216. package/dist/client/assets/useSuspenseInfiniteQuery-COj06tw2.js +1 -0
  217. package/dist/client/assets/{users-BiDYlXA2.js → users-C2DJRY0B.js} +1 -1
  218. package/dist/client/assets/variant-calendar-BTK0fdXF.js +1 -0
  219. package/dist/client/assets/{view-mode-toggle-kFlOpvCC.js → view-mode-toggle-CQPkkcdM.js} +1 -1
  220. package/dist/client/index.html +2 -2
  221. package/dist/server/cli.js +1 -1
  222. package/dist/server/server.js +1 -1
  223. package/package.json +1 -1
  224. package/dist/client/assets/Check-BF3t7WWi.js +0 -1
  225. package/dist/client/assets/ChevronUp-Y-IpPAUR.js +0 -1
  226. package/dist/client/assets/Circle-0HId1SV6.js +0 -1
  227. package/dist/client/assets/DotsVertical-CYU3Mae1.js +0 -1
  228. package/dist/client/assets/Flag01-B_AKNFoc.js +0 -1
  229. package/dist/client/assets/List-DZAsltZv.js +0 -1
  230. package/dist/client/assets/TrendUp01-7N_6K3-X.js +0 -1
  231. package/dist/client/assets/UserPlus01-D2pAl0t2.js +0 -1
  232. package/dist/client/assets/agent-icon-DmIJ53uv.js +0 -1
  233. package/dist/client/assets/agents-list-GFWV8fSw.js +0 -1
  234. package/dist/client/assets/ai-providers-C93Uux8H.js +0 -1
  235. package/dist/client/assets/app-editor-GnwEYs2F.js +0 -1
  236. package/dist/client/assets/automation-runs-yMzfgCqo.js +0 -188
  237. package/dist/client/assets/automations-Db9v_2wu.js +0 -1
  238. package/dist/client/assets/buckets-Bkz3itxJ.js +0 -1
  239. package/dist/client/assets/bulk-category-panel-EjjgUKdU.js +0 -1
  240. package/dist/client/assets/calendar-BdMqQsTv.js +0 -1
  241. package/dist/client/assets/category-editor-l1ImzDA-.js +0 -1
  242. package/dist/client/assets/checkbox-CxV2vfbv.js +0 -1
  243. package/dist/client/assets/collection-detail-ByPPxvaR.js +0 -1
  244. package/dist/client/assets/collection-display-button-BBHublq2.js +0 -1
  245. package/dist/client/assets/commerce-onboarding-Dgs4FWfH.js +0 -1
  246. package/dist/client/assets/connect-desktop-dialog-CPSwwSyz.js +0 -1
  247. package/dist/client/assets/connection-detail-DuvF3pbE.js +0 -1
  248. package/dist/client/assets/connections-CE66Octw.js +0 -1
  249. package/dist/client/assets/dropdown-menu-BgNr7tM1.js +0 -1
  250. package/dist/client/assets/file-explorer-nG37TAVQ.js +0 -2
  251. package/dist/client/assets/general-c3hgsq_x.js +0 -1
  252. package/dist/client/assets/index-DKadkG06.js +0 -4
  253. package/dist/client/assets/index-DpLPq5a_.css +0 -1
  254. package/dist/client/assets/index-bj26_8KX.js +0 -1
  255. package/dist/client/assets/members-CrKGCoFu.js +0 -1
  256. package/dist/client/assets/orgs-jcqywdGM.js +0 -1
  257. package/dist/client/assets/page-seo-sheet-BF2mpJ0B.js +0 -1
  258. package/dist/client/assets/post-editor-JD3fSSO7.js +0 -1
  259. package/dist/client/assets/profile-CZ9vM3_S.js +0 -1
  260. package/dist/client/assets/project-app-view-40EQ9ogm.js +0 -1
  261. package/dist/client/assets/record-editor-BmGDR-eB.js +0 -1
  262. package/dist/client/assets/redirect-editor-0M8-Neu7.js +0 -1
  263. package/dist/client/assets/registry-CwTOcwuV.js +0 -2
  264. package/dist/client/assets/roles-Bo-eSbrf.js +0 -1
  265. package/dist/client/assets/secrets-C_1Jcs02.js +0 -1
  266. package/dist/client/assets/sections-editor-gaZ0BvyI.js +0 -2
  267. package/dist/client/assets/select-B6GE4jHJ.js +0 -1
  268. package/dist/client/assets/self-tool-result-DJIiUu6Z.js +0 -1
  269. package/dist/client/assets/seo-editor-DNUmLmzw.js +0 -1
  270. package/dist/client/assets/sso-D7EYt-G3.js +0 -1
  271. package/dist/client/assets/store-registry-s8bkhEBH.js +0 -2
  272. package/dist/client/assets/use-clock-tick-DboEo7Cc.js +0 -1
  273. package/dist/client/assets/use-deco-credits-Bm-VH5Hm.js +0 -1
  274. package/dist/client/assets/useInfiniteQuery-DKhJHTs2.js +0 -1
  275. package/dist/client/assets/useSuspenseInfiniteQuery-DAAXTkZt.js +0 -1
  276. package/dist/client/assets/variant-calendar-m6XjJ2dx.js +0 -1
@@ -1 +0,0 @@
1
- import{r as V,c as ne,j as t,B as K,i as ae,p as te,l as ge,E as Ge,C as be,b as _e,u as Je,a as Ne,z as Qe,G as Ye,D as Ze,M as et,J as tt,n as nt,t as R,K as st}from"./index-DF3zg-P1.js";import{a as De,b as ot,g as it,e as rt}from"./extract-connection-data-CK9iLAoG.js";import{C as lt}from"./collection-display-button-BBHublq2.js";import{S as ct}from"./search-input-ByuB0YyC.js";import{C as at}from"./collection-tabs-DvvibY6H.js";import{C as Ce,u as dt,a as ke,g as mt}from"./connection-card-CtY9PRIw.js";import{E as ut}from"./empty-state-CdKwtMyP.js";import{P as me}from"./index-CeqD0RVV.js";import{u as pt,D as gt}from"./use-delete-connection-BlzYSB_f.js";import{u as ye}from"./use-capability--WeMT0KP.js";import{u as ht}from"./use-infinite-scroll-Dt7gLdpr.js";import{u as xt}from"./use-view-mode-gP4n4GFH.js";import{g as pe}from"./connection-slug-eyAPH6o3.js";import{c as Ae,d as Te,b as we,A as Ie,e as Pe,g as $e,a as Oe,f as Le}from"./alert-dialog-3VMQ65hF.js";import{n as he}from"./Tool02-tJKj7JcW.js";import{D as Me,a as Fe,h as ze,c as Ve,d as Ee,e as Be}from"./dialog-CmXDzme5.js";import{D as ft,a as jt,c as yt,b as Ct,d as vt,e as St,f as bt}from"./drawer-Ds-r7525.js";import{u as _t}from"./use-mobile-nauPjzo2.js";import{F as J,b as Q,c as Y,d as Z,f as ee,a as ve}from"./form-x0k-kdB2.js";import{I as ie}from"./input-BZTiU0ds.js";import{S as Nt,a as Dt,b as kt,c as At,d as ce}from"./select-B6GE4jHJ.js";import{T as Tt}from"./textarea-PYu4eHQV.js";import{b as Ke,u as wt}from"./use-connection-twfWXxwG.js";import{u as It}from"./use-virtual-mcp-C964oRwj.js";import{u as Pt}from"./studio-tools-bThaob6p.js";import{s as je}from"./Star01-B-8espqJ.js";import{s as He}from"./Plus-DWjKZ2wj.js";import{J as $t,I as Ot,ai as Lt,af as Mt}from"./agent-icon-DmIJ53uv.js";import{s as Ue}from"./XClose-DnNyN9T-.js";import{i as ue,a as Se,E as Ft,c as zt,p as Vt,b as Et,d as Bt}from"./connection-form-helpers-TGmycj7X.js";import{a as Kt}from"./authenticate-and-persist-oauth-BHT9Kp62.js";import{I as Ht}from"./integration-icon-BfKWLZT4.js";import{C as Re}from"./checkbox-CxV2vfbv.js";import{d as re,a as Ut,D as Rt,c as Wt}from"./dropdown-menu-BgNr7tM1.js";import{i as Xt}from"./DotsVertical-CYU3Mae1.js";import{s as We}from"./Eye-CLtdCpUf.js";import{s as Xe}from"./Trash01-DEWgFvvg.js";import"./use-mcp-client-DrROXOcH.js";import"./constants-BHDe7bIw.js";import"./auth-dSVlMQ86.js";import"./ArrowUp-YK2fJPgi.js";import"./Check-BF3t7WWi.js";import"./SwitchHorizontal01-DUrn8gXV.js";import"./List-DZAsltZv.js";import"./tooltip-O3iHy7-o.js";import"./view-mode-toggle-kFlOpvCC.js";import"./badge-CfAmvo-h.js";import"./SearchMd-CKteZWzZ.js";import"./use-registry-connections-D94L7VqK.js";import"./use-organization-settings-BJ1bjHsL.js";import"./useInfiniteQuery-DKhJHTs2.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./card-dLLzWD0r.js";import"./sidebar-BFdShy9x.js";import"./LayoutLeft-C0g0LezP.js";import"./X-Dm6kY_ek.js";import"./label-B1OfKy2N.js";import"./ChevronDown-CQLSXgt3.js";import"./ChevronUp-Y-IpPAUR.js";import"./use-collections-K1HyCAfG.js";import"./AlertCircle-B6AELEdc.js";import"./UserPlus01-D2pAl0t2.js";import"./Tool01-4pit7qOS.js";import"./Settings02-CM0Uzs0U.js";import"./XCircle-cwYbcP7y.js";import"./ArrowUpRight-BKVLcZTe.js";import"./TrendUp01-7N_6K3-X.js";import"./ZapSquare-Dj8pa8Fg.js";import"./ZoomOut-_psBJlXD.js";import"./Users03-WVYBBENu.js";import"./CheckCircle-BfxYbuVE.js";import"./ChevronRight-Fgy0rUS_.js";import"./Circle-0HId1SV6.js";import"./Stars02-DBH33Ez2.js";import"./Copy01-B0CQRE_5.js";import"./Globe01-B52VKYy7.js";import"./FilterLines-DeiGsRZY.js";import"./Flag01-B_AKNFoc.js";import"./Globe04-B0las6Jv.js";import"./HardDrive-CU-vvmKE.js";import"./Image01-B-FQwXx8.js";import"./Key01-myvTSA8u.js";import"./LinkExternal01-d9EixhiS.js";import"./Monitor01-BkDBzdlH.js";import"./Sun-MvOAGgKN.js";import"./Package-eNacrLmv.js";import"./Palette-BiKqXWvc.js";import"./Play-CdkPhmTs.js";import"./SearchLg-DBOWvxyl.js";import"./Shield01-aDvWVv5Z.js";import"./Stars01-DsfblQf3.js";import"./Upload01-C8RP0Fvq.js";import"./User01-v0Bqr3nA.js";import"./Users01-CPNZ7uMu.js";import"./Zap-CNRURtEh.js";import"./mcp-oauth-CoKzxQiz.js";function qt(f){const e=`deco-filters-${f}`,[n,a]=V.useState(()=>{try{const s=globalThis.localStorage?.getItem(e);if(s)return JSON.parse(s)}catch(s){console.error("Failed to parse stored filters:",s)}return[]});return[n,s=>{a(s);try{globalThis.localStorage?.setItem(e,JSON.stringify(s))}catch(i){console.error("Failed to save filters:",i)}}]}function Gt(f){const e=ne.c(7),[n,a]=V.useState(f),[o,s]=V.useState(f?"desc":null);let i;e[0]!==o||e[1]!==n?(i=j=>{n!==j?(a(j),s("asc")):o==="asc"?s("desc"):o==="desc"&&(a(void 0),s(null))},e[0]=o,e[1]=n,e[2]=i):i=e[2];const l=i;let d;return e[3]!==l||e[4]!==o||e[5]!==n?(d={sortKey:n,sortDirection:o,handleSort:l},e[3]=l,e[4]=o,e[5]=n,e[6]=d):d=e[6],d}function Jt(f){const e=ne.c(20),{namespace:n,resource:a,defaultSortKey:o,defaultViewMode:s}=f,i=o===void 0?"title":o,l=s===void 0?"table":s,[d,j]=V.useState(""),y=V.useDeferredValue(d),C=`${n}-${a}`,[v,u]=qt(C),p=`mesh-${a}-filter-visible-${n}`;let c;e[0]!==p?(c=()=>globalThis.localStorage?.getItem(p)==="true",e[0]=p,e[1]=c):c=e[1];const[S,_]=V.useState(c);let b;e[2]!==p?(b=F=>{_(F),globalThis.localStorage?.setItem(p,String(F))},e[2]=p,e[3]=b):b=e[3];const w=b;let D;e[4]!==S||e[5]!==w?(D=()=>{w(!S)},e[4]=S,e[5]=w,e[6]=D):D=e[6];const r=D,[I,$]=xt(`mesh-${a}-${n}`,l),{sortKey:L,sortDirection:T,handleSort:O}=Gt(i),k=L;let M;return e[7]!==S||e[8]!==v||e[9]!==O||e[10]!==d||e[11]!==y||e[12]!==w||e[13]!==u||e[14]!==$||e[15]!==T||e[16]!==k||e[17]!==r||e[18]!==I?(M={search:d,searchTerm:y,setSearch:j,filters:v,setFilters:u,filterBarVisible:S,setFilterBarVisible:w,toggleFilterBar:r,viewMode:I,setViewMode:$,sortKey:k,sortDirection:T,handleSort:O},e[7]=S,e[8]=v,e[9]=O,e[10]=d,e[11]=y,e[12]=w,e[13]=u,e[14]=$,e[15]=T,e[16]=k,e[17]=r,e[18]=I,e[19]=M):M=e[19],M}function Qt(f){const e=ne.c(20),{open:n,onOpenChange:a,count:o,onConfirm:s}=f,i=o!==1?"s":"";let l;e[0]!==o||e[1]!==i?(l=t.jsxs(Ae,{children:["Delete ",o," connection",i,"?"]}),e[0]=o,e[1]=i,e[2]=l):l=e[2];const d=o!==1?"s":"";let j;e[3]!==d?(j=t.jsxs(Te,{children:["This will permanently delete the selected connection",d,". This action cannot be undone."]}),e[3]=d,e[4]=j):j=e[4];let y;e[5]!==l||e[6]!==j?(y=t.jsxs(we,{children:[l,j]}),e[5]=l,e[6]=j,e[7]=y):y=e[7];let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Ie,{children:"Cancel"}),e[8]=C):C=e[8];const v=o!==1?"s":"";let u;e[9]!==o||e[10]!==s||e[11]!==v?(u=t.jsxs(Pe,{children:[C,t.jsxs($e,{onClick:s,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:["Delete ",o," connection",v]})]}),e[9]=o,e[10]=s,e[11]=v,e[12]=u):u=e[12];let p;e[13]!==y||e[14]!==u?(p=t.jsxs(Oe,{children:[y,u]}),e[13]=y,e[14]=u,e[15]=p):p=e[15];let c;return e[16]!==a||e[17]!==n||e[18]!==p?(c=t.jsx(Le,{open:n,onOpenChange:a,children:p}),e[16]=a,e[17]=n,e[18]=p,e[19]=c):c=e[19],c}function Yt(f){return f._registryId?.includes("community-registry")===!0}function Zt(f){const e=ne.c(58),{item:n,canManage:a,allConnections:o,connectedAppNames:s,connectingItemId:i,onNavigateConnected:l,onConnect:d}=f,[j,y]=V.useState(!1),[C,v]=V.useState(null);let u,p;e[0]!==s||e[1]!==n?(u=De(n)??"",p=s.has(u),e[0]=s,e[1]=n,e[2]=u,e[3]=p):(u=e[2],p=e[3]);const c=p,S=n._meta?.["mcp.mesh"],_=S?.friendlyName||S?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",b=n.server?.description||n.description||null;let w;e[4]!==n.server?.icons?.[0]?.src||e[5]!==n.server?.repository?(w=n.server?.icons?.[0]?.src||ot(n.server?.repository)||null,e[4]=n.server?.icons?.[0]?.src,e[5]=n.server?.repository,e[6]=w):w=e[6];const D=w;let r;if(e[7]!==o||e[8]!==u){let A;e[10]!==u?(A=oe=>oe.connection_type!=="VIRTUAL"&&oe.app_name===u,e[10]=u,e[11]=A):A=e[11],r=o.filter(A),e[7]=o,e[8]=u,e[9]=r}else r=e[9];const I=r;let $;e[12]!==n?($=Yt(n),e[12]=n,e[13]=$):$=e[13];const L=$;let T,O;e[14]!==I||e[15]!==a||e[16]!==L||e[17]!==c||e[18]!==n||e[19]!==d||e[20]!==l?(T=()=>{if(c){const A=I[0];A&&l(A);return}a&&O()},O=()=>{L?(v("connect"),y(!0)):d(n)},e[14]=I,e[15]=a,e[16]=L,e[17]=c,e[18]=n,e[19]=d,e[20]=l,e[21]=T,e[22]=O):(T=e[21],O=e[22]);let k;e[23]!==n||e[24]!==d||e[25]!==C?(k=()=>{te("connections_community_warning_confirmed",{registry_item_id:n.id}),y(!1),C==="connect"&&d(n),v(null)},e[23]=n,e[24]=d,e[25]=C,e[26]=k):k=e[26];const M=k;let F;e[27]!==b||e[28]!==D||e[29]!==_?(F={title:_,description:b,icon:D},e[27]=b,e[28]=D,e[29]=_,e[30]=F):F=e[30];let q;e[31]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(he,{}),e[31]=q):q=e[31];let U;e[32]!==L||e[33]!==n._sourceIcon?(U=L&&n._sourceIcon&&t.jsx("img",{src:n._sourceIcon,alt:"Community",className:"size-4 rounded-sm object-contain"}),e[32]=L,e[33]=n._sourceIcon,e[34]=U):U=e[34];let W;e[35]!==a||e[36]!==i||e[37]!==O||e[38]!==c||e[39]!==n.id?(W=c?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}):a&&t.jsx(K,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:i!==null,onClick:A=>{A.stopPropagation(),O()},children:i===n.id?t.jsx(ae,{size:14,className:"animate-spin"}):"Connect"}),e[35]=a,e[36]=i,e[37]=O,e[38]=c,e[39]=n.id,e[40]=W):W=e[40];let g;e[41]!==U||e[42]!==W?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[U,W]}),e[41]=U,e[42]=W,e[43]=g):g=e[43];let N;e[44]!==T||e[45]!==g||e[46]!==F?(N=t.jsx(Ce,{connection:F,fallbackIcon:q,onClick:T,headerActionsAlwaysVisible:!0,headerActions:g}),e[44]=T,e[45]=g,e[46]=F,e[47]=N):N=e[47];let z;e[48]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsxs(we,{children:[t.jsx(Ae,{children:"Community MCP Server"}),t.jsx(Te,{children:"This MCP server is from the Community MCP Registry and is not maintained or verified by Deco. Community servers may have varying levels of quality, security, and reliability. Proceed with caution and review the server details before connecting."})]}),e[48]=z):z=e[48];let H;e[49]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(Ie,{children:"Cancel"}),e[49]=H):H=e[49];let E;e[50]!==M?(E=t.jsxs(Oe,{children:[z,t.jsxs(Pe,{children:[H,t.jsx($e,{onClick:M,children:"Continue"})]})]}),e[50]=M,e[51]=E):E=e[51];let h;e[52]!==j||e[53]!==E?(h=t.jsx(Le,{open:j,onOpenChange:y,children:E}),e[52]=j,e[53]=E,e[54]=h):h=e[54];let P;return e[55]!==N||e[56]!==h?(P=t.jsxs(t.Fragment,{children:[N,h]}),e[55]=N,e[56]=h,e[57]=P):P=e[57],P}function qe(f){const e=ne.c(8),{selectionMode:n,children:a}=f,o=n?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let s;e[0]!==o?(s=ge("overflow-hidden transition-all duration-150 ease-out",o),e[0]=o,e[1]=s):s=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ut,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:tn,children:t.jsx(Xt,{size:20})})}),e[2]=i):i=e[2];let l;e[3]!==a?(l=t.jsxs(Rt,{children:[i,t.jsx(Wt,{align:"end",onClick:en,children:a})]}),e[3]=a,e[4]=l):l=e[4];let d;return e[5]!==s||e[6]!==l?(d=t.jsx("div",{className:s,children:l}),e[5]=s,e[6]=l,e[7]=d):d=e[7],d}function en(f){return f.stopPropagation()}function tn(f){return f.stopPropagation()}function nn(f){const e=ne.c(49),{group:n,onOpen:a,selectionMode:o,selectedIds:s,onToggleSelect:i}=f;let l;if(e[0]!==n.connections||e[1]!==s){let k;e[3]!==s?(k=M=>s.has(M.id),e[3]=s,e[4]=k):k=e[4],l=n.connections.every(k),e[0]=n.connections,e[1]=s,e[2]=l}else l=e[2];const d=l;let j;if(e[5]!==n.connections||e[6]!==s){let k;e[8]!==s?(k=M=>s.has(M.id),e[8]=s,e[9]=k):k=e[9],j=n.connections.some(k),e[5]=n.connections,e[6]=s,e[7]=j}else j=e[7];const y=j;let C;e[10]!==d||e[11]!==n.connections||e[12]!==i||e[13]!==s?(C=()=>{for(const k of n.connections)d?s.has(k.id)&&i(k.id):s.has(k.id)||i(k.id)},e[10]=d,e[11]=n.connections,e[12]=i,e[13]=s,e[14]=C):C=e[14];const v=C,u=`${n.connections.length} instances`;let p;e[15]!==n.icon||e[16]!==n.title||e[17]!==u?(p={title:n.title,icon:n.icon,description:u},e[15]=n.icon,e[16]=n.title,e[17]=u,e[18]=p):p=e[18];let c;e[19]!==a||e[20]!==o||e[21]!==v?(c=()=>o?v():a(),e[19]=a,e[20]=o,e[21]=v,e[22]=c):c=e[22];const S=o&&d&&"ring-2 ring-primary",_=o&&y&&!d&&"ring-1 ring-primary/50";let b;e[23]!==S||e[24]!==_?(b=ge(S,_),e[23]=S,e[24]=_,e[25]=b):b=e[25];let w;e[26]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(he,{}),e[26]=w):w=e[26];let D;e[27]!==d||e[28]!==n.connections.length||e[29]!==o||e[30]!==y||e[31]!==v?(D=o?t.jsx(Re,{checked:d?!0:y?"indeterminate":!1,onCheckedChange:v}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[27]=d,e[28]=n.connections.length,e[29]=o,e[30]=y,e[31]=v,e[32]=D):D=e[32];let r;e[33]!==a?(r=k=>{k.stopPropagation(),a()},e[33]=a,e[34]=r):r=e[34];let I;e[35]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(We,{size:16}),e[35]=I):I=e[35];let $;e[36]!==r?($=t.jsxs(re,{onClick:r,children:[I,"Open"]}),e[36]=r,e[37]=$):$=e[37];let L;e[38]!==o||e[39]!==$?(L=t.jsx(qe,{selectionMode:o,children:$}),e[38]=o,e[39]=$,e[40]=L):L=e[40];let T;e[41]!==D||e[42]!==L?(T=t.jsxs("div",{className:"flex items-center gap-1",children:[D,L]}),e[41]=D,e[42]=L,e[43]=T):T=e[43];let O;return e[44]!==T||e[45]!==p||e[46]!==c||e[47]!==b?(O=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:p,onClick:c,className:b,fallbackIcon:w,headerActionsAlwaysVisible:!0,headerActions:T})}),e[44]=T,e[45]=p,e[46]=c,e[47]=b,e[48]=O):O=e[48],O}function sn(f){const e=ne.c(29),{connection:n,isSelected:a,selectionMode:o,canManage:s,canManageAgents:i,onToggleSelect:l,onOpen:d,onToggleStatus:j,onDelete:y}=f;let C;e[0]!==a||e[1]!==l||e[2]!==o?(C=o?t.jsx(Re,{checked:a,onCheckedChange:l,onClick:on}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),e[0]=a,e[1]=l,e[2]=o,e[3]=C):C=e[3];let v;e[4]!==d?(v=D=>{D.stopPropagation(),d()},e[4]=d,e[5]=v):v=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(We,{size:16}),e[6]=u):u=e[6];let p;e[7]!==v?(p=t.jsxs(re,{onClick:v,children:[u,"Open"]}),e[7]=v,e[8]=p):p=e[8];let c;e[9]!==s||e[10]!==i||e[11]!==l?(c=(s||i)&&t.jsxs(re,{onClick:D=>{D.stopPropagation(),l()},children:[t.jsx(Lt,{size:16}),"Select"]}),e[9]=s,e[10]=i,e[11]=l,e[12]=c):c=e[12];let S;e[13]!==s||e[14]!==n||e[15]!==j?(S=s&&(n.status==="active"?t.jsxs(re,{onClick:D=>{D.stopPropagation(),j("inactive")},children:[t.jsx($t,{size:16}),"Disable"]}):t.jsxs(re,{onClick:D=>{D.stopPropagation(),j("active")},children:[t.jsx(Ot,{size:16}),"Enable"]})),e[13]=s,e[14]=n,e[15]=j,e[16]=S):S=e[16];let _;e[17]!==s||e[18]!==y?(_=s&&t.jsxs(re,{variant:"destructive",onClick:D=>{D.stopPropagation(),y()},children:[t.jsx(Xe,{size:16}),"Delete"]}),e[17]=s,e[18]=y,e[19]=_):_=e[19];let b;e[20]!==o||e[21]!==p||e[22]!==c||e[23]!==S||e[24]!==_?(b=t.jsxs(qe,{selectionMode:o,children:[p,c,S,_]}),e[20]=o,e[21]=p,e[22]=c,e[23]=S,e[24]=_,e[25]=b):b=e[25];let w;return e[26]!==C||e[27]!==b?(w=t.jsxs("div",{className:"flex items-center gap-1",children:[C,b]}),e[26]=C,e[27]=b,e[28]=w):w=e[28],w}function on(f){return f.stopPropagation()}function rn(f){const e=ne.c(23),{count:n,total:a,canManage:o,canManageAgents:s,onSelectAll:i,onDeselectAll:l,onDelete:d,onAddToAgent:j,onToggleStatus:y,onCancel:C}=f;if(n===0)return null;let v;e[0]!==n?(v=t.jsxs("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=v):v=e[1];let u;e[2]!==n||e[3]!==l||e[4]!==i||e[5]!==a?(u=n<a?t.jsxs(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:i,children:["Select all (",a,")"]}):t.jsx(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:l,children:"Clear selection"}),e[2]=n,e[3]=l,e[4]=i,e[5]=a,e[6]=u):u=e[6];let p;e[7]!==s||e[8]!==j?(p=s&&t.jsxs(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:j,children:[t.jsx(He,{size:13}),"Add to Agent"]}),e[7]=s,e[8]=j,e[9]=p):p=e[9];let c;e[10]!==o||e[11]!==d||e[12]!==y?(c=o&&t.jsxs(t.Fragment,{children:[t.jsx(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("active"),children:"Enable"}),t.jsx(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("inactive"),children:"Disable"}),t.jsxs(K,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:d,children:[t.jsx(Xe,{size:13}),"Delete"]})]}),e[10]=o,e[11]=d,e[12]=y,e[13]=c):c=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Ue,{size:13}),e[14]=S):S=e[14];let _;e[15]!==C?(_=t.jsx(K,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:C,children:S}),e[15]=C,e[16]=_):_=e[16];let b;return e[17]!==v||e[18]!==u||e[19]!==p||e[20]!==c||e[21]!==_?(b=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl border border-border bg-background/95 shadow-lg backdrop-blur px-3 py-2 flex items-center gap-2",children:[v,u,p,c,_]})}),e[17]=v,e[18]=u,e[19]=p,e[20]=c,e[21]=_,e[22]=b):b=e[22],b}function ln(f){const e=ne.c(25),{open:n,onOpenChange:a,agents:o,onConfirm:s}=f,[i,l]=V.useState(null);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsxs(Me,{children:[t.jsx(Fe,{children:"Add to Agent"}),t.jsx(ze,{children:"Select an agent to add the selected connections to."})]}),e[0]=d):d=e[0];let j;e[1]!==o||e[2]!==i?(j=o.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No agents found"}):o.map(b=>t.jsxs("button",{type:"button",onClick:()=>l(b.id),className:ge("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",i===b.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(Ht,{icon:b.icon,name:b.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:b.title}),b.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b.description})]})]},b.id)),e[1]=o,e[2]=i,e[3]=j):j=e[3];let y;e[4]!==j?(y=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:j}),e[4]=j,e[5]=y):y=e[5];let C;e[6]!==a?(C=t.jsx(K,{variant:"outline",onClick:()=>a(!1),children:"Cancel"}),e[6]=a,e[7]=C):C=e[7];const v=!i;let u;e[8]!==s||e[9]!==a||e[10]!==i?(u=()=>{i&&(s(i),a(!1),l(null))},e[8]=s,e[9]=a,e[10]=i,e[11]=u):u=e[11];let p;e[12]!==v||e[13]!==u?(p=t.jsx(K,{disabled:v,onClick:u,children:"Add"}),e[12]=v,e[13]=u,e[14]=p):p=e[14];let c;e[15]!==C||e[16]!==p?(c=t.jsxs(Ve,{children:[C,p]}),e[15]=C,e[16]=p,e[17]=c):c=e[17];let S;e[18]!==y||e[19]!==c?(S=t.jsxs(Ee,{className:"sm:max-w-[400px]",children:[d,y,c]}),e[18]=y,e[19]=c,e[20]=S):S=e[20];let _;return e[21]!==a||e[22]!==n||e[23]!==S?(_=t.jsx(Be,{open:n,onOpenChange:a,children:S}),e[21]=a,e[22]=n,e[23]=S,e[24]=_):_=e[24],_}function cn({listState:f,activeTab:e,typeFilter:n,statusFilter:a,registryFilter:o,enabledRegistries:s}){const{org:i}=be(),l=nt(),d=_e(),{data:j}=Ne.useSession(),y=Ke(),C=wt(f),v=pt(),{granted:u}=ye("connections:manage"),{granted:p}=ye("agents:manage"),[c,S]=V.useState(new Set),_=c.size>0,[b,w]=V.useState(!1),[D,r]=V.useState(!1),[I,$]=V.useState(null),L=It(),T=C.filter(m=>!(n!=="ALL"&&m.connection_type!==n||a!=="ALL"&&m.status!==a)),O=mt(T),k=m=>{S(x=>{const B=new Set(x);return B.has(m)?B.delete(m):B.add(m),B})},M=()=>{S(new Set)},F=ke(s,f.searchTerm),q=F.items,U=ht(F.loadMore,F.hasMore,F.isLoadingMore),W=new Set(C.filter(m=>m.app_name).map(m=>m.app_name)),g=o==="ALL"||s.some(m=>m.id===o)?o:"ALL",N=f.search.length>0,z=e==="all"||N?q.filter(m=>{if(g!=="ALL"&&m._registryId!==g)return!1;if(N){const x=De(m);if(x&&W.has(x))return!1}return!0}):[],H=e==="connected"||N?O:[],E=async m=>{if(!(!i||!j?.user?.id)){te("connection_add_clicked",{action:"connect_new",registry_item_id:m.id,source:"connections_page"}),$(m.id);try{const x=rt(m,i.id,j.user.id,{remoteIndex:0}),B=x.connection_type==="STDIO",G=!!x.connection_url,X=B&&x.connection_headers&&typeof x.connection_headers=="object"&&"command"in x.connection_headers;if(!G&&!X){R.error("This MCP Server cannot be connected: no connection method available"),$(null);return}const{id:se}=await y.create.mutateAsync(x),le=await Kt({connectionId:se,orgId:i.id,orgSlug:i.slug,persistFallback:fe=>y.update.mutateAsync({id:se,data:{connection_token:fe}}).then(()=>{})});if(le.ran&&!le.ok){te("connection_oauth_failed",{connection_id:se,flow:"connections_page_connect",error:le.error??"no_token"}),R.error(`Authentication failed: ${le.error??"no token received"}`);return}if(le.ran){te("connection_oauth_succeeded",{connection_id:se,flow:"connections_page_connect"});const fe=new URL(`/api/${i.slug}/mcp/${se}`,window.location.origin);await l.invalidateQueries({queryKey:st.isMCPAuthenticated(fe.href,null)}),P(),R.success("Authentication successful")}R.success("Connected successfully")}catch(x){R.error(`Failed to connect: ${x instanceof Error?x.message:String(x)}`)}finally{$(null)}}},h=Pt(),P=()=>{l.invalidateQueries({predicate:m=>{const x=m.queryKey;return x[1]===i.id&&x[3]==="collection"&&x[4]==="CONNECTIONS"}})},A=async()=>{w(!1);const m=[...c];te("connections_bulk_delete",{count:m.length});let x=0;for(const B of m)try{await h.call("COLLECTION_CONNECTIONS_DELETE",{id:B,force:!0}),x++}catch{}P(),R.success(`Deleted ${x} connection${x!==1?"s":""}`),M()},oe=async(m,x)=>{try{await y.update.mutateAsync({id:m,data:{status:x}}),P(),R.success(x==="active"?"Connection enabled":"Connection disabled")}catch{R.error("Failed to update connection")}},xe=async m=>{const x=[...c];te("connections_bulk_status_toggled",{count:x.length,to_status:m});let B=0;for(const G of x)try{await y.update.mutateAsync({id:G,data:{status:m}}),B++}catch{}P(),R.success(`${m==="active"?"Enabled":"Disabled"} ${B} connection${B!==1?"s":""}`),M()},de=async m=>{const x=L.find(X=>X.id===m);if(!x)return;te("connections_bulk_add_to_agent",{agent_id:m,count:c.size});const B=new Set(x.connections.map(X=>X.connection_id)),G=[...c].filter(X=>!B.has(X)).map(X=>({connection_id:X,selected_tools:null,selected_resources:null,selected_prompts:null}));if(G.length===0){R.info("All selected connections are already in that agent");return}try{await h.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:m,data:{connections:[...x.connections,...G]}}),l.invalidateQueries({predicate:X=>{const se=X.queryKey;return se[1]===i.id&&se[3]==="collection"&&se[4]==="VIRTUAL_MCP"}}),R.success(`Added ${G.length} connection${G.length!==1?"s":""} to "${x.title}"`),M()}catch{R.error("Failed to add connections to agent")}};return t.jsxs(t.Fragment,{children:[t.jsx(gt,{...v}),t.jsx(Qt,{open:b,onOpenChange:w,count:c.size,onConfirm:A}),t.jsx(ln,{open:D,onOpenChange:r,agents:L,onConfirm:de}),F.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ae,{size:32,className:"animate-spin text-muted-foreground"})}):t.jsx("div",{children:(N?z.length===0&&T.length===0:e==="all"?z.length===0:T.length===0)?t.jsx(ut,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:"No Connections found",description:f.search?`No Connections match "${f.search}"`:u?"Create a connection to get started.":"Ask an organization admin to add one."}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[H.map(m=>{if(m.type==="group")return t.jsx(nn,{group:m,onOpen:()=>{d({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:m.key}})},selectionMode:_,selectedIds:c,onToggleSelect:k},m.key);const x=m.connection,B=c.has(x.id);return t.jsx(Ce,{connection:x,fallbackIcon:t.jsx(he,{}),onClick:()=>_?k(x.id):d({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:pe(x)}}),className:ge(B&&"ring-2 ring-primary bg-primary/5"),headerActionsAlwaysVisible:!0,headerActions:t.jsx(sn,{connection:x,isSelected:B,selectionMode:_,canManage:u,canManageAgents:p,onToggleSelect:()=>k(x.id),onOpen:()=>d({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:pe(x)}}),onToggleStatus:G=>oe(x.id,G),onDelete:()=>v.requestDelete(x)})},x.id)}),z.map(m=>t.jsx(Zt,{item:m,canManage:u,allConnections:C,connectedAppNames:W,connectingItemId:I,onNavigateConnected:x=>d({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:pe(x)}}),onConnect:E},`catalog-${m._registryId}:${m.id}`)),(e==="all"||N)&&s.length>0&&t.jsx("div",{ref:U,className:"col-span-full h-4"}),(e==="all"||N)&&F.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ae,{size:24,className:"animate-spin text-muted-foreground"})})]})}),_&&t.jsx(rn,{count:c.size,total:T.length,canManage:u,canManageAgents:p,onSelectAll:()=>{S(new Set(T.map(m=>m.id)))},onDeselectAll:()=>S(new Set),onDelete:()=>w(!0),onAddToAgent:()=>r(!0),onToggleStatus:xe,onCancel:M})]})}function an(){const{org:f}=be(),e=_e(),n=Je({strict:!1}),{data:a}=Ne.useSession(),{stdioEnabled:o}=Qe(),s=_t(),{granted:i}=ye("connections:manage"),l=Jt({namespace:f.slug,resource:"connections"}),d=Ke(),[j,y]=Ye(Ze.connectionsTab(f.slug),g=>n.tab==="all"||n.tab==="connected"?n.tab:g??"all"),[C,v]=V.useState("ALL"),[u,p]=V.useState("ALL"),[c,S]=V.useState("ALL"),_=dt(),w=ke(_,l.searchTerm).items,D=l.search!==l.searchTerm,r=et({resolver:tt(zt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),I=r.watch("ui_type"),$=r.watch("connection_url"),L=r.watch("npx_package"),T=ue({uiType:I,connectionUrl:$??"",npxPackage:L??""})??Se({uiType:I,connectionUrl:$??"",registryItems:w}),O=i&&n.action==="create",k=()=>{te("connections_custom_dialog_opened",{source:"connections_page"}),e({to:"/$org/settings/connections",params:{org:f.slug},search:{action:"create"}})},M=()=>{e({to:"/$org/settings/connections",params:{org:f.slug},search:{}})},F=async g=>{let N,z=null,H=null,E=null;g.ui_type==="NPX"?(N="STDIO",z="",E=Et(g.npx_package||"",g.env_vars||[])):g.ui_type==="STDIO"?(N="STDIO",z="",E=Bt(g.stdio_command||"",g.stdio_args||"",g.stdio_cwd,g.env_vars||[])):(N=g.ui_type,z=g.connection_url||"",H=g.connection_token||null);const h=it("conn");te("connection_custom_created",{connection_type:N,ui_type:g.ui_type}),await d.create.mutateAsync({id:h,title:g.title,description:g.description||null,connection_type:N,connection_url:z,connection_token:H,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:a?.user?.id||"system",organization_id:f.id,icon:g.icon??null,app_name:null,app_id:null,connection_headers:E,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),M(),r.reset(),e({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:pe({app_name:null,connection_url:z,title:g.title,id:h})}})},q=g=>{g||(O&&M(),r.reset())},U=g=>{const N=g.trim();if(!N)return;const z=!!r.formState.dirtyFields.title,H=!!r.formState.dirtyFields.description,E=!!r.formState.dirtyFields.env_vars,h=A=>{if(A&&(!z&&!r.getValues("title").trim()&&A.title&&r.setValue("title",A.title,{shouldDirty:!1}),!H&&!(r.getValues("description")??"").trim()&&A.description&&r.setValue("description",A.description,{shouldDirty:!1}),!E&&A.envVarKeys?.length)){const oe=r.getValues("env_vars")??[],xe=new Set(oe.map(m=>m.key)),de=A.envVarKeys.filter(m=>!xe.has(m));de.length>0&&r.setValue("env_vars",[...oe,...de.map(m=>({key:m,value:""}))],{shouldDirty:!0})}},P=Vt(N);if(P&&o){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",P.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),h(ue({uiType:"NPX",npxPackage:P.packageName}));return}if(N.startsWith("http://")||N.startsWith("https://")){const A=I==="HTTP"||I==="SSE"||I==="Websocket"?I:"HTTP";r.setValue("ui_type",A,{shouldDirty:!0}),r.setValue("connection_url",N,{shouldDirty:!0}),h(ue({uiType:A,connectionUrl:N})??Se({uiType:A,connectionUrl:N,registryItems:w}));return}I==="NPX"&&h(ue({uiType:"NPX",npxPackage:N}))},W=i?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(K,{variant:"outline",onClick:k,children:[t.jsx(He,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:"Custom Connection"})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(me,{children:[(()=>{const g="Create Connection",N="Create a custom connection in your organization. Fill in the details below.",z=r.formState.isSubmitting?"Saving...":"Create Connection",H=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(J,{control:r.control,name:"ui_type",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:"Type *"}),t.jsxs(Nt,{value:h.value,onValueChange:h.onChange,children:[t.jsx(Z,{children:t.jsx(Dt,{children:t.jsx(kt,{})})}),t.jsxs(At,{children:[t.jsx(ce,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(ce,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(ce,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"Websocket"]})}),o&&t.jsxs(t.Fragment,{children:[t.jsx(ce,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(he,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(ce,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Mt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(ee,{})]})}),I==="NPX"&&t.jsx(J,{control:r.control,name:"npx_package",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:"NPM Package *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"@perplexity-ai/mcp-server",...h,value:h.value??"",onPaste:P=>{const A=P.clipboardData.getData("text");A&&(P.preventDefault(),r.setValue("npx_package",A.trim(),{shouldDirty:!0}),U(A))},onBlur:P=>{U(P.target.value),h.onBlur()}})}),t.jsx(ee,{})]})}),I==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(J,{control:r.control,name:"stdio_command",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:"Command *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"node, bun, python...",...h,value:h.value??""})}),t.jsx(ee,{})]})}),t.jsx(J,{control:r.control,name:"stdio_args",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:"Arguments"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"arg1 arg2 --flag value",...h,value:h.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(J,{control:r.control,name:"stdio_cwd",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:"Working Directory"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"/path/to/project (optional)",...h,value:h.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),t.jsx(ee,{})]})})]}),(I==="NPX"||I==="STDIO")&&t.jsx(J,{control:r.control,name:"env_vars",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:"Environment Variables"}),t.jsx(Z,{children:t.jsx(Ft,{value:h.value??[],onChange:h.onChange})}),t.jsx(ee,{})]})}),I!=="NPX"&&I!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(J,{control:r.control,name:"connection_url",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:"URL *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"https://example.com/mcp",...h,value:h.value??"",onPaste:P=>{const A=P.clipboardData.getData("text");A&&(P.preventDefault(),r.setValue("connection_url",A.trim(),{shouldDirty:!0}),U(A))},onBlur:P=>{U(P.target.value),h.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(J,{control:r.control,name:"connection_token",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:T?.token?.label??"Token (optional)"}),t.jsx(Z,{children:t.jsx(ie,{type:"password",placeholder:T?.token?.placeholder??"Bearer token or API key",...h,value:h.value??""})}),T?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[T.token.helperText,T.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),t.jsx(ee,{})]})})]}),t.jsx(J,{control:r.control,name:"title",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:"Name *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"My Connection",...h})}),t.jsx(ee,{})]})}),t.jsx(J,{control:r.control,name:"description",render:({field:h})=>t.jsxs(Q,{children:[t.jsx(Y,{children:"Description"}),t.jsx(Z,{children:t.jsx(Tt,{placeholder:"A brief description of this connection",rows:3,...h,value:h.value??""})}),t.jsx(ee,{})]})})]}),E=O;return s?t.jsx(ft,{open:E,onOpenChange:q,children:t.jsxs(jt,{className:"max-h-[90vh]",children:[t.jsx(yt,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Ct,{children:g}),t.jsx(vt,{className:"mt-1",children:N})]}),t.jsx(St,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Ue,{size:16})})})]})}),t.jsx(ve,{...r,children:t.jsxs("form",{onSubmit:r.handleSubmit(F),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:H}),t.jsx(bt,{children:t.jsx(K,{type:"submit",disabled:r.formState.isSubmitting,className:"w-full",children:z})})]})})]})}):t.jsx(Be,{open:E,onOpenChange:q,children:t.jsxs(Ee,{className:"sm:max-w-[525px]",children:[t.jsxs(Me,{children:[t.jsx(Fe,{children:g}),t.jsx(ze,{children:N})]}),t.jsx(ve,{...r,children:t.jsxs("form",{onSubmit:r.handleSubmit(F),children:[t.jsx("div",{className:"py-4",children:H}),t.jsxs(Ve,{children:[t.jsx(K,{type:"button",variant:"outline",onClick:()=>q(!1),children:"Cancel"}),t.jsx(K,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:z})]})]})})]})})})(),t.jsx(me.Content,{children:t.jsx(me.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(me.Title,{children:"Connections"}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ct,{value:l.search,onChange:l.setSearch,placeholder:"Search for a connection",className:"w-full md:w-[375px]",onKeyDown:g=>{g.key==="Escape"&&(l.setSearch(""),g.target.blur())}}),t.jsx(lt,{sortKey:l.sortKey,sortDirection:l.sortDirection,onSort:l.handleSort,sortOptions:[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],filters:[{label:"Type",value:C,onChange:g=>v(g||"ALL"),options:[{id:"ALL",label:"All"},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:"Status",value:u,onChange:g=>p(g||"ALL"),options:[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"},{id:"error",label:"Error"}]},..._.length>1?[{label:"Registry",value:c,onChange:g=>S(g||"ALL"),options:[{id:"ALL",label:"All registries"},..._.map(g=>({id:g.id,label:g.id.includes("community-registry")?"Community MCP Registry":g.title}))]}]:[]]})]}),W]}),t.jsx(at,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:g=>{const N=g;N!==j&&te("connections_page_tab_changed",{to_tab:N}),y(N)}}),t.jsx(V.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ae,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:D?.5:1,transition:D?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:D?"none":"auto"},children:t.jsx(cn,{listState:l,activeTab:j,typeFilter:C,statusFilter:u,registryFilter:c,enabledRegistries:_})})})]})})})]})})}function eo(){const f=ne.c(1);let e;return f[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ge,{children:t.jsx(V.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ae,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(an,{})})}),f[0]=e):e=f[0],e}export{eo as default};
@@ -1 +0,0 @@
1
- import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-DF3zg-P1.js";import{i as $}from"./Check-BF3t7WWi.js";import{i as D}from"./ChevronRight-Fgy0rUS_.js";import{i as M}from"./Circle-0HId1SV6.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function E(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function G(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function L(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
@@ -1,2 +0,0 @@
1
- import{c as Y,r as u,j as r,i as oe,B as pe,d$ as jt,aO as Nt,aU as re,e0 as St,e1 as Mt,e2 as Dt,e3 as Rt,bO as Pt,e4 as Et,e5 as Be,aQ as kt,e6 as Tt,e7 as Ot,e8 as At,e9 as Lt,ea as Ft,eb as $t,ec as It,ed as _t,ee as zt,l as ie,n as Gt,t as Q,K as Le}from"./index-DF3zg-P1.js";import{F as Kt,l as Bt}from"./index-cG8paP3z.js";import{c as Vt,aw as Ut,ax as Wt}from"./agent-icon-DmIJ53uv.js";import{s as Qt}from"./XClose-DnNyN9T-.js";import{A as qt}from"./automation-runs-yMzfgCqo.js";import{b as Fe,T as $e,a as Ie}from"./tooltip-O3iHy7-o.js";import{b as Ht}from"./chat-context-CyCuyn4t.js";import{u as Xt}from"./shell-layout-Bo6QxW8m.js";import{s as de,a as _e,f as Yt}from"./index-DonY639O.js";import{a as Jt,h as Zt,D as en,c as tn,d as nn,e as rn}from"./dialog-CmXDzme5.js";import{I as ze}from"./input-BZTiU0ds.js";import{c as on,d as an,b as sn,A as ln,g as cn,e as dn,a as un,f as mn}from"./alert-dialog-3VMQ65hF.js";import{t as fn}from"./ChevronDown-CQLSXgt3.js";import{i as pn}from"./ChevronRight-Fgy0rUS_.js";import{a as xn}from"./ZoomOut-_psBJlXD.js";import{v as hn,E as gn,w as Ge,x as ve,y as vn,z as Cn,A as yn,C as H,D as ue,G as wn,g as Ce,I as ye,J as bn,K as jn,M as we,N as me,O as be,P as Nn,Q as Sn}from"./index-BCiDnhhX.js";import"./AlertCircle-B6AELEdc.js";import"./UserPlus01-D2pAl0t2.js";import"./Tool01-4pit7qOS.js";import"./ArrowUp-YK2fJPgi.js";import"./Settings02-CM0Uzs0U.js";import"./Tool02-tJKj7JcW.js";import"./XCircle-cwYbcP7y.js";import"./ArrowUpRight-BKVLcZTe.js";import"./TrendUp01-7N_6K3-X.js";import"./ZapSquare-Dj8pa8Fg.js";import"./Users03-WVYBBENu.js";import"./CheckCircle-BfxYbuVE.js";import"./Check-BF3t7WWi.js";import"./ChevronUp-Y-IpPAUR.js";import"./Circle-0HId1SV6.js";import"./Stars02-DBH33Ez2.js";import"./Copy01-B0CQRE_5.js";import"./DotsVertical-CYU3Mae1.js";import"./Globe01-B52VKYy7.js";import"./Eye-CLtdCpUf.js";import"./FilterLines-DeiGsRZY.js";import"./Flag01-B_AKNFoc.js";import"./Star01-B-8espqJ.js";import"./Globe04-B0las6Jv.js";import"./SwitchHorizontal01-DUrn8gXV.js";import"./HardDrive-CU-vvmKE.js";import"./Image01-B-FQwXx8.js";import"./Key01-myvTSA8u.js";import"./LayoutLeft-C0g0LezP.js";import"./LinkExternal01-d9EixhiS.js";import"./List-DZAsltZv.js";import"./Monitor01-BkDBzdlH.js";import"./Sun-MvOAGgKN.js";import"./Package-eNacrLmv.js";import"./Palette-BiKqXWvc.js";import"./Play-CdkPhmTs.js";import"./Plus-DWjKZ2wj.js";import"./SearchLg-DBOWvxyl.js";import"./SearchMd-CKteZWzZ.js";import"./Shield01-aDvWVv5Z.js";import"./Stars01-DsfblQf3.js";import"./Trash01-DEWgFvvg.js";import"./Upload01-C8RP0Fvq.js";import"./User01-v0Bqr3nA.js";import"./Users01-CPNZ7uMu.js";import"./X-Dm6kY_ek.js";import"./Zap-CNRURtEh.js";import"./select-B6GE4jHJ.js";import"./useInfiniteQuery-DKhJHTs2.js";import"./use-infinite-scroll-Dt7gLdpr.js";import"./use-connection-twfWXxwG.js";import"./use-collections-K1HyCAfG.js";import"./use-mcp-client-DrROXOcH.js";import"./constants-BHDe7bIw.js";import"./auth-dSVlMQ86.js";import"./use-virtual-mcp-C964oRwj.js";import"./card-dLLzWD0r.js";import"./sidebar-BFdShy9x.js";import"./use-mobile-nauPjzo2.js";import"./table-XKbQ5Wjx.js";import"./empty-state-CdKwtMyP.js";import"./use-members-mvfsRjey.js";import"./use-org-auth-client-jU0nDPT-.js";import"./use-clock-tick-DboEo7Cc.js";import"./use-automations-C01orYPa.js";import"./studio-tools-bThaob6p.js";import"./useSuspenseInfiniteQuery-DAAXTkZt.js";import"./avatar-UXZ4R5Yb.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DQ4y4418.js";import"./file-type-icon-DjNFZnTs.js";import"./tab-id-BijBBRwE.js";import"./hooks-QHrmNjJQ.js";import"./decopilot-sse-pool-DHojW3EC.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-BzdwB2U8.js";import"./index-BjO8A-VO.js";import"./integration-icon-BfKWLZT4.js";import"./use-navigate-to-agent-BJC_x779.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-fCNs67j_.js";import"./form-x0k-kdB2.js";import"./label-B1OfKy2N.js";import"./autosend-D_-616qs.js";import"./use-ai-providers-B4nhSJlr.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-BEOY-_n2.js";import"./use-organization-settings-BJ1bjHsL.js";import"./required-auth-layout-vPZ2d-Yx.js";import"./use-org-sso-j8hZyqdO.js";import"./drawer-Ds-r7525.js";import"./collection-search-C4jDpdZf.js";import"./tabs-D-6eQ0wE.js";import"./toggle-group-BcxqPGrf.js";import"./use-deco-credits-Bm-VH5Hm.js";import"./extract-connection-data-CK9iLAoG.js";import"./connection-card-CtY9PRIw.js";import"./use-registry-connections-D94L7VqK.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-PYu4eHQV.js";import"./connection-form-helpers-TGmycj7X.js";import"./authenticate-and-persist-oauth-BHT9Kp62.js";import"./mcp-oauth-CoKzxQiz.js";import"./collection-tabs-DvvibY6H.js";import"./badge-CfAmvo-h.js";import"./connect-desktop-dialog-CPSwwSyz.js";import"./select-model-CebmAt-C.js";import"./checkbox-CxV2vfbv.js";import"./skeleton-BGZh750P.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DS6otYn7.js";import"./command-EQNrbniG.js";import"./index-CUVgjm02.js";import"./popover-BzHpXFL_.js";import"./dropdown-menu-BgNr7tM1.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B1YKt2sD.js";import"./toolbar-D90MFc80.js";import"./use-mcp-tools-D28ox9dJ.js";import"./use-capability--WeMT0KP.js";import"./toolbar-icon-button-D3m9VnTI.js";import"./use-debounced-autosave-BdWGMbok.js";import"./index-CeqD0RVV.js";import"./search-input-ByuB0YyC.js";import"./use-mcp-auth-status-C7G9bAkb.js";import"./switch-C2KH_TaK.js";import"./use-registry-app-CeyrXTI4.js";import"./github-repo-picker-C-tZ-Bba.js";import"./use-debounced-value-xN0eyoO9.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./github-repo-scope-DjMZbiKa.js";import"./use-secrets-C1Fme0Ya.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-fc2Z_sCB.js";import"./index-DKadkG06.js";import"./get-initials-D-f_fDFw.js";import"./calendar-BdMqQsTv.js";import"./use-file-configs-Bs9N4w-Z.js";import"./automation-list-row-PkSpkeID.js";const Mn={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function Dn(s){const e=Y.c(51),{open:i,mode:a,initialName:c,parentLabel:m,isPending:h,onSubmit:p,onOpenChange:v}=s,C=c===void 0?"":c,d=h===void 0?!1:h,[x,y]=u.useState(C),[D,k]=u.useState(i),g=Mn[a];i!==D&&(k(i),i&&y(C));let b;e[0]!==d||e[1]!==v?(b=V=>{!V&&!d&&v(!1)},e[0]=d,e[1]=v,e[2]=b):b=e[2];const U=b;let T;e[3]!==d||e[4]!==x||e[5]!==p?(T=async V=>{V.preventDefault();const q=x.trim();!q||d||await p(q)},e[3]=d,e[4]=x,e[5]=p,e[6]=T):T=e[6];const O=T;let j;e[7]!==g.title?(j=r.jsx(Jt,{children:g.title}),e[7]=g.title,e[8]=j):j=e[8];let w;e[9]!==g.description?(w=r.jsx(Zt,{children:g.description}),e[9]=g.description,e[10]=w):w=e[10];let A;e[11]!==j||e[12]!==w?(A=r.jsxs(en,{children:[j,w]}),e[11]=j,e[12]=w,e[13]=A):A=e[13];let L;e[14]!==m?(L=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(ze,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=m,e[15]=L):L=e[15];let G;e[16]===Symbol.for("react.memo_cache_sentinel")?(G=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=G):G=e[16];let $;e[17]===Symbol.for("react.memo_cache_sentinel")?($=V=>y(V.target.value),e[17]=$):$=e[17];let I;e[18]!==g.placeholder||e[19]!==d||e[20]!==x?(I=r.jsxs("div",{className:"space-y-1.5",children:[G,r.jsx(ze,{id:"file-explorer-name",value:x,onChange:$,placeholder:g.placeholder,autoFocus:!0,disabled:d})]}),e[18]=g.placeholder,e[19]=d,e[20]=x,e[21]=I):I=e[21];let R;e[22]!==I||e[23]!==L?(R=r.jsxs("div",{className:"space-y-4 py-4",children:[L,I]}),e[22]=I,e[23]=L,e[24]=R):R=e[24];let P;e[25]!==v?(P=()=>v(!1),e[25]=v,e[26]=P):P=e[26];let _;e[27]!==d||e[28]!==P?(_=r.jsx(pe,{type:"button",variant:"outline",onClick:P,disabled:d,children:"Cancel"}),e[27]=d,e[28]=P,e[29]=_):_=e[29];let z;e[30]!==d||e[31]!==x?(z=!x.trim()||d,e[30]=d,e[31]=x,e[32]=z):z=e[32];let N;e[33]!==g.submit||e[34]!==d?(N=d?r.jsxs(r.Fragment,{children:[r.jsx(oe,{size:14,className:"animate-spin"}),"Saving…"]}):g.submit,e[33]=g.submit,e[34]=d,e[35]=N):N=e[35];let K;e[36]!==z||e[37]!==N?(K=r.jsx(pe,{type:"submit",disabled:z,children:N}),e[36]=z,e[37]=N,e[38]=K):K=e[38];let S;e[39]!==_||e[40]!==K?(S=r.jsxs(tn,{children:[_,K]}),e[39]=_,e[40]=K,e[41]=S):S=e[41];let E;e[42]!==O||e[43]!==R||e[44]!==S||e[45]!==A?(E=r.jsx(nn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:O,children:[A,R,S]})}),e[42]=O,e[43]=R,e[44]=S,e[45]=A,e[46]=E):E=e[46];let W;return e[47]!==U||e[48]!==i||e[49]!==E?(W=r.jsx(rn,{open:i,onOpenChange:U,children:E}),e[47]=U,e[48]=i,e[49]=E,e[50]=W):W=e[50],W}function Rn(s){const e=Y.c(31),{deleteTarget:i,deleteDirtyPaths:a,fsActionPending:c,onOpenChange:m,onConfirm:h}=s,p=i!==null,v=i?.kind==="directory"?"folder":"file";let C;e[0]!==v?(C=r.jsxs(on,{children:["Delete ",v,"?"]}),e[0]=v,e[1]=C):C=e[1];const d=i?.name;let x;e[2]!==d?(x=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=x):x=e[3];const y=i?.kind==="directory"?" and everything inside it.":".";let D;e[4]!==a.length?(D=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=D):D=e[5];let k;e[6]!==x||e[7]!==y||e[8]!==D?(k=r.jsxs(an,{children:["This will permanently delete"," ",x,y,D]}),e[6]=x,e[7]=y,e[8]=D,e[9]=k):k=e[9];let g;e[10]!==C||e[11]!==k?(g=r.jsxs(sn,{children:[C,k]}),e[10]=C,e[11]=k,e[12]=g):g=e[12];let b;e[13]!==c?(b=r.jsx(ln,{disabled:c,children:"Cancel"}),e[13]=c,e[14]=b):b=e[14];const U=c||!i;let T;e[15]!==i||e[16]!==h?(T=L=>{L.preventDefault(),i&&h(i)},e[15]=i,e[16]=h,e[17]=T):T=e[17];let O;e[18]!==U||e[19]!==T?(O=r.jsx(cn,{disabled:U,onClick:T,children:"Delete"}),e[18]=U,e[19]=T,e[20]=O):O=e[20];let j;e[21]!==b||e[22]!==O?(j=r.jsxs(dn,{children:[b,O]}),e[21]=b,e[22]=O,e[23]=j):j=e[23];let w;e[24]!==j||e[25]!==g?(w=r.jsxs(un,{children:[g,j]}),e[24]=j,e[25]=g,e[26]=w):w=e[26];let A;return e[27]!==m||e[28]!==p||e[29]!==w?(A=r.jsx(mn,{open:p,onOpenChange:m,children:w}),e[27]=m,e[28]=p,e[29]=w,e[30]=A):A=e[30],A}var je="ContextMenu",[Pn]=kt(je,[Be]),B=Be(),[En,Ve]=Pn(je),Ue=s=>{const{__scopeContextMenu:e,children:i,onOpenChange:a,dir:c,modal:m=!0}=s,[h,p]=u.useState(!1),v=B(e),C=Pt(a),d=u.useCallback(x=>{p(x),C(x)},[C]);return r.jsx(En,{scope:e,open:h,onOpenChange:d,modal:m,children:r.jsx(Et,{...v,dir:c,open:h,onOpenChange:d,modal:m,children:i})})};Ue.displayName=je;var We="ContextMenuTrigger",Qe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,disabled:a=!1,...c}=s,m=Ve(We,i),h=B(i),p=u.useRef({x:0,y:0}),v=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),C=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(C.current),[]),x=y=>{p.current={x:y.clientX,y:y.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(jt,{...h,virtualRef:v}),r.jsx(Nt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:a?s.onContextMenu:re(s.onContextMenu,y=>{d(),x(y),y.preventDefault()}),onPointerDown:a?s.onPointerDown:re(s.onPointerDown,fe(y=>{d(),C.current=window.setTimeout(()=>x(y),700)})),onPointerMove:a?s.onPointerMove:re(s.onPointerMove,fe(d)),onPointerCancel:a?s.onPointerCancel:re(s.onPointerCancel,fe(d)),onPointerUp:a?s.onPointerUp:re(s.onPointerUp,fe(d))})]})});Qe.displayName=We;var kn="ContextMenuPortal",qe=s=>{const{__scopeContextMenu:e,...i}=s,a=B(e);return r.jsx(Dt,{...a,...i})};qe.displayName=kn;var He="ContextMenuContent",Xe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=Ve(He,i),m=B(i),h=u.useRef(!1);return r.jsx(Rt,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{s.onCloseAutoFocus?.(p),!p.defaultPrevented&&h.current&&p.preventDefault(),h.current=!1},onInteractOutside:p=>{s.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(h.current=!0)},style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xe.displayName=He;var Tn="ContextMenuGroup",On=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Tt,{...c,...a,ref:e})});On.displayName=Tn;var An="ContextMenuLabel",Ln=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Ot,{...c,...a,ref:e})});Ln.displayName=An;var Fn="ContextMenuItem",Ye=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(St,{...c,...a,ref:e})});Ye.displayName=Fn;var $n="ContextMenuCheckboxItem",In=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(At,{...c,...a,ref:e})});In.displayName=$n;var _n="ContextMenuRadioGroup",zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Lt,{...c,...a,ref:e})});zn.displayName=_n;var Gn="ContextMenuRadioItem",Kn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Ft,{...c,...a,ref:e})});Kn.displayName=Gn;var Bn="ContextMenuItemIndicator",Vn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx($t,{...c,...a,ref:e})});Vn.displayName=Bn;var Un="ContextMenuSeparator",Je=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(Mt,{...c,...a,ref:e})});Je.displayName=Un;var Wn="ContextMenuArrow",Qn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(It,{...c,...a,ref:e})});Qn.displayName=Wn;var qn="ContextMenuSubTrigger",Hn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(_t,{...c,...a,ref:e})});Hn.displayName=qn;var Xn="ContextMenuSubContent",Yn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=B(i);return r.jsx(zt,{...c,...a,ref:e,style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Yn.displayName=Xn;function fe(s){return e=>e.pointerType!=="mouse"?s(e):void 0}var Jn=Ue,Zn=Qe,er=qe,tr=Xe,nr=Ye,rr=Je;function or(s){const e=Y.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Jn,{"data-slot":"context-menu",...i}),e[2]=i,e[3]=a):a=e[3],a}function ir(s){const e=Y.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Zn,{"data-slot":"context-menu-trigger",...i}),e[2]=i,e[3]=a):a=e[3],a}function ar(s){const e=Y.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(er,{children:r.jsx(tr,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function ee(s){const e=Y.c(12);let i,a,c,m;e[0]!==s?({className:i,inset:a,variant:m,...c}=s,e[0]=s,e[1]=i,e[2]=a,e[3]=c,e[4]=m):(i=e[1],a=e[2],c=e[3],m=e[4]);const h=m===void 0?"default":m;let p;e[5]!==i?(p=ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=p):p=e[6];let v;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==h?(v=r.jsx(nr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=h,e[11]=v):v=e[11],v}function Ke(s){const e=Y.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ie("bg-border -mx-1 my-1 h-px",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(rr,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}const sr="#d9a441";function lr(s){const e=Y.c(45),{node:i,depth:a,isExpanded:c,isSelected:m,isLoading:h,fileVisual:p,onOpen:v,onSelect:C,onNewFile:d,onNewFolder:x,onCopyPath:y,onCopyRelativePath:D,onRename:k,onDelete:g}=s,b=h===void 0?!1:h,U=i.kind==="directory",{Icon:T,color:O}=p,j=m&&"bg-accent";let w;e[0]!==j?(w=ie("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",j),e[0]=j,e[1]=w):w=e[1];const A=`${a*14+8}px`;let L;e[2]!==A?(L={paddingLeft:A},e[2]=A,e[3]=L):L=e[3];let G;e[4]!==v||e[5]!==C?(G=()=>{C(),v()},e[4]=v,e[5]=C,e[6]=G):G=e[6];let $;e[7]!==T||e[8]!==O||e[9]!==U||e[10]!==c||e[11]!==b?($=U?r.jsxs(r.Fragment,{children:[b?r.jsx(oe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(fn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(pn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(xn,{size:16,className:"shrink-0",style:{color:sr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(T,{size:16,className:"shrink-0",style:{color:O}})]}),e[7]=T,e[8]=O,e[9]=U,e[10]=c,e[11]=b,e[12]=$):$=e[12];let I;e[13]!==i.name?(I=r.jsx("span",{className:"truncate",children:i.name}),e[13]=i.name,e[14]=I):I=e[14];let R;e[15]!==w||e[16]!==L||e[17]!==G||e[18]!==$||e[19]!==I?(R=r.jsx(ir,{asChild:!0,children:r.jsxs("button",{type:"button",className:w,style:L,onClick:G,children:[$,I]})}),e[15]=w,e[16]=L,e[17]=G,e[18]=$,e[19]=I,e[20]=R):R=e[20];let P;e[21]!==d?(P=r.jsx(ee,{onSelect:d,children:"New File"}),e[21]=d,e[22]=P):P=e[22];let _;e[23]!==x?(_=r.jsx(ee,{onSelect:x,children:"New Folder"}),e[23]=x,e[24]=_):_=e[24];let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=r.jsx(Ke,{}),e[25]=z):z=e[25];let N;e[26]!==y?(N=r.jsx(ee,{onSelect:y,children:"Copy Path"}),e[26]=y,e[27]=N):N=e[27];let K;e[28]!==D?(K=r.jsx(ee,{onSelect:D,children:"Copy Relative Path"}),e[28]=D,e[29]=K):K=e[29];let S;e[30]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Ke,{}),e[30]=S):S=e[30];let E;e[31]!==k?(E=r.jsx(ee,{onSelect:k,children:"Rename"}),e[31]=k,e[32]=E):E=e[32];let W;e[33]!==g?(W=r.jsx(ee,{variant:"destructive",onSelect:g,children:"Delete"}),e[33]=g,e[34]=W):W=e[34];let V;e[35]!==P||e[36]!==_||e[37]!==N||e[38]!==K||e[39]!==E||e[40]!==W?(V=r.jsxs(ar,{className:"w-52",children:[P,_,z,N,K,S,E,W]}),e[35]=P,e[36]=_,e[37]=N,e[38]=K,e[39]=E,e[40]=W,e[41]=V):V=e[41];let q;return e[42]!==V||e[43]!==R?(q=r.jsxs(or,{children:[R,V]}),e[42]=V,e[43]=R,e[44]=q):q=e[44],q}Bt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(s,e,i,a){return`/api/${s}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(i)}/${a}`}function sa({orgSlug:s,virtualMcpId:e,branch:i,openPath:a}){const[c,m]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:p}=c,[v,C]=u.useState(new Set),[d,x]=u.useState(null),[y,D]=u.useState(null),[k,g]=u.useState([]),[b,U]=u.useState(""),[T,O]=u.useState(!1),[j,w]=u.useState(!1),[,A]=u.useState(new Set),[L,G]=u.useState(new Set),$=u.useRef(0),I=u.useRef(null),R=u.useRef(new Set),P=u.useRef(new Map);function _(t){A(n=>{const o=typeof t=="function"?t(n):t;return R.current=o,o})}const[z,N]=u.useState(new Map),K=u.useRef(null),[S,E]=u.useState(null),{sendMessage:W}=Ht(),{openSidePanel:V}=Xt(),q=Gt(),[F,X]=u.useState(null),[xe,he]=u.useState(null),[ae,se]=u.useState(!1);async function J(t,n){const o=await fetch(cr(s,e,i,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function le(){q.invalidateQueries({queryKey:_e(s,e,i)})}function Ne(t,n){navigator.clipboard.writeText(n).then(()=>Q.success(`${t} copied`),()=>Q.error(`Failed to copy ${t.toLowerCase()}`))}function Ze(t){const n=Nn(t);if(!n)return;const o=`${s}/${e}/${i}`;q.setQueryData(Le.decofile(o),l=>{if(!l)return l;const{[n]:f,...M}=l;return M}),q.invalidateQueries({queryKey:Le.liveMeta(s,e,i)})}function et(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>ue(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)Ze(o)}function tt(t){const n=ue(t);return k.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=z.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function Se(t){g(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),N(n=>{const o=new Map;for(const[l,f]of n){const M=t(l);M&&o.set(M,f)}return o}),D(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function nt(t){const n=ue(t);D(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Se(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function rt(t){if(!F)return;const n=me(F.parentDir,t);if(be(n,h,p))throw new Error(`"${t}" already exists`);await J("write",{path:H(n),content:""}),await te(),await le(),X(null),ge(n)}async function ot(t){if(!F)return;const n=me(F.parentDir,t);if(be(n,h,p))throw new Error(`"${t}" already exists`);const o=H(n);await J("mkdir",{path:o}),m(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await te(),await le(),X(null),C(l=>{const f=new Set(l);for(const M of ve(n))f.add(M);return f.add(n),f}),D({name:t,path:n,kind:"directory",children:[]})}async function it(t){if(!F)return;const n=F.node.path,o=we(n),l=me(o,t);if(l===n){X(null);return}if(be(l,h,p))throw new Error(`"${t}" already exists`);await J("rename",{from:H(n),to:H(l)}),Se(f=>f===n?l:f.startsWith(`${n}/`)?me(l,f.slice(n.length+1)):f),await te(),await le(),X(null)}async function at(t){se(!0);try{await J("unlink",{path:H(t.path),recursive:t.kind==="directory"}),et(t),nt(t.path),await te(),await le(),he(null),Q.success(`Deleted "${t.name}"`)}catch(n){Q.error(n instanceof Error?n.message:"Delete failed")}finally{se(!1)}}async function st(t){const n=jn(t);if(n){Q.error(n);return}se(!0);try{F?.mode==="new-file"?(await rt(t),Q.success(`Created "${t}"`)):F?.mode==="new-folder"?(await ot(t),Q.success(`Created folder "${t}"`)):F?.mode==="rename"&&(await it(t),Q.success(`Renamed to "${t}"`))}catch(o){Q.error(o instanceof Error?o.message:"Operation failed")}finally{se(!1)}}const Me=u.useRef(!1);Me.current||(Me.current=!0,I.current=te());const[lt,ct]=u.useState(null);if(a&&a!==lt){ct(a);const t=a;queueMicrotask(()=>{hn(t)&&ge(t).catch(n=>{Q.error(n instanceof Error?n.message:"Failed to open file")})})}async function De(t){const n=await J("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Re(t,n,o){if(o!==$.current)return!1;let l=!1;return m(f=>{const M=n?Sn(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!M.truncated,{files:M.files,directories:M.directories,truncated:l}}),l&&Q.warning("File list truncated — some files may be hidden"),l}async function dt(t){const n=P.current.get(t);if(n)return n;const o=$.current,l=(async()=>{const f=await De({pattern:"**/*",path:H(t),limit:Ge}),M=Re(f,!0,o);return!M&&o===$.current&&_(ne=>{const ce=new Set(ne);return ce.add(t),ce}),M})();P.current.set(t,l);try{return await l}finally{P.current.delete(t)}}async function Pe(t){if(!ye(t,R.current))return!1;G(n=>new Set(n).add(t));try{return await dt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function ut(t){const n=new Set(R.current);for(const o of ve(t)){if(!ye(o,n))continue;if(await Pe(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function te(){const t=++$.current;P.current.clear(),O(!0),_(new Set),C(new Set),G(new Set);try{const n=await De({pattern:"**/*",limit:Ge,maxDepth:gn});Re(n,!1,t),w(!0)}catch{j&&Q.error("Failed to refresh file tree")}finally{O(!1)}}async function Ee(t){if(!z.get(t)?.loaded){N(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await J("read",{path:H(t),full:!0}),l=bn(o.content??"");N(f=>{const M=new Map(f);return M.set(t,{savedContent:l,editorValue:l,loaded:!0}),M})}catch{}}}async function mt(t,n){try{await J("write",{path:H(t),content:n}),de("file saved via sandbox /write",{path:t}),q.invalidateQueries({queryKey:_e(s,e,i)});try{const o=await Yt(s,e,i);de("git status after save",o)}catch(o){de("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}N(o=>{const l=new Map(o),f=l.get(t);return f&&l.set(t,{...f,savedContent:n}),l})}catch(o){de("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function ft(t){x(t),D({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),E(null),k.includes(t)||g(n=>[...n,t]),Ee(t)}function pt(t){g(n=>{const o=n.filter(l=>l!==t);return d===t&&x(o[o.length-1]??null),o}),N(n=>{const o=new Map(n);return o.delete(t),o})}function ke(t){C(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function xt(t){if(ye(t,R.current))try{if(await Pe(t))return}catch(n){Q.error(n instanceof Error?n.message:"Failed to load folder");return}ke(t)}async function ht(t,n){if(n){ke(t);return}await xt(t)}async function ge(t){await I.current,await ut(t);const n=ve(t);C(o=>{const l=new Set(o);for(const f of n)l.add(f);return l}),ft(t)}function gt(){return y?.kind==="directory"?y.path:y?.kind==="file"?we(y.path):d?we(d):"/"}function Te(t){const n=gt();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const vt=vn(h,p),Oe=Cn(vt,v),Ae=b?Oe.filter(t=>t.node.name.toLowerCase().includes(b.toLowerCase())):Oe,Z=d?z.get(d):null,Ct=Z?.loaded&&Z.editorValue!==Z.savedContent,yt=xe?tt(xe.path):[],wt=(t,n)=>{K.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await mt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const f=l.getValueInRange(o);E({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function bt(t){if(!S)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${S.filePath}\``,`**Lines:** ${S.lineStart}–${S.lineEnd}`];if(S.selectedCode){const o=Ce(S.filePath),l=S.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),V("chat"),W({parts:[{type:"text",text:n.join(`
2
- `)}]}),E(null)}return T&&!j?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(oe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(Vt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:b,onChange:t=>U(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(Fe,{children:[r.jsx($e,{asChild:!0,children:r.jsx(pe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Te("new-file"),children:r.jsx(Ut,{size:14})})}),r.jsx(Ie,{side:"bottom",children:"New file"})]}),r.jsxs(Fe,{children:[r.jsx($e,{asChild:!0,children:r.jsx(pe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Te("new-folder"),children:r.jsx(Wt,{size:14})})}),r.jsx(Ie,{side:"bottom",children:"New folder"})]})]}),r.jsx(qt,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[Ae.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",f=v.has(n.path),M=y?.path===n.path,ne=yn(n.path,n.kind),ce=l&&L.has(n.path);return r.jsx(lr,{node:n,depth:o,isExpanded:f,isSelected:M,isLoading:ce,fileVisual:wn(n.name),onSelect:()=>D(n),onOpen:()=>{l?ht(n.path,f):ge(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:ne}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:ne}),onCopyPath:()=>Ne("Path",ue(n.path)),onCopyRelativePath:()=>Ne("Relative path",H(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:ne}),onDelete:()=>he(n)},n.path)}),j&&Ae.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:b?`No files match "${b}"`:"No files found"})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[k.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:k.map(t=>{const n=z.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:ie("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{x(t),Ee(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:M=>{M.stopPropagation(),pt(t)},children:r.jsx(Qt,{size:12})})]},t)})}),S&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&bt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&E(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&Z?.loaded?r.jsx(Kt,{language:Ce(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:Z.editorValue,path:d,onChange:t=>{const n=d;n&&N(o=>{const l=new Map(o),f=l.get(n);return f&&l.set(n,{...f,editorValue:t??""}),l})},onMount:wt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(oe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!Z?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(oe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[Ct?"Modified":"Saved"," ·"," ",Ce(d)]})]})]}),r.jsx(Dn,{open:F!==null,mode:F?.mode??"new-file",initialName:F?.mode==="rename"?F.node.name:"",parentLabel:F&&F.mode!=="rename"?F.parentDir==="/"?"/":H(F.parentDir):void 0,isPending:ae,onSubmit:st,onOpenChange:t=>{!t&&!ae&&X(null)}}),r.jsx(Rn,{deleteTarget:xe,deleteDirtyPaths:yt,fsActionPending:ae,onOpenChange:t=>{!t&&!ae&&he(null)},onConfirm:t=>{at(t)}})]})}export{sa as FileExplorer};
@@ -1 +0,0 @@
1
- import{b as K,C as V,n as M,M as Q,J as Z,d as U,p as F,t as w,K as L,j as n,ah as $,H,I as T,c as D,r as B,B as Y,D as q,s as J}from"./index-DF3zg-P1.js";import{P as k}from"./index-CeqD0RVV.js";import{u as W}from"./use-org-auth-client-jU0nDPT-.js";import{u as X}from"./use-debounced-autosave-BdWGMbok.js";import{A as ee}from"./avatar-UXZ4R5Yb.js";import{I as G}from"./input-BZTiU0ds.js";import{S as P,a as I,b as _,c as te}from"./settings-section-DS6otYn7.js";import{D as ne}from"./domain-settings-GxKzcerZ.js";import{S as ae}from"./switch-C2KH_TaK.js";import{c as se,f as oe}from"./use-organization-settings-BJ1bjHsL.js";import{u as ie}from"./studio-tools-bThaob6p.js";import{c as re,b as le,d as ce,A as de,e as ue,g as me,a as ge,f as fe}from"./alert-dialog-3VMQ65hF.js";import{R as pe}from"./require-capability-CEBGt_Ot.js";import"./sidebar-BFdShy9x.js";import"./LayoutLeft-C0g0LezP.js";import"./use-mobile-nauPjzo2.js";import"./X-Dm6kY_ek.js";import"./tooltip-O3iHy7-o.js";import"./User01-v0Bqr3nA.js";import"./card-dLLzWD0r.js";import"./ArrowUpRight-BKVLcZTe.js";import"./badge-CfAmvo-h.js";import"./select-B6GE4jHJ.js";import"./Check-BF3t7WWi.js";import"./ChevronDown-CQLSXgt3.js";import"./ChevronUp-Y-IpPAUR.js";import"./constants-BHDe7bIw.js";import"./use-capability--WeMT0KP.js";import"./access-gate-CPecvlS5.js";import"./capability-load-error-B9xkkNBq.js";const he=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function xe(e){return typeof e=="string"&&he.has(e.trim().toLowerCase())}const je=H({name:T().min(1,"Name is required").max(255,"Name is too long"),slug:T().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!xe(e),"This organization URL is reserved by Studio"),logo:T().optional()});function be(e){const t=D.c(13),{value:f,onChange:d,name:s,disabled:l}=e,u=B.useRef(null);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>u.current?.click(),t[0]=c):c=t[0];const r=c;let m;t[1]!==d?(m=j=>{const b=j.target.files?.[0];if(!b)return;if(b.size>2097152){w.error("Image must be smaller than 2MB");return}const g=new FileReader;g.onerror=ye,g.onloadend=()=>{g.result&&d(g.result),u.current&&(u.current.value="")},g.readAsDataURL(b)},t[1]=d,t[2]=m):m=t[2];const a=m;let o;t[3]!==l||t[4]!==a?(o=n.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[3]=l,t[4]=a,t[5]=o):o=t[5];const i=f||void 0,x=s??"?";let p;t[6]!==i||t[7]!==x?(p=n.jsx(ee,{url:i,fallback:x,shape:"square",size:"base"}),t[6]=i,t[7]=x,t[8]=p):p=t[8];let h;return t[9]!==l||t[10]!==o||t[11]!==p?(h=n.jsxs("button",{type:"button",onClick:r,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[o,p]}),t[9]=l,t[10]=o,t[11]=p,t[12]=h):h=t[12],h}function ye(){return w.error("Failed to read image")}function ve(){const e=K(),{org:t}=V(),f=W(),d=M(),s=Q({resolver:Z(je),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),l=U({mutationFn:async a=>{const o={name:a.name,slug:a.slug};a.logo&&(o.logo=a.logo);const i=await f.organization.update({data:o});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,o)=>{F("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),d.invalidateQueries({queryKey:L.organizations()}),d.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,o)=>{F("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:u,flush:c}=X({save:async()=>{const a=s.control._formState.dirtyFields;if(Object.keys(a).length===0||!await s.trigger())return;const i=s.getValues(),x=s.control._defaultValues;s.reset(i,{keepValues:!0});try{await l.mutateAsync(i)}catch{s.reset(x,{keepValues:!0})}}}),r=s.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(P,{children:n.jsxs(I,{children:[n.jsx(_,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(be,{value:s.watch("logo"),onChange:a=>{s.setValue("logo",a??"",{shouldDirty:!0}),c()},name:s.watch("name")})}),n.jsx(_,{title:"Name",action:n.jsx($,{control:s.control,name:"name",render:({field:a})=>n.jsx(G,{id:"org-name",...a,onChange:o=>{a.onChange(o),u()},onBlur:()=>{a.onBlur(),c()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(_,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx($,{control:s.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const i=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");s.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),u()},onBlur:()=>{a.onBlur(),c()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Se(){const e=D.c(6),t=se(),{mutate:f,isPending:d}=oe();let s;e[0]!==f?(s=u=>f(u),e[0]=f,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==d||e[4]!==s?(l=n.jsx(P,{title:"Task board",description:"A board for tracking org tasks by status, priority, and assignee.",children:n.jsx(I,{children:n.jsx(_,{title:"Enable task board",description:"Adds a Board entry to the sidebar for this organization.",action:n.jsx(ae,{checked:t,disabled:d,onCheckedChange:s})})})}),e[2]=t,e[3]=d,e[4]=s,e[5]=l):l=e[5],l}function ze(){const e=D.c(42),{org:t}=V(),[f,d]=B.useState(!1),[s,l]=B.useState(""),u=ie();let c;e[0]!==t.id||e[1]!==u?(c=async()=>{await u.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=u,e[2]=c):c=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{F("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let m;e[6]!==c||e[7]!==r?(m={mutationFn:c,onSuccess:r,onError:Ce},e[6]=c,e[7]=r,e[8]=m):m=e[8];const a=U(m);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d(!0),e[9]=o):o=e[9];let i;e[10]!==a.isPending?(i=n.jsx(P,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(I,{className:"border-destructive/40",children:n.jsx(_,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Y,{variant:"destructive",size:"sm",onClick:o,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=N=>{d(N),N||l("")},e[12]=x):x=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(re,{children:"Delete Organization?"}),e[13]=p):p=e[13];let h;e[14]!==t.name?(h=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=h):h=e[15];let j;e[16]!==t.name?(j=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=j):j=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=N=>l(N.target.value),e[18]=b):b=e[18];let g;e[19]!==s||e[20]!==t.name?(g=n.jsx(G,{value:s,onChange:b,placeholder:t.name,autoFocus:!0}),e[19]=s,e[20]=t.name,e[21]=g):g=e[21];let y;e[22]!==g||e[23]!==h||e[24]!==j?(y=n.jsxs(le,{children:[p,n.jsx(ce,{asChild:!0,children:n.jsxs("div",{children:[h,j,g]})})]}),e[22]=g,e[23]=h,e[24]=j,e[25]=y):y=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(de,{children:"Cancel"}),e[26]=O):O=e[26];let v;e[27]!==a?(v=()=>a.mutate(),e[27]=a,e[28]=v):v=e[28];const E=s!==t.name||a.isPending,R=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==v||e[30]!==E||e[31]!==R?(S=n.jsxs(ue,{children:[O,n.jsx(me,{onClick:v,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[29]=v,e[30]=E,e[31]=R,e[32]=S):S=e[32];let z;e[33]!==y||e[34]!==S?(z=n.jsxs(ge,{children:[y,S]}),e[33]=y,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==f||e[37]!==z?(C=n.jsx(fe,{open:f,onOpenChange:x,children:z}),e[36]=f,e[37]=z,e[38]=C):C=e[38];let A;return e[39]!==C||e[40]!==i?(A=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=A):A=e[41],A}function Ce(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function we(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(k,{children:n.jsx(k.Content,{children:n.jsx(k.Body,{children:n.jsxs(te,{children:[n.jsx(k.Title,{children:"Organization"}),n.jsx(ve,{}),n.jsx(ne,{}),n.jsx(Se,{}),n.jsx(ze,{})]})})})}),e[0]=t):t=e[0],t}function nt(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(pe,{capability:"org:manage",area:"general settings",children:n.jsx(we,{})}),e[0]=t):t=e[0],t}export{nt as default};
@@ -1,4 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DonY639O.js","assets/index-DF3zg-P1.js","assets/index-DpLPq5a_.css","assets/ArrowUp-YK2fJPgi.js","assets/chat-context-CyCuyn4t.js","assets/autosend-D_-616qs.js","assets/hooks-QHrmNjJQ.js","assets/use-mcp-client-DrROXOcH.js","assets/constants-BHDe7bIw.js","assets/auth-dSVlMQ86.js","assets/decopilot-sse-pool-DHojW3EC.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-bThaob6p.js","assets/use-virtual-mcp-C964oRwj.js","assets/use-collections-K1HyCAfG.js","assets/use-ai-providers-B4nhSJlr.js","assets/location-BpLtHjTZ.js","assets/tab-id-BijBBRwE.js","assets/use-decopilot-events-BEOY-_n2.js","assets/use-organization-settings-BJ1bjHsL.js","assets/automation-runs-yMzfgCqo.js","assets/select-B6GE4jHJ.js","assets/tooltip-O3iHy7-o.js","assets/Check-BF3t7WWi.js","assets/ChevronDown-CQLSXgt3.js","assets/ChevronUp-Y-IpPAUR.js","assets/useInfiniteQuery-DKhJHTs2.js","assets/use-infinite-scroll-Dt7gLdpr.js","assets/use-connection-twfWXxwG.js","assets/card-dLLzWD0r.js","assets/sidebar-BFdShy9x.js","assets/LayoutLeft-C0g0LezP.js","assets/use-mobile-nauPjzo2.js","assets/X-Dm6kY_ek.js","assets/table-XKbQ5Wjx.js","assets/empty-state-CdKwtMyP.js","assets/use-members-mvfsRjey.js","assets/use-org-auth-client-jU0nDPT-.js","assets/use-clock-tick-DboEo7Cc.js","assets/AlertCircle-B6AELEdc.js","assets/CheckCircle-BfxYbuVE.js","assets/Circle-0HId1SV6.js","assets/agent-icon-DmIJ53uv.js","assets/UserPlus01-D2pAl0t2.js","assets/Tool01-4pit7qOS.js","assets/Settings02-CM0Uzs0U.js","assets/Tool02-tJKj7JcW.js","assets/XCircle-cwYbcP7y.js","assets/ArrowUpRight-BKVLcZTe.js","assets/TrendUp01-7N_6K3-X.js","assets/ZapSquare-Dj8pa8Fg.js","assets/ZoomOut-_psBJlXD.js","assets/Users03-WVYBBENu.js","assets/ChevronRight-Fgy0rUS_.js","assets/Stars02-DBH33Ez2.js","assets/Copy01-B0CQRE_5.js","assets/DotsVertical-CYU3Mae1.js","assets/Globe01-B52VKYy7.js","assets/Eye-CLtdCpUf.js","assets/FilterLines-DeiGsRZY.js","assets/Flag01-B_AKNFoc.js","assets/Star01-B-8espqJ.js","assets/Globe04-B0las6Jv.js","assets/SwitchHorizontal01-DUrn8gXV.js","assets/HardDrive-CU-vvmKE.js","assets/Image01-B-FQwXx8.js","assets/Key01-myvTSA8u.js","assets/LinkExternal01-d9EixhiS.js","assets/List-DZAsltZv.js","assets/Monitor01-BkDBzdlH.js","assets/Sun-MvOAGgKN.js","assets/Package-eNacrLmv.js","assets/Palette-BiKqXWvc.js","assets/Play-CdkPhmTs.js","assets/Plus-DWjKZ2wj.js","assets/SearchLg-DBOWvxyl.js","assets/SearchMd-CKteZWzZ.js","assets/Shield01-aDvWVv5Z.js","assets/Stars01-DsfblQf3.js","assets/Trash01-DEWgFvvg.js","assets/Upload01-C8RP0Fvq.js","assets/User01-v0Bqr3nA.js","assets/Users01-CPNZ7uMu.js","assets/XClose-DnNyN9T-.js","assets/Zap-CNRURtEh.js","assets/use-automations-C01orYPa.js","assets/useSuspenseInfiniteQuery-DAAXTkZt.js","assets/avatar-UXZ4R5Yb.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-DQ4y4418.js","assets/file-type-icon-DjNFZnTs.js","assets/dialog-CmXDzme5.js","assets/monaco-editor-BzdwB2U8.js","assets/index-cG8paP3z.js","assets/index-BjO8A-VO.js","assets/shell-layout-Bo6QxW8m.js","assets/required-auth-layout-vPZ2d-Yx.js","assets/use-org-sso-j8hZyqdO.js","assets/integration-icon-BfKWLZT4.js","assets/use-navigate-to-agent-BJC_x779.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-fCNs67j_.js","assets/form-x0k-kdB2.js","assets/label-B1OfKy2N.js","assets/input-BZTiU0ds.js","assets/drawer-Ds-r7525.js","assets/collection-search-C4jDpdZf.js","assets/tabs-D-6eQ0wE.js","assets/toggle-group-BcxqPGrf.js","assets/use-deco-credits-Bm-VH5Hm.js","assets/extract-connection-data-CK9iLAoG.js","assets/connection-card-CtY9PRIw.js","assets/use-registry-connections-D94L7VqK.js","assets/retry-CErkP7V6.js","assets/connection-slug-eyAPH6o3.js","assets/textarea-PYu4eHQV.js","assets/connection-form-helpers-TGmycj7X.js","assets/authenticate-and-persist-oauth-BHT9Kp62.js","assets/mcp-oauth-CoKzxQiz.js","assets/collection-tabs-DvvibY6H.js","assets/badge-CfAmvo-h.js","assets/connect-desktop-dialog-CPSwwSyz.js","assets/select-model-CebmAt-C.js","assets/checkbox-CxV2vfbv.js","assets/skeleton-BGZh750P.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-DS6otYn7.js","assets/command-EQNrbniG.js","assets/index-CUVgjm02.js","assets/popover-BzHpXFL_.js","assets/dropdown-menu-BgNr7tM1.js","assets/index-BCiDnhhX.js","assets/alert-dialog-3VMQ65hF.js","assets/toolbar-D90MFc80.js","assets/use-debounced-value-xN0eyoO9.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-B1YKt2sD.js","assets/use-mcp-tools-D28ox9dJ.js","assets/use-capability--WeMT0KP.js","assets/toolbar-icon-button-D3m9VnTI.js","assets/use-debounced-autosave-BdWGMbok.js","assets/index-CeqD0RVV.js","assets/search-input-ByuB0YyC.js","assets/use-mcp-auth-status-C7G9bAkb.js","assets/switch-C2KH_TaK.js","assets/use-registry-app-CeyrXTI4.js","assets/github-repo-picker-C-tZ-Bba.js","assets/provision-repo-scoped-github-connection-2iDn-wQ1.js","assets/github-repo-scope-DjMZbiKa.js","assets/use-secrets-C1Fme0Ya.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/companions-core-fc2Z_sCB.js","assets/calendar-BdMqQsTv.js","assets/use-file-configs-Bs9N4w-Z.js","assets/automation-list-row-PkSpkeID.js","assets/index-DDGTF8rc.css"])))=>i.map(i=>d[i]);
2
- import{C as bt,a as Fs,n as Wt,r as z,t as pt,ac as Bs,c as O,l as E,j as s,m as us,d as kt,K as Xt,B as ye,b as Rs,u as Ps,aX as Ms,i as ms}from"./index-DF3zg-P1.js";import{g as Ne}from"./get-initials-D-f_fDFw.js";import{A as ve}from"./avatar-UXZ4R5Yb.js";import{f as Jt,b as Ls,t as Us,d as fs,g as Gs,h as qs,j as It,c as ht,s as Ks,i as Hs,e as Qs,a as Ys}from"./UserPlus01-D2pAl0t2.js";import{i as Vs}from"./List-DZAsltZv.js";import{s as Zt}from"./Plus-DWjKZ2wj.js";import{S as Ws,e as Xs,a as Js}from"./constants-BHDe7bIw.js";import{u as Zs,G as el}from"./use-registry-app-CeyrXTI4.js";import{d as xs,e as ps,a as gs,D as tl,h as sl,c as ll}from"./dialog-CmXDzme5.js";import{b as nl,u as al}from"./use-connection-twfWXxwG.js";import{g as rl}from"./github-repo-scope-DjMZbiKa.js";import{u as il}from"./use-mcp-client-DrROXOcH.js";import{a as ol}from"./authenticate-and-persist-oauth-BHT9Kp62.js";import{e as cl}from"./extract-connection-data-CK9iLAoG.js";import{u as hs}from"./use-members-mvfsRjey.js";import{u as es}from"./studio-tools-bThaob6p.js";import{t as dl,T as ul,S as $e}from"./decopilot-sse-pool-DHojW3EC.js";import{u as ml}from"./use-decopilot-events-BEOY-_n2.js";import{a as fl}from"./format-time-BnbuEtat.js";import{i as bs}from"./AlertCircle-B6AELEdc.js";import{i as js}from"./CheckCircle-BfxYbuVE.js";import{i as xl}from"./Circle-0HId1SV6.js";import{s as pl}from"./Eye-CLtdCpUf.js";import{a as Tt,c as At,d as mt,D as zt}from"./dropdown-menu-BgNr7tM1.js";import{P as qt,b as Kt,a as Ht}from"./popover-BzHpXFL_.js";import{b as ys,C as Ns,a as ze,e as $t,d as vs,c as Ss}from"./command-EQNrbniG.js";import{C as gl}from"./calendar-BdMqQsTv.js";import{u as hl}from"./use-copy-DQ4y4418.js";import{i as bl}from"./Check-BF3t7WWi.js";import{i as jl}from"./ChevronRight-Fgy0rUS_.js";import{a as yl}from"./Copy01-B0CQRE_5.js";import{n as Nl}from"./LinkExternal01-d9EixhiS.js";import{s as Qt}from"./User01-v0Bqr3nA.js";import{i as ns}from"./X-Dm6kY_ek.js";import{g as vl,b as Sl,e as Cl,f as wl,a as _l,D as Dl}from"./drawer-Ds-r7525.js";import{t as ts}from"./ChevronDown-CQLSXgt3.js";import{i as Cs}from"./FilterLines-DeiGsRZY.js";import{s as kl}from"./Flag01-B_AKNFoc.js";import{u as Il}from"./shell-layout-Bo6QxW8m.js";import{u as Tl}from"./hooks-QHrmNjJQ.js";import{w as Al}from"./autosend-D_-616qs.js";import{u as zl}from"./use-organization-settings-BJ1bjHsL.js";function $l(t){const{org:e}=bt(),{data:l}=Fs.useSession(),a=nl(),n=Wt(),r=il({connectionId:Ws,orgId:e.id,orgSlug:e.slug}),[o,i]=z.useState(!1),d=Zs(t,{enabled:!1});return{connect:async()=>{if(!(o||!l?.user?.id||!e)){i(!0);try{const f=d.data??(await d.refetch()).data;if(!f){pt.error("Could not find this integration in the registry");return}const p=cl(f,e.id,l.user.id,{remoteIndex:0});if(!p.connection_url){pt.error("This integration has no connection method available");return}const c=p.app_name?await El(r,p.app_name):null,m=!c,b=c?.id??(await a.create.mutateAsync(p)).id,x=await ol({connectionId:b,orgId:e.id,orgSlug:e.slug,persistFallback:j=>a.update.mutateAsync({id:b,data:{connection_token:j}}).then(()=>{})});if(x.ran&&!x.ok){if(m)try{await a.delete.mutateAsync(b)}catch{}pt.error(`Authentication failed: ${x.error??"no token"}`);return}Bs(n,e.id),pt.success(m?"Connected successfully":"Already connected")}catch(f){pt.error(`Failed to connect: ${f instanceof Error?f.message:String(f)}`)}finally{i(!1)}}},isConnecting:o}}async function El(t,e){return(await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_name"],operator:"eq",value:e},limit:1}})).structuredContent?.items?.[0]??null}function Ie(t){const e=O.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let r;e[0]!==n?(r={width:n,height:n},e[0]=n,e[1]=r):r=e[1];let o;e[2]!==a?(o=E("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=o):o=e[3];let i;return e[4]!==n||e[5]!==r||e[6]!==o?(i=s.jsx("img",{src:Xs,alt:"Super Agent",width:n,height:n,style:r,className:o}),e[4]=n,e[5]=r,e[6]=o,e[7]=i):i=e[7],i}const as=()=>0;function Ol(t){const{orgSlug:e,enabled:l=!0,onUpdate:a,onDelete:n}=t,r=z.useRef(a);r.current=a;const o=z.useRef(n);o.current=n;const i=z.useRef(null),d=z.useRef(l),u=z.useRef(e);(!i.current||d.current!==l||u.current!==e)&&(d.current=l,u.current=e,i.current=p=>{if(!l||!e)return()=>{};const c=m=>{let b;try{b=JSON.parse(m.data)}catch{return}b.data&&(m.type===ul?o.current?.(b.data.id):r.current(b.data)),p()};return dl.subscribe(e,c)}),z.useSyncExternalStore(i.current,as,as)}function Fl(){const t=O.c(27),{org:e,locator:l}=bt(),a=es(),n=Wt();let r;t[0]!==l?(r=Xt.taskBoardItems(l),t[0]=l,t[1]=r):r=t[1];const o=r;let i;t[2]!==a?(i=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=i):i=t[3];let d;t[4]!==o||t[5]!==i?(d={queryKey:o,queryFn:i},t[4]=o,t[5]=i,t[6]=d):d=t[6];const u=us(d);let f,p;t[7]!==n||t[8]!==o?(f=h=>{n.setQueryData(o,y=>{const g=y??[],N=h;return g.some(v=>v.id===N.id)?g.map(v=>v.id===N.id?N:v):[N,...g]})},p=h=>{n.setQueryData(o,y=>y?.filter(g=>g.id!==h))},t[7]=n,t[8]=o,t[9]=f,t[10]=p):(f=t[9],p=t[10]);let c;t[11]!==e.slug||t[12]!==f||t[13]!==p?(c={orgSlug:e.slug,onUpdate:f,onDelete:p},t[11]=e.slug,t[12]=f,t[13]=p,t[14]=c):c=t[14],Ol(c);let m;t[15]!==n||t[16]!==o?(m=h=>{const y=h.subject,g=h.data.status;n.setQueryData(o,N=>N?.map(v=>v.threads.some(w=>w.threadId===y)?{...v,threads:v.threads.map(w=>w.threadId===y?{...w,status:g}:w)}:v))},t[15]=n,t[16]=o,t[17]=m):m=t[17];let b;t[18]!==e.slug||t[19]!==m?(b={orgSlug:e.slug,onTaskStatus:m},t[18]=e.slug,t[19]=m,t[20]=b):b=t[20],ml(b);let x;t[21]!==u.data?(x=u.data??[],t[21]=u.data,t[22]=x):x=t[22];let j;return t[23]!==u.error||t[24]!==u.isLoading||t[25]!==x?(j={items:x,isLoading:u.isLoading,error:u.error},t[23]=u.error,t[24]=u.isLoading,t[25]=x,t[26]=j):j=t[26],j}function Bl(){const t=O.c(36),{locator:e}=bt(),l=es(),a=Wt();let n;t[0]!==e?(n=Xt.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const r=n;let o;t[2]!==a||t[3]!==r?(o=()=>a.invalidateQueries({queryKey:r}),t[2]=a,t[3]=r,t[4]=o):o=t[4];const i=o;let d;t[5]!==l?(d=C=>l.call("TASK_BOARD_ITEM_CREATE",C),t[5]=l,t[6]=d):d=t[6];let u;t[7]!==i||t[8]!==d?(u={mutationFn:d,onSuccess:i},t[7]=i,t[8]=d,t[9]=u):u=t[9];const f=kt(u);let p;t[10]!==l?(p=C=>l.call("TASK_BOARD_ITEM_UPDATE",C),t[10]=l,t[11]=p):p=t[11];let c,m;t[12]!==a||t[13]!==r?(c=async C=>{await a.cancelQueries({queryKey:r});const _=a.getQueryData(r);return a.setQueryData(r,R=>R?.map(G=>G.id===C.id?{...G,...C}:G)),{previous:_}},m=(C,_,R)=>{R?.previous&&a.setQueryData(r,R.previous)},t[12]=a,t[13]=r,t[14]=c,t[15]=m):(c=t[14],m=t[15]);let b;t[16]!==i||t[17]!==p||t[18]!==c||t[19]!==m?(b={mutationFn:p,onMutate:c,onError:m,onSettled:i},t[16]=i,t[17]=p,t[18]=c,t[19]=m,t[20]=b):b=t[20];const x=kt(b);let j;t[21]!==l?(j=C=>l.call("TASK_BOARD_ITEM_DELETE",{id:C}),t[21]=l,t[22]=j):j=t[22];let h;t[23]!==i||t[24]!==j?(h={mutationFn:j,onSuccess:i},t[23]=i,t[24]=j,t[25]=h):h=t[25];const y=kt(h);let g;t[26]!==l?(g=C=>l.call("TASK_BOARD_ITEM_UPDATE",C),t[26]=l,t[27]=g):g=t[27];let N;t[28]!==i||t[29]!==g?(N={mutationFn:g,onSuccess:i},t[28]=i,t[29]=g,t[30]=N):N=t[30];const v=kt(N);let w;return t[31]!==f||t[32]!==v||t[33]!==y||t[34]!==x?(w={create:f,update:x,remove:y,link:v},t[31]=f,t[32]=v,t[33]=y,t[34]=x,t[35]=w):w=t[35],w}function Yt(t){return t.threads.some(e=>e.status==="requires_action")}function Rl(t){return t.threads[0]}const ws=["triage","todo","in_progress","in_review","done"],je={triage:{label:"Backlog",icon:bs,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:xl,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Jt,iconClassName:"text-primary"},in_review:{label:"In Review",icon:pl,iconClassName:"text-warning"},done:{label:"Done",icon:js,iconClassName:"text-success"}},_s=["none","low","medium","high","urgent"],Se={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{label:"Urgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function Pl(t){const e=O.c(10),{locator:l}=bt(),a=es();let n;e[0]!==t||e[1]!==l?(n=Xt.taskBoardItemPrs(l,t??""),e[0]=t,e[1]=l,e[2]=n):n=e[2];const r=!!t;let o;e[3]!==t||e[4]!==a?(o=async()=>(await a.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==r||e[8]!==o?(i={queryKey:n,enabled:r,queryFn:o},e[6]=n,e[7]=r,e[8]=o,e[9]=i):i=e[9],us(i)}function Ml(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function rs(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ll=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),gt="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Ul={failed:{label:"Error",className:"text-destructive",icon:Gs},requires_action:{label:"Needs input",className:"text-warning",icon:fs},in_progress:{label:"Running",className:"text-primary",icon:Jt,spin:!0},completed:{label:"Completed",className:"text-success",icon:js},expired:{label:"Expired",className:"text-muted-foreground",icon:bs}};function Gl(t){const e=O.c(188),{open:l,onClose:a,item:n,defaultStatus:r,onSubmit:o,onDelete:i,onOpenThread:d,onNewChat:u,isSaving:f}=t,{data:p}=hs(),c=p?.data?.members??[],{handleCopy:m,copied:b}=hl(),[x,j]=z.useState(n?.title??""),[h,y]=z.useState(n?.description??""),[g,N]=z.useState(n?.status??r??"triage"),[v,w]=z.useState(n?.priority??"medium"),[C,_]=z.useState(n?.assigneeId??null),R=n?.dueDate;let G;e[0]!==R?(G=rs(R),e[0]=R,e[1]=G):G=e[1];const[A,P]=z.useState(G),[se,L]=z.useState(!1),[U,$]=z.useState(!1);let H;e[2]!==r||e[3]!==n?.assigneeId||e[4]!==n?.description||e[5]!==n?.dueDate||e[6]!==n?.priority||e[7]!==n?.status||e[8]!==n?.title||e[9]!==_||e[10]!==P?(H=()=>{j(n?.title??""),y(n?.description??""),N(n?.status??r??"triage"),w(n?.priority??"medium"),_(n?.assigneeId??null),P(rs(n?.dueDate))},e[2]=r,e[3]=n?.assigneeId,e[4]=n?.description,e[5]=n?.dueDate,e[6]=n?.priority,e[7]=n?.status,e[8]=n?.title,e[9]=_,e[10]=P,e[11]=H):H=e[11];const Q=H;let Y;e[12]!==a||e[13]!==Q?(Y=()=>{a(),Q()},e[12]=a,e[13]=Q,e[14]=Y):Y=e[14];const D=Y;let F;e[15]!==C||e[16]!==h||e[17]!==A||e[18]!==o||e[19]!==v||e[20]!==g||e[21]!==x?(F=()=>{const S=x.trim();S&&o({title:S,description:h.trim()||null,status:g,priority:v,assigneeId:C,dueDate:A?Ml(A):null})},e[15]=C,e[16]=h,e[17]=A,e[18]=o,e[19]=v,e[20]=g,e[21]=x,e[22]=F):F=e[22];const I=F,T=C===$e;let q;e[23]!==C?(q=S=>S.userId===C,e[23]=C,e[24]=q):q=e[24];const K=c.find(q),M=n?.assignedBy?c.find(S=>S.userId===n.assignedBy):void 0,me=je[g].icon,le=ps;let fe;e[25]!==D?(fe=S=>!S&&D(),e[25]=D,e[26]=fe):fe=e[26];const Te=xs,ft="flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",xt="hidden",xe=n?"Edit task":"New task";let X;e[27]!==xe?(X=s.jsx(gs,{className:"sr-only",children:xe}),e[27]=xe,e[28]=X):X=e[28];let ne;e[29]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(ns,{size:16}),e[29]=ne):ne=e[29];let J;e[30]!==D?(J=s.jsx("button",{type:"button","aria-label":"Close",onClick:D,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ne}),e[30]=D,e[31]=J):J=e[31];const Ce="flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden";let ae;e[32]===Symbol.for("react.memo_cache_sentinel")?(ae=S=>{j(S.target.value),S.target.style.height="auto",S.target.style.height=`${S.target.scrollHeight}px`},e[32]=ae):ae=e[32];let re;e[33]!==x?(re=s.jsx("textarea",{ref:Kl,value:x,onChange:ae,onKeyDown:ql,placeholder:"Task title...",autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[33]=x,e[34]=re):re=e[34];let B;e[35]===Symbol.for("react.memo_cache_sentinel")?(B=S=>y(S.target.value),e[35]=B):B=e[35];let V;e[36]!==h?(V=s.jsx("textarea",{value:h,onChange:B,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[36]=h,e[37]=V):V=e[37];let W;e[38]!==b||e[39]!==h||e[40]!==m?(W=h&&s.jsx(ye,{type:"button",variant:"ghost",size:"icon","aria-label":"Copy description",className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>m(h),children:b?s.jsx(bl,{size:14}):s.jsx(yl,{size:14})}),e[38]=b,e[39]=h,e[40]=m,e[41]=W):W=e[41];let pe;e[42]!==V||e[43]!==W?(pe=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[V,W]}),e[42]=V,e[43]=W,e[44]=pe):pe=e[44];const we=n&&n.threads.length>0&&s.jsx("div",{className:"flex flex-col gap-2",children:n.threads.map(S=>s.jsx(Hl,{thread:S,startedBy:M??K,onOpen:d},S.threadId))});let _e;e[45]!==n?(_e=n?.id&&s.jsx(Vl,{itemId:n.id}),e[45]=n,e[46]=_e):_e=e[46];let ie;e[47]!==re||e[48]!==pe||e[49]!==we||e[50]!==_e?(ie=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[re,pe,we,_e]}),e[47]=re,e[48]=pe,e[49]=we,e[50]=_e,e[51]=ie):ie=e[51];const ls="flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10";let be;e[52]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[52]=be):be=e[52];const Ee="flex flex-wrap gap-2 sm:flex-col",De=je[g];let Z;e[53]!==me||e[54]!==De.iconClassName?(Z=s.jsx(me,{size:16,className:De.iconClassName}),e[53]=me,e[54]=De.iconClassName,e[55]=Z):Z=e[55];const Ae=je[g];let oe;e[56]!==Z||e[57]!==Ae.label?(oe=s.jsx(Tt,{asChild:!0,children:s.jsxs("button",{type:"button",className:gt,children:[Z,Ae.label]})}),e[56]=Z,e[57]=Ae.label,e[58]=oe):oe=e[58];let ce;e[59]===Symbol.for("react.memo_cache_sentinel")?(ce=s.jsx(At,{align:"start",className:"w-44",children:ws.map(S=>{const he=je[S].icon;return s.jsxs(mt,{onSelect:()=>N(S),className:"gap-2",children:[s.jsx(he,{size:16,className:je[S].iconClassName}),je[S].label]},S)})}),e[59]=ce):ce=e[59];let ge;e[60]!==oe?(ge=s.jsxs(zt,{children:[oe,ce]}),e[60]=oe,e[61]=ge):ge=e[61];const ke=v==="none"&&"text-muted-foreground";let ee;e[62]!==ke?(ee=E(gt,ke),e[62]=ke,e[63]=ee):ee=e[63];let te;e[64]!==v?(te=v==="none"?s.jsxs(s.Fragment,{children:[s.jsx(Ls,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:E("size-2 rounded-full",Se[v].dotClassName)}),Se[v].label]}),e[64]=v,e[65]=te):te=e[65];let de;e[66]!==ee||e[67]!==te?(de=s.jsx(Tt,{asChild:!0,children:s.jsx("button",{type:"button",className:ee,children:te})}),e[66]=ee,e[67]=te,e[68]=de):de=e[68];let ue;e[69]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx(At,{align:"start",className:"w-40",children:_s.map(S=>s.jsxs(mt,{onSelect:()=>w(S),children:[s.jsx("span",{className:E("size-2 rounded-full",Se[S].dotClassName)}),Se[S].label]},S))}),e[69]=ue):ue=e[69];let k;e[70]!==de?(k=s.jsxs(zt,{children:[de,ue]}),e[70]=de,e[71]=k):k=e[71];const Ft="flex flex-col",Bt=Kt,$s=!0,Rt=qt,Es=!0,Os="button",Pt=!C&&"text-muted-foreground";let Oe;e[72]!==Pt?(Oe=E(gt,Pt),e[72]=Pt,e[73]=Oe):Oe=e[73];const Mt=T&&M?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(ve,{url:M.user?.image??void 0,fallback:Ne(M.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:M.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(ve,{url:M.user?.image??void 0,fallback:Ne(M.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(Ie,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):T?s.jsxs(s.Fragment,{children:[s.jsx(Ie,{size:16}),"Super Agent"]}):K?s.jsxs(s.Fragment,{children:[s.jsx(ve,{url:K.user?.image??void 0,fallback:Ne(K.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:K.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Us,{size:16,className:"text-muted-foreground"}),"Assign"]});let Fe;e[74]!==Oe||e[75]!==Mt?(Fe=s.jsx("button",{type:Os,className:Oe,children:Mt}),e[74]=Oe,e[75]=Mt,e[76]=Fe):Fe=e[76];let Be;e[77]!==Rt||e[78]!==Fe?(Be=s.jsx(Rt,{asChild:Es,children:Fe}),e[77]=Rt,e[78]=Fe,e[79]=Be):Be=e[79];let jt;e[80]===Symbol.for("react.memo_cache_sentinel")?(jt=s.jsx(ys,{placeholder:"Assign to…",className:"h-9"}),e[80]=jt):jt=e[80];let yt;e[81]===Symbol.for("react.memo_cache_sentinel")?(yt=s.jsx(Ns,{children:"No members found."}),e[81]=yt):yt=e[81];let Re;e[82]!==_||e[83]!==$?(Re=()=>{_($e),$(!1)},e[82]=_,e[83]=$,e[84]=Re):Re=e[84];let Nt,vt;e[85]===Symbol.for("react.memo_cache_sentinel")?(Nt=s.jsx(Ie,{size:16}),vt=s.jsx("span",{className:"truncate",children:"Super Agent"}),e[85]=Nt,e[86]=vt):(Nt=e[85],vt=e[86]);let Pe;e[87]!==Re?(Pe=s.jsxs(ze,{value:"Super Agent",onSelect:Re,className:"gap-2",children:[Nt,vt]}),e[87]=Re,e[88]=Pe):Pe=e[88];let Me;e[89]!==_||e[90]!==$?(Me=()=>{_(null),$(!1)},e[89]=_,e[90]=$,e[91]=Me):Me=e[91];let St,Ct;e[92]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(Qt,{size:16,className:"text-muted-foreground"}),Ct=s.jsx("span",{className:"truncate",children:"Unassigned"}),e[92]=St,e[93]=Ct):(St=e[92],Ct=e[93]);let Le;e[94]!==Me?(Le=s.jsxs(ze,{value:"Unassigned",onSelect:Me,className:"gap-2",children:[St,Ct]}),e[94]=Me,e[95]=Le):Le=e[95];let Ue;e[96]!==Pe||e[97]!==Le?(Ue=s.jsxs($t,{children:[Pe,Le]}),e[96]=Pe,e[97]=Le,e[98]=Ue):Ue=e[98];let Ge;if(e[99]!==c||e[100]!==_||e[101]!==$){let S;e[103]!==_||e[104]!==$?(S=he=>s.jsxs(ze,{value:he.user?.name??he.userId,onSelect:()=>{_(he.userId),$(!1)},className:"gap-2",children:[s.jsx(ve,{url:he.user?.image??void 0,fallback:Ne(he.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:he.user?.name??he.userId})]},he.userId),e[103]=_,e[104]=$,e[105]=S):S=e[105],Ge=c.map(S),e[99]=c,e[100]=_,e[101]=$,e[102]=Ge}else Ge=e[102];let qe;e[106]!==Ge?(qe=s.jsx($t,{heading:"Members",children:Ge}),e[106]=Ge,e[107]=qe):qe=e[107];let Ke;e[108]!==Ue||e[109]!==qe?(Ke=s.jsx(Ht,{align:"start",className:"w-56 p-0",children:s.jsxs(vs,{children:[jt,s.jsxs(Ss,{children:[yt,Ue,qe]})]})}),e[108]=Ue,e[109]=qe,e[110]=Ke):Ke=e[110];let He;e[111]!==Bt||e[112]!==U||e[113]!==$||e[114]!==Be||e[115]!==Ke?(He=s.jsxs(Bt,{open:U,onOpenChange:$,modal:$s,children:[Be,Ke]}),e[111]=Bt,e[112]=U,e[113]=$,e[114]=Be,e[115]=Ke,e[116]=He):He=e[116];let Qe;e[117]!==M||e[118]!==T?(Qe=T&&M&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:E(gt,"pointer-events-none"),children:[s.jsx(Ie,{size:16}),"Super Agent"]})]}),e[117]=M,e[118]=T,e[119]=Qe):Qe=e[119];let Ye;e[120]!==He||e[121]!==Qe?(Ye=s.jsxs("div",{className:Ft,children:[He,Qe]}),e[120]=He,e[121]=Qe,e[122]=Ye):Ye=e[122];const Lt=!A&&"text-muted-foreground";let Ve;e[123]!==Lt?(Ve=E(gt,Lt),e[123]=Lt,e[124]=Ve):Ve=e[124];let wt;e[125]===Symbol.for("react.memo_cache_sentinel")?(wt=s.jsx(ht,{size:16,className:"text-muted-foreground"}),e[125]=wt):wt=e[125];let We;e[126]!==A?(We=A?Ll.format(A):"Due date",e[126]=A,e[127]=We):We=e[127];let Xe;e[128]!==A||e[129]!==P?(Xe=A&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:S=>{S.stopPropagation(),P(null)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),S.stopPropagation(),P(null))},children:s.jsx(ns,{size:12})}),e[128]=A,e[129]=P,e[130]=Xe):Xe=e[130];let Je;e[131]!==Ve||e[132]!==We||e[133]!==Xe?(Je=s.jsx(qt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Ve,children:[wt,We,Xe]})}),e[131]=Ve,e[132]=We,e[133]=Xe,e[134]=Je):Je=e[134];const Ut=A??void 0;let Ze;e[135]!==P||e[136]!==L?(Ze=S=>{P(S??null),S&&L(!1)},e[135]=P,e[136]=L,e[137]=Ze):Ze=e[137];let et;e[138]!==Ut||e[139]!==Ze?(et=s.jsx(Ht,{className:"w-auto p-0",align:"start",children:s.jsx(gl,{mode:"single",selected:Ut,onSelect:Ze,initialFocus:!0})}),e[138]=Ut,e[139]=Ze,e[140]=et):et=e[140];let tt;e[141]!==se||e[142]!==L||e[143]!==Je||e[144]!==et?(tt=s.jsxs(Kt,{open:se,onOpenChange:L,children:[Je,et]}),e[141]=se,e[142]=L,e[143]=Je,e[144]=et,e[145]=tt):tt=e[145];let st;e[146]!==ge||e[147]!==k||e[148]!==Ye||e[149]!==tt?(st=s.jsxs("div",{className:Ee,children:[ge,k,Ye,tt]}),e[146]=ge,e[147]=k,e[148]=Ye,e[149]=tt,e[150]=st):st=e[150];let lt;e[151]!==be||e[152]!==st?(lt=s.jsxs("div",{className:ls,children:[be,st]}),e[151]=be,e[152]=st,e[153]=lt):lt=e[153];let nt;e[154]!==ie||e[155]!==lt?(nt=s.jsxs("div",{className:Ce,children:[ie,lt]}),e[154]=ie,e[155]=lt,e[156]=nt):nt=e[156];let at;e[157]!==n||e[158]!==i?(at=n&&i?s.jsx(ye,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:i,children:s.jsx(Ks,{size:16})}):s.jsx("span",{}),e[157]=n,e[158]=i,e[159]=at):at=e[159];let rt;e[160]!==n||e[161]!==u?(rt=n&&u&&s.jsxs(ye,{variant:"outline",size:"sm",onClick:u,children:[s.jsx(Hs,{size:16}),"New chat"]}),e[160]=n,e[161]=u,e[162]=rt):rt=e[162];let it;e[163]!==f||e[164]!==x?(it=!x.trim()||f,e[163]=f,e[164]=x,e[165]=it):it=e[165];let _t;e[166]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(Zt,{size:16}),e[166]=_t):_t=e[166];const Gt=n?"Save":"Create task";let ot;e[167]!==I||e[168]!==it||e[169]!==Gt?(ot=s.jsxs(ye,{size:"sm",disabled:it,onClick:I,children:[_t,Gt]}),e[167]=I,e[168]=it,e[169]=Gt,e[170]=ot):ot=e[170];let ct;e[171]!==rt||e[172]!==ot?(ct=s.jsxs("div",{className:"flex items-center gap-2",children:[rt,ot]}),e[171]=rt,e[172]=ot,e[173]=ct):ct=e[173];let dt;e[174]!==at||e[175]!==ct?(dt=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[at,ct]}),e[174]=at,e[175]=ct,e[176]=dt):dt=e[176];let ut;e[177]!==Te||e[178]!==X||e[179]!==J||e[180]!==nt||e[181]!==dt?(ut=s.jsxs(Te,{className:ft,closeButtonClassName:xt,children:[X,J,nt,dt]}),e[177]=Te,e[178]=X,e[179]=J,e[180]=nt,e[181]=dt,e[182]=ut):ut=e[182];let Dt;return e[183]!==le||e[184]!==l||e[185]!==fe||e[186]!==ut?(Dt=s.jsx(le,{open:l,onOpenChange:fe,children:ut}),e[183]=le,e[184]=l,e[185]=fe,e[186]=ut,e[187]=Dt):Dt=e[187],Dt}function ql(t){t.key==="Enter"&&t.preventDefault()}function Kl(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Hl(t){const e=O.c(16),{thread:l,startedBy:a,onOpen:n}=t,r=l.status?Ul[l.status]:null,o=l.lastMessage;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ie,{size:16}),e[0]=i):i=e[0];const d=l.title||"Super Agent";let u;e[1]!==d?(u=s.jsx("span",{className:"truncate text-sm text-foreground",children:d}),e[1]=d,e[2]=u):u=e[2];let f;e[3]!==a?(f=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(ve,{url:a.user?.image??void 0,fallback:Ne(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[3]=a,e[4]=f):f=e[4];let p;e[5]!==u||e[6]!==f?(p=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[i,u,f]}),e[5]=u,e[6]=f,e[7]=p):p=e[7];let c;e[8]!==o||e[9]!==n||e[10]!==r||e[11]!==l?(c=r&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:E("flex items-center gap-1.5",r.className),children:[s.jsx(r.icon,{size:16,className:E(r.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:r.label})]}),o&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:o}),n&&s.jsx(jl,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[8]=o,e[9]=n,e[10]=r,e[11]=l,e[12]=c):c=e[12];let m;return e[13]!==p||e[14]!==c?(m=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[p,c]}),e[13]=p,e[14]=c,e[15]=m):m=e[15],m}function Ql(t){return t.merged?{label:"Merged",className:"text-special",icon:qs}:t.state==="closed"?{label:"Closed",className:"text-destructive",icon:It}:t.draft?{label:"Draft",className:"text-muted-foreground",icon:It}:{label:"Open",className:"text-success",icon:It}}function Yl(t){const e=O.c(38),{pr:l}=t;let a,n,r,o,i,d,u,f;if(e[0]!==l){n=Ql(l);let v;e[9]!==l.body?(v=l.body?.trim(),e[9]=l.body,e[10]=v):v=e[10],a=v,i=l.url,d="_blank",u="noreferrer",f="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",o="flex items-center gap-2",r=E("flex items-center gap-1.5",n.className),e[0]=l,e[1]=a,e[2]=n,e[3]=r,e[4]=o,e[5]=i,e[6]=d,e[7]=u,e[8]=f}else a=e[1],n=e[2],r=e[3],o=e[4],i=e[5],d=e[6],u=e[7],f=e[8];let p;e[11]!==n.icon?(p=s.jsx(n.icon,{size:16}),e[11]=n.icon,e[12]=p):p=e[12];let c;e[13]!==n.label?(c=s.jsx("span",{className:"text-sm",children:n.label}),e[13]=n.label,e[14]=c):c=e[14];let m;e[15]!==r||e[16]!==p||e[17]!==c?(m=s.jsxs("span",{className:r,children:[p,c]}),e[15]=r,e[16]=p,e[17]=c,e[18]=m):m=e[18];const b=l.title??`${l.repoOwner}/${l.repoName}`;let x;e[19]!==b?(x=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:b}),e[19]=b,e[20]=x):x=e[20];let j;e[21]!==l.number?(j=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",l.number]}),e[21]=l.number,e[22]=j):j=e[22];let h;e[23]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Nl,{size:16,className:"shrink-0 text-muted-foreground"}),e[23]=h):h=e[23];let y;e[24]!==x||e[25]!==j||e[26]!==o||e[27]!==m?(y=s.jsxs("span",{className:o,children:[m,x,j,h]}),e[24]=x,e[25]=j,e[26]=o,e[27]=m,e[28]=y):y=e[28];let g;e[29]!==a?(g=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[29]=a,e[30]=g):g=e[30];let N;return e[31]!==y||e[32]!==g||e[33]!==i||e[34]!==d||e[35]!==u||e[36]!==f?(N=s.jsxs("a",{href:i,target:d,rel:u,className:f,children:[y,g]}),e[31]=y,e[32]=g,e[33]=i,e[34]=d,e[35]=u,e[36]=f,e[37]=N):N=e[37],N}function Vl(t){const e=O.c(5),{itemId:l}=t,{data:a,isLoading:n}=Pl(l);if(!n&&(!a||a.length===0))return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[s.jsx(It,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm text-foreground",children:"Pull requests"})]}),e[0]=r):r=e[0];let o;e[1]!==a?(o=a?a.map(Wl):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(Jt,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Loading…"})]}),e[1]=a,e[2]=o):o=e[2];let i;return e[3]!==o?(i=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[r,o]}),e[3]=o,e[4]=i):i=e[4],i}function Wl(t){return s.jsx(Yl,{pr:t},t.url)}const Vt="__unassigned__",Et={assignee:null,priority:null,due:null};function Xl(t){return t.assignee!==null||t.priority!==null||t.due!==null}function Jl(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const Zl=864e5;function en(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function tn(t,e){if(e.assignee!==null){if(e.assignee===Vt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!en(l,a)||e.due==="week"&&(l<a||l>a+7*Zl))return!1}return!0}const is=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function Ot(t,e=!1){return E("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function sn(t){const e=O.c(62),{value:l,members:a,onChange:n,block:r}=t,[o,i]=z.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Qt,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let u=d,f="Assignee";if(l===Vt)f="Unassigned";else if(l===$e){let D;e[1]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ie,{size:14}),e[1]=D):D=e[1],u=D,f="Super Agent"}else if(l){let D,F,I,T;if(e[2]!==a||e[3]!==l){let K;e[8]!==l?(K=M=>M.userId===l,e[8]=l,e[9]=K):K=e[9],F=a.find(K),D=ve,I=F?.user?.image??void 0,T=Ne(F?.user?.name),e[2]=a,e[3]=l,e[4]=D,e[5]=F,e[6]=I,e[7]=T}else D=e[4],F=e[5],I=e[6],T=e[7];let q;e[10]!==D||e[11]!==I||e[12]!==T?(q=s.jsx(D,{url:I,fallback:T,shape:"circle",size:"2xs"}),e[10]=D,e[11]=I,e[12]=T,e[13]=q):q=e[13],u=q,f=F?.user?.name??"Member"}let p;e[14]!==n?(p=D=>{n(D),i(!1)},e[14]=n,e[15]=p):p=e[15];const c=p,m=l!==null;let b;e[16]!==r||e[17]!==m?(b=Ot(m,r),e[16]=r,e[17]=m,e[18]=b):b=e[18];const x=b,j=r&&"ml-auto";let h;e[19]!==j?(h=E("shrink-0 opacity-60",j),e[19]=j,e[20]=h):h=e[20];const y=h;let g;e[21]!==f?(g=s.jsx("span",{className:"max-w-[10rem] truncate",children:f}),e[21]=f,e[22]=g):g=e[22];let N;e[23]!==y?(N=s.jsx(ts,{size:12,className:y}),e[23]=y,e[24]=N):N=e[24];let v;e[25]!==u||e[26]!==g||e[27]!==N||e[28]!==x?(v=s.jsx(qt,{asChild:!0,children:s.jsxs("button",{type:"button",className:x,children:[u,g,N]})}),e[25]=u,e[26]=g,e[27]=N,e[28]=x,e[29]=v):v=e[29];let w;e[30]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ys,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=w):w=e[30];let C;e[31]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ns,{children:"No members found."}),e[31]=C):C=e[31];let _;e[32]!==c?(_=s.jsx(ze,{value:"Anyone",onSelect:()=>c(null),children:"Anyone"}),e[32]=c,e[33]=_):_=e[33];let R;e[34]!==c?(R=()=>c(Vt),e[34]=c,e[35]=R):R=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Qt,{size:16,className:"text-muted-foreground"}),e[36]=G):G=e[36];let A;e[37]!==R?(A=s.jsxs(ze,{value:"Unassigned",onSelect:R,className:"gap-2",children:[G,"Unassigned"]}),e[37]=R,e[38]=A):A=e[38];let P;e[39]!==c?(P=()=>c($e),e[39]=c,e[40]=P):P=e[40];let se;e[41]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(Ie,{size:16}),e[41]=se):se=e[41];let L;e[42]!==P?(L=s.jsxs(ze,{value:"Super Agent",onSelect:P,className:"gap-2",children:[se,"Super Agent"]}),e[42]=P,e[43]=L):L=e[43];let U;e[44]!==_||e[45]!==A||e[46]!==L?(U=s.jsxs($t,{children:[_,A,L]}),e[44]=_,e[45]=A,e[46]=L,e[47]=U):U=e[47];let $;if(e[48]!==a||e[49]!==c){let D;e[51]!==c?(D=F=>s.jsxs(ze,{value:F.user?.name??F.userId,onSelect:()=>c(F.userId),className:"gap-2",children:[s.jsx(ve,{url:F.user?.image??void 0,fallback:Ne(F.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:F.user?.name??F.userId})]},F.userId),e[51]=c,e[52]=D):D=e[52],$=a.map(D),e[48]=a,e[49]=c,e[50]=$}else $=e[50];let H;e[53]!==$?(H=s.jsx($t,{heading:"Members",children:$}),e[53]=$,e[54]=H):H=e[54];let Q;e[55]!==U||e[56]!==H?(Q=s.jsx(Ht,{align:"start",className:"w-56 p-0",children:s.jsxs(vs,{children:[w,s.jsxs(Ss,{children:[C,U,H]})]})}),e[55]=U,e[56]=H,e[57]=Q):Q=e[57];let Y;return e[58]!==o||e[59]!==Q||e[60]!==v?(Y=s.jsxs(Kt,{open:o,onOpenChange:i,children:[v,Q]}),e[58]=o,e[59]=Q,e[60]=v,e[61]=Y):Y=e[61],Y}function ln(t){const e=O.c(23),{value:l,onChange:a,block:n}=t,r=l!==null;let o;e[0]!==n||e[1]!==r?(o=Ot(r,n),e[0]=n,e[1]=r,e[2]=o):o=e[2];const i=o,d=n&&"ml-auto";let u;e[3]!==d?(u=E("shrink-0 opacity-60",d),e[3]=d,e[4]=u):u=e[4];const f=u;let p;e[5]!==l?(p=l?s.jsx("span",{className:E("size-2 shrink-0 rounded-full",Se[l].dotClassName)}):s.jsx(kl,{size:14,className:"shrink-0"}),e[5]=l,e[6]=p):p=e[6];const c=l?Se[l].label:"Priority";let m;e[7]!==f?(m=s.jsx(ts,{size:12,className:f}),e[7]=f,e[8]=m):m=e[8];let b;e[9]!==p||e[10]!==c||e[11]!==m||e[12]!==i?(b=s.jsx(Tt,{asChild:!0,children:s.jsxs("button",{type:"button",className:i,children:[p,c,m]})}),e[9]=p,e[10]=c,e[11]=m,e[12]=i,e[13]=b):b=e[13];let x,j;e[14]!==a?(j=s.jsx(mt,{onSelect:()=>a(null),children:"Any priority"}),x=_s.map(g=>s.jsxs(mt,{onSelect:()=>a(g),className:"gap-2",children:[s.jsx("span",{className:E("size-2 rounded-full",Se[g].dotClassName)}),Se[g].label]},g)),e[14]=a,e[15]=x,e[16]=j):(x=e[15],j=e[16]);let h;e[17]!==x||e[18]!==j?(h=s.jsxs(At,{align:"start",className:"w-40",children:[j,x]}),e[17]=x,e[18]=j,e[19]=h):h=e[19];let y;return e[20]!==h||e[21]!==b?(y=s.jsxs(zt,{children:[b,h]}),e[20]=h,e[21]=b,e[22]=y):y=e[22],y}function nn(t){const e=O.c(27),{value:l,onChange:a,block:n}=t;let r;e[0]!==l?(r=is.find(C=>C.value===l)?.label,e[0]=l,e[1]=r):r=e[1];const o=r,i=l!==null;let d;e[2]!==n||e[3]!==i?(d=Ot(i,n),e[2]=n,e[3]=i,e[4]=d):d=e[4];const u=d,f=n&&"ml-auto";let p;e[5]!==f?(p=E("shrink-0 opacity-60",f),e[5]=f,e[6]=p):p=e[6];const c=p;let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ht,{size:14,className:"shrink-0"}),e[7]=m):m=e[7];const b=o??"Due date";let x;e[8]!==c?(x=s.jsx(ts,{size:12,className:c}),e[8]=c,e[9]=x):x=e[9];let j;e[10]!==b||e[11]!==x||e[12]!==u?(j=s.jsx(Tt,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,children:[m,b,x]})}),e[10]=b,e[11]=x,e[12]=u,e[13]=j):j=e[13];let h;e[14]!==a?(h=()=>a(null),e[14]=a,e[15]=h):h=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ht,{size:16,className:"text-muted-foreground"}),e[16]=y):y=e[16];let g;e[17]!==h?(g=s.jsxs(mt,{onSelect:h,className:"gap-2",children:[y,"Any time"]}),e[17]=h,e[18]=g):g=e[18];let N;e[19]!==a?(N=is.map(C=>{const _=C.value==="overdue";return s.jsxs(mt,{onSelect:()=>a(C.value),className:E("gap-2",_&&"text-destructive"),children:[s.jsx(ht,{size:16,className:E("shrink-0",_?"text-destructive":"text-muted-foreground")}),C.label]},C.value)}),e[19]=a,e[20]=N):N=e[20];let v;e[21]!==g||e[22]!==N?(v=s.jsxs(At,{align:"start",className:"w-44",children:[g,N]}),e[21]=g,e[22]=N,e[23]=v):v=e[23];let w;return e[24]!==v||e[25]!==j?(w=s.jsxs(zt,{children:[j,v]}),e[24]=v,e[25]=j,e[26]=w):w=e[26],w}function Ds(t){const e=O.c(26),{filters:l,members:a,onChange:n,block:r}=t;let o;e[0]!==l||e[1]!==n?(o=m=>n({...l,assignee:m}),e[0]=l,e[1]=n,e[2]=o):o=e[2];let i;e[3]!==r||e[4]!==l.assignee||e[5]!==a||e[6]!==o?(i=s.jsx(sn,{block:r,value:l.assignee,members:a,onChange:o}),e[3]=r,e[4]=l.assignee,e[5]=a,e[6]=o,e[7]=i):i=e[7];let d;e[8]!==l||e[9]!==n?(d=m=>n({...l,priority:m}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let u;e[11]!==r||e[12]!==l.priority||e[13]!==d?(u=s.jsx(ln,{block:r,value:l.priority,onChange:d}),e[11]=r,e[12]=l.priority,e[13]=d,e[14]=u):u=e[14];let f;e[15]!==l||e[16]!==n?(f=m=>n({...l,due:m}),e[15]=l,e[16]=n,e[17]=f):f=e[17];let p;e[18]!==r||e[19]!==l.due||e[20]!==f?(p=s.jsx(nn,{block:r,value:l.due,onChange:f}),e[18]=r,e[19]=l.due,e[20]=f,e[21]=p):p=e[21];let c;return e[22]!==i||e[23]!==u||e[24]!==p?(c=s.jsxs(s.Fragment,{children:[i,u,p]}),e[22]=i,e[23]=u,e[24]=p,e[25]=c):c=e[25],c}function an(t){const e=O.c(11),{filters:l,members:a,onChange:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Cs,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let o;e[1]!==l||e[2]!==a||e[3]!==n?(o=s.jsx(Ds,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=o):o=e[4];let i;e[5]!==l||e[6]!==n?(i=Xl(l)&&s.jsx("button",{type:"button",onClick:()=>n(Et),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=i):i=e[7];let d;return e[8]!==o||e[9]!==i?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,o,i]}),e[8]=o,e[9]=i,e[10]=d):d=e[10],d}function rn(t){const e=O.c(26),{filters:l,members:a,onChange:n}=t,[r,o]=z.useState(!1),i=Jl(l),d=i>0;let u;e[0]!==d?(u=Ot(d),e[0]=d,e[1]=u):u=e[1];const f=u;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Cs,{size:14,className:"shrink-0"}),e[2]=p):p=e[2];let c;e[3]!==i?(c=i>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:i}),e[3]=i,e[4]=c):c=e[4];let m;e[5]!==c||e[6]!==f?(m=s.jsx(vl,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[p,"Filters",c]})}),e[5]=c,e[6]=f,e[7]=m):m=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Sl,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=b):b=e[8];let x;e[9]!==l||e[10]!==a||e[11]!==n?(x=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Ds,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=x):x=e[12];let j;e[13]!==i||e[14]!==n?(j=i>0&&s.jsx(ye,{variant:"outline",className:"flex-1",onClick:()=>n(Et),children:"Clear all"}),e[13]=i,e[14]=n,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Cl,{asChild:!0,children:s.jsx(ye,{className:"flex-1",children:"Done"})}),e[16]=h):h=e[16];let y;e[17]!==j?(y=s.jsxs(wl,{className:"flex-row gap-2",children:[j,h]}),e[17]=j,e[18]=y):y=e[18];let g;e[19]!==y||e[20]!==x?(g=s.jsxs(_l,{className:"p-0",children:[b,x,y]}),e[19]=y,e[20]=x,e[21]=g):g=e[21];let N;return e[22]!==r||e[23]!==g||e[24]!==m?(N=s.jsxs(Dl,{open:r,onOpenChange:o,direction:"bottom",children:[m,g]}),e[22]=r,e[23]=g,e[24]=m,e[25]=N):N=e[25],N}const os=380,on=90,cs=5,cn="cubic-bezier(0.22, 0.61, 0.36, 1)",dn=8;function un(t,e){const l=z.useRef(new Map);z.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),r=l.current,o=new Map,i=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const c of n){const m=c.dataset.flipId;if(!m)continue;const b=c.getBoundingClientRect();o.set(m,b);const x=r.get(m);if(!x)continue;const j=x.left-b.left,h=x.top-b.top;(j||h)&&d.push({el:c,dx:j,dy:h,lane:Math.abs(j)>dn})}if(l.current=o,i||d.length===0)return;for(const c of d){const m=c.lane?` rotate(${c.dx>0?cs:-cs}deg)`:"";c.el.style.transition="none",c.el.style.transform=`translate(${c.dx}px, ${c.dy}px)${m}`,c.lane&&(c.el.style.zIndex="10")}let u=0;const f=[],p=requestAnimationFrame(()=>{for(const c of d){const m=c.lane?u++*on:0;c.el.style.transition=`transform ${os}ms ${cn} ${m}ms`,c.el.style.transform="",f.push(window.setTimeout(()=>{c.el.style.transition="",c.el.style.transform="",c.el.style.zIndex=""},os+m+30))}});return()=>{cancelAnimationFrame(p);for(const c of f)clearTimeout(c)}},[e,t])}Ms(()=>import("./index-DonY639O.js").then(t=>t.aY),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157])).catch(()=>{});function mn(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(zs,{})})})}),t[0]=e):e=t[0],e}const fn=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function xn(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:fn.format(e),overdue:l}}const ss="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function ks(){const t=O.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=E(ss,"border-warning/30 text-warning"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(fs,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function Is(t){const e=O.c(7),{priority:l}=t,a=Se[l];let n;e[0]!==a.dotClassName?(n=E("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let r;e[2]!==n?(r=s.jsx("span",{className:n}),e[2]=n,e[3]=r):r=e[3];let o;return e[4]!==a.label||e[5]!==r?(o=s.jsxs("span",{className:ss,children:[r,a.label]}),e[4]=a.label,e[5]=r,e[6]=o):o=e[6],o}function Ts(t){const e=O.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:i,overdue:d}=xn(l);a=i,n=E(ss,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ht,{size:14}),e[3]=r):r=e[3];let o;return e[4]!==a||e[5]!==n?(o=s.jsxs("span",{className:n,children:[r,a]}),e[4]=a,e[5]=n,e[6]=o):o=e[6],o}function As(t){const e=O.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===$e){const r=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let o;e[0]!==n?(o=n&&s.jsx(ve,{url:n.user?.image??void 0,fallback:Ne(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ie,{size:16,className:"ring-2 ring-background"}),e[2]=i):i=e[2];let d;return e[3]!==r||e[4]!==o?(d=s.jsxs("span",{className:"inline-flex items-center",title:r,children:[o,i]}),e[3]=r,e[4]=o,e[5]=d):d=e[5],d}if(a){const r=a.user?.image??void 0,o=a.user?.name;let i;e[6]!==o?(i=Ne(o),e[6]=o,e[7]=i):i=e[7];let d;return e[8]!==r||e[9]!==i?(d=s.jsx(ve,{url:r,fallback:i,shape:"circle",size:"2xs"}),e[8]=r,e[9]=i,e[10]=d):d=e[10],d}return null}function zs(){const t=O.c(102),{items:e,isLoading:l}=Fl(),a=Bl(),n=zl();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={slug:"mcp-github"},t[0]=r):r=t[0];const o=al(r);let i;t[1]!==o?(i=rl(o),t[1]=o,t[2]=i):i=t[2];const d=i.length>0,[u,f]=z.useState(!1),{data:p}=hs();let c,m;t[3]!==p?.data?.members?(c=p?.data?.members??[],m=new Map(c.map(pn)),t[3]=p?.data?.members,t[4]=c,t[5]=m):(c=t[4],m=t[5]);const b=m,[x,j]=z.useState("board"),[h,y]=z.useState(Et),[g,N]=z.useState(!1),[v,w]=z.useState(null),[C,_]=z.useState(null),{setTaskId:R}=Il(),{create:G}=Tl(),{org:A,locator:P}=bt(),se=Rs();let L;t[6]===Symbol.for("react.memo_cache_sentinel")?(L={strict:!1},t[6]=L):L=t[6];const{task:U}=Ps(L);let $;t[7]!==U||t[8]!==e?($=U?e.find(B=>B.id===U)??null:null,t[7]=U,t[8]=e,t[9]=$):$=t[9];const H=$;let Q;t[10]!==U||t[11]!==se||t[12]!==A?(Q=()=>{U&&se({to:"/$org/board",params:{org:A.slug},search:{},replace:!0})},t[10]=U,t[11]=se,t[12]=A,t[13]=Q):Q=t[13];const Y=Q;let D;t[14]!==a||t[15]!==G||t[16]!==P||t[17]!==A||t[18]!==R?(D=async B=>{const V=crypto.randomUUID(),W=Js(A.id).id,pe=[B.title,B.description?.trim()].filter(Boolean).join(`
3
-
4
- `);Al(sessionStorage,P,V,{tiptapDoc:{type:"doc",content:[{type:"paragraph",content:[{type:"text",text:pe}]}]}}),N(!1);try{await G({id:V,virtual_mcp_id:W}),await a.link.mutateAsync({id:B.id,linkThreadId:V})}catch{}R(V,W,{autosend:!0})},t[14]=a,t[15]=G,t[16]=P,t[17]=A,t[18]=R,t[19]=D):D=t[19];const F=D;let I,T,q,K,M,me,le;if(t[20]!==a||t[21]!==Y||t[22]!==H||t[23]!==g||t[24]!==v||t[25]!==h||t[26]!==d||t[27]!==l||t[28]!==e||t[29]!==x||t[30]!==b||t[31]!==c||t[32]!==n){M=Symbol.for("react.early_return_sentinel");e:{let B;t[40]!==h?(B=k=>tn(k,h),t[40]=h,t[41]=B):B=t[41];const V=e.filter(B);let W;t[42]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{w(null),_(null),N(!0)},t[42]=W):W=t[42];const pe=W;let we;t[43]===Symbol.for("react.memo_cache_sentinel")?(we=k=>{w(null),_(k),N(!0)},t[43]=we):we=t[43];const _e=we;let ie;t[44]===Symbol.for("react.memo_cache_sentinel")?(ie=k=>{w(k),N(!0)},t[44]=ie):ie=t[44];const be=ie;I=v??H,q=g||!!H;let Ee;if(t[45]!==Y?(Ee=()=>{N(!1),w(null),_(null),Y()},t[45]=Y,t[46]=Ee):Ee=t[46],T=Ee,l&&e.length===0){let k;t[47]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(ms,{size:20,className:"animate-spin text-muted-foreground"})}),t[47]=k):k=t[47],M=k;break e}me="flex min-h-0 flex-1 flex-col";let De;t[48]===Symbol.for("react.memo_cache_sentinel")?(De=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[48]=De):De=t[48];let Z;t[49]!==h||t[50]!==e.length||t[51]!==c?(Z=e.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(rn,{filters:h,members:c,onChange:y})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(an,{filters:h,members:c,onChange:y})})]}),t[49]=h,t[50]=e.length,t[51]=c,t[52]=Z):Z=t[52];const Ae=x==="list";let oe;t[53]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>j("list"),t[53]=oe):oe=t[53];let ce;t[54]!==Ae?(ce=s.jsx(ds,{active:Ae,onClick:oe,icon:Vs,label:"List"}),t[54]=Ae,t[55]=ce):ce=t[55];const ge=x==="board";let ke;t[56]===Symbol.for("react.memo_cache_sentinel")?(ke=()=>j("board"),t[56]=ke):ke=t[56];let ee;t[57]!==ge?(ee=s.jsx(ds,{active:ge,onClick:ke,icon:Qs,label:"Board"}),t[57]=ge,t[58]=ee):ee=t[58];let te;t[59]!==ce||t[60]!==ee?(te=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[ce,ee]}),t[59]=ce,t[60]=ee,t[61]=te):te=t[61];let de;t[62]===Symbol.for("react.memo_cache_sentinel")?(de=s.jsxs(ye,{size:"sm",onClick:pe,children:[s.jsx(Zt,{size:16}),"New task"]}),t[62]=de):de=t[62];let ue;t[63]!==te?(ue=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[te,de]}),t[63]=te,t[64]=ue):ue=t[64],t[65]!==Z||t[66]!==ue?(le=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[De,s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Z,ue]})]}),t[65]=Z,t[66]=ue,t[67]=le):le=t[67],K=e.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:"No tasks yet. Start one with New task."})}):V.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:["No tasks match these filters.",s.jsx(ye,{variant:"outline",size:"sm",onClick:()=>y(Et),children:"Clear filters"})]})}):x==="board"?s.jsx(hn,{items:V,memberByUserId:b,onOpen:be,onCreate:_e,onMove:(k,Ft)=>a.update.mutate({id:k,status:Ft}),onAutoFix:n?k=>{if(!d){f(!0);return}a.update.mutate({id:k.id,assigneeId:$e})}:void 0}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:V.map(k=>s.jsx(yn,{item:k,assignee:k.assigneeId?b.get(k.assigneeId):void 0,assignedBy:k.assignedBy?b.get(k.assignedBy):void 0,onOpen:()=>be(k)},k.id))})})}t[20]=a,t[21]=Y,t[22]=H,t[23]=g,t[24]=v,t[25]=h,t[26]=d,t[27]=l,t[28]=e,t[29]=x,t[30]=b,t[31]=c,t[32]=n,t[33]=I,t[34]=T,t[35]=q,t[36]=K,t[37]=M,t[38]=me,t[39]=le}else I=t[33],T=t[34],q=t[35],K=t[36],M=t[37],me=t[38],le=t[39];if(M!==Symbol.for("react.early_return_sentinel"))return M;const fe=q?I?.id??`new-${C??"default"}`:"closed",Te=I??void 0,ft=C??void 0,xt=a.create.isPending||a.update.isPending;let xe;t[68]!==a.create||t[69]!==a.update||t[70]!==I||t[71]!==T?(xe=B=>{I?a.update.mutate({id:I.id,...B}):a.create.mutate(B),T()},t[68]=a.create,t[69]=a.update,t[70]=I,t[71]=T,t[72]=xe):xe=t[72];let X;t[73]!==a.remove||t[74]!==I||t[75]!==T?(X=I?()=>{a.remove.mutate(I.id),T()}:void 0,t[73]=a.remove,t[74]=I,t[75]=T,t[76]=X):X=t[76];let ne;t[77]!==I||t[78]!==F?(ne=I?()=>{F(I)}:void 0,t[77]=I,t[78]=F,t[79]=ne):ne=t[79];let J;t[80]!==T||t[81]!==R?(J=B=>{B.virtualMcpId&&(T(),R(B.threadId,B.virtualMcpId,{main:B.hasPreview?"preview":"board"}))},t[80]=T,t[81]=R,t[82]=J):J=t[82];let Ce;t[83]!==T||t[84]!==q||t[85]!==fe||t[86]!==Te||t[87]!==ft||t[88]!==xt||t[89]!==xe||t[90]!==X||t[91]!==ne||t[92]!==J?(Ce=s.jsx(Gl,{open:q,onClose:T,item:Te,defaultStatus:ft,isSaving:xt,onSubmit:xe,onDelete:X,onNewChat:ne,onOpenThread:J},fe),t[83]=T,t[84]=q,t[85]=fe,t[86]=Te,t[87]=ft,t[88]=xt,t[89]=xe,t[90]=X,t[91]=ne,t[92]=J,t[93]=Ce):Ce=t[93];let ae;t[94]!==u?(ae=s.jsx(gn,{open:u,onOpenChange:f}),t[94]=u,t[95]=ae):ae=t[95];let re;return t[96]!==K||t[97]!==Ce||t[98]!==ae||t[99]!==me||t[100]!==le?(re=s.jsxs("div",{className:me,children:[le,K,Ce,ae]}),t[96]=K,t[97]=Ce,t[98]=ae,t[99]=me,t[100]=le,t[101]=re):re=t[101],re}function pn(t){return[t.userId,t]}function gn(t){const e=O.c(14),{open:l,onOpenChange:a}=t,{connect:n,isConnecting:r}=$l("deco/mcp-github");let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(tl,{children:[s.jsx(gs,{children:"Connect GitHub"}),s.jsx(sl,{children:"Auto-fix hands the task to the Super Agent, which opens a pull request with the change. Connect GitHub so it can push and open PRs."})]}),e[0]=o):o=e[0];let i;e[1]!==n||e[2]!==a?(i=async()=>{await n(),a(!1)},e[1]=n,e[2]=a,e[3]=i):i=e[3];let d;e[4]!==r?(d=r?s.jsx(ms,{size:16,className:"animate-spin"}):s.jsx(el,{className:"size-4"}),e[4]=r,e[5]=d):d=e[5];let u;e[6]!==r||e[7]!==i||e[8]!==d?(u=s.jsxs(xs,{className:"sm:max-w-md",children:[o,s.jsx(ll,{children:s.jsxs(ye,{onClick:i,disabled:r,className:"gap-2",children:[d,"Connect GitHub"]})})]}),e[6]=r,e[7]=i,e[8]=d,e[9]=u):u=e[9];let f;return e[10]!==a||e[11]!==l||e[12]!==u?(f=s.jsx(ps,{open:l,onOpenChange:a,children:u}),e[10]=a,e[11]=l,e[12]=u,e[13]=f):f=e[13],f}function ds(t){const e=O.c(11),{active:l,onClick:a,icon:n,label:r}=t,o=`${r} view`,i=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[0]!==i?(d=E("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",i),e[0]=i,e[1]=d):d=e[1];let u;e[2]!==n?(u=s.jsx(n,{size:14}),e[2]=n,e[3]=u):u=e[3];let f;return e[4]!==l||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==d||e[9]!==u?(f=s.jsxs("button",{type:"button",onClick:a,"aria-label":o,"aria-pressed":l,className:d,children:[u,r]}),e[4]=l,e[5]=r,e[6]=a,e[7]=o,e[8]=d,e[9]=u,e[10]=f):f=e[10],f}function hn(t){const e=O.c(12),{items:l,memberByUserId:a,onOpen:n,onCreate:r,onMove:o,onAutoFix:i}=t,[d,u]=z.useState(null),f=z.useRef(null);let p;e[0]!==l?(p=l.map(bn).join(","),e[0]=l,e[1]=p):p=e[1],un(f,p);let m;e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==r||e[6]!==o||e[7]!==n||e[8]!==d?(m=ws.map(x=>{const j=l.filter(g=>g.status===x),h=je[x],y=h.icon;return s.jsxs("div",{onDragOver:g=>{g.preventDefault(),u(x)},onDragLeave:g=>{g.currentTarget.contains(g.relatedTarget)||u(null)},onDrop:g=>{g.preventDefault();const N=g.dataTransfer.getData("text/plain");N&&o(N,x),u(null)},className:E("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",d===x&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(y,{size:15,className:E("shrink-0",h.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:h.label}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:j.length}),s.jsx("button",{type:"button","aria-label":`New task in ${h.label}`,title:`New task in ${h.label}`,onClick:()=>r(x),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(Zt,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:j.map(g=>s.jsx(jn,{item:g,assignee:g.assigneeId?a.get(g.assigneeId):void 0,assignedBy:g.assignedBy?a.get(g.assignedBy):void 0,onOpen:()=>n(g),onAutoFix:i?()=>i(g):void 0},g.id))})]},x)}),e[2]=l,e[3]=a,e[4]=i,e[5]=r,e[6]=o,e[7]=n,e[8]=d,e[9]=m):m=e[9];let b;return e[10]!==m?(b=s.jsx("div",{ref:f,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:m})}),e[10]=m,e[11]=b):b=e[11],b}function bn(t){return`${t.id}:${t.status}`}function jn(t){const e=O.c(33),{item:l,assignee:a,assignedBy:n,onOpen:r,onAutoFix:o}=t,i=je[l.status],d=i.icon,u=Rl(l)?.lastMessage,f=o&&(l.status==="triage"||l.status==="todo")&&l.assigneeId!==$e,p=l.id;let c;e[0]!==l.id?(c=C=>{C.dataTransfer.setData("text/plain",l.id),C.dataTransfer.effectAllowed="move"},e[0]=l.id,e[1]=c):c=e[1];const m=l.title;let b;e[2]!==i.iconClassName?(b=E("mt-px shrink-0",i.iconClassName),e[2]=i.iconClassName,e[3]=b):b=e[3];let x;e[4]!==d||e[5]!==b?(x=s.jsx(d,{size:16,className:b}),e[4]=d,e[5]=b,e[6]=x):x=e[6];let j;e[7]!==l.title?(j=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:l.title}),e[7]=l.title,e[8]=j):j=e[8];let h;e[9]!==n||e[10]!==a||e[11]!==l?(h=s.jsx(As,{item:l,assignee:a,assignedBy:n}),e[9]=n,e[10]=a,e[11]=l,e[12]=h):h=e[12];let y;e[13]!==x||e[14]!==j||e[15]!==h?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[x,j,h]}),e[13]=x,e[14]=j,e[15]=h,e[16]=y):y=e[16];let g;e[17]!==u?(g=u&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:u}),e[17]=u,e[18]=g):g=e[18];let N;e[19]!==l?(N=(Yt(l)||l.priority!=="none"||!!l.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Yt(l)&&s.jsx(ks,{}),l.priority!=="none"&&s.jsx(Is,{priority:l.priority}),l.dueDate&&s.jsx(Ts,{iso:l.dueDate})]}),e[19]=l,e[20]=N):N=e[20];let v;e[21]!==o||e[22]!==f?(v=f&&s.jsxs("button",{type:"button",onClick:C=>{C.stopPropagation(),o()},className:"flex items-center gap-1.5 self-end rounded-md border border-border bg-background px-2 py-1 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[s.jsx(Ys,{size:12}),"Auto-fix"]}),e[21]=o,e[22]=f,e[23]=v):v=e[23];let w;return e[24]!==l.id||e[25]!==l.title||e[26]!==r||e[27]!==N||e[28]!==v||e[29]!==c||e[30]!==y||e[31]!==g?(w=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":p,onDragStart:c,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:m,children:[y,g,N,v]}),e[24]=l.id,e[25]=l.title,e[26]=r,e[27]=N,e[28]=v,e[29]=c,e[30]=y,e[31]=g,e[32]=w):w=e[32],w}function yn(t){const e=O.c(30),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,o=je[l.status],i=o.icon;let d;e[0]!==o.iconClassName?(d=E("shrink-0",o.iconClassName),e[0]=o.iconClassName,e[1]=d):d=e[1];let u;e[2]!==i||e[3]!==d?(u=s.jsx(i,{size:16,className:d}),e[2]=i,e[3]=d,e[4]=u):u=e[4];let f;e[5]!==l.title?(f=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=f):f=e[6];let p;e[7]!==l?(p=Yt(l)&&s.jsx(ks,{}),e[7]=l,e[8]=p):p=e[8];let c;e[9]!==l.priority?(c=l.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Is,{priority:l.priority})}),e[9]=l.priority,e[10]=c):c=e[10];let m;e[11]!==l.dueDate?(m=l.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Ts,{iso:l.dueDate})}),e[11]=l.dueDate,e[12]=m):m=e[12];let b;e[13]!==n||e[14]!==a||e[15]!==l?(b=s.jsx(As,{item:l,assignee:a,assignedBy:n}),e[13]=n,e[14]=a,e[15]=l,e[16]=b):b=e[16];let x;e[17]!==l.createdAt?(x=fl(new Date(l.createdAt)),e[17]=l.createdAt,e[18]=x):x=e[18];let j;e[19]!==x?(j=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:x}),e[19]=x,e[20]=j):j=e[20];let h;return e[21]!==r||e[22]!==u||e[23]!==f||e[24]!==p||e[25]!==c||e[26]!==m||e[27]!==b||e[28]!==j?(h=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[u,f,p,c,m,b,j]}),e[21]=r,e[22]=u,e[23]=f,e[24]=p,e[25]=c,e[26]=m,e[27]=b,e[28]=j,e[29]=h):h=e[29],h}const ca=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:zs,default:mn},Symbol.toStringTag,{value:"Module"}));export{Se as P,je as S,Gl as T,Fl as a,Bl as b,Ie as c,zs as d,ca as i,$l as u};