decocms 3.89.2 → 3.89.3

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 (215) hide show
  1. package/dist/client/assets/{AlertCircle-flSoo6uw.js → AlertCircle-NC3dB7os.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-BeOMO89N.js → ArrowUpRight-D9dn8W9B.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-B9ekAAw-.js → CheckCircle-4xU28_ze.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-BWfuTI7r.js → ChevronDown-4vfFBrpS.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-BNcg18cx.js → ChevronLeft-CCAFk4Lh.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-ChYOVgWd.js → ChevronRight-BSaK-g_n.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-BhWz3ylT.js → ChevronUp-CIoJSXpm.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-C0YWb9xq.js → DotsVertical-DXhOiROl.js} +1 -1
  9. package/dist/client/assets/{Eye-DWTUBTZ_.js → Eye-BcF7vo02.js} +1 -1
  10. package/dist/client/assets/{FilterLines-Djqj6uj_.js → FilterLines-CyP0eiMt.js} +1 -1
  11. package/dist/client/assets/{Form-Czxo_N56.js → Form-DLIz5vwr.js} +1 -1
  12. package/dist/client/assets/{Globe01-BgRW2EiE.js → Globe01-cpwm3ZU4.js} +1 -1
  13. package/dist/client/assets/{Globe04-XITcP2mp.js → Globe04-DdU789Mf.js} +1 -1
  14. package/dist/client/assets/{HardDrive-DS3VxDtU.js → HardDrive-8lyy5Dp-.js} +1 -1
  15. package/dist/client/assets/{Key01-DX7L8s0Z.js → Key01-C3jXuyTV.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-BqtFvEWV.js → LayoutLeft-BA3GeXV2.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-Cf-6A1_h.js → LinkExternal01-Dc9R-z7y.js} +1 -1
  18. package/dist/client/assets/{Monitor01-CZ30bS8J.js → Monitor01-4eRzNp1q.js} +1 -1
  19. package/dist/client/assets/{Palette-Dy2dQgqx.js → Palette-DziwArEq.js} +1 -1
  20. package/dist/client/assets/{Play-DvFnuZIO.js → Play-BTFQj3qh.js} +1 -1
  21. package/dist/client/assets/{Plus-jFajoMCA.js → Plus-pFzKRSyH.js} +1 -1
  22. package/dist/client/assets/{SearchMd-uzKFlzQB.js → SearchMd-BiaNZC1b.js} +1 -1
  23. package/dist/client/assets/{Settings02-47eDNk4K.js → Settings02-Bvzlcm1U.js} +1 -1
  24. package/dist/client/assets/{Shield01-BgRa80OR.js → Shield01-CtXmxEJK.js} +1 -1
  25. package/dist/client/assets/{Star01-BrkbxV-A.js → Star01-B2kdQndt.js} +1 -1
  26. package/dist/client/assets/{Stars01-Daq_eW6a.js → Stars01-C_5LYi93.js} +1 -1
  27. package/dist/client/assets/{Stars02-DlImJz_z.js → Stars02-i3gYlhXk.js} +1 -1
  28. package/dist/client/assets/{Sun-9FxiCes3.js → Sun-CoqE3qoL.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-CB5mOBIf.js → SwitchHorizontal01-CPEaTyhx.js} +1 -1
  30. package/dist/client/assets/{Tool01-rx0lKYM8.js → Tool01-BmUpgiVH.js} +1 -1
  31. package/dist/client/assets/{Trash01-DI7qV1ow.js → Trash01-B2-9vQgJ.js} +1 -1
  32. package/dist/client/assets/{Upload01-Boqk1hvA.js → Upload01-FAxCvObz.js} +1 -1
  33. package/dist/client/assets/{User01-B3UbdHmL.js → User01-C1HCSK6y.js} +1 -1
  34. package/dist/client/assets/{Users01-BUyczaeV.js → Users01-D0cghbTw.js} +1 -1
  35. package/dist/client/assets/{Users03-gvBLUtvG.js → Users03-vYWz866I.js} +1 -1
  36. package/dist/client/assets/{X-B-cRV-7d.js → X-DVenJxl2.js} +1 -1
  37. package/dist/client/assets/{XCircle-CkhBWURn.js → XCircle-DkV5O0gt.js} +1 -1
  38. package/dist/client/assets/{XClose-Doj89HqF.js → XClose-1aztqZN5.js} +1 -1
  39. package/dist/client/assets/{Zap-BCqTHl-x.js → Zap-CxBpS0TW.js} +1 -1
  40. package/dist/client/assets/{ZapSquare-DdgE8vy-.js → ZapSquare-BupPfcYG.js} +1 -1
  41. package/dist/client/assets/{ZoomOut-BdBjpsIq.js → ZoomOut-DXDDUqzg.js} +1 -1
  42. package/dist/client/assets/{access-gate-BXDE0rsJ.js → access-gate-DJ3w7Rqa.js} +1 -1
  43. package/dist/client/assets/{add-section-modal-7a6BUncs.js → add-section-modal-B_FGzKHG.js} +1 -1
  44. package/dist/client/assets/{agent-icon-C6bJxQ04.js → agent-icon-B9Rg96af.js} +1 -1
  45. package/dist/client/assets/{agents-list-sjsqj6Ot.js → agents-list-BpBQ33-8.js} +1 -1
  46. package/dist/client/assets/{ai-providers-6xIkfdtm.js → ai-providers-Cr1HJb4g.js} +1 -1
  47. package/dist/client/assets/{alert-C81LnOX9.js → alert-DBActzOw.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-HmiP05XU.js → alert-dialog-TZS2F66y.js} +1 -1
  49. package/dist/client/assets/{app-editor-k7Nl_uKp.js → app-editor-Cu5Jn0bp.js} +1 -1
  50. package/dist/client/assets/{auth-B9Q1UUsp.js → auth-B2SyT5jq.js} +1 -1
  51. package/dist/client/assets/{auth-catchall-ClOrr_P8.js → auth-catchall-jfA3V8jK.js} +1 -1
  52. package/dist/client/assets/{auth-entry-B7DIloAw.js → auth-entry-CzM_DcXD.js} +1 -1
  53. package/dist/client/assets/{auth-split-layout-dWTaQKch.js → auth-split-layout-D8jZEv56.js} +1 -1
  54. package/dist/client/assets/{authenticate-and-persist-oauth-xCkDryiA.js → authenticate-and-persist-oauth-ugENWEdg.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-CLUMzxuG.js → automation-list-row-RaQMgsZa.js} +1 -1
  56. package/dist/client/assets/{automation-runs-DxPUfxy1.js → automation-runs-DEnZLNcv.js} +1 -1
  57. package/dist/client/assets/{automations-TTHh4EuE.js → automations-LxVvDRSf.js} +1 -1
  58. package/dist/client/assets/{avatar-oAcdiJ9v.js → avatar-Cz89OzST.js} +1 -1
  59. package/dist/client/assets/{badge-CpKEkIGn.js → badge-DemqTgjN.js} +1 -1
  60. package/dist/client/assets/{block-document-BVHsyU-9.js → block-document-DnpmRre2.js} +1 -1
  61. package/dist/client/assets/{brand-context-CwjLKTtp.js → brand-context-44FYoRF-.js} +1 -1
  62. package/dist/client/assets/{buckets-CM0nkgpJ.js → buckets-pliF9NOx.js} +1 -1
  63. package/dist/client/assets/{capability-load-error-CG-hWPTN.js → capability-load-error-CD0k_ZBV.js} +1 -1
  64. package/dist/client/assets/{card-BIwENur_.js → card-DWocPikY.js} +1 -1
  65. package/dist/client/assets/{category-editor-Bx9oTK3B.js → category-editor-BElGS0p5.js} +1 -1
  66. package/dist/client/assets/{chat-context-DN0_9Gee.js → chat-context-bLbsqSUE.js} +1 -1
  67. package/dist/client/assets/{checkbox-Bi39v4Qa.js → checkbox-DmyBqpG7.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-pdfiwdy1.js → cli-auth-success-g1RYvQjB.js} +1 -1
  69. package/dist/client/assets/{collection-detail-BcWtgoUr.js → collection-detail-BfoXrAWD.js} +1 -1
  70. package/dist/client/assets/{collection-display-button-Bzf7YHNy.js → collection-display-button-CmYy5ol1.js} +1 -1
  71. package/dist/client/assets/{collection-search-DbQr2iji.js → collection-search-JyQFyghK.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-D77_So6e.js → collection-tabs-LMEfLwWZ.js} +1 -1
  73. package/dist/client/assets/{command-DyJgh8wP.js → command-6Xv18lx6.js} +1 -1
  74. package/dist/client/assets/commerce-onboarding-COle5u-q.js +1 -0
  75. package/dist/client/assets/{connect-desktop-dialog-ByWaevjw.js → connect-desktop-dialog-dXosml16.js} +1 -1
  76. package/dist/client/assets/{connection-card-DehsL0Sf.js → connection-card-DoMs787B.js} +1 -1
  77. package/dist/client/assets/{connection-detail-CCaFPgvC.js → connection-detail-Cy4adAl6.js} +1 -1
  78. package/dist/client/assets/{connection-form-helpers-CASdXQaW.js → connection-form-helpers-Dm__G9wh.js} +1 -1
  79. package/dist/client/assets/{connections-DZYmLj7X.js → connections-x7QDuFJK.js} +1 -1
  80. package/dist/client/assets/{context-menu-Bt-E5y3C.js → context-menu-B93bMgay.js} +1 -1
  81. package/dist/client/assets/{decopilot-BXlT8NLf.js → decopilot-4k7KQSVX.js} +1 -1
  82. package/dist/client/assets/{decopilot-sse-pool-CKTJhrtc.js → decopilot-sse-pool-BEKDdVOU.js} +1 -1
  83. package/dist/client/assets/{dialog-BLvz2lK8.js → dialog-BbHIKIUS.js} +1 -1
  84. package/dist/client/assets/{domain-settings-ed9WclHg.js → domain-settings-PpBMgUMH.js} +1 -1
  85. package/dist/client/assets/{drawer-C4RJ4_GY.js → drawer-kr03m1vm.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-CRyIPZil.js → dropdown-menu-vGHmo9fD.js} +1 -1
  87. package/dist/client/assets/{empty-state-CmZpGujH.js → empty-state-B4c8fq4i.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-iACc8UZO.js → extract-connection-data-D9jcQvie.js} +1 -1
  89. package/dist/client/assets/{file-explorer-BveBp463.js → file-explorer-BujxJOsE.js} +1 -1
  90. package/dist/client/assets/{file-type-icon-Db262N7w.js → file-type-icon-DO4mmgEl.js} +1 -1
  91. package/dist/client/assets/{files-BwDocccC.js → files-DSkQRfS7.js} +1 -1
  92. package/dist/client/assets/{form-CPJbrMq5.js → form-BtzyQGYU.js} +1 -1
  93. package/dist/client/assets/{general-FW5Wth3b.js → general-BjDrCY53.js} +1 -1
  94. package/dist/client/assets/{github-repo-picker-Db_ehY6e.js → github-repo-picker-BR4lmXmU.js} +1 -1
  95. package/dist/client/assets/{hooks-chgqRyLj.js → hooks-DlrZPw8A.js} +1 -1
  96. package/dist/client/assets/{import-from-deco-dialog-Nrpq_g30.js → import-from-deco-dialog-DCkFh2H5.js} +1 -1
  97. package/dist/client/assets/{index-BkSIY6JJ.js → index-B37Lpv5S.js} +3 -3
  98. package/dist/client/assets/{index-DAWoaMpc.js → index-B7G40tVP.js} +1 -1
  99. package/dist/client/assets/{index-DAmj773w.js → index-BHKcN4cC.js} +1 -1
  100. package/dist/client/assets/{index-D7a1JQHt.js → index-BbMa6I-9.js} +1 -1
  101. package/dist/client/assets/{index-4GXqE9fp.js → index-BqVMogvA.js} +1 -1
  102. package/dist/client/assets/{index-QdluHxPe.js → index-CAIYCRJp.js} +1 -1
  103. package/dist/client/assets/{index-UgEhsCuR.js → index-CxLZ7FWT.js} +1 -1
  104. package/dist/client/assets/{index-DoculpR5.js → index-DGekSTiC.js} +1 -1
  105. package/dist/client/assets/{index-K-17SMjl.js → index-DasNl4Yd.js} +1 -1
  106. package/dist/client/assets/{index-DC36sAC_.js → index-DeXSnTz7.js} +1 -1
  107. package/dist/client/assets/{index-DFNABgCe.js → index-JuJHr8Il.js} +1 -1
  108. package/dist/client/assets/{index-RkQpccOp.js → index-ZjRHn464.js} +1 -1
  109. package/dist/client/assets/{index-D5RW_4sI.js → index-hl6kLhIe.js} +1 -1
  110. package/dist/client/assets/{index-redirect-DO0D1qdv.js → index-redirect-c7PIBlRk.js} +1 -1
  111. package/dist/client/assets/{index-1ECwD4fs.js → index-yU2r0Gdy.js} +5 -5
  112. package/dist/client/assets/{input-jkT1z5r1.js → input-D3OR9wlV.js} +1 -1
  113. package/dist/client/assets/{integration-icon-CZDEviNI.js → integration-icon-DtONHt_d.js} +1 -1
  114. package/dist/client/assets/{label-CETsHBZ0.js → label-C3oLcOn0.js} +1 -1
  115. package/dist/client/assets/{login-eY2xl_Qt.js → login-DjI0bYya.js} +1 -1
  116. package/dist/client/assets/{mcp-oauth-BIBzZgcE.js → mcp-oauth-B7tRsqo-.js} +1 -1
  117. package/dist/client/assets/{members-BAHTTEXJ.js → members-DIxpLBtJ.js} +1 -1
  118. package/dist/client/assets/{monaco-editor-tVsx1Jkl.js → monaco-editor-CI1Pa0QN.js} +1 -1
  119. package/dist/client/assets/{monitoring-stats-row-CivwdnUP.js → monitoring-stats-row-BcIi6QZu.js} +1 -1
  120. package/dist/client/assets/{oauth-callback-BnrL3BsC.js → oauth-callback-Dgp5DdjP.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-ai-provider-D3_UsvKg.js → oauth-callback-ai-provider-DPhQ8sI3.js} +1 -1
  122. package/dist/client/assets/{onboarding-Cde-ZfY9.js → onboarding-DtsS5lUr.js} +1 -1
  123. package/dist/client/assets/{org-install-Cri2HTyv.js → org-install-7RmPSbO9.js} +1 -1
  124. package/dist/client/assets/{org-layout-DH1oGgfN.js → org-layout--gQCQGBA.js} +1 -1
  125. package/dist/client/assets/{organization-choice-BZIXFBHd.js → organization-choice-A8WzCg8t.js} +1 -1
  126. package/dist/client/assets/{page-seo-form-DCgyqE3q.js → page-seo-form-rxuP--YT.js} +1 -1
  127. package/dist/client/assets/page-seo-sheet-vEubWUB4.js +1 -0
  128. package/dist/client/assets/{popover-1pFpRX6s.js → popover-voqJlCLR.js} +1 -1
  129. package/dist/client/assets/{post-editor-CWr-_gb_.js → post-editor-CukRi04m.js} +1 -1
  130. package/dist/client/assets/{preview-dialog-DRmrGWbh.js → preview-dialog-DC1NsLKi.js} +1 -1
  131. package/dist/client/assets/{primitives-C06Pn9p4.js → primitives-DLRj8yUL.js} +1 -1
  132. package/dist/client/assets/{profile-62y90jm_.js → profile-Cuy0XRiQ.js} +1 -1
  133. package/dist/client/assets/project-app-view-DCl-CWYr.js +1 -0
  134. package/dist/client/assets/record-editor-DOI2gIfd.js +1 -0
  135. package/dist/client/assets/registry-EBdkezYg.js +2 -0
  136. package/dist/client/assets/{registry-layout-Dww7dssY.js → registry-layout-Bsm16ESy.js} +1 -1
  137. package/dist/client/assets/{require-capability-BC8YsasG.js → require-capability-WHfqcRqc.js} +1 -1
  138. package/dist/client/assets/{required-auth-layout-DjRtF3m8.js → required-auth-layout-CcH9lzeU.js} +1 -1
  139. package/dist/client/assets/{reset-password-DNWeSy4_.js → reset-password-o6QeBSLY.js} +1 -1
  140. package/dist/client/assets/{roles-Cyz3Z1vr.js → roles-D_-_h1c8.js} +1 -1
  141. package/dist/client/assets/{save-status-BsQDaUlP.js → save-status-D4ISIXoj.js} +1 -1
  142. package/dist/client/assets/{scroll-area-D51A_KQ5.js → scroll-area-CLfWXW0D.js} +1 -1
  143. package/dist/client/assets/{search-input-CEqRaXj6.js → search-input-DPBtlWUD.js} +1 -1
  144. package/dist/client/assets/{secrets-C6bKEzDN.js → secrets-cvbnrgVx.js} +1 -1
  145. package/dist/client/assets/{sections-editor-331tz7B6.js → sections-editor-DdPJUwmv.js} +1 -1
  146. package/dist/client/assets/{select-Ct-_FhWe.js → select-Dm5gSFeK.js} +1 -1
  147. package/dist/client/assets/{select-model-DJ7vH3M2.js → select-model-DdKq7y8l.js} +1 -1
  148. package/dist/client/assets/{seo-editor-Ad8X__jc.js → seo-editor-D12GD7FT.js} +1 -1
  149. package/dist/client/assets/{settings-layout-CSyEHpma.js → settings-layout-Bf0CD3Ha.js} +1 -1
  150. package/dist/client/assets/{settings-section-D6f1v8Lb.js → settings-section-BOPxWg6D.js} +1 -1
  151. package/dist/client/assets/{sheet-CUfjkNRy.js → sheet-BCI6wljB.js} +1 -1
  152. package/dist/client/assets/{shell-controls-C6FYdYnB.js → shell-controls-CUcC0uoE.js} +1 -1
  153. package/dist/client/assets/{shell-layout-CR4YIb2n.js → shell-layout-BpdvdxRY.js} +1 -1
  154. package/dist/client/assets/{shell-route-loading-fK7OWXny.js → shell-route-loading-CrU5yzKP.js} +1 -1
  155. package/dist/client/assets/{sidebar-C45GjVmp.js → sidebar-DLjbCYfe.js} +1 -1
  156. package/dist/client/assets/{skeleton-h95MLET_.js → skeleton-vuq3rnUi.js} +1 -1
  157. package/dist/client/assets/{sortable.esm-CbeYFn14.js → sortable.esm-aG8KzwUt.js} +1 -1
  158. package/dist/client/assets/{sso-DGooE6a8.js → sso-V1O3oG0I.js} +1 -1
  159. package/dist/client/assets/{store-O5BcQA2t.js → store-ChzWT5-N.js} +1 -1
  160. package/dist/client/assets/store-registry-DwmY0RAT.js +2 -0
  161. package/dist/client/assets/{studio-tools-BgUSKeCY.js → studio-tools-QGvUs6qu.js} +1 -1
  162. package/dist/client/assets/{switch-Cf_WUos9.js → switch-BwnzJhUB.js} +1 -1
  163. package/dist/client/assets/{table-tHeeUiY0.js → table-DyiI6lY1.js} +1 -1
  164. package/dist/client/assets/{tabs-CNnqe_sK.js → tabs-2cKRgONn.js} +1 -1
  165. package/dist/client/assets/{task-status-DzLkYYrk.js → task-status-1cY6Pf8x.js} +1 -1
  166. package/dist/client/assets/{textarea-BzYVaGJ0.js → textarea-DqRxFP0T.js} +1 -1
  167. package/dist/client/assets/{toggle-group-BE1kDwdz.js → toggle-group-CvE2Rn7y.js} +1 -1
  168. package/dist/client/assets/{toolbar-D5FkjLVB.js → toolbar-Dsvneu3f.js} +1 -1
  169. package/dist/client/assets/{tools-list-BKN97Z6h.js → tools-list-Dk1OdhLO.js} +1 -1
  170. package/dist/client/assets/{tooltip-CAEDbADy.js → tooltip-Bjh8CXdQ.js} +1 -1
  171. package/dist/client/assets/{types-Dw2dcWcn.js → types-CXT3eJPp.js} +1 -1
  172. package/dist/client/assets/{use-ai-providers-BcLob6tS.js → use-ai-providers-Cm6bJu4O.js} +1 -1
  173. package/dist/client/assets/{use-automations-CfP4AmpB.js → use-automations-hkjYbjXY.js} +1 -1
  174. package/dist/client/assets/{use-capability-CbeJheXW.js → use-capability-qIjsd8HD.js} +1 -1
  175. package/dist/client/assets/{use-clock-tick-DHvuEFIJ.js → use-clock-tick-Doyl2hlk.js} +1 -1
  176. package/dist/client/assets/{use-collections-yHRKnSEt.js → use-collections-OMXnywUO.js} +1 -1
  177. package/dist/client/assets/{use-connection-BPcAXa47.js → use-connection-CQmB3ngS.js} +1 -1
  178. package/dist/client/assets/{use-copy-DOTEBoID.js → use-copy-CjrJL2o4.js} +1 -1
  179. package/dist/client/assets/{use-create-virtual-mcp-C88JBuQM.js → use-create-virtual-mcp-BbhHiNda.js} +1 -1
  180. package/dist/client/assets/{use-debounced-autosave-BnfFXRc0.js → use-debounced-autosave-BStxRiyA.js} +1 -1
  181. package/dist/client/assets/{use-delete-connection-D1yU7B0G.js → use-delete-connection-CcoavCzH.js} +1 -1
  182. package/dist/client/assets/{use-file-configs-C8z3zSDD.js → use-file-configs-DwaAJaA6.js} +1 -1
  183. package/dist/client/assets/{use-infinite-scroll-V4l3DQJD.js → use-infinite-scroll-BLyYnILN.js} +1 -1
  184. package/dist/client/assets/{use-join-requests-Duz0LeuZ.js → use-join-requests-DzaX5jxt.js} +1 -1
  185. package/dist/client/assets/{use-mcp-client-DYpZuPPA.js → use-mcp-client-CX47WlCL.js} +1 -1
  186. package/dist/client/assets/{use-mcp-prompts-BxOgLeZF.js → use-mcp-prompts-CbrvbR3P.js} +1 -1
  187. package/dist/client/assets/{use-mcp-tools-xhV-ENX5.js → use-mcp-tools-C37oT0bu.js} +1 -1
  188. package/dist/client/assets/{use-members-CJKZdynB.js → use-members-CtUanB1S.js} +1 -1
  189. package/dist/client/assets/{use-mobile-CPyq18pe.js → use-mobile-BsQGJSz8.js} +1 -1
  190. package/dist/client/assets/{use-navigate-to-agent-Bhu6dr_a.js → use-navigate-to-agent-C_B7rQZ3.js} +1 -1
  191. package/dist/client/assets/{use-org-auth-client-Tiq6Yt9b.js → use-org-auth-client-BWt-3T2p.js} +1 -1
  192. package/dist/client/assets/{use-org-sso-DGBv3Hvc.js → use-org-sso-DKfKkOYy.js} +1 -1
  193. package/dist/client/assets/{use-organization-roles-1exN43Rd.js → use-organization-roles-LSjQh-hO.js} +1 -1
  194. package/dist/client/assets/{use-organization-settings-DFnXSR7Z.js → use-organization-settings-Cw-0oyZX.js} +1 -1
  195. package/dist/client/assets/{use-registry-connections-Czx1u2H6.js → use-registry-connections-sALt7ACC.js} +1 -1
  196. package/dist/client/assets/{use-secrets-DqgJI3yC.js → use-secrets-DyPgSICV.js} +1 -1
  197. package/dist/client/assets/{use-status-sounds-DRhhwMt0.js → use-status-sounds-YKEkF-4T.js} +1 -1
  198. package/dist/client/assets/{use-view-mode-BB9Jcv_5.js → use-view-mode-BMTZD0uv.js} +1 -1
  199. package/dist/client/assets/{use-virtual-mcp-DnY7c9gE.js → use-virtual-mcp-ByWPjIzd.js} +1 -1
  200. package/dist/client/assets/useInfiniteQuery-V0rLmF2w.js +1 -0
  201. package/dist/client/assets/{useQueries-D96G2W1b.js → useQueries-Do45fFi7.js} +1 -1
  202. package/dist/client/assets/useSuspenseInfiniteQuery-Zpghw-jA.js +1 -0
  203. package/dist/client/assets/{variant-calendar-BlIkgRxn.js → variant-calendar-bDr2uwc7.js} +1 -1
  204. package/dist/client/assets/{view-mode-toggle-ncGR_sPB.js → view-mode-toggle-yOXFqeV7.js} +1 -1
  205. package/dist/client/index.html +1 -1
  206. package/dist/server/cli.js +1 -1
  207. package/package.json +1 -1
  208. package/dist/client/assets/commerce-onboarding-CJHzpHob.js +0 -1
  209. package/dist/client/assets/page-seo-sheet-o3dCAhA-.js +0 -1
  210. package/dist/client/assets/project-app-view-BeZFUwcQ.js +0 -1
  211. package/dist/client/assets/record-editor-BsdzrkRD.js +0 -1
  212. package/dist/client/assets/registry-DpNbpkzg.js +0 -2
  213. package/dist/client/assets/store-registry-BPQHh-y5.js +0 -2
  214. package/dist/client/assets/useInfiniteQuery-DlRMWoIP.js +0 -1
  215. package/dist/client/assets/useSuspenseInfiniteQuery-BjlxN-DZ.js +0 -1
@@ -1 +1 @@
1
- import{c as y,j as t,B as F,i as X,z as Ge,C as se,E as Pe,r as T,w as ie,G as Qe,l as V,bf as Ye,u as Xe,y as G,t as Ze,e as ae,b1 as ke}from"./index-BkSIY6JJ.js";import{E as Ee}from"./empty-state-CmZpGujH.js";import{u as et,a as Ae}from"./use-collections-yHRKnSEt.js";import{u as ce}from"./use-mcp-client-DYpZuPPA.js";import{F as ne,a as tt,b as de,d as me}from"./form-CPJbrMq5.js";import{I as ue}from"./input-jkT1z5r1.js";import{T as re}from"./textarea-BzYVaGJ0.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-D5RW_4sI.js";import{ah as rt,x as it,a6 as at,ai as ct,a2 as dt,aj as mt,M as be}from"./agent-icon-C6bJxQ04.js";import{g as ut,M as xt,a as Ne}from"./types-Dw2dcWcn.js";import{A as pt,a as ft,b as ht}from"./alert-C81LnOX9.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-Ct-_FhWe.js";import{c as gt,T as Ce,a as Ie,b as $e}from"./tooltip-CAEDbADy.js";import{i as jt}from"./AlertCircle-flSoo6uw.js";import{s as bt}from"./Stars02-DlImJz_z.js";import{a as Nt}from"./Eye-DWTUBTZ_.js";import{i as vt}from"./Play-DvFnuZIO.js";import{i as St}from"./ChevronRight-ChYOVgWd.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./tools-list-BKN97Z6h.js";import{a as Oe,u as Re}from"./use-connection-BPcAXa47.js";import{a as It}from"./use-mcp-tools-xhV-ENX5.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-CZDEviNI.js";import{f as Tt,h as Pt}from"./chat-context-DN0_9Gee.js";import{b as kt}from"./shell-layout-CR4YIb2n.js";import{M as Et}from"./monaco-editor-tVsx1Jkl.js";import{n as At}from"./XCircle-CkhBWURn.js";import"./auth-B9Q1UUsp.js";import"./label-CETsHBZ0.js";import"./index-RkQpccOp.js";import"./sidebar-C45GjVmp.js";import"./LayoutLeft-BqtFvEWV.js";import"./use-mobile-CPyq18pe.js";import"./sheet-CUfjkNRy.js";import"./X-B-cRV-7d.js";import"./ZoomOut-BdBjpsIq.js";import"./Key01-DX7L8s0Z.js";import"./extract-connection-data-iACc8UZO.js";import"./use-registry-connections-Czx1u2H6.js";import"./use-organization-settings-DFnXSR7Z.js";import"./studio-tools-BgUSKeCY.js";import"./Plus-jFajoMCA.js";import"./Form-Czxo_N56.js";import"./index-QdluHxPe.js";import"./index-DAWoaMpc.js";import"./index-BdQq_4o_.js";import"./index-DAmj773w.js";import"./popover-1pFpRX6s.js";import"./use-virtual-mcp-DnY7c9gE.js";import"./ChevronUp-BhWz3ylT.js";import"./SearchMd-uzKFlzQB.js";import"./Users03-gvBLUtvG.js";import"./use-create-virtual-mcp-C88JBuQM.js";import"./use-navigate-to-agent-Bhu6dr_a.js";import"./Tool01-rx0lKYM8.js";import"./SwitchHorizontal01-CB5mOBIf.js";import"./Settings02-47eDNk4K.js";import"./ArrowUpRight-BeOMO89N.js";import"./ZapSquare-DdgE8vy-.js";import"./CheckCircle-B9ekAAw-.js";import"./ChevronDown-BWfuTI7r.js";import"./ChevronLeft-BNcg18cx.js";import"./DotsVertical-C0YWb9xq.js";import"./Globe01-BgRW2EiE.js";import"./FilterLines-Djqj6uj_.js";import"./Star01-BrkbxV-A.js";import"./Globe04-XITcP2mp.js";import"./HardDrive-DS3VxDtU.js";import"./LinkExternal01-Cf-6A1_h.js";import"./Monitor01-CZ30bS8J.js";import"./Sun-9FxiCes3.js";import"./Palette-Dy2dQgqx.js";import"./Shield01-BgRa80OR.js";import"./Stars01-Daq_eW6a.js";import"./Trash01-DI7qV1ow.js";import"./Upload01-Boqk1hvA.js";import"./User01-B3UbdHmL.js";import"./Users01-BUyczaeV.js";import"./XClose-Doj89HqF.js";import"./Zap-BCqTHl-x.js";import"./mcp-oauth-BIBzZgcE.js";import"./badge-CpKEkIGn.js";import"./hooks-chgqRyLj.js";import"./decopilot-sse-pool-CKTJhrtc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BcLob6tS.js";import"./tab-id-BptcWVWa.js";import"./avatar-oAcdiJ9v.js";import"./dialog-BLvz2lK8.js";import"./required-auth-layout-DjRtF3m8.js";import"./use-org-sso-DGBv3Hvc.js";import"./index-DFNABgCe.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:Dt}),t.jsx(ne,{control:o.control,name:"description",render:zt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:le(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let E;e[18]!==i.description?(E=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function ze(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),A=Pt(),{setChatOpen:U}=kt(),D=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[M,Z]=T.useState("json"),[De,Le]=T.useState(!1);O&&!De&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const z=u.trim();if(!z)return{};const B=JSON.parse(z);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([z,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[z]=="string")try{h[z]=JSON.parse(h[z])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[z]=="string"&&h[z]!==""){const je=Number(h[z]);Number.isNaN(je)||(h[z]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(ze,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(D,d),onTeardown:()=>A?.clearAppContext(D),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Wt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,l,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let D;s[24]!==k?(D=t.jsx(q,{children:t.jsx(ze,{children:k})}),s[24]=k,s[25]=D):D=s[25];let _;s[26]!==U||s[27]!==D||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,D]})}),s[26]=U,s[27]=D,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function Ln(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Ln as default};
1
+ import{c as y,j as t,B as F,i as X,z as Ge,C as se,E as Pe,r as T,w as ie,G as Qe,l as V,bf as Ye,u as Xe,y as G,t as Ze,e as ae,b1 as ke}from"./index-B37Lpv5S.js";import{E as Ee}from"./empty-state-B4c8fq4i.js";import{u as et,a as Ae}from"./use-collections-OMXnywUO.js";import{u as ce}from"./use-mcp-client-CX47WlCL.js";import{F as ne,a as tt,b as de,d as me}from"./form-BtzyQGYU.js";import{I as ue}from"./input-D3OR9wlV.js";import{T as re}from"./textarea-DqRxFP0T.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-hl6kLhIe.js";import{ah as rt,x as it,a6 as at,ai as ct,a2 as dt,aj as mt,M as be}from"./agent-icon-B9Rg96af.js";import{g as ut,M as xt,a as Ne}from"./types-CXT3eJPp.js";import{A as pt,a as ft,b as ht}from"./alert-DBActzOw.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-Dm5gSFeK.js";import{c as gt,T as Ce,a as Ie,b as $e}from"./tooltip-Bjh8CXdQ.js";import{i as jt}from"./AlertCircle-NC3dB7os.js";import{s as bt}from"./Stars02-i3gYlhXk.js";import{a as Nt}from"./Eye-BcF7vo02.js";import{i as vt}from"./Play-BTFQj3qh.js";import{i as St}from"./ChevronRight-BSaK-g_n.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./tools-list-Dk1OdhLO.js";import{a as Oe,u as Re}from"./use-connection-CQmB3ngS.js";import{a as It}from"./use-mcp-tools-C37oT0bu.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-DtONHt_d.js";import{f as Tt,h as Pt}from"./chat-context-bLbsqSUE.js";import{b as kt}from"./shell-layout-BpdvdxRY.js";import{M as Et}from"./monaco-editor-CI1Pa0QN.js";import{n as At}from"./XCircle-DkV5O0gt.js";import"./auth-B2SyT5jq.js";import"./label-C3oLcOn0.js";import"./index-ZjRHn464.js";import"./sidebar-DLjbCYfe.js";import"./LayoutLeft-BA3GeXV2.js";import"./use-mobile-BsQGJSz8.js";import"./sheet-BCI6wljB.js";import"./X-DVenJxl2.js";import"./ZoomOut-DXDDUqzg.js";import"./Key01-C3jXuyTV.js";import"./extract-connection-data-D9jcQvie.js";import"./use-registry-connections-sALt7ACC.js";import"./use-organization-settings-Cw-0oyZX.js";import"./studio-tools-QGvUs6qu.js";import"./Plus-pFzKRSyH.js";import"./Form-DLIz5vwr.js";import"./index-CAIYCRJp.js";import"./index-B7G40tVP.js";import"./index-BdQq_4o_.js";import"./index-BHKcN4cC.js";import"./popover-voqJlCLR.js";import"./use-virtual-mcp-ByWPjIzd.js";import"./ChevronUp-CIoJSXpm.js";import"./SearchMd-BiaNZC1b.js";import"./Users03-vYWz866I.js";import"./use-create-virtual-mcp-BbhHiNda.js";import"./use-navigate-to-agent-C_B7rQZ3.js";import"./Tool01-BmUpgiVH.js";import"./SwitchHorizontal01-CPEaTyhx.js";import"./Settings02-Bvzlcm1U.js";import"./ArrowUpRight-D9dn8W9B.js";import"./ZapSquare-BupPfcYG.js";import"./CheckCircle-4xU28_ze.js";import"./ChevronDown-4vfFBrpS.js";import"./ChevronLeft-CCAFk4Lh.js";import"./DotsVertical-DXhOiROl.js";import"./Globe01-cpwm3ZU4.js";import"./FilterLines-CyP0eiMt.js";import"./Star01-B2kdQndt.js";import"./Globe04-DdU789Mf.js";import"./HardDrive-8lyy5Dp-.js";import"./LinkExternal01-Dc9R-z7y.js";import"./Monitor01-4eRzNp1q.js";import"./Sun-CoqE3qoL.js";import"./Palette-DziwArEq.js";import"./Shield01-CtXmxEJK.js";import"./Stars01-C_5LYi93.js";import"./Trash01-B2-9vQgJ.js";import"./Upload01-FAxCvObz.js";import"./User01-C1HCSK6y.js";import"./Users01-D0cghbTw.js";import"./XClose-1aztqZN5.js";import"./Zap-CxBpS0TW.js";import"./mcp-oauth-B7tRsqo-.js";import"./badge-DemqTgjN.js";import"./hooks-DlrZPw8A.js";import"./decopilot-sse-pool-BEKDdVOU.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-Cm6bJu4O.js";import"./tab-id-BptcWVWa.js";import"./avatar-Cz89OzST.js";import"./dialog-BbHIKIUS.js";import"./required-auth-layout-CcH9lzeU.js";import"./use-org-sso-DKfKkOYy.js";import"./index-JuJHr8Il.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:Dt}),t.jsx(ne,{control:o.control,name:"description",render:zt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:le(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let E;e[18]!==i.description?(E=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function ze(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),A=Pt(),{setChatOpen:U}=kt(),D=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[M,Z]=T.useState("json"),[De,Le]=T.useState(!1);O&&!De&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const z=u.trim();if(!z)return{};const B=JSON.parse(z);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([z,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[z]=="string")try{h[z]=JSON.parse(h[z])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[z]=="string"&&h[z]!==""){const je=Number(h[z]);Number.isNaN(je)||(h[z]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(ze,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(D,d),onTeardown:()=>A?.clearAppContext(D),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Wt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,l,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let D;s[24]!==k?(D=t.jsx(q,{children:t.jsx(ze,{children:k})}),s[24]=k,s[25]=D):D=s[25];let _;s[26]!==U||s[27]!==D||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,D]})}),s[26]=U,s[27]=D,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function Ln(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Ln as default};
@@ -1 +1 @@
1
- import{c as B,j as s,l as M,B as V}from"./index-BkSIY6JJ.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-CRyIPZil.js";import{a as L,n as O,d as R,i as A,c as F}from"./SwitchHorizontal01-CB5mOBIf.js";import{i as S}from"./ChevronUp-BhWz3ylT.js";import{a as I,b as K,c as P,T as W}from"./tooltip-CAEDbADy.js";import{V as q}from"./view-mode-toggle-ncGR_sPB.js";import{B as G}from"./badge-CpKEkIGn.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
1
+ import{c as B,j as s,l as M,B as V}from"./index-B37Lpv5S.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-vGHmo9fD.js";import{a as L,n as O,d as R,i as A,c as F}from"./SwitchHorizontal01-CPEaTyhx.js";import{i as S}from"./ChevronUp-CIoJSXpm.js";import{a as I,b as K,c as P,T as W}from"./tooltip-Bjh8CXdQ.js";import{V as q}from"./view-mode-toggle-yOXFqeV7.js";import{B as G}from"./badge-DemqTgjN.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
@@ -1 +1 @@
1
- import{c as v,l as b,j as a,i as w}from"./index-BkSIY6JJ.js";import{i as C}from"./SearchMd-uzKFlzQB.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
1
+ import{c as v,l as b,j as a,i as w}from"./index-B37Lpv5S.js";import{i as C}from"./SearchMd-BiaNZC1b.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
@@ -1 +1 @@
1
- import{c as f,l as u,j as m}from"./index-BkSIY6JJ.js";import{B as g}from"./badge-CpKEkIGn.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
1
+ import{c as f,l as u,j as m}from"./index-B37Lpv5S.js";import{B as g}from"./badge-DemqTgjN.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
@@ -1 +1 @@
1
- import{c as d,l as i,j as n}from"./index-BkSIY6JJ.js";import{_ as m}from"./index-DAmj773w.js";import{e as k,D as N,a as j,b,d as w}from"./dialog-BLvz2lK8.js";import{i as y}from"./SearchMd-uzKFlzQB.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,S as f,B as g};
1
+ import{c as d,l as i,j as n}from"./index-B37Lpv5S.js";import{_ as m}from"./index-BHKcN4cC.js";import{e as k,D as N,a as j,b,d as w}from"./dialog-BbHIKIUS.js";import{i as y}from"./SearchMd-BiaNZC1b.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,S as f,B as g};
@@ -0,0 +1 @@
1
+ import{c as S,r as P,l as ge,j as s,B as re,i as ve,m as Me,K as se,k as ye,d as Re,a as ze,u as rt,b as Fe,n as lt,o as Ke,Q as at,E as ct,p as $e,L as dt}from"./index-B37Lpv5S.js";import{A as ut}from"./auth-entry-CzM_DcXD.js";import{A as ee}from"./auth-split-layout-D8jZEv56.js";import{O as Ue}from"./organization-choice-A8WzCg8t.js";import{f as mt}from"./tab-id-BptcWVWa.js";import{I as ft}from"./input-D3OR9wlV.js";import{u as Ne,W as qe,S as Be,g as gt,C as pt}from"./use-mcp-client-CX47WlCL.js";import{i as He}from"./XCircle-DkV5O0gt.js";import{I as ht}from"./integration-icon-DtONHt_d.js";import{D as xt,a as yt,b as jt,c as bt,d as Ct,e as vt}from"./dialog-BbHIKIUS.js";import{T as St,a as _t,b as Nt}from"./tooltip-Bjh8CXdQ.js";import{v as Ae,F as It}from"./Form-DLIz5vwr.js";import"./index-CAIYCRJp.js";import{i as Ve}from"./CheckCircle-4xU28_ze.js";import{i as Et}from"./ZoomOut-DXDDUqzg.js";import{g as wt,c as Tt,e as Ot}from"./extract-connection-data-D9jcQvie.js";import{u as kt}from"./useQueries-Do45fFi7.js";import{a as Rt}from"./authenticate-and-persist-oauth-ugENWEdg.js";import{i as Qe}from"./ArrowUpRight-D9dn8W9B.js";import{s as We}from"./User01-C1HCSK6y.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-Cz89OzST.js";import"./auth-B2SyT5jq.js";import"./agent-icon-B9Rg96af.js";import"./AlertCircle-NC3dB7os.js";import"./Tool01-BmUpgiVH.js";import"./SwitchHorizontal01-CPEaTyhx.js";import"./Settings02-Bvzlcm1U.js";import"./ZapSquare-BupPfcYG.js";import"./Users03-vYWz866I.js";import"./ChevronUp-CIoJSXpm.js";import"./ChevronDown-4vfFBrpS.js";import"./ChevronLeft-CCAFk4Lh.js";import"./ChevronRight-BSaK-g_n.js";import"./DotsVertical-DXhOiROl.js";import"./Stars02-i3gYlhXk.js";import"./Eye-BcF7vo02.js";import"./Globe01-cpwm3ZU4.js";import"./FilterLines-CyP0eiMt.js";import"./Star01-B2kdQndt.js";import"./Globe04-DdU789Mf.js";import"./HardDrive-8lyy5Dp-.js";import"./Key01-C3jXuyTV.js";import"./LayoutLeft-BA3GeXV2.js";import"./LinkExternal01-Dc9R-z7y.js";import"./Monitor01-4eRzNp1q.js";import"./Sun-CoqE3qoL.js";import"./Palette-DziwArEq.js";import"./Play-BTFQj3qh.js";import"./Plus-pFzKRSyH.js";import"./SearchMd-BiaNZC1b.js";import"./Shield01-CtXmxEJK.js";import"./Stars01-C_5LYi93.js";import"./Trash01-B2-9vQgJ.js";import"./Upload01-FAxCvObz.js";import"./Users01-D0cghbTw.js";import"./XClose-1aztqZN5.js";import"./X-DVenJxl2.js";import"./Zap-CxBpS0TW.js";import"./index-B7G40tVP.js";import"./index-BdQq_4o_.js";import"./index-BHKcN4cC.js";import"./mcp-oauth-B7tRsqo-.js";const zt=/^[a-zA-Z][a-zA-Z\d+.-]*:/,Lt=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//,Pt=/^[^\s/:?#]+\.[^\s/:?#]+:\d+(?:[/?#]|$)/,$t=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Te(n){const e=n.trim();if(!e)return{ok:!1,error:"Enter a website URL."};const t=zt.test(e),i=Lt.test(e),o=Pt.test(e);if(t&&!i&&!o)return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const c=i?e:`https://${e}`;let a;try{a=new URL(c)}catch{return{ok:!1,error:"Enter a valid website URL."}}if(a.protocol!=="http:"&&a.protocol!=="https:")return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const r=a.hostname.split(".");return r.length<2||r.some(l=>!l||!$t.test(l))?{ok:!1,error:"Enter a valid website URL."}:(a.protocol="https:",{ok:!0,value:a.origin})}function Oe(n){const e=S.c(14),{children:t,className:i,wrapperClassName:o}=n,[c,a]=P.useState(!0);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=x=>{if(!x)return;const y=()=>{const u=x.scrollHeight-x.scrollTop-x.clientHeight<8;a(u)};y(),x.addEventListener("scroll",y,{passive:!0});const v=new ResizeObserver(y);v.observe(x);for(const u of Array.from(x.children))v.observe(u);return()=>{x.removeEventListener("scroll",y),v.disconnect()}},e[0]=r):r=e[0];const l=r;let d;e[1]!==o?(d=ge("relative",o),e[1]=o,e[2]=d):d=e[2];let m;e[3]!==t||e[4]!==i?(m=s.jsx("div",{ref:l,className:i,children:t}),e[3]=t,e[4]=i,e[5]=m):m=e[5];const g=c?"opacity-0":"opacity-100";let f;e[6]!==g?(f=ge("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",g),e[6]=g,e[7]=f):f=e[7];let h;e[8]!==f?(h=s.jsx("div",{"aria-hidden":!0,className:f}),e[8]=f,e[9]=h):h=e[9];let p;return e[10]!==d||e[11]!==m||e[12]!==h?(p=s.jsxs("div",{className:d,children:[m,h]}),e[10]=d,e[11]=m,e[12]=h,e[13]=p):p=e[13],p}function Ut(n){const e=n.properties;if(!e)return[];const t=[];for(const[i,o]of Object.entries(e)){const r=o?.properties?.__type?.const;typeof r=="string"&&r.length>0&&t.push({fieldKey:i,bindingType:r})}return t}function At(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function ce(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function Dt(n,e,t,i){return{...n??{},[e]:{__type:t,value:i}}}function Se(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(Se):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&Se(t)):!1}function Mt(n){return Se(n)}function Ft(n){return n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,e=>e.toUpperCase())}function Kt(n){return Se(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function qt(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const i=Kt(t);return i?[{key:e,label:Ft(e),value:i}]:[]}):[]}function Bt(n,e,t){const i=n.filter(o=>o.app_name===e||!!t&&o.app_id===t);return i.length===0?null:(i.sort((o,c)=>{const a=r=>r.status==="active"?0:1;return a(o)!==a(c)?a(o)-a(c):(c.updated_at??"").localeCompare(o.updated_at??"")}),i[0].id)}function Ht(n){return n.server?.icons?.[0]?.src??wt(n.server?.repository)??null}function Vt(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function Qt(n){const e=[],t=new Map(n.connections.map(i=>[i.id,i]));for(const i of n.requirements){const o=n.curated[i.bindingType],c=o?n.itemsById[o.registryAppId]:n.itemsByName[i.bindingType];if(!c)continue;const a=n.configurationState?.[i.fieldKey]?.value,r=a?t.get(a):void 0,l=a&&r?a:null,d=l?n.connectionReadiness?.[l]!==!1:!1,m=!!l&&d;e.push({fieldKey:i.fieldKey,bindingType:i.bindingType,registryItem:c,title:Vt(c,i.bindingType),icon:Ht(c),headline:o?.headline??c._meta?.["mcp.mesh"]?.short_description??null,checks:o?.checks??null,bullets:o?.bullets??[],satisfied:m,candidateConnectionId:m?null:l||Bt(n.connections,i.bindingType,o?.registryAppId),linkedConnectionId:l,configurationState:r?.configuration_state??null})}return e}function Wt(){const n=S.c(3);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"size-9 shrink-0 animate-pulse rounded-lg bg-muted/60"}),s.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted/60"}),s.jsx("div",{className:"ml-auto h-8 w-20 animate-pulse rounded-lg bg-muted/60"})]}),n[0]=e):e=n[0];let t;n[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:"p-1",children:s.jsx("div",{className:"h-5 w-40 animate-pulse rounded bg-muted/60"})}),n[1]=t):t=n[1];let i;return n[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col gap-2 rounded-2xl border border-border bg-card p-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-1 px-1 py-2",children:[t,s.jsx("div",{className:"p-1",children:s.jsx("div",{className:"h-5 w-56 animate-pulse rounded bg-muted/60"})})]})]}),n[2]=i):i=n[2],i}function ke(n){const e=S.c(3),{children:t}=n;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ve,{size:14,className:"shrink-0 text-blue-500"}),e[0]=i):i=e[0];let o;return e[1]!==t?(o=s.jsxs("div",{className:"flex items-center gap-2 p-1",children:[i,s.jsx("p",{className:"text-sm text-foreground",children:t})]}),e[1]=t,e[2]=o):o=e[2],o}function Gt(n){const e=S.c(42),{card:t,connecting:i,disabled:o,onConnect:c,org:a,selfClient:r}=n,l=t.linkedConnectionId;let d;e[0]!==t.configurationState?(d=qt(t.configurationState),e[0]=t.configurationState,e[1]=d):d=e[1];const m=d;let g;e[2]!==t.icon||e[3]!==t.title?(g=s.jsx(ht,{icon:t.icon,name:t.title,size:"sm",fit:"contain",className:"p-1.5"}),e[2]=t.icon,e[3]=t.title,e[4]=g):g=e[4];let f;e[5]!==t.title?(f=s.jsx("p",{className:"flex-1 text-sm text-foreground",children:t.title}),e[5]=t.title,e[6]=f):f=e[6];let h;e[7]!==t.satisfied||e[8]!==t.title||e[9]!==i||e[10]!==o||e[11]!==c?(h=t.satisfied?s.jsxs("div",{className:"flex h-8 items-center gap-2 px-3 text-sm text-muted-foreground",children:[s.jsx(Ve,{size:16})," Connected"]}):s.jsx(re,{type:"button",variant:"outline",size:"sm",disabled:o||i,onClick:c,"aria-label":`Connect ${t.title}`,children:i?s.jsx(ve,{size:16,className:"animate-spin"}):"Connect"}),e[7]=t.satisfied,e[8]=t.title,e[9]=i,e[10]=o,e[11]=c,e[12]=h):h=e[12];let p;e[13]!==g||e[14]!==f||e[15]!==h?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[g,f,h]}),e[13]=g,e[14]=f,e[15]=h,e[16]=p):p=e[16];let x;e[17]!==t.checks?(x=t.checks!==null&&s.jsxs(ke,{children:["+ ",t.checks," checks"]}),e[17]=t.checks,e[18]=x):x=e[18];let y;e[19]!==t.headline?(y=t.headline&&s.jsx(ke,{children:t.headline}),e[19]=t.headline,e[20]=y):y=e[20];let v;e[21]!==t.bullets?(v=t.bullets.map(Yt),e[21]=t.bullets,e[22]=v):v=e[22];let u;e[23]!==t.candidateConnectionId||e[24]!==t.satisfied||e[25]!==t.title?(u=!t.satisfied&&t.candidateConnectionId&&s.jsxs("p",{className:"px-1 text-xs text-muted-foreground",children:["Using your existing ",t.title]}),e[23]=t.candidateConnectionId,e[24]=t.satisfied,e[25]=t.title,e[26]=u):u=e[26];let j;e[27]!==x||e[28]!==y||e[29]!==v||e[30]!==u?(j=s.jsxs("div",{className:"flex flex-col gap-1 px-1 py-2",children:[x,y,v,u]}),e[27]=x,e[28]=y,e[29]=v,e[30]=u,e[31]=j):j=e[31];let C;e[32]!==t||e[33]!==l||e[34]!==a||e[35]!==m||e[36]!==r?(C=t.satisfied&&l&&s.jsx(tn,{card:t,org:a,selfClient:r,connectionId:l,savedConfigEntries:m}),e[32]=t,e[33]=l,e[34]=a,e[35]=m,e[36]=r,e[37]=C):C=e[37];let I;return e[38]!==j||e[39]!==C||e[40]!==p?(I=s.jsxs("div",{className:"flex flex-col gap-2 rounded-2xl border border-border bg-card p-4",children:[p,j,C]}),e[38]=j,e[39]=C,e[40]=p,e[41]=I):I=e[41],I}function Yt(n){return s.jsx(ke,{children:n},n)}function Zt(n){const e=n?.properties;return!!e&&typeof e=="object"&&Object.keys(e).length>0}function Jt(n){return/(token|secret|password|appKey|key)$/i.test(n)}function Xt(n,e){return Jt(n)?"••••••••":e}function en(n){const e=S.c(9),{id:t,label:i,description:o,children:c}=n;if(t.includes("__type")||t.includes("__binding"))return null;let a;e[0]!==t||e[1]!==i?(a=i&&s.jsx("label",{className:"text-sm font-medium text-foreground",htmlFor:t,children:i}),e[0]=t,e[1]=i,e[2]=a):a=e[2];let r;e[3]!==o?(r=o&&s.jsx("div",{className:"text-xs leading-4 text-muted-foreground",children:o}),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==c||e[6]!==a||e[7]!==r?(l=s.jsxs("div",{className:"grid gap-1.5",children:[a,c,r]}),e[5]=c,e[6]=a,e[7]=r,e[8]=l):l=e[8],l}function tn(n){const e=S.c(90),{card:t,org:i,selfClient:o,connectionId:c,savedConfigEntries:a}=n,r=Me();let l;e[0]!==c||e[1]!==i.id||e[2]!==i.slug?(l={connectionId:c,orgId:i.id,orgSlug:i.slug},e[0]=c,e[1]=i.id,e[2]=i.slug,e[3]=l):l=e[3];const d=Ne(l);let m;e[4]!==t.configurationState?(m=t.configurationState??{},e[4]=t.configurationState,e[5]=m):m=e[5];const[g,f]=P.useState(m),[h,p]=P.useState(null),[x,y]=P.useState(!1),[v,u]=P.useState(x);x!==v&&(u(x),x&&(f(t.configurationState??{}),p(null)));let j;e[6]!==c||e[7]!==i.id?(j=se.commerceDiscoveryCompanionConnectionSchema(i.id,c),e[6]=c,e[7]=i.id,e[8]=j):j=e[8];let C;e[9]!==d?(C=async()=>{const k=await d.callTool({name:"MCP_CONFIGURATION",arguments:{}});return ce(k)},e[9]=d,e[10]=C):C=e[10];let I;e[11]!==j||e[12]!==C?(I={queryKey:j,queryFn:C,retry:!1},e[11]=j,e[12]=C,e[13]=I):I=e[13];const R=ye(I);let T;e[14]!==c||e[15]!==o?(T=async k=>{const me=await o.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:c,data:{configuration_state:k}}});return ce(me)},e[14]=c,e[15]=o,e[16]=T):T=e[16];let K;e[17]!==i.id||e[18]!==r?(K=async()=>{p(null),await r.invalidateQueries({queryKey:se.commerceDiscoveryCompanionConnections(i.id)}),y(!1)},e[17]=i.id,e[18]=r,e[19]=K):K=e[19];let V;e[20]!==T||e[21]!==K?(V={mutationFn:T,onSuccess:K},e[20]=T,e[21]=K,e[22]=V):V=e[22];const N=Re(V),A=R.data?.stateSchema,te=Zt(A);if(R.isPending){let k;return e[23]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsxs("div",{className:"flex items-center gap-2 border-t border-border pt-3 text-sm text-muted-foreground",children:[s.jsx(ve,{size:14,className:"animate-spin"}),"Loading configuration..."]}),e[23]=k):k=e[23],k}if(R.error||!te||!A)return null;let E;e[24]!==g||e[25]!==N||e[26]!==A?(E=()=>{if(!Mt(g)){p("Enter at least one configuration value.");return}const k=Ae.validateFormData(g,A);if(k.errors.length>0){p(k.errors[0]?.stack??"Invalid configuration.");return}p(null),N.mutate(g)},e[24]=g,e[25]=N,e[26]=A,e[27]=E):E=e[27];const Q=E;let ie;e[28]!==t.configurationState||e[29]!==N.isPending?(ie=k=>{N.isPending||(y(k),k||(p(null),f(t.configurationState??{})))},e[28]=t.configurationState,e[29]=N.isPending,e[30]=ie):ie=e[30];const q=ie;let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Configuration"}),e[31]=$):$=e[31];let B;e[32]!==a.length?(B=a.length===0&&s.jsx("p",{className:"text-xs text-muted-foreground",children:"No configuration values saved yet."}),e[32]=a.length,e[33]=B):B=e[33];let w;e[34]!==B?(w=s.jsxs("div",{className:"grid gap-1",children:[$,B]}),e[34]=B,e[35]=w):w=e[35];let M;e[36]!==t.title||e[37]!==a.length?(M=a.length>0?s.jsxs(St,{children:[s.jsx(_t,{asChild:!0,children:s.jsx(re,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>y(!0),"aria-label":`Edit ${t.title} configuration`,children:s.jsx(Et,{size:14})})}),s.jsx(Nt,{children:"Edit configuration"})]}):s.jsx(re,{type:"button",variant:"outline",size:"sm",onClick:()=>y(!0),children:"Configure"}),e[36]=t.title,e[37]=a.length,e[38]=M):M=e[38];let z;e[39]!==w||e[40]!==M?(z=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[w,M]}),e[39]=w,e[40]=M,e[41]=z):z=e[41];let F;e[42]!==a?(F=a.length>0&&s.jsx("dl",{className:"grid gap-2",children:a.map(nn)}),e[42]=a,e[43]=F):F=e[43];let H;e[44]!==z||e[45]!==F?(H=s.jsxs("div",{className:"grid gap-3 border-t border-border pt-3",children:[z,F]}),e[44]=z,e[45]=F,e[46]=H):H=e[46];let D;e[47]!==t.title?(D=s.jsxs(xt,{children:["Configure ",t.title]}),e[47]=t.title,e[48]=D):D=e[48];let b;e[49]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(yt,{children:"Update the values this companion uses for Commerce Discovery."}),e[49]=b):b=e[49];let O;e[50]!==D?(O=s.jsxs(jt,{children:[D,b]}),e[50]=D,e[51]=O):O=e[51];const U=`${c}:configuration`;let le;e[52]===Symbol.for("react.memo_cache_sentinel")?(le=k=>f(k.formData??{}),e[52]=le):le=e[52];let de,ue;e[53]===Symbol.for("react.memo_cache_sentinel")?(de={FieldTemplate:en},ue=s.jsx(s.Fragment,{}),e[53]=de,e[54]=ue):(de=e[53],ue=e[54]);let W;e[55]!==g||e[56]!==A||e[57]!==U?(W=s.jsx(It,{schema:A,validator:Ae,formData:g,onChange:le,liveValidate:!1,showErrorList:!1,templates:de,children:ue},U),e[55]=g,e[56]=A,e[57]=U,e[58]=W):W=e[58];let G;e[59]!==N.error||e[60]!==h?(G=(h||N.error)&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:h??(N.error instanceof Error?N.error.message:"Could not save configuration.")}),e[59]=N.error,e[60]=h,e[61]=G):G=e[61];let Y;e[62]!==W||e[63]!==G?(Y=s.jsxs("div",{className:"grid gap-3",children:[W,G]}),e[62]=W,e[63]=G,e[64]=Y):Y=e[64];let ne;e[65]!==q?(ne=()=>q(!1),e[65]=q,e[66]=ne):ne=e[66];let _;e[67]!==N.isPending||e[68]!==ne?(_=s.jsx(re,{type:"button",variant:"outline",size:"sm",onClick:ne,disabled:N.isPending,children:"Cancel"}),e[67]=N.isPending,e[68]=ne,e[69]=_):_=e[69];let L;e[70]!==N.isPending?(L=N.isPending?s.jsxs(s.Fragment,{children:[s.jsx(ve,{size:14,className:"animate-spin"}),"Saving"]}):"Save",e[70]=N.isPending,e[71]=L):L=e[71];let oe;e[72]!==Q||e[73]!==N.isPending||e[74]!==L?(oe=s.jsx(re,{type:"button",size:"sm",onClick:Q,disabled:N.isPending,children:L}),e[72]=Q,e[73]=N.isPending,e[74]=L,e[75]=oe):oe=e[75];let Z;e[76]!==_||e[77]!==oe?(Z=s.jsxs(bt,{children:[_,oe]}),e[76]=_,e[77]=oe,e[78]=Z):Z=e[78];let J;e[79]!==O||e[80]!==Y||e[81]!==Z?(J=s.jsxs(Ct,{className:"sm:max-w-lg",children:[O,Y,Z]}),e[79]=O,e[80]=Y,e[81]=Z,e[82]=J):J=e[82];let X;e[83]!==x||e[84]!==q||e[85]!==J?(X=s.jsx(vt,{open:x,onOpenChange:q,children:J}),e[83]=x,e[84]=q,e[85]=J,e[86]=X):X=e[86];let ae;return e[87]!==H||e[88]!==X?(ae=s.jsxs(s.Fragment,{children:[H,X]}),e[87]=H,e[88]=X,e[89]=ae):ae=e[89],ae}function nn(n){return s.jsxs("div",{className:"flex items-center justify-between gap-3 text-sm",children:[s.jsx("dt",{className:"text-muted-foreground",children:n.label}),s.jsx("dd",{className:"truncate text-foreground",children:Xt(n.key,n.value)})]},n.key)}const Le={vtex:{registryAppId:"deco/vtex",checks:49,headline:"Out-of-stock, thin PDPs & attribute gaps across every SKU"},"google-analytics":{registryAppId:"deco/google-analytics",checks:49,headline:"Where revenue leaks between product view and checkout"},"google-search-console":{registryAppId:"deco/google-search-console",checks:49,headline:"Search visibility & indexing gaps across your catalog"}};function sn(n){const e=S.c(39),{selfClient:t,org:i,cdConnectionId:o}=n;let c;e[0]!==o||e[1]!==i.id||e[2]!==i.slug?(c={connectionId:o,orgId:i.id,orgSlug:i.slug},e[0]=o,e[1]=i.id,e[2]=i.slug,e[3]=c):c=e[3];const a=Ne(c);let r;e[4]!==o||e[5]!==i.id?(r=se.commerceDiscoveryCompanionSchema(i.id,o),e[4]=o,e[5]=i.id,e[6]=r):r=e[6];let l;e[7]!==a?(l=async()=>{const b=await a.callTool({name:"MCP_CONFIGURATION",arguments:{}});return ce(b)},e[7]=a,e[8]=l):l=e[8];let d;e[9]!==r||e[10]!==l?(d={queryKey:r,queryFn:l},e[9]=r,e[10]=l,e[11]=d):d=e[11];const m=ye(d),g=Ut(m.data?.stateSchema??{properties:{}}),f=g.map(mn),h=g.map(un).filter(dn),p=g.filter(cn).map(an),x=[...h,...p].sort().join(",");let y;e[12]!==o||e[13]!==i.id?(y=se.commerceDiscoveryConnection(i.id,o),e[12]=o,e[13]=i.id,e[14]=y):y=e[14];let v;e[15]!==o||e[16]!==t?(v=async()=>{const b=await t.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return ce(b)},e[15]=o,e[16]=t,e[17]=v):v=e[17];let u;e[18]!==y||e[19]!==v?(u={queryKey:y,queryFn:v},e[18]=y,e[19]=v,e[20]=u):u=e[20];const j=ye(u),C=j.data?.item?.configuration_state??null;let I;e[21]!==C?(I=b=>C?.[b.fieldKey]?.value,e[21]=C,e[22]=I):I=e[22];const R=g.map(I).filter(ln),T=ye({queryKey:se.commerceDiscoveryCompanionConnections(i.id),enabled:g.length>0,queryFn:async()=>{const b=[{field:["app_name"],operator:"in",value:f},{field:["app_id"],operator:"in",value:h}];R.length>0&&b.push({field:["id"],operator:"in",value:R});const O=await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{operator:"or",conditions:b},limit:1e3}});return ce(O)}}),K=T.data?.items??[],V=new Set(R),N=K.filter(b=>V.has(b.id)),A=N.filter(rn);let te;e[23]!==i.id||e[24]!==i.slug?(te=b=>({queryKey:se.commerceDiscoveryCompanionOAuthStatus(i.id,b.id),queryFn:async()=>{const O=await fetch(`/api/${encodeURIComponent(i.slug)}/connections/${encodeURIComponent(b.id)}/oauth-token/status`,{credentials:"include"});return O.ok?{hasToken:(await O.json()).hasToken===!0}:{hasToken:!1}},retry:!1}),e[23]=i.id,e[24]=i.slug,e[25]=te):te=e[25];const E=kt({queries:A.map(te)});let Q;e[26]!==E?(Q=(b,O)=>[b.id,E[O]?.data?.hasToken===!0],e[26]=E,e[27]=Q):Q=e[27];const ie=new Map(A.map(Q)),q={};for(const b of N)q[b.id]=!b.oauth_config||!!b.connection_token||ie.get(b.id)===!0;const $=ye({queryKey:se.commerceDiscoveryCompanionRegistry(i.id,x),enabled:g.length>0,queryFn:async()=>{const b=At(h,p),O=await Tt(qe.REGISTRY(i.id),i.id,i.slug,"COLLECTION_REGISTRY_APP_LIST",{...b?{where:b}:{},limit:1e3});return ce(O)}}),B={},w={};for(const b of $.data?.items??[])B[b.id]=b,b.server?.name&&(w[b.server.name]=b);const M=Qt({requirements:g,itemsById:B,itemsByName:w,connections:K,connectionReadiness:q,configurationState:C,curated:Le});let z;e[28]!==j||e[29]!==T||e[30]!==E||e[31]!==$||e[32]!==g||e[33]!==m.isPending?(z=m.isPending||j.isPending||g.length>0&&(T.isPending||$.isPending||E.some(on)),e[28]=j,e[29]=T,e[30]=E,e[31]=$,e[32]=g,e[33]=m.isPending,e[34]=z):z=e[34];const F=z,H=m.error??j.error??T.error??$.error??null;let D;return e[35]!==M||e[36]!==H||e[37]!==F?(D={cards:M,isLoading:F,error:H},e[35]=M,e[36]=H,e[37]=F,e[38]=D):D=e[38],D}function on(n){return n.isPending}function rn(n){return n.oauth_config&&!n.connection_token}function ln(n){return typeof n=="string"&&n.length>0}function an(n){return n.bindingType}function cn(n){return!Le[n.bindingType]}function dn(n){return!!n}function un(n){return Le[n.bindingType]?.registryAppId}function mn(n){return n.bindingType}function fn({selfClient:n,org:e,userId:t,cdConnectionId:i}){const o=Me(),[c,a]=P.useState(null),[r,l]=P.useState(null),d=async(g,f)=>{const h=await n.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:g,data:f}});return ce(h)};async function m(g){a(g.fieldKey),l(null);try{let f=g.candidateConnectionId;if(!f){const u=Ot(g.registryItem,e.id,t,{remoteIndex:0}),j=u.connection_type==="STDIO",C=!!u.connection_url,I=j&&u.connection_headers&&typeof u.connection_headers=="object"&&"command"in u.connection_headers;if(!C&&!I){l(`${g.title} cannot be connected: no connection method available`);return}const R=await n.callTool({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:u}});f=ce(R).item.id}const h=f,p=await Rt({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:u=>d(h,{connection_token:u}).then(()=>{})});if(!p.ok){l(`Couldn't sign in to ${g.title}: ${p.error}`);return}const x=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:i}}),y=ce(x).item?.configuration_state??null,v=Dt(y,g.fieldKey,g.bindingType,h);await d(i,{configuration_state:v}),await o.invalidateQueries({queryKey:se.commerceDiscoveryConnection(e.id,i)}),await o.invalidateQueries({queryKey:se.commerceDiscoveryCompanionConnections(e.id)})}catch(f){l(f instanceof Error?f.message:String(f))}finally{a(null)}}return{connect:m,connectingFieldKey:c,error:r}}const Ge="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-4";function Ye(){const n=S.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx("p",{className:"text-2xl font-medium text-foreground",children:"Unlock your full diagnostic"}),s.jsx("p",{className:"text-base text-muted-foreground",children:"Connect your tools to unlock 100+ checks across your funnel."})]}),n[0]=e):e=n[0],e}function Ze(){const n=S.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"grid gap-4",children:[0,1,2].map(gn)}),n[0]=e):e=n[0],e}function gn(n){return s.jsx(Wt,{},n)}function pn(){const n=S.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:Ge,children:[s.jsx(Ye,{}),s.jsx(Ze,{})]}),n[0]=e):e=n[0],e}function hn(n){const e=S.c(23),{org:t,cdConnectionId:i}=n,{data:o}=ze.useSession(),c=o?.user?.id??"";let a;e[0]!==t.id||e[1]!==t.slug?(a={connectionId:Be,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=a):a=e[2];const r=Ne(a);let l;e[3]!==i||e[4]!==t||e[5]!==r?(l={selfClient:r,org:t,cdConnectionId:i},e[3]=i,e[4]=t,e[5]=r,e[6]=l):l=e[6];const{cards:d,isLoading:m,error:g}=sn(l);let f;e[7]!==i||e[8]!==t||e[9]!==r||e[10]!==c?(f={selfClient:r,org:t,userId:c,cdConnectionId:i},e[7]=i,e[8]=t,e[9]=r,e[10]=c,e[11]=f):f=e[11];const{connect:h,connectingFieldKey:p,error:x}=fn(f);if(!m&&!g&&d.length===0)return null;const y=p!==null;let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ye,{}),e[12]=v):v=e[12];let u;return e[13]!==y||e[14]!==d||e[15]!==h||e[16]!==x||e[17]!==p||e[18]!==g||e[19]!==m||e[20]!==t||e[21]!==r?(u=s.jsxs("div",{className:Ge,children:[v,g?s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[s.jsx("p",{className:"text-sm text-foreground",children:"Couldn't load companion integrations."}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Reload the page to try again."})]}):m?s.jsx(Ze,{}):s.jsx(Oe,{wrapperClassName:"flex min-h-0 flex-1 flex-col md:block",className:"-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[45vh] md:flex-none",children:s.jsxs("div",{className:"grid gap-4",children:[x&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:x}),d.map(j=>s.jsx(Gt,{card:j,connecting:p===j.fieldKey,disabled:y&&p!==j.fieldKey,org:t,selfClient:r,onConnect:()=>{h(j)}},j.fieldKey))]})})]}),e[13]=y,e[14]=d,e[15]=h,e[16]=x,e[17]=p,e[18]=g,e[19]=m,e[20]=t,e[21]=r,e[22]=u):u=e[22],u}const Pe="https://decocms-tanstack.deco-cx.workers.dev/agendar",xn="Rather have us walk you through it?",yn="Book a 20-minute call and we'll run the diagnostic with you, live.";function Je({siteUrl:n,email:e}){const t=new URL(Pe);return n&&t.searchParams.set("siteUrl",n),e&&t.searchParams.set("email",e),t.toString()}function jn(n){const e=S.c(9),{href:t,size:i,className:o}=n,c=t===void 0?Pe:t,a=i===void 0?"lg":i;let r;e[0]!==o?(r=ge("w-full",o),e[0]=o,e[1]=r):r=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Qe,{size:16}),e[2]=l):l=e[2];let d;e[3]!==c?(d=s.jsxs("a",{href:c,target:"_blank",rel:"noreferrer",children:["Schedule a meeting",l]}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==r||e[7]!==d?(m=s.jsx(re,{asChild:!0,variant:"outline",size:a,className:r,children:d}),e[5]=a,e[6]=r,e[7]=d,e[8]=m):m=e[8],m}function De(n){const e=S.c(2),{children:t}=n;let i;return e[0]!==t?(i=s.jsx("div",{className:"relative z-10 flex h-12 w-12 items-center justify-center rounded-full border border-border bg-card card-shadow",children:t}),e[0]=t,e[1]=i):i=e[1],i}function bn(){const n=S.c(4);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(De,{children:s.jsx(We,{size:20,className:"text-muted-foreground"})}),n[0]=e):e=n[0];let t;n[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:"relative mx-4 h-px flex-1 bg-border",children:s.jsx("span",{className:"absolute top-1/2 h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-foreground animate-connection-travel","aria-hidden":!0})}),n[1]=t):t=n[1];let i;n[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"absolute inset-0 rounded-full border border-foreground/40 animate-connection-arrive","aria-hidden":!0}),n[2]=i):i=n[2];let o;return n[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex items-center justify-between rounded-2xl border border-border/60 bg-muted/40 px-7 py-7",children:[e,t,s.jsxs("div",{className:"relative",children:[i,s.jsxs(De,{children:[s.jsx("img",{src:"/logos/deco logo.svg",alt:"deco",className:"h-6 w-6 dark:hidden"}),s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"deco",className:"hidden h-6 w-6 dark:block"})]})]})]}),n[3]=o):o=n[3],o}function Xe(n){const e=S.c(4),{href:t}=n;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(bn,{}),e[0]=i):i=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"grid gap-2",children:[s.jsx("h2",{className:"text-xl font-medium leading-7 text-foreground",children:xn}),s.jsx("p",{className:"text-base leading-6 text-muted-foreground",children:yn})]}),e[1]=o):o=e[1];let c;return e[2]!==t?(c=s.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:s.jsxs("div",{className:"flex w-full max-w-[380px] flex-col gap-6 rounded-3xl border border-border bg-card p-8 card-shadow",children:[i,o,s.jsx(jn,{href:t,size:"xl"})]})}),e[2]=t,e[3]=c):c=e[3],c}function Cn(n){const e=S.c(8),{className:t,href:i}=n,o=i===void 0?Pe:i;let c;e[0]!==t?(c=ge("flex items-center gap-4 rounded-2xl border border-border bg-card p-5 card-shadow transition-colors hover:bg-accent",t),e[0]=t,e[1]=c):c=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:s.jsx(We,{size:20})}),e[2]=a):a=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("span",{className:"flex flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"text-base font-medium leading-5 text-foreground",children:"Prefer to talk to a human?"}),s.jsx("span",{className:"text-sm leading-5 text-muted-foreground",children:"Book a call and we'll run the diagnostic with you."})]}),l=s.jsx(Qe,{size:18,className:"shrink-0 text-muted-foreground"}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let d;return e[5]!==o||e[6]!==c?(d=s.jsxs("a",{href:o,target:"_blank",rel:"noreferrer",className:c,children:[a,r,l]}),e[5]=o,e[6]=c,e[7]=d):d=e[7],d}function et(n){const e=S.c(10),{host:t}=n,i=`https://www.google.com/s2/favicons?domain=${t}&sz=128`;let o,c,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),c=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),a=s.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=o,e[1]=c,e[2]=a):(o=e[0],c=e[1],a=e[2]);let r;e[3]!==i?(r=s.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:s.jsx("img",{src:i,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=i,e[4]=r):r=e[4];let l;e[5]!==t?(l=s.jsx("span",{className:"text-lg font-medium text-foreground",children:t}),e[5]=t,e[6]=l):l=e[6];let d;return e[7]!==r||e[8]!==l?(d=s.jsxs("div",{className:"flex items-center gap-3",children:[o,c,a,r,l]}),e[7]=r,e[8]=l,e[9]=d):d=e[9],d}function tt(n){const e=S.c(16),{label:t,iconSize:i,className:o,iconClassName:c,labelClassName:a}=n,r=i===void 0?14:i;let l;e[0]!==o?(l=ge("inline-flex items-center gap-2",o),e[0]=o,e[1]=l):l=e[1];let d;e[2]!==c?(d=ge("shrink-0 animate-spin",c),e[2]=c,e[3]=d):d=e[3];let m;e[4]!==r||e[5]!==d?(m=s.jsx(ve,{size:r,className:d}),e[4]=r,e[5]=d,e[6]=m):m=e[6];let g;e[7]!==a?(g=ge("text-sm",a),e[7]=a,e[8]=g):g=e[8];let f;e[9]!==t||e[10]!==g?(f=s.jsx("span",{className:g,children:t}),e[9]=t,e[10]=g,e[11]=f):f=e[11];let h;return e[12]!==l||e[13]!==m||e[14]!==f?(h=s.jsxs("span",{className:l,children:[m,f]}),e[12]=l,e[13]=m,e[14]=f,e[15]=h):h=e[15],h}const vn={route:"Preparing commerce onboarding...",workspace:"Preparing your commerce workspace...",connect:"Connecting workspace...",setup:"Setting up Commerce Discovery...",button:"Setting up"};function nt(n){return vn[n]}function st(n){const e=S.c(2),{variant:t}=n;let i;return e[0]!==t?(i=s.jsx(ee,{children:s.jsx(Ie,{variant:t})}),e[0]=t,e[1]=i):i=e[1],i}function Ie(n){const e=S.c(4),{variant:t}=n;let i;e[0]!==t?(i=nt(t),e[0]=t,e[1]=i):i=e[1];let o;return e[2]!==i?(o=s.jsx("div",{className:"py-4",role:"status","aria-live":"polite",children:s.jsx(tt,{label:i,className:"text-muted-foreground"})}),e[2]=i,e[3]=o):o=e[3],o}function Sn(){const n=S.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(tt,{label:nt("button")}),n[0]=e):e=n[0],e}function Hs(){const n=S.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Nn,{}),n[0]=e):e=n[0],e}const it=P.createContext(null),ot=()=>P.useContext(it);function _n(n){if(!n)return null;const e=Te(n);return e.ok?new URL(e.value).hostname:null}function Nn(){const n=S.c(9);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/commerce-onboarding"},n[0]=e):e=n[0];const t=rt(e),{org:i,siteUrl:o}=t;let c;n[1]!==o?(c=_n(o),n[1]=o,n[2]=c):c=n[2];const a=c;let r;n[3]!==i||n[4]!==o?(r=s.jsx(In,{requestedOrgSlug:i,siteUrl:o}),n[3]=i,n[4]=o,n[5]=r):r=n[5];let l;return n[6]!==a||n[7]!==r?(l=s.jsx(it.Provider,{value:a,children:r}),n[6]=a,n[7]=r,n[8]=l):l=n[8],l}function In(n){const e=S.c(8),{requestedOrgSlug:t,siteUrl:i}=n,{data:o,isPending:c}=ze.useSession(),a=ot();if(c){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(st,{variant:"route"}),e[0]=l):l=e[0],l}if(!o){const l=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==a?(d=a?s.jsx(et,{host:a}):void 0,e[1]=a,e[2]=d):d=e[2];let m;return e[3]!==d?(m=s.jsx(ee,{children:s.jsx(ut,{callbackUrl:l,allowAutoLogin:!1,title:"Unlock your full diagnostic",subtitle:null,brand:d})}),e[3]=d,e[4]=m):m=e[4],m}let r;return e[5]!==t||e[6]!==i?(r=s.jsx(En,{requestedOrgSlug:t,siteUrl:i}),e[5]=t,e[6]=i,e[7]=r):r=e[7],r}function En(n){const e=S.c(40),{requestedOrgSlug:t,siteUrl:i}=n,o=Fe(),c=lt(),[a,r]=P.useState(null),[l,d]=P.useState(null),m=c.data?.map(Tn)??[];let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={mutationFn:wn,retry:!1,onSuccess:u=>{d(u)}},e[0]=g):g=e[0];const f=Re(g);if(c.isPending){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(st,{variant:"route"}),e[1]=u):u=e[1],u}if(c.error){let u;return e[2]!==c?(u=s.jsx(Ce,{title:"We could not load your organizations",description:"Retry to continue commerce setup from this page.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[2]=c,e[3]=u):u=e[3],u}const h=t?m.find(u=>u.slug===t):null;if(h){let u;return e[4]!==h||e[5]!==i?(u=s.jsx(be,{org:h,initialSiteUrl:i}),e[4]=h,e[5]=i,e[6]=u):u=e[6],u}if(t){let u;return e[7]!==c?(u=s.jsx(Ce,{title:"Organization not found",description:"We could not find that organization for your account.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[7]=c,e[8]=u):u=e[8],u}if(a){let u;return e[9]!==a||e[10]!==i?(u=s.jsx(be,{org:a,initialSiteUrl:i}),e[9]=a,e[10]=i,e[11]=u):u=e[11],u}if(m.length===1&&m[0]){let u;return e[12]!==m[0]||e[13]!==i?(u=s.jsx(be,{org:m[0],initialSiteUrl:i}),e[12]=m[0],e[13]=i,e[14]=u):u=e[14],u}if(m.length>1){let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(fe,{title:"Choose an organization",description:"Select where commerce diagnostics should continue."}),e[15]=u):u=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=I=>r(I),e[16]=j):j=e[16];let C;return e[17]!==m?(C=s.jsx(ee,{children:s.jsxs("div",{className:"grid gap-10",children:[u,s.jsx(Oe,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:s.jsx(Ue,{organizations:m,selectLabel:"Continue",onSelected:j})})]})}),e[17]=m,e[18]=C):C=e[18],C}if(!l){let u;e[19]!==f?(u=()=>{f.reset(),f.mutate()},e[19]=f,e[20]=u):u=e[20];let j;return e[21]!==f||e[22]!==u?(j=s.jsx(On,{mutation:f,onRetry:u}),e[21]=f,e[22]=u,e[23]=j):j=e[23],j}const p=l;if(p?.success&&(p.status==="created"||p.status==="joined"||p.status==="already_has_organization")&&p.organization){let u;return e[24]!==p.organization||e[25]!==i?(u=s.jsx(be,{org:p.organization,initialSiteUrl:i}),e[24]=p.organization,e[25]=i,e[26]=u):u=e[26],u}if(p?.status==="ambiguous"&&p.organizations&&p.organizations.length>0){let u;e[27]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(fe,{title:"Choose an organization",description:"Your email can access more than one organization. Choose where commerce setup should continue."}),e[27]=u):u=e[27];const j=p.domain??void 0;let C;e[28]!==o||e[29]!==i?(C=(R,T)=>{Ke(),r({...R,slug:T}),o({to:"/commerce-onboarding",search:{org:T,siteUrl:i}})},e[28]=o,e[29]=i,e[30]=C):C=e[30];let I;return e[31]!==p.organizations||e[32]!==j||e[33]!==C?(I=s.jsx(ee,{children:s.jsxs("div",{className:"grid gap-10",children:[u,s.jsx(Oe,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:s.jsx(Ue,{organizations:p.organizations,domain:j,onJoined:C})})]})}),e[31]=p.organizations,e[32]=j,e[33]=C,e[34]=I):I=e[34],I}const x=p?.error??"We could not determine a commerce organization for this account.";let y;e[35]!==f?(y=()=>{d(null),f.reset()},e[35]=f,e[36]=y):y=e[36];let v;return e[37]!==x||e[38]!==y?(v=s.jsx(Ce,{title:"Commerce onboarding needs support",description:x,actionLabel:"Try again",onRetry:y}),e[37]=x,e[38]=y,e[39]=v):v=e[39],v}async function wn(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Ke(),e}function Tn(n){return{id:n.id,name:n.name,slug:n.slug,logo:n.logo??null}}function On(n){const e=S.c(7),{mutation:t,onRetry:i}=n,o=P.useRef(!1);let c;e[0]!==t?(c=d=>{!d||o.current||(o.current=!0,t.mutate())},e[0]=t,e[1]=c):c=e[1];const a=c;if(t.error){let d;return e[2]!==i?(d=s.jsx(Ce,{title:"Commerce onboarding is unavailable",description:"We could not prepare an organization for commerce setup. Retry from this page or contact support.",actionLabel:"Retry",onRetry:i}),e[2]=i,e[3]=d):d=e[3],d}let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ie,{variant:"workspace"}),e[4]=r):r=e[4];let l;return e[5]!==a?(l=s.jsx(ee,{children:s.jsx("div",{ref:a,children:r})}),e[5]=a,e[6]=l):l=e[6],l}function fe(n){const e=S.c(8),{title:t,description:i}=n,o=ot();let c;e[0]!==o?(c=o?s.jsx(et,{host:o}):s.jsxs("div",{children:[s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=o,e[1]=c):c=e[1];let a;e[2]!==i||e[3]!==t?(a=(t||i)&&s.jsxs("div",{className:"space-y-2",children:[t&&s.jsx("h1",{className:"text-2xl font-medium leading-8",children:t}),i&&s.jsx("p",{className:"text-base text-muted-foreground leading-6",children:i})]}),e[2]=i,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==c||e[6]!==a?(r=s.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=r):r=e[7],r}function Ce(n){const e=S.c(9),{title:t,description:i,actionLabel:o,onRetry:c}=n;let a;e[0]!==i||e[1]!==t?(a=s.jsx(fe,{title:t,description:i}),e[0]=i,e[1]=t,e[2]=a):a=e[2];let r;e[3]!==o||e[4]!==c?(r=s.jsx(re,{type:"button",size:"xl",className:"w-full",onClick:c,children:o}),e[3]=o,e[4]=c,e[5]=r):r=e[5];let l;return e[6]!==a||e[7]!==r?(l=s.jsx(ee,{children:s.jsxs("div",{className:"grid gap-10",children:[a,r]})}),e[6]=a,e[7]=r,e[8]=l):l=e[8],l}function kn(n){return n.content?.find(e=>e.text)?.text??"Commerce Discovery setup failed."}function Ee(n){const e=n;if(e.isError)throw new Error(kn(e));return e.structuredContent??n}function be(n){const e=S.c(10),{org:t,initialSiteUrl:i}=n,{data:o}=ze.useSession(),c=o?.user?.email;let a;e[0]!==i||e[1]!==c?(a=Je({siteUrl:i,email:c}),e[0]=i,e[1]=c,e[2]=a):a=e[2];const r=a;let l;e[3]!==r?(l=s.jsx(Xe,{href:r}),e[3]=r,e[4]=l):l=e[4];const d=l;let m;return e[5]!==i||e[6]!==d||e[7]!==t||e[8]!==o?.user?.email?(m=s.jsx(at,{children:g=>{const{reset:f}=g;return s.jsx(ct,{fallback:h=>{const{error:p,resetError:x}=h;return s.jsx(ee,{visual:d,children:s.jsx(Rn,{orgName:t.name,message:p instanceof Error?p.message:"We could not check Commerce Discovery setup.",onRetry:()=>{f(),x()}})})},children:s.jsx(P.Suspense,{fallback:s.jsx(ee,{visual:d,children:s.jsx(Ie,{variant:"connect"})}),children:s.jsx(zn,{org:t,initialSiteUrl:i,sessionEmail:o?.user?.email},`${t.id}:${i??""}`)})})}}),e[5]=i,e[6]=d,e[7]=t,e[8]=o?.user?.email,e[9]=m):m=e[9],m}function Rn(n){const e=S.c(10),{orgName:t,message:i,onRetry:o}=n,c=`Commerce setup will continue for ${t}.`;let a;e[0]!==c?(a=s.jsx(fe,{title:"Commerce diagnostics",description:c}),e[0]=c,e[1]=a):a=e[1];let r;e[2]!==i?(r=s.jsx(_e,{message:i}),e[2]=i,e[3]=r):r=e[3];let l;e[4]!==o?(l=s.jsx(re,{type:"button",size:"xl",className:"w-full",onClick:o,children:"Retry"}),e[4]=o,e[5]=l):l=e[5];let d;return e[6]!==a||e[7]!==r||e[8]!==l?(d=s.jsxs("div",{className:"grid gap-10",children:[a,r,l]}),e[6]=a,e[7]=r,e[8]=l,e[9]=d):d=e[9],d}function zn(n){const e=S.c(99),{org:t,initialSiteUrl:i,sessionEmail:o}=n,c=Fe();let a;e[0]!==t.id||e[1]!==t.slug?(a={connectionId:Be,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=a):a=e[2];const r=Ne(a),[l,d]=P.useState(i??""),[m,g]=P.useState(null),[f,h]=P.useState(null),p=P.useRef(!1),x=qe.COMMERCE_DISCOVERY(t.id),y=gt(t.id),v=se.commerceDiscoveryConnection(t.id,x);let u;e[3]!==x||e[4]!==r?(u=async()=>{const _=await r.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:x}});return Ee(_)},e[3]=x,e[4]=r,e[5]=u):u=e[5];let j;e[6]!==v||e[7]!==u?(j={queryKey:v,queryFn:u,retry:!1},e[6]=v,e[7]=u,e[8]=j):j=e[8];const C=$e(j),I=se.commerceDiscoveryVirtualMcp(t.id,y);let R;e[9]!==r||e[10]!==y?(R=async()=>{const _=await r.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:y}});return Ee(_)},e[9]=r,e[10]=y,e[11]=R):R=e[11];let T;e[12]!==I||e[13]!==R?(T={queryKey:I,queryFn:R,retry:!1},e[12]=I,e[13]=R,e[14]=T):T=e[14];const K=$e(T);let V;e[15]!==r?(V=async _=>{const L=await r.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:_}});return Ee(L)},e[15]=r,e[16]=V):V=e[16];let N;e[17]!==C||e[18]!==K?(N=_=>{g(_),h(null),C.refetch(),K.refetch()},e[17]=C,e[18]=K,e[19]=N):N=e[19];let A;e[20]===Symbol.for("react.memo_cache_sentinel")?(A=_=>{h(_ instanceof Error?_.message:"Commerce Discovery setup failed.")},e[20]=A):A=e[20];let te;e[21]!==V||e[22]!==N?(te={mutationFn:V,retry:!1,onSuccess:N,onError:A},e[21]=V,e[22]=N,e[23]=te):te=e[23];const E=Re(te),Q=!!C.data.item&&!!K.data.item,ie=i??l;let q;e[24]!==ie||e[25]!==o?(q=Je({siteUrl:ie,email:o}),e[24]=ie,e[25]=o,e[26]=q):q=e[26];const $=q;let B;e[27]!==$?(B=s.jsx(Xe,{href:$}),e[27]=$,e[28]=B):B=e[28];const w=B;let M;e[29]!==E?(M=_=>{const L=Te(_);if(!L.ok){h(L.error);return}h(null),E.mutate(L.value)},e[29]=E,e[30]=M):M=e[30];const z=M;let F;e[31]!==i||e[32]!==z||e[33]!==Q?(F=_=>{!_||p.current||Q||!i||(p.current=!0,z(i))},e[31]=i,e[32]=z,e[33]=Q,e[34]=F):F=e[34];const H=F;let D;e[35]!==z||e[36]!==l?(D=_=>{_.preventDefault(),z(l)},e[35]=z,e[36]=l,e[37]=D):D=e[37];const b=D;let O;e[38]!==x||e[39]!==m?.reportApp||e[40]!==y?(O=m?.reportApp??{connectionId:x,virtualMcpId:y,toolName:pt},e[38]=x,e[39]=m?.reportApp,e[40]=y,e[41]=O):O=e[41];const U=O;let le;e[42]!==c||e[43]!==t.slug||e[44]!==U.connectionId||e[45]!==U.toolName||e[46]!==U.virtualMcpId?(le=()=>{localStorage.setItem(dt.sidebarOpen(),JSON.stringify(!1)),c({to:"/$org/$taskId",params:{org:t.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:U.virtualMcpId,main:mt(U.connectionId,U.toolName),chat:0}})},e[42]=c,e[43]=t.slug,e[44]=U.connectionId,e[45]=U.toolName,e[46]=U.virtualMcpId,e[47]=le):le=e[47];const de=le;if(Q){let _;return e[48]!==$||e[49]!==w||e[50]!==de||e[51]!==t||e[52]!==U?(_=s.jsx(Ln,{org:t,reportApp:U,onOpenReport:de,meetingUrl:$,meetingVisual:w}),e[48]=$,e[49]=w,e[50]=de,e[51]=t,e[52]=U,e[53]=_):_=e[53],_}if(i){let _;e[54]!==i?(_=Te(i),e[54]=i,e[55]=_):_=e[55];const L=_;if(!L.ok){const k=`Commerce setup will continue for ${t.name}.`;let me;e[56]!==k?(me=s.jsx(fe,{title:"Commerce diagnostics",description:k}),e[56]=k,e[57]=me):me=e[57];let pe;e[58]!==L.error?(pe=s.jsx(_e,{message:L.error}),e[58]=L.error,e[59]=pe):pe=e[59];let he;e[60]!==b||e[61]!==f||e[62]!==E.isPending||e[63]!==l?(he=s.jsx(we,{siteUrl:l,error:f,isSubmitting:E.isPending,onSiteUrlChange:d,onSubmit:b}),e[60]=b,e[61]=f,e[62]=E.isPending,e[63]=l,e[64]=he):he=e[64];let xe;e[65]!==me||e[66]!==pe||e[67]!==he?(xe=s.jsxs("div",{className:"grid gap-10",children:[me,pe,he]}),e[65]=me,e[66]=pe,e[67]=he,e[68]=xe):xe=e[68];let je;return e[69]!==w||e[70]!==xe?(je=s.jsx(ee,{visual:w,children:xe}),e[69]=w,e[70]=xe,e[71]=je):je=e[71],je}const oe=`Commerce Discovery is being prepared for ${L.value}.`;let Z;e[72]!==oe?(Z=s.jsx(fe,{title:"Commerce diagnostics",description:oe}),e[72]=oe,e[73]=Z):Z=e[73];let J;e[74]!==b||e[75]!==f||e[76]!==E||e[77]!==l?(J=f?s.jsxs(s.Fragment,{children:[s.jsx(_e,{message:f}),s.jsx(we,{siteUrl:l,error:null,isSubmitting:E.isPending,onSiteUrlChange:d,onSubmit:b})]}):s.jsx(Ie,{variant:"setup"}),e[74]=b,e[75]=f,e[76]=E,e[77]=l,e[78]=J):J=e[78];let X;e[79]!==Z||e[80]!==J||e[81]!==H?(X=s.jsxs("div",{ref:H,className:"grid gap-10",children:[Z,J]}),e[79]=Z,e[80]=J,e[81]=H,e[82]=X):X=e[82];let ae;return e[83]!==w||e[84]!==X?(ae=s.jsx(ee,{visual:w,children:X}),e[83]=w,e[84]=X,e[85]=ae):ae=e[85],ae}const ue=`Commerce setup will continue for ${t.name}.`;let W;e[86]!==ue?(W=s.jsx(fe,{title:"Commerce diagnostics",description:ue}),e[86]=ue,e[87]=W):W=e[87];let G;e[88]!==b||e[89]!==f||e[90]!==E.isPending||e[91]!==l?(G=s.jsx(we,{siteUrl:l,error:f,isSubmitting:E.isPending,onSiteUrlChange:d,onSubmit:b}),e[88]=b,e[89]=f,e[90]=E.isPending,e[91]=l,e[92]=G):G=e[92];let Y;e[93]!==W||e[94]!==G?(Y=s.jsxs("div",{className:"grid gap-10",children:[W,G]}),e[93]=W,e[94]=G,e[95]=Y):Y=e[95];let ne;return e[96]!==w||e[97]!==Y?(ne=s.jsx(ee,{visual:w,children:Y}),e[96]=w,e[97]=Y,e[98]=ne):ne=e[98],ne}function we(n){const e=S.c(22),{siteUrl:t,error:i,isSubmitting:o,onSiteUrlChange:c,onSubmit:a}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"Website URL"}),e[0]=r):r=e[0];let l;e[1]!==c?(l=y=>c(y.target.value),e[1]=c,e[2]=l):l=e[2];const d=!!i;let m;e[3]!==o||e[4]!==t||e[5]!==l||e[6]!==d?(m=s.jsx(ft,{id:"commerce-site-url",type:"text",inputMode:"url",value:t,onChange:l,placeholder:"https://example.com","aria-invalid":d,disabled:o}),e[3]=o,e[4]=t,e[5]=l,e[6]=d,e[7]=m):m=e[7];let g;e[8]!==i?(g=i?s.jsx(_e,{message:i}):null,e[8]=i,e[9]=g):g=e[9];let f;e[10]!==m||e[11]!==g?(f=s.jsxs("div",{className:"grid gap-2",children:[r,m,g]}),e[10]=m,e[11]=g,e[12]=f):f=e[12];let h;e[13]!==o?(h=o?s.jsx(Sn,{}):s.jsxs(s.Fragment,{children:["Continue",s.jsx(He,{size:16})]}),e[13]=o,e[14]=h):h=e[14];let p;e[15]!==o||e[16]!==h?(p=s.jsx(re,{type:"submit",size:"xl",className:"w-full",disabled:o,children:h}),e[15]=o,e[16]=h,e[17]=p):p=e[17];let x;return e[18]!==a||e[19]!==f||e[20]!==p?(x=s.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[f,p]}),e[18]=a,e[19]=f,e[20]=p,e[21]=x):x=e[21],x}function Ln(n){const e=S.c(20),{org:t,reportApp:i,onOpenReport:o,meetingUrl:c,meetingVisual:a}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(fe,{}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(pn,{}),e[1]=l):l=e[1];let d;e[2]!==t||e[3]!==i.connectionId?(d=s.jsx(P.Suspense,{fallback:l,children:s.jsx(hn,{org:t,cdConnectionId:i.connectionId})}),e[2]=t,e[3]=i.connectionId,e[4]=d):d=e[4];let m;e[5]!==c?(m=s.jsx(Cn,{className:"md:hidden",href:c}),e[5]=c,e[6]=m):m=e[6];const g=!i.virtualMcpId;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(He,{size:18}),e[7]=f):f=e[7];let h;e[8]!==o||e[9]!==g?(h=s.jsxs(re,{type:"button",size:"xl",className:"w-full rounded-2xl text-base font-medium",onClick:o,disabled:g,children:["See full report",f]}),e[8]=o,e[9]=g,e[10]=h):h=e[10];let p;e[11]!==m||e[12]!==h?(p=s.jsxs("div",{className:"flex shrink-0 flex-col gap-3 md:mt-8",children:[m,h]}),e[11]=m,e[12]=h,e[13]=p):p=e[13];let x;e[14]!==d||e[15]!==p?(x=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[r,d,p]}),e[14]=d,e[15]=p,e[16]=x):x=e[16];let y;return e[17]!==a||e[18]!==x?(y=s.jsx(ee,{align:"fill",visual:a,children:x}),e[17]=a,e[18]=x,e[19]=y):y=e[19],y}function _e(n){const e=S.c(2),{message:t}=n;let i;return e[0]!==t?(i=s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:t}),e[0]=t,e[1]=i):i=e[1],i}export{Hs as default};
@@ -1 +1 @@
1
- import{c as b,w as N,K as k,k as z,j as s,r as M,B as T,l as v}from"./index-BkSIY6JJ.js";import{D as I,a as S,b as D,d as E,e as R}from"./dialog-BLvz2lK8.js";import{S as _}from"./chat-context-DN0_9Gee.js";import{i as $}from"./ChevronUp-BhWz3ylT.js";import{a as A}from"./Eye-DWTUBTZ_.js";import{u as B}from"./studio-tools-BgUSKeCY.js";const L={online:!1,capabilities:[],ready:!1};function F(){const i=b.c(7),{org:e}=N(),l=B();let o;i[0]!==e.id?(o=k.currentLink(e.id),i[0]=e.id,i[1]=o):o=i[1];let t;i[2]!==l?(t=async()=>{const f=await l.call("LINK_CURRENT_GET",{});return f?{...f,ready:!0}:{...L,ready:!0}},i[2]=l,i[3]=t):t=i[3];let n;i[4]!==o||i[5]!==t?(n={queryKey:o,queryFn:t,staleTime:4e3,refetchInterval:5e3,refetchOnWindowFocus:!0},i[4]=o,i[5]=t,i[6]=n):n=i[6];const{data:p}=z(n);return p??L}function K(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}function O(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}const y="bunx decocms@latest link",w=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:s.jsx(K,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:s.jsx(O,{size:18})}];function Q(i){return w.filter(e=>i.includes(e.capability)).map(e=>e.label)}function U(i){const e=b.c(21),{open:l,onOpenChange:o}=i,t=F(),[n,p]=M.useState(!1),f=t.hostname??t.machineId??"Your desktop",j=t.online?`Connected to ${f}`:"Connect your desktop";let a;e[0]!==j?(a=s.jsx(I,{children:j}),e[0]=j,e[1]=a):a=e[1];const C=t.online?"This machine provides the following local agents.":"Run this command in your desktop terminal. The dialog will close once your desktop is online.";let r;e[2]!==C?(r=s.jsx(S,{children:C}),e[2]=C,e[3]=r):r=e[3];let c;e[4]!==a||e[5]!==r?(c=s.jsxs(D,{children:[a,r]}),e[4]=a,e[5]=r,e[6]=c):c=e[6];let d;e[7]!==n||e[8]!==t.online?(d=!t.online&&s.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:y}),s.jsx(T,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(y),p(!0),setTimeout(()=>p(!1),1500)},children:n?s.jsx($,{size:14}):s.jsx(A,{size:14})})]}),e[7]=n,e[8]=t.online,e[9]=d):d=e[9];let u;e[10]!==t.capabilities||e[11]!==t.online?(u=t.online?s.jsx("div",{className:"flex flex-col gap-3 text-sm",children:s.jsx("div",{className:"flex flex-col gap-2",children:w.map(x=>{const g=t.capabilities.includes(x.capability);return s.jsxs("div",{className:v("flex items-center gap-3 rounded-md border px-3 py-2",g?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[s.jsx("div",{className:v("flex size-6 items-center justify-center",g?"text-foreground":"text-muted-foreground"),children:x.icon}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium",children:x.label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:g?x.description:"Not detected"})]}),s.jsx("span",{className:v("size-2 rounded-full",g?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(_,{size:"sm"}),"Waiting for desktop…"]}),e[10]=t.capabilities,e[11]=t.online,e[12]=u):u=e[12];let m;e[13]!==c||e[14]!==d||e[15]!==u?(m=s.jsxs(E,{className:"sm:max-w-md",children:[c,d,u]}),e[13]=c,e[14]=d,e[15]=u,e[16]=m):m=e[16];let h;return e[17]!==o||e[18]!==l||e[19]!==m?(h=s.jsx(R,{open:l,onOpenChange:o,children:m}),e[17]=o,e[18]=l,e[19]=m,e[20]=h):h=e[20],h}export{U as C,K as a,O as b,F as u,Q as v};
1
+ import{c as b,w as N,K as k,k as z,j as s,r as M,B as T,l as v}from"./index-B37Lpv5S.js";import{D as I,a as S,b as D,d as E,e as R}from"./dialog-BbHIKIUS.js";import{S as _}from"./chat-context-bLbsqSUE.js";import{i as $}from"./ChevronUp-CIoJSXpm.js";import{a as A}from"./Eye-BcF7vo02.js";import{u as B}from"./studio-tools-QGvUs6qu.js";const L={online:!1,capabilities:[],ready:!1};function F(){const i=b.c(7),{org:e}=N(),l=B();let o;i[0]!==e.id?(o=k.currentLink(e.id),i[0]=e.id,i[1]=o):o=i[1];let t;i[2]!==l?(t=async()=>{const f=await l.call("LINK_CURRENT_GET",{});return f?{...f,ready:!0}:{...L,ready:!0}},i[2]=l,i[3]=t):t=i[3];let n;i[4]!==o||i[5]!==t?(n={queryKey:o,queryFn:t,staleTime:4e3,refetchInterval:5e3,refetchOnWindowFocus:!0},i[4]=o,i[5]=t,i[6]=n):n=i[6];const{data:p}=z(n);return p??L}function K(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}function O(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}const y="bunx decocms@latest link",w=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:s.jsx(K,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:s.jsx(O,{size:18})}];function Q(i){return w.filter(e=>i.includes(e.capability)).map(e=>e.label)}function U(i){const e=b.c(21),{open:l,onOpenChange:o}=i,t=F(),[n,p]=M.useState(!1),f=t.hostname??t.machineId??"Your desktop",j=t.online?`Connected to ${f}`:"Connect your desktop";let a;e[0]!==j?(a=s.jsx(I,{children:j}),e[0]=j,e[1]=a):a=e[1];const C=t.online?"This machine provides the following local agents.":"Run this command in your desktop terminal. The dialog will close once your desktop is online.";let r;e[2]!==C?(r=s.jsx(S,{children:C}),e[2]=C,e[3]=r):r=e[3];let c;e[4]!==a||e[5]!==r?(c=s.jsxs(D,{children:[a,r]}),e[4]=a,e[5]=r,e[6]=c):c=e[6];let d;e[7]!==n||e[8]!==t.online?(d=!t.online&&s.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:y}),s.jsx(T,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(y),p(!0),setTimeout(()=>p(!1),1500)},children:n?s.jsx($,{size:14}):s.jsx(A,{size:14})})]}),e[7]=n,e[8]=t.online,e[9]=d):d=e[9];let u;e[10]!==t.capabilities||e[11]!==t.online?(u=t.online?s.jsx("div",{className:"flex flex-col gap-3 text-sm",children:s.jsx("div",{className:"flex flex-col gap-2",children:w.map(x=>{const g=t.capabilities.includes(x.capability);return s.jsxs("div",{className:v("flex items-center gap-3 rounded-md border px-3 py-2",g?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[s.jsx("div",{className:v("flex size-6 items-center justify-center",g?"text-foreground":"text-muted-foreground"),children:x.icon}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium",children:x.label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:g?x.description:"Not detected"})]}),s.jsx("span",{className:v("size-2 rounded-full",g?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(_,{size:"sm"}),"Waiting for desktop…"]}),e[10]=t.capabilities,e[11]=t.online,e[12]=u):u=e[12];let m;e[13]!==c||e[14]!==d||e[15]!==u?(m=s.jsxs(E,{className:"sm:max-w-md",children:[c,d,u]}),e[13]=c,e[14]=d,e[15]=u,e[16]=m):m=e[16];let h;return e[17]!==o||e[18]!==l||e[19]!==m?(h=s.jsx(R,{open:l,onOpenChange:o,children:m}),e[17]=o,e[18]=l,e[19]=m,e[20]=h):h=e[20],h}export{U as C,K as a,O as b,F as u,Q as v};
@@ -1 +1 @@
1
- import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,w as $,b0 as k,K as D,l as w,j as x}from"./index-BkSIY6JJ.js";import{u as K}from"./use-registry-connections-Czx1u2H6.js";import{b as Q}from"./use-organization-settings-DFnXSR7Z.js";import{S as E,e as F}from"./use-mcp-client-DYpZuPPA.js";import{u as H}from"./useInfiniteQuery-DlRMWoIP.js";import{i as q,f as G}from"./extract-connection-data-iACc8UZO.js";import{C as U}from"./card-BIwENur_.js";import{I as V}from"./integration-icon-CZDEviNI.js";function ae(s){const e=new Map;for(const o of s){const l=_(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],u=new Set;for(const o of s){const l=_(o);if(u.has(l))continue;u.add(l);const r=e.get(l),m=r[0];r.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:l,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:r})}return t}function ce(){const s=R.c(6),e=K(),t=Q(),u=$().project.enabledPlugins??[];let o;if(s[0]!==u||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(X),u.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=u,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function X(s){return{id:s.id,title:s.title,icon:s.icon}}const Y=24,S=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim();if(e)return{operator:"or",conditions:[{field:["title"],operator:"contains",value:e},{field:["description"],operator:"contains",value:e},{field:["name"],operator:"contains",value:e},{field:["server","title"],operator:"contains",value:e}]}}function T(s,e,t,u,o){const l=s.map(c=>c.id).sort().join(","),r=z(o),{data:m,fetchNextPage:d,hasNextPage:f,isFetchingNextPage:p,isLoading:b}=H({queryKey:D.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:c})=>{const n=c??{};return await Promise.all(s.map(async i=>{const y=n[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=q(i.id,e);let h;for(let v=0;v<S;v++){let C=null;try{C=await F({connectionId:i.id,orgId:e,orgSlug:t});const I={limit:Y};y&&(I.cursor=y),r&&(I.where=r);const P=await C.callTool({name:j,arguments:I}),N=P.structuredContent??P,M=N.nextCursor||N.cursor||void 0,L=G(N?[N]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:L,nextCursor:M}}catch(I){h=I}finally{await C?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${S} attempts:`,h),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:c=>{const n={};let a=!1;for(const i of c)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,a=!0):n[i.registryId]="EXHAUSTED");return a?n:void 0},staleTime:3600*1e3,placeholderData:k,retry:!1,enabled:s.length>0}),g=[];if(m?.pages)for(const c of m.pages)for(const n of c)for(const a of n.items)g.push({...a,_sourceName:a._sourceName??n.registryTitle,_sourceIcon:a._sourceIcon??n.registryIcon,_registryId:a._registryId??n.registryId});return{items:g,hasMore:f??!1,isLoadingMore:p,isInitialLoading:b,fetchNextPage:()=>{f&&!p&&d()}}}function ue(s,e){const t=R.c(16),{org:u}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const m=r,d=T(l,u.id,u.slug,!0,e),f=T(m,u.id,u.slug,!0,e);let p;if(t[4]!==f.items||t[5]!==d.items){const y=new Set;p=[];const j=[...d.items,...f.items];for(const h of j){const v=`${h._registryId}:${h.id}`;y.has(v)||(y.add(v),p.push(h))}t[4]=f.items,t[5]=d.items,t[6]=p}else p=t[6];const b=d.isInitialLoading||f.isInitialLoading,g=d.isLoadingMore||f.isLoadingMore,c=d.hasMore||f.hasMore;let n;t[7]!==f||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),f.hasMore&&f.fetchNextPage()},t[7]=f,t[8]=d,t[9]=n):n=t[9];const a=n;let i;return t[10]!==c||t[11]!==b||t[12]!==g||t[13]!==p||t[14]!==a?(i={items:p,hasMore:c,isLoadingMore:g,isInitialLoading:b,loadMore:a},t[10]=c,t[11]=b,t[12]=g,t[13]=p,t[14]=a,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function fe(s){const e=R.c(37),{connection:t,onClick:u,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:m,className:d,fallbackIcon:f}=s,p=l===void 0?!1:l,b=u&&"hover:bg-muted/50";let g;e[0]!==d||e[1]!==b?(g=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",b,d),e[0]=d,e[1]=b,e[2]=g):g=e[2];let c;e[3]!==t.icon||e[4]!==t.title||e[5]!==f?(c=x.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=t.icon,e[4]=t.title,e[5]=f,e[6]=c):c=e[6];let n;e[7]!==o||e[8]!==p?(n=o&&x.jsx("div",{className:w("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:J,children:o}),e[7]=o,e[8]=p,e[9]=n):n=e[9];let a;e[10]!==n?(a=x.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=a):a=e[11];let i;e[12]!==c||e[13]!==a?(i=x.jsxs("div",{className:"flex items-start justify-between",children:[c,a]}),e[12]=c,e[13]=a,e[14]=i):i=e[14];let y;e[15]!==t.title?(y=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=y):y=e[16];const j=t.description||"No description";let h;e[17]!==j?(h=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=h):h=e[18];let v;e[19]!==h||e[20]!==y?(v=x.jsxs("div",{className:"flex flex-col gap-1",children:[y,h]}),e[19]=h,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==r?(C=r&&x.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let I;e[24]!==v||e[25]!==C||e[26]!==i?(I=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,v,C]}),e[24]=v,e[25]=C,e[26]=i,e[27]=I):I=e[27];let P;e[28]!==m?(P=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:B,children:m})}),e[28]=m,e[29]=P):P=e[29];let N;e[30]!==I||e[31]!==P?(N=x.jsxs("div",{className:"flex flex-col flex-1",children:[I,P]}),e[30]=I,e[31]=P,e[32]=N):N=e[32];let M;return e[33]!==u||e[34]!==N||e[35]!==g?(M=x.jsx(U,{className:g,onClick:u,children:N}),e[33]=u,e[34]=N,e[35]=g,e[36]=M):M=e[36],M}function B(s){return s.stopPropagation()}function J(s){return s.stopPropagation()}export{fe as C,ue as a,ae as g,ce as u};
1
+ import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,w as $,b0 as k,K as D,l as w,j as x}from"./index-B37Lpv5S.js";import{u as K}from"./use-registry-connections-sALt7ACC.js";import{b as Q}from"./use-organization-settings-Cw-0oyZX.js";import{S as E,e as F}from"./use-mcp-client-CX47WlCL.js";import{u as H}from"./useInfiniteQuery-V0rLmF2w.js";import{i as q,f as G}from"./extract-connection-data-D9jcQvie.js";import{C as U}from"./card-DWocPikY.js";import{I as V}from"./integration-icon-DtONHt_d.js";function ae(s){const e=new Map;for(const o of s){const l=_(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],u=new Set;for(const o of s){const l=_(o);if(u.has(l))continue;u.add(l);const r=e.get(l),m=r[0];r.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:l,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:r})}return t}function ce(){const s=R.c(6),e=K(),t=Q(),u=$().project.enabledPlugins??[];let o;if(s[0]!==u||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(X),u.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=u,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function X(s){return{id:s.id,title:s.title,icon:s.icon}}const Y=24,S=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim();if(e)return{operator:"or",conditions:[{field:["title"],operator:"contains",value:e},{field:["description"],operator:"contains",value:e},{field:["name"],operator:"contains",value:e},{field:["server","title"],operator:"contains",value:e}]}}function T(s,e,t,u,o){const l=s.map(c=>c.id).sort().join(","),r=z(o),{data:m,fetchNextPage:d,hasNextPage:f,isFetchingNextPage:p,isLoading:b}=H({queryKey:D.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:c})=>{const n=c??{};return await Promise.all(s.map(async i=>{const y=n[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=q(i.id,e);let h;for(let v=0;v<S;v++){let C=null;try{C=await F({connectionId:i.id,orgId:e,orgSlug:t});const I={limit:Y};y&&(I.cursor=y),r&&(I.where=r);const P=await C.callTool({name:j,arguments:I}),N=P.structuredContent??P,M=N.nextCursor||N.cursor||void 0,L=G(N?[N]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:L,nextCursor:M}}catch(I){h=I}finally{await C?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${S} attempts:`,h),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:c=>{const n={};let a=!1;for(const i of c)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,a=!0):n[i.registryId]="EXHAUSTED");return a?n:void 0},staleTime:3600*1e3,placeholderData:k,retry:!1,enabled:s.length>0}),g=[];if(m?.pages)for(const c of m.pages)for(const n of c)for(const a of n.items)g.push({...a,_sourceName:a._sourceName??n.registryTitle,_sourceIcon:a._sourceIcon??n.registryIcon,_registryId:a._registryId??n.registryId});return{items:g,hasMore:f??!1,isLoadingMore:p,isInitialLoading:b,fetchNextPage:()=>{f&&!p&&d()}}}function ue(s,e){const t=R.c(16),{org:u}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const m=r,d=T(l,u.id,u.slug,!0,e),f=T(m,u.id,u.slug,!0,e);let p;if(t[4]!==f.items||t[5]!==d.items){const y=new Set;p=[];const j=[...d.items,...f.items];for(const h of j){const v=`${h._registryId}:${h.id}`;y.has(v)||(y.add(v),p.push(h))}t[4]=f.items,t[5]=d.items,t[6]=p}else p=t[6];const b=d.isInitialLoading||f.isInitialLoading,g=d.isLoadingMore||f.isLoadingMore,c=d.hasMore||f.hasMore;let n;t[7]!==f||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),f.hasMore&&f.fetchNextPage()},t[7]=f,t[8]=d,t[9]=n):n=t[9];const a=n;let i;return t[10]!==c||t[11]!==b||t[12]!==g||t[13]!==p||t[14]!==a?(i={items:p,hasMore:c,isLoadingMore:g,isInitialLoading:b,loadMore:a},t[10]=c,t[11]=b,t[12]=g,t[13]=p,t[14]=a,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function fe(s){const e=R.c(37),{connection:t,onClick:u,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:m,className:d,fallbackIcon:f}=s,p=l===void 0?!1:l,b=u&&"hover:bg-muted/50";let g;e[0]!==d||e[1]!==b?(g=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",b,d),e[0]=d,e[1]=b,e[2]=g):g=e[2];let c;e[3]!==t.icon||e[4]!==t.title||e[5]!==f?(c=x.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=t.icon,e[4]=t.title,e[5]=f,e[6]=c):c=e[6];let n;e[7]!==o||e[8]!==p?(n=o&&x.jsx("div",{className:w("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:J,children:o}),e[7]=o,e[8]=p,e[9]=n):n=e[9];let a;e[10]!==n?(a=x.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=a):a=e[11];let i;e[12]!==c||e[13]!==a?(i=x.jsxs("div",{className:"flex items-start justify-between",children:[c,a]}),e[12]=c,e[13]=a,e[14]=i):i=e[14];let y;e[15]!==t.title?(y=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=y):y=e[16];const j=t.description||"No description";let h;e[17]!==j?(h=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=h):h=e[18];let v;e[19]!==h||e[20]!==y?(v=x.jsxs("div",{className:"flex flex-col gap-1",children:[y,h]}),e[19]=h,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==r?(C=r&&x.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let I;e[24]!==v||e[25]!==C||e[26]!==i?(I=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,v,C]}),e[24]=v,e[25]=C,e[26]=i,e[27]=I):I=e[27];let P;e[28]!==m?(P=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:B,children:m})}),e[28]=m,e[29]=P):P=e[29];let N;e[30]!==I||e[31]!==P?(N=x.jsxs("div",{className:"flex flex-col flex-1",children:[I,P]}),e[30]=I,e[31]=P,e[32]=N):N=e[32];let M;return e[33]!==u||e[34]!==N||e[35]!==g?(M=x.jsx(U,{className:g,onClick:u,children:N}),e[33]=u,e[34]=N,e[35]=g,e[36]=M):M=e[36],M}function B(s){return s.stopPropagation()}function J(s){return s.stopPropagation()}export{fe as C,ue as a,ae as g,ce as u};