decocms 4.75.2 → 4.76.1

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 (238) hide show
  1. package/dist/client/assets/{AlertCircle-fBv7OfBi.js → AlertCircle-BspordpX.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Dnv0q9py.js → AreaChart-4kMJmgm4.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-CrwwuBcG.js → ArrowUp-BHs6aZEu.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-DQ75oRBs.js → ArrowUpRight-DWb0SHAh.js} +1 -1
  5. package/dist/client/assets/{Check-Nv9PNGwO.js → Check-7WIITMAB.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-BffwGHyY.js → CheckCircle-BU9eUffg.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-Ba_vezHC.js → ChevronDown-CKvbLNpf.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BHrDwMLM.js → ChevronRight-C-jwMI0x.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DIVmA2RS.js → ChevronUp-xEk-Hkjn.js} +1 -1
  10. package/dist/client/assets/{Circle-3s3JL9SD.js → Circle-B-1p1V3u.js} +1 -1
  11. package/dist/client/assets/{Copy01-B6QQJb1b.js → Copy01-j7g0HzRj.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-D9IO-Hed.js → DotsVertical-D_WbX0qI.js} +1 -1
  13. package/dist/client/assets/{Eye-BBCNeB9q.js → Eye-Qig4q8vO.js} +1 -1
  14. package/dist/client/assets/{FilterLines-Dt-V4cWP.js → FilterLines-Clx9vkNd.js} +1 -1
  15. package/dist/client/assets/{Flag01-CBX2ZETT.js → Flag01-D-v8b8WA.js} +1 -1
  16. package/dist/client/assets/{Globe01-DdAizw-q.js → Globe01-D8OVqcVm.js} +1 -1
  17. package/dist/client/assets/{Globe04-C18idgBe.js → Globe04-Byszod1w.js} +1 -1
  18. package/dist/client/assets/{HardDrive-DyazGlyp.js → HardDrive-uNiSvuE5.js} +1 -1
  19. package/dist/client/assets/{Key01-BNGoY_cw.js → Key01-DCLaxXrN.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-B15XRa9B.js → LayoutLeft-BkkLEygy.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-Cd9TaF6v.js → LinkExternal01-D0e_JnBB.js} +1 -1
  22. package/dist/client/assets/{List-BgjU7rAZ.js → List-DBle1pOm.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CDtvUeeQ.js → Monitor01-C68LgEUD.js} +1 -1
  24. package/dist/client/assets/{Package-Gdxl9HoE.js → Package-ArC6w3gk.js} +1 -1
  25. package/dist/client/assets/{Palette-FBYCNeRf.js → Palette-CamQAW-l.js} +1 -1
  26. package/dist/client/assets/{Play-DLISmTm9.js → Play-Bo_FQ_Qt.js} +1 -1
  27. package/dist/client/assets/{Plus-BYL5bo1C.js → Plus-BEhknaRt.js} +1 -1
  28. package/dist/client/assets/{SearchLg-Cx1PBT6A.js → SearchLg-CkHW6FGX.js} +1 -1
  29. package/dist/client/assets/{SearchMd-Bfu7I8pi.js → SearchMd-BBU4Wq1F.js} +1 -1
  30. package/dist/client/assets/{Settings02-ettxEKNi.js → Settings02-BIYEvLxH.js} +1 -1
  31. package/dist/client/assets/{Shield01-DoAW_P3h.js → Shield01-CaKclxlZ.js} +1 -1
  32. package/dist/client/assets/{Star01-Csv-6tOx.js → Star01-7lVQxn6j.js} +1 -1
  33. package/dist/client/assets/{Stars01-C8JIWSkL.js → Stars01-DoPAiLfG.js} +1 -1
  34. package/dist/client/assets/{Stars02-sx-RKCd3.js → Stars02-6rBUSWRT.js} +1 -1
  35. package/dist/client/assets/{Sun-D8OpooPG.js → Sun-Xo-4W0GL.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-PKvsqBYk.js → SwitchHorizontal01-DonuDjWr.js} +1 -1
  37. package/dist/client/assets/{Tool01-DkvexHAX.js → Tool01-BMNmn1yF.js} +1 -1
  38. package/dist/client/assets/{Tool02-DQKbBHGt.js → Tool02-DGufqHHa.js} +1 -1
  39. package/dist/client/assets/{Trash01-CCF-zJqZ.js → Trash01-DfkqWioB.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-BJdYD-xu.js → TrendUp01-yN4PrbN-.js} +1 -1
  41. package/dist/client/assets/{Upload01-BI33CHpm.js → Upload01-BjqchOMa.js} +1 -1
  42. package/dist/client/assets/{User01-D8Nj4JQV.js → User01-x16Tzx2V.js} +1 -1
  43. package/dist/client/assets/{UserPlus01-BMDPA4ef.js → UserPlus01-Uz6S8Fjb.js} +1 -1
  44. package/dist/client/assets/{Users01-DAKuiIpW.js → Users01-CpqV9dUM.js} +1 -1
  45. package/dist/client/assets/{Users03-CFkyhLss.js → Users03-C7mz_KdA.js} +1 -1
  46. package/dist/client/assets/{X-y2LzukiV.js → X-DqSvIURs.js} +1 -1
  47. package/dist/client/assets/{XCircle-BRFrDiaB.js → XCircle-BsaSEJdP.js} +1 -1
  48. package/dist/client/assets/{XClose-Cqj1GRp5.js → XClose-BfUy7_Ni.js} +1 -1
  49. package/dist/client/assets/{Zap-Db2_moCh.js → Zap-28TFXy2W.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-kqRpfrno.js → ZapSquare-BA0p6n38.js} +1 -1
  51. package/dist/client/assets/{ZoomOut-BFspvVZz.js → ZoomOut-CrgIEWZv.js} +1 -1
  52. package/dist/client/assets/{access-gate-DKGk3UV2.js → access-gate-B8vNVSDk.js} +1 -1
  53. package/dist/client/assets/{add-section-modal-DJtKnOwa.js → add-section-modal-BYax8siJ.js} +1 -1
  54. package/dist/client/assets/{agent-icon-CwXpVSpl.js → agent-icon-BMlO9g3f.js} +1 -1
  55. package/dist/client/assets/{agents-list-D7jIwkH5.js → agents-list-CMKpXE8Q.js} +1 -1
  56. package/dist/client/assets/{ai-providers-CAuqF6Y2.js → ai-providers-DHKrkbAz.js} +1 -1
  57. package/dist/client/assets/{alert-T6sWNYN4.js → alert-BSGXssrw.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-BDFyhJ06.js → alert-dialog-Dtszn4Rp.js} +1 -1
  59. package/dist/client/assets/app-editor-Dy9v_kf-.js +1 -0
  60. package/dist/client/assets/{auth-BucB9S_O.js → auth-DhIYbras.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-C490BHZp.js → auth-catchall-CRq41sCS.js} +1 -1
  62. package/dist/client/assets/{auth-entry-CQjRcoCT.js → auth-entry-aBpNt9KV.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-Cce8G4kK.js → auth-split-layout-BX87WBBr.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-BcoDsme1.js → authenticate-and-persist-oauth-ChFnJYYv.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-BNKeVeHY.js → automation-list-row-CWjgUckd.js} +1 -1
  66. package/dist/client/assets/{automation-runs-DqXXyJ8H.js → automation-runs-DHcUjECQ.js} +1 -1
  67. package/dist/client/assets/automations-C5zO-pTH.js +1 -0
  68. package/dist/client/assets/{autosend-BuCf6Eh3.js → autosend-CZLKJkBV.js} +1 -1
  69. package/dist/client/assets/{avatar-CP4OJtb5.js → avatar-DdtddiHF.js} +1 -1
  70. package/dist/client/assets/{badge-B4PjFR9w.js → badge-JS3YhMut.js} +1 -1
  71. package/dist/client/assets/{block-document-CZFbi1I3.js → block-document-C7RgqHof.js} +1 -1
  72. package/dist/client/assets/{brand-context-BgHCE8XL.js → brand-context-CD3JJFrB.js} +1 -1
  73. package/dist/client/assets/{buckets-Ca-QAe1h.js → buckets-CVhgoPiM.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-ujj8Qw9W.js → bulk-category-panel-Cy0BB2fF.js} +1 -1
  75. package/dist/client/assets/{calendar-CXSmv6Ca.js → calendar-2DG8dvZM.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-hagiycmr.js → capability-load-error-D0AccagV.js} +1 -1
  77. package/dist/client/assets/{card-DbggqOWv.js → card-DpjecHY2.js} +1 -1
  78. package/dist/client/assets/{category-editor-ubZ7ZSSm.js → category-editor-upzkvtPp.js} +1 -1
  79. package/dist/client/assets/{chat-context-BSfnfXx3.js → chat-context-D0zCFK1M.js} +1 -1
  80. package/dist/client/assets/{checkbox-CjfLURkI.js → checkbox-CblPd3Hc.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-pN80qtUV.js → cli-auth-success-DBrWe-O0.js} +1 -1
  82. package/dist/client/assets/{collection-detail-qH2LfA7N.js → collection-detail-V02psAZE.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-Cy7bbrey.js → collection-display-button-Pbq97oJc.js} +1 -1
  84. package/dist/client/assets/{collection-search-C-ov7rRo.js → collection-search-Dvs-LkIv.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-CaIMoSV6.js → collection-table-wrapper-DcJiU6c1.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-D9rDn4fn.js → collection-tabs-CTEKQT9e.js} +1 -1
  87. package/dist/client/assets/{command-DsLtfLi9.js → command-BN9Ept_A.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-BZRTck0Z.js → commerce-onboarding-WLmZgPnQ.js} +1 -1
  89. package/dist/client/assets/{companions-core-DBODHTvD.js → companions-core-CW4X_eqm.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-DFFYu4Bs.js → connect-desktop-dialog-DKrDKa4d.js} +1 -1
  91. package/dist/client/assets/{connection-card-BzeuUn3c.js → connection-card-Dduj2bdE.js} +1 -1
  92. package/dist/client/assets/{connection-detail-CuDehxtP.js → connection-detail-C6ZU94xZ.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-YN6YNLU8.js → connection-form-helpers-DKpPvDSN.js} +1 -1
  94. package/dist/client/assets/{connections-D-zGJlEm.js → connections-UhpGp-S2.js} +1 -1
  95. package/dist/client/assets/decopilot-sse-pool-uJsbj6wS.js +1 -0
  96. package/dist/client/assets/{dialog-DhD-Q2av.js → dialog-COLQcCRL.js} +1 -1
  97. package/dist/client/assets/{domain-settings-DJxqRk3K.js → domain-settings-BAoaDfdv.js} +1 -1
  98. package/dist/client/assets/{drawer-BqgKrTOR.js → drawer-HTdc4YL3.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-CPr_PO8n.js → dropdown-menu-DHMJS27m.js} +1 -1
  100. package/dist/client/assets/{empty-state-CVK5v1gL.js → empty-state-YCut0sPg.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-z4lzSG99.js → extract-connection-data-B8RjJlbH.js} +1 -1
  102. package/dist/client/assets/{file-explorer-CVPx8dOr.js → file-explorer-DzglhtBO.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-BSOZ-x-l.js → file-type-icon-OzS8T0u4.js} +1 -1
  104. package/dist/client/assets/{files-ChHXFkhT.js → files-CyujDvLN.js} +1 -1
  105. package/dist/client/assets/{form-D-BruI7g.js → form-BMLTyaPP.js} +1 -1
  106. package/dist/client/assets/{general-B01fg2ap.js → general-GxYcJEzG.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-CdTvfx4Y.js → github-repo-picker-uyxKPI6q.js} +1 -1
  108. package/dist/client/assets/{hooks-Chr_Iknn.js → hooks-BjdnAe-L.js} +1 -1
  109. package/dist/client/assets/{index-CJpMb0TW.js → index-B5ks997m.js} +1 -1
  110. package/dist/client/assets/{index-A3XDpS-x.js → index-BcIFnd0f.js} +1 -1
  111. package/dist/client/assets/{index-D7fUKXrq.js → index-BheKZ8tD.js} +1 -1
  112. package/dist/client/assets/{index-D3nG4dT9.js → index-C2fT-8L6.js} +1 -1
  113. package/dist/client/assets/{index-2GNyJI9X.js → index-CL06la1a.js} +1 -1
  114. package/dist/client/assets/{index-B5Ms8AP4.js → index-CNAmaCH3.js} +5 -5
  115. package/dist/client/assets/index-COYy9dBM.css +1 -0
  116. package/dist/client/assets/{index-CGvQPw4w.js → index-D1C9TQ71.js} +1 -1
  117. package/dist/client/assets/{index-CbxTl2jt.js → index-D3iTAL4-.js} +1 -1
  118. package/dist/client/assets/{index-BMtkZGAH.js → index-DPs9SgJd.js} +1 -1
  119. package/dist/client/assets/{index-CX8Kmbcu.js → index-DQsrMO1f.js} +1 -1
  120. package/dist/client/assets/{index-BTEnjXeB.js → index-DS4rAqwY.js} +3 -3
  121. package/dist/client/assets/index-DdJw1Zxw.js +2 -0
  122. package/dist/client/assets/{index-DORG9dP6.js → index-KdwK_bqc.js} +1 -1
  123. package/dist/client/assets/{index-H8crjXWV.js → index-rFHHEkal.js} +1 -1
  124. package/dist/client/assets/{index-redirect-Bq5U7gHt.js → index-redirect-CvN8jF5Z.js} +1 -1
  125. package/dist/client/assets/{input-BlfB50CV.js → input-D5vcQhoL.js} +1 -1
  126. package/dist/client/assets/{integration-icon-B3cD8Ssc.js → integration-icon-BhHODF-u.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-BiIH8D2f.js → invite-member-dialog-C5h7Heum.js} +1 -1
  128. package/dist/client/assets/{label-8th4V92k.js → label-BgZiPLuQ.js} +1 -1
  129. package/dist/client/assets/{layout-BtrJV1Mh.js → layout-bf7I011x.js} +1 -1
  130. package/dist/client/assets/{login-DsDG4QSB.js → login-Dpe63XC5.js} +1 -1
  131. package/dist/client/assets/{mcp-oauth-CjpxiFCE.js → mcp-oauth-BreAtybq.js} +1 -1
  132. package/dist/client/assets/{members-CaYt2Nm9.js → members-CCZ7zish.js} +1 -1
  133. package/dist/client/assets/{monaco-editor-C4k9TCql.js → monaco-editor-DchAWwXC.js} +1 -1
  134. package/dist/client/assets/{monitoring-stats-row-CmRTv8v1.js → monitoring-stats-row-B5kPnbuO.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-DoUiWsVQ.js → oauth-callback-CC4lP5CB.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-ai-provider-Ba9MSU3b.js → oauth-callback-ai-provider-DECZg29t.js} +1 -1
  137. package/dist/client/assets/{onboarding-Df83j6_W.js → onboarding-G2BPtj4H.js} +1 -1
  138. package/dist/client/assets/{org-install-DwKvQSbK.js → org-install-DnGYxys0.js} +1 -1
  139. package/dist/client/assets/{org-layout-CbqgeXgC.js → org-layout-CRWKnMwJ.js} +1 -1
  140. package/dist/client/assets/{organization-choice-BJiexu5A.js → organization-choice-CHGhQIiO.js} +1 -1
  141. package/dist/client/assets/{orgs-ChtefBXZ.js → orgs-BtZp7z5r.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-uTGWcfgY.js → page-seo-form-BLTJtOti.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-BySrSZBs.js +1 -0
  144. package/dist/client/assets/{popover-B0R2Dzsv.js → popover-DquVr-be.js} +1 -1
  145. package/dist/client/assets/{post-editor-BpCR87ve.js → post-editor-ibxxgL8G.js} +1 -1
  146. package/dist/client/assets/{primitives-keSGKrFC.js → primitives-BHkbxz43.js} +1 -1
  147. package/dist/client/assets/{profile-D5Uz1aMw.js → profile-Cwp4irac.js} +1 -1
  148. package/dist/client/assets/project-app-view-lttHc1Pg.js +1 -0
  149. package/dist/client/assets/record-editor-CG9duDkL.js +1 -0
  150. package/dist/client/assets/redirect-editor-DN38Qy_4.js +1 -0
  151. package/dist/client/assets/registry-BsHzFPUW.js +2 -0
  152. package/dist/client/assets/{registry-layout-DHKE9y6D.js → registry-layout-CehAMgpE.js} +2 -2
  153. package/dist/client/assets/{reports-CCXURQdL.js → reports-DNSWa3ug.js} +1 -1
  154. package/dist/client/assets/{require-capability-CnMFOG4E.js → require-capability-Df20chi2.js} +1 -1
  155. package/dist/client/assets/{required-auth-layout-eaMo5p5o.js → required-auth-layout-BQBGmnFG.js} +1 -1
  156. package/dist/client/assets/{reset-password-C5kItqxO.js → reset-password-C3Z0-tcR.js} +1 -1
  157. package/dist/client/assets/{roles-DoD0mWg4.js → roles-WfYUgxNX.js} +1 -1
  158. package/dist/client/assets/{search-input-DsMy4zVs.js → search-input-CIt36tQq.js} +1 -1
  159. package/dist/client/assets/{secrets-BJ4ev_HP.js → secrets-CONinZEP.js} +1 -1
  160. package/dist/client/assets/{sections-editor-BY1yjoqZ.js → sections-editor-DNezwFNj.js} +1 -1
  161. package/dist/client/assets/{select-0sWT_o7d.js → select-32I1U7UG.js} +1 -1
  162. package/dist/client/assets/{select-model-4BLPhZO5.js → select-model-BQOHE3MV.js} +1 -1
  163. package/dist/client/assets/{self-tool-result-WKfo7igz.js → self-tool-result-Bf7pgo3v.js} +1 -1
  164. package/dist/client/assets/{seo-editor-gyPRn3JA.js → seo-editor-1hBhUFbo.js} +1 -1
  165. package/dist/client/assets/{settings-layout-ZNX-8qdK.js → settings-layout-BXGsRvG1.js} +1 -1
  166. package/dist/client/assets/{settings-section-DuBZtqHt.js → settings-section-C2j2B0zZ.js} +1 -1
  167. package/dist/client/assets/{shell-controls-BlSOut9N.js → shell-controls-Bion2poN.js} +1 -1
  168. package/dist/client/assets/{shell-layout-CXh8M0i5.js → shell-layout-C1ZgPk96.js} +1 -1
  169. package/dist/client/assets/{sidebar-IXOVwoVQ.js → sidebar-DOGgTpNK.js} +1 -1
  170. package/dist/client/assets/{skeleton-BZZUxTVe.js → skeleton-DoBiZEib.js} +1 -1
  171. package/dist/client/assets/{sso-CWEg2MYz.js → sso-pJo1PpuN.js} +1 -1
  172. package/dist/client/assets/{store-gT_s58UD.js → store-DxZsn637.js} +1 -1
  173. package/dist/client/assets/store-registry-MqdqxN1d.js +2 -0
  174. package/dist/client/assets/{studio-tools-BPc-jQ-b.js → studio-tools-Brn4N5_U.js} +1 -1
  175. package/dist/client/assets/{switch-BwI9XAn3.js → switch-tHKnYv4p.js} +1 -1
  176. package/dist/client/assets/{table-BURDG63q.js → table-D44fXBcj.js} +1 -1
  177. package/dist/client/assets/{tabs-CH219Ai8.js → tabs-B-tjXtUz.js} +1 -1
  178. package/dist/client/assets/{textarea-DO7tbmcn.js → textarea-DaaHcv5N.js} +1 -1
  179. package/dist/client/assets/{toggle-group-Dp4tpQyw.js → toggle-group-C-P2ViEb.js} +1 -1
  180. package/dist/client/assets/{toolbar-DRWoyo87.js → toolbar-CZ_rtBa9.js} +1 -1
  181. package/dist/client/assets/{toolbar-icon-button-DrwCjSpQ.js → toolbar-icon-button-Ba0OmFet.js} +1 -1
  182. package/dist/client/assets/{tools-list-DlpGS7bO.js → tools-list-COQ-a9jF.js} +1 -1
  183. package/dist/client/assets/{tooltip-DeaWVLXa.js → tooltip-Cv8zdj9x.js} +1 -1
  184. package/dist/client/assets/{use-ai-providers-CVjFUS9Q.js → use-ai-providers-My0L_zE8.js} +1 -1
  185. package/dist/client/assets/{use-automations-UNvkH02s.js → use-automations-DfJYP9gI.js} +1 -1
  186. package/dist/client/assets/{use-autosave-BjhWee_F.js → use-autosave-Xs2HOuwf.js} +1 -1
  187. package/dist/client/assets/{use-capability-B_O60mAV.js → use-capability-CrdOeLT6.js} +1 -1
  188. package/dist/client/assets/{use-clock-tick-BVlgXm-y.js → use-clock-tick-_v1mau-X.js} +1 -1
  189. package/dist/client/assets/{use-collections-DWpIHeao.js → use-collections-Bbw94V3E.js} +1 -1
  190. package/dist/client/assets/{use-connection-BiU6dOIx.js → use-connection-BuP1AL_I.js} +1 -1
  191. package/dist/client/assets/{use-copy-p19gYB9e.js → use-copy-DasuS9o3.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-Blq5gLg3.js → use-create-virtual-mcp--XQN2FTA.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-DjZzH3Sy.js → use-debounced-autosave-VGWMIg0D.js} +1 -1
  194. package/dist/client/assets/{use-debounced-value-CrO6KrIo.js → use-debounced-value-BdZGbVQ9.js} +1 -1
  195. package/dist/client/assets/{use-deco-credits-BhKZc6oF.js → use-deco-credits-DUNDu3Fq.js} +1 -1
  196. package/dist/client/assets/{use-decopilot-events-e23bOcJL.js → use-decopilot-events-C2YASEpX.js} +1 -1
  197. package/dist/client/assets/{use-delete-connection-62XpeoJv.js → use-delete-connection-BOwvgJXD.js} +1 -1
  198. package/dist/client/assets/{use-deployment-admin-C50oINeX.js → use-deployment-admin-B3yBv_ku.js} +1 -1
  199. package/dist/client/assets/{use-file-configs-D1bENBGE.js → use-file-configs-DOV5LRzD.js} +1 -1
  200. package/dist/client/assets/{use-infinite-scroll--z6jHQoF.js → use-infinite-scroll-BVSdrRwU.js} +1 -1
  201. package/dist/client/assets/{use-join-requests-mueBgl7o.js → use-join-requests-E02cAQvP.js} +1 -1
  202. package/dist/client/assets/{use-mcp-client-BcK_4Y94.js → use-mcp-client-ChtUpBEU.js} +1 -1
  203. package/dist/client/assets/{use-mcp-tools-DVcI7_1i.js → use-mcp-tools-z_64KPxo.js} +1 -1
  204. package/dist/client/assets/{use-members-h79WpLjb.js → use-members-Cgw9sNN9.js} +1 -1
  205. package/dist/client/assets/{use-mobile-B3Db4rCS.js → use-mobile-pnR-y4lq.js} +1 -1
  206. package/dist/client/assets/{use-navigate-to-agent-Dq6E0vZQ.js → use-navigate-to-agent-Chl5nrt3.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-vZ2CKv_C.js → use-org-auth-client-DwYtejPT.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-VeLsEvsJ.js → use-org-sso-D1GLkTq3.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-DYr3fOp_.js → use-organization-roles-Bc6MXNc1.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-Vmhd1qap.js → use-organization-settings-DDlWJKkK.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-CTWzawX9.js → use-registry-connections-Dq9PwH8s.js} +1 -1
  212. package/dist/client/assets/{use-secrets-duurnM9-.js → use-secrets-DPnFGuFl.js} +1 -1
  213. package/dist/client/assets/{use-status-sounds-DwLhGovC.js → use-status-sounds-Ce8ydwkp.js} +1 -1
  214. package/dist/client/assets/{use-view-mode-BxsHVAj4.js → use-view-mode-D9a3LP6U.js} +1 -1
  215. package/dist/client/assets/{use-virtual-mcp-DzIPI87p.js → use-virtual-mcp-DoUDWQYW.js} +1 -1
  216. package/dist/client/assets/useInfiniteQuery-BJ3vgi17.js +1 -0
  217. package/dist/client/assets/{useRouterState-Cj79CVRq.js → useRouterState-8Pr6o_D3.js} +1 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-CWXAI4ws.js +1 -0
  219. package/dist/client/assets/{users-DhHCkjJr.js → users-t7mdZGMR.js} +1 -1
  220. package/dist/client/assets/{variant-calendar-BrSvGmdj.js → variant-calendar-CdAayp2t.js} +1 -1
  221. package/dist/client/assets/{view-mode-toggle-8Jdvuefb.js → view-mode-toggle-D3k3QkWy.js} +1 -1
  222. package/dist/client/index.html +2 -2
  223. package/dist/server/cli.js +441 -441
  224. package/dist/server/server.js +298 -298
  225. package/package.json +1 -1
  226. package/dist/client/assets/app-editor-CrRzhZSH.js +0 -1
  227. package/dist/client/assets/automations-CbeM1B3U.js +0 -1
  228. package/dist/client/assets/decopilot-sse-pool-fmrV8Ad4.js +0 -1
  229. package/dist/client/assets/index-Cbmhxlpy.js +0 -2
  230. package/dist/client/assets/index-FznqHB3j.css +0 -1
  231. package/dist/client/assets/page-seo-sheet-D-AVNV0v.js +0 -1
  232. package/dist/client/assets/project-app-view-O0ZhlUzS.js +0 -1
  233. package/dist/client/assets/record-editor-2wfFR-rN.js +0 -1
  234. package/dist/client/assets/redirect-editor-BXr8RzLg.js +0 -1
  235. package/dist/client/assets/registry-BuK0D2Yx.js +0 -2
  236. package/dist/client/assets/store-registry-0FLPLJSL.js +0 -2
  237. package/dist/client/assets/useInfiniteQuery-BtGysKJX.js +0 -1
  238. package/dist/client/assets/useSuspenseInfiniteQuery-CfwPCYIG.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as d,bB as me,bx as Gr,c as cr,l as st,j as w}from"./index-BTEnjXeB.js";import{w as Yr,e as Ae,s as fe,i as V,f as ur,r as ye,h as at,j as fr,J as nt,k as D,m as _,n as ue,o as we,p as Se,q as re,R as ct,L as de,t as Hr,v as Oe,x as Vr,y as qr,z as Ur,B as Zr,D as Le,E as He,F as Xr,G as Jr,H as Qr,I as ea,K as Ne,M as ze,N as q,O as ut,P as ft,Z as Ke,Q as dr,S as vr,T as pr,U as xe,V as mr,W as te,Y as ta,_ as yr,$ as he,a0 as ra,a1 as ie,a2 as ve,a3 as oe,a4 as pe,a5 as hr,a6 as gr,a7 as br,a8 as aa,a9 as na,aa as dt,ab as ia,ac as vt,ad as oa,ae as la,af as sa,ag as ca,ah as ua,ai as xr,aj as fa,ak as da,al as va,am as pa,an as ma,ao as Or,ap as ya,aq as Pr,ar as ha,as as jr,at as ga,au as ba,av as pt,aw as xa,ax as Oa,ay as Pa,az as ja,aA as $,aB as Aa,aC as ka,aD as Ia,aE as wa,aF as Sa,aG as Ea,aH as Ta,aI as Ca,aJ as Da,aK as Ma,aL as Ba,aM as $a,aN as _a,aO as La,aP as Na,X as mt,C as yt,A as za,b as Ka,c as ht}from"./AreaChart-Dnv0q9py.js";const Ar=Math.cos,Ee=Math.sin,U=Math.sqrt,Te=Math.PI,We=2*Te,it={draw(t,e){const r=U(e/Te);t.moveTo(r,0),t.arc(0,0,r,0,We)}},Wa={draw(t,e){const r=U(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},kr=U(1/3),Ra=kr*2,Fa={draw(t,e){const r=U(e/Ra),a=r*kr;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ga={draw(t,e){const r=U(e),a=-r/2;t.rect(a,a,r,r)}},Ya=.8908130915292852,Ir=Ee(Te/10)/Ee(7*Te/10),Ha=Ee(We/10)*Ir,Va=-Ar(We/10)*Ir,qa={draw(t,e){const r=U(e*Ya),a=Ha*r,n=Va*r;t.moveTo(0,-r),t.lineTo(a,n);for(let i=1;i<5;++i){const l=We*i/5,f=Ar(l),o=Ee(l);t.lineTo(o*r,-f*r),t.lineTo(f*a-o*n,o*a+f*n)}t.closePath()}},Fe=U(3),Ua={draw(t,e){const r=-U(e/(Fe*3));t.moveTo(0,r*2),t.lineTo(-Fe*r,-r),t.lineTo(Fe*r,-r),t.closePath()}},G=-.5,Y=U(3)/2,Ve=1/U(12),Za=(Ve/2+1)*3,Xa={draw(t,e){const r=U(e/Za),a=r/2,n=r*Ve,i=a,l=r*Ve+r,f=-i,o=l;t.moveTo(a,n),t.lineTo(i,l),t.lineTo(f,o),t.lineTo(G*a-Y*n,Y*a+G*n),t.lineTo(G*i-Y*l,Y*i+G*l),t.lineTo(G*f-Y*o,Y*f+G*o),t.lineTo(G*a+Y*n,G*n-Y*a),t.lineTo(G*i+Y*l,G*l-Y*i),t.lineTo(G*f+Y*o,G*o-Y*f),t.closePath()}};function Ja(t,e){let r=null,a=Yr(n);t=typeof t=="function"?t:Ae(t||it),e=typeof e=="function"?e:Ae(e===void 0?64:+e);function n(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:Ae(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:Ae(+i),n):e},n.context=function(i){return arguments.length?(r=i??null,n):r},n}var Qa="Invariant failed";function en(t,e){throw new Error(Qa)}var tn=["type","size","sizeType"];function qe(){return qe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(null,arguments)}function gt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gt(Object(r),!0).forEach(function(a){rn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function rn(t,e,r){return(e=an(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function an(t){var e=nn(t,"string");return typeof e=="symbol"?e:e+""}function nn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function on(t,e){if(t==null)return{};var r,a,n=ln(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ln(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var wr={symbolCircle:it,symbolCross:Wa,symbolDiamond:Fa,symbolSquare:Ga,symbolStar:qa,symbolTriangle:Ua,symbolWye:Xa},sn=Math.PI/180,cn=t=>{var e="symbol".concat(ur(t));return wr[e]||it},un=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*sn;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},fn=(t,e)=>{wr["symbol".concat(ur(t))]=e},Sr=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,n=on(t,tn),i=bt(bt({},n),{},{type:e,size:r,sizeType:a}),l="circle";typeof e=="string"&&(l=e);var f=()=>{var v=cn(l),m=Ja().type(v).size(un(r,a,l)),y=m();if(y!==null)return y},{className:o,cx:s,cy:c}=i,u=fe(i);return V(s)&&V(c)&&V(r)?d.createElement("path",qe({},u,{className:me("recharts-symbols",o),transform:"translate(".concat(s,", ").concat(c,")"),d:f()})):null};Sr.registerSymbol=fn;var xt=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>n[l++]))}},dn=["radius"],vn=["radius"],Ot,Pt,jt,At,kt,It,wt,St,Et,Tt;function Ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Dt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ct(Object(r),!0).forEach(function(a){pn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function pn(t,e,r){return(e=mn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mn(t){var e=yn(t,"string");return typeof e=="symbol"?e:e+""}function yn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ce(){return Ce=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ce.apply(null,arguments)}function Mt(t,e){if(t==null)return{};var r,a,n=hn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function J(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Bt=(t,e,r,a,n)=>{var i=ue(r),l=ue(a),f=Math.min(Math.abs(i)/2,Math.abs(l)/2),o=l>=0?1:-1,s=i>=0?1:-1,c=l>=0&&i>=0||l<0&&i<0?1:0,u;if(f>0&&Array.isArray(n)){for(var v=[0,0,0,0],m=0,y=4;m<y;m++){var h,b=(h=n[m])!==null&&h!==void 0?h:0;v[m]=b>f?f:b}u=D(Ot||(Ot=J(["M",",",""])),t,e+o*v[0]),v[0]>0&&(u+=D(Pt||(Pt=J(["A ",",",",0,0,",",",",",""])),v[0],v[0],c,t+s*v[0],e)),u+=D(jt||(jt=J(["L ",",",""])),t+r-s*v[1],e),v[1]>0&&(u+=D(At||(At=J(["A ",",",",0,0,",`,
1
+ import{r as d,bB as me,bx as Gr,c as cr,l as st,j as w}from"./index-DS4rAqwY.js";import{w as Yr,e as Ae,s as fe,i as V,f as ur,r as ye,h as at,j as fr,J as nt,k as D,m as _,n as ue,o as we,p as Se,q as re,R as ct,L as de,t as Hr,v as Oe,x as Vr,y as qr,z as Ur,B as Zr,D as Le,E as He,F as Xr,G as Jr,H as Qr,I as ea,K as Ne,M as ze,N as q,O as ut,P as ft,Z as Ke,Q as dr,S as vr,T as pr,U as xe,V as mr,W as te,Y as ta,_ as yr,$ as he,a0 as ra,a1 as ie,a2 as ve,a3 as oe,a4 as pe,a5 as hr,a6 as gr,a7 as br,a8 as aa,a9 as na,aa as dt,ab as ia,ac as vt,ad as oa,ae as la,af as sa,ag as ca,ah as ua,ai as xr,aj as fa,ak as da,al as va,am as pa,an as ma,ao as Or,ap as ya,aq as Pr,ar as ha,as as jr,at as ga,au as ba,av as pt,aw as xa,ax as Oa,ay as Pa,az as ja,aA as $,aB as Aa,aC as ka,aD as Ia,aE as wa,aF as Sa,aG as Ea,aH as Ta,aI as Ca,aJ as Da,aK as Ma,aL as Ba,aM as $a,aN as _a,aO as La,aP as Na,X as mt,C as yt,A as za,b as Ka,c as ht}from"./AreaChart-4kMJmgm4.js";const Ar=Math.cos,Ee=Math.sin,U=Math.sqrt,Te=Math.PI,We=2*Te,it={draw(t,e){const r=U(e/Te);t.moveTo(r,0),t.arc(0,0,r,0,We)}},Wa={draw(t,e){const r=U(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},kr=U(1/3),Ra=kr*2,Fa={draw(t,e){const r=U(e/Ra),a=r*kr;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ga={draw(t,e){const r=U(e),a=-r/2;t.rect(a,a,r,r)}},Ya=.8908130915292852,Ir=Ee(Te/10)/Ee(7*Te/10),Ha=Ee(We/10)*Ir,Va=-Ar(We/10)*Ir,qa={draw(t,e){const r=U(e*Ya),a=Ha*r,n=Va*r;t.moveTo(0,-r),t.lineTo(a,n);for(let i=1;i<5;++i){const l=We*i/5,f=Ar(l),o=Ee(l);t.lineTo(o*r,-f*r),t.lineTo(f*a-o*n,o*a+f*n)}t.closePath()}},Fe=U(3),Ua={draw(t,e){const r=-U(e/(Fe*3));t.moveTo(0,r*2),t.lineTo(-Fe*r,-r),t.lineTo(Fe*r,-r),t.closePath()}},G=-.5,Y=U(3)/2,Ve=1/U(12),Za=(Ve/2+1)*3,Xa={draw(t,e){const r=U(e/Za),a=r/2,n=r*Ve,i=a,l=r*Ve+r,f=-i,o=l;t.moveTo(a,n),t.lineTo(i,l),t.lineTo(f,o),t.lineTo(G*a-Y*n,Y*a+G*n),t.lineTo(G*i-Y*l,Y*i+G*l),t.lineTo(G*f-Y*o,Y*f+G*o),t.lineTo(G*a+Y*n,G*n-Y*a),t.lineTo(G*i+Y*l,G*l-Y*i),t.lineTo(G*f+Y*o,G*o-Y*f),t.closePath()}};function Ja(t,e){let r=null,a=Yr(n);t=typeof t=="function"?t:Ae(t||it),e=typeof e=="function"?e:Ae(e===void 0?64:+e);function n(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:Ae(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:Ae(+i),n):e},n.context=function(i){return arguments.length?(r=i??null,n):r},n}var Qa="Invariant failed";function en(t,e){throw new Error(Qa)}var tn=["type","size","sizeType"];function qe(){return qe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(null,arguments)}function gt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gt(Object(r),!0).forEach(function(a){rn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function rn(t,e,r){return(e=an(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function an(t){var e=nn(t,"string");return typeof e=="symbol"?e:e+""}function nn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function on(t,e){if(t==null)return{};var r,a,n=ln(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ln(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var wr={symbolCircle:it,symbolCross:Wa,symbolDiamond:Fa,symbolSquare:Ga,symbolStar:qa,symbolTriangle:Ua,symbolWye:Xa},sn=Math.PI/180,cn=t=>{var e="symbol".concat(ur(t));return wr[e]||it},un=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*sn;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},fn=(t,e)=>{wr["symbol".concat(ur(t))]=e},Sr=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,n=on(t,tn),i=bt(bt({},n),{},{type:e,size:r,sizeType:a}),l="circle";typeof e=="string"&&(l=e);var f=()=>{var v=cn(l),m=Ja().type(v).size(un(r,a,l)),y=m();if(y!==null)return y},{className:o,cx:s,cy:c}=i,u=fe(i);return V(s)&&V(c)&&V(r)?d.createElement("path",qe({},u,{className:me("recharts-symbols",o),transform:"translate(".concat(s,", ").concat(c,")"),d:f()})):null};Sr.registerSymbol=fn;var xt=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>n[l++]))}},dn=["radius"],vn=["radius"],Ot,Pt,jt,At,kt,It,wt,St,Et,Tt;function Ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Dt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ct(Object(r),!0).forEach(function(a){pn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function pn(t,e,r){return(e=mn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mn(t){var e=yn(t,"string");return typeof e=="symbol"?e:e+""}function yn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ce(){return Ce=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ce.apply(null,arguments)}function Mt(t,e){if(t==null)return{};var r,a,n=hn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function J(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Bt=(t,e,r,a,n)=>{var i=ue(r),l=ue(a),f=Math.min(Math.abs(i)/2,Math.abs(l)/2),o=l>=0?1:-1,s=i>=0?1:-1,c=l>=0&&i>=0||l<0&&i<0?1:0,u;if(f>0&&Array.isArray(n)){for(var v=[0,0,0,0],m=0,y=4;m<y;m++){var h,b=(h=n[m])!==null&&h!==void 0?h:0;v[m]=b>f?f:b}u=D(Ot||(Ot=J(["M",",",""])),t,e+o*v[0]),v[0]>0&&(u+=D(Pt||(Pt=J(["A ",",",",0,0,",",",",",""])),v[0],v[0],c,t+s*v[0],e)),u+=D(jt||(jt=J(["L ",",",""])),t+r-s*v[1],e),v[1]>0&&(u+=D(At||(At=J(["A ",",",",0,0,",`,
2
2
  `,",",""])),v[1],v[1],c,t+r,e+o*v[1])),u+=D(kt||(kt=J(["L ",",",""])),t+r,e+a-o*v[2]),v[2]>0&&(u+=D(It||(It=J(["A ",",",",0,0,",`,
3
3
  `,",",""])),v[2],v[2],c,t+r-s*v[2],e+a)),u+=D(wt||(wt=J(["L ",",",""])),t+s*v[3],e+a),v[3]>0&&(u+=D(St||(St=J(["A ",",",",0,0,",`,
4
4
  `,",",""])),v[3],v[3],c,t,e+a-o*v[3])),u+="Z"}else if(f>0&&n===+n&&n>0){var p=Math.min(f,n);u=D(Et||(Et=J(["M ",",",`
@@ -1 +1 @@
1
- import{r,j as e,i as n}from"./index-BTEnjXeB.js";import{h as l}from"./mcp-oauth-CjpxiFCE.js";import"./auth-BucB9S_O.js";function h(){const[s,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
1
+ import{r,j as e,i as n}from"./index-DS4rAqwY.js";import{h as l}from"./mcp-oauth-BreAtybq.js";import"./auth-DhIYbras.js";function h(){const[s,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
@@ -1 +1 @@
1
- import{r,j as e,i as d}from"./index-BTEnjXeB.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
1
+ import{r,j as e,i as d}from"./index-DS4rAqwY.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
@@ -1 +1 @@
1
- import{c as I,j as t,a as re,i as X,r as O,m as ge,K as pe,d as oe,B as he,l as K,t as ce}from"./index-BTEnjXeB.js";import{R as xe}from"./required-auth-layout-eaMo5p5o.js";import{A as G}from"./auth-split-layout-Cce8G4kK.js";import{O as be}from"./organization-choice-BJiexu5A.js";import{A as me}from"./avatar-CP4OJtb5.js";import{I as je}from"./input-BlfB50CV.js";import{L as ye}from"./label-8th4V92k.js";import{S as ve}from"./switch-BwI9XAn3.js";import{t as Ne,a as Se}from"./Users03-CFkyhLss.js";import{i as we}from"./CheckCircle-BffwGHyY.js";import{t as ze}from"./Globe04-C18idgBe.js";import{a as _e}from"./Palette-FBYCNeRf.js";import{i as Ce}from"./Upload01-BI33CHpm.js";import"./User01-D8Nj4JQV.js";const ke=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&&!ke.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 C;e[33]===Symbol.for("react.memo_cache_sentinel")?(C=Y=>B(A=>new Set(A).add(Y)),e[33]=C):C=e[33];let w;e[34]!==j||e[35]!==a||e[36]!==p?(w=t.jsx(be,{organizations:j,domain:a,requestedSlugs:p,onRequestedSlug:C,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 k;return e[39]!==w||e[40]!==h?(k=t.jsx(G,{children:t.jsxs("div",{className:"grid gap-10",children:[h,w,_]})}),e[39]=w,e[40]=h,e[41]=k):k=e[41],k}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 C;e[20]!==s?(C=se(s.trim()),e[20]=s,e[21]=C):C=e[21];const w=!!C,_=b.error||u.error||null;let k;e[22]!==n||e[23]!==w||e[24]!==u||e[25]!==b||e[26]!==g?(k=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]=k):k=e[27];const Y=k;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(Ce,{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,m as ge,K as pe,d as oe,B as he,l as K,t as ce}from"./index-DS4rAqwY.js";import{R as xe}from"./required-auth-layout-BQBGmnFG.js";import{A as G}from"./auth-split-layout-BX87WBBr.js";import{O as be}from"./organization-choice-CHGhQIiO.js";import{A as me}from"./avatar-DdtddiHF.js";import{I as je}from"./input-D5vcQhoL.js";import{L as ye}from"./label-BgZiPLuQ.js";import{S as ve}from"./switch-tHKnYv4p.js";import{t as Ne,a as Se}from"./Users03-C7mz_KdA.js";import{i as we}from"./CheckCircle-BU9eUffg.js";import{t as ze}from"./Globe04-Byszod1w.js";import{a as _e}from"./Palette-CamQAW-l.js";import{i as Ce}from"./Upload01-BjqchOMa.js";import"./User01-x16Tzx2V.js";const ke=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&&!ke.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 C;e[33]===Symbol.for("react.memo_cache_sentinel")?(C=Y=>B(A=>new Set(A).add(Y)),e[33]=C):C=e[33];let w;e[34]!==j||e[35]!==a||e[36]!==p?(w=t.jsx(be,{organizations:j,domain:a,requestedSlugs:p,onRequestedSlug:C,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 k;return e[39]!==w||e[40]!==h?(k=t.jsx(G,{children:t.jsxs("div",{className:"grid gap-10",children:[h,w,_]})}),e[39]=w,e[40]=h,e[41]=k):k=e[41],k}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 C;e[20]!==s?(C=se(s.trim()),e[20]=s,e[21]=C):C=e[21];const w=!!C,_=b.error||u.error||null;let k;e[22]!==n||e[23]!==w||e[24]!==u||e[25]!==b||e[26]!==g?(k=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]=k):k=e[27];const Y=k;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(Ce,{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 k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-BTEnjXeB.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=k.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]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();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}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=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=C||"/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 g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=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]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(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,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
1
+ import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-DS4rAqwY.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=k.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]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();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}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=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=C||"/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 g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=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]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(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,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
@@ -1 +1 @@
1
- import{c as o,j as r,O as s}from"./index-BTEnjXeB.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-DS4rAqwY.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-BTEnjXeB.js";import{A as U}from"./avatar-CP4OJtb5.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-DS4rAqwY.js";import{A as U}from"./avatar-DdtddiHF.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 I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-BTEnjXeB.js";import{P as T}from"./index-H8crjXWV.js";import{C as V}from"./collection-table-wrapper-CaIMoSV6.js";import{E as $}from"./empty-state-CVK5v1gL.js";import{S as U}from"./search-input-DsMy4zVs.js";import{I as H}from"./input-BlfB50CV.js";import{L as J}from"./label-8th4V92k.js";import{u as W}from"./use-debounced-value-CrO6KrIo.js";import{D as Y,a as G,b as X,c as Z,d as ee,e as te}from"./dialog-DhD-Q2av.js";import{S as se,a as ie,b as ae,c as ne,d as re}from"./select-0sWT_o7d.js";import{a as q}from"./admin-fetch-CCSvjTk1.js";import{f as le}from"./format-time-BnbuEtat.js";import"./sidebar-IXOVwoVQ.js";import"./LayoutLeft-B15XRa9B.js";import"./use-mobile-B3Db4rCS.js";import"./X-y2LzukiV.js";import"./tooltip-DeaWVLXa.js";import"./table-BURDG63q.js";import"./ArrowUp-CrwwuBcG.js";import"./SearchMd-Bfu7I8pi.js";import"./Check-Nv9PNGwO.js";import"./ChevronDown-Ba_vezHC.js";import"./ChevronUp-DIVmA2RS.js";import"./differenceInSeconds-NQ4PDo0z.js";const oe=["owner","admin","user"];function me(t){const e=I.c(49),{org:l}=t,[g,n]=O.useState(!1),[a,p]=O.useState(""),[o,S]=O.useState("user"),x=M();let u;e[0]!==a||e[1]!==l.id||e[2]!==o?(u=()=>q(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:o})}),e[0]=a,e[1]=l.id,e[2]=o,e[3]=u):u=e[3];let m;e[4]!==a||e[5]!==l.name||e[6]!==x?(m=()=>{k.success(`Added ${a.trim()} to ${l.name}`),x.invalidateQueries({queryKey:R.deploymentAdminOrgsList()}),n(!1),p(""),S("user")},e[4]=a,e[5]=l.name,e[6]=x,e[7]=m):m=e[7];let h;e[8]!==u||e[9]!==m?(h={mutationFn:u,onSuccess:m,onError:de},e[8]=u,e[9]=m,e[10]=h):h=e[10];const i=Q(h);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(X,{asChild:!0,children:s.jsx(L,{variant:"outline",size:"sm",children:"Add member"})}),e[11]=b):b=e[11];let r;e[12]!==l.name?(r=s.jsx(Y,{children:s.jsxs(G,{children:["Add member to ",l.name]})}),e[12]=l.name,e[13]=r):r=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(J,{htmlFor:"admin-add-member-email",children:"Email"}),e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=B=>p(B.target.value),e[15]=d):d=e[15];let f;e[16]!==a||e[17]!==i.isPending?(f=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx(H,{id:"admin-add-member-email",type:"email",value:a,onChange:d,placeholder:"user@example.com",disabled:i.isPending})]}),e[16]=a,e[17]=i.isPending,e[18]=f):f=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ie,{className:"w-full",children:s.jsx(ae,{})}),e[19]=j):j=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ne,{children:oe.map(ce)}),e[20]=z):z=e[20];let y;e[21]!==i.isPending||e[22]!==o?(y=s.jsxs(se,{value:o,onValueChange:S,disabled:i.isPending,children:[j,z]}),e[21]=i.isPending,e[22]=o,e[23]=y):y=e[23];let _;e[24]!==y||e[25]!==f?(_=s.jsxs("div",{className:"space-y-4",children:[f,y]}),e[24]=y,e[25]=f,e[26]=_):_=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=()=>n(!1),e[27]=A):A=e[27];let C;e[28]!==i.isPending?(C=s.jsx(L,{variant:"outline",onClick:A,disabled:i.isPending,children:"Cancel"}),e[28]=i.isPending,e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i.mutate(),e[30]=i,e[31]=N):N=e[31];let P;e[32]!==a||e[33]!==i.isPending?(P=!a.trim()||i.isPending,e[32]=a,e[33]=i.isPending,e[34]=P):P=e[34];const F=i.isPending?"Adding...":"Add member";let v;e[35]!==N||e[36]!==P||e[37]!==F?(v=s.jsx(L,{onClick:N,disabled:P,children:F}),e[35]=N,e[36]=P,e[37]=F,e[38]=v):v=e[38];let w;e[39]!==C||e[40]!==v?(w=s.jsxs(Z,{children:[C,v]}),e[39]=C,e[40]=v,e[41]=w):w=e[41];let E;e[42]!==_||e[43]!==w||e[44]!==r?(E=s.jsxs(ee,{className:"sm:max-w-md",children:[r,_,w]}),e[42]=_,e[43]=w,e[44]=r,e[45]=E):E=e[45];let D;return e[46]!==g||e[47]!==E?(D=s.jsxs(te,{open:g,onOpenChange:n,children:[b,E]}),e[46]=g,e[47]=E,e[48]=D):D=e[48],D}function ce(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function de(t){k.error(t instanceof Error?t.message:"Failed to add member")}function qe(){const t=I.c(24),[e,l]=O.useState("");let g;t[0]!==e?(g=e.trim(),t[0]=e,t[1]=g):g=t[1];const n=W(g,300);let a;t[2]!==n?(a=R.deploymentAdminOrgs(n),t[2]=n,t[3]=a):a=t[3];let p;t[4]!==n?(p=()=>{const j=new URLSearchParams({limit:"100"});return n&&j.set("search",n),q(`/api/_admin/orgs?${j}`)},t[4]=n,t[5]=p):p=t[5];let o;t[6]!==a||t[7]!==p?(o={queryKey:a,queryFn:p},t[6]=a,t[7]=p,t[8]=o):o=t[8];const{data:S,isLoading:x,isError:u}=K(o);let m;t[9]!==S?.organizations?(m=S?.organizations??[],t[9]=S?.organizations,t[10]=m):m=t[10];const h=m;let i;t[11]===Symbol.for("react.memo_cache_sentinel")?(i=[{id:"name",header:"Organization",render:ge,cellClassName:"flex-1 min-w-0"},{id:"members",header:"Members",render:pe,cellClassName:"w-24 shrink-0"},{id:"created",header:"Created",render:ue,cellClassName:"w-48 shrink-0"},{id:"actions",header:"",render:fe,cellClassName:"w-32 shrink-0"}],t[11]=i):i=t[11];const b=i;let r;t[12]!==e?(r=s.jsx(U,{value:e,onChange:l,placeholder:"Search organizations by name or slug...",className:"w-full md:w-[375px]"}),t[12]=e,t[13]=r):r=t[13];let c;t[14]!==n||t[15]!==u?(c=u?s.jsx($,{title:"Failed to load organizations",description:"Something went wrong. Refresh to try again."}):s.jsx($,{title:"No organizations found",description:n?`No organizations match "${n}"`:"No organizations exist yet."}),t[14]=n,t[15]=u,t[16]=c):c=t[16];let d;t[17]!==x||t[18]!==h||t[19]!==c?(d=s.jsx(V,{columns:b,data:h,isLoading:x,emptyState:c}),t[17]=x,t[18]=h,t[19]=c,t[20]=d):d=t[20];let f;return t[21]!==r||t[22]!==d?(f=s.jsx(T,{children:s.jsx(T.Content,{children:s.jsx(T.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[r,d]})})})}),t[21]=r,t[22]=d,t[23]=f):f=t[23],f}function fe(t){return s.jsx(me,{org:t})}function ue(t){return s.jsx("span",{className:"text-sm text-foreground",children:le(t.createdAt)})}function pe(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function ge(t){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{qe as default};
1
+ import{c as I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-DS4rAqwY.js";import{P as T}from"./index-rFHHEkal.js";import{C as V}from"./collection-table-wrapper-DcJiU6c1.js";import{E as $}from"./empty-state-YCut0sPg.js";import{S as U}from"./search-input-CIt36tQq.js";import{I as H}from"./input-D5vcQhoL.js";import{L as J}from"./label-BgZiPLuQ.js";import{u as W}from"./use-debounced-value-BdZGbVQ9.js";import{D as Y,a as G,b as X,c as Z,d as ee,e as te}from"./dialog-COLQcCRL.js";import{S as se,a as ie,b as ae,c as ne,d as re}from"./select-32I1U7UG.js";import{a as q}from"./admin-fetch-CCSvjTk1.js";import{f as le}from"./format-time-BnbuEtat.js";import"./sidebar-DOGgTpNK.js";import"./LayoutLeft-BkkLEygy.js";import"./use-mobile-pnR-y4lq.js";import"./X-DqSvIURs.js";import"./tooltip-Cv8zdj9x.js";import"./table-D44fXBcj.js";import"./ArrowUp-BHs6aZEu.js";import"./SearchMd-BBU4Wq1F.js";import"./Check-7WIITMAB.js";import"./ChevronDown-CKvbLNpf.js";import"./ChevronUp-xEk-Hkjn.js";import"./differenceInSeconds-NQ4PDo0z.js";const oe=["owner","admin","user"];function me(t){const e=I.c(49),{org:l}=t,[g,n]=O.useState(!1),[a,p]=O.useState(""),[o,S]=O.useState("user"),x=M();let u;e[0]!==a||e[1]!==l.id||e[2]!==o?(u=()=>q(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:o})}),e[0]=a,e[1]=l.id,e[2]=o,e[3]=u):u=e[3];let m;e[4]!==a||e[5]!==l.name||e[6]!==x?(m=()=>{k.success(`Added ${a.trim()} to ${l.name}`),x.invalidateQueries({queryKey:R.deploymentAdminOrgsList()}),n(!1),p(""),S("user")},e[4]=a,e[5]=l.name,e[6]=x,e[7]=m):m=e[7];let h;e[8]!==u||e[9]!==m?(h={mutationFn:u,onSuccess:m,onError:de},e[8]=u,e[9]=m,e[10]=h):h=e[10];const i=Q(h);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(X,{asChild:!0,children:s.jsx(L,{variant:"outline",size:"sm",children:"Add member"})}),e[11]=b):b=e[11];let r;e[12]!==l.name?(r=s.jsx(Y,{children:s.jsxs(G,{children:["Add member to ",l.name]})}),e[12]=l.name,e[13]=r):r=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(J,{htmlFor:"admin-add-member-email",children:"Email"}),e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=B=>p(B.target.value),e[15]=d):d=e[15];let f;e[16]!==a||e[17]!==i.isPending?(f=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx(H,{id:"admin-add-member-email",type:"email",value:a,onChange:d,placeholder:"user@example.com",disabled:i.isPending})]}),e[16]=a,e[17]=i.isPending,e[18]=f):f=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ie,{className:"w-full",children:s.jsx(ae,{})}),e[19]=j):j=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ne,{children:oe.map(ce)}),e[20]=z):z=e[20];let y;e[21]!==i.isPending||e[22]!==o?(y=s.jsxs(se,{value:o,onValueChange:S,disabled:i.isPending,children:[j,z]}),e[21]=i.isPending,e[22]=o,e[23]=y):y=e[23];let _;e[24]!==y||e[25]!==f?(_=s.jsxs("div",{className:"space-y-4",children:[f,y]}),e[24]=y,e[25]=f,e[26]=_):_=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=()=>n(!1),e[27]=A):A=e[27];let C;e[28]!==i.isPending?(C=s.jsx(L,{variant:"outline",onClick:A,disabled:i.isPending,children:"Cancel"}),e[28]=i.isPending,e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i.mutate(),e[30]=i,e[31]=N):N=e[31];let P;e[32]!==a||e[33]!==i.isPending?(P=!a.trim()||i.isPending,e[32]=a,e[33]=i.isPending,e[34]=P):P=e[34];const F=i.isPending?"Adding...":"Add member";let v;e[35]!==N||e[36]!==P||e[37]!==F?(v=s.jsx(L,{onClick:N,disabled:P,children:F}),e[35]=N,e[36]=P,e[37]=F,e[38]=v):v=e[38];let w;e[39]!==C||e[40]!==v?(w=s.jsxs(Z,{children:[C,v]}),e[39]=C,e[40]=v,e[41]=w):w=e[41];let E;e[42]!==_||e[43]!==w||e[44]!==r?(E=s.jsxs(ee,{className:"sm:max-w-md",children:[r,_,w]}),e[42]=_,e[43]=w,e[44]=r,e[45]=E):E=e[45];let D;return e[46]!==g||e[47]!==E?(D=s.jsxs(te,{open:g,onOpenChange:n,children:[b,E]}),e[46]=g,e[47]=E,e[48]=D):D=e[48],D}function ce(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function de(t){k.error(t instanceof Error?t.message:"Failed to add member")}function qe(){const t=I.c(24),[e,l]=O.useState("");let g;t[0]!==e?(g=e.trim(),t[0]=e,t[1]=g):g=t[1];const n=W(g,300);let a;t[2]!==n?(a=R.deploymentAdminOrgs(n),t[2]=n,t[3]=a):a=t[3];let p;t[4]!==n?(p=()=>{const j=new URLSearchParams({limit:"100"});return n&&j.set("search",n),q(`/api/_admin/orgs?${j}`)},t[4]=n,t[5]=p):p=t[5];let o;t[6]!==a||t[7]!==p?(o={queryKey:a,queryFn:p},t[6]=a,t[7]=p,t[8]=o):o=t[8];const{data:S,isLoading:x,isError:u}=K(o);let m;t[9]!==S?.organizations?(m=S?.organizations??[],t[9]=S?.organizations,t[10]=m):m=t[10];const h=m;let i;t[11]===Symbol.for("react.memo_cache_sentinel")?(i=[{id:"name",header:"Organization",render:ge,cellClassName:"flex-1 min-w-0"},{id:"members",header:"Members",render:pe,cellClassName:"w-24 shrink-0"},{id:"created",header:"Created",render:ue,cellClassName:"w-48 shrink-0"},{id:"actions",header:"",render:fe,cellClassName:"w-32 shrink-0"}],t[11]=i):i=t[11];const b=i;let r;t[12]!==e?(r=s.jsx(U,{value:e,onChange:l,placeholder:"Search organizations by name or slug...",className:"w-full md:w-[375px]"}),t[12]=e,t[13]=r):r=t[13];let c;t[14]!==n||t[15]!==u?(c=u?s.jsx($,{title:"Failed to load organizations",description:"Something went wrong. Refresh to try again."}):s.jsx($,{title:"No organizations found",description:n?`No organizations match "${n}"`:"No organizations exist yet."}),t[14]=n,t[15]=u,t[16]=c):c=t[16];let d;t[17]!==x||t[18]!==h||t[19]!==c?(d=s.jsx(V,{columns:b,data:h,isLoading:x,emptyState:c}),t[17]=x,t[18]=h,t[19]=c,t[20]=d):d=t[20];let f;return t[21]!==r||t[22]!==d?(f=s.jsx(T,{children:s.jsx(T.Content,{children:s.jsx(T.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[r,d]})})})}),t[21]=r,t[22]=d,t[23]=f):f=t[23],f}function fe(t){return s.jsx(me,{org:t})}function ue(t){return s.jsx("span",{className:"text-sm text-foreground",children:le(t.createdAt)})}function pe(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function ge(t){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{qe as default};
@@ -1 +1 @@
1
- import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-BTEnjXeB.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-B5Ms8AP4.js";import{L as Y}from"./label-8th4V92k.js";import{S as $}from"./switch-BwI9XAn3.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-0sWT_o7d.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 Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(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(Ee(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=je(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=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},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=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}: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 j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&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})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(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 j=me(s);p(j),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 j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;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,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
1
+ import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-DS4rAqwY.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-CNAmaCH3.js";import{L as Y}from"./label-BgZiPLuQ.js";import{S as $}from"./switch-tHKnYv4p.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-32I1U7UG.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 Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(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(Ee(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=je(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=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},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=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}: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 j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&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})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(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 j=me(s);p(j),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 j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;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,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
@@ -0,0 +1 @@
1
+ import{c as it,r as E,j as e,i as rt}from"./index-DS4rAqwY.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-DOGgTpNK.js";import{A as nt}from"./automation-runs-DHcUjECQ.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-BLTJtOti.js";import{r as xt}from"./index-CNAmaCH3.js";import"./LayoutLeft-BkkLEygy.js";import"./use-mobile-pnR-y4lq.js";import"./X-DqSvIURs.js";import"./tooltip-Cv8zdj9x.js";import"./select-32I1U7UG.js";import"./Check-7WIITMAB.js";import"./ChevronDown-CKvbLNpf.js";import"./ChevronUp-xEk-Hkjn.js";import"./useInfiniteQuery-BJ3vgi17.js";import"./use-infinite-scroll-BVSdrRwU.js";import"./use-connection-BuP1AL_I.js";import"./use-collections-Bbw94V3E.js";import"./use-mcp-client-ChtUpBEU.js";import"./constants-D_FQAPnt.js";import"./auth-DhIYbras.js";import"./use-virtual-mcp-DoUDWQYW.js";import"./card-DpjecHY2.js";import"./table-D44fXBcj.js";import"./empty-state-YCut0sPg.js";import"./use-members-Cgw9sNN9.js";import"./use-org-auth-client-DwYtejPT.js";import"./use-clock-tick-_v1mau-X.js";import"./AlertCircle-BspordpX.js";import"./CheckCircle-BU9eUffg.js";import"./Circle-B-1p1V3u.js";import"./agent-icon-BMlO9g3f.js";import"./UserPlus01-Uz6S8Fjb.js";import"./Tool01-BMNmn1yF.js";import"./ArrowUp-BHs6aZEu.js";import"./Settings02-BIYEvLxH.js";import"./Tool02-DGufqHHa.js";import"./XCircle-BsaSEJdP.js";import"./ArrowUpRight-DWb0SHAh.js";import"./TrendUp01-yN4PrbN-.js";import"./ZapSquare-BA0p6n38.js";import"./Users03-C7mz_KdA.js";import"./ChevronRight-C-jwMI0x.js";import"./Stars02-6rBUSWRT.js";import"./Copy01-j7g0HzRj.js";import"./ZoomOut-CrgIEWZv.js";import"./DotsVertical-D_WbX0qI.js";import"./Globe01-D8OVqcVm.js";import"./Eye-Qig4q8vO.js";import"./FilterLines-Clx9vkNd.js";import"./Flag01-D-v8b8WA.js";import"./Star01-7lVQxn6j.js";import"./Globe04-Byszod1w.js";import"./SwitchHorizontal01-DonuDjWr.js";import"./HardDrive-uNiSvuE5.js";import"./Key01-DCLaxXrN.js";import"./LinkExternal01-D0e_JnBB.js";import"./List-DBle1pOm.js";import"./Monitor01-C68LgEUD.js";import"./Sun-Xo-4W0GL.js";import"./Package-ArC6w3gk.js";import"./Palette-CamQAW-l.js";import"./Play-Bo_FQ_Qt.js";import"./Plus-BEhknaRt.js";import"./SearchLg-CkHW6FGX.js";import"./SearchMd-BBU4Wq1F.js";import"./Shield01-CaKclxlZ.js";import"./Stars01-DoPAiLfG.js";import"./Trash01-DfkqWioB.js";import"./Upload01-BjqchOMa.js";import"./User01-x16Tzx2V.js";import"./Users01-CpqV9dUM.js";import"./XClose-BfUy7_Ni.js";import"./Zap-28TFXy2W.js";import"./use-automations-DfJYP9gI.js";import"./studio-tools-Brn4N5_U.js";import"./useSuspenseInfiniteQuery-CWXAI4ws.js";import"./badge-JS3YhMut.js";import"./checkbox-CblPd3Hc.js";import"./command-BN9Ept_A.js";import"./index-KdwK_bqc.js";import"./dialog-COLQcCRL.js";import"./popover-DquVr-be.js";import"./avatar-DdtddiHF.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DasuS9o3.js";import"./file-type-icon-OzS8T0u4.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-DchAWwXC.js";import"./index-D1C9TQ71.js";import"./chat-context-D0zCFK1M.js";import"./autosend-CZLKJkBV.js";import"./hooks-BjdnAe-L.js";import"./decopilot-sse-pool-uJsbj6wS.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-My0L_zE8.js";import"./use-decopilot-events-C2YASEpX.js";import"./use-organization-settings-DDlWJKkK.js";import"./index-B5ks997m.js";import"./shell-layout-C1ZgPk96.js";import"./alert-dialog-Dtszn4Rp.js";import"./required-auth-layout-BQBGmnFG.js";import"./use-org-sso-D1GLkTq3.js";import"./integration-icon-BhHODF-u.js";import"./use-navigate-to-agent-Chl5nrt3.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-4kMJmgm4.js";import"./form-BMLTyaPP.js";import"./label-BgZiPLuQ.js";import"./input-D5vcQhoL.js";import"./switch-tHKnYv4p.js";import"./drawer-HTdc4YL3.js";import"./collection-search-Dvs-LkIv.js";import"./tabs-B-tjXtUz.js";import"./toggle-group-C-P2ViEb.js";import"./use-deco-credits-DUNDu3Fq.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Dduj2bdE.js";import"./use-registry-connections-Dq9PwH8s.js";import"./extract-connection-data-B8RjJlbH.js";import"./collection-tabs-CTEKQT9e.js";import"./textarea-DaaHcv5N.js";import"./connection-form-helpers-DKpPvDSN.js";import"./authenticate-and-persist-oauth-ChFnJYYv.js";import"./mcp-oauth-BreAtybq.js";import"./connect-desktop-dialog-DKrDKa4d.js";import"./select-model-BQOHE3MV.js";import"./skeleton-DoBiZEib.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C2j2B0zZ.js";import"./dropdown-menu-DHMJS27m.js";import"./index-BcIFnd0f.js";import"./toolbar-CZ_rtBa9.js";import"./use-debounced-value-BdZGbVQ9.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Ce8ydwkp.js";import"./use-mcp-tools-z_64KPxo.js";import"./use-capability-CrdOeLT6.js";import"./tools-list-COQ-a9jF.js";import"./use-debounced-autosave-VGWMIg0D.js";import"./index-rFHHEkal.js";import"./search-input-CIt36tQq.js";import"./github-repo-picker-uyxKPI6q.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-DPnFGuFl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-CW4X_eqm.js";import"./index-DdJw1Zxw.js";import"./get-initials-D-f_fDFw.js";import"./calendar-2DG8dvZM.js";import"./toolbar-icon-button-Ba0OmFet.js";import"./use-file-configs-DOV5LRzD.js";import"./automation-list-row-CWjgUckd.js";function ui(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 A=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 M=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 V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,B=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 H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,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]!==$||t[22]!==H||t[23]!==A||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):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:A,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=A,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,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]!==V||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,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{ui as SeoSheet};
@@ -1 +1 @@
1
- import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-BTEnjXeB.js";var C="Popover",[b]=V(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var S="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});X.displayName=S;var F="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),a=A(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(j,{asChild:!0,...s,children:p})});y.displayName=F;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;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(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=K("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(U,{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 W(),c.jsx(Q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Y,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"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(q,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,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=B("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{ve as P,ge as a,fe as b};
1
+ import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-DS4rAqwY.js";var C="Popover",[b]=V(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var S="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});X.displayName=S;var F="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),a=A(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(j,{asChild:!0,...s,children:p})});y.displayName=F;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;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(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=K("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(U,{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 W(),c.jsx(Q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Y,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"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(q,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,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=B("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{ve as P,ge as a,fe as b};
@@ -1 +1 @@
1
- import{c as H,j as t,B as Z}from"./index-BTEnjXeB.js";import{n as ee}from"./LinkExternal01-Cd9TaF6v.js";import{aC as te,g as ie}from"./agent-icon-CwXpVSpl.js";import{I as J}from"./input-BlfB50CV.js";import{L as G}from"./label-8th4V92k.js";import{a1 as oe}from"./automation-runs-DqXXyJ8H.js";import{b as Q,c as se,T as W,a as re}from"./tabs-CH219Ai8.js";import{T as le}from"./textarea-DO7tbmcn.js";import{v as ae,w as me,o as pe,x as ne,y as ce,I as de,z as fe,A as ue,B as xe}from"./index-B5Ms8AP4.js";import{b as he,a as ge,B as ve}from"./block-document-CZFbi1I3.js";import{u as je}from"./use-autosave-BjhWee_F.js";import{s as E,E as be,R as ye,A as Ce}from"./primitives-keSGKrFC.js";import"./AlertCircle-fBv7OfBi.js";import"./UserPlus01-BMDPA4ef.js";import"./Tool01-DkvexHAX.js";import"./ArrowUp-CrwwuBcG.js";import"./Settings02-ettxEKNi.js";import"./Tool02-DQKbBHGt.js";import"./XCircle-BRFrDiaB.js";import"./ArrowUpRight-DQ75oRBs.js";import"./TrendUp01-BJdYD-xu.js";import"./ZapSquare-kqRpfrno.js";import"./Users03-CFkyhLss.js";import"./CheckCircle-BffwGHyY.js";import"./Check-Nv9PNGwO.js";import"./ChevronDown-Ba_vezHC.js";import"./ChevronRight-BHrDwMLM.js";import"./ChevronUp-DIVmA2RS.js";import"./Circle-3s3JL9SD.js";import"./Stars02-sx-RKCd3.js";import"./Copy01-B6QQJb1b.js";import"./ZoomOut-BFspvVZz.js";import"./DotsVertical-D9IO-Hed.js";import"./Globe01-DdAizw-q.js";import"./Eye-BBCNeB9q.js";import"./FilterLines-Dt-V4cWP.js";import"./Flag01-CBX2ZETT.js";import"./Star01-Csv-6tOx.js";import"./Globe04-C18idgBe.js";import"./SwitchHorizontal01-PKvsqBYk.js";import"./HardDrive-DyazGlyp.js";import"./Key01-BNGoY_cw.js";import"./LayoutLeft-B15XRa9B.js";import"./List-BgjU7rAZ.js";import"./Monitor01-CDtvUeeQ.js";import"./Sun-D8OpooPG.js";import"./Package-Gdxl9HoE.js";import"./Palette-FBYCNeRf.js";import"./Play-DLISmTm9.js";import"./Plus-BYL5bo1C.js";import"./SearchLg-Cx1PBT6A.js";import"./SearchMd-Bfu7I8pi.js";import"./Shield01-DoAW_P3h.js";import"./Stars01-C8JIWSkL.js";import"./Trash01-CCF-zJqZ.js";import"./Upload01-BI33CHpm.js";import"./User01-D8Nj4JQV.js";import"./Users01-DAKuiIpW.js";import"./XClose-Cqj1GRp5.js";import"./X-y2LzukiV.js";import"./Zap-Db2_moCh.js";import"./select-0sWT_o7d.js";import"./tooltip-DeaWVLXa.js";import"./useInfiniteQuery-BtGysKJX.js";import"./use-infinite-scroll--z6jHQoF.js";import"./use-connection-BiU6dOIx.js";import"./use-collections-DWpIHeao.js";import"./use-mcp-client-BcK_4Y94.js";import"./constants-D_FQAPnt.js";import"./auth-BucB9S_O.js";import"./use-virtual-mcp-DzIPI87p.js";import"./card-DbggqOWv.js";import"./sidebar-IXOVwoVQ.js";import"./use-mobile-B3Db4rCS.js";import"./table-BURDG63q.js";import"./empty-state-CVK5v1gL.js";import"./use-members-h79WpLjb.js";import"./use-org-auth-client-vZ2CKv_C.js";import"./use-clock-tick-BVlgXm-y.js";import"./use-automations-UNvkH02s.js";import"./studio-tools-BPc-jQ-b.js";import"./useSuspenseInfiniteQuery-CfwPCYIG.js";import"./badge-B4PjFR9w.js";import"./checkbox-CjfLURkI.js";import"./command-DsLtfLi9.js";import"./index-DORG9dP6.js";import"./dialog-DhD-Q2av.js";import"./popover-B0R2Dzsv.js";import"./avatar-CP4OJtb5.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-p19gYB9e.js";import"./file-type-icon-BSOZ-x-l.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-C4k9TCql.js";import"./index-CGvQPw4w.js";import"./chat-context-BSfnfXx3.js";import"./autosend-BuCf6Eh3.js";import"./hooks-Chr_Iknn.js";import"./decopilot-sse-pool-fmrV8Ad4.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-CVjFUS9Q.js";import"./use-decopilot-events-e23bOcJL.js";import"./use-organization-settings-Vmhd1qap.js";import"./index-CJpMb0TW.js";import"./shell-layout-CXh8M0i5.js";import"./alert-dialog-BDFyhJ06.js";import"./required-auth-layout-eaMo5p5o.js";import"./use-org-sso-VeLsEvsJ.js";import"./integration-icon-B3cD8Ssc.js";import"./use-navigate-to-agent-Dq6E0vZQ.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-Dnv0q9py.js";import"./form-D-BruI7g.js";import"./drawer-BqgKrTOR.js";import"./collection-search-C-ov7rRo.js";import"./toggle-group-Dp4tpQyw.js";import"./use-deco-credits-BhKZc6oF.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BzeuUn3c.js";import"./use-registry-connections-CTWzawX9.js";import"./extract-connection-data-z4lzSG99.js";import"./collection-tabs-D9rDn4fn.js";import"./connection-form-helpers-YN6YNLU8.js";import"./authenticate-and-persist-oauth-BcoDsme1.js";import"./mcp-oauth-CjpxiFCE.js";import"./connect-desktop-dialog-DFFYu4Bs.js";import"./select-model-4BLPhZO5.js";import"./skeleton-BZZUxTVe.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DuBZtqHt.js";import"./dropdown-menu-CPr_PO8n.js";import"./index-A3XDpS-x.js";import"./toolbar-DRWoyo87.js";import"./use-debounced-value-CrO6KrIo.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DwLhGovC.js";import"./use-mcp-tools-DVcI7_1i.js";import"./use-capability-B_O60mAV.js";import"./tools-list-DlpGS7bO.js";import"./switch-BwI9XAn3.js";import"./use-debounced-autosave-DjZzH3Sy.js";import"./index-H8crjXWV.js";import"./search-input-DsMy4zVs.js";import"./github-repo-picker-CdTvfx4Y.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-duurnM9-.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-DBODHTvD.js";import"./index-Cbmhxlpy.js";import"./get-initials-D-f_fDFw.js";import"./calendar-CXSmv6Ca.js";import"./toolbar-icon-button-DrwCjSpQ.js";import"./use-file-configs-D1bENBGE.js";import"./automation-list-row-BNKeVeHY.js";function ke(g){return Array.isArray(g)?g.map(e=>({key:E(e?.key),value:E(e?.value)})):[]}function ko(g){const e=H.c(66),{orgSlug:o,virtualMcpId:m,branch:i,blockKey:f,block:a,decofile:l,meta:c,previewBaseUrl:h}=g;let x;e[0]!==i||e[1]!==o||e[2]!==m?(x={orgSlug:o,virtualMcpId:m,branch:i},e[0]=i,e[1]=o,e[2]=m,e[3]=x):x=e[3];const r=ae(x);let p;e[4]!==a?(p=me(a,"posts"),e[4]=a,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==r?(n=F=>{r.mutate({blockKey:f,data:ne(f,"posts",ce(F))})},e[6]=f,e[7]=r,e[8]=n):n=e[8];const[s,N]=je(d,n);let S;e[9]!==s||e[10]!==N?(S=(F,Y)=>N({...s,[F]:Y}),e[9]=s,e[10]=N,e[11]=S):S=e[11];const v=S;let w;e[12]!==l||e[13]!==s||e[14]!==h?(w=he({decofile:l,post:s,previewBaseUrl:h}),e[12]=l,e[13]=s,e[14]=h,e[15]=w):w=e[15];const j=w;let b;e[16]!==s.title?(b=E(s.title)||"Untitled post",e[16]=s.title,e[17]=b):b=e[17];let y;e[18]!==b?(y=t.jsx("span",{className:"truncate text-sm font-medium",children:b}),e[18]=b,e[19]=y):y=e[19];let C;e[20]!==r.isError||e[21]!==r.isPending?(C=t.jsx(pe,{isPending:r.isPending,isError:r.isError}),e[20]=r.isError,e[21]=r.isPending,e[22]=C):C=e[22];const P=!j,_=j?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let k;e[23]!==j?(k=()=>{j&&window.open(j,"_blank","noopener,noreferrer")},e[23]=j,e[24]=k):k=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 u;e[26]!==_||e[27]!==k||e[28]!==P?(u=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:P,title:_,onClick:k,children:[B,"See preview"]}),e[26]=_,e[27]=k,e[28]=P,e[29]=u):u=e[29];let T;e[30]!==u||e[31]!==C?(T=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[C,u]}),e[30]=u,e[31]=C,e[32]=T):T=e[32];let R;e[33]!==T||e[34]!==y?(R=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[y,T]}),e[33]=T,e[34]=y,e[35]=R):R=e[35];let A;e[36]!==s.title?(A=E(s.title),e[36]=s.title,e[37]=A):A=e[37];let L;e[38]!==v?(L=F=>v("title",F),e[38]=v,e[39]=L):L=e[39];let I;e[40]!==A||e[41]!==L?(I=t.jsx(be,{value:A,onChange:L,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=A,e[41]=L,e[42]=I):I=e[42];let K;e[43]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=K):K=e[43];let O;e[44]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(se,{children:[K,t.jsxs(Q,{value:"settings",children:[t.jsx(ie,{}),"Settings"]})]}),e[44]=O):O=e[44];let U;e[45]!==s.sections?(U=ge(s.sections),e[45]=s.sections,e[46]=U):U=e[46];let V;e[47]!==v?(V=F=>v("sections",F),e[47]=v,e[48]=V):V=e[48];let $;e[49]!==c||e[50]!==U||e[51]!==V?($=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(ve,{value:U,onChange:V,meta:c,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=c,e[50]=U,e[51]=V,e[52]=$):$=e[52];let M;e[53]!==l||e[54]!==s||e[55]!==v?(M=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ne,{post:s,decofile:l,onChange:v})})}),e[53]=l,e[54]=s,e[55]=v,e[56]=M):M=e[56];let z;e[57]!==$||e[58]!==M?(z=t.jsxs(re,{defaultValue:"content",className:"mt-6 gap-4",children:[O,$,M]}),e[57]=$,e[58]=M,e[59]=z):z=e[59];let D;e[60]!==I||e[61]!==z?(D=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:[I,z]})}),e[60]=I,e[61]=z,e[62]=D):D=e[62];let q;return e[63]!==R||e[64]!==D?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[R,D]}),e[63]=R,e[64]=D,e[65]=q):q=e[65],q}function Ne(g){const e=H.c(57),{post:o,decofile:m,onChange:i}=g;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let a;e[1]!==o.excerpt?(a=E(o.excerpt),e[1]=o.excerpt,e[2]=a):a=e[2];let l;e[3]!==i?(l=u=>i("excerpt",u.target.value),e[3]=i,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(le,{id:"post-excerpt",value:a,onChange:l,rows:2})]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==o.slug?(x=E(o.slug),e[9]=o.slug,e[10]=x):x=e[10];let r;e[11]!==i?(r=u=>i("slug",u.target.value),e[11]=i,e[12]=r):r=e[12];let p;e[13]!==x||e[14]!==r?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(J,{id:"post-slug",value:x,onChange:r,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=r,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==o.date?(n=E(o.date),e[17]=o.date,e[18]=n):n=e[18];let s;e[19]!==i?(s=u=>i("date",u),e[19]=i,e[20]=s):s=e[20];let N;e[21]!==n||e[22]!==s?(N=t.jsx(xe,{schema:d,value:n,onChange:s,path:"post-date",label:"Date"}),e[21]=n,e[22]=s,e[23]=N):N=e[23];let S;e[24]!==N||e[25]!==p?(S=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=S):S=e[26];let v;e[27]===Symbol.for("react.memo_cache_sentinel")?(v={type:"string",format:"image-uri",title:"Cover image"},e[27]=v):v=e[27];let w;e[28]!==i?(w=u=>i("image",u),e[28]=i,e[29]=w):w=e[29];let j;e[30]!==o.image||e[31]!==w?(j=t.jsx(de,{schema:v,value:o.image,onChange:w,path:"post-image",label:"Cover image"}),e[30]=o.image,e[31]=w,e[32]=j):j=e[32];let b;e[33]!==i?(b=u=>i("authors",u),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==m||e[36]!==o.authors||e[37]!==b?(y=t.jsx(X,{label:"Authors",decofile:m,kind:"authors",valueField:"email",toRef:we,selected:o.authors,onChange:b}),e[35]=m,e[36]=o.authors,e[37]=b,e[38]=y):y=e[38];let C;e[39]!==i?(C=u=>i("categories",u),e[39]=i,e[40]=C):C=e[40];let P;e[41]!==m||e[42]!==o.categories||e[43]!==C?(P=t.jsx(X,{label:"Categories",decofile:m,kind:"categories",valueField:"slug",toRef:Se,selected:o.categories,onChange:C}),e[41]=m,e[42]=o.categories,e[43]=C,e[44]=P):P=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let k;e[47]!==o.extraProps||e[48]!==_?(k=t.jsx(Pe,{value:o.extraProps,onChange:_}),e[47]=o.extraProps,e[48]=_,e[49]=k):k=e[49];let B;return e[50]!==S||e[51]!==j||e[52]!==y||e[53]!==P||e[54]!==k||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,S,j,y,P,k]}),e[50]=S,e[51]=j,e[52]=y,e[53]=P,e[54]=k,e[55]=c,e[56]=B):B=e[56],B}function Se(g){return{name:E(g.name),slug:E(g.slug)}}function we(g){return{...g}}function Pe(g){const e=H.c(15),{value:o,onChange:m}=g;let i,f,a,l;if(e[0]!==m||e[1]!==o){i=ke(o);const x=(r,p)=>m(i.map((d,n)=>n===r?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{children:"Extra props"}),e[6]=a):a=e[6],l=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((r,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:r.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:r.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>m(i.filter((d,n)=>n!==p))})]},p))}),e[0]=m,e[1]=o,e[2]=i,e[3]=f,e[4]=a,e[5]=l}else i=e[2],f=e[3],a=e[4],l=e[5];let c;e[7]!==i||e[8]!==m?(c=t.jsx(Ce,{label:"Add prop",onClick:()=>m([...i,{key:"",value:""}])}),e[7]=i,e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==a||e[12]!==l||e[13]!==c?(h=t.jsxs("div",{className:f,children:[a,l,c]}),e[10]=f,e[11]=a,e[12]=l,e[13]=c,e[14]=h):h=e[14],h}function X(g){const e=H.c(17),{label:o,decofile:m,kind:i,valueField:f,toRef:a,selected:l,onChange:c}=g;let h;e[0]!==m||e[1]!==i||e[2]!==l||e[3]!==a||e[4]!==f?(h=fe({records:ue(m,i),selected:l,valueField:f,toRef:a}),e[0]=m,e[1]=i,e[2]=l,e[3]=a,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:r,refsForValues:p}=h;let d;e[6]!==o?(d=t.jsx(G,{children:o}),e[6]=o,e[7]=d):d=e[7];let n;e[8]!==o||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==r?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",o.toLowerCase()," yet — create some in the"," ",o.toLowerCase()," collection."]}):t.jsx(oe,{options:x,defaultValue:r,onValueChange:N=>c(p(N)),placeholder:`Select ${o.toLowerCase()}`,maxCount:4}),e[8]=o,e[9]=c,e[10]=x,e[11]=p,e[12]=r,e[13]=n):n=e[13];let s;return e[14]!==d||e[15]!==n?(s=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=s):s=e[16],s}export{ko as PostEditor};
1
+ import{c as H,j as t,B as Z}from"./index-DS4rAqwY.js";import{n as ee}from"./LinkExternal01-D0e_JnBB.js";import{aC as te,g as ie}from"./agent-icon-BMlO9g3f.js";import{I as J}from"./input-D5vcQhoL.js";import{L as G}from"./label-BgZiPLuQ.js";import{a1 as oe}from"./automation-runs-DHcUjECQ.js";import{b as Q,c as se,T as W,a as re}from"./tabs-B-tjXtUz.js";import{T as le}from"./textarea-DaaHcv5N.js";import{v as ae,w as me,o as pe,x as ne,y as ce,I as de,z as fe,A as ue,B as xe}from"./index-CNAmaCH3.js";import{b as he,a as ge,B as ve}from"./block-document-C7RgqHof.js";import{u as je}from"./use-autosave-Xs2HOuwf.js";import{s as E,E as be,R as ye,A as Ce}from"./primitives-BHkbxz43.js";import"./AlertCircle-BspordpX.js";import"./UserPlus01-Uz6S8Fjb.js";import"./Tool01-BMNmn1yF.js";import"./ArrowUp-BHs6aZEu.js";import"./Settings02-BIYEvLxH.js";import"./Tool02-DGufqHHa.js";import"./XCircle-BsaSEJdP.js";import"./ArrowUpRight-DWb0SHAh.js";import"./TrendUp01-yN4PrbN-.js";import"./ZapSquare-BA0p6n38.js";import"./Users03-C7mz_KdA.js";import"./CheckCircle-BU9eUffg.js";import"./Check-7WIITMAB.js";import"./ChevronDown-CKvbLNpf.js";import"./ChevronRight-C-jwMI0x.js";import"./ChevronUp-xEk-Hkjn.js";import"./Circle-B-1p1V3u.js";import"./Stars02-6rBUSWRT.js";import"./Copy01-j7g0HzRj.js";import"./ZoomOut-CrgIEWZv.js";import"./DotsVertical-D_WbX0qI.js";import"./Globe01-D8OVqcVm.js";import"./Eye-Qig4q8vO.js";import"./FilterLines-Clx9vkNd.js";import"./Flag01-D-v8b8WA.js";import"./Star01-7lVQxn6j.js";import"./Globe04-Byszod1w.js";import"./SwitchHorizontal01-DonuDjWr.js";import"./HardDrive-uNiSvuE5.js";import"./Key01-DCLaxXrN.js";import"./LayoutLeft-BkkLEygy.js";import"./List-DBle1pOm.js";import"./Monitor01-C68LgEUD.js";import"./Sun-Xo-4W0GL.js";import"./Package-ArC6w3gk.js";import"./Palette-CamQAW-l.js";import"./Play-Bo_FQ_Qt.js";import"./Plus-BEhknaRt.js";import"./SearchLg-CkHW6FGX.js";import"./SearchMd-BBU4Wq1F.js";import"./Shield01-CaKclxlZ.js";import"./Stars01-DoPAiLfG.js";import"./Trash01-DfkqWioB.js";import"./Upload01-BjqchOMa.js";import"./User01-x16Tzx2V.js";import"./Users01-CpqV9dUM.js";import"./XClose-BfUy7_Ni.js";import"./X-DqSvIURs.js";import"./Zap-28TFXy2W.js";import"./select-32I1U7UG.js";import"./tooltip-Cv8zdj9x.js";import"./useInfiniteQuery-BJ3vgi17.js";import"./use-infinite-scroll-BVSdrRwU.js";import"./use-connection-BuP1AL_I.js";import"./use-collections-Bbw94V3E.js";import"./use-mcp-client-ChtUpBEU.js";import"./constants-D_FQAPnt.js";import"./auth-DhIYbras.js";import"./use-virtual-mcp-DoUDWQYW.js";import"./card-DpjecHY2.js";import"./sidebar-DOGgTpNK.js";import"./use-mobile-pnR-y4lq.js";import"./table-D44fXBcj.js";import"./empty-state-YCut0sPg.js";import"./use-members-Cgw9sNN9.js";import"./use-org-auth-client-DwYtejPT.js";import"./use-clock-tick-_v1mau-X.js";import"./use-automations-DfJYP9gI.js";import"./studio-tools-Brn4N5_U.js";import"./useSuspenseInfiniteQuery-CWXAI4ws.js";import"./badge-JS3YhMut.js";import"./checkbox-CblPd3Hc.js";import"./command-BN9Ept_A.js";import"./index-KdwK_bqc.js";import"./dialog-COLQcCRL.js";import"./popover-DquVr-be.js";import"./avatar-DdtddiHF.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DasuS9o3.js";import"./file-type-icon-OzS8T0u4.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-DchAWwXC.js";import"./index-D1C9TQ71.js";import"./chat-context-D0zCFK1M.js";import"./autosend-CZLKJkBV.js";import"./hooks-BjdnAe-L.js";import"./decopilot-sse-pool-uJsbj6wS.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-My0L_zE8.js";import"./use-decopilot-events-C2YASEpX.js";import"./use-organization-settings-DDlWJKkK.js";import"./index-B5ks997m.js";import"./shell-layout-C1ZgPk96.js";import"./alert-dialog-Dtszn4Rp.js";import"./required-auth-layout-BQBGmnFG.js";import"./use-org-sso-D1GLkTq3.js";import"./integration-icon-BhHODF-u.js";import"./use-navigate-to-agent-Chl5nrt3.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-4kMJmgm4.js";import"./form-BMLTyaPP.js";import"./drawer-HTdc4YL3.js";import"./collection-search-Dvs-LkIv.js";import"./toggle-group-C-P2ViEb.js";import"./use-deco-credits-DUNDu3Fq.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Dduj2bdE.js";import"./use-registry-connections-Dq9PwH8s.js";import"./extract-connection-data-B8RjJlbH.js";import"./collection-tabs-CTEKQT9e.js";import"./connection-form-helpers-DKpPvDSN.js";import"./authenticate-and-persist-oauth-ChFnJYYv.js";import"./mcp-oauth-BreAtybq.js";import"./connect-desktop-dialog-DKrDKa4d.js";import"./select-model-BQOHE3MV.js";import"./skeleton-DoBiZEib.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C2j2B0zZ.js";import"./dropdown-menu-DHMJS27m.js";import"./index-BcIFnd0f.js";import"./toolbar-CZ_rtBa9.js";import"./use-debounced-value-BdZGbVQ9.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Ce8ydwkp.js";import"./use-mcp-tools-z_64KPxo.js";import"./use-capability-CrdOeLT6.js";import"./tools-list-COQ-a9jF.js";import"./switch-tHKnYv4p.js";import"./use-debounced-autosave-VGWMIg0D.js";import"./index-rFHHEkal.js";import"./search-input-CIt36tQq.js";import"./github-repo-picker-uyxKPI6q.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-DPnFGuFl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-CW4X_eqm.js";import"./index-DdJw1Zxw.js";import"./get-initials-D-f_fDFw.js";import"./calendar-2DG8dvZM.js";import"./toolbar-icon-button-Ba0OmFet.js";import"./use-file-configs-DOV5LRzD.js";import"./automation-list-row-CWjgUckd.js";function ke(g){return Array.isArray(g)?g.map(e=>({key:E(e?.key),value:E(e?.value)})):[]}function ko(g){const e=H.c(66),{orgSlug:o,virtualMcpId:m,branch:i,blockKey:f,block:a,decofile:l,meta:c,previewBaseUrl:h}=g;let x;e[0]!==i||e[1]!==o||e[2]!==m?(x={orgSlug:o,virtualMcpId:m,branch:i},e[0]=i,e[1]=o,e[2]=m,e[3]=x):x=e[3];const r=ae(x);let p;e[4]!==a?(p=me(a,"posts"),e[4]=a,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==r?(n=F=>{r.mutate({blockKey:f,data:ne(f,"posts",ce(F))})},e[6]=f,e[7]=r,e[8]=n):n=e[8];const[s,N]=je(d,n);let S;e[9]!==s||e[10]!==N?(S=(F,Y)=>N({...s,[F]:Y}),e[9]=s,e[10]=N,e[11]=S):S=e[11];const v=S;let w;e[12]!==l||e[13]!==s||e[14]!==h?(w=he({decofile:l,post:s,previewBaseUrl:h}),e[12]=l,e[13]=s,e[14]=h,e[15]=w):w=e[15];const j=w;let b;e[16]!==s.title?(b=E(s.title)||"Untitled post",e[16]=s.title,e[17]=b):b=e[17];let y;e[18]!==b?(y=t.jsx("span",{className:"truncate text-sm font-medium",children:b}),e[18]=b,e[19]=y):y=e[19];let C;e[20]!==r.isError||e[21]!==r.isPending?(C=t.jsx(pe,{isPending:r.isPending,isError:r.isError}),e[20]=r.isError,e[21]=r.isPending,e[22]=C):C=e[22];const P=!j,_=j?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let k;e[23]!==j?(k=()=>{j&&window.open(j,"_blank","noopener,noreferrer")},e[23]=j,e[24]=k):k=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 u;e[26]!==_||e[27]!==k||e[28]!==P?(u=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:P,title:_,onClick:k,children:[B,"See preview"]}),e[26]=_,e[27]=k,e[28]=P,e[29]=u):u=e[29];let T;e[30]!==u||e[31]!==C?(T=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[C,u]}),e[30]=u,e[31]=C,e[32]=T):T=e[32];let R;e[33]!==T||e[34]!==y?(R=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[y,T]}),e[33]=T,e[34]=y,e[35]=R):R=e[35];let A;e[36]!==s.title?(A=E(s.title),e[36]=s.title,e[37]=A):A=e[37];let L;e[38]!==v?(L=F=>v("title",F),e[38]=v,e[39]=L):L=e[39];let I;e[40]!==A||e[41]!==L?(I=t.jsx(be,{value:A,onChange:L,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=A,e[41]=L,e[42]=I):I=e[42];let K;e[43]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=K):K=e[43];let O;e[44]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(se,{children:[K,t.jsxs(Q,{value:"settings",children:[t.jsx(ie,{}),"Settings"]})]}),e[44]=O):O=e[44];let U;e[45]!==s.sections?(U=ge(s.sections),e[45]=s.sections,e[46]=U):U=e[46];let V;e[47]!==v?(V=F=>v("sections",F),e[47]=v,e[48]=V):V=e[48];let $;e[49]!==c||e[50]!==U||e[51]!==V?($=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(ve,{value:U,onChange:V,meta:c,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=c,e[50]=U,e[51]=V,e[52]=$):$=e[52];let M;e[53]!==l||e[54]!==s||e[55]!==v?(M=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ne,{post:s,decofile:l,onChange:v})})}),e[53]=l,e[54]=s,e[55]=v,e[56]=M):M=e[56];let z;e[57]!==$||e[58]!==M?(z=t.jsxs(re,{defaultValue:"content",className:"mt-6 gap-4",children:[O,$,M]}),e[57]=$,e[58]=M,e[59]=z):z=e[59];let D;e[60]!==I||e[61]!==z?(D=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:[I,z]})}),e[60]=I,e[61]=z,e[62]=D):D=e[62];let q;return e[63]!==R||e[64]!==D?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[R,D]}),e[63]=R,e[64]=D,e[65]=q):q=e[65],q}function Ne(g){const e=H.c(57),{post:o,decofile:m,onChange:i}=g;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let a;e[1]!==o.excerpt?(a=E(o.excerpt),e[1]=o.excerpt,e[2]=a):a=e[2];let l;e[3]!==i?(l=u=>i("excerpt",u.target.value),e[3]=i,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(le,{id:"post-excerpt",value:a,onChange:l,rows:2})]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==o.slug?(x=E(o.slug),e[9]=o.slug,e[10]=x):x=e[10];let r;e[11]!==i?(r=u=>i("slug",u.target.value),e[11]=i,e[12]=r):r=e[12];let p;e[13]!==x||e[14]!==r?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(J,{id:"post-slug",value:x,onChange:r,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=r,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==o.date?(n=E(o.date),e[17]=o.date,e[18]=n):n=e[18];let s;e[19]!==i?(s=u=>i("date",u),e[19]=i,e[20]=s):s=e[20];let N;e[21]!==n||e[22]!==s?(N=t.jsx(xe,{schema:d,value:n,onChange:s,path:"post-date",label:"Date"}),e[21]=n,e[22]=s,e[23]=N):N=e[23];let S;e[24]!==N||e[25]!==p?(S=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=S):S=e[26];let v;e[27]===Symbol.for("react.memo_cache_sentinel")?(v={type:"string",format:"image-uri",title:"Cover image"},e[27]=v):v=e[27];let w;e[28]!==i?(w=u=>i("image",u),e[28]=i,e[29]=w):w=e[29];let j;e[30]!==o.image||e[31]!==w?(j=t.jsx(de,{schema:v,value:o.image,onChange:w,path:"post-image",label:"Cover image"}),e[30]=o.image,e[31]=w,e[32]=j):j=e[32];let b;e[33]!==i?(b=u=>i("authors",u),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==m||e[36]!==o.authors||e[37]!==b?(y=t.jsx(X,{label:"Authors",decofile:m,kind:"authors",valueField:"email",toRef:we,selected:o.authors,onChange:b}),e[35]=m,e[36]=o.authors,e[37]=b,e[38]=y):y=e[38];let C;e[39]!==i?(C=u=>i("categories",u),e[39]=i,e[40]=C):C=e[40];let P;e[41]!==m||e[42]!==o.categories||e[43]!==C?(P=t.jsx(X,{label:"Categories",decofile:m,kind:"categories",valueField:"slug",toRef:Se,selected:o.categories,onChange:C}),e[41]=m,e[42]=o.categories,e[43]=C,e[44]=P):P=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let k;e[47]!==o.extraProps||e[48]!==_?(k=t.jsx(Pe,{value:o.extraProps,onChange:_}),e[47]=o.extraProps,e[48]=_,e[49]=k):k=e[49];let B;return e[50]!==S||e[51]!==j||e[52]!==y||e[53]!==P||e[54]!==k||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,S,j,y,P,k]}),e[50]=S,e[51]=j,e[52]=y,e[53]=P,e[54]=k,e[55]=c,e[56]=B):B=e[56],B}function Se(g){return{name:E(g.name),slug:E(g.slug)}}function we(g){return{...g}}function Pe(g){const e=H.c(15),{value:o,onChange:m}=g;let i,f,a,l;if(e[0]!==m||e[1]!==o){i=ke(o);const x=(r,p)=>m(i.map((d,n)=>n===r?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{children:"Extra props"}),e[6]=a):a=e[6],l=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((r,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:r.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:r.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>m(i.filter((d,n)=>n!==p))})]},p))}),e[0]=m,e[1]=o,e[2]=i,e[3]=f,e[4]=a,e[5]=l}else i=e[2],f=e[3],a=e[4],l=e[5];let c;e[7]!==i||e[8]!==m?(c=t.jsx(Ce,{label:"Add prop",onClick:()=>m([...i,{key:"",value:""}])}),e[7]=i,e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==a||e[12]!==l||e[13]!==c?(h=t.jsxs("div",{className:f,children:[a,l,c]}),e[10]=f,e[11]=a,e[12]=l,e[13]=c,e[14]=h):h=e[14],h}function X(g){const e=H.c(17),{label:o,decofile:m,kind:i,valueField:f,toRef:a,selected:l,onChange:c}=g;let h;e[0]!==m||e[1]!==i||e[2]!==l||e[3]!==a||e[4]!==f?(h=fe({records:ue(m,i),selected:l,valueField:f,toRef:a}),e[0]=m,e[1]=i,e[2]=l,e[3]=a,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:r,refsForValues:p}=h;let d;e[6]!==o?(d=t.jsx(G,{children:o}),e[6]=o,e[7]=d):d=e[7];let n;e[8]!==o||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==r?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",o.toLowerCase()," yet — create some in the"," ",o.toLowerCase()," collection."]}):t.jsx(oe,{options:x,defaultValue:r,onValueChange:N=>c(p(N)),placeholder:`Select ${o.toLowerCase()}`,maxCount:4}),e[8]=o,e[9]=c,e[10]=x,e[11]=p,e[12]=r,e[13]=n):n=e[13];let s;return e[14]!==d||e[15]!==n?(s=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=s):s=e[16],s}export{ko as PostEditor};
@@ -1 +1 @@
1
- import{c as f,l as h,j as a}from"./index-BTEnjXeB.js";import{j as y}from"./agent-icon-CwXpVSpl.js";import{s as v}from"./Plus-BYL5bo1C.js";import{s as j}from"./Trash01-CCF-zJqZ.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("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]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{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]=i):i=e[8];let l;return e[9]!==n?(l=a.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,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,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,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,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]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.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:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
1
+ import{c as f,l as h,j as a}from"./index-DS4rAqwY.js";import{j as y}from"./agent-icon-BMlO9g3f.js";import{s as v}from"./Plus-BEhknaRt.js";import{s as j}from"./Trash01-DfkqWioB.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("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]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{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]=i):i=e[8];let l;return e[9]!==n?(l=a.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,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,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,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,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]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.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:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
@@ -1 +1 @@
1
- import{c as V,j as t,a as D,M as R,ah as U,U as q,p as N,t as T}from"./index-BTEnjXeB.js";import{P as L}from"./index-H8crjXWV.js";import{A as B}from"./avatar-CP4OJtb5.js";import{S as I}from"./switch-BwI9XAn3.js";import{S as G,a as Y,d as $,c as K}from"./select-0sWT_o7d.js";import{a as M,T as z}from"./toggle-group-Dp4tpQyw.js";import{I as O}from"./input-BlfB50CV.js";import{i as H}from"./Monitor01-CDtvUeeQ.js";import{n as J,a as Q}from"./Sun-D8OpooPG.js";import{i as W}from"./Play-DLISmTm9.js";import{u as X}from"./use-debounced-autosave-DjZzH3Sy.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-2GNyJI9X.js";import{c as te,b as A,S as E,a as F}from"./settings-section-DuBZtqHt.js";import"./sidebar-IXOVwoVQ.js";import"./LayoutLeft-B15XRa9B.js";import"./use-mobile-B3Db4rCS.js";import"./X-y2LzukiV.js";import"./tooltip-DeaWVLXa.js";import"./User01-D8Nj4JQV.js";import"./Check-Nv9PNGwO.js";import"./ChevronDown-Ba_vezHC.js";import"./ChevronUp-DIVmA2RS.js";import"./card-DbggqOWv.js";import"./ArrowUpRight-DQ75oRBs.js";function se(){const e=V.c(19),{data:s,isPending:o}=D.useSession(),v=s?.user,p=v?.image,h=v?.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 g=n.control._formState.dirtyFields;if(Object.keys(g).length===0)return;const a=n.getValues(),f=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await D.updateUser({name:a.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=v?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(B,{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=g=>{const{field:a}=g;return t.jsx(O,{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(U,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=v?.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]=q();let v;e[0]!==o?(v=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.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]=v):v=e[1];const p=v;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(J,{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(H,{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(M,{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(I,{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(I,{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 g;e[31]!==o?(g=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=g):g=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]!==g||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:g,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=g,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 D,M as R,ah as U,U as q,p as N,t as T}from"./index-DS4rAqwY.js";import{P as L}from"./index-rFHHEkal.js";import{A as B}from"./avatar-DdtddiHF.js";import{S as I}from"./switch-tHKnYv4p.js";import{S as G,a as Y,d as $,c as K}from"./select-32I1U7UG.js";import{a as M,T as z}from"./toggle-group-C-P2ViEb.js";import{I as O}from"./input-D5vcQhoL.js";import{i as H}from"./Monitor01-C68LgEUD.js";import{n as J,a as Q}from"./Sun-Xo-4W0GL.js";import{i as W}from"./Play-Bo_FQ_Qt.js";import{u as X}from"./use-debounced-autosave-VGWMIg0D.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-CL06la1a.js";import{c as te,b as A,S as E,a as F}from"./settings-section-C2j2B0zZ.js";import"./sidebar-DOGgTpNK.js";import"./LayoutLeft-BkkLEygy.js";import"./use-mobile-pnR-y4lq.js";import"./X-DqSvIURs.js";import"./tooltip-Cv8zdj9x.js";import"./User01-x16Tzx2V.js";import"./Check-7WIITMAB.js";import"./ChevronDown-CKvbLNpf.js";import"./ChevronUp-xEk-Hkjn.js";import"./card-DpjecHY2.js";import"./ArrowUpRight-DWb0SHAh.js";function se(){const e=V.c(19),{data:s,isPending:o}=D.useSession(),v=s?.user,p=v?.image,h=v?.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 g=n.control._formState.dirtyFields;if(Object.keys(g).length===0)return;const a=n.getValues(),f=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await D.updateUser({name:a.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=v?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(B,{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=g=>{const{field:a}=g;return t.jsx(O,{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(U,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=v?.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]=q();let v;e[0]!==o?(v=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.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]=v):v=e[1];const p=v;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(J,{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(H,{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(M,{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(I,{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(I,{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 g;e[31]!==o?(g=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=g):g=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]!==g||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:g,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=g,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 L,C as H,j as U}from"./index-DS4rAqwY.js";import{a as O,g as $,s as E}from"./automation-runs-DHcUjECQ.js";import{u as k}from"./use-mcp-client-ChtUpBEU.js";import{p as B}from"./constants-D_FQAPnt.js";import{b as V,c as Y}from"./use-mcp-tools-z_64KPxo.js";import{u as q}from"./index-CNAmaCH3.js";import{c as G}from"./monaco-editor-DchAWwXC.js";import{g as K,M as W,a as D}from"./index-B5ks997m.js";import{b as z,a as F}from"./chat-context-D0zCFK1M.js";import{u as J}from"./shell-layout-C1ZgPk96.js";import{O as Q}from"./tab-id-BijBBRwE.js";import"./select-32I1U7UG.js";import"./tooltip-Cv8zdj9x.js";import"./Check-7WIITMAB.js";import"./ChevronDown-CKvbLNpf.js";import"./ChevronUp-xEk-Hkjn.js";import"./useInfiniteQuery-BJ3vgi17.js";import"./use-infinite-scroll-BVSdrRwU.js";import"./use-connection-BuP1AL_I.js";import"./use-collections-Bbw94V3E.js";import"./use-virtual-mcp-DoUDWQYW.js";import"./card-DpjecHY2.js";import"./sidebar-DOGgTpNK.js";import"./LayoutLeft-BkkLEygy.js";import"./use-mobile-pnR-y4lq.js";import"./X-DqSvIURs.js";import"./table-D44fXBcj.js";import"./empty-state-YCut0sPg.js";import"./use-members-Cgw9sNN9.js";import"./use-org-auth-client-DwYtejPT.js";import"./use-clock-tick-_v1mau-X.js";import"./AlertCircle-BspordpX.js";import"./CheckCircle-BU9eUffg.js";import"./Circle-B-1p1V3u.js";import"./agent-icon-BMlO9g3f.js";import"./UserPlus01-Uz6S8Fjb.js";import"./Tool01-BMNmn1yF.js";import"./ArrowUp-BHs6aZEu.js";import"./Settings02-BIYEvLxH.js";import"./Tool02-DGufqHHa.js";import"./XCircle-BsaSEJdP.js";import"./ArrowUpRight-DWb0SHAh.js";import"./TrendUp01-yN4PrbN-.js";import"./ZapSquare-BA0p6n38.js";import"./Users03-C7mz_KdA.js";import"./ChevronRight-C-jwMI0x.js";import"./Stars02-6rBUSWRT.js";import"./Copy01-j7g0HzRj.js";import"./ZoomOut-CrgIEWZv.js";import"./DotsVertical-D_WbX0qI.js";import"./Globe01-D8OVqcVm.js";import"./Eye-Qig4q8vO.js";import"./FilterLines-Clx9vkNd.js";import"./Flag01-D-v8b8WA.js";import"./Star01-7lVQxn6j.js";import"./Globe04-Byszod1w.js";import"./SwitchHorizontal01-DonuDjWr.js";import"./HardDrive-uNiSvuE5.js";import"./Key01-DCLaxXrN.js";import"./LinkExternal01-D0e_JnBB.js";import"./List-DBle1pOm.js";import"./Monitor01-C68LgEUD.js";import"./Sun-Xo-4W0GL.js";import"./Package-ArC6w3gk.js";import"./Palette-CamQAW-l.js";import"./Play-Bo_FQ_Qt.js";import"./Plus-BEhknaRt.js";import"./SearchLg-CkHW6FGX.js";import"./SearchMd-BBU4Wq1F.js";import"./Shield01-CaKclxlZ.js";import"./Stars01-DoPAiLfG.js";import"./Trash01-DfkqWioB.js";import"./Upload01-BjqchOMa.js";import"./User01-x16Tzx2V.js";import"./Users01-CpqV9dUM.js";import"./XClose-BfUy7_Ni.js";import"./Zap-28TFXy2W.js";import"./use-automations-DfJYP9gI.js";import"./studio-tools-Brn4N5_U.js";import"./useSuspenseInfiniteQuery-CWXAI4ws.js";import"./badge-JS3YhMut.js";import"./checkbox-CblPd3Hc.js";import"./command-BN9Ept_A.js";import"./index-KdwK_bqc.js";import"./dialog-COLQcCRL.js";import"./popover-DquVr-be.js";import"./avatar-DdtddiHF.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DasuS9o3.js";import"./file-type-icon-OzS8T0u4.js";import"./hooks-BjdnAe-L.js";import"./decopilot-sse-pool-uJsbj6wS.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./integration-icon-BhHODF-u.js";import"./use-navigate-to-agent-Chl5nrt3.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-4kMJmgm4.js";import"./form-BMLTyaPP.js";import"./label-BgZiPLuQ.js";import"./input-D5vcQhoL.js";import"./auth-DhIYbras.js";import"./drawer-HTdc4YL3.js";import"./collection-search-Dvs-LkIv.js";import"./autosend-CZLKJkBV.js";import"./tabs-B-tjXtUz.js";import"./toggle-group-C-P2ViEb.js";import"./use-deco-credits-DUNDu3Fq.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Dduj2bdE.js";import"./use-registry-connections-Dq9PwH8s.js";import"./use-organization-settings-DDlWJKkK.js";import"./extract-connection-data-B8RjJlbH.js";import"./collection-tabs-CTEKQT9e.js";import"./textarea-DaaHcv5N.js";import"./connection-form-helpers-DKpPvDSN.js";import"./authenticate-and-persist-oauth-ChFnJYYv.js";import"./mcp-oauth-BreAtybq.js";import"./use-ai-providers-My0L_zE8.js";import"./connect-desktop-dialog-DKrDKa4d.js";import"./select-model-BQOHE3MV.js";import"./skeleton-DoBiZEib.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C2j2B0zZ.js";import"./dropdown-menu-DHMJS27m.js";import"./index-BcIFnd0f.js";import"./alert-dialog-Dtszn4Rp.js";import"./toolbar-CZ_rtBa9.js";import"./use-debounced-value-BdZGbVQ9.js";import"./index-D1C9TQ71.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Ce8ydwkp.js";import"./use-decopilot-events-C2YASEpX.js";import"./use-capability-CrdOeLT6.js";import"./tools-list-COQ-a9jF.js";import"./switch-tHKnYv4p.js";import"./use-debounced-autosave-VGWMIg0D.js";import"./index-rFHHEkal.js";import"./search-input-CIt36tQq.js";import"./github-repo-picker-uyxKPI6q.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-DPnFGuFl.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-CW4X_eqm.js";import"./index-DdJw1Zxw.js";import"./get-initials-D-f_fDFw.js";import"./calendar-2DG8dvZM.js";import"./toolbar-icon-button-Ba0OmFet.js";import"./use-file-configs-DOV5LRzD.js";import"./automation-list-row-CWjgUckd.js";import"./required-auth-layout-BQBGmnFG.js";import"./use-org-sso-D1GLkTq3.js";const X="studio://navigate";function Z(M){const[t]=M;if(M.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return{isNavigate:!1};let o=null;try{o=new URL(t.uri).searchParams.get("main")}catch{}return{isNavigate:!0,tab:o&&Q.has(o)?o:null}}const tt={};function ot(M){const t=L.c(38),{client:o,resourceURI:I,tool:i,connectionId:p,orgId:a,args:v}=M,{sendMessage:C}=z(),{setAppContext:d,clearAppContext:l}=F(),{openSidePanel:g,openTab:s}=J(),r=`${p}:${i.name}`;let c;t[0]!==s?(c=x=>x==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=c):c=t[1];const m=c,n=v??tt;let u;t[2]!==o||t[3]!==i.name||t[4]!==n?(u={client:o,toolName:i.name,toolArguments:n},t[2]=o,t[3]=i.name,t[4]=n,t[5]=u):u=t[5];const{data:e}=Y(u);let h;if(t[6]!==i._meta||t[7]!==i.name){const x=$(i._meta);h=E(i.name,x),t[6]=i._meta,t[7]=i.name,t[8]=h}else h=t[8];const A=h;let f;t[9]!==i.inputSchema?(f=i.inputSchema??{type:"object"},t[9]=i.inputSchema,t[10]=f):f=t[10];let R;t[11]!==A||t[12]!==f||t[13]!==i?(R={...i,name:A,inputSchema:f},t[11]=A,t[12]=f,t[13]=i,t[14]=R):R=t[14];const b=R;let _;t[15]!==g||t[16]!==s||t[17]!==C?(_=x=>{const j=Z(x.content);if(j.isNavigate){j.tab&&s(j.tab);return}const w=G(x.content);w.content.length>0&&(g("chat"),C({tiptapDoc:w}))},t[15]=g,t[16]=s,t[17]=C,t[18]=_):_=t[18];const y=_;let P;t[19]!==b?(P={tool:b},t[19]=b,t[20]=P):P=t[20];let N;t[21]!==d||t[22]!==r?(N=x=>d(r,x),t[21]=d,t[22]=r,t[23]=N):N=t[23];let T;t[24]!==l||t[25]!==r?(T=()=>l(r),t[24]=l,t[25]=r,t[26]=T):T=t[26];let S;return t[27]!==o||t[28]!==y||t[29]!==m||t[30]!==a||t[31]!==I||t[32]!==P||t[33]!==N||t[34]!==T||t[35]!==n||t[36]!==e?(S=U.jsx(W,{resourceURI:I,orgId:a,toolInfo:P,toolInput:n,toolResult:e,displayMode:"fullscreen",minHeight:D.fullscreen.minHeight,maxHeight:D.fullscreen.maxHeight,client:o,onMessage:y,onUpdateModelContext:N,onTeardown:T,onRequestDisplayMode:m,className:"h-full"}),t[27]=o,t[28]=y,t[29]=m,t[30]=a,t[31]=I,t[32]=P,t[33]=N,t[34]=T,t[35]=n,t[36]=e,t[37]=S):S=t[37],S}function zi(M){const t=L.c(24),{connectionId:o,toolName:I,args:i}=M,{org:p}=H(),a=q();let v;t[0]!==o||t[1]!==a?(v=B(o)&&a.vmEntry?.sandboxProviderKind==="user-desktop"&&a.previewUrl?`${a.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=o,t[1]=a,t[2]=v):v=t[2];const C=v;let d;t[3]!==o||t[4]!==C||t[5]!==p.id||t[6]!==p.slug?(d={connectionId:o,orgId:p.id,orgSlug:p.slug,mcpUrl:C},t[3]=o,t[4]=C,t[5]=p.id,t[6]=p.slug,t[7]=d):d=t[7];const l=k(d);let g;t[8]!==l?(g={client:l},t[8]=l,t[9]=g):g=t[9];const{data:s}=V(g);let r,c,m;t[10]!==I||t[11]!==s.tools?(r=O(decodeURIComponent(I)),m=s.tools.find(e=>e.name===r)??s.tools.find(e=>{const h=$(e._meta);if(!h)return!1;if(E(e.name,h)===r)return!0;const f=E(r,h);return f!==r&&e.name===f}),c=m?._meta?K(m._meta):void 0,t[10]=I,t[11]=s.tools,t[12]=r,t[13]=c,t[14]=m):(r=t[12],c=t[13],m=t[14]);const n=c;if(!m||!n){let e;return t[15]!==r?(e=U.jsx("div",{className:"flex items-center justify-center h-full w-full",children:U.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 u;return t[17]!==i||t[18]!==l||t[19]!==o||t[20]!==p.id||t[21]!==n||t[22]!==m?(u=U.jsx(ot,{client:l,resourceURI:n,tool:m,connectionId:o,orgId:p.id,args:i}),t[17]=i,t[18]=l,t[19]=o,t[20]=p.id,t[21]=n,t[22]=m,t[23]=u):u=t[23],u}export{zi as AppViewContent};