decocms 2.176.0 → 2.176.2

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 (318) hide show
  1. package/dist/client/assets/{AlertCircle-PBJUtpjc.js → AlertCircle-BWr4XQe9.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-CddYwC43.js → AlignLeft-BJyvDaBk.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-LiBnMzQV.js → ArrowDown-BPMtK04S.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BHzi0YLf.js → ArrowLeft-GOjXvqCa.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-WIHiBhdv.js → ArrowUp-DqOjcDuh.js} +1 -1
  6. package/dist/client/assets/{Building02-c7FCt8-6.js → Building02-D_v8ZXC2.js} +1 -1
  7. package/dist/client/assets/{Check-Bme4aNg5.js → Check-DAFdA2oM.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-BSVa-h_Y.js → CheckCircle-BL2mIAJn.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-e9BOcL0K.js → CheckVerified02-YYsvmiw4.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-jyPVRLzp.js → ChevronDown-C-3qjfHK.js} +1 -1
  11. package/dist/client/assets/{ChevronLeft-Bn35AKxx.js → ChevronLeft-Dugo1z8_.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-Ct9VK1GH.js → ChevronRight-B3gSyJmK.js} +1 -1
  13. package/dist/client/assets/{ChevronUp-B5BOcmGB.js → ChevronUp-Rk5dLXNx.js} +1 -1
  14. package/dist/client/assets/{Clock-Bwl2wOhM.js → Clock-Ccv6eV04.js} +1 -1
  15. package/dist/client/assets/{Code01-DygQPwlG.js → Code01-CoEt5nyY.js} +1 -1
  16. package/dist/client/assets/{Container-BeAIfNvy.js → Container-CQmXt7Nc.js} +1 -1
  17. package/dist/client/assets/{Copy01-ekqsSfJN.js → Copy01-D7uh0hW0.js} +1 -1
  18. package/dist/client/assets/{Dataflow03-BGqN1hrV.js → Dataflow03-ccC0qbkR.js} +1 -1
  19. package/dist/client/assets/{DotsHorizontal-BYFCLgks.js → DotsHorizontal-C3QGwRko.js} +1 -1
  20. package/dist/client/assets/{DotsVertical-Dn5mVo7u.js → DotsVertical-D5tMnzaQ.js} +1 -1
  21. package/dist/client/assets/{Download01-DQJbGhrI.js → Download01-BDm0aKH5.js} +1 -1
  22. package/dist/client/assets/{Edit01-BxDvpu_b.js → Edit01-DEd4k1xo.js} +1 -1
  23. package/dist/client/assets/{Edit05-Bta0rpFO.js → Edit05-RRC6ol7j.js} +1 -1
  24. package/dist/client/assets/{Eye-DN-kY_sb.js → Eye-MRRTHIte.js} +1 -1
  25. package/dist/client/assets/{EyeOff-E0TupCAH.js → EyeOff-CgRP1cSC.js} +1 -1
  26. package/dist/client/assets/{File02-Cyzf2kpD.js → File02-DdRvGWJN.js} +1 -1
  27. package/dist/client/assets/{File06-Ba0KxpWu.js → File06-DbRSeish.js} +1 -1
  28. package/dist/client/assets/{FilterLines-Ce9H-AFe.js → FilterLines-nV8jE7JI.js} +1 -1
  29. package/dist/client/assets/{Globe01-Cks65mCV.js → Globe01-Bb7jNfEM.js} +1 -1
  30. package/dist/client/assets/{Globe02-CB2InS06.js → Globe02-CDBspixd.js} +1 -1
  31. package/dist/client/assets/{Grid01-BvWQ72pJ.js → Grid01-COkHqk9k.js} +1 -1
  32. package/dist/client/assets/{Home02-C33y4DXe.js → Home02-Bjdq3zLu.js} +1 -1
  33. package/dist/client/assets/{Image01-B9BH_f0p.js → Image01-D4-tispo.js} +1 -1
  34. package/dist/client/assets/{Inbox01-ZPruuuHz.js → Inbox01-DiWhz3sk.js} +1 -1
  35. package/dist/client/assets/{InfoCircle-ETSHVG2F.js → InfoCircle-tftxVx0C.js} +1 -1
  36. package/dist/client/assets/{Key01-CdH7i8vY.js → Key01-Cv0XYLbb.js} +1 -1
  37. package/dist/client/assets/{LayersTwo01-8gQGsURS.js → LayersTwo01-DdRcHsrK.js} +1 -1
  38. package/dist/client/assets/{LayoutLeft-Bn9kcy6T.js → LayoutLeft-BuqgN7z4.js} +1 -1
  39. package/dist/client/assets/{Link01-B4s1G5Jr.js → Link01-Bo114MSv.js} +1 -1
  40. package/dist/client/assets/{LinkExternal01-B5VTVW6k.js → LinkExternal01-Div7VvWd.js} +1 -1
  41. package/dist/client/assets/{List-BU70NJSh.js → List-_Z2X7aPf.js} +1 -1
  42. package/dist/client/assets/{Loading01-Dt16NixZ.js → Loading01-BYjTtpy0.js} +1 -1
  43. package/dist/client/assets/{Lock01-DZeZ3WxC.js → Lock01-j13GCiRT.js} +1 -1
  44. package/dist/client/assets/{Play-WAyK_VUq.js → Play-BOK5c4Hp.js} +1 -1
  45. package/dist/client/assets/{Plus-DN4FtVmx.js → Plus-1vH_gFoY.js} +1 -1
  46. package/dist/client/assets/{RefreshCcw01-B88e0cNw.js → RefreshCcw01-ghOVEWuz.js} +1 -1
  47. package/dist/client/assets/{Save01-BCInJWrH.js → Save01-43mxrIvD.js} +1 -1
  48. package/dist/client/assets/{SearchMd-BQseJVRu.js → SearchMd-Dn4cWwEm.js} +1 -1
  49. package/dist/client/assets/{Settings01-CS4vVmx5.js → Settings01-B3FNPQBg.js} +1 -1
  50. package/dist/client/assets/{Shield01-BZpNsAZG.js → Shield01-0suO3hAe.js} +1 -1
  51. package/dist/client/assets/{Terminal-BDeJ6lHB.js → Terminal-CvfSVl9m.js} +1 -1
  52. package/dist/client/assets/{Tool01-xNX6v26H.js → Tool01-3i6uRXKJ.js} +1 -1
  53. package/dist/client/assets/{Trash01-PnuUudMl.js → Trash01-Dmi4vR7Q.js} +1 -1
  54. package/dist/client/assets/{Upload01-CSDtabhZ.js → Upload01-Cqh5tD2o.js} +1 -1
  55. package/dist/client/assets/{Users03-rAyzQyh3.js → Users03-CUiUl0DH.js} +1 -1
  56. package/dist/client/assets/{X-CxZVsh3L.js → X-Car5B1de.js} +1 -1
  57. package/dist/client/assets/{XClose-hdsxwv2G.js → XClose-D08ltwBw.js} +1 -1
  58. package/dist/client/assets/{Zap-azdz5wfI.js → Zap-CbjhdbUU.js} +1 -1
  59. package/dist/client/assets/{agent-connections-preview-XZw5-X3u.js → agent-connections-preview-Dv4euUYL.js} +1 -1
  60. package/dist/client/assets/{agent-detail-BJSxCMs1.js → agent-detail-BignzT6b.js} +1 -1
  61. package/dist/client/assets/{agents-DQWRQl2B.js → agents-DRDlT25N.js} +1 -1
  62. package/dist/client/assets/{ai-providers-logos-DPOiBl7V.js → ai-providers-logos-4n_w8l7D.js} +1 -1
  63. package/dist/client/assets/{alert-dialog-DdwA_v8c.js → alert-dialog-BZtQAioB.js} +1 -1
  64. package/dist/client/assets/{auth-catchall-WCsr2pQN.js → auth-catchall-BorI3Y5Q.js} +1 -1
  65. package/dist/client/assets/{automation-detail-BZk6VK2r.js → automation-detail-MAP63xhb.js} +1 -1
  66. package/dist/client/assets/{automations-B0oZ4Oep.js → automations-CXEh0WQH.js} +1 -1
  67. package/dist/client/assets/{avatar-CXKBBJaI.js → avatar-DEdDAQ0j.js} +1 -1
  68. package/dist/client/assets/{badge-BfLRgdaW.js → badge-BTw8dF6C.js} +1 -1
  69. package/dist/client/assets/{binder-B5Q0NNkg.js → binder-B2xnCBeC.js} +1 -1
  70. package/dist/client/assets/{breadcrumb-BhQI8Xw3.js → breadcrumb-CcE89MsN.js} +1 -1
  71. package/dist/client/assets/{card-B8QXMrj8.js → card-B6XTMOTf.js} +1 -1
  72. package/dist/client/assets/{checkbox-C5Om9oxx.js → checkbox-BA_JFbx4.js} +1 -1
  73. package/dist/client/assets/{collapsible-MCSgly5t.js → collapsible-CW12HasT.js} +1 -1
  74. package/dist/client/assets/{collection-detail-CrytnlOI.js → collection-detail-DTZ81ye0.js} +1 -1
  75. package/dist/client/assets/{collection-display-button-D7NovPlc.js → collection-display-button-BJQ_VSFQ.js} +1 -1
  76. package/dist/client/assets/{collection-search-DDX1Zkg7.js → collection-search-D6ILFEtf.js} +1 -1
  77. package/dist/client/assets/{collection-table-wrapper-YGokzak8.js → collection-table-wrapper-D0JGm79B.js} +1 -1
  78. package/dist/client/assets/{collection-tabs-D8NPXaOU.js → collection-tabs-fsXO7rse.js} +1 -1
  79. package/dist/client/assets/{command-BVlE6-p8.js → command-DwfoahUI.js} +1 -1
  80. package/dist/client/assets/{connection-card-D0Hulz9h.js → connection-card-CoZ_ixiG.js} +1 -1
  81. package/dist/client/assets/{connection-detail-C-Ge5CVn.js → connection-detail-BPi4jlBF.js} +1 -1
  82. package/dist/client/assets/{connection-status-CxcA3Thg.js → connection-status-CulzjjXt.js} +1 -1
  83. package/dist/client/assets/{connections-DWyHpNQR.js → connections-2fSWPLii.js} +1 -1
  84. package/dist/client/assets/{constants-CKGlP4oN.js → constants-CLw0F8Mm.js} +1 -1
  85. package/dist/client/assets/constants-D3bMpbG0.js +1 -0
  86. package/dist/client/assets/{context-ow-zK3BP.js → context-ClUgEsLK.js} +1 -1
  87. package/dist/client/assets/{create-organization-dialog-CFn_U9MK.js → create-organization-dialog-CNZiViYc.js} +1 -1
  88. package/dist/client/assets/{create-project-dialog-Rt5_XeVq.js → create-project-dialog-QYAKiAC_.js} +1 -1
  89. package/dist/client/assets/{danger-CgzhgW7h.js → danger-1mM9iHWV.js} +1 -1
  90. package/dist/client/assets/{danger-zone-CvDs5VVH.js → danger-zone-DSO2EIjr.js} +1 -1
  91. package/dist/client/assets/{dependencies-BbmKfxYe.js → dependencies-DtSMIESZ.js} +1 -1
  92. package/dist/client/assets/{dialog-COv8XUO0.js → dialog-ZIc7OUaM.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-Cr1iKfFo.js → dropdown-menu-EcTFyr4x.js} +1 -1
  94. package/dist/client/assets/{dynamic-plugin-layout-BIVc19gr.js → dynamic-plugin-layout-D40fWFup.js} +1 -1
  95. package/dist/client/assets/{editable-task-title-CrGgc8Hx.js → editable-task-title-CeJC7Fwa.js} +1 -1
  96. package/dist/client/assets/{empty-state-DsQ7yRoE.js → empty-state-gZUVmgL7.js} +1 -1
  97. package/dist/client/assets/{empty-state-CsEI90cv.js → empty-state-m7QcZ687.js} +1 -1
  98. package/dist/client/assets/{env-vars-editor-r00KzDtj.js → env-vars-editor-CIM7XauD.js} +1 -1
  99. package/dist/client/assets/{extract-connection-data-D46U8dB4.js → extract-connection-data-DEaEvOm7.js} +1 -1
  100. package/dist/client/assets/{file-browser-C8BCEBfL.js → file-browser-ChPNBU91.js} +2 -2
  101. package/dist/client/assets/{form-CZrleug2.js → form-Cd_AEgzv.js} +1 -1
  102. package/dist/client/assets/{general-39EgW9sq.js → general-mH6Dkpor.js} +1 -1
  103. package/dist/client/assets/{grid-view-CYvRmpTY.js → grid-view-C9tD8dqF.js} +1 -1
  104. package/dist/client/assets/{home-CwDvuqcO.js → home-icifeNIm.js} +1 -1
  105. package/dist/client/assets/{index-cEL2CgNm.js → index-BPs3Pxaa.js} +1 -1
  106. package/dist/client/assets/{index-Bc75bxbq.js → index-Bg2XE05Y.js} +1 -1
  107. package/dist/client/assets/{index-B23wyLB_.js → index-BrqeZa9X.js} +1 -1
  108. package/dist/client/assets/{index-DRLd-piX.js → index-CRi6734Z.js} +1 -1
  109. package/dist/client/assets/{index-CVyJGNS2.js → index-CfjT_Fv-.js} +1 -1
  110. package/dist/client/assets/{index-CT-515LV.js → index-Cg4edYBM.js} +1 -1
  111. package/dist/client/assets/{index-sEMWxAyS.js → index-Cz_J9f63.js} +1 -1
  112. package/dist/client/assets/{index-CsqngJxb.js → index-DKWOGpkx.js} +1 -1
  113. package/dist/client/assets/{index-BlBXXIdz.js → index-Dk4FCobs.js} +1 -1
  114. package/dist/client/assets/{index-iqPDmcBY.js → index-DxqOk4x4.js} +1 -1
  115. package/dist/client/assets/{index-B_DxRVw1.js → index-OyLnxARk.js} +3 -3
  116. package/dist/client/assets/{infiniteQueryObserver-DNhlrWmr.js → infiniteQueryObserver-BkZg7AVk.js} +1 -1
  117. package/dist/client/assets/{input-DqwWeNgs.js → input-B4YrZuiK.js} +1 -1
  118. package/dist/client/assets/{integration-icon-Dv0HduyT.js → integration-icon-B3aufi6R.js} +1 -1
  119. package/dist/client/assets/{label--AQoxbpU.js → label-BoRKSV_h.js} +1 -1
  120. package/dist/client/assets/{layout-Cji69-Fr.js → layout-C2-eT_B4.js} +1 -1
  121. package/dist/client/assets/{layout-CDyeWvbl.js → layout-DwPAPIK-.js} +1 -1
  122. package/dist/client/assets/{login-D1A8YvmQ.js → login-CYxKPB-k.js} +1 -1
  123. package/dist/client/assets/{logo-upload-BlIbeyor.js → logo-upload-DsXuRpYi.js} +1 -1
  124. package/dist/client/assets/{mcp-app-renderer-D7CJTHIn.js → mcp-app-renderer-KZyUYhBW.js} +1 -1
  125. package/dist/client/assets/{mcp-server-card-PhaJL10h.js → mcp-server-card-mO0UAT9W.js} +1 -1
  126. package/dist/client/assets/{mcp-server-detail-BInJ9Okh.js → mcp-server-detail-CyByMkle.js} +2 -2
  127. package/dist/client/assets/{members-WK1ZXtTy.js → members-3oNbzlXC.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-Dgc89AWr.js → monaco-editor-DDZgyrgO.js} +1 -1
  129. package/dist/client/assets/{monitoring-Co1Fc87j.js → monitoring-Xs5hJ6u_.js} +1 -1
  130. package/dist/client/assets/{monitoring-dashboard-edit-BllFPC-c.js → monitoring-dashboard-edit-C_1U7sTf.js} +1 -1
  131. package/dist/client/assets/{monitoring-dashboard-view-CztiwjLo.js → monitoring-dashboard-view-DcMyYV2C.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-C4WAOhN_.js → monitoring-stats-row-CIKRC_fM.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-ai-provider-Bcscfh1C.js → oauth-callback-ai-provider-CX0oMmvR.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-oApNt2lX.js → oauth-callback-kezpwk-4.js} +1 -1
  135. package/dist/client/assets/{org-ai-providers-BHi1kOOt.js → org-ai-providers-dfJpkNdu.js} +1 -1
  136. package/dist/client/assets/{page-Dpk4jTO5.js → page-Y307a-9q.js} +1 -1
  137. package/dist/client/assets/{page-BZV8vSMw.js → page-y0K-3s3k.js} +1 -1
  138. package/dist/client/assets/{plugin-empty-state-BqFvCCv9.js → plugin-empty-state-BB0mg-1W.js} +1 -1
  139. package/dist/client/assets/{plugin-empty-state-DGylhF1c.js → plugin-empty-state-DwyPPEO0.js} +1 -1
  140. package/dist/client/assets/{plugin-header-B9UGjso3.js → plugin-header-BMLNemwj.js} +1 -1
  141. package/dist/client/assets/{plugin-header-CMHji8Df.js → plugin-header-DNeIXlLi.js} +1 -1
  142. package/dist/client/assets/plugins-CVEdGukW.js +1 -0
  143. package/dist/client/assets/{popover-DOnHuwq3.js → popover-BKHsia9C.js} +1 -1
  144. package/dist/client/assets/{project-app-view-fPmiutKj.js → project-app-view-C7kPLPhi.js} +1 -1
  145. package/dist/client/assets/{project-layout-CDVw6pd9.js → project-layout-C_1_eCl-.js} +1 -1
  146. package/dist/client/assets/{project-plugins-DwwhiaLk.js → project-plugins-BgoKgZwd.js} +1 -1
  147. package/dist/client/assets/{projects-list-BY_yiyPl.js → projects-list-B3H-urrL.js} +1 -1
  148. package/dist/client/assets/{registry-layout-4qwa3Yrl.js → registry-layout-BHOAsCzG.js} +1 -1
  149. package/dist/client/assets/{registry-utils--TC_kKCq.js → registry-utils-D0qx2c0_.js} +1 -1
  150. package/dist/client/assets/{reset-password-ChK1U3PS.js → reset-password-o3nCvS90.js} +1 -1
  151. package/dist/client/assets/{resizable-DXBCOl3J.js → resizable-1OPd79St.js} +1 -1
  152. package/dist/client/assets/{save-actions-ChdDeTz6.js → save-actions-DQ0FV8E3.js} +1 -1
  153. package/dist/client/assets/{scroll-area-ACn8ZLYT.js → scroll-area-BSQHcCri.js} +1 -1
  154. package/dist/client/assets/{select-BM9jpLT2.js → select-Ctls6rHz.js} +1 -1
  155. package/dist/client/assets/{select-virtual-mcp-DzKjKtT5.js → select-virtual-mcp-CEX-N6yN.js} +1 -1
  156. package/dist/client/assets/{sheet-DCDIRpJJ.js → sheet-MAyp9_-H.js} +1 -1
  157. package/dist/client/assets/{shell-layout-BTXUcCYK.js → shell-layout-8MdYJa94.js} +2 -2
  158. package/dist/client/assets/{sidebar-settings-Dy0o9qBx.js → sidebar-settings-BtI4Obrm.js} +1 -1
  159. package/dist/client/assets/{skeleton-BkpiIfDB.js → skeleton-DAvz6Hk5.js} +1 -1
  160. package/dist/client/assets/{spinner-tJ67zxkj.js → spinner-CItj22uq.js} +1 -1
  161. package/dist/client/assets/{store-invite-CTVa-Zvm.js → store-invite-Dr9c1QQu.js} +1 -1
  162. package/dist/client/assets/{switch-BE6ziGyo.js → switch-BunRXVYQ.js} +1 -1
  163. package/dist/client/assets/{table-BOA7X4H8.js → table-DHN8Pbh9.js} +1 -1
  164. package/dist/client/assets/{tabs-BQ5doEBy.js → tabs-kzZLmFuM.js} +1 -1
  165. package/dist/client/assets/{task-status-B3QSknHK.js → task-status-D6cPLJpA.js} +1 -1
  166. package/dist/client/assets/tasks-CZAS_EEA.js +1 -0
  167. package/dist/client/assets/{tasks-panel-BXchRGWe.js → tasks-panel-6uv7gp5j.js} +1 -1
  168. package/dist/client/assets/{textarea-BDS2584p.js → textarea-CpLkXx5p.js} +1 -1
  169. package/dist/client/assets/{time-range-picker-CWEE6Pax.js → time-range-picker-CYn_bf9F.js} +1 -1
  170. package/dist/client/assets/{toggle-group-B9XVwguR.js → toggle-group-C-kSfPqI.js} +1 -1
  171. package/dist/client/assets/{tools-list-DO_G3ceo.js → tools-list-GuN2kaNF.js} +1 -1
  172. package/dist/client/assets/{tooltip-Bm11lCIm.js → tooltip--UA5heKX.js} +1 -1
  173. package/dist/client/assets/{topbar-portal-XGVG-nsS.js → topbar-portal-M3PPIThx.js} +1 -1
  174. package/dist/client/assets/{types-BnNswHwQ.js → types-DoomhLgW.js} +1 -1
  175. package/dist/client/assets/{use-automations-nu85KLSx.js → use-automations-D5ELbflL.js} +1 -1
  176. package/dist/client/assets/{use-collections-aokT1D_C.js → use-collections-DXLoMYCx.js} +1 -1
  177. package/dist/client/assets/{use-connection-DA77pjoV.js → use-connection-B7ll8uNa.js} +1 -1
  178. package/dist/client/assets/{use-copy-CPgIfOPM.js → use-copy-XD9UDj7l.js} +1 -1
  179. package/dist/client/assets/{use-create-virtual-mcp-Dd303mOp.js → use-create-virtual-mcp-BvSTYw2n.js} +1 -1
  180. package/dist/client/assets/{use-infinite-scroll-DXKnZJHX.js → use-infinite-scroll-CSG4wWka.js} +1 -1
  181. package/dist/client/assets/{use-install-from-registry-C_csgcCs.js → use-install-from-registry-1KLotWZ_.js} +1 -1
  182. package/dist/client/assets/{use-list-state-CFQBiz4L.js → use-list-state-CVKHwo0P.js} +1 -1
  183. package/dist/client/assets/{use-mcp-prompts-Dw4CvfV3.js → use-mcp-prompts-DyPVjaKa.js} +1 -1
  184. package/dist/client/assets/{use-mcp-resources-CFkkQw1d.js → use-mcp-resources-CFTlLllB.js} +1 -1
  185. package/dist/client/assets/{use-mcp-tools-C3Vj1u8m.js → use-mcp-tools-S01H2JtZ.js} +1 -1
  186. package/dist/client/assets/{use-members-BbXqk449.js → use-members-BXkvGAIM.js} +1 -1
  187. package/dist/client/assets/{use-mobile-BarAf2zx.js → use-mobile-CgJAXGMs.js} +1 -1
  188. package/dist/client/assets/{use-project-CPyjDcpX.js → use-project-C2o9r0US.js} +1 -1
  189. package/dist/client/assets/{use-store-discovery-DupAMgFS.js → use-store-discovery-W6XcrfUT.js} +1 -1
  190. package/dist/client/assets/{use-view-mode-qVlfLymN.js → use-view-mode-CGzXYNrX.js} +1 -1
  191. package/dist/client/assets/{use-virtual-mcp-FAfRsySa.js → use-virtual-mcp-B8SbBr9v.js} +1 -1
  192. package/dist/client/assets/useInfiniteQuery-C9KaycVy.js +1 -0
  193. package/dist/client/assets/{useMutation-d1AXy22c.js → useMutation-B_6d8oLI.js} +1 -1
  194. package/dist/client/assets/useQuery-Brtj4EoG.js +1 -0
  195. package/dist/client/assets/useSuspenseInfiniteQuery-DD7d1y3B.js +1 -0
  196. package/dist/client/assets/{user-z34A3977.js → user-BLAfg6Ev.js} +1 -1
  197. package/dist/client/assets/{workflow-D77B4RT7.js → workflow-DHe_PiQF.js} +1 -1
  198. package/dist/client/index.html +1 -1
  199. package/dist/server/cli.js +230 -230
  200. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  201. package/dist/server/node_modules/pg-int8/README.md +16 -0
  202. package/dist/server/node_modules/pg-int8/index.js +100 -0
  203. package/dist/server/node_modules/pg-int8/package.json +24 -0
  204. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  205. package/dist/server/node_modules/{xtend/LICENSE → postgres-bytea/license} +2 -1
  206. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  207. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  208. package/dist/server/node_modules/postgres-date/index.js +116 -0
  209. package/dist/server/node_modules/{pg-connection-string/LICENSE → postgres-date/license} +5 -5
  210. package/dist/server/node_modules/postgres-date/package.json +33 -0
  211. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  212. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  213. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  214. package/dist/server/node_modules/{pg-cloudflare/LICENSE → postgres-interval/license} +6 -6
  215. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  216. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  217. package/dist/server/node_modules/split2/LICENSE +13 -0
  218. package/dist/server/node_modules/split2/README.md +85 -0
  219. package/dist/server/node_modules/split2/bench.js +27 -0
  220. package/dist/server/node_modules/split2/index.js +141 -0
  221. package/dist/server/node_modules/split2/package.json +39 -0
  222. package/dist/server/node_modules/split2/test.js +409 -0
  223. package/dist/server/server.js +2 -2
  224. package/package.json +1 -1
  225. package/dist/client/assets/constants-DqZ0hFNm.js +0 -1
  226. package/dist/client/assets/plugins-DcIPR0Gj.js +0 -1
  227. package/dist/client/assets/tasks-BqsZZgtJ.js +0 -1
  228. package/dist/client/assets/useInfiniteQuery-CCGqKrT7.js +0 -1
  229. package/dist/client/assets/useQuery-B8Io0Oda.js +0 -1
  230. package/dist/client/assets/useSuspenseInfiniteQuery-DsCmMd3U.js +0 -1
  231. package/dist/server/node_modules/pg-cloudflare/README.md +0 -112
  232. package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +0 -2
  233. package/dist/server/node_modules/pg-cloudflare/dist/empty.js +0 -6
  234. package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +0 -1
  235. package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +0 -31
  236. package/dist/server/node_modules/pg-cloudflare/dist/index.js +0 -152
  237. package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +0 -1
  238. package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +0 -3
  239. package/dist/server/node_modules/pg-cloudflare/package.json +0 -39
  240. package/dist/server/node_modules/pg-cloudflare/src/empty.ts +0 -3
  241. package/dist/server/node_modules/pg-cloudflare/src/index.ts +0 -166
  242. package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +0 -25
  243. package/dist/server/node_modules/pg-connection-string/README.md +0 -105
  244. package/dist/server/node_modules/pg-connection-string/esm/index.mjs +0 -8
  245. package/dist/server/node_modules/pg-connection-string/index.d.ts +0 -36
  246. package/dist/server/node_modules/pg-connection-string/index.js +0 -231
  247. package/dist/server/node_modules/pg-connection-string/package.json +0 -52
  248. package/dist/server/node_modules/pg-pool/LICENSE +0 -21
  249. package/dist/server/node_modules/pg-pool/README.md +0 -357
  250. package/dist/server/node_modules/pg-pool/esm/index.mjs +0 -5
  251. package/dist/server/node_modules/pg-pool/index.js +0 -517
  252. package/dist/server/node_modules/pg-pool/package.json +0 -51
  253. package/dist/server/node_modules/pg-protocol/LICENSE +0 -21
  254. package/dist/server/node_modules/pg-protocol/README.md +0 -3
  255. package/dist/server/node_modules/pg-protocol/dist/b.d.ts +0 -1
  256. package/dist/server/node_modules/pg-protocol/dist/b.js +0 -23
  257. package/dist/server/node_modules/pg-protocol/dist/b.js.map +0 -1
  258. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +0 -15
  259. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +0 -55
  260. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +0 -1
  261. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +0 -16
  262. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +0 -81
  263. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +0 -1
  264. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +0 -1
  265. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +0 -530
  266. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +0 -1
  267. package/dist/server/node_modules/pg-protocol/dist/index.d.ts +0 -6
  268. package/dist/server/node_modules/pg-protocol/dist/index.js +0 -15
  269. package/dist/server/node_modules/pg-protocol/dist/index.js.map +0 -1
  270. package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +0 -162
  271. package/dist/server/node_modules/pg-protocol/dist/messages.js +0 -160
  272. package/dist/server/node_modules/pg-protocol/dist/messages.js.map +0 -1
  273. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +0 -1
  274. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +0 -252
  275. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +0 -1
  276. package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +0 -24
  277. package/dist/server/node_modules/pg-protocol/dist/parser.js +0 -324
  278. package/dist/server/node_modules/pg-protocol/dist/parser.js.map +0 -1
  279. package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +0 -42
  280. package/dist/server/node_modules/pg-protocol/dist/serializer.js +0 -189
  281. package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +0 -1
  282. package/dist/server/node_modules/pg-protocol/esm/index.js +0 -11
  283. package/dist/server/node_modules/pg-protocol/package.json +0 -45
  284. package/dist/server/node_modules/pg-protocol/src/b.ts +0 -25
  285. package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +0 -58
  286. package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +0 -85
  287. package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +0 -575
  288. package/dist/server/node_modules/pg-protocol/src/index.ts +0 -11
  289. package/dist/server/node_modules/pg-protocol/src/messages.ts +0 -262
  290. package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +0 -276
  291. package/dist/server/node_modules/pg-protocol/src/parser.ts +0 -413
  292. package/dist/server/node_modules/pg-protocol/src/serializer.ts +0 -274
  293. package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +0 -67
  294. package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +0 -166
  295. package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +0 -1
  296. package/dist/server/node_modules/pg-types/.travis.yml +0 -7
  297. package/dist/server/node_modules/pg-types/Makefile +0 -14
  298. package/dist/server/node_modules/pg-types/README.md +0 -75
  299. package/dist/server/node_modules/pg-types/index.d.ts +0 -137
  300. package/dist/server/node_modules/pg-types/index.js +0 -47
  301. package/dist/server/node_modules/pg-types/index.test-d.ts +0 -21
  302. package/dist/server/node_modules/pg-types/lib/arrayParser.js +0 -11
  303. package/dist/server/node_modules/pg-types/lib/binaryParsers.js +0 -257
  304. package/dist/server/node_modules/pg-types/lib/builtins.js +0 -73
  305. package/dist/server/node_modules/pg-types/lib/textParsers.js +0 -215
  306. package/dist/server/node_modules/pg-types/package.json +0 -42
  307. package/dist/server/node_modules/pg-types/test/index.js +0 -24
  308. package/dist/server/node_modules/pg-types/test/types.js +0 -597
  309. package/dist/server/node_modules/pgpass/README.md +0 -74
  310. package/dist/server/node_modules/pgpass/lib/helper.js +0 -233
  311. package/dist/server/node_modules/pgpass/lib/index.js +0 -23
  312. package/dist/server/node_modules/pgpass/package.json +0 -41
  313. package/dist/server/node_modules/xtend/.jshintrc +0 -30
  314. package/dist/server/node_modules/xtend/README.md +0 -32
  315. package/dist/server/node_modules/xtend/immutable.js +0 -19
  316. package/dist/server/node_modules/xtend/mutable.js +0 -17
  317. package/dist/server/node_modules/xtend/package.json +0 -55
  318. package/dist/server/node_modules/xtend/test.js +0 -103
@@ -1 +1 @@
1
- import{c as Y,r as D,j as s,y as ce,B as te,e as ue,u as me,ab as xe,ac as pe,O as ge,f as Re,au as Te,bU as oe,K as Pe,aw as ze,E as $e,av as ke}from"./index-B_DxRVw1.js";import{a as Le,P as se}from"./index-CsqngJxb.js";import{B as Ee,a as Oe,b as Fe,c as Ke}from"./breadcrumb-BhQI8Xw3.js";import{i as he}from"./FilterLines-Ce9H-AFe.js";import{n as je}from"./Inbox01-ZPruuuHz.js";import{i as le}from"./Loading01-Dt16NixZ.js";import{i as ye}from"./SearchMd-BQseJVRu.js";import{u as Ae}from"./use-store-discovery-DupAMgFS.js";import{u as _e,a as ve,b as Be}from"./use-connection-DA77pjoV.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ge,u as Ue}from"./registry-utils--TC_kKCq.js";import{C as Ve}from"./collection-search-DDX1Zkg7.js";import{M as ae}from"./mcp-server-card-PhaJL10h.js";import{I as We}from"./input-DqwWeNgs.js";import{b as be,P as Ne,a as Ce}from"./popover-DOnHuwq3.js";import{i as Se}from"./Check-Bme4aNg5.js";import{t as we}from"./ChevronDown-jyPVRLzp.js";import{s as re}from"./XClose-hdsxwv2G.js";import{s as He}from"./Plus-DN4FtVmx.js";import{E as qe}from"./empty-state-DsQ7yRoE.js";import{u as Je}from"./useQuery-B8Io0Oda.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-CKGlP4oN.js";import"./useMutation-d1AXy22c.js";import"./tooltip-Bm11lCIm.js";import"./index-DRLd-piX.js";import"./ChevronRight-Ct9VK1GH.js";import"./useInfiniteQuery-CCGqKrT7.js";import"./infiniteQueryObserver-DNhlrWmr.js";import"./use-collections-aokT1D_C.js";import"./binder-B5Q0NNkg.js";import"./CheckVerified02-e9BOcL0K.js";import"./Globe02-CB2InS06.js";import"./Lock01-DZeZ3WxC.js";import"./Terminal-BDeJ6lHB.js";import"./card-B8QXMrj8.js";import"./integration-icon-Dv0HduyT.js";import"./Container-BeAIfNvy.js";function tt(t,e){const r=Y.c(4),[l,d]=D.useState(t),o=D.useRef(null),n=D.useRef(!0);let a,f;return r[0]!==e||r[1]!==t?(a=()=>{if(n.current){n.current=!1;return}return o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d(t)},e),()=>{o.current&&clearTimeout(o.current)}},f=[t,e],r[0]=e,r[1]=t,r[2]=a,r[3]=f):(a=r[2],f=r[3]),D.useEffect(a,f),l}function st(t){const e=Y.c(14),r=D.useRef(null),l=`scroll-position:${t}`,d=D.useRef(null);let o;e[0]!==l?(o=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=o):o=e[1];const n=o;let a;e[2]!==l?(a=()=>{if(d.current===l)return;const p=sessionStorage.getItem(l);if(p&&r.current){const k=Number.parseInt(p,10);r.current.scrollTop=k}d.current=l},e[2]=l,e[3]=a):a=e[3];const f=a;let c;e[4]!==f||e[5]!==l?(c=()=>{d.current!==l&&f()},e[4]=f,e[5]=l,e[6]=c):c=e[6];const T=c;let m;e[7]!==f||e[8]!==l?(m=p=>{r.current=p,p&&d.current!==l&&requestAnimationFrame(()=>{f()})},e[7]=f,e[8]=l,e[9]=m):m=e[9];const x=m;let i;return e[10]!==T||e[11]!==n||e[12]!==x?(i={scrollRef:x,saveScrollPosition:n,handleScroll:T},e[10]=T,e[11]=n,e[12]=x,e[13]=i):i=e[13],i}function rt(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function fe(t){const e=Y.c(52),{label:r,items:l,selectedItems:d,onToggle:o,onClear:n}=t,[a,f]=D.useState(""),[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y,L,v,b;if(e[0]!==l||e[1]!==r||e[2]!==o||e[3]!==c||e[4]!==a||e[5]!==d){const S=[...a?l.filter(F=>F.value.toLowerCase().includes(a.toLowerCase())):l].sort(lt);i=d.length,x=be,L=c,v=T;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let w;e[19]!==i?(w=i>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:i}),e[19]=i,e[20]=w):w=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(we,{size:14,className:"opacity-50"}),e[21]=h):h=e[21],e[22]!==w||e[23]!==g?(b=s.jsx(Ne,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,w,h]})}),e[22]=w,e[23]=g,e[24]=b):b=e[24],m=Ce,C="w-64 p-0",R="start";let E;e[25]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ye,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=E):E=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const O=`Search ${I}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=F=>f(F.target.value),e[28]=A):A=e[28],e[29]!==a||e[30]!==O?(y=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[E,s.jsx(We,{type:"text",placeholder:O,value:a,onChange:A,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=a,e[30]=O,e[31]=y):y=e[31],p="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",k=S.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):S.map(F=>{const H=d.includes(F.value);return s.jsxs("button",{onClick:()=>o(F.value),className:ce("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",H?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[H&&s.jsx(Se,{size:16,className:"text-muted-foreground shrink-0"}),F.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:F.count})]},F.value)}),e[0]=l,e[1]=r,e[2]=o,e[3]=c,e[4]=a,e[5]=d,e[6]=m,e[7]=x,e[8]=i,e[9]=p,e[10]=k,e[11]=C,e[12]=R,e[13]=y,e[14]=L,e[15]=v,e[16]=b}else m=e[6],x=e[7],i=e[8],p=e[9],k=e[10],C=e[11],R=e[12],y=e[13],L=e[14],v=e[15],b=e[16];let N;e[32]!==p||e[33]!==k?(N=s.jsx("div",{className:p,children:k}),e[32]=p,e[33]=k,e[34]=N):N=e[34];let z;e[35]!==r||e[36]!==n||e[37]!==i?(z=i>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(te,{variant:"ghost",size:"sm",onClick:n,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=n,e[37]=i,e[38]=z):z=e[38];let $;e[39]!==m||e[40]!==z||e[41]!==C||e[42]!==R||e[43]!==y||e[44]!==N?($=s.jsxs(m,{className:C,align:R,children:[y,N,z]}),e[39]=m,e[40]=z,e[41]=C,e[42]=R,e[43]=y,e[44]=N,e[45]=$):$=e[45];let P;return e[46]!==x||e[47]!==$||e[48]!==L||e[49]!==v||e[50]!==b?(P=s.jsxs(x,{open:L,onOpenChange:v,children:[b,$]}),e[46]=x,e[47]=$,e[48]=L,e[49]=v,e[50]=b,e[51]=P):P=e[51],P}function lt(t,e){return e.count-t.count}function nt(t){const e=Y.c(67),{availableTags:r,availableCategories:l,selectedTags:d,selectedCategories:o,onTagChange:n,onCategoryChange:a}=t,f=r&&r.length>0||l&&l.length>0,c=d.length>0||o.length>0;if(!f)return null;let T;e[0]!==n||e[1]!==d?(T=g=>{d.includes(g)?n(d.filter(w=>w!==g)):n([...d,g])},e[0]=n,e[1]=d,e[2]=T):T=e[2];const m=T;let x;e[3]!==a||e[4]!==o?(x=g=>{o.includes(g)?a(o.filter(w=>w!==g)):a([...o,g])},e[3]=a,e[4]=o,e[5]=x):x=e[5];const i=x;let p;e[6]!==a||e[7]!==n?(p=()=>{n([]),a([])},e[6]=a,e[7]=n,e[8]=p):p=e[8];const k=p;let C,R,y,L,v,b,N;if(e[9]!==l||e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==d||e[15]!==i||e[16]!==m){const g=l?rt(l,6):[];C=o,R=d,N=new Set(g.map(it)),v="flex items-center border-b border-border";let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(he,{size:16})}),e[24]=w):w=e[24];let h;e[25]!==l||e[26]!==a||e[27]!==o||e[28]!==i?(h=l&&l.length>0&&s.jsx(fe,{label:"Categories",items:l,selectedItems:o,onToggle:i,onClear:()=>a([])}),e[25]=l,e[26]=a,e[27]=o,e[28]=i,e[29]=h):h=e[29];let E;e[30]!==r||e[31]!==n||e[32]!==d||e[33]!==m?(E=r&&r.length>0&&s.jsx(fe,{label:"Tags",items:r,selectedItems:d,onToggle:m,onClear:()=>n([])}),e[30]=r,e[31]=n,e[32]=d,e[33]=m,e[34]=E):E=e[34],e[35]!==E||e[36]!==h?(b=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[w,h,E]}),e[35]=E,e[36]=h,e[37]=b):b=e[37],y="flex items-center gap-3 flex-wrap px-5 py-3";let I;e[38]!==o||e[39]!==i?(I=O=>{const A=o.includes(O.value);return s.jsxs("div",{onClick:()=>i(O.value),className:ce("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:O.value}),A&&s.jsx("span",{onClick:F=>{F.stopPropagation(),i(O.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},O.value)},e[38]=o,e[39]=i,e[40]=I):I=e[40],L=g.map(I),e[9]=l,e[10]=r,e[11]=a,e[12]=n,e[13]=o,e[14]=d,e[15]=i,e[16]=m,e[17]=C,e[18]=R,e[19]=y,e[20]=L,e[21]=v,e[22]=b,e[23]=N}else C=e[17],R=e[18],y=e[19],L=e[20],v=e[21],b=e[22],N=e[23];let z;if(e[41]!==C||e[42]!==i||e[43]!==N){let g;e[45]!==N?(g=h=>!N.has(h),e[45]=N,e[46]=g):g=e[46];let w;e[47]!==i?(w=h=>s.jsxs("div",{onClick:()=>i(h),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:h}),s.jsx("span",{onClick:E=>{E.stopPropagation(),i(h)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${h}`),e[47]=i,e[48]=w):w=e[48],z=C.filter(g).map(w),e[41]=C,e[42]=i,e[43]=N,e[44]=z}else z=e[44];let $;if(e[49]!==R||e[50]!==m){let g;e[52]!==m?(g=w=>s.jsxs("div",{onClick:()=>m(w),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:w}),s.jsx("span",{onClick:h=>{h.stopPropagation(),m(w)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${w}`),e[52]=m,e[53]=g):g=e[53],$=R.map(g),e[49]=R,e[50]=m,e[51]=$}else $=e[51];let P;e[54]!==k||e[55]!==c?(P=c&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:k,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(re,{size:14}),"Clear all"]}),e[54]=k,e[55]=c,e[56]=P):P=e[56];let j;e[57]!==P||e[58]!==y||e[59]!==L||e[60]!==z||e[61]!==$?(j=s.jsxs("div",{className:y,children:[L,z,$,P]}),e[57]=P,e[58]=y,e[59]=L,e[60]=z,e[61]=$,e[62]=j):j=e[62];let S;return e[63]!==j||e[64]!==v||e[65]!==b?(S=s.jsxs("div",{className:v,children:[b,j]}),e[63]=j,e[64]=v,e[65]=b,e[66]=S):S=e[66],S}function it(t){return t.value}function ot(t,e){if(!e)return t;const r=e.toLowerCase();return t.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function Ie(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function de(t){return t._meta?.["mcp.mesh"]?.official===!0}function at(t){const e=Y.c(58),{registryId:r,listToolName:l,filtersToolName:d,storePrivateOnly:o}=t,[n,a]=D.useState(""),f=tt(n,300),c=ue(),{org:T}=me(),{scrollRef:m,saveScrollPosition:x,handleScroll:i}=st(`store-discovery:${r}`);let p;e[0]!==f||e[1]!==d||e[2]!==l||e[3]!==r?(p={registryId:r,listToolName:l,filtersToolName:d,search:f},e[0]=f,e[1]=d,e[2]=l,e[3]=r,e[4]=p):p=e[4];const{items:k,hasMore:C,isLoadingMore:R,isInitialLoading:y,isFetching:L,error:v,loadMore:b,availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,setSelectedTags:j,setSelectedCategories:S,hasActiveFilters:g}=Ae(p);let w;e[5]!==k||e[6]!==n?(w=n?ot(k,n):k,e[5]=k,e[6]=n,e[7]=w):w=e[7];const h=w;let E;e[8]!==h||e[9]!==o?(E=o?h.filter(ft):h,e[8]=h,e[9]=o,e[10]=E):E=e[10];const I=E,O=(n!==f||L)&&!y&&!!n;let A;e[11]!==I?(A=I.filter(de),e[11]=I,e[12]=A):A=e[12];const F=A;let H;e[13]!==I?(H=I.filter(dt),e[13]=I,e[14]=H):H=e[14];const V=H;let Q;e[15]!==I?(Q=I.filter(mt),e[15]=I,e[16]=Q):Q=e[16];const ee=Q;let X;e[17]!==c||e[18]!==T.slug||e[19]!==r||e[20]!==x?(X=K=>{x();const u=Me(K.name||K.title||K.server?.title||""),Z=typeof K.id=="string"&&K.id.includes("/"),ne=typeof K.server?.name=="string"&&K.server.name.includes("/"),ie=Z&&!ne?K.id:K.server?.name||K.id||"";c({to:"/$org/$project/store/$appName",params:{org:T.slug,project:ge,appName:u},search:{registryId:r,serverName:ie}})},e[17]=c,e[18]=T.slug,e[19]=r,e[20]=x,e[21]=X):X=e[21];const q=X;let J;e[22]!==i||e[23]!==C||e[24]!==R||e[25]!==b?(J=K=>{if(i(),!C||R)return;const u=K.currentTarget;u.scrollHeight-u.scrollTop-u.clientHeight<200&&b()},e[22]=i,e[23]=C,e[24]=R,e[25]=b,e[26]=J):J=e[26];const W=J;let _;e[27]!==O||e[28]!==n?(_=s.jsx(Ve,{value:n,onChange:a,placeholder:"Search for an MCP Server...",isSearching:O}),e[27]=O,e[28]=n,e[29]=_):_=e[29];let B;e[30]!==z||e[31]!==N||e[32]!==P||e[33]!==$||e[34]!==S||e[35]!==j?(B=s.jsx(nt,{availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,onTagChange:j,onCategoryChange:S}),e[30]=z,e[31]=N,e[32]=P,e[33]=$,e[34]=S,e[35]=j,e[36]=B):B=e[36];let G;e[37]!==ee||e[38]!==v||e[39]!==q||e[40]!==g||e[41]!==C||e[42]!==y||e[43]!==R||e[44]!==O||e[45]!==F||e[46]!==n||e[47]!==V||e[48]!==I.length?(G=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:v&&!y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),v.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:v.message})]}),s.jsxs(te,{variant:"outline",size:"sm",onClick:ct,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):I.length===0&&g&&!n?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):n&&I.length===0&&!O?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[O&&I.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),F.length>0&&s.jsx(ae,{items:F,title:"Official",onItemClick:q}),V.length>0&&s.jsx(ae,{items:V,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:F.length>0||V.length>0?"All":"",onItemClick:q}),C&&R&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[37]=ee,e[38]=v,e[39]=q,e[40]=g,e[41]=C,e[42]=y,e[43]=R,e[44]=O,e[45]=F,e[46]=n,e[47]=V,e[48]=I.length,e[49]=G):G=e[49];let M;e[50]!==W||e[51]!==m||e[52]!==G?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:W,children:G}),e[50]=W,e[51]=m,e[52]=G,e[53]=M):M=e[53];let U;return e[54]!==B||e[55]!==M||e[56]!==_?(U=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=U):U=e[57],U}function ct(){return window.location.reload()}function mt(t){return!Ie(t)&&!de(t)}function dt(t){return Ie(t)&&!de(t)}function ft(t){return t.is_public!==!0}function ut(t){const e=Y.c(11),{registryId:r,storePrivateOnly:l}=t,d=_e(r),o=d?.tools;let n;e[0]!==o?(n=De(o),e[0]=o,e[1]=n):n=e[1];const a=n;if(!a){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(je,{className:"size-8 text-muted-foreground"})}),e[2]=i):i=e[2];let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[i,s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=p):p=e[3],p}const f=d?.tools;let c;e[4]!==f?(c=Ge(f),e[4]=f,e[5]=c):c=e[5];const m=c||void 0;let x;return e[6]!==a||e[7]!==r||e[8]!==l||e[9]!==m?(x=s.jsx(at,{registryId:r,listToolName:a,filtersToolName:m,storePrivateOnly:l}),e[6]=a,e[7]=r,e[8]=l,e[9]=m,e[10]=x):x=e[10],x}function xt(t){const e=Y.c(43),{registries:r,value:l,onValueChange:d,onAddWellKnown:o,wellKnownRegistries:n,placeholder:a}=t,f=a===void 0?"Select a registry...":a,[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y;if(e[0]!==c||e[1]!==f||e[2]!==r||e[3]!==l){let j;e[12]!==l?(j=g=>g.id===l,e[12]=l,e[13]=j):j=e[13];const S=r.find(j);x=be,R=c,y=T,m=Ne,C=!0,i="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(p=ce("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=p):p=e[14],k=S?s.jsxs("span",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}):s.jsx("span",{className:"text-muted-foreground",children:f}),e[0]=c,e[1]=f,e[2]=r,e[3]=l,e[4]=m,e[5]=x,e[6]=i,e[7]=p,e[8]=k,e[9]=C,e[10]=R,e[11]=y}else m=e[4],x=e[5],i=e[6],p=e[7],k=e[8],C=e[9],R=e[10],y=e[11];let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(we,{className:"size-4 opacity-50"}),e[15]=L):L=e[15];let v;e[16]!==i||e[17]!==p||e[18]!==k?(v=s.jsxs("button",{type:i,className:p,children:[k,L]}),e[16]=i,e[17]=p,e[18]=k,e[19]=v):v=e[19];let b;e[20]!==m||e[21]!==C||e[22]!==v?(b=s.jsx(m,{asChild:C,children:v}),e[20]=m,e[21]=C,e[22]=v,e[23]=b):b=e[23];let N;if(e[24]!==d||e[25]!==r||e[26]!==l){let j;e[28]!==d||e[29]!==l?(j=S=>s.jsxs("button",{type:"button",onClick:()=>{d(S.id??S.name),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}),l===(S.id??S.name)&&s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:s.jsx(Se,{className:"size-4"})})]},S.id??S.name),e[28]=d,e[29]=l,e[30]=j):j=e[30],N=r.map(j),e[24]=d,e[25]=r,e[26]=l,e[27]=N}else N=e[27];let z;e[31]!==o||e[32]!==n?(z=n.length>0&&s.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),n.map(j=>s.jsxs("button",{type:"button",onClick:()=>{o(j),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j.icon?s.jsx("img",{src:j.icon,alt:j.title,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:j.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:j.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(He,{size:16})})]},j.id??j.title))]}),e[31]=o,e[32]=n,e[33]=z):z=e[33];let $;e[34]!==N||e[35]!==z?($=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[N,z]}),e[34]=N,e[35]=z,e[36]=$):$=e[36];let P;return e[37]!==x||e[38]!==b||e[39]!==$||e[40]!==R||e[41]!==y?(P=s.jsxs(x,{open:R,onOpenChange:y,children:[b,$]}),e[37]=x,e[38]=b,e[39]=$,e[40]=R,e[41]=y,e[42]=P):P=e[42],P}function pt({registries:t,onConnected:e}){const r=ve(),{org:{slug:l}}=me(),{data:d}=Re.useSession(),o=ue(),[n,a]=D.useState(!1),f=t[0],c=async()=>{if(!(!f||!d?.user?.id)){a(!0);try{const m=await r.create.mutateAsync(f);e?.(m.id)}finally{a(!1)}}},T=()=>{o({to:"/$org/$project/mcps",params:{org:l,project:ge},search:{action:"create"}})};return s.jsx(qe,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(te,{variant:"outline",onClick:c,disabled:n||!f,children:[f?.icon&&s.jsx("img",{src:f.icon,alt:"",className:"size-4"}),n?"Installing...":"Install Registry"]}),s.jsx(te,{variant:"outline",onClick:T,children:"Custom Connection"})]})})}function gt(t){const e=Y.c(15),{error:r,onRetry:l,registryName:d}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-destructive"})}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=n):n=e[1];let a;e[2]!==d?(a=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:d})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=d,e[3]=a):a=e[3];let f;e[4]!==r?(f=r?.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=f):f=e[5];let c;e[6]!==a||e[7]!==f?(c=s.jsxs("div",{className:"space-y-2",children:[n,a,f]}),e[6]=a,e[7]=f,e[8]=c):c=e[8];let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(pe,{className:"size-4"}),e[9]=T):T=e[9];let m;e[10]!==l?(m=s.jsxs(te,{variant:"outline",size:"sm",onClick:l,children:[T,"Try again"]}),e[10]=l,e[11]=m):m=e[11];let x;return e[12]!==c||e[13]!==m?(x=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[o,c,m]}),e[12]=c,e[13]=m,e[14]=x):x=e[14],x}function ss(){const t=Y.c(53),{org:e,project:r}=me(),l=Be(),d=ve(),o=Te(),n=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Ue(l);let f;t[0]!==e.id?(f=Ye.SELF(e.id),t[0]=e.id,t[1]=f):f=t[1];const c=f,T=r.enabledPlugins,m=T==null||T.includes(oe);let x;t[2]!==c?(x=(u,Z)=>u.id===c?1:Z.id===c?-1:0,t[2]=c,t[3]=x):x=t[3];const i=a.filter(u=>u.id!==c?!0:m).sort(x);let p;t[4]!==c?(p=u=>u.id===c,t[4]=c,t[5]=p):p=t[5];const k=i.some(p);let C;t[6]!==e.id?(C={connectionId:Qe,orgId:e.id},t[6]=e.id,t[7]=C):C=t[7];const R=Xe(C);let y;t[8]!==r.id||t[9]!==R?(y=async()=>{const u=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:oe}});return u.structuredContent??u},t[8]=r.id,t[9]=R,t[10]=y):y=t[10];const{data:L}=Je({queryKey:Pe.projectPluginConfig(r.id??"",oe),queryFn:y,enabled:k&&!!r.id,staleTime:6e4}),v=L?.config?.settings;let b;t[11]!==v||t[12]!==c?(b=u=>u.id===c&&v?{id:u.id,name:v.registryName||u.title,icon:v.registryIcon||u.icon||void 0}:{id:u.id,name:u.title,icon:u.icon||void 0},t[11]=v,t[12]=c,t[13]=b):b=t[13];const N=i.map(b);let z;t[14]!==e.slug?(z=ze.selectedRegistry(e.slug),t[14]=e.slug,t[15]=z):z=t[15];const[$,P]=Le(z,jt);let j;t[16]!==$?(j=u=>u.id===$,t[16]=$,t[17]=j):j=t[17];const S=i.find(j);let g;t[18]!==c?(g=u=>u.id!==c,t[18]=c,t[19]=g):g=t[19];const w=i.find(g),h=S?.id||w?.id||i[0]?.id||"",E=h===c&&v?.storePrivateOnly===!0;let I;t[20]!==e.id?(I=Ze(e.id),t[20]=e.id,t[21]=I):I=t[21];let O;t[22]!==I?(O=[I],t[22]=I,t[23]=O):O=t[23];const A=O;let F;t[24]===Symbol.for("react.memo_cache_sentinel")?(F=[et()],t[24]=F):F=t[24];const H=F;let V;t[25]!==d.create||t[26]!==P?(V=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=V):V=t[27];const Q=V,ee=new Set(i.map(ht)),X=A.filter(u=>u.id&&!ee.has(u.id)),q=H.filter(u=>u.id&&!ee.has(u.id));if(n){let u;return t[28]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ke,{}),t[28]=u):u=t[28],u}let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(se.Header.Left,{children:s.jsx(Ee,{children:s.jsx(Oe,{children:s.jsx(Fe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let W;t[30]!==Q?(W=async u=>Q(u),t[30]=Q,t[31]=W):W=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==W?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:W,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=W,t[37]=_):_=t[37];let B;t[38]!==h||t[39]!==N?(B=u=>{const{error:Z,resetError:ne}=u;return s.jsx(gt,{error:Z,onRetry:ne,registryName:N.find(ie=>ie.id===h)?.name??"registry"})},t[38]=h,t[39]=N,t[40]=B):B=t[40];let G;t[41]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[41]=G):G=t[41];let M;t[42]!==q||t[43]!==h||t[44]!==P||t[45]!==E?(M=s.jsx(D.Suspense,{fallback:G,children:h?s.jsx(ut,{registryId:h,storePrivateOnly:E}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(pt,{registries:q,onConnected:u=>{P(u)}})})}),t[42]=q,t[43]=h,t[44]=P,t[45]=E,t[46]=M):M=t[46];let U;t[47]!==B||t[48]!==M?(U=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=U):U=t[49];let K;return t[50]!==_||t[51]!==U?(K=s.jsxs(se,{children:[_,U]}),t[50]=_,t[51]=U,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{ss as default};
1
+ import{c as Y,r as D,j as s,y as ce,B as te,e as ue,u as me,ab as xe,ac as pe,O as ge,f as Re,au as Te,bU as oe,K as Pe,aw as ze,E as $e,av as ke}from"./index-OyLnxARk.js";import{a as Le,P as se}from"./index-DKWOGpkx.js";import{B as Ee,a as Oe,b as Fe,c as Ke}from"./breadcrumb-CcE89MsN.js";import{i as he}from"./FilterLines-nV8jE7JI.js";import{n as je}from"./Inbox01-DiWhz3sk.js";import{i as le}from"./Loading01-BYjTtpy0.js";import{i as ye}from"./SearchMd-Dn4cWwEm.js";import{u as Ae}from"./use-store-discovery-W6XcrfUT.js";import{u as _e,a as ve,b as Be}from"./use-connection-B7ll8uNa.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ge,u as Ue}from"./registry-utils-D0qx2c0_.js";import{C as Ve}from"./collection-search-D6ILFEtf.js";import{M as ae}from"./mcp-server-card-mO0UAT9W.js";import{I as We}from"./input-B4YrZuiK.js";import{b as be,P as Ne,a as Ce}from"./popover-BKHsia9C.js";import{i as Se}from"./Check-DAFdA2oM.js";import{t as we}from"./ChevronDown-C-3qjfHK.js";import{s as re}from"./XClose-D08ltwBw.js";import{s as He}from"./Plus-1vH_gFoY.js";import{E as qe}from"./empty-state-gZUVmgL7.js";import{u as Je}from"./useQuery-Brtj4EoG.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-CLw0F8Mm.js";import"./useMutation-B_6d8oLI.js";import"./tooltip--UA5heKX.js";import"./index-CRi6734Z.js";import"./ChevronRight-B3gSyJmK.js";import"./useInfiniteQuery-C9KaycVy.js";import"./infiniteQueryObserver-BkZg7AVk.js";import"./use-collections-DXLoMYCx.js";import"./binder-B2xnCBeC.js";import"./CheckVerified02-YYsvmiw4.js";import"./Globe02-CDBspixd.js";import"./Lock01-j13GCiRT.js";import"./Terminal-CvfSVl9m.js";import"./card-B6XTMOTf.js";import"./integration-icon-B3aufi6R.js";import"./Container-CQmXt7Nc.js";function tt(t,e){const r=Y.c(4),[l,d]=D.useState(t),o=D.useRef(null),n=D.useRef(!0);let a,f;return r[0]!==e||r[1]!==t?(a=()=>{if(n.current){n.current=!1;return}return o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d(t)},e),()=>{o.current&&clearTimeout(o.current)}},f=[t,e],r[0]=e,r[1]=t,r[2]=a,r[3]=f):(a=r[2],f=r[3]),D.useEffect(a,f),l}function st(t){const e=Y.c(14),r=D.useRef(null),l=`scroll-position:${t}`,d=D.useRef(null);let o;e[0]!==l?(o=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=o):o=e[1];const n=o;let a;e[2]!==l?(a=()=>{if(d.current===l)return;const p=sessionStorage.getItem(l);if(p&&r.current){const k=Number.parseInt(p,10);r.current.scrollTop=k}d.current=l},e[2]=l,e[3]=a):a=e[3];const f=a;let c;e[4]!==f||e[5]!==l?(c=()=>{d.current!==l&&f()},e[4]=f,e[5]=l,e[6]=c):c=e[6];const T=c;let m;e[7]!==f||e[8]!==l?(m=p=>{r.current=p,p&&d.current!==l&&requestAnimationFrame(()=>{f()})},e[7]=f,e[8]=l,e[9]=m):m=e[9];const x=m;let i;return e[10]!==T||e[11]!==n||e[12]!==x?(i={scrollRef:x,saveScrollPosition:n,handleScroll:T},e[10]=T,e[11]=n,e[12]=x,e[13]=i):i=e[13],i}function rt(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function fe(t){const e=Y.c(52),{label:r,items:l,selectedItems:d,onToggle:o,onClear:n}=t,[a,f]=D.useState(""),[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y,L,v,b;if(e[0]!==l||e[1]!==r||e[2]!==o||e[3]!==c||e[4]!==a||e[5]!==d){const S=[...a?l.filter(F=>F.value.toLowerCase().includes(a.toLowerCase())):l].sort(lt);i=d.length,x=be,L=c,v=T;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let w;e[19]!==i?(w=i>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:i}),e[19]=i,e[20]=w):w=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(we,{size:14,className:"opacity-50"}),e[21]=h):h=e[21],e[22]!==w||e[23]!==g?(b=s.jsx(Ne,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,w,h]})}),e[22]=w,e[23]=g,e[24]=b):b=e[24],m=Ce,C="w-64 p-0",R="start";let E;e[25]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ye,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=E):E=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const O=`Search ${I}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=F=>f(F.target.value),e[28]=A):A=e[28],e[29]!==a||e[30]!==O?(y=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[E,s.jsx(We,{type:"text",placeholder:O,value:a,onChange:A,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=a,e[30]=O,e[31]=y):y=e[31],p="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",k=S.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):S.map(F=>{const H=d.includes(F.value);return s.jsxs("button",{onClick:()=>o(F.value),className:ce("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",H?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[H&&s.jsx(Se,{size:16,className:"text-muted-foreground shrink-0"}),F.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:F.count})]},F.value)}),e[0]=l,e[1]=r,e[2]=o,e[3]=c,e[4]=a,e[5]=d,e[6]=m,e[7]=x,e[8]=i,e[9]=p,e[10]=k,e[11]=C,e[12]=R,e[13]=y,e[14]=L,e[15]=v,e[16]=b}else m=e[6],x=e[7],i=e[8],p=e[9],k=e[10],C=e[11],R=e[12],y=e[13],L=e[14],v=e[15],b=e[16];let N;e[32]!==p||e[33]!==k?(N=s.jsx("div",{className:p,children:k}),e[32]=p,e[33]=k,e[34]=N):N=e[34];let z;e[35]!==r||e[36]!==n||e[37]!==i?(z=i>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(te,{variant:"ghost",size:"sm",onClick:n,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=n,e[37]=i,e[38]=z):z=e[38];let $;e[39]!==m||e[40]!==z||e[41]!==C||e[42]!==R||e[43]!==y||e[44]!==N?($=s.jsxs(m,{className:C,align:R,children:[y,N,z]}),e[39]=m,e[40]=z,e[41]=C,e[42]=R,e[43]=y,e[44]=N,e[45]=$):$=e[45];let P;return e[46]!==x||e[47]!==$||e[48]!==L||e[49]!==v||e[50]!==b?(P=s.jsxs(x,{open:L,onOpenChange:v,children:[b,$]}),e[46]=x,e[47]=$,e[48]=L,e[49]=v,e[50]=b,e[51]=P):P=e[51],P}function lt(t,e){return e.count-t.count}function nt(t){const e=Y.c(67),{availableTags:r,availableCategories:l,selectedTags:d,selectedCategories:o,onTagChange:n,onCategoryChange:a}=t,f=r&&r.length>0||l&&l.length>0,c=d.length>0||o.length>0;if(!f)return null;let T;e[0]!==n||e[1]!==d?(T=g=>{d.includes(g)?n(d.filter(w=>w!==g)):n([...d,g])},e[0]=n,e[1]=d,e[2]=T):T=e[2];const m=T;let x;e[3]!==a||e[4]!==o?(x=g=>{o.includes(g)?a(o.filter(w=>w!==g)):a([...o,g])},e[3]=a,e[4]=o,e[5]=x):x=e[5];const i=x;let p;e[6]!==a||e[7]!==n?(p=()=>{n([]),a([])},e[6]=a,e[7]=n,e[8]=p):p=e[8];const k=p;let C,R,y,L,v,b,N;if(e[9]!==l||e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==d||e[15]!==i||e[16]!==m){const g=l?rt(l,6):[];C=o,R=d,N=new Set(g.map(it)),v="flex items-center border-b border-border";let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(he,{size:16})}),e[24]=w):w=e[24];let h;e[25]!==l||e[26]!==a||e[27]!==o||e[28]!==i?(h=l&&l.length>0&&s.jsx(fe,{label:"Categories",items:l,selectedItems:o,onToggle:i,onClear:()=>a([])}),e[25]=l,e[26]=a,e[27]=o,e[28]=i,e[29]=h):h=e[29];let E;e[30]!==r||e[31]!==n||e[32]!==d||e[33]!==m?(E=r&&r.length>0&&s.jsx(fe,{label:"Tags",items:r,selectedItems:d,onToggle:m,onClear:()=>n([])}),e[30]=r,e[31]=n,e[32]=d,e[33]=m,e[34]=E):E=e[34],e[35]!==E||e[36]!==h?(b=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[w,h,E]}),e[35]=E,e[36]=h,e[37]=b):b=e[37],y="flex items-center gap-3 flex-wrap px-5 py-3";let I;e[38]!==o||e[39]!==i?(I=O=>{const A=o.includes(O.value);return s.jsxs("div",{onClick:()=>i(O.value),className:ce("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:O.value}),A&&s.jsx("span",{onClick:F=>{F.stopPropagation(),i(O.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},O.value)},e[38]=o,e[39]=i,e[40]=I):I=e[40],L=g.map(I),e[9]=l,e[10]=r,e[11]=a,e[12]=n,e[13]=o,e[14]=d,e[15]=i,e[16]=m,e[17]=C,e[18]=R,e[19]=y,e[20]=L,e[21]=v,e[22]=b,e[23]=N}else C=e[17],R=e[18],y=e[19],L=e[20],v=e[21],b=e[22],N=e[23];let z;if(e[41]!==C||e[42]!==i||e[43]!==N){let g;e[45]!==N?(g=h=>!N.has(h),e[45]=N,e[46]=g):g=e[46];let w;e[47]!==i?(w=h=>s.jsxs("div",{onClick:()=>i(h),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:h}),s.jsx("span",{onClick:E=>{E.stopPropagation(),i(h)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${h}`),e[47]=i,e[48]=w):w=e[48],z=C.filter(g).map(w),e[41]=C,e[42]=i,e[43]=N,e[44]=z}else z=e[44];let $;if(e[49]!==R||e[50]!==m){let g;e[52]!==m?(g=w=>s.jsxs("div",{onClick:()=>m(w),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:w}),s.jsx("span",{onClick:h=>{h.stopPropagation(),m(w)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${w}`),e[52]=m,e[53]=g):g=e[53],$=R.map(g),e[49]=R,e[50]=m,e[51]=$}else $=e[51];let P;e[54]!==k||e[55]!==c?(P=c&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:k,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(re,{size:14}),"Clear all"]}),e[54]=k,e[55]=c,e[56]=P):P=e[56];let j;e[57]!==P||e[58]!==y||e[59]!==L||e[60]!==z||e[61]!==$?(j=s.jsxs("div",{className:y,children:[L,z,$,P]}),e[57]=P,e[58]=y,e[59]=L,e[60]=z,e[61]=$,e[62]=j):j=e[62];let S;return e[63]!==j||e[64]!==v||e[65]!==b?(S=s.jsxs("div",{className:v,children:[b,j]}),e[63]=j,e[64]=v,e[65]=b,e[66]=S):S=e[66],S}function it(t){return t.value}function ot(t,e){if(!e)return t;const r=e.toLowerCase();return t.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function Ie(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function de(t){return t._meta?.["mcp.mesh"]?.official===!0}function at(t){const e=Y.c(58),{registryId:r,listToolName:l,filtersToolName:d,storePrivateOnly:o}=t,[n,a]=D.useState(""),f=tt(n,300),c=ue(),{org:T}=me(),{scrollRef:m,saveScrollPosition:x,handleScroll:i}=st(`store-discovery:${r}`);let p;e[0]!==f||e[1]!==d||e[2]!==l||e[3]!==r?(p={registryId:r,listToolName:l,filtersToolName:d,search:f},e[0]=f,e[1]=d,e[2]=l,e[3]=r,e[4]=p):p=e[4];const{items:k,hasMore:C,isLoadingMore:R,isInitialLoading:y,isFetching:L,error:v,loadMore:b,availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,setSelectedTags:j,setSelectedCategories:S,hasActiveFilters:g}=Ae(p);let w;e[5]!==k||e[6]!==n?(w=n?ot(k,n):k,e[5]=k,e[6]=n,e[7]=w):w=e[7];const h=w;let E;e[8]!==h||e[9]!==o?(E=o?h.filter(ft):h,e[8]=h,e[9]=o,e[10]=E):E=e[10];const I=E,O=(n!==f||L)&&!y&&!!n;let A;e[11]!==I?(A=I.filter(de),e[11]=I,e[12]=A):A=e[12];const F=A;let H;e[13]!==I?(H=I.filter(dt),e[13]=I,e[14]=H):H=e[14];const V=H;let Q;e[15]!==I?(Q=I.filter(mt),e[15]=I,e[16]=Q):Q=e[16];const ee=Q;let X;e[17]!==c||e[18]!==T.slug||e[19]!==r||e[20]!==x?(X=K=>{x();const u=Me(K.name||K.title||K.server?.title||""),Z=typeof K.id=="string"&&K.id.includes("/"),ne=typeof K.server?.name=="string"&&K.server.name.includes("/"),ie=Z&&!ne?K.id:K.server?.name||K.id||"";c({to:"/$org/$project/store/$appName",params:{org:T.slug,project:ge,appName:u},search:{registryId:r,serverName:ie}})},e[17]=c,e[18]=T.slug,e[19]=r,e[20]=x,e[21]=X):X=e[21];const q=X;let J;e[22]!==i||e[23]!==C||e[24]!==R||e[25]!==b?(J=K=>{if(i(),!C||R)return;const u=K.currentTarget;u.scrollHeight-u.scrollTop-u.clientHeight<200&&b()},e[22]=i,e[23]=C,e[24]=R,e[25]=b,e[26]=J):J=e[26];const W=J;let _;e[27]!==O||e[28]!==n?(_=s.jsx(Ve,{value:n,onChange:a,placeholder:"Search for an MCP Server...",isSearching:O}),e[27]=O,e[28]=n,e[29]=_):_=e[29];let B;e[30]!==z||e[31]!==N||e[32]!==P||e[33]!==$||e[34]!==S||e[35]!==j?(B=s.jsx(nt,{availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,onTagChange:j,onCategoryChange:S}),e[30]=z,e[31]=N,e[32]=P,e[33]=$,e[34]=S,e[35]=j,e[36]=B):B=e[36];let G;e[37]!==ee||e[38]!==v||e[39]!==q||e[40]!==g||e[41]!==C||e[42]!==y||e[43]!==R||e[44]!==O||e[45]!==F||e[46]!==n||e[47]!==V||e[48]!==I.length?(G=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:v&&!y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),v.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:v.message})]}),s.jsxs(te,{variant:"outline",size:"sm",onClick:ct,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):I.length===0&&g&&!n?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):n&&I.length===0&&!O?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[O&&I.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),F.length>0&&s.jsx(ae,{items:F,title:"Official",onItemClick:q}),V.length>0&&s.jsx(ae,{items:V,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:F.length>0||V.length>0?"All":"",onItemClick:q}),C&&R&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[37]=ee,e[38]=v,e[39]=q,e[40]=g,e[41]=C,e[42]=y,e[43]=R,e[44]=O,e[45]=F,e[46]=n,e[47]=V,e[48]=I.length,e[49]=G):G=e[49];let M;e[50]!==W||e[51]!==m||e[52]!==G?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:W,children:G}),e[50]=W,e[51]=m,e[52]=G,e[53]=M):M=e[53];let U;return e[54]!==B||e[55]!==M||e[56]!==_?(U=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=U):U=e[57],U}function ct(){return window.location.reload()}function mt(t){return!Ie(t)&&!de(t)}function dt(t){return Ie(t)&&!de(t)}function ft(t){return t.is_public!==!0}function ut(t){const e=Y.c(11),{registryId:r,storePrivateOnly:l}=t,d=_e(r),o=d?.tools;let n;e[0]!==o?(n=De(o),e[0]=o,e[1]=n):n=e[1];const a=n;if(!a){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(je,{className:"size-8 text-muted-foreground"})}),e[2]=i):i=e[2];let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[i,s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=p):p=e[3],p}const f=d?.tools;let c;e[4]!==f?(c=Ge(f),e[4]=f,e[5]=c):c=e[5];const m=c||void 0;let x;return e[6]!==a||e[7]!==r||e[8]!==l||e[9]!==m?(x=s.jsx(at,{registryId:r,listToolName:a,filtersToolName:m,storePrivateOnly:l}),e[6]=a,e[7]=r,e[8]=l,e[9]=m,e[10]=x):x=e[10],x}function xt(t){const e=Y.c(43),{registries:r,value:l,onValueChange:d,onAddWellKnown:o,wellKnownRegistries:n,placeholder:a}=t,f=a===void 0?"Select a registry...":a,[c,T]=D.useState(!1);let m,x,i,p,k,C,R,y;if(e[0]!==c||e[1]!==f||e[2]!==r||e[3]!==l){let j;e[12]!==l?(j=g=>g.id===l,e[12]=l,e[13]=j):j=e[13];const S=r.find(j);x=be,R=c,y=T,m=Ne,C=!0,i="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(p=ce("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=p):p=e[14],k=S?s.jsxs("span",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}):s.jsx("span",{className:"text-muted-foreground",children:f}),e[0]=c,e[1]=f,e[2]=r,e[3]=l,e[4]=m,e[5]=x,e[6]=i,e[7]=p,e[8]=k,e[9]=C,e[10]=R,e[11]=y}else m=e[4],x=e[5],i=e[6],p=e[7],k=e[8],C=e[9],R=e[10],y=e[11];let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(we,{className:"size-4 opacity-50"}),e[15]=L):L=e[15];let v;e[16]!==i||e[17]!==p||e[18]!==k?(v=s.jsxs("button",{type:i,className:p,children:[k,L]}),e[16]=i,e[17]=p,e[18]=k,e[19]=v):v=e[19];let b;e[20]!==m||e[21]!==C||e[22]!==v?(b=s.jsx(m,{asChild:C,children:v}),e[20]=m,e[21]=C,e[22]=v,e[23]=b):b=e[23];let N;if(e[24]!==d||e[25]!==r||e[26]!==l){let j;e[28]!==d||e[29]!==l?(j=S=>s.jsxs("button",{type:"button",onClick:()=>{d(S.id??S.name),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}),l===(S.id??S.name)&&s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:s.jsx(Se,{className:"size-4"})})]},S.id??S.name),e[28]=d,e[29]=l,e[30]=j):j=e[30],N=r.map(j),e[24]=d,e[25]=r,e[26]=l,e[27]=N}else N=e[27];let z;e[31]!==o||e[32]!==n?(z=n.length>0&&s.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),n.map(j=>s.jsxs("button",{type:"button",onClick:()=>{o(j),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j.icon?s.jsx("img",{src:j.icon,alt:j.title,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:j.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:j.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(He,{size:16})})]},j.id??j.title))]}),e[31]=o,e[32]=n,e[33]=z):z=e[33];let $;e[34]!==N||e[35]!==z?($=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[N,z]}),e[34]=N,e[35]=z,e[36]=$):$=e[36];let P;return e[37]!==x||e[38]!==b||e[39]!==$||e[40]!==R||e[41]!==y?(P=s.jsxs(x,{open:R,onOpenChange:y,children:[b,$]}),e[37]=x,e[38]=b,e[39]=$,e[40]=R,e[41]=y,e[42]=P):P=e[42],P}function pt({registries:t,onConnected:e}){const r=ve(),{org:{slug:l}}=me(),{data:d}=Re.useSession(),o=ue(),[n,a]=D.useState(!1),f=t[0],c=async()=>{if(!(!f||!d?.user?.id)){a(!0);try{const m=await r.create.mutateAsync(f);e?.(m.id)}finally{a(!1)}}},T=()=>{o({to:"/$org/$project/mcps",params:{org:l,project:ge},search:{action:"create"}})};return s.jsx(qe,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(te,{variant:"outline",onClick:c,disabled:n||!f,children:[f?.icon&&s.jsx("img",{src:f.icon,alt:"",className:"size-4"}),n?"Installing...":"Install Registry"]}),s.jsx(te,{variant:"outline",onClick:T,children:"Custom Connection"})]})})}function gt(t){const e=Y.c(15),{error:r,onRetry:l,registryName:d}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-destructive"})}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=n):n=e[1];let a;e[2]!==d?(a=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:d})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=d,e[3]=a):a=e[3];let f;e[4]!==r?(f=r?.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=f):f=e[5];let c;e[6]!==a||e[7]!==f?(c=s.jsxs("div",{className:"space-y-2",children:[n,a,f]}),e[6]=a,e[7]=f,e[8]=c):c=e[8];let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(pe,{className:"size-4"}),e[9]=T):T=e[9];let m;e[10]!==l?(m=s.jsxs(te,{variant:"outline",size:"sm",onClick:l,children:[T,"Try again"]}),e[10]=l,e[11]=m):m=e[11];let x;return e[12]!==c||e[13]!==m?(x=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[o,c,m]}),e[12]=c,e[13]=m,e[14]=x):x=e[14],x}function ss(){const t=Y.c(53),{org:e,project:r}=me(),l=Be(),d=ve(),o=Te(),n=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Ue(l);let f;t[0]!==e.id?(f=Ye.SELF(e.id),t[0]=e.id,t[1]=f):f=t[1];const c=f,T=r.enabledPlugins,m=T==null||T.includes(oe);let x;t[2]!==c?(x=(u,Z)=>u.id===c?1:Z.id===c?-1:0,t[2]=c,t[3]=x):x=t[3];const i=a.filter(u=>u.id!==c?!0:m).sort(x);let p;t[4]!==c?(p=u=>u.id===c,t[4]=c,t[5]=p):p=t[5];const k=i.some(p);let C;t[6]!==e.id?(C={connectionId:Qe,orgId:e.id},t[6]=e.id,t[7]=C):C=t[7];const R=Xe(C);let y;t[8]!==r.id||t[9]!==R?(y=async()=>{const u=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:oe}});return u.structuredContent??u},t[8]=r.id,t[9]=R,t[10]=y):y=t[10];const{data:L}=Je({queryKey:Pe.projectPluginConfig(r.id??"",oe),queryFn:y,enabled:k&&!!r.id,staleTime:6e4}),v=L?.config?.settings;let b;t[11]!==v||t[12]!==c?(b=u=>u.id===c&&v?{id:u.id,name:v.registryName||u.title,icon:v.registryIcon||u.icon||void 0}:{id:u.id,name:u.title,icon:u.icon||void 0},t[11]=v,t[12]=c,t[13]=b):b=t[13];const N=i.map(b);let z;t[14]!==e.slug?(z=ze.selectedRegistry(e.slug),t[14]=e.slug,t[15]=z):z=t[15];const[$,P]=Le(z,jt);let j;t[16]!==$?(j=u=>u.id===$,t[16]=$,t[17]=j):j=t[17];const S=i.find(j);let g;t[18]!==c?(g=u=>u.id!==c,t[18]=c,t[19]=g):g=t[19];const w=i.find(g),h=S?.id||w?.id||i[0]?.id||"",E=h===c&&v?.storePrivateOnly===!0;let I;t[20]!==e.id?(I=Ze(e.id),t[20]=e.id,t[21]=I):I=t[21];let O;t[22]!==I?(O=[I],t[22]=I,t[23]=O):O=t[23];const A=O;let F;t[24]===Symbol.for("react.memo_cache_sentinel")?(F=[et()],t[24]=F):F=t[24];const H=F;let V;t[25]!==d.create||t[26]!==P?(V=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=V):V=t[27];const Q=V,ee=new Set(i.map(ht)),X=A.filter(u=>u.id&&!ee.has(u.id)),q=H.filter(u=>u.id&&!ee.has(u.id));if(n){let u;return t[28]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ke,{}),t[28]=u):u=t[28],u}let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(se.Header.Left,{children:s.jsx(Ee,{children:s.jsx(Oe,{children:s.jsx(Fe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let W;t[30]!==Q?(W=async u=>Q(u),t[30]=Q,t[31]=W):W=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==W?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:W,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=W,t[37]=_):_=t[37];let B;t[38]!==h||t[39]!==N?(B=u=>{const{error:Z,resetError:ne}=u;return s.jsx(gt,{error:Z,onRetry:ne,registryName:N.find(ie=>ie.id===h)?.name??"registry"})},t[38]=h,t[39]=N,t[40]=B):B=t[40];let G;t[41]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[41]=G):G=t[41];let M;t[42]!==q||t[43]!==h||t[44]!==P||t[45]!==E?(M=s.jsx(D.Suspense,{fallback:G,children:h?s.jsx(ut,{registryId:h,storePrivateOnly:E}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(pt,{registries:q,onConnected:u=>{P(u)}})})}),t[42]=q,t[43]=h,t[44]=P,t[45]=E,t[46]=M):M=t[46];let U;t[47]!==B||t[48]!==M?(U=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=U):U=t[49];let K;return t[50]!==_||t[51]!==U?(K=s.jsxs(se,{children:[_,U]}),t[50]=_,t[51]=U,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{ss as default};
@@ -1 +1 @@
1
- import{c as s,j as t}from"./index-B_DxRVw1.js";import{e as r}from"./Dataflow03-BGqN1hrV.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
1
+ import{c as s,j as t}from"./index-OyLnxARk.js";import{e as r}from"./Dataflow03-ccC0qbkR.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
@@ -1 +1 @@
1
- import{c as a,j as t,as as n}from"./index-B_DxRVw1.js";function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
1
+ import{c as a,j as t,as as n}from"./index-OyLnxARk.js";function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
@@ -1 +1 @@
1
- import{c as S,j as s,r as w}from"./index-B_DxRVw1.js";import{i as R}from"./Check-Bme4aNg5.js";import{t as _}from"./ChevronDown-jyPVRLzp.js";import{e as y}from"./Dataflow03-BGqN1hrV.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
1
+ import{c as S,j as s,r as w}from"./index-OyLnxARk.js";import{i as R}from"./Check-DAFdA2oM.js";import{t as _}from"./ChevronDown-C-3qjfHK.js";import{e as y}from"./Dataflow03-ccC0qbkR.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
@@ -1 +1 @@
1
- import{c as w,j as s,r as S,as as y}from"./index-B_DxRVw1.js";import{i as _}from"./Check-Bme4aNg5.js";import{t as k}from"./ChevronDown-jyPVRLzp.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
1
+ import{c as w,j as s,r as S,as as y}from"./index-OyLnxARk.js";import{i as _}from"./Check-DAFdA2oM.js";import{t as k}from"./ChevronDown-C-3qjfHK.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
@@ -0,0 +1 @@
1
+ import{c as r,j as i}from"./index-OyLnxARk.js";import{P as m}from"./project-plugins-BgoKgZwd.js";import"./useQuery-Brtj4EoG.js";import"./useMutation-B_6d8oLI.js";import"./constants-CLw0F8Mm.js";import"./switch-BunRXVYQ.js";import"./label-BoRKSV_h.js";import"./Container-CQmXt7Nc.js";import"./use-connection-B7ll8uNa.js";import"./use-collections-DXLoMYCx.js";import"./registry-utils-D0qx2c0_.js";import"./binder-B2xnCBeC.js";import"./use-install-from-registry-1KLotWZ_.js";import"./extract-connection-data-DEaEvOm7.js";import"./constants-D3bMpbG0.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-BYjTtpy0.js";import"./Plus-1vH_gFoY.js";import"./select-Ctls6rHz.js";import"./ChevronUp-Rk5dLXNx.js";import"./index-CRi6734Z.js";import"./Check-DAFdA2oM.js";import"./ChevronDown-C-3qjfHK.js";function q(){const o=r.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(m,{}),o[0]=t):t=o[0],t}export{q as default};
@@ -1 +1 @@
1
- import{r as i,a0 as $,j as c,b2 as L,ad as z,a3 as O,a2 as A,a5 as g,b0 as _,a7 as j,b1 as G,b3 as w,b8 as H,b9 as K,a8 as U,ba as V,bb as W,bc as Z,b4 as q,b5 as B,b7 as J,c as R,y as Q}from"./index-B_DxRVw1.js";var C="Popover",[E]=U(C,[w]),P=w(),[X,u]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});S.displayName=y;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=b;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(A.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("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 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
1
+ import{r as i,a0 as $,j as c,b2 as L,ad as z,a3 as O,a2 as A,a5 as g,b0 as _,a7 as j,b1 as G,b3 as w,b8 as H,b9 as K,a8 as U,ba as V,bb as W,bc as Z,b4 as q,b5 as B,b7 as J,c as R,y as Q}from"./index-OyLnxARk.js";var C="Popover",[E]=U(C,[w]),P=w(),[X,u]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});S.displayName=y;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=b;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(A.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("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 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
@@ -1 +1 @@
1
- import{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-B_DxRVw1.js";import{u as S}from"./use-connection-DA77pjoV.js";import{u as U}from"./constants-CKGlP4oN.js";import{u as v}from"./use-mcp-tools-C3Vj1u8m.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-D7CJTHIn.js";import{g as O,M as $}from"./types-BnNswHwQ.js";import{u as D}from"./context-ow-zK3BP.js";import{P as _,u as k}from"./index-CsqngJxb.js";import"./use-collections-aokT1D_C.js";import"./useMutation-d1AXy22c.js";import"./useQuery-B8Io0Oda.js";import"./use-mcp-resources-CFkkQw1d.js";import"./decopilot-events-Brt4gAR6.js";import"./index-iqPDmcBY.js";import"./tooltip-Bm11lCIm.js";import"./index-DRLd-piX.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:f}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=D(),[,p]=k(),l=`${f}:${i.name}`;let d;e[0]!==o||e[1]!==i.name?(d={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=d):d=e[2];const{data:u}=v(d);let s;e[3]!==a||e[4]!==p?(s=N=>{const M=E(N.content);M.content.length>0&&(p(!0),a(M))},e[3]=a,e[4]=p,e[5]=s):s=e[5];const g=s,I=i;let x;e[6]!==I?(x={tool:I},e[6]=I,e[7]=x):x=e[7];let h;e[8]!==c||e[9]!==l?(h=N=>c(l,N),e[8]=c,e[9]=l,e[10]=h):h=e[10];let j;e[11]!==n||e[12]!==l?(j=()=>n(l),e[11]=n,e[12]=l,e[13]=j):j=e[13];let C;return e[14]!==o||e[15]!==g||e[16]!==m||e[17]!==x||e[18]!==h||e[19]!==j||e[20]!==u?(C=r.jsx(H,{resourceURI:m,toolInfo:x,toolInput:b,toolResult:u,displayMode:"fullscreen",minHeight:$.fullscreen.minHeight,maxHeight:$.fullscreen.maxHeight,client:o,onMessage:g,onUpdateModelContext:h,onTeardown:j,className:"h-full"}),e[14]=o,e[15]=g,e[16]=m,e[17]=x,e[18]=h,e[19]=j,e[20]=u,e[21]=C):C=e[21],C}function L(t){const e=P.c(17),{connectionId:o,toolName:m}=t,{org:i}=T();let f;e[0]!==o||e[1]!==i.id?(f={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=f):f=e[2];const a=U(f),c=S(o),n=decodeURIComponent(m);let p,l;if(e[3]!==c?.tools||e[4]!==n){let s;e[7]!==n?(s=g=>g.name===n,e[7]=n,e[8]=s):s=e[8],l=(c?.tools??[]).find(s),p=l?._meta?O(l._meta):void 0,e[3]=c?.tools,e[4]=n,e[5]=p,e[6]=l}else p=e[5],l=e[6];const d=p;if(!c){let s;return e[9]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found"})}),e[9]=s):s=e[9],s}if(!l||!d){let s;return e[10]!==n?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',n,'" not found or has no UI']})}),e[10]=n,e[11]=s):s=e[11],s}let u;return e[12]!==a||e[13]!==o||e[14]!==d||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:d,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=d,e[15]=l,e[16]=u):u=e[16],u}function ne(){const t=P.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/apps/$connectionId/$toolName"},t[0]=e):e=t[0];const{connectionId:o,toolName:m}=A(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(_.Header,{}),t[1]=i):i=t[1];const f=`${o}:${m}`;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),t[2]=a):a=t[2];let c;t[3]!==o||t[4]!==m?(c=r.jsx(R.Suspense,{fallback:a,children:r.jsx(L,{connectionId:o,toolName:m})}),t[3]=o,t[4]=m,t[5]=c):c=t[5];let n;return t[6]!==f||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},f)})]}),t[6]=f,t[7]=c,t[8]=n):n=t[8],n}export{ne as default};
1
+ import{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-OyLnxARk.js";import{u as S}from"./use-connection-B7ll8uNa.js";import{u as U}from"./constants-CLw0F8Mm.js";import{u as v}from"./use-mcp-tools-S01H2JtZ.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-KZyUYhBW.js";import{g as O,M as $}from"./types-DoomhLgW.js";import{u as D}from"./context-ClUgEsLK.js";import{P as _,u as k}from"./index-DKWOGpkx.js";import"./use-collections-DXLoMYCx.js";import"./useMutation-B_6d8oLI.js";import"./useQuery-Brtj4EoG.js";import"./use-mcp-resources-CFTlLllB.js";import"./decopilot-events-Brt4gAR6.js";import"./index-DxqOk4x4.js";import"./tooltip--UA5heKX.js";import"./index-CRi6734Z.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:f}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=D(),[,p]=k(),l=`${f}:${i.name}`;let d;e[0]!==o||e[1]!==i.name?(d={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=d):d=e[2];const{data:u}=v(d);let s;e[3]!==a||e[4]!==p?(s=N=>{const M=E(N.content);M.content.length>0&&(p(!0),a(M))},e[3]=a,e[4]=p,e[5]=s):s=e[5];const g=s,I=i;let x;e[6]!==I?(x={tool:I},e[6]=I,e[7]=x):x=e[7];let h;e[8]!==c||e[9]!==l?(h=N=>c(l,N),e[8]=c,e[9]=l,e[10]=h):h=e[10];let j;e[11]!==n||e[12]!==l?(j=()=>n(l),e[11]=n,e[12]=l,e[13]=j):j=e[13];let C;return e[14]!==o||e[15]!==g||e[16]!==m||e[17]!==x||e[18]!==h||e[19]!==j||e[20]!==u?(C=r.jsx(H,{resourceURI:m,toolInfo:x,toolInput:b,toolResult:u,displayMode:"fullscreen",minHeight:$.fullscreen.minHeight,maxHeight:$.fullscreen.maxHeight,client:o,onMessage:g,onUpdateModelContext:h,onTeardown:j,className:"h-full"}),e[14]=o,e[15]=g,e[16]=m,e[17]=x,e[18]=h,e[19]=j,e[20]=u,e[21]=C):C=e[21],C}function L(t){const e=P.c(17),{connectionId:o,toolName:m}=t,{org:i}=T();let f;e[0]!==o||e[1]!==i.id?(f={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=f):f=e[2];const a=U(f),c=S(o),n=decodeURIComponent(m);let p,l;if(e[3]!==c?.tools||e[4]!==n){let s;e[7]!==n?(s=g=>g.name===n,e[7]=n,e[8]=s):s=e[8],l=(c?.tools??[]).find(s),p=l?._meta?O(l._meta):void 0,e[3]=c?.tools,e[4]=n,e[5]=p,e[6]=l}else p=e[5],l=e[6];const d=p;if(!c){let s;return e[9]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found"})}),e[9]=s):s=e[9],s}if(!l||!d){let s;return e[10]!==n?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',n,'" not found or has no UI']})}),e[10]=n,e[11]=s):s=e[11],s}let u;return e[12]!==a||e[13]!==o||e[14]!==d||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:d,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=d,e[15]=l,e[16]=u):u=e[16],u}function ne(){const t=P.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/apps/$connectionId/$toolName"},t[0]=e):e=t[0];const{connectionId:o,toolName:m}=A(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(_.Header,{}),t[1]=i):i=t[1];const f=`${o}:${m}`;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),t[2]=a):a=t[2];let c;t[3]!==o||t[4]!==m?(c=r.jsx(R.Suspense,{fallback:a,children:r.jsx(L,{connectionId:o,toolName:m})}),t[3]=o,t[4]=m,t[5]=c):c=t[5];let n;return t[6]!==f||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},f)})]}),t[6]=f,t[7]=c,t[8]=n):n=t[8],n}export{ne as default};
@@ -1 +1 @@
1
- import{r as A,c as w,f as Q,j as s,y as H,v as K,o as ne,n as E,e as J,u as W,w as ie,t as re,q as ae,K as Y,B as F,O as I,P as ee,S as V,g as ce,av as me}from"./index-B_DxRVw1.js";import{u as te}from"./use-project-CPyjDcpX.js";import{D as de,c as fe,d as ue}from"./dialog-COv8XUO0.js";import{i as pe}from"./X-CxZVsh3L.js";import{S as M}from"./skeleton-BkpiIfDB.js";import{i as xe,u as he,a as ge,O as je}from"./org-ai-providers-BHi1kOOt.js";import{A as se}from"./avatar-CXKBBJaI.js";import{t as be}from"./Building02-c7FCt8-6.js";import{t as ye}from"./Settings01-CS4vVmx5.js";import{t as ve}from"./Users03-rAyzQyh3.js";import{i as Se}from"./Zap-azdz5wfI.js";import{a as Ne,b as _e,c as ke,T as Ce}from"./tooltip-Bm11lCIm.js";import{i as we}from"./Check-Bme4aNg5.js";import{a as ze}from"./Copy01-ekqsSfJN.js";import{S as T}from"./switch-BE6ziGyo.js";import{S as Pe,a as Ae,d as D,c as $e}from"./select-BM9jpLT2.js";import{i as Ie}from"./Code01-DygQPwlG.js";import{s as Oe}from"./RefreshCcw01-B88e0cNw.js";import{i as Me}from"./Shield01-BZpNsAZG.js";import"./index-iqPDmcBY.js";import{u as Le}from"./useMutation-d1AXy22c.js";import{a as Fe,F as q,b as U,c as R,d as G,f as B,e as Ee}from"./form-CZrleug2.js";import{I as Z}from"./input-DqwWeNgs.js";import{L as Te}from"./logo-upload-BlIbeyor.js";import{P as De}from"./project-plugins-DwwhiaLk.js";import qe from"./members-WK1ZXtTy.js";import"./useQuery-B8Io0Oda.js";import"./constants-CKGlP4oN.js";import"./index-CsqngJxb.js";import"./AlertCircle-PBJUtpjc.js";import"./EyeOff-E0TupCAH.js";import"./Eye-DN-kY_sb.js";import"./Key01-CdH7i8vY.js";import"./Trash01-PnuUudMl.js";import"./card-B8QXMrj8.js";import"./toggle-group-B9XVwguR.js";import"./popover-DOnHuwq3.js";import"./ai-providers-logos-DPOiBl7V.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./index-DRLd-piX.js";import"./ChevronUp-B5BOcmGB.js";import"./ChevronDown-jyPVRLzp.js";import"./label--AQoxbpU.js";import"./Upload01-CSDtabhZ.js";import"./Container-BeAIfNvy.js";import"./use-connection-DA77pjoV.js";import"./use-collections-aokT1D_C.js";import"./registry-utils--TC_kKCq.js";import"./binder-B5Q0NNkg.js";import"./use-install-from-registry-C_csgcCs.js";import"./extract-connection-data-D46U8dB4.js";import"./constants-DqZ0hFNm.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-Dt16NixZ.js";import"./Plus-DN4FtVmx.js";import"./collection-display-button-D7NovPlc.js";import"./dropdown-menu-Cr1iKfFo.js";import"./ChevronRight-Ct9VK1GH.js";import"./ArrowDown-LiBnMzQV.js";import"./ArrowUp-WIHiBhdv.js";import"./Grid01-BvWQ72pJ.js";import"./List-BU70NJSh.js";import"./badge-BfLRgdaW.js";import"./collection-search-DDX1Zkg7.js";import"./SearchMd-BQseJVRu.js";import"./breadcrumb-BhQI8Xw3.js";import"./collection-table-wrapper-YGokzak8.js";import"./table-BOA7X4H8.js";import"./integration-icon-Dv0HduyT.js";import"./checkbox-C5Om9oxx.js";import"./ArrowLeft-BHzi0YLf.js";import"./use-members-BbXqk449.js";import"./alert-dialog-DdwA_v8c.js";import"./DotsHorizontal-BYFCLgks.js";import"./Lock01-DZeZ3WxC.js";import"./empty-state-DsQ7yRoE.js";import"./textarea-BDS2584p.js";import"./DotsVertical-Dn5mVo7u.js";import"./XClose-hdsxwv2G.js";import"./command-BVlE6-p8.js";import"./index-B23wyLB_.js";const oe=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));oe.displayName="Bell01";function Ue(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=Q.useSession(),i=a?.user,l=i?.image,m=i?.name??"Profile",c=i?.name??"U";let f;t[0]!==c||t[1]!==l?(f=s.jsx(se,{url:l,fallback:c,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=c,t[1]=l,t[2]=f):f=t[2];let r;t[3]!==m||t[4]!==f?(r={key:"account.profile",label:m,icon:f},t[3]=m,t[4]=f,t[5]=r):r=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u={key:"account.preferences",label:"Preferences",icon:s.jsx(ye,{size:14})},t[6]=u):u=t[6];let p;t[7]!==r?(p=[r,u],t[7]=r,t[8]=p):p=t[8];const h=p;let x;t[9]===Symbol.for("react.memo_cache_sentinel")?(x={key:"org.general",label:"General",icon:s.jsx(be,{size:14})},t[9]=x):x=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Se,{size:14})},t[10]=d):d=t[10];let g;t[11]===Symbol.for("react.memo_cache_sentinel")?(g={key:"org.ai-providers",label:"AI Providers",icon:s.jsx(xe,{size:14})},t[11]=g):g=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=[x,d,g,{key:"org.members",label:"Members",icon:s.jsx(ve,{size:14})}],t[12]=j):j=t[12];const _=j;let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=y):y=t[13];let b;t[14]!==h||t[15]!==n||t[16]!==o?(b=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[y,h.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:H("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[14]=h,t[15]=n,t[16]=o,t[17]=b):b=t[17];let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[18]=N):N=t[18];let S;t[19]!==n||t[20]!==o?(S=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:H("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[19]=n,t[20]=o,t[21]=S):S=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.176.0"]})}),t[22]=C):C=t[22];let k;return t[23]!==b||t[24]!==S?(k=s.jsxs("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4",children:[b,S,C]}),t[23]=b,t[24]=S,t[25]=k):k=t[25],k}function Re(){const e=w.c(32),{data:t}=Q.useSession(),[n,o]=A.useState(!1),a=t?.user,i=a?.image;let l;e[0]!==a?(l=()=>{a?.id&&navigator.clipboard.writeText(a.id).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},e[0]=a,e[1]=l):l=e[1];const m=l;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=c):c=e[2];const f=a?.name??"U";let r;e[3]!==f||e[4]!==i?(r=s.jsx(se,{url:i,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=i,e[5]=r):r=e[5];const u=a?.name??"User";let p;e[6]!==u?(p=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:u}),e[6]=u,e[7]=p):p=e[7];const h=a?.email;let x;e[8]!==h?(x=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:h}),e[8]=h,e[9]=x):x=e[9];let d;e[10]!==p||e[11]!==x?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[p,x]}),e[10]=p,e[11]=x,e[12]=d):d=e[12];let g;e[13]!==r||e[14]!==d?(g=s.jsxs("div",{className:"flex items-center gap-4",children:[r,d]}),e[13]=r,e[14]=d,e[15]=g):g=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=j):j=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=_):_=e[17];const y=a?.id;let b;e[18]!==y?(b=s.jsx("span",{className:"font-mono text-sm",children:y}),e[18]=y,e[19]=b):b=e[19];let N;e[20]!==n?(N=n?s.jsx(we,{size:14,className:"text-green-600 shrink-0"}):s.jsx(ze,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=N):N=e[21];let S;e[22]!==m||e[23]!==b||e[24]!==N?(S=s.jsx(Ne,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:m,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[b,N]})}),e[22]=m,e[23]=b,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(_e,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=C):C=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[j,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(ke,{children:s.jsxs(Ce,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==g?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[c,g,k]}),e[29]=k,e[30]=g,e[31]=v):v=e[31],v}function L(e){const t=w.c(27),{icon:n,label:o,description:a,control:i,onClick:l,disabled:m}=e,c=m?void 0:l,f=l?"button":void 0,r=l&&!m?0:void 0;let u;t[0]!==m||t[1]!==l?(u=l&&!m?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=m,t[1]=l,t[2]=u):u=t[2];const p=l&&!m?"pointer":void 0;let h;t[3]!==p?(h={cursor:p},t[3]=p,t[4]=h):h=t[4];let x;t[5]!==n?(x=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=x):x=t[6];let d;t[7]!==o?(d=s.jsx("p",{className:"text-sm font-medium text-foreground",children:o}),t[7]=o,t[8]=d):d=t[8];let g;t[9]!==a?(g=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=g):g=t[10];let j;t[11]!==d||t[12]!==g?(j=s.jsxs("div",{className:"min-w-0",children:[d,g]}),t[11]=d,t[12]=g,t[13]=j):j=t[13];let _;t[14]!==j||t[15]!==x?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[x,j]}),t[14]=j,t[15]=x,t[16]=_):_=t[16];let y;t[17]!==i?(y=s.jsx("div",{onClick:Ge,className:"shrink-0",children:i}),t[17]=i,t[18]=y):y=t[18];let b;return t[19]!==c||t[20]!==_||t[21]!==y||t[22]!==f||t[23]!==r||t[24]!==u||t[25]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:c,role:f,tabIndex:r,onKeyDown:u,style:h,children:[_,y]}),t[19]=c,t[20]=_,t[21]=y,t[22]=f,t[23]=r,t[24]=u,t[25]=h,t[26]=b):b=t[26],b}function Ge(e){return e.stopPropagation()}function X(){const e=w.c(47),[t,n]=he();let o;e[0]!==n?(o=async z=>{if(z&&await Notification.requestPermission()!=="granted"){K.error("Notifications denied. Please enable them in your browser settings."),n(Ve);return}n(P=>({...P,enableNotifications:z}))},e[0]=n,e[1]=o):o=e[1];const a=o;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ie,{size:16}),e[3]=l):l=e[3];let m;e[4]!==n?(m=()=>n(Ke),e[4]=n,e[5]=m):m=e[5];let c;e[6]!==n?(c=z=>n(P=>({...P,devMode:z})),e[6]=n,e[7]=c):c=e[7];let f;e[8]!==t.devMode||e[9]!==c?(f=s.jsx(T,{checked:t.devMode,onCheckedChange:c}),e[8]=t.devMode,e[9]=c,e[10]=f):f=e[10];let r;e[11]!==m||e[12]!==f?(r=s.jsx(L,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:m,control:f}),e[11]=m,e[12]=f,e[13]=r):r=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(oe,{size:16}),e[14]=u):u=e[14];let p;e[15]!==a||e[16]!==t.enableNotifications?(p=s.jsx(L,{icon:u,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>a(!t.enableNotifications),control:s.jsx(T,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=p):p=e[17];let h;e[18]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Oe,{size:16}),e[18]=h):h=e[18];let x;e[19]!==n?(x=()=>n(Be),e[19]=n,e[20]=x):x=e[20];let d;e[21]!==n?(d=z=>n(P=>({...P,experimentalAutomations:z})),e[21]=n,e[22]=d):d=e[22];let g;e[23]!==t.experimentalAutomations||e[24]!==d?(g=s.jsx(T,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=g):g=e[25];let j;e[26]!==x||e[27]!==g?(j=s.jsx(L,{icon:h,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:x,control:g}),e[26]=x,e[27]=g,e[28]=j):j=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Me,{size:16}),e[29]=_):_=e[29];let y;e[30]!==n?(y=z=>n(P=>({...P,toolApprovalLevel:z})),e[30]=n,e[31]=y):y=e[31];let b;e[32]===Symbol.for("react.memo_cache_sentinel")?(b={none:"Always ask",readonly:"Skip read-only",yolo:"Auto-approve all"},e[32]=b):b=e[32];const N=b[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Ae,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(D,{value:"none",textValue:"Always ask",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Always ask"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(D,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs($e,{children:[C,k,s.jsx(D,{value:"yolo",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[37]=v):v=e[37];let $;e[38]!==t.toolApprovalLevel||e[39]!==y||e[40]!==S?($=s.jsx(L,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Pe,{value:t.toolApprovalLevel,onValueChange:y,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=y,e[40]=S,e[41]=$):$=e[41];let O;return e[42]!==j||e[43]!==$||e[44]!==r||e[45]!==p?(O=s.jsxs("div",{className:"flex flex-col gap-6",children:[i,s.jsxs("div",{className:"flex flex-col",children:[r,p,j,$]})]}),e[42]=j,e[43]=$,e[44]=r,e[45]=p,e[46]=O):O=e[46],O}function Be(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function Ke(e){return{...e,devMode:!e.devMode}}function Ve(e){return{...e,enableNotifications:!1}}const Qe=ne({name:E().min(1,"Name is required").max(255,"Name is too long"),slug:E().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:E().optional()});function Je(){const e=J(),{org:t,project:n}=W(),o=ie(),[a,i]=A.useState(!1),l=re({resolver:ae(Qe),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),m=Le({mutationFn:async r=>{const u={name:r.name,slug:r.slug};r.logo&&(u.logo=r.logo);const p=await Q.organization.update({organizationId:t.id,data:u});if(p?.error)throw new Error(p.error.message||"Failed to update organization");return p},onSuccess:r=>{o.invalidateQueries({queryKey:Y.organizations()}),o.invalidateQueries({queryKey:Y.activeOrganization(t.slug)}),K.success("Organization settings updated successfully"),r?.data?.slug&&r.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:r.data.slug,project:n.slug}})},onError:r=>{K.error(r instanceof Error?r.message:"Failed to update organization")},onSettled:()=>{i(!1)}}),c=r=>{i(!0),m.mutate(r)},f=l.formState.isDirty;return s.jsx(Fe,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(c),className:"space-y-6",children:[s.jsx(q,{control:l.control,name:"name",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Organization Name"}),s.jsx(G,{children:s.jsx(Z,{placeholder:"My Organization",...r,disabled:a})}),s.jsx(B,{})]})}),s.jsx(q,{control:l.control,name:"slug",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Organization Slug"}),s.jsx(G,{children:s.jsx(Z,{placeholder:"my-organization",...r,disabled:a,onChange:u=>{const p=u.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");r.onChange(p)}})}),s.jsx(Ee,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(B,{})]})}),s.jsx(q,{control:l.control,name:"logo",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Logo"}),s.jsx(G,{children:s.jsx(Te,{value:r.value,onChange:r.onChange,name:l.watch("name"),disabled:a})}),s.jsx(B,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(F,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(F,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function We(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(Je,{})]}),e[0]=t):t=e[0],t}function He(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(qe,{}),e[0]=t):t=e[0],t}function le(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(M,{className:"h-6 w-48"}),n=s.jsx(M,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(M,{className:"h-12 w-full"}),s.jsx(M,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function Ye(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=W(),{data:i,isLoading:l}=te(a.id,n);if(l||!i){let u;return t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(le,{}),t[0]=u):u=t[0],u}const m=n===I;let c;t[1]!==i.description||t[2]!==i.enabledPlugins||t[3]!==i.id||t[4]!==i.name||t[5]!==i.organizationId||t[6]!==i.slug||t[7]!==i.ui||t[8]!==m?(c={id:i.id,organizationId:i.organizationId,slug:i.slug,name:i.name,description:i.description,enabledPlugins:i.enabledPlugins,ui:i.ui,isOrgAdmin:m},t[1]=i.description,t[2]=i.enabledPlugins,t[3]=i.id,t[4]=i.name,t[5]=i.organizationId,t[6]=i.slug,t[7]=i.ui,t[8]=m,t[9]=c):c=t[9];const f=c;let r;return t[10]!==o||t[11]!==f||t[12]!==a?(r=s.jsx(ee,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=r):r=t[13],r}function Ze(e){const t=w.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Re,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(We,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ye,{projectSlug:I,children:s.jsx(De,{})}),t[3]=o):o=t[3],o}case"org.ai-providers":{let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(je,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(He,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{}),t[6]=o):o=t[6],o}}}function Xe(){const e=w.c(24),{isOpen:t,activeSection:n,open:o,close:a}=ge();let i;e[0]!==a?(i=j=>!j&&a(),e[0]=a,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(de,{className:"sr-only",children:"Settings"}),e[2]=l):l=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"w-52 shrink-0 border-r border-border"}),e[3]=m):m=e[3];let c;e[4]!==n||e[5]!==o?(c=s.jsx(A.Suspense,{fallback:m,children:s.jsx(Ue,{activeSection:n,onNavigate:o})}),e[4]=n,e[5]=o,e[6]=c):c=e[6];let f,r;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(pe,{size:16}),r=s.jsx("span",{className:"sr-only",children:"Close"}),e[7]=f,e[8]=r):(f=e[7],r=e[8]);let u;e[9]!==a?(u=s.jsxs("button",{type:"button",onClick:a,className:"absolute top-4 right-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[f,r]}),e[9]=a,e[10]=u):u=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(le,{}),e[11]=p):p=e[11];let h;e[12]!==n?(h=s.jsx("div",{className:"p-8",children:s.jsx(A.Suspense,{fallback:p,children:s.jsx(Ze,{section:n})})}),e[12]=n,e[13]=h):h=e[13];let x;e[14]!==u||e[15]!==h?(x=s.jsxs("div",{className:"flex-1 min-w-0 overflow-y-auto relative flex flex-col overflow-hidden",children:[u,h]}),e[14]=u,e[15]=h,e[16]=x):x=e[16];let d;e[17]!==c||e[18]!==x?(d=s.jsxs(fe,{className:"sm:max-w-[1100px] h-[85vh] p-0 overflow-hidden flex flex-col gap-0",closeButtonClassName:"hidden",children:[l,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[c,x]})]}),e[17]=c,e[18]=x,e[19]=d):d=e[19];let g;return e[20]!==t||e[21]!==i||e[22]!==d?(g=s.jsx(ue,{open:t,onOpenChange:i,children:d}),e[20]=t,e[21]=i,e[22]=d,e[23]=g):g=e[23],g}function et(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,i=J();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=l):l=t[0];let m;t[1]!==n?(m=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=m):m=t[2];let c;t[3]!==a.message?(c=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=c):c=t[4];let f;t[5]!==i||t[6]!==o?(f=s.jsx(F,{variant:"link",onClick:()=>i({to:"/$org/$project",params:{org:o,project:I}}),children:"Go to organization home"}),t[5]=i,t[6]=o,t[7]=f):f=t[7];let r;return t[8]!==m||t[9]!==c||t[10]!==f?(r=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,m,c,f]}),t[8]=m,t[9]=c,t[10]=f,t[11]=r):r=t[11],r}function tt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=J();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=i):i=t[0];let l;t[1]!==n?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=l):l=t[2];let m;t[3]!==a||t[4]!==o?(m=s.jsx(F,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:I}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=m):m=t[5];let c;return t[6]!==l||t[7]!==m?(c=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[i,l,m]}),t[6]=l,t[7]=m,t[8]=c):c=t[8],c}function st(){const e=w.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ce(t),{org:o}=W(),a=n.org,i=n.project,{data:l,isLoading:m,error:c}=te(o.id,i);if(m){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(V,{}),e[1]=d):d=e[1],d}if(c){let d;return e[2]!==c||e[3]!==a||e[4]!==i?(d=s.jsx(et,{projectSlug:i,orgSlug:a,error:c}),e[2]=c,e[3]=a,e[4]=i,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==i?(d=s.jsx(tt,{projectSlug:i,orgSlug:a}),e[6]=a,e[7]=i,e[8]=d):d=e[8],d}const f=l.slug===I;let r;e[9]!==l.description||e[10]!==l.enabledPlugins||e[11]!==l.id||e[12]!==l.name||e[13]!==l.organizationId||e[14]!==l.slug||e[15]!==l.ui||e[16]!==f?(r={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:f},e[9]=l.description,e[10]=l.enabledPlugins,e[11]=l.id,e[12]=l.name,e[13]=l.organizationId,e[14]=l.slug,e[15]=l.ui,e[16]=f,e[17]=r):r=e[17];const u=r;let p,h;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(A.Suspense,{fallback:s.jsx(V,{}),children:s.jsx(me,{})}),h=s.jsx(Xe,{}),e[18]=p,e[19]=h):(p=e[18],h=e[19]);let x;return e[20]!==u||e[21]!==o?(x=s.jsxs(ee,{org:o,project:u,children:[p,h]}),e[20]=u,e[21]=o,e[22]=x):x=e[22],x}function $s(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(A.Suspense,{fallback:s.jsx(V,{}),children:s.jsx(st,{})}),e[0]=t):t=e[0],t}export{$s as default};
1
+ import{r as A,c as w,f as Q,j as s,y as H,v as K,o as ne,n as E,e as J,u as W,w as ie,t as re,q as ae,K as Y,B as F,O as I,P as ee,S as V,g as ce,av as me}from"./index-OyLnxARk.js";import{u as te}from"./use-project-C2o9r0US.js";import{D as de,c as fe,d as ue}from"./dialog-ZIc7OUaM.js";import{i as pe}from"./X-Car5B1de.js";import{S as M}from"./skeleton-DAvz6Hk5.js";import{i as xe,u as he,a as ge,O as je}from"./org-ai-providers-dfJpkNdu.js";import{A as se}from"./avatar-DEdDAQ0j.js";import{t as be}from"./Building02-D_v8ZXC2.js";import{t as ye}from"./Settings01-B3FNPQBg.js";import{t as ve}from"./Users03-CUiUl0DH.js";import{i as Se}from"./Zap-CbjhdbUU.js";import{a as Ne,b as _e,c as ke,T as Ce}from"./tooltip--UA5heKX.js";import{i as we}from"./Check-DAFdA2oM.js";import{a as ze}from"./Copy01-D7uh0hW0.js";import{S as T}from"./switch-BunRXVYQ.js";import{S as Pe,a as Ae,d as D,c as $e}from"./select-Ctls6rHz.js";import{i as Ie}from"./Code01-CoEt5nyY.js";import{s as Oe}from"./RefreshCcw01-ghOVEWuz.js";import{i as Me}from"./Shield01-0suO3hAe.js";import"./index-DxqOk4x4.js";import{u as Le}from"./useMutation-B_6d8oLI.js";import{a as Fe,F as q,b as U,c as R,d as G,f as B,e as Ee}from"./form-Cd_AEgzv.js";import{I as Z}from"./input-B4YrZuiK.js";import{L as Te}from"./logo-upload-DsXuRpYi.js";import{P as De}from"./project-plugins-BgoKgZwd.js";import qe from"./members-3oNbzlXC.js";import"./useQuery-Brtj4EoG.js";import"./constants-CLw0F8Mm.js";import"./index-DKWOGpkx.js";import"./AlertCircle-BWr4XQe9.js";import"./EyeOff-CgRP1cSC.js";import"./Eye-MRRTHIte.js";import"./Key01-Cv0XYLbb.js";import"./Trash01-Dmi4vR7Q.js";import"./card-B6XTMOTf.js";import"./toggle-group-C-kSfPqI.js";import"./popover-BKHsia9C.js";import"./ai-providers-logos-4n_w8l7D.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./index-CRi6734Z.js";import"./ChevronUp-Rk5dLXNx.js";import"./ChevronDown-C-3qjfHK.js";import"./label-BoRKSV_h.js";import"./Upload01-Cqh5tD2o.js";import"./Container-CQmXt7Nc.js";import"./use-connection-B7ll8uNa.js";import"./use-collections-DXLoMYCx.js";import"./registry-utils-D0qx2c0_.js";import"./binder-B2xnCBeC.js";import"./use-install-from-registry-1KLotWZ_.js";import"./extract-connection-data-DEaEvOm7.js";import"./constants-D3bMpbG0.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-BYjTtpy0.js";import"./Plus-1vH_gFoY.js";import"./collection-display-button-BJQ_VSFQ.js";import"./dropdown-menu-EcTFyr4x.js";import"./ChevronRight-B3gSyJmK.js";import"./ArrowDown-BPMtK04S.js";import"./ArrowUp-DqOjcDuh.js";import"./Grid01-COkHqk9k.js";import"./List-_Z2X7aPf.js";import"./badge-BTw8dF6C.js";import"./collection-search-D6ILFEtf.js";import"./SearchMd-Dn4cWwEm.js";import"./breadcrumb-CcE89MsN.js";import"./collection-table-wrapper-D0JGm79B.js";import"./table-DHN8Pbh9.js";import"./integration-icon-B3aufi6R.js";import"./checkbox-BA_JFbx4.js";import"./ArrowLeft-GOjXvqCa.js";import"./use-members-BXkvGAIM.js";import"./alert-dialog-BZtQAioB.js";import"./DotsHorizontal-C3QGwRko.js";import"./Lock01-j13GCiRT.js";import"./empty-state-gZUVmgL7.js";import"./textarea-CpLkXx5p.js";import"./DotsVertical-D5tMnzaQ.js";import"./XClose-D08ltwBw.js";import"./command-DwfoahUI.js";import"./index-BrqeZa9X.js";const oe=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));oe.displayName="Bell01";function Ue(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=Q.useSession(),i=a?.user,l=i?.image,m=i?.name??"Profile",c=i?.name??"U";let f;t[0]!==c||t[1]!==l?(f=s.jsx(se,{url:l,fallback:c,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=c,t[1]=l,t[2]=f):f=t[2];let r;t[3]!==m||t[4]!==f?(r={key:"account.profile",label:m,icon:f},t[3]=m,t[4]=f,t[5]=r):r=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u={key:"account.preferences",label:"Preferences",icon:s.jsx(ye,{size:14})},t[6]=u):u=t[6];let p;t[7]!==r?(p=[r,u],t[7]=r,t[8]=p):p=t[8];const h=p;let x;t[9]===Symbol.for("react.memo_cache_sentinel")?(x={key:"org.general",label:"General",icon:s.jsx(be,{size:14})},t[9]=x):x=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Se,{size:14})},t[10]=d):d=t[10];let g;t[11]===Symbol.for("react.memo_cache_sentinel")?(g={key:"org.ai-providers",label:"AI Providers",icon:s.jsx(xe,{size:14})},t[11]=g):g=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=[x,d,g,{key:"org.members",label:"Members",icon:s.jsx(ve,{size:14})}],t[12]=j):j=t[12];const _=j;let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=y):y=t[13];let b;t[14]!==h||t[15]!==n||t[16]!==o?(b=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[y,h.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:H("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[14]=h,t[15]=n,t[16]=o,t[17]=b):b=t[17];let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[18]=N):N=t[18];let S;t[19]!==n||t[20]!==o?(S=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:H("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[19]=n,t[20]=o,t[21]=S):S=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.176.2"]})}),t[22]=C):C=t[22];let k;return t[23]!==b||t[24]!==S?(k=s.jsxs("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4",children:[b,S,C]}),t[23]=b,t[24]=S,t[25]=k):k=t[25],k}function Re(){const e=w.c(32),{data:t}=Q.useSession(),[n,o]=A.useState(!1),a=t?.user,i=a?.image;let l;e[0]!==a?(l=()=>{a?.id&&navigator.clipboard.writeText(a.id).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},e[0]=a,e[1]=l):l=e[1];const m=l;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=c):c=e[2];const f=a?.name??"U";let r;e[3]!==f||e[4]!==i?(r=s.jsx(se,{url:i,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=i,e[5]=r):r=e[5];const u=a?.name??"User";let p;e[6]!==u?(p=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:u}),e[6]=u,e[7]=p):p=e[7];const h=a?.email;let x;e[8]!==h?(x=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:h}),e[8]=h,e[9]=x):x=e[9];let d;e[10]!==p||e[11]!==x?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[p,x]}),e[10]=p,e[11]=x,e[12]=d):d=e[12];let g;e[13]!==r||e[14]!==d?(g=s.jsxs("div",{className:"flex items-center gap-4",children:[r,d]}),e[13]=r,e[14]=d,e[15]=g):g=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=j):j=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=_):_=e[17];const y=a?.id;let b;e[18]!==y?(b=s.jsx("span",{className:"font-mono text-sm",children:y}),e[18]=y,e[19]=b):b=e[19];let N;e[20]!==n?(N=n?s.jsx(we,{size:14,className:"text-green-600 shrink-0"}):s.jsx(ze,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=N):N=e[21];let S;e[22]!==m||e[23]!==b||e[24]!==N?(S=s.jsx(Ne,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:m,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[b,N]})}),e[22]=m,e[23]=b,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(_e,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=C):C=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[j,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(ke,{children:s.jsxs(Ce,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==g?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[c,g,k]}),e[29]=k,e[30]=g,e[31]=v):v=e[31],v}function L(e){const t=w.c(27),{icon:n,label:o,description:a,control:i,onClick:l,disabled:m}=e,c=m?void 0:l,f=l?"button":void 0,r=l&&!m?0:void 0;let u;t[0]!==m||t[1]!==l?(u=l&&!m?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=m,t[1]=l,t[2]=u):u=t[2];const p=l&&!m?"pointer":void 0;let h;t[3]!==p?(h={cursor:p},t[3]=p,t[4]=h):h=t[4];let x;t[5]!==n?(x=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=x):x=t[6];let d;t[7]!==o?(d=s.jsx("p",{className:"text-sm font-medium text-foreground",children:o}),t[7]=o,t[8]=d):d=t[8];let g;t[9]!==a?(g=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=g):g=t[10];let j;t[11]!==d||t[12]!==g?(j=s.jsxs("div",{className:"min-w-0",children:[d,g]}),t[11]=d,t[12]=g,t[13]=j):j=t[13];let _;t[14]!==j||t[15]!==x?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[x,j]}),t[14]=j,t[15]=x,t[16]=_):_=t[16];let y;t[17]!==i?(y=s.jsx("div",{onClick:Ge,className:"shrink-0",children:i}),t[17]=i,t[18]=y):y=t[18];let b;return t[19]!==c||t[20]!==_||t[21]!==y||t[22]!==f||t[23]!==r||t[24]!==u||t[25]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:c,role:f,tabIndex:r,onKeyDown:u,style:h,children:[_,y]}),t[19]=c,t[20]=_,t[21]=y,t[22]=f,t[23]=r,t[24]=u,t[25]=h,t[26]=b):b=t[26],b}function Ge(e){return e.stopPropagation()}function X(){const e=w.c(47),[t,n]=he();let o;e[0]!==n?(o=async z=>{if(z&&await Notification.requestPermission()!=="granted"){K.error("Notifications denied. Please enable them in your browser settings."),n(Ve);return}n(P=>({...P,enableNotifications:z}))},e[0]=n,e[1]=o):o=e[1];const a=o;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ie,{size:16}),e[3]=l):l=e[3];let m;e[4]!==n?(m=()=>n(Ke),e[4]=n,e[5]=m):m=e[5];let c;e[6]!==n?(c=z=>n(P=>({...P,devMode:z})),e[6]=n,e[7]=c):c=e[7];let f;e[8]!==t.devMode||e[9]!==c?(f=s.jsx(T,{checked:t.devMode,onCheckedChange:c}),e[8]=t.devMode,e[9]=c,e[10]=f):f=e[10];let r;e[11]!==m||e[12]!==f?(r=s.jsx(L,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:m,control:f}),e[11]=m,e[12]=f,e[13]=r):r=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(oe,{size:16}),e[14]=u):u=e[14];let p;e[15]!==a||e[16]!==t.enableNotifications?(p=s.jsx(L,{icon:u,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>a(!t.enableNotifications),control:s.jsx(T,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=p):p=e[17];let h;e[18]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Oe,{size:16}),e[18]=h):h=e[18];let x;e[19]!==n?(x=()=>n(Be),e[19]=n,e[20]=x):x=e[20];let d;e[21]!==n?(d=z=>n(P=>({...P,experimentalAutomations:z})),e[21]=n,e[22]=d):d=e[22];let g;e[23]!==t.experimentalAutomations||e[24]!==d?(g=s.jsx(T,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=g):g=e[25];let j;e[26]!==x||e[27]!==g?(j=s.jsx(L,{icon:h,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:x,control:g}),e[26]=x,e[27]=g,e[28]=j):j=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Me,{size:16}),e[29]=_):_=e[29];let y;e[30]!==n?(y=z=>n(P=>({...P,toolApprovalLevel:z})),e[30]=n,e[31]=y):y=e[31];let b;e[32]===Symbol.for("react.memo_cache_sentinel")?(b={none:"Always ask",readonly:"Skip read-only",yolo:"Auto-approve all"},e[32]=b):b=e[32];const N=b[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Ae,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(D,{value:"none",textValue:"Always ask",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Always ask"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(D,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs($e,{children:[C,k,s.jsx(D,{value:"yolo",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[37]=v):v=e[37];let $;e[38]!==t.toolApprovalLevel||e[39]!==y||e[40]!==S?($=s.jsx(L,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Pe,{value:t.toolApprovalLevel,onValueChange:y,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=y,e[40]=S,e[41]=$):$=e[41];let O;return e[42]!==j||e[43]!==$||e[44]!==r||e[45]!==p?(O=s.jsxs("div",{className:"flex flex-col gap-6",children:[i,s.jsxs("div",{className:"flex flex-col",children:[r,p,j,$]})]}),e[42]=j,e[43]=$,e[44]=r,e[45]=p,e[46]=O):O=e[46],O}function Be(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function Ke(e){return{...e,devMode:!e.devMode}}function Ve(e){return{...e,enableNotifications:!1}}const Qe=ne({name:E().min(1,"Name is required").max(255,"Name is too long"),slug:E().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:E().optional()});function Je(){const e=J(),{org:t,project:n}=W(),o=ie(),[a,i]=A.useState(!1),l=re({resolver:ae(Qe),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),m=Le({mutationFn:async r=>{const u={name:r.name,slug:r.slug};r.logo&&(u.logo=r.logo);const p=await Q.organization.update({organizationId:t.id,data:u});if(p?.error)throw new Error(p.error.message||"Failed to update organization");return p},onSuccess:r=>{o.invalidateQueries({queryKey:Y.organizations()}),o.invalidateQueries({queryKey:Y.activeOrganization(t.slug)}),K.success("Organization settings updated successfully"),r?.data?.slug&&r.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:r.data.slug,project:n.slug}})},onError:r=>{K.error(r instanceof Error?r.message:"Failed to update organization")},onSettled:()=>{i(!1)}}),c=r=>{i(!0),m.mutate(r)},f=l.formState.isDirty;return s.jsx(Fe,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(c),className:"space-y-6",children:[s.jsx(q,{control:l.control,name:"name",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Organization Name"}),s.jsx(G,{children:s.jsx(Z,{placeholder:"My Organization",...r,disabled:a})}),s.jsx(B,{})]})}),s.jsx(q,{control:l.control,name:"slug",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Organization Slug"}),s.jsx(G,{children:s.jsx(Z,{placeholder:"my-organization",...r,disabled:a,onChange:u=>{const p=u.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");r.onChange(p)}})}),s.jsx(Ee,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(B,{})]})}),s.jsx(q,{control:l.control,name:"logo",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Logo"}),s.jsx(G,{children:s.jsx(Te,{value:r.value,onChange:r.onChange,name:l.watch("name"),disabled:a})}),s.jsx(B,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(F,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(F,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function We(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(Je,{})]}),e[0]=t):t=e[0],t}function He(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(qe,{}),e[0]=t):t=e[0],t}function le(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(M,{className:"h-6 w-48"}),n=s.jsx(M,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(M,{className:"h-12 w-full"}),s.jsx(M,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function Ye(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=W(),{data:i,isLoading:l}=te(a.id,n);if(l||!i){let u;return t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(le,{}),t[0]=u):u=t[0],u}const m=n===I;let c;t[1]!==i.description||t[2]!==i.enabledPlugins||t[3]!==i.id||t[4]!==i.name||t[5]!==i.organizationId||t[6]!==i.slug||t[7]!==i.ui||t[8]!==m?(c={id:i.id,organizationId:i.organizationId,slug:i.slug,name:i.name,description:i.description,enabledPlugins:i.enabledPlugins,ui:i.ui,isOrgAdmin:m},t[1]=i.description,t[2]=i.enabledPlugins,t[3]=i.id,t[4]=i.name,t[5]=i.organizationId,t[6]=i.slug,t[7]=i.ui,t[8]=m,t[9]=c):c=t[9];const f=c;let r;return t[10]!==o||t[11]!==f||t[12]!==a?(r=s.jsx(ee,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=r):r=t[13],r}function Ze(e){const t=w.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Re,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(We,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ye,{projectSlug:I,children:s.jsx(De,{})}),t[3]=o):o=t[3],o}case"org.ai-providers":{let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(je,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(He,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{}),t[6]=o):o=t[6],o}}}function Xe(){const e=w.c(24),{isOpen:t,activeSection:n,open:o,close:a}=ge();let i;e[0]!==a?(i=j=>!j&&a(),e[0]=a,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(de,{className:"sr-only",children:"Settings"}),e[2]=l):l=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"w-52 shrink-0 border-r border-border"}),e[3]=m):m=e[3];let c;e[4]!==n||e[5]!==o?(c=s.jsx(A.Suspense,{fallback:m,children:s.jsx(Ue,{activeSection:n,onNavigate:o})}),e[4]=n,e[5]=o,e[6]=c):c=e[6];let f,r;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(pe,{size:16}),r=s.jsx("span",{className:"sr-only",children:"Close"}),e[7]=f,e[8]=r):(f=e[7],r=e[8]);let u;e[9]!==a?(u=s.jsxs("button",{type:"button",onClick:a,className:"absolute top-4 right-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[f,r]}),e[9]=a,e[10]=u):u=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(le,{}),e[11]=p):p=e[11];let h;e[12]!==n?(h=s.jsx("div",{className:"p-8",children:s.jsx(A.Suspense,{fallback:p,children:s.jsx(Ze,{section:n})})}),e[12]=n,e[13]=h):h=e[13];let x;e[14]!==u||e[15]!==h?(x=s.jsxs("div",{className:"flex-1 min-w-0 overflow-y-auto relative flex flex-col overflow-hidden",children:[u,h]}),e[14]=u,e[15]=h,e[16]=x):x=e[16];let d;e[17]!==c||e[18]!==x?(d=s.jsxs(fe,{className:"sm:max-w-[1100px] h-[85vh] p-0 overflow-hidden flex flex-col gap-0",closeButtonClassName:"hidden",children:[l,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[c,x]})]}),e[17]=c,e[18]=x,e[19]=d):d=e[19];let g;return e[20]!==t||e[21]!==i||e[22]!==d?(g=s.jsx(ue,{open:t,onOpenChange:i,children:d}),e[20]=t,e[21]=i,e[22]=d,e[23]=g):g=e[23],g}function et(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,i=J();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=l):l=t[0];let m;t[1]!==n?(m=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=m):m=t[2];let c;t[3]!==a.message?(c=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=c):c=t[4];let f;t[5]!==i||t[6]!==o?(f=s.jsx(F,{variant:"link",onClick:()=>i({to:"/$org/$project",params:{org:o,project:I}}),children:"Go to organization home"}),t[5]=i,t[6]=o,t[7]=f):f=t[7];let r;return t[8]!==m||t[9]!==c||t[10]!==f?(r=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,m,c,f]}),t[8]=m,t[9]=c,t[10]=f,t[11]=r):r=t[11],r}function tt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=J();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=i):i=t[0];let l;t[1]!==n?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=l):l=t[2];let m;t[3]!==a||t[4]!==o?(m=s.jsx(F,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:I}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=m):m=t[5];let c;return t[6]!==l||t[7]!==m?(c=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[i,l,m]}),t[6]=l,t[7]=m,t[8]=c):c=t[8],c}function st(){const e=w.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ce(t),{org:o}=W(),a=n.org,i=n.project,{data:l,isLoading:m,error:c}=te(o.id,i);if(m){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(V,{}),e[1]=d):d=e[1],d}if(c){let d;return e[2]!==c||e[3]!==a||e[4]!==i?(d=s.jsx(et,{projectSlug:i,orgSlug:a,error:c}),e[2]=c,e[3]=a,e[4]=i,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==i?(d=s.jsx(tt,{projectSlug:i,orgSlug:a}),e[6]=a,e[7]=i,e[8]=d):d=e[8],d}const f=l.slug===I;let r;e[9]!==l.description||e[10]!==l.enabledPlugins||e[11]!==l.id||e[12]!==l.name||e[13]!==l.organizationId||e[14]!==l.slug||e[15]!==l.ui||e[16]!==f?(r={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:f},e[9]=l.description,e[10]=l.enabledPlugins,e[11]=l.id,e[12]=l.name,e[13]=l.organizationId,e[14]=l.slug,e[15]=l.ui,e[16]=f,e[17]=r):r=e[17];const u=r;let p,h;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(A.Suspense,{fallback:s.jsx(V,{}),children:s.jsx(me,{})}),h=s.jsx(Xe,{}),e[18]=p,e[19]=h):(p=e[18],h=e[19]);let x;return e[20]!==u||e[21]!==o?(x=s.jsxs(ee,{org:o,project:u,children:[p,h]}),e[20]=u,e[21]=o,e[22]=x):x=e[22],x}function $s(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(A.Suspense,{fallback:s.jsx(V,{}),children:s.jsx(st,{})}),e[0]=t):t=e[0],t}export{$s as default};
@@ -1 +1 @@
1
- import{r as _,j as n,y as J,B as G,u as V,w as W,v as M,K as q,bh as D,bj as $,c as Q}from"./index-B_DxRVw1.js";import{u as Y}from"./useQuery-B8Io0Oda.js";import{u as H}from"./useMutation-d1AXy22c.js";import{u as X,a as Z}from"./constants-CKGlP4oN.js";import{S as ee}from"./switch-BE6ziGyo.js";import{L as te}from"./label--AQoxbpU.js";import{n as ne}from"./Container-BeAIfNvy.js";import{b as se}from"./use-connection-DA77pjoV.js";import{d as ie,h as re}from"./registry-utils--TC_kKCq.js";import{u as oe}from"./use-install-from-registry-C_csgcCs.js";import{i as le}from"./Loading01-Dt16NixZ.js";import{s as ae}from"./Plus-DN4FtVmx.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-BM9jpLT2.js";function ge({value:o,onValueChange:e,placeholder:r="Select a connection...",binding:l,bindingType:a,onAddNew:y,className:x,disabled:h=!1}){const[j,d]=_.useState(!1),{installByBinding:v,isInstalling:S}=oe(),b=j||S,u=se(),w=ie({connections:u,binding:typeof l=="string"?l:void 0}),C=!l||!u?u??[]:typeof l=="string"?w:Array.isArray(l)&&l.length>0?u.filter(t=>re(t,l)):u,m=(()=>{if(!a?.startsWith("@"))return null;const[t,s]=a.replace("@","").split("/");return t&&s?{scope:t,appName:s}:null})(),N=(()=>{let t=C;const s=Array.isArray(l)&&l.length>0;if(m&&!s&&(t=t.filter(i=>{const c=i.app_name,p=i.metadata?.scopeName;return c===m.appName&&p===m.scope})),o&&!t.some(i=>i.id===o)){const i=u?.find(c=>c.id===o);if(i)return[i,...t]}return t})(),P=a?.startsWith("@"),A=async()=>{if(P&&a){d(!0);try{const t=await v(a);t&&e(t.id)}finally{d(!1)}return}y?.()},g=N.find(t=>t.id===o);return n.jsxs(ce,{value:o??"none",onValueChange:t=>e(t==="none"?null:t),disabled:h,children:[n.jsx(de,{size:"sm",className:J("w-[200px]",x),children:n.jsx(ue,{placeholder:r,children:g?n.jsxs("div",{className:"flex items-center gap-2",children:[g.icon?n.jsx("img",{src:g.icon,alt:g.title,className:"w-4 h-4 rounded shrink-0"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:g.title.slice(0,1).toUpperCase()}),n.jsx("span",{className:"truncate",children:g.title})]}):r})}),n.jsxs(me,{children:[n.jsx(z,{value:"none",children:"No connection"}),N.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):N.map(t=>n.jsx(z,{value:t.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?n.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:t.title})]})},t.id)),(y||P)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(G,{onPointerDown:t=>t.stopPropagation(),onClick:t=>{t.preventDefault(),t.stopPropagation(),A()},disabled:b||h,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:b?n.jsxs(n.Fragment,{children:[n.jsx(le,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(ae,{size:16}),n.jsx("span",{children:"Add Connection"})]})})})]})]})}const pe=o=>{if(!o||typeof o!="object")return!1;const e=o;return e.type==="text"&&typeof e.text=="string"&&e.text.trim().toLowerCase().startsWith("error")},K=o=>{const e=o.structuredContent??o,r=e&&typeof e=="object"?e:null,l=r?.content?.[0]?.text&&typeof r.content[0].text=="string"?r.content[0].text:null;if(r?.isError)throw new Error(l??"Tool call failed");if(pe(e))throw new Error(e.text);return e};function fe(o){return o.requiresMcpBinding===!0?!0:o.binding!==void 0}function xe(o){const e=Q.c(57),{plugin:r,isEnabled:l,isSaving:a,pendingBinding:y,description:x,label:h,icon:j,projectId:d,client:v,onBindingChange:S,onToggle:b}=o;let u;e[0]!==r?(u=fe(r),e[0]=r,e[1]=u):u=e[1];const w=u;let C;e[2]!==r.id||e[3]!==d?(C=q.projectPluginConfig(d??"",r.id),e[2]=r.id,e[3]=d,e[4]=C):C=e[4];let m;e[5]!==v||e[6]!==r.id||e[7]!==d?(m=async()=>{if(!d)throw new Error("Project ID is required to load plugin config.");const O=await v.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:d,pluginId:r.id}});return K(O)},e[5]=v,e[6]=r.id,e[7]=d,e[8]=m):m=e[8];const N=!!d&&w;let P;e[9]!==C||e[10]!==m||e[11]!==N?(P={queryKey:C,queryFn:m,enabled:N},e[9]=C,e[10]=m,e[11]=N,e[12]=P):P=e[12];const{data:A,isLoading:g}=Y(P),t=A?.config?.connectionId??null,s=y!==void 0?y:t;let i;e[13]!==l||e[14]!==a||e[15]!==b||e[16]!==r.id?(i=()=>!a&&b(r.id,!l),e[13]=l,e[14]=a,e[15]=b,e[16]=r.id,e[17]=i):i=e[17];const c=a?void 0:"pointer";let p;e[18]!==c?(p={cursor:c},e[18]=c,e[19]=p):p=e[19];let f;e[20]!==j?(f=j&&n.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:j}),e[20]=j,e[21]=f):f=e[21];let I;e[22]!==h?(I=n.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[22]=h,e[23]=I):I=e[23];let E;e[24]!==x?(E=x&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:x}),e[24]=x,e[25]=E):E=e[25];let B;e[26]!==I||e[27]!==E?(B=n.jsxs("div",{className:"min-w-0",children:[I,E]}),e[26]=I,e[27]=E,e[28]=B):B=e[28];let k;e[29]!==B||e[30]!==f?(k=n.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[f,B]}),e[29]=B,e[30]=f,e[31]=k):k=e[31];let T;e[32]!==b||e[33]!==r.id?(T=O=>b(r.id,O),e[32]=b,e[33]=r.id,e[34]=T):T=e[34];let F;e[35]!==l||e[36]!==a||e[37]!==T?(F=n.jsx("div",{onClick:je,className:"shrink-0",children:n.jsx(ee,{checked:l,onCheckedChange:T,disabled:a})}),e[35]=l,e[36]=a,e[37]=T,e[38]=F):F=e[38];let L;e[39]!==k||e[40]!==F?(L=n.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[k,F]}),e[39]=k,e[40]=F,e[41]=L):L=e[41];let U;e[42]!==g||e[43]!==l||e[44]!==a||e[45]!==w||e[46]!==S||e[47]!==r.binding||e[48]!==r.id||e[49]!==s||e[50]!==t?(U=l&&w&&n.jsx("div",{className:"pb-4 pl-7 space-y-2",onClick:he,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(te,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),n.jsx(ge,{value:s??null,onValueChange:O=>S(r.id,O,t),binding:r.binding,placeholder:"Select connection...",className:"w-56",disabled:a||g})]})}),e[42]=g,e[43]=l,e[44]=a,e[45]=w,e[46]=S,e[47]=r.binding,e[48]=r.id,e[49]=s,e[50]=t,e[51]=U):U=e[51];let R;return e[52]!==L||e[53]!==U||e[54]!==i||e[55]!==p?(R=n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:i,style:p,children:[L,U]}),e[52]=L,e[53]=U,e[54]=i,e[55]=p,e[56]=R):R=e[56],R}function he(o){return o.stopPropagation()}function je(o){return o.stopPropagation()}function be(){const{org:o,project:e}=V(),r=W(),l=X({connectionId:Z,orgId:o.id}),[a,y]=_.useState({}),[x,h]=_.useState({}),[j,d]=_.useState(!1),v=e.enabledPlugins??[],S=t=>{const s=a[t];return s!==void 0?s:v.includes(t)},b=()=>{const t=new Set(v);for(const[s,i]of Object.entries(a))i?t.add(s):t.delete(s);return Array.from(t)},u=Object.keys(a).length>0||Object.keys(x).length>0,w=(t,s)=>{const i=v.includes(t);y(s===i?c=>{const{[t]:p,...f}=c;return f}:c=>({...c,[t]:s}))},C=(t,s,i)=>{if(s===i){h(c=>{const{[t]:p,...f}=c;return f});return}h(c=>({...c,[t]:s}))},m=H({mutationFn:async t=>{const s=[];if(t.updatePlugins){const i=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:e.id,enabledPlugins:t.enabledPlugins}});s.push(K(i))}if(t.bindingUpdates.length>0){const i=await Promise.all(t.bindingUpdates.map(async({pluginId:c,connectionId:p,settings:f})=>{const I=await l.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:e.id,pluginId:c,connectionId:p,settings:f}});return K(I)}));s.push(...i)}return s},onSuccess:(t,s)=>{s.updatePlugins&&(r.invalidateQueries({queryKey:q.project(o.id,e.slug)}),r.invalidateQueries({queryKey:q.projects(o.id)})),s.bindingUpdates.forEach(({pluginId:i})=>{r.invalidateQueries({queryKey:q.projectPluginConfig(e.id??"",i)})}),y({}),h({}),M.success("Plugins updated successfully")},onError:t=>{M.error("Failed to update plugins: "+(t instanceof Error?t.message:"Unknown error"))},onSettled:()=>{d(!1)}}),N=()=>{d(!0);const t=Object.keys(x).map(s=>{const i=x[s];return{pluginId:s,connectionId:i!==void 0?i:void 0}});m.mutate({enabledPlugins:b(),updatePlugins:Object.keys(a).length>0,bindingUpdates:t})},P=()=>{y({}),h({})},A=t=>{const s=$.find(i=>i.pluginId===t);return s?{label:s.label,icon:s.items[0]?.icon}:null},g=t=>D.find(i=>i.id===t)?.description??null;return D.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-col",children:D.map(t=>{const s=A(t.id),i=g(t.id),c=S(t.id);return n.jsx(xe,{plugin:t,isEnabled:c,isSaving:j,pendingBinding:x[t.id],description:i,label:s?.label??t.id,icon:s?.icon??n.jsx(ne,{size:14}),projectId:e.id,client:l,onBindingChange:C,onToggle:w},t.id)})}),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(G,{variant:"outline",onClick:P,disabled:!u||j,children:"Cancel"}),n.jsx(G,{onClick:N,disabled:!u||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}function Le(){const o=Q.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Features"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Extend your project with built-in capabilities that activate automatically on any connection that supports them."})]}),n.jsx(be,{})]}),o[0]=e):e=o[0],e}export{Le as P};
1
+ import{r as _,j as n,y as J,B as G,u as V,w as W,v as M,K as q,bh as D,bj as $,c as Q}from"./index-OyLnxARk.js";import{u as Y}from"./useQuery-Brtj4EoG.js";import{u as H}from"./useMutation-B_6d8oLI.js";import{u as X,a as Z}from"./constants-CLw0F8Mm.js";import{S as ee}from"./switch-BunRXVYQ.js";import{L as te}from"./label-BoRKSV_h.js";import{n as ne}from"./Container-CQmXt7Nc.js";import{b as se}from"./use-connection-B7ll8uNa.js";import{d as ie,h as re}from"./registry-utils-D0qx2c0_.js";import{u as oe}from"./use-install-from-registry-1KLotWZ_.js";import{i as le}from"./Loading01-BYjTtpy0.js";import{s as ae}from"./Plus-1vH_gFoY.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-Ctls6rHz.js";function ge({value:o,onValueChange:e,placeholder:r="Select a connection...",binding:l,bindingType:a,onAddNew:y,className:x,disabled:h=!1}){const[j,d]=_.useState(!1),{installByBinding:v,isInstalling:S}=oe(),b=j||S,u=se(),w=ie({connections:u,binding:typeof l=="string"?l:void 0}),C=!l||!u?u??[]:typeof l=="string"?w:Array.isArray(l)&&l.length>0?u.filter(t=>re(t,l)):u,m=(()=>{if(!a?.startsWith("@"))return null;const[t,s]=a.replace("@","").split("/");return t&&s?{scope:t,appName:s}:null})(),N=(()=>{let t=C;const s=Array.isArray(l)&&l.length>0;if(m&&!s&&(t=t.filter(i=>{const c=i.app_name,p=i.metadata?.scopeName;return c===m.appName&&p===m.scope})),o&&!t.some(i=>i.id===o)){const i=u?.find(c=>c.id===o);if(i)return[i,...t]}return t})(),P=a?.startsWith("@"),A=async()=>{if(P&&a){d(!0);try{const t=await v(a);t&&e(t.id)}finally{d(!1)}return}y?.()},g=N.find(t=>t.id===o);return n.jsxs(ce,{value:o??"none",onValueChange:t=>e(t==="none"?null:t),disabled:h,children:[n.jsx(de,{size:"sm",className:J("w-[200px]",x),children:n.jsx(ue,{placeholder:r,children:g?n.jsxs("div",{className:"flex items-center gap-2",children:[g.icon?n.jsx("img",{src:g.icon,alt:g.title,className:"w-4 h-4 rounded shrink-0"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:g.title.slice(0,1).toUpperCase()}),n.jsx("span",{className:"truncate",children:g.title})]}):r})}),n.jsxs(me,{children:[n.jsx(z,{value:"none",children:"No connection"}),N.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):N.map(t=>n.jsx(z,{value:t.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?n.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:t.title})]})},t.id)),(y||P)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(G,{onPointerDown:t=>t.stopPropagation(),onClick:t=>{t.preventDefault(),t.stopPropagation(),A()},disabled:b||h,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:b?n.jsxs(n.Fragment,{children:[n.jsx(le,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(ae,{size:16}),n.jsx("span",{children:"Add Connection"})]})})})]})]})}const pe=o=>{if(!o||typeof o!="object")return!1;const e=o;return e.type==="text"&&typeof e.text=="string"&&e.text.trim().toLowerCase().startsWith("error")},K=o=>{const e=o.structuredContent??o,r=e&&typeof e=="object"?e:null,l=r?.content?.[0]?.text&&typeof r.content[0].text=="string"?r.content[0].text:null;if(r?.isError)throw new Error(l??"Tool call failed");if(pe(e))throw new Error(e.text);return e};function fe(o){return o.requiresMcpBinding===!0?!0:o.binding!==void 0}function xe(o){const e=Q.c(57),{plugin:r,isEnabled:l,isSaving:a,pendingBinding:y,description:x,label:h,icon:j,projectId:d,client:v,onBindingChange:S,onToggle:b}=o;let u;e[0]!==r?(u=fe(r),e[0]=r,e[1]=u):u=e[1];const w=u;let C;e[2]!==r.id||e[3]!==d?(C=q.projectPluginConfig(d??"",r.id),e[2]=r.id,e[3]=d,e[4]=C):C=e[4];let m;e[5]!==v||e[6]!==r.id||e[7]!==d?(m=async()=>{if(!d)throw new Error("Project ID is required to load plugin config.");const O=await v.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:d,pluginId:r.id}});return K(O)},e[5]=v,e[6]=r.id,e[7]=d,e[8]=m):m=e[8];const N=!!d&&w;let P;e[9]!==C||e[10]!==m||e[11]!==N?(P={queryKey:C,queryFn:m,enabled:N},e[9]=C,e[10]=m,e[11]=N,e[12]=P):P=e[12];const{data:A,isLoading:g}=Y(P),t=A?.config?.connectionId??null,s=y!==void 0?y:t;let i;e[13]!==l||e[14]!==a||e[15]!==b||e[16]!==r.id?(i=()=>!a&&b(r.id,!l),e[13]=l,e[14]=a,e[15]=b,e[16]=r.id,e[17]=i):i=e[17];const c=a?void 0:"pointer";let p;e[18]!==c?(p={cursor:c},e[18]=c,e[19]=p):p=e[19];let f;e[20]!==j?(f=j&&n.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:j}),e[20]=j,e[21]=f):f=e[21];let I;e[22]!==h?(I=n.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[22]=h,e[23]=I):I=e[23];let E;e[24]!==x?(E=x&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:x}),e[24]=x,e[25]=E):E=e[25];let B;e[26]!==I||e[27]!==E?(B=n.jsxs("div",{className:"min-w-0",children:[I,E]}),e[26]=I,e[27]=E,e[28]=B):B=e[28];let k;e[29]!==B||e[30]!==f?(k=n.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[f,B]}),e[29]=B,e[30]=f,e[31]=k):k=e[31];let T;e[32]!==b||e[33]!==r.id?(T=O=>b(r.id,O),e[32]=b,e[33]=r.id,e[34]=T):T=e[34];let F;e[35]!==l||e[36]!==a||e[37]!==T?(F=n.jsx("div",{onClick:je,className:"shrink-0",children:n.jsx(ee,{checked:l,onCheckedChange:T,disabled:a})}),e[35]=l,e[36]=a,e[37]=T,e[38]=F):F=e[38];let L;e[39]!==k||e[40]!==F?(L=n.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[k,F]}),e[39]=k,e[40]=F,e[41]=L):L=e[41];let U;e[42]!==g||e[43]!==l||e[44]!==a||e[45]!==w||e[46]!==S||e[47]!==r.binding||e[48]!==r.id||e[49]!==s||e[50]!==t?(U=l&&w&&n.jsx("div",{className:"pb-4 pl-7 space-y-2",onClick:he,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(te,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),n.jsx(ge,{value:s??null,onValueChange:O=>S(r.id,O,t),binding:r.binding,placeholder:"Select connection...",className:"w-56",disabled:a||g})]})}),e[42]=g,e[43]=l,e[44]=a,e[45]=w,e[46]=S,e[47]=r.binding,e[48]=r.id,e[49]=s,e[50]=t,e[51]=U):U=e[51];let R;return e[52]!==L||e[53]!==U||e[54]!==i||e[55]!==p?(R=n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:i,style:p,children:[L,U]}),e[52]=L,e[53]=U,e[54]=i,e[55]=p,e[56]=R):R=e[56],R}function he(o){return o.stopPropagation()}function je(o){return o.stopPropagation()}function be(){const{org:o,project:e}=V(),r=W(),l=X({connectionId:Z,orgId:o.id}),[a,y]=_.useState({}),[x,h]=_.useState({}),[j,d]=_.useState(!1),v=e.enabledPlugins??[],S=t=>{const s=a[t];return s!==void 0?s:v.includes(t)},b=()=>{const t=new Set(v);for(const[s,i]of Object.entries(a))i?t.add(s):t.delete(s);return Array.from(t)},u=Object.keys(a).length>0||Object.keys(x).length>0,w=(t,s)=>{const i=v.includes(t);y(s===i?c=>{const{[t]:p,...f}=c;return f}:c=>({...c,[t]:s}))},C=(t,s,i)=>{if(s===i){h(c=>{const{[t]:p,...f}=c;return f});return}h(c=>({...c,[t]:s}))},m=H({mutationFn:async t=>{const s=[];if(t.updatePlugins){const i=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:e.id,enabledPlugins:t.enabledPlugins}});s.push(K(i))}if(t.bindingUpdates.length>0){const i=await Promise.all(t.bindingUpdates.map(async({pluginId:c,connectionId:p,settings:f})=>{const I=await l.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:e.id,pluginId:c,connectionId:p,settings:f}});return K(I)}));s.push(...i)}return s},onSuccess:(t,s)=>{s.updatePlugins&&(r.invalidateQueries({queryKey:q.project(o.id,e.slug)}),r.invalidateQueries({queryKey:q.projects(o.id)})),s.bindingUpdates.forEach(({pluginId:i})=>{r.invalidateQueries({queryKey:q.projectPluginConfig(e.id??"",i)})}),y({}),h({}),M.success("Plugins updated successfully")},onError:t=>{M.error("Failed to update plugins: "+(t instanceof Error?t.message:"Unknown error"))},onSettled:()=>{d(!1)}}),N=()=>{d(!0);const t=Object.keys(x).map(s=>{const i=x[s];return{pluginId:s,connectionId:i!==void 0?i:void 0}});m.mutate({enabledPlugins:b(),updatePlugins:Object.keys(a).length>0,bindingUpdates:t})},P=()=>{y({}),h({})},A=t=>{const s=$.find(i=>i.pluginId===t);return s?{label:s.label,icon:s.items[0]?.icon}:null},g=t=>D.find(i=>i.id===t)?.description??null;return D.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-col",children:D.map(t=>{const s=A(t.id),i=g(t.id),c=S(t.id);return n.jsx(xe,{plugin:t,isEnabled:c,isSaving:j,pendingBinding:x[t.id],description:i,label:s?.label??t.id,icon:s?.icon??n.jsx(ne,{size:14}),projectId:e.id,client:l,onBindingChange:C,onToggle:w},t.id)})}),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(G,{variant:"outline",onClick:P,disabled:!u||j,children:"Cancel"}),n.jsx(G,{onClick:N,disabled:!u||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}function Le(){const o=Q.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Features"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Extend your project with built-in capabilities that activate automatically on any connection that supports them."})]}),n.jsx(be,{})]}),o[0]=e):e=o[0],e}export{Le as P};
@@ -1 +1 @@
1
- import{bi as U,c as O,u as H,y as G,j as s,J,r as I,e as M,B as R,O as V}from"./index-B_DxRVw1.js";import{a as q}from"./use-project-CPyjDcpX.js";import{P as D}from"./index-CsqngJxb.js";import{C as F}from"./collection-search-DDX1Zkg7.js";import{A as K}from"./avatar-CXKBBJaI.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as T}from"./empty-state-DsQ7yRoE.js";import{C as W}from"./create-project-dialog-Rt5_XeVq.js";import{B as X,a as Y,b as Z,c as ee}from"./breadcrumb-BhQI8Xw3.js";import"./useQuery-B8Io0Oda.js";import"./constants-CKGlP4oN.js";import"./useMutation-d1AXy22c.js";import"./tooltip-Bm11lCIm.js";import"./index-DRLd-piX.js";import"./Loading01-Dt16NixZ.js";import"./SearchMd-BQseJVRu.js";import"./input-DqwWeNgs.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-COv8XUO0.js";import"./X-CxZVsh3L.js";import"./form-CZrleug2.js";import"./label--AQoxbpU.js";import"./textarea-BDS2584p.js";import"./Check-Bme4aNg5.js";import"./ChevronRight-Ct9VK1GH.js";const te=U("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function se(t){const e=O.c(58),{project:l,onSettingsClick:c}=t,{org:r}=H(),d=l.ui?.themeColor??"#60a5fa",b=l.ui?.bannerColor??d,m=l.ui?.banner?`url(${l.ui.banner})`:void 0;let i;e[0]!==b||e[1]!==m?(i={backgroundColor:b,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=b,e[1]=m,e[2]=i):i=e[2];const _=i;let u;e[3]!==r.slug||e[4]!==l.slug?(u={org:r.slug,project:l.slug},e[3]=r.slug,e[4]=l.slug,e[5]=u):u=e[5];let f;e[6]!==c?(f=B=>{B.preventDefault(),B.stopPropagation(),c?.(B)},e[6]=c,e[7]=f):f=e[7];let x,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=G("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),v=s.jsx(te,{className:"size-3.5 text-white"}),e[8]=x,e[9]=v):(x=e[8],v=e[9]);let g;e[10]!==f?(g=s.jsx("button",{type:"button",onClick:f,className:x,children:v}),e[10]=f,e[11]=g):g=e[11];let p;e[12]!==_||e[13]!==g?(p=s.jsx("div",{className:"h-20 relative",style:_,children:g}),e[12]=_,e[13]=g,e[14]=p):p=e[14];let n;e[15]!==l.name||e[16]!==l.ui||e[17]!==d?(n=l.ui?.icon?s.jsx("img",{src:l.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:d},children:s.jsx("span",{className:"text-sm font-medium text-white",children:l.name.charAt(0).toUpperCase()})}),e[15]=l.name,e[16]=l.ui,e[17]=d,e[18]=n):n=e[18];let a;e[19]!==l.name?(a=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:l.name}),e[19]=l.name,e[20]=a):a=e[20];let h;e[21]!==l.updatedAt?(h=Q(new Date(l.updatedAt),{addSuffix:!0}),e[21]=l.updatedAt,e[22]=h):h=e[22];let j;e[23]!==h?(j=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",h]}),e[23]=h,e[24]=j):j=e[24];let C;e[25]!==a||e[26]!==j?(C=s.jsxs("div",{className:"flex flex-col",children:[a,j]}),e[25]=a,e[26]=j,e[27]=C):C=e[27];let N;e[28]!==n||e[29]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-4",children:[n,C]}),e[28]=n,e[29]=C,e[30]=N):N=e[30];let k;e[31]!==l.boundConnections?(k=l.boundConnections.slice(0,4).map(le),e[31]=l.boundConnections,e[32]=k):k=e[32];let P;e[33]!==l.boundConnections.length?(P=l.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",l.boundConnections.length-4]})}),e[33]=l.boundConnections.length,e[34]=P):P=e[34];let y;e[35]!==k||e[36]!==P?(y=s.jsxs("div",{className:"flex pr-2",children:[k,P]}),e[35]=k,e[36]=P,e[37]=y):y=e[37];const z=r.logo??void 0;let w;e[38]!==r.name||e[39]!==z?(w=s.jsx(K,{url:z,fallback:r.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=r.name,e[39]=z,e[40]=w):w=e[40];let S;e[41]!==r.name?(S=s.jsx("span",{className:"truncate max-w-20",children:r.name}),e[41]=r.name,e[42]=S):S=e[42];let o;e[43]!==w||e[44]!==S?(o=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[w,S]}),e[43]=w,e[44]=S,e[45]=o):o=e[45];let L;e[46]!==y||e[47]!==o?(L=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[y,o]}),e[46]=y,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==N||e[50]!==L?($=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[N,L]}),e[49]=N,e[50]=L,e[51]=$):$=e[51];let A;e[52]!==$||e[53]!==p?(A=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[p,$]}),e[52]=$,e[53]=p,e[54]=A):A=e[54];let E;return e[55]!==A||e[56]!==u?(E=s.jsx(J,{to:"/$org/$project",params:u,className:"block group",children:A}),e[55]=A,e[56]=u,e[57]=E):E=e[57],E}function le(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(re,{connection:t})},t.id)}function re(t){const e=O.c(13),{connection:l}=t;if(l.icon){let m;e[0]!==l.icon||e[1]!==l.title?(m=s.jsx("img",{src:l.icon,alt:l.title,className:"size-4 object-cover"}),e[0]=l.icon,e[1]=l.title,e[2]=m):m=e[2];let i;return e[3]!==l.title||e[4]!==m?(i=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:l.title,children:m}),e[3]=l.title,e[4]=m,e[5]=i):i=e[5],i}const c=l.title;let r;e[6]!==l.title?(r=l.title.charAt(0).toUpperCase(),e[6]=l.title,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:r}),e[8]=r,e[9]=d):d=e[9];let b;return e[10]!==l.title||e[11]!==d?(b=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:c,children:d}),e[10]=l.title,e[11]=d,e[12]=b):b=e[12],b}function Ae(){const t=O.c(40),{org:e}=H(),{data:l,isLoading:c}=q(e.id),[r,d]=I.useState(""),[b,m]=I.useState(!1),i=M();let _,u,f,x,v,g,p,n,a;if(t[0]!==c||t[1]!==i||t[2]!==e.slug||t[3]!==l||t[4]!==r){const N=l?.filter(ie)?.filter(o=>o.name.toLowerCase().includes(r.toLowerCase())||o.description?.toLowerCase().includes(r.toLowerCase()))??[];let k;t[14]!==i||t[15]!==e.slug?(k=o=>{i({to:"/$org/$project/settings/general",params:{org:e.slug,project:o}})},t[14]=i,t[15]=e.slug,t[16]=k):k=t[16];const P=k;let y;t[17]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{m(!0)},t[17]=y):y=t[17];const z=y;u=D;let w;t[18]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(D.Header.Left,{children:s.jsx(X,{children:s.jsx(Y,{children:s.jsx(Z,{children:s.jsx(ee,{children:"Projects"})})})})}),t[18]=w):w=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(D.Header,{children:[w,s.jsx(D.Header.Right,{children:s.jsx(R,{onClick:z,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Create new project"})})]}),t[19]=n):n=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=o=>{o.key==="Escape"&&(d(""),o.target.blur())},t[20]=S):S=t[20],t[21]!==r?(a=s.jsx(F,{value:r,onChange:d,placeholder:"Search for a project...",onKeyDown:S}),t[21]=r,t[22]=a):a=t[22],_=D.Content,f="@container",t[23]!==c?(x=c&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(oe)})}),t[23]=c,t[24]=x):x=t[24],v=!c&&N.length===0&&r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(T,{title:"No projects found",description:`No projects match "${r}"`})}),g=!c&&N.length===0&&!r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(T,{title:"No projects yet",description:"Create a project to get started.",actions:s.jsx(R,{onClick:z,children:"Create new project"})})}),p=!c&&N.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:N.map(o=>s.jsx(se,{project:o,onSettingsClick:()=>P(o.slug)},o.id))})}),t[0]=c,t[1]=i,t[2]=e.slug,t[3]=l,t[4]=r,t[5]=_,t[6]=u,t[7]=f,t[8]=x,t[9]=v,t[10]=g,t[11]=p,t[12]=n,t[13]=a}else _=t[5],u=t[6],f=t[7],x=t[8],v=t[9],g=t[10],p=t[11],n=t[12],a=t[13];let h;t[25]!==_||t[26]!==f||t[27]!==x||t[28]!==v||t[29]!==g||t[30]!==p?(h=s.jsxs(_,{className:f,children:[x,v,g,p]}),t[25]=_,t[26]=f,t[27]=x,t[28]=v,t[29]=g,t[30]=p,t[31]=h):h=t[31];let j;t[32]!==b?(j=s.jsx(W,{open:b,onOpenChange:m}),t[32]=b,t[33]=j):j=t[33];let C;return t[34]!==u||t[35]!==n||t[36]!==a||t[37]!==h||t[38]!==j?(C=s.jsxs(u,{children:[n,a,h,j]}),t[34]=u,t[35]=n,t[36]=a,t[37]=h,t[38]=j,t[39]=C):C=t[39],C}function oe(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ie(t){return t.slug!==V}export{Ae as default};
1
+ import{bi as U,c as O,u as H,y as G,j as s,J,r as I,e as M,B as R,O as V}from"./index-OyLnxARk.js";import{a as q}from"./use-project-C2o9r0US.js";import{P as D}from"./index-DKWOGpkx.js";import{C as F}from"./collection-search-D6ILFEtf.js";import{A as K}from"./avatar-DEdDAQ0j.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as T}from"./empty-state-gZUVmgL7.js";import{C as W}from"./create-project-dialog-QYAKiAC_.js";import{B as X,a as Y,b as Z,c as ee}from"./breadcrumb-CcE89MsN.js";import"./useQuery-Brtj4EoG.js";import"./constants-CLw0F8Mm.js";import"./useMutation-B_6d8oLI.js";import"./tooltip--UA5heKX.js";import"./index-CRi6734Z.js";import"./Loading01-BYjTtpy0.js";import"./SearchMd-Dn4cWwEm.js";import"./input-B4YrZuiK.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-ZIc7OUaM.js";import"./X-Car5B1de.js";import"./form-Cd_AEgzv.js";import"./label-BoRKSV_h.js";import"./textarea-CpLkXx5p.js";import"./Check-DAFdA2oM.js";import"./ChevronRight-B3gSyJmK.js";const te=U("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function se(t){const e=O.c(58),{project:l,onSettingsClick:c}=t,{org:r}=H(),d=l.ui?.themeColor??"#60a5fa",b=l.ui?.bannerColor??d,m=l.ui?.banner?`url(${l.ui.banner})`:void 0;let i;e[0]!==b||e[1]!==m?(i={backgroundColor:b,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=b,e[1]=m,e[2]=i):i=e[2];const _=i;let u;e[3]!==r.slug||e[4]!==l.slug?(u={org:r.slug,project:l.slug},e[3]=r.slug,e[4]=l.slug,e[5]=u):u=e[5];let f;e[6]!==c?(f=B=>{B.preventDefault(),B.stopPropagation(),c?.(B)},e[6]=c,e[7]=f):f=e[7];let x,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=G("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),v=s.jsx(te,{className:"size-3.5 text-white"}),e[8]=x,e[9]=v):(x=e[8],v=e[9]);let g;e[10]!==f?(g=s.jsx("button",{type:"button",onClick:f,className:x,children:v}),e[10]=f,e[11]=g):g=e[11];let p;e[12]!==_||e[13]!==g?(p=s.jsx("div",{className:"h-20 relative",style:_,children:g}),e[12]=_,e[13]=g,e[14]=p):p=e[14];let n;e[15]!==l.name||e[16]!==l.ui||e[17]!==d?(n=l.ui?.icon?s.jsx("img",{src:l.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:d},children:s.jsx("span",{className:"text-sm font-medium text-white",children:l.name.charAt(0).toUpperCase()})}),e[15]=l.name,e[16]=l.ui,e[17]=d,e[18]=n):n=e[18];let a;e[19]!==l.name?(a=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:l.name}),e[19]=l.name,e[20]=a):a=e[20];let h;e[21]!==l.updatedAt?(h=Q(new Date(l.updatedAt),{addSuffix:!0}),e[21]=l.updatedAt,e[22]=h):h=e[22];let j;e[23]!==h?(j=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",h]}),e[23]=h,e[24]=j):j=e[24];let C;e[25]!==a||e[26]!==j?(C=s.jsxs("div",{className:"flex flex-col",children:[a,j]}),e[25]=a,e[26]=j,e[27]=C):C=e[27];let N;e[28]!==n||e[29]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-4",children:[n,C]}),e[28]=n,e[29]=C,e[30]=N):N=e[30];let k;e[31]!==l.boundConnections?(k=l.boundConnections.slice(0,4).map(le),e[31]=l.boundConnections,e[32]=k):k=e[32];let P;e[33]!==l.boundConnections.length?(P=l.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",l.boundConnections.length-4]})}),e[33]=l.boundConnections.length,e[34]=P):P=e[34];let y;e[35]!==k||e[36]!==P?(y=s.jsxs("div",{className:"flex pr-2",children:[k,P]}),e[35]=k,e[36]=P,e[37]=y):y=e[37];const z=r.logo??void 0;let w;e[38]!==r.name||e[39]!==z?(w=s.jsx(K,{url:z,fallback:r.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=r.name,e[39]=z,e[40]=w):w=e[40];let S;e[41]!==r.name?(S=s.jsx("span",{className:"truncate max-w-20",children:r.name}),e[41]=r.name,e[42]=S):S=e[42];let o;e[43]!==w||e[44]!==S?(o=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[w,S]}),e[43]=w,e[44]=S,e[45]=o):o=e[45];let L;e[46]!==y||e[47]!==o?(L=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[y,o]}),e[46]=y,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==N||e[50]!==L?($=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[N,L]}),e[49]=N,e[50]=L,e[51]=$):$=e[51];let A;e[52]!==$||e[53]!==p?(A=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[p,$]}),e[52]=$,e[53]=p,e[54]=A):A=e[54];let E;return e[55]!==A||e[56]!==u?(E=s.jsx(J,{to:"/$org/$project",params:u,className:"block group",children:A}),e[55]=A,e[56]=u,e[57]=E):E=e[57],E}function le(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(re,{connection:t})},t.id)}function re(t){const e=O.c(13),{connection:l}=t;if(l.icon){let m;e[0]!==l.icon||e[1]!==l.title?(m=s.jsx("img",{src:l.icon,alt:l.title,className:"size-4 object-cover"}),e[0]=l.icon,e[1]=l.title,e[2]=m):m=e[2];let i;return e[3]!==l.title||e[4]!==m?(i=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:l.title,children:m}),e[3]=l.title,e[4]=m,e[5]=i):i=e[5],i}const c=l.title;let r;e[6]!==l.title?(r=l.title.charAt(0).toUpperCase(),e[6]=l.title,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:r}),e[8]=r,e[9]=d):d=e[9];let b;return e[10]!==l.title||e[11]!==d?(b=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:c,children:d}),e[10]=l.title,e[11]=d,e[12]=b):b=e[12],b}function Ae(){const t=O.c(40),{org:e}=H(),{data:l,isLoading:c}=q(e.id),[r,d]=I.useState(""),[b,m]=I.useState(!1),i=M();let _,u,f,x,v,g,p,n,a;if(t[0]!==c||t[1]!==i||t[2]!==e.slug||t[3]!==l||t[4]!==r){const N=l?.filter(ie)?.filter(o=>o.name.toLowerCase().includes(r.toLowerCase())||o.description?.toLowerCase().includes(r.toLowerCase()))??[];let k;t[14]!==i||t[15]!==e.slug?(k=o=>{i({to:"/$org/$project/settings/general",params:{org:e.slug,project:o}})},t[14]=i,t[15]=e.slug,t[16]=k):k=t[16];const P=k;let y;t[17]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{m(!0)},t[17]=y):y=t[17];const z=y;u=D;let w;t[18]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(D.Header.Left,{children:s.jsx(X,{children:s.jsx(Y,{children:s.jsx(Z,{children:s.jsx(ee,{children:"Projects"})})})})}),t[18]=w):w=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(D.Header,{children:[w,s.jsx(D.Header.Right,{children:s.jsx(R,{onClick:z,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Create new project"})})]}),t[19]=n):n=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=o=>{o.key==="Escape"&&(d(""),o.target.blur())},t[20]=S):S=t[20],t[21]!==r?(a=s.jsx(F,{value:r,onChange:d,placeholder:"Search for a project...",onKeyDown:S}),t[21]=r,t[22]=a):a=t[22],_=D.Content,f="@container",t[23]!==c?(x=c&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(oe)})}),t[23]=c,t[24]=x):x=t[24],v=!c&&N.length===0&&r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(T,{title:"No projects found",description:`No projects match "${r}"`})}),g=!c&&N.length===0&&!r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(T,{title:"No projects yet",description:"Create a project to get started.",actions:s.jsx(R,{onClick:z,children:"Create new project"})})}),p=!c&&N.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:N.map(o=>s.jsx(se,{project:o,onSettingsClick:()=>P(o.slug)},o.id))})}),t[0]=c,t[1]=i,t[2]=e.slug,t[3]=l,t[4]=r,t[5]=_,t[6]=u,t[7]=f,t[8]=x,t[9]=v,t[10]=g,t[11]=p,t[12]=n,t[13]=a}else _=t[5],u=t[6],f=t[7],x=t[8],v=t[9],g=t[10],p=t[11],n=t[12],a=t[13];let h;t[25]!==_||t[26]!==f||t[27]!==x||t[28]!==v||t[29]!==g||t[30]!==p?(h=s.jsxs(_,{className:f,children:[x,v,g,p]}),t[25]=_,t[26]=f,t[27]=x,t[28]=v,t[29]=g,t[30]=p,t[31]=h):h=t[31];let j;t[32]!==b?(j=s.jsx(W,{open:b,onOpenChange:m}),t[32]=b,t[33]=j):j=t[33];let C;return t[34]!==u||t[35]!==n||t[36]!==a||t[37]!==h||t[38]!==j?(C=s.jsxs(u,{children:[n,a,h,j]}),t[34]=u,t[35]=n,t[36]=a,t[37]=h,t[38]=j,t[39]=C):C=t[39],C}function oe(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ie(t){return t.slug!==V}export{Ae as default};