decocms 4.72.3 → 4.74.0

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 (260) hide show
  1. package/dist/client/assets/{AlertCircle-CX23NCuO.js → AlertCircle-BaauQIwC.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CRvFGO5O.js → AreaChart-5GoV9SRg.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-ChoUWc1b.js → ArrowUp-C814v0pE.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-Bq-zX9ha.js → ArrowUpRight-BLP3DLju.js} +1 -1
  5. package/dist/client/assets/{Check-BbAbdPfp.js → Check-DYPRi7NO.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-Day5nLHt.js → CheckCircle-D_t3rWUI.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-BsEi-r9q.js → ChevronDown-wHLuFr3i.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-B9mybD1s.js → ChevronRight-BARfL9-W.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BWoVqFrM.js → ChevronUp-CRmxYAjE.js} +1 -1
  10. package/dist/client/assets/{Circle-Bj_xS3WU.js → Circle-DuelqjM2.js} +1 -1
  11. package/dist/client/assets/Copy01-BwtpNAKR.js +1 -0
  12. package/dist/client/assets/{DotsVertical-BQRa2EB9.js → DotsVertical-B_jKX962.js} +1 -1
  13. package/dist/client/assets/Eye-CM4SfxEo.js +1 -0
  14. package/dist/client/assets/{FilterLines-C5i4i3WB.js → FilterLines-CwEBxGZP.js} +1 -1
  15. package/dist/client/assets/{Flag01-C7YxvVFh.js → Flag01-RtD7xNTJ.js} +1 -1
  16. package/dist/client/assets/{Globe01-CC0A4U7g.js → Globe01-B-4z45oj.js} +1 -1
  17. package/dist/client/assets/{Globe04-BV89vsfi.js → Globe04-D7ZgONc6.js} +1 -1
  18. package/dist/client/assets/{HardDrive-CA9cG4ej.js → HardDrive-DNueik1y.js} +1 -1
  19. package/dist/client/assets/{Key01-Y2tTMtA8.js → Key01-DrwX5nx2.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-C6uN3ryJ.js → LayoutLeft-CHLKhLgL.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-CbW1jJhi.js → LinkExternal01-022iaJNF.js} +1 -1
  22. package/dist/client/assets/{List-MOccGrJp.js → List-jObuFUL_.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DBUBWT-e.js → Monitor01-BkHN4rM2.js} +1 -1
  24. package/dist/client/assets/{Package-BL3B6ONo.js → Package-DYdmCLl6.js} +1 -1
  25. package/dist/client/assets/{Palette-B0oAitOJ.js → Palette-BWa7ee-4.js} +1 -1
  26. package/dist/client/assets/{Play-zjQOd6w0.js → Play-DYP9-OJo.js} +1 -1
  27. package/dist/client/assets/{Plus-DATZ4-ND.js → Plus-DKATXnIq.js} +1 -1
  28. package/dist/client/assets/{SearchLg-B4W4xrFH.js → SearchLg-crE3yQZJ.js} +1 -1
  29. package/dist/client/assets/{SearchMd-CKL74aOj.js → SearchMd-CbytZ1-S.js} +1 -1
  30. package/dist/client/assets/{Settings02-DAAnVZLO.js → Settings02-1LTNhTXj.js} +1 -1
  31. package/dist/client/assets/{Shield01-IlYcL8Fi.js → Shield01-CULBCC4Z.js} +1 -1
  32. package/dist/client/assets/{Star01-Bb61R21H.js → Star01-CtWX4nA3.js} +1 -1
  33. package/dist/client/assets/{Stars01-Bnuoinbt.js → Stars01-COE1U6xi.js} +1 -1
  34. package/dist/client/assets/{Stars02-B9xmjTkg.js → Stars02-BzQc7fZz.js} +1 -1
  35. package/dist/client/assets/{Sun-wOtTFTOd.js → Sun-CyoL1WFK.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-C90B2Auk.js → SwitchHorizontal01-QNGjYcml.js} +1 -1
  37. package/dist/client/assets/{Tool01-BT4kICfE.js → Tool01-BWGVYfev.js} +1 -1
  38. package/dist/client/assets/{Tool02-vM8N2pYB.js → Tool02-DkTMVP4f.js} +1 -1
  39. package/dist/client/assets/{Trash01-CrwbV8c_.js → Trash01-iPP4w9gK.js} +1 -1
  40. package/dist/client/assets/TrendUp01-C3q3M7MG.js +1 -0
  41. package/dist/client/assets/{Upload01-Lp0wJMYr.js → Upload01-CoVAXfWg.js} +1 -1
  42. package/dist/client/assets/{User01-CQV6kRtR.js → User01-2QspS0s6.js} +1 -1
  43. package/dist/client/assets/{UserPlus01-13KHecKW.js → UserPlus01-DoBolndD.js} +1 -1
  44. package/dist/client/assets/{Users01-CDDfUziK.js → Users01-C3FOprDj.js} +1 -1
  45. package/dist/client/assets/{Users03-ZlQye2vY.js → Users03-BYqJADve.js} +1 -1
  46. package/dist/client/assets/{X-CNdIeej8.js → X-Bqs01fCh.js} +1 -1
  47. package/dist/client/assets/{XCircle-C9sRiEE0.js → XCircle-DHCvZwgH.js} +1 -1
  48. package/dist/client/assets/{XClose-4pjmwtT4.js → XClose-P0NM9uUE.js} +1 -1
  49. package/dist/client/assets/{Zap-DHGChPV2.js → Zap-CI5WhuKJ.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-BV8kr37_.js → ZapSquare-BhWmmFEB.js} +1 -1
  51. package/dist/client/assets/{ZoomOut-7nLppLEs.js → ZoomOut-C7W-ZWAB.js} +1 -1
  52. package/dist/client/assets/{access-gate-BAwcBNbs.js → access-gate-BK7GcTMo.js} +1 -1
  53. package/dist/client/assets/{add-section-modal-lhtrhXMg.js → add-section-modal-CfvYLCg2.js} +1 -1
  54. package/dist/client/assets/agent-icon-5pSyq_FH.js +1 -0
  55. package/dist/client/assets/agents-list-pNinhUjp.js +1 -0
  56. package/dist/client/assets/ai-providers-CRHCw5VF.js +1 -0
  57. package/dist/client/assets/{alert-BhYIEI2X.js → alert-D4ttbBAt.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-IVNf28U9.js → alert-dialog-GCrUNzbs.js} +1 -1
  59. package/dist/client/assets/app-editor-DqcvDhID.js +1 -0
  60. package/dist/client/assets/{auth-DIzgjm9h.js → auth-Cf4In3Ce.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-CwgiOIdP.js → auth-catchall-CL7qcaW-.js} +1 -1
  62. package/dist/client/assets/{auth-entry-DhEOJXIL.js → auth-entry-BBn3Oy3I.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-B-Ji1dsx.js → auth-split-layout-ClDCjxcR.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-Bb5P11Gd.js → authenticate-and-persist-oauth-DeTua2ma.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-BrrHJBg_.js → automation-list-row-bCHP9GaB.js} +1 -1
  66. package/dist/client/assets/{automation-runs-_xFJy_Wv.js → automation-runs-K5fQtR3Q.js} +10 -10
  67. package/dist/client/assets/automations-BchD7Vmn.js +1 -0
  68. package/dist/client/assets/{autosend-BX8nQnW3.js → autosend-CnfmH4zE.js} +1 -1
  69. package/dist/client/assets/{avatar-CfHetrJ0.js → avatar-BB1BJsL_.js} +1 -1
  70. package/dist/client/assets/{badge-BR8ZoQPH.js → badge-miK_gWS7.js} +1 -1
  71. package/dist/client/assets/{block-document-BeMgCoP0.js → block-document-BnBi9DlX.js} +1 -1
  72. package/dist/client/assets/{brand-context-Dfa00_kA.js → brand-context-Bwk8h-AT.js} +1 -1
  73. package/dist/client/assets/{buckets-BJ3UCF_c.js → buckets-BVny45s4.js} +1 -1
  74. package/dist/client/assets/bulk-category-panel-CI-tBRB_.js +1 -0
  75. package/dist/client/assets/{calendar-D9BWcxij.js → calendar-i7Bgz_TN.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-CWaH-_Bd.js → capability-load-error-ykEHLKnb.js} +1 -1
  77. package/dist/client/assets/{card-1ZIM8JYb.js → card-BjD2_XuX.js} +1 -1
  78. package/dist/client/assets/category-editor-CSZtSGt6.js +1 -0
  79. package/dist/client/assets/{chat-context-BhPkOl45.js → chat-context-De0V13yX.js} +1 -1
  80. package/dist/client/assets/{checkbox-YuHG4ViR.js → checkbox-DnsQEgvs.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-CP82qKpR.js → cli-auth-success-DlpvQRp0.js} +1 -1
  82. package/dist/client/assets/collection-detail-HRLTqsYR.js +1 -0
  83. package/dist/client/assets/{collection-display-button-CbTgXJt9.js → collection-display-button-CNmqBrih.js} +1 -1
  84. package/dist/client/assets/{collection-search-D4kzf4BZ.js → collection-search-MTrnV0Y_.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-Cyqk04aC.js → collection-table-wrapper-CZMGnyXO.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-CwblhJGY.js → collection-tabs-Dvz33uvw.js} +1 -1
  87. package/dist/client/assets/{command-DRUw9pTQ.js → command-DpdcRmV-.js} +1 -1
  88. package/dist/client/assets/commerce-onboarding-QSGTn2pK.js +1 -0
  89. package/dist/client/assets/{companions-core-CrqiPrVn.js → companions-core-CgTHLTTN.js} +1 -1
  90. package/dist/client/assets/connect-desktop-dialog-BASAvtSw.js +1 -0
  91. package/dist/client/assets/{connection-card-BddaDWk3.js → connection-card-DQ8XLP8C.js} +1 -1
  92. package/dist/client/assets/connection-detail-CwpaZMQ9.js +1 -0
  93. package/dist/client/assets/{connection-form-helpers-B3t0vd0x.js → connection-form-helpers-B4Lj6wNN.js} +1 -1
  94. package/dist/client/assets/connections-C4IOF63g.js +1 -0
  95. package/dist/client/assets/{decopilot-sse-pool-B1izZBf2.js → decopilot-sse-pool-_LHJFrBF.js} +1 -1
  96. package/dist/client/assets/{dialog-DfnhzCwv.js → dialog-CUb_uQeJ.js} +1 -1
  97. package/dist/client/assets/{domain-settings-Dw-3NGKK.js → domain-settings-Cj1WoInJ.js} +1 -1
  98. package/dist/client/assets/{drawer-Cu1H6Zpl.js → drawer-BSFvVMvA.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-BlorfjU6.js → dropdown-menu-D-nlMdm5.js} +1 -1
  100. package/dist/client/assets/{empty-state-D0Yjh42T.js → empty-state-C_IbZdBr.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-DkYKg47U.js → extract-connection-data-BIadZZgr.js} +1 -1
  102. package/dist/client/assets/file-explorer-BWAl04Ll.js +2 -0
  103. package/dist/client/assets/{file-type-icon-CyQSc8WD.js → file-type-icon-mrfxFHRk.js} +1 -1
  104. package/dist/client/assets/{files-C98dPcEM.js → files-B6sMQ0N9.js} +1 -1
  105. package/dist/client/assets/{form-ZPjO3One.js → form-CEO5VtKG.js} +1 -1
  106. package/dist/client/assets/{general-mC0-nMIz.js → general-CpcExAES.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-DneVvY3I.js → github-repo-picker-CH-zkM68.js} +1 -1
  108. package/dist/client/assets/{hooks-DsQUp7L9.js → hooks-G1nBJ-F3.js} +1 -1
  109. package/dist/client/assets/{index-BOaCGG-5.js → index-B3_jWN9S.js} +1 -1
  110. package/dist/client/assets/index-B7Kp0gmf.css +1 -0
  111. package/dist/client/assets/index-B8fJFfFf.js +1 -0
  112. package/dist/client/assets/{index-BeTttHS9.js → index-BW23Hqv6.js} +4 -4
  113. package/dist/client/assets/{index-PCoZIk-M.js → index-BZjBKD1m.js} +23 -23
  114. package/dist/client/assets/{index-B8Idfh3P.js → index-B_nVJPYO.js} +1 -1
  115. package/dist/client/assets/{index-CtT9oMhI.js → index-BlItCfDb.js} +1 -1
  116. package/dist/client/assets/index-C7cs-gci.js +2 -0
  117. package/dist/client/assets/{index-1xWIMGUU.js → index-C9P6Y57L.js} +1 -1
  118. package/dist/client/assets/{index-DZp5yHGX.js → index-CTpTvSxb.js} +1 -1
  119. package/dist/client/assets/{index-emjsrsD0.js → index-DAFjHwsT.js} +1 -1
  120. package/dist/client/assets/{index-BHjtHKuw.js → index-DFuynMdy.js} +1 -1
  121. package/dist/client/assets/{index-CrWfdotU.js → index-DQVI41jj.js} +2 -2
  122. package/dist/client/assets/{index-76rFpqug.js → index-DxwLi9-g.js} +1 -1
  123. package/dist/client/assets/{index-C5JCmVQ0.js → index-lRedQ_8t.js} +3 -3
  124. package/dist/client/assets/{index-redirect-Dog_XssD.js → index-redirect-Mh7_3AcS.js} +1 -1
  125. package/dist/client/assets/{input-DWv95vY4.js → input-DOZlS9i9.js} +1 -1
  126. package/dist/client/assets/{integration-icon-D74EpYgv.js → integration-icon-CN9OtiIm.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-DGmwAQAA.js → invite-member-dialog-LDdBeQZc.js} +1 -1
  128. package/dist/client/assets/{label-CjR-YPrA.js → label-u5PrAFB7.js} +1 -1
  129. package/dist/client/assets/{layout-BvMp9WH9.js → layout-46QoqgX4.js} +1 -1
  130. package/dist/client/assets/{login-C4VBhHZf.js → login-BdT0h30g.js} +1 -1
  131. package/dist/client/assets/{mcp-oauth-CDqgI2Xn.js → mcp-oauth-DHDPNOkD.js} +1 -1
  132. package/dist/client/assets/{members-NXDCco5L.js → members-RcOcNeXi.js} +1 -1
  133. package/dist/client/assets/{monaco-editor-DYdw6m6P.js → monaco-editor-D2naC6ph.js} +1 -1
  134. package/dist/client/assets/{monitoring-stats-row-D0csDfCQ.js → monitoring-stats-row-CztePoJD.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-D-qdOpL-.js → oauth-callback-BSA-GLPM.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-ai-provider-CKZ-Ikk0.js → oauth-callback-ai-provider-DgPoj4r4.js} +1 -1
  137. package/dist/client/assets/{onboarding-0XZpcTRa.js → onboarding-Br3afGr-.js} +1 -1
  138. package/dist/client/assets/{org-install-BHAQ5v4F.js → org-install-C190-hBM.js} +1 -1
  139. package/dist/client/assets/{org-layout-x9tM7YJ0.js → org-layout-cPdojne_.js} +1 -1
  140. package/dist/client/assets/{organization-choice-CRDRv9IH.js → organization-choice-Csr-kPrj.js} +1 -1
  141. package/dist/client/assets/{orgs-B4dQ6uWB.js → orgs-WjQsKIGK.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-BoV5cy5K.js → page-seo-form-BocKaLGp.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-BTjq4xGR.js +1 -0
  144. package/dist/client/assets/{popover-DL95paTt.js → popover-BlN-L-7w.js} +1 -1
  145. package/dist/client/assets/post-editor-DD6k2jq_.js +1 -0
  146. package/dist/client/assets/{primitives-CnjPXZBb.js → primitives-C1zKVkUs.js} +1 -1
  147. package/dist/client/assets/{profile-CCbdBUdo.js → profile-B1TQAd_m.js} +1 -1
  148. package/dist/client/assets/project-app-view-DlsPCtAC.js +1 -0
  149. package/dist/client/assets/record-editor-CE1EwunZ.js +1 -0
  150. package/dist/client/assets/redirect-editor-OokObJNP.js +1 -0
  151. package/dist/client/assets/registry-OH_DROyn.js +2 -0
  152. package/dist/client/assets/{registry-layout-C2G4koz9.js → registry-layout-BjGbzV73.js} +2 -2
  153. package/dist/client/assets/reports-BWI6IDQq.css +1 -0
  154. package/dist/client/assets/reports-DEwGwzSI.js +43 -0
  155. package/dist/client/assets/{require-capability-Coot4cTo.js → require-capability-B_dSH45y.js} +1 -1
  156. package/dist/client/assets/{required-auth-layout-BLRuxjNn.js → required-auth-layout-czUUgGrX.js} +1 -1
  157. package/dist/client/assets/{reset-password-BHfCVVq_.js → reset-password-Md6XPqI1.js} +1 -1
  158. package/dist/client/assets/roles-jjnXT7oA.js +1 -0
  159. package/dist/client/assets/{search-input-B9lRxCGI.js → search-input-BQOeLOTi.js} +1 -1
  160. package/dist/client/assets/{secrets-C7tLxfHf.js → secrets-CWkoKQMY.js} +1 -1
  161. package/dist/client/assets/{sections-editor-CEVFpdKw.js → sections-editor-DJYtpXox.js} +2 -2
  162. package/dist/client/assets/{select-D59HzWyb.js → select-CxRcXiYy.js} +1 -1
  163. package/dist/client/assets/{select-model-D8LB7zlx.js → select-model-CJ1n8oWC.js} +1 -1
  164. package/dist/client/assets/self-tool-result-BCQjUWN7.js +1 -0
  165. package/dist/client/assets/seo-editor-DYp9hHSY.js +1 -0
  166. package/dist/client/assets/{settings-layout-LbxIWaT0.js → settings-layout-BXO3VMKS.js} +1 -1
  167. package/dist/client/assets/{settings-section-CHSsdIIo.js → settings-section-Bs1JjdR4.js} +1 -1
  168. package/dist/client/assets/{shell-controls-C3TSKK-x.js → shell-controls-BoSvKLlP.js} +1 -1
  169. package/dist/client/assets/{shell-layout-TAILJ-da.js → shell-layout-DamsdnEZ.js} +1 -1
  170. package/dist/client/assets/{sidebar-i7yNFNs9.js → sidebar-joQ3ZQPE.js} +1 -1
  171. package/dist/client/assets/{skeleton-D824Y8b-.js → skeleton-BxJ_vH4t.js} +1 -1
  172. package/dist/client/assets/{sso-BzsdnWCZ.js → sso-CoEL8qOV.js} +1 -1
  173. package/dist/client/assets/{store-BNZtOJXh.js → store-mvrTZUgb.js} +1 -1
  174. package/dist/client/assets/store-registry-C-81qMOw.js +2 -0
  175. package/dist/client/assets/{studio-tools--pllMpfK.js → studio-tools-BMyTPyPy.js} +1 -1
  176. package/dist/client/assets/{switch-DLw5svpB.js → switch-C6-Jkvpv.js} +1 -1
  177. package/dist/client/assets/{table-B8kPpHAC.js → table-BBmNComr.js} +1 -1
  178. package/dist/client/assets/{tabs-C19FaLXY.js → tabs-kApe5O6i.js} +1 -1
  179. package/dist/client/assets/{textarea-DGICe7Jx.js → textarea-C5puqxj1.js} +1 -1
  180. package/dist/client/assets/{toggle-group-SYBG9bZR.js → toggle-group-DScHdpkW.js} +1 -1
  181. package/dist/client/assets/{toolbar-icon-button-DapYdi-A.js → toolbar-icon-button-D3Y1-YHW.js} +1 -1
  182. package/dist/client/assets/{toolbar-V6M48IQV.js → toolbar-zpMjKMlc.js} +1 -1
  183. package/dist/client/assets/{tools-list-CvZ2H4zV.js → tools-list-BOMB05RR.js} +1 -1
  184. package/dist/client/assets/{tooltip-DjWNMg5T.js → tooltip-REPIyd2Z.js} +1 -1
  185. package/dist/client/assets/{use-ai-providers-CQmOOELp.js → use-ai-providers-Bo4wIQxq.js} +1 -1
  186. package/dist/client/assets/{use-automations-kY9mTa0N.js → use-automations-DA7j42Hg.js} +1 -1
  187. package/dist/client/assets/{use-autosave-DhXH8ptD.js → use-autosave-DBERSs2x.js} +1 -1
  188. package/dist/client/assets/{use-capability-BtQYj-6N.js → use-capability-CCJ-X1mC.js} +1 -1
  189. package/dist/client/assets/{use-clock-tick-BNpEZMto.js → use-clock-tick-MLdLuh40.js} +1 -1
  190. package/dist/client/assets/{use-collections-Kwxr6RPv.js → use-collections-D-OJag2e.js} +1 -1
  191. package/dist/client/assets/{use-connection-DhRKlWkl.js → use-connection-DmUK9JRy.js} +1 -1
  192. package/dist/client/assets/{use-copy-C62zVzDi.js → use-copy-DzWDd5On.js} +1 -1
  193. package/dist/client/assets/{use-create-virtual-mcp-B-2yNc1r.js → use-create-virtual-mcp-BqyRJeCT.js} +1 -1
  194. package/dist/client/assets/{use-debounced-autosave-Cumlh74L.js → use-debounced-autosave-JbhBBkyc.js} +1 -1
  195. package/dist/client/assets/{use-debounced-value-DEfVi-aN.js → use-debounced-value-DxBZ974h.js} +1 -1
  196. package/dist/client/assets/{use-deco-credits-rxapxW2c.js → use-deco-credits-DR4kDN3B.js} +1 -1
  197. package/dist/client/assets/{use-decopilot-events-Cww7ZCTK.js → use-decopilot-events-BhVWtKJy.js} +1 -1
  198. package/dist/client/assets/{use-delete-connection-DehUW7zF.js → use-delete-connection-Ds3puvR-.js} +1 -1
  199. package/dist/client/assets/{use-deployment-admin-DI6Yo_2O.js → use-deployment-admin-C5hKFITD.js} +1 -1
  200. package/dist/client/assets/{use-file-configs-BaRnwcsF.js → use-file-configs-t6weWLBN.js} +1 -1
  201. package/dist/client/assets/{use-infinite-scroll-WwPPe2Wp.js → use-infinite-scroll-B4v-_NDY.js} +1 -1
  202. package/dist/client/assets/{use-join-requests-B29gIAVf.js → use-join-requests-nORXzBkG.js} +1 -1
  203. package/dist/client/assets/{use-mcp-client-DlCO79GA.js → use-mcp-client-D6H50Mmm.js} +1 -1
  204. package/dist/client/assets/{use-mcp-tools-PUeX7iQD.js → use-mcp-tools-Cs2tX1fK.js} +1 -1
  205. package/dist/client/assets/{use-members-CP1GrgsV.js → use-members-Bz6iBsM4.js} +1 -1
  206. package/dist/client/assets/{use-mobile-vXwkCjTm.js → use-mobile-RU-Nn_Un.js} +1 -1
  207. package/dist/client/assets/{use-navigate-to-agent-DZwula5s.js → use-navigate-to-agent-DYPKcx_j.js} +1 -1
  208. package/dist/client/assets/{use-org-auth-client-BeUafwOm.js → use-org-auth-client-DrmuxI_m.js} +1 -1
  209. package/dist/client/assets/{use-org-sso-CpksLDM-.js → use-org-sso-BLc80T83.js} +1 -1
  210. package/dist/client/assets/{use-organization-roles-BGu4f7lA.js → use-organization-roles-DU1BIeXK.js} +1 -1
  211. package/dist/client/assets/use-organization-settings-CHx_I7VH.js +1 -0
  212. package/dist/client/assets/{use-registry-connections-ml5ez91l.js → use-registry-connections-C9dbuMZN.js} +1 -1
  213. package/dist/client/assets/{use-secrets-DXp4vVpG.js → use-secrets-Cs1UIn3n.js} +1 -1
  214. package/dist/client/assets/{use-status-sounds-DUjqcw9j.js → use-status-sounds-C3Efc5TW.js} +1 -1
  215. package/dist/client/assets/{use-view-mode-CJMBEHOJ.js → use-view-mode-y0S1o9OD.js} +1 -1
  216. package/dist/client/assets/{use-virtual-mcp-KZlYJNMn.js → use-virtual-mcp-D9inM-9h.js} +1 -1
  217. package/dist/client/assets/useInfiniteQuery-XeUdT1mI.js +1 -0
  218. package/dist/client/assets/{useRouterState-ClIV-prS.js → useRouterState-DB6AEQYy.js} +1 -1
  219. package/dist/client/assets/useSuspenseInfiniteQuery-DnwWEYgY.js +1 -0
  220. package/dist/client/assets/{users-CliPNaM4.js → users-DV3bsEcg.js} +1 -1
  221. package/dist/client/assets/variant-calendar-B7qy61Jb.js +1 -0
  222. package/dist/client/assets/{view-mode-toggle-BVGFEj0-.js → view-mode-toggle-BIom5MzH.js} +1 -1
  223. package/dist/client/index.html +2 -2
  224. package/dist/server/cli.js +1 -1
  225. package/dist/server/server.js +1 -1
  226. package/package.json +1 -1
  227. package/dist/client/assets/Eye-CyP9kYwn.js +0 -1
  228. package/dist/client/assets/TrendUp01-CBDxjtVg.js +0 -1
  229. package/dist/client/assets/agent-icon-DMtjBPX3.js +0 -1
  230. package/dist/client/assets/agents-list-BUXICXib.js +0 -1
  231. package/dist/client/assets/ai-providers-DCgzVaX6.js +0 -1
  232. package/dist/client/assets/app-editor-D59Q_5eI.js +0 -1
  233. package/dist/client/assets/automations-BaGIRfvu.js +0 -1
  234. package/dist/client/assets/bulk-category-panel-DYbnXnND.js +0 -1
  235. package/dist/client/assets/category-editor-DzbcKPof.js +0 -1
  236. package/dist/client/assets/collection-detail-DIz6zskG.js +0 -1
  237. package/dist/client/assets/commerce-onboarding-e-v-lCWx.js +0 -1
  238. package/dist/client/assets/connect-desktop-dialog-BSEnA0YE.js +0 -1
  239. package/dist/client/assets/connection-detail-B8oW9DNb.js +0 -1
  240. package/dist/client/assets/connections-DXcLr2b7.js +0 -1
  241. package/dist/client/assets/file-explorer-C3OUWmFe.js +0 -2
  242. package/dist/client/assets/index-BO2t38sV.css +0 -1
  243. package/dist/client/assets/index-ByObdePs.js +0 -1
  244. package/dist/client/assets/index-D-JmKBPU.js +0 -2
  245. package/dist/client/assets/page-seo-sheet-BgE0-fxQ.js +0 -1
  246. package/dist/client/assets/post-editor-Byy_Ap7S.js +0 -1
  247. package/dist/client/assets/project-app-view-3TNqVL2p.js +0 -1
  248. package/dist/client/assets/record-editor-TOFRK4bb.js +0 -1
  249. package/dist/client/assets/redirect-editor-luJZRzL9.js +0 -1
  250. package/dist/client/assets/registry-B_upSRSY.js +0 -2
  251. package/dist/client/assets/reports-CPxel0Tp.js +0 -43
  252. package/dist/client/assets/reports-UJeN0SPp.css +0 -1
  253. package/dist/client/assets/roles-Cbr82vAy.js +0 -1
  254. package/dist/client/assets/self-tool-result-BPaV8G2-.js +0 -1
  255. package/dist/client/assets/seo-editor-Dtca_H4G.js +0 -1
  256. package/dist/client/assets/store-registry-DzS8hV6Q.js +0 -2
  257. package/dist/client/assets/use-organization-settings-BFGZ9YuD.js +0 -1
  258. package/dist/client/assets/useInfiniteQuery-D-yVKxn2.js +0 -1
  259. package/dist/client/assets/useSuspenseInfiniteQuery-QFUkmQtZ.js +0 -1
  260. package/dist/client/assets/variant-calendar-DsUFadYs.js +0 -1
@@ -1 +1 @@
1
- import{c as d,l as i,j as n}from"./index-C5JCmVQ0.js";import{_ as m}from"./index-BOaCGG-5.js";import{e as k,a as N,h as j,D as w,d as y}from"./dialog-DfnhzCwv.js";import{i as b}from"./SearchMd-CKL74aOj.js";function C(a){const e=d.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=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);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]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(b,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.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=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.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=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.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=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.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=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.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=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
1
+ import{c as d,l as i,j as n}from"./index-lRedQ_8t.js";import{_ as m}from"./index-B3_jWN9S.js";import{e as k,a as N,h as j,D as w,d as y}from"./dialog-CUb_uQeJ.js";import{i as b}from"./SearchMd-CbytZ1-S.js";function C(a){const e=d.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=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);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]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(b,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.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=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.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=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.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=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.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=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.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=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
@@ -0,0 +1 @@
1
+ import{c as E,j as n,u as Ie,o as De,p as se,r as M,a as Se,b as Fe,q as qe,d as Te,s as Le,Q as He,E as Ve,K as _e,v as Ue,B as je,N as Be}from"./index-lRedQ_8t.js";import{L as Ke,s as ve,S as Pe,a as Ne,b as Ce,c as be,i as Qe,n as pe,C as we,p as xe}from"./self-tool-result-BCQjUWN7.js";import{A as We}from"./auth-entry-BBn3Oy3I.js";import{A as Ge}from"./auth-split-layout-ClDCjxcR.js";import{O as Re}from"./organization-choice-Csr-kPrj.js";import{I as Ye}from"./input-DOZlS9i9.js";import{u as Je}from"./use-mcp-client-D6H50Mmm.js";import{S as Xe,W as Ze,g as et,a as tt}from"./constants-D_FQAPnt.js";import{i as it}from"./XCircle-DHCvZwgH.js";import"./integration-icon-CN9OtiIm.js";import"./Tool02-DkTMVP4f.js";import"./agent-icon-5pSyq_FH.js";import"./AlertCircle-BaauQIwC.js";import"./UserPlus01-DoBolndD.js";import"./Tool01-BWGVYfev.js";import"./ArrowUp-C814v0pE.js";import"./Settings02-1LTNhTXj.js";import"./ArrowUpRight-BLP3DLju.js";import"./TrendUp01-C3q3M7MG.js";import"./ZapSquare-BhWmmFEB.js";import"./Users03-BYqJADve.js";import"./CheckCircle-D_t3rWUI.js";import"./Check-DYPRi7NO.js";import"./ChevronDown-wHLuFr3i.js";import"./ChevronRight-BARfL9-W.js";import"./ChevronUp-CRmxYAjE.js";import"./Circle-DuelqjM2.js";import"./Stars02-BzQc7fZz.js";import"./Copy01-BwtpNAKR.js";import"./ZoomOut-C7W-ZWAB.js";import"./DotsVertical-B_jKX962.js";import"./Globe01-B-4z45oj.js";import"./Eye-CM4SfxEo.js";import"./FilterLines-CwEBxGZP.js";import"./Flag01-RtD7xNTJ.js";import"./Star01-CtWX4nA3.js";import"./Globe04-D7ZgONc6.js";import"./SwitchHorizontal01-QNGjYcml.js";import"./HardDrive-DNueik1y.js";import"./Key01-DrwX5nx2.js";import"./LayoutLeft-CHLKhLgL.js";import"./LinkExternal01-022iaJNF.js";import"./List-jObuFUL_.js";import"./Monitor01-BkHN4rM2.js";import"./Sun-CyoL1WFK.js";import"./Package-DYdmCLl6.js";import"./Palette-BWa7ee-4.js";import"./Play-DYP9-OJo.js";import"./Plus-DKATXnIq.js";import"./SearchLg-crE3yQZJ.js";import"./SearchMd-CbytZ1-S.js";import"./Shield01-CULBCC4Z.js";import"./Stars01-COE1U6xi.js";import"./Trash01-iPP4w9gK.js";import"./Upload01-CoVAXfWg.js";import"./User01-2QspS0s6.js";import"./Users01-C3FOprDj.js";import"./XClose-P0NM9uUE.js";import"./X-Bqs01fCh.js";import"./Zap-CI5WhuKJ.js";import"./dialog-CUb_uQeJ.js";import"./tooltip-REPIyd2Z.js";import"./companions-core-CgTHLTTN.js";import"./extract-connection-data-BIadZZgr.js";import"./github-installations-ChFezl8I.js";import"./form-CEO5VtKG.js";import"./label-u5PrAFB7.js";import"./use-debounced-value-DxBZ974h.js";import"./authenticate-and-persist-oauth-DeTua2ma.js";import"./mcp-oauth-DHDPNOkD.js";import"./auth-Cf4In3Ce.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-BB1BJsL_.js";const nt={workspace:"Preparando seu workspace de commerce...",generic:"Preparando..."};function ot(l){return nt[l]}function ye(l){const e=E.c(4),{variant:i}=l;let t;e[0]!==i?(t=ot(i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:n.jsx(Ke,{label:t,className:"text-muted-foreground"})}),e[2]=t,e[3]=s):s=e[3],s}function wi(){const l=E.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(st,{}),l[0]=e):e=l[0],e}const Me=M.createContext(null),$e=()=>M.useContext(Me);function R(l){const e=E.c(13);let i,t;e[0]!==l?({visual:t,...i}=l,e[0]=l,e[1]=i,e[2]=t):(i=e[1],t=e[2]);let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/commerce-onboarding"},e[3]=s):s=e[3];const c=Ie(s),{data:a}=Se.useSession(),o=a?.user?.email;let m;e[4]!==c.siteUrl||e[5]!==o?(m=Ce({siteUrl:c.siteUrl,email:o}),e[4]=c.siteUrl,e[5]=o,e[6]=m):m=e[6];const d=m;let u;e[7]!==d||e[8]!==t?(u=t??n.jsx(be,{href:d}),e[7]=d,e[8]=t,e[9]=u):u=e[9];let v;return e[10]!==i||e[11]!==u?(v=n.jsx(Ge,{...i,visual:u}),e[10]=i,e[11]=u,e[12]=v):v=e[12],v}const rt={signUpFailed:"Falha ao criar conta",signInFailed:"Falha ao entrar",authenticationFailed:"Falha na autenticação",resetEmailFailed:"Não foi possível enviar o e-mail de redefinição",otpSendFailed:"Não foi possível enviar o código",invalidCode:"Código inválido",invalidEmail:"E-mail inválido",invalidEmailOrPassword:"E-mail ou senha inválidos. Tente novamente.",accountExists:"Já existe uma conta com este e-mail. Tente entrar em vez de criar uma nova conta.",networkError:"Erro de rede. Verifique sua conexão e tente novamente.",tooManyAttempts:"Muitas tentativas. Aguarde um momento e tente novamente.",invalidOrExpiredCode:"Código inválido ou expirado. Tente novamente.",genericError:"Algo deu errado. Tente novamente.",resetPasswordTitle:"Redefinir sua senha",verificationCodeTitle:"Informe o código de verificação",welcomeTitle:"Bem-vindo à deco",resetPasswordSubtitle:"Enviaremos um link de redefinição",codeSentTo:l=>`Código enviado para ${l}`,defaultSubtitle:"Entre ou crie uma nova conta",resetEmailSent:"Verifique seu e-mail para redefinir a senha.",continueWith:l=>`Continuar com ${l}`,divider:"ou",emailLabel:"E-mail",emailPlaceholder:"Endereço de e-mail",sending:"Enviando...",sendCode:"Enviar código",verificationCodeLabel:"Código de verificação",enterCodePlaceholder:"Informe o código",verifying:"Verificando...",verify:"Verificar",useDifferentEmail:"Usar outro e-mail",sendResetLink:"Enviar link de redefinição",nameLabel:"Nome",namePlaceholder:"Seu nome",passwordLabel:"Senha",forgotPassword:"Esqueceu a senha?",creatingAccount:"Criando conta...",signingIn:"Entrando...",continue:"Continuar",backToSignIn:"Voltar para entrar",signInWithPassword:"Entrar com senha",alreadyHaveAccount:"Já tem uma conta? ",dontHaveAccount:"Não tem uma conta? ",signIn:"Entrar",signUp:"Criar conta",signInWithEmailCode:"Entrar com código por e-mail"};function Oe(l){switch(l){case"Enter a website URL.":return"Informe a URL de um site.";case"Use an HTTP or HTTPS website URL.":return"Use uma URL de site HTTP ou HTTPS.";case"Enter a valid website URL.":return"Informe uma URL de site válida.";default:return l}}let ze=!1;function st(){const l=Ie({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=l,t=ve(i);return!ze&&De()&&(ze=!0,se("commerce_onboarding_viewed",{site_url:i,domain:t??void 0,...t?{$set:{last_scanned_domain:t}}:{}})),n.jsx(Me.Provider,{value:t,children:n.jsx(at,{requestedOrgSlug:e,siteUrl:i})})}function at(l){const e=E.c(8),{requestedOrgSlug:i,siteUrl:t}=l,{data:s,isPending:c}=Se.useSession(),a=$e();if(c){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(R,{children:n.jsx(ye,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!s){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==a?(d=a?n.jsx(Pe,{host:a}):void 0,e[1]=a,e[2]=d):d=e[2];let u;return e[3]!==d?(u=n.jsx(R,{children:n.jsx(We,{callbackUrl:m,allowAutoLogin:!1,title:"Desbloqueie seu diagnóstico completo",subtitle:null,brand:d,copy:rt})}),e[3]=d,e[4]=u):u=e[4],u}let o;return e[5]!==i||e[6]!==t?(o=n.jsx(lt,{requestedOrgSlug:i,siteUrl:t}),e[5]=i,e[6]=t,e[7]=o):o=e[7],o}function lt(l){const e=E.c(43),{requestedOrgSlug:i,siteUrl:t}=l,s=Fe(),c=qe(),[a,o]=M.useState(null),[m,d]=M.useState(null),u=c.data?.map(mt)??[];let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={mutationFn:ct,retry:!1,onSuccess:r=>{d(r)}},e[0]=v):v=e[0];const p=Te(v);if(c.isPending){let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(R,{children:n.jsx(ye,{variant:"workspace"})}),e[1]=r):r=e[1],r}if(c.error){let r;return e[2]!==c?(r=n.jsx(ae,{title:"Não foi possível carregar suas organizações",description:"Tente novamente para continuar a configuração de commerce nesta página.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[2]=c,e[3]=r):r=e[3],r}const j=i?u.find(r=>r.slug===i):null;if(j){let r;return e[4]!==j||e[5]!==t?(r=n.jsx(re,{org:j,initialSiteUrl:t}),e[4]=j,e[5]=t,e[6]=r):r=e[6],r}if(i){let r;return e[7]!==c?(r=n.jsx(ae,{title:"Organização não encontrada",description:"Não conseguimos encontrar essa organização na sua conta.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[7]=c,e[8]=r):r=e[8],r}if(a){let r;return e[9]!==a||e[10]!==t?(r=n.jsx(re,{org:a,initialSiteUrl:t}),e[9]=a,e[10]=t,e[11]=r):r=e[11],r}if(u.length===1&&u[0]){let r;return e[12]!==u[0]||e[13]!==t?(r=n.jsx(re,{org:u[0],initialSiteUrl:t}),e[12]=u[0],e[13]=t,e[14]=r):r=e[14],r}if(u.length>1){let r;e[15]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(k,{title:"Escolha uma organização",description:"Selecione onde o diagnóstico de commerce deve continuar."}),e[15]=r):r=e[15];let h;e[16]!==s||e[17]!==t?(h=O=>s({to:"/commerce-onboarding",search:{org:O.slug,siteUrl:t}}),e[16]=s,e[17]=t,e[18]=h):h=e[18];let C;return e[19]!==u||e[20]!==h?(C=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[r,n.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:n.jsx(Re,{organizations:u,selectLabel:"Continuar",onSelected:h})})]})}),e[19]=u,e[20]=h,e[21]=C):C=e[21],C}if(!m){let r;e[22]!==p?(r=()=>{p.reset(),p.mutate()},e[22]=p,e[23]=r):r=e[23];let h;return e[24]!==p||e[25]!==r?(h=n.jsx(dt,{mutation:p,onRetry:r}),e[24]=p,e[25]=r,e[26]=h):h=e[26],h}const g=m;if(g?.success&&(g.status==="created"||g.status==="joined"||g.status==="already_has_organization")&&g.organization){let r;return e[27]!==g.organization||e[28]!==t?(r=n.jsx(re,{org:g.organization,initialSiteUrl:t}),e[27]=g.organization,e[28]=t,e[29]=r):r=e[29],r}if(g?.status==="ambiguous"&&g.organizations&&g.organizations.length>0){let r;e[30]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(k,{title:"Escolha uma organização",description:"Seu e-mail pode acessar mais de uma organização. Escolha onde a configuração de commerce deve continuar."}),e[30]=r):r=e[30];const h=g.domain??void 0;let C;e[31]!==s||e[32]!==t?(C=($,P)=>{Le(),o({...$,slug:P}),s({to:"/commerce-onboarding",search:{org:P,siteUrl:t}})},e[31]=s,e[32]=t,e[33]=C):C=e[33];let O;return e[34]!==g.organizations||e[35]!==h||e[36]!==C?(O=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[r,n.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:n.jsx(Re,{organizations:g.organizations,domain:h,onJoined:C})})]})}),e[34]=g.organizations,e[35]=h,e[36]=C,e[37]=O):O=e[37],O}const S=g?.error??"Não conseguimos determinar uma organização de commerce para esta conta.";let _;e[38]!==p?(_=()=>{d(null),p.reset()},e[38]=p,e[39]=_):_=e[39];let I;return e[40]!==S||e[41]!==_?(I=n.jsx(ae,{title:"O onboarding de commerce precisa de suporte",description:S,actionLabel:"Tentar novamente",onRetry:_}),e[40]=S,e[41]=_,e[42]=I):I=e[42],I}async function ct(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Le(),e}function mt(l){return{id:l.id,name:l.name,slug:l.slug,logo:l.logo??null}}function dt(l){const e=E.c(7),{mutation:i,onRetry:t}=l,s=M.useRef(!1);let c;e[0]!==i?(c=d=>{!d||s.current||(s.current=!0,i.mutate())},e[0]=i,e[1]=c):c=e[1];const a=c;if(i.error){let d;return e[2]!==t?(d=n.jsx(ae,{title:"Onboarding de commerce indisponível",description:"Não foi possível preparar uma organização para a configuração de commerce. Tente novamente por esta página ou fale com o suporte.",actionLabel:"Tentar novamente",onRetry:t}),e[2]=t,e[3]=d):d=e[3],d}let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ye,{variant:"generic"}),e[4]=o):o=e[4];let m;return e[5]!==a?(m=n.jsx(R,{children:n.jsx("div",{ref:a,children:o})}),e[5]=a,e[6]=m):m=e[6],m}function k(l){const e=E.c(8),{title:i,description:t}=l,s=$e();let c;e[0]!==s?(c=s?n.jsx(Pe,{host:s}):n.jsxs("div",{children:[n.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),n.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=s,e[1]=c):c=e[1];let a;e[2]!==t||e[3]!==i?(a=(i||t)&&n.jsxs("div",{className:"space-y-2",children:[i&&n.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),t&&n.jsx("p",{className:"text-base text-muted-foreground leading-6",children:t})]}),e[2]=t,e[3]=i,e[4]=a):a=e[4];let o;return e[5]!==c||e[6]!==a?(o=n.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=o):o=e[7],o}function ae(l){const e=E.c(9),{title:i,description:t,actionLabel:s,onRetry:c}=l;let a;e[0]!==t||e[1]!==i?(a=n.jsx(k,{title:i,description:t}),e[0]=t,e[1]=i,e[2]=a):a=e[2];let o;e[3]!==s||e[4]!==c?(o=n.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:c,children:s}),e[3]=s,e[4]=c,e[5]=o):o=e[5];let m;return e[6]!==a||e[7]!==o?(m=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[a,o]})}),e[6]=a,e[7]=o,e[8]=m):m=e[8],m}function re(l){const e=E.c(11),{org:i,initialSiteUrl:t}=l,{data:s}=Se.useSession(),c=s?.user?.email;let a;e[0]!==t||e[1]!==c?(a=Ce({siteUrl:t,email:c}),e[0]=t,e[1]=c,e[2]=a):a=e[2];const o=a;let m;e[3]!==o||e[4]!==i.id?(m=n.jsx(be,{href:o,orgId:i.id}),e[3]=o,e[4]=i.id,e[5]=m):m=e[5];const d=m;let u;return e[6]!==t||e[7]!==d||e[8]!==i||e[9]!==s?.user?.email?(u=n.jsx(He,{children:v=>{const{reset:p}=v;return n.jsx(Ve,{fallback:j=>{const{error:g,resetError:S}=j;return n.jsx(R,{visual:d,children:n.jsx(ut,{orgName:i.name,message:g instanceof Error?g.message:"Não foi possível verificar a configuração do Commerce Discovery.",onRetry:()=>{p(),S()}})})},children:n.jsx(M.Suspense,{fallback:n.jsx(ke,{visual:d}),children:n.jsx(ft,{org:i,initialSiteUrl:t,sessionEmail:s?.user?.email},`${i.id}:${t??""}`)})})}}),e[6]=t,e[7]=d,e[8]=i,e[9]=s?.user?.email,e[10]=u):u=e[10],u}function ke(l){const e=E.c(3),{visual:i}=l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[n.jsx(k,{}),n.jsx(we,{})]}),e[0]=t):t=e[0];let s;return e[1]!==i?(s=n.jsx(R,{align:"fill",visual:i,children:t}),e[1]=i,e[2]=s):s=e[2],s}function ut(l){const e=E.c(10),{orgName:i,message:t,onRetry:s}=l,c=`A configuração de commerce continuará em ${i}.`;let a;e[0]!==c?(a=n.jsx(k,{title:"Diagnóstico de commerce",description:c}),e[0]=c,e[1]=a):a=e[1];let o;e[2]!==t?(o=n.jsx(le,{message:t}),e[2]=t,e[3]=o):o=e[3];let m;e[4]!==s?(m=n.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:s,children:"Tentar novamente"}),e[4]=s,e[5]=m):m=e[5];let d;return e[6]!==a||e[7]!==o||e[8]!==m?(d=n.jsxs("div",{className:"grid gap-10",children:[a,o,m]}),e[6]=a,e[7]=o,e[8]=m,e[9]=d):d=e[9],d}function ft(l){const e=E.c(109),{org:i,initialSiteUrl:t,sessionEmail:s}=l;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:Xe,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=Je(c),[o,m]=M.useState(t??""),[d,u]=M.useState(null),v=M.useRef(!1),p=Ze.COMMERCE_DISCOVERY(i.id),j=et(i.id),g=_e.commerceDiscoveryConnection(i.id,p);let S;e[3]!==p||e[4]!==a?(S=async()=>{const f=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:p}});return xe(f)},e[3]=p,e[4]=a,e[5]=S):S=e[5];let _;e[6]!==g||e[7]!==S?(_={queryKey:g,queryFn:S,retry:!1},e[6]=g,e[7]=S,e[8]=_):_=e[8];const I=Ue(_),r=_e.commerceDiscoveryVirtualMcp(i.id,j);let h;e[9]!==a||e[10]!==j?(h=async()=>{const f=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:j}});return xe(f)},e[9]=a,e[10]=j,e[11]=h):h=e[11];let C;e[12]!==r||e[13]!==h?(C={queryKey:r,queryFn:h,retry:!1},e[12]=r,e[13]=h,e[14]=C):C=e[14];const O=Ue(C);let $;e[15]!==a?($=async f=>{const x=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:f}});return xe(x)},e[15]=a,e[16]=$):$=e[16];let P;e[17]!==I||e[18]!==i.id||e[19]!==O?(P=(f,x)=>{se("commerce_onboarding_setup_succeeded",{domain:ve(x)??void 0,organization_id:i.id}),u(null),I.refetch(),O.refetch()},e[17]=I,e[18]=i.id,e[19]=O,e[20]=P):P=e[20];let A;e[21]!==i.id?(A=(f,x)=>{se("commerce_onboarding_setup_failed",{domain:ve(x)??void 0,organization_id:i.id,error:f instanceof Error?f.message:String(f)}),u(f instanceof Error?f.message:"A configuração do Commerce Discovery falhou.")},e[21]=i.id,e[22]=A):A=e[22];let Q;e[23]!==A||e[24]!==$||e[25]!==P?(Q={mutationFn:$,retry:!1,onSuccess:P,onError:A},e[23]=A,e[24]=$,e[25]=P,e[26]=Q):Q=e[26];const b=Te(Q),Ae=!!I.data.item&&!!O.data.item,Ee=I.data.item,W=typeof Ee?.metadata?.siteUrl=="string"?Ee.metadata.siteUrl:void 0,ce=t||o||"";let G;e[27]!==W||e[28]!==ce?(G=Qe(ce,W),e[27]=W,e[28]=ce,e[29]=G):G=e[29];const Y=Ae&&G,J=t||o||W||"";let X;e[30]!==J||e[31]!==s?(X=Ce({siteUrl:J,email:s}),e[30]=J,e[31]=s,e[32]=X):X=e[32];const me=X;let Z;e[33]!==me||e[34]!==i.id?(Z=n.jsx(be,{href:me,orgId:i.id}),e[33]=me,e[34]=i.id,e[35]=Z):Z=e[35];const y=Z;let ee;e[36]!==b?(ee=f=>{const x=pe(f);if(!x.ok){u(Oe(x.error));return}u(null),b.mutate(x.value)},e[36]=b,e[37]=ee):ee=e[37];const D=ee;let te;e[38]!==t||e[39]!==D||e[40]!==Y?(te=f=>{!f||v.current||Y||!t||(v.current=!0,D(t))},e[38]=t,e[39]=D,e[40]=Y,e[41]=te):te=e[41];const de=te;let ie;e[42]!==i.id||e[43]!==D||e[44]!==o?(ie=f=>{f.preventDefault();const x=pe(o);x.ok&&se("commerce_onboarding_site_url_submitted",{domain:new URL(x.value).hostname,organization_id:i.id}),D(o)},e[42]=i.id,e[43]=D,e[44]=o,e[45]=ie):ie=e[45];const z=ie;if(Y){const f=i.slug;let x;e[46]===Symbol.for("react.memo_cache_sentinel")?(x=crypto.randomUUID(),e[46]=x):x=e[46];let T;e[47]!==i.slug?(T={org:f,taskId:x},e[47]=i.slug,e[48]=T):T=e[48];let U;e[49]!==i.id?(U=tt(i.id),e[49]=i.id,e[50]=U):U=e[50];const L=J||void 0;let N;e[51]!==U.id||e[52]!==L?(N={virtualmcpid:U.id,connect:"1",siteUrl:L},e[51]=U.id,e[52]=L,e[53]=N):N=e[53];let w;return e[54]!==T||e[55]!==N?(w=n.jsx(Be,{to:"/$org/$taskId",params:T,search:N,replace:!0}),e[54]=T,e[55]=N,e[56]=w):w=e[56],w}if(b.isPending){let f;return e[57]!==y?(f=n.jsx(ke,{visual:y}),e[57]=y,e[58]=f):f=e[58],f}if(t){let f,x;if(e[59]!==y||e[60]!==z||e[61]!==t||e[62]!==d||e[63]!==i.name||e[64]!==b.isPending||e[65]!==o){x=Symbol.for("react.early_return_sentinel");e:if(f=pe(t),!f.ok){const fe=`A configuração de commerce continuará em ${i.name}.`;let V;e[68]!==fe?(V=n.jsx(k,{title:"Diagnóstico de commerce",description:fe}),e[68]=fe,e[69]=V):V=e[69];const ge=n.jsx(le,{message:Oe(f.error)});let B;e[70]!==z||e[71]!==d||e[72]!==b.isPending||e[73]!==o?(B=n.jsx(he,{siteUrl:o,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[70]=z,e[71]=d,e[72]=b.isPending,e[73]=o,e[74]=B):B=e[74];let K;e[75]!==V||e[76]!==ge||e[77]!==B?(K=n.jsxs("div",{className:"grid gap-10",children:[V,ge,B]}),e[75]=V,e[76]=ge,e[77]=B,e[78]=K):K=e[78];let oe;e[79]!==y||e[80]!==K?(oe=n.jsx(R,{visual:y,children:K}),e[79]=y,e[80]=K,e[81]=oe):oe=e[81],x=oe;break e}e[59]=y,e[60]=z,e[61]=t,e[62]=d,e[63]=i.name,e[64]=b.isPending,e[65]=o,e[66]=f,e[67]=x}else f=e[66],x=e[67];if(x!==Symbol.for("react.early_return_sentinel"))return x;const T=`O Commerce Discovery está sendo preparado para ${f.value}.`;let U;e[82]!==T?(U=n.jsx(k,{title:"Diagnóstico de commerce",description:T}),e[82]=T,e[83]=U):U=e[83];let L;e[84]!==z||e[85]!==d||e[86]!==b.isPending||e[87]!==o?(L=d?n.jsxs(n.Fragment,{children:[n.jsx(le,{message:d}),n.jsx(he,{siteUrl:o,error:null,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z})]}):n.jsx(we,{}),e[84]=z,e[85]=d,e[86]=b.isPending,e[87]=o,e[88]=L):L=e[88];let N;e[89]!==U||e[90]!==L||e[91]!==de?(N=n.jsxs("div",{ref:de,className:"grid gap-10",children:[U,L]}),e[89]=U,e[90]=L,e[91]=de,e[92]=N):N=e[92];let w;return e[93]!==y||e[94]!==N?(w=n.jsx(R,{visual:y,children:N}),e[93]=y,e[94]=N,e[95]=w):w=e[95],w}const ue=`A configuração de commerce continuará em ${i.name}.`;let F;e[96]!==ue?(F=n.jsx(k,{title:"Diagnóstico de commerce",description:ue}),e[96]=ue,e[97]=F):F=e[97];let q;e[98]!==z||e[99]!==d||e[100]!==b.isPending||e[101]!==o?(q=n.jsx(he,{siteUrl:o,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[98]=z,e[99]=d,e[100]=b.isPending,e[101]=o,e[102]=q):q=e[102];let H;e[103]!==F||e[104]!==q?(H=n.jsxs("div",{className:"grid gap-10",children:[F,q]}),e[103]=F,e[104]=q,e[105]=H):H=e[105];let ne;return e[106]!==y||e[107]!==H?(ne=n.jsx(R,{visual:y,children:H}),e[106]=y,e[107]=H,e[108]=ne):ne=e[108],ne}function he(l){const e=E.c(20),{siteUrl:i,error:t,isSubmitting:s,onSiteUrlChange:c,onSubmit:a}=l;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"URL do site"}),e[0]=o):o=e[0];let m;e[1]!==c?(m=_=>c(_.target.value),e[1]=c,e[2]=m):m=e[2];const d=!!t;let u;e[3]!==s||e[4]!==i||e[5]!==m||e[6]!==d?(u=n.jsx(Ye,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:m,placeholder:"https://example.com","aria-invalid":d,disabled:s}),e[3]=s,e[4]=i,e[5]=m,e[6]=d,e[7]=u):u=e[7];let v;e[8]!==t?(v=t?n.jsx(le,{message:t}):null,e[8]=t,e[9]=v):v=e[9];let p;e[10]!==u||e[11]!==v?(p=n.jsxs("div",{className:"grid gap-2",children:[o,u,v]}),e[10]=u,e[11]=v,e[12]=p):p=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(it,{size:16}),e[13]=j):j=e[13];let g;e[14]!==s?(g=n.jsxs(je,{type:"submit",size:"xl",className:"w-full",disabled:s,children:["Continuar",j]}),e[14]=s,e[15]=g):g=e[15];let S;return e[16]!==a||e[17]!==p||e[18]!==g?(S=n.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[p,g]}),e[16]=a,e[17]=p,e[18]=g,e[19]=S):S=e[19],S}function le(l){const e=E.c(2),{message:i}=l;let t;return e[0]!==i?(t=n.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=t):t=e[1],t}export{wi as default};
@@ -1 +1 @@
1
- import{b as m}from"./extract-connection-data-DkYKg47U.js";import{a as g}from"./github-installations-ChFezl8I.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
1
+ import{b as m}from"./extract-connection-data-BIadZZgr.js";import{a as g}from"./github-installations-ChFezl8I.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
@@ -0,0 +1 @@
1
+ import{c as C,j as t,r as y,B as M,l as j}from"./index-lRedQ_8t.js";import{a as D,h as S,D as I,d as R,e as T}from"./dialog-CUb_uQeJ.js";import{u as _,S as A}from"./chat-context-De0V13yX.js";import{i as B}from"./Check-DYPRi7NO.js";import{a as E}from"./Copy01-BwtpNAKR.js";function N(n){const e=C.c(3),{size:l}=n,o=l===void 0?16:l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=i):i=e[0];let s;return e[1]!==o?(s=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i}),e[1]=o,e[2]=s):s=e[2],s}function w(n){const e=C.c(3),{size:l}=n,o=l===void 0?16:l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=i):i=e[0];let s;return e[1]!==o?(s=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:i}),e[1]=o,e[2]=s):s=e[2],s}const $={"claude-code":{label:"Claude Code",Icon:N},codex:{label:"Codex",Icon:w}};function Y(n){return(n&&$[n])??null}const L="bunx decocms@latest link",k=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:t.jsx(N,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:t.jsx(w,{size:18})}];function q(n){return k.filter(e=>n.includes(e.capability)).map(e=>e.label)}function F(n){const e=C.c(23),{open:l,onOpenChange:o}=n;let i;e[0]!==l?(i={fast:l},e[0]=l,e[1]=i):i=e[1];const s=_(i),[h,v]=y.useState(!1),z=s.hostname??s.machineId??"Your desktop",g=s.online?`Connected to ${z}`:"Connect your desktop";let a;e[2]!==g?(a=t.jsx(D,{children:g}),e[2]=g,e[3]=a):a=e[3];const b=s.online?"This machine provides the following local agents.":"Run this command in your desktop terminal. The dialog will close once your desktop is online.";let c;e[4]!==b?(c=t.jsx(S,{children:b}),e[4]=b,e[5]=c):c=e[5];let r;e[6]!==a||e[7]!==c?(r=t.jsxs(I,{children:[a,c]}),e[6]=a,e[7]=c,e[8]=r):r=e[8];let d;e[9]!==h||e[10]!==s.online?(d=!s.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:L}),t.jsx(M,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(L),v(!0),setTimeout(()=>v(!1),1500)},children:h?t.jsx(B,{size:14}):t.jsx(E,{size:14})})]}),e[9]=h,e[10]=s.online,e[11]=d):d=e[11];let m;e[12]!==s.capabilities||e[13]!==s.online?(m=s.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:k.map(x=>{const f=s.capabilities.includes(x.capability);return t.jsxs("div",{className:j("flex items-center gap-3 rounded-md border px-3 py-2",f?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:j("flex size-6 items-center justify-center",f?"text-foreground":"text-muted-foreground"),children:x.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:x.label}),t.jsx("p",{className:"text-xs text-muted-foreground",children:f?x.description:"Not detected"})]}),t.jsx("span",{className:j("size-2 rounded-full",f?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(A,{size:"sm"}),"Waiting for desktop…"]}),e[12]=s.capabilities,e[13]=s.online,e[14]=m):m=e[14];let u;e[15]!==r||e[16]!==d||e[17]!==m?(u=t.jsxs(R,{className:"sm:max-w-md",children:[r,d,m]}),e[15]=r,e[16]=d,e[17]=m,e[18]=u):u=e[18];let p;return e[19]!==o||e[20]!==l||e[21]!==u?(p=t.jsx(T,{open:l,onOpenChange:o,children:u}),e[19]=o,e[20]=l,e[21]=u,e[22]=p):p=e[22],p}export{F as C,N as a,w as b,Y as l,q as v};
@@ -1 +1 @@
1
- import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,C as $,aY as k,K as D,l as E,j as x}from"./index-C5JCmVQ0.js";import{u as K}from"./use-registry-connections-ml5ez91l.js";import{d as Q}from"./use-organization-settings-BFGZ9YuD.js";import{S as w}from"./constants-D_FQAPnt.js";import{u as F}from"./useInfiniteQuery-D-yVKxn2.js";import{c as H}from"./use-mcp-client-DlCO79GA.js";import{i as Y,f as q}from"./extract-connection-data-DkYKg47U.js";import{C as G}from"./card-1ZIM8JYb.js";import{I as U}from"./integration-icon-D74EpYgv.js";function ae(s){const e=new Map;for(const o of s){const c=_(o),r=e.get(c);r?r.push(o):e.set(c,[o])}const t=[],l=new Set;for(const o of s){const c=_(o);if(l.has(c))continue;l.add(c);const r=e.get(c),m=r[0];r.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:c,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:r})}return t}function ue(){const s=R.c(6),e=K(),t=Q(),l=$().project.enabledPlugins??[];let o;if(s[0]!==l||s[1]!==t||s[2]!==e){let c;s[4]!==t?(c=r=>t(r.id),s[4]=t,s[5]=c):c=s[5],o=e.filter(c).map(V),l.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=l,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function V(s){return{id:s.id,title:s.title,icon:s.icon}}const X=24,S=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(l=>t.map(o=>({field:o,operator:"contains",value:l})))}}function T(s,e,t,l,o){const c=s.map(u=>u.id).sort().join(","),r=z(o),{data:m,fetchNextPage:d,hasNextPage:f,isFetchingNextPage:p,isLoading:P}=F({queryKey:D.storeDiscovery(e,`${c}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const y=n[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=Y(i.id,e);let h;for(let I=0;I<S;I++){let N=null;try{N=await H({connectionId:i.id,orgId:e,orgSlug:t});const v={limit:X};y&&(v.cursor=y),r&&(v.where=r);const b=await N.callTool({name:j,arguments:v}),C=b.structuredContent??b,M=C.nextCursor||C.cursor||void 0,L=q(C?[C]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:L,nextCursor:M}}catch(v){h=v}finally{await N?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${S} attempts:`,h),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let a=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,a=!0):n[i.registryId]="EXHAUSTED");return a?n:void 0},staleTime:3600*1e3,placeholderData:k,retry:!1,enabled:s.length>0}),g=[];if(m?.pages)for(const u of m.pages)for(const n of u)for(const a of n.items)g.push({...a,_sourceName:a._sourceName??n.registryTitle,_sourceIcon:a._sourceIcon??n.registryIcon,_registryId:a._registryId??n.registryId});return{items:g,hasMore:f??!1,isLoadingMore:p,isInitialLoading:P,fetchNextPage:()=>{f&&!p&&d()}}}function fe(s,e){const t=R.c(16),{org:l}=$();let o;t[0]!==s?(o=s.filter(W),t[0]=s,t[1]=o):o=t[1];const c=o;let r;t[2]!==s?(r=s.filter(B),t[2]=s,t[3]=r):r=t[3];const m=r,d=T(c,l.id,l.slug,!0,e),f=T(m,l.id,l.slug,!0,e);let p;if(t[4]!==f.items||t[5]!==d.items){const y=new Set;p=[];const j=[...d.items,...f.items];for(const h of j){const I=`${h._registryId}:${h.id}`;y.has(I)||(y.add(I),p.push(h))}t[4]=f.items,t[5]=d.items,t[6]=p}else p=t[6];const P=d.isInitialLoading||f.isInitialLoading,g=d.isLoadingMore||f.isLoadingMore,u=d.hasMore||f.hasMore;let n;t[7]!==f||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),f.hasMore&&f.fetchNextPage()},t[7]=f,t[8]=d,t[9]=n):n=t[9];const a=n;let i;return t[10]!==u||t[11]!==P||t[12]!==g||t[13]!==p||t[14]!==a?(i={items:p,hasMore:u,isLoadingMore:g,isInitialLoading:P,loadMore:a},t[10]=u,t[11]=P,t[12]=g,t[13]=p,t[14]=a,t[15]=i):i=t[15],i}function B(s){return A(s)}function W(s){return!A(s)}function de(s){const e=R.c(37),{connection:t,onClick:l,headerActions:o,headerActionsAlwaysVisible:c,body:r,footer:m,className:d,fallbackIcon:f}=s,p=c===void 0?!1:c,P=l&&"hover:bg-muted/50";let g;e[0]!==d||e[1]!==P?(g=E("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",P,d),e[0]=d,e[1]=P,e[2]=g):g=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==f?(u=x.jsx(U,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=t.icon,e[4]=t.title,e[5]=f,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==p?(n=o&&x.jsx("div",{className:E("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:J,children:o}),e[7]=o,e[8]=p,e[9]=n):n=e[9];let a;e[10]!==n?(a=x.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=a):a=e[11];let i;e[12]!==u||e[13]!==a?(i=x.jsxs("div",{className:"flex items-start justify-between",children:[u,a]}),e[12]=u,e[13]=a,e[14]=i):i=e[14];let y;e[15]!==t.title?(y=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=y):y=e[16];const j=t.description||"No description";let h;e[17]!==j?(h=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=h):h=e[18];let I;e[19]!==h||e[20]!==y?(I=x.jsxs("div",{className:"flex flex-col gap-1",children:[y,h]}),e[19]=h,e[20]=y,e[21]=I):I=e[21];let N;e[22]!==r?(N=r&&x.jsx("div",{children:r}),e[22]=r,e[23]=N):N=e[23];let v;e[24]!==I||e[25]!==N||e[26]!==i?(v=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,I,N]}),e[24]=I,e[25]=N,e[26]=i,e[27]=v):v=e[27];let b;e[28]!==m?(b=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:Z,children:m})}),e[28]=m,e[29]=b):b=e[29];let C;e[30]!==v||e[31]!==b?(C=x.jsxs("div",{className:"flex flex-col flex-1",children:[v,b]}),e[30]=v,e[31]=b,e[32]=C):C=e[32];let M;return e[33]!==l||e[34]!==C||e[35]!==g?(M=x.jsx(G,{className:g,onClick:l,children:C}),e[33]=l,e[34]=C,e[35]=g,e[36]=M):M=e[36],M}function Z(s){return s.stopPropagation()}function J(s){return s.stopPropagation()}export{de as C,fe as a,ae as g,ue as u};
1
+ import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,C as $,aY as k,K as D,l as E,j as x}from"./index-lRedQ_8t.js";import{u as K}from"./use-registry-connections-C9dbuMZN.js";import{d as Q}from"./use-organization-settings-CHx_I7VH.js";import{S as w}from"./constants-D_FQAPnt.js";import{u as F}from"./useInfiniteQuery-XeUdT1mI.js";import{c as H}from"./use-mcp-client-D6H50Mmm.js";import{i as Y,f as q}from"./extract-connection-data-BIadZZgr.js";import{C as G}from"./card-BjD2_XuX.js";import{I as U}from"./integration-icon-CN9OtiIm.js";function ae(s){const e=new Map;for(const o of s){const c=_(o),r=e.get(c);r?r.push(o):e.set(c,[o])}const t=[],l=new Set;for(const o of s){const c=_(o);if(l.has(c))continue;l.add(c);const r=e.get(c),m=r[0];r.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:c,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:r})}return t}function ue(){const s=R.c(6),e=K(),t=Q(),l=$().project.enabledPlugins??[];let o;if(s[0]!==l||s[1]!==t||s[2]!==e){let c;s[4]!==t?(c=r=>t(r.id),s[4]=t,s[5]=c):c=s[5],o=e.filter(c).map(V),l.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=l,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function V(s){return{id:s.id,title:s.title,icon:s.icon}}const X=24,S=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(l=>t.map(o=>({field:o,operator:"contains",value:l})))}}function T(s,e,t,l,o){const c=s.map(u=>u.id).sort().join(","),r=z(o),{data:m,fetchNextPage:d,hasNextPage:f,isFetchingNextPage:p,isLoading:P}=F({queryKey:D.storeDiscovery(e,`${c}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const y=n[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=Y(i.id,e);let h;for(let I=0;I<S;I++){let N=null;try{N=await H({connectionId:i.id,orgId:e,orgSlug:t});const v={limit:X};y&&(v.cursor=y),r&&(v.where=r);const b=await N.callTool({name:j,arguments:v}),C=b.structuredContent??b,M=C.nextCursor||C.cursor||void 0,L=q(C?[C]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:L,nextCursor:M}}catch(v){h=v}finally{await N?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${S} attempts:`,h),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let a=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,a=!0):n[i.registryId]="EXHAUSTED");return a?n:void 0},staleTime:3600*1e3,placeholderData:k,retry:!1,enabled:s.length>0}),g=[];if(m?.pages)for(const u of m.pages)for(const n of u)for(const a of n.items)g.push({...a,_sourceName:a._sourceName??n.registryTitle,_sourceIcon:a._sourceIcon??n.registryIcon,_registryId:a._registryId??n.registryId});return{items:g,hasMore:f??!1,isLoadingMore:p,isInitialLoading:P,fetchNextPage:()=>{f&&!p&&d()}}}function fe(s,e){const t=R.c(16),{org:l}=$();let o;t[0]!==s?(o=s.filter(W),t[0]=s,t[1]=o):o=t[1];const c=o;let r;t[2]!==s?(r=s.filter(B),t[2]=s,t[3]=r):r=t[3];const m=r,d=T(c,l.id,l.slug,!0,e),f=T(m,l.id,l.slug,!0,e);let p;if(t[4]!==f.items||t[5]!==d.items){const y=new Set;p=[];const j=[...d.items,...f.items];for(const h of j){const I=`${h._registryId}:${h.id}`;y.has(I)||(y.add(I),p.push(h))}t[4]=f.items,t[5]=d.items,t[6]=p}else p=t[6];const P=d.isInitialLoading||f.isInitialLoading,g=d.isLoadingMore||f.isLoadingMore,u=d.hasMore||f.hasMore;let n;t[7]!==f||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),f.hasMore&&f.fetchNextPage()},t[7]=f,t[8]=d,t[9]=n):n=t[9];const a=n;let i;return t[10]!==u||t[11]!==P||t[12]!==g||t[13]!==p||t[14]!==a?(i={items:p,hasMore:u,isLoadingMore:g,isInitialLoading:P,loadMore:a},t[10]=u,t[11]=P,t[12]=g,t[13]=p,t[14]=a,t[15]=i):i=t[15],i}function B(s){return A(s)}function W(s){return!A(s)}function de(s){const e=R.c(37),{connection:t,onClick:l,headerActions:o,headerActionsAlwaysVisible:c,body:r,footer:m,className:d,fallbackIcon:f}=s,p=c===void 0?!1:c,P=l&&"hover:bg-muted/50";let g;e[0]!==d||e[1]!==P?(g=E("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",P,d),e[0]=d,e[1]=P,e[2]=g):g=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==f?(u=x.jsx(U,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=t.icon,e[4]=t.title,e[5]=f,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==p?(n=o&&x.jsx("div",{className:E("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:J,children:o}),e[7]=o,e[8]=p,e[9]=n):n=e[9];let a;e[10]!==n?(a=x.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=a):a=e[11];let i;e[12]!==u||e[13]!==a?(i=x.jsxs("div",{className:"flex items-start justify-between",children:[u,a]}),e[12]=u,e[13]=a,e[14]=i):i=e[14];let y;e[15]!==t.title?(y=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=y):y=e[16];const j=t.description||"No description";let h;e[17]!==j?(h=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=h):h=e[18];let I;e[19]!==h||e[20]!==y?(I=x.jsxs("div",{className:"flex flex-col gap-1",children:[y,h]}),e[19]=h,e[20]=y,e[21]=I):I=e[21];let N;e[22]!==r?(N=r&&x.jsx("div",{children:r}),e[22]=r,e[23]=N):N=e[23];let v;e[24]!==I||e[25]!==N||e[26]!==i?(v=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,I,N]}),e[24]=I,e[25]=N,e[26]=i,e[27]=v):v=e[27];let b;e[28]!==m?(b=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:Z,children:m})}),e[28]=m,e[29]=b):b=e[29];let C;e[30]!==v||e[31]!==b?(C=x.jsxs("div",{className:"flex flex-col flex-1",children:[v,b]}),e[30]=v,e[31]=b,e[32]=C):C=e[32];let M;return e[33]!==l||e[34]!==C||e[35]!==g?(M=x.jsx(G,{className:g,onClick:l,children:C}),e[33]=l,e[34]=C,e[35]=g,e[36]=M):M=e[36],M}function Z(s){return s.stopPropagation()}function J(s){return s.stopPropagation()}export{de as C,fe as a,ae as g,ue as u};
@@ -0,0 +1 @@
1
+ import{H as he,ae as Ie,b3 as Ae,I as le,ac as $e,c as P,j as t,i as ge,B as V,r as G,l as je,C as J,v as De,K as ne,b as Y,aI as ce,z as Pe,b4 as Oe,E as Me,e as ze,b5 as Ee,n as Ve,M as Ue,J as Re,t as q,b6 as Fe}from"./index-lRedQ_8t.js";import{g as Le}from"./extract-connection-data-BIadZZgr.js";import{E as ve}from"./empty-state-C_IbZdBr.js";import{E as He,c as Be,r as We,b as Xe,d as qe}from"./connection-form-helpers-B4Lj6wNN.js";import{c as Ge,S as Ke,V as Qe}from"./index-BlItCfDb.js";import{u as be,T as Je}from"./tools-list-BOMB05RR.js";import{u as Ye}from"./use-members-Bz6iBsM4.js";import{A as Ze}from"./avatar-BB1BJsL_.js";import{a as Ne,b as ye,u as et}from"./use-connection-DmUK9JRy.js";import{u as _e}from"./use-mcp-client-D6H50Mmm.js";import{a as tt}from"./use-mcp-tools-Cs2tX1fK.js";import{c as st,C as nt,a as ot,d as it}from"./AreaChart-5GoV9SRg.js";import{i as rt,a as at}from"./mcp-oauth-DHDPNOkD.js";import{I as oe}from"./integration-icon-CN9OtiIm.js";import{s as lt}from"./Plus-DKATXnIq.js";import{M as ct,N as dt,am as mt,ai as ut}from"./agent-icon-5pSyq_FH.js";import{a as Ce,s as xt}from"./Settings02-1LTNhTXj.js";import{s as re}from"./Trash01-iPP4w9gK.js";import{q as pt,p as ft,o as ht,m as gt,n as jt}from"./sidebar-joQ3ZQPE.js";import{F as L,b as H,c as B,d as E,f as W,e as vt,a as bt}from"./form-CEO5VtKG.js";import{I as X}from"./input-DOZlS9i9.js";import{u as Nt,D as yt}from"./use-delete-connection-Ds3puvR-.js";import{c as _t,B as Ct,a as St,C as wt}from"./monitoring-stats-row-CztePoJD.js";import{u as kt}from"./studio-tools-BMyTPyPy.js";import{u as Tt}from"./use-virtual-mcp-D9inM-9h.js";import{i as Se}from"./ChevronRight-BARfL9-W.js";import{a as we}from"./Users03-BYqJADve.js";import{b as ee,c as It,T as te,a as At}from"./tabs-kApe5O6i.js";import{g as ke}from"./connection-slug-eyAPH6o3.js";import{n as $t}from"./ZapSquare-BhWmmFEB.js";import{d as Dt}from"./Tool01-BWGVYfev.js";import{g as ae,M as Pt}from"./index-DAFjHwsT.js";import{C as Ot}from"./collection-search-MTrnV0Y_.js";import{C as Mt}from"./card-BjD2_XuX.js";import{B as zt}from"./badge-miK_gWS7.js";import{D as Et,a as Vt,c as Ut,d as de}from"./dropdown-menu-D-nlMdm5.js";import{S as me,a as ue,b as xe,c as pe,d as F}from"./select-CxRcXiYy.js";import{i as Rt}from"./CheckCircle-D_t3rWUI.js";import{t as Ft}from"./ChevronDown-wHLuFr3i.js";import{n as Lt}from"./Tool02-DkTMVP4f.js";import{s as se}from"./Star01-CtWX4nA3.js";import{s as Ht}from"./XClose-P0NM9uUE.js";import"./constants-D_FQAPnt.js";import"./index-C9P6Y57L.js";import"./ZoomOut-C7W-ZWAB.js";import"./Key01-DrwX5nx2.js";import"./auth-Cf4In3Ce.js";import"./use-registry-connections-C9dbuMZN.js";import"./use-organization-settings-CHx_I7VH.js";import"./index-CTpTvSxb.js";import"./index-B3_jWN9S.js";import"./popover-BlN-L-7w.js";import"./tooltip-REPIyd2Z.js";import"./Check-DYPRi7NO.js";import"./SearchMd-CbytZ1-S.js";import"./use-mobile-RU-Nn_Un.js";import"./use-create-virtual-mcp-BqyRJeCT.js";import"./use-navigate-to-agent-DYPKcx_j.js";import"./hooks-G1nBJ-F3.js";import"./decopilot-sse-pool-_LHJFrBF.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Eye-CM4SfxEo.js";import"./use-org-auth-client-DrmuxI_m.js";import"./User01-2QspS0s6.js";import"./use-collections-D-OJag2e.js";import"./AlertCircle-BaauQIwC.js";import"./UserPlus01-DoBolndD.js";import"./ArrowUp-C814v0pE.js";import"./XCircle-DHCvZwgH.js";import"./ArrowUpRight-BLP3DLju.js";import"./TrendUp01-C3q3M7MG.js";import"./ChevronUp-CRmxYAjE.js";import"./Circle-DuelqjM2.js";import"./Stars02-BzQc7fZz.js";import"./Copy01-BwtpNAKR.js";import"./DotsVertical-B_jKX962.js";import"./Globe01-B-4z45oj.js";import"./FilterLines-CwEBxGZP.js";import"./Flag01-RtD7xNTJ.js";import"./Globe04-D7ZgONc6.js";import"./SwitchHorizontal01-QNGjYcml.js";import"./HardDrive-DNueik1y.js";import"./LayoutLeft-CHLKhLgL.js";import"./LinkExternal01-022iaJNF.js";import"./List-jObuFUL_.js";import"./Monitor01-BkHN4rM2.js";import"./Sun-CyoL1WFK.js";import"./Package-DYdmCLl6.js";import"./Palette-BWa7ee-4.js";import"./Play-DYP9-OJo.js";import"./SearchLg-crE3yQZJ.js";import"./Shield01-CULBCC4Z.js";import"./Stars01-COE1U6xi.js";import"./Upload01-CoVAXfWg.js";import"./Users01-C3FOprDj.js";import"./X-Bqs01fCh.js";import"./Zap-CI5WhuKJ.js";import"./label-u5PrAFB7.js";import"./alert-dialog-GCrUNzbs.js";const Bt=he({scopes:$e(le()).describe("List of scopes available"),stateSchema:Ie(le(),Ae()).describe("JSON Schema (draft-07) defining the state structure")}),Wt=[{name:"MCP_CONFIGURATION",inputSchema:he({}),outputSchema:Bt}];function Xt(s){const e=P.c(46),{instance:n,onConfigure:i,onAuthenticate:r,onDelete:o,onToggleStatus:a}=s;let d;e[0]!==n.id?(d={connectionId:n.id},e[0]=n.id,e[1]=d):d=e[1];const l=be(d),x=!(n.connection_type==="VIRTUAL")&&l.supportsOAuth&&!l.isAuthenticated,p=n.status!=="active",c=x||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==c?(h=je("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",c),e[2]=c,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let v;e[7]!==n.title?(v=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=v):v=e[8];let b;e[9]!==n.status||e[10]!==p||e[11]!==x?(b=x?t.jsx("span",{className:"text-xs text-destructive font-medium",children:"Needs authorization"}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?"Disabled (error)":"Disabled"}):null,e[9]=n.status,e[10]=p,e[11]=x,e[12]=b):b=e[12];let j;e[13]!==v||e[14]!==b?(j=t.jsxs("div",{className:"flex-1 min-w-0",children:[v,b]}),e[13]=v,e[14]=b,e[15]=j):j=e[15];let N;e[16]!==n||e[17]!==x||e[18]!==r?(N=x&&t.jsx(V,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>r(n),children:"Authorize"}),e[16]=n,e[17]=x,e[18]=r,e[19]=N):N=e[19];let T;e[20]!==n||e[21]!==p||e[22]!==a?(T=p?t.jsxs(V,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>a(n,"active"),children:[t.jsx(ct,{size:13}),"Enable"]}):t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>a(n,"inactive"),title:"Disable",children:t.jsx(dt,{size:13})}),e[20]=n,e[21]=p,e[22]=a,e[23]=T):T=e[23];let S;e[24]!==n||e[25]!==i?(S=()=>i(n),e[24]=n,e[25]=i,e[26]=S):S=e[26];let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Ce,{size:13}),e[27]=y):y=e[27];let I;e[28]!==S?(I=t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:S,title:"Configure",children:y}),e[28]=S,e[29]=I):I=e[29];let _;e[30]!==n||e[31]!==o?(_=()=>o(n),e[30]=n,e[31]=o,e[32]=_):_=e[32];let k;e[33]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(re,{size:13}),e[33]=k):k=e[33];let C;e[34]!==_?(C=t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:_,title:"Delete",children:k}),e[34]=_,e[35]=C):C=e[35];let f;e[36]!==I||e[37]!==C||e[38]!==N||e[39]!==T?(f=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[N,T,I,C]}),e[36]=I,e[37]=C,e[38]=N,e[39]=T,e[40]=f):f=e[40];let w;return e[41]!==f||e[42]!==h||e[43]!==g||e[44]!==j?(w=t.jsxs("div",{className:h,children:[g,j,f]}),e[41]=f,e[42]=h,e[43]=g,e[44]=j,e[45]=w):w=e[45],w}function qt(s){const e=P.c(15),{instance:n,onConfigure:i}=s;let r;e[0]!==n.icon||e[1]!==n.title?(r=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=r):r=e[2];let o;e[3]!==n.title?(o=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=o):o=e[4];let a;e[5]!==n||e[6]!==i?(a=()=>i(n),e[5]=n,e[6]=i,e[7]=a):a=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ce,{size:13}),e[8]=d):d=e[8];let l;e[9]!==a?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:"Configure",children:d})}),e[9]=a,e[10]=l):l=e[10];let u;return e[11]!==r||e[12]!==o||e[13]!==l?(u=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[r,o,l]}),e[11]=r,e[12]=o,e[13]=l,e[14]=u):u=e[14],u}function Gt(s){const e=P.c(27),{instances:n,onConfigure:i,onAuthenticate:r,onDelete:o,onToggleStatus:a,onAdd:d,isAdding:l}=s;if(n.length===0)return null;const u=n.length===1?"Instance":"Instances";let x;e[0]!==u?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[0]=u,e[1]=x):x=e[1];let p;e[2]!==l?(p=l?t.jsx(ge,{size:13,className:"animate-spin"}):t.jsx(lt,{size:13}),e[2]=l,e[3]=p):p=e[3];let c;e[4]!==l||e[5]!==d||e[6]!==p?(c=t.jsxs(V,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:d,disabled:l,children:[p,"Add instance"]}),e[4]=l,e[5]=d,e[6]=p,e[7]=c):c=e[7];let h;e[8]!==x||e[9]!==c?(h=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[x,c]}),e[8]=x,e[9]=c,e[10]=h):h=e[10];let g;if(e[11]!==n||e[12]!==r||e[13]!==i||e[14]!==o||e[15]!==a){let j;e[17]!==r||e[18]!==i||e[19]!==o||e[20]!==a?(j=N=>t.jsx(G.Suspense,{fallback:t.jsx(qt,{instance:N,onConfigure:i}),children:t.jsx(Xt,{instance:N,onConfigure:i,onAuthenticate:r,onDelete:o,onToggleStatus:a})},N.id),e[17]=r,e[18]=i,e[19]=o,e[20]=a,e[21]=j):j=e[21],g=n.map(j),e[11]=n,e[12]=r,e[13]=i,e[14]=o,e[15]=a,e[16]=g}else g=e[16];let v;e[22]!==g?(v=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:g}),e[22]=g,e[23]=v):v=e[23];let b;return e[24]!==h||e[25]!==v?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[h,v]}),e[24]=h,e[25]=v,e[26]=b):b=e[26],b}function Kt(s,e=3){const n=new Map;for(const i of s){if(!i.isError)continue;const r=(i.errorMessage??"").trim()||"Unknown error";n.set(r,(n.get(r)??0)+1)}return[...n.entries()].map(([i,r])=>({message:i,count:r})).sort((i,r)=>r.count-i.count).slice(0,e)}const Qt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function Jt(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const Yt={calls:{label:"Tool calls"},errors:{label:"Errors"}};function Zt(s){const e=P.c(1),{connectionId:n,orgId:i,timeframe:r}=s,o=kt(),a=Jt(r),{data:d}=De({queryKey:ne.connectionActivity(n,r,i),queryFn:async()=>await o.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),l=_t(d?.logs??[],a),u=l.data,x=l.totalCalls>0,p=Kt(d?.logs??[]),c=l.totalCalls>0?Math.round(l.totalErrors/l.totalCalls*100):0;let h;return e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[0]=h):h=e[0],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:l.totalCalls.toLocaleString()}),h]}),l.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:l.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Errors"})]}),l.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(l.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Avg latency"})]})]}),x?t.jsxs("div",{children:[t.jsx(st,{config:Yt,className:"h-16 w-full",children:t.jsxs(Ct,{data:u,barCategoryGap:"4%",children:[t.jsx(nt,{content:t.jsx(ot,{labelFormatter:ss}),cursor:{fill:"var(--muted)"}}),t.jsx(St,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:u.map(ts)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[u.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No activity in this period"})}),p.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:["Top errors",c>0?` · ${c}% of calls failed`:""]}),t.jsx("ul",{className:"space-y-1.5",children:p.map(es)})]})]})}function es(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function ts(s,e){return t.jsx(wt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function ss(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function ns(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function os(s){const e=P.c(13),{connectionId:n}=s,[i,r]=G.useState("14d"),{org:o}=J();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=a):a=e[0];let d;e[1]!==i?(d=Qt.map(c=>t.jsx("button",{type:"button",onClick:()=>r(c.value),className:je("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",i===c.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:c.label},c.value)),e[1]=i,e[2]=d):d=e[2];let l;e[3]!==d?(l=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[a,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:d})]}),e[3]=d,e[4]=l):l=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ns,{}),e[5]=u):u=e[5];let x;e[6]!==n||e[7]!==o.id||e[8]!==i?(x=t.jsx(G.Suspense,{fallback:u,children:t.jsx(Zt,{connectionId:n,orgId:o.id,timeframe:i})}),e[6]=n,e[7]=o.id,e[8]=i,e[9]=x):x=e[9];let p;return e[10]!==l||e[11]!==x?(p=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[l,x]}),e[10]=l,e[11]=x,e[12]=p):p=e[12],p}function is(s){const e=P.c(15),{virtualMcp:n,org:i}=s,r=Y();let o;e[0]!==r||e[1]!==i||e[2]!==n.id?(o=()=>{const p=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:i,taskId:p},search:{virtualmcpid:n.id}})},e[0]=r,e[1]=i,e[2]=n.id,e[3]=o):o=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(we,{size:16}),e[4]=a):a=e[4];let d;e[5]!==n.icon||e[6]!==n.title?(d=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:a}),e[5]=n.icon,e[6]=n.title,e[7]=d):d=e[7];let l;e[8]!==n.title?(l=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Se,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=u):u=e[10];let x;return e[11]!==o||e[12]!==d||e[13]!==l?(x=t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[d,l,u]}),e[11]=o,e[12]=d,e[13]=l,e[14]=x):x=e[14],x}function rs(s){const e=P.c(7),{virtualMcps:n,org:i}=s;let r;if(e[0]!==i||e[1]!==n){let a;e[3]!==i?(a=d=>t.jsx(is,{virtualMcp:d,org:i},d.id),e[3]=i,e[4]=a):a=e[4],r=n.map(a),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let o;return e[5]!==r?(o=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:r})}),e[5]=r,e[6]=o):o=e[6],o}function as(s){const e=P.c(7),{connection:n}=s,{org:i}=J();let r;e[0]!==n.id?(r={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=r):r=e[1];const o=Tt(r);if(!(o.length>0)){let u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(t.Fragment,{}),e[2]=u):u=e[2],u}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=d):d=e[3];let l;return e[4]!==i.slug||e[5]!==o?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,t.jsx("div",{className:"px-5 py-4",children:t.jsx(rs,{virtualMcps:o,org:i.slug})})]}),e[4]=i.slug,e[5]=o,e[6]=l):l=e[6],l}function ls(s){const e=P.c(31),{tools:n,connectionId:i,org:r}=s,o=Y(),{org:a}=J();let d;e[0]!==i||e[1]!==a.id||e[2]!==a.slug?(d={connectionId:i,orgId:a.id,orgSlug:a.slug},e[0]=i,e[1]=a.id,e[2]=a.slug,e[3]=d):d=e[3];const l=_e(d),u=Ne(i);let x;e[4]!==u||e[5]!==i?(x=u?ke(u):i,e[4]=u,e[5]=i,e[6]=x):x=e[6];const p=x,[c,h]=G.useState("");let g,v,b,j;if(e[7]!==p||e[8]!==l||e[9]!==o||e[10]!==r||e[11]!==c||e[12]!==n){const S=(n??[]).filter(cs),y=c.toLowerCase().trim(),I=y?S.filter(f=>f.name.toLowerCase().includes(y)||f.description&&f.description.toLowerCase().includes(y)):S;let _;e[17]!==p||e[18]!==o||e[19]!==r?(_=f=>{o({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(f.name)}})},e[17]=p,e[18]=o,e[19]=r,e[20]=_):_=e[20];const k=_;b="flex flex-col h-full overflow-hidden";let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=f=>{f.key==="Escape"&&(h(""),f.target.blur())},e[21]=C):C=e[21],e[22]!==c?(j=t.jsx(Ot,{value:c,onChange:h,placeholder:"Search apps...",onKeyDown:C}),e[22]=c,e[23]=j):j=e[23],g="flex-1 overflow-auto p-5",v=I.length===0?t.jsx(ve,{image:null,title:c?"No apps found":"No apps available",description:c?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:I.map(f=>{const w=ae(f._meta);return t.jsxs(Mt,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>k(f),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Pt,{resourceURI:w,toolInfo:{tool:f},displayMode:"inline",minHeight:200,maxHeight:200,client:l})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:f.name}),t.jsx(Je,{annotations:f.annotations,_meta:f._meta})]}),f.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:f.description})]})]},f.name)})}),e[7]=p,e[8]=l,e[9]=o,e[10]=r,e[11]=c,e[12]=n,e[13]=g,e[14]=v,e[15]=b,e[16]=j}else g=e[13],v=e[14],b=e[15],j=e[16];let N;e[24]!==g||e[25]!==v?(N=t.jsx("div",{className:g,children:v}),e[24]=g,e[25]=v,e[26]=N):N=e[26];let T;return e[27]!==b||e[28]!==j||e[29]!==N?(T=t.jsxs("div",{className:b,children:[j,N]}),e[27]=b,e[28]=j,e[29]=N,e[30]=T):T=e[30],T}function cs(s){return!!ae(s._meta)}function Te(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=a=>a.charAt(0).toUpperCase()+a.slice(1),i=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),r=e.map(n),o=e[e.length-1];return r.length>=2&&o&&i.has(o)?[r.pop(),...r].join(" "):r.join(" ")}function ie(s){const e=P.c(2),{label:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",n," available."]})}),e[0]=n,e[1]=i):i=e[1],i}function ds(s){const e=P.c(50),{tools:n,prompts:i,resources:r,connectionId:o,org:a}=s;let d;e[0]!==i?(d=i===void 0?[]:i,e[0]=i,e[1]=d):d=e[1];const l=d;let u;e[2]!==r?(u=r===void 0?[]:r,e[2]=r,e[3]=u):u=e[3];const x=u,p=Y(),c=Ne(o??"");let h;e[4]!==c||e[5]!==o?(h=c?ke(c):o,e[4]=c,e[5]=o,e[6]=h):h=e[6];const g=h;let v;e[7]!==g||e[8]!==o||e[9]!==p||e[10]!==a?(v=function($){!o||!a||p({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:g,collectionName:"tools",itemId:encodeURIComponent($)}})},e[7]=g,e[8]=o,e[9]=p,e[10]=a,e[11]=v):v=e[11];const b=v;let j;e[12]!==o||e[13]!==a||e[14]!==n?(j=o&&a&&n.some(xs),e[12]=o,e[13]=a,e[14]=n,e[15]=j):j=e[15];const N=j;if(n.length+l.length+x.length===0){let m;return e[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Capabilities"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No capabilities discovered yet. The connection may still be connecting."})]}),e[16]=m):m=e[16],m}let S;e[17]!==n.length?(S=t.jsxs(ee,{value:"tools",variant:"underline",children:["Tools (",n.length,")"]}),e[17]=n.length,e[18]=S):S=e[18];let y;e[19]!==N?(y=N&&t.jsx(ee,{value:"apps",variant:"underline",children:"UI"}),e[19]=N,e[20]=y):y=e[20];let I,_;e[21]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ee,{value:"prompts",variant:"underline",children:"Prompts"}),_=t.jsx(ee,{value:"resources",variant:"underline",children:"Resources"}),e[21]=I,e[22]=_):(I=e[21],_=e[22]);let k;e[23]!==S||e[24]!==y?(k=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(It,{variant:"underline",className:"gap-1",children:[S,y,I,_]})}),e[23]=S,e[24]=y,e[25]=k):k=e[25];let C;e[26]!==b||e[27]!==n?(C=n.length>0?n.map(m=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>b(m.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Dt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(m.name)}),m.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:m.description})]}),t.jsx(Se,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},m.name)):t.jsx(ie,{label:"tools"}),e[26]=b,e[27]=n,e[28]=C):C=e[28];let f;e[29]!==C?(f=t.jsx(te,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:C})}),e[29]=C,e[30]=f):f=e[30];let w;e[31]!==o||e[32]!==N||e[33]!==a||e[34]!==n?(w=N&&t.jsx(te,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ls,{tools:n,connectionId:o,org:a})}),e[31]=o,e[32]=N,e[33]=a,e[34]=n,e[35]=w):w=e[35];let M;e[36]!==l?(M=l.length>0?l.map(us):t.jsx(ie,{label:"prompts"}),e[36]=l,e[37]=M):M=e[37];let O;e[38]!==M?(O=t.jsx(te,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:M})}),e[38]=M,e[39]=O):O=e[39];let A;e[40]!==x?(A=x.length>0?x.map(ms):t.jsx(ie,{label:"resources"}),e[40]=x,e[41]=A):A=e[41];let z;e[42]!==A?(z=t.jsx(te,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[42]=A,e[43]=z):z=e[43];let U;return e[44]!==k||e[45]!==f||e[46]!==w||e[47]!==O||e[48]!==z?(U=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(At,{defaultValue:"tools",variant:"underline",children:[k,f,w,O,z]})}),e[44]=k,e[45]=f,e[46]=w,e[47]=O,e[48]=z,e[49]=U):U=e[49],U}function ms(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function us(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx($t,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function xs(s){return ae(s._meta)}function ps(s){const e=P.c(13),{connection:n,displayTitle:i}=s,r=i??n.title;let o;e[0]!==n.icon||e[1]!==r?(o=t.jsx(oe,{icon:n.icon,name:r,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=r,e[2]=o):o=e[2];let a;e[3]!==r?(a=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:r})}),e[3]=r,e[4]=a):a=e[4];let d;e[5]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=d):d=e[6];let l;e[7]!==a||e[8]!==d?(l=t.jsxs("div",{className:"flex-1 min-w-0",children:[a,d]}),e[7]=a,e[8]=d,e[9]=l):l=e[9];let u;return e[10]!==o||e[11]!==l?(u=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[o,l]}),e[10]=o,e[11]=l,e[12]=u):u=e[12],u}function fs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:i,onRemoveOAuth:r}){const o=ce({control:s.control,name:"ui_type"}),a=ce({control:s.control,name:"connection_url"}),{stdioEnabled:d}=Pe(),l=(()=>{if(typeof a!="string"||!a)return!1;try{const c=new URL(a);return c.hostname==="api.githubcopilot.com"&&c.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=d||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",p=x?Oe(e.connection_url):null;return x?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(we,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(L,{control:s.control,name:"ui_type",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),o!=="NPX"&&o!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(me,{value:c.value,onValueChange:c.onChange,children:[t.jsx(E,{children:t.jsxs(ue,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(se,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(xe,{})]})}),t.jsxs(pe,{children:[t.jsx(F,{value:"HTTP",children:"HTTP"}),t.jsx(F,{value:"SSE",children:"SSE"}),t.jsx(F,{value:"Websocket",children:"Websocket"}),u&&t.jsxs(t.Fragment,{children:[t.jsx(F,{value:"NPX",children:"NPX Package"}),t.jsx(F,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(L,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(E,{children:t.jsx(X,{placeholder:"https://example.com/mcp",...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(me,{value:c.value,onValueChange:c.onChange,children:[t.jsx(E,{children:t.jsx(ue,{className:"h-10",children:t.jsx(xe,{})})}),t.jsxs(pe,{children:[t.jsx(F,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(F,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(F,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"Websocket"]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(F,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(F,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ut,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(W,{})]})}),o==="NPX"&&t.jsx(L,{control:s.control,name:"npx_package",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(E,{children:t.jsx(X,{placeholder:"@perplexity-ai/mcp-server",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),o==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(L,{control:s.control,name:"stdio_command",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(E,{children:t.jsx(X,{placeholder:"node, bun, python...",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),t.jsx(L,{control:s.control,name:"stdio_args",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(E,{children:t.jsx(X,{placeholder:"arg1 arg2 --flag value",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(W,{})]})})]}),t.jsx(L,{control:s.control,name:"stdio_cwd",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(E,{children:t.jsx(X,{placeholder:"/path/to/project (optional)",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(L,{control:s.control,name:"env_vars",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(E,{children:t.jsx(He,{value:c.value??[],onChange:c.onChange})}),t.jsx(W,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(L,{control:s.control,name:"connection_token",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:l?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Et,{children:[t.jsx(Vt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(zt,{variant:"success",className:"gap-1.5",children:[t.jsx(Rt,{size:12}),"Authenticated via OAuth",t.jsx(Ft,{size:12})]})})}),t.jsxs(Ut,{align:"start",children:[t.jsxs(de,{onClick:i,children:[t.jsx(xt,{size:16}),"Re-authenticate"]}),t.jsxs(de,{variant:"destructive",onClick:r,children:[t.jsx(re,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&c.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>c.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(Ht,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(E,{children:t.jsx(X,{type:"password",placeholder:l?"Paste your GitHub PAT":"Enter access token...",...c,value:c.value||"",className:"h-10 rounded-lg"})}),l&&t.jsxs(vt,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(W,{})]})})]})}function hs(s){return s.command==="npx"}function gs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function js(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function fe(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Fe(s.connection_headers)){const i=s.connection_headers,r=We(i.envVars);if(hs(i)){const a=gs(i);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:a,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:r}}const o=js(i);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:o.command,stdio_args:o.args,stdio_cwd:o.cwd,env_vars:r}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function vs(s){let e,n=null,i=null,r=null;return s.ui_type==="NPX"?(e="STDIO",n="",r=Xe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",r=qe(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",i=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...i&&{connection_token:i},...r&&{connection_headers:r},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function bs({connection:s,connectionId:e,org:n,isUpdating:i,tools:r,prompts:o,resources:a,siblings:d}){const l=Y({from:"/$org/settings/connections/$appSlug"}),u=Ve(),x=ye(),{org:p}=J(),c=Nt({onSuccess:()=>{d.length<=1&&l({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=G.useState(null),[v,b]=G.useState(!1),j=be({connectionId:e}),{data:N}=Ye(),T=N?.data?.members??[],S=h??s,y=T.find(m=>m.userId===S.created_by),_=s?.connection_type==="VIRTUAL"||j.isAuthenticated,k={...s,tools:r},C=Ge(k,Wt),f=Ue({resolver:Re(Be),values:fe(h??s)}),w=f.formState.isDirty,M=async()=>{if(!await f.trigger())return;const $=f.getValues(),D=vs($),R=h?.id??e;await x.update.mutateAsync({id:R,data:D}),f.reset($)},O=()=>{f.reset(fe(h??s))},A=async m=>{const{token:$,tokenInfo:D,error:R}=await at({connectionId:m,orgSlug:p.slug,scope:"offline_access"});if(R||!$){q.error(`Authentication failed: ${R}`);return}if(D)try{const K=await fetch(`/api/${p.slug}/connections/${m}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!K.ok)console.error("Failed to save OAuth token:",await K.text()),await x.update.mutateAsync({id:m,data:{connection_token:$}});else try{await x.update.mutateAsync({id:m,data:{}})}catch(Z){console.warn("Failed to refresh connection tools after OAuth:",Z)}}catch(K){console.error("Error saving OAuth token:",K),await x.update.mutateAsync({id:m,data:{connection_token:$}})}else await x.update.mutateAsync({id:m,data:{connection_token:$}});const Q=new URL(`/api/${p.slug}/mcp/${m}`,window.location.origin);await u.invalidateQueries({queryKey:ne.isMCPAuthenticated(Q.href,null)}),await u.invalidateQueries({queryKey:ne.mcpClientPrefix()}),q.success("Authentication successful")},z=()=>A(s.id),U=async()=>{try{const m=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!m.ok){const D=await m.text();q.error(`Failed to remove OAuth: ${D}`);return}const $=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ne.isMCPAuthenticated($.href,null)}),q.success("OAuth removed. You can now re-authenticate with a different account.")}catch(m){console.error("Error removing OAuth token:",m),q.error("Failed to remove OAuth")}};return t.jsxs(t.Fragment,{children:[t.jsx(yt,{...c}),t.jsx(pt,{open:h!==null,onOpenChange:m=>{m||g(null)},children:t.jsxs(ft,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(ht,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(gt,{className:"text-base",children:h?.title??s.title}),t.jsx(jt,{className:"text-xs",children:"Update URL, authentication, and other settings"}),y&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected by"}),t.jsx(Ze,{url:y.user?.image??void 0,fallback:y.user?.name??y.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:y.user?.name||y.user?.email})]})]}),t.jsxs(bt,{...f,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(L,{control:f.control,name:"title",render:({field:m})=>t.jsxs(H,{children:[t.jsx(B,{children:"Name"}),t.jsx(E,{children:t.jsx(X,{...m})}),t.jsx(W,{})]})}),t.jsx(L,{control:f.control,name:"description",render:({field:m})=>t.jsxs(H,{children:[t.jsx(B,{children:"Description"}),t.jsx(E,{children:t.jsx(X,{...m,value:m.value||""})}),t.jsx(W,{})]})})]}),t.jsx(fs,{form:f,connection:h??s,hasOAuthToken:j.hasOAuthToken,onReauthenticate:z,onRemoveOAuth:U}),t.jsx(Ke,{connection:h??s,form:f,hasMcpBinding:C,isMCPAuthenticated:_,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:z,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(V,{onClick:M,disabled:!w||i,className:"flex-1",children:i?"Saving…":"Save changes"}),w&&t.jsx(V,{variant:"outline",onClick:O,children:"Undo"}),t.jsxs(V,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const m=h??s;g(null),c.requestDelete(m)},children:[t.jsx(re,{size:15}),"Delete"]})]})]},h?.id??s.id)]})}),t.jsx(Qe,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(ps,{connection:s,displayTitle:(()=>{const m=d[0]??s;return m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(os,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Gt,{instances:d,onConfigure:m=>g(m),onAuthenticate:m=>A(m.id),onDelete:m=>c.requestDelete(m),onToggleStatus:async(m,$)=>{try{await x.update.mutateAsync({id:m.id,data:{status:$}}),q.success($==="active"?"Connection enabled":"Connection disabled")}catch{q.error("Failed to update connection")}},isAdding:v,onAdd:async()=>{b(!0);try{const m=d[0]??s,$=m.title.replace(/\s*\(\d+\)\s*$/,""),D=d.length+1,R=`${$} (${D})`,Q=Le("conn");await x.create.mutateAsync({id:Q,title:R,description:m.description??null,connection_type:m.connection_type,connection_url:m.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:m.created_by,organization_id:m.organization_id,icon:m.icon??null,app_name:m.app_name??null,app_id:m.app_id??null,connection_headers:m.connection_headers??null,oauth_config:null,configuration_state:m.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const K=new URL(`/api/${p.slug}/mcp/${Q}`,window.location.origin),Z=await rt({url:K.href,token:null,orgId:p.id});Z.supportsOAuth&&!Z.isAuthenticated&&await A(Q)}finally{b(!1)}}}),t.jsx(as,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(ds,{tools:r,prompts:o,resources:a,connectionId:e,org:n})})]})})]})})]})}function Ns(){const s=P.c(39);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/settings/connections/$appSlug"},s[0]=e):e=s[0];const n=Y(e);let i;s[1]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org/settings/connections/$appSlug"},s[1]=i):i=s[1];const{appSlug:r,org:o}=ze(i),{org:a}=J(),d=ye();let l;s[2]!==r?(l={slug:r},s[2]=r,s[3]=l):l=s[3];const u=et(l),x=u[0]??null,p=x?.id??"",c=p||null;let h;s[4]!==a.id||s[5]!==a.slug||s[6]!==c?(h={connectionId:c,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=c,s[7]=h):h=s[7];const g=_e(h);let v;s[8]!==g?(v={client:g},s[8]=g,s[9]=v):v=s[9];const{data:b}=tt(v);let j;if(s[10]!==x?.tools||s[11]!==p||s[12]!==u||s[13]!==b){const A=b?b.tools.map(ks):(x?.tools??[]).map(ws);e:{if(u.length<=1){j=A;break e}const z=new Set,U=[],m=Cs;for(const $ of u){const D=$.id===p?A:m($.tools);for(const R of D)z.has(R.name)||(z.add(R.name),U.push(R))}j=U.length>0?U:A}s[10]=x?.tools,s[11]=p,s[12]=u,s[13]=b,s[14]=j}else j=s[14];const N=j;let T;s[15]!==g?(T={client:g},s[15]=g,s[16]=T):T=s[16];const{data:S}=it(T);let y;s[17]!==g?(y={client:g},s[17]=g,s[18]=y):y=s[18];const{data:I}=Ee(y);let _;s[19]!==S?.prompts?(_=S?.prompts??[],s[19]=S?.prompts,s[20]=_):_=s[20];let k;s[21]!==_?(k=_.map(_s),s[21]=_,s[22]=k):k=s[22];const C=k;let f;s[23]!==I?.resources?(f=I?.resources??[],s[23]=I?.resources,s[24]=f):f=s[24];let w;s[25]!==f?(w=f.map(ys),s[25]=f,s[26]=w):w=s[26];const M=w;if(!x){let A;return s[27]!==n||s[28]!==o?(A=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ve,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(V,{variant:"outline",onClick:()=>n({to:"/$org/settings/connections",params:{org:o}}),children:"Back to connections"})})}),s[27]=n,s[28]=o,s[29]=A):A=s[29],A}let O;return s[30]!==d.update.isPending||s[31]!==N||s[32]!==x||s[33]!==p||s[34]!==o||s[35]!==C||s[36]!==M||s[37]!==u?(O=t.jsx(bs,{org:o,connection:x,connectionId:p,isUpdating:d.update.isPending,tools:N,prompts:C,resources:M,siblings:u}),s[30]=d.update.isPending,s[31]=N,s[32]=x,s[33]=p,s[34]=o,s[35]=C,s[36]=M,s[37]=u,s[38]=O):O=s[38],O}function ys(s){return{name:s.name,description:s.description,uri:s.uri}}function _s(s){return{name:s.name,description:s.description}}function Cs(s){return(s??[]).map(Ss)}function Ss(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ws(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ks(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Me,{children:t.jsx(G.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ns,{})})}),s[0]=e):e=s[0],e}function Co(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ts,{}),s[0]=e):e=s[0],e}export{Co as default};
@@ -1 +1 @@
1
- import{H as R,ae as V,b3 as A,I as a,ac as j,ad as z,c as L,j as u,B as C}from"./index-C5JCmVQ0.js";import{I as H}from"./input-DWv95vY4.js";import{s as W}from"./Plus-DATZ4-ND.js";import{s as q}from"./Trash01-CrwbV8c_.js";const K=R({key:a().min(1,"Key is required"),value:a()}),M=R({title:a().min(1,"Name is required"),description:a().nullable().optional(),icon:a().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:a().optional(),connection_token:a().nullable().optional(),npx_package:a().optional(),stdio_command:a().optional(),stdio_args:a().optional(),stdio_cwd:a().optional(),env_vars:j(K).optional(),configuration_scopes:j(a()).nullable().optional(),configuration_state:V(a(),A()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function $(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:v}=n,m=o===void 0?"VARIABLE_NAME":o,_=s===void 0?"value...":s;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const g=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:p,value:c.value},r(i))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const y=P;let w;e[9]!==r||e[10]!==t?(w=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:c.key,value:p},r(i))},e[9]=r,e[10]=t,e[11]=w):w=e[11];const k=w;let d;if(e[12]!==y||e[13]!==g||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==_){let l;e[19]!==y||e[20]!==g||e[21]!==k||e[22]!==m||e[23]!==_?(l=(p,i)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>y(i,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:$(p.key)?"password":"text",placeholder:_,value:p.value,onChange:c=>k(i,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>g(i),children:u.jsx(q,{size:16})})]},i),e[19]=y,e[20]=g,e[21]=k,e[22]=m,e[23]=_,e[24]=l):l=e[24],d=t.map(l),e[12]=y,e[13]=g,e[14]=k,e[15]=m,e[16]=t,e[17]=_,e[18]=d}else d=e[18];let T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=u.jsx(W,{size:16,className:"mr-1"}),e[25]=T):T=e[25];let f;e[26]!==S?(f=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[T,"Add Environment Variable"]}),e[26]=S,e[27]=f):f=e[27];let h;e[28]!==d||e[29]!==f?(h=u.jsxs("div",{className:"flex flex-col gap-2",children:[d,f]}),e[28]=d,e[29]=f,e[30]=h):h=e[30];let E;return e[31]!==v||e[32]!==h?(E=u.jsx("div",{className:v,children:h}),e[31]=v,e[32]=h,e[33]=E):E=e[33],E}function I(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=I(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=I(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{X as E,J as a,Q as b,M as c,Z as d,Y as i,F as p,D as r};
1
+ import{H as R,ae as V,b3 as A,I as a,ac as j,ad as z,c as L,j as u,B as C}from"./index-lRedQ_8t.js";import{I as H}from"./input-DOZlS9i9.js";import{s as W}from"./Plus-DKATXnIq.js";import{s as q}from"./Trash01-iPP4w9gK.js";const K=R({key:a().min(1,"Key is required"),value:a()}),M=R({title:a().min(1,"Name is required"),description:a().nullable().optional(),icon:a().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:a().optional(),connection_token:a().nullable().optional(),npx_package:a().optional(),stdio_command:a().optional(),stdio_args:a().optional(),stdio_cwd:a().optional(),env_vars:j(K).optional(),configuration_scopes:j(a()).nullable().optional(),configuration_state:V(a(),A()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function $(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:v}=n,m=o===void 0?"VARIABLE_NAME":o,_=s===void 0?"value...":s;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const g=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:p,value:c.value},r(i))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const y=P;let w;e[9]!==r||e[10]!==t?(w=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:c.key,value:p},r(i))},e[9]=r,e[10]=t,e[11]=w):w=e[11];const k=w;let d;if(e[12]!==y||e[13]!==g||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==_){let l;e[19]!==y||e[20]!==g||e[21]!==k||e[22]!==m||e[23]!==_?(l=(p,i)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>y(i,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:$(p.key)?"password":"text",placeholder:_,value:p.value,onChange:c=>k(i,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>g(i),children:u.jsx(q,{size:16})})]},i),e[19]=y,e[20]=g,e[21]=k,e[22]=m,e[23]=_,e[24]=l):l=e[24],d=t.map(l),e[12]=y,e[13]=g,e[14]=k,e[15]=m,e[16]=t,e[17]=_,e[18]=d}else d=e[18];let T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=u.jsx(W,{size:16,className:"mr-1"}),e[25]=T):T=e[25];let f;e[26]!==S?(f=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[T,"Add Environment Variable"]}),e[26]=S,e[27]=f):f=e[27];let h;e[28]!==d||e[29]!==f?(h=u.jsxs("div",{className:"flex flex-col gap-2",children:[d,f]}),e[28]=d,e[29]=f,e[30]=h):h=e[30];let E;return e[31]!==v||e[32]!==h?(E=u.jsx("div",{className:v,children:h}),e[31]=v,e[32]=h,e[33]=E):E=e[33],E}function I(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=I(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=I(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{X as E,J as a,Q as b,M as c,Z as d,Y as i,F as p,D as r};
@@ -0,0 +1 @@
1
+ import{r as E,c as oe,j as t,E as Ye,i as ce,C as be,b as _e,u as Ze,a as Ne,z as et,G as tt,D as nt,M as st,J as ot,B as U,p as te,n as it,l as de,t as W,K as rt}from"./index-lRedQ_8t.js";import{g as lt,a as De,b as at,e as ct}from"./extract-connection-data-BIadZZgr.js";import{C as dt}from"./collection-display-button-CNmqBrih.js";import{S as mt}from"./search-input-BQOeLOTi.js";import{C as ut}from"./collection-tabs-Dvz33uvw.js";import{u as pt,a as ke,g as ht,C as Ce}from"./connection-card-DQ8XLP8C.js";import{E as gt}from"./empty-state-C_IbZdBr.js";import{I as xt}from"./integration-icon-CN9OtiIm.js";import{P as ue}from"./index-C9P6Y57L.js";import{u as ft,D as jt}from"./use-delete-connection-Ds3puvR-.js";import{u as ye}from"./use-capability-CCJ-X1mC.js";import{u as yt}from"./use-infinite-scroll-B4v-_NDY.js";import{u as Ct}from"./use-view-mode-y0S1o9OD.js";import{g as he}from"./connection-slug-eyAPH6o3.js";import{c as Ae,d as we,b as Te,A as Ie,e as Pe,g as $e,a as Le,f as Oe}from"./alert-dialog-GCrUNzbs.js";import{C as Fe}from"./checkbox-DnsQEgvs.js";import{e as Me,d as ze,D as Ve,a as Ee,h as Be,c as Ke}from"./dialog-CUb_uQeJ.js";import{D as vt,a as St,c as bt,b as _t,d as Nt,e as Dt,f as kt}from"./drawer-BSFvVMvA.js";import{u as At}from"./use-mobile-RU-Nn_Un.js";import{D as Ue,a as Re,c as He,d as re}from"./dropdown-menu-D-nlMdm5.js";import{F as Q,b as J,c as Y,d as Z,f as ee,a as ve}from"./form-CEO5VtKG.js";import{I as ie}from"./input-DOZlS9i9.js";import{S as wt,a as Tt,b as It,c as Pt,d as ae}from"./select-CxRcXiYy.js";import{T as $t}from"./textarea-C5puqxj1.js";import{b as We,u as Lt}from"./use-connection-DmUK9JRy.js";import{u as Ot}from"./use-virtual-mcp-D9inM-9h.js";import{u as Ft}from"./studio-tools-BMyTPyPy.js";import{ai as Mt,al as zt,N as Vt,M as Et}from"./agent-icon-5pSyq_FH.js";import{n as ge}from"./Tool02-DkTMVP4f.js";import{i as Xe}from"./DotsVertical-B_jKX962.js";import{s as qe}from"./Eye-CM4SfxEo.js";import{s as je}from"./Star01-CtWX4nA3.js";import{s as Ge}from"./Plus-DKATXnIq.js";import{s as Qe}from"./Trash01-iPP4w9gK.js";import{s as Je}from"./XClose-P0NM9uUE.js";import{i as pe,a as Se,E as Bt,c as Kt,p as Ut,b as Rt,d as Ht}from"./connection-form-helpers-B4Lj6wNN.js";import{a as Wt}from"./authenticate-and-persist-oauth-DeTua2ma.js";import"./use-mcp-client-D6H50Mmm.js";import"./constants-D_FQAPnt.js";import"./auth-Cf4In3Ce.js";import"./ArrowUp-C814v0pE.js";import"./Check-DYPRi7NO.js";import"./SwitchHorizontal01-QNGjYcml.js";import"./List-jObuFUL_.js";import"./tooltip-REPIyd2Z.js";import"./view-mode-toggle-BIom5MzH.js";import"./badge-miK_gWS7.js";import"./SearchMd-CbytZ1-S.js";import"./use-registry-connections-C9dbuMZN.js";import"./use-organization-settings-CHx_I7VH.js";import"./useInfiniteQuery-XeUdT1mI.js";import"./card-BjD2_XuX.js";import"./sidebar-joQ3ZQPE.js";import"./LayoutLeft-CHLKhLgL.js";import"./X-Bqs01fCh.js";import"./ChevronRight-BARfL9-W.js";import"./Circle-DuelqjM2.js";import"./label-u5PrAFB7.js";import"./ChevronDown-wHLuFr3i.js";import"./ChevronUp-CRmxYAjE.js";import"./use-collections-D-OJag2e.js";import"./AlertCircle-BaauQIwC.js";import"./UserPlus01-DoBolndD.js";import"./Tool01-BWGVYfev.js";import"./Settings02-1LTNhTXj.js";import"./XCircle-DHCvZwgH.js";import"./ArrowUpRight-BLP3DLju.js";import"./TrendUp01-C3q3M7MG.js";import"./ZapSquare-BhWmmFEB.js";import"./Users03-BYqJADve.js";import"./CheckCircle-D_t3rWUI.js";import"./Stars02-BzQc7fZz.js";import"./Copy01-BwtpNAKR.js";import"./ZoomOut-C7W-ZWAB.js";import"./Globe01-B-4z45oj.js";import"./FilterLines-CwEBxGZP.js";import"./Flag01-RtD7xNTJ.js";import"./Globe04-D7ZgONc6.js";import"./HardDrive-DNueik1y.js";import"./Key01-DrwX5nx2.js";import"./LinkExternal01-022iaJNF.js";import"./Monitor01-BkHN4rM2.js";import"./Sun-CyoL1WFK.js";import"./Package-DYdmCLl6.js";import"./Palette-BWa7ee-4.js";import"./Play-DYP9-OJo.js";import"./SearchLg-crE3yQZJ.js";import"./Shield01-CULBCC4Z.js";import"./Stars01-COE1U6xi.js";import"./Upload01-CoVAXfWg.js";import"./User01-2QspS0s6.js";import"./Users01-C3FOprDj.js";import"./Zap-CI5WhuKJ.js";import"./mcp-oauth-DHDPNOkD.js";function Xt(f){const e=`deco-filters-${f}`,[n,p]=E.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[n,o=>{p(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function qt(f){const e=oe.c(7),[n,p]=E.useState(f),[l,o]=E.useState(f?"desc":null);let i;e[0]!==l||e[1]!==n?(i=j=>{n!==j?(p(j),o("asc")):l==="asc"?o("desc"):l==="desc"&&(p(void 0),o(null))},e[0]=l,e[1]=n,e[2]=i):i=e[2];const g=i;let h;return e[3]!==g||e[4]!==l||e[5]!==n?(h={sortKey:n,sortDirection:l,handleSort:g},e[3]=g,e[4]=l,e[5]=n,e[6]=h):h=e[6],h}function Gt(f){const e=oe.c(20),{namespace:n,resource:p,defaultSortKey:l,defaultViewMode:o}=f,i=l===void 0?"title":l,g=o===void 0?"table":o,[h,j]=E.useState(""),y=E.useDeferredValue(h),N=`${n}-${p}`,[b,a]=Xt(N),x=`mesh-${p}-filter-visible-${n}`;let m;e[0]!==x?(m=()=>globalThis.localStorage?.getItem(x)==="true",e[0]=x,e[1]=m):m=e[1];const[v,_]=E.useState(m);let D;e[2]!==x?(D=T=>{_(T),globalThis.localStorage?.setItem(x,String(T))},e[2]=x,e[3]=D):D=e[3];const L=D;let O;e[4]!==v||e[5]!==L?(O=()=>{L(!v)},e[4]=v,e[5]=L,e[6]=O):O=e[6];const s=O,[A,F]=Ct(`mesh-${p}-${n}`,g),{sortKey:M,sortDirection:w,handleSort:P}=qt(i),z=M;let C;return e[7]!==v||e[8]!==b||e[9]!==P||e[10]!==h||e[11]!==y||e[12]!==L||e[13]!==a||e[14]!==F||e[15]!==w||e[16]!==z||e[17]!==s||e[18]!==A?(C={search:h,searchTerm:y,setSearch:j,filters:b,setFilters:a,filterBarVisible:v,setFilterBarVisible:L,toggleFilterBar:s,viewMode:A,setViewMode:F,sortKey:z,sortDirection:w,handleSort:P},e[7]=v,e[8]=b,e[9]=P,e[10]=h,e[11]=y,e[12]=L,e[13]=a,e[14]=F,e[15]=w,e[16]=z,e[17]=s,e[18]=A,e[19]=C):C=e[19],C}function Qt(f){const e=oe.c(51),{group:n,onOpen:p,selectionMode:l,selectedIds:o,onToggleSelect:i}=f;let g;if(e[0]!==n.connections||e[1]!==o){let C;e[3]!==o?(C=T=>o.has(T.id),e[3]=o,e[4]=C):C=e[4],g=n.connections.every(C),e[0]=n.connections,e[1]=o,e[2]=g}else g=e[2];const h=g;let j;if(e[5]!==n.connections||e[6]!==o){let C;e[8]!==o?(C=T=>o.has(T.id),e[8]=o,e[9]=C):C=e[9],j=n.connections.some(C),e[5]=n.connections,e[6]=o,e[7]=j}else j=e[7];const y=j,N=`${n.connections.length} instances`;let b;e[10]!==n.icon||e[11]!==n.title||e[12]!==N?(b={title:n.title,icon:n.icon,description:N},e[10]=n.icon,e[11]=n.title,e[12]=N,e[13]=b):b=e[13];let a;e[14]!==h||e[15]!==n.connections||e[16]!==p||e[17]!==i||e[18]!==o||e[19]!==l?(a=()=>l?(()=>{for(const C of n.connections)h?o.has(C.id)&&i(C.id):o.has(C.id)||i(C.id)})():p(),e[14]=h,e[15]=n.connections,e[16]=p,e[17]=i,e[18]=o,e[19]=l,e[20]=a):a=e[20];const x=l&&h&&"ring-2 ring-primary",m=l&&y&&!h&&"ring-1 ring-primary/50";let v;e[21]!==x||e[22]!==m?(v=de(x,m),e[21]=x,e[22]=m,e[23]=v):v=e[23];let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(ge,{}),e[24]=_):_=e[24];let D;e[25]!==h||e[26]!==n.connections||e[27]!==i||e[28]!==o||e[29]!==l||e[30]!==y?(D=l?t.jsx(Fe,{checked:h?!0:y?"indeterminate":!1,onCheckedChange:()=>{for(const C of n.connections)h?o.has(C.id)&&i(C.id):o.has(C.id)||i(C.id)}}):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[25]=h,e[26]=n.connections,e[27]=i,e[28]=o,e[29]=l,e[30]=y,e[31]=D):D=e[31];const L=l?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let O;e[32]!==L?(O=de("overflow-hidden transition-all duration-150 ease-out",L),e[32]=L,e[33]=O):O=e[33];let s;e[34]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(Re,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Yt,children:t.jsx(Xe,{size:20})})}),e[34]=s):s=e[34];let A;e[35]!==p?(A=C=>{C.stopPropagation(),p()},e[35]=p,e[36]=A):A=e[36];let F;e[37]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(qe,{size:16}),e[37]=F):F=e[37];let M;e[38]!==A?(M=t.jsxs(Ue,{children:[s,t.jsx(He,{align:"end",onClick:Jt,children:t.jsxs(re,{onClick:A,children:[F,"Open"]})})]}),e[38]=A,e[39]=M):M=e[39];let w;e[40]!==O||e[41]!==M?(w=t.jsx("div",{className:O,children:M}),e[40]=O,e[41]=M,e[42]=w):w=e[42];let P;e[43]!==D||e[44]!==w?(P=t.jsxs("div",{className:"flex items-center gap-1",children:[D,w]}),e[43]=D,e[44]=w,e[45]=P):P=e[45];let z;return e[46]!==P||e[47]!==b||e[48]!==a||e[49]!==v?(z=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:b,onClick:a,className:v,fallbackIcon:_,headerActionsAlwaysVisible:!0,headerActions:P})}),e[46]=P,e[47]=b,e[48]=a,e[49]=v,e[50]=z):z=e[50],z}function Jt(f){return f.stopPropagation()}function Yt(f){return f.stopPropagation()}function Zt(f){const e=oe.c(23),{count:n,total:p,canManage:l,canManageAgents:o,onSelectAll:i,onDeselectAll:g,onDelete:h,onAddToAgent:j,onToggleStatus:y,onCancel:N}=f;if(n===0)return null;let b;e[0]!==n?(b=t.jsxs("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=b):b=e[1];let a;e[2]!==n||e[3]!==g||e[4]!==i||e[5]!==p?(a=n<p?t.jsxs(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:i,children:["Select all (",p,")"]}):t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:g,children:"Clear selection"}),e[2]=n,e[3]=g,e[4]=i,e[5]=p,e[6]=a):a=e[6];let x;e[7]!==o||e[8]!==j?(x=o&&t.jsxs(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:j,children:[t.jsx(Ge,{size:13}),"Add to Agent"]}),e[7]=o,e[8]=j,e[9]=x):x=e[9];let m;e[10]!==l||e[11]!==h||e[12]!==y?(m=l&&t.jsxs(t.Fragment,{children:[t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("active"),children:"Enable"}),t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("inactive"),children:"Disable"}),t.jsxs(U,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:h,children:[t.jsx(Qe,{size:13}),"Delete"]})]}),e[10]=l,e[11]=h,e[12]=y,e[13]=m):m=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Je,{size:13}),e[14]=v):v=e[14];let _;e[15]!==N?(_=t.jsx(U,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:N,children:v}),e[15]=N,e[16]=_):_=e[16];let D;return e[17]!==b||e[18]!==a||e[19]!==x||e[20]!==m||e[21]!==_?(D=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:[b,a,x,m,_]})}),e[17]=b,e[18]=a,e[19]=x,e[20]=m,e[21]=_,e[22]=D):D=e[22],D}function en(f){const e=oe.c(25),{open:n,onOpenChange:p,agents:l,onConfirm:o}=f,[i,g]=E.useState(null);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs(Ve,{children:[t.jsx(Ee,{children:"Add to Agent"}),t.jsx(Be,{children:"Select an agent to add the selected connections to."})]}),e[0]=h):h=e[0];let j;e[1]!==l||e[2]!==i?(j=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No agents found"}):l.map(D=>t.jsxs("button",{type:"button",onClick:()=>g(D.id),className:de("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",i===D.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(xt,{icon:D.icon,name:D.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:D.title}),D.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:D.description})]})]},D.id)),e[1]=l,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 N;e[6]!==p?(N=t.jsx(U,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),e[6]=p,e[7]=N):N=e[7];const b=!i;let a;e[8]!==o||e[9]!==p||e[10]!==i?(a=()=>{i&&(o(i),p(!1),g(null))},e[8]=o,e[9]=p,e[10]=i,e[11]=a):a=e[11];let x;e[12]!==b||e[13]!==a?(x=t.jsx(U,{disabled:b,onClick:a,children:"Add"}),e[12]=b,e[13]=a,e[14]=x):x=e[14];let m;e[15]!==N||e[16]!==x?(m=t.jsxs(Ke,{children:[N,x]}),e[15]=N,e[16]=x,e[17]=m):m=e[17];let v;e[18]!==y||e[19]!==m?(v=t.jsxs(ze,{className:"sm:max-w-[400px]",children:[h,y,m]}),e[18]=y,e[19]=m,e[20]=v):v=e[20];let _;return e[21]!==p||e[22]!==n||e[23]!==v?(_=t.jsx(Me,{open:n,onOpenChange:p,children:v}),e[21]=p,e[22]=n,e[23]=v,e[24]=_):_=e[24],_}function tn(f){const e=oe.c(20),{open:n,onOpenChange:p,count:l,onConfirm:o}=f,i=l!==1?"s":"";let g;e[0]!==l||e[1]!==i?(g=t.jsxs(Ae,{children:["Delete ",l," connection",i,"?"]}),e[0]=l,e[1]=i,e[2]=g):g=e[2];const h=l!==1?"s":"";let j;e[3]!==h?(j=t.jsxs(we,{children:["This will permanently delete the selected connection",h,". This action cannot be undone."]}),e[3]=h,e[4]=j):j=e[4];let y;e[5]!==g||e[6]!==j?(y=t.jsxs(Te,{children:[g,j]}),e[5]=g,e[6]=j,e[7]=y):y=e[7];let N;e[8]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(Ie,{children:"Cancel"}),e[8]=N):N=e[8];const b=l!==1?"s":"";let a;e[9]!==l||e[10]!==o||e[11]!==b?(a=t.jsxs(Pe,{children:[N,t.jsxs($e,{onClick:o,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:["Delete ",l," connection",b]})]}),e[9]=l,e[10]=o,e[11]=b,e[12]=a):a=e[12];let x;e[13]!==y||e[14]!==a?(x=t.jsxs(Le,{children:[y,a]}),e[13]=y,e[14]=a,e[15]=x):x=e[15];let m;return e[16]!==p||e[17]!==n||e[18]!==x?(m=t.jsx(Oe,{open:n,onOpenChange:p,children:x}),e[16]=p,e[17]=n,e[18]=x,e[19]=m):m=e[19],m}function nn(f){return f._registryId?.includes("community-registry")===!0}function sn(f){const e=oe.c(58),{item:n,canManage:p,allConnections:l,connectedAppNames:o,connectingItemId:i,onNavigateConnected:g,onConnect:h}=f,[j,y]=E.useState(!1),[N,b]=E.useState(null);let a,x;e[0]!==o||e[1]!==n?(a=De(n)??"",x=o.has(a),e[0]=o,e[1]=n,e[2]=a,e[3]=x):(a=e[2],x=e[3]);const m=x,v=n._meta?.["mcp.mesh"],_=v?.friendlyName||v?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",D=n.server?.description||n.description||null;let L;e[4]!==n.server?.icons?.[0]?.src||e[5]!==n.server?.repository?(L=n.server?.icons?.[0]?.src||at(n.server?.repository)||null,e[4]=n.server?.icons?.[0]?.src,e[5]=n.server?.repository,e[6]=L):L=e[6];const O=L;let s;if(e[7]!==l||e[8]!==a){let k;e[10]!==a?(k=se=>se.connection_type!=="VIRTUAL"&&se.app_name===a,e[10]=a,e[11]=k):k=e[11],s=l.filter(k),e[7]=l,e[8]=a,e[9]=s}else s=e[9];const A=s;let F;e[12]!==n?(F=nn(n),e[12]=n,e[13]=F):F=e[13];const M=F;let w,P;e[14]!==A||e[15]!==p||e[16]!==M||e[17]!==m||e[18]!==n||e[19]!==h||e[20]!==g?(w=()=>{if(m){const k=A[0];k&&g(k);return}p&&P()},P=()=>{M?(b("connect"),y(!0)):h(n)},e[14]=A,e[15]=p,e[16]=M,e[17]=m,e[18]=n,e[19]=h,e[20]=g,e[21]=w,e[22]=P):(w=e[21],P=e[22]);let z;e[23]!==n||e[24]!==h||e[25]!==N?(z=()=>{te("connections_community_warning_confirmed",{registry_item_id:n.id}),y(!1),N==="connect"&&h(n),b(null)},e[23]=n,e[24]=h,e[25]=N,e[26]=z):z=e[26];const C=z;let T;e[27]!==D||e[28]!==O||e[29]!==_?(T={title:_,description:D,icon:O},e[27]=D,e[28]=O,e[29]=_,e[30]=T):T=e[30];let G;e[31]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(ge,{}),e[31]=G):G=e[31];let H;e[32]!==M||e[33]!==n._sourceIcon?(H=M&&n._sourceIcon&&t.jsx("img",{src:n._sourceIcon,alt:"Community",className:"size-4 rounded-sm object-contain"}),e[32]=M,e[33]=n._sourceIcon,e[34]=H):H=e[34];let X;e[35]!==p||e[36]!==i||e[37]!==P||e[38]!==m||e[39]!==n.id?(X=m?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}):p&&t.jsx(U,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:i!==null,onClick:k=>{k.stopPropagation(),P()},children:i===n.id?t.jsx(ce,{size:14,className:"animate-spin"}):"Connect"}),e[35]=p,e[36]=i,e[37]=P,e[38]=m,e[39]=n.id,e[40]=X):X=e[40];let c;e[41]!==H||e[42]!==X?(c=t.jsxs("div",{className:"flex items-center gap-2",children:[H,X]}),e[41]=H,e[42]=X,e[43]=c):c=e[43];let S;e[44]!==w||e[45]!==c||e[46]!==T?(S=t.jsx(Ce,{connection:T,fallbackIcon:G,onClick:w,headerActionsAlwaysVisible:!0,headerActions:c}),e[44]=w,e[45]=c,e[46]=T,e[47]=S):S=e[47];let V;e[48]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsxs(Te,{children:[t.jsx(Ae,{children:"Community MCP Server"}),t.jsx(we,{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]=V):V=e[48];let R;e[49]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Ie,{children:"Cancel"}),e[49]=R):R=e[49];let B;e[50]!==C?(B=t.jsxs(Le,{children:[V,t.jsxs(Pe,{children:[R,t.jsx($e,{onClick:C,children:"Continue"})]})]}),e[50]=C,e[51]=B):B=e[51];let u;e[52]!==j||e[53]!==B?(u=t.jsx(Oe,{open:j,onOpenChange:y,children:B}),e[52]=j,e[53]=B,e[54]=u):u=e[54];let $;return e[55]!==S||e[56]!==u?($=t.jsxs(t.Fragment,{children:[S,u]}),e[55]=S,e[56]=u,e[57]=$):$=e[57],$}function on({listState:f,activeTab:e,typeFilter:n,statusFilter:p,registryFilter:l,enabledRegistries:o}){const{org:i}=be(),g=it(),h=_e(),{data:j}=Ne.useSession(),y=We(),N=Lt(f),b=ft(),{granted:a}=ye("connections:manage"),{granted:x}=ye("agents:manage"),[m,v]=E.useState(new Set),_=m.size>0,[D,L]=E.useState(!1),[O,s]=E.useState(!1),[A,F]=E.useState(null),M=Ot(),w=N.filter(r=>!(n!=="ALL"&&r.connection_type!==n||p!=="ALL"&&r.status!==p)),P=ht(w),z=r=>{v(d=>{const K=new Set(d);return K.has(r)?K.delete(r):K.add(r),K})},C=()=>{v(new Set)},T=ke(o,f.searchTerm),G=T.items,H=yt(T.loadMore,T.hasMore,T.isLoadingMore),X=new Set(N.filter(r=>r.app_name).map(r=>r.app_name)),c=l==="ALL"||o.some(r=>r.id===l)?l:"ALL",S=f.search.length>0,V=e==="all"||S?G.filter(r=>{if(c!=="ALL"&&r._registryId!==c)return!1;if(S){const d=De(r);if(d&&X.has(d))return!1}return!0}):[],R=e==="connected"||S?P:[],B=async r=>{if(!(!i||!j?.user?.id)){te("connection_add_clicked",{action:"connect_new",registry_item_id:r.id,source:"connections_page"}),F(r.id);try{const d=ct(r,i.id,j.user.id,{remoteIndex:0}),K=d.connection_type==="STDIO",I=!!d.connection_url,q=K&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!I&&!q){W.error("This MCP Server cannot be connected: no connection method available"),F(null);return}const{id:ne}=await y.create.mutateAsync(d),le=await Wt({connectionId:ne,orgId:i.id,orgSlug:i.slug,persistFallback:fe=>y.update.mutateAsync({id:ne,data:{connection_token:fe}}).then(()=>{})});if(le.ran&&!le.ok){te("connection_oauth_failed",{connection_id:ne,flow:"connections_page_connect",error:le.error??"no_token"}),W.error(`Authentication failed: ${le.error??"no token received"}`);return}if(le.ran){te("connection_oauth_succeeded",{connection_id:ne,flow:"connections_page_connect"});const fe=new URL(`/api/${i.slug}/mcp/${ne}`,window.location.origin);await g.invalidateQueries({queryKey:rt.isMCPAuthenticated(fe.href,null)}),$(),W.success("Authentication successful")}W.success("Connected successfully")}catch(d){W.error(`Failed to connect: ${d instanceof Error?d.message:String(d)}`)}finally{F(null)}}},u=Ft(),$=()=>{g.invalidateQueries({predicate:r=>{const d=r.queryKey;return d[1]===i.id&&d[3]==="collection"&&d[4]==="CONNECTIONS"}})},k=async()=>{L(!1);const r=[...m];te("connections_bulk_delete",{count:r.length});let d=0;for(const K of r)try{await u.call("COLLECTION_CONNECTIONS_DELETE",{id:K,force:!0}),d++}catch{}$(),W.success(`Deleted ${d} connection${d!==1?"s":""}`),C()},se=async(r,d)=>{try{await y.update.mutateAsync({id:r,data:{status:d}}),$(),W.success(d==="active"?"Connection enabled":"Connection disabled")}catch{W.error("Failed to update connection")}},xe=async r=>{const d=[...m];te("connections_bulk_status_toggled",{count:d.length,to_status:r});let K=0;for(const I of d)try{await y.update.mutateAsync({id:I,data:{status:r}}),K++}catch{}$(),W.success(`${r==="active"?"Enabled":"Disabled"} ${K} connection${K!==1?"s":""}`),C()},me=async r=>{const d=M.find(q=>q.id===r);if(!d)return;te("connections_bulk_add_to_agent",{agent_id:r,count:m.size});const K=new Set(d.connections.map(q=>q.connection_id)),I=[...m].filter(q=>!K.has(q)).map(q=>({connection_id:q,selected_tools:null,selected_resources:null,selected_prompts:null}));if(I.length===0){W.info("All selected connections are already in that agent");return}try{await u.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:r,data:{connections:[...d.connections,...I]}}),g.invalidateQueries({predicate:q=>{const ne=q.queryKey;return ne[1]===i.id&&ne[3]==="collection"&&ne[4]==="VIRTUAL_MCP"}}),W.success(`Added ${I.length} connection${I.length!==1?"s":""} to "${d.title}"`),C()}catch{W.error("Failed to add connections to agent")}};return t.jsxs(t.Fragment,{children:[t.jsx(jt,{...b}),t.jsx(tn,{open:D,onOpenChange:L,count:m.size,onConfirm:k}),t.jsx(en,{open:O,onOpenChange:s,agents:M,onConfirm:me}),T.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ce,{size:32,className:"animate-spin text-muted-foreground"})}):t.jsx("div",{children:(S?V.length===0&&w.length===0:e==="all"?V.length===0:w.length===0)?t.jsx(gt,{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}"`:a?"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:[R.map(r=>{if(r.type==="group")return t.jsx(Qt,{group:r,onOpen:()=>{h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:r.key}})},selectionMode:_,selectedIds:m,onToggleSelect:z},r.key);const d=r.connection,K=m.has(d.id);return t.jsx(Ce,{connection:d,fallbackIcon:t.jsx(ge,{}),onClick:()=>_?z(d.id):h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:he(d)}}),className:de(K&&"ring-2 ring-primary bg-primary/5"),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1",children:[_?t.jsx(Fe,{checked:K,onCheckedChange:()=>z(d.id),onClick:I=>I.stopPropagation()}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),t.jsx("div",{className:de("overflow-hidden transition-all duration-150 ease-out",_?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100"),children:t.jsxs(Ue,{children:[t.jsx(Re,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:I=>I.stopPropagation(),children:t.jsx(Xe,{size:20})})}),t.jsxs(He,{align:"end",onClick:I=>I.stopPropagation(),children:[t.jsxs(re,{onClick:I=>{I.stopPropagation(),h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:he(d)}})},children:[t.jsx(qe,{size:16}),"Open"]}),(a||x)&&t.jsxs(re,{onClick:I=>{I.stopPropagation(),z(d.id)},children:[t.jsx(zt,{size:16}),"Select"]}),a&&(d.status==="active"?t.jsxs(re,{onClick:I=>{I.stopPropagation(),se(d.id,"inactive")},children:[t.jsx(Vt,{size:16}),"Disable"]}):t.jsxs(re,{onClick:I=>{I.stopPropagation(),se(d.id,"active")},children:[t.jsx(Et,{size:16}),"Enable"]})),a&&t.jsxs(re,{variant:"destructive",onClick:I=>{I.stopPropagation(),b.requestDelete(d)},children:[t.jsx(Qe,{size:16}),"Delete"]})]})]})})]})},d.id)}),V.map(r=>t.jsx(sn,{item:r,canManage:a,allConnections:N,connectedAppNames:X,connectingItemId:A,onNavigateConnected:d=>h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:he(d)}}),onConnect:B},`catalog-${r._registryId}:${r.id}`)),(e==="all"||S)&&o.length>0&&t.jsx("div",{ref:H,className:"col-span-full h-4"}),(e==="all"||S)&&T.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ce,{size:24,className:"animate-spin text-muted-foreground"})})]})}),_&&t.jsx(Zt,{count:m.size,total:w.length,canManage:a,canManageAgents:x,onSelectAll:()=>{v(new Set(w.map(r=>r.id)))},onDeselectAll:()=>v(new Set),onDelete:()=>L(!0),onAddToAgent:()=>s(!0),onToggleStatus:xe,onCancel:C})]})}function rn(){const{org:f}=be(),e=_e(),n=Ze({strict:!1}),{data:p}=Ne.useSession(),{stdioEnabled:l}=et(),o=At(),{granted:i}=ye("connections:manage"),g=Gt({namespace:f.slug,resource:"connections"}),h=We(),[j,y]=tt(nt.connectionsTab(f.slug),c=>n.tab==="all"||n.tab==="connected"?n.tab:c??"all"),[N,b]=E.useState("ALL"),[a,x]=E.useState("ALL"),[m,v]=E.useState("ALL"),_=pt(),L=ke(_,g.searchTerm).items,O=g.search!==g.searchTerm,s=st({resolver:ot(Kt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),A=s.watch("ui_type"),F=s.watch("connection_url"),M=s.watch("npx_package"),w=pe({uiType:A,connectionUrl:F??"",npxPackage:M??""})??Se({uiType:A,connectionUrl:F??"",registryItems:L}),P=i&&n.action==="create",z=()=>{te("connections_custom_dialog_opened",{source:"connections_page"}),e({to:"/$org/settings/connections",params:{org:f.slug},search:{action:"create"}})},C=()=>{e({to:"/$org/settings/connections",params:{org:f.slug},search:{}})},T=async c=>{let S,V=null,R=null,B=null;c.ui_type==="NPX"?(S="STDIO",V="",B=Rt(c.npx_package||"",c.env_vars||[])):c.ui_type==="STDIO"?(S="STDIO",V="",B=Ht(c.stdio_command||"",c.stdio_args||"",c.stdio_cwd,c.env_vars||[])):(S=c.ui_type,V=c.connection_url||"",R=c.connection_token||null);const u=lt("conn");te("connection_custom_created",{connection_type:S,ui_type:c.ui_type}),await h.create.mutateAsync({id:u,title:c.title,description:c.description||null,connection_type:S,connection_url:V,connection_token:R,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p?.user?.id||"system",organization_id:f.id,icon:c.icon??null,app_name:null,app_id:null,connection_headers:B,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),C(),s.reset(),e({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:he({app_name:null,connection_url:V,title:c.title,id:u})}})},G=c=>{c||(P&&C(),s.reset())},H=c=>{const S=c.trim();if(!S)return;const V=!!s.formState.dirtyFields.title,R=!!s.formState.dirtyFields.description,B=!!s.formState.dirtyFields.env_vars,u=k=>{if(k&&(!V&&!s.getValues("title").trim()&&k.title&&s.setValue("title",k.title,{shouldDirty:!1}),!R&&!(s.getValues("description")??"").trim()&&k.description&&s.setValue("description",k.description,{shouldDirty:!1}),!B&&k.envVarKeys?.length)){const se=s.getValues("env_vars")??[],xe=new Set(se.map(r=>r.key)),me=k.envVarKeys.filter(r=>!xe.has(r));me.length>0&&s.setValue("env_vars",[...se,...me.map(r=>({key:r,value:""}))],{shouldDirty:!0})}},$=Ut(S);if($&&l){s.setValue("ui_type","NPX",{shouldDirty:!0}),s.setValue("npx_package",$.packageName,{shouldDirty:!0}),s.setValue("connection_url","",{shouldDirty:!0}),s.setValue("connection_token",null,{shouldDirty:!0}),u(pe({uiType:"NPX",npxPackage:$.packageName}));return}if(S.startsWith("http://")||S.startsWith("https://")){const k=A==="HTTP"||A==="SSE"||A==="Websocket"?A:"HTTP";s.setValue("ui_type",k,{shouldDirty:!0}),s.setValue("connection_url",S,{shouldDirty:!0}),u(pe({uiType:k,connectionUrl:S})??Se({uiType:k,connectionUrl:S,registryItems:L}));return}A==="NPX"&&u(pe({uiType:"NPX",npxPackage:S}))},X=i?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(U,{variant:"outline",onClick:z,children:[t.jsx(Ge,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:"Custom Connection"})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(ue,{children:[(()=>{const c="Create Connection",S="Create a custom connection in your organization. Fill in the details below.",V=s.formState.isSubmitting?"Saving...":"Create Connection",R=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Type *"}),t.jsxs(wt,{value:u.value,onValueChange:u.onChange,children:[t.jsx(Z,{children:t.jsx(Tt,{children:t.jsx(It,{})})}),t.jsxs(Pt,{children:[t.jsx(ae,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(ae,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(ae,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"Websocket"]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(ae,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ge,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(ae,{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,{})]})}),A==="NPX"&&t.jsx(Q,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"NPM Package *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"@perplexity-ai/mcp-server",...u,value:u.value??"",onPaste:$=>{const k=$.clipboardData.getData("text");k&&($.preventDefault(),s.setValue("npx_package",k.trim(),{shouldDirty:!0}),H(k))},onBlur:$=>{H($.target.value),u.onBlur()}})}),t.jsx(ee,{})]})}),A==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Command *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"node, bun, python...",...u,value:u.value??""})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Arguments"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"arg1 arg2 --flag value",...u,value:u.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Working Directory"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"/path/to/project (optional)",...u,value:u.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),t.jsx(ee,{})]})})]}),(A==="NPX"||A==="STDIO")&&t.jsx(Q,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Environment Variables"}),t.jsx(Z,{children:t.jsx(Bt,{value:u.value??[],onChange:u.onChange})}),t.jsx(ee,{})]})}),A!=="NPX"&&A!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:s.control,name:"connection_url",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"URL *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"https://example.com/mcp",...u,value:u.value??"",onPaste:$=>{const k=$.clipboardData.getData("text");k&&($.preventDefault(),s.setValue("connection_url",k.trim(),{shouldDirty:!0}),H(k))},onBlur:$=>{H($.target.value),u.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:w?.token?.label??"Token (optional)"}),t.jsx(Z,{children:t.jsx(ie,{type:"password",placeholder:w?.token?.placeholder??"Bearer token or API key",...u,value:u.value??""})}),w?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[w.token.helperText,w.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(Q,{control:s.control,name:"title",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Name *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"My Connection",...u})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:s.control,name:"description",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Description"}),t.jsx(Z,{children:t.jsx($t,{placeholder:"A brief description of this connection",rows:3,...u,value:u.value??""})}),t.jsx(ee,{})]})})]}),B=P;return o?t.jsx(vt,{open:B,onOpenChange:G,children:t.jsxs(St,{className:"max-h-[90vh]",children:[t.jsx(bt,{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(_t,{children:c}),t.jsx(Nt,{className:"mt-1",children:S})]}),t.jsx(Dt,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Je,{size:16})})})]})}),t.jsx(ve,{...s,children:t.jsxs("form",{onSubmit:s.handleSubmit(T),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:R}),t.jsx(kt,{children:t.jsx(U,{type:"submit",disabled:s.formState.isSubmitting,className:"w-full",children:V})})]})})]})}):t.jsx(Me,{open:B,onOpenChange:G,children:t.jsxs(ze,{className:"sm:max-w-[525px]",children:[t.jsxs(Ve,{children:[t.jsx(Ee,{children:c}),t.jsx(Be,{children:S})]}),t.jsx(ve,{...s,children:t.jsxs("form",{onSubmit:s.handleSubmit(T),children:[t.jsx("div",{className:"py-4",children:R}),t.jsxs(Ke,{children:[t.jsx(U,{type:"button",variant:"outline",onClick:()=>G(!1),children:"Cancel"}),t.jsx(U,{type:"submit",disabled:s.formState.isSubmitting,className:"min-w-40",children:V})]})]})})]})})})(),t.jsx(ue.Content,{children:t.jsx(ue.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(ue.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(mt,{value:g.search,onChange:g.setSearch,placeholder:"Search for a connection",className:"w-full md:w-[375px]",onKeyDown:c=>{c.key==="Escape"&&(g.setSearch(""),c.target.blur())}}),t.jsx(dt,{sortKey:g.sortKey,sortDirection:g.sortDirection,onSort:g.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:N,onChange:c=>b(c||"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:a,onChange:c=>x(c||"ALL"),options:[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"},{id:"error",label:"Error"}]},..._.length>1?[{label:"Registry",value:m,onChange:c=>v(c||"ALL"),options:[{id:"ALL",label:"All registries"},..._.map(c=>({id:c.id,label:c.id.includes("community-registry")?"Community MCP Registry":c.title}))]}]:[]]})]}),X]}),t.jsx(ut,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:c=>{const S=c;S!==j&&te("connections_page_tab_changed",{to_tab:S}),y(S)}}),t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ce,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:O?.5:1,transition:O?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:O?"none":"auto"},children:t.jsx(on,{listState:g,activeTab:j,typeFilter:N,statusFilter:a,registryFilter:m,enabledRegistries:_})})})]})})})]})})}function Xs(){const f=oe.c(1);let e;return f[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ye,{children:t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ce,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(rn,{})})}),f[0]=e):e=f[0],e}export{Xs as default};
@@ -1 +1 @@
1
- import"./index-C5JCmVQ0.js";import{e as v}from"./backoff-CrEUbyZT.js";const D={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},h=Object.values(D),U="super-agent",S="task-board.item.updated",k=3e4,g=1e3;function N(n){const{buildUrl:u,eventTypes:d,name:a,crossTab:f=!1}=n,o=new Map,i=f&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(i&&!a)throw new Error("createSSESubscription: `name` is required when crossTab");function l(e,t){e.bootDone=!0;for(const s of e.handlers)try{s(t)}catch{}}function p(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function E(e){const t=new EventSource(u(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(p(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&_(e)};const s=r=>{e.channel?.postMessage({kind:"event",type:r.type,data:r.data}),l(e,r)};for(const r of d)t.addEventListener(r,s)}function _(e){if(e.refCount<=0||e.reconnectTimer)return;const t=v(k,g,e.reconnectAttempt,2,0);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),E(e))},t)}function T(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,E(e)}function m(e){if(!i){T(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${a}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,T(e)})).catch(()=>{})}function w(e,t){t.kind==="event"?l(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&p(e)}function L(e){const t=o.get(e);if(t)return t;const s={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(o.set(e,s),i){const r=new BroadcastChannel(`sse:${a}:${e}`);r.onmessage=c=>w(s,c.data),s.channel=r}return m(s),s}function y(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,o.delete(e.key)}return{subscribe(e,t,s){const r=L(e);r.refCount++,r.handlers.add(t),s&&r.reconnectHandlers.add(s);let c=!1;return()=>{c||(c=!0,r.handlers.delete(t),s&&r.reconnectHandlers.delete(s),r.refCount--,r.refCount<=0&&y(r))}}}}function b(n,u){const d=new Set(u);return{subscribe(a,f,o){const i=l=>{d.has(l.type)&&f(l)};return n.subscribe(a,i,o)}}}const A=[...h,S],O=A,P=A,C=N({name:"watch",buildUrl:n=>`/api/${encodeURIComponent(n)}/watch?types=${O.join(",")}`,eventTypes:P,crossTab:!0}),H=b(C,[...h]),B=b(C,[S]),R=H;export{D,U as S,R as d,B as t};
1
+ import"./index-lRedQ_8t.js";import{e as v}from"./backoff-CrEUbyZT.js";const D={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},h=Object.values(D),U="super-agent",S="task-board.item.updated",k=3e4,g=1e3;function N(n){const{buildUrl:u,eventTypes:d,name:a,crossTab:f=!1}=n,o=new Map,i=f&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(i&&!a)throw new Error("createSSESubscription: `name` is required when crossTab");function l(e,t){e.bootDone=!0;for(const s of e.handlers)try{s(t)}catch{}}function p(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function E(e){const t=new EventSource(u(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(p(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&_(e)};const s=r=>{e.channel?.postMessage({kind:"event",type:r.type,data:r.data}),l(e,r)};for(const r of d)t.addEventListener(r,s)}function _(e){if(e.refCount<=0||e.reconnectTimer)return;const t=v(k,g,e.reconnectAttempt,2,0);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),E(e))},t)}function T(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,E(e)}function m(e){if(!i){T(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${a}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,T(e)})).catch(()=>{})}function w(e,t){t.kind==="event"?l(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&p(e)}function L(e){const t=o.get(e);if(t)return t;const s={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(o.set(e,s),i){const r=new BroadcastChannel(`sse:${a}:${e}`);r.onmessage=c=>w(s,c.data),s.channel=r}return m(s),s}function y(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,o.delete(e.key)}return{subscribe(e,t,s){const r=L(e);r.refCount++,r.handlers.add(t),s&&r.reconnectHandlers.add(s);let c=!1;return()=>{c||(c=!0,r.handlers.delete(t),s&&r.reconnectHandlers.delete(s),r.refCount--,r.refCount<=0&&y(r))}}}}function b(n,u){const d=new Set(u);return{subscribe(a,f,o){const i=l=>{d.has(l.type)&&f(l)};return n.subscribe(a,i,o)}}}const A=[...h,S],O=A,P=A,C=N({name:"watch",buildUrl:n=>`/api/${encodeURIComponent(n)}/watch?types=${O.join(",")}`,eventTypes:P,crossTab:!0}),H=b(C,[...h]),B=b(C,[S]),R=H;export{D,U as S,R as d,B as t};
@@ -1 +1 @@
1
- import{c as n,j as i,cM as u,l as c,F as m,cL as x,cN as j,cO as N,cQ as b,cZ as D,cP as g}from"./index-C5JCmVQ0.js";import{i as h}from"./X-CNdIeej8.js";function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(g,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{O as D,R as a,k as b,P as c,T as d,z as e,y as f,v as g,B as h,w as i};
1
+ import{c as n,j as i,cM as u,l as c,F as m,cL as x,cN as j,cO as N,cQ as b,cZ as D,cP as g}from"./index-lRedQ_8t.js";import{i as h}from"./X-Bqs01fCh.js";function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(g,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{O as D,R as a,k as b,P as c,T as d,z as e,y as f,v as g,B as h,w as i};
@@ -1 +1 @@
1
- import{c as X,C as H,n as U,r as W,K as J,m as ee,d as Z,p as te,t as p,j as i,B as $}from"./index-C5JCmVQ0.js";import{u as ie}from"./studio-tools--pllMpfK.js";import{b as se,S as ne,a as oe}from"./settings-section-CHSsdIIo.js";import{B as Q}from"./badge-BR8ZoQPH.js";import{I as ae}from"./input-DWv95vY4.js";import{S as re,a as le,b as ce,c as de,d as me}from"./select-D59HzWyb.js";const ue={off:"Off",auto:"Auto-join",request:"Require approval"};function fe(e,t){switch(e){case"auto":return`Anyone with a verified @${t} email joins automatically.`;case"request":return`People with a verified @${t} email can request to join; an admin approves.`;default:return"Not discoverable — no one can find or join through this domain."}}function be(){const e=X.c(69),{org:t}=H(),u=U(),s=ie(),[l,x]=W.useState("");let r;e[0]!==t.id?(r=J.organizationDomains(t.id),e[0]=t.id,e[1]=r):r=e[1];let c;e[2]!==s?(c=()=>s.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==r||e[5]!==c?(d={queryKey:r,queryFn:c},e[4]=r,e[5]=c,e[6]=d):d=e[6];const{data:f,isPending:j}=ee(d);let m;e[7]!==t.id||e[8]!==u?(m=()=>u.invalidateQueries({queryKey:J.organizationDomains(t.id)}),e[7]=t.id,e[8]=u,e[9]=m):m=e[9];const n=m;let N;e[10]!==s?(N=o=>s.call("ORGANIZATION_DOMAIN_ADD",{domain:o}),e[10]=s,e[11]=N):N=e[11];let v;e[12]!==n||e[13]!==t.id?(v=()=>{te("organization_domain_added",{organization_id:t.id}),x(""),n(),p.success("Domain added")},e[12]=n,e[13]=t.id,e[14]=v):v=e[14];let R;e[15]!==N||e[16]!==v?(R={mutationFn:N,onSuccess:v,onError:je},e[15]=N,e[16]=v,e[17]=R):R=e[17];const h=Z(R);let S;e[18]!==s?(S=o=>{const{id:a,joinMode:g}=o;return s.call("ORGANIZATION_DOMAIN_UPDATE",{id:a,joinMode:g})},e[18]=s,e[19]=S):S=e[19];let y;e[20]!==n?(y=()=>{n(),p.success("Join mode updated")},e[20]=n,e[21]=y):y=e[21];let V;e[22]!==S||e[23]!==y?(V={mutationFn:S,onSuccess:y,onError:ge},e[22]=S,e[23]=y,e[24]=V):V=e[24];const P=Z(V);let _;e[25]!==s?(_=o=>s.call("ORGANIZATION_DOMAIN_VERIFY",{id:o}),e[25]=s,e[26]=_):_=e[26];let A;e[27]!==n?(A=o=>{n(),o.verified?p.success("Domain verified"):p.error("TXT record not found yet — DNS can take a few minutes.")},e[27]=n,e[28]=A):A=e[28];let k;e[29]!==_||e[30]!==A?(k={mutationFn:_,onSuccess:A,onError:he},e[29]=_,e[30]=A,e[31]=k):k=e[31];const D=Z(k);let I;e[32]!==s?(I=o=>s.call("ORGANIZATION_DOMAIN_REMOVE",{id:o}),e[32]=s,e[33]=I):I=e[33];let b;e[34]!==n?(b=()=>{n(),p.success("Domain removed")},e[34]=n,e[35]=b):b=e[35];let q;e[36]!==I||e[37]!==b?(q={mutationFn:I,onSuccess:b,onError:xe},e[36]=I,e[37]=b,e[38]=q):q=e[38];const E=Z(q);if(j)return null;let z;e[39]!==f?.domains?(z=f?.domains??[],e[39]=f?.domains,e[40]=z):z=e[40];const K=z;let O;if(e[41]!==K||e[42]!==E||e[43]!==P||e[44]!==D){let o;e[46]!==E||e[47]!==P||e[48]!==D?(o=a=>{const g=a.verificationStatus==="verified";return i.jsx(se,{title:i.jsxs("span",{className:"flex items-center gap-2",children:[a.domain,g?i.jsx(Q,{variant:"secondary",children:"Verified"}):i.jsx(Q,{variant:"outline",children:"Pending"})]}),description:g?fe(a.joinMode,a.domain):"Add the DNS record below, then verify.",action:i.jsxs("div",{className:"flex items-center gap-2",children:[g&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-xs text-muted-foreground",children:"Join mode"}),i.jsxs(re,{value:a.joinMode,onValueChange:Y=>P.mutate({id:a.id,joinMode:Y}),children:[i.jsx(le,{className:"w-44",size:"sm",children:i.jsx(ce,{})}),i.jsx(de,{children:["off","auto","request"].map(pe)})]})]}),!g&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>D.mutate(a.id),disabled:D.isPending,children:"Verify"}),i.jsx($,{size:"sm",variant:"ghost",onClick:()=>E.mutate(a.id),disabled:E.isPending,children:"Remove"})]}),children:!g&&a.recordName&&a.recordValue&&i.jsx(Ne,{recordName:a.recordName,recordValue:a.recordValue})},a.id)},e[46]=E,e[47]=P,e[48]=D,e[49]=o):o=e[49],O=K.map(o),e[41]=K,e[42]=E,e[43]=P,e[44]=D,e[45]=O}else O=e[45];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=o=>x(o.target.value),e[50]=B):B=e[50];let M;e[51]!==l?(M=i.jsx(ae,{value:l,onChange:B,placeholder:"acme.com",className:"max-w-xs"}),e[51]=l,e[52]=M):M=e[52];let T;e[53]!==h||e[54]!==l?(T=()=>h.mutate(l.trim()),e[53]=h,e[54]=l,e[55]=T):T=e[55];let C;e[56]!==h.isPending||e[57]!==l?(C=!l.trim()||h.isPending,e[56]=h.isPending,e[57]=l,e[58]=C):C=e[58];const L=h.isPending?"Adding…":"Add domain";let w;e[59]!==T||e[60]!==C||e[61]!==L?(w=i.jsx($,{size:"sm",onClick:T,disabled:C,children:L}),e[59]=T,e[60]=C,e[61]=L,e[62]=w):w=e[62];let F;e[63]!==M||e[64]!==w?(F=i.jsxs("div",{className:"flex items-center gap-2 p-4",children:[M,w]}),e[63]=M,e[64]=w,e[65]=F):F=e[65];let G;return e[66]!==O||e[67]!==F?(G=i.jsx(ne,{title:"Email domains",description:"Let people with a matching email domain discover and join this organization.",children:i.jsxs(oe,{children:[O,F]})}),e[66]=O,e[67]=F,e[68]=G):G=e[68],G}function pe(e){return i.jsx(me,{value:e,children:ue[e]},e)}function xe(e){return p.error(e instanceof Error?e.message:"Failed to remove")}function he(e){return p.error(e instanceof Error?e.message:"Failed to verify")}function ge(e){return p.error(e instanceof Error?e.message:"Failed to update")}function je(e){return p.error(e instanceof Error?e.message:"Failed to add domain")}function Ne(e){const t=X.c(16),{recordName:u,recordValue:s}=e,l=ve;let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx("p",{className:"text-muted-foreground",children:"Add this TXT record at your DNS provider, then click Verify:"}),t[0]=x):x=t[0];let r;t[1]!==u?(r=()=>l(u),t[1]=u,t[2]=r):r=t[2];let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("span",{className:"text-muted-foreground",children:"TXT "}),t[3]=c):c=t[3];let d;t[4]!==u||t[5]!==r?(d=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:r,children:[c,u]}),t[4]=u,t[5]=r,t[6]=d):d=t[6];let f;t[7]!==s?(f=()=>l(s),t[7]=s,t[8]=f):f=t[8];let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsx("span",{className:"text-muted-foreground",children:"value "}),t[9]=j):j=t[9];let m;t[10]!==s||t[11]!==f?(m=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:f,children:[j,s]}),t[10]=s,t[11]=f,t[12]=m):m=t[12];let n;return t[13]!==d||t[14]!==m?(n=i.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[x,i.jsxs("div",{className:"grid gap-1",children:[d,m]})]}),t[13]=d,t[14]=m,t[15]=n):n=t[15],n}function ve(e){navigator.clipboard?.writeText(e),p.success("Copied")}export{be as D};
1
+ import{c as X,C as H,n as U,r as W,K as J,m as ee,d as Z,p as te,t as p,j as i,B as $}from"./index-lRedQ_8t.js";import{u as ie}from"./studio-tools-BMyTPyPy.js";import{b as se,S as ne,a as oe}from"./settings-section-Bs1JjdR4.js";import{B as Q}from"./badge-miK_gWS7.js";import{I as ae}from"./input-DOZlS9i9.js";import{S as re,a as le,b as ce,c as de,d as me}from"./select-CxRcXiYy.js";const ue={off:"Off",auto:"Auto-join",request:"Require approval"};function fe(e,t){switch(e){case"auto":return`Anyone with a verified @${t} email joins automatically.`;case"request":return`People with a verified @${t} email can request to join; an admin approves.`;default:return"Not discoverable — no one can find or join through this domain."}}function be(){const e=X.c(69),{org:t}=H(),u=U(),s=ie(),[l,x]=W.useState("");let r;e[0]!==t.id?(r=J.organizationDomains(t.id),e[0]=t.id,e[1]=r):r=e[1];let c;e[2]!==s?(c=()=>s.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==r||e[5]!==c?(d={queryKey:r,queryFn:c},e[4]=r,e[5]=c,e[6]=d):d=e[6];const{data:f,isPending:j}=ee(d);let m;e[7]!==t.id||e[8]!==u?(m=()=>u.invalidateQueries({queryKey:J.organizationDomains(t.id)}),e[7]=t.id,e[8]=u,e[9]=m):m=e[9];const n=m;let N;e[10]!==s?(N=o=>s.call("ORGANIZATION_DOMAIN_ADD",{domain:o}),e[10]=s,e[11]=N):N=e[11];let v;e[12]!==n||e[13]!==t.id?(v=()=>{te("organization_domain_added",{organization_id:t.id}),x(""),n(),p.success("Domain added")},e[12]=n,e[13]=t.id,e[14]=v):v=e[14];let R;e[15]!==N||e[16]!==v?(R={mutationFn:N,onSuccess:v,onError:je},e[15]=N,e[16]=v,e[17]=R):R=e[17];const h=Z(R);let S;e[18]!==s?(S=o=>{const{id:a,joinMode:g}=o;return s.call("ORGANIZATION_DOMAIN_UPDATE",{id:a,joinMode:g})},e[18]=s,e[19]=S):S=e[19];let y;e[20]!==n?(y=()=>{n(),p.success("Join mode updated")},e[20]=n,e[21]=y):y=e[21];let V;e[22]!==S||e[23]!==y?(V={mutationFn:S,onSuccess:y,onError:ge},e[22]=S,e[23]=y,e[24]=V):V=e[24];const P=Z(V);let _;e[25]!==s?(_=o=>s.call("ORGANIZATION_DOMAIN_VERIFY",{id:o}),e[25]=s,e[26]=_):_=e[26];let A;e[27]!==n?(A=o=>{n(),o.verified?p.success("Domain verified"):p.error("TXT record not found yet — DNS can take a few minutes.")},e[27]=n,e[28]=A):A=e[28];let k;e[29]!==_||e[30]!==A?(k={mutationFn:_,onSuccess:A,onError:he},e[29]=_,e[30]=A,e[31]=k):k=e[31];const D=Z(k);let I;e[32]!==s?(I=o=>s.call("ORGANIZATION_DOMAIN_REMOVE",{id:o}),e[32]=s,e[33]=I):I=e[33];let b;e[34]!==n?(b=()=>{n(),p.success("Domain removed")},e[34]=n,e[35]=b):b=e[35];let q;e[36]!==I||e[37]!==b?(q={mutationFn:I,onSuccess:b,onError:xe},e[36]=I,e[37]=b,e[38]=q):q=e[38];const E=Z(q);if(j)return null;let z;e[39]!==f?.domains?(z=f?.domains??[],e[39]=f?.domains,e[40]=z):z=e[40];const K=z;let O;if(e[41]!==K||e[42]!==E||e[43]!==P||e[44]!==D){let o;e[46]!==E||e[47]!==P||e[48]!==D?(o=a=>{const g=a.verificationStatus==="verified";return i.jsx(se,{title:i.jsxs("span",{className:"flex items-center gap-2",children:[a.domain,g?i.jsx(Q,{variant:"secondary",children:"Verified"}):i.jsx(Q,{variant:"outline",children:"Pending"})]}),description:g?fe(a.joinMode,a.domain):"Add the DNS record below, then verify.",action:i.jsxs("div",{className:"flex items-center gap-2",children:[g&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-xs text-muted-foreground",children:"Join mode"}),i.jsxs(re,{value:a.joinMode,onValueChange:Y=>P.mutate({id:a.id,joinMode:Y}),children:[i.jsx(le,{className:"w-44",size:"sm",children:i.jsx(ce,{})}),i.jsx(de,{children:["off","auto","request"].map(pe)})]})]}),!g&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>D.mutate(a.id),disabled:D.isPending,children:"Verify"}),i.jsx($,{size:"sm",variant:"ghost",onClick:()=>E.mutate(a.id),disabled:E.isPending,children:"Remove"})]}),children:!g&&a.recordName&&a.recordValue&&i.jsx(Ne,{recordName:a.recordName,recordValue:a.recordValue})},a.id)},e[46]=E,e[47]=P,e[48]=D,e[49]=o):o=e[49],O=K.map(o),e[41]=K,e[42]=E,e[43]=P,e[44]=D,e[45]=O}else O=e[45];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=o=>x(o.target.value),e[50]=B):B=e[50];let M;e[51]!==l?(M=i.jsx(ae,{value:l,onChange:B,placeholder:"acme.com",className:"max-w-xs"}),e[51]=l,e[52]=M):M=e[52];let T;e[53]!==h||e[54]!==l?(T=()=>h.mutate(l.trim()),e[53]=h,e[54]=l,e[55]=T):T=e[55];let C;e[56]!==h.isPending||e[57]!==l?(C=!l.trim()||h.isPending,e[56]=h.isPending,e[57]=l,e[58]=C):C=e[58];const L=h.isPending?"Adding…":"Add domain";let w;e[59]!==T||e[60]!==C||e[61]!==L?(w=i.jsx($,{size:"sm",onClick:T,disabled:C,children:L}),e[59]=T,e[60]=C,e[61]=L,e[62]=w):w=e[62];let F;e[63]!==M||e[64]!==w?(F=i.jsxs("div",{className:"flex items-center gap-2 p-4",children:[M,w]}),e[63]=M,e[64]=w,e[65]=F):F=e[65];let G;return e[66]!==O||e[67]!==F?(G=i.jsx(ne,{title:"Email domains",description:"Let people with a matching email domain discover and join this organization.",children:i.jsxs(oe,{children:[O,F]})}),e[66]=O,e[67]=F,e[68]=G):G=e[68],G}function pe(e){return i.jsx(me,{value:e,children:ue[e]},e)}function xe(e){return p.error(e instanceof Error?e.message:"Failed to remove")}function he(e){return p.error(e instanceof Error?e.message:"Failed to verify")}function ge(e){return p.error(e instanceof Error?e.message:"Failed to update")}function je(e){return p.error(e instanceof Error?e.message:"Failed to add domain")}function Ne(e){const t=X.c(16),{recordName:u,recordValue:s}=e,l=ve;let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx("p",{className:"text-muted-foreground",children:"Add this TXT record at your DNS provider, then click Verify:"}),t[0]=x):x=t[0];let r;t[1]!==u?(r=()=>l(u),t[1]=u,t[2]=r):r=t[2];let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("span",{className:"text-muted-foreground",children:"TXT "}),t[3]=c):c=t[3];let d;t[4]!==u||t[5]!==r?(d=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:r,children:[c,u]}),t[4]=u,t[5]=r,t[6]=d):d=t[6];let f;t[7]!==s?(f=()=>l(s),t[7]=s,t[8]=f):f=t[8];let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsx("span",{className:"text-muted-foreground",children:"value "}),t[9]=j):j=t[9];let m;t[10]!==s||t[11]!==f?(m=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:f,children:[j,s]}),t[10]=s,t[11]=f,t[12]=m):m=t[12];let n;return t[13]!==d||t[14]!==m?(n=i.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[x,i.jsxs("div",{className:"grid gap-1",children:[d,m]})]}),t[13]=d,t[14]=m,t[15]=n):n=t[15],n}function ve(e){navigator.clipboard?.writeText(e),p.success("Copied")}export{be as D};
@@ -1 +1 @@
1
- import{c as d,j as s,cr as i,l as c}from"./index-C5JCmVQ0.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
1
+ import{c as d,j as s,cr as i,l as c}from"./index-lRedQ_8t.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
@@ -1 +1 @@
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-C5JCmVQ0.js";import{i as $}from"./Check-BbAbdPfp.js";import{i as D}from"./ChevronRight-B9mybD1s.js";import{i as M}from"./Circle-Bj_xS3WU.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
+ 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-lRedQ_8t.js";import{i as $}from"./Check-DYPRi7NO.js";import{i as D}from"./ChevronRight-BARfL9-W.js";import{i as M}from"./Circle-DuelqjM2.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 +1 @@
1
- import{c as v,l as N,j as t}from"./index-C5JCmVQ0.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
1
+ import{c as v,l as N,j as t}from"./index-lRedQ_8t.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};