decocms 3.76.2 → 3.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/dist/client/assets/{AlertCircle-BZqAQZBb.js → AlertCircle-Caru_t3W.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-CUPFfker.js → ArrowUpRight-B2Dt0814.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-DOPRdShL.js → CheckCircle-CpjuZYS5.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-BhLFFAly.js → ChevronDown-DeW1WG4N.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-veOSKT91.js → ChevronLeft-DhtKqfYa.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-tj4xbWmM.js → ChevronRight-DSC2aiCG.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-DhHPsDAS.js → ChevronUp-CiZNoBS5.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-kcsdrim_.js → DotsVertical-CAFbny0A.js} +1 -1
  9. package/dist/client/assets/{Eye-BfNssVzk.js → Eye-BSAOg3tU.js} +1 -1
  10. package/dist/client/assets/{FilterLines-D2obCQW_.js → FilterLines-BWsEA6cc.js} +1 -1
  11. package/dist/client/assets/{Globe01-CJXHyXNe.js → Globe01-B8cJAk0V.js} +1 -1
  12. package/dist/client/assets/{Globe04-PQ0ejRYI.js → Globe04-BHoeDf9U.js} +1 -1
  13. package/dist/client/assets/{HardDrive-DEG8fjxw.js → HardDrive-Ca-rpUZp.js} +1 -1
  14. package/dist/client/assets/{Key01-xj4UQriu.js → Key01-hqliL23I.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-C9-KQh8d.js → LayoutLeft-DfLCxQJZ.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-DtLsAcMy.js → LinkExternal01-C-uuQSHY.js} +1 -1
  17. package/dist/client/assets/{Monitor01-CvNVisni.js → Monitor01-C4mUj5DO.js} +1 -1
  18. package/dist/client/assets/{Palette-yNiXmyHD.js → Palette-BqPdnSvn.js} +1 -1
  19. package/dist/client/assets/{Play-C0DhAO4u.js → Play-u3Xpo-3H.js} +1 -1
  20. package/dist/client/assets/{Plus-BRQannbC.js → Plus-e8vsh1yI.js} +1 -1
  21. package/dist/client/assets/{SearchMd-CttVjXUQ.js → SearchMd-pbTyIZQ0.js} +1 -1
  22. package/dist/client/assets/{Settings02-kQ4zmp5P.js → Settings02-1OASYAA8.js} +1 -1
  23. package/dist/client/assets/{Shield01-BZZVugf_.js → Shield01-BZP4Q_Vm.js} +1 -1
  24. package/dist/client/assets/{Star01-CFj5T2Jl.js → Star01-BokvC0Yc.js} +1 -1
  25. package/dist/client/assets/{Stars01-C4FyHP_L.js → Stars01-CM7BslwP.js} +1 -1
  26. package/dist/client/assets/{Stars02-Bo19XD__.js → Stars02-DTDItJ62.js} +1 -1
  27. package/dist/client/assets/{Sun-CcSW7Ngf.js → Sun-CO5Z2lcQ.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-BVKPeJMU.js → SwitchHorizontal01-DCwdrg-O.js} +1 -1
  29. package/dist/client/assets/{Tool01-AyuVwnGv.js → Tool01-BDvWQGEc.js} +1 -1
  30. package/dist/client/assets/{Trash01-BZXmKzie.js → Trash01-C3khOwsb.js} +1 -1
  31. package/dist/client/assets/{Upload01-D4ez0Mu3.js → Upload01-BWq8M5mQ.js} +1 -1
  32. package/dist/client/assets/{User01-Dz33ODze.js → User01-B5NDreK2.js} +1 -1
  33. package/dist/client/assets/{Users01-aBataJ8N.js → Users01-BM4ZmEbl.js} +1 -1
  34. package/dist/client/assets/{Users03-C6siA5mE.js → Users03-DPSOJZh_.js} +1 -1
  35. package/dist/client/assets/{X-DC2HG4lX.js → X-CdcmL6WW.js} +1 -1
  36. package/dist/client/assets/XCircle-YOrPaSTA.js +1 -0
  37. package/dist/client/assets/{XClose-BcOWKb5Q.js → XClose-B1WSb9MQ.js} +1 -1
  38. package/dist/client/assets/{Zap-OOZsYg72.js → Zap-CJ80I152.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-ok_KEP9c.js → ZapSquare-CgWRLEJy.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-cYq1CP_X.js → ZoomOut-OytsIYD1.js} +1 -1
  41. package/dist/client/assets/{access-gate-uvqL8ENQ.js → access-gate-DqzudH0L.js} +1 -1
  42. package/dist/client/assets/add-section-modal-kp6f6erO.js +1 -0
  43. package/dist/client/assets/agent-icon-DY5w59uF.js +1 -0
  44. package/dist/client/assets/agents-list-DDHbeg5p.js +1 -0
  45. package/dist/client/assets/{ai-providers-CocgfzPQ.js → ai-providers-P8q844Dm.js} +1 -1
  46. package/dist/client/assets/{alert-CUg2Lij_.js → alert-FbljLOaQ.js} +1 -1
  47. package/dist/client/assets/{alert-dialog-BUQoXI1j.js → alert-dialog-BO7X_BMw.js} +1 -1
  48. package/dist/client/assets/app-editor-C4YX8u15.js +1 -0
  49. package/dist/client/assets/{auth-B9bEkbYh.js → auth-DpDDb6PJ.js} +1 -1
  50. package/dist/client/assets/{auth-catchall-CoB3zmdz.js → auth-catchall-BwEPZ9sp.js} +1 -1
  51. package/dist/client/assets/{auth-entry-CGeJ7qYU.js → auth-entry-9rxagxJL.js} +1 -1
  52. package/dist/client/assets/{auth-split-layout-DAQR8Zen.js → auth-split-layout-6kbG-q9M.js} +1 -1
  53. package/dist/client/assets/authenticate-and-persist-oauth-SkR5Q2kF.js +1 -0
  54. package/dist/client/assets/{automation-list-row-DMPjogBl.js → automation-list-row-BZROLPDh.js} +1 -1
  55. package/dist/client/assets/{automation-runs-y9iHLMe2.js → automation-runs-VqVE_yW9.js} +1 -1
  56. package/dist/client/assets/automations-1DiKFOBq.js +1 -0
  57. package/dist/client/assets/{avatar-CKJB3djy.js → avatar-C7RfbSV0.js} +1 -1
  58. package/dist/client/assets/{badge-DUlP8HvP.js → badge-S-QCOrNN.js} +1 -1
  59. package/dist/client/assets/{block-document-Cft5FVFJ.js → block-document-CLeG1P-N.js} +1 -1
  60. package/dist/client/assets/brand-context-GZiNd5v6.js +1 -0
  61. package/dist/client/assets/{buckets-DXjIiLHp.js → buckets-DTeRBDWJ.js} +1 -1
  62. package/dist/client/assets/{calendar-DDwlGULz.js → calendar-katBc34c.js} +1 -1
  63. package/dist/client/assets/{capability-load-error-DTVGdoZZ.js → capability-load-error-D72JLeT1.js} +1 -1
  64. package/dist/client/assets/{card-D7O9yDM9.js → card-B0EjU25K.js} +1 -1
  65. package/dist/client/assets/category-editor-C-xyYK6m.js +1 -0
  66. package/dist/client/assets/{chat-context-GA_fpERN.js → chat-context-DdkEgZ9_.js} +6 -6
  67. package/dist/client/assets/{checkbox-DOg3LODJ.js → checkbox-DbzbLYfL.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-Jeg6Lv3T.js → cli-auth-success-C9MRaugF.js} +1 -1
  69. package/dist/client/assets/collection-detail-DU1VM1YR.js +1 -0
  70. package/dist/client/assets/{collection-display-button-b4s7O-gz.js → collection-display-button-BNnw7G4D.js} +1 -1
  71. package/dist/client/assets/{collection-search-DC-7DcrR.js → collection-search-hESxl20y.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-CRIZ0CX_.js → collection-tabs-99Rq6QsS.js} +1 -1
  73. package/dist/client/assets/{command-BzTLypzr.js → command-DJiJXkzC.js} +1 -1
  74. package/dist/client/assets/commerce-onboarding-YO2BywhJ.js +1 -0
  75. package/dist/client/assets/{connect-desktop-dialog-uLnBe_nQ.js → connect-desktop-dialog-DR4-xhbf.js} +1 -1
  76. package/dist/client/assets/{connection-card-DPkWnrYu.js → connection-card-CJjprKft.js} +1 -1
  77. package/dist/client/assets/connection-detail-DZAfgvu2.js +1 -0
  78. package/dist/client/assets/{connection-form-helpers-B_oQdAph.js → connection-form-helpers-DT5c99yt.js} +1 -1
  79. package/dist/client/assets/connections-B3yso__h.js +1 -0
  80. package/dist/client/assets/{context-menu-DegHHWIw.js → context-menu-B3oZHh4c.js} +1 -1
  81. package/dist/client/assets/{decopilot-BsjqLgTH.js → decopilot-KvFscv5D.js} +1 -1
  82. package/dist/client/assets/{decopilot-sse-pool-CZG5pZEa.js → decopilot-sse-pool-C9VeVJ93.js} +1 -1
  83. package/dist/client/assets/{dialog-DDL08EK8.js → dialog-jX6bYdqO.js} +1 -1
  84. package/dist/client/assets/{domain-settings-ctGoYy0P.js → domain-settings-DSTf_XC1.js} +1 -1
  85. package/dist/client/assets/{drawer-CTdCEiZw.js → drawer-EgN8HzIq.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-CgCZ8Mte.js → dropdown-menu-BOrPFviJ.js} +1 -1
  87. package/dist/client/assets/{empty-state-BDXQKaPV.js → empty-state-BZIY4ETU.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-D4y9_vmi.js → extract-connection-data-Dz1SJTDF.js} +1 -1
  89. package/dist/client/assets/file-explorer-CtIkaECZ.js +2 -0
  90. package/dist/client/assets/{file-type-icon-GfohFxwW.js → file-type-icon-CiTHpOyi.js} +1 -1
  91. package/dist/client/assets/{files-CjZS2qVw.js → files-D4cQybZ3.js} +1 -1
  92. package/dist/client/assets/{form-B9v_4_lt.js → form-D-Lg2Vno.js} +1 -1
  93. package/dist/client/assets/{general-CMdyBBfH.js → general-BLLTGXVC.js} +1 -1
  94. package/dist/client/assets/github-repo-picker-BtGY0bTC.js +1 -0
  95. package/dist/client/assets/{hooks-BI65IXS7.js → hooks-Bq2gpnHq.js} +1 -1
  96. package/dist/client/assets/{image-field-CEHk9cpM.js → image-field-CopsGD8K.js} +1 -1
  97. package/dist/client/assets/{import-from-deco-dialog-DDUPpwIu.js → import-from-deco-dialog-DTeSs8zZ.js} +2 -2
  98. package/dist/client/assets/{index-B2quJDhU.js → index-BIlZxD1s.js} +1 -1
  99. package/dist/client/assets/{index-BUTJwxVv.js → index-BMuKOY-R.js} +1 -1
  100. package/dist/client/assets/{index-DBKP_KxA.js → index-B_T2Tm_n.js} +1 -1
  101. package/dist/client/assets/{index-Br4BSsfF.js → index-CApC7A2-.js} +1 -1
  102. package/dist/client/assets/index-CpN1_PlS.js +1 -0
  103. package/dist/client/assets/{index-DVxNbd_g.js → index-CwCkKeIW.js} +1 -1
  104. package/dist/client/assets/{index-Cvc1xn-4.js → index-D9cso_OE.js} +4 -4
  105. package/dist/client/assets/{index-B8LUbsU-.js → index-DJ0Ge3cT.js} +12 -12
  106. package/dist/client/assets/index-DjsYubVL.js +1 -0
  107. package/dist/client/assets/{index-1J83wgnT.js → index-DsuFa3M3.js} +1 -1
  108. package/dist/client/assets/{index-CWT26dU0.js → index-FMQJTdgj.js} +2 -2
  109. package/dist/client/assets/{index-BI3_fNOm.js → index-OWX18MdF.js} +2 -2
  110. package/dist/client/assets/{index-B3siY4Ve.js → index-TfVSao84.js} +1 -1
  111. package/dist/client/assets/{index-YDkX6amF.js → index-an-q9BoC.js} +1 -1
  112. package/dist/client/assets/{index-redirect-7dYh9FF7.js → index-redirect-B5cnslmT.js} +1 -1
  113. package/dist/client/assets/{input-klr_kUC2.js → input-aftZq0qp.js} +1 -1
  114. package/dist/client/assets/{integration-icon-gcYOl2yq.js → integration-icon-Dn8UgHow.js} +1 -1
  115. package/dist/client/assets/{label-hfmZhqH1.js → label-BlTB1rsr.js} +1 -1
  116. package/dist/client/assets/{login-BwlkI7-F.js → login-DwqD6H9f.js} +1 -1
  117. package/dist/client/assets/{mcp-oauth-C5QgI6bG.js → mcp-oauth-DYo7_iWt.js} +1 -1
  118. package/dist/client/assets/{members-DtCaJnP7.js → members-BAmGZs_l.js} +2 -2
  119. package/dist/client/assets/{monaco-editor-YJUBj_D_.js → monaco-editor-dFjmNtXr.js} +1 -1
  120. package/dist/client/assets/{monitoring-stats-row-DYXC0MeT.js → monitoring-stats-row-DXzyXSPo.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-oHGZWLTi.js → oauth-callback-BnUvVOzM.js} +1 -1
  122. package/dist/client/assets/{oauth-callback-ai-provider-rWJe_yJL.js → oauth-callback-ai-provider-CtGpymDw.js} +1 -1
  123. package/dist/client/assets/{onboarding-C8e3_lZa.js → onboarding-tHyZv_uW.js} +1 -1
  124. package/dist/client/assets/{org-install-Bht2exTB.js → org-install-BJnctrXU.js} +1 -1
  125. package/dist/client/assets/{org-layout-DJtHiwbS.js → org-layout-DgadVfYy.js} +1 -1
  126. package/dist/client/assets/{organization-choice-Dye_3x23.js → organization-choice-HfpQcKxS.js} +1 -1
  127. package/dist/client/assets/{page-seo-form-Io0ovKiN.js → page-seo-form-j7a8Z1BY.js} +1 -1
  128. package/dist/client/assets/page-seo-sheet-C5rR31Cs.js +1 -0
  129. package/dist/client/assets/{popover-BvZF2bBr.js → popover-D43tJ8in.js} +1 -1
  130. package/dist/client/assets/post-editor-XU3B2wmV.js +1 -0
  131. package/dist/client/assets/{preview-dialog-BikVelEl.js → preview-dialog-BrHmAwG0.js} +1 -1
  132. package/dist/client/assets/{primitives-Bc5oh19Q.js → primitives-BRyBxVlk.js} +1 -1
  133. package/dist/client/assets/{profile-BoAJRU1a.js → profile-CLM3LuOb.js} +1 -1
  134. package/dist/client/assets/project-app-view-Bojee27q.js +1 -0
  135. package/dist/client/assets/record-editor-Cb2nxa0o.js +1 -0
  136. package/dist/client/assets/registry-DJ2WJB-k.js +2 -0
  137. package/dist/client/assets/{registry-layout-Dxd6kQFA.js → registry-layout-pqx5X3wF.js} +4 -4
  138. package/dist/client/assets/{require-capability-kyUIYw2A.js → require-capability-BQ22Wt23.js} +1 -1
  139. package/dist/client/assets/{required-auth-layout-BcilPdVi.js → required-auth-layout-wApn6jVI.js} +1 -1
  140. package/dist/client/assets/{reset-password-CPk5rTzD.js → reset-password-deaGgEkO.js} +1 -1
  141. package/dist/client/assets/roles-RG2bRHsu.js +1 -0
  142. package/dist/client/assets/save-referenced-block-B0RkutY2.js +1 -0
  143. package/dist/client/assets/{save-status-De_ZSd1F.js → save-status-BiRx7JAD.js} +1 -1
  144. package/dist/client/assets/{schema-form-C1MMeEGC.js → schema-form-sBBUMk07.js} +1 -1
  145. package/dist/client/assets/{scroll-area-BvvyxqKR.js → scroll-area-BSGl-_zx.js} +7 -7
  146. package/dist/client/assets/{search-input-B-LDSHMx.js → search-input-Cn14rzZS.js} +1 -1
  147. package/dist/client/assets/{secrets-Bq5342Un.js → secrets-D-nSpmHI.js} +1 -1
  148. package/dist/client/assets/{sections-editor-BU6mrjAz.js → sections-editor-NjvzZlHu.js} +1 -1
  149. package/dist/client/assets/{select-DwFQDgcX.js → select-BGb-ZPds.js} +1 -1
  150. package/dist/client/assets/{select-model-BWl1FGCY.js → select-model-C_rVNd_q.js} +1 -1
  151. package/dist/client/assets/seo-editor-Bvd2538m.js +1 -0
  152. package/dist/client/assets/{settings-layout-d5QwVuj0.js → settings-layout-CrGAcHuU.js} +1 -1
  153. package/dist/client/assets/{settings-section-rOWH4a9G.js → settings-section-Bc3yjWcB.js} +1 -1
  154. package/dist/client/assets/{sheet-XVV7S5b8.js → sheet-HFHR_AuU.js} +1 -1
  155. package/dist/client/assets/{shell-controls-D6QH2Gpe.js → shell-controls-HLzK4I7E.js} +1 -1
  156. package/dist/client/assets/{shell-layout-DIXTRmN4.js → shell-layout-LI1vyNzj.js} +1 -1
  157. package/dist/client/assets/{shell-route-loading-B5-wAKUU.js → shell-route-loading-BDOpNoYP.js} +1 -1
  158. package/dist/client/assets/{sidebar-Djn7svMG.js → sidebar-BGJoJ5IQ.js} +1 -1
  159. package/dist/client/assets/{skeleton-C-tuNjEZ.js → skeleton-hFHnIcZ0.js} +1 -1
  160. package/dist/client/assets/{sortable.esm-S2exVkMt.js → sortable.esm-DIVJmvz6.js} +1 -1
  161. package/dist/client/assets/{sso-KnN7dzsP.js → sso-Bn468zRH.js} +1 -1
  162. package/dist/client/assets/{store-DcHIPBce.js → store-DytIJvdt.js} +1 -1
  163. package/dist/client/assets/store-registry-C32JZ3Yi.js +2 -0
  164. package/dist/client/assets/{studio-tools-D8q7MEyE.js → studio-tools-eP_o-Bzq.js} +1 -1
  165. package/dist/client/assets/{switch-skMKJ2GI.js → switch-DalcHZ66.js} +1 -1
  166. package/dist/client/assets/{table-DsOuzcNK.js → table-CnWjZkvw.js} +1 -1
  167. package/dist/client/assets/{tabs-C0Vh3iPJ.js → tabs-BhJfCfA3.js} +1 -1
  168. package/dist/client/assets/task-status-BwSSlnug.js +1 -0
  169. package/dist/client/assets/{textarea-2KmLad1y.js → textarea-DTW1SKGc.js} +1 -1
  170. package/dist/client/assets/{toggle-group-6FcrOIsd.js → toggle-group-CRnMovNn.js} +1 -1
  171. package/dist/client/assets/{toolbar-DE_I2DnI.js → toolbar-BVgga9fW.js} +1 -1
  172. package/dist/client/assets/{tooltip-D_DwQRbZ.js → tooltip-DVHwyu-W.js} +1 -1
  173. package/dist/client/assets/{types-zC94Gae_.js → types-B1E3Ybp7.js} +1 -1
  174. package/dist/client/assets/{use-ai-providers-0DJv4c0H.js → use-ai-providers-DP8qFD8W.js} +1 -1
  175. package/dist/client/assets/{use-automations-CsLMaKM0.js → use-automations-QBk1wzKE.js} +1 -1
  176. package/dist/client/assets/use-capability-D3mzXNBE.js +1 -0
  177. package/dist/client/assets/{use-clock-tick-CqrkSCF6.js → use-clock-tick-YCiBQpNz.js} +1 -1
  178. package/dist/client/assets/{use-collections-dA9ibOHr.js → use-collections-sgcijgPQ.js} +1 -1
  179. package/dist/client/assets/{use-connection-C39BUY8e.js → use-connection-CFC8WumP.js} +1 -1
  180. package/dist/client/assets/{use-copy-DM9BeeKg.js → use-copy-BVyzmTt4.js} +1 -1
  181. package/dist/client/assets/{use-create-virtual-mcp-q3QYUSY1.js → use-create-virtual-mcp-40n1TbuY.js} +1 -1
  182. package/dist/client/assets/{use-debounced-autosave-BzGp2qae.js → use-debounced-autosave-tiHawAIR.js} +1 -1
  183. package/dist/client/assets/use-deco-credits-C1ftH3If.js +1 -0
  184. package/dist/client/assets/{use-delete-connection-CAqFRv-C.js → use-delete-connection-CUd76KVl.js} +1 -1
  185. package/dist/client/assets/{use-file-configs-CvRusjpd.js → use-file-configs-C2ceyi4L.js} +1 -1
  186. package/dist/client/assets/{use-infinite-scroll-DM0o0Ibp.js → use-infinite-scroll-CvmJXJdB.js} +1 -1
  187. package/dist/client/assets/{use-join-requests-iYNw-oM8.js → use-join-requests-CRlCmWm0.js} +1 -1
  188. package/dist/client/assets/{use-mcp-client-DV4dF4m3.js → use-mcp-client-DFe1X8lW.js} +1 -1
  189. package/dist/client/assets/{use-mcp-prompts-CspfQ-gW.js → use-mcp-prompts-4cCmLVZX.js} +1 -1
  190. package/dist/client/assets/{use-mcp-tools-DnBnaQLn.js → use-mcp-tools-DI9Jj-_Y.js} +1 -1
  191. package/dist/client/assets/{use-members-CtcSheMR.js → use-members-KDk_htTJ.js} +1 -1
  192. package/dist/client/assets/{use-navigate-to-agent-Cs1C-DBQ.js → use-navigate-to-agent-D9iFw7Zt.js} +1 -1
  193. package/dist/client/assets/{use-org-auth-client-lV24PS0n.js → use-org-auth-client-SaCcE0Qc.js} +1 -1
  194. package/dist/client/assets/{use-org-sso-Cygr8MWL.js → use-org-sso-4n2o97PC.js} +1 -1
  195. package/dist/client/assets/{use-organization-roles-DKqp_63r.js → use-organization-roles-BXjlJlvC.js} +1 -1
  196. package/dist/client/assets/use-organization-settings-CJJ_tXSe.js +1 -0
  197. package/dist/client/assets/{use-registry-connections-yBLIjpTM.js → use-registry-connections-DGZtDiY8.js} +1 -1
  198. package/dist/client/assets/{use-secrets-BtkNg5h6.js → use-secrets-DOmnFlDE.js} +1 -1
  199. package/dist/client/assets/{use-status-sounds-Bvu0fELl.js → use-status-sounds-C7IKQ0M3.js} +1 -1
  200. package/dist/client/assets/{use-view-mode-CF449xEK.js → use-view-mode-5sHRttq3.js} +1 -1
  201. package/dist/client/assets/{use-virtual-mcp-WmAC_qSm.js → use-virtual-mcp-Dt17nZX7.js} +1 -1
  202. package/dist/client/assets/useInfiniteQuery-LattvRM6.js +1 -0
  203. package/dist/client/assets/useSuspenseInfiniteQuery-JNoud7Ca.js +1 -0
  204. package/dist/client/assets/variant-calendar-DBaInJsx.js +1 -0
  205. package/dist/client/assets/{view-mode-toggle-D7_rFTiD.js → view-mode-toggle-dVNz8sR0.js} +1 -1
  206. package/dist/client/index.html +1 -1
  207. package/dist/server/cli.js +344 -344
  208. package/dist/server/server.js +235 -235
  209. package/package.json +1 -1
  210. package/dist/client/assets/ArrowRight-6qgvW498.js +0 -1
  211. package/dist/client/assets/XCircle-DJDxYBys.js +0 -1
  212. package/dist/client/assets/add-section-modal-CZMJAFim.js +0 -1
  213. package/dist/client/assets/agent-icon-C4199b3i.js +0 -1
  214. package/dist/client/assets/agents-list-BkhDlcw_.js +0 -1
  215. package/dist/client/assets/app-editor-C-syiSQu.js +0 -1
  216. package/dist/client/assets/automations-BZ5f_VCT.js +0 -1
  217. package/dist/client/assets/brand-context-ozThKdwR.js +0 -1
  218. package/dist/client/assets/category-editor-B2u5O4dV.js +0 -1
  219. package/dist/client/assets/collection-detail-BDyvHjSJ.js +0 -1
  220. package/dist/client/assets/commerce-onboarding-Cz_Sr1Cc.js +0 -1
  221. package/dist/client/assets/connection-detail-DFBuqM3e.js +0 -1
  222. package/dist/client/assets/connections-BF1eSDFK.js +0 -1
  223. package/dist/client/assets/file-explorer-DTEZJaER.js +0 -2
  224. package/dist/client/assets/github-repo-picker-Qwduwaex.js +0 -1
  225. package/dist/client/assets/index-CQsWL0Jd.js +0 -1
  226. package/dist/client/assets/index-DMWSApoW.js +0 -1
  227. package/dist/client/assets/page-seo-sheet-CRKfon-Z.js +0 -1
  228. package/dist/client/assets/post-editor-DhYABFSS.js +0 -1
  229. package/dist/client/assets/project-app-view-AcWNwwqH.js +0 -1
  230. package/dist/client/assets/record-editor-CdJmeinf.js +0 -1
  231. package/dist/client/assets/registry-Cq-UMbFU.js +0 -2
  232. package/dist/client/assets/roles-BTjmfpAQ.js +0 -1
  233. package/dist/client/assets/save-referenced-block-oaxGf8K5.js +0 -1
  234. package/dist/client/assets/seo-editor-WJe9bB3t.js +0 -1
  235. package/dist/client/assets/store-registry-3V2xevo5.js +0 -2
  236. package/dist/client/assets/task-status-DRz_b988.js +0 -1
  237. package/dist/client/assets/use-capability-A3j7T78I.js +0 -1
  238. package/dist/client/assets/use-deco-credits-Bax6GRog.js +0 -1
  239. package/dist/client/assets/use-organization-settings-C6jq364X.js +0 -1
  240. package/dist/client/assets/useInfiniteQuery-Bwr_uznn.js +0 -1
  241. package/dist/client/assets/useSuspenseInfiniteQuery-D48NS_O0.js +0 -1
  242. package/dist/client/assets/variant-calendar-CoVLDgg6.js +0 -1
@@ -1 +0,0 @@
1
- import{s as Se,a as en,o as un,C as pn,z as mn,j as e,B as Y,t as X,r as le,I as hn,b as fn,i as ke,p as N,K as me,c as gn,q as xn,L as jn,l as yn,k as vn}from"./index-Cvc1xn-4.js";import{g as _n}from"./connection-slug-eyAPH6o3.js";import{u as nn,a as tn,g as Cn,C as Ee}from"./connection-card-DPkWnrYu.js";import{C as wn}from"./collection-search-DC-7DcrR.js";import{C as bn}from"./collection-tabs-CRIZ0CX_.js";import{g as kn,a as Nn,e as Sn,b as In}from"./extract-connection-data-D4y9_vmi.js";import{d as sn,c as on,D as an,a as cn,b as An,e as Tn}from"./dialog-DDL08EK8.js";import{D as Dn,a as Pn,c as Fn,b as On,d as Mn,e as Vn,f as $n}from"./drawer-CTdCEiZw.js";import{u as Ln,b as Be,T as Re,a as ze}from"./tooltip-D_DwQRbZ.js";import{F as V,b as $,c as L,d as E,f as B,a as Qe}from"./form-B9v_4_lt.js";import{I as J}from"./input-klr_kUC2.js";import{d as En,b as Bn,c as Rn,S as zn,a as pe}from"./select-DwFQDgcX.js";import{T as Hn}from"./textarea-2KmLad1y.js";import{b as rn}from"./use-connection-C39BUY8e.js";import{n as Ne,b as He}from"./XCircle-DJDxYBys.js";import{s as Ke}from"./Star01-CFj5T2Jl.js";import{Z as Kn}from"./agent-icon-C4199b3i.js";import{s as Un}from"./XClose-BcOWKb5Q.js";import{c as Xn,i as we,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-B_oQdAph.js";import{u as Je}from"./use-infinite-scroll-DM0o0Ibp.js";import{u as Jn}from"./useSuspenseInfiniteQuery-D48NS_O0.js";import{S as Yn,u as Zn}from"./use-mcp-client-DV4dF4m3.js";import{i as Ue,a as Xe}from"./mcp-oauth-C5QgI6bG.js";import{B as be}from"./badge-DUlP8HvP.js";import{i as Ye}from"./ChevronUp-DhHPsDAS.js";import{s as et}from"./Plus-BRQannbC.js";import{u as nt}from"./studio-tools-D8q7MEyE.js";import{u as tt}from"./use-ai-providers-0DJv4c0H.js";function st(s){const n=s?.metadata?.githubRepo;return n?n.connectionId?s?.connections?.some(f=>f.connection_id===n.connectionId)?n:null:n:null}function zt(s){if(typeof s!="object"||s===null)return!1;const h=s.githubRepo?.url;return typeof h=="string"&&h.length>0}function ot(s){return!!st(s??null)?.connectionId}function Ht(s){return ot(s)}function Kt(s){const n=new Set;for(const h of s??[]){const f=h.metadata?.liveAgentId;typeof f=="string"&&f&&n.add(h.id)}return n}function Ut(s){const n=new Map,h=new Map;for(const f of s??[]){const p=f.metadata?.liveAgentId;typeof p=="string"&&p&&(h.set(f.id,p),n.set(p,f.id))}return{liveToDev:n,devToLive:h}}function Xt(s,n){if(!s)return null;const h=s.metadata?.liveAgentId;if(typeof h=="string"&&h)return{mode:"dev",targetId:h};const f=(n??[]).find(p=>p.metadata?.liveAgentId===s.id);return f?{mode:"live",targetId:f.id}:null}function qt(s){return s.online?s.capabilities.includes("claude-code")||s.capabilities.includes("codex"):!1}function it({open:s,onOpenChange:n,onCreated:h}){const{org:f}=Se(),{data:p}=en.useSession(),{stdioEnabled:D}=un(),P=Ln(),R=rn(),d=nn(),z=tn(d,"").items,i=pn({resolver:mn(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),y=i.watch("ui_type"),S=i.watch("connection_url"),M=i.watch("npx_package"),j=we({uiType:y,connectionUrl:S??"",npxPackage:M??""})??We({uiType:y,connectionUrl:S??"",registryItems:z}),l=o=>{const t=o.trim();if(!t)return;const c=!!i.formState.dirtyFields.title,v=!!i.formState.dirtyFields.description,_=!!i.formState.dirtyFields.env_vars,r=x=>{if(x&&(!c&&!i.getValues("title").trim()&&x.title&&i.setValue("title",x.title,{shouldDirty:!1}),!v&&!(i.getValues("description")??"").trim()&&x.description&&i.setValue("description",x.description,{shouldDirty:!1}),!_&&x.envVarKeys?.length)){const A=i.getValues("env_vars")??[],C=new Set(A.map(k=>k.key)),w=x.envVarKeys.filter(k=>!C.has(k));w.length>0&&i.setValue("env_vars",[...A,...w.map(k=>({key:k,value:""}))],{shouldDirty:!0})}},u=Gn(t);if(u&&D){i.setValue("ui_type","NPX",{shouldDirty:!0}),i.setValue("npx_package",u.packageName,{shouldDirty:!0}),i.setValue("connection_url","",{shouldDirty:!0}),i.setValue("connection_token",null,{shouldDirty:!0}),r(we({uiType:"NPX",npxPackage:u.packageName}));return}if(t.startsWith("http://")||t.startsWith("https://")){const x=y==="HTTP"||y==="SSE"||y==="Websocket"?y:"HTTP";i.setValue("ui_type",x,{shouldDirty:!0}),i.setValue("connection_url",t,{shouldDirty:!0}),r(we({uiType:x,connectionUrl:t})??We({uiType:x,connectionUrl:t,registryItems:z}));return}y==="NPX"&&r(we({uiType:"NPX",npxPackage:t}))},H=o=>{o||i.reset(),n(o)},g=async o=>{let t,c=null,v=null,_=null;o.ui_type==="NPX"?(t="STDIO",c="",_=Qn(o.npx_package||"",o.env_vars||[])):o.ui_type==="STDIO"?(t="STDIO",c="",_=Wn(o.stdio_command||"",o.stdio_args||"",o.stdio_cwd,o.env_vars||[])):(t=o.ui_type,c=o.connection_url||"",v=o.connection_token||null);const r=kn("conn");try{await R.create.mutateAsync({id:r,title:o.title,description:o.description||null,connection_type:t,connection_url:c,connection_token:v,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p?.user?.id||"system",organization_id:f.id,icon:o.icon??null,app_name:null,app_id:null,connection_headers:_,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),i.reset(),n(!1),h?.(r)}catch{X.error("Failed to create connection")}},F="Create Connection",I="Create a custom connection in your organization. Fill in the details below.",q=i.formState.isSubmitting?"Saving...":"Create Connection",K=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(V,{control:i.control,name:"ui_type",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:"Type *"}),e.jsxs(En,{value:o.value,onValueChange:o.onChange,children:[e.jsx(E,{children:e.jsx(Bn,{children:e.jsx(Rn,{})})}),e.jsxs(zn,{children:[e.jsx(pe,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ke,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(pe,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ke,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(pe,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ke,{className:"w-4 h-4"}),"Websocket"]})}),D&&e.jsxs(e.Fragment,{children:[e.jsx(pe,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ne,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(pe,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Kn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(B,{})]})}),y==="NPX"&&e.jsx(V,{control:i.control,name:"npx_package",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:"NPM Package *"}),e.jsx(E,{children:e.jsx(J,{placeholder:"@perplexity-ai/mcp-server",...o,value:o.value??"",onPaste:t=>{const c=t.clipboardData.getData("text");c&&(t.preventDefault(),i.setValue("npx_package",c.trim(),{shouldDirty:!0}),l(c))},onBlur:t=>{l(t.target.value),o.onBlur()}})}),e.jsx(B,{})]})}),y==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(V,{control:i.control,name:"stdio_command",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:"Command *"}),e.jsx(E,{children:e.jsx(J,{placeholder:"node, bun, python...",...o,value:o.value??""})}),e.jsx(B,{})]})}),e.jsx(V,{control:i.control,name:"stdio_args",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:"Arguments"}),e.jsx(E,{children:e.jsx(J,{placeholder:"arg1 arg2 --flag value",...o,value:o.value??""})}),e.jsx(B,{})]})})]}),e.jsx(V,{control:i.control,name:"stdio_cwd",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:"Working Directory"}),e.jsx(E,{children:e.jsx(J,{placeholder:"/path/to/project (optional)",...o,value:o.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(B,{})]})})]}),(y==="NPX"||y==="STDIO")&&e.jsx(V,{control:i.control,name:"env_vars",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:"Environment Variables"}),e.jsx(E,{children:e.jsx(qn,{value:o.value??[],onChange:o.onChange})}),e.jsx(B,{})]})}),y!=="NPX"&&y!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(V,{control:i.control,name:"connection_url",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:"URL *"}),e.jsx(E,{children:e.jsx(J,{placeholder:"https://example.com/mcp",...o,value:o.value??"",onPaste:t=>{const c=t.clipboardData.getData("text");c&&(t.preventDefault(),i.setValue("connection_url",c.trim(),{shouldDirty:!0}),l(c))},onBlur:t=>{l(t.target.value),o.onBlur()}})}),e.jsx(B,{})]})}),e.jsx(V,{control:i.control,name:"connection_token",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:j?.token?.label??"Token (optional)"}),e.jsx(E,{children:e.jsx(J,{type:"password",placeholder:j?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...o,value:o.value??""})}),j?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[j.token.helperText,j.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(B,{})]})})]}),e.jsx(V,{control:i.control,name:"title",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:"Name *"}),e.jsx(E,{children:e.jsx(J,{placeholder:"My Connection",...o})}),e.jsx(B,{})]})}),e.jsx(V,{control:i.control,name:"description",render:({field:o})=>e.jsxs($,{children:[e.jsx(L,{children:"Description"}),e.jsx(E,{children:e.jsx(Hn,{placeholder:"A brief description of this connection",rows:3,...o,value:o.value??""})}),e.jsx(B,{})]})})]});return P?e.jsx(Dn,{open:s,onOpenChange:H,children:e.jsxs(Pn,{className:"max-h-[90vh]",children:[e.jsx(Fn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(On,{children:F}),e.jsx(Mn,{className:"mt-1",children:I})]}),e.jsx(Vn,{asChild:!0,children:e.jsx(Y,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Un,{size:16})})})]})}),e.jsx(Qe,{...i,children:e.jsxs("form",{onSubmit:i.handleSubmit(g),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:K}),e.jsx($n,{children:e.jsx(Y,{type:"submit",disabled:i.formState.isSubmitting,className:"w-full",children:q})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:H,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(cn,{children:F}),e.jsx(An,{children:I})]}),e.jsx(Qe,{...i,children:e.jsxs("form",{onSubmit:i.handleSubmit(g),children:[e.jsx("div",{className:"py-4",children:K}),e.jsxs(Tn,{children:[e.jsx(Y,{type:"button",variant:"outline",onClick:()=>H(!1),children:"Cancel"}),e.jsx(Y,{type:"submit",disabled:i.formState.isSubmitting,className:"min-w-40",children:q})]})]})})]})})}function at(s){const n=gn.c(73),{mode:h,agentId:f,addedConnectionIds:p,onAdd:D,onCloneAndAdd:P,onConnectAndAdd:R,connectingItemId:d,search:b,onCreateConnection:z,onBrowseNavigate:i,defaultTab:y}=s,S=h===void 0?"add":h,M=y===void 0?"connected":y,{org:j}=Se(),l=le.useDeferredValue(b),H=b!==l,g=l.trim().toLowerCase();let F;n[0]!==M?(F=a=>a??M,n[0]=M,n[1]=F):F=n[1];const[I,q]=xn(jn.connectionsTab(j.slug)+(M==="all"?":home-modal":":agent-modal"),F);let K;n[2]!==I||n[3]!==q?(K=a=>{a!==I&&N("connections_dialog_tab_changed",{to_tab:a}),q(a)},n[2]=I,n[3]=q,n[4]=K):K=n[4];const o=K;let t;n[5]!==j.id||n[6]!==j.slug?(t={connectionId:Yn,orgId:j.id,orgSlug:j.slug},n[5]=j.id,n[6]=j.slug,n[7]=t):t=n[7];const c=Zn(t);let v,_,r;if(n[8]!==c||n[9]!==l||n[10]!==j.id){r=l?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:l.trim()},{field:["description"],operator:"contains",value:l.trim()}]}:void 0;const a={...r&&{where:r},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},m=JSON.stringify(a);_=Jn,v=me.collectionListInfinite(c,j.id,"","CONNECTIONS",m),n[8]=c,n[9]=l,n[10]=j.id,n[11]=v,n[12]=_,n[13]=r}else v=n[11],_=n[12],r=n[13];let u;n[14]!==c||n[15]!==r?(u=async a=>{const{pageParam:m}=a,U=m===void 0?0:m;return(await c.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...r&&{where:r},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:U}})).structuredContent},n[14]=c,n[15]=r,n[16]=u):u=n[16];let x;n[17]!==v||n[18]!==u?(x={queryKey:v,queryFn:u,initialPageParam:0,getNextPageParam:pt,staleTime:3e4},n[17]=v,n[18]=u,n[19]=x):x=n[19];const{data:A,fetchNextPage:C,hasNextPage:w,isFetchingNextPage:k}=_(x),Ie=A?.pages.flatMap(ut)??[],he=Cn(Ie),ln=new Set(Ie.filter(dt).map(lt)),fe=nn(),Q=tn(fe,l),Ae=Je(Q.loadMore,Q.hasMore,Q.isLoadingMore),Te=Je(C,w??!1,k),O=I==="all"||!!g,qe=O?Q.items.filter(a=>{const m=Nn(a);if(m&&ln.has(m))return!1;if(!g)return!0;const U=a._meta?.["mcp.mesh"];return[a.title,a.description,a.name,a.server?.title,a.server?.description,a.server?.name,U?.friendly_name,U?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(g)}):[],de=qe.filter(rt),ue=qe.filter(ct);let ge;n[20]!==p?(ge=a=>a.some(m=>p.has(m.id)),n[20]=p,n[21]=ge):ge=n[21];const De=ge;let xe;n[22]!==p||n[23]!==f||n[24]!==d||n[25]!==De||n[26]!==S||n[27]!==D||n[28]!==i||n[29]!==P?(xe=(a,m,U,ce,G)=>{const Ce=De(G),re=G.find(W=>!p.has(W.id)),T=G[0];if(S==="browse"){const W=_n(T);return e.jsx(Ee,{connection:{title:m,icon:U,description:G.length>1?`${G.length} instances`:ce??void 0},fallbackIcon:e.jsx(Ne,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(be,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Ye,{size:11})," Connected"]}),onClick:()=>{N("connection_browse_clicked",{app_name:T.app_name??null,connection_id:T.id,instances_count:G.length}),i?.(W)}},a)}return e.jsx(Ee,{connection:{title:m,icon:U,description:ce},fallbackIcon:e.jsx(Ne,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce&&e.jsxs(be,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Ye,{size:11})," Added"]}),e.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:W=>{W.stopPropagation(),re?(N("connection_add_clicked",{action:"use_existing",app_name:T.app_name??null,connection_id:re.id}),f&&N("agent_connection_attached",{agent_id:f,connection_id:re.id,app_name:T.app_name??null,mode:"existing"}),D(re.id)):(N("connection_add_clicked",{action:"clone",app_name:T.app_name??null,base_connection_id:T.id}),P(T))},children:"Add"})]})},a)},n[22]=p,n[23]=f,n[24]=d,n[25]=De,n[26]=S,n[27]=D,n[28]=i,n[29]=P,n[30]=xe):xe=n[30];const je=xe;let ye;n[31]!==d||n[32]!==S||n[33]!==R?(ye=a=>{const m=a._meta?.["mcp.mesh"],U=m?.friendlyName||m?.friendly_name||a.server?.title||a.title||a.server?.name||a.name||a.id||"",ce=a.server?.description||a.description||null,G=a.server?.icons?.[0]?.src||In(a.server?.repository)||null,Ce=m?.official===!0,re=m?.verified===!0,T=m?.owner==="deco";return e.jsx(Ee,{connection:{title:U,description:ce,icon:G},fallbackIcon:e.jsx(Ne,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[T&&e.jsxs(Be,{children:[e.jsx(Re,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(ze,{children:"Built and maintained by Deco"})]}),!T&&Ce&&e.jsxs(Be,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(be,{variant:"outline",size:"icon",children:e.jsx(He,{})})}),e.jsx(ze,{children:"Built and maintained by the official vendor"})]}),!T&&!Ce&&re&&e.jsxs(Be,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(be,{variant:"outline",size:"icon",children:e.jsx(He,{})})}),e.jsx(ze,{children:"Verified by the Deco team"})]}),e.jsx(Y,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:W=>{W.stopPropagation(),N("connection_add_clicked",{action:"connect_new",registry_item_id:a.id,app_name:m?.friendlyName||a.server?.name||a.name||null}),R(a)},children:d===a.id?e.jsx(ke,{size:14,className:"animate-spin"}):S==="browse"?"Connect":"Add"})]})},`catalog-${a.id}`)},n[31]=d,n[32]=S,n[33]=R,n[34]=ye):ye=n[34];const Ge=ye,Pe=!g&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(bn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:I,onTabChange:a=>o(a)}),e.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{N("connections_dialog_custom_clicked"),z()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),Fe=H&&"opacity-50 pointer-events-none";let Z;n[35]!==Fe?(Z=yn("flex-1 overflow-auto p-5 transition-opacity duration-150",Fe),n[35]=Fe,n[36]=Z):Z=n[36];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ve;n[37]!==je?(ve=a=>{if(a.type==="group")return je(a.key,a.title,a.icon,null,a.connections);const m=a.connection;return je(m.id,m.title,m.icon,m.description??null,[m])},n[37]=je,n[38]=ve):ve=n[38];const Oe=he.map(ve);let ee;n[39]!==Te?(ee=e.jsx("div",{ref:Te,className:"col-span-full h-1"}),n[39]=Te,n[40]=ee):ee=n[40];let ne;n[41]!==k?(ne=k&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),n[41]=k,n[42]=ne):ne=n[42];const Me=O&&de.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(He,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ve=O&&de.map(Ge),$e=O&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Le=O&&ue.map(Ge);let te;n[43]!==Ae||n[44]!==fe||n[45]!==O?(te=O&&fe.length>0&&e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[43]=Ae,n[44]=fe,n[45]=O,n[46]=te):te=n[46];let se;n[47]!==Q.isLoadingMore||n[48]!==O?(se=O&&Q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),n[47]=Q.isLoadingMore,n[48]=O,n[49]=se):se=n[49];let oe;n[50]!==Oe||n[51]!==ee||n[52]!==ne||n[53]!==Me||n[54]!==Ve||n[55]!==$e||n[56]!==Le||n[57]!==te||n[58]!==se?(oe=e.jsxs("div",{className:dn,children:[Oe,ee,ne,Me,Ve,$e,Le,te,se]}),n[50]=Oe,n[51]=ee,n[52]=ne,n[53]=Me,n[54]=Ve,n[55]=$e,n[56]=Le,n[57]=te,n[58]=se,n[59]=oe):oe=n[59];let ie;n[60]!==I||n[61]!==he.length||n[62]!==ue||n[63]!==b||n[64]!==de?(ie=he.length===0&&de.length===0&&ue.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:b?`No connections match "${b}"`:I==="connected"?"No connections yet":"No connections available"}),n[60]=I,n[61]=he.length,n[62]=ue,n[63]=b,n[64]=de,n[65]=ie):ie=n[65];let ae;n[66]!==Z||n[67]!==oe||n[68]!==ie?(ae=e.jsxs("div",{className:Z,children:[oe,ie]}),n[66]=Z,n[67]=oe,n[68]=ie,n[69]=ae):ae=n[69];let _e;return n[70]!==Pe||n[71]!==ae?(_e=e.jsxs(e.Fragment,{children:[Pe,ae]}),n[70]=Pe,n[71]=ae,n[72]=_e):_e=n[72],_e}function ct(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function rt(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function lt(s){return s.app_name}function dt(s){return s.app_name}function ut(s){return s?.items??[]}function pt(s,n){if(s?.hasMore)return n.reduce(mt,0)}function mt(s,n){return s+(n?.items?.length??0)}function Gt({open:s,onOpenChange:n,defaultTab:h,initialSearch:f="",...p}){const D=p.mode??"add",P="agentId"in p?p.agentId:void 0,R="addedConnectionIds"in p?p.addedConnectionIds??new Set:new Set,d="onAdd"in p&&p.onAdd?p.onAdd:t=>{},b=(t,c,v)=>{P&&N("agent_connection_attached",{agent_id:P,connection_id:t,app_name:c,mode:v})},[z,i]=le.useState(null),[y,S]=le.useState(f),[M,j]=le.useState(!1),{org:l}=Se(),{data:H}=en.useSession(),g=rn(),F=hn(),I=fn(),q=t=>{n(!1),I({to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:t}})},K=async t=>{i(t.app_name??t.id);try{const v=`${t.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,r=(await g.create.mutateAsync({title:v,description:t.description??null,connection_type:t.connection_type,connection_url:t.connection_url??null,connection_token:null,icon:t.icon??null,app_name:t.app_name??null,app_id:t.app_id??null,connection_headers:t.connection_headers??null})).id,u=new URL(`/api/${l.slug}/mcp/${r}`,window.location.origin),x=await Ue({url:u.href,token:null,orgId:l.id});if(x.supportsOAuth&&!x.isAuthenticated){const{token:A,tokenInfo:C,error:w}=await Xe({connectionId:r,orgSlug:l.slug,scope:"offline_access"});if(w||!A){N("connection_oauth_failed",{connection_id:r,flow:"clone",error:w??"no_token"}),X.error(`Authentication failed: ${w??"no token received"}`),await g.delete.mutateAsync(r);return}if(N("connection_oauth_succeeded",{connection_id:r,flow:"clone"}),C)try{(await fetch(`/api/${l.slug}/connections/${r}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:C.accessToken,refreshToken:C.refreshToken,expiresIn:C.expiresIn,scope:C.scope,clientId:C.clientId,clientSecret:C.clientSecret,tokenEndpoint:C.tokenEndpoint})})).ok?await g.update.mutateAsync({id:r,data:{}}):await g.update.mutateAsync({id:r,data:{connection_token:A}})}catch{await g.update.mutateAsync({id:r,data:{connection_token:A}})}else await g.update.mutateAsync({id:r,data:{connection_token:A}});await F.invalidateQueries({queryKey:me.isMCPAuthenticated(u.href,null)})}b(r,t.app_name??null,"clone"),d(r)}catch(c){console.error("Failed to add connection:",c),X.error("Failed to add connection")}finally{i(null)}},o=async t=>{if(!(!l||!H?.user?.id)){i(t.id);try{const c=Sn(t,l.id,H.user.id,{remoteIndex:0}),v=c.connection_type==="STDIO",_=!!c.connection_url,r=v&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!_&&!r){X.error("This MCP Server cannot be connected: no connection method available"),i(null);return}const{id:u}=await g.create.mutateAsync(c),x=new URL(`/api/${l.slug}/mcp/${u}`,window.location.origin),A=await Ue({url:x.href,token:null,orgId:l.id});if(A.supportsOAuth&&!A.isAuthenticated){const{token:C,tokenInfo:w,error:k}=await Xe({connectionId:u,orgSlug:l.slug,scope:"offline_access"});if(k||!C){N("connection_oauth_failed",{connection_id:u,flow:"connect_new",error:k??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${k??"no token received"})`}),b(u,c.app_name??null,"new"),d(u);return}if(N("connection_oauth_succeeded",{connection_id:u,flow:"connect_new"}),w)try{(await fetch(`/api/${l.slug}/connections/${u}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:w.accessToken,refreshToken:w.refreshToken,expiresIn:w.expiresIn,scope:w.scope,clientId:w.clientId,clientSecret:w.clientSecret,tokenEndpoint:w.tokenEndpoint})})).ok?await g.update.mutateAsync({id:u,data:{}}):await g.update.mutateAsync({id:u,data:{connection_token:C}})}catch{await g.update.mutateAsync({id:u,data:{connection_token:C}})}else await g.update.mutateAsync({id:u,data:{connection_token:C}});await F.invalidateQueries({queryKey:me.isMCPAuthenticated(x.href,null)}),X.success("Connected and authenticated")}else X.success("Connected");b(u,c.app_name??null,"new"),d(u)}catch(c){console.error("Failed to connect:",c),X.error("Failed to connect")}finally{i(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(cn,{className:"text-base font-semibold",children:D==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(wn,{value:y,onChange:S,placeholder:"Search connections..."})}),e.jsx(le.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(at,{mode:D,agentId:P,addedConnectionIds:R,onAdd:d,onCloneAndAdd:K,onConnectAndAdd:o,connectingItemId:z,search:y,onCreateConnection:()=>j(!0),onBrowseNavigate:q,defaultTab:h})})]}),e.jsx(it,{open:M,onOpenChange:j,onCreated:async t=>{j(!1);const c=new URL(`/api/${l.slug}/mcp/${t}`,window.location.origin),v=await Ue({url:c.href,token:null,orgId:l.id});if(v.supportsOAuth&&!v.isAuthenticated){const{token:_,tokenInfo:r,error:u}=await Xe({connectionId:t,orgSlug:l.slug,scope:"offline_access"});if(u||!_){N("connection_oauth_failed",{connection_id:t,flow:"custom_create",error:u??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${u??"no token received"})`}),b(t,null,"custom"),d(t),n(!1);return}if(N("connection_oauth_succeeded",{connection_id:t,flow:"custom_create"}),r)try{(await fetch(`/api/${l.slug}/connections/${t}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:r.accessToken,refreshToken:r.refreshToken,expiresIn:r.expiresIn,scope:r.scope,clientId:r.clientId,clientSecret:r.clientSecret,tokenEndpoint:r.tokenEndpoint})})).ok?await g.update.mutateAsync({id:t,data:{}}):await g.update.mutateAsync({id:t,data:{connection_token:_}})}catch{await g.update.mutateAsync({id:t,data:{connection_token:_}})}else await g.update.mutateAsync({id:t,data:{connection_token:_}});await F.invalidateQueries({queryKey:me.isMCPAuthenticated(c.href,null)})}b(t,null,"custom"),d(t),n(!1)}})]})}const Ze=new Map;function Qt(){const{org:s}=Se(),n=nt(),h=tt(),f=h.find(l=>l.providerId==="deco"),{data:p,isLoading:D,refetch:P,isFetching:R}=vn({queryKey:me.aiProviderCredits(s.id,"deco"),enabled:!!f,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),d=p?.balanceCents??null,b=d!=null?d/100:null,z=le.useRef(new Map);if(d!=null){const l=Ze.get(s.id);z.current.get(s.id)&&l!=null&&d>l&&N("credits_topped_up_detected",{organization_id:s.id,delta_cents:d-l,previous_balance_cents:l,new_balance_cents:d}),Ze.set(s.id,d),z.current.set(s.id,!0)}const i=!!f,y=d!=null&&d>0,S=d!=null&&d===0,M=d!=null&&d===200,j=h.length>0&&h.every(l=>l.providerId==="deco");return{hasDecoKey:i,decoKeyId:f?.id??null,balanceCents:d,balanceDollars:b,hasCredits:y,isZeroBalance:S,isInitialFreeCredit:M,hasOnlyDecoProvider:j,isLoading:D,isFetching:R,refetch:P}}export{Gt as A,st as a,Ut as b,ot as c,zt as d,Ht as e,Xt as f,Kt as g,qt as h,Qt as u};
@@ -1 +0,0 @@
1
- import{K as d,c as l,s as g,k as E,I,d as R,r as b}from"./index-Cvc1xn-4.js";import{W as G}from"./use-mcp-client-DV4dF4m3.js";import{c as M,u as Q}from"./studio-tools-D8q7MEyE.js";const N={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null},O={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function w(t,e){return{queryKey:d.organizationSettings(e),queryFn:async()=>{try{return await M(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...N,organizationId:e}}},staleTime:6e4}}function h(t){const e=l.c(6),{org:s}=g();let n;e[0]!==s.id||e[1]!==s.slug?(n=w(s.slug,s.id),e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const i=t;let r;return e[3]!==n||e[4]!==i?(r={...n,select:i},e[3]=n,e[4]=i,e[5]=r):r=e[5],E(r)}function W(t,e){const s=l.c(3);let n;s[0]!==t||s[1]!==e?(n=w(e,t),s[0]=t,s[1]=e,s[2]=n):n=s[2];const{data:i}=E(n);return i??null}function S(){const t=l.c(9),{org:e}=g(),s=Q(),n=I();let i;t[0]!==e||t[1]!==s?(i=async u=>{const o=await s.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...u});if(!o)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return o},t[0]=e,t[1]=s,t[2]=i):i=t[2];let r;t[3]!==e||t[4]!==n?(r=u=>{n.setQueryData(d.organizationSettings(e.id),o=>({...o??N,...u}))},t[3]=e,t[4]=n,t[5]=r):r=t[5];let a;return t[6]!==i||t[7]!==r?(a={mutationFn:i,onSuccess:r},t[6]=i,t[7]=r,t[8]=a):a=t[8],R(a)}function C(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:O}function Z(){const{data:t}=h(P);return t??O}function P(t){return C(t.simple_mode)}function F(){const t=l.c(7),e=S();let s,n;t[0]!==e?(s=(r,a)=>e.mutate({simple_mode:r},a),n=(r,a)=>e.mutateAsync({simple_mode:r},a),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let i;return t[3]!==e||t[4]!==s||t[5]!==n?(i={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=i):i=t[6],i}function $(){const{data:t}=h(k);return t??null}function k(t){return t.registry_config}function j(){const t=l.c(7),e=S();let s,n;t[0]!==e?(s=(r,a)=>e.mutate({registry_config:r},a),n=(r,a)=>e.mutateAsync({registry_config:r},a),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let i;return t[3]!==e||t[4]!==s||t[5]!==n?(i={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=i):i=t[6],i}function B(){const{data:t}=h(x);return t??null}function x(t){return t.default_home_agents}function U(){const t=l.c(7),e=S();let s,n;t[0]!==e?(s=(r,a)=>e.mutate({default_home_agents:r},a),n=(r,a)=>e.mutateAsync({default_home_agents:r},a),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let i;return t[3]!==e||t[4]!==s||t[5]!==n?(i={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=i):i=t[6],i}function L(){const t=l.c(14),{org:e}=g(),s=U(),n=I();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=Promise.resolve(),t[0]=i):i=t[0];const r=b.useRef(i);let a;t[1]!==e.id?(a=d.organizationSettings(e.id),t[1]=e.id,t[2]=a):a=t[2];const u=a;let o;t[3]!==u||t[4]!==n?(o=()=>n.getQueryData(u)?.default_home_agents?.ids??[],t[3]=u,t[4]=n,t[5]=o):o=t[5];const _=o;let m;t[6]!==u||t[7]!==e.slug||t[8]!==n||t[9]!==s?(m=z=>{const T=r.current.then(async()=>{const A=n.getQueryData(u),p=z(A?.default_home_agents?.ids??[]);if(p!==null){n.setQueryData(u,c=>c&&{...c,default_home_agents:{ids:p}});try{await s.mutateAsync({ids:p}),await n.refetchQueries({queryKey:d.homeNextActions(e.slug),type:"active"})}catch(c){const D=c;throw n.setQueryData(u,A),D}}});return r.current=T.catch(q),T},t[6]=u,t[7]=e.slug,t[8]=n,t[9]=s,t[10]=m):m=t[10];const y=m;let f;return t[11]!==y||t[12]!==_?(f={currentIds:_,apply:y},t[11]=y,t[12]=_,t[13]=f):f=t[13],f}function q(){}function v(){const t=l.c(5),{org:e}=g(),s=$();let n;t[0]!==e.id?(n=G.REGISTRY(e.id),t[0]=e.id,t[1]=n):n=t[1];const i=n;let r;return t[2]!==i||t[3]!==s?(r=a=>{if(!s)return a===i;const u=s.registries[a];return u?u.enabled:a===i},t[2]=i,t[3]=s,t[4]=r):r=t[4],r}export{L as a,v as b,W as c,Z as d,F as e,$ as f,j as g,w as o,B as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-DM0o0Ibp.js";import{cH as i}from"./index-Cvc1xn-4.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-DM0o0Ibp.js";import{cH as u,az as n}from"./index-Cvc1xn-4.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
@@ -1 +0,0 @@
1
- import{c as R,r as K,j as a,l as W,B as O}from"./index-Cvc1xn-4.js";import{P as Q,f as it}from"./agent-icon-C4199b3i.js";import{n as at}from"./ChevronLeft-veOSKT91.js";import{i as lt}from"./ChevronRight-tj4xbWmM.js";import{S as X}from"./scroll-area-BvvyxqKR.js";import{T as ct,b as mt,a as pt}from"./tooltip-D_DwQRbZ.js";import{V as ft}from"./view-mode-toggle-D7_rFTiD.js";import"./AlertCircle-BZqAQZBb.js";import"./Tool01-AyuVwnGv.js";import"./SwitchHorizontal01-BVKPeJMU.js";import"./Settings02-kQ4zmp5P.js";import"./XCircle-DJDxYBys.js";import"./ArrowRight-6qgvW498.js";import"./ArrowUpRight-CUPFfker.js";import"./ZapSquare-ok_KEP9c.js";import"./Users03-C6siA5mE.js";import"./CheckCircle-DOPRdShL.js";import"./ChevronUp-DhHPsDAS.js";import"./ChevronDown-BhLFFAly.js";import"./DotsVertical-kcsdrim_.js";import"./Stars02-Bo19XD__.js";import"./Eye-BfNssVzk.js";import"./ZoomOut-cYq1CP_X.js";import"./Globe01-CJXHyXNe.js";import"./FilterLines-D2obCQW_.js";import"./Star01-CFj5T2Jl.js";import"./Globe04-PQ0ejRYI.js";import"./HardDrive-DEG8fjxw.js";import"./Key01-xj4UQriu.js";import"./LayoutLeft-C9-KQh8d.js";import"./LinkExternal01-DtLsAcMy.js";import"./Monitor01-CvNVisni.js";import"./Sun-CcSW7Ngf.js";import"./Palette-yNiXmyHD.js";import"./Play-C0DhAO4u.js";import"./Plus-BRQannbC.js";import"./SearchMd-CttVjXUQ.js";import"./Shield01-BZZVugf_.js";import"./Stars01-C4FyHP_L.js";import"./Trash01-BZXmKzie.js";import"./Upload01-D4ez0Mu3.js";import"./User01-Dz33ODze.js";import"./Users01-aBataJ8N.js";import"./XClose-BcOWKb5Q.js";import"./X-DC2HG4lX.js";import"./Zap-OOZsYg72.js";import"./use-clock-tick-CqrkSCF6.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DM9BeeKg.js";import"./file-type-icon-GfohFxwW.js";import"./dialog-DDL08EK8.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-zC94Gae_.js";import"./use-mcp-client-DV4dF4m3.js";import"./auth-B9bEkbYh.js";import"./chat-context-GA_fpERN.js";import"./hooks-BI65IXS7.js";import"./decopilot-sse-pool-CZG5pZEa.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-WmAC_qSm.js";import"./use-collections-dA9ibOHr.js";import"./use-ai-providers-0DJv4c0H.js";import"./studio-tools-D8q7MEyE.js";import"./use-organization-settings-C6jq364X.js";import"./shell-layout-DIXTRmN4.js";import"./avatar-CKJB3djy.js";import"./required-auth-layout-BcilPdVi.js";import"./use-org-sso-Cygr8MWL.js";import"./sheet-XVV7S5b8.js";import"./integration-icon-gcYOl2yq.js";import"./use-navigate-to-agent-Cs1C-DBQ.js";import"./use-connection-C39BUY8e.js";import"./use-mcp-prompts-CspfQ-gW.js";import"./form-B9v_4_lt.js";import"./label-hfmZhqH1.js";import"./input-klr_kUC2.js";import"./select-DwFQDgcX.js";const dt=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),ut=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),ht=/\/flags\/multivariate\/[^/]+\.ts$/;function xt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function gt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e;if(typeof t!="string"||typeof r!="string")return null;const n=new Date(t),c=new Date(r);return Number.isNaN(n.getTime())||Number.isNaN(c.getTime())||c.getTime()<=n.getTime()?null:{start:n,end:c}}function Z(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(dt.has(r)){const n=gt(e);n&&t.push(n);return}if(ut.has(r)){const n=e.matchers;if(Array.isArray(n))for(const c of n)Z(c,t)}}}function bt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!ht.test(t))return!1;const r=e.variants;return Array.isArray(r)}function yt(e){if(typeof e=="string"){const i=e.trim();if(i.length===0)return null;try{const m=new URL(i).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return i.length>80?`${i.slice(0,77)}…`:i}if(!e||typeof e!="object")return null;const t=e,r=t.config,c=t.desktop?.media,o=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,c?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const i of o)if(typeof i=="string"&&i.trim().length>0)return i.trim();const l=t.__resolveType;if(typeof l=="string"){const s=(l.split("/").pop()??l).replace(/\.(tsx?|jsx?)$/i,"");if(s.length>0)return s}return null}function vt(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];typeof n=="number"?t.length>0?t[t.length-1]+=`[${n}]`:t.push(`[${n}]`):t.push(n)}return t.join(" · ")}function H(e,t,r,n,c){if(bt(e)){const o=vt(n),l=e.variants,i=e.__resolveType;l.forEach((s,m)=>{if(!s||typeof s!="object")return;const p=s,d=[];if(Z(p.rule,d),d.length===0)return;const x=yt(p.value)??(o||r);for(const g of d)c.push({blockKey:t,blockLabel:r,innerPath:o,variantIndex:m,start:g.start,end:g.end,label:x,flagResolveType:i})});for(let s=0;s<l.length;s++){const m=l[s];m&&typeof m=="object"&&H(m.value,t,r,[...n,"variants",s,"value"],c)}return}if(Array.isArray(e)){for(let o=0;o<e.length;o++)H(e[o],t,r,[...n,o],c);return}if(e&&typeof e=="object")for(const[o,l]of Object.entries(e))o!=="__resolveType"&&H(l,t,r,[...n,o],c)}function Tt(e){if(!e)return[];const t=[];for(const[r,n]of Object.entries(e))H(n,r,xt(r),[],t);return t.sort((r,n)=>r.start.getTime()-n.start.getTime())}function jt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((n,c)=>{const o=c*137.508%360;r.set(n,{bg:`oklch(0.62 0.14 ${o})`,text:"white",border:`oklch(0.50 0.14 ${o})`})}),r}const Nt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function tt(e,t){return e.get(t)??Nt}const kt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],et=["January","February","March","April","May","June","July","August","September","October","November","December"],wt=1440*60*1e3;function L(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function rt(e){return new Date(e.getFullYear(),e.getMonth(),1)}function $(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function I(e,t){const r=new Date(e);return r.setDate(r.getDate()+t),r}function G(e,t){return Math.round((L(e).getTime()-L(t).getTime())/wt)}function _t(e){const t=I(e,-e.getDay()),r=[];for(let n=0;n<6;n++){const c=[];for(let o=0;o<7;o++)c.push(I(t,n*7+o));r.push(c)}for(;r.length>0&&r[r.length-1].every(n=>n.getMonth()!==e.getMonth());)r.pop();return r}function Mt(e,t){const r=L(e[0]),n=I(r,7),c=[];for(const i of t){const s=L(i.start),m=L(i.end);if(m.getTime()<r.getTime()||s.getTime()>=n.getTime())continue;const p=s.getTime()<r.getTime()?r:s,d=m.getTime()>=n.getTime()?I(n,-1):m,u=G(p,r),x=G(d,p)+1;x<=0||c.push({variant:i,startCol:u,span:x})}c.sort((i,s)=>i.startCol-s.startCol||s.span-i.span||i.variant.blockKey.localeCompare(s.variant.blockKey));const o=[],l=[];for(const i of c){let s=o.findIndex(m=>m<=i.startCol);s===-1&&(s=o.length,o.push(0)),o[s]=i.startCol+i.span,l.push({...i,lane:s})}return l}const U=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function St(e){return`${U.format(e.start)} → ${U.format(e.end)}`}function At(e){const t=R.c(17),{variant:r}=e;let n;t[0]!==r.blockLabel?(n=a.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=n):n=t[1];let c;t[2]!==r.innerPath?(c=r.innerPath&&a.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=c):c=t[3];let o;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(o=r.label!==r.blockLabel&&r.label!==r.innerPath&&a.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=o):o=t[7];let l;t[8]!==r?(l=St(r),t[8]=r,t[9]=l):l=t[9];let i;t[10]!==l?(i=a.jsx("div",{className:"mt-1",children:l}),t[10]=l,t[11]=i):i=t[11];let s;return t[12]!==n||t[13]!==c||t[14]!==o||t[15]!==i?(s=a.jsx(pt,{children:a.jsxs("div",{className:"text-xs",children:[n,c,o,i]})}),t[12]=n,t[13]=c,t[14]=o,t[15]=i,t[16]=s):s=t[16],s}function nt(e){const t=R.c(14),{variant:r,color:n,style:c,children:o}=e;let l;t[0]!==n.bg||t[1]!==n.text||t[2]!==c?(l={background:n.bg,color:n.text,borderRadius:4,...c},t[0]=n.bg,t[1]=n.text,t[2]=c,t[3]=l):l=t[3];let i;t[4]!==o?(i=a.jsx("span",{className:"truncate",children:o}),t[4]=o,t[5]=i):i=t[5];let s;t[6]!==l||t[7]!==i?(s=a.jsx(ct,{asChild:!0,children:a.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:l,children:i})}),t[6]=l,t[7]=i,t[8]=s):s=t[8];let m;t[9]!==r?(m=a.jsx(At,{variant:r}),t[9]=r,t[10]=m):m=t[10];let p;return t[11]!==s||t[12]!==m?(p=a.jsxs(mt,{children:[s,m]}),t[11]=s,t[12]=m,t[13]=p):p=t[13],p}function fr(e){const t=R.c(39),{decofile:r}=e,[n,c]=K.useState("calendar"),[o,l]=K.useState(Ct);let i,s;t[0]!==r?(s=Tt(r),i=jt(s.map(Et)),t[0]=r,t[1]=i,t[2]=s):(i=t[1],s=t[2]);const m=i;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=()=>l(rt(new Date)),t[3]=p):p=t[3];const d=p;let u;t[4]!==n?(u=()=>l(k=>n==="calendar"?$(k,-1):$(k,-3)),t[4]=n,t[5]=u):u=t[5];const x=u;let g;t[6]!==n?(g=()=>l(k=>n==="calendar"?$(k,1):$(k,3)),t[6]=n,t[7]=g):g=t[7];const w=g;let N;t[8]===Symbol.for("react.memo_cache_sentinel")?(N=a.jsx(O,{variant:"outline",size:"sm",onClick:d,children:"Today"}),t[8]=N):N=t[8];let E;t[9]===Symbol.for("react.memo_cache_sentinel")?(E=a.jsx(at,{size:16}),t[9]=E):E=t[9];let _;t[10]!==x?(_=a.jsx(O,{variant:"ghost",size:"icon",className:"size-8",onClick:x,"aria-label":"Previous",children:E}),t[10]=x,t[11]=_):_=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(lt,{size:16}),t[12]=f):f=t[12];let b;t[13]!==w?(b=a.jsx(O,{variant:"ghost",size:"icon",className:"size-8",onClick:w,"aria-label":"Next",children:f}),t[13]=w,t[14]=b):b=t[14];const M=et[o.getMonth()];let y;t[15]!==o?(y=o.getFullYear(),t[15]=o,t[16]=y):y=t[16];let v;t[17]!==M||t[18]!==y?(v=a.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[M," ",y]}),t[17]=M,t[18]=y,t[19]=v):v=t[19];let T;t[20]!==v||t[21]!==_||t[22]!==b?(T=a.jsxs("div",{className:"flex items-center gap-2",children:[N,_,b,v]}),t[20]=v,t[21]=_,t[22]=b,t[23]=T):T=t[23];let C;t[24]===Symbol.for("react.memo_cache_sentinel")?(C={value:"calendar",icon:a.jsx(Q,{}),label:"Calendar"},t[24]=C):C=t[24];let j;t[25]===Symbol.for("react.memo_cache_sentinel")?(j=[C,{value:"timeline",icon:a.jsx(it,{}),label:"Timeline"}],t[25]=j):j=t[25];let h;t[26]!==n?(h=a.jsx(ft,{value:n,onValueChange:c,options:j}),t[26]=n,t[27]=h):h=t[27];let S;t[28]!==T||t[29]!==h?(S=a.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[T,h]}),t[28]=T,t[29]=h,t[30]=S):S=t[30];let A;t[31]!==m||t[32]!==o||t[33]!==s||t[34]!==n?(A=s.length===0?a.jsx(Dt,{}):n==="calendar"?a.jsx($t,{monthStart:o,variants:s,colorMap:m}):a.jsx(Vt,{monthStart:o,variants:s,colorMap:m}),t[31]=m,t[32]=o,t[33]=s,t[34]=n,t[35]=A):A=t[35];let D;return t[36]!==S||t[37]!==A?(D=a.jsxs("div",{className:"flex h-full w-full flex-col",children:[S,A]}),t[36]=S,t[37]=A,t[38]=D):D=t[38],D}function Et(e){return e.blockKey}function Ct(){return rt(new Date)}function Dt(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[a.jsx(Q,{size:24,className:"text-muted-foreground/60"}),a.jsx("div",{children:"No scheduled variants."}),a.jsx("div",{className:"text-xs text-muted-foreground/80",children:"Variants gated by a date matcher appear here."})]}),e[0]=t):t=e[0],t}const z=20,J=2,q=28;function $t(e){const t=R.c(17),{monthStart:r,variants:n,colorMap:c}=e;let o,l,i,s,m;if(t[0]!==c||t[1]!==r||t[2]!==n){const u=_t(r),x=L(new Date);o=X,m="flex-1 min-h-0",l="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:kt.map(Rt)}),t[8]=i):i=t[8],s=u.map((g,w)=>{const N=Mt(g,n),E=N.reduce(Lt,0),_=q+E*(z+J)+8;return a.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:_},children:[g.map((f,b)=>{const M=f.getMonth()===r.getMonth(),y=f.getTime()===x.getTime();return a.jsx("div",{className:W("border-r last:border-r-0 px-2 pt-1.5 text-xs",M?"bg-background":"bg-muted/30 text-muted-foreground"),children:a.jsx("span",{className:W("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",y&&"bg-primary text-primary-foreground font-semibold"),children:f.getDate()})},b)}),N.map((f,b)=>{const M=tt(c,f.variant.blockKey),y=q+f.lane*(z+J),v=f.startCol/7*100,T=f.span/7*100;return a.jsxs(nt,{variant:f.variant,color:M,style:{top:y,left:`calc(${v}% + 2px)`,width:`calc(${T}% - 4px)`,height:z},children:[f.variant.blockLabel,f.variant.label!==f.variant.blockLabel&&a.jsxs("span",{className:"opacity-70",children:[" · ",f.variant.label]})]},`${w}-${b}`)})]},w)}),t[0]=c,t[1]=r,t[2]=n,t[3]=o,t[4]=l,t[5]=i,t[6]=s,t[7]=m}else o=t[3],l=t[4],i=t[5],s=t[6],m=t[7];let p;t[9]!==l||t[10]!==i||t[11]!==s?(p=a.jsxs("div",{className:l,children:[i,s]}),t[9]=l,t[10]=i,t[11]=s,t[12]=p):p=t[12];let d;return t[13]!==o||t[14]!==m||t[15]!==p?(d=a.jsx(o,{className:m,children:p}),t[13]=o,t[14]=m,t[15]=p,t[16]=d):d=t[16],d}function Lt(e,t){return Math.max(e,t.lane+1)}function Rt(e){return a.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const V=4,Pt=32,P=240;function Vt(e){const t=R.c(27),{monthStart:r,variants:n,colorMap:c}=e,o=r;let l,i,s,m,p,d;if(t[0]!==c||t[1]!==r||t[2]!==o||t[3]!==n){const g=$(r,V),w=new Date,N=new Map;for(const j of n){const h=N.get(j.blockKey)??[];h.push(j),N.set(j.blockKey,h)}const E=Array.from(N.entries()).sort(Ot),_=g.getTime()-o.getTime(),f=j=>(Math.max(o.getTime(),Math.min(g.getTime(),j.getTime()))-o.getTime())/_*100;let b;t[10]!==o?(b=(j,h)=>$(o,h),t[10]=o,t[11]=b):b=t[11];const M=Array.from({length:V},b),y=w.getTime()>=o.getTime()&&w.getTime()<=g.getTime()?f(w):null;l=X,d="flex-1 min-h-0",i="min-w-[900px] relative";let v;t[12]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:{width:P},children:"Variant / Block"}),t[12]=v):v=t[12];let T;t[13]===Symbol.for("react.memo_cache_sentinel")?(T={gridTemplateColumns:`repeat(${V}, minmax(0, 1fr))`},t[13]=T):T=t[13];const C=M.map(It);t[14]!==C?(s=a.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[v,a.jsx("div",{className:"flex-1 grid",style:T,children:C})]}),t[14]=C,t[15]=s):s=t[15],t[16]!==y?(m=y!==null&&a.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${P}px + (100% - ${P}px) * ${y} / 100)`},children:a.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:"Today"})}),t[16]=y,t[17]=m):m=t[17],p=E.map(j=>{const[h,S]=j,A=tt(c,h),D=S[0]?.blockLabel??h;return a.jsxs("div",{children:[a.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:a.jsx("div",{className:"px-3 truncate",style:{width:P},children:D})}),S.map((k,st)=>a.jsxs("div",{className:"flex border-b items-center",style:{height:Pt},children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:P},children:[a.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:A.bg}}),a.jsx("span",{className:"truncate text-foreground/80",children:k.label})]}),a.jsxs("div",{className:"relative flex-1 h-full",children:[a.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${V}, minmax(0, 1fr))`},children:M.map(Ht)}),(()=>{const B=Math.max(k.start.getTime(),o.getTime()),F=Math.min(k.end.getTime(),g.getTime());if(F<=B)return null;const Y=f(new Date(B)),ot=f(new Date(F))-Y;return a.jsx(nt,{variant:k,color:A,style:{top:"50%",transform:"translateY(-50%)",left:`${Y}%`,width:`calc(${ot}% - 2px)`,height:22},children:k.label})})()]})]},st))]},h)}),t[0]=c,t[1]=r,t[2]=o,t[3]=n,t[4]=l,t[5]=i,t[6]=s,t[7]=m,t[8]=p,t[9]=d}else l=t[4],i=t[5],s=t[6],m=t[7],p=t[8],d=t[9];let u;t[18]!==i||t[19]!==s||t[20]!==m||t[21]!==p?(u=a.jsxs("div",{className:i,children:[s,m,p]}),t[18]=i,t[19]=s,t[20]=m,t[21]=p,t[22]=u):u=t[22];let x;return t[23]!==l||t[24]!==d||t[25]!==u?(x=a.jsx(l,{className:d,children:u}),t[23]=l,t[24]=d,t[25]=u,t[26]=x):x=t[26],x}function Ht(e,t){return a.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function It(e,t){return a.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[et[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function Ot(e,t){return e[0].localeCompare(t[0])}export{fr as VariantCalendar};