decocms 2.186.4 → 2.186.5

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 (417) hide show
  1. package/dist/client/assets/{AlertCircle-CFfY0yZQ.js → AlertCircle-CtitvjsH.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-q2zfYOyo.js → ArrowLeft-3io_8nEP.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-C7CRE9h6.js → ArrowUp-i0bG6Tx_.js} +1 -1
  4. package/dist/client/assets/{Check-BSNNIgHR.js → Check-f6vqdTVP.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CmDo1lzo.js → ChevronDown-BzbiITGh.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-DvMx_esu.js → ChevronRight-BL_W1N6F.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-C1ZwRacy.js → ChevronUp-BKSJAtLO.js} +1 -1
  8. package/dist/client/assets/{Container-Dnc6yNup.js → Container-DaFalkcW.js} +1 -1
  9. package/dist/client/assets/{Dataflow03-Chfn49aN.js → Dataflow03-BID0sAye.js} +1 -1
  10. package/dist/client/assets/{Download01-BNS80W0k.js → Download01-DS6vGSUU.js} +1 -1
  11. package/dist/client/assets/{FolderClosed-BykmJUFv.js → FolderClosed-BEAeGMpl.js} +1 -1
  12. package/dist/client/assets/{Grid01--i5_ePuX.js → Grid01-CrA1A_18.js} +1 -1
  13. package/dist/client/assets/{List-Bmsn6CzV.js → List-WPqnYQKj.js} +1 -1
  14. package/dist/client/assets/{Loading01-D1Pvsp8y.js → Loading01-b0x7f8u_.js} +1 -1
  15. package/dist/client/assets/{Play-BC5VNHwm.js → Play-CN0m3XWi.js} +1 -1
  16. package/dist/client/assets/{Plus-DbIgM1x-.js → Plus-DmqvCfWI.js} +1 -1
  17. package/dist/client/assets/{RefreshCcw01-BEBs5v_q.js → RefreshCcw01-BZXMQFPy.js} +1 -1
  18. package/dist/client/assets/{SearchMd-PX-e8O0B.js → SearchMd-CIgTlNX_.js} +1 -1
  19. package/dist/client/assets/{Settings01-84CJqC0A.js → Settings01-bZOYZZe1.js} +1 -1
  20. package/dist/client/assets/{Trash01-BPldOgkf.js → Trash01-gOPUL91A.js} +1 -1
  21. package/dist/client/assets/{Type01-DpCsdgUP.js → Type01-DJEwH71e.js} +1 -1
  22. package/dist/client/assets/{Upload01-B2Ms9Ufu.js → Upload01-BdsUmigW.js} +1 -1
  23. package/dist/client/assets/{User01-BfpgpGwT.js → User01-BFJo9npx.js} +1 -1
  24. package/dist/client/assets/{VideoRecorder-wLrORVI9.js → VideoRecorder-CpeuE70t.js} +1 -1
  25. package/dist/client/assets/{X-BHB4uMvu.js → X-BPJKg-Sa.js} +1 -1
  26. package/dist/client/assets/{XCircle-diVK-bFd.js → XCircle-PZ_iEr_s.js} +1 -1
  27. package/dist/client/assets/{XClose-tJXgwIHZ.js → XClose-CV8NRiYb.js} +1 -1
  28. package/dist/client/assets/{Zap-CbDTgbzb.js → Zap-Djb2s9XH.js} +1 -1
  29. package/dist/client/assets/{agent-connections-preview-DDUBsgI6.js → agent-connections-preview-CFY9JoNF.js} +1 -1
  30. package/dist/client/assets/{agent-detail-DyWtkgva.js → agent-detail-H4BT7CTr.js} +1 -1
  31. package/dist/client/assets/{agents-Bhzn9Eef.js → agents-D2dFJ668.js} +1 -1
  32. package/dist/client/assets/{ai-providers-logos-D8dUWzwV.js → ai-providers-logos-Bt4g7p0X.js} +1 -1
  33. package/dist/client/assets/{alert-dialog-D8sReHHS.js → alert-dialog-qbhCFIrJ.js} +1 -1
  34. package/dist/client/assets/{auth-catchall-D1xOR84L.js → auth-catchall-CQTUcOb6.js} +1 -1
  35. package/dist/client/assets/{automation-detail-B7hCcREQ.js → automation-detail-DPyfTmgL.js} +1 -1
  36. package/dist/client/assets/{automations-Bx9vUoOk.js → automations-D9dpmBWI.js} +1 -1
  37. package/dist/client/assets/{avatar-C_Cgb4k2.js → avatar-HaW-aDPQ.js} +1 -1
  38. package/dist/client/assets/{badge-C8UnqRcC.js → badge-Crn2wX7w.js} +1 -1
  39. package/dist/client/assets/{binder-CEsnpfBd.js → binder-Bpa9PbnU.js} +1 -1
  40. package/dist/client/assets/{breadcrumb-CAVAhr_W.js → breadcrumb-Do1IM0FU.js} +1 -1
  41. package/dist/client/assets/{card-CWrlHmbX.js → card-D-nlEHTG.js} +1 -1
  42. package/dist/client/assets/{checkbox-DiUCU_uY.js → checkbox-Bk2GcJ8k.js} +1 -1
  43. package/dist/client/assets/{collapsible-BhwX3etL.js → collapsible-SLXpL9mb.js} +1 -1
  44. package/dist/client/assets/{collection-detail-Dkw16c0c.js → collection-detail-DeV3SFaX.js} +1 -1
  45. package/dist/client/assets/{collection-display-button-BBzEpEkj.js → collection-display-button-HO2n3PFr.js} +1 -1
  46. package/dist/client/assets/{collection-search-BT_VOWLL.js → collection-search-CW0lALTo.js} +1 -1
  47. package/dist/client/assets/{collection-table-wrapper-B347tlKT.js → collection-table-wrapper-DS1bzEdZ.js} +1 -1
  48. package/dist/client/assets/{collection-tabs-CRnU8dYm.js → collection-tabs-Dv1o-Tiq.js} +1 -1
  49. package/dist/client/assets/{command-DkggJl9E.js → command-BJmMsGWz.js} +1 -1
  50. package/dist/client/assets/{connection-card-DTdD45cZ.js → connection-card-tMWWUIo4.js} +1 -1
  51. package/dist/client/assets/{connection-detail-BVusS7DN.js → connection-detail-PuDo8T2F.js} +1 -1
  52. package/dist/client/assets/{connections-CSCQ37th.js → connections-BROEiJqN.js} +1 -1
  53. package/dist/client/assets/constants-BO-AsdnG.js +1 -0
  54. package/dist/client/assets/{constants-sZSGbDkU.js → constants-BRyDKx5E.js} +1 -1
  55. package/dist/client/assets/{context-CsyORbSE.js → context-DjKq41Ps.js} +1 -1
  56. package/dist/client/assets/{create-organization-dialog-DN8hdiM4.js → create-organization-dialog-582-kldv.js} +1 -1
  57. package/dist/client/assets/{create-project-dialog-lAZ_FT_g.js → create-project-dialog-CIZm3cj7.js} +1 -1
  58. package/dist/client/assets/{danger-B1Qw5mPg.js → danger-CY1cNAKE.js} +1 -1
  59. package/dist/client/assets/{danger-zone-BUW-olFn.js → danger-zone-DyYupl_l.js} +1 -1
  60. package/dist/client/assets/{dependencies-DRYoQ6jU.js → dependencies-HtJ0jPZo.js} +1 -1
  61. package/dist/client/assets/{dialog-CmqjWAM7.js → dialog-D2pSotmJ.js} +1 -1
  62. package/dist/client/assets/{drawer-DhTY0hMj.js → drawer-DmfwbJvN.js} +1 -1
  63. package/dist/client/assets/{dropdown-menu-D37bEJBF.js → dropdown-menu-DBNiGGCa.js} +1 -1
  64. package/dist/client/assets/{dynamic-plugin-layout-ChsexoCJ.js → dynamic-plugin-layout-Ci6pDEpr.js} +1 -1
  65. package/dist/client/assets/{editable-task-title-DEfOdS3n.js → editable-task-title-CVoah20Z.js} +1 -1
  66. package/dist/client/assets/{empty-state-B8cgNR-N.js → empty-state-Cq-2Stw7.js} +1 -1
  67. package/dist/client/assets/{empty-state-Cjw3IbRU.js → empty-state-D7BW8jaP.js} +1 -1
  68. package/dist/client/assets/{env-vars-editor-DHio8hU0.js → env-vars-editor-DGyEmObe.js} +1 -1
  69. package/dist/client/assets/{extract-connection-data-DgYZMSpy.js → extract-connection-data-Dr5WITt6.js} +1 -1
  70. package/dist/client/assets/{file-browser-BsuckOvL.js → file-browser-BStF6ZMr.js} +2 -2
  71. package/dist/client/assets/{form-Dg4rCHi6.js → form-BYJDKe84.js} +1 -1
  72. package/dist/client/assets/{general-B3rA-PiU.js → general-BjV1aJ55.js} +1 -1
  73. package/dist/client/assets/{grid-view-DAO80r8h.js → grid-view-KO_Fabbh.js} +1 -1
  74. package/dist/client/assets/{home-CTgNmz0x.js → home-D5293Vev.js} +1 -1
  75. package/dist/client/assets/{import-from-deco-dialog-BbA3u8-E.js → import-from-deco-dialog-Djo43MO2.js} +1 -1
  76. package/dist/client/assets/{index-D5h1vKqM.js → index-BLTp2mfW.js} +1 -1
  77. package/dist/client/assets/{index-B7m8nOA3.js → index-BV94yULQ.js} +1 -1
  78. package/dist/client/assets/{index-DPu67tmU.js → index-BbYJDAO_.js} +1 -1
  79. package/dist/client/assets/{index-Bcecb_Xz.js → index-BoO8n-rM.js} +3 -3
  80. package/dist/client/assets/{index-BiawlfhY.js → index-CPsGHZV5.js} +1 -1
  81. package/dist/client/assets/{index-VD0DUUlZ.js → index-D5sFwM_q.js} +1 -1
  82. package/dist/client/assets/{index-CyfmseFq.js → index-DM77haUb.js} +1 -1
  83. package/dist/client/assets/{index-Hi_A-Tsf.js → index-DwgsAdtI.js} +1 -1
  84. package/dist/client/assets/{index-C4GDQd8z.js → index-TdiS16S8.js} +1 -1
  85. package/dist/client/assets/{index-DHItCPJs.js → index-gp1o0aQ_.js} +1 -1
  86. package/dist/client/assets/{index-5yAQM6kw.js → index-qFA25zOH.js} +1 -1
  87. package/dist/client/assets/{infiniteQueryObserver-DWp3_CVI.js → infiniteQueryObserver-CL5fJNiq.js} +1 -1
  88. package/dist/client/assets/{input-cBzeNH_n.js → input-DuzgW_Cj.js} +1 -1
  89. package/dist/client/assets/{integration-icon-ByGVeLrz.js → integration-icon-Cx2rPbBh.js} +1 -1
  90. package/dist/client/assets/{label-DoFd0DeW.js → label-DiRwVfbK.js} +1 -1
  91. package/dist/client/assets/{layout-BhXmEzmE.js → layout-BfKLaD-7.js} +1 -1
  92. package/dist/client/assets/{layout-DCBpI9GX.js → layout-DRMSwprX.js} +1 -1
  93. package/dist/client/assets/{login-D1KWsW_u.js → login-Da33loRU.js} +1 -1
  94. package/dist/client/assets/{logo-upload-BQGPbHRq.js → logo-upload-D-EpUqKb.js} +1 -1
  95. package/dist/client/assets/{mcp-app-renderer-DndsLro0.js → mcp-app-renderer-A6_5gh0N.js} +1 -1
  96. package/dist/client/assets/{mcp-server-card-DPENkZXf.js → mcp-server-card-BWUTkKwk.js} +1 -1
  97. package/dist/client/assets/{mcp-server-detail-DQCKUE12.js → mcp-server-detail-jdGuw6cV.js} +2 -2
  98. package/dist/client/assets/{members-nGwQLmND.js → members-D2NzG2nc.js} +1 -1
  99. package/dist/client/assets/{monaco-editor-CrYWYGQQ.js → monaco-editor-DgkGyIFp.js} +1 -1
  100. package/dist/client/assets/{monitoring-CsbZ7bmm.js → monitoring-CSEdadkb.js} +1 -1
  101. package/dist/client/assets/{monitoring-dashboard-edit-w8pIA6Ie.js → monitoring-dashboard-edit-CXP9EN1f.js} +1 -1
  102. package/dist/client/assets/{monitoring-dashboard-view-MthMkZuB.js → monitoring-dashboard-view-CEaNkmLG.js} +1 -1
  103. package/dist/client/assets/{monitoring-stats-row-CqSp-eoy.js → monitoring-stats-row-B_MW1OhS.js} +1 -1
  104. package/dist/client/assets/{oauth-callback-CJZrmNWZ.js → oauth-callback-Bz0EJuS1.js} +1 -1
  105. package/dist/client/assets/{oauth-callback-ai-provider-B3_0Xe3o.js → oauth-callback-ai-provider-D5PorOtm.js} +1 -1
  106. package/dist/client/assets/{org-ai-providers-BddV4XoH.js → org-ai-providers-C8WJgjRg.js} +1 -1
  107. package/dist/client/assets/{page--U0v_pX3.js → page-DMpvrDmE.js} +1 -1
  108. package/dist/client/assets/{page-CBSe1z4F.js → page-DhnNY5cT.js} +1 -1
  109. package/dist/client/assets/{plugin-empty-state-BEgqVtoa.js → plugin-empty-state-BF81EuZU.js} +1 -1
  110. package/dist/client/assets/{plugin-empty-state-lZmnDccK.js → plugin-empty-state-CyYjML0d.js} +1 -1
  111. package/dist/client/assets/{plugin-header-CLrhmaZp.js → plugin-header-BZQ6v9Dv.js} +1 -1
  112. package/dist/client/assets/{plugin-header-CQK-IpRs.js → plugin-header-J32jluXn.js} +1 -1
  113. package/dist/client/assets/plugins-DieBnmX_.js +1 -0
  114. package/dist/client/assets/{popover-CMmU9vEC.js → popover-CtyD8kak.js} +1 -1
  115. package/dist/client/assets/{project-app-view-Cih2GI6n.js → project-app-view-B_TSbFht.js} +1 -1
  116. package/dist/client/assets/{project-layout-BU4QeywV.js → project-layout-BFYhUp7u.js} +1 -1
  117. package/dist/client/assets/{project-plugins-CRLkmd39.js → project-plugins-Ac2bO3iJ.js} +1 -1
  118. package/dist/client/assets/{projects-list-kJyjAxRL.js → projects-list-Bwwy0ru8.js} +1 -1
  119. package/dist/client/assets/{registry-layout-CudXrSHI.js → registry-layout-tuLQ36Na.js} +1 -1
  120. package/dist/client/assets/{registry-utils-bxl52ndx.js → registry-utils-DoSQNJ_M.js} +1 -1
  121. package/dist/client/assets/{reset-password--yhV4IBG.js → reset-password-CwToNAPf.js} +1 -1
  122. package/dist/client/assets/{resizable-Xmr_dFSw.js → resizable-BEIVuTnJ.js} +1 -1
  123. package/dist/client/assets/{save-actions-DnXh5j1Q.js → save-actions-C8S59f-v.js} +1 -1
  124. package/dist/client/assets/{scroll-area-QU3iRHJE.js → scroll-area-CduYY4Re.js} +1 -1
  125. package/dist/client/assets/{select-D239zaXv.js → select-CGOcI-7S.js} +1 -1
  126. package/dist/client/assets/{select-virtual-mcp-Czgt_AbJ.js → select-virtual-mcp-BEyfMo-o.js} +1 -1
  127. package/dist/client/assets/{shell-layout-BxPSBU5t.js → shell-layout-BT3vkv8Z.js} +2 -2
  128. package/dist/client/assets/{sidebar-settings-BBNHEf84.js → sidebar-settings-CyrcKkJ4.js} +1 -1
  129. package/dist/client/assets/{skeleton-D03wOHty.js → skeleton-Bo6z7uiK.js} +1 -1
  130. package/dist/client/assets/{spinner-B5ev-YDV.js → spinner-BM6ocUxt.js} +1 -1
  131. package/dist/client/assets/{store-invite-HvZ_f981.js → store-invite-BcKHSR2w.js} +1 -1
  132. package/dist/client/assets/{switch-B8WHWc6A.js → switch-zI0teXPa.js} +1 -1
  133. package/dist/client/assets/{table-CTzpd733.js → table-CyFHKgUK.js} +1 -1
  134. package/dist/client/assets/{tabs-Dm9XV8db.js → tabs-aNTBXb88.js} +1 -1
  135. package/dist/client/assets/{task-status-C1q5JfD_.js → task-status-BmEV7t9q.js} +1 -1
  136. package/dist/client/assets/tasks-BKT6sRTI.js +1 -0
  137. package/dist/client/assets/{tasks-panel-CX7jkjdF.js → tasks-panel-Dx_VmaoJ.js} +1 -1
  138. package/dist/client/assets/{textarea-D02CdeQw.js → textarea-CeeIB6-J.js} +1 -1
  139. package/dist/client/assets/{time-range-picker-D8NL5Nmu.js → time-range-picker-D7RILeKK.js} +1 -1
  140. package/dist/client/assets/{toggle-group-jq0jWIRc.js → toggle-group-BNOxtCQ3.js} +1 -1
  141. package/dist/client/assets/{tools-list-BR2Dix09.js → tools-list-B8BbYK4A.js} +1 -1
  142. package/dist/client/assets/{tooltip-BCp7U7mN.js → tooltip-BIaQfSI8.js} +1 -1
  143. package/dist/client/assets/{topbar-portal-DIcyXgfm.js → topbar-portal-Df-jV5dE.js} +1 -1
  144. package/dist/client/assets/{types-BsGobcR-.js → types-BeXFNplD.js} +1 -1
  145. package/dist/client/assets/{use-automations-c_xstGD5.js → use-automations-viUCmfTe.js} +1 -1
  146. package/dist/client/assets/{use-collections-vlgqqhuP.js → use-collections-boLvDkbT.js} +1 -1
  147. package/dist/client/assets/{use-connection-DqJeUugh.js → use-connection-sSldkm55.js} +1 -1
  148. package/dist/client/assets/{use-copy-Ck5qLOJz.js → use-copy-DuS-6kWn.js} +1 -1
  149. package/dist/client/assets/{use-create-virtual-mcp-DEi2MEtq.js → use-create-virtual-mcp-CKYKv6SW.js} +1 -1
  150. package/dist/client/assets/{use-infinite-scroll-DmzrG2BE.js → use-infinite-scroll-CGarn18C.js} +1 -1
  151. package/dist/client/assets/{use-install-from-registry-44g1gfZf.js → use-install-from-registry-DAJmEkC5.js} +1 -1
  152. package/dist/client/assets/{use-list-state-bklnJIlv.js → use-list-state-oXNu9u8R.js} +1 -1
  153. package/dist/client/assets/{use-mcp-prompts-CzQxO0I9.js → use-mcp-prompts-BRgvnsLG.js} +1 -1
  154. package/dist/client/assets/{use-mcp-resources-BQkvQ_u9.js → use-mcp-resources-BQpqezxP.js} +1 -1
  155. package/dist/client/assets/{use-mcp-tools-BOIAjBvi.js → use-mcp-tools-DMQzZOZ6.js} +1 -1
  156. package/dist/client/assets/{use-members-CWNkurdp.js → use-members-C2JN8hIu.js} +1 -1
  157. package/dist/client/assets/{use-project-C2DxBYtI.js → use-project-CilOoEpE.js} +1 -1
  158. package/dist/client/assets/{use-store-discovery-DE51kyFJ.js → use-store-discovery-D0gJ2CQY.js} +1 -1
  159. package/dist/client/assets/{use-view-mode-CmavyF68.js → use-view-mode-ByMVrnnV.js} +1 -1
  160. package/dist/client/assets/{use-virtual-mcp-DJSfh66r.js → use-virtual-mcp-BFsqq0fZ.js} +1 -1
  161. package/dist/client/assets/useInfiniteQuery-Byr_YtTT.js +1 -0
  162. package/dist/client/assets/{useMutation-DX97_hbH.js → useMutation-BJ-zKxaD.js} +1 -1
  163. package/dist/client/assets/useQuery-nL8PK1-e.js +1 -0
  164. package/dist/client/assets/useSuspenseInfiniteQuery-DDi8SjCq.js +1 -0
  165. package/dist/client/assets/{user-xfin110t.js → user-YxxwV0CN.js} +1 -1
  166. package/dist/client/assets/{workflow-Ca61UGhY.js → workflow-BpFpSrqC.js} +1 -1
  167. package/dist/client/index.html +1 -1
  168. package/dist/server/cli.js +266 -266
  169. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  170. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  171. package/dist/server/node_modules/ansi-styles/license +9 -0
  172. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  173. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  174. package/dist/server/node_modules/environment/index.d.ts +74 -0
  175. package/dist/server/node_modules/environment/index.js +47 -0
  176. package/dist/server/node_modules/environment/license +9 -0
  177. package/dist/server/node_modules/environment/package.json +74 -0
  178. package/dist/server/node_modules/environment/readme.md +94 -0
  179. package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
  180. package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
  181. package/dist/server/node_modules/escape-string-regexp/license +9 -0
  182. package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
  183. package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
  184. package/dist/server/node_modules/ink/build/ansi-tokenizer.d.ts +38 -0
  185. package/dist/server/node_modules/ink/build/ansi-tokenizer.js +316 -0
  186. package/dist/server/node_modules/ink/build/ansi-tokenizer.js.map +1 -0
  187. package/dist/server/node_modules/ink/build/apply-styles.js +175 -0
  188. package/dist/server/node_modules/ink/build/build-layout.js +77 -0
  189. package/dist/server/node_modules/ink/build/calculate-wrapped-text.js +53 -0
  190. package/dist/server/node_modules/ink/build/colorize.d.ts +3 -0
  191. package/dist/server/node_modules/ink/build/colorize.js +48 -0
  192. package/dist/server/node_modules/ink/build/colorize.js.map +1 -0
  193. package/dist/server/node_modules/ink/build/components/AccessibilityContext.d.ts +3 -0
  194. package/dist/server/node_modules/ink/build/components/AccessibilityContext.js +5 -0
  195. package/dist/server/node_modules/ink/build/components/AccessibilityContext.js.map +1 -0
  196. package/dist/server/node_modules/ink/build/components/App.d.ts +18 -0
  197. package/dist/server/node_modules/ink/build/components/App.js +351 -0
  198. package/dist/server/node_modules/ink/build/components/App.js.map +1 -0
  199. package/dist/server/node_modules/ink/build/components/AppContext.d.ts +15 -0
  200. package/dist/server/node_modules/ink/build/components/AppContext.js +11 -0
  201. package/dist/server/node_modules/ink/build/components/AppContext.js.map +1 -0
  202. package/dist/server/node_modules/ink/build/components/BackgroundContext.d.ts +4 -0
  203. package/dist/server/node_modules/ink/build/components/BackgroundContext.js +3 -0
  204. package/dist/server/node_modules/ink/build/components/BackgroundContext.js.map +1 -0
  205. package/dist/server/node_modules/ink/build/components/Box.d.ts +117 -0
  206. package/dist/server/node_modules/ink/build/components/Box.js +34 -0
  207. package/dist/server/node_modules/ink/build/components/Box.js.map +1 -0
  208. package/dist/server/node_modules/ink/build/components/Color.js +62 -0
  209. package/dist/server/node_modules/ink/build/components/Cursor.d.ts +83 -0
  210. package/dist/server/node_modules/ink/build/components/Cursor.js +53 -0
  211. package/dist/server/node_modules/ink/build/components/Cursor.js.map +1 -0
  212. package/dist/server/node_modules/ink/build/components/CursorContext.d.ts +11 -0
  213. package/dist/server/node_modules/ink/build/components/CursorContext.js +8 -0
  214. package/dist/server/node_modules/ink/build/components/CursorContext.js.map +1 -0
  215. package/dist/server/node_modules/ink/build/components/ErrorBoundary.d.ts +18 -0
  216. package/dist/server/node_modules/ink/build/components/ErrorBoundary.js +23 -0
  217. package/dist/server/node_modules/ink/build/components/ErrorBoundary.js.map +1 -0
  218. package/dist/server/node_modules/ink/build/components/ErrorOverview.d.ts +6 -0
  219. package/dist/server/node_modules/ink/build/components/ErrorOverview.js +84 -0
  220. package/dist/server/node_modules/ink/build/components/ErrorOverview.js.map +1 -0
  221. package/dist/server/node_modules/ink/build/components/FocusContext.d.ts +16 -0
  222. package/dist/server/node_modules/ink/build/components/FocusContext.js +17 -0
  223. package/dist/server/node_modules/ink/build/components/FocusContext.js.map +1 -0
  224. package/dist/server/node_modules/ink/build/components/Newline.d.ts +13 -0
  225. package/dist/server/node_modules/ink/build/components/Newline.js +8 -0
  226. package/dist/server/node_modules/ink/build/components/Newline.js.map +1 -0
  227. package/dist/server/node_modules/ink/build/components/Spacer.d.ts +7 -0
  228. package/dist/server/node_modules/ink/build/components/Spacer.js +11 -0
  229. package/dist/server/node_modules/ink/build/components/Spacer.js.map +1 -0
  230. package/dist/server/node_modules/ink/build/components/Static.d.ts +24 -0
  231. package/dist/server/node_modules/ink/build/components/Static.js +28 -0
  232. package/dist/server/node_modules/ink/build/components/Static.js.map +1 -0
  233. package/dist/server/node_modules/ink/build/components/StderrContext.d.ts +15 -0
  234. package/dist/server/node_modules/ink/build/components/StderrContext.js +13 -0
  235. package/dist/server/node_modules/ink/build/components/StderrContext.js.map +1 -0
  236. package/dist/server/node_modules/ink/build/components/StdinContext.d.ts +22 -0
  237. package/dist/server/node_modules/ink/build/components/StdinContext.js +19 -0
  238. package/dist/server/node_modules/ink/build/components/StdinContext.js.map +1 -0
  239. package/dist/server/node_modules/ink/build/components/StdoutContext.d.ts +15 -0
  240. package/dist/server/node_modules/ink/build/components/StdoutContext.js +13 -0
  241. package/dist/server/node_modules/ink/build/components/StdoutContext.js.map +1 -0
  242. package/dist/server/node_modules/ink/build/components/Text.d.ts +55 -0
  243. package/dist/server/node_modules/ink/build/components/Text.js +50 -0
  244. package/dist/server/node_modules/ink/build/components/Text.js.map +1 -0
  245. package/dist/server/node_modules/ink/build/components/Transform.d.ts +16 -0
  246. package/dist/server/node_modules/ink/build/components/Transform.js +15 -0
  247. package/dist/server/node_modules/ink/build/components/Transform.js.map +1 -0
  248. package/dist/server/node_modules/ink/build/cursor-helpers.d.ts +38 -0
  249. package/dist/server/node_modules/ink/build/cursor-helpers.js +56 -0
  250. package/dist/server/node_modules/ink/build/cursor-helpers.js.map +1 -0
  251. package/dist/server/node_modules/ink/build/devtools-window-polyfill.d.ts +1 -0
  252. package/dist/server/node_modules/ink/build/devtools-window-polyfill.js +65 -0
  253. package/dist/server/node_modules/ink/build/devtools-window-polyfill.js.map +1 -0
  254. package/dist/server/node_modules/ink/build/devtools.d.ts +1 -0
  255. package/dist/server/node_modules/ink/build/devtools.js +11 -0
  256. package/dist/server/node_modules/ink/build/devtools.js.map +1 -0
  257. package/dist/server/node_modules/ink/build/dom.d.ts +56 -0
  258. package/dist/server/node_modules/ink/build/dom.js +124 -0
  259. package/dist/server/node_modules/ink/build/dom.js.map +1 -0
  260. package/dist/server/node_modules/ink/build/experimental/apply-style.js +140 -0
  261. package/dist/server/node_modules/ink/build/experimental/dom.js +123 -0
  262. package/dist/server/node_modules/ink/build/experimental/output.js +91 -0
  263. package/dist/server/node_modules/ink/build/experimental/reconciler.js +141 -0
  264. package/dist/server/node_modules/ink/build/experimental/renderer.js +81 -0
  265. package/dist/server/node_modules/ink/build/get-max-width.d.ts +3 -0
  266. package/dist/server/node_modules/ink/build/get-max-width.js +10 -0
  267. package/dist/server/node_modules/ink/build/get-max-width.js.map +1 -0
  268. package/dist/server/node_modules/ink/build/hooks/use-app.d.ts +5 -0
  269. package/dist/server/node_modules/ink/build/hooks/use-app.js +8 -0
  270. package/dist/server/node_modules/ink/build/hooks/use-app.js.map +1 -0
  271. package/dist/server/node_modules/ink/build/hooks/use-cursor.d.ts +12 -0
  272. package/dist/server/node_modules/ink/build/hooks/use-cursor.js +29 -0
  273. package/dist/server/node_modules/ink/build/hooks/use-cursor.js.map +1 -0
  274. package/dist/server/node_modules/ink/build/hooks/use-focus-manager.d.ts +28 -0
  275. package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js +17 -0
  276. package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js.map +1 -0
  277. package/dist/server/node_modules/ink/build/hooks/use-focus.d.ts +29 -0
  278. package/dist/server/node_modules/ink/build/hooks/use-focus.js +42 -0
  279. package/dist/server/node_modules/ink/build/hooks/use-focus.js.map +1 -0
  280. package/dist/server/node_modules/ink/build/hooks/use-input.d.ts +131 -0
  281. package/dist/server/node_modules/ink/build/hooks/use-input.js +124 -0
  282. package/dist/server/node_modules/ink/build/hooks/use-input.js.map +1 -0
  283. package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.d.ts +5 -0
  284. package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js +11 -0
  285. package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js.map +1 -0
  286. package/dist/server/node_modules/ink/build/hooks/use-stderr.d.ts +5 -0
  287. package/dist/server/node_modules/ink/build/hooks/use-stderr.js +8 -0
  288. package/dist/server/node_modules/ink/build/hooks/use-stderr.js.map +1 -0
  289. package/dist/server/node_modules/ink/build/hooks/use-stdin.d.ts +5 -0
  290. package/dist/server/node_modules/ink/build/hooks/use-stdin.js +8 -0
  291. package/dist/server/node_modules/ink/build/hooks/use-stdin.js.map +1 -0
  292. package/dist/server/node_modules/ink/build/hooks/use-stdout.d.ts +5 -0
  293. package/dist/server/node_modules/ink/build/hooks/use-stdout.js +8 -0
  294. package/dist/server/node_modules/ink/build/hooks/use-stdout.js.map +1 -0
  295. package/dist/server/node_modules/ink/build/hooks/useInput.js +38 -0
  296. package/dist/server/node_modules/ink/build/index.d.ts +34 -0
  297. package/dist/server/node_modules/ink/build/index.js +20 -0
  298. package/dist/server/node_modules/ink/build/index.js.map +1 -0
  299. package/dist/server/node_modules/ink/build/ink.d.ts +90 -0
  300. package/dist/server/node_modules/ink/build/ink.js +637 -0
  301. package/dist/server/node_modules/ink/build/ink.js.map +1 -0
  302. package/dist/server/node_modules/ink/build/input-parser.d.ts +7 -0
  303. package/dist/server/node_modules/ink/build/input-parser.js +154 -0
  304. package/dist/server/node_modules/ink/build/input-parser.js.map +1 -0
  305. package/dist/server/node_modules/ink/build/instance.js +205 -0
  306. package/dist/server/node_modules/ink/build/instances.d.ts +3 -0
  307. package/dist/server/node_modules/ink/build/instances.js +8 -0
  308. package/dist/server/node_modules/ink/build/instances.js.map +1 -0
  309. package/dist/server/node_modules/ink/build/kitty-keyboard.d.ts +23 -0
  310. package/dist/server/node_modules/ink/build/kitty-keyboard.js +32 -0
  311. package/dist/server/node_modules/ink/build/kitty-keyboard.js.map +1 -0
  312. package/dist/server/node_modules/ink/build/layout.d.ts +7 -0
  313. package/dist/server/node_modules/ink/build/layout.js +33 -0
  314. package/dist/server/node_modules/ink/build/layout.js.map +1 -0
  315. package/dist/server/node_modules/ink/build/log-update.d.ts +19 -0
  316. package/dist/server/node_modules/ink/build/log-update.js +242 -0
  317. package/dist/server/node_modules/ink/build/log-update.js.map +1 -0
  318. package/dist/server/node_modules/ink/build/measure-element.d.ts +16 -0
  319. package/dist/server/node_modules/ink/build/measure-element.js +9 -0
  320. package/dist/server/node_modules/ink/build/measure-element.js.map +1 -0
  321. package/dist/server/node_modules/ink/build/measure-text.d.ts +6 -0
  322. package/dist/server/node_modules/ink/build/measure-text.js +21 -0
  323. package/dist/server/node_modules/ink/build/measure-text.js.map +1 -0
  324. package/dist/server/node_modules/ink/build/options.d.ts +52 -0
  325. package/dist/server/node_modules/ink/build/options.js +2 -0
  326. package/dist/server/node_modules/ink/build/options.js.map +1 -0
  327. package/dist/server/node_modules/ink/build/output.d.ts +35 -0
  328. package/dist/server/node_modules/ink/build/output.js +183 -0
  329. package/dist/server/node_modules/ink/build/output.js.map +1 -0
  330. package/dist/server/node_modules/ink/build/parse-keypress.d.ts +22 -0
  331. package/dist/server/node_modules/ink/build/parse-keypress.js +493 -0
  332. package/dist/server/node_modules/ink/build/parse-keypress.js.map +1 -0
  333. package/dist/server/node_modules/ink/build/reconciler.d.ts +4 -0
  334. package/dist/server/node_modules/ink/build/reconciler.js +274 -0
  335. package/dist/server/node_modules/ink/build/reconciler.js.map +1 -0
  336. package/dist/server/node_modules/ink/build/render-background.d.ts +4 -0
  337. package/dist/server/node_modules/ink/build/render-background.js +25 -0
  338. package/dist/server/node_modules/ink/build/render-background.js.map +1 -0
  339. package/dist/server/node_modules/ink/build/render-border.d.ts +4 -0
  340. package/dist/server/node_modules/ink/build/render-border.js +73 -0
  341. package/dist/server/node_modules/ink/build/render-border.js.map +1 -0
  342. package/dist/server/node_modules/ink/build/render-node-to-output.d.ts +14 -0
  343. package/dist/server/node_modules/ink/build/render-node-to-output.js +147 -0
  344. package/dist/server/node_modules/ink/build/render-node-to-output.js.map +1 -0
  345. package/dist/server/node_modules/ink/build/render-to-string.d.ts +38 -0
  346. package/dist/server/node_modules/ink/build/render-to-string.js +115 -0
  347. package/dist/server/node_modules/ink/build/render-to-string.js.map +1 -0
  348. package/dist/server/node_modules/ink/build/render.d.ts +121 -0
  349. package/dist/server/node_modules/ink/build/render.js +55 -0
  350. package/dist/server/node_modules/ink/build/render.js.map +1 -0
  351. package/dist/server/node_modules/ink/build/renderer.d.ts +8 -0
  352. package/dist/server/node_modules/ink/build/renderer.js +55 -0
  353. package/dist/server/node_modules/ink/build/renderer.js.map +1 -0
  354. package/dist/server/node_modules/ink/build/sanitize-ansi.d.ts +2 -0
  355. package/dist/server/node_modules/ink/build/sanitize-ansi.js +27 -0
  356. package/dist/server/node_modules/ink/build/sanitize-ansi.js.map +1 -0
  357. package/dist/server/node_modules/ink/build/screen-reader-update.d.ts +13 -0
  358. package/dist/server/node_modules/ink/build/screen-reader-update.js +38 -0
  359. package/dist/server/node_modules/ink/build/screen-reader-update.js.map +1 -0
  360. package/dist/server/node_modules/ink/build/squash-text-nodes.d.ts +3 -0
  361. package/dist/server/node_modules/ink/build/squash-text-nodes.js +36 -0
  362. package/dist/server/node_modules/ink/build/squash-text-nodes.js.map +1 -0
  363. package/dist/server/node_modules/ink/build/styles.d.ts +240 -0
  364. package/dist/server/node_modules/ink/build/styles.js +232 -0
  365. package/dist/server/node_modules/ink/build/styles.js.map +1 -0
  366. package/dist/server/node_modules/ink/build/utils.d.ts +2 -0
  367. package/dist/server/node_modules/ink/build/utils.js +4 -0
  368. package/dist/server/node_modules/ink/build/utils.js.map +1 -0
  369. package/dist/server/node_modules/ink/build/wrap-text.d.ts +3 -0
  370. package/dist/server/node_modules/ink/build/wrap-text.js +31 -0
  371. package/dist/server/node_modules/ink/build/wrap-text.js.map +1 -0
  372. package/dist/server/node_modules/ink/build/write-synchronized.d.ts +4 -0
  373. package/dist/server/node_modules/ink/build/write-synchronized.js +7 -0
  374. package/dist/server/node_modules/ink/build/write-synchronized.js.map +1 -0
  375. package/dist/server/node_modules/ink/license +10 -0
  376. package/dist/server/node_modules/ink/package.json +201 -0
  377. package/dist/server/node_modules/ink/readme.md +2636 -0
  378. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  379. package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
  380. package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
  381. package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
  382. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
  383. package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
  384. package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
  385. package/dist/server/node_modules/is-unicode-supported/license +9 -0
  386. package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
  387. package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
  388. package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
  389. package/dist/server/node_modules/mimic-fn/index.js +13 -0
  390. package/dist/server/node_modules/mimic-fn/license +9 -0
  391. package/dist/server/node_modules/mimic-fn/package.json +42 -0
  392. package/dist/server/node_modules/mimic-fn/readme.md +69 -0
  393. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  394. package/dist/server/node_modules/pg-int8/README.md +16 -0
  395. package/dist/server/node_modules/pg-int8/index.js +100 -0
  396. package/dist/server/node_modules/pg-int8/package.json +24 -0
  397. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  398. package/dist/server/node_modules/postgres-bytea/license +21 -0
  399. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  400. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  401. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  402. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  403. package/dist/server/node_modules/postgres-interval/license +21 -0
  404. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  405. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  406. package/dist/server/node_modules/string-width/index.d.ts +39 -0
  407. package/dist/server/node_modules/string-width/index.js +82 -0
  408. package/dist/server/node_modules/string-width/license +9 -0
  409. package/dist/server/node_modules/string-width/package.json +64 -0
  410. package/dist/server/node_modules/string-width/readme.md +66 -0
  411. package/package.json +1 -1
  412. package/dist/client/assets/constants-BnhbK7UO.js +0 -1
  413. package/dist/client/assets/plugins-DDBLgJ0t.js +0 -1
  414. package/dist/client/assets/tasks-w2rwAPZq.js +0 -1
  415. package/dist/client/assets/useInfiniteQuery-CeKnt0If.js +0 -1
  416. package/dist/client/assets/useQuery-kLEJeUD0.js +0 -1
  417. package/dist/client/assets/useSuspenseInfiniteQuery-ClWGoj50.js +0 -1
@@ -1 +1 @@
1
- import{d as j,r as w,j as s,y as S,B as te,c as se,E as xe,u as pe,g as oe}from"./index-Bcecb_Xz.js";import{C as b}from"./task-status-C1q5JfD_.js";import{C as ue,E as he}from"./editable-task-title-DEfOdS3n.js";import{a as ie}from"./tasks-panel-CX7jkjdF.js";import{u as le,r as ge,a as re}from"./context-CsyORbSE.js";import{V as je}from"./select-virtual-mcp-Czgt_AbJ.js";import{I as U,t as be,l as Ne,m as ve,A as W,n as we}from"./integration-icon-ByGVeLrz.js";import{a as ye,b as Se,P as Ce}from"./popover-CMmU9vEC.js";import{S as q}from"./skeleton-D03wOHty.js";import{i as ke,d as _e}from"./constants-sZSGbDkU.js";import{b as Ie}from"./use-virtual-mcp-DJSfh66r.js";import{i as ze}from"./ChevronRight-DvMx_esu.js";import{s as ne}from"./Plus-DbIgM1x-.js";import{u as F}from"./tooltip-BCp7U7mN.js";import{a as Ee,D as Ae,b as Me,c as Te}from"./dialog-CmqjWAM7.js";import{D as ae,a as ce,b as Oe,c as De}from"./drawer-DhTY0hMj.js";import{I as me}from"./import-from-deco-dialog-BbA3u8-E.js";import{u as Pe}from"./use-create-virtual-mcp-DEi2MEtq.js";import{P as H}from"./index-DPu67tmU.js";import{R as G,a as K,b as Re}from"./resizable-Xmr_dFSw.js";import{u as $e}from"./useQuery-kLEJeUD0.js";import{d as Ve}from"./XCircle-diVK-bFd.js";import"./spinner-B5ev-YDV.js";import"./use-mcp-prompts-CzQxO0I9.js";import"./form-Dg4rCHi6.js";import"./label-DoFd0DeW.js";import"./input-cBzeNH_n.js";import"./index-Hi_A-Tsf.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-C7CRE9h6.js";import"./ChevronDown-CmDo1lzo.js";import"./org-ai-providers-BddV4XoH.js";import"./useMutation-DX97_hbH.js";import"./AlertCircle-CFfY0yZQ.js";import"./RefreshCcw01-BEBs5v_q.js";import"./Play-BC5VNHwm.js";import"./Trash01-BPldOgkf.js";import"./card-CWrlHmbX.js";import"./toggle-group-jq0jWIRc.js";import"./avatar-C_Cgb4k2.js";import"./User01-BfpgpGwT.js";import"./ai-providers-logos-D8dUWzwV.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./X-BHB4uMvu.js";import"./select-D239zaXv.js";import"./index-BdQq_4o_.js";import"./index-VD0DUUlZ.js";import"./Check-BSNNIgHR.js";import"./ChevronUp-C1ZwRacy.js";import"./ArrowLeft-q2zfYOyo.js";import"./use-copy-Ck5qLOJz.js";import"./marked.esm-BaswSlok.js";import"./tabs-Dm9XV8db.js";import"./checkbox-DiUCU_uY.js";import"./VideoRecorder-wLrORVI9.js";import"./SearchMd-PX-e8O0B.js";import"./Settings01-84CJqC0A.js";import"./use-mcp-resources-BQkvQ_u9.js";import"./collapsible-BhwX3etL.js";import"./index-C4GDQd8z.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DndsLro0.js";import"./types-BsGobcR-.js";import"./XClose-tJXgwIHZ.js";import"./Type01-DpCsdgUP.js";import"./use-collections-vlgqqhuP.js";import"./useSuspenseInfiniteQuery-ClWGoj50.js";import"./infiniteQueryObserver-DWp3_CVI.js";import"./Loading01-D1Pvsp8y.js";import"./collection-search-BT_VOWLL.js";import"./user-xfin110t.js";import"./format-time-CMKyl-GC.js";import"./empty-state-B8cgNR-N.js";import"./dropdown-menu-D37bEJBF.js";import"./decopilot-events-Brt4gAR6.js";import"./index-D5h1vKqM.js";import"./Container-Dnc6yNup.js";import"./Dataflow03-Chfn49aN.js";import"./Download01-BNS80W0k.js";import"./List-Bmsn6CzV.js";import"./FolderClosed-BykmJUFv.js";import"./Grid01--i5_ePuX.js";import"./Upload01-B2Ms9Ufu.js";import"./Zap-CbDTgbzb.js";import"./generate-id-Dyweu44Y.js";import"./slug-DcxyEoi0.js";const He=[{id:"deco",title:"Import from deco.cx",buttonLabel:"Import site",comingSoon:!1,image:"/import-decocx.png"},{id:"github",title:"Existing GitHub project",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-github.png"},{id:"scratch",title:"Start from scratch",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-scratch.png"}];function Q(t){const e=j.c(8),{onCardAction:r,mobile:o}=t,a=o?"flex flex-col flex-1 min-h-0 gap-3":"flex flex-col gap-3";let l;e[0]!==a?(l=S("sm:grid sm:grid-cols-3 sm:gap-4",a),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==o||e[3]!==r?(c=He.map(i=>s.jsxs("button",{type:"button",disabled:i.comingSoon,onClick:()=>r(i.id),className:S("rounded-xl border border-border bg-card overflow-hidden text-left","transition-transform duration-150 ease-out will-change-transform","flex flex-row items-center sm:flex-col",o&&"flex-1 min-h-0",!i.comingSoon&&"[@media(hover:hover)]:hover:scale-[1.03] sm:[@media(hover:hover)]:hover:scale-[1.05] active:scale-[0.98] cursor-pointer",i.comingSoon&&"cursor-default"),children:[s.jsx("div",{className:S("w-28 shrink-0 self-stretch sm:w-full sm:aspect-[4/3] sm:self-auto bg-muted overflow-hidden",i.comingSoon&&"opacity-40"),children:i.image&&s.jsx("img",{src:i.image,alt:i.title,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-4 py-3 sm:flex-col sm:items-stretch sm:px-5 sm:py-4 sm:gap-0",children:[s.jsx("p",{className:"font-medium text-foreground text-sm sm:text-base sm:text-center sm:mb-4",children:i.title}),s.jsx(te,{className:"shrink-0 cursor-pointer sm:w-full",size:"sm",variant:i.comingSoon?"outline":"default",disabled:i.comingSoon,onClick:d=>{d.stopPropagation(),r(i.id)},children:i.buttonLabel})]})]},i.id)),e[2]=o,e[3]=r,e[4]=c):c=e[4];let n;return e[5]!==l||e[6]!==c?(n=s.jsx("div",{className:l,children:c}),e[5]=l,e[6]=c,e[7]=n):n=e[7],n}const X=s.jsx(U,{icon:"icon://Globe01?color=violet",name:"Site Editor",size:"sm"});function Be(t){const e=j.c(15),{open:r,onOpenChange:o}=t,[a,l]=w.useState(!1),c=F();let n;e[0]!==o?(n=u=>{u==="deco"&&(o(!1),l(!0))},e[0]=o,e[1]=n):n=e[1];const i=n;let d;e[2]!==i||e[3]!==c||e[4]!==o||e[5]!==r?(d=c?s.jsx(ae,{open:r,onOpenChange:o,children:s.jsxs(ce,{className:"h-[70dvh]",children:[s.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(De,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:s.jsx(Q,{onCardAction:i,mobile:!0})})]})}):s.jsx(Ee,{open:r,onOpenChange:o,children:s.jsxs(Ae,{className:"sm:max-w-[900px] p-8",children:[s.jsx(Me,{className:"mb-8",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(Te,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx(Q,{onCardAction:i})]})}),e[2]=i,e[3]=c,e[4]=o,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o?(m=()=>{l(!1),o(!0)},e[7]=o,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==m?(f=s.jsx(me,{open:a,onOpenChange:l,onBack:m}),e[9]=a,e[10]=m,e[11]=f):f=e[11];let x;return e[12]!==d||e[13]!==f?(x=s.jsxs(s.Fragment,{children:[d,f]}),e[12]=d,e[13]=f,e[14]=x):x=e[14],x}function de(t){const e=j.c(16),{agent:r,onSpecialClick:o}=t,{setVirtualMcpId:a}=le();let l;e[0]!==r.id||e[1]!==o||e[2]!==a?(l=()=>{o?o():a(r.id)},e[0]=r.id,e[1]=o,e[2]=a,e[3]=l):l=e[3];const c=l;let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[4]=n):n=e[4];const i=`Select agent ${r.title}`;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(be,{size:24}),e[5]=d):d=e[5];let m;e[6]!==r.icon||e[7]!==r.title?(m=s.jsx(U,{icon:r.icon,name:r.title,size:"md",fallbackIcon:d,className:"transition-transform group-hover:scale-110"}),e[6]=r.icon,e[7]=r.title,e[8]=m):m=e[8];let f;e[9]!==r.title?(f=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2",children:r.title}),e[9]=r.title,e[10]=f):f=e[10];let x;return e[11]!==c||e[12]!==i||e[13]!==m||e[14]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:n,"aria-label":i,children:[m,f]}),e[11]=c,e[12]=i,e[13]=m,e[14]=f,e[15]=x):x=e[15],x}function Le(t){const e=j.c(15),{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:a}=t,[l,c]=w.useState(!1),n=w.useRef(null),i=F();let d,m;e[0]!==i||e[1]!==l?(d=()=>{l&&!i&&setTimeout(()=>{n.current?.focus()},0)},m=[l,i],e[0]=i,e[1]=l,e[2]=d,e[3]=m):(d=e[2],m=e[3]),w.useEffect(d,m);let f;e[4]!==a?(f=N=>{a(N),c(!1)},e[4]=a,e[5]=f):f=e[5];const x=f;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[6]=u):u=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ye,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ze,{size:20,className:"text-foreground"})}),s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"})]})}),e[7]=h):h=e[7];let p;e[8]!==x||e[9]!==o||e[10]!==r?(p=s.jsx(Se,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(je,{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:x,searchInputRef:n})}),e[8]=x,e[9]=o,e[10]=r,e[11]=p):p=e[11];let g;return e[12]!==l||e[13]!==p?(g=s.jsxs(Ce,{open:l,onOpenChange:c,children:[h,p]}),e[12]=l,e[13]=p,e[14]=g):g=e[14],g}const J={id:"site-editor",title:"Site Editor",icon:"icon://Globe01?color=violet"};function Fe(){const t=j.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={navigateOnCreate:!0},t[0]=e):e=t[0];const{createVirtualMCP:r,isCreating:o}=Pe(e);let a;t[1]!==r?(a=()=>r(),t[1]=r,t[2]=a):a=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group","disabled:opacity-50 disabled:cursor-not-allowed"),t[3]=l):l=t[3];let c,n;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ne,{size:20,className:"text-muted-foreground"})}),n=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),t[4]=c,t[5]=n):(c=t[4],n=t[5]);let i;return t[6]!==o||t[7]!==a?(i=s.jsxs("button",{type:"button",onClick:a,disabled:o,className:l,"aria-label":"Create agent",children:[c,n]}),t[6]=o,t[7]=a,t[8]=i):i=t[8],i}function Ge(){const t=j.c(30),e=Ie(),{selectedVirtualMcp:r,setVirtualMcpId:o}=le(),{locator:a}=se(),[l,c]=w.useState(!1);let n,i,d,m,f,x;if(t[0]!==a||t[1]!==e){const z=ge(a),k=e.filter(qe).sort((_,I)=>{const B=z.indexOf(_.id),v=z.indexOf(I.id);return B!==-1&&v!==-1?B-v:B!==-1?-1:v!==-1?1:new Date(I.updated_at).getTime()-new Date(_.updated_at).getTime()}).slice(0,5);let y;t[8]!==e?(y=e.map(We),t[8]=e,t[9]=y):y=t[9],x=y,n=k.length>0,f="w-full",i="flex flex-wrap justify-center gap-2",t[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(de,{agent:J,onSpecialClick:()=>c(!0)},J.id),t[10]=d):d=t[10],m=k.map(Ue),t[0]=a,t[1]=e,t[2]=n,t[3]=i,t[4]=d,t[5]=m,t[6]=f,t[7]=x}else n=t[2],i=t[3],d=t[4],m=t[5],f=t[6],x=t[7];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Fe,{}),t[11]=u):u=t[11];let h;t[12]!==n||t[13]!==r?.id||t[14]!==o||t[15]!==x?(h=n&&s.jsx(Le,{virtualMcps:x,selectedVirtualMcpId:r?.id??null,onVirtualMcpChange:o}),t[12]=n,t[13]=r?.id,t[14]=o,t[15]=x,t[16]=h):h=t[16];let p;t[17]!==i||t[18]!==d||t[19]!==m||t[20]!==h?(p=s.jsxs("div",{className:i,children:[d,m,u,h]}),t[17]=i,t[18]=d,t[19]=m,t[20]=h,t[21]=p):p=t[21];let g;t[22]!==f||t[23]!==p?(g=s.jsx("div",{className:f,children:p}),t[22]=f,t[23]=p,t[24]=g):g=t[24];let N;t[25]!==l?(N=s.jsx(Be,{open:l,onOpenChange:c}),t[25]=l,t[26]=N):N=t[26];let C;return t[27]!==g||t[28]!==N?(C=s.jsxs(s.Fragment,{children:[g,N]}),t[27]=g,t[28]=N,t[29]=C):C=t[29],C}function Ue(t){return s.jsx(de,{agent:t},t.id??"default")}function We(t){return{id:t.id,title:t.title,description:t.description,icon:t.icon}}function qe(t){return t.id!==null&&!ke(t.id)}function Ke(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-full",children:s.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:Array.from({length:7}).map(Qe)})}),t[0]=e):e=t[0],e}function Qe(t,e){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[88px]",children:[s.jsx(q,{className:"size-12 rounded-xl shrink-0"}),s.jsx(q,{className:"h-3 sm:h-4 w-full"})]},e)}function Y(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsx(Ke,{}),children:s.jsx(Ge,{})}),t[0]=e):e=t[0],e}const Xe=`url("data:image/svg+xml;utf8,<svg viewBox='0 0 500 64' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%' width='100%' fill='url(%23grad)' opacity='0.6'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(55.083 -7.55 1.4151 14.867 -37.917 86)'><stop stop-color='rgba(165,149,255,1)' offset='0.0045422'/><stop stop-color='rgba(210,202,255,1)' offset='0.16426'/><stop stop-color='rgba(255,255,255,1)' offset='0.32398'/><stop stop-color='rgba(255,255,255,0.3)' offset='0.68776'/><stop stop-color='rgba(255,224,139,0.3)' offset='0.74761'/><stop stop-color='rgba(255,209,80,0.3)' offset='0.77753'/><stop stop-color='rgba(255,193,22,0.3)' offset='0.80745'/><stop stop-color='rgba(208,236,26,1)' offset='0.96307'/></radialGradient></defs></svg>")`,Je="/decotexture.svg";function Z(t){const e=j.c(7),{onClick:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={backgroundImage:Xe,backgroundSize:"100% 100%"},e[0]=o):o=e[0];let a,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:s.jsx(U,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none"})}),l=s.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),e[1]=a,e[2]=l):(a=e[1],l=e[2]);let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:Je,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),e[3]=c):c=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:s.jsx(Ve,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),e[4]=n):n=e[4];let i;return e[5]!==r?(i=s.jsxs("button",{type:"button",onClick:r,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:o,children:[a,l,c,n]}),e[5]=r,e[6]=i):i=e[6],i}function Ye(){const t=j.c(5),{data:e}=oe.useSession(),r=e?.user?.email;let o;t[0]!==r?(o=["deco-profile",r],t[0]=r,t[1]=o):o=t[1];const a=!!e?.user?.email;let l;t[2]!==o||t[3]!==a?(l={queryKey:o,queryFn:Ze,enabled:a,staleTime:3e5},t[2]=o,t[3]=a,t[4]=l):l=t[4];const{data:c}=$e(l);return c?.isDecoUser??!1}async function Ze(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function ee(t){const e=j.c(48),{showContext:r,setShowContext:o}=t,{org:a}=se(),l=pe(),{data:c}=oe.useSession(),{isChatEmpty:n,activeTaskId:i,tasks:d,selectedVirtualMcp:m,createTask:f,switchToTask:x}=re();let u;if(e[0]!==i||e[1]!==d){let V;e[3]!==i?(V=fe=>fe.id===i,e[3]=i,e[4]=V):V=e[4],u=d.find(V),e[0]=i,e[1]=d,e[2]=u}else u=e[2];const h=u,p=F(),[g,N]=w.useState(!1),[C,z]=w.useState(!1),k=Ye();let y;e[5]!==c?.user?.name?(y=c?.user?.name?.split(" ")[0]||"there",e[5]=c?.user?.name,e[6]=y):y=e[6];const _=y;let I;e[7]!==a.id?(I=_e(a.id),e[7]=a.id,e[8]=I):I=e[8];const v=m??I;let E;e[9]!==h?(E=h?.title&&s.jsx(he,{taskId:h.id,text:h.title,className:"text-sm font-medium text-foreground"}),e[9]=h,e[10]=E):E=e[10];let A;e[11]!==E?(A=s.jsx(H.Header.Left,{className:"gap-2",children:E}),e[11]=E,e[12]=A):A=e[12];let M;e[13]!==f||e[14]!==n||e[15]!==p?(M=p&&s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",onClick:()=>f(),disabled:n,className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"New chat",children:s.jsx(ne,{size:16,className:"text-muted-foreground"})}),s.jsx("button",{type:"button",onClick:()=>N(!0),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Tasks",children:s.jsx(we,{size:16,className:"text-muted-foreground"})})]}),e[13]=f,e[14]=n,e[15]=p,e[16]=M):M=e[16];let T;e[17]!==n||e[18]!==p||e[19]!==o||e[20]!==r?(T=!n&&!p&&s.jsx("button",{type:"button",onClick:()=>o(et),className:S("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",r&&"bg-accent"),title:"Toggle context panel",children:s.jsx(ve,{size:14,className:"text-muted-foreground"})}),e[17]=n,e[18]=p,e[19]=o,e[20]=r,e[21]=T):T=e[21];let O;e[22]!==M||e[23]!==T?(O=s.jsxs(H.Header.Right,{className:"gap-1",children:[M,T]}),e[22]=M,e[23]=T,e[24]=O):O=e[24];let D;e[25]!==A||e[26]!==O?(D=s.jsxs(H.Header,{className:"flex-none z-10 bg-background",children:[A,O]}),e[25]=A,e[26]=O,e[27]=D):D=e[27];let P;e[28]!==p||e[29]!==g||e[30]!==x?(P=p&&s.jsx(ae,{open:g,onOpenChange:N,direction:"bottom",children:s.jsx(ce,{className:"h-[90vh] max-h-[90vh]",children:s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(ie,{onTaskSelect:async V=>{await x(V),N(!1)}})})})}),e[28]=p,e[29]=g,e[30]=x,e[31]=P):P=e[31];let R;e[32]!==v||e[33]!==n||e[34]!==k||e[35]!==p||e[36]!==l||e[37]!==m||e[38]!==o||e[39]!==_?(R=n?p?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})})]})}),s.jsxs("div",{className:"shrink-0 flex flex-col items-center w-full gap-3 pb-2",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto gap-4 px-4",children:[s.jsx(b.IceBreakers,{className:"w-full"}),l&&s.jsx("div",{className:"flex flex-col items-center w-full",children:s.jsx(Y,{})}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:s.jsx(Z,{onClick:()=>z(!0)})})]}),s.jsx(b.Footer,{children:s.jsx(b.Input,{})})]})]}):s.jsxs("div",{className:"flex-1 flex flex-col items-center px-10",children:[s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center mb-6",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})}),s.jsx(b.IceBreakers,{className:"w-full"}),s.jsx("div",{className:"w-full",children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),l&&s.jsx("div",{className:"w-full max-w-[800px] mt-10 mx-auto",children:s.jsx(Y,{})})]}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto pb-6",children:s.jsx(Z,{onClick:()=>z(!0)})})]}):s.jsxs(s.Fragment,{children:[s.jsx(b.Main,{children:s.jsx(b.Messages,{})}),s.jsx(b.Footer,{children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),e[32]=v,e[33]=n,e[34]=k,e[35]=p,e[36]=l,e[37]=m,e[38]=o,e[39]=_,e[40]=R):R=e[40];let $;e[41]!==C?($=s.jsx(me,{open:C,onOpenChange:z}),e[41]=C,e[42]=$):$=e[42];let L;return e[43]!==P||e[44]!==R||e[45]!==$||e[46]!==D?(L=s.jsxs(b,{className:"h-full bg-background",children:[D,P,R,$]}),e[43]=P,e[44]=R,e[45]=$,e[46]=D,e[47]=L):L=e[47],L}function et(t){return!t}function tt(){const t=j.c(15),{allModelsConnections:e}=re(),r=F(),[o,a]=w.useState(!1);if(e.length===0){let x;return t[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(b.NoLlmBindingEmptyState,{})}),t[0]=x):x=t[0],x}if(r){let x;return t[1]!==o?(x=s.jsx("div",{className:"size-full",children:s.jsx(ee,{showContext:o,setShowContext:a})}),t[1]=o,t[2]=x):x=t[2],x}let l,c;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(G,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(ie,{})}),c=s.jsx(K,{className:"bg-border/30"}),t[3]=l,t[4]=c):(l=t[3],c=t[4]);const n=o?50:80;let i;t[5]!==o?(i=s.jsx(ee,{showContext:o,setShowContext:a}),t[5]=o,t[6]=i):i=t[6];let d;t[7]!==n||t[8]!==i?(d=s.jsx(G,{defaultSize:n,minSize:30,id:"main",order:2,children:i}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let m;t[10]!==o?(m=o&&s.jsxs(s.Fragment,{children:[s.jsx(K,{className:"bg-border/30"}),s.jsx(G,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(ue,{onClose:()=>a(!1)})})]}),t[10]=o,t[11]=m):m=t[11];let f;return t[12]!==d||t[13]!==m?(f=s.jsxs(Re,{direction:"horizontal",className:"size-full",children:[l,c,d,m]}),t[12]=d,t[13]=m,t[14]=f):f=t[14],f}function st(t){const e=j.c(14),{error:r,onRetry:o}=t,a=r?.message?.includes("401")||r?.message?.toLowerCase().includes("unauthorized");let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(H.Header,{className:"flex-none",children:[s.jsx(H.Header.Left,{className:"gap-2"}),s.jsx(H.Header.Right,{className:"gap-1"})]}),e[0]=l):l=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Ne,{className:"h-6 w-6 text-destructive"})}),e[1]=c):c=e[1];const n=a?"Unable to load models":"Something went wrong";let i;e[2]!==n?(i=s.jsx("h3",{className:"text-lg font-medium",children:n}),e[2]=n,e[3]=i):i=e[3];const d=a?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":r?.message||"An unexpected error occurred";let m;e[4]!==d?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f=s.jsxs("div",{className:"space-y-2",children:[i,m]}),e[6]=i,e[7]=m,e[8]=f):f=e[8];let x;e[9]!==o?(x=s.jsx(te,{variant:"outline",onClick:o,children:"Try again"}),e[9]=o,e[10]=x):x=e[10];let u;return e[11]!==f||e[12]!==x?(u=s.jsxs(b,{children:[l,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[c,f,x]})})]}),e[11]=f,e[12]=x,e[13]=u):u=e[13],u}function Rs(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(xe,{fallback:ot,children:s.jsx(w.Suspense,{fallback:s.jsx(b.Skeleton,{}),children:s.jsx(tt,{})})}),t[0]=e):e=t[0],e}function ot(t){const{error:e,resetError:r}=t;return s.jsx(st,{error:e,onRetry:r})}export{Rs as default};
1
+ import{d as j,r as w,j as s,y as S,B as te,c as se,E as xe,u as pe,g as oe}from"./index-BoO8n-rM.js";import{C as b}from"./task-status-BmEV7t9q.js";import{C as ue,E as he}from"./editable-task-title-CVoah20Z.js";import{a as ie}from"./tasks-panel-Dx_VmaoJ.js";import{u as le,r as ge,a as re}from"./context-DjKq41Ps.js";import{V as je}from"./select-virtual-mcp-BEyfMo-o.js";import{I as U,t as be,l as Ne,m as ve,A as W,n as we}from"./integration-icon-Cx2rPbBh.js";import{a as ye,b as Se,P as Ce}from"./popover-CtyD8kak.js";import{S as q}from"./skeleton-Bo6z7uiK.js";import{i as ke,d as _e}from"./constants-BRyDKx5E.js";import{b as Ie}from"./use-virtual-mcp-BFsqq0fZ.js";import{i as ze}from"./ChevronRight-BL_W1N6F.js";import{s as ne}from"./Plus-DmqvCfWI.js";import{u as F}from"./tooltip-BIaQfSI8.js";import{a as Ee,D as Ae,b as Me,c as Te}from"./dialog-D2pSotmJ.js";import{D as ae,a as ce,b as Oe,c as De}from"./drawer-DmfwbJvN.js";import{I as me}from"./import-from-deco-dialog-Djo43MO2.js";import{u as Pe}from"./use-create-virtual-mcp-CKYKv6SW.js";import{P as H}from"./index-BbYJDAO_.js";import{R as G,a as K,b as Re}from"./resizable-BEIVuTnJ.js";import{u as $e}from"./useQuery-nL8PK1-e.js";import{d as Ve}from"./XCircle-PZ_iEr_s.js";import"./spinner-BM6ocUxt.js";import"./use-mcp-prompts-BRgvnsLG.js";import"./form-BYJDKe84.js";import"./label-DiRwVfbK.js";import"./input-DuzgW_Cj.js";import"./index-DwgsAdtI.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-i0bG6Tx_.js";import"./ChevronDown-BzbiITGh.js";import"./org-ai-providers-C8WJgjRg.js";import"./useMutation-BJ-zKxaD.js";import"./AlertCircle-CtitvjsH.js";import"./RefreshCcw01-BZXMQFPy.js";import"./Play-CN0m3XWi.js";import"./Trash01-gOPUL91A.js";import"./card-D-nlEHTG.js";import"./toggle-group-BNOxtCQ3.js";import"./avatar-HaW-aDPQ.js";import"./User01-BFJo9npx.js";import"./ai-providers-logos-Bt4g7p0X.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./X-BPJKg-Sa.js";import"./select-CGOcI-7S.js";import"./index-BdQq_4o_.js";import"./index-D5sFwM_q.js";import"./Check-f6vqdTVP.js";import"./ChevronUp-BKSJAtLO.js";import"./ArrowLeft-3io_8nEP.js";import"./use-copy-DuS-6kWn.js";import"./marked.esm-BaswSlok.js";import"./tabs-aNTBXb88.js";import"./checkbox-Bk2GcJ8k.js";import"./VideoRecorder-CpeuE70t.js";import"./SearchMd-CIgTlNX_.js";import"./Settings01-bZOYZZe1.js";import"./use-mcp-resources-BQpqezxP.js";import"./collapsible-SLXpL9mb.js";import"./index-TdiS16S8.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-A6_5gh0N.js";import"./types-BeXFNplD.js";import"./XClose-CV8NRiYb.js";import"./Type01-DJEwH71e.js";import"./use-collections-boLvDkbT.js";import"./useSuspenseInfiniteQuery-DDi8SjCq.js";import"./infiniteQueryObserver-CL5fJNiq.js";import"./Loading01-b0x7f8u_.js";import"./collection-search-CW0lALTo.js";import"./user-YxxwV0CN.js";import"./format-time-CMKyl-GC.js";import"./empty-state-Cq-2Stw7.js";import"./dropdown-menu-DBNiGGCa.js";import"./decopilot-events-Brt4gAR6.js";import"./index-BLTp2mfW.js";import"./Container-DaFalkcW.js";import"./Dataflow03-BID0sAye.js";import"./Download01-DS6vGSUU.js";import"./List-WPqnYQKj.js";import"./FolderClosed-BEAeGMpl.js";import"./Grid01-CrA1A_18.js";import"./Upload01-BdsUmigW.js";import"./Zap-Djb2s9XH.js";import"./generate-id-Dyweu44Y.js";import"./slug-DcxyEoi0.js";const He=[{id:"deco",title:"Import from deco.cx",buttonLabel:"Import site",comingSoon:!1,image:"/import-decocx.png"},{id:"github",title:"Existing GitHub project",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-github.png"},{id:"scratch",title:"Start from scratch",buttonLabel:"Coming Soon",comingSoon:!0,image:"/import-scratch.png"}];function Q(t){const e=j.c(8),{onCardAction:r,mobile:o}=t,a=o?"flex flex-col flex-1 min-h-0 gap-3":"flex flex-col gap-3";let l;e[0]!==a?(l=S("sm:grid sm:grid-cols-3 sm:gap-4",a),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==o||e[3]!==r?(c=He.map(i=>s.jsxs("button",{type:"button",disabled:i.comingSoon,onClick:()=>r(i.id),className:S("rounded-xl border border-border bg-card overflow-hidden text-left","transition-transform duration-150 ease-out will-change-transform","flex flex-row items-center sm:flex-col",o&&"flex-1 min-h-0",!i.comingSoon&&"[@media(hover:hover)]:hover:scale-[1.03] sm:[@media(hover:hover)]:hover:scale-[1.05] active:scale-[0.98] cursor-pointer",i.comingSoon&&"cursor-default"),children:[s.jsx("div",{className:S("w-28 shrink-0 self-stretch sm:w-full sm:aspect-[4/3] sm:self-auto bg-muted overflow-hidden",i.comingSoon&&"opacity-40"),children:i.image&&s.jsx("img",{src:i.image,alt:i.title,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-4 py-3 sm:flex-col sm:items-stretch sm:px-5 sm:py-4 sm:gap-0",children:[s.jsx("p",{className:"font-medium text-foreground text-sm sm:text-base sm:text-center sm:mb-4",children:i.title}),s.jsx(te,{className:"shrink-0 cursor-pointer sm:w-full",size:"sm",variant:i.comingSoon?"outline":"default",disabled:i.comingSoon,onClick:d=>{d.stopPropagation(),r(i.id)},children:i.buttonLabel})]})]},i.id)),e[2]=o,e[3]=r,e[4]=c):c=e[4];let n;return e[5]!==l||e[6]!==c?(n=s.jsx("div",{className:l,children:c}),e[5]=l,e[6]=c,e[7]=n):n=e[7],n}const X=s.jsx(U,{icon:"icon://Globe01?color=violet",name:"Site Editor",size:"sm"});function Be(t){const e=j.c(15),{open:r,onOpenChange:o}=t,[a,l]=w.useState(!1),c=F();let n;e[0]!==o?(n=u=>{u==="deco"&&(o(!1),l(!0))},e[0]=o,e[1]=n):n=e[1];const i=n;let d;e[2]!==i||e[3]!==c||e[4]!==o||e[5]!==r?(d=c?s.jsx(ae,{open:r,onOpenChange:o,children:s.jsxs(ce,{className:"h-[70dvh]",children:[s.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(De,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:s.jsx(Q,{onCardAction:i,mobile:!0})})]})}):s.jsx(Ee,{open:r,onOpenChange:o,children:s.jsxs(Ae,{className:"sm:max-w-[900px] p-8",children:[s.jsx(Me,{className:"mb-8",children:s.jsxs("div",{className:"flex items-center gap-3",children:[X,s.jsx(Te,{className:"text-xl font-semibold",children:"Get started with Site Editor"})]})}),s.jsx(Q,{onCardAction:i})]})}),e[2]=i,e[3]=c,e[4]=o,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o?(m=()=>{l(!1),o(!0)},e[7]=o,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==m?(f=s.jsx(me,{open:a,onOpenChange:l,onBack:m}),e[9]=a,e[10]=m,e[11]=f):f=e[11];let x;return e[12]!==d||e[13]!==f?(x=s.jsxs(s.Fragment,{children:[d,f]}),e[12]=d,e[13]=f,e[14]=x):x=e[14],x}function de(t){const e=j.c(16),{agent:r,onSpecialClick:o}=t,{setVirtualMcpId:a}=le();let l;e[0]!==r.id||e[1]!==o||e[2]!==a?(l=()=>{o?o():a(r.id)},e[0]=r.id,e[1]=o,e[2]=a,e[3]=l):l=e[3];const c=l;let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[4]=n):n=e[4];const i=`Select agent ${r.title}`;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(be,{size:24}),e[5]=d):d=e[5];let m;e[6]!==r.icon||e[7]!==r.title?(m=s.jsx(U,{icon:r.icon,name:r.title,size:"md",fallbackIcon:d,className:"transition-transform group-hover:scale-110"}),e[6]=r.icon,e[7]=r.title,e[8]=m):m=e[8];let f;e[9]!==r.title?(f=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2",children:r.title}),e[9]=r.title,e[10]=f):f=e[10];let x;return e[11]!==c||e[12]!==i||e[13]!==m||e[14]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:n,"aria-label":i,children:[m,f]}),e[11]=c,e[12]=i,e[13]=m,e[14]=f,e[15]=x):x=e[15],x}function Le(t){const e=j.c(15),{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:a}=t,[l,c]=w.useState(!1),n=w.useRef(null),i=F();let d,m;e[0]!==i||e[1]!==l?(d=()=>{l&&!i&&setTimeout(()=>{n.current?.focus()},0)},m=[l,i],e[0]=i,e[1]=l,e[2]=d,e[3]=m):(d=e[2],m=e[3]),w.useEffect(d,m);let f;e[4]!==a?(f=N=>{a(N),c(!1)},e[4]=a,e[5]=f):f=e[5];const x=f;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group"),e[6]=u):u=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ye,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ze,{size:20,className:"text-foreground"})}),s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"})]})}),e[7]=h):h=e[7];let p;e[8]!==x||e[9]!==o||e[10]!==r?(p=s.jsx(Se,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(je,{virtualMcps:r,selectedVirtualMcpId:o,onVirtualMcpChange:x,searchInputRef:n})}),e[8]=x,e[9]=o,e[10]=r,e[11]=p):p=e[11];let g;return e[12]!==l||e[13]!==p?(g=s.jsxs(Ce,{open:l,onOpenChange:c,children:[h,p]}),e[12]=l,e[13]=p,e[14]=g):g=e[14],g}const J={id:"site-editor",title:"Site Editor",icon:"icon://Globe01?color=violet"};function Fe(){const t=j.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={navigateOnCreate:!0},t[0]=e):e=t[0];const{createVirtualMCP:r,isCreating:o}=Pe(e);let a;t[1]!==r?(a=()=>r(),t[1]=r,t[2]=a):a=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=S("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[88px]","group","disabled:opacity-50 disabled:cursor-not-allowed"),t[3]=l):l=t[3];let c,n;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:s.jsx(ne,{size:20,className:"text-muted-foreground"})}),n=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),t[4]=c,t[5]=n):(c=t[4],n=t[5]);let i;return t[6]!==o||t[7]!==a?(i=s.jsxs("button",{type:"button",onClick:a,disabled:o,className:l,"aria-label":"Create agent",children:[c,n]}),t[6]=o,t[7]=a,t[8]=i):i=t[8],i}function Ge(){const t=j.c(30),e=Ie(),{selectedVirtualMcp:r,setVirtualMcpId:o}=le(),{locator:a}=se(),[l,c]=w.useState(!1);let n,i,d,m,f,x;if(t[0]!==a||t[1]!==e){const z=ge(a),k=e.filter(qe).sort((_,I)=>{const B=z.indexOf(_.id),v=z.indexOf(I.id);return B!==-1&&v!==-1?B-v:B!==-1?-1:v!==-1?1:new Date(I.updated_at).getTime()-new Date(_.updated_at).getTime()}).slice(0,5);let y;t[8]!==e?(y=e.map(We),t[8]=e,t[9]=y):y=t[9],x=y,n=k.length>0,f="w-full",i="flex flex-wrap justify-center gap-2",t[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(de,{agent:J,onSpecialClick:()=>c(!0)},J.id),t[10]=d):d=t[10],m=k.map(Ue),t[0]=a,t[1]=e,t[2]=n,t[3]=i,t[4]=d,t[5]=m,t[6]=f,t[7]=x}else n=t[2],i=t[3],d=t[4],m=t[5],f=t[6],x=t[7];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Fe,{}),t[11]=u):u=t[11];let h;t[12]!==n||t[13]!==r?.id||t[14]!==o||t[15]!==x?(h=n&&s.jsx(Le,{virtualMcps:x,selectedVirtualMcpId:r?.id??null,onVirtualMcpChange:o}),t[12]=n,t[13]=r?.id,t[14]=o,t[15]=x,t[16]=h):h=t[16];let p;t[17]!==i||t[18]!==d||t[19]!==m||t[20]!==h?(p=s.jsxs("div",{className:i,children:[d,m,u,h]}),t[17]=i,t[18]=d,t[19]=m,t[20]=h,t[21]=p):p=t[21];let g;t[22]!==f||t[23]!==p?(g=s.jsx("div",{className:f,children:p}),t[22]=f,t[23]=p,t[24]=g):g=t[24];let N;t[25]!==l?(N=s.jsx(Be,{open:l,onOpenChange:c}),t[25]=l,t[26]=N):N=t[26];let C;return t[27]!==g||t[28]!==N?(C=s.jsxs(s.Fragment,{children:[g,N]}),t[27]=g,t[28]=N,t[29]=C):C=t[29],C}function Ue(t){return s.jsx(de,{agent:t},t.id??"default")}function We(t){return{id:t.id,title:t.title,description:t.description,icon:t.icon}}function qe(t){return t.id!==null&&!ke(t.id)}function Ke(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-full",children:s.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:Array.from({length:7}).map(Qe)})}),t[0]=e):e=t[0],e}function Qe(t,e){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[88px]",children:[s.jsx(q,{className:"size-12 rounded-xl shrink-0"}),s.jsx(q,{className:"h-3 sm:h-4 w-full"})]},e)}function Y(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsx(Ke,{}),children:s.jsx(Ge,{})}),t[0]=e):e=t[0],e}const Xe=`url("data:image/svg+xml;utf8,<svg viewBox='0 0 500 64' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%' width='100%' fill='url(%23grad)' opacity='0.6'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(55.083 -7.55 1.4151 14.867 -37.917 86)'><stop stop-color='rgba(165,149,255,1)' offset='0.0045422'/><stop stop-color='rgba(210,202,255,1)' offset='0.16426'/><stop stop-color='rgba(255,255,255,1)' offset='0.32398'/><stop stop-color='rgba(255,255,255,0.3)' offset='0.68776'/><stop stop-color='rgba(255,224,139,0.3)' offset='0.74761'/><stop stop-color='rgba(255,209,80,0.3)' offset='0.77753'/><stop stop-color='rgba(255,193,22,0.3)' offset='0.80745'/><stop stop-color='rgba(208,236,26,1)' offset='0.96307'/></radialGradient></defs></svg>")`,Je="/decotexture.svg";function Z(t){const e=j.c(7),{onClick:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={backgroundImage:Xe,backgroundSize:"100% 100%"},e[0]=o):o=e[0];let a,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:s.jsx(U,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none"})}),l=s.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),e[1]=a,e[2]=l):(a=e[1],l=e[2]);let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:Je,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),e[3]=c):c=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:s.jsx(Ve,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),e[4]=n):n=e[4];let i;return e[5]!==r?(i=s.jsxs("button",{type:"button",onClick:r,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:o,children:[a,l,c,n]}),e[5]=r,e[6]=i):i=e[6],i}function Ye(){const t=j.c(5),{data:e}=oe.useSession(),r=e?.user?.email;let o;t[0]!==r?(o=["deco-profile",r],t[0]=r,t[1]=o):o=t[1];const a=!!e?.user?.email;let l;t[2]!==o||t[3]!==a?(l={queryKey:o,queryFn:Ze,enabled:a,staleTime:3e5},t[2]=o,t[3]=a,t[4]=l):l=t[4];const{data:c}=$e(l);return c?.isDecoUser??!1}async function Ze(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function ee(t){const e=j.c(48),{showContext:r,setShowContext:o}=t,{org:a}=se(),l=pe(),{data:c}=oe.useSession(),{isChatEmpty:n,activeTaskId:i,tasks:d,selectedVirtualMcp:m,createTask:f,switchToTask:x}=re();let u;if(e[0]!==i||e[1]!==d){let V;e[3]!==i?(V=fe=>fe.id===i,e[3]=i,e[4]=V):V=e[4],u=d.find(V),e[0]=i,e[1]=d,e[2]=u}else u=e[2];const h=u,p=F(),[g,N]=w.useState(!1),[C,z]=w.useState(!1),k=Ye();let y;e[5]!==c?.user?.name?(y=c?.user?.name?.split(" ")[0]||"there",e[5]=c?.user?.name,e[6]=y):y=e[6];const _=y;let I;e[7]!==a.id?(I=_e(a.id),e[7]=a.id,e[8]=I):I=e[8];const v=m??I;let E;e[9]!==h?(E=h?.title&&s.jsx(he,{taskId:h.id,text:h.title,className:"text-sm font-medium text-foreground"}),e[9]=h,e[10]=E):E=e[10];let A;e[11]!==E?(A=s.jsx(H.Header.Left,{className:"gap-2",children:E}),e[11]=E,e[12]=A):A=e[12];let M;e[13]!==f||e[14]!==n||e[15]!==p?(M=p&&s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",onClick:()=>f(),disabled:n,className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"New chat",children:s.jsx(ne,{size:16,className:"text-muted-foreground"})}),s.jsx("button",{type:"button",onClick:()=>N(!0),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Tasks",children:s.jsx(we,{size:16,className:"text-muted-foreground"})})]}),e[13]=f,e[14]=n,e[15]=p,e[16]=M):M=e[16];let T;e[17]!==n||e[18]!==p||e[19]!==o||e[20]!==r?(T=!n&&!p&&s.jsx("button",{type:"button",onClick:()=>o(et),className:S("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",r&&"bg-accent"),title:"Toggle context panel",children:s.jsx(ve,{size:14,className:"text-muted-foreground"})}),e[17]=n,e[18]=p,e[19]=o,e[20]=r,e[21]=T):T=e[21];let O;e[22]!==M||e[23]!==T?(O=s.jsxs(H.Header.Right,{className:"gap-1",children:[M,T]}),e[22]=M,e[23]=T,e[24]=O):O=e[24];let D;e[25]!==A||e[26]!==O?(D=s.jsxs(H.Header,{className:"flex-none z-10 bg-background",children:[A,O]}),e[25]=A,e[26]=O,e[27]=D):D=e[27];let P;e[28]!==p||e[29]!==g||e[30]!==x?(P=p&&s.jsx(ae,{open:g,onOpenChange:N,direction:"bottom",children:s.jsx(ce,{className:"h-[90vh] max-h-[90vh]",children:s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(ie,{onTaskSelect:async V=>{await x(V),N(!1)}})})})}),e[28]=p,e[29]=g,e[30]=x,e[31]=P):P=e[31];let R;e[32]!==v||e[33]!==n||e[34]!==k||e[35]!==p||e[36]!==l||e[37]!==m||e[38]!==o||e[39]!==_?(R=n?p?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})})]})}),s.jsxs("div",{className:"shrink-0 flex flex-col items-center w-full gap-3 pb-2",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto gap-4 px-4",children:[s.jsx(b.IceBreakers,{className:"w-full"}),l&&s.jsx("div",{className:"flex flex-col items-center w-full",children:s.jsx(Y,{})}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:s.jsx(Z,{onClick:()=>z(!0)})})]}),s.jsx(b.Footer,{children:s.jsx(b.Input,{})})]})]}):s.jsxs("div",{className:"flex-1 flex flex-col items-center px-10",children:[s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(W,{icon:v.icon,name:v.title,size:"md",className:S("transition-opacity duration-200",!m&&"invisible")})}),s.jsx("div",{className:"text-center mb-6",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",_,"?"]})}),s.jsx(b.IceBreakers,{className:"w-full"}),s.jsx("div",{className:"w-full",children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),l&&s.jsx("div",{className:"w-full max-w-[800px] mt-10 mx-auto",children:s.jsx(Y,{})})]}),k&&l&&s.jsx("div",{className:"w-full max-w-[500px] mx-auto pb-6",children:s.jsx(Z,{onClick:()=>z(!0)})})]}):s.jsxs(s.Fragment,{children:[s.jsx(b.Main,{children:s.jsx(b.Messages,{})}),s.jsx(b.Footer,{children:s.jsx(b.Input,{onOpenContextPanel:()=>o(!0)})})]}),e[32]=v,e[33]=n,e[34]=k,e[35]=p,e[36]=l,e[37]=m,e[38]=o,e[39]=_,e[40]=R):R=e[40];let $;e[41]!==C?($=s.jsx(me,{open:C,onOpenChange:z}),e[41]=C,e[42]=$):$=e[42];let L;return e[43]!==P||e[44]!==R||e[45]!==$||e[46]!==D?(L=s.jsxs(b,{className:"h-full bg-background",children:[D,P,R,$]}),e[43]=P,e[44]=R,e[45]=$,e[46]=D,e[47]=L):L=e[47],L}function et(t){return!t}function tt(){const t=j.c(15),{allModelsConnections:e}=re(),r=F(),[o,a]=w.useState(!1);if(e.length===0){let x;return t[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(b.NoLlmBindingEmptyState,{})}),t[0]=x):x=t[0],x}if(r){let x;return t[1]!==o?(x=s.jsx("div",{className:"size-full",children:s.jsx(ee,{showContext:o,setShowContext:a})}),t[1]=o,t[2]=x):x=t[2],x}let l,c;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(G,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(ie,{})}),c=s.jsx(K,{className:"bg-border/30"}),t[3]=l,t[4]=c):(l=t[3],c=t[4]);const n=o?50:80;let i;t[5]!==o?(i=s.jsx(ee,{showContext:o,setShowContext:a}),t[5]=o,t[6]=i):i=t[6];let d;t[7]!==n||t[8]!==i?(d=s.jsx(G,{defaultSize:n,minSize:30,id:"main",order:2,children:i}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let m;t[10]!==o?(m=o&&s.jsxs(s.Fragment,{children:[s.jsx(K,{className:"bg-border/30"}),s.jsx(G,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(ue,{onClose:()=>a(!1)})})]}),t[10]=o,t[11]=m):m=t[11];let f;return t[12]!==d||t[13]!==m?(f=s.jsxs(Re,{direction:"horizontal",className:"size-full",children:[l,c,d,m]}),t[12]=d,t[13]=m,t[14]=f):f=t[14],f}function st(t){const e=j.c(14),{error:r,onRetry:o}=t,a=r?.message?.includes("401")||r?.message?.toLowerCase().includes("unauthorized");let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(H.Header,{className:"flex-none",children:[s.jsx(H.Header.Left,{className:"gap-2"}),s.jsx(H.Header.Right,{className:"gap-1"})]}),e[0]=l):l=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Ne,{className:"h-6 w-6 text-destructive"})}),e[1]=c):c=e[1];const n=a?"Unable to load models":"Something went wrong";let i;e[2]!==n?(i=s.jsx("h3",{className:"text-lg font-medium",children:n}),e[2]=n,e[3]=i):i=e[3];const d=a?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":r?.message||"An unexpected error occurred";let m;e[4]!==d?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f=s.jsxs("div",{className:"space-y-2",children:[i,m]}),e[6]=i,e[7]=m,e[8]=f):f=e[8];let x;e[9]!==o?(x=s.jsx(te,{variant:"outline",onClick:o,children:"Try again"}),e[9]=o,e[10]=x):x=e[10];let u;return e[11]!==f||e[12]!==x?(u=s.jsxs(b,{children:[l,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[c,f,x]})})]}),e[11]=f,e[12]=x,e[13]=u):u=e[13],u}function Rs(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(xe,{fallback:ot,children:s.jsx(w.Suspense,{fallback:s.jsx(b.Skeleton,{}),children:s.jsx(tt,{})})}),t[0]=e):e=t[0],e}function ot(t){const{error:e,resetError:r}=t;return s.jsx(st,{error:e,onRetry:r})}export{Rs as default};
@@ -1 +1 @@
1
- import{d as Y,r as D,j as s,y as ce,B as te,f as ue,c as me,a8 as xe,G as pe,O as ge,g as Re,aO as Te,bW as oe,K as Pe,F as ze,E as $e,aP as ke}from"./index-Bcecb_Xz.js";import{u as Le,P as se}from"./index-DPu67tmU.js";import{B as Oe,a as Ee,b as Fe,c as Ke}from"./breadcrumb-CAVAhr_W.js";import{a as he}from"./Play-BC5VNHwm.js";import{q as je}from"./integration-icon-ByGVeLrz.js";import{i as le}from"./Loading01-D1Pvsp8y.js";import{i as ye}from"./SearchMd-PX-e8O0B.js";import{u as Ae}from"./use-store-discovery-DE51kyFJ.js";import{u as _e,a as ve,b as Be}from"./use-connection-DqJeUugh.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ge,u as We}from"./registry-utils-bxl52ndx.js";import{C as Ve}from"./collection-search-BT_VOWLL.js";import{M as ae}from"./mcp-server-card-DPENkZXf.js";import{I as Ue}from"./input-cBzeNH_n.js";import{P as be,a as Ne,b as Ce}from"./popover-CMmU9vEC.js";import{i as Se}from"./Check-BSNNIgHR.js";import{t as we}from"./ChevronDown-CmDo1lzo.js";import{s as re}from"./XClose-tJXgwIHZ.js";import{s as He}from"./Plus-DbIgM1x-.js";import{E as qe}from"./empty-state-B8cgNR-N.js";import{u as Je}from"./useQuery-kLEJeUD0.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-sZSGbDkU.js";import"./useMutation-DX97_hbH.js";import"./tooltip-BCp7U7mN.js";import"./index-VD0DUUlZ.js";import"./X-BHB4uMvu.js";import"./ChevronRight-DvMx_esu.js";import"./Container-Dnc6yNup.js";import"./AlertCircle-CFfY0yZQ.js";import"./ArrowUp-C7CRE9h6.js";import"./ArrowLeft-q2zfYOyo.js";import"./XCircle-diVK-bFd.js";import"./Type01-DpCsdgUP.js";import"./ChevronUp-C1ZwRacy.js";import"./RefreshCcw01-BEBs5v_q.js";import"./Dataflow03-Chfn49aN.js";import"./Download01-BNS80W0k.js";import"./List-Bmsn6CzV.js";import"./VideoRecorder-wLrORVI9.js";import"./FolderClosed-BykmJUFv.js";import"./Grid01--i5_ePuX.js";import"./Settings01-84CJqC0A.js";import"./Trash01-BPldOgkf.js";import"./Upload01-B2Ms9Ufu.js";import"./User01-BfpgpGwT.js";import"./Zap-CbDTgbzb.js";import"./useInfiniteQuery-CeKnt0If.js";import"./infiniteQueryObserver-DWp3_CVI.js";import"./use-collections-vlgqqhuP.js";import"./binder-CEsnpfBd.js";import"./card-CWrlHmbX.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 O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(ye,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=O):O=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const E=`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]!==E?(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:[O,s.jsx(Ue,{type:"text",placeholder:E,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]=E,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 O;e[30]!==r||e[31]!==n||e[32]!==d||e[33]!==m?(O=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]=O):O=e[34],e[35]!==O||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,O]}),e[35]=O,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=E=>{const A=o.includes(E.value);return s.jsxs("div",{onClick:()=>i(E.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:E.value}),A&&s.jsx("span",{onClick:F=>{F.stopPropagation(),i(E.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},E.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:O=>{O.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 O;e[8]!==h||e[9]!==o?(O=o?h.filter(ft):h,e[8]=h,e[9]=o,e[10]=O):O=e[10];const I=O,E=(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 U=J;let _;e[27]!==E||e[28]!==n?(_=s.jsx(Ve,{value:n,onChange:a,placeholder:"Search for an MCP Server...",isSearching:E}),e[27]=E,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]!==E||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&&!E?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:[E&&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]=E,e[45]=F,e[46]=n,e[47]=V,e[48]=I.length,e[49]=G):G=e[49];let M;e[50]!==U||e[51]!==m||e[52]!==G?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:U,children:G}),e[50]=U,e[51]=m,e[52]=G,e[53]=M):M=e[53];let W;return e[54]!==B||e[55]!==M||e[56]!==_?(W=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=W):W=e[57],W}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 gs(){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=We(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||"",O=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 E;t[22]!==I?(E=[I],t[22]=I,t[23]=E):E=t[23];const A=E;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(Oe,{children:s.jsx(Ee,{children:s.jsx(Fe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let U;t[30]!==Q?(U=async u=>Q(u),t[30]=Q,t[31]=U):U=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==U?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:U,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=U,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]!==O?(M=s.jsx(D.Suspense,{fallback:G,children:h?s.jsx(ut,{registryId:h,storePrivateOnly:O}):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]=O,t[46]=M):M=t[46];let W;t[47]!==B||t[48]!==M?(W=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=W):W=t[49];let K;return t[50]!==_||t[51]!==W?(K=s.jsxs(se,{children:[_,W]}),t[50]=_,t[51]=W,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{gs as default};
1
+ import{d as Y,r as D,j as s,y as ce,B as te,f as ue,c as me,a8 as xe,G as pe,O as ge,g as Re,aO as Te,bW as oe,K as Pe,F as ze,E as $e,aP as ke}from"./index-BoO8n-rM.js";import{u as Le,P as se}from"./index-BbYJDAO_.js";import{B as Oe,a as Ee,b as Fe,c as Ke}from"./breadcrumb-Do1IM0FU.js";import{a as he}from"./Play-CN0m3XWi.js";import{q as je}from"./integration-icon-Cx2rPbBh.js";import{i as le}from"./Loading01-b0x7f8u_.js";import{i as ye}from"./SearchMd-CIgTlNX_.js";import{u as Ae}from"./use-store-discovery-D0gJ2CQY.js";import{u as _e,a as ve,b as Be}from"./use-connection-sSldkm55.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ge,u as We}from"./registry-utils-DoSQNJ_M.js";import{C as Ve}from"./collection-search-CW0lALTo.js";import{M as ae}from"./mcp-server-card-BWUTkKwk.js";import{I as Ue}from"./input-DuzgW_Cj.js";import{P as be,a as Ne,b as Ce}from"./popover-CtyD8kak.js";import{i as Se}from"./Check-f6vqdTVP.js";import{t as we}from"./ChevronDown-BzbiITGh.js";import{s as re}from"./XClose-CV8NRiYb.js";import{s as He}from"./Plus-DmqvCfWI.js";import{E as qe}from"./empty-state-Cq-2Stw7.js";import{u as Je}from"./useQuery-nL8PK1-e.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-BRyDKx5E.js";import"./useMutation-BJ-zKxaD.js";import"./tooltip-BIaQfSI8.js";import"./index-D5sFwM_q.js";import"./X-BPJKg-Sa.js";import"./ChevronRight-BL_W1N6F.js";import"./Container-DaFalkcW.js";import"./AlertCircle-CtitvjsH.js";import"./ArrowUp-i0bG6Tx_.js";import"./ArrowLeft-3io_8nEP.js";import"./XCircle-PZ_iEr_s.js";import"./Type01-DJEwH71e.js";import"./ChevronUp-BKSJAtLO.js";import"./RefreshCcw01-BZXMQFPy.js";import"./Dataflow03-BID0sAye.js";import"./Download01-DS6vGSUU.js";import"./List-WPqnYQKj.js";import"./VideoRecorder-CpeuE70t.js";import"./FolderClosed-BEAeGMpl.js";import"./Grid01-CrA1A_18.js";import"./Settings01-bZOYZZe1.js";import"./Trash01-gOPUL91A.js";import"./Upload01-BdsUmigW.js";import"./User01-BFJo9npx.js";import"./Zap-Djb2s9XH.js";import"./useInfiniteQuery-Byr_YtTT.js";import"./infiniteQueryObserver-CL5fJNiq.js";import"./use-collections-boLvDkbT.js";import"./binder-Bpa9PbnU.js";import"./card-D-nlEHTG.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 O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(ye,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=O):O=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const E=`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]!==E?(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:[O,s.jsx(Ue,{type:"text",placeholder:E,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]=E,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 O;e[30]!==r||e[31]!==n||e[32]!==d||e[33]!==m?(O=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]=O):O=e[34],e[35]!==O||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,O]}),e[35]=O,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=E=>{const A=o.includes(E.value);return s.jsxs("div",{onClick:()=>i(E.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:E.value}),A&&s.jsx("span",{onClick:F=>{F.stopPropagation(),i(E.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},E.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:O=>{O.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 O;e[8]!==h||e[9]!==o?(O=o?h.filter(ft):h,e[8]=h,e[9]=o,e[10]=O):O=e[10];const I=O,E=(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 U=J;let _;e[27]!==E||e[28]!==n?(_=s.jsx(Ve,{value:n,onChange:a,placeholder:"Search for an MCP Server...",isSearching:E}),e[27]=E,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]!==E||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&&!E?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:[E&&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]=E,e[45]=F,e[46]=n,e[47]=V,e[48]=I.length,e[49]=G):G=e[49];let M;e[50]!==U||e[51]!==m||e[52]!==G?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:U,children:G}),e[50]=U,e[51]=m,e[52]=G,e[53]=M):M=e[53];let W;return e[54]!==B||e[55]!==M||e[56]!==_?(W=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=W):W=e[57],W}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 gs(){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=We(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||"",O=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 E;t[22]!==I?(E=[I],t[22]=I,t[23]=E):E=t[23];const A=E;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(Oe,{children:s.jsx(Ee,{children:s.jsx(Fe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let U;t[30]!==Q?(U=async u=>Q(u),t[30]=Q,t[31]=U):U=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==U?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:U,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=U,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]!==O?(M=s.jsx(D.Suspense,{fallback:G,children:h?s.jsx(ut,{registryId:h,storePrivateOnly:O}):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]=O,t[46]=M):M=t[46];let W;t[47]!==B||t[48]!==M?(W=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=W):W=t[49];let K;return t[50]!==_||t[51]!==W?(K=s.jsxs(se,{children:[_,W]}),t[50]=_,t[51]=W,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{gs as default};
@@ -1 +1 @@
1
- import{d as a,j as t,aN as n}from"./index-Bcecb_Xz.js";function m(){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{m as default};
1
+ import{d as a,j as t,aN as n}from"./index-BoO8n-rM.js";function m(){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{m as default};
@@ -1 +1 @@
1
- import{d as s,j as t}from"./index-Bcecb_Xz.js";import{e as r}from"./Dataflow03-Chfn49aN.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{d as s,j as t}from"./index-BoO8n-rM.js";import{e as r}from"./Dataflow03-BID0sAye.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{d as w,j as s,r as S,aN as y}from"./index-Bcecb_Xz.js";import{i as _}from"./Check-BSNNIgHR.js";import{t as k}from"./ChevronDown-CmDo1lzo.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{d as w,j as s,r as S,aN as y}from"./index-BoO8n-rM.js";import{i as _}from"./Check-f6vqdTVP.js";import{t as k}from"./ChevronDown-BzbiITGh.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 +1 @@
1
- import{d as S,j as s,r as w}from"./index-Bcecb_Xz.js";import{i as R}from"./Check-BSNNIgHR.js";import{t as _}from"./ChevronDown-CmDo1lzo.js";import{e as y}from"./Dataflow03-Chfn49aN.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{d as S,j as s,r as w}from"./index-BoO8n-rM.js";import{i as R}from"./Check-f6vqdTVP.js";import{t as _}from"./ChevronDown-BzbiITGh.js";import{e as y}from"./Dataflow03-BID0sAye.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};
@@ -0,0 +1 @@
1
+ import{d as r,j as i}from"./index-BoO8n-rM.js";import{P as m}from"./project-plugins-Ac2bO3iJ.js";import"./useQuery-nL8PK1-e.js";import"./useMutation-BJ-zKxaD.js";import"./constants-BRyDKx5E.js";import"./switch-zI0teXPa.js";import"./label-DiRwVfbK.js";import"./Container-DaFalkcW.js";import"./use-connection-sSldkm55.js";import"./use-collections-boLvDkbT.js";import"./registry-utils-DoSQNJ_M.js";import"./binder-Bpa9PbnU.js";import"./use-install-from-registry-DAJmEkC5.js";import"./extract-connection-data-Dr5WITt6.js";import"./constants-BO-AsdnG.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-b0x7f8u_.js";import"./Plus-DmqvCfWI.js";import"./select-CGOcI-7S.js";import"./index-BdQq_4o_.js";import"./index-D5sFwM_q.js";import"./Check-f6vqdTVP.js";import"./ChevronDown-BzbiITGh.js";import"./ChevronUp-BKSJAtLO.js";function v(){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{v as default};
@@ -1 +1 @@
1
- import{r as i,Z as $,j as c,b3 as L,aa as z,a0 as O,$ as A,a2 as g,b4 as _,a4 as j,b5 as G,b6 as w,b7 as H,b8 as K,a5 as Z,b9 as U,ba as V,bb as W,bc as q,bd as B,be as J,d as R,y as Q}from"./index-Bcecb_Xz.js";var C="Popover",[E]=Z(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=U("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 V(),c.jsx(W,{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{fe as P,ve as a,ge as b};
1
+ import{r as i,Z as $,j as c,b3 as L,aa as z,a0 as O,$ as A,a2 as g,b4 as _,a4 as j,b5 as G,b6 as w,b7 as H,b8 as K,a5 as Z,b9 as U,ba as V,bb as W,bc as q,bd as B,be as J,d as R,y as Q}from"./index-BoO8n-rM.js";var C="Popover",[E]=Z(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=U("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 V(),c.jsx(W,{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{fe as P,ve as a,ge as b};
@@ -1 +1 @@
1
- import{d as P,k as A,j as r,E as y,r as R,c as T}from"./index-Bcecb_Xz.js";import{u as S}from"./use-connection-DqJeUugh.js";import{u as U}from"./constants-sZSGbDkU.js";import{u as v}from"./use-mcp-tools-BOIAjBvi.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-DndsLro0.js";import{g as O,M as $}from"./types-BsGobcR-.js";import{u as k}from"./context-CsyORbSE.js";import{P as _,a as D}from"./index-DPu67tmU.js";import"./use-collections-vlgqqhuP.js";import"./useMutation-DX97_hbH.js";import"./useQuery-kLEJeUD0.js";import"./use-mcp-resources-BQkvQ_u9.js";import"./decopilot-events-Brt4gAR6.js";import"./index-D5h1vKqM.js";import"./tooltip-BCp7U7mN.js";import"./index-VD0DUUlZ.js";import"./X-BHB4uMvu.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:d}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=k(),[,p]=D(),l=`${d}:${i.name}`;let f;e[0]!==o||e[1]!==i.name?(f={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=f):f=e[2];const{data:u}=v(f);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 d;e[0]!==o||e[1]!==i.id?(d={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=d):d=e[2];const a=U(d),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 f=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||!f){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]!==f||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:f,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=f,e[15]=l,e[16]=u):u=e[16],u}function le(){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 d=`${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]!==d||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},d)})]}),t[6]=d,t[7]=c,t[8]=n):n=t[8],n}export{le as default};
1
+ import{d as P,k as A,j as r,E as y,r as R,c as T}from"./index-BoO8n-rM.js";import{u as S}from"./use-connection-sSldkm55.js";import{u as U}from"./constants-BRyDKx5E.js";import{u as v}from"./use-mcp-tools-DMQzZOZ6.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-A6_5gh0N.js";import{g as O,M as $}from"./types-BeXFNplD.js";import{u as k}from"./context-DjKq41Ps.js";import{P as _,a as D}from"./index-BbYJDAO_.js";import"./use-collections-boLvDkbT.js";import"./useMutation-BJ-zKxaD.js";import"./useQuery-nL8PK1-e.js";import"./use-mcp-resources-BQpqezxP.js";import"./decopilot-events-Brt4gAR6.js";import"./index-BLTp2mfW.js";import"./tooltip-BIaQfSI8.js";import"./index-D5sFwM_q.js";import"./X-BPJKg-Sa.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:d}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=k(),[,p]=D(),l=`${d}:${i.name}`;let f;e[0]!==o||e[1]!==i.name?(f={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=f):f=e[2];const{data:u}=v(f);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 d;e[0]!==o||e[1]!==i.id?(d={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=d):d=e[2];const a=U(d),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 f=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||!f){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]!==f||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:f,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=f,e[15]=l,e[16]=u):u=e[16],u}function le(){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 d=`${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]!==d||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},d)})]}),t[6]=d,t[7]=c,t[8]=n):n=t[8],n}export{le as default};
@@ -1 +1 @@
1
- import{d as w,g as ne,j as s,y as V,r as I,w as oe,o as he,q as W,f as ie,c as re,x as ge,v as je,t as be,K as ae,B as Q,O as D,P as fe,S as le,k as ye,aP as ve}from"./index-Bcecb_Xz.js";import{u as ue}from"./use-project-C2DxBYtI.js";import{c as Se,D as Ne,a as _e}from"./dialog-CmqjWAM7.js";import{i as ke}from"./ArrowLeft-q2zfYOyo.js";import{i as ce}from"./X-BHB4uMvu.js";import{S as G}from"./skeleton-D03wOHty.js";import{u as Ce,a as we,O as Pe}from"./org-ai-providers-BddV4XoH.js";import{A as pe}from"./avatar-C_Cgb4k2.js";import{K as ze,L as $e,t as Ae,M as Ie,N as Oe}from"./integration-icon-ByGVeLrz.js";import{t as Me}from"./Settings01-84CJqC0A.js";import{i as Le}from"./Zap-CbDTgbzb.js";import{a as Fe,b as Ee,c as Te,T as De}from"./tooltip-BCp7U7mN.js";import{i as Ue}from"./Check-BSNNIgHR.js";import{c as qe}from"./Play-BC5VNHwm.js";import{S as Y}from"./switch-B8WHWc6A.js";import{S as Re,a as Be,d as H,c as Ge}from"./select-D239zaXv.js";import{i as Ke}from"./Type01-DpCsdgUP.js";import{a as Ve}from"./RefreshCcw01-BEBs5v_q.js";import"./index-D5h1vKqM.js";import{u as Qe}from"./useMutation-DX97_hbH.js";import{a as Je,F as X,b as Z,c as ee,d as te,f as se,e as We}from"./form-Dg4rCHi6.js";import{I as me}from"./input-cBzeNH_n.js";import{L as Ye}from"./logo-upload-BQGPbHRq.js";import{P as He}from"./project-plugins-CRLkmd39.js";import Xe from"./members-nGwQLmND.js";import"./useQuery-kLEJeUD0.js";import"./constants-sZSGbDkU.js";import"./index-DPu67tmU.js";import"./AlertCircle-CFfY0yZQ.js";import"./XCircle-diVK-bFd.js";import"./Trash01-BPldOgkf.js";import"./card-CWrlHmbX.js";import"./toggle-group-jq0jWIRc.js";import"./popover-CMmU9vEC.js";import"./ai-providers-logos-D8dUWzwV.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-BfpgpGwT.js";import"./Container-Dnc6yNup.js";import"./ArrowUp-C7CRE9h6.js";import"./ChevronDown-CmDo1lzo.js";import"./ChevronRight-DvMx_esu.js";import"./ChevronUp-C1ZwRacy.js";import"./Dataflow03-Chfn49aN.js";import"./Download01-BNS80W0k.js";import"./List-Bmsn6CzV.js";import"./VideoRecorder-wLrORVI9.js";import"./FolderClosed-BykmJUFv.js";import"./Grid01--i5_ePuX.js";import"./Loading01-D1Pvsp8y.js";import"./Plus-DbIgM1x-.js";import"./SearchMd-PX-e8O0B.js";import"./Upload01-B2Ms9Ufu.js";import"./XClose-tJXgwIHZ.js";import"./index-VD0DUUlZ.js";import"./index-BdQq_4o_.js";import"./label-DoFd0DeW.js";import"./use-connection-DqJeUugh.js";import"./use-collections-vlgqqhuP.js";import"./registry-utils-bxl52ndx.js";import"./binder-CEsnpfBd.js";import"./use-install-from-registry-44g1gfZf.js";import"./extract-connection-data-DgYZMSpy.js";import"./constants-BnhbK7UO.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-BBzEpEkj.js";import"./dropdown-menu-D37bEJBF.js";import"./badge-C8UnqRcC.js";import"./collection-search-BT_VOWLL.js";import"./breadcrumb-CAVAhr_W.js";import"./collection-table-wrapper-B347tlKT.js";import"./table-CTzpd733.js";import"./checkbox-DiUCU_uY.js";import"./use-members-CWNkurdp.js";import"./alert-dialog-D8sReHHS.js";import"./empty-state-B8cgNR-N.js";import"./textarea-D02CdeQw.js";import"./command-DkggJl9E.js";import"./index-B7m8nOA3.js";function Ze(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=ne.useSession(),r=a?.user,l=r?.image,c=r?.name??"Profile",m=r?.name??"U";let f;t[0]!==m||t[1]!==l?(f=s.jsx(pe,{url:l,fallback:m,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=m,t[1]=l,t[2]=f):f=t[2];let i;t[3]!==c||t[4]!==f?(i={key:"account.profile",label:c,icon:f},t[3]=c,t[4]=f,t[5]=i):i=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p={key:"account.preferences",label:"Preferences",icon:s.jsx(Me,{size:14})},t[6]=p):p=t[6];let x;t[7]!==i?(x=[i,p],t[7]=i,t[8]=x):x=t[8];const g=x;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"org.general",label:"General",icon:s.jsx(ze,{size:14})},t[9]=u):u=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Le,{size:14})},t[10]=d):d=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j={key:"org.ai-providers",label:"AI Providers",icon:s.jsx($e,{size:14})},t[11]=j):j=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=[u,d,j,{key:"org.members",label:"Members",icon:s.jsx(Ae,{size:14})}],t[12]=h):h=t[12];const _=h;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=b):b=t[13];let y;t[14]!==g||t[15]!==n||t[16]!==o?(y=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[b,g.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("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]=g,t[15]=n,t[16]=o,t[17]=y):y=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:V("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.186.4"]})}),t[22]=C):C=t[22];let k;return t[23]!==y||t[24]!==S?(k=s.jsxs("div",{className:"w-full sm:w-52 shrink-0 sm:border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4 flex-1",children:[y,S,C]}),t[23]=y,t[24]=S,t[25]=k):k=t[25],k}function et(){const e=w.c(32),{data:t}=ne.useSession(),[n,o]=I.useState(!1),a=t?.user,r=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 c=l;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=m):m=e[2];const f=a?.name??"U";let i;e[3]!==f||e[4]!==r?(i=s.jsx(pe,{url:r,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=r,e[5]=i):i=e[5];const p=a?.name??"User";let x;e[6]!==p?(x=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:p}),e[6]=p,e[7]=x):x=e[7];const g=a?.email;let u;e[8]!==g?(u=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=u):u=e[9];let d;e[10]!==x||e[11]!==u?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[x,u]}),e[10]=x,e[11]=u,e[12]=d):d=e[12];let j;e[13]!==i||e[14]!==d?(j=s.jsxs("div",{className:"flex items-center gap-4",children:[i,d]}),e[13]=i,e[14]=d,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=h):h=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 b=a?.id;let y;e[18]!==b?(y=s.jsx("span",{className:"font-mono text-sm",children:b}),e[18]=b,e[19]=y):y=e[19];let N;e[20]!==n?(N=n?s.jsx(Ue,{size:14,className:"text-green-600 shrink-0"}):s.jsx(qe,{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]!==c||e[23]!==y||e[24]!==N?(S=s.jsx(Fe,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:c,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[y,N]})}),e[22]=c,e[23]=y,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ee,{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:[h,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(Te,{children:s.jsxs(De,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==j?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[m,j,k]}),e[29]=k,e[30]=j,e[31]=v):v=e[31],v}function K(e){const t=w.c(27),{icon:n,label:o,description:a,control:r,onClick:l,disabled:c}=e,m=c?void 0:l,f=l?"button":void 0,i=l&&!c?0:void 0;let p;t[0]!==c||t[1]!==l?(p=l&&!c?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=c,t[1]=l,t[2]=p):p=t[2];const x=l&&!c?"pointer":void 0;let g;t[3]!==x?(g={cursor:x},t[3]=x,t[4]=g):g=t[4];let u;t[5]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=u):u=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 j;t[9]!==a?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=j):j=t[10];let h;t[11]!==d||t[12]!==j?(h=s.jsxs("div",{className:"min-w-0",children:[d,j]}),t[11]=d,t[12]=j,t[13]=h):h=t[13];let _;t[14]!==h||t[15]!==u?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,h]}),t[14]=h,t[15]=u,t[16]=_):_=t[16];let b;t[17]!==r?(b=s.jsx("div",{onClick:tt,className:"shrink-0",children:r}),t[17]=r,t[18]=b):b=t[18];let y;return t[19]!==m||t[20]!==_||t[21]!==b||t[22]!==f||t[23]!==i||t[24]!==p||t[25]!==g?(y=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:m,role:f,tabIndex:i,onKeyDown:p,style:g,children:[_,b]}),t[19]=m,t[20]=_,t[21]=b,t[22]=f,t[23]=i,t[24]=p,t[25]=g,t[26]=y):y=t[26],y}function tt(e){return e.stopPropagation()}function de(){const e=w.c(47),[t,n]=Ce();let o;e[0]!==n?(o=async P=>{if(P&&await Notification.requestPermission()!=="granted"){oe.error("Notifications denied. Please enable them in your browser settings."),n(lt);return}n(z=>({...z,enableNotifications:P}))},e[0]=n,e[1]=o):o=e[1];const a=o;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:16}),e[3]=l):l=e[3];let c;e[4]!==n?(c=()=>n(ot),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n?(m=P=>n(z=>({...z,devMode:P})),e[6]=n,e[7]=m):m=e[7];let f;e[8]!==t.devMode||e[9]!==m?(f=s.jsx(Y,{checked:t.devMode,onCheckedChange:m}),e[8]=t.devMode,e[9]=m,e[10]=f):f=e[10];let i;e[11]!==c||e[12]!==f?(i=s.jsx(K,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:c,control:f}),e[11]=c,e[12]=f,e[13]=i):i=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ie,{size:16}),e[14]=p):p=e[14];let x;e[15]!==a||e[16]!==t.enableNotifications?(x=s.jsx(K,{icon:p,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(Y,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ve,{size:16}),e[18]=g):g=e[18];let u;e[19]!==n?(u=()=>n(st),e[19]=n,e[20]=u):u=e[20];let d;e[21]!==n?(d=P=>n(z=>({...z,experimentalAutomations:P})),e[21]=n,e[22]=d):d=e[22];let j;e[23]!==t.experimentalAutomations||e[24]!==d?(j=s.jsx(Y,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=j):j=e[25];let h;e[26]!==u||e[27]!==j?(h=s.jsx(K,{icon:g,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:u,control:j}),e[26]=u,e[27]=j,e[28]=h):h=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Oe,{size:16}),e[29]=_):_=e[29];let b;e[30]!==n?(b=P=>n(z=>({...z,toolApprovalLevel:P})),e[30]=n,e[31]=b):b=e[31];let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y={readonly:"Skip read-only",auto:"Auto-approve all",plan:"Plan mode"},e[32]=y):y=e[32];const N=y[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Be,{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(H,{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, ask for others"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(H,{value:"auto",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[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ge,{children:[C,k,s.jsx(H,{value:"plan",textValue:"Plan mode",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Plan mode"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Read-only exploration, then propose a plan"})]})})]}),e[37]=v):v=e[37];let A;e[38]!==t.toolApprovalLevel||e[39]!==b||e[40]!==S?(A=s.jsx(K,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Re,{value:t.toolApprovalLevel,onValueChange:b,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=b,e[40]=S,e[41]=A):A=e[41];let $;return e[42]!==h||e[43]!==A||e[44]!==i||e[45]!==x?($=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col",children:[i,x,h,A]})]}),e[42]=h,e[43]=A,e[44]=i,e[45]=x,e[46]=$):$=e[46],$}function st(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function ot(e){return{...e,devMode:!e.devMode}}function lt(e){return{...e,enableNotifications:!1}}const nt=he({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().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:W().optional()});function it(){const e=ie(),{org:t,project:n}=re(),o=ge(),[a,r]=I.useState(!1),l=je({resolver:be(nt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=Qe({mutationFn:async i=>{const p={name:i.name,slug:i.slug};i.logo&&(p.logo=i.logo);const x=await ne.organization.update({organizationId:t.id,data:p});if(x?.error)throw new Error(x.error.message||"Failed to update organization");return x},onSuccess:i=>{o.invalidateQueries({queryKey:ae.organizations()}),o.invalidateQueries({queryKey:ae.activeOrganization(t.slug)}),oe.success("Organization settings updated successfully"),i?.data?.slug&&i.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:i.data.slug,project:n.slug}})},onError:i=>{oe.error(i instanceof Error?i.message:"Failed to update organization")},onSettled:()=>{r(!1)}}),m=i=>{r(!0),c.mutate(i)},f=l.formState.isDirty;return s.jsx(Je,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(m),className:"space-y-6",children:[s.jsx(X,{control:l.control,name:"name",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Name"}),s.jsx(te,{children:s.jsx(me,{placeholder:"My Organization",...i,disabled:a})}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"slug",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Slug"}),s.jsx(te,{children:s.jsx(me,{placeholder:"my-organization",...i,disabled:a,onChange:p=>{const x=p.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.onChange(x)}})}),s.jsx(We,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"logo",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Logo"}),s.jsx(te,{children:s.jsx(Ye,{value:i.value,onChange:i.onChange,name:l.watch("name"),disabled:a})}),s.jsx(se,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(Q,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function rt(){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(it,{})]}),e[0]=t):t=e[0],t}function at(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Xe,{}),e[0]=t):t=e[0],t}function xe(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(G,{className:"h-6 w-48"}),n=s.jsx(G,{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(G,{className:"h-12 w-full"}),s.jsx(G,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function ct(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=re(),{data:r,isLoading:l}=ue(a.id,n);if(l||!r){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{}),t[0]=p):p=t[0],p}const c=n===D;let m;t[1]!==r.description||t[2]!==r.enabledPlugins||t[3]!==r.id||t[4]!==r.name||t[5]!==r.organizationId||t[6]!==r.slug||t[7]!==r.ui||t[8]!==c?(m={id:r.id,organizationId:r.organizationId,slug:r.slug,name:r.name,description:r.description,enabledPlugins:r.enabledPlugins,ui:r.ui,isOrgAdmin:c},t[1]=r.description,t[2]=r.enabledPlugins,t[3]=r.id,t[4]=r.name,t[5]=r.organizationId,t[6]=r.slug,t[7]=r.ui,t[8]=c,t[9]=m):m=t[9];const f=m;let i;return t[10]!==o||t[11]!==f||t[12]!==a?(i=s.jsx(fe,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=i):i=t[13],i}function mt(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(et,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ct,{projectSlug:D,children:s.jsx(He,{})}),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(Pe,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(at,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[6]=o):o=t[6],o}}}const dt={"account.profile":"Profile","account.preferences":"Preferences","org.general":"General","org.plugins":"Features","org.ai-providers":"AI Providers","org.billing":"Billing","org.members":"Members"};function ft(){const e=w.c(49),{isOpen:t,activeSection:n,open:o,close:a}=we(),[r,l]=I.useState(!1),[c,m]=I.useState(t);c!==t&&(m(t),l(t));let f;e[0]!==o?(f=J=>{o(J),l(!0)},e[0]=o,e[1]=f):f=e[1];const i=f;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l(!1)},e[2]=p):p=e[2];const x=p;let g;e[3]!==a?(g=J=>{J||(a(),l(!1))},e[3]=a,e[4]=g):g=e[4];const u=g;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"sr-only",children:"Settings"}),e[5]=d):d=e[5];const j=r?"hidden":"flex";let h;e[6]!==j?(h=V(j,"sm:flex flex-col w-full sm:w-auto"),e[6]=j,e[7]=h):h=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("span",{className:"text-base font-semibold",children:"Settings"}),e[8]=_):_=e[8];let b;e[9]!==u?(b=()=>u(!1),e[9]=u,e[10]=b):b=e[10];let y,N;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ce,{size:16}),N=s.jsx("span",{className:"sr-only",children:"Close"}),e[11]=y,e[12]=N):(y=e[11],N=e[12]);let S;e[13]!==b?(S=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border sm:hidden",children:[_,s.jsxs("button",{type:"button",onClick:b,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[y,N]})]}),e[13]=b,e[14]=S):S=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"w-full sm:w-52 shrink-0 border-r border-border"}),e[15]=C):C=e[15];let k;e[16]!==n||e[17]!==i?(k=s.jsx(I.Suspense,{fallback:C,children:s.jsx(Ze,{activeSection:n,onNavigate:i})}),e[16]=n,e[17]=i,e[18]=k):k=e[18];let v;e[19]!==S||e[20]!==k||e[21]!==h?(v=s.jsxs("div",{className:h,children:[S,k]}),e[19]=S,e[20]=k,e[21]=h,e[22]=v):v=e[22];const A=r?"flex":"hidden";let $;e[23]!==A?($=V(A,"sm:flex flex-1 min-w-0 overflow-y-auto relative flex-col overflow-hidden"),e[23]=A,e[24]=$):$=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("button",{type:"button",onClick:x,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[s.jsx(ke,{size:16}),s.jsx("span",{className:"sr-only",children:"Back"})]}),e[25]=P):P=e[25];const z=dt[n];let O;e[26]!==z?(O=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border sm:hidden",children:[P,s.jsx("span",{className:"text-base font-semibold",children:z})]}),e[26]=z,e[27]=O):O=e[27];let M;e[28]!==u?(M=()=>u(!1),e[28]=u,e[29]=M):M=e[29];let U,q;e[30]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ce,{size:16}),q=s.jsx("span",{className:"sr-only",children:"Close"}),e[30]=U,e[31]=q):(U=e[30],q=e[31]);let L;e[32]!==M?(L=s.jsxs("button",{type:"button",onClick:M,className:"hidden sm:block 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:[U,q]}),e[32]=M,e[33]=L):L=e[33];let R;e[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{}),e[34]=R):R=e[34];let F;e[35]!==n?(F=s.jsx("div",{className:"p-5 sm:p-8 flex-1 overflow-y-auto",children:s.jsx(I.Suspense,{fallback:R,children:s.jsx(mt,{section:n})})}),e[35]=n,e[36]=F):F=e[36];let E;e[37]!==$||e[38]!==O||e[39]!==L||e[40]!==F?(E=s.jsxs("div",{className:$,children:[O,L,F]}),e[37]=$,e[38]=O,e[39]=L,e[40]=F,e[41]=E):E=e[41];let T;e[42]!==v||e[43]!==E?(T=s.jsxs(Ne,{className:"sm:max-w-[1100px] h-[100dvh] sm:h-[85vh] max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-[1100px] rounded-none sm:rounded-xl p-0 overflow-hidden flex flex-col gap-0 border-0 sm:border",closeButtonClassName:"hidden",children:[d,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[v,E]})]}),e[42]=v,e[43]=E,e[44]=T):T=e[44];let B;return e[45]!==u||e[46]!==t||e[47]!==T?(B=s.jsx(_e,{open:t,onOpenChange:u,children:T}),e[45]=u,e[46]=t,e[47]=T,e[48]=B):B=e[48],B}function ut(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,r=ie();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 c;t[1]!==n?(c=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=c):c=t[2];let m;t[3]!==a.message?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=m):m=t[4];let f;t[5]!==r||t[6]!==o?(f=s.jsx(Q,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[5]=r,t[6]=o,t[7]=f):f=t[7];let i;return t[8]!==c||t[9]!==m||t[10]!==f?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,c,m,f]}),t[8]=c,t[9]=m,t[10]=f,t[11]=i):i=t[11],i}function pt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=ie();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=r):r=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 c;t[3]!==a||t[4]!==o?(c=s.jsx(Q,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=c):c=t[5];let m;return t[6]!==l||t[7]!==c?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,l,c]}),t[6]=l,t[7]=c,t[8]=m):m=t[8],m}function xt(){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=ye(t),{org:o}=re(),a=n.org,r=n.project,{data:l,isLoading:c,error:m}=ue(o.id,r);if(c){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(le,{}),e[1]=d):d=e[1],d}if(m){let d;return e[2]!==m||e[3]!==a||e[4]!==r?(d=s.jsx(ut,{projectSlug:r,orgSlug:a,error:m}),e[2]=m,e[3]=a,e[4]=r,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==r?(d=s.jsx(pt,{projectSlug:r,orgSlug:a}),e[6]=a,e[7]=r,e[8]=d):d=e[8],d}const f=l.slug===D;let i;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?(i={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]=i):i=e[17];const p=i;let x,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(ve,{})}),g=s.jsx(ft,{}),e[18]=x,e[19]=g):(x=e[18],g=e[19]);let u;return e[20]!==p||e[21]!==o?(u=s.jsxs(fe,{org:o,project:p,children:[x,g]}),e[20]=p,e[21]=o,e[22]=u):u=e[22],u}function qs(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(xt,{})}),e[0]=t):t=e[0],t}export{qs as default};
1
+ import{d as w,g as ne,j as s,y as V,r as I,w as oe,o as he,q as W,f as ie,c as re,x as ge,v as je,t as be,K as ae,B as Q,O as D,P as fe,S as le,k as ye,aP as ve}from"./index-BoO8n-rM.js";import{u as ue}from"./use-project-CilOoEpE.js";import{c as Se,D as Ne,a as _e}from"./dialog-D2pSotmJ.js";import{i as ke}from"./ArrowLeft-3io_8nEP.js";import{i as ce}from"./X-BPJKg-Sa.js";import{S as G}from"./skeleton-Bo6z7uiK.js";import{u as Ce,a as we,O as Pe}from"./org-ai-providers-C8WJgjRg.js";import{A as pe}from"./avatar-HaW-aDPQ.js";import{K as ze,L as $e,t as Ae,M as Ie,N as Oe}from"./integration-icon-Cx2rPbBh.js";import{t as Me}from"./Settings01-bZOYZZe1.js";import{i as Le}from"./Zap-Djb2s9XH.js";import{a as Fe,b as Ee,c as Te,T as De}from"./tooltip-BIaQfSI8.js";import{i as Ue}from"./Check-f6vqdTVP.js";import{c as qe}from"./Play-CN0m3XWi.js";import{S as Y}from"./switch-zI0teXPa.js";import{S as Re,a as Be,d as H,c as Ge}from"./select-CGOcI-7S.js";import{i as Ke}from"./Type01-DJEwH71e.js";import{a as Ve}from"./RefreshCcw01-BZXMQFPy.js";import"./index-BLTp2mfW.js";import{u as Qe}from"./useMutation-BJ-zKxaD.js";import{a as Je,F as X,b as Z,c as ee,d as te,f as se,e as We}from"./form-BYJDKe84.js";import{I as me}from"./input-DuzgW_Cj.js";import{L as Ye}from"./logo-upload-D-EpUqKb.js";import{P as He}from"./project-plugins-Ac2bO3iJ.js";import Xe from"./members-D2NzG2nc.js";import"./useQuery-nL8PK1-e.js";import"./constants-BRyDKx5E.js";import"./index-BbYJDAO_.js";import"./AlertCircle-CtitvjsH.js";import"./XCircle-PZ_iEr_s.js";import"./Trash01-gOPUL91A.js";import"./card-D-nlEHTG.js";import"./toggle-group-BNOxtCQ3.js";import"./popover-CtyD8kak.js";import"./ai-providers-logos-Bt4g7p0X.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-BFJo9npx.js";import"./Container-DaFalkcW.js";import"./ArrowUp-i0bG6Tx_.js";import"./ChevronDown-BzbiITGh.js";import"./ChevronRight-BL_W1N6F.js";import"./ChevronUp-BKSJAtLO.js";import"./Dataflow03-BID0sAye.js";import"./Download01-DS6vGSUU.js";import"./List-WPqnYQKj.js";import"./VideoRecorder-CpeuE70t.js";import"./FolderClosed-BEAeGMpl.js";import"./Grid01-CrA1A_18.js";import"./Loading01-b0x7f8u_.js";import"./Plus-DmqvCfWI.js";import"./SearchMd-CIgTlNX_.js";import"./Upload01-BdsUmigW.js";import"./XClose-CV8NRiYb.js";import"./index-D5sFwM_q.js";import"./index-BdQq_4o_.js";import"./label-DiRwVfbK.js";import"./use-connection-sSldkm55.js";import"./use-collections-boLvDkbT.js";import"./registry-utils-DoSQNJ_M.js";import"./binder-Bpa9PbnU.js";import"./use-install-from-registry-DAJmEkC5.js";import"./extract-connection-data-Dr5WITt6.js";import"./constants-BO-AsdnG.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-HO2n3PFr.js";import"./dropdown-menu-DBNiGGCa.js";import"./badge-Crn2wX7w.js";import"./collection-search-CW0lALTo.js";import"./breadcrumb-Do1IM0FU.js";import"./collection-table-wrapper-DS1bzEdZ.js";import"./table-CyFHKgUK.js";import"./checkbox-Bk2GcJ8k.js";import"./use-members-C2JN8hIu.js";import"./alert-dialog-qbhCFIrJ.js";import"./empty-state-Cq-2Stw7.js";import"./textarea-CeeIB6-J.js";import"./command-BJmMsGWz.js";import"./index-BV94yULQ.js";function Ze(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=ne.useSession(),r=a?.user,l=r?.image,c=r?.name??"Profile",m=r?.name??"U";let f;t[0]!==m||t[1]!==l?(f=s.jsx(pe,{url:l,fallback:m,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=m,t[1]=l,t[2]=f):f=t[2];let i;t[3]!==c||t[4]!==f?(i={key:"account.profile",label:c,icon:f},t[3]=c,t[4]=f,t[5]=i):i=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p={key:"account.preferences",label:"Preferences",icon:s.jsx(Me,{size:14})},t[6]=p):p=t[6];let x;t[7]!==i?(x=[i,p],t[7]=i,t[8]=x):x=t[8];const g=x;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"org.general",label:"General",icon:s.jsx(ze,{size:14})},t[9]=u):u=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Le,{size:14})},t[10]=d):d=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j={key:"org.ai-providers",label:"AI Providers",icon:s.jsx($e,{size:14})},t[11]=j):j=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=[u,d,j,{key:"org.members",label:"Members",icon:s.jsx(Ae,{size:14})}],t[12]=h):h=t[12];const _=h;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=b):b=t[13];let y;t[14]!==g||t[15]!==n||t[16]!==o?(y=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[b,g.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("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]=g,t[15]=n,t[16]=o,t[17]=y):y=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:V("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.186.5"]})}),t[22]=C):C=t[22];let k;return t[23]!==y||t[24]!==S?(k=s.jsxs("div",{className:"w-full sm:w-52 shrink-0 sm:border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4 flex-1",children:[y,S,C]}),t[23]=y,t[24]=S,t[25]=k):k=t[25],k}function et(){const e=w.c(32),{data:t}=ne.useSession(),[n,o]=I.useState(!1),a=t?.user,r=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 c=l;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=m):m=e[2];const f=a?.name??"U";let i;e[3]!==f||e[4]!==r?(i=s.jsx(pe,{url:r,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=r,e[5]=i):i=e[5];const p=a?.name??"User";let x;e[6]!==p?(x=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:p}),e[6]=p,e[7]=x):x=e[7];const g=a?.email;let u;e[8]!==g?(u=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=u):u=e[9];let d;e[10]!==x||e[11]!==u?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[x,u]}),e[10]=x,e[11]=u,e[12]=d):d=e[12];let j;e[13]!==i||e[14]!==d?(j=s.jsxs("div",{className:"flex items-center gap-4",children:[i,d]}),e[13]=i,e[14]=d,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=h):h=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 b=a?.id;let y;e[18]!==b?(y=s.jsx("span",{className:"font-mono text-sm",children:b}),e[18]=b,e[19]=y):y=e[19];let N;e[20]!==n?(N=n?s.jsx(Ue,{size:14,className:"text-green-600 shrink-0"}):s.jsx(qe,{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]!==c||e[23]!==y||e[24]!==N?(S=s.jsx(Fe,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:c,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[y,N]})}),e[22]=c,e[23]=y,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ee,{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:[h,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(Te,{children:s.jsxs(De,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==j?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[m,j,k]}),e[29]=k,e[30]=j,e[31]=v):v=e[31],v}function K(e){const t=w.c(27),{icon:n,label:o,description:a,control:r,onClick:l,disabled:c}=e,m=c?void 0:l,f=l?"button":void 0,i=l&&!c?0:void 0;let p;t[0]!==c||t[1]!==l?(p=l&&!c?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=c,t[1]=l,t[2]=p):p=t[2];const x=l&&!c?"pointer":void 0;let g;t[3]!==x?(g={cursor:x},t[3]=x,t[4]=g):g=t[4];let u;t[5]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=u):u=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 j;t[9]!==a?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=j):j=t[10];let h;t[11]!==d||t[12]!==j?(h=s.jsxs("div",{className:"min-w-0",children:[d,j]}),t[11]=d,t[12]=j,t[13]=h):h=t[13];let _;t[14]!==h||t[15]!==u?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,h]}),t[14]=h,t[15]=u,t[16]=_):_=t[16];let b;t[17]!==r?(b=s.jsx("div",{onClick:tt,className:"shrink-0",children:r}),t[17]=r,t[18]=b):b=t[18];let y;return t[19]!==m||t[20]!==_||t[21]!==b||t[22]!==f||t[23]!==i||t[24]!==p||t[25]!==g?(y=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:m,role:f,tabIndex:i,onKeyDown:p,style:g,children:[_,b]}),t[19]=m,t[20]=_,t[21]=b,t[22]=f,t[23]=i,t[24]=p,t[25]=g,t[26]=y):y=t[26],y}function tt(e){return e.stopPropagation()}function de(){const e=w.c(47),[t,n]=Ce();let o;e[0]!==n?(o=async P=>{if(P&&await Notification.requestPermission()!=="granted"){oe.error("Notifications denied. Please enable them in your browser settings."),n(lt);return}n(z=>({...z,enableNotifications:P}))},e[0]=n,e[1]=o):o=e[1];const a=o;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:16}),e[3]=l):l=e[3];let c;e[4]!==n?(c=()=>n(ot),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n?(m=P=>n(z=>({...z,devMode:P})),e[6]=n,e[7]=m):m=e[7];let f;e[8]!==t.devMode||e[9]!==m?(f=s.jsx(Y,{checked:t.devMode,onCheckedChange:m}),e[8]=t.devMode,e[9]=m,e[10]=f):f=e[10];let i;e[11]!==c||e[12]!==f?(i=s.jsx(K,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:c,control:f}),e[11]=c,e[12]=f,e[13]=i):i=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ie,{size:16}),e[14]=p):p=e[14];let x;e[15]!==a||e[16]!==t.enableNotifications?(x=s.jsx(K,{icon:p,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(Y,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ve,{size:16}),e[18]=g):g=e[18];let u;e[19]!==n?(u=()=>n(st),e[19]=n,e[20]=u):u=e[20];let d;e[21]!==n?(d=P=>n(z=>({...z,experimentalAutomations:P})),e[21]=n,e[22]=d):d=e[22];let j;e[23]!==t.experimentalAutomations||e[24]!==d?(j=s.jsx(Y,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=j):j=e[25];let h;e[26]!==u||e[27]!==j?(h=s.jsx(K,{icon:g,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:u,control:j}),e[26]=u,e[27]=j,e[28]=h):h=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Oe,{size:16}),e[29]=_):_=e[29];let b;e[30]!==n?(b=P=>n(z=>({...z,toolApprovalLevel:P})),e[30]=n,e[31]=b):b=e[31];let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y={readonly:"Skip read-only",auto:"Auto-approve all",plan:"Plan mode"},e[32]=y):y=e[32];const N=y[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Be,{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(H,{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, ask for others"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(H,{value:"auto",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[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ge,{children:[C,k,s.jsx(H,{value:"plan",textValue:"Plan mode",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Plan mode"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Read-only exploration, then propose a plan"})]})})]}),e[37]=v):v=e[37];let A;e[38]!==t.toolApprovalLevel||e[39]!==b||e[40]!==S?(A=s.jsx(K,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Re,{value:t.toolApprovalLevel,onValueChange:b,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=b,e[40]=S,e[41]=A):A=e[41];let $;return e[42]!==h||e[43]!==A||e[44]!==i||e[45]!==x?($=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col",children:[i,x,h,A]})]}),e[42]=h,e[43]=A,e[44]=i,e[45]=x,e[46]=$):$=e[46],$}function st(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function ot(e){return{...e,devMode:!e.devMode}}function lt(e){return{...e,enableNotifications:!1}}const nt=he({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().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:W().optional()});function it(){const e=ie(),{org:t,project:n}=re(),o=ge(),[a,r]=I.useState(!1),l=je({resolver:be(nt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=Qe({mutationFn:async i=>{const p={name:i.name,slug:i.slug};i.logo&&(p.logo=i.logo);const x=await ne.organization.update({organizationId:t.id,data:p});if(x?.error)throw new Error(x.error.message||"Failed to update organization");return x},onSuccess:i=>{o.invalidateQueries({queryKey:ae.organizations()}),o.invalidateQueries({queryKey:ae.activeOrganization(t.slug)}),oe.success("Organization settings updated successfully"),i?.data?.slug&&i.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:i.data.slug,project:n.slug}})},onError:i=>{oe.error(i instanceof Error?i.message:"Failed to update organization")},onSettled:()=>{r(!1)}}),m=i=>{r(!0),c.mutate(i)},f=l.formState.isDirty;return s.jsx(Je,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(m),className:"space-y-6",children:[s.jsx(X,{control:l.control,name:"name",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Name"}),s.jsx(te,{children:s.jsx(me,{placeholder:"My Organization",...i,disabled:a})}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"slug",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Organization Slug"}),s.jsx(te,{children:s.jsx(me,{placeholder:"my-organization",...i,disabled:a,onChange:p=>{const x=p.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.onChange(x)}})}),s.jsx(We,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(se,{})]})}),s.jsx(X,{control:l.control,name:"logo",render:({field:i})=>s.jsxs(Z,{children:[s.jsx(ee,{children:"Logo"}),s.jsx(te,{children:s.jsx(Ye,{value:i.value,onChange:i.onChange,name:l.watch("name"),disabled:a})}),s.jsx(se,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(Q,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function rt(){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(it,{})]}),e[0]=t):t=e[0],t}function at(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Xe,{}),e[0]=t):t=e[0],t}function xe(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(G,{className:"h-6 w-48"}),n=s.jsx(G,{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(G,{className:"h-12 w-full"}),s.jsx(G,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function ct(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=re(),{data:r,isLoading:l}=ue(a.id,n);if(l||!r){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{}),t[0]=p):p=t[0],p}const c=n===D;let m;t[1]!==r.description||t[2]!==r.enabledPlugins||t[3]!==r.id||t[4]!==r.name||t[5]!==r.organizationId||t[6]!==r.slug||t[7]!==r.ui||t[8]!==c?(m={id:r.id,organizationId:r.organizationId,slug:r.slug,name:r.name,description:r.description,enabledPlugins:r.enabledPlugins,ui:r.ui,isOrgAdmin:c},t[1]=r.description,t[2]=r.enabledPlugins,t[3]=r.id,t[4]=r.name,t[5]=r.organizationId,t[6]=r.slug,t[7]=r.ui,t[8]=c,t[9]=m):m=t[9];const f=m;let i;return t[10]!==o||t[11]!==f||t[12]!==a?(i=s.jsx(fe,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=i):i=t[13],i}function mt(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(et,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ct,{projectSlug:D,children:s.jsx(He,{})}),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(Pe,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(at,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[6]=o):o=t[6],o}}}const dt={"account.profile":"Profile","account.preferences":"Preferences","org.general":"General","org.plugins":"Features","org.ai-providers":"AI Providers","org.billing":"Billing","org.members":"Members"};function ft(){const e=w.c(49),{isOpen:t,activeSection:n,open:o,close:a}=we(),[r,l]=I.useState(!1),[c,m]=I.useState(t);c!==t&&(m(t),l(t));let f;e[0]!==o?(f=J=>{o(J),l(!0)},e[0]=o,e[1]=f):f=e[1];const i=f;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l(!1)},e[2]=p):p=e[2];const x=p;let g;e[3]!==a?(g=J=>{J||(a(),l(!1))},e[3]=a,e[4]=g):g=e[4];const u=g;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"sr-only",children:"Settings"}),e[5]=d):d=e[5];const j=r?"hidden":"flex";let h;e[6]!==j?(h=V(j,"sm:flex flex-col w-full sm:w-auto"),e[6]=j,e[7]=h):h=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("span",{className:"text-base font-semibold",children:"Settings"}),e[8]=_):_=e[8];let b;e[9]!==u?(b=()=>u(!1),e[9]=u,e[10]=b):b=e[10];let y,N;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ce,{size:16}),N=s.jsx("span",{className:"sr-only",children:"Close"}),e[11]=y,e[12]=N):(y=e[11],N=e[12]);let S;e[13]!==b?(S=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border sm:hidden",children:[_,s.jsxs("button",{type:"button",onClick:b,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[y,N]})]}),e[13]=b,e[14]=S):S=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"w-full sm:w-52 shrink-0 border-r border-border"}),e[15]=C):C=e[15];let k;e[16]!==n||e[17]!==i?(k=s.jsx(I.Suspense,{fallback:C,children:s.jsx(Ze,{activeSection:n,onNavigate:i})}),e[16]=n,e[17]=i,e[18]=k):k=e[18];let v;e[19]!==S||e[20]!==k||e[21]!==h?(v=s.jsxs("div",{className:h,children:[S,k]}),e[19]=S,e[20]=k,e[21]=h,e[22]=v):v=e[22];const A=r?"flex":"hidden";let $;e[23]!==A?($=V(A,"sm:flex flex-1 min-w-0 overflow-y-auto relative flex-col overflow-hidden"),e[23]=A,e[24]=$):$=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("button",{type:"button",onClick:x,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[s.jsx(ke,{size:16}),s.jsx("span",{className:"sr-only",children:"Back"})]}),e[25]=P):P=e[25];const z=dt[n];let O;e[26]!==z?(O=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border sm:hidden",children:[P,s.jsx("span",{className:"text-base font-semibold",children:z})]}),e[26]=z,e[27]=O):O=e[27];let M;e[28]!==u?(M=()=>u(!1),e[28]=u,e[29]=M):M=e[29];let U,q;e[30]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ce,{size:16}),q=s.jsx("span",{className:"sr-only",children:"Close"}),e[30]=U,e[31]=q):(U=e[30],q=e[31]);let L;e[32]!==M?(L=s.jsxs("button",{type:"button",onClick:M,className:"hidden sm:block 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:[U,q]}),e[32]=M,e[33]=L):L=e[33];let R;e[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{}),e[34]=R):R=e[34];let F;e[35]!==n?(F=s.jsx("div",{className:"p-5 sm:p-8 flex-1 overflow-y-auto",children:s.jsx(I.Suspense,{fallback:R,children:s.jsx(mt,{section:n})})}),e[35]=n,e[36]=F):F=e[36];let E;e[37]!==$||e[38]!==O||e[39]!==L||e[40]!==F?(E=s.jsxs("div",{className:$,children:[O,L,F]}),e[37]=$,e[38]=O,e[39]=L,e[40]=F,e[41]=E):E=e[41];let T;e[42]!==v||e[43]!==E?(T=s.jsxs(Ne,{className:"sm:max-w-[1100px] h-[100dvh] sm:h-[85vh] max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-[1100px] rounded-none sm:rounded-xl p-0 overflow-hidden flex flex-col gap-0 border-0 sm:border",closeButtonClassName:"hidden",children:[d,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[v,E]})]}),e[42]=v,e[43]=E,e[44]=T):T=e[44];let B;return e[45]!==u||e[46]!==t||e[47]!==T?(B=s.jsx(_e,{open:t,onOpenChange:u,children:T}),e[45]=u,e[46]=t,e[47]=T,e[48]=B):B=e[48],B}function ut(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,r=ie();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 c;t[1]!==n?(c=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=c):c=t[2];let m;t[3]!==a.message?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=m):m=t[4];let f;t[5]!==r||t[6]!==o?(f=s.jsx(Q,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[5]=r,t[6]=o,t[7]=f):f=t[7];let i;return t[8]!==c||t[9]!==m||t[10]!==f?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,c,m,f]}),t[8]=c,t[9]=m,t[10]=f,t[11]=i):i=t[11],i}function pt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=ie();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=r):r=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 c;t[3]!==a||t[4]!==o?(c=s.jsx(Q,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=c):c=t[5];let m;return t[6]!==l||t[7]!==c?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,l,c]}),t[6]=l,t[7]=c,t[8]=m):m=t[8],m}function xt(){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=ye(t),{org:o}=re(),a=n.org,r=n.project,{data:l,isLoading:c,error:m}=ue(o.id,r);if(c){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(le,{}),e[1]=d):d=e[1],d}if(m){let d;return e[2]!==m||e[3]!==a||e[4]!==r?(d=s.jsx(ut,{projectSlug:r,orgSlug:a,error:m}),e[2]=m,e[3]=a,e[4]=r,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==r?(d=s.jsx(pt,{projectSlug:r,orgSlug:a}),e[6]=a,e[7]=r,e[8]=d):d=e[8],d}const f=l.slug===D;let i;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?(i={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]=i):i=e[17];const p=i;let x,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(ve,{})}),g=s.jsx(ft,{}),e[18]=x,e[19]=g):(x=e[18],g=e[19]);let u;return e[20]!==p||e[21]!==o?(u=s.jsxs(fe,{org:o,project:p,children:[x,g]}),e[20]=p,e[21]=o,e[22]=u):u=e[22],u}function qs(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(xt,{})}),e[0]=t):t=e[0],t}export{qs as default};