decocms 4.235.0 → 4.235.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/client/assets/{AlertCircle-DhpRwzB9.js → AlertCircle-DGAAcGLZ.js} +1 -1
  2. package/dist/client/assets/{AreaChart-B5ojN-ie.js → AreaChart-ClmbQ9o8.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-jgVBnqT7.js → ArrowLeft-D0Hxwldu.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-k_8hNJuH.js → ArrowUp-Cwh2JKAG.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-BWbL1ENY.js → ArrowUpRight-yTwz4fJX.js} +1 -1
  6. package/dist/client/assets/{Check-PDGbmWh6.js → Check-DPU3qMnE.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CkJ93h3j.js → CheckCircle-CFuoxQ3V.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-g4EzcrUF.js → ChevronDown-CDxQXKQ3.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-LNBJ1bVx.js → ChevronRight-COngcxVg.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-Bqj2Nevd.js → ChevronUp-CtuzvfYH.js} +1 -1
  11. package/dist/client/assets/{Copy01-BrBG1mb-.js → Copy01-BHo0zxys.js} +1 -1
  12. package/dist/client/assets/{CpuChip01-BdR1TzCJ.js → CpuChip01-DNz1e-1j.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-DfLCyNya.js → CreditCard01-i5vjt-xs.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-DVwJIFyk.js → DotsVertical-1xoSHkTS.js} +1 -1
  15. package/dist/client/assets/{Eye-2Za14PvL.js → Eye-C8A5iNxC.js} +1 -1
  16. package/dist/client/assets/{FilterLines-Bao3t7wx.js → FilterLines-BrDQp9tC.js} +1 -1
  17. package/dist/client/assets/{Globe01-oLxgSWg9.js → Globe01-BS-FT6Ib.js} +1 -1
  18. package/dist/client/assets/{Globe04-Cfn05vj_.js → Globe04-DlYQuIAI.js} +1 -1
  19. package/dist/client/assets/{HardDrive-B7mKfgkk.js → HardDrive-C3sjYzJ6.js} +1 -1
  20. package/dist/client/assets/{Key01-CpvMyyf1.js → Key01-DHIIS9xh.js} +1 -1
  21. package/dist/client/assets/{LayoutLeft-CPbsS0H9.js → LayoutLeft-5wZy3XpT.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-WEAeStl5.js → LinkExternal01-CiybGNcX.js} +1 -1
  23. package/dist/client/assets/{LogOut01-B9nk2zV1.js → LogOut01-BlGxBhWt.js} +1 -1
  24. package/dist/client/assets/{Monitor01-dHf4o4Lm.js → Monitor01-D1nF-d8k.js} +1 -1
  25. package/dist/client/assets/{Palette-5luFUbkn.js → Palette-DFLAtyvP.js} +1 -1
  26. package/dist/client/assets/{Play-u8RKUOgE.js → Play-Bzk7NHAb.js} +1 -1
  27. package/dist/client/assets/{Plus-BXyI5W5V.js → Plus-6DwZVNck.js} +1 -1
  28. package/dist/client/assets/{SearchLg-C-HSASaD.js → SearchLg-BTDenRrr.js} +1 -1
  29. package/dist/client/assets/{SearchMd-D0w4Qck0.js → SearchMd-C0jQ-JtA.js} +1 -1
  30. package/dist/client/assets/{Settings02-BfvgzwsC.js → Settings02-CQ_YBSRl.js} +1 -1
  31. package/dist/client/assets/{Share07-AmafGmXq.js → Share07-DNvGaa3z.js} +1 -1
  32. package/dist/client/assets/{Shield01-Q9cD5PhS.js → Shield01-KFQwMbLw.js} +1 -1
  33. package/dist/client/assets/{Star01-HQ5zaxBt.js → Star01-Ch5vL_HW.js} +1 -1
  34. package/dist/client/assets/{Stars01-DPTd-IIJ.js → Stars01-BKbWDlg0.js} +1 -1
  35. package/dist/client/assets/{Stars02-BsV8lJrt.js → Stars02-CbmHZcdR.js} +1 -1
  36. package/dist/client/assets/{Sun-B9KCp7DY.js → Sun-BCmV-V0x.js} +1 -1
  37. package/dist/client/assets/{SwitchHorizontal01-CQ1ESORY.js → SwitchHorizontal01-BOUECs-i.js} +1 -1
  38. package/dist/client/assets/{Tool01-UIX8wv2D.js → Tool01-CCUCyiYP.js} +1 -1
  39. package/dist/client/assets/{Tool02-D1_-NCDI.js → Tool02-Oxl9VdAU.js} +1 -1
  40. package/dist/client/assets/{Trash01-CM1y68V4.js → Trash01-DILZ0JhX.js} +1 -1
  41. package/dist/client/assets/{TrendUp01-DCHfnHwK.js → TrendUp01-CEoUzwtG.js} +1 -1
  42. package/dist/client/assets/{Upload01-DMRrFtU2.js → Upload01-BLBKPEde.js} +1 -1
  43. package/dist/client/assets/{User01-B9SplPDx.js → User01-BaAZRdlX.js} +1 -1
  44. package/dist/client/assets/{Users01-BzBrg0ZX.js → Users01-CEPZZM2j.js} +1 -1
  45. package/dist/client/assets/{Users03-ClXJnKMN.js → Users03-Q6wyEfBv.js} +1 -1
  46. package/dist/client/assets/{X-QRTj5BrM.js → X-DK7Yc4rj.js} +1 -1
  47. package/dist/client/assets/{XCircle-DHrUxowR.js → XCircle-D0sQ0htd.js} +1 -1
  48. package/dist/client/assets/{XClose-B627c_Vw.js → XClose-B-pbjqWB.js} +1 -1
  49. package/dist/client/assets/{YAxis-D2jKoD7e.js → YAxis-D6L35ubX.js} +1 -1
  50. package/dist/client/assets/{Zap-DSqrbWsY.js → Zap-IbdA8s62.js} +1 -1
  51. package/dist/client/assets/{ZapSquare-CiZoSPa1.js → ZapSquare-MtMoEV-0.js} +1 -1
  52. package/dist/client/assets/{access-gate-CnpvAtvi.js → access-gate-mP3K4dtD.js} +1 -1
  53. package/dist/client/assets/{agent-icon-DkyeFSsr.js → agent-icon-DOQVKT6p.js} +1 -1
  54. package/dist/client/assets/{agents-list-CIvdSNE1.js → agents-list-DXkhW32K.js} +1 -1
  55. package/dist/client/assets/{ai-providers-oU33l0fi.js → ai-providers-CRPMDGfx.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-CbWOuX8R.js → alert-dialog-BYY9H9Nk.js} +1 -1
  57. package/dist/client/assets/{alert-CnQZKblO.js → alert-eVIvUB7b.js} +1 -1
  58. package/dist/client/assets/{api-keys-CwEdeP-F.js → api-keys-D8jFuqIr.js} +1 -1
  59. package/dist/client/assets/{app-editor-IISvFL2K.js → app-editor-D4GlPJPX.js} +1 -1
  60. package/dist/client/assets/{auth-BSnkvOr9.js → auth-CWeGXrYi.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-D2b6HTzL.js → auth-catchall-Cl3Hk5ob.js} +1 -1
  62. package/dist/client/assets/{auth-entry-AukggBM6.js → auth-entry-DI3EIfDq.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-4cU-YsVY.js → auth-split-layout-CQY87aqR.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-BEZ_C5HG.js → authenticate-and-persist-oauth-BD3Cnx1S.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-7HrVeNZG.js → automation-list-row-grG9E0cT.js} +1 -1
  66. package/dist/client/assets/{automation-runs-DxoBVAKN.js → automation-runs-B1gXrPtV.js} +1 -1
  67. package/dist/client/assets/{automations-B47QolDt.js → automations-BSXlKUZ7.js} +1 -1
  68. package/dist/client/assets/{avatar-P3_v_NAz.js → avatar-mUaEOQlV.js} +1 -1
  69. package/dist/client/assets/{badge-C1JzjZR_.js → badge-6exbNvpG.js} +1 -1
  70. package/dist/client/assets/{billing-CWhhqZ_Y.js → billing-WTKKxLnp.js} +1 -1
  71. package/dist/client/assets/{block-document-DrwN_9l7.js → block-document-yqo7RejX.js} +1 -1
  72. package/dist/client/assets/{brand-context-CvOIRyXz.js → brand-context-Ba8sbKQL.js} +1 -1
  73. package/dist/client/assets/{buckets-DOMiVucp.js → buckets-DPOoXayH.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-Dir5ualU.js → bulk-category-panel-B9nJsUUX.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-DN762eMk.js → capability-load-error-CUqgRtuP.js} +1 -1
  76. package/dist/client/assets/{card-p1m4joJM.js → card-kXnPozrB.js} +1 -1
  77. package/dist/client/assets/{cards-DBg4V9b2.js → cards-DxddXBLZ.js} +1 -1
  78. package/dist/client/assets/{category-editor-BikDoU2k.js → category-editor-CdKQGfVW.js} +1 -1
  79. package/dist/client/assets/{chart-B0IqnL8c.js → chart-Dgl2zwzl.js} +1 -1
  80. package/dist/client/assets/{chat-context-CRUy13w1.js → chat-context-C9k-78D3.js} +1 -1
  81. package/dist/client/assets/{checkbox-CchUxqgJ.js → checkbox-BilaxzMu.js} +1 -1
  82. package/dist/client/assets/{cli-auth-success-DQjLe6R2.js → cli-auth-success-BfomjFuK.js} +1 -1
  83. package/dist/client/assets/{collection-detail-CivLP1mz.js → collection-detail-DWpz0XT2.js} +1 -1
  84. package/dist/client/assets/{collection-display-button-IHdp-B_0.js → collection-display-button-Cau5fqAu.js} +1 -1
  85. package/dist/client/assets/{collection-search-Cl71gN_N.js → collection-search-BEpqplo7.js} +1 -1
  86. package/dist/client/assets/{collection-table-wrapper-a2DvIzca.js → collection-table-wrapper-C271Mcfk.js} +1 -1
  87. package/dist/client/assets/{collection-tabs-Cop7MY_6.js → collection-tabs-D1kLes9H.js} +1 -1
  88. package/dist/client/assets/{command-C4F2Utv8.js → command-DpOhUC3T.js} +1 -1
  89. package/dist/client/assets/{commerce-onboarding-DG_2ajnF.js → commerce-onboarding-Dc5WwRVq.js} +1 -1
  90. package/dist/client/assets/{connect-C28GSrix.js → connect-DD8XkESu.js} +1 -1
  91. package/dist/client/assets/{connection-Bx6eex29.js → connection-Rkt1p1Wf.js} +1 -1
  92. package/dist/client/assets/{connection-card-XId4-jpr.js → connection-card-BalSii-K.js} +1 -1
  93. package/dist/client/assets/{connection-detail-Ccia4nx9.js → connection-detail-DCyN7500.js} +1 -1
  94. package/dist/client/assets/{connection-form-helpers-D-hjRB-2.js → connection-form-helpers-pC83_Xtx.js} +1 -1
  95. package/dist/client/assets/{connections-k4E6tqXD.js → connections-D-KYh_Hx.js} +1 -1
  96. package/dist/client/assets/{decopilot-sse-pool-D7pbe6RU.js → decopilot-sse-pool-D5jZam0C.js} +1 -1
  97. package/dist/client/assets/{dialog-CIGzdMua.js → dialog-BzyNiq-4.js} +1 -1
  98. package/dist/client/assets/{domain-settings-B_WKuX5d.js → domain-settings-CXdA6FVv.js} +1 -1
  99. package/dist/client/assets/{drawer-BdIRcxnD.js → drawer-CqtHM-Oi.js} +1 -1
  100. package/dist/client/assets/{dropdown-menu-C6ogoVKR.js → dropdown-menu-BVIWxDOY.js} +1 -1
  101. package/dist/client/assets/{empty-state-BGGeFl0Z.js → empty-state-sxPwsEab.js} +1 -1
  102. package/dist/client/assets/{extract-connection-data-D4fmQsKZ.js → extract-connection-data-CT6fsBnt.js} +1 -1
  103. package/dist/client/assets/{file-explorer-D4nowlAn.js → file-explorer-Cui5Cmyb.js} +1 -1
  104. package/dist/client/assets/{file-type-icon-gwL2K8IC.js → file-type-icon-CP9GwE6U.js} +1 -1
  105. package/dist/client/assets/{form-DyoMgY6-.js → form-BH-w8XbU.js} +1 -1
  106. package/dist/client/assets/{general-Bd02t0wx.js → general-C4K9s46y.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-C68FkYjA.js → github-repo-picker-CaVDp-D-.js} +1 -1
  108. package/dist/client/assets/{hooks-BwSvLXx7.js → hooks-DniYwdWR.js} +1 -1
  109. package/dist/client/assets/{index-CT865qHQ.js → index-CFivSjFl.js} +1 -1
  110. package/dist/client/assets/{index-yLSGmj4T.js → index-CLnzejRk.js} +3 -3
  111. package/dist/client/assets/{index-C8BiJ7E3.js → index-D04qPrkM.js} +1 -1
  112. package/dist/client/assets/{index-BlstV6rA.js → index-D85YxWVt.js} +1 -1
  113. package/dist/client/assets/{index-CURzwHjl.js → index-DTG_Da9F.js} +1 -1
  114. package/dist/client/assets/{index-ChSTgWsl.js → index-Dat0Lg3u.js} +1 -1
  115. package/dist/client/assets/{index-CybpydvN.js → index-DkKUo6_9.js} +1 -1
  116. package/dist/client/assets/{index-MX-v2N7n.js → index-JSAYJGb3.js} +58 -58
  117. package/dist/client/assets/{index-DqSSr3Qv.js → index-LzFaRWy7.js} +1 -1
  118. package/dist/client/assets/{index-tgHkjyXk.js → index-MxGz5g6_.js} +1 -1
  119. package/dist/client/assets/{index-redirect-D_ViGQrD.js → index-redirect-DiNm6Bgr.js} +1 -1
  120. package/dist/client/assets/{infra-billing-BvRWRRxZ.js → infra-billing-DsCjx3XR.js} +1 -1
  121. package/dist/client/assets/{input-CIyJ4HN7.js → input-D7JdppQ6.js} +1 -1
  122. package/dist/client/assets/{integration-icon-DvJFOfr8.js → integration-icon-DA5NwAGO.js} +1 -1
  123. package/dist/client/assets/{invite-member-dialog-D5zopJqm.js → invite-member-dialog-BAWFLKWv.js} +1 -1
  124. package/dist/client/assets/{label-4Nq2Fh-z.js → label-CljJw0E9.js} +1 -1
  125. package/dist/client/assets/{layout-C__WxHXB.js → layout-CXLoTAJS.js} +1 -1
  126. package/dist/client/assets/{login-FhUyb9NB.js → login-DyaorMAV.js} +1 -1
  127. package/dist/client/assets/{mcp-oauth-CqM5PhIn.js → mcp-oauth-E_3ivFBH.js} +1 -1
  128. package/dist/client/assets/{members-DANjwLjo.js → members-CAUBDoLO.js} +1 -1
  129. package/dist/client/assets/{monaco-editor-tAwhDQSl.js → monaco-editor-BsqrLOSF.js} +1 -1
  130. package/dist/client/assets/{monitoring-stats-row-CjsEvjlw.js → monitoring-stats-row-C-UeXyKc.js} +1 -1
  131. package/dist/client/assets/{multi-select-7dpY6EuU.js → multi-select-DItKDdIU.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-DVUZwoBU.js → oauth-callback-A1Y5Z6kX.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-ai-provider-CWQf7_X9.js → oauth-callback-ai-provider-CYPr2yxh.js} +1 -1
  134. package/dist/client/assets/{onboarding-D76UKn1V.js → onboarding-GNmbyrIW.js} +1 -1
  135. package/dist/client/assets/{org-layout-CfqzQQGz.js → org-layout-fTKBVIa5.js} +1 -1
  136. package/dist/client/assets/{organization-choice-CE3dJ-wv.js → organization-choice-DR35zVz7.js} +1 -1
  137. package/dist/client/assets/{orgs-DETtrlb_.js → orgs-PNh0ZJ8y.js} +1 -1
  138. package/dist/client/assets/{page-seo-form-Z-LtRcTB.js → page-seo-form-DBAdfWJI.js} +1 -1
  139. package/dist/client/assets/{popover-By1YHGf3.js → popover-BGGAmqKx.js} +1 -1
  140. package/dist/client/assets/{post-editor-ksEzaq1h.js → post-editor-C0vrBYnI.js} +1 -1
  141. package/dist/client/assets/{primitives-X1lr8Oh6.js → primitives-BpmHZzbW.js} +1 -1
  142. package/dist/client/assets/{profile-hxqCEY9Q.js → profile-8YwZBxRE.js} +1 -1
  143. package/dist/client/assets/{project-app-view-T8E4Y_ci.js → project-app-view-B3W8Y-EJ.js} +1 -1
  144. package/dist/client/assets/record-editor-V0XLSvxL.js +1 -0
  145. package/dist/client/assets/{redirect-editor-BqcdBvsi.js → redirect-editor-BwodB4ap.js} +1 -1
  146. package/dist/client/assets/registry-BqPsswcq.js +2 -0
  147. package/dist/client/assets/{registry-layout-DNw3pFDb.js → registry-layout-m3-A9r74.js} +1 -1
  148. package/dist/client/assets/{reports-2XvYUKs9.js → reports-BJsp3U-R.js} +1 -1
  149. package/dist/client/assets/{require-capability-DdJ1k03e.js → require-capability-DIH5KDzH.js} +1 -1
  150. package/dist/client/assets/{required-auth-layout-CdBIJ3iu.js → required-auth-layout-D4CcVALs.js} +1 -1
  151. package/dist/client/assets/{reset-password-3AmEO8vU.js → reset-password-B6upfFU9.js} +1 -1
  152. package/dist/client/assets/{roles-xjHrNvFM.js → roles-steAnBs6.js} +1 -1
  153. package/dist/client/assets/{search-input-BH_nXaUM.js → search-input-DeZeR9zl.js} +1 -1
  154. package/dist/client/assets/{secrets-DfSsS1f1.js → secrets-C61J86iL.js} +1 -1
  155. package/dist/client/assets/{sections-editor-CoJxpDrg.js → sections-editor-DgbTUFWu.js} +2 -2
  156. package/dist/client/assets/{select-DHFcz3Sq.js → select-BvRNmkq9.js} +1 -1
  157. package/dist/client/assets/{select-model-DF9gN0Rp.js → select-model-BF3HOG7S.js} +1 -1
  158. package/dist/client/assets/{self-tool-result-DMfy5_-d.js → self-tool-result-Ds25KE80.js} +1 -1
  159. package/dist/client/assets/{seo-editor-WfZNNdI4.js → seo-editor-jwNMLnES.js} +1 -1
  160. package/dist/client/assets/{settings-layout-Mkdt-j5C.js → settings-layout-C3w2ZIsm.js} +1 -1
  161. package/dist/client/assets/{settings-section-CACVOiOT.js → settings-section-nLz7CoIo.js} +1 -1
  162. package/dist/client/assets/{shell-controls-DI6mduOL.js → shell-controls-D9HbHtOA.js} +1 -1
  163. package/dist/client/assets/{shell-layout-LpGLVty1.js → shell-layout-CNyirzt4.js} +1 -1
  164. package/dist/client/assets/{sidebar-B6N4L01u.js → sidebar-DQMWJt8C.js} +1 -1
  165. package/dist/client/assets/{skeleton-Ckv-naLE.js → skeleton-DlzNnWnq.js} +1 -1
  166. package/dist/client/assets/{spinner-BUjc9l5O.js → spinner-mlLl2Yhb.js} +1 -1
  167. package/dist/client/assets/{sso-BpXPikXs.js → sso-CKyexu0f.js} +1 -1
  168. package/dist/client/assets/{store-a3HnIYA8.js → store-CMa3ZvnT.js} +1 -1
  169. package/dist/client/assets/store-registry-CxQgbT3d.js +2 -0
  170. package/dist/client/assets/{studio-tools-CddBHJsY.js → studio-tools-DYunNTVT.js} +1 -1
  171. package/dist/client/assets/{switch-D90h4UrV.js → switch-DllmwtAE.js} +1 -1
  172. package/dist/client/assets/{synced-repos-DdB2pmjC.js → synced-repos-Bcbbm1JD.js} +1 -1
  173. package/dist/client/assets/{tab-id-BQb38pkN.js → tab-id-VKwsOjyO.js} +1 -1
  174. package/dist/client/assets/{table-C4tfl8m7.js → table-DYC_dE7J.js} +1 -1
  175. package/dist/client/assets/{tabs-CJVJjlim.js → tabs-BwSFBg23.js} +1 -1
  176. package/dist/client/assets/{textarea-C9GZg-bi.js → textarea-Dx0EhN5R.js} +1 -1
  177. package/dist/client/assets/{toggle-group-u0hcQltI.js → toggle-group-BJ2MX2jZ.js} +1 -1
  178. package/dist/client/assets/{toolbar-DwtY6dmy.js → toolbar-Da6kAU33.js} +1 -1
  179. package/dist/client/assets/{tooltip-BF5M3Sw2.js → tooltip-_nC8eSks.js} +1 -1
  180. package/dist/client/assets/{track-HO2G2wp9.js → track-CCIlLGGM.js} +1 -1
  181. package/dist/client/assets/{types-CbCLAyu9.js → types-Dx38yOmJ.js} +1 -1
  182. package/dist/client/assets/{use-ai-providers-CuHLenRK.js → use-ai-providers-YBBO0lHq.js} +1 -1
  183. package/dist/client/assets/{use-api-keys-C2n2ey0Q.js → use-api-keys-DAJj6mw9.js} +1 -1
  184. package/dist/client/assets/{use-automations-CU74oY-F.js → use-automations-BRQXFojl.js} +1 -1
  185. package/dist/client/assets/{use-autosave-hszmfI4Q.js → use-autosave-Di1dZfEk.js} +1 -1
  186. package/dist/client/assets/{use-capability-Bb6HCxyG.js → use-capability-BIM5TzeC.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-BNEO1MWa.js → use-clock-tick-D_l68xHi.js} +1 -1
  188. package/dist/client/assets/{use-commerce-diagnostic-BzP-Z_tk.js → use-commerce-diagnostic-cxqhjUEk.js} +1 -1
  189. package/dist/client/assets/{use-connection-Dn--uyQL.js → use-connection-D79Ko2YW.js} +1 -1
  190. package/dist/client/assets/{use-copy-DMIWbs_j.js → use-copy-j1yYhEBA.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-qDCG_d03.js → use-create-virtual-mcp-DCfCSi3P.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-B1e8NX0d.js → use-debounced-autosave-CFZAq7wH.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-Bp6jpgAg.js → use-debounced-value-4fW4NxvN.js} +1 -1
  194. package/dist/client/assets/{use-decopilot-events-BA2h4RqG.js → use-decopilot-events-C3ZHhi9x.js} +1 -1
  195. package/dist/client/assets/{use-delete-connection-BTOnBH9h.js → use-delete-connection-XWft_Ur5.js} +1 -1
  196. package/dist/client/assets/{use-deployment-admin-B0EXtv3H.js → use-deployment-admin-BMMCVB4Y.js} +1 -1
  197. package/dist/client/assets/{use-file-configs-98b8RF9Q.js → use-file-configs-bt-ZQ0pB.js} +1 -1
  198. package/dist/client/assets/{use-infinite-scroll-98l94dUz.js → use-infinite-scroll-CO4D7meb.js} +1 -1
  199. package/dist/client/assets/{use-infra-billing-ilZ0woTn.js → use-infra-billing-BaqYyWao.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-uqrl8ORv.js → use-join-requests-YLBKq4g1.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-h32VLkS1.js → use-mcp-client-CNT1Qud6.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-CCVvEjIG.js → use-mcp-tools-CsCG-27L.js} +1 -1
  203. package/dist/client/assets/{use-members-COoeaIvM.js → use-members-BTRTarql.js} +1 -1
  204. package/dist/client/assets/{use-mobile-VqZ3x1Sb.js → use-mobile-Bsue7ajb.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-BlvVaM8C.js → use-navigate-to-agent-DmiU71lN.js} +1 -1
  206. package/dist/client/assets/{use-open-billing-url-20iJ00Ex.js → use-open-billing-url-BZuQOGMs.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-B8PvaTui.js → use-org-auth-client-CmcL4tH_.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-nCIucebw.js → use-org-sso-0Pu1hp_v.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-OPv0k4P9.js → use-organization-roles-BZk652Tb.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-CzXI6T7w.js → use-organization-settings-BeFMfzSB.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-B6lkSEPQ.js → use-registry-connections-CE8CfvMT.js} +1 -1
  212. package/dist/client/assets/{use-secrets-DWy415cX.js → use-secrets-YLY3B942.js} +1 -1
  213. package/dist/client/assets/{use-section-preview-base-rp31gOdp.js → use-section-preview-base-i6gDSKks.js} +1 -1
  214. package/dist/client/assets/{use-status-sounds-BOdvrcda.js → use-status-sounds-BzFASdFs.js} +1 -1
  215. package/dist/client/assets/{use-tags-OGm2htvT.js → use-tags-CHYjh64q.js} +1 -1
  216. package/dist/client/assets/{use-view-mode-CUmhZVK4.js → use-view-mode-DplbIfum.js} +1 -1
  217. package/dist/client/assets/{use-virtual-mcp-DvoAIhmm.js → use-virtual-mcp-CdqFXUnV.js} +1 -1
  218. package/dist/client/assets/useInfiniteQuery-CJbTyn50.js +1 -0
  219. package/dist/client/assets/{useRouterState-CZy-Bj98.js → useRouterState-NGSniuYR.js} +1 -1
  220. package/dist/client/assets/useSuspenseInfiniteQuery-CpGvxdoQ.js +1 -0
  221. package/dist/client/assets/{users-Bm9-U9sy.js → users-DnH35Xcv.js} +1 -1
  222. package/dist/client/assets/{variant-calendar-C7XBwEkj.js → variant-calendar-D8gETCc-.js} +1 -1
  223. package/dist/client/assets/{view-mode-toggle-BGXsxqVL.js → view-mode-toggle-50DXH6Qp.js} +1 -1
  224. package/dist/client/index.html +1 -1
  225. package/dist/server/cli.js +532 -532
  226. package/dist/server/migrate-dbos.js +2 -2
  227. package/dist/server/migrate.js +55 -55
  228. package/dist/server/server.js +323 -323
  229. package/package.json +1 -1
  230. package/dist/client/assets/record-editor-VbBiDztU.js +0 -1
  231. package/dist/client/assets/registry-B7GTrmpz.js +0 -2
  232. package/dist/client/assets/store-registry-Ce3OY7Mq.js +0 -2
  233. package/dist/client/assets/useInfiniteQuery-STmushV7.js +0 -1
  234. package/dist/client/assets/useSuspenseInfiniteQuery-CsXaFXTJ.js +0 -1
@@ -1 +1 @@
1
- import{c as k,j as t,B as K,k as oe,X as Ye,Z as re,b as Q,E as Ee,r as E,F as fe,be as Ze,bf as Oe,$ as Ge,m as W,bg as et,u as tt,L as te,t as st,f as he,b5 as Re}from"./index-yLSGmj4T.js";import{E as Fe}from"./empty-state-BGGeFl0Z.js";import{u as ge}from"./use-mcp-client-h32VLkS1.js";import{d as ae,F as lt,a as ce,b as de}from"./form-DyoMgY6-.js";import{I as pe}from"./input-CIyJ4HN7.js";import{T as xe}from"./textarea-C9GZg-bi.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-CybpydvN.js";import{aN as at,S as ct,aO as dt,aj as mt,al as ut,aP as pt,s as ye}from"./agent-icon-DkyeFSsr.js";import{g as xt,M as ft,a as we}from"./types-CbCLAyu9.js";import{A as ht,a as gt,b as jt}from"./alert-CnQZKblO.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-DHFcz3Sq.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-BF5M3Sw2.js";import{i as Nt}from"./AlertCircle-DhpRwzB9.js";import{s as vt}from"./Stars02-BsV8lJrt.js";import{a as St}from"./Copy01-BrBG1mb-.js";import{i as yt}from"./Play-u8RKUOgE.js";import{i as wt}from"./ChevronRight-LNBJ1bVx.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./index-C8BiJ7E3.js";import{a as ze,u as Me}from"./use-connection-Dn--uyQL.js";import{a as Tt}from"./use-mcp-tools-CCVvEjIG.js";import{M as Pt,c as kt}from"./monaco-editor-tAwhDQSl.js";import{I as De}from"./integration-icon-DvJFOfr8.js";import{k as At,D as Dt}from"./chat-context-CRUy13w1.js";import{u as Et}from"./shell-layout-LpGLVty1.js";import{n as Ot}from"./Tool02-D1_-NCDI.js";import"./auth-BSnkvOr9.js";import"./label-4Nq2Fh-z.js";import"./index-tgHkjyXk.js";import"./sidebar-B6N4L01u.js";import"./LayoutLeft-CPbsS0H9.js";import"./use-mobile-VqZ3x1Sb.js";import"./X-QRTj5BrM.js";import"./Key01-CpvMyyf1.js";import"./extract-connection-data-D4fmQsKZ.js";import"./metadata-dUsYcpuu.js";import"./use-registry-connections-B6lkSEPQ.js";import"./use-organization-settings-CzXI6T7w.js";import"./studio-tools-CddBHJsY.js";import"./Plus-BXyI5W5V.js";import"./index-BlstV6rA.js";import"./index-DqSSr3Qv.js";import"./popover-By1YHGf3.js";import"./use-virtual-mcp-DvoAIhmm.js";import"./Check-PDGbmWh6.js";import"./SearchMd-D0w4Qck0.js";import"./Users03-ClXJnKMN.js";import"./use-create-virtual-mcp-qDCG_d03.js";import"./use-navigate-to-agent-BlvVaM8C.js";import"./hooks-BwSvLXx7.js";import"./decopilot-sse-pool-D7pbe6RU.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-UIX8wv2D.js";import"./ArrowUp-k_8hNJuH.js";import"./ArrowLeft-jgVBnqT7.js";import"./XCircle-DHrUxowR.js";import"./ArrowUpRight-BWbL1ENY.js";import"./TrendUp01-DCHfnHwK.js";import"./ZapSquare-CiZoSPa1.js";import"./CheckCircle-CkJ93h3j.js";import"./ChevronDown-g4EzcrUF.js";import"./ChevronUp-Bqj2Nevd.js";import"./DotsVertical-DVwJIFyk.js";import"./CpuChip01-BdR1TzCJ.js";import"./CreditCard01-DfLCyNya.js";import"./Globe01-oLxgSWg9.js";import"./Settings02-BfvgzwsC.js";import"./Eye-2Za14PvL.js";import"./FilterLines-Bao3t7wx.js";import"./Share07-AmafGmXq.js";import"./Star01-HQ5zaxBt.js";import"./Globe04-Cfn05vj_.js";import"./SwitchHorizontal01-CQ1ESORY.js";import"./HardDrive-B7mKfgkk.js";import"./LinkExternal01-WEAeStl5.js";import"./LogOut01-B9nk2zV1.js";import"./Monitor01-dHf4o4Lm.js";import"./Sun-B9KCp7DY.js";import"./Palette-5luFUbkn.js";import"./SearchLg-C-HSASaD.js";import"./Shield01-Q9cD5PhS.js";import"./Stars01-DPTd-IIJ.js";import"./Trash01-CM1y68V4.js";import"./Upload01-DMRrFtU2.js";import"./User01-B9SplPDx.js";import"./Users01-BzBrg0ZX.js";import"./XClose-B627c_Vw.js";import"./Zap-DSqrbWsY.js";import"./badge-C1JzjZR_.js";import"./mcp-oauth-CqM5PhIn.js";import"./spinner-BUjc9l5O.js";import"./tab-id-BQb38pkN.js";import"./dialog-CIGzdMua.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-CuHLenRK.js";import"./use-decopilot-events-BA2h4RqG.js";import"./avatar-P3_v_NAz.js";import"./required-auth-layout-CdBIJ3iu.js";import"./use-org-sso-nCIucebw.js";function Rt(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ye({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=k.c(43),{form:n}=s,l=Q();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),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"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=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:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=Q(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ze(n,"PROMPT",l,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ge(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let R;return e[19]!==C||e[20]!==I?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=R):R=e[21],R}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.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:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Rt,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let O;return e[38]!==A||e[39]!==D||e[40]!==w?(O=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=O):O=e[41],O}function Lt(s){const e=k.c(10),{itemId:n}=s,l=Q();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Y(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=W("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=W("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=Q();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=Q(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),O=ze(e),C=At(),I=Dt(),{openSidePanel:R}=Et(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:z}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(R("chat"),C.sendMessage({tiptapDoc:j}))},[M,L]=E.useState("json"),[q,X]=E.useState(!1);F&&!q&&(L("ui"),X(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],Z=be.length>0,G={};if(Z&&v?.inputSchema?.properties)for(const u of be)G[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!z)throw new Error("MCP client is not available");const j=Z?{...G,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await z.callTool({name:s,arguments:j}),ee=$.structuredContent??$,We=performance.now(),Qe=Math.round(We-u);f(ee),g($),S(j);const Xe=JSON.stringify(ee),ve=new TextEncoder().encode(Xe).length;A({duration:`${Qe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=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:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>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:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):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:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=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:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&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(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{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(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&M==="ui"&&z?t.jsx(E.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:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{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)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{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(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,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(De,{icon:O?.icon||null,name:O?.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:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.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:o("details.tool.instance")}),Ne]}),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:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=Q(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!ze(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=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:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=W("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:W(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=Me(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Wt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=k.c(52),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=Q(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=Me(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Oe(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Wt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let C;s[16]!==a.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let R;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(R=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Y,{children:t.jsx(Ue,{children:O})}),s[24]=O,s[25]=U):U=s[25];let z;s[26]!==R||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,R,U]})}),s[26]=R,s[27]=U,s[28]=C,s[29]=z):z=s[29];const V=z;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let M;s[40]!==o?(M=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=M):M=s[41];let L;s[42]!==d||s[43]!==M?(L={onClick:d,children:M},s[42]=d,s[43]=M,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let X;return s[49]!==V||s[50]!==q?(X=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=X):X=s[51],X}function Xt(){const s=k.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 n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function Jl(){const s=k.c(7),e=Q();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{Jl as default};
1
+ import{c as k,j as t,B as K,k as oe,X as Ye,Z as re,b as Q,E as Ee,r as E,F as fe,be as Ze,bf as Oe,$ as Ge,m as W,bg as et,u as tt,L as te,t as st,f as he,b5 as Re}from"./index-CLnzejRk.js";import{E as Fe}from"./empty-state-sxPwsEab.js";import{u as ge}from"./use-mcp-client-CNT1Qud6.js";import{d as ae,F as lt,a as ce,b as de}from"./form-BH-w8XbU.js";import{I as pe}from"./input-D7JdppQ6.js";import{T as xe}from"./textarea-Dx0EhN5R.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-DkKUo6_9.js";import{aN as at,S as ct,aO as dt,aj as mt,al as ut,aP as pt,s as ye}from"./agent-icon-DOQVKT6p.js";import{g as xt,M as ft,a as we}from"./types-Dx38yOmJ.js";import{A as ht,a as gt,b as jt}from"./alert-eVIvUB7b.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-BvRNmkq9.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-_nC8eSks.js";import{i as Nt}from"./AlertCircle-DGAAcGLZ.js";import{s as vt}from"./Stars02-CbmHZcdR.js";import{a as St}from"./Copy01-BHo0zxys.js";import{i as yt}from"./Play-Bzk7NHAb.js";import{i as wt}from"./ChevronRight-COngcxVg.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./index-D04qPrkM.js";import{a as ze,u as Me}from"./use-connection-D79Ko2YW.js";import{a as Tt}from"./use-mcp-tools-CsCG-27L.js";import{M as Pt,c as kt}from"./monaco-editor-BsqrLOSF.js";import{I as De}from"./integration-icon-DA5NwAGO.js";import{k as At,D as Dt}from"./chat-context-C9k-78D3.js";import{u as Et}from"./shell-layout-CNyirzt4.js";import{n as Ot}from"./Tool02-Oxl9VdAU.js";import"./auth-CWeGXrYi.js";import"./label-CljJw0E9.js";import"./index-MxGz5g6_.js";import"./sidebar-DQMWJt8C.js";import"./LayoutLeft-5wZy3XpT.js";import"./use-mobile-Bsue7ajb.js";import"./X-DK7Yc4rj.js";import"./Key01-DHIIS9xh.js";import"./extract-connection-data-CT6fsBnt.js";import"./metadata-dUsYcpuu.js";import"./use-registry-connections-CE8CfvMT.js";import"./use-organization-settings-BeFMfzSB.js";import"./studio-tools-DYunNTVT.js";import"./Plus-6DwZVNck.js";import"./index-D85YxWVt.js";import"./index-LzFaRWy7.js";import"./popover-BGGAmqKx.js";import"./use-virtual-mcp-CdqFXUnV.js";import"./Check-DPU3qMnE.js";import"./SearchMd-C0jQ-JtA.js";import"./Users03-Q6wyEfBv.js";import"./use-create-virtual-mcp-DCfCSi3P.js";import"./use-navigate-to-agent-DmiU71lN.js";import"./hooks-DniYwdWR.js";import"./decopilot-sse-pool-D5jZam0C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-CCUCyiYP.js";import"./ArrowUp-Cwh2JKAG.js";import"./ArrowLeft-D0Hxwldu.js";import"./XCircle-D0sQ0htd.js";import"./ArrowUpRight-yTwz4fJX.js";import"./TrendUp01-CEoUzwtG.js";import"./ZapSquare-MtMoEV-0.js";import"./CheckCircle-CFuoxQ3V.js";import"./ChevronDown-CDxQXKQ3.js";import"./ChevronUp-CtuzvfYH.js";import"./DotsVertical-1xoSHkTS.js";import"./CpuChip01-DNz1e-1j.js";import"./CreditCard01-i5vjt-xs.js";import"./Globe01-BS-FT6Ib.js";import"./Settings02-CQ_YBSRl.js";import"./Eye-C8A5iNxC.js";import"./FilterLines-BrDQp9tC.js";import"./Share07-DNvGaa3z.js";import"./Star01-Ch5vL_HW.js";import"./Globe04-DlYQuIAI.js";import"./SwitchHorizontal01-BOUECs-i.js";import"./HardDrive-C3sjYzJ6.js";import"./LinkExternal01-CiybGNcX.js";import"./LogOut01-BlGxBhWt.js";import"./Monitor01-D1nF-d8k.js";import"./Sun-BCmV-V0x.js";import"./Palette-DFLAtyvP.js";import"./SearchLg-BTDenRrr.js";import"./Shield01-KFQwMbLw.js";import"./Stars01-BKbWDlg0.js";import"./Trash01-DILZ0JhX.js";import"./Upload01-BLBKPEde.js";import"./User01-BaAZRdlX.js";import"./Users01-CEPZZM2j.js";import"./XClose-B-pbjqWB.js";import"./Zap-IbdA8s62.js";import"./badge-6exbNvpG.js";import"./mcp-oauth-E_3ivFBH.js";import"./spinner-mlLl2Yhb.js";import"./tab-id-VKwsOjyO.js";import"./dialog-BzyNiq-4.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-YBBO0lHq.js";import"./use-decopilot-events-C3ZHhi9x.js";import"./avatar-mUaEOQlV.js";import"./required-auth-layout-D4CcVALs.js";import"./use-org-sso-0Pu1hp_v.js";function Rt(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ye({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=k.c(43),{form:n}=s,l=Q();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),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"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=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:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=Q(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ze(n,"PROMPT",l,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ge(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let R;return e[19]!==C||e[20]!==I?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=R):R=e[21],R}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.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:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Rt,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let O;return e[38]!==A||e[39]!==D||e[40]!==w?(O=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=O):O=e[41],O}function Lt(s){const e=k.c(10),{itemId:n}=s,l=Q();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Y(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=W("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=W("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=Q();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=Q(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),O=ze(e),C=At(),I=Dt(),{openSidePanel:R}=Et(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:z}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(R("chat"),C.sendMessage({tiptapDoc:j}))},[M,L]=E.useState("json"),[q,X]=E.useState(!1);F&&!q&&(L("ui"),X(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],Z=be.length>0,G={};if(Z&&v?.inputSchema?.properties)for(const u of be)G[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!z)throw new Error("MCP client is not available");const j=Z?{...G,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await z.callTool({name:s,arguments:j}),ee=$.structuredContent??$,We=performance.now(),Qe=Math.round(We-u);f(ee),g($),S(j);const Xe=JSON.stringify(ee),ve=new TextEncoder().encode(Xe).length;A({duration:`${Qe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=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:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>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:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):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:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=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:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&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(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{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(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&M==="ui"&&z?t.jsx(E.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:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{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)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{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(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,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(De,{icon:O?.icon||null,name:O?.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:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.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:o("details.tool.instance")}),Ne]}),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:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=Q(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!ze(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=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:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=W("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:W(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=Me(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Wt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=k.c(52),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=Q(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=Me(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Oe(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Wt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let C;s[16]!==a.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let R;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(R=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Y,{children:t.jsx(Ue,{children:O})}),s[24]=O,s[25]=U):U=s[25];let z;s[26]!==R||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,R,U]})}),s[26]=R,s[27]=U,s[28]=C,s[29]=z):z=s[29];const V=z;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let M;s[40]!==o?(M=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=M):M=s[41];let L;s[42]!==d||s[43]!==M?(L={onClick:d,children:M},s[42]=d,s[43]=M,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let X;return s[49]!==V||s[50]!==q?(X=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=X):X=s[51],X}function Xt(){const s=k.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 n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function Jl(){const s=k.c(7),e=Q();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{Jl as default};
@@ -1 +1 @@
1
- import{c as $,b as A,j as s,m as z,B as E}from"./index-yLSGmj4T.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-C6ogoVKR.js";import{i as R,n as _}from"./ArrowUp-k_8hNJuH.js";import{i as V}from"./Check-PDGbmWh6.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-CQ1ESORY.js";import{T as W,a as q,b as G,c as H}from"./tooltip-BF5M3Sw2.js";import{V as J}from"./view-mode-toggle-BGXsxqVL.js";import{B as Q}from"./badge-C1JzjZR_.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&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:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(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 l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&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 X(t){return t.value!=="ALL"}export{oe as C};
1
+ import{c as $,b as A,j as s,m as z,B as E}from"./index-CLnzejRk.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-BVIWxDOY.js";import{i as R,n as _}from"./ArrowUp-Cwh2JKAG.js";import{i as V}from"./Check-DPU3qMnE.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-BOUECs-i.js";import{T as W,a as q,b as G,c as H}from"./tooltip-_nC8eSks.js";import{V as J}from"./view-mode-toggle-50DXH6Qp.js";import{B as Q}from"./badge-6exbNvpG.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&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:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(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 l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&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 X(t){return t.value!=="ALL"}export{oe as C};
@@ -1 +1 @@
1
- import{c as k,m as b,j as n,k as v}from"./index-yLSGmj4T.js";import{i as w}from"./SearchMd-D0w4Qck0.js";function S(j){const e=k.c(21),{value:m,onChange:d,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?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,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]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
1
+ import{c as k,m as b,j as n,k as v}from"./index-CLnzejRk.js";import{i as w}from"./SearchMd-C0jQ-JtA.js";function S(j){const e=k.c(21),{value:m,onChange:d,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?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,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]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
@@ -1 +1 @@
1
- import{c as k,j as r,m as C,b as S}from"./index-yLSGmj4T.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-C4tfl8m7.js";import{i as D,n as E}from"./ArrowUp-k_8hNJuH.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
1
+ import{c as k,j as r,m as C,b as S}from"./index-CLnzejRk.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-DYC_dE7J.js";import{i as D,n as E}from"./ArrowUp-Cwh2JKAG.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
@@ -1 +1 @@
1
- import{c as f,m as u,j as m}from"./index-yLSGmj4T.js";import{B as g}from"./badge-C1JzjZR_.js";function h(x){const e=f.c(12),{tabs:l,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]!==l){let c;e[6]!==n||e[7]!==s?(c=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]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,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,m as u,j as m}from"./index-CLnzejRk.js";import{B as g}from"./badge-6exbNvpG.js";function h(x){const e=f.c(12),{tabs:l,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]!==l){let c;e[6]!==n||e[7]!==s?(c=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]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,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,m as i,j as n}from"./index-yLSGmj4T.js";import{_ as m}from"./index-DqSSr3Qv.js";import{e as N,b as j,h as b,a as w,d as y}from"./dialog-CIGzdMua.js";import{i as C}from"./SearchMd-D0w4Qck0.js";function $(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 z(a){const e=d.c(26);let t,s,o,l,r,h;e[0]!==a?({title:r,description:h,children:t,className:s,filter:o,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r,e[6]=h):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5],h=e[6]);const v=r===void 0?"Command Palette":r,k=h===void 0?"Search for a command to run...":h;let c;e[7]!==v?(c=n.jsx(j,{children:v}),e[7]=v,e[8]=c):c=e[8];let p;e[9]!==k?(p=n.jsx(b,{children:k}),e[9]=k,e[10]=p):p=e[10];let u;e[11]!==c||e[12]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[11]=c,e[12]=p,e[13]=u):u=e[13];let f;e[14]!==s?(f=i("overflow-hidden p-0",s),e[14]=s,e[15]=f):f=e[15];let x;e[16]!==t||e[17]!==o?(x=n.jsx($,{filter:o,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[16]=t,e[17]=o,e[18]=x):x=e[18];let g;e[19]!==f||e[20]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[19]=f,e[20]=x,e[21]=g):g=e[21];let _;return e[22]!==l||e[23]!==u||e[24]!==g?(_=n.jsxs(N,{...l,children:[u,g]}),e[22]=l,e[23]=u,e[24]=g,e[25]=_):_=e[25],_}function G(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(C,{className:"size-4 shrink-0 text-muted-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 L(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 R(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:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}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("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 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("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 P(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{G as C,R as a,P as b,B as c,L as d,$ as e,z as f,H as g};
1
+ import{c as d,m as i,j as n}from"./index-CLnzejRk.js";import{_ as m}from"./index-LzFaRWy7.js";import{e as N,b as j,h as b,a as w,d as y}from"./dialog-BzyNiq-4.js";import{i as C}from"./SearchMd-C0jQ-JtA.js";function $(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 z(a){const e=d.c(26);let t,s,o,l,r,h;e[0]!==a?({title:r,description:h,children:t,className:s,filter:o,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r,e[6]=h):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5],h=e[6]);const v=r===void 0?"Command Palette":r,k=h===void 0?"Search for a command to run...":h;let c;e[7]!==v?(c=n.jsx(j,{children:v}),e[7]=v,e[8]=c):c=e[8];let p;e[9]!==k?(p=n.jsx(b,{children:k}),e[9]=k,e[10]=p):p=e[10];let u;e[11]!==c||e[12]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[11]=c,e[12]=p,e[13]=u):u=e[13];let f;e[14]!==s?(f=i("overflow-hidden p-0",s),e[14]=s,e[15]=f):f=e[15];let x;e[16]!==t||e[17]!==o?(x=n.jsx($,{filter:o,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[16]=t,e[17]=o,e[18]=x):x=e[18];let g;e[19]!==f||e[20]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[19]=f,e[20]=x,e[21]=g):g=e[21];let _;return e[22]!==l||e[23]!==u||e[24]!==g?(_=n.jsxs(N,{...l,children:[u,g]}),e[22]=l,e[23]=u,e[24]=g,e[25]=_):_=e[25],_}function G(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(C,{className:"size-4 shrink-0 text-muted-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 L(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 R(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:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}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("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 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("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 P(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{G as C,R as a,P as b,B as c,L as d,$ as e,z as f,H as g};
@@ -1 +1 @@
1
- import{c as N,b as Q,j as o,m as Te,p as ue,B as Ne,u as Xe,r as Y,a as Ae,q as st,d as nt,s as lt,e as Ze,v as Ee,w as Se,Q as at,E as ct,K as He,x as Be,N as mt}from"./index-yLSGmj4T.js";import{L as dt,s as Me,S as We,C as qe,i as ut,n as ze,a as et,p as Le}from"./self-tool-result-DMfy5_-d.js";import{A as gt}from"./auth-entry-AukggBM6.js";import{A as ft}from"./auth-split-layout-4cU-YsVY.js";import{O as Ve}from"./organization-choice-CE3dJ-wv.js";import{r as pt}from"./track-HO2G2wp9.js";import{I as ht}from"./input-CIyJ4HN7.js";import{D as bt,a as Ke,b as xt,c as yt}from"./dropdown-menu-C6ogoVKR.js";import{S as Ct,u as jt,W as Ot,g as vt,a as St}from"./use-mcp-client-h32VLkS1.js";import{i as _t}from"./XCircle-DHrUxowR.js";import{i as wt}from"./ArrowUpRight-BWbL1ENY.js";import"./alert-dialog-CbWOuX8R.js";import"./form-DyoMgY6-.js";import"./label-4Nq2Fh-z.js";import"./spinner-BUjc9l5O.js";import"./integration-icon-DvJFOfr8.js";import"./Tool02-D1_-NCDI.js";import"./agent-icon-DkyeFSsr.js";import"./AlertCircle-DhpRwzB9.js";import"./Tool01-UIX8wv2D.js";import"./ArrowUp-k_8hNJuH.js";import"./ArrowLeft-jgVBnqT7.js";import"./TrendUp01-DCHfnHwK.js";import"./ZapSquare-CiZoSPa1.js";import"./Users03-ClXJnKMN.js";import"./CheckCircle-CkJ93h3j.js";import"./Check-PDGbmWh6.js";import"./ChevronDown-g4EzcrUF.js";import"./ChevronRight-LNBJ1bVx.js";import"./ChevronUp-Bqj2Nevd.js";import"./DotsVertical-DVwJIFyk.js";import"./Stars02-BsV8lJrt.js";import"./Copy01-BrBG1mb-.js";import"./CpuChip01-BdR1TzCJ.js";import"./CreditCard01-DfLCyNya.js";import"./Globe01-oLxgSWg9.js";import"./Settings02-BfvgzwsC.js";import"./Eye-2Za14PvL.js";import"./FilterLines-Bao3t7wx.js";import"./Share07-AmafGmXq.js";import"./Star01-HQ5zaxBt.js";import"./Globe04-Cfn05vj_.js";import"./SwitchHorizontal01-CQ1ESORY.js";import"./HardDrive-B7mKfgkk.js";import"./Key01-CpvMyyf1.js";import"./LayoutLeft-CPbsS0H9.js";import"./LinkExternal01-WEAeStl5.js";import"./LogOut01-B9nk2zV1.js";import"./Monitor01-dHf4o4Lm.js";import"./Sun-B9KCp7DY.js";import"./Palette-5luFUbkn.js";import"./Play-u8RKUOgE.js";import"./Plus-BXyI5W5V.js";import"./SearchLg-C-HSASaD.js";import"./SearchMd-D0w4Qck0.js";import"./Shield01-Q9cD5PhS.js";import"./Stars01-DPTd-IIJ.js";import"./Trash01-CM1y68V4.js";import"./Upload01-DMRrFtU2.js";import"./User01-B9SplPDx.js";import"./Users01-BzBrg0ZX.js";import"./XClose-B627c_Vw.js";import"./X-QRTj5BrM.js";import"./Zap-DSqrbWsY.js";import"./dialog-CIGzdMua.js";import"./tooltip-BF5M3Sw2.js";import"./extract-connection-data-D4fmQsKZ.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./use-debounced-value-Bp6jpgAg.js";import"./authenticate-and-persist-oauth-BEZ_C5HG.js";import"./mcp-oauth-CqM5PhIn.js";import"./auth-BSnkvOr9.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-P3_v_NAz.js";const Qe={"pt-BR":"https://decocms.com/agendar",en:"https://www.decocms.com/en/schedule"},Ge=["https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200","https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png","https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png"],Nt="var(--brand-green-dark)";function De({siteUrl:t,email:e,locale:s}){const i=(s&&Qe[s])??Qe["pt-BR"]??"https://decocms.com/agendar",r=new URL(i);return t&&r.searchParams.set("siteUrl",t),e&&r.searchParams.set("email",e),r.toString()}function Et(t){const e=N.c(15),{href:s,size:i,className:r,orgId:l}=t,a=i===void 0?"lg":i,n=Q();let c;e[0]!==r?(c=Te("w-full",r),e[0]=r,e[1]=c):c=e[1];let m;e[2]!==l?(m=()=>ue("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:l}),e[2]=l,e[3]=m):m=e[3];let d;e[4]!==n?(d=n("routes.commerceOnboarding.scheduleMeeting.scheduleButton"),e[4]=n,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(wt,{size:16}),e[6]=u):u=e[6];let f;e[7]!==s||e[8]!==m||e[9]!==d?(f=o.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",onClick:m,children:[d,u]}),e[7]=s,e[8]=m,e[9]=d,e[10]=f):f=e[10];let p;return e[11]!==a||e[12]!==c||e[13]!==f?(p=o.jsx(Ne,{asChild:!0,variant:"outline",size:a,className:c,children:f}),e[11]=a,e[12]=c,e[13]=f,e[14]=p):p=e[14],p}function Ut(t){const e=N.c(13),{size:s}=t,i=s===void 0?72:s,r=Q();let l;e[0]!==r?(l=r("routes.commerceOnboarding.scheduleMeeting.expertAlt"),e[0]=r,e[1]=l):l=e[1];const a=l;let n;e[2]!==i?(n=Math.round(i*.3),e[2]=i,e[3]=n):n=e[3];const c=n;let m;e[4]!==i?(m={height:i},e[4]=i,e[5]=m):m=e[5];let d;e[6]!==a||e[7]!==c||e[8]!==i?(d=Ge.map((f,p)=>o.jsxs("div",{className:"relative shrink-0",style:{width:i,height:i,marginLeft:p===0?0:-c,zIndex:Ge.length-p},children:[o.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:o.jsx("img",{src:f,alt:a,className:"h-full w-full object-cover",loading:"lazy"})}),p===0&&o.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[o.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),o.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},f)),e[6]=a,e[7]=c,e[8]=i,e[9]=d):d=e[9];let u;return e[10]!==m||e[11]!==d?(u=o.jsx("div",{className:"flex items-end",style:m,children:d}),e[10]=m,e[11]=d,e[12]=u):u=e[12],u}function Fe(t){const e=N.c(19),{href:s,orgId:i}=t,r=Q();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"h-20",style:{backgroundColor:Nt}}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"-mt-9 mb-4",children:o.jsx(Ut,{})}),e[1]=a):a=e[1];let n;e[2]!==r?(n=r("routes.commerceOnboarding.scheduleMeeting.headline"),e[2]=r,e[3]=n):n=e[3];let c;e[4]!==n?(c=o.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:n}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==r?(m=r("routes.commerceOnboarding.scheduleMeeting.body"),e[6]=r,e[7]=m):m=e[7];let d;e[8]!==m?(d=o.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:m}),e[8]=m,e[9]=d):d=e[9];let u;e[10]!==c||e[11]!==d?(u=o.jsxs("div",{className:"grid gap-1.5",children:[c,d]}),e[10]=c,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s||e[14]!==i?(f=o.jsx(Et,{href:s,size:"lg",className:"mt-6",orgId:i}),e[13]=s,e[14]=i,e[15]=f):f=e[15];let p;return e[16]!==u||e[17]!==f?(p=o.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:o.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[l,o.jsxs("div",{className:"px-8 pb-8",children:[a,u,f]})]})}),e[16]=u,e[17]=f,e[18]=p):p=e[18],p}function tt(t){const e=N.c(10),{host:s}=t,i=`https://www.google.com/s2/favicons?domain=${s}&sz=128`;let r,l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),l=o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),a=o.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=r,e[1]=l,e[2]=a):(r=e[0],l=e[1],a=e[2]);let n;e[3]!==i?(n=o.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:o.jsx("img",{src:i,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=i,e[4]=n):n=e[4];let c;e[5]!==s?(c=o.jsx("span",{className:"text-lg font-medium text-foreground",children:s}),e[5]=s,e[6]=c):c=e[6];let m;return e[7]!==n||e[8]!==c?(m=o.jsxs("div",{className:"flex items-center gap-3",children:[r,l,a,n,c]}),e[7]=n,e[8]=c,e[9]=m):m=e[9],m}function $e(t){const e=N.c(5),{variant:s}=t,i=Q();let r;e[0]!==i||e[1]!==s?(r=i(s==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=i,e[1]=s,e[2]=r):r=e[2];const l=r;let a;return e[3]!==l?(a=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(dt,{label:l,className:"text-muted-foreground"})}),e[3]=l,e[4]=a):a=e[4],a}function go(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Lt,{}),t[0]=e):e=t[0],e}const rt=Y.createContext(null),ot=()=>Y.useContext(rt);function Pt(){const t=N.c(22),[e,s]=Ee(),i=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==i?(r=o.jsx(bt,{asChild:!0,children:o.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:i})}),t[0]=i,t[1]=r):r=t[1];let l;t[2]!==s?(l=()=>{s(Rt)},t[2]=s,t[3]=l):l=t[3];const a=e.language==="en"&&"bg-accent";let n;t[4]!==a?(n=Te(a),t[4]=a,t[5]=n):n=t[5];let c;t[6]!==l||t[7]!==n?(c=o.jsx(Ke,{onClick:l,className:n,children:"English"}),t[6]=l,t[7]=n,t[8]=c):c=t[8];let m;t[9]!==s?(m=()=>{s(It)},t[9]=s,t[10]=m):m=t[10];const d=e.language==="pt-BR"&&"bg-accent";let u;t[11]!==d?(u=Te(d),t[11]=d,t[12]=u):u=t[12];let f;t[13]!==m||t[14]!==u?(f=o.jsx(Ke,{onClick:m,className:u,children:"Português (Brasil)"}),t[13]=m,t[14]=u,t[15]=f):f=t[15];let p;t[16]!==c||t[17]!==f?(p=o.jsxs(xt,{align:"end",children:[c,f]}),t[16]=c,t[17]=f,t[18]=p):p=t[18];let O;return t[19]!==r||t[20]!==p?(O=o.jsxs(yt,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=O):O=t[21],O}function It(t){return{...t,language:"pt-BR"}}function Rt(t){return{...t,language:"en"}}function B(t){const e=N.c(17);let s,i,r;e[0]!==t?({visual:r,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/commerce-onboarding"},e[4]=l):l=e[4];const a=Xe(l),{data:n}=Ae.useSession(),[c]=Ee(),m=n?.user?.email;let d;e[5]!==c.language||e[6]!==a.siteUrl||e[7]!==m?(d=De({siteUrl:a.siteUrl,email:m,locale:c.language}),e[5]=c.language,e[6]=a.siteUrl,e[7]=m,e[8]=d):d=e[8];const u=d;let f;e[9]!==u||e[10]!==r?(f=r??o.jsx(Fe,{href:u}),e[9]=u,e[10]=r,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"flex justify-between items-start mb-8",children:[o.jsx("div",{}),o.jsx(Pt,{})]}),e[12]=p):p=e[12];let O;return e[13]!==s||e[14]!==i||e[15]!==f?(O=o.jsxs(ft,{...i,visual:f,children:[p,s]}),e[13]=s,e[14]=i,e[15]=f,e[16]=O):O=e[16],O}function zt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}function Ye(t,e){switch(e){case"Enter a website URL.":return t("routes.commerceOnboarding.siteUrl.enterUrl");case"Use an HTTP or HTTPS website URL.":return t("routes.commerceOnboarding.siteUrl.useHttpOrHttps");case"Enter a valid website URL.":return t("routes.commerceOnboarding.siteUrl.enterValidUrl");case"__configurationFailed":return t("routes.commerceOnboarding.configurationFailed");default:return e}}let Je=!1;function Lt(){const t=Xe({from:"/commerce-onboarding"}),{org:e,siteUrl:s}=t,i=Me(s);if(!Je&&st()){Je=!0;const r=pt(window.location.search);ue("commerce_onboarding_viewed",{site_url:s,domain:i??void 0,...r,...i?{$set:{last_scanned_domain:i}}:{}})}return o.jsx(rt.Provider,{value:i,children:o.jsx(kt,{requestedOrgSlug:e,siteUrl:s})})}function kt(t){const e=N.c(14),{requestedOrgSlug:s,siteUrl:i}=t,r=Q(),{data:l,isPending:a}=Ae.useSession(),n=ot();if(a){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(B,{children:o.jsx($e,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!l){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==r?(d=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=d):d=e[2];let u;e[3]!==n?(u=n?o.jsx(tt,{host:n}):void 0,e[3]=n,e[4]=u):u=e[4];let f;e[5]!==r?(f=zt(r),e[5]=r,e[6]=f):f=e[6];let p;return e[7]!==d||e[8]!==u||e[9]!==f?(p=o.jsx(B,{children:o.jsx(gt,{callbackUrl:m,allowAutoLogin:!1,title:d,subtitle:null,brand:u,copy:f})}),e[7]=d,e[8]=u,e[9]=f,e[10]=p):p=e[10],p}let c;return e[11]!==s||e[12]!==i?(c=o.jsx(Tt,{requestedOrgSlug:s,siteUrl:i}),e[11]=s,e[12]=i,e[13]=c):c=e[13],c}function Tt(t){const e=N.c(121),{requestedOrgSlug:s,siteUrl:i}=t,r=Q(),l=nt(),a=lt(),[n,c]=Y.useState(null),[m,d]=Y.useState(null),[u,f]=Y.useState(!1),p=a.data?.map(At)??[];let O;e[0]===Symbol.for("react.memo_cache_sentinel")?(O={mutationFn:Mt,retry:!1,onSuccess:g=>{d(g)}},e[0]=O):O=e[0];const v=Ze(O);if(a.isPending){let g;return e[1]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(B,{children:o.jsx($e,{variant:"workspace"})}),e[1]=g):g=e[1],g}if(a.error){let g;e[2]!==r?(g=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=g):g=e[3];let h;e[4]!==r?(h=r("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=r,e[5]=h):h=e[5];let x;e[6]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=x):x=e[7];let b;e[8]!==a?(b=()=>a.refetch(),e[8]=a,e[9]=b):b=e[9];let _;return e[10]!==g||e[11]!==h||e[12]!==x||e[13]!==b?(_=o.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[10]=g,e[11]=h,e[12]=x,e[13]=b,e[14]=_):_=e[14],_}const w=s?p.find(g=>g.slug===s):null;if(w){let g;return e[15]!==w||e[16]!==i?(g=o.jsx(ve,{org:w,initialSiteUrl:i}),e[15]=w,e[16]=i,e[17]=g):g=e[17],g}if(s){let g;e[18]!==r?(g=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=g):g=e[19];let h;e[20]!==r?(h=r("routes.commerceOnboarding.couldNotFindOrg"),e[20]=r,e[21]=h):h=e[21];let x;e[22]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[22]=r,e[23]=x):x=e[23];let b;e[24]!==a?(b=()=>a.refetch(),e[24]=a,e[25]=b):b=e[25];let _;return e[26]!==g||e[27]!==h||e[28]!==x||e[29]!==b?(_=o.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[26]=g,e[27]=h,e[28]=x,e[29]=b,e[30]=_):_=e[30],_}if(n){let g;return e[31]!==n||e[32]!==i?(g=o.jsx(ve,{org:n,initialSiteUrl:i}),e[31]=n,e[32]=i,e[33]=g):g=e[33],g}if(p.length===1&&p[0]){let g;return e[34]!==p[0]||e[35]!==i?(g=o.jsx(ve,{org:p[0],initialSiteUrl:i}),e[34]=p[0],e[35]=i,e[36]=g):g=e[36],g}if(p.length>1){let g;e[37]!==r?(g=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=g):g=e[38];let h;e[39]!==r?(h=r("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=r,e[40]=h):h=e[40];let x;e[41]!==g||e[42]!==h?(x=o.jsx(J,{title:g,description:h}),e[41]=g,e[42]=h,e[43]=x):x=e[43];let b;e[44]!==r?(b=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=b):b=e[45];let _;e[46]!==l||e[47]!==i?(_=j=>l({to:"/commerce-onboarding",search:{org:j.slug,siteUrl:i}}),e[46]=l,e[47]=i,e[48]=_):_=e[48];let T;e[49]===Symbol.for("react.memo_cache_sentinel")?(T=()=>f(!0),e[49]=T):T=e[49];let z;e[50]!==r?(z=r("routes.commerceOnboarding.createNewOrg"),e[50]=r,e[51]=z):z=e[51];let R;e[52]!==p||e[53]!==b||e[54]!==_||e[55]!==z?(R=o.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:o.jsx(Ve,{organizations:p,selectLabel:b,onSelected:_,onCreateNew:T,createNewLabel:z})}),e[52]=p,e[53]=b,e[54]=_,e[55]=z,e[56]=R):R=e[56];let U;e[57]!==x||e[58]!==R?(U=o.jsxs("div",{className:"grid gap-10",children:[x,R]}),e[57]=x,e[58]=R,e[59]=U):U=e[59];let M;e[60]!==l||e[61]!==i?(M=j=>{Se(),l({to:"/commerce-onboarding",search:{org:j,siteUrl:i}})},e[60]=l,e[61]=i,e[62]=M):M=e[62];let P;e[63]!==u||e[64]!==M?(P=o.jsx(qe,{open:u,onOpenChange:f,onCreated:M}),e[63]=u,e[64]=M,e[65]=P):P=e[65];let L;return e[66]!==U||e[67]!==P?(L=o.jsxs(B,{children:[U,P]}),e[66]=U,e[67]=P,e[68]=L):L=e[68],L}if(!m){let g;e[69]!==v?(g=()=>{v.reset(),v.mutate()},e[69]=v,e[70]=g):g=e[70];let h;return e[71]!==v||e[72]!==g?(h=o.jsx(Dt,{mutation:v,onRetry:g}),e[71]=v,e[72]=g,e[73]=h):h=e[73],h}const C=m;if(C?.success&&(C.status==="created"||C.status==="joined"||C.status==="already_has_organization")&&C.organization){let g;return e[74]!==C.organization||e[75]!==i?(g=o.jsx(ve,{org:C.organization,initialSiteUrl:i}),e[74]=C.organization,e[75]=i,e[76]=g):g=e[76],g}if(C?.status==="ambiguous"&&C.organizations&&C.organizations.length>0){let g;e[77]!==r?(g=r("routes.commerceOnboarding.chooseOrg"),e[77]=r,e[78]=g):g=e[78];let h;e[79]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[79]=r,e[80]=h):h=e[80];let x;e[81]!==g||e[82]!==h?(x=o.jsx(J,{title:g,description:h}),e[81]=g,e[82]=h,e[83]=x):x=e[83];const b=C.organizations,_=C.domain??void 0;let T;e[84]!==l||e[85]!==i?(T=(X,Z)=>{Se(),c({...X,slug:Z}),l({to:"/commerce-onboarding",search:{org:Z,siteUrl:i}})},e[84]=l,e[85]=i,e[86]=T):T=e[86];let z;e[87]===Symbol.for("react.memo_cache_sentinel")?(z=()=>f(!0),e[87]=z):z=e[87];let R;e[88]!==r?(R=r("routes.commerceOnboarding.createNewOrg"),e[88]=r,e[89]=R):R=e[89];let U;e[90]!==C.organizations||e[91]!==_||e[92]!==T||e[93]!==R?(U=o.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:o.jsx(Ve,{organizations:b,domain:_,onJoined:T,onCreateNew:z,createNewLabel:R})}),e[90]=C.organizations,e[91]=_,e[92]=T,e[93]=R,e[94]=U):U=e[94];let M;e[95]!==U||e[96]!==x?(M=o.jsxs("div",{className:"grid gap-10",children:[x,U]}),e[95]=U,e[96]=x,e[97]=M):M=e[97];let P;e[98]!==l||e[99]!==i?(P=X=>{Se(),l({to:"/commerce-onboarding",search:{org:X,siteUrl:i}})},e[98]=l,e[99]=i,e[100]=P):P=e[100];let L;e[101]!==u||e[102]!==P?(L=o.jsx(qe,{open:u,onOpenChange:f,onCreated:P}),e[101]=u,e[102]=P,e[103]=L):L=e[103];let j;return e[104]!==M||e[105]!==L?(j=o.jsxs(B,{children:[M,L]}),e[104]=M,e[105]=L,e[106]=j):j=e[106],j}let I;e[107]!==r?(I=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[107]=r,e[108]=I):I=e[108];let E;e[109]!==C?.error||e[110]!==r?(E=C?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[109]=C?.error,e[110]=r,e[111]=E):E=e[111];let A;e[112]!==r?(A=r("routes.commerceOnboarding.retryAgain"),e[112]=r,e[113]=A):A=e[113];let W;e[114]!==v?(W=()=>{d(null),v.reset()},e[114]=v,e[115]=W):W=e[115];let q;return e[116]!==I||e[117]!==E||e[118]!==A||e[119]!==W?(q=o.jsx(_e,{title:I,description:E,actionLabel:A,onRetry:W}),e[116]=I,e[117]=E,e[118]=A,e[119]=W,e[120]=q):q=e[120],q}async function Mt(){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&&Se(),e}function At(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Dt(t){const e=N.c(16),{mutation:s,onRetry:i}=t,r=Q(),l=Y.useRef(!1);let a;e[0]!==s?(a=d=>{!d||l.current||(l.current=!0,s.mutate())},e[0]=s,e[1]=a):a=e[1];const n=a;if(s.error){let d;e[2]!==r?(d=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=d):d=e[3];let u;e[4]!==r?(u=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=u):u=e[5];let f;e[6]!==r?(f=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=f):f=e[7];let p;return e[8]!==i||e[9]!==d||e[10]!==u||e[11]!==f?(p=o.jsx(_e,{title:d,description:u,actionLabel:f,onRetry:i}),e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=p):p=e[12],p}let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx($e,{variant:"generic"}),e[13]=c):c=e[13];let m;return e[14]!==n?(m=o.jsx(B,{children:o.jsx("div",{ref:n,children:c})}),e[14]=n,e[15]=m):m=e[15],m}function J(t){const e=N.c(8),{title:s,description:i}=t,r=ot();let l;e[0]!==r?(l=r?o.jsx(tt,{host:r}):o.jsxs("div",{children:[o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=r,e[1]=l):l=e[1];let a;e[2]!==i||e[3]!==s?(a=(s||i)&&o.jsxs("div",{className:"space-y-2",children:[s&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:s}),i&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:i})]}),e[2]=i,e[3]=s,e[4]=a):a=e[4];let n;return e[5]!==l||e[6]!==a?(n=o.jsxs("div",{className:"grid gap-10",children:[l,a]}),e[5]=l,e[6]=a,e[7]=n):n=e[7],n}function _e(t){const e=N.c(9),{title:s,description:i,actionLabel:r,onRetry:l}=t;let a;e[0]!==i||e[1]!==s?(a=o.jsx(J,{title:s,description:i}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let n;e[3]!==r||e[4]!==l?(n=o.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:l,children:r}),e[3]=r,e[4]=l,e[5]=n):n=e[5];let c;return e[6]!==a||e[7]!==n?(c=o.jsx(B,{children:o.jsxs("div",{className:"grid gap-10",children:[a,n]})}),e[6]=a,e[7]=n,e[8]=c):c=e[8],c}function ve(t){const e=N.c(13),{org:s,initialSiteUrl:i}=t,r=Q(),{data:l}=Ae.useSession(),[a]=Ee(),n=l?.user?.email;let c;e[0]!==i||e[1]!==a.language||e[2]!==n?(c=De({siteUrl:i,email:n,locale:a.language}),e[0]=i,e[1]=a.language,e[2]=n,e[3]=c):c=e[3];const m=c;let d;e[4]!==m||e[5]!==s.id?(d=o.jsx(Fe,{href:m,orgId:s.id}),e[4]=m,e[5]=s.id,e[6]=d):d=e[6];const u=d;let f;return e[7]!==i||e[8]!==u||e[9]!==s||e[10]!==l?.user?.email||e[11]!==r?(f=o.jsx(at,{children:p=>{const{reset:O}=p;return o.jsx(ct,{fallback:v=>{const{error:w,resetError:C}=v;return o.jsx(B,{visual:u,children:o.jsx(Ft,{orgName:s.name,message:w instanceof Error?w.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{O(),C()}})})},children:o.jsx(Y.Suspense,{fallback:o.jsx(it,{visual:u}),children:o.jsx($t,{org:s,initialSiteUrl:i,sessionEmail:l?.user?.email},`${s.id}:${i??""}`)})})}}),e[7]=i,e[8]=u,e[9]=s,e[10]=l?.user?.email,e[11]=r,e[12]=f):f=e[12],f}function it(t){const e=N.c(3),{visual:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(J,{}),o.jsx(et,{})]}),e[0]=i):i=e[0];let r;return e[1]!==s?(r=o.jsx(B,{align:"fill",visual:s,children:i}),e[1]=s,e[2]=r):r=e[2],r}function Ft(t){const e=N.c(19),{orgName:s,message:i,onRetry:r}=t,l=Q();let a;e[0]!==l?(a=l("routes.commerceOnboarding.commerceDiagnostic"),e[0]=l,e[1]=a):a=e[1];let n;e[2]!==s||e[3]!==l?(n=l("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s}),e[2]=s,e[3]=l,e[4]=n):n=e[4];let c;e[5]!==a||e[6]!==n?(c=o.jsx(J,{title:a,description:n}),e[5]=a,e[6]=n,e[7]=c):c=e[7];let m;e[8]!==i?(m=o.jsx(we,{message:i}),e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l?(d=l("routes.commerceOnboarding.retryAgain"),e[10]=l,e[11]=d):d=e[11];let u;e[12]!==r||e[13]!==d?(u=o.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:r,children:d}),e[12]=r,e[13]=d,e[14]=u):u=e[14];let f;return e[15]!==c||e[16]!==m||e[17]!==u?(f=o.jsxs("div",{className:"grid gap-10",children:[c,m,u]}),e[15]=c,e[16]=m,e[17]=u,e[18]=f):f=e[18],f}function $t(t){const e=N.c(135),{org:s,initialSiteUrl:i,sessionEmail:r}=t;let l;e[0]!==s.id||e[1]!==s.slug?(l={connectionId:Ct,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l):l=e[2];const a=jt(l),[n,c]=Y.useState(i??""),[m,d]=Y.useState(null),u=Y.useRef(!1),f=Ot.COMMERCE_DISCOVERY(s.id),p=vt(s.id),O=He.commerceDiscoveryConnection(s.id,f);let v;e[3]!==f||e[4]!==a?(v=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:f}});return Le(y)},e[3]=f,e[4]=a,e[5]=v):v=e[5];let w;e[6]!==O||e[7]!==v?(w={queryKey:O,queryFn:v,retry:!1},e[6]=O,e[7]=v,e[8]=w):w=e[8];const C=Be(w),I=He.commerceDiscoveryVirtualMcp(s.id,p);let E;e[9]!==a||e[10]!==p?(E=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Le(y)},e[9]=a,e[10]=p,e[11]=E):E=e[11];let A;e[12]!==I||e[13]!==E?(A={queryKey:I,queryFn:E,retry:!1},e[12]=I,e[13]=E,e[14]=A):A=e[14];const W=Be(A);let q;e[15]!==a?(q=async y=>{const S=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Le(S)},e[15]=a,e[16]=q):q=e[16];let g;e[17]!==C||e[18]!==s.id||e[19]!==W?(g=(y,S)=>{ue("commerce_onboarding_setup_succeeded",{domain:Me(S)??void 0,organization_id:s.id}),d(null),C.refetch(),W.refetch()},e[17]=C,e[18]=s.id,e[19]=W,e[20]=g):g=e[20];let h;e[21]!==s.id?(h=(y,S)=>{ue("commerce_onboarding_setup_failed",{domain:Me(S)??void 0,organization_id:s.id,error:y instanceof Error?y.message:String(y)}),d(y instanceof Error?y.message:"__configurationFailed")},e[21]=s.id,e[22]=h):h=e[22];let x;e[23]!==h||e[24]!==q||e[25]!==g?(x={mutationFn:q,retry:!1,onSuccess:g,onError:h},e[23]=h,e[24]=q,e[25]=g,e[26]=x):x=e[26];const b=Ze(x),_=!!C.data.item&&!!W.data.item,T=C.data.item,z=typeof T?.metadata?.siteUrl=="string"?T.metadata.siteUrl:void 0,R=i||n||"";let U;e[27]!==z||e[28]!==R?(U=ut(R,z),e[27]=z,e[28]=R,e[29]=U):U=e[29];const P=_&&U,L=i||n||z||"",j=Q(),[X]=Ee();let Z;e[30]!==L||e[31]!==X.language||e[32]!==r?(Z=De({siteUrl:L,email:r,locale:X.language}),e[30]=L,e[31]=X.language,e[32]=r,e[33]=Z):Z=e[33];const Ue=Z;let ge;e[34]!==Ue||e[35]!==s.id?(ge=o.jsx(Fe,{href:Ue,orgId:s.id}),e[34]=Ue,e[35]=s.id,e[36]=ge):ge=e[36];const $=ge;let fe;e[37]!==m||e[38]!==j?(fe=m?Ye(j,m):null,e[37]=m,e[38]=j,e[39]=fe):fe=e[39];const H=fe;let pe;e[40]!==b?(pe=y=>{const S=ze(y);if(!S.ok){d(S.error);return}d(null),b.mutate(S.value)},e[40]=b,e[41]=pe):pe=e[41];const ee=pe;let he;e[42]!==i||e[43]!==ee||e[44]!==P?(he=y=>{!y||u.current||P||!i||(u.current=!0,ee(i))},e[42]=i,e[43]=ee,e[44]=P,e[45]=he):he=e[45];const Pe=he;let be;e[46]!==s.id||e[47]!==ee||e[48]!==n?(be=y=>{y.preventDefault();const S=ze(n);S.ok&&ue("commerce_onboarding_site_url_submitted",{domain:new URL(S.value).hostname,organization_id:s.id}),ee(n)},e[46]=s.id,e[47]=ee,e[48]=n,e[49]=be):be=e[49];const V=be;if(P){const y=s.slug;let S;e[50]===Symbol.for("react.memo_cache_sentinel")?(S=crypto.randomUUID(),e[50]=S):S=e[50];let k;e[51]!==s.slug?(k={org:y,taskId:S},e[51]=s.slug,e[52]=k):k=e[52];let D;e[53]!==s.id?(D=St(s.id),e[53]=s.id,e[54]=D):D=e[54];const G=L||void 0;let F;e[55]!==D.id||e[56]!==G?(F={virtualmcpid:D.id,connect:"1",siteUrl:G},e[55]=D.id,e[56]=G,e[57]=F):F=e[57];let K;return e[58]!==k||e[59]!==F?(K=o.jsx(mt,{to:"/$org/$taskId",params:k,search:F,replace:!0}),e[58]=k,e[59]=F,e[60]=K):K=e[60],K}if(b.isPending){let y;return e[61]!==$?(y=o.jsx(it,{visual:$}),e[61]=$,e[62]=y):y=e[62],y}if(i){let y,S,k,D,G,F,K,ne;if(e[63]!==$||e[64]!==V||e[65]!==i||e[66]!==s.name||e[67]!==b.isPending||e[68]!==n||e[69]!==j||e[70]!==H||e[71]!==Pe){ne=Symbol.for("react.early_return_sentinel");e:{const Ie=ze(i);if(!Ie.ok){let me;e[80]!==j?(me=j("routes.commerceOnboarding.commerceDiagnostic"),e[80]=j,e[81]=me):me=e[81];let de;e[82]!==s.name||e[83]!==j?(de=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[82]=s.name,e[83]=j,e[84]=de):de=e[84];let Ce;e[85]!==me||e[86]!==de?(Ce=o.jsx(J,{title:me,description:de}),e[85]=me,e[86]=de,e[87]=Ce):Ce=e[87];let je;e[88]!==V||e[89]!==b.isPending||e[90]!==n||e[91]!==H?(je=o.jsx(ke,{siteUrl:n,error:H,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[88]=V,e[89]=b.isPending,e[90]=n,e[91]=H,e[92]=je):je=e[92];const Re=o.jsxs("div",{className:"grid gap-10",children:[Ce,o.jsx(we,{message:Ye(j,Ie.error)}),je]});let Oe;e[93]!==$||e[94]!==Re?(Oe=o.jsx(B,{visual:$,children:Re}),e[93]=$,e[94]=Re,e[95]=Oe):Oe=e[95],ne=Oe;break e}S=B,K=$,G=Pe,F="grid gap-10",y=J,e[96]!==j?(k=j("routes.commerceOnboarding.commerceDiagnostic"),e[96]=j,e[97]=k):k=e[97],D=j("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:Ie.value})}e[63]=$,e[64]=V,e[65]=i,e[66]=s.name,e[67]=b.isPending,e[68]=n,e[69]=j,e[70]=H,e[71]=Pe,e[72]=y,e[73]=S,e[74]=k,e[75]=D,e[76]=G,e[77]=F,e[78]=K,e[79]=ne}else y=e[72],S=e[73],k=e[74],D=e[75],G=e[76],F=e[77],K=e[78],ne=e[79];if(ne!==Symbol.for("react.early_return_sentinel"))return ne;let le;e[98]!==y||e[99]!==k||e[100]!==D?(le=o.jsx(y,{title:k,description:D}),e[98]=y,e[99]=k,e[100]=D,e[101]=le):le=e[101];let ae;e[102]!==V||e[103]!==b.isPending||e[104]!==n||e[105]!==H?(ae=H?o.jsxs(o.Fragment,{children:[o.jsx(we,{message:H}),o.jsx(ke,{siteUrl:n,error:null,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V})]}):o.jsx(et,{}),e[102]=V,e[103]=b.isPending,e[104]=n,e[105]=H,e[106]=ae):ae=e[106];let ce;e[107]!==G||e[108]!==F||e[109]!==le||e[110]!==ae?(ce=o.jsxs("div",{ref:G,className:F,children:[le,ae]}),e[107]=G,e[108]=F,e[109]=le,e[110]=ae,e[111]=ce):ce=e[111];let ye;return e[112]!==S||e[113]!==K||e[114]!==ce?(ye=o.jsx(S,{visual:K,children:ce}),e[112]=S,e[113]=K,e[114]=ce,e[115]=ye):ye=e[115],ye}let te;e[116]!==j?(te=j("routes.commerceOnboarding.commerceDiagnostic"),e[116]=j,e[117]=te):te=e[117];let re;e[118]!==s.name||e[119]!==j?(re=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[118]=s.name,e[119]=j,e[120]=re):re=e[120];let oe;e[121]!==te||e[122]!==re?(oe=o.jsx(J,{title:te,description:re}),e[121]=te,e[122]=re,e[123]=oe):oe=e[123];let ie;e[124]!==V||e[125]!==b.isPending||e[126]!==n||e[127]!==H?(ie=o.jsx(ke,{siteUrl:n,error:H,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[124]=V,e[125]=b.isPending,e[126]=n,e[127]=H,e[128]=ie):ie=e[128];let se;e[129]!==oe||e[130]!==ie?(se=o.jsxs("div",{className:"grid gap-10",children:[oe,ie]}),e[129]=oe,e[130]=ie,e[131]=se):se=e[131];let xe;return e[132]!==$||e[133]!==se?(xe=o.jsx(B,{visual:$,children:se}),e[132]=$,e[133]=se,e[134]=xe):xe=e[134],xe}function ke(t){const e=N.c(30),{siteUrl:s,error:i,isSubmitting:r,onSiteUrlChange:l,onSubmit:a}=t,n=Q();let c;e[0]!==n?(c=n("routes.commerceOnboarding.siteUrlLabel"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==c?(m=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:c}),e[2]=c,e[3]=m):m=e[3];let d;e[4]!==l?(d=A=>l(A.target.value),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==n?(u=n("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=n,e[7]=u):u=e[7];const f=!!i;let p;e[8]!==r||e[9]!==s||e[10]!==d||e[11]!==u||e[12]!==f?(p=o.jsx(ht,{id:"commerce-site-url",type:"text",inputMode:"url",value:s,onChange:d,placeholder:u,"aria-invalid":f,disabled:r}),e[8]=r,e[9]=s,e[10]=d,e[11]=u,e[12]=f,e[13]=p):p=e[13];let O;e[14]!==i?(O=i?o.jsx(we,{message:i}):null,e[14]=i,e[15]=O):O=e[15];let v;e[16]!==m||e[17]!==p||e[18]!==O?(v=o.jsxs("div",{className:"grid gap-2",children:[m,p,O]}),e[16]=m,e[17]=p,e[18]=O,e[19]=v):v=e[19];let w;e[20]!==n?(w=n("routes.commerceOnboarding.authCopy.continue"),e[20]=n,e[21]=w):w=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(_t,{size:16}),e[22]=C):C=e[22];let I;e[23]!==r||e[24]!==w?(I=o.jsxs(Ne,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[w,C]}),e[23]=r,e[24]=w,e[25]=I):I=e[25];let E;return e[26]!==a||e[27]!==I||e[28]!==v?(E=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[v,I]}),e[26]=a,e[27]=I,e[28]=v,e[29]=E):E=e[29],E}function we(t){const e=N.c(2),{message:s}=t;let i;return e[0]!==s?(i=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:s}),e[0]=s,e[1]=i):i=e[1],i}export{go as default};
1
+ import{c as N,b as Q,j as o,m as Te,p as ue,B as Ne,u as Xe,r as Y,a as Ae,q as st,d as nt,s as lt,e as Ze,v as Ee,w as Se,Q as at,E as ct,K as He,x as Be,N as mt}from"./index-CLnzejRk.js";import{L as dt,s as Me,S as We,C as qe,i as ut,n as ze,a as et,p as Le}from"./self-tool-result-Ds25KE80.js";import{A as gt}from"./auth-entry-DI3EIfDq.js";import{A as ft}from"./auth-split-layout-CQY87aqR.js";import{O as Ve}from"./organization-choice-DR35zVz7.js";import{r as pt}from"./track-CCIlLGGM.js";import{I as ht}from"./input-D7JdppQ6.js";import{D as bt,a as Ke,b as xt,c as yt}from"./dropdown-menu-BVIWxDOY.js";import{S as Ct,u as jt,W as Ot,g as vt,a as St}from"./use-mcp-client-CNT1Qud6.js";import{i as _t}from"./XCircle-D0sQ0htd.js";import{i as wt}from"./ArrowUpRight-yTwz4fJX.js";import"./alert-dialog-BYY9H9Nk.js";import"./form-BH-w8XbU.js";import"./label-CljJw0E9.js";import"./spinner-mlLl2Yhb.js";import"./integration-icon-DA5NwAGO.js";import"./Tool02-Oxl9VdAU.js";import"./agent-icon-DOQVKT6p.js";import"./AlertCircle-DGAAcGLZ.js";import"./Tool01-CCUCyiYP.js";import"./ArrowUp-Cwh2JKAG.js";import"./ArrowLeft-D0Hxwldu.js";import"./TrendUp01-CEoUzwtG.js";import"./ZapSquare-MtMoEV-0.js";import"./Users03-Q6wyEfBv.js";import"./CheckCircle-CFuoxQ3V.js";import"./Check-DPU3qMnE.js";import"./ChevronDown-CDxQXKQ3.js";import"./ChevronRight-COngcxVg.js";import"./ChevronUp-CtuzvfYH.js";import"./DotsVertical-1xoSHkTS.js";import"./Stars02-CbmHZcdR.js";import"./Copy01-BHo0zxys.js";import"./CpuChip01-DNz1e-1j.js";import"./CreditCard01-i5vjt-xs.js";import"./Globe01-BS-FT6Ib.js";import"./Settings02-CQ_YBSRl.js";import"./Eye-C8A5iNxC.js";import"./FilterLines-BrDQp9tC.js";import"./Share07-DNvGaa3z.js";import"./Star01-Ch5vL_HW.js";import"./Globe04-DlYQuIAI.js";import"./SwitchHorizontal01-BOUECs-i.js";import"./HardDrive-C3sjYzJ6.js";import"./Key01-DHIIS9xh.js";import"./LayoutLeft-5wZy3XpT.js";import"./LinkExternal01-CiybGNcX.js";import"./LogOut01-BlGxBhWt.js";import"./Monitor01-D1nF-d8k.js";import"./Sun-BCmV-V0x.js";import"./Palette-DFLAtyvP.js";import"./Play-Bzk7NHAb.js";import"./Plus-6DwZVNck.js";import"./SearchLg-BTDenRrr.js";import"./SearchMd-C0jQ-JtA.js";import"./Shield01-KFQwMbLw.js";import"./Stars01-BKbWDlg0.js";import"./Trash01-DILZ0JhX.js";import"./Upload01-BLBKPEde.js";import"./User01-BaAZRdlX.js";import"./Users01-CEPZZM2j.js";import"./XClose-B-pbjqWB.js";import"./X-DK7Yc4rj.js";import"./Zap-IbdA8s62.js";import"./dialog-BzyNiq-4.js";import"./tooltip-_nC8eSks.js";import"./extract-connection-data-CT6fsBnt.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./use-debounced-value-4fW4NxvN.js";import"./authenticate-and-persist-oauth-BD3Cnx1S.js";import"./mcp-oauth-E_3ivFBH.js";import"./auth-CWeGXrYi.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-mUaEOQlV.js";const Qe={"pt-BR":"https://decocms.com/agendar",en:"https://www.decocms.com/en/schedule"},Ge=["https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200","https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png","https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png"],Nt="var(--brand-green-dark)";function De({siteUrl:t,email:e,locale:s}){const i=(s&&Qe[s])??Qe["pt-BR"]??"https://decocms.com/agendar",r=new URL(i);return t&&r.searchParams.set("siteUrl",t),e&&r.searchParams.set("email",e),r.toString()}function Et(t){const e=N.c(15),{href:s,size:i,className:r,orgId:l}=t,a=i===void 0?"lg":i,n=Q();let c;e[0]!==r?(c=Te("w-full",r),e[0]=r,e[1]=c):c=e[1];let m;e[2]!==l?(m=()=>ue("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:l}),e[2]=l,e[3]=m):m=e[3];let d;e[4]!==n?(d=n("routes.commerceOnboarding.scheduleMeeting.scheduleButton"),e[4]=n,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(wt,{size:16}),e[6]=u):u=e[6];let f;e[7]!==s||e[8]!==m||e[9]!==d?(f=o.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",onClick:m,children:[d,u]}),e[7]=s,e[8]=m,e[9]=d,e[10]=f):f=e[10];let p;return e[11]!==a||e[12]!==c||e[13]!==f?(p=o.jsx(Ne,{asChild:!0,variant:"outline",size:a,className:c,children:f}),e[11]=a,e[12]=c,e[13]=f,e[14]=p):p=e[14],p}function Ut(t){const e=N.c(13),{size:s}=t,i=s===void 0?72:s,r=Q();let l;e[0]!==r?(l=r("routes.commerceOnboarding.scheduleMeeting.expertAlt"),e[0]=r,e[1]=l):l=e[1];const a=l;let n;e[2]!==i?(n=Math.round(i*.3),e[2]=i,e[3]=n):n=e[3];const c=n;let m;e[4]!==i?(m={height:i},e[4]=i,e[5]=m):m=e[5];let d;e[6]!==a||e[7]!==c||e[8]!==i?(d=Ge.map((f,p)=>o.jsxs("div",{className:"relative shrink-0",style:{width:i,height:i,marginLeft:p===0?0:-c,zIndex:Ge.length-p},children:[o.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:o.jsx("img",{src:f,alt:a,className:"h-full w-full object-cover",loading:"lazy"})}),p===0&&o.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[o.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),o.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},f)),e[6]=a,e[7]=c,e[8]=i,e[9]=d):d=e[9];let u;return e[10]!==m||e[11]!==d?(u=o.jsx("div",{className:"flex items-end",style:m,children:d}),e[10]=m,e[11]=d,e[12]=u):u=e[12],u}function Fe(t){const e=N.c(19),{href:s,orgId:i}=t,r=Q();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"h-20",style:{backgroundColor:Nt}}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"-mt-9 mb-4",children:o.jsx(Ut,{})}),e[1]=a):a=e[1];let n;e[2]!==r?(n=r("routes.commerceOnboarding.scheduleMeeting.headline"),e[2]=r,e[3]=n):n=e[3];let c;e[4]!==n?(c=o.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:n}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==r?(m=r("routes.commerceOnboarding.scheduleMeeting.body"),e[6]=r,e[7]=m):m=e[7];let d;e[8]!==m?(d=o.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:m}),e[8]=m,e[9]=d):d=e[9];let u;e[10]!==c||e[11]!==d?(u=o.jsxs("div",{className:"grid gap-1.5",children:[c,d]}),e[10]=c,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s||e[14]!==i?(f=o.jsx(Et,{href:s,size:"lg",className:"mt-6",orgId:i}),e[13]=s,e[14]=i,e[15]=f):f=e[15];let p;return e[16]!==u||e[17]!==f?(p=o.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:o.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[l,o.jsxs("div",{className:"px-8 pb-8",children:[a,u,f]})]})}),e[16]=u,e[17]=f,e[18]=p):p=e[18],p}function tt(t){const e=N.c(10),{host:s}=t,i=`https://www.google.com/s2/favicons?domain=${s}&sz=128`;let r,l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),l=o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),a=o.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=r,e[1]=l,e[2]=a):(r=e[0],l=e[1],a=e[2]);let n;e[3]!==i?(n=o.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:o.jsx("img",{src:i,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=i,e[4]=n):n=e[4];let c;e[5]!==s?(c=o.jsx("span",{className:"text-lg font-medium text-foreground",children:s}),e[5]=s,e[6]=c):c=e[6];let m;return e[7]!==n||e[8]!==c?(m=o.jsxs("div",{className:"flex items-center gap-3",children:[r,l,a,n,c]}),e[7]=n,e[8]=c,e[9]=m):m=e[9],m}function $e(t){const e=N.c(5),{variant:s}=t,i=Q();let r;e[0]!==i||e[1]!==s?(r=i(s==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=i,e[1]=s,e[2]=r):r=e[2];const l=r;let a;return e[3]!==l?(a=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(dt,{label:l,className:"text-muted-foreground"})}),e[3]=l,e[4]=a):a=e[4],a}function go(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Lt,{}),t[0]=e):e=t[0],e}const rt=Y.createContext(null),ot=()=>Y.useContext(rt);function Pt(){const t=N.c(22),[e,s]=Ee(),i=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==i?(r=o.jsx(bt,{asChild:!0,children:o.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:i})}),t[0]=i,t[1]=r):r=t[1];let l;t[2]!==s?(l=()=>{s(Rt)},t[2]=s,t[3]=l):l=t[3];const a=e.language==="en"&&"bg-accent";let n;t[4]!==a?(n=Te(a),t[4]=a,t[5]=n):n=t[5];let c;t[6]!==l||t[7]!==n?(c=o.jsx(Ke,{onClick:l,className:n,children:"English"}),t[6]=l,t[7]=n,t[8]=c):c=t[8];let m;t[9]!==s?(m=()=>{s(It)},t[9]=s,t[10]=m):m=t[10];const d=e.language==="pt-BR"&&"bg-accent";let u;t[11]!==d?(u=Te(d),t[11]=d,t[12]=u):u=t[12];let f;t[13]!==m||t[14]!==u?(f=o.jsx(Ke,{onClick:m,className:u,children:"Português (Brasil)"}),t[13]=m,t[14]=u,t[15]=f):f=t[15];let p;t[16]!==c||t[17]!==f?(p=o.jsxs(xt,{align:"end",children:[c,f]}),t[16]=c,t[17]=f,t[18]=p):p=t[18];let O;return t[19]!==r||t[20]!==p?(O=o.jsxs(yt,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=O):O=t[21],O}function It(t){return{...t,language:"pt-BR"}}function Rt(t){return{...t,language:"en"}}function B(t){const e=N.c(17);let s,i,r;e[0]!==t?({visual:r,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/commerce-onboarding"},e[4]=l):l=e[4];const a=Xe(l),{data:n}=Ae.useSession(),[c]=Ee(),m=n?.user?.email;let d;e[5]!==c.language||e[6]!==a.siteUrl||e[7]!==m?(d=De({siteUrl:a.siteUrl,email:m,locale:c.language}),e[5]=c.language,e[6]=a.siteUrl,e[7]=m,e[8]=d):d=e[8];const u=d;let f;e[9]!==u||e[10]!==r?(f=r??o.jsx(Fe,{href:u}),e[9]=u,e[10]=r,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"flex justify-between items-start mb-8",children:[o.jsx("div",{}),o.jsx(Pt,{})]}),e[12]=p):p=e[12];let O;return e[13]!==s||e[14]!==i||e[15]!==f?(O=o.jsxs(ft,{...i,visual:f,children:[p,s]}),e[13]=s,e[14]=i,e[15]=f,e[16]=O):O=e[16],O}function zt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}function Ye(t,e){switch(e){case"Enter a website URL.":return t("routes.commerceOnboarding.siteUrl.enterUrl");case"Use an HTTP or HTTPS website URL.":return t("routes.commerceOnboarding.siteUrl.useHttpOrHttps");case"Enter a valid website URL.":return t("routes.commerceOnboarding.siteUrl.enterValidUrl");case"__configurationFailed":return t("routes.commerceOnboarding.configurationFailed");default:return e}}let Je=!1;function Lt(){const t=Xe({from:"/commerce-onboarding"}),{org:e,siteUrl:s}=t,i=Me(s);if(!Je&&st()){Je=!0;const r=pt(window.location.search);ue("commerce_onboarding_viewed",{site_url:s,domain:i??void 0,...r,...i?{$set:{last_scanned_domain:i}}:{}})}return o.jsx(rt.Provider,{value:i,children:o.jsx(kt,{requestedOrgSlug:e,siteUrl:s})})}function kt(t){const e=N.c(14),{requestedOrgSlug:s,siteUrl:i}=t,r=Q(),{data:l,isPending:a}=Ae.useSession(),n=ot();if(a){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(B,{children:o.jsx($e,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!l){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==r?(d=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=d):d=e[2];let u;e[3]!==n?(u=n?o.jsx(tt,{host:n}):void 0,e[3]=n,e[4]=u):u=e[4];let f;e[5]!==r?(f=zt(r),e[5]=r,e[6]=f):f=e[6];let p;return e[7]!==d||e[8]!==u||e[9]!==f?(p=o.jsx(B,{children:o.jsx(gt,{callbackUrl:m,allowAutoLogin:!1,title:d,subtitle:null,brand:u,copy:f})}),e[7]=d,e[8]=u,e[9]=f,e[10]=p):p=e[10],p}let c;return e[11]!==s||e[12]!==i?(c=o.jsx(Tt,{requestedOrgSlug:s,siteUrl:i}),e[11]=s,e[12]=i,e[13]=c):c=e[13],c}function Tt(t){const e=N.c(121),{requestedOrgSlug:s,siteUrl:i}=t,r=Q(),l=nt(),a=lt(),[n,c]=Y.useState(null),[m,d]=Y.useState(null),[u,f]=Y.useState(!1),p=a.data?.map(At)??[];let O;e[0]===Symbol.for("react.memo_cache_sentinel")?(O={mutationFn:Mt,retry:!1,onSuccess:g=>{d(g)}},e[0]=O):O=e[0];const v=Ze(O);if(a.isPending){let g;return e[1]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(B,{children:o.jsx($e,{variant:"workspace"})}),e[1]=g):g=e[1],g}if(a.error){let g;e[2]!==r?(g=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=g):g=e[3];let h;e[4]!==r?(h=r("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=r,e[5]=h):h=e[5];let x;e[6]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=x):x=e[7];let b;e[8]!==a?(b=()=>a.refetch(),e[8]=a,e[9]=b):b=e[9];let _;return e[10]!==g||e[11]!==h||e[12]!==x||e[13]!==b?(_=o.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[10]=g,e[11]=h,e[12]=x,e[13]=b,e[14]=_):_=e[14],_}const w=s?p.find(g=>g.slug===s):null;if(w){let g;return e[15]!==w||e[16]!==i?(g=o.jsx(ve,{org:w,initialSiteUrl:i}),e[15]=w,e[16]=i,e[17]=g):g=e[17],g}if(s){let g;e[18]!==r?(g=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=g):g=e[19];let h;e[20]!==r?(h=r("routes.commerceOnboarding.couldNotFindOrg"),e[20]=r,e[21]=h):h=e[21];let x;e[22]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[22]=r,e[23]=x):x=e[23];let b;e[24]!==a?(b=()=>a.refetch(),e[24]=a,e[25]=b):b=e[25];let _;return e[26]!==g||e[27]!==h||e[28]!==x||e[29]!==b?(_=o.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[26]=g,e[27]=h,e[28]=x,e[29]=b,e[30]=_):_=e[30],_}if(n){let g;return e[31]!==n||e[32]!==i?(g=o.jsx(ve,{org:n,initialSiteUrl:i}),e[31]=n,e[32]=i,e[33]=g):g=e[33],g}if(p.length===1&&p[0]){let g;return e[34]!==p[0]||e[35]!==i?(g=o.jsx(ve,{org:p[0],initialSiteUrl:i}),e[34]=p[0],e[35]=i,e[36]=g):g=e[36],g}if(p.length>1){let g;e[37]!==r?(g=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=g):g=e[38];let h;e[39]!==r?(h=r("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=r,e[40]=h):h=e[40];let x;e[41]!==g||e[42]!==h?(x=o.jsx(J,{title:g,description:h}),e[41]=g,e[42]=h,e[43]=x):x=e[43];let b;e[44]!==r?(b=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=b):b=e[45];let _;e[46]!==l||e[47]!==i?(_=j=>l({to:"/commerce-onboarding",search:{org:j.slug,siteUrl:i}}),e[46]=l,e[47]=i,e[48]=_):_=e[48];let T;e[49]===Symbol.for("react.memo_cache_sentinel")?(T=()=>f(!0),e[49]=T):T=e[49];let z;e[50]!==r?(z=r("routes.commerceOnboarding.createNewOrg"),e[50]=r,e[51]=z):z=e[51];let R;e[52]!==p||e[53]!==b||e[54]!==_||e[55]!==z?(R=o.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:o.jsx(Ve,{organizations:p,selectLabel:b,onSelected:_,onCreateNew:T,createNewLabel:z})}),e[52]=p,e[53]=b,e[54]=_,e[55]=z,e[56]=R):R=e[56];let U;e[57]!==x||e[58]!==R?(U=o.jsxs("div",{className:"grid gap-10",children:[x,R]}),e[57]=x,e[58]=R,e[59]=U):U=e[59];let M;e[60]!==l||e[61]!==i?(M=j=>{Se(),l({to:"/commerce-onboarding",search:{org:j,siteUrl:i}})},e[60]=l,e[61]=i,e[62]=M):M=e[62];let P;e[63]!==u||e[64]!==M?(P=o.jsx(qe,{open:u,onOpenChange:f,onCreated:M}),e[63]=u,e[64]=M,e[65]=P):P=e[65];let L;return e[66]!==U||e[67]!==P?(L=o.jsxs(B,{children:[U,P]}),e[66]=U,e[67]=P,e[68]=L):L=e[68],L}if(!m){let g;e[69]!==v?(g=()=>{v.reset(),v.mutate()},e[69]=v,e[70]=g):g=e[70];let h;return e[71]!==v||e[72]!==g?(h=o.jsx(Dt,{mutation:v,onRetry:g}),e[71]=v,e[72]=g,e[73]=h):h=e[73],h}const C=m;if(C?.success&&(C.status==="created"||C.status==="joined"||C.status==="already_has_organization")&&C.organization){let g;return e[74]!==C.organization||e[75]!==i?(g=o.jsx(ve,{org:C.organization,initialSiteUrl:i}),e[74]=C.organization,e[75]=i,e[76]=g):g=e[76],g}if(C?.status==="ambiguous"&&C.organizations&&C.organizations.length>0){let g;e[77]!==r?(g=r("routes.commerceOnboarding.chooseOrg"),e[77]=r,e[78]=g):g=e[78];let h;e[79]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[79]=r,e[80]=h):h=e[80];let x;e[81]!==g||e[82]!==h?(x=o.jsx(J,{title:g,description:h}),e[81]=g,e[82]=h,e[83]=x):x=e[83];const b=C.organizations,_=C.domain??void 0;let T;e[84]!==l||e[85]!==i?(T=(X,Z)=>{Se(),c({...X,slug:Z}),l({to:"/commerce-onboarding",search:{org:Z,siteUrl:i}})},e[84]=l,e[85]=i,e[86]=T):T=e[86];let z;e[87]===Symbol.for("react.memo_cache_sentinel")?(z=()=>f(!0),e[87]=z):z=e[87];let R;e[88]!==r?(R=r("routes.commerceOnboarding.createNewOrg"),e[88]=r,e[89]=R):R=e[89];let U;e[90]!==C.organizations||e[91]!==_||e[92]!==T||e[93]!==R?(U=o.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:o.jsx(Ve,{organizations:b,domain:_,onJoined:T,onCreateNew:z,createNewLabel:R})}),e[90]=C.organizations,e[91]=_,e[92]=T,e[93]=R,e[94]=U):U=e[94];let M;e[95]!==U||e[96]!==x?(M=o.jsxs("div",{className:"grid gap-10",children:[x,U]}),e[95]=U,e[96]=x,e[97]=M):M=e[97];let P;e[98]!==l||e[99]!==i?(P=X=>{Se(),l({to:"/commerce-onboarding",search:{org:X,siteUrl:i}})},e[98]=l,e[99]=i,e[100]=P):P=e[100];let L;e[101]!==u||e[102]!==P?(L=o.jsx(qe,{open:u,onOpenChange:f,onCreated:P}),e[101]=u,e[102]=P,e[103]=L):L=e[103];let j;return e[104]!==M||e[105]!==L?(j=o.jsxs(B,{children:[M,L]}),e[104]=M,e[105]=L,e[106]=j):j=e[106],j}let I;e[107]!==r?(I=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[107]=r,e[108]=I):I=e[108];let E;e[109]!==C?.error||e[110]!==r?(E=C?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[109]=C?.error,e[110]=r,e[111]=E):E=e[111];let A;e[112]!==r?(A=r("routes.commerceOnboarding.retryAgain"),e[112]=r,e[113]=A):A=e[113];let W;e[114]!==v?(W=()=>{d(null),v.reset()},e[114]=v,e[115]=W):W=e[115];let q;return e[116]!==I||e[117]!==E||e[118]!==A||e[119]!==W?(q=o.jsx(_e,{title:I,description:E,actionLabel:A,onRetry:W}),e[116]=I,e[117]=E,e[118]=A,e[119]=W,e[120]=q):q=e[120],q}async function Mt(){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&&Se(),e}function At(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Dt(t){const e=N.c(16),{mutation:s,onRetry:i}=t,r=Q(),l=Y.useRef(!1);let a;e[0]!==s?(a=d=>{!d||l.current||(l.current=!0,s.mutate())},e[0]=s,e[1]=a):a=e[1];const n=a;if(s.error){let d;e[2]!==r?(d=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=d):d=e[3];let u;e[4]!==r?(u=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=u):u=e[5];let f;e[6]!==r?(f=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=f):f=e[7];let p;return e[8]!==i||e[9]!==d||e[10]!==u||e[11]!==f?(p=o.jsx(_e,{title:d,description:u,actionLabel:f,onRetry:i}),e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=p):p=e[12],p}let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx($e,{variant:"generic"}),e[13]=c):c=e[13];let m;return e[14]!==n?(m=o.jsx(B,{children:o.jsx("div",{ref:n,children:c})}),e[14]=n,e[15]=m):m=e[15],m}function J(t){const e=N.c(8),{title:s,description:i}=t,r=ot();let l;e[0]!==r?(l=r?o.jsx(tt,{host:r}):o.jsxs("div",{children:[o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=r,e[1]=l):l=e[1];let a;e[2]!==i||e[3]!==s?(a=(s||i)&&o.jsxs("div",{className:"space-y-2",children:[s&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:s}),i&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:i})]}),e[2]=i,e[3]=s,e[4]=a):a=e[4];let n;return e[5]!==l||e[6]!==a?(n=o.jsxs("div",{className:"grid gap-10",children:[l,a]}),e[5]=l,e[6]=a,e[7]=n):n=e[7],n}function _e(t){const e=N.c(9),{title:s,description:i,actionLabel:r,onRetry:l}=t;let a;e[0]!==i||e[1]!==s?(a=o.jsx(J,{title:s,description:i}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let n;e[3]!==r||e[4]!==l?(n=o.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:l,children:r}),e[3]=r,e[4]=l,e[5]=n):n=e[5];let c;return e[6]!==a||e[7]!==n?(c=o.jsx(B,{children:o.jsxs("div",{className:"grid gap-10",children:[a,n]})}),e[6]=a,e[7]=n,e[8]=c):c=e[8],c}function ve(t){const e=N.c(13),{org:s,initialSiteUrl:i}=t,r=Q(),{data:l}=Ae.useSession(),[a]=Ee(),n=l?.user?.email;let c;e[0]!==i||e[1]!==a.language||e[2]!==n?(c=De({siteUrl:i,email:n,locale:a.language}),e[0]=i,e[1]=a.language,e[2]=n,e[3]=c):c=e[3];const m=c;let d;e[4]!==m||e[5]!==s.id?(d=o.jsx(Fe,{href:m,orgId:s.id}),e[4]=m,e[5]=s.id,e[6]=d):d=e[6];const u=d;let f;return e[7]!==i||e[8]!==u||e[9]!==s||e[10]!==l?.user?.email||e[11]!==r?(f=o.jsx(at,{children:p=>{const{reset:O}=p;return o.jsx(ct,{fallback:v=>{const{error:w,resetError:C}=v;return o.jsx(B,{visual:u,children:o.jsx(Ft,{orgName:s.name,message:w instanceof Error?w.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{O(),C()}})})},children:o.jsx(Y.Suspense,{fallback:o.jsx(it,{visual:u}),children:o.jsx($t,{org:s,initialSiteUrl:i,sessionEmail:l?.user?.email},`${s.id}:${i??""}`)})})}}),e[7]=i,e[8]=u,e[9]=s,e[10]=l?.user?.email,e[11]=r,e[12]=f):f=e[12],f}function it(t){const e=N.c(3),{visual:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(J,{}),o.jsx(et,{})]}),e[0]=i):i=e[0];let r;return e[1]!==s?(r=o.jsx(B,{align:"fill",visual:s,children:i}),e[1]=s,e[2]=r):r=e[2],r}function Ft(t){const e=N.c(19),{orgName:s,message:i,onRetry:r}=t,l=Q();let a;e[0]!==l?(a=l("routes.commerceOnboarding.commerceDiagnostic"),e[0]=l,e[1]=a):a=e[1];let n;e[2]!==s||e[3]!==l?(n=l("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s}),e[2]=s,e[3]=l,e[4]=n):n=e[4];let c;e[5]!==a||e[6]!==n?(c=o.jsx(J,{title:a,description:n}),e[5]=a,e[6]=n,e[7]=c):c=e[7];let m;e[8]!==i?(m=o.jsx(we,{message:i}),e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l?(d=l("routes.commerceOnboarding.retryAgain"),e[10]=l,e[11]=d):d=e[11];let u;e[12]!==r||e[13]!==d?(u=o.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:r,children:d}),e[12]=r,e[13]=d,e[14]=u):u=e[14];let f;return e[15]!==c||e[16]!==m||e[17]!==u?(f=o.jsxs("div",{className:"grid gap-10",children:[c,m,u]}),e[15]=c,e[16]=m,e[17]=u,e[18]=f):f=e[18],f}function $t(t){const e=N.c(135),{org:s,initialSiteUrl:i,sessionEmail:r}=t;let l;e[0]!==s.id||e[1]!==s.slug?(l={connectionId:Ct,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l):l=e[2];const a=jt(l),[n,c]=Y.useState(i??""),[m,d]=Y.useState(null),u=Y.useRef(!1),f=Ot.COMMERCE_DISCOVERY(s.id),p=vt(s.id),O=He.commerceDiscoveryConnection(s.id,f);let v;e[3]!==f||e[4]!==a?(v=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:f}});return Le(y)},e[3]=f,e[4]=a,e[5]=v):v=e[5];let w;e[6]!==O||e[7]!==v?(w={queryKey:O,queryFn:v,retry:!1},e[6]=O,e[7]=v,e[8]=w):w=e[8];const C=Be(w),I=He.commerceDiscoveryVirtualMcp(s.id,p);let E;e[9]!==a||e[10]!==p?(E=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Le(y)},e[9]=a,e[10]=p,e[11]=E):E=e[11];let A;e[12]!==I||e[13]!==E?(A={queryKey:I,queryFn:E,retry:!1},e[12]=I,e[13]=E,e[14]=A):A=e[14];const W=Be(A);let q;e[15]!==a?(q=async y=>{const S=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Le(S)},e[15]=a,e[16]=q):q=e[16];let g;e[17]!==C||e[18]!==s.id||e[19]!==W?(g=(y,S)=>{ue("commerce_onboarding_setup_succeeded",{domain:Me(S)??void 0,organization_id:s.id}),d(null),C.refetch(),W.refetch()},e[17]=C,e[18]=s.id,e[19]=W,e[20]=g):g=e[20];let h;e[21]!==s.id?(h=(y,S)=>{ue("commerce_onboarding_setup_failed",{domain:Me(S)??void 0,organization_id:s.id,error:y instanceof Error?y.message:String(y)}),d(y instanceof Error?y.message:"__configurationFailed")},e[21]=s.id,e[22]=h):h=e[22];let x;e[23]!==h||e[24]!==q||e[25]!==g?(x={mutationFn:q,retry:!1,onSuccess:g,onError:h},e[23]=h,e[24]=q,e[25]=g,e[26]=x):x=e[26];const b=Ze(x),_=!!C.data.item&&!!W.data.item,T=C.data.item,z=typeof T?.metadata?.siteUrl=="string"?T.metadata.siteUrl:void 0,R=i||n||"";let U;e[27]!==z||e[28]!==R?(U=ut(R,z),e[27]=z,e[28]=R,e[29]=U):U=e[29];const P=_&&U,L=i||n||z||"",j=Q(),[X]=Ee();let Z;e[30]!==L||e[31]!==X.language||e[32]!==r?(Z=De({siteUrl:L,email:r,locale:X.language}),e[30]=L,e[31]=X.language,e[32]=r,e[33]=Z):Z=e[33];const Ue=Z;let ge;e[34]!==Ue||e[35]!==s.id?(ge=o.jsx(Fe,{href:Ue,orgId:s.id}),e[34]=Ue,e[35]=s.id,e[36]=ge):ge=e[36];const $=ge;let fe;e[37]!==m||e[38]!==j?(fe=m?Ye(j,m):null,e[37]=m,e[38]=j,e[39]=fe):fe=e[39];const H=fe;let pe;e[40]!==b?(pe=y=>{const S=ze(y);if(!S.ok){d(S.error);return}d(null),b.mutate(S.value)},e[40]=b,e[41]=pe):pe=e[41];const ee=pe;let he;e[42]!==i||e[43]!==ee||e[44]!==P?(he=y=>{!y||u.current||P||!i||(u.current=!0,ee(i))},e[42]=i,e[43]=ee,e[44]=P,e[45]=he):he=e[45];const Pe=he;let be;e[46]!==s.id||e[47]!==ee||e[48]!==n?(be=y=>{y.preventDefault();const S=ze(n);S.ok&&ue("commerce_onboarding_site_url_submitted",{domain:new URL(S.value).hostname,organization_id:s.id}),ee(n)},e[46]=s.id,e[47]=ee,e[48]=n,e[49]=be):be=e[49];const V=be;if(P){const y=s.slug;let S;e[50]===Symbol.for("react.memo_cache_sentinel")?(S=crypto.randomUUID(),e[50]=S):S=e[50];let k;e[51]!==s.slug?(k={org:y,taskId:S},e[51]=s.slug,e[52]=k):k=e[52];let D;e[53]!==s.id?(D=St(s.id),e[53]=s.id,e[54]=D):D=e[54];const G=L||void 0;let F;e[55]!==D.id||e[56]!==G?(F={virtualmcpid:D.id,connect:"1",siteUrl:G},e[55]=D.id,e[56]=G,e[57]=F):F=e[57];let K;return e[58]!==k||e[59]!==F?(K=o.jsx(mt,{to:"/$org/$taskId",params:k,search:F,replace:!0}),e[58]=k,e[59]=F,e[60]=K):K=e[60],K}if(b.isPending){let y;return e[61]!==$?(y=o.jsx(it,{visual:$}),e[61]=$,e[62]=y):y=e[62],y}if(i){let y,S,k,D,G,F,K,ne;if(e[63]!==$||e[64]!==V||e[65]!==i||e[66]!==s.name||e[67]!==b.isPending||e[68]!==n||e[69]!==j||e[70]!==H||e[71]!==Pe){ne=Symbol.for("react.early_return_sentinel");e:{const Ie=ze(i);if(!Ie.ok){let me;e[80]!==j?(me=j("routes.commerceOnboarding.commerceDiagnostic"),e[80]=j,e[81]=me):me=e[81];let de;e[82]!==s.name||e[83]!==j?(de=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[82]=s.name,e[83]=j,e[84]=de):de=e[84];let Ce;e[85]!==me||e[86]!==de?(Ce=o.jsx(J,{title:me,description:de}),e[85]=me,e[86]=de,e[87]=Ce):Ce=e[87];let je;e[88]!==V||e[89]!==b.isPending||e[90]!==n||e[91]!==H?(je=o.jsx(ke,{siteUrl:n,error:H,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[88]=V,e[89]=b.isPending,e[90]=n,e[91]=H,e[92]=je):je=e[92];const Re=o.jsxs("div",{className:"grid gap-10",children:[Ce,o.jsx(we,{message:Ye(j,Ie.error)}),je]});let Oe;e[93]!==$||e[94]!==Re?(Oe=o.jsx(B,{visual:$,children:Re}),e[93]=$,e[94]=Re,e[95]=Oe):Oe=e[95],ne=Oe;break e}S=B,K=$,G=Pe,F="grid gap-10",y=J,e[96]!==j?(k=j("routes.commerceOnboarding.commerceDiagnostic"),e[96]=j,e[97]=k):k=e[97],D=j("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:Ie.value})}e[63]=$,e[64]=V,e[65]=i,e[66]=s.name,e[67]=b.isPending,e[68]=n,e[69]=j,e[70]=H,e[71]=Pe,e[72]=y,e[73]=S,e[74]=k,e[75]=D,e[76]=G,e[77]=F,e[78]=K,e[79]=ne}else y=e[72],S=e[73],k=e[74],D=e[75],G=e[76],F=e[77],K=e[78],ne=e[79];if(ne!==Symbol.for("react.early_return_sentinel"))return ne;let le;e[98]!==y||e[99]!==k||e[100]!==D?(le=o.jsx(y,{title:k,description:D}),e[98]=y,e[99]=k,e[100]=D,e[101]=le):le=e[101];let ae;e[102]!==V||e[103]!==b.isPending||e[104]!==n||e[105]!==H?(ae=H?o.jsxs(o.Fragment,{children:[o.jsx(we,{message:H}),o.jsx(ke,{siteUrl:n,error:null,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V})]}):o.jsx(et,{}),e[102]=V,e[103]=b.isPending,e[104]=n,e[105]=H,e[106]=ae):ae=e[106];let ce;e[107]!==G||e[108]!==F||e[109]!==le||e[110]!==ae?(ce=o.jsxs("div",{ref:G,className:F,children:[le,ae]}),e[107]=G,e[108]=F,e[109]=le,e[110]=ae,e[111]=ce):ce=e[111];let ye;return e[112]!==S||e[113]!==K||e[114]!==ce?(ye=o.jsx(S,{visual:K,children:ce}),e[112]=S,e[113]=K,e[114]=ce,e[115]=ye):ye=e[115],ye}let te;e[116]!==j?(te=j("routes.commerceOnboarding.commerceDiagnostic"),e[116]=j,e[117]=te):te=e[117];let re;e[118]!==s.name||e[119]!==j?(re=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[118]=s.name,e[119]=j,e[120]=re):re=e[120];let oe;e[121]!==te||e[122]!==re?(oe=o.jsx(J,{title:te,description:re}),e[121]=te,e[122]=re,e[123]=oe):oe=e[123];let ie;e[124]!==V||e[125]!==b.isPending||e[126]!==n||e[127]!==H?(ie=o.jsx(ke,{siteUrl:n,error:H,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[124]=V,e[125]=b.isPending,e[126]=n,e[127]=H,e[128]=ie):ie=e[128];let se;e[129]!==oe||e[130]!==ie?(se=o.jsxs("div",{className:"grid gap-10",children:[oe,ie]}),e[129]=oe,e[130]=ie,e[131]=se):se=e[131];let xe;return e[132]!==$||e[133]!==se?(xe=o.jsx(B,{visual:$,children:se}),e[132]=$,e[133]=se,e[134]=xe):xe=e[134],xe}function ke(t){const e=N.c(30),{siteUrl:s,error:i,isSubmitting:r,onSiteUrlChange:l,onSubmit:a}=t,n=Q();let c;e[0]!==n?(c=n("routes.commerceOnboarding.siteUrlLabel"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==c?(m=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:c}),e[2]=c,e[3]=m):m=e[3];let d;e[4]!==l?(d=A=>l(A.target.value),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==n?(u=n("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=n,e[7]=u):u=e[7];const f=!!i;let p;e[8]!==r||e[9]!==s||e[10]!==d||e[11]!==u||e[12]!==f?(p=o.jsx(ht,{id:"commerce-site-url",type:"text",inputMode:"url",value:s,onChange:d,placeholder:u,"aria-invalid":f,disabled:r}),e[8]=r,e[9]=s,e[10]=d,e[11]=u,e[12]=f,e[13]=p):p=e[13];let O;e[14]!==i?(O=i?o.jsx(we,{message:i}):null,e[14]=i,e[15]=O):O=e[15];let v;e[16]!==m||e[17]!==p||e[18]!==O?(v=o.jsxs("div",{className:"grid gap-2",children:[m,p,O]}),e[16]=m,e[17]=p,e[18]=O,e[19]=v):v=e[19];let w;e[20]!==n?(w=n("routes.commerceOnboarding.authCopy.continue"),e[20]=n,e[21]=w):w=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(_t,{size:16}),e[22]=C):C=e[22];let I;e[23]!==r||e[24]!==w?(I=o.jsxs(Ne,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[w,C]}),e[23]=r,e[24]=w,e[25]=I):I=e[25];let E;return e[26]!==a||e[27]!==I||e[28]!==v?(E=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[v,I]}),e[26]=a,e[27]=I,e[28]=v,e[29]=E):E=e[29],E}function we(t){const e=N.c(2),{message:s}=t;let i;return e[0]!==s?(i=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:s}),e[0]=s,e[1]=i):i=e[1],i}export{go as default};
@@ -1,4 +1,4 @@
1
- import{c as R,j as s,B as M,b as J,F as ae,r as ce,z as de,t as V}from"./index-yLSGmj4T.js";import{A as ue,b as me}from"./alert-CnQZKblO.js";import{C as fe}from"./card-p1m4joJM.js";import{c as te,T as q,b as Q,a as se}from"./tabs-CJVJjlim.js";import{u as ne}from"./use-copy-DMIWbs_j.js";import{i as ie}from"./Check-PDGbmWh6.js";import{a as le}from"./Copy01-BrBG1mb-.js";import{i as xe}from"./Key01-CpvMyyf1.js";import{n as pe}from"./LinkExternal01-WEAeStl5.js";import{s as he}from"./Trash01-CM1y68V4.js";import{P as U}from"./index-tgHkjyXk.js";import{c as ge}from"./settings-section-CACVOiOT.js";import{u as je,a as ye,b as be}from"./use-api-keys-C2n2ey0Q.js";import"./sidebar-B6N4L01u.js";import"./LayoutLeft-CPbsS0H9.js";import"./use-mobile-VqZ3x1Sb.js";import"./X-QRTj5BrM.js";import"./tooltip-BF5M3Sw2.js";import"./ArrowUpRight-BWbL1ENY.js";import"./use-mcp-client-h32VLkS1.js";import"./auth-BSnkvOr9.js";function Ce(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function ve(e){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${e}/mcp/self`}function Ne({client:e,mode:t,url:a,apiKey:u}){const o=u??"<paste-your-api-key>",c=Ce();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${c} ${a}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${c} ${a} \\
1
+ import{c as R,j as s,B as M,b as J,F as ae,r as ce,z as de,t as V}from"./index-CLnzejRk.js";import{A as ue,b as me}from"./alert-eVIvUB7b.js";import{C as fe}from"./card-kXnPozrB.js";import{c as te,T as q,b as Q,a as se}from"./tabs-BwSFBg23.js";import{u as ne}from"./use-copy-j1yYhEBA.js";import{i as ie}from"./Check-DPU3qMnE.js";import{a as le}from"./Copy01-BHo0zxys.js";import{i as xe}from"./Key01-DHIIS9xh.js";import{n as pe}from"./LinkExternal01-CiybGNcX.js";import{s as he}from"./Trash01-DILZ0JhX.js";import{P as U}from"./index-MxGz5g6_.js";import{c as ge}from"./settings-section-nLz7CoIo.js";import{u as je,a as ye,b as be}from"./use-api-keys-DAJj6mw9.js";import"./sidebar-DQMWJt8C.js";import"./LayoutLeft-5wZy3XpT.js";import"./use-mobile-Bsue7ajb.js";import"./X-DK7Yc4rj.js";import"./tooltip-_nC8eSks.js";import"./ArrowUpRight-yTwz4fJX.js";import"./use-mcp-client-CNT1Qud6.js";import"./auth-CWeGXrYi.js";function Ce(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function ve(e){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${e}/mcp/self`}function Ne({client:e,mode:t,url:a,apiKey:u}){const o=u??"<paste-your-api-key>",c=Ce();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${c} ${a}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${c} ${a} \\
2
2
  --header "Authorization: Bearer ${o}"`};if(e==="cursor"){const l={url:a};return t==="api-key"&&(l.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[c]:l}},null,2)}}if(e==="codex"){const l=[`[mcp_servers.${c}]`,`url = "${a}"`];return t==="api-key"&&l.push(`http_headers = { "Authorization" = "Bearer ${o}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:l.join(`
3
3
  `)}}if(e==="claude-desktop"){const l={type:"http",url:a};return t==="api-key"&&(l.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"claude_desktop_config.json",code:JSON.stringify({mcpServers:{[c]:l}},null,2)}}return t==="oauth"?{language:"text",code:`${a}
4
4
 
@@ -1 +1 @@
1
- import{X as i,_ as r,Y as t,Z as e,a1 as o,ba as a,bl as d,cc as l,bk as u}from"./index-yLSGmj4T.js";const p=i({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:r(["authorization_code","client_credentials"])}),c=i({type:d("object"),properties:o(e(),a()).optional(),required:t(e()).optional()}).catchall(a()),b=l.extend({inputSchema:c,outputSchema:c.optional()}),m=i({headers:o(e(),e()).optional()}),h=i({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:t(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:o(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),s=i({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:r(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:u([h,m]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:p.nullable().describe("OAuth configuration"),configuration_state:o(e(),a()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:t(e()).nullable().optional().describe("Configuration scopes"),metadata:o(e(),a()).nullable().describe("Additional metadata (includes repository info)"),tools:t(b).nullable().describe("Discovered tools from MCP"),bindings:t(e()).nullable().describe("Detected bindings"),status:r(["active","inactive","error"]).describe("Current status")});s.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});s.partial();function f(n){return n!=null&&"command"in n}function g(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{f as i,g as p};
1
+ import{X as i,_ as r,Y as t,Z as e,a1 as o,ba as a,bl as d,cc as l,bk as u}from"./index-CLnzejRk.js";const p=i({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:r(["authorization_code","client_credentials"])}),c=i({type:d("object"),properties:o(e(),a()).optional(),required:t(e()).optional()}).catchall(a()),b=l.extend({inputSchema:c,outputSchema:c.optional()}),m=i({headers:o(e(),e()).optional()}),h=i({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:t(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:o(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),s=i({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:r(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:u([h,m]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:p.nullable().describe("OAuth configuration"),configuration_state:o(e(),a()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:t(e()).nullable().optional().describe("Configuration scopes"),metadata:o(e(),a()).nullable().describe("Additional metadata (includes repository info)"),tools:t(b).nullable().describe("Discovered tools from MCP"),bindings:t(e()).nullable().describe("Detected bindings"),status:r(["active","inactive","error"]).describe("Current status")});s.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});s.partial();function f(n){return n!=null&&"command"in n}function g(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{f as i,g as p};
@@ -1 +1 @@
1
- import{c as S,F as K,b9 as Q,K as H,b as q,m as $,j as x}from"./index-yLSGmj4T.js";import{u as G}from"./use-registry-connections-B6lkSEPQ.js";import{g as U}from"./use-organization-settings-CzXI6T7w.js";import{S as k,n as V}from"./use-mcp-client-h32VLkS1.js";import{u as X}from"./useInfiniteQuery-STmushV7.js";import{i as Y,f as z}from"./extract-connection-data-D4fmQsKZ.js";import{r as B,R as W}from"./retry-CErkP7V6.js";import{g as A}from"./connection-slug-eyAPH6o3.js";import{C as Z}from"./card-p1m4joJM.js";import{I as J}from"./integration-icon-DvJFOfr8.js";function ye(){const s=S.c(6),e=G(),t=U(),o=K().project.enabledPlugins??[];let n;if(s[0]!==o||s[1]!==t||s[2]!==e){let a;s[4]!==t?(a=r=>t(r.id),s[4]=t,s[5]=a):a=s[5],n=e.filter(a).map(O),o.includes("private-registry")&&t(k)&&n.push({id:k,title:"Private Registry",icon:null}),s[0]=o,s[1]=t,s[2]=e,s[3]=n}else n=s[3];return n}function O(s){return{id:s.id,title:s.title,icon:s.icon}}const ee=24,L=3;function F(s){return s.id.includes("community-registry")}function te(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(o=>t.map(n=>({field:n,operator:"contains",value:o})))}}function D(s,e,t,o,n){const a=s.map(l=>l.id).sort().join(","),r=te(n),{data:p,fetchNextPage:f,hasNextPage:d,isFetchingNextPage:g,isLoading:b}=X({queryKey:H.storeDiscovery(e,`${a}:${n??""}`),queryFn:async({pageParam:l})=>{const c=l??{};return await Promise.all(s.map(async i=>{const y=c[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const C=Y(i.id,e);try{return await B(async()=>{let u=null;try{u=await V({connectionId:i.id,orgId:e,orgSlug:t});const h={limit:ee};y&&(h.cursor=y),r&&(h.where=r);const N=await u.callTool({name:C,arguments:h}),v=N.structuredContent??N,P=v.nextCursor||v.cursor||void 0,R=z(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:R,nextCursor:P}}finally{await u?.close().catch(()=>{})}},{maxAttempts:L,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(u){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${L} attempts:`,u instanceof W?u.cause:u),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:l=>{const c={};let m=!1;for(const i of l)i.registryId&&(i.nextCursor?(c[i.registryId]=i.nextCursor,m=!0):c[i.registryId]="EXHAUSTED");return m?c:void 0},staleTime:3600*1e3,placeholderData:Q,retry:!1,enabled:s.length>0}),I=[];if(p?.pages)for(const l of p.pages)for(const c of l)for(const m of c.items)I.push({...m,_sourceName:m._sourceName??c.registryTitle,_sourceIcon:m._sourceIcon??c.registryIcon,_registryId:m._registryId??c.registryId});return{items:I,hasMore:d??!1,isLoadingMore:g,isInitialLoading:b,fetchNextPage:()=>{d&&!g&&f()}}}function he(s,e){const t=S.c(16),{org:o}=K();let n;t[0]!==s?(n=s.filter(ie),t[0]=s,t[1]=n):n=t[1];const a=n;let r;t[2]!==s?(r=s.filter(se),t[2]=s,t[3]=r):r=t[3];const p=r,f=D(a,o.id,o.slug,!0,e),d=D(p,o.id,o.slug,!0,e);let g;if(t[4]!==d.items||t[5]!==f.items){const y=new Set;g=[];const C=[...f.items,...d.items];for(const u of C){const h=`${u._registryId}:${u.id}`;y.has(h)||(y.add(h),g.push(u))}t[4]=d.items,t[5]=f.items,t[6]=g}else g=t[6];const b=f.isInitialLoading||d.isInitialLoading,I=f.isLoadingMore||d.isLoadingMore,l=f.hasMore||d.hasMore;let c;t[7]!==d||t[8]!==f?(c=()=>{f.hasMore&&f.fetchNextPage(),d.hasMore&&d.fetchNextPage()},t[7]=d,t[8]=f,t[9]=c):c=t[9];const m=c;let i;return t[10]!==l||t[11]!==b||t[12]!==I||t[13]!==g||t[14]!==m?(i={items:g,hasMore:l,isLoadingMore:I,isInitialLoading:b,loadMore:m},t[10]=l,t[11]=b,t[12]=I,t[13]=g,t[14]=m,t[15]=i):i=t[15],i}function se(s){return F(s)}function ie(s){return!F(s)}function xe(s){const e=new Map;for(const n of s){const a=A(n),r=e.get(a);r?r.push(n):e.set(a,[n])}const t=[],o=new Set;for(const n of s){const a=A(n);if(o.has(a))continue;o.add(a);const r=e.get(a),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:a,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function ve(s){const e=S.c(43),{connection:t,onClick:o,headerActions:n,headerActionsAlwaysVisible:a,footer:r,className:p,fallbackIcon:f,selected:d}=s,g=a===void 0?!1:a,b=q(),I=o&&"cursor-pointer hover:bg-muted/50";let l;e[0]!==p||e[1]!==I?(l=$("transition-colors group overflow-hidden flex flex-col h-full",I,p),e[0]=p,e[1]=I,e[2]=l):l=e[2];const c=o?"button":void 0,m=o?0:void 0,i=o&&d!==void 0?d:void 0;let y;e[3]!==o?(y=o?E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}:void 0,e[3]=o,e[4]=y):y=e[4];let C;e[5]!==t.icon||e[6]!==t.title||e[7]!==f?(C=x.jsx(J,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[5]=t.icon,e[6]=t.title,e[7]=f,e[8]=C):C=e[8];let u;e[9]!==n||e[10]!==g?(u=n&&x.jsx("div",{className:$("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:ne,children:n}),e[9]=n,e[10]=g,e[11]=u):u=e[11];let h;e[12]!==u?(h=x.jsx("div",{className:"relative",children:u}),e[12]=u,e[13]=h):h=e[13];let N;e[14]!==h||e[15]!==C?(N=x.jsxs("div",{className:"flex items-start justify-between",children:[C,h]}),e[14]=h,e[15]=C,e[16]=N):N=e[16];let v;e[17]!==t.title?(v=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[17]=t.title,e[18]=v):v=e[18];let P;e[19]!==t.description||e[20]!==b?(P=t.description||b("connections.connectionCard.noDescription"),e[19]=t.description,e[20]=b,e[21]=P):P=e[21];let R;e[22]!==P?(R=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=R):R=e[23];let j;e[24]!==v||e[25]!==R?(j=x.jsxs("div",{className:"flex flex-col gap-1",children:[v,R]}),e[24]=v,e[25]=R,e[26]=j):j=e[26];let M;e[27]!==N||e[28]!==j?(M=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,j]}),e[27]=N,e[28]=j,e[29]=M):M=e[29];let w;e[30]!==r?(w=r&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:oe,children:r})}),e[30]=r,e[31]=w):w=e[31];let T;e[32]!==M||e[33]!==w?(T=x.jsxs("div",{className:"flex flex-col flex-1",children:[M,w]}),e[32]=M,e[33]=w,e[34]=T):T=e[34];let _;return e[35]!==o||e[36]!==T||e[37]!==l||e[38]!==c||e[39]!==m||e[40]!==i||e[41]!==y?(_=x.jsx(Z,{className:l,onClick:o,role:c,tabIndex:m,"aria-pressed":i,onKeyDown:y,children:T}),e[35]=o,e[36]=T,e[37]=l,e[38]=c,e[39]=m,e[40]=i,e[41]=y,e[42]=_):_=e[42],_}function oe(s){return s.stopPropagation()}function ne(s){return s.stopPropagation()}export{ve as C,he as a,xe as g,ye as u};
1
+ import{c as S,F as K,b9 as Q,K as H,b as q,m as $,j as x}from"./index-CLnzejRk.js";import{u as G}from"./use-registry-connections-CE8CfvMT.js";import{g as U}from"./use-organization-settings-BeFMfzSB.js";import{S as k,n as V}from"./use-mcp-client-CNT1Qud6.js";import{u as X}from"./useInfiniteQuery-CJbTyn50.js";import{i as Y,f as z}from"./extract-connection-data-CT6fsBnt.js";import{r as B,R as W}from"./retry-CErkP7V6.js";import{g as A}from"./connection-slug-eyAPH6o3.js";import{C as Z}from"./card-kXnPozrB.js";import{I as J}from"./integration-icon-DA5NwAGO.js";function ye(){const s=S.c(6),e=G(),t=U(),o=K().project.enabledPlugins??[];let n;if(s[0]!==o||s[1]!==t||s[2]!==e){let a;s[4]!==t?(a=r=>t(r.id),s[4]=t,s[5]=a):a=s[5],n=e.filter(a).map(O),o.includes("private-registry")&&t(k)&&n.push({id:k,title:"Private Registry",icon:null}),s[0]=o,s[1]=t,s[2]=e,s[3]=n}else n=s[3];return n}function O(s){return{id:s.id,title:s.title,icon:s.icon}}const ee=24,L=3;function F(s){return s.id.includes("community-registry")}function te(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(o=>t.map(n=>({field:n,operator:"contains",value:o})))}}function D(s,e,t,o,n){const a=s.map(l=>l.id).sort().join(","),r=te(n),{data:p,fetchNextPage:f,hasNextPage:d,isFetchingNextPage:g,isLoading:b}=X({queryKey:H.storeDiscovery(e,`${a}:${n??""}`),queryFn:async({pageParam:l})=>{const c=l??{};return await Promise.all(s.map(async i=>{const y=c[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const C=Y(i.id,e);try{return await B(async()=>{let u=null;try{u=await V({connectionId:i.id,orgId:e,orgSlug:t});const h={limit:ee};y&&(h.cursor=y),r&&(h.where=r);const N=await u.callTool({name:C,arguments:h}),v=N.structuredContent??N,P=v.nextCursor||v.cursor||void 0,R=z(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:R,nextCursor:P}}finally{await u?.close().catch(()=>{})}},{maxAttempts:L,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(u){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${L} attempts:`,u instanceof W?u.cause:u),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:l=>{const c={};let m=!1;for(const i of l)i.registryId&&(i.nextCursor?(c[i.registryId]=i.nextCursor,m=!0):c[i.registryId]="EXHAUSTED");return m?c:void 0},staleTime:3600*1e3,placeholderData:Q,retry:!1,enabled:s.length>0}),I=[];if(p?.pages)for(const l of p.pages)for(const c of l)for(const m of c.items)I.push({...m,_sourceName:m._sourceName??c.registryTitle,_sourceIcon:m._sourceIcon??c.registryIcon,_registryId:m._registryId??c.registryId});return{items:I,hasMore:d??!1,isLoadingMore:g,isInitialLoading:b,fetchNextPage:()=>{d&&!g&&f()}}}function he(s,e){const t=S.c(16),{org:o}=K();let n;t[0]!==s?(n=s.filter(ie),t[0]=s,t[1]=n):n=t[1];const a=n;let r;t[2]!==s?(r=s.filter(se),t[2]=s,t[3]=r):r=t[3];const p=r,f=D(a,o.id,o.slug,!0,e),d=D(p,o.id,o.slug,!0,e);let g;if(t[4]!==d.items||t[5]!==f.items){const y=new Set;g=[];const C=[...f.items,...d.items];for(const u of C){const h=`${u._registryId}:${u.id}`;y.has(h)||(y.add(h),g.push(u))}t[4]=d.items,t[5]=f.items,t[6]=g}else g=t[6];const b=f.isInitialLoading||d.isInitialLoading,I=f.isLoadingMore||d.isLoadingMore,l=f.hasMore||d.hasMore;let c;t[7]!==d||t[8]!==f?(c=()=>{f.hasMore&&f.fetchNextPage(),d.hasMore&&d.fetchNextPage()},t[7]=d,t[8]=f,t[9]=c):c=t[9];const m=c;let i;return t[10]!==l||t[11]!==b||t[12]!==I||t[13]!==g||t[14]!==m?(i={items:g,hasMore:l,isLoadingMore:I,isInitialLoading:b,loadMore:m},t[10]=l,t[11]=b,t[12]=I,t[13]=g,t[14]=m,t[15]=i):i=t[15],i}function se(s){return F(s)}function ie(s){return!F(s)}function xe(s){const e=new Map;for(const n of s){const a=A(n),r=e.get(a);r?r.push(n):e.set(a,[n])}const t=[],o=new Set;for(const n of s){const a=A(n);if(o.has(a))continue;o.add(a);const r=e.get(a),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:a,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function ve(s){const e=S.c(43),{connection:t,onClick:o,headerActions:n,headerActionsAlwaysVisible:a,footer:r,className:p,fallbackIcon:f,selected:d}=s,g=a===void 0?!1:a,b=q(),I=o&&"cursor-pointer hover:bg-muted/50";let l;e[0]!==p||e[1]!==I?(l=$("transition-colors group overflow-hidden flex flex-col h-full",I,p),e[0]=p,e[1]=I,e[2]=l):l=e[2];const c=o?"button":void 0,m=o?0:void 0,i=o&&d!==void 0?d:void 0;let y;e[3]!==o?(y=o?E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}:void 0,e[3]=o,e[4]=y):y=e[4];let C;e[5]!==t.icon||e[6]!==t.title||e[7]!==f?(C=x.jsx(J,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[5]=t.icon,e[6]=t.title,e[7]=f,e[8]=C):C=e[8];let u;e[9]!==n||e[10]!==g?(u=n&&x.jsx("div",{className:$("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:ne,children:n}),e[9]=n,e[10]=g,e[11]=u):u=e[11];let h;e[12]!==u?(h=x.jsx("div",{className:"relative",children:u}),e[12]=u,e[13]=h):h=e[13];let N;e[14]!==h||e[15]!==C?(N=x.jsxs("div",{className:"flex items-start justify-between",children:[C,h]}),e[14]=h,e[15]=C,e[16]=N):N=e[16];let v;e[17]!==t.title?(v=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[17]=t.title,e[18]=v):v=e[18];let P;e[19]!==t.description||e[20]!==b?(P=t.description||b("connections.connectionCard.noDescription"),e[19]=t.description,e[20]=b,e[21]=P):P=e[21];let R;e[22]!==P?(R=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=R):R=e[23];let j;e[24]!==v||e[25]!==R?(j=x.jsxs("div",{className:"flex flex-col gap-1",children:[v,R]}),e[24]=v,e[25]=R,e[26]=j):j=e[26];let M;e[27]!==N||e[28]!==j?(M=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,j]}),e[27]=N,e[28]=j,e[29]=M):M=e[29];let w;e[30]!==r?(w=r&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:oe,children:r})}),e[30]=r,e[31]=w):w=e[31];let T;e[32]!==M||e[33]!==w?(T=x.jsxs("div",{className:"flex flex-col flex-1",children:[M,w]}),e[32]=M,e[33]=w,e[34]=T):T=e[34];let _;return e[35]!==o||e[36]!==T||e[37]!==l||e[38]!==c||e[39]!==m||e[40]!==i||e[41]!==y?(_=x.jsx(Z,{className:l,onClick:o,role:c,tabIndex:m,"aria-pressed":i,onKeyDown:y,children:T}),e[35]=o,e[36]=T,e[37]=l,e[38]=c,e[39]=m,e[40]=i,e[41]=y,e[42]=_):_=e[42],_}function oe(s){return s.stopPropagation()}function ne(s){return s.stopPropagation()}export{ve as C,he as a,xe as g,ye as u};