decocms 4.23.2 → 4.24.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 (226) hide show
  1. package/dist/client/assets/{AlertCircle-DP0nsq1e.js → AlertCircle-D27DNBuk.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-3SkCtZ7K.js → ArrowUpRight-B0IcegbE.js} +1 -1
  3. package/dist/client/assets/{Check-CUC1zRnb.js → Check-DjbNu1wk.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-BsrExj4H.js → CheckCircle-BqvcImZw.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-B1mct1yp.js → ChevronDown-ChzOIRMN.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-C_4FW4NO.js → ChevronRight-BMYqr5mg.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-Bu7-a85r.js → ChevronUp-D3E47VS4.js} +1 -1
  8. package/dist/client/assets/{Circle-D65-cV8s.js → Circle-BTk35DNa.js} +1 -1
  9. package/dist/client/assets/{Copy01-C-7fHSay.js → Copy01-BupXVMxd.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-BaKPV3I-.js → DotsVertical-NS06m2ex.js} +1 -1
  11. package/dist/client/assets/{Eye-BD5GpDZ-.js → Eye-BCFb3Pr0.js} +1 -1
  12. package/dist/client/assets/{FilterLines-DFbyXaVS.js → FilterLines-BPhOKU3g.js} +1 -1
  13. package/dist/client/assets/{Globe01-Dz7J456-.js → Globe01-D_sF9tkh.js} +1 -1
  14. package/dist/client/assets/{Globe04-ninCQ4l6.js → Globe04-DqrswRGa.js} +1 -1
  15. package/dist/client/assets/{HardDrive-DghaQYox.js → HardDrive-BXnXVq-L.js} +1 -1
  16. package/dist/client/assets/{Key01-DBAS-H0R.js → Key01-5oIVCQ6h.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-PT-KYBVh.js → LayoutLeft-DvimfYbd.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-DYdIsix1.js → LinkExternal01-P-ZftaiS.js} +1 -1
  19. package/dist/client/assets/{List-CR20iQn1.js → List-BrRy9nh9.js} +1 -1
  20. package/dist/client/assets/{Loading02-1-7GqxDm.js → Loading02-CyD5wvpA.js} +1 -1
  21. package/dist/client/assets/{Monitor01-CsiKf4Vb.js → Monitor01-CSz-AHTf.js} +1 -1
  22. package/dist/client/assets/{Palette-Bh8DSKBB.js → Palette-uJEc44DN.js} +1 -1
  23. package/dist/client/assets/{Play-BZWHu6vA.js → Play-DCAaSSU6.js} +1 -1
  24. package/dist/client/assets/{Plus-CToP0bbt.js → Plus-DKYhZHY2.js} +1 -1
  25. package/dist/client/assets/{SearchLg-YHk3bRUf.js → SearchLg-D5EbflDe.js} +1 -1
  26. package/dist/client/assets/{SearchMd-Dx8opdKE.js → SearchMd-Dv2fAc6M.js} +1 -1
  27. package/dist/client/assets/{Settings02-DszLgCXG.js → Settings02-CIxRqUJ6.js} +1 -1
  28. package/dist/client/assets/{Shield01-DTqhedHO.js → Shield01-BlYcntqH.js} +1 -1
  29. package/dist/client/assets/{Star01-CVsItQ1u.js → Star01-CMrOPAU1.js} +1 -1
  30. package/dist/client/assets/{Stars01-CsOhgCzT.js → Stars01-CDu18vGr.js} +1 -1
  31. package/dist/client/assets/{Stars02-CJRC9WOX.js → Stars02-Ci7hwXdU.js} +1 -1
  32. package/dist/client/assets/{Sun-CfFmz0ui.js → Sun-Ce_EUrXd.js} +1 -1
  33. package/dist/client/assets/{SwitchHorizontal01-BSA9bywH.js → SwitchHorizontal01-sdJMTy6A.js} +1 -1
  34. package/dist/client/assets/{Tool01-MTiJaetc.js → Tool01-B3T5XEH8.js} +1 -1
  35. package/dist/client/assets/{Trash01-BDWbYvcu.js → Trash01-BntZwC2j.js} +1 -1
  36. package/dist/client/assets/{Upload01-DNJ4y_co.js → Upload01-BUaljIu0.js} +1 -1
  37. package/dist/client/assets/{User01-BnV8b2oc.js → User01-BEG2JP2P.js} +1 -1
  38. package/dist/client/assets/{Users01-CeDec9Hr.js → Users01-BcPG_xvp.js} +1 -1
  39. package/dist/client/assets/{Users03-tyWJCIG0.js → Users03-8xt-LzrG.js} +1 -1
  40. package/dist/client/assets/{X-CFM-EaJf.js → X-DYHYGN_A.js} +1 -1
  41. package/dist/client/assets/{XCircle-DMTLazaF.js → XCircle-DI88AZ1K.js} +1 -1
  42. package/dist/client/assets/{XClose-CQ7XxXz6.js → XClose-DEv56Pz6.js} +1 -1
  43. package/dist/client/assets/{Zap-B6Y5QNOW.js → Zap-Cck_KglN.js} +1 -1
  44. package/dist/client/assets/{ZapSquare-DfDf_Qdm.js → ZapSquare-CTRU27-a.js} +1 -1
  45. package/dist/client/assets/{ZoomOut-Dt1g7vVy.js → ZoomOut-CQ0pMakr.js} +1 -1
  46. package/dist/client/assets/{access-gate-twsl8uHV.js → access-gate-CrCRwpMP.js} +1 -1
  47. package/dist/client/assets/{add-section-modal-t4oPoTDi.js → add-section-modal-C5_F0DwX.js} +1 -1
  48. package/dist/client/assets/{agent-capabilities-B7x2s3UT.js → agent-capabilities-CgEMo-01.js} +1 -1
  49. package/dist/client/assets/{agent-icon-BBTxD8Vr.js → agent-icon-CdRAruzy.js} +1 -1
  50. package/dist/client/assets/{agents-list-CK40xLox.js → agents-list-CyDl7tHv.js} +1 -1
  51. package/dist/client/assets/{ai-providers-rL0xevFD.js → ai-providers-BeC-4Osf.js} +1 -1
  52. package/dist/client/assets/{alert-BZSGiHUj.js → alert-BLqdUUks.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-zbSvd7Ki.js → alert-dialog-IqfxiubQ.js} +1 -1
  54. package/dist/client/assets/{app-editor-BorTeTSs.js → app-editor-Ci3sT1Ku.js} +1 -1
  55. package/dist/client/assets/{auth-BALlir75.js → auth-COs6dQOo.js} +1 -1
  56. package/dist/client/assets/{auth-catchall-3cvSdKqi.js → auth-catchall-D7TxXCN8.js} +1 -1
  57. package/dist/client/assets/{auth-entry-Bdr5OSFj.js → auth-entry-BaKK5m_u.js} +1 -1
  58. package/dist/client/assets/{auth-split-layout-Coen5GKi.js → auth-split-layout-CJALtNSh.js} +1 -1
  59. package/dist/client/assets/{authenticate-and-persist-oauth-Ag6OuiCi.js → authenticate-and-persist-oauth-DlRuR5UL.js} +1 -1
  60. package/dist/client/assets/{automation-list-row-DGvZjGai.js → automation-list-row-Azl2etlU.js} +1 -1
  61. package/dist/client/assets/{automation-runs-98bvfxso.js → automation-runs-Bd2a7yBo.js} +1 -1
  62. package/dist/client/assets/{automations-Bhn16K_m.js → automations-Dlpxfhwo.js} +1 -1
  63. package/dist/client/assets/{avatar-qkTmk1tF.js → avatar-xEdYoKCY.js} +1 -1
  64. package/dist/client/assets/{badge-Dxl2nD6L.js → badge-Dn-HNDWU.js} +1 -1
  65. package/dist/client/assets/{block-document-CUqxuHG8.js → block-document-DxMAa7rl.js} +1 -1
  66. package/dist/client/assets/{brand-context-CJQ5LxFU.js → brand-context-CvUCVy4Z.js} +1 -1
  67. package/dist/client/assets/{breadcrumb-MwtTl_lp.js → breadcrumb-AhxZv6x3.js} +1 -1
  68. package/dist/client/assets/{buckets-C2nu8S-i.js → buckets-8AoOR-jy.js} +1 -1
  69. package/dist/client/assets/bulk-category-panel-C5vPC0Hc.js +1 -0
  70. package/dist/client/assets/{capability-load-error-BRk5Albu.js → capability-load-error-CQqcTu7O.js} +1 -1
  71. package/dist/client/assets/{card-BmfGcj0O.js → card-BVtZpt8u.js} +1 -1
  72. package/dist/client/assets/category-editor-CoDj6o7J.js +1 -0
  73. package/dist/client/assets/{chat-context-DvCifsaP.js → chat-context-DDm8QfNO.js} +1 -1
  74. package/dist/client/assets/{checkbox-CfEEJY30.js → checkbox-CSe8TOzv.js} +1 -1
  75. package/dist/client/assets/{cli-auth-success-BdUdOc4f.js → cli-auth-success-42O7O2ES.js} +1 -1
  76. package/dist/client/assets/{collection-detail-CZ3ry4YY.js → collection-detail-1fxgFWSk.js} +1 -1
  77. package/dist/client/assets/{collection-display-button-DqTRIqF7.js → collection-display-button-hdm66lsd.js} +1 -1
  78. package/dist/client/assets/{collection-search-B2eeAfCm.js → collection-search-D_f3pT-p.js} +1 -1
  79. package/dist/client/assets/{collection-table-wrapper-BnMijIQA.js → collection-table-wrapper-BsOY_1sH.js} +1 -1
  80. package/dist/client/assets/{collection-tabs-ChhCmRrP.js → collection-tabs-qNtCwfg5.js} +1 -1
  81. package/dist/client/assets/{command-D2GI_S2n.js → command-CeMBu3Rg.js} +1 -1
  82. package/dist/client/assets/{commerce-onboarding-BfGk9igR.js → commerce-onboarding-BQczZvbp.js} +1 -1
  83. package/dist/client/assets/{connect-desktop-dialog-DQ_-hvKq.js → connect-desktop-dialog-o-WWTYjT.js} +1 -1
  84. package/dist/client/assets/{connection-card-Dea6GcsD.js → connection-card-eSnCMgBR.js} +1 -1
  85. package/dist/client/assets/{connection-detail-Cb6Qyuc4.js → connection-detail-BMUaGCi9.js} +1 -1
  86. package/dist/client/assets/{connection-form-helpers-CfJCI7YZ.js → connection-form-helpers-PLcXdPBa.js} +1 -1
  87. package/dist/client/assets/{connections-BRxZlKLF.js → connections-tfE--ZzZ.js} +1 -1
  88. package/dist/client/assets/{decopilot-CGLmwUQj.js → decopilot-D4BJYxJZ.js} +1 -1
  89. package/dist/client/assets/{decopilot-sse-pool-DKy1YCA-.js → decopilot-sse-pool-BIAl89Rh.js} +1 -1
  90. package/dist/client/assets/{dialog-xw_WZv6d.js → dialog-DhogbNrD.js} +1 -1
  91. package/dist/client/assets/{domain-settings-BfzAzzbX.js → domain-settings-C2J9pYpE.js} +1 -1
  92. package/dist/client/assets/{drawer-B_-kTqsl.js → drawer-DsAzjWMO.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-WR1NGNoR.js → dropdown-menu-DI97feJI.js} +1 -1
  94. package/dist/client/assets/{empty-state-xwWZSkhQ.js → empty-state-D3kjx8ss.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-BuuPL_TW.js → extract-connection-data-BTB8VaBz.js} +1 -1
  96. package/dist/client/assets/file-explorer-BfSHcGxR.js +2 -0
  97. package/dist/client/assets/{file-type-icon-B6nuKI0W.js → file-type-icon-CfEzZN8D.js} +1 -1
  98. package/dist/client/assets/{files-Y6_iOEZN.js → files-D4dyk3kg.js} +1 -1
  99. package/dist/client/assets/{form-BDEEsjow.js → form-BkYRU4Ul.js} +1 -1
  100. package/dist/client/assets/{general-BlUoHTsV.js → general-BZOrgGDY.js} +1 -1
  101. package/dist/client/assets/{github-repo-picker-CyJ9CV9M.js → github-repo-picker-CZ1Ro4QH.js} +1 -1
  102. package/dist/client/assets/{hooks-C1eaKJ5l.js → hooks-Cwuehb03.js} +1 -1
  103. package/dist/client/assets/{index-pPjXkMWO.js → index-1fSIJh22.js} +3 -3
  104. package/dist/client/assets/{index-BfM-TSSf.js → index-B0hYRRvV.js} +1 -1
  105. package/dist/client/assets/{index-DqJ75_8G.js → index-BQCTRGy9.js} +1 -1
  106. package/dist/client/assets/{index-yPrRyIJq.js → index-BWsF4tLX.js} +1 -1
  107. package/dist/client/assets/{index-VN20CUPz.js → index-BWsaLazv.js} +1 -1
  108. package/dist/client/assets/{index-CDriDNRl.js → index-BYzrSXWr.js} +1 -1
  109. package/dist/client/assets/{index-KOgLnEuj.js → index-BbPybXKZ.js} +1 -1
  110. package/dist/client/assets/{index-C465jsM1.js → index-BgY5ZM6_.js} +1 -1
  111. package/dist/client/assets/{index-_iuA_jeM.js → index-C4iqX6RA.js} +1 -1
  112. package/dist/client/assets/{index-CW0ySYG0.js → index-CBonG5tc.js} +1 -1
  113. package/dist/client/assets/{index-D_GlPX1k.js → index-CgiNMO-H.js} +1 -1
  114. package/dist/client/assets/{index-CALTfboW.js → index-DHL5lQbC.js} +1 -1
  115. package/dist/client/assets/{index-XZSYHZ-t.js → index-_IHAm-_z.js} +29 -29
  116. package/dist/client/assets/{index-redirect-Cxaa1dXz.js → index-redirect-JY79Bc92.js} +1 -1
  117. package/dist/client/assets/{index-D67BUGMx.js → index-sQiYA5zd.js} +1 -1
  118. package/dist/client/assets/{input-D3oAzmpd.js → input-DtIeb-d9.js} +1 -1
  119. package/dist/client/assets/{integration-icon-ChiNtR71.js → integration-icon-DU4GHtyn.js} +1 -1
  120. package/dist/client/assets/{invite-member-dialog-DnRVC4fh.js → invite-member-dialog-DkgtFvdZ.js} +1 -1
  121. package/dist/client/assets/{label-CN7heivZ.js → label-DSNRIgjt.js} +1 -1
  122. package/dist/client/assets/{library-tab-BET5pVoI.js → library-tab-xY-aeWS1.js} +1 -1
  123. package/dist/client/assets/{login-BiLI_tpo.js → login-B9vhTrqn.js} +1 -1
  124. package/dist/client/assets/{mcp-oauth-DaQytGE0.js → mcp-oauth-DhHWa50S.js} +1 -1
  125. package/dist/client/assets/{members-D0A9fM5h.js → members-DfSr_LlW.js} +1 -1
  126. package/dist/client/assets/{monaco-editor-mtUMAQ2f.js → monaco-editor-BfEEKc3k.js} +1 -1
  127. package/dist/client/assets/{monitoring-stats-row-cGUx_q_d.js → monitoring-stats-row-BfciTCqT.js} +1 -1
  128. package/dist/client/assets/{oauth-callback-B4i97ziL.js → oauth-callback-3r--zeXm.js} +1 -1
  129. package/dist/client/assets/{oauth-callback-ai-provider-Cu0nrtvv.js → oauth-callback-ai-provider-CENPWpIy.js} +1 -1
  130. package/dist/client/assets/{onboarding-DJWXhtuH.js → onboarding-r57EYzdp.js} +1 -1
  131. package/dist/client/assets/{org-install-BuMuLlYj.js → org-install-CwpDje8E.js} +1 -1
  132. package/dist/client/assets/{org-layout-DKktVS01.js → org-layout-DXDzYvEk.js} +1 -1
  133. package/dist/client/assets/{organization-choice-DhWinyOA.js → organization-choice-CwGr-j9J.js} +1 -1
  134. package/dist/client/assets/{page-seo-form-CR8dQi-b.js → page-seo-form-DIFeKgY_.js} +1 -1
  135. package/dist/client/assets/page-seo-sheet-DFGsnu5A.js +1 -0
  136. package/dist/client/assets/{popover-B9_4d9Hb.js → popover-CNEPCEun.js} +1 -1
  137. package/dist/client/assets/{post-editor-C3XxuEgn.js → post-editor-BS32Qb0r.js} +1 -1
  138. package/dist/client/assets/{primitives-C09eM3XN.js → primitives-Bj4WwKGm.js} +1 -1
  139. package/dist/client/assets/{profile-C8YgAq9j.js → profile-DtZEuwLJ.js} +1 -1
  140. package/dist/client/assets/project-app-view-CAq7YqvK.js +1 -0
  141. package/dist/client/assets/record-editor-Dlbm_juI.js +1 -0
  142. package/dist/client/assets/registry-Dn0ypCDp.js +2 -0
  143. package/dist/client/assets/{registry-layout-8seznd3d.js → registry-layout-DSgTjObM.js} +1 -1
  144. package/dist/client/assets/{require-capability-BpL4yVhr.js → require-capability-XtRfKrCF.js} +1 -1
  145. package/dist/client/assets/{required-auth-layout-Cc06WCjO.js → required-auth-layout-FnO7dZ6U.js} +1 -1
  146. package/dist/client/assets/{reset-password-Bbsumr-T.js → reset-password-3R1cTpee.js} +1 -1
  147. package/dist/client/assets/{roles-CoM0WPdI.js → roles-DlzYrW3h.js} +1 -1
  148. package/dist/client/assets/{scroll-area-BwQt66gB.js → scroll-area-DZjqp9jH.js} +2 -2
  149. package/dist/client/assets/{search-input-Br6kvm4V.js → search-input-z9tq8TXS.js} +1 -1
  150. package/dist/client/assets/{secrets-CjhBbgUZ.js → secrets-BXwZkRcw.js} +1 -1
  151. package/dist/client/assets/{sections-editor-BjBW6cix.js → sections-editor-CUUDau_U.js} +1 -1
  152. package/dist/client/assets/{select-CNB5fe3p.js → select-Bi9bU2VK.js} +1 -1
  153. package/dist/client/assets/{select-model-8hRE4pUt.js → select-model-DP_zKM9N.js} +1 -1
  154. package/dist/client/assets/{seo-editor-Bgt_LAws.js → seo-editor-Cofixyby.js} +1 -1
  155. package/dist/client/assets/{settings-layout-2WW5-L0X.js → settings-layout-DMH_sa6t.js} +1 -1
  156. package/dist/client/assets/{settings-section-B6HW8SMd.js → settings-section-Dk7w7jA4.js} +1 -1
  157. package/dist/client/assets/{sheet-1qlQOBan.js → sheet-ZoSnDrwM.js} +1 -1
  158. package/dist/client/assets/{shell-controls-BRktGnmo.js → shell-controls-BOlEPUd5.js} +1 -1
  159. package/dist/client/assets/{shell-layout-D5fv0Gnj.js → shell-layout-DWxf6XU9.js} +1 -1
  160. package/dist/client/assets/{sidebar-qR7l9LGc.js → sidebar-B2zP9lCK.js} +1 -1
  161. package/dist/client/assets/{skeleton-CMqpP0rC.js → skeleton-D7JDqPAt.js} +1 -1
  162. package/dist/client/assets/{sso-BL-5oYVD.js → sso-CpsdI2fI.js} +1 -1
  163. package/dist/client/assets/{store-C8vWeX45.js → store-DFFfcUv3.js} +1 -1
  164. package/dist/client/assets/store-registry-0GACP-mK.js +2 -0
  165. package/dist/client/assets/{studio-tools-D16Iabf3.js → studio-tools-DLaMoAs0.js} +1 -1
  166. package/dist/client/assets/{switch-Czifg4wP.js → switch-CX5J9FKg.js} +1 -1
  167. package/dist/client/assets/{table-DPQQ4yes.js → table-OqpL1ftA.js} +1 -1
  168. package/dist/client/assets/{tabs-C01VKZPn.js → tabs-BEWqoEdE.js} +1 -1
  169. package/dist/client/assets/{task-row-Dq5f6UoU.js → task-row-DTN6jTGH.js} +1 -1
  170. package/dist/client/assets/{task-status-BfQFLXYY.js → task-status-Br0YFPUm.js} +1 -1
  171. package/dist/client/assets/{textarea-_7jiD7tD.js → textarea-zKfZl_E7.js} +1 -1
  172. package/dist/client/assets/{toggle-group-Cr9Sd28-.js → toggle-group-C8cmWeP-.js} +1 -1
  173. package/dist/client/assets/{toolbar-DEctTAZS.js → toolbar-DWpCUnNZ.js} +1 -1
  174. package/dist/client/assets/{toolbar-icon-button-DMS2W-_l.js → toolbar-icon-button-D7bzEeij.js} +1 -1
  175. package/dist/client/assets/{tools-list-DzdxUwY0.js → tools-list-B168nAhU.js} +1 -1
  176. package/dist/client/assets/{tooltip-BSvDzA5F.js → tooltip-CzWWX9Zy.js} +1 -1
  177. package/dist/client/assets/{types-DSpLZCss.js → types-CmsZBj86.js} +1 -1
  178. package/dist/client/assets/{use-ai-providers-BlK26Pak.js → use-ai-providers-BbwZkPx6.js} +1 -1
  179. package/dist/client/assets/{use-automations-DS7x_Yka.js → use-automations-C_vN1Ixh.js} +1 -1
  180. package/dist/client/assets/{use-capability-DXxanrFU.js → use-capability-B60tguhn.js} +1 -1
  181. package/dist/client/assets/{use-clock-tick-CqbmcogF.js → use-clock-tick-Dwr_-EjU.js} +1 -1
  182. package/dist/client/assets/{use-collections-E89pjH-z.js → use-collections-CutR3paL.js} +1 -1
  183. package/dist/client/assets/{use-connection-HPYIB1L_.js → use-connection-CKqD9jJP.js} +1 -1
  184. package/dist/client/assets/{use-copy-BucqFRkh.js → use-copy-CGAk1IOJ.js} +1 -1
  185. package/dist/client/assets/{use-create-virtual-mcp-Bi4kWXxr.js → use-create-virtual-mcp-3eOJRstX.js} +1 -1
  186. package/dist/client/assets/{use-debounced-autosave-eXbj54WV.js → use-debounced-autosave-BJjFjl9N.js} +1 -1
  187. package/dist/client/assets/{use-debounced-value-DwsMvXCK.js → use-debounced-value-CzNFumIC.js} +1 -1
  188. package/dist/client/assets/{use-decopilot-events-DnA17lg1.js → use-decopilot-events-CgAkYn3v.js} +1 -1
  189. package/dist/client/assets/{use-delete-connection-D9oA_Iuw.js → use-delete-connection-BXWX7nJz.js} +1 -1
  190. package/dist/client/assets/{use-file-configs-77JsXLRJ.js → use-file-configs-CxJKkGsa.js} +1 -1
  191. package/dist/client/assets/{use-infinite-scroll-BGEZaC_d.js → use-infinite-scroll-CtYGFJ5F.js} +1 -1
  192. package/dist/client/assets/{use-join-requests-BDqL8m1v.js → use-join-requests-046UAxPe.js} +1 -1
  193. package/dist/client/assets/{use-mcp-client-CrFimBIE.js → use-mcp-client-CyvYEPYG.js} +1 -1
  194. package/dist/client/assets/{use-mcp-prompts-BLaH_phU.js → use-mcp-prompts-C_vPfH__.js} +1 -1
  195. package/dist/client/assets/{use-mcp-tools-2qGpGfQT.js → use-mcp-tools-DITRK-ju.js} +1 -1
  196. package/dist/client/assets/{use-members-BRBh_r2f.js → use-members-Czk_FUv-.js} +1 -1
  197. package/dist/client/assets/{use-mobile-CcaXr_ZY.js → use-mobile-Cquheqlv.js} +1 -1
  198. package/dist/client/assets/{use-navigate-to-agent-hUrzXW4j.js → use-navigate-to-agent-gjS0eO01.js} +1 -1
  199. package/dist/client/assets/{use-org-auth-client-CuoSRLLT.js → use-org-auth-client-CMvZkiPj.js} +1 -1
  200. package/dist/client/assets/{use-org-sso-DOBO5bz0.js → use-org-sso-Dbxo2Yvm.js} +1 -1
  201. package/dist/client/assets/{use-organization-roles-BcLIOVcj.js → use-organization-roles-D10Fqpds.js} +1 -1
  202. package/dist/client/assets/{use-organization-settings-DKhFQzFb.js → use-organization-settings-BQiNnrop.js} +1 -1
  203. package/dist/client/assets/{use-registry-connections-5ggPsOFj.js → use-registry-connections-BbYLvtdh.js} +1 -1
  204. package/dist/client/assets/{use-secrets-DrpewLw2.js → use-secrets-BU36_GZQ.js} +1 -1
  205. package/dist/client/assets/{use-status-sounds-rsB3nf6f.js → use-status-sounds-CsFCZ2Da.js} +1 -1
  206. package/dist/client/assets/{use-view-mode-Dkyy6VOo.js → use-view-mode-DFUjoVEj.js} +1 -1
  207. package/dist/client/assets/{use-virtual-mcp-Bc1u53Yq.js → use-virtual-mcp-zlZ_YFIK.js} +1 -1
  208. package/dist/client/assets/useInfiniteQuery-N9WYjPkn.js +1 -0
  209. package/dist/client/assets/useSuspenseInfiniteQuery-BGlQ9fKh.js +1 -0
  210. package/dist/client/assets/{useSuspenseQueries-BFTEv8fq.js → useSuspenseQueries-C-COPQ5x.js} +1 -1
  211. package/dist/client/assets/{variant-calendar-CWcsCSui.js → variant-calendar-D-tZes2B.js} +1 -1
  212. package/dist/client/assets/{view-mode-toggle-CBb3Uw1q.js → view-mode-toggle-vF1hbsj1.js} +1 -1
  213. package/dist/client/index.html +1 -1
  214. package/dist/server/cli.js +1 -1
  215. package/dist/server/server.js +1 -1
  216. package/package.json +2 -1
  217. package/dist/client/assets/bulk-category-panel-CVHecRlh.js +0 -1
  218. package/dist/client/assets/category-editor-oS-NNjmT.js +0 -1
  219. package/dist/client/assets/file-explorer-CPtK8hz_.js +0 -2
  220. package/dist/client/assets/page-seo-sheet-CyOPB7pW.js +0 -1
  221. package/dist/client/assets/project-app-view-BtBAh_Rd.js +0 -1
  222. package/dist/client/assets/record-editor-DSO_SqwI.js +0 -1
  223. package/dist/client/assets/registry-DMCevnrE.js +0 -2
  224. package/dist/client/assets/store-registry-Y117ABln.js +0 -2
  225. package/dist/client/assets/useInfiniteQuery-B0z5w_RI.js +0 -1
  226. package/dist/client/assets/useSuspenseInfiniteQuery-HmJ78SJB.js +0 -1
@@ -1 +1 @@
1
- import{c as I,j as t,a as re,i as X,r as O,k as ge,K as pe,d as oe,B as he,l as K,t as ce}from"./index-pPjXkMWO.js";import{R as xe}from"./required-auth-layout-Cc06WCjO.js";import{A as G}from"./auth-split-layout-Coen5GKi.js";import{O as be}from"./organization-choice-DhWinyOA.js";import{A as me}from"./avatar-qkTmk1tF.js";import{I as je}from"./input-D3oAzmpd.js";import{L as ye}from"./label-CN7heivZ.js";import{S as ve}from"./switch-Czifg4wP.js";import{t as Ne,a as Se}from"./Users03-tyWJCIG0.js";import{i as we}from"./CheckCircle-BsrExj4H.js";import{t as ze}from"./Globe04-ninCQ4l6.js";import{a as _e}from"./Palette-Bh8DSKBB.js";import{i as ke}from"./Upload01-DNJ4y_co.js";import"./User01-BnV8b2oc.js";const Ce=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=I.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=I.c(13),{title:g,description:r,logoUrl:m,logoFallback:o}=i;let a;e[0]!==o||e[1]!==m?(a=t.jsx("div",{children:m?t.jsx(me,{url:m,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=m,e[2]=a):a=e[2];let l;e[3]!==g?(l=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=l):l=e[4];let n;e[5]!==r?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:r}),e[5]=r,e[6]=n):n=e[6];let f;e[7]!==l||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[l,n]}),e[7]=l,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=I.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const r=e?.user?.email??"",m=e?.user?.name;let o;return i[1]!==m||i[2]!==r?(o=t.jsx(Ee,{email:r,userName:m}),i[1]=m,i[2]=r,i[3]=o):o=i[3],o}function Ee(i){const e=I.c(47),{email:g,userName:r}=i;let m,o,a,l,n,f;if(e[0]!==g||e[1]!==r){a=g.split("@")[1]?.toLowerCase()??"",l=!!a&&!Ce.has(a);const d=a.split(".")[0]??"";o=d.charAt(0).toUpperCase()+d.slice(1);let u;e[8]!==o||e[9]!==l||e[10]!==r?(u=l?o:r?.split(" ")[0]??"",e[8]=o,e[9]=l,e[10]=r,e[11]=u):u=e[11],m=u,f=ge,n=pe.domainLookup(a),e[0]=g,e[1]=r,e[2]=m,e[3]=o,e[4]=a,e[5]=l,e[6]=n,e[7]=f}else m=e[2],o=e[3],a=e[4],l=e[5],n=e[6],f=e[7];let s;e[12]!==l||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:l},e[12]=l,e[13]=n,e[14]=s):s=e[14];const{data:y,isLoading:c}=f(s);let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=new Set,e[15]=v):v=e[15];const[p,B]=O.useState(v),[E,z]=O.useState(!1);if(c){let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=d):d=e[16];let u;return e[17]!==a?(u=t.jsx(G,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[d,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=u):u=e[18],u}let j,S;e[19]!==y?.organizations?(j=(y?.organizations??[]).flatMap(Pe),S=j.some(Ae),e[19]=y?.organizations,e[20]=j,e[21]=S):(j=e[20],S=e[21]);const L=S;if(E){let d;e[22]!==r?(d=r?.split(" ")[0]??"",e[22]=r,e[23]=d):d=e[23];let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=()=>z(!1),e[24]=u):u=e[24];let h;return e[25]!==o||e[26]!==a||e[27]!==l||e[28]!==d?(h=t.jsx(ne,{isCorporateEmail:l,emailDomain:a,domainLabel:o,defaultName:d,allowDomainClaim:!1,onBack:u}),e[25]=o,e[26]=a,e[27]=l,e[28]=d,e[29]=h):h=e[29],h}if(j.length>0){const d=L?j.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",u=L?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[30]!==d||e[31]!==u?(h=t.jsx(ie,{title:d,description:u}),e[30]=d,e[31]=u,e[32]=h):h=e[32];let k;e[33]===Symbol.for("react.memo_cache_sentinel")?(k=Y=>B(A=>new Set(A).add(Y)),e[33]=k):k=e[33];let w;e[34]!==j||e[35]!==a||e[36]!==p?(w=t.jsx(be,{organizations:j,domain:a,requestedSlugs:p,onRequestedSlug:k,onJoined:Le}),e[34]=j,e[35]=a,e[36]=p,e[37]=w):w=e[37];let _;e[38]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>z(!0),children:"Create a new organization instead"}),e[38]=_):_=e[38];let C;return e[39]!==w||e[40]!==h?(C=t.jsx(G,{children:t.jsxs("div",{className:"grid gap-10",children:[h,w,_]})}),e[39]=w,e[40]=h,e[41]=C):C=e[41],C}let b;return e[42]!==m||e[43]!==o||e[44]!==a||e[45]!==l?(b=t.jsx(ne,{isCorporateEmail:l,emailDomain:a,domainLabel:o,defaultName:m}),e[42]=m,e[43]=o,e[44]=a,e[45]=l,e[46]=b):b=e[46],b}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){return(await fetch("/api/auth/custom/domain-lookup",{credentials:"include"})).json()}function ne(i){const e=I.c(70),{isCorporateEmail:g,emailDomain:r,domainLabel:m,defaultName:o,allowDomainClaim:a,onBack:l}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${r}&sz=128`:null,[s,y]=O.useState(o),[c,v]=O.useState(f),[p,B]=O.useState(!0),[E,z]=O.useState(null);let j;e[0]!==p||e[1]!==c||e[2]!==s?(j=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:c??void 0,claimDomain:p})}),N=await x.json();if(!x.ok||!N.success)throw new Error(N.error||"Failed to set up organization");return N},e[0]=p,e[1]=c,e[2]=s,e[3]=j):j=e[3];let S;e[4]!==p?(S=x=>{if(!x.slug)return;const N=de.filter(fe=>p||!fe.claimOnly).length,J=ue*(N-1)+800;z(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},J)},e[4]=p,e[5]=S):S=e[5];let L;e[6]!==j||e[7]!==S?(L={mutationFn:j,onSuccess:S},e[6]=j,e[7]=S,e[8]=L):L=e[8];const b=oe(L);let d;e[9]!==c||e[10]!==s?(d={mutationFn:async()=>{const x=s.trim(),N=se(x);if(!N)throw new Error("Invalid organization name");const J=await re.organization.create({name:x,slug:N,...c?{logo:c}:{}});if(J?.error)throw new Error(J.error.message||"Failed to create organization");window.location.href=`/${J?.data?.slug??N}`}},e[9]=c,e[10]=s,e[11]=d):d=e[11];const u=oe(d);if(b.isPending||E){let x;e[12]!==m||e[13]!==s?(x=s.trim()||m,e[12]=m,e[13]=s,e[14]=x):x=e[14];let N;return e[15]!==p||e[16]!==r||e[17]!==c||e[18]!==x?(N=t.jsx(G,{children:t.jsx(Fe,{orgName:x,domain:r,claimDomain:p,logoUrl:c})}),e[15]=p,e[16]=r,e[17]=c,e[18]=x,e[19]=N):N=e[19],N}const h=u.isPending;let k;e[20]!==s?(k=se(s.trim()),e[20]=s,e[21]=k):k=e[21];const w=!!k,_=b.error||u.error||null;let C;e[22]!==n||e[23]!==w||e[24]!==u||e[25]!==b||e[26]!==g?(C=x=>{x.preventDefault(),w&&(g&&n?b.mutate():u.mutate())},e[22]=n,e[23]=w,e[24]=u,e[25]=b,e[26]=g,e[27]=C):C=e[27];const Y=C;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=A):A=e[28];let W;e[29]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=W):W=e[29];let P;e[30]!==o||e[31]!==s?(P=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=P):P=e[32];const Z=h||b.isPending;let R;e[33]!==c||e[34]!==P||e[35]!==Z?(R=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[W,t.jsx($e,{value:c,fallback:P,onChange:v,disabled:Z})]}),e[33]=c,e[34]=P,e[35]=Z,e[36]=R):R=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>y(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=h||b.isPending;let $;e[39]!==s||e[40]!==ee||e[41]!==te?($=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=$):$=e[42];let D;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==r||e[47]!==g||e[48]!==h?(D=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",r," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",r," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:B,disabled:h||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=r,e[47]=g,e[48]=h,e[49]=D):D=e[49];let F;e[50]!==R||e[51]!==$||e[52]!==D?(F=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[R,$,D]}),e[50]=R,e[51]=$,e[52]=D,e[53]=F):F=e[53];let M;e[54]!==_?(M=_&&t.jsx("p",{className:"text-xs text-destructive",children:_ instanceof Error?_.message:"Failed to create organization"}),e[54]=_,e[55]=M):M=e[55];const ae=!w||h||b.isPending;let q;e[56]!==b.isPending||e[57]!==h?(q=h||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=h,e[58]=q):q=e[58];let U;e[59]!==ae||e[60]!==q?(U=t.jsx(he,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:q}),e[59]=ae,e[60]=q,e[61]=U):U=e[61];let T;e[62]!==l?(T=l&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:l,children:"See available organizations"}),e[62]=l,e[63]=T):T=e[63];let V;return e[64]!==Y||e[65]!==F||e[66]!==M||e[67]!==U||e[68]!==T?(V=t.jsx(G,{children:t.jsxs("form",{onSubmit:Y,className:"grid gap-10",children:[A,F,M,U,T]})}),e[64]=Y,e[65]=F,e[66]=M,e[67]=U,e[68]=T,e[69]=V):V=e[69],V}function $e(i){const e=I.c(14),{value:g,fallback:r,onChange:m,disabled:o}=i,a=O.useRef(null);let l;e[0]!==m?(l=B=>{const E=B.target.files?.[0];if(!E)return;if(E.size>2097152){ce.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const z=new FileReader;z.onerror=De,z.onloadend=()=>{z.result&&m(z.result),a.current&&(a.current.value="")},z.readAsDataURL(E)},e[0]=m,e[1]=l):l=e[1];const n=l;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const y=g??void 0;let c;e[6]!==r||e[7]!==y?(c=t.jsx(me,{url:y,fallback:r,shape:"square",size:"base"}),e[6]=r,e[7]=y,e[8]=c):c=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ke,{size:14,className:"text-white"})}),e[9]=v):v=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==c?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,c,v]}),e[10]=o,e[11]=s,e[12]=c,e[13]=p):p=e[13],p}function De(){return ce.error("Failed to read image")}const de=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:_e,label:"Extracting brand context",claimOnly:!1}],ue=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:r}){const m=de.filter(n=>g||!n.claimOnly),[o,a]=O.useState(0),l=O.useRef(!1);if(!l.current){l.current=!0;for(let n=1;n<m.length;n++)setTimeout(()=>a(n),ue*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:r??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:m.map((n,f)=>{const s=n.icon,y=f===o,c=f<o,v=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:c||y?1:.4},children:[t.jsxs("span",{className:K("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!c&&(y?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:c?{backgroundColor:v.bg,color:v.fg}:void 0,children:[t.jsx(we,{size:16,className:K("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",c?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:K("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",y?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:K("absolute motion-safe:transition-opacity motion-safe:duration-200",!c&&!y?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:K("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",y||c?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
1
+ import{c as I,j as t,a as re,i as X,r as O,k as ge,K as pe,d as oe,B as he,l as K,t as ce}from"./index-1fSIJh22.js";import{R as xe}from"./required-auth-layout-FnO7dZ6U.js";import{A as G}from"./auth-split-layout-CJALtNSh.js";import{O as be}from"./organization-choice-CwGr-j9J.js";import{A as me}from"./avatar-xEdYoKCY.js";import{I as je}from"./input-DtIeb-d9.js";import{L as ye}from"./label-DSNRIgjt.js";import{S as ve}from"./switch-CX5J9FKg.js";import{t as Ne,a as Se}from"./Users03-8xt-LzrG.js";import{i as we}from"./CheckCircle-BqvcImZw.js";import{t as ze}from"./Globe04-DqrswRGa.js";import{a as _e}from"./Palette-uJEc44DN.js";import{i as ke}from"./Upload01-BUaljIu0.js";import"./User01-BEG2JP2P.js";const Ce=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=I.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=I.c(13),{title:g,description:r,logoUrl:m,logoFallback:o}=i;let a;e[0]!==o||e[1]!==m?(a=t.jsx("div",{children:m?t.jsx(me,{url:m,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=m,e[2]=a):a=e[2];let l;e[3]!==g?(l=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=l):l=e[4];let n;e[5]!==r?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:r}),e[5]=r,e[6]=n):n=e[6];let f;e[7]!==l||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[l,n]}),e[7]=l,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=I.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const r=e?.user?.email??"",m=e?.user?.name;let o;return i[1]!==m||i[2]!==r?(o=t.jsx(Ee,{email:r,userName:m}),i[1]=m,i[2]=r,i[3]=o):o=i[3],o}function Ee(i){const e=I.c(47),{email:g,userName:r}=i;let m,o,a,l,n,f;if(e[0]!==g||e[1]!==r){a=g.split("@")[1]?.toLowerCase()??"",l=!!a&&!Ce.has(a);const d=a.split(".")[0]??"";o=d.charAt(0).toUpperCase()+d.slice(1);let u;e[8]!==o||e[9]!==l||e[10]!==r?(u=l?o:r?.split(" ")[0]??"",e[8]=o,e[9]=l,e[10]=r,e[11]=u):u=e[11],m=u,f=ge,n=pe.domainLookup(a),e[0]=g,e[1]=r,e[2]=m,e[3]=o,e[4]=a,e[5]=l,e[6]=n,e[7]=f}else m=e[2],o=e[3],a=e[4],l=e[5],n=e[6],f=e[7];let s;e[12]!==l||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:l},e[12]=l,e[13]=n,e[14]=s):s=e[14];const{data:y,isLoading:c}=f(s);let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=new Set,e[15]=v):v=e[15];const[p,B]=O.useState(v),[E,z]=O.useState(!1);if(c){let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=d):d=e[16];let u;return e[17]!==a?(u=t.jsx(G,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[d,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=u):u=e[18],u}let j,S;e[19]!==y?.organizations?(j=(y?.organizations??[]).flatMap(Pe),S=j.some(Ae),e[19]=y?.organizations,e[20]=j,e[21]=S):(j=e[20],S=e[21]);const L=S;if(E){let d;e[22]!==r?(d=r?.split(" ")[0]??"",e[22]=r,e[23]=d):d=e[23];let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=()=>z(!1),e[24]=u):u=e[24];let h;return e[25]!==o||e[26]!==a||e[27]!==l||e[28]!==d?(h=t.jsx(ne,{isCorporateEmail:l,emailDomain:a,domainLabel:o,defaultName:d,allowDomainClaim:!1,onBack:u}),e[25]=o,e[26]=a,e[27]=l,e[28]=d,e[29]=h):h=e[29],h}if(j.length>0){const d=L?j.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",u=L?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[30]!==d||e[31]!==u?(h=t.jsx(ie,{title:d,description:u}),e[30]=d,e[31]=u,e[32]=h):h=e[32];let k;e[33]===Symbol.for("react.memo_cache_sentinel")?(k=Y=>B(A=>new Set(A).add(Y)),e[33]=k):k=e[33];let w;e[34]!==j||e[35]!==a||e[36]!==p?(w=t.jsx(be,{organizations:j,domain:a,requestedSlugs:p,onRequestedSlug:k,onJoined:Le}),e[34]=j,e[35]=a,e[36]=p,e[37]=w):w=e[37];let _;e[38]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>z(!0),children:"Create a new organization instead"}),e[38]=_):_=e[38];let C;return e[39]!==w||e[40]!==h?(C=t.jsx(G,{children:t.jsxs("div",{className:"grid gap-10",children:[h,w,_]})}),e[39]=w,e[40]=h,e[41]=C):C=e[41],C}let b;return e[42]!==m||e[43]!==o||e[44]!==a||e[45]!==l?(b=t.jsx(ne,{isCorporateEmail:l,emailDomain:a,domainLabel:o,defaultName:m}),e[42]=m,e[43]=o,e[44]=a,e[45]=l,e[46]=b):b=e[46],b}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){return(await fetch("/api/auth/custom/domain-lookup",{credentials:"include"})).json()}function ne(i){const e=I.c(70),{isCorporateEmail:g,emailDomain:r,domainLabel:m,defaultName:o,allowDomainClaim:a,onBack:l}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${r}&sz=128`:null,[s,y]=O.useState(o),[c,v]=O.useState(f),[p,B]=O.useState(!0),[E,z]=O.useState(null);let j;e[0]!==p||e[1]!==c||e[2]!==s?(j=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:c??void 0,claimDomain:p})}),N=await x.json();if(!x.ok||!N.success)throw new Error(N.error||"Failed to set up organization");return N},e[0]=p,e[1]=c,e[2]=s,e[3]=j):j=e[3];let S;e[4]!==p?(S=x=>{if(!x.slug)return;const N=de.filter(fe=>p||!fe.claimOnly).length,J=ue*(N-1)+800;z(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},J)},e[4]=p,e[5]=S):S=e[5];let L;e[6]!==j||e[7]!==S?(L={mutationFn:j,onSuccess:S},e[6]=j,e[7]=S,e[8]=L):L=e[8];const b=oe(L);let d;e[9]!==c||e[10]!==s?(d={mutationFn:async()=>{const x=s.trim(),N=se(x);if(!N)throw new Error("Invalid organization name");const J=await re.organization.create({name:x,slug:N,...c?{logo:c}:{}});if(J?.error)throw new Error(J.error.message||"Failed to create organization");window.location.href=`/${J?.data?.slug??N}`}},e[9]=c,e[10]=s,e[11]=d):d=e[11];const u=oe(d);if(b.isPending||E){let x;e[12]!==m||e[13]!==s?(x=s.trim()||m,e[12]=m,e[13]=s,e[14]=x):x=e[14];let N;return e[15]!==p||e[16]!==r||e[17]!==c||e[18]!==x?(N=t.jsx(G,{children:t.jsx(Fe,{orgName:x,domain:r,claimDomain:p,logoUrl:c})}),e[15]=p,e[16]=r,e[17]=c,e[18]=x,e[19]=N):N=e[19],N}const h=u.isPending;let k;e[20]!==s?(k=se(s.trim()),e[20]=s,e[21]=k):k=e[21];const w=!!k,_=b.error||u.error||null;let C;e[22]!==n||e[23]!==w||e[24]!==u||e[25]!==b||e[26]!==g?(C=x=>{x.preventDefault(),w&&(g&&n?b.mutate():u.mutate())},e[22]=n,e[23]=w,e[24]=u,e[25]=b,e[26]=g,e[27]=C):C=e[27];const Y=C;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=A):A=e[28];let W;e[29]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=W):W=e[29];let P;e[30]!==o||e[31]!==s?(P=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=P):P=e[32];const Z=h||b.isPending;let R;e[33]!==c||e[34]!==P||e[35]!==Z?(R=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[W,t.jsx($e,{value:c,fallback:P,onChange:v,disabled:Z})]}),e[33]=c,e[34]=P,e[35]=Z,e[36]=R):R=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>y(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=h||b.isPending;let $;e[39]!==s||e[40]!==ee||e[41]!==te?($=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=$):$=e[42];let D;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==r||e[47]!==g||e[48]!==h?(D=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",r," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",r," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:B,disabled:h||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=r,e[47]=g,e[48]=h,e[49]=D):D=e[49];let F;e[50]!==R||e[51]!==$||e[52]!==D?(F=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[R,$,D]}),e[50]=R,e[51]=$,e[52]=D,e[53]=F):F=e[53];let M;e[54]!==_?(M=_&&t.jsx("p",{className:"text-xs text-destructive",children:_ instanceof Error?_.message:"Failed to create organization"}),e[54]=_,e[55]=M):M=e[55];const ae=!w||h||b.isPending;let q;e[56]!==b.isPending||e[57]!==h?(q=h||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=h,e[58]=q):q=e[58];let U;e[59]!==ae||e[60]!==q?(U=t.jsx(he,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:q}),e[59]=ae,e[60]=q,e[61]=U):U=e[61];let T;e[62]!==l?(T=l&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:l,children:"See available organizations"}),e[62]=l,e[63]=T):T=e[63];let V;return e[64]!==Y||e[65]!==F||e[66]!==M||e[67]!==U||e[68]!==T?(V=t.jsx(G,{children:t.jsxs("form",{onSubmit:Y,className:"grid gap-10",children:[A,F,M,U,T]})}),e[64]=Y,e[65]=F,e[66]=M,e[67]=U,e[68]=T,e[69]=V):V=e[69],V}function $e(i){const e=I.c(14),{value:g,fallback:r,onChange:m,disabled:o}=i,a=O.useRef(null);let l;e[0]!==m?(l=B=>{const E=B.target.files?.[0];if(!E)return;if(E.size>2097152){ce.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const z=new FileReader;z.onerror=De,z.onloadend=()=>{z.result&&m(z.result),a.current&&(a.current.value="")},z.readAsDataURL(E)},e[0]=m,e[1]=l):l=e[1];const n=l;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const y=g??void 0;let c;e[6]!==r||e[7]!==y?(c=t.jsx(me,{url:y,fallback:r,shape:"square",size:"base"}),e[6]=r,e[7]=y,e[8]=c):c=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ke,{size:14,className:"text-white"})}),e[9]=v):v=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==c?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,c,v]}),e[10]=o,e[11]=s,e[12]=c,e[13]=p):p=e[13],p}function De(){return ce.error("Failed to read image")}const de=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:_e,label:"Extracting brand context",claimOnly:!1}],ue=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:r}){const m=de.filter(n=>g||!n.claimOnly),[o,a]=O.useState(0),l=O.useRef(!1);if(!l.current){l.current=!0;for(let n=1;n<m.length;n++)setTimeout(()=>a(n),ue*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:r??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:m.map((n,f)=>{const s=n.icon,y=f===o,c=f<o,v=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:c||y?1:.4},children:[t.jsxs("span",{className:K("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!c&&(y?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:c?{backgroundColor:v.bg,color:v.fg}:void 0,children:[t.jsx(we,{size:16,className:K("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",c?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:K("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",y?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:K("absolute motion-safe:transition-opacity motion-safe:duration-200",!c&&!y?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:K("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",y||c?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
@@ -1 +1 @@
1
- import{c as _,r as k,aZ as S,e as C,x as T,a_ as E,j as o,T as $}from"./index-pPjXkMWO.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=_.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),k.useLayoutEffect(a,c)}function q(){const e=_.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=C(n),{data:i}=T();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=E(),[y,w]=k.useState(null),s=a?.name??"this organization",z=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=z||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let x;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(x=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=x):x=e[20];const v=t??"";let g;e[21]!==v?(g={org:v},e[21]=v,e[22]=g):g=e[22];let h;e[23]!==s||e[24]!==g?(h=o.jsxs($,{to:"/$org",params:g,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=g,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==x?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,x,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=x,e[30]=j):j=e[30],j}export{q as default};
1
+ import{c as _,r as k,aZ as S,e as C,x as T,a_ as E,j as o,T as $}from"./index-1fSIJh22.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=_.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),k.useLayoutEffect(a,c)}function q(){const e=_.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=C(n),{data:i}=T();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=E(),[y,w]=k.useState(null),s=a?.name??"this organization",z=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=z||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let x;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(x=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=x):x=e[20];const v=t??"";let g;e[21]!==v?(g={org:v},e[21]=v,e[22]=g):g=e[22];let h;e[23]!==s||e[24]!==g?(h=o.jsxs($,{to:"/$org",params:g,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=g,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==x?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,x,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=x,e[30]=j):j=e[30],j}export{q as default};
@@ -1 +1 @@
1
- import{c as o,j as r,O as s}from"./index-pPjXkMWO.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
1
+ import{c as o,j as r,O as s}from"./index-1fSIJh22.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
@@ -1 +1 @@
1
- import{c as L,r as B,d as O,j as t,B as M,i as F}from"./index-pPjXkMWO.js";import{A as U}from"./avatar-qkTmk1tF.js";function I(r){const e=L.c(41),{organizations:i,domain:l,requestedSlugs:v,onRequestedSlug:y,onSelected:p,onJoined:c,onRequestCompleted:k,selectLabel:E}=r,x=E===void 0?"Select":E;let q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q=new Set,e[0]=q):q=e[0];const[_,P]=B.useState(q);let b;e[1]!==y?(b=o=>{P(s=>new Set(s).add(o)),y?.(o)},e[1]=y,e[2]=b):b=e[2];const C=b;let w;e[3]!==c?(w={mutationFn:D,onSuccess:o=>{const{organization:s,slug:f}=o;c?.(s,f)}},e[3]=c,e[4]=w):w=e[4];const n=O(w);let z;e[5]!==C||e[6]!==c||e[7]!==k?(z={mutationFn:$,onSuccess:o=>{const{organization:s,slug:f,alreadyMember:J}=o;if(J&&f){c?.(s,f);return}C(s.slug),k?.(s)}},e[5]=C,e[6]=c,e[7]=k,e[8]=z):z=e[8];const a=O(z);let u;e[9]!==v?(u=v??[],e[9]=v,e[10]=u):u=e[10];let N;e[11]!==_||e[12]!==u?(N=new Set([...u,..._]),e[11]=_,e[12]=u,e[13]=N):N=e[13];const h=N,j=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==l||e[15]!==h||e[16]!==n||e[17]!==p||e[18]!==i||e[19]!==j||e[20]!==S||e[21]!==a||e[22]!==x){let o;e[24]!==l||e[25]!==h||e[26]!==n||e[27]!==p||e[28]!==j||e[29]!==S||e[30]!==a||e[31]!==x?(o=s=>{const f=n.isPending&&j===s.slug,J=a.isPending&&S===s.slug,T=h.has(s.slug),A=s.logo??(l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(U,{url:A??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),l&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",l]})]}),s.joinMode==="auto"?t.jsx(M,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:f?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(F,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?T?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(M,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:J?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(F,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(M,{size:"default",onClick:()=>p?.(s),children:x})]},s.id)},e[24]=l,e[25]=h,e[26]=n,e[27]=p,e[28]=j,e[29]=S,e[30]=a,e[31]=x,e[32]=o):o=e[32],d=i.map(o),e[14]=l,e[15]=h,e[16]=n,e[17]=p,e[18]=i,e[19]=j,e[20]=S,e[21]=a,e[22]=x,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let R;return e[37]!==g||e[38]!==d||e[39]!==m?(R=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=R):R=e[40],R}async function $(r){const e=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r.slug})}),i=await e.json();if(!e.ok||!i.success)throw new Error(i.error||"Failed to request access");return{organization:r,slug:i.slug,alreadyMember:i.alreadyMember}}async function D(r){const e=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r.slug})}),i=await e.json();if(!e.ok||!i.success)throw new Error(i.error||"Failed to join organization");return{organization:r,slug:i.slug??r.slug}}export{I as O};
1
+ import{c as L,r as B,d as O,j as t,B as M,i as F}from"./index-1fSIJh22.js";import{A as U}from"./avatar-xEdYoKCY.js";function I(r){const e=L.c(41),{organizations:i,domain:l,requestedSlugs:v,onRequestedSlug:y,onSelected:p,onJoined:c,onRequestCompleted:k,selectLabel:E}=r,x=E===void 0?"Select":E;let q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q=new Set,e[0]=q):q=e[0];const[_,P]=B.useState(q);let b;e[1]!==y?(b=o=>{P(s=>new Set(s).add(o)),y?.(o)},e[1]=y,e[2]=b):b=e[2];const C=b;let w;e[3]!==c?(w={mutationFn:D,onSuccess:o=>{const{organization:s,slug:f}=o;c?.(s,f)}},e[3]=c,e[4]=w):w=e[4];const n=O(w);let z;e[5]!==C||e[6]!==c||e[7]!==k?(z={mutationFn:$,onSuccess:o=>{const{organization:s,slug:f,alreadyMember:J}=o;if(J&&f){c?.(s,f);return}C(s.slug),k?.(s)}},e[5]=C,e[6]=c,e[7]=k,e[8]=z):z=e[8];const a=O(z);let u;e[9]!==v?(u=v??[],e[9]=v,e[10]=u):u=e[10];let N;e[11]!==_||e[12]!==u?(N=new Set([...u,..._]),e[11]=_,e[12]=u,e[13]=N):N=e[13];const h=N,j=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==l||e[15]!==h||e[16]!==n||e[17]!==p||e[18]!==i||e[19]!==j||e[20]!==S||e[21]!==a||e[22]!==x){let o;e[24]!==l||e[25]!==h||e[26]!==n||e[27]!==p||e[28]!==j||e[29]!==S||e[30]!==a||e[31]!==x?(o=s=>{const f=n.isPending&&j===s.slug,J=a.isPending&&S===s.slug,T=h.has(s.slug),A=s.logo??(l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(U,{url:A??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),l&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",l]})]}),s.joinMode==="auto"?t.jsx(M,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:f?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(F,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?T?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(M,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:J?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(F,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(M,{size:"default",onClick:()=>p?.(s),children:x})]},s.id)},e[24]=l,e[25]=h,e[26]=n,e[27]=p,e[28]=j,e[29]=S,e[30]=a,e[31]=x,e[32]=o):o=e[32],d=i.map(o),e[14]=l,e[15]=h,e[16]=n,e[17]=p,e[18]=i,e[19]=j,e[20]=S,e[21]=a,e[22]=x,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let R;return e[37]!==g||e[38]!==d||e[39]!==m?(R=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=R):R=e[40],R}async function $(r){const e=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r.slug})}),i=await e.json();if(!e.ok||!i.success)throw new Error(i.error||"Failed to request access");return{organization:r,slug:i.slug,alreadyMember:i.alreadyMember}}async function D(r){const e=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r.slug})}),i=await e.json();if(!e.ok||!i.success)throw new Error(i.error||"Failed to join organization");return{organization:r,slug:i.slug??r.slug}}export{I as O};
@@ -1 +1 @@
1
- import{c as L,m as te,K as U,j as a,r as M,l as ne}from"./index-pPjXkMWO.js";import{i as oe,v as z,ai as se,aj as re,ak as ie,m as le,al as ce,af as ae}from"./index-XZSYHZ-t.js";import{L as Y}from"./label-CN7heivZ.js";import{S as $}from"./switch-Czifg4wP.js";import{c as ue,S as fe,a as pe,b as de,d as ye}from"./select-CNB5fe3p.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function je(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function Ee(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(je(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=Ee(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=j=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,j)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=j=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:j}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const E={...o};if(T)delete E[u];else{const D=r?.[u];E[u]=D??(u==="type"?"website":"")}s(E)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const j=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const E=p&&d.includes(u),D=E&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),E&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>j(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const E=me(s);p(E),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const E=Se(T,n);p(E)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let j;e[8]!==h||e[9]!==f?(j=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=j):j=e[10];const P=j;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,qe as a,Ce as b,He as c,Z as d,Ee as f,k as i,Ze as r,w as u};
1
+ import{c as L,m as te,K as U,j as a,r as M,l as ne}from"./index-1fSIJh22.js";import{i as oe,v as z,ai as se,aj as re,ak as ie,m as le,al as ce,af as ae}from"./index-_IHAm-_z.js";import{L as Y}from"./label-DSNRIgjt.js";import{S as $}from"./switch-CX5J9FKg.js";import{c as ue,S as fe,a as pe,b as de,d as ye}from"./select-Bi9bU2VK.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function je(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function Ee(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(je(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=Ee(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=j=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,j)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=j=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:j}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const E={...o};if(T)delete E[u];else{const D=r?.[u];E[u]=D??(u==="type"?"website":"")}s(E)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const j=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const E=p&&d.includes(u),D=E&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),E&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>j(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const E=me(s);p(E),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const E=Se(T,n);p(E)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let j;e[8]!==h||e[9]!==f?(j=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=j):j=e[10];const P=j;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,qe as a,Ce as b,He as c,Z as d,Ee as f,k as i,Ze as r,w as u};
@@ -0,0 +1 @@
1
+ import{c as it,r as E,j as e,i as rt}from"./index-1fSIJh22.js";import{S as mt,b as pt,c as st,d as at}from"./sheet-ZoSnDrwM.js";import{S as nt}from"./scroll-area-DZjqp9jH.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-DIFeKgY_.js";import{v as xt}from"./index-_IHAm-_z.js";import"./X-DYHYGN_A.js";import"./agent-icon-CdRAruzy.js";import"./AlertCircle-D27DNBuk.js";import"./Tool01-B3T5XEH8.js";import"./SwitchHorizontal01-sdJMTy6A.js";import"./Settings02-CIxRqUJ6.js";import"./XCircle-DI88AZ1K.js";import"./ArrowUpRight-B0IcegbE.js";import"./ZapSquare-CTRU27-a.js";import"./Users03-8xt-LzrG.js";import"./CheckCircle-BqvcImZw.js";import"./Check-DjbNu1wk.js";import"./ChevronDown-ChzOIRMN.js";import"./ChevronRight-BMYqr5mg.js";import"./ChevronUp-D3E47VS4.js";import"./Circle-BTk35DNa.js";import"./Stars02-Ci7hwXdU.js";import"./Loading02-CyD5wvpA.js";import"./Copy01-BupXVMxd.js";import"./ZoomOut-CQ0pMakr.js";import"./DotsVertical-NS06m2ex.js";import"./Globe01-D_sF9tkh.js";import"./Eye-BCFb3Pr0.js";import"./FilterLines-BPhOKU3g.js";import"./Star01-CMrOPAU1.js";import"./Globe04-DqrswRGa.js";import"./HardDrive-BXnXVq-L.js";import"./Key01-5oIVCQ6h.js";import"./LayoutLeft-DvimfYbd.js";import"./LinkExternal01-P-ZftaiS.js";import"./List-BrRy9nh9.js";import"./Monitor01-CSz-AHTf.js";import"./Sun-Ce_EUrXd.js";import"./Palette-uJEc44DN.js";import"./Play-DCAaSSU6.js";import"./Plus-DKYhZHY2.js";import"./SearchLg-D5EbflDe.js";import"./SearchMd-Dv2fAc6M.js";import"./Shield01-BlYcntqH.js";import"./Stars01-CDu18vGr.js";import"./Trash01-BntZwC2j.js";import"./Upload01-BUaljIu0.js";import"./User01-BEG2JP2P.js";import"./Users01-BcPG_xvp.js";import"./XClose-DEv56Pz6.js";import"./Zap-Cck_KglN.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CGAk1IOJ.js";import"./tooltip-CzWWX9Zy.js";import"./file-type-icon-CfEzZN8D.js";import"./dialog-DhogbNrD.js";import"./use-mobile-Cquheqlv.js";import"./tab-id-CLpu897Q.js";import"./content-blocks-o63cs2vh.js";import"./types-CmsZBj86.js";import"./use-mcp-client-CyvYEPYG.js";import"./constants-C8_Swa4x.js";import"./auth-COs6dQOo.js";import"./chat-context-DDm8QfNO.js";import"./hooks-Cwuehb03.js";import"./decopilot-sse-pool-BIAl89Rh.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-zlZ_YFIK.js";import"./use-collections-CutR3paL.js";import"./use-ai-providers-BbwZkPx6.js";import"./studio-tools-DLaMoAs0.js";import"./use-decopilot-events-CgAkYn3v.js";import"./use-organization-settings-BQiNnrop.js";import"./use-clock-tick-Dwr_-EjU.js";import"./shell-layout-DWxf6XU9.js";import"./avatar-xEdYoKCY.js";import"./alert-dialog-IqfxiubQ.js";import"./required-auth-layout-FnO7dZ6U.js";import"./use-org-sso-Dbxo2Yvm.js";import"./integration-icon-DU4GHtyn.js";import"./use-navigate-to-agent-gjS0eO01.js";import"./use-connection-CKqD9jJP.js";import"./use-mcp-prompts-C_vPfH__.js";import"./form-BkYRU4Ul.js";import"./label-DSNRIgjt.js";import"./input-DtIeb-d9.js";import"./select-Bi9bU2VK.js";import"./switch-CX5J9FKg.js";import"./library-tab-xY-aeWS1.js";import"./drawer-DsAzjWMO.js";import"./collection-search-D_f3pT-p.js";import"./tabs-BEWqoEdE.js";import"./toggle-group-C8cmWeP-.js";import"./agent-capabilities-CgEMo-01.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-eSnCMgBR.js";import"./use-registry-connections-BbYLvtdh.js";import"./useInfiniteQuery-N9WYjPkn.js";import"./use-infinite-scroll-CtYGFJ5F.js";import"./extract-connection-data-BTB8VaBz.js";import"./card-BVtZpt8u.js";import"./collection-tabs-qNtCwfg5.js";import"./badge-Dn-HNDWU.js";import"./textarea-zKfZl_E7.js";import"./connection-form-helpers-PLcXdPBa.js";import"./authenticate-and-persist-oauth-DlRuR5UL.js";import"./mcp-oauth-DhHWa50S.js";import"./useSuspenseInfiniteQuery-BGlQ9fKh.js";import"./connect-desktop-dialog-o-WWTYjT.js";import"./decopilot-D4BJYxJZ.js";import"./checkbox-CSe8TOzv.js";import"./skeleton-D7JDqPAt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dk7w7jA4.js";import"./popover-CNEPCEun.js";import"./command-CeMBu3Rg.js";import"./index-BWsF4tLX.js";import"./index-CBonG5tc.js";import"./toolbar-DWpCUnNZ.js";import"./use-debounced-value-CzNFumIC.js";import"./dropdown-menu-DI97feJI.js";import"./index-B0hYRRvV.js";import"./question-004-sINsf4GQ.js";import"./task-row-DTN6jTGH.js";import"./task-status-Br0YFPUm.js";import"./use-status-sounds-CsFCZ2Da.js";import"./empty-state-D3kjx8ss.js";import"./use-mcp-tools-DITRK-ju.js";import"./use-capability-B60tguhn.js";import"./tools-list-B168nAhU.js";import"./use-debounced-autosave-BJjFjl9N.js";import"./index-BYzrSXWr.js";import"./sidebar-B2zP9lCK.js";import"./search-input-z9tq8TXS.js";import"./github-repo-picker-CZ1Ro4QH.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BU36_GZQ.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-D7bzEeij.js";import"./automation-runs-Bd2a7yBo.js";import"./table-OqpL1ftA.js";import"./use-members-Czk_FUv-.js";import"./use-org-auth-client-CMvZkiPj.js";import"./use-automations-C_vN1Ixh.js";import"./use-file-configs-CxJKkGsa.js";import"./monaco-editor-BfEEKc3k.js";import"./select-model-DP_zKM9N.js";import"./automation-list-row-Azl2etlU.js";function ci(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,B=m.kind==="site"&&o&&n,H=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{ci as SeoSheet};
@@ -1 +1 @@
1
- import{r as i,a7 as $,j as c,dv as z,ab as G,a8 as O,a4 as _,aa as g,dw as w,b6 as E,dx as L,dy as b,dC as H,dD as K,a6 as B,dE as U,dF as V,dG as W,dz as Z,dA as q,dB as J,c as R,l as Q}from"./index-pPjXkMWO.js";var C="Popover",[j]=B(C,[b]),P=b(),[X,u]=j(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(z,{...p,children:c.jsx(X,{scope:e,contentId:G(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(w,{...s,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(w,{asChild:!0,...s,children:p})});S.displayName=y;var A="PopoverPortal",[ee,oe]=j(A,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(A,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(E,{present:o||s.open,children:c.jsx(L,{asChild:!0,container:n,children:r})})})};D.displayName=A;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(E,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
1
+ import{r as i,a7 as $,j as c,dv as z,ab as G,a8 as O,a4 as _,aa as g,dw as w,b6 as E,dx as L,dy as b,dC as H,dD as K,a6 as B,dE as U,dF as V,dG as W,dz as Z,dA as q,dB as J,c as R,l as Q}from"./index-1fSIJh22.js";var C="Popover",[j]=B(C,[b]),P=b(),[X,u]=j(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(z,{...p,children:c.jsx(X,{scope:e,contentId:G(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(w,{...s,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(w,{asChild:!0,...s,children:p})});S.displayName=y;var A="PopoverPortal",[ee,oe]=j(A,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(A,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(E,{present:o||s.open,children:c.jsx(L,{asChild:!0,container:n,children:r})})})};D.displayName=A;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(E,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
@@ -1 +1 @@
1
- import{c as H,j as t,B as Z}from"./index-pPjXkMWO.js";import{n as ee}from"./LinkExternal01-DYdIsix1.js";import{aE as te,t as oe}from"./agent-icon-BBTxD8Vr.js";import{I as J}from"./input-D3oAzmpd.js";import{L as G}from"./label-CN7heivZ.js";import{M as ie}from"./automation-runs-98bvfxso.js";import{T as Q,a as se,b as W,c as le}from"./tabs-C01VKZPn.js";import{T as re}from"./textarea-_7jiD7tD.js";import{au as ae,av as me,at as pe,aw as ne,ax as ce,ay as de,az as fe}from"./index-XZSYHZ-t.js";import{b as ue,a as xe,B as he}from"./block-document-CUqxuHG8.js";import{u as ge,s as F,E as ve,R as ye,A as je}from"./primitives-C09eM3XN.js";import"./AlertCircle-DP0nsq1e.js";import"./Tool01-MTiJaetc.js";import"./SwitchHorizontal01-BSA9bywH.js";import"./Settings02-DszLgCXG.js";import"./XCircle-DMTLazaF.js";import"./ArrowUpRight-3SkCtZ7K.js";import"./ZapSquare-DfDf_Qdm.js";import"./Users03-tyWJCIG0.js";import"./CheckCircle-BsrExj4H.js";import"./Check-CUC1zRnb.js";import"./ChevronDown-B1mct1yp.js";import"./ChevronRight-C_4FW4NO.js";import"./ChevronUp-Bu7-a85r.js";import"./Circle-D65-cV8s.js";import"./Stars02-CJRC9WOX.js";import"./Loading02-1-7GqxDm.js";import"./Copy01-C-7fHSay.js";import"./ZoomOut-Dt1g7vVy.js";import"./DotsVertical-BaKPV3I-.js";import"./Globe01-Dz7J456-.js";import"./Eye-BD5GpDZ-.js";import"./FilterLines-DFbyXaVS.js";import"./Star01-CVsItQ1u.js";import"./Globe04-ninCQ4l6.js";import"./HardDrive-DghaQYox.js";import"./Key01-DBAS-H0R.js";import"./LayoutLeft-PT-KYBVh.js";import"./List-CR20iQn1.js";import"./Monitor01-CsiKf4Vb.js";import"./Sun-CfFmz0ui.js";import"./Palette-Bh8DSKBB.js";import"./Play-BZWHu6vA.js";import"./Plus-CToP0bbt.js";import"./SearchLg-YHk3bRUf.js";import"./SearchMd-Dx8opdKE.js";import"./Shield01-DTqhedHO.js";import"./Stars01-CsOhgCzT.js";import"./Trash01-BDWbYvcu.js";import"./Upload01-DNJ4y_co.js";import"./User01-BnV8b2oc.js";import"./Users01-CeDec9Hr.js";import"./XClose-CQ7XxXz6.js";import"./X-CFM-EaJf.js";import"./Zap-B6Y5QNOW.js";import"./useInfiniteQuery-B0z5w_RI.js";import"./use-infinite-scroll-BGEZaC_d.js";import"./use-connection-HPYIB1L_.js";import"./use-collections-E89pjH-z.js";import"./use-mcp-client-CrFimBIE.js";import"./constants-C8_Swa4x.js";import"./auth-BALlir75.js";import"./use-virtual-mcp-Bc1u53Yq.js";import"./card-BmfGcj0O.js";import"./sheet-1qlQOBan.js";import"./table-DPQQ4yes.js";import"./empty-state-xwWZSkhQ.js";import"./use-members-BRBh_r2f.js";import"./use-org-auth-client-CuoSRLLT.js";import"./task-status-BfQFLXYY.js";import"./use-automations-DS7x_Yka.js";import"./studio-tools-D16Iabf3.js";import"./useSuspenseInfiniteQuery-HmJ78SJB.js";import"./badge-Dxl2nD6L.js";import"./select-CNB5fe3p.js";import"./tooltip-BSvDzA5F.js";import"./checkbox-CfEEJY30.js";import"./command-D2GI_S2n.js";import"./index-yPrRyIJq.js";import"./dialog-xw_WZv6d.js";import"./popover-B9_4d9Hb.js";import"./avatar-qkTmk1tF.js";import"./scroll-area-BwQt66gB.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BucqFRkh.js";import"./file-type-icon-B6nuKI0W.js";import"./use-mobile-CcaXr_ZY.js";import"./tab-id-CLpu897Q.js";import"./content-blocks-o63cs2vh.js";import"./types-DSpLZCss.js";import"./chat-context-DvCifsaP.js";import"./hooks-C1eaKJ5l.js";import"./decopilot-sse-pool-DKy1YCA-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BlK26Pak.js";import"./use-decopilot-events-DnA17lg1.js";import"./use-organization-settings-DKhFQzFb.js";import"./use-clock-tick-CqbmcogF.js";import"./shell-layout-D5fv0Gnj.js";import"./alert-dialog-zbSvd7Ki.js";import"./required-auth-layout-Cc06WCjO.js";import"./use-org-sso-DOBO5bz0.js";import"./integration-icon-ChiNtR71.js";import"./use-navigate-to-agent-hUrzXW4j.js";import"./use-mcp-prompts-BLaH_phU.js";import"./form-BDEEsjow.js";import"./library-tab-BET5pVoI.js";import"./drawer-B_-kTqsl.js";import"./collection-search-B2eeAfCm.js";import"./toggle-group-Cr9Sd28-.js";import"./agent-capabilities-B7x2s3UT.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Dea6GcsD.js";import"./use-registry-connections-5ggPsOFj.js";import"./extract-connection-data-BuuPL_TW.js";import"./collection-tabs-ChhCmRrP.js";import"./connection-form-helpers-CfJCI7YZ.js";import"./authenticate-and-persist-oauth-Ag6OuiCi.js";import"./mcp-oauth-DaQytGE0.js";import"./connect-desktop-dialog-DQ_-hvKq.js";import"./decopilot-CGLmwUQj.js";import"./skeleton-CMqpP0rC.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B6HW8SMd.js";import"./index-CW0ySYG0.js";import"./toolbar-DEctTAZS.js";import"./use-debounced-value-DwsMvXCK.js";import"./dropdown-menu-WR1NGNoR.js";import"./index-BfM-TSSf.js";import"./question-004-sINsf4GQ.js";import"./task-row-Dq5f6UoU.js";import"./use-status-sounds-rsB3nf6f.js";import"./use-mcp-tools-2qGpGfQT.js";import"./use-capability-DXxanrFU.js";import"./tools-list-DzdxUwY0.js";import"./switch-Czifg4wP.js";import"./use-debounced-autosave-eXbj54WV.js";import"./index-CDriDNRl.js";import"./sidebar-qR7l9LGc.js";import"./search-input-Br6kvm4V.js";import"./github-repo-picker-CyJ9CV9M.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-DrpewLw2.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-DMS2W-_l.js";import"./use-file-configs-77JsXLRJ.js";import"./monaco-editor-mtUMAQ2f.js";import"./select-model-8hRE4pUt.js";import"./automation-list-row-DGvZjGai.js";function be(A){return Array.isArray(A)?A.map(e=>({key:F(e?.key),value:F(e?.value)})):[]}function ui(A){const e=H.c(66),{orgSlug:i,virtualMcpId:d,branch:o,blockKey:l,block:p,decofile:m,meta:u,previewBaseUrl:x}=A;let y;e[0]!==o||e[1]!==i||e[2]!==d?(y={orgSlug:i,virtualMcpId:d,branch:o},e[0]=o,e[1]=i,e[2]=d,e[3]=y):y=e[3];const s=ae(y);let n;e[4]!==p?(n=me(p,"posts"),e[4]=p,e[5]=n):n=e[5];const j=n;let b;e[6]!==l||e[7]!==s?(b=T=>{s.mutate({blockKey:l,data:ne(l,"posts",T)})},e[6]=l,e[7]=s,e[8]=b):b=e[8];const[r,_]=ge(j,b);let C;e[9]!==r||e[10]!==_?(C=(T,Y)=>_({...r,[T]:Y}),e[9]=r,e[10]=_,e[11]=C):C=e[11];const h=C;let S;e[12]!==m||e[13]!==r||e[14]!==x?(S=ue({decofile:m,post:r,previewBaseUrl:x}),e[12]=m,e[13]=r,e[14]=x,e[15]=S):S=e[15];const f=S;let a;e[16]!==r.title?(a=F(r.title)||"Untitled post",e[16]=r.title,e[17]=a):a=e[17];let c;e[18]!==a?(c=t.jsx("span",{className:"truncate text-sm font-medium",children:a}),e[18]=a,e[19]=c):c=e[19];let g;e[20]!==s.isError||e[21]!==s.isPending?(g=t.jsx(pe,{isPending:s.isPending,isError:s.isError}),e[20]=s.isError,e[21]=s.isPending,e[22]=g):g=e[22];const k=!f,P=f?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let N;e[23]!==f?(N=()=>{f&&window.open(f,"_blank","noopener,noreferrer")},e[23]=f,e[24]=N):N=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let w;e[26]!==P||e[27]!==N||e[28]!==k?(w=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:k,title:P,onClick:N,children:[B,"See preview"]}),e[26]=P,e[27]=N,e[28]=k,e[29]=w):w=e[29];let E;e[30]!==w||e[31]!==g?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[g,w]}),e[30]=w,e[31]=g,e[32]=E):E=e[32];let v;e[33]!==E||e[34]!==c?(v=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,E]}),e[33]=E,e[34]=c,e[35]=v):v=e[35];let L;e[36]!==r.title?(L=F(r.title),e[36]=r.title,e[37]=L):L=e[37];let R;e[38]!==h?(R=T=>h("title",T),e[38]=h,e[39]=R):R=e[39];let U;e[40]!==L||e[41]!==R?(U=t.jsx(ve,{value:L,onChange:R,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=L,e[41]=R,e[42]=U):U=e[42];let O;e[43]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=O):O=e[43];let K;e[44]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(se,{children:[O,t.jsxs(Q,{value:"settings",children:[t.jsx(oe,{}),"Settings"]})]}),e[44]=K):K=e[44];let $;e[45]!==r.sections?($=xe(r.sections),e[45]=r.sections,e[46]=$):$=e[46];let I;e[47]!==h?(I=T=>h("sections",T),e[47]=h,e[48]=I):I=e[48];let M;e[49]!==u||e[50]!==$||e[51]!==I?(M=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(he,{value:$,onChange:I,meta:u,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=u,e[50]=$,e[51]=I,e[52]=M):M=e[52];let z;e[53]!==m||e[54]!==r||e[55]!==h?(z=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ce,{post:r,decofile:m,onChange:h})})}),e[53]=m,e[54]=r,e[55]=h,e[56]=z):z=e[56];let D;e[57]!==M||e[58]!==z?(D=t.jsxs(le,{defaultValue:"content",className:"mt-6 gap-4",children:[K,M,z]}),e[57]=M,e[58]=z,e[59]=D):D=e[59];let V;e[60]!==U||e[61]!==D?(V=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,D]})}),e[60]=U,e[61]=D,e[62]=V):V=e[62];let q;return e[63]!==v||e[64]!==V?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[v,V]}),e[63]=v,e[64]=V,e[65]=q):q=e[65],q}function Ce(A){const e=H.c(59),{post:i,decofile:d,onChange:o}=A;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=l):l=e[0];let p;e[1]!==i.excerpt?(p=F(i.excerpt),e[1]=i.excerpt,e[2]=p):p=e[2];let m;e[3]!==o?(m=v=>o("excerpt",v.target.value),e[3]=o,e[4]=m):m=e[4];let u;e[5]!==p||e[6]!==m?(u=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx(re,{id:"post-excerpt",value:p,onChange:m,rows:2})]}),e[5]=p,e[6]=m,e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=x):x=e[8];let y;e[9]!==i.slug?(y=F(i.slug),e[9]=i.slug,e[10]=y):y=e[10];let s;e[11]!==o?(s=v=>o("slug",v.target.value),e[11]=o,e[12]=s):s=e[12];let n;e[13]!==y||e[14]!==s?(n=t.jsxs("div",{className:"space-y-2",children:[x,t.jsx(J,{id:"post-slug",value:y,onChange:s,placeholder:"my-post",className:"h-10"})]}),e[13]=y,e[14]=s,e[15]=n):n=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j={type:"string",format:"date",title:"Date"},e[16]=j):j=e[16];let b;e[17]!==i.date?(b=F(i.date),e[17]=i.date,e[18]=b):b=e[18];let r;e[19]!==o?(r=v=>o("date",v),e[19]=o,e[20]=r):r=e[20];let _;e[21]!==b||e[22]!==r?(_=t.jsx(fe,{schema:j,value:b,onChange:r,path:"post-date",label:"Date"}),e[21]=b,e[22]=r,e[23]=_):_=e[23];let C;e[24]!==_||e[25]!==n?(C=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n,_]}),e[24]=_,e[25]=n,e[26]=C):C=e[26];let h;e[27]===Symbol.for("react.memo_cache_sentinel")?(h={type:"string",format:"image-uri",title:"Cover image"},e[27]=h):h=e[27];let S;e[28]!==o?(S=v=>o("image",v),e[28]=o,e[29]=S):S=e[29];let f;e[30]!==i.image||e[31]!==S?(f=t.jsx(ce,{schema:h,value:i.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=i.image,e[31]=S,e[32]=f):f=e[32];let a;e[33]===Symbol.for("react.memo_cache_sentinel")?(a=["email"],e[33]=a):a=e[33];let c;e[34]!==o?(c=v=>o("authors",v),e[34]=o,e[35]=c):c=e[35];let g;e[36]!==d||e[37]!==i.authors||e[38]!==c?(g=t.jsx(X,{label:"Authors",decofile:d,kind:"authors",valueField:"email",extraFields:a,selected:i.authors,onChange:c}),e[36]=d,e[37]=i.authors,e[38]=c,e[39]=g):g=e[39];let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=["slug"],e[40]=k):k=e[40];let P;e[41]!==o?(P=v=>o("categories",v),e[41]=o,e[42]=P):P=e[42];let N;e[43]!==d||e[44]!==i.categories||e[45]!==P?(N=t.jsx(X,{label:"Categories",decofile:d,kind:"categories",valueField:"slug",extraFields:k,selected:i.categories,onChange:P}),e[43]=d,e[44]=i.categories,e[45]=P,e[46]=N):N=e[46];let B;e[47]!==o?(B=v=>o("extraProps",v),e[47]=o,e[48]=B):B=e[48];let w;e[49]!==i.extraProps||e[50]!==B?(w=t.jsx(ke,{value:i.extraProps,onChange:B}),e[49]=i.extraProps,e[50]=B,e[51]=w):w=e[51];let E;return e[52]!==C||e[53]!==f||e[54]!==g||e[55]!==N||e[56]!==w||e[57]!==u?(E=t.jsxs("div",{className:"space-y-5",children:[u,C,f,g,N,w]}),e[52]=C,e[53]=f,e[54]=g,e[55]=N,e[56]=w,e[57]=u,e[58]=E):E=e[58],E}function ke(A){const e=H.c(15),{value:i,onChange:d}=A;let o,l,p,m;if(e[0]!==d||e[1]!==i){o=be(i);const y=(s,n)=>d(o.map((j,b)=>b===s?{...j,...n}:j));l="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(G,{children:"Extra props"}),e[6]=p):p=e[6],m=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((s,n)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:s.key,onChange:j=>y(n,{key:j.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:s.value,onChange:j=>y(n,{value:j.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>d(o.filter((j,b)=>b!==n))})]},n))}),e[0]=d,e[1]=i,e[2]=o,e[3]=l,e[4]=p,e[5]=m}else o=e[2],l=e[3],p=e[4],m=e[5];let u;e[7]!==o||e[8]!==d?(u=t.jsx(je,{label:"Add prop",onClick:()=>d([...o,{key:"",value:""}])}),e[7]=o,e[8]=d,e[9]=u):u=e[9];let x;return e[10]!==l||e[11]!==p||e[12]!==m||e[13]!==u?(x=t.jsxs("div",{className:l,children:[p,m,u]}),e[10]=l,e[11]=p,e[12]=m,e[13]=u,e[14]=x):x=e[14],x}function X(A){const e=H.c(31),{label:i,decofile:d,kind:o,valueField:l,extraFields:p,selected:m,onChange:u}=A;let x,y,s;if(e[0]!==d||e[1]!==o||e[2]!==l){x=de(d,o);let f;e[6]!==l?(f=(c,g)=>F(c[l])||g,e[6]=l,e[7]=f):f=e[7],s=f;let a;e[8]!==s?(a=c=>{const{key:g,payload:k}=c;return{value:s(k,g),label:F(k.name)||s(k,g)}},e[8]=s,e[9]=a):a=e[9],y=x.map(a),e[0]=d,e[1]=o,e[2]=l,e[3]=x,e[4]=y,e[5]=s}else x=e[3],y=e[4],s=e[5];const n=y;let j;if(e[10]!==m||e[11]!==l){const f=Array.isArray(m)?m:[];let a;e[13]!==l?(a=c=>F(c[l]),e[13]=l,e[14]=a):a=e[14],j=f.map(a).filter(Boolean),e[10]=m,e[11]=l,e[12]=j}else j=e[12];const b=j;let r;e[15]!==p||e[16]!==u||e[17]!==x||e[18]!==l||e[19]!==s?(r=f=>{u(f.map(a=>{const c=x.find(k=>{const{key:P,payload:N}=k;return s(N,P)===a});if(!c)return{name:a,[l]:a};const g={name:F(c.payload.name)};for(const k of p)g[k]=c.payload[k]??a;return g}))},e[15]=p,e[16]=u,e[17]=x,e[18]=l,e[19]=s,e[20]=r):r=e[20];const _=r;let C;e[21]!==i?(C=t.jsx(G,{children:i}),e[21]=i,e[22]=C):C=e[22];let h;e[23]!==b||e[24]!==_||e[25]!==i||e[26]!==n?(h=n.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",i.toLowerCase()," yet — create some in the"," ",i.toLowerCase()," collection."]}):t.jsx(ie,{options:n,defaultValue:b,onValueChange:_,placeholder:`Select ${i.toLowerCase()}`,maxCount:4}),e[23]=b,e[24]=_,e[25]=i,e[26]=n,e[27]=h):h=e[27];let S;return e[28]!==C||e[29]!==h?(S=t.jsxs("div",{className:"space-y-2",children:[C,h]}),e[28]=C,e[29]=h,e[30]=S):S=e[30],S}export{ui as PostEditor};
1
+ import{c as G,j as t,B as Z}from"./index-1fSIJh22.js";import{n as ee}from"./LinkExternal01-P-ZftaiS.js";import{aH as te,t as oe}from"./agent-icon-CdRAruzy.js";import{I as J}from"./input-DtIeb-d9.js";import{L as q}from"./label-DSNRIgjt.js";import{M as ie}from"./automation-runs-Bd2a7yBo.js";import{T as Q,a as se,b as W,c as le}from"./tabs-BEWqoEdE.js";import{T as re}from"./textarea-zKfZl_E7.js";import{au as ae,av as me,at as pe,aw as ne,ax as ce,ay as de,az as fe}from"./index-_IHAm-_z.js";import{b as ue,a as xe,B as he}from"./block-document-DxMAa7rl.js";import{u as ge,s as F,E as ve,R as ye,A as je}from"./primitives-Bj4WwKGm.js";import"./AlertCircle-D27DNBuk.js";import"./Tool01-B3T5XEH8.js";import"./SwitchHorizontal01-sdJMTy6A.js";import"./Settings02-CIxRqUJ6.js";import"./XCircle-DI88AZ1K.js";import"./ArrowUpRight-B0IcegbE.js";import"./ZapSquare-CTRU27-a.js";import"./Users03-8xt-LzrG.js";import"./CheckCircle-BqvcImZw.js";import"./Check-DjbNu1wk.js";import"./ChevronDown-ChzOIRMN.js";import"./ChevronRight-BMYqr5mg.js";import"./ChevronUp-D3E47VS4.js";import"./Circle-BTk35DNa.js";import"./Stars02-Ci7hwXdU.js";import"./Loading02-CyD5wvpA.js";import"./Copy01-BupXVMxd.js";import"./ZoomOut-CQ0pMakr.js";import"./DotsVertical-NS06m2ex.js";import"./Globe01-D_sF9tkh.js";import"./Eye-BCFb3Pr0.js";import"./FilterLines-BPhOKU3g.js";import"./Star01-CMrOPAU1.js";import"./Globe04-DqrswRGa.js";import"./HardDrive-BXnXVq-L.js";import"./Key01-5oIVCQ6h.js";import"./LayoutLeft-DvimfYbd.js";import"./List-BrRy9nh9.js";import"./Monitor01-CSz-AHTf.js";import"./Sun-Ce_EUrXd.js";import"./Palette-uJEc44DN.js";import"./Play-DCAaSSU6.js";import"./Plus-DKYhZHY2.js";import"./SearchLg-D5EbflDe.js";import"./SearchMd-Dv2fAc6M.js";import"./Shield01-BlYcntqH.js";import"./Stars01-CDu18vGr.js";import"./Trash01-BntZwC2j.js";import"./Upload01-BUaljIu0.js";import"./User01-BEG2JP2P.js";import"./Users01-BcPG_xvp.js";import"./XClose-DEv56Pz6.js";import"./X-DYHYGN_A.js";import"./Zap-Cck_KglN.js";import"./useInfiniteQuery-N9WYjPkn.js";import"./use-infinite-scroll-CtYGFJ5F.js";import"./use-connection-CKqD9jJP.js";import"./use-collections-CutR3paL.js";import"./use-mcp-client-CyvYEPYG.js";import"./constants-C8_Swa4x.js";import"./auth-COs6dQOo.js";import"./use-virtual-mcp-zlZ_YFIK.js";import"./card-BVtZpt8u.js";import"./sheet-ZoSnDrwM.js";import"./table-OqpL1ftA.js";import"./empty-state-D3kjx8ss.js";import"./use-members-Czk_FUv-.js";import"./use-org-auth-client-CMvZkiPj.js";import"./task-status-Br0YFPUm.js";import"./use-automations-C_vN1Ixh.js";import"./studio-tools-DLaMoAs0.js";import"./useSuspenseInfiniteQuery-BGlQ9fKh.js";import"./badge-Dn-HNDWU.js";import"./select-Bi9bU2VK.js";import"./tooltip-CzWWX9Zy.js";import"./checkbox-CSe8TOzv.js";import"./command-CeMBu3Rg.js";import"./index-BWsF4tLX.js";import"./dialog-DhogbNrD.js";import"./popover-CNEPCEun.js";import"./avatar-xEdYoKCY.js";import"./scroll-area-DZjqp9jH.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CGAk1IOJ.js";import"./file-type-icon-CfEzZN8D.js";import"./use-mobile-Cquheqlv.js";import"./tab-id-CLpu897Q.js";import"./content-blocks-o63cs2vh.js";import"./types-CmsZBj86.js";import"./chat-context-DDm8QfNO.js";import"./hooks-Cwuehb03.js";import"./decopilot-sse-pool-BIAl89Rh.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BbwZkPx6.js";import"./use-decopilot-events-CgAkYn3v.js";import"./use-organization-settings-BQiNnrop.js";import"./use-clock-tick-Dwr_-EjU.js";import"./shell-layout-DWxf6XU9.js";import"./alert-dialog-IqfxiubQ.js";import"./required-auth-layout-FnO7dZ6U.js";import"./use-org-sso-Dbxo2Yvm.js";import"./integration-icon-DU4GHtyn.js";import"./use-navigate-to-agent-gjS0eO01.js";import"./use-mcp-prompts-C_vPfH__.js";import"./form-BkYRU4Ul.js";import"./library-tab-xY-aeWS1.js";import"./drawer-DsAzjWMO.js";import"./collection-search-D_f3pT-p.js";import"./toggle-group-C8cmWeP-.js";import"./agent-capabilities-CgEMo-01.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-eSnCMgBR.js";import"./use-registry-connections-BbYLvtdh.js";import"./extract-connection-data-BTB8VaBz.js";import"./collection-tabs-qNtCwfg5.js";import"./connection-form-helpers-PLcXdPBa.js";import"./authenticate-and-persist-oauth-DlRuR5UL.js";import"./mcp-oauth-DhHWa50S.js";import"./connect-desktop-dialog-o-WWTYjT.js";import"./decopilot-D4BJYxJZ.js";import"./skeleton-D7JDqPAt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dk7w7jA4.js";import"./index-CBonG5tc.js";import"./toolbar-DWpCUnNZ.js";import"./use-debounced-value-CzNFumIC.js";import"./dropdown-menu-DI97feJI.js";import"./index-B0hYRRvV.js";import"./question-004-sINsf4GQ.js";import"./task-row-DTN6jTGH.js";import"./use-status-sounds-CsFCZ2Da.js";import"./use-mcp-tools-DITRK-ju.js";import"./use-capability-B60tguhn.js";import"./tools-list-B168nAhU.js";import"./switch-CX5J9FKg.js";import"./use-debounced-autosave-BJjFjl9N.js";import"./index-BYzrSXWr.js";import"./sidebar-B2zP9lCK.js";import"./search-input-z9tq8TXS.js";import"./github-repo-picker-CZ1Ro4QH.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BU36_GZQ.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-D7bzEeij.js";import"./use-file-configs-CxJKkGsa.js";import"./monaco-editor-BfEEKc3k.js";import"./select-model-DP_zKM9N.js";import"./automation-list-row-Azl2etlU.js";function be(A){return Array.isArray(A)?A.map(e=>({key:F(e?.key),value:F(e?.value)})):[]}function ui(A){const e=G.c(66),{orgSlug:i,virtualMcpId:d,branch:o,blockKey:l,block:p,decofile:m,meta:u,previewBaseUrl:x}=A;let y;e[0]!==o||e[1]!==i||e[2]!==d?(y={orgSlug:i,virtualMcpId:d,branch:o},e[0]=o,e[1]=i,e[2]=d,e[3]=y):y=e[3];const s=ae(y);let n;e[4]!==p?(n=me(p,"posts"),e[4]=p,e[5]=n):n=e[5];const j=n;let b;e[6]!==l||e[7]!==s?(b=T=>{s.mutate({blockKey:l,data:ne(l,"posts",T)})},e[6]=l,e[7]=s,e[8]=b):b=e[8];const[r,_]=ge(j,b);let C;e[9]!==r||e[10]!==_?(C=(T,Y)=>_({...r,[T]:Y}),e[9]=r,e[10]=_,e[11]=C):C=e[11];const h=C;let S;e[12]!==m||e[13]!==r||e[14]!==x?(S=ue({decofile:m,post:r,previewBaseUrl:x}),e[12]=m,e[13]=r,e[14]=x,e[15]=S):S=e[15];const f=S;let a;e[16]!==r.title?(a=F(r.title)||"Untitled post",e[16]=r.title,e[17]=a):a=e[17];let c;e[18]!==a?(c=t.jsx("span",{className:"truncate text-sm font-medium",children:a}),e[18]=a,e[19]=c):c=e[19];let g;e[20]!==s.isError||e[21]!==s.isPending?(g=t.jsx(pe,{isPending:s.isPending,isError:s.isError}),e[20]=s.isError,e[21]=s.isPending,e[22]=g):g=e[22];const k=!f,P=f?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let N;e[23]!==f?(N=()=>{f&&window.open(f,"_blank","noopener,noreferrer")},e[23]=f,e[24]=N):N=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let w;e[26]!==P||e[27]!==N||e[28]!==k?(w=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:k,title:P,onClick:N,children:[B,"See preview"]}),e[26]=P,e[27]=N,e[28]=k,e[29]=w):w=e[29];let E;e[30]!==w||e[31]!==g?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[g,w]}),e[30]=w,e[31]=g,e[32]=E):E=e[32];let v;e[33]!==E||e[34]!==c?(v=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,E]}),e[33]=E,e[34]=c,e[35]=v):v=e[35];let L;e[36]!==r.title?(L=F(r.title),e[36]=r.title,e[37]=L):L=e[37];let R;e[38]!==h?(R=T=>h("title",T),e[38]=h,e[39]=R):R=e[39];let U;e[40]!==L||e[41]!==R?(U=t.jsx(ve,{value:L,onChange:R,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=L,e[41]=R,e[42]=U):U=e[42];let O;e[43]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=O):O=e[43];let H;e[44]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsxs(se,{children:[O,t.jsxs(Q,{value:"settings",children:[t.jsx(oe,{}),"Settings"]})]}),e[44]=H):H=e[44];let $;e[45]!==r.sections?($=xe(r.sections),e[45]=r.sections,e[46]=$):$=e[46];let I;e[47]!==h?(I=T=>h("sections",T),e[47]=h,e[48]=I):I=e[48];let M;e[49]!==u||e[50]!==$||e[51]!==I?(M=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(he,{value:$,onChange:I,meta:u,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=u,e[50]=$,e[51]=I,e[52]=M):M=e[52];let z;e[53]!==m||e[54]!==r||e[55]!==h?(z=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ce,{post:r,decofile:m,onChange:h})})}),e[53]=m,e[54]=r,e[55]=h,e[56]=z):z=e[56];let D;e[57]!==M||e[58]!==z?(D=t.jsxs(le,{defaultValue:"content",className:"mt-6 gap-4",children:[H,M,z]}),e[57]=M,e[58]=z,e[59]=D):D=e[59];let V;e[60]!==U||e[61]!==D?(V=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,D]})}),e[60]=U,e[61]=D,e[62]=V):V=e[62];let K;return e[63]!==v||e[64]!==V?(K=t.jsxs("div",{className:"flex h-full flex-col",children:[v,V]}),e[63]=v,e[64]=V,e[65]=K):K=e[65],K}function Ce(A){const e=G.c(59),{post:i,decofile:d,onChange:o}=A;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(q,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=l):l=e[0];let p;e[1]!==i.excerpt?(p=F(i.excerpt),e[1]=i.excerpt,e[2]=p):p=e[2];let m;e[3]!==o?(m=v=>o("excerpt",v.target.value),e[3]=o,e[4]=m):m=e[4];let u;e[5]!==p||e[6]!==m?(u=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx(re,{id:"post-excerpt",value:p,onChange:m,rows:2})]}),e[5]=p,e[6]=m,e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(q,{htmlFor:"post-slug",children:"Slug"}),e[8]=x):x=e[8];let y;e[9]!==i.slug?(y=F(i.slug),e[9]=i.slug,e[10]=y):y=e[10];let s;e[11]!==o?(s=v=>o("slug",v.target.value),e[11]=o,e[12]=s):s=e[12];let n;e[13]!==y||e[14]!==s?(n=t.jsxs("div",{className:"space-y-2",children:[x,t.jsx(J,{id:"post-slug",value:y,onChange:s,placeholder:"my-post",className:"h-10"})]}),e[13]=y,e[14]=s,e[15]=n):n=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j={type:"string",format:"date",title:"Date"},e[16]=j):j=e[16];let b;e[17]!==i.date?(b=F(i.date),e[17]=i.date,e[18]=b):b=e[18];let r;e[19]!==o?(r=v=>o("date",v),e[19]=o,e[20]=r):r=e[20];let _;e[21]!==b||e[22]!==r?(_=t.jsx(fe,{schema:j,value:b,onChange:r,path:"post-date",label:"Date"}),e[21]=b,e[22]=r,e[23]=_):_=e[23];let C;e[24]!==_||e[25]!==n?(C=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n,_]}),e[24]=_,e[25]=n,e[26]=C):C=e[26];let h;e[27]===Symbol.for("react.memo_cache_sentinel")?(h={type:"string",format:"image-uri",title:"Cover image"},e[27]=h):h=e[27];let S;e[28]!==o?(S=v=>o("image",v),e[28]=o,e[29]=S):S=e[29];let f;e[30]!==i.image||e[31]!==S?(f=t.jsx(ce,{schema:h,value:i.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=i.image,e[31]=S,e[32]=f):f=e[32];let a;e[33]===Symbol.for("react.memo_cache_sentinel")?(a=["email"],e[33]=a):a=e[33];let c;e[34]!==o?(c=v=>o("authors",v),e[34]=o,e[35]=c):c=e[35];let g;e[36]!==d||e[37]!==i.authors||e[38]!==c?(g=t.jsx(X,{label:"Authors",decofile:d,kind:"authors",valueField:"email",extraFields:a,selected:i.authors,onChange:c}),e[36]=d,e[37]=i.authors,e[38]=c,e[39]=g):g=e[39];let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=["slug"],e[40]=k):k=e[40];let P;e[41]!==o?(P=v=>o("categories",v),e[41]=o,e[42]=P):P=e[42];let N;e[43]!==d||e[44]!==i.categories||e[45]!==P?(N=t.jsx(X,{label:"Categories",decofile:d,kind:"categories",valueField:"slug",extraFields:k,selected:i.categories,onChange:P}),e[43]=d,e[44]=i.categories,e[45]=P,e[46]=N):N=e[46];let B;e[47]!==o?(B=v=>o("extraProps",v),e[47]=o,e[48]=B):B=e[48];let w;e[49]!==i.extraProps||e[50]!==B?(w=t.jsx(ke,{value:i.extraProps,onChange:B}),e[49]=i.extraProps,e[50]=B,e[51]=w):w=e[51];let E;return e[52]!==C||e[53]!==f||e[54]!==g||e[55]!==N||e[56]!==w||e[57]!==u?(E=t.jsxs("div",{className:"space-y-5",children:[u,C,f,g,N,w]}),e[52]=C,e[53]=f,e[54]=g,e[55]=N,e[56]=w,e[57]=u,e[58]=E):E=e[58],E}function ke(A){const e=G.c(15),{value:i,onChange:d}=A;let o,l,p,m;if(e[0]!==d||e[1]!==i){o=be(i);const y=(s,n)=>d(o.map((j,b)=>b===s?{...j,...n}:j));l="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(q,{children:"Extra props"}),e[6]=p):p=e[6],m=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((s,n)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:s.key,onChange:j=>y(n,{key:j.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:s.value,onChange:j=>y(n,{value:j.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>d(o.filter((j,b)=>b!==n))})]},n))}),e[0]=d,e[1]=i,e[2]=o,e[3]=l,e[4]=p,e[5]=m}else o=e[2],l=e[3],p=e[4],m=e[5];let u;e[7]!==o||e[8]!==d?(u=t.jsx(je,{label:"Add prop",onClick:()=>d([...o,{key:"",value:""}])}),e[7]=o,e[8]=d,e[9]=u):u=e[9];let x;return e[10]!==l||e[11]!==p||e[12]!==m||e[13]!==u?(x=t.jsxs("div",{className:l,children:[p,m,u]}),e[10]=l,e[11]=p,e[12]=m,e[13]=u,e[14]=x):x=e[14],x}function X(A){const e=G.c(31),{label:i,decofile:d,kind:o,valueField:l,extraFields:p,selected:m,onChange:u}=A;let x,y,s;if(e[0]!==d||e[1]!==o||e[2]!==l){x=de(d,o);let f;e[6]!==l?(f=(c,g)=>F(c[l])||g,e[6]=l,e[7]=f):f=e[7],s=f;let a;e[8]!==s?(a=c=>{const{key:g,payload:k}=c;return{value:s(k,g),label:F(k.name)||s(k,g)}},e[8]=s,e[9]=a):a=e[9],y=x.map(a),e[0]=d,e[1]=o,e[2]=l,e[3]=x,e[4]=y,e[5]=s}else x=e[3],y=e[4],s=e[5];const n=y;let j;if(e[10]!==m||e[11]!==l){const f=Array.isArray(m)?m:[];let a;e[13]!==l?(a=c=>F(c[l]),e[13]=l,e[14]=a):a=e[14],j=f.map(a).filter(Boolean),e[10]=m,e[11]=l,e[12]=j}else j=e[12];const b=j;let r;e[15]!==p||e[16]!==u||e[17]!==x||e[18]!==l||e[19]!==s?(r=f=>{u(f.map(a=>{const c=x.find(k=>{const{key:P,payload:N}=k;return s(N,P)===a});if(!c)return{name:a,[l]:a};const g={name:F(c.payload.name)};for(const k of p)g[k]=c.payload[k]??a;return g}))},e[15]=p,e[16]=u,e[17]=x,e[18]=l,e[19]=s,e[20]=r):r=e[20];const _=r;let C;e[21]!==i?(C=t.jsx(q,{children:i}),e[21]=i,e[22]=C):C=e[22];let h;e[23]!==b||e[24]!==_||e[25]!==i||e[26]!==n?(h=n.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",i.toLowerCase()," yet — create some in the"," ",i.toLowerCase()," collection."]}):t.jsx(ie,{options:n,defaultValue:b,onValueChange:_,placeholder:`Select ${i.toLowerCase()}`,maxCount:4}),e[23]=b,e[24]=_,e[25]=i,e[26]=n,e[27]=h):h=e[27];let S;return e[28]!==C||e[29]!==h?(S=t.jsxs("div",{className:"space-y-2",children:[C,h]}),e[28]=C,e[29]=h,e[30]=S):S=e[30],S}export{ui as PostEditor};
@@ -1 +1 @@
1
- import{c as h,r as y,l as j,j as f}from"./index-pPjXkMWO.js";import{a8 as A}from"./agent-icon-BBTxD8Vr.js";import{s as N}from"./Plus-CToP0bbt.js";import{s as _}from"./Trash01-BDWbYvcu.js";const S=700;function R(r,e,o){const t=h.c(7),s=S,[n,c]=y.useState(r),[l,u]=y.useState(r),[x,p]=y.useState(!1),i=y.useRef(null);r!==l&&(u(r),x||c(r));let a;t[0]!==s||t[1]!==e?(a=g=>{c(g),p(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,p(!1),e(g)},s)},t[0]=s,t[1]=e,t[2]=a):a=t[2];const d=a;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=g=>{c(g),i.current&&clearTimeout(i.current),i.current=null,p(!1)},t[3]=m):m=t[3];const v=m;let b;return t[4]!==n||t[5]!==d?(b=[n,d,v],t[4]=n,t[5]=d,t[6]=b):b=t[6],b}function T(r){const e=h.c(14),{value:o,onChange:t,placeholder:s,className:n,onFocus:c,onBlur:l,onKeyDown:u,spellCheck:x,inputRef:p}=r,i=x===void 0?!0:x;let a;e[0]!==t?(a=v=>t(v.target.value),e[0]=t,e[1]=a):a=e[1];let d;e[2]!==n?(d=j("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==c||e[7]!==u||e[8]!==s||e[9]!==i||e[10]!==a||e[11]!==d||e[12]!==o?(m=f.jsx("textarea",{ref:p,value:o,onChange:a,onInput:w,onFocus:c,onBlur:l,onKeyDown:u,placeholder:s,spellCheck:i,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=c,e[7]=u,e[8]=s,e[9]=i,e[10]=a,e[11]=d,e[12]=o,e[13]=m):m=e[13],m}function w(r){const e=r.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function D(r){return typeof r=="string"?r:""}function B(r){const e=h.c(11);let o,t;e[0]!==r?({className:o,...t}=r,e[0]=r,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=j(o,"pr-9"),e[3]=o,e[4]=s):s=e[4];let n;e[5]!==t||e[6]!==s?(n=f.jsx(T,{...t,className:s}),e[5]=t,e[6]=s,e[7]=n):n=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=f.jsx(A,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=c):c=e[8];let l;return e[9]!==n?(l=f.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,c]}),e[9]=n,e[10]=l):l=e[10],l}function F(r){const e=h.c(5),{label:o,onClick:t,disabled:s}=r;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=f.jsx(N,{size:13}),e[0]=n):n=e[0];let c;return e[1]!==s||e[2]!==o||e[3]!==t?(c=f.jsxs("button",{type:"button",onClick:t,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,o]}),e[1]=s,e[2]=o,e[3]=t,e[4]=c):c=e[4],c}function I(r){const e=h.c(4),{label:o,onClick:t}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=f.jsx(_,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==o||e[2]!==t?(n=f.jsx("button",{type:"button","aria-label":o,onClick:t,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=o,e[2]=t,e[3]=n):n=e[3],n}function J(r){const e=h.c(2),{children:o}=r;let t;return e[0]!==o?(t=f.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:o}),e[0]=o,e[1]=t):t=e[1],t}function O(r){const e=h.c(8),{active:o,label:t,onClick:s,children:n}=r,c=o?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==c?(l=j("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",c),e[0]=c,e[1]=l):l=e[1];let u;return e[2]!==o||e[3]!==n||e[4]!==t||e[5]!==s||e[6]!==l?(u=f.jsx("button",{type:"button","aria-label":t,"aria-pressed":o,onMouseDown:$,onClick:s,className:l,children:n}),e[2]=o,e[3]=n,e[4]=t,e[5]=s,e[6]=l,e[7]=u):u=e[7],u}function $(r){return r.preventDefault()}function H(r){if(Array.isArray(r))return r;if(typeof r!="string"||r.trim()==="")return[];try{const e=JSON.parse(r);return Array.isArray(e)?e:[]}catch{return[]}}export{F as A,B as E,J as F,T as I,I as R,O as T,H as p,D as s,R as u};
1
+ import{c as h,r as y,l as j,j as f}from"./index-1fSIJh22.js";import{ab as A}from"./agent-icon-CdRAruzy.js";import{s as N}from"./Plus-DKYhZHY2.js";import{s as _}from"./Trash01-BntZwC2j.js";const S=700;function R(r,e,o){const t=h.c(7),s=S,[n,c]=y.useState(r),[l,u]=y.useState(r),[x,p]=y.useState(!1),i=y.useRef(null);r!==l&&(u(r),x||c(r));let a;t[0]!==s||t[1]!==e?(a=g=>{c(g),p(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,p(!1),e(g)},s)},t[0]=s,t[1]=e,t[2]=a):a=t[2];const d=a;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=g=>{c(g),i.current&&clearTimeout(i.current),i.current=null,p(!1)},t[3]=m):m=t[3];const v=m;let b;return t[4]!==n||t[5]!==d?(b=[n,d,v],t[4]=n,t[5]=d,t[6]=b):b=t[6],b}function T(r){const e=h.c(14),{value:o,onChange:t,placeholder:s,className:n,onFocus:c,onBlur:l,onKeyDown:u,spellCheck:x,inputRef:p}=r,i=x===void 0?!0:x;let a;e[0]!==t?(a=v=>t(v.target.value),e[0]=t,e[1]=a):a=e[1];let d;e[2]!==n?(d=j("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==c||e[7]!==u||e[8]!==s||e[9]!==i||e[10]!==a||e[11]!==d||e[12]!==o?(m=f.jsx("textarea",{ref:p,value:o,onChange:a,onInput:w,onFocus:c,onBlur:l,onKeyDown:u,placeholder:s,spellCheck:i,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=c,e[7]=u,e[8]=s,e[9]=i,e[10]=a,e[11]=d,e[12]=o,e[13]=m):m=e[13],m}function w(r){const e=r.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function D(r){return typeof r=="string"?r:""}function B(r){const e=h.c(11);let o,t;e[0]!==r?({className:o,...t}=r,e[0]=r,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=j(o,"pr-9"),e[3]=o,e[4]=s):s=e[4];let n;e[5]!==t||e[6]!==s?(n=f.jsx(T,{...t,className:s}),e[5]=t,e[6]=s,e[7]=n):n=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=f.jsx(A,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=c):c=e[8];let l;return e[9]!==n?(l=f.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,c]}),e[9]=n,e[10]=l):l=e[10],l}function F(r){const e=h.c(5),{label:o,onClick:t,disabled:s}=r;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=f.jsx(N,{size:13}),e[0]=n):n=e[0];let c;return e[1]!==s||e[2]!==o||e[3]!==t?(c=f.jsxs("button",{type:"button",onClick:t,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,o]}),e[1]=s,e[2]=o,e[3]=t,e[4]=c):c=e[4],c}function I(r){const e=h.c(4),{label:o,onClick:t}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=f.jsx(_,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==o||e[2]!==t?(n=f.jsx("button",{type:"button","aria-label":o,onClick:t,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=o,e[2]=t,e[3]=n):n=e[3],n}function J(r){const e=h.c(2),{children:o}=r;let t;return e[0]!==o?(t=f.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:o}),e[0]=o,e[1]=t):t=e[1],t}function O(r){const e=h.c(8),{active:o,label:t,onClick:s,children:n}=r,c=o?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==c?(l=j("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",c),e[0]=c,e[1]=l):l=e[1];let u;return e[2]!==o||e[3]!==n||e[4]!==t||e[5]!==s||e[6]!==l?(u=f.jsx("button",{type:"button","aria-label":t,"aria-pressed":o,onMouseDown:$,onClick:s,className:l,children:n}),e[2]=o,e[3]=n,e[4]=t,e[5]=s,e[6]=l,e[7]=u):u=e[7],u}function $(r){return r.preventDefault()}function H(r){if(Array.isArray(r))return r;if(typeof r!="string"||r.trim()==="")return[];try{const e=JSON.parse(r);return Array.isArray(e)?e:[]}catch{return[]}}export{F as A,B as E,J as F,T as I,I as R,O as T,H as p,D as s,R as u};
@@ -1 +1 @@
1
- import{c as V,j as t,a as T,p as R,a1 as q,I as B,v as N,t as I}from"./index-pPjXkMWO.js";import{P as L}from"./index-CDriDNRl.js";import{A as U}from"./avatar-qkTmk1tF.js";import{S as D}from"./switch-Czifg4wP.js";import{d as G,S as Y,c as $,b as K}from"./select-CNB5fe3p.js";import{a as O,T as z}from"./toggle-group-Cr9Sd28-.js";import{I as H}from"./input-D3oAzmpd.js";import{i as J}from"./Monitor01-CsiKf4Vb.js";import{n as M,a as Q}from"./Sun-CfFmz0ui.js";import{i as W}from"./Play-BZWHu6vA.js";import{u as X}from"./use-debounced-autosave-eXbj54WV.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-CALTfboW.js";import{c as te,b as A,S as E,a as F}from"./settings-section-B6HW8SMd.js";import"./sidebar-qR7l9LGc.js";import"./LayoutLeft-PT-KYBVh.js";import"./use-mobile-CcaXr_ZY.js";import"./sheet-1qlQOBan.js";import"./X-CFM-EaJf.js";import"./tooltip-BSvDzA5F.js";import"./User01-BnV8b2oc.js";import"./Check-CUC1zRnb.js";import"./ChevronDown-B1mct1yp.js";import"./ChevronUp-Bu7-a85r.js";import"./card-BmfGcj0O.js";import"./ArrowUpRight-3SkCtZ7K.js";function se(){const e=V.c(19),{data:s,isPending:o}=T.useSession(),g=s?.user,p=g?.image,h=g?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const v=n.control._formState.dirtyFields;if(Object.keys(v).length===0)return;const a=n.getValues(),f=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await T.updateUser({name:a.name}),N("profile_updated",{fields:["name"]}),I.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),I.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=g?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(U,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==m||e[8]!==x?(l=v=>{const{field:a}=v;return t.jsx(H,{id:"display-name",...a,onChange:f=>{a.onChange(f),x()},onBlur:()=>{a.onBlur(),m()},onKeyDown:f=>{f.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})},e[7]=m,e[8]=x,e[9]=l):l=e[9];let d;e[10]!==n.control||e[11]!==l?(d=t.jsx(A,{title:"Display name",action:t.jsx(q,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=g?.email;let r;e[13]!==b?(r=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=r):r=e[14];let u;return e[15]!==i||e[16]!==d||e[17]!==r?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,d,r]})}),e[15]=i,e[16]=d,e[17]=r,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=B();let g;e[0]!==o?(g=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),I.error("Notifications denied. Please enable them in your browser settings."),o(re);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=g):g=e[1];const p=g;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(J,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(O,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let m;e[10]!==p||e[11]!==s.enableNotifications?(m=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=m):m=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(D,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==m||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:m,action:j}),e[16]=m,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let d;e[22]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=d):d=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let r;e[25]!==s.enableSounds||e[26]!==b?(r=t.jsxs("div",{className:"flex items-center gap-2",children:[d,t.jsx(D,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=r):r=e[27];let u;e[28]!==r||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:r}),e[28]=r,e[29]=l,e[30]=u):u=e[30];let v;e[31]!==o?(v=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=v):v=e[32];let a;e[33]!==s.toolApprovalLevel?(a={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=a):a=e[34];let f;e[35]!==a?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:a})}),e[35]=a,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==v||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:v,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=v,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function re(e){return{...e,enableNotifications:!1}}function ae(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function De(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(ae,{}),e[0]=s):s=e[0],s}export{De as default};
1
+ import{c as V,j as t,a as T,p as R,a1 as q,I as B,v as N,t as I}from"./index-1fSIJh22.js";import{P as L}from"./index-BYzrSXWr.js";import{A as U}from"./avatar-xEdYoKCY.js";import{S as D}from"./switch-CX5J9FKg.js";import{d as G,S as Y,c as $,b as K}from"./select-Bi9bU2VK.js";import{a as O,T as z}from"./toggle-group-C8cmWeP-.js";import{I as H}from"./input-DtIeb-d9.js";import{i as J}from"./Monitor01-CSz-AHTf.js";import{n as M,a as Q}from"./Sun-Ce_EUrXd.js";import{i as W}from"./Play-DCAaSSU6.js";import{u as X}from"./use-debounced-autosave-BJjFjl9N.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-DHL5lQbC.js";import{c as te,b as A,S as E,a as F}from"./settings-section-Dk7w7jA4.js";import"./sidebar-B2zP9lCK.js";import"./LayoutLeft-DvimfYbd.js";import"./use-mobile-Cquheqlv.js";import"./sheet-ZoSnDrwM.js";import"./X-DYHYGN_A.js";import"./tooltip-CzWWX9Zy.js";import"./User01-BEG2JP2P.js";import"./Check-DjbNu1wk.js";import"./ChevronDown-ChzOIRMN.js";import"./ChevronUp-D3E47VS4.js";import"./card-BVtZpt8u.js";import"./ArrowUpRight-B0IcegbE.js";function se(){const e=V.c(19),{data:s,isPending:o}=T.useSession(),g=s?.user,p=g?.image,h=g?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const v=n.control._formState.dirtyFields;if(Object.keys(v).length===0)return;const a=n.getValues(),f=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await T.updateUser({name:a.name}),N("profile_updated",{fields:["name"]}),I.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),I.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=g?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(U,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==m||e[8]!==x?(l=v=>{const{field:a}=v;return t.jsx(H,{id:"display-name",...a,onChange:f=>{a.onChange(f),x()},onBlur:()=>{a.onBlur(),m()},onKeyDown:f=>{f.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})},e[7]=m,e[8]=x,e[9]=l):l=e[9];let d;e[10]!==n.control||e[11]!==l?(d=t.jsx(A,{title:"Display name",action:t.jsx(q,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=g?.email;let r;e[13]!==b?(r=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=r):r=e[14];let u;return e[15]!==i||e[16]!==d||e[17]!==r?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,d,r]})}),e[15]=i,e[16]=d,e[17]=r,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=B();let g;e[0]!==o?(g=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),I.error("Notifications denied. Please enable them in your browser settings."),o(re);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=g):g=e[1];const p=g;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(J,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(O,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let m;e[10]!==p||e[11]!==s.enableNotifications?(m=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=m):m=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(D,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==m||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:m,action:j}),e[16]=m,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let d;e[22]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=d):d=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let r;e[25]!==s.enableSounds||e[26]!==b?(r=t.jsxs("div",{className:"flex items-center gap-2",children:[d,t.jsx(D,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=r):r=e[27];let u;e[28]!==r||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:r}),e[28]=r,e[29]=l,e[30]=u):u=e[30];let v;e[31]!==o?(v=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=v):v=e[32];let a;e[33]!==s.toolApprovalLevel?(a={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=a):a=e[34];let f;e[35]!==a?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:a})}),e[35]=a,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==v||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:v,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=v,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function re(e){return{...e,enableNotifications:!1}}function ae(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function De(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(ae,{}),e[0]=s):s=e[0],s}export{De as default};
@@ -0,0 +1 @@
1
+ import{c as $,D as H,j as A}from"./index-1fSIJh22.js";import{m as L,g as E,s as y}from"./scroll-area-DZjqp9jH.js";import{u as O}from"./use-mcp-client-CyvYEPYG.js";import{p as k}from"./constants-C8_Swa4x.js";import{b as q,c as B}from"./use-mcp-tools-DITRK-ju.js";import{u as Y}from"./index-_IHAm-_z.js";import{c as G}from"./content-blocks-o63cs2vh.js";import{g as K,M as V,a as w}from"./types-CmsZBj86.js";import{u as z,b as F}from"./chat-context-DDm8QfNO.js";import{b as J}from"./shell-layout-DWxf6XU9.js";import"./agent-icon-CdRAruzy.js";import"./AlertCircle-D27DNBuk.js";import"./Tool01-B3T5XEH8.js";import"./SwitchHorizontal01-sdJMTy6A.js";import"./Settings02-CIxRqUJ6.js";import"./XCircle-DI88AZ1K.js";import"./ArrowUpRight-B0IcegbE.js";import"./ZapSquare-CTRU27-a.js";import"./Users03-8xt-LzrG.js";import"./CheckCircle-BqvcImZw.js";import"./Check-DjbNu1wk.js";import"./ChevronDown-ChzOIRMN.js";import"./ChevronRight-BMYqr5mg.js";import"./ChevronUp-D3E47VS4.js";import"./Circle-BTk35DNa.js";import"./Stars02-Ci7hwXdU.js";import"./Loading02-CyD5wvpA.js";import"./Copy01-BupXVMxd.js";import"./ZoomOut-CQ0pMakr.js";import"./DotsVertical-NS06m2ex.js";import"./Globe01-D_sF9tkh.js";import"./Eye-BCFb3Pr0.js";import"./FilterLines-BPhOKU3g.js";import"./Star01-CMrOPAU1.js";import"./Globe04-DqrswRGa.js";import"./HardDrive-BXnXVq-L.js";import"./Key01-5oIVCQ6h.js";import"./LayoutLeft-DvimfYbd.js";import"./LinkExternal01-P-ZftaiS.js";import"./List-BrRy9nh9.js";import"./Monitor01-CSz-AHTf.js";import"./Sun-Ce_EUrXd.js";import"./Palette-uJEc44DN.js";import"./Play-DCAaSSU6.js";import"./Plus-DKYhZHY2.js";import"./SearchLg-D5EbflDe.js";import"./SearchMd-Dv2fAc6M.js";import"./Shield01-BlYcntqH.js";import"./Stars01-CDu18vGr.js";import"./Trash01-BntZwC2j.js";import"./Upload01-BUaljIu0.js";import"./User01-BEG2JP2P.js";import"./Users01-BcPG_xvp.js";import"./XClose-DEv56Pz6.js";import"./X-DYHYGN_A.js";import"./Zap-Cck_KglN.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CGAk1IOJ.js";import"./tooltip-CzWWX9Zy.js";import"./file-type-icon-CfEzZN8D.js";import"./dialog-DhogbNrD.js";import"./use-mobile-Cquheqlv.js";import"./tab-id-CLpu897Q.js";import"./hooks-Cwuehb03.js";import"./decopilot-sse-pool-BIAl89Rh.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-DLaMoAs0.js";import"./use-clock-tick-Dwr_-EjU.js";import"./sheet-ZoSnDrwM.js";import"./integration-icon-DU4GHtyn.js";import"./use-virtual-mcp-zlZ_YFIK.js";import"./use-collections-CutR3paL.js";import"./use-navigate-to-agent-gjS0eO01.js";import"./use-connection-CKqD9jJP.js";import"./use-mcp-prompts-C_vPfH__.js";import"./form-BkYRU4Ul.js";import"./label-DSNRIgjt.js";import"./input-DtIeb-d9.js";import"./select-Bi9bU2VK.js";import"./auth-COs6dQOo.js";import"./library-tab-xY-aeWS1.js";import"./drawer-DsAzjWMO.js";import"./collection-search-D_f3pT-p.js";import"./tabs-BEWqoEdE.js";import"./toggle-group-C8cmWeP-.js";import"./agent-capabilities-CgEMo-01.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-eSnCMgBR.js";import"./use-registry-connections-BbYLvtdh.js";import"./use-organization-settings-BQiNnrop.js";import"./useInfiniteQuery-N9WYjPkn.js";import"./use-infinite-scroll-CtYGFJ5F.js";import"./extract-connection-data-BTB8VaBz.js";import"./card-BVtZpt8u.js";import"./collection-tabs-qNtCwfg5.js";import"./badge-Dn-HNDWU.js";import"./textarea-zKfZl_E7.js";import"./connection-form-helpers-PLcXdPBa.js";import"./authenticate-and-persist-oauth-DlRuR5UL.js";import"./mcp-oauth-DhHWa50S.js";import"./useSuspenseInfiniteQuery-BGlQ9fKh.js";import"./use-ai-providers-BbwZkPx6.js";import"./connect-desktop-dialog-o-WWTYjT.js";import"./decopilot-D4BJYxJZ.js";import"./checkbox-CSe8TOzv.js";import"./skeleton-D7JDqPAt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-xEdYoKCY.js";import"./settings-section-Dk7w7jA4.js";import"./popover-CNEPCEun.js";import"./command-CeMBu3Rg.js";import"./index-BWsF4tLX.js";import"./index-CBonG5tc.js";import"./alert-dialog-IqfxiubQ.js";import"./toolbar-DWpCUnNZ.js";import"./use-debounced-value-CzNFumIC.js";import"./dropdown-menu-DI97feJI.js";import"./index-B0hYRRvV.js";import"./question-004-sINsf4GQ.js";import"./task-row-DTN6jTGH.js";import"./task-status-Br0YFPUm.js";import"./use-status-sounds-CsFCZ2Da.js";import"./use-decopilot-events-CgAkYn3v.js";import"./empty-state-D3kjx8ss.js";import"./use-capability-B60tguhn.js";import"./tools-list-B168nAhU.js";import"./switch-CX5J9FKg.js";import"./use-debounced-autosave-BJjFjl9N.js";import"./index-BYzrSXWr.js";import"./sidebar-B2zP9lCK.js";import"./search-input-z9tq8TXS.js";import"./github-repo-picker-CZ1Ro4QH.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BU36_GZQ.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-D7bzEeij.js";import"./automation-runs-Bd2a7yBo.js";import"./table-OqpL1ftA.js";import"./use-members-Czk_FUv-.js";import"./use-org-auth-client-CMvZkiPj.js";import"./use-automations-C_vN1Ixh.js";import"./use-file-configs-CxJKkGsa.js";import"./monaco-editor-BfEEKc3k.js";import"./select-model-DP_zKM9N.js";import"./automation-list-row-Azl2etlU.js";import"./required-auth-layout-FnO7dZ6U.js";import"./use-org-sso-Dbxo2Yvm.js";const Q={};function W(S){const t=$.c(37),{client:i,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),r=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==i||t[3]!==o.name||t[4]!==s?(c={client:i,toolName:o.name,toolArguments:s},t[2]=i,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:e}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=y(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const b=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=G(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const j=_;let P;t[18]!==b?(P={tool:b},t[18]=b,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==r?(T=C=>u(r,C),t[20]=u,t[21]=r,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==r?(R=()=>n(r),t[23]=n,t[24]=r,t[25]=R):R=t[25];let v;return t[26]!==i||t[27]!==j||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==e?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:e,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:i,onMessage:j,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=i,t[27]=j,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=e,t[36]=v):v=t[36],v}function kr(S){const t=$.c(24),{connectionId:i,toolName:h,args:o}=S,{org:p}=H(),l=Y();let M;t[0]!==i||t[1]!==l?(M=k(i)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=i,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==i||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:i,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=i,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=O(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let r,a,m;t[10]!==h||t[11]!==g.tools?(r=L(decodeURIComponent(h)),m=g.tools.find(e=>e.name===r)??g.tools.find(e=>{const x=E(e._meta);if(!x)return!1;if(y(e.name,x)===r)return!0;const d=y(r,x);return d!==r&&e.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=r,t[13]=a,t[14]=m):(r=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let e;return t[15]!==r?(e=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=e):e=t[16],e}let c;return t[17]!==o||t[18]!==n||t[19]!==i||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:i,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=i,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{kr as AppViewContent};
@@ -0,0 +1 @@
1
+ import{c as S,j as r}from"./index-1fSIJh22.js";import{I as T}from"./input-DtIeb-d9.js";import{L as C}from"./label-DSNRIgjt.js";import{T as L}from"./textarea-zKfZl_E7.js";import{au as A,av as R,at as D,aw as J,ax as K}from"./index-_IHAm-_z.js";import{u as M,s as P}from"./primitives-Bj4WwKGm.js";import"./library-tab-xY-aeWS1.js";import"./SwitchHorizontal01-sdJMTy6A.js";import"./chat-context-DDm8QfNO.js";import"./hooks-Cwuehb03.js";import"./use-mcp-client-CyvYEPYG.js";import"./constants-C8_Swa4x.js";import"./auth-COs6dQOo.js";import"./decopilot-sse-pool-BIAl89Rh.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-zlZ_YFIK.js";import"./use-collections-CutR3paL.js";import"./use-ai-providers-BbwZkPx6.js";import"./studio-tools-DLaMoAs0.js";import"./use-decopilot-events-CgAkYn3v.js";import"./tab-id-CLpu897Q.js";import"./use-organization-settings-BQiNnrop.js";import"./scroll-area-DZjqp9jH.js";import"./agent-icon-CdRAruzy.js";import"./AlertCircle-D27DNBuk.js";import"./Tool01-B3T5XEH8.js";import"./Settings02-CIxRqUJ6.js";import"./XCircle-DI88AZ1K.js";import"./ArrowUpRight-B0IcegbE.js";import"./ZapSquare-CTRU27-a.js";import"./Users03-8xt-LzrG.js";import"./CheckCircle-BqvcImZw.js";import"./Check-DjbNu1wk.js";import"./ChevronDown-ChzOIRMN.js";import"./ChevronRight-BMYqr5mg.js";import"./ChevronUp-D3E47VS4.js";import"./Circle-BTk35DNa.js";import"./Stars02-Ci7hwXdU.js";import"./Loading02-CyD5wvpA.js";import"./Copy01-BupXVMxd.js";import"./ZoomOut-CQ0pMakr.js";import"./DotsVertical-NS06m2ex.js";import"./Globe01-D_sF9tkh.js";import"./Eye-BCFb3Pr0.js";import"./FilterLines-BPhOKU3g.js";import"./Star01-CMrOPAU1.js";import"./Globe04-DqrswRGa.js";import"./HardDrive-BXnXVq-L.js";import"./Key01-5oIVCQ6h.js";import"./LayoutLeft-DvimfYbd.js";import"./LinkExternal01-P-ZftaiS.js";import"./List-BrRy9nh9.js";import"./Monitor01-CSz-AHTf.js";import"./Sun-Ce_EUrXd.js";import"./Palette-uJEc44DN.js";import"./Play-DCAaSSU6.js";import"./Plus-DKYhZHY2.js";import"./SearchLg-D5EbflDe.js";import"./SearchMd-Dv2fAc6M.js";import"./Shield01-BlYcntqH.js";import"./Stars01-CDu18vGr.js";import"./Trash01-BntZwC2j.js";import"./Upload01-BUaljIu0.js";import"./User01-BEG2JP2P.js";import"./Users01-BcPG_xvp.js";import"./XClose-DEv56Pz6.js";import"./X-DYHYGN_A.js";import"./Zap-Cck_KglN.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CGAk1IOJ.js";import"./tooltip-CzWWX9Zy.js";import"./file-type-icon-CfEzZN8D.js";import"./dialog-DhogbNrD.js";import"./use-mobile-Cquheqlv.js";import"./content-blocks-o63cs2vh.js";import"./types-CmsZBj86.js";import"./use-clock-tick-Dwr_-EjU.js";import"./shell-layout-DWxf6XU9.js";import"./avatar-xEdYoKCY.js";import"./alert-dialog-IqfxiubQ.js";import"./required-auth-layout-FnO7dZ6U.js";import"./use-org-sso-Dbxo2Yvm.js";import"./sheet-ZoSnDrwM.js";import"./integration-icon-DU4GHtyn.js";import"./use-navigate-to-agent-gjS0eO01.js";import"./use-connection-CKqD9jJP.js";import"./use-mcp-prompts-C_vPfH__.js";import"./form-BkYRU4Ul.js";import"./select-Bi9bU2VK.js";import"./drawer-DsAzjWMO.js";import"./collection-search-D_f3pT-p.js";import"./tabs-BEWqoEdE.js";import"./toggle-group-C8cmWeP-.js";import"./agent-capabilities-CgEMo-01.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-eSnCMgBR.js";import"./use-registry-connections-BbYLvtdh.js";import"./useInfiniteQuery-N9WYjPkn.js";import"./use-infinite-scroll-CtYGFJ5F.js";import"./extract-connection-data-BTB8VaBz.js";import"./card-BVtZpt8u.js";import"./collection-tabs-qNtCwfg5.js";import"./badge-Dn-HNDWU.js";import"./connection-form-helpers-PLcXdPBa.js";import"./authenticate-and-persist-oauth-DlRuR5UL.js";import"./mcp-oauth-DhHWa50S.js";import"./useSuspenseInfiniteQuery-BGlQ9fKh.js";import"./connect-desktop-dialog-o-WWTYjT.js";import"./decopilot-D4BJYxJZ.js";import"./checkbox-CSe8TOzv.js";import"./skeleton-D7JDqPAt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dk7w7jA4.js";import"./popover-CNEPCEun.js";import"./command-CeMBu3Rg.js";import"./index-BWsF4tLX.js";import"./index-CBonG5tc.js";import"./toolbar-DWpCUnNZ.js";import"./use-debounced-value-CzNFumIC.js";import"./dropdown-menu-DI97feJI.js";import"./index-B0hYRRvV.js";import"./question-004-sINsf4GQ.js";import"./task-row-DTN6jTGH.js";import"./task-status-Br0YFPUm.js";import"./use-status-sounds-CsFCZ2Da.js";import"./empty-state-D3kjx8ss.js";import"./use-mcp-tools-DITRK-ju.js";import"./use-capability-B60tguhn.js";import"./tools-list-B168nAhU.js";import"./switch-CX5J9FKg.js";import"./use-debounced-autosave-BJjFjl9N.js";import"./index-BYzrSXWr.js";import"./sidebar-B2zP9lCK.js";import"./search-input-z9tq8TXS.js";import"./github-repo-picker-CZ1Ro4QH.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BU36_GZQ.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-D7bzEeij.js";import"./automation-runs-Bd2a7yBo.js";import"./table-OqpL1ftA.js";import"./use-members-Czk_FUv-.js";import"./use-org-auth-client-CMvZkiPj.js";import"./use-automations-C_vN1Ixh.js";import"./use-file-configs-CxJKkGsa.js";import"./monaco-editor-BfEEKc3k.js";import"./select-model-DP_zKM9N.js";import"./automation-list-row-Azl2etlU.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function Tr(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(D,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Tr as RecordEditor};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-DSgTjObM.js","assets/index-1fSIJh22.js","assets/index-CveMeMql.css","assets/XCircle-DI88AZ1K.js","assets/CheckCircle-BqvcImZw.js","assets/Settings02-CIxRqUJ6.js","assets/use-mcp-client-CyvYEPYG.js","assets/constants-C8_Swa4x.js","assets/auth-COs6dQOo.js","assets/useInfiniteQuery-N9WYjPkn.js","assets/use-infinite-scroll-CtYGFJ5F.js","assets/studio-tools-DLaMoAs0.js","assets/badge-Dn-HNDWU.js","assets/input-DtIeb-d9.js","assets/dropdown-menu-DI97feJI.js","assets/Check-DjbNu1wk.js","assets/ChevronRight-BMYqr5mg.js","assets/Circle-BTk35DNa.js","assets/table-OqpL1ftA.js","assets/toggle-group-C8cmWeP-.js","assets/use-view-mode-DFUjoVEj.js","assets/use-mobile-Cquheqlv.js","assets/DotsVertical-NS06m2ex.js","assets/FilterLines-BPhOKU3g.js","assets/Globe01-D_sF9tkh.js","assets/SearchMd-Dv2fAc6M.js","assets/dialog-DhogbNrD.js","assets/X-DYHYGN_A.js","assets/AlertCircle-D27DNBuk.js","assets/Upload01-BUaljIu0.js","assets/alert-dialog-IqfxiubQ.js","assets/card-BVtZpt8u.js","assets/Trash01-BntZwC2j.js","assets/label-DSNRIgjt.js","assets/select-Bi9bU2VK.js","assets/tooltip-CzWWX9Zy.js","assets/ChevronDown-ChzOIRMN.js","assets/ChevronUp-D3E47VS4.js","assets/switch-CX5J9FKg.js","assets/textarea-zKfZl_E7.js","assets/checkbox-CSe8TOzv.js","assets/Eye-BCFb3Pr0.js","assets/LinkExternal01-P-ZftaiS.js","assets/use-copy-CGAk1IOJ.js","assets/Copy01-BupXVMxd.js","assets/Key01-5oIVCQ6h.js","assets/Plus-DKYhZHY2.js","assets/mcp-oauth-DhHWa50S.js","assets/Play-DCAaSSU6.js"])))=>i.map(i=>d[i]);
2
+ import{c as s,j as e,r as i,i as a,ad as o}from"./index-1fSIJh22.js";import{R as m}from"./require-capability-XtRfKrCF.js";import"./use-capability-B60tguhn.js";import"./access-gate-CrCRwpMP.js";import"./capability-load-error-CQqcTu7O.js";const n=i.lazy(()=>o(()=>import("./registry-layout-DSgTjObM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1,4 +1,4 @@
1
- import{c as W,D as fe,k as Re,m as Te,d as be,t as Q,r as T,j as t,B as V,i as Fe,l as Z,b7 as qs,b8 as Bs}from"./index-pPjXkMWO.js";import{c as Jt,b as Qs,d as ds,i as Vs,a as Gs,t as Ks,f as Ys,n as Hs,e as Ws}from"./XCircle-DMTLazaF.js";import{i as qe}from"./CheckCircle-BsrExj4H.js";import{s as Mt,c as Js,b as Zs,i as Xs,a as er}from"./Settings02-DszLgCXG.js";import{u as Ie}from"./use-mcp-client-CrFimBIE.js";import{S as Me,W as tr}from"./constants-C8_Swa4x.js";import{u as us}from"./useInfiniteQuery-B0z5w_RI.js";import{u as _e}from"./studio-tools-D16Iabf3.js";import{B as F}from"./badge-Dxl2nD6L.js";import{I as ue}from"./input-D3oAzmpd.js";import{b as dt,c as Ne,a as ut,D as mt,h as Zt,k as Xt,d as sr}from"./dropdown-menu-WR1NGNoR.js";import{c as Et,d as Dt,a as Be,e as ae,b as At,T as oe}from"./table-DPQQ4yes.js";import{a as rr,T as es}from"./toggle-group-Cr9Sd28-.js";import{u as nr}from"./use-view-mode-Dkyy6VOo.js";import{i as $t}from"./DotsVertical-BaKPV3I-.js";import{i as ir}from"./FilterLines-DFbyXaVS.js";import{n as lr,i as ms}from"./Globe01-Dz7J456-.js";import{i as ar}from"./SearchMd-Dx8opdKE.js";import{c as xt,a as pt,b as ht,D as ft,d as gt,e as jt}from"./dialog-xw_WZv6d.js";import{i as Ye}from"./AlertCircle-DP0nsq1e.js";import{i as ts}from"./Upload01-DNJ4y_co.js";import{c as He,b as We,d as Je,A as Ze,g as Xe,e as et,a as tt,f as st}from"./alert-dialog-zbSvd7Ki.js";import{C as ne}from"./card-BmfGcj0O.js";import{s as rt}from"./Trash01-BDWbYvcu.js";import{L as te}from"./label-CN7heivZ.js";import{d as or,S as cr,a as dr,b as ur,c as St}from"./select-CNB5fe3p.js";import{S as ze}from"./switch-Czifg4wP.js";import{T as vt}from"./textarea-_7jiD7tD.js";import{i as mr}from"./X-CFM-EaJf.js";import{t as xr}from"./ChevronDown-B1mct1yp.js";import{n as pr}from"./ChevronUp-Bu7-a85r.js";import{C as ss}from"./checkbox-CfEEJY30.js";import{s as xs}from"./Eye-BD5GpDZ-.js";import{n as hr}from"./LinkExternal01-DYdIsix1.js";import{u as fr}from"./use-infinite-scroll-BGEZaC_d.js";import{u as Rt}from"./use-copy-BucqFRkh.js";import{i as Tt}from"./Check-CUC1zRnb.js";import{a as It}from"./Copy01-C-7fHSay.js";import{i as gr}from"./Key01-DBAS-H0R.js";import{s as jr}from"./Plus-CToP0bbt.js";import{a as vr,b as br,T as yr}from"./tooltip-BSvDzA5F.js";import{i as Nr,a as wr}from"./mcp-oauth-DaQytGE0.js";import{i as _r}from"./Play-BZWHu6vA.js";import"./auth-BALlir75.js";import"./ChevronRight-C_4FW4NO.js";import"./Circle-D65-cV8s.js";import"./use-mobile-CcaXr_ZY.js";const Ue="private-registry",Cr=`
1
+ import{c as W,D as fe,k as Re,m as Te,d as be,t as Q,r as T,j as t,B as V,i as Fe,l as Z,b7 as qs,b8 as Bs}from"./index-1fSIJh22.js";import{c as Jt,b as Qs,d as ds,i as Vs,a as Gs,t as Ks,f as Ys,n as Hs,e as Ws}from"./XCircle-DI88AZ1K.js";import{i as qe}from"./CheckCircle-BqvcImZw.js";import{s as Mt,c as Js,b as Zs,i as Xs,a as er}from"./Settings02-CIxRqUJ6.js";import{u as Ie}from"./use-mcp-client-CyvYEPYG.js";import{S as Me,W as tr}from"./constants-C8_Swa4x.js";import{u as us}from"./useInfiniteQuery-N9WYjPkn.js";import{u as _e}from"./studio-tools-DLaMoAs0.js";import{B as F}from"./badge-Dn-HNDWU.js";import{I as ue}from"./input-DtIeb-d9.js";import{b as dt,c as Ne,a as ut,D as mt,h as Zt,k as Xt,d as sr}from"./dropdown-menu-DI97feJI.js";import{c as Et,d as Dt,a as Be,e as ae,b as At,T as oe}from"./table-OqpL1ftA.js";import{a as rr,T as es}from"./toggle-group-C8cmWeP-.js";import{u as nr}from"./use-view-mode-DFUjoVEj.js";import{i as $t}from"./DotsVertical-NS06m2ex.js";import{i as ir}from"./FilterLines-BPhOKU3g.js";import{n as lr,i as ms}from"./Globe01-D_sF9tkh.js";import{i as ar}from"./SearchMd-Dv2fAc6M.js";import{c as xt,a as pt,b as ht,D as ft,d as gt,e as jt}from"./dialog-DhogbNrD.js";import{i as Ye}from"./AlertCircle-D27DNBuk.js";import{i as ts}from"./Upload01-BUaljIu0.js";import{c as He,b as We,d as Je,A as Ze,g as Xe,e as et,a as tt,f as st}from"./alert-dialog-IqfxiubQ.js";import{C as ne}from"./card-BVtZpt8u.js";import{s as rt}from"./Trash01-BntZwC2j.js";import{L as te}from"./label-DSNRIgjt.js";import{d as or,S as cr,a as dr,b as ur,c as St}from"./select-Bi9bU2VK.js";import{S as ze}from"./switch-CX5J9FKg.js";import{T as vt}from"./textarea-zKfZl_E7.js";import{i as mr}from"./X-DYHYGN_A.js";import{t as xr}from"./ChevronDown-ChzOIRMN.js";import{n as pr}from"./ChevronUp-D3E47VS4.js";import{C as ss}from"./checkbox-CSe8TOzv.js";import{s as xs}from"./Eye-BCFb3Pr0.js";import{n as hr}from"./LinkExternal01-P-ZftaiS.js";import{u as fr}from"./use-infinite-scroll-CtYGFJ5F.js";import{u as Rt}from"./use-copy-CGAk1IOJ.js";import{i as Tt}from"./Check-DjbNu1wk.js";import{a as It}from"./Copy01-BupXVMxd.js";import{i as gr}from"./Key01-5oIVCQ6h.js";import{s as jr}from"./Plus-DKYhZHY2.js";import{a as vr,b as br,T as yr}from"./tooltip-CzWWX9Zy.js";import{i as Nr,a as wr}from"./mcp-oauth-DhHWa50S.js";import{i as _r}from"./Play-DCAaSSU6.js";import"./auth-COs6dQOo.js";import"./ChevronRight-BMYqr5mg.js";import"./Circle-BTk35DNa.js";import"./use-mobile-Cquheqlv.js";const Ue="private-registry",Cr=`
2
2
  You are an MCP tool tester running automated integration checks.
3
3
 
4
4
  Goal:
@@ -1 +1 @@
1
- import{c as p,j as m}from"./index-pPjXkMWO.js";import{u as l}from"./use-capability-DXxanrFU.js";import{A as u}from"./access-gate-twsl8uHV.js";function b(c){const t=p.c(6),{capability:n,area:e,children:i}=c,{granted:a,loading:o,error:s}=l(n);let r;return t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==o?(r=m.jsx(u,{granted:a,loading:o,error:s,area:e,children:i}),t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
1
+ import{c as p,j as m}from"./index-1fSIJh22.js";import{u as l}from"./use-capability-B60tguhn.js";import{A as u}from"./access-gate-CrCRwpMP.js";function b(c){const t=p.c(6),{capability:n,area:e,children:i}=c,{granted:a,loading:o,error:s}=l(n);let r;return t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==o?(r=m.jsx(u,{granted:a,loading:o,error:s,area:e,children:i}),t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
@@ -1 +1 @@
1
- import{c as l,j as s,A as a,S as m,f as h,h as u,N as f}from"./index-pPjXkMWO.js";function x(){const o=l.c(1),e=window.location.pathname+window.location.search;let t;if(o[0]===Symbol.for("react.memo_cache_sentinel")){const n=e==="/login"||e.startsWith("/login?")?{}:{next:e};t=s.jsx(f,{to:"/login",search:n,replace:!0}),o[0]=t}else t=o[0];return t}function g(o){const e=l.c(6),{children:t}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(a,{children:s.jsx(m,{})}),e[0]=i):i=e[0];let n;e[1]!==t?(n=s.jsx(h,{children:t}),e[1]=t,e[2]=n):n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(u,{children:s.jsx(x,{})}),e[3]=r):r=e[3];let c;return e[4]!==n?(c=s.jsxs(s.Fragment,{children:[i,n,r]}),e[4]=n,e[5]=c):c=e[5],c}export{g as R};
1
+ import{c as l,j as s,A as a,S as m,f as h,h as u,N as f}from"./index-1fSIJh22.js";function x(){const o=l.c(1),e=window.location.pathname+window.location.search;let t;if(o[0]===Symbol.for("react.memo_cache_sentinel")){const n=e==="/login"||e.startsWith("/login?")?{}:{next:e};t=s.jsx(f,{to:"/login",search:n,replace:!0}),o[0]=t}else t=o[0];return t}function g(o){const e=l.c(6),{children:t}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(a,{children:s.jsx(m,{})}),e[0]=i):i=e[0];let n;e[1]!==t?(n=s.jsx(h,{children:t}),e[1]=t,e[2]=n):n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(u,{children:s.jsx(x,{})}),e[3]=r):r=e[3];let c;return e[4]!==n?(c=s.jsxs(s.Fragment,{children:[i,n,r]}),e[4]=n,e[5]=c):c=e[5],c}export{g as R};
@@ -1 +1 @@
1
- import{c as q,u as Y,b as A,r as B,d as G,j as s,B as z,a as K}from"./index-pPjXkMWO.js";import{I as L}from"./input-D3oAzmpd.js";function H(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=G(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let g;e[22]!==a||e[23]!==t?(g=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=g):g=e[24];let f;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(f=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=f):f=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==g||e[42]!==f||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,g,f,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=g,e[42]=f,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await K.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{H as default};
1
+ import{c as q,u as Y,b as A,r as B,d as G,j as s,B as z,a as K}from"./index-1fSIJh22.js";import{I as L}from"./input-DtIeb-d9.js";function H(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=G(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let g;e[22]!==a||e[23]!==t?(g=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=g):g=e[24];let f;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(f=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=f):f=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==g||e[42]!==f||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,g,f,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=g,e[42]=f,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await K.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{H as default};