decocms 4.403.1 → 4.403.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/dist/client/assets/{AlertCircle-BjnxyDOP.js → AlertCircle-YzP1ItvL.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BgjldTZ3.js → AreaChart-alLvZOvR.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DQ9UKKAN.js → ArrowLeft-CYpMPcOZ.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DiT079bV.js → ArrowRight-Cx_2CtPy.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BKoObjW-.js → ArrowUp-qgp0EG1S.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-E8ZbYInN.js → CartesianChart-DG44bZ81.js} +1 -1
  7. package/dist/client/assets/{Check-DAeVWel0.js → Check-DMZ0RIwh.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-i5UWgig8.js → CheckCircle-gIlSms3T.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BZ-l57nk.js → ChevronUp-G7F3VYIf.js} +1 -1
  10. package/dist/client/assets/{Copy01-DAVjKSIW.js → Copy01-B-dz9iXg.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-BdF-cK8s.js → CreditCard01-CAP8dDsb.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-Cwch2oVB.js → DotsVertical-BdurgnSh.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-BcIn9bAS.js → ErrorBarContext-DvWdYR3c.js} +1 -1
  14. package/dist/client/assets/{Eye-DQ7cfCM0.js → Eye-ZgodVkyQ.js} +1 -1
  15. package/dist/client/assets/{Globe04-DKoPzLrY.js → Globe04-Dy5lW2tL.js} +1 -1
  16. package/dist/client/assets/{Image01-DbwBpUqU.js → Image01-GZwmFlKM.js} +1 -1
  17. package/dist/client/assets/{Key01-zwp6W4d5.js → Key01-Da1KKUib.js} +1 -1
  18. package/dist/client/assets/{LayoutLeft-C-SKczLZ.js → LayoutLeft-DbkGyzH4.js} +1 -1
  19. package/dist/client/assets/{Line-Ded98G6Q.js → Line-C4t6yXJk.js} +1 -1
  20. package/dist/client/assets/{Link01-zc_yw7bC.js → Link01-BdK1ByU5.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-CXDDMqr6.js → LinkExternal01-D-eEFhKO.js} +1 -1
  22. package/dist/client/assets/{Monitor01-DWGOwDQg.js → Monitor01-Dqm9KsCN.js} +1 -1
  23. package/dist/client/assets/{Palette-DWlnTZiX.js → Palette-H8aWBRVl.js} +1 -1
  24. package/dist/client/assets/{Plus-qxuO6WDR.js → Plus-Cc4ubNGu.js} +1 -1
  25. package/dist/client/assets/{SearchMd-DX0K-HMy.js → SearchMd-CqrAQSvB.js} +1 -1
  26. package/dist/client/assets/{Sector-B3qdp4tS.js → Sector-CtG8V90b.js} +1 -1
  27. package/dist/client/assets/{Share07-BnshXTQj.js → Share07-DGVeEnhS.js} +1 -1
  28. package/dist/client/assets/{Sun-ANdrraHV.js → Sun-C7ngZDnN.js} +1 -1
  29. package/dist/client/assets/{Tool01-TjgiGeiC.js → Tool01-PaohPsXN.js} +1 -1
  30. package/dist/client/assets/{Trash01-CrHs9whM.js → Trash01-DngK_rxV.js} +1 -1
  31. package/dist/client/assets/{Upload01-C5ztKcks.js → Upload01-BM_RpwaJ.js} +1 -1
  32. package/dist/client/assets/{User01-CXM1GVfD.js → User01--_GcM9Nm.js} +1 -1
  33. package/dist/client/assets/{UserSquare-opUUQIJ1.js → UserSquare-DrIVMzs5.js} +1 -1
  34. package/dist/client/assets/{Users01-5Z8_4Xc4.js → Users01-CbmiNtCo.js} +1 -1
  35. package/dist/client/assets/{X-DmIzVIVO.js → X-DqB0NFUe.js} +1 -1
  36. package/dist/client/assets/{XClose-Ck6U0czU.js → XClose-CbmBXBAq.js} +1 -1
  37. package/dist/client/assets/{Zap-DA1b9hd1.js → Zap-BoM6OXqO.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-Dcywub4h.js → ZoomOut-BikQEs2y.js} +1 -1
  39. package/dist/client/assets/{access-gate-MDdmDxXn.js → access-gate-AAHSu0hl.js} +1 -1
  40. package/dist/client/assets/{add-connection-dialog-DU7LzF51.js → add-connection-dialog-D8Ox25XG.js} +1 -1
  41. package/dist/client/assets/{agent-analytics-wlF8_i7k.js → agent-analytics-DDhZ0jKs.js} +1 -1
  42. package/dist/client/assets/agent-app-DN3mfpdd.js +1 -0
  43. package/dist/client/assets/{agent-assets-CmfaU4i1.js → agent-assets-Dq2zZ9iD.js} +1 -1
  44. package/dist/client/assets/{agent-automation-CaO9571m.js → agent-automation-BSGdVlGr.js} +1 -1
  45. package/dist/client/assets/{agent-automations-BNHRsCg2.js → agent-automations-BZuhHWAh.js} +1 -1
  46. package/dist/client/assets/{agent-connect-sources-Dhhwa0F6.js → agent-connect-sources-7OiLp97R.js} +1 -1
  47. package/dist/client/assets/agent-deck-BDt03CDi.js +1 -0
  48. package/dist/client/assets/{agent-e2e-CjqnHGPK.js → agent-e2e-1LEoDd2q.js} +1 -1
  49. package/dist/client/assets/{agent-experiments-BJgr6c6L.js → agent-experiments-DwT1YuHQ.js} +1 -1
  50. package/dist/client/assets/{agent-file-DTsmPXS9.js → agent-file-CqIOzRIE.js} +1 -1
  51. package/dist/client/assets/{agent-git-zLHFVqcf.js → agent-git-B7cORj3l.js} +1 -1
  52. package/dist/client/assets/{agent-hosting-Bd611big.js → agent-hosting-CXGg7nzG.js} +1 -1
  53. package/dist/client/assets/{agent-icon-CPkpuu5N.js → agent-icon-Jo8-4dPq.js} +1 -1
  54. package/dist/client/assets/agent-library-file-dLd73eS3.js +1 -0
  55. package/dist/client/assets/{agent-monitor-NiXXUkxV.js → agent-monitor-D64P2JxS.js} +1 -1
  56. package/dist/client/assets/{agent-overview-Cy5phgJk.js → agent-overview-C8Kpohcu.js} +1 -1
  57. package/dist/client/assets/agent-settings-C0xneLZn.js +1 -0
  58. package/dist/client/assets/{agent-site-editor-xAaHN9ew.js → agent-site-editor-Dh6Uc_LN.js} +1 -1
  59. package/dist/client/assets/agent-site-editor-code-ZlbxO6EJ.js +2 -0
  60. package/dist/client/assets/{agent-site-editor-content-a5TI2r7z.js → agent-site-editor-content-CnwpjMKB.js} +3 -3
  61. package/dist/client/assets/{agent-site-editor-preview-gHcJBdxE.js → agent-site-editor-preview-CiPkNvAv.js} +3 -3
  62. package/dist/client/assets/agent-view-Bsid6CA8.js +1 -0
  63. package/dist/client/assets/{agent-view-guard-tp4TNcN4.js → agent-view-guard-C89vuUCE.js} +1 -1
  64. package/dist/client/assets/{agents-list-Iqj0VESU.js → agents-list-CqGVCx09.js} +1 -1
  65. package/dist/client/assets/{ai-providers-BzGiZdMW.js → ai-providers-DnvYOkAI.js} +1 -1
  66. package/dist/client/assets/{alert-Cs-bStiD.js → alert-Dd873hHW.js} +1 -1
  67. package/dist/client/assets/{alert-dialog-BqYCADnJ.js → alert-dialog-BLhLimu7.js} +1 -1
  68. package/dist/client/assets/{analytics-sections-DTymFcLM.js → analytics-sections-BzoIN8JU.js} +1 -1
  69. package/dist/client/assets/{api-keys-BeBXKTTu.js → api-keys-DB430lDw.js} +1 -1
  70. package/dist/client/assets/api-keys-i6Dia0kF.js +1 -0
  71. package/dist/client/assets/app-editor-DdsWZBEq.js +1 -0
  72. package/dist/client/assets/{asset-utils-CFWp7R-O.js → asset-utils-BkBA20sO.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-CnzMelD2.js → auth-catchall-Dn3z6qzW.js} +1 -1
  74. package/dist/client/assets/{auth-entry-CB9sp4oM.js → auth-entry-Dxse2891.js} +1 -1
  75. package/dist/client/assets/{auth-DMDdodew.js → auth-gtdPpHjL.js} +1 -1
  76. package/dist/client/assets/{auth-split-layout-CCJSBMY1.js → auth-split-layout-DufynUa0.js} +1 -1
  77. package/dist/client/assets/{authenticate-and-persist-oauth-CNlmBCGw.js → authenticate-and-persist-oauth-CVOY3bdK.js} +1 -1
  78. package/dist/client/assets/{automation-list-row-WR8tLDcb.js → automation-list-row-E5XRelXF.js} +1 -1
  79. package/dist/client/assets/{automation-runs-CMmjYDxj.js → automation-runs-CK8TUduc.js} +1 -1
  80. package/dist/client/assets/{automations-DjMvE8Jp.js → automations-CgsdwCbr.js} +1 -1
  81. package/dist/client/assets/{autosend-o13Aw1Rn.js → autosend-D8qwra7k.js} +1 -1
  82. package/dist/client/assets/{avatar-D35e4GmC.js → avatar-DzaDPlqs.js} +1 -1
  83. package/dist/client/assets/{badge-B194cO51.js → badge-DAnEDAAp.js} +1 -1
  84. package/dist/client/assets/{block-document-BOCciQCf.js → block-document-GGgZ2xCN.js} +1 -1
  85. package/dist/client/assets/{blocks-preview-workspace-context-CBbcF7mQ.js → blocks-preview-workspace-context-yC0xLA11.js} +1 -1
  86. package/dist/client/assets/{buckets-CaYRkeTq.js → buckets-CzFhrvYl.js} +1 -1
  87. package/dist/client/assets/{build-improve-prompt-doc-PevJByNh.js → build-improve-prompt-doc-CfF_OZho.js} +1 -1
  88. package/dist/client/assets/{calendar-C6nVhblX.js → calendar-C6S4gjZ0.js} +1 -1
  89. package/dist/client/assets/{capability-load-error-Gr2lFmRO.js → capability-load-error-CAPXk7c8.js} +1 -1
  90. package/dist/client/assets/{cards-gLcUNsCS.js → cards-D5iviFJy.js} +1 -1
  91. package/dist/client/assets/{category-editor-BL-y4acD.js → category-editor-BJE37M_v.js} +1 -1
  92. package/dist/client/assets/{chart-DaTqNVF8.js → chart-CfF7_1qV.js} +1 -1
  93. package/dist/client/assets/{chat-context-WNSIRKCQ.js → chat-context-CNmaHg6E.js} +1 -1
  94. package/dist/client/assets/{chat-draft-BcyCtTKR.js → chat-draft-BAXNdbwi.js} +1 -1
  95. package/dist/client/assets/{checkbox-JdVFVT9j.js → checkbox-CCgxRg-G.js} +1 -1
  96. package/dist/client/assets/{choose-editor-KLJrpSbS.js → choose-editor-SFRWj4Nc.js} +1 -1
  97. package/dist/client/assets/{claim-phase-copy-DWojSJiP.js → claim-phase-copy-DiN3tSVA.js} +1 -1
  98. package/dist/client/assets/{cli-auth-success-RutxCdeJ.js → cli-auth-success-DJgHS1fA.js} +1 -1
  99. package/dist/client/assets/{client-icons-iHLtcmNR.js → client-icons-BB73IOAY.js} +1 -1
  100. package/dist/client/assets/{collapsible-Cvuvqexz.js → collapsible-ATnyEj_S.js} +1 -1
  101. package/dist/client/assets/{collection-detail-BPtNs1k-.js → collection-detail-BDR04Kq5.js} +1 -1
  102. package/dist/client/assets/{collection-display-button-CfKd9s7o.js → collection-display-button-IgFAgqXL.js} +1 -1
  103. package/dist/client/assets/{collection-search-Dj-lj2Fa.js → collection-search-CQtm6ZPr.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-DZhdr5fM.js → collection-table-wrapper-BaIEnIrf.js} +1 -1
  105. package/dist/client/assets/{collection-tabs-glsScWrF.js → collection-tabs-Ctgaf4Pj.js} +1 -1
  106. package/dist/client/assets/{combobox-CRDHNq4d.js → combobox-Ce_kogEm.js} +1 -1
  107. package/dist/client/assets/{command-CaZijnVF.js → command-Be1FiAet.js} +1 -1
  108. package/dist/client/assets/{companion-mcps-section-BkRhUSqK.js → companion-mcps-section-TmU46bmw.js} +1 -1
  109. package/dist/client/assets/{connect-Ciw6e4mA.js → connect-T9gYLRQ1.js} +1 -1
  110. package/dist/client/assets/{connect-layout-D1t_CVe0.js → connect-layout-BJyoZgZp.js} +1 -1
  111. package/dist/client/assets/{connection-Bp_V6T8B.js → connection-DpBbRAF7.js} +1 -1
  112. package/dist/client/assets/{connection-card-CtvZJL9l.js → connection-card-Cbi3TS91.js} +1 -1
  113. package/dist/client/assets/{connection-detail-Df_r-qH6.js → connection-detail-D_VF5iTl.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-BsreWXIJ.js → connection-form-helpers-B6j-CkAe.js} +1 -1
  115. package/dist/client/assets/{connections-CK-Ua6Mw.js → connections-BWtz94mz.js} +1 -1
  116. package/dist/client/assets/{context-BM8vfIaN.js → context-CPyDNVl0.js} +1 -1
  117. package/dist/client/assets/{create-organization-dialog-BwjjbQTa.js → create-organization-dialog-DH-ikDWk.js} +1 -1
  118. package/dist/client/assets/{decofile-api-SdRYqTHk.js → decofile-api-lyYnBz8F.js} +1 -1
  119. package/dist/client/assets/{decopilot-CZjF5g1z.js → decopilot-Dvgnn1td.js} +1 -1
  120. package/dist/client/assets/{dialog-GV2-AWhM.js → dialog-DdqSoRM9.js} +1 -1
  121. package/dist/client/assets/{discover-BvsLStXF.js → discover-DTBbmewn.js} +1 -1
  122. package/dist/client/assets/{domain-settings-D6Vd7rgv.js → domain-settings-BdmwwZJl.js} +1 -1
  123. package/dist/client/assets/{download-app-dialog-CwDsIUWZ.js → download-app-dialog-BlOmHAsj.js} +1 -1
  124. package/dist/client/assets/{drawer-BpYKYeO-.js → drawer-DD_EvNka.js} +1 -1
  125. package/dist/client/assets/{editor-D-V05JcK.js → editor-oQiihuTN.js} +1 -1
  126. package/dist/client/assets/{empty-state-DD1de6E_.js → empty-state-B0qH2Kts.js} +1 -1
  127. package/dist/client/assets/{empty-state-BIGrNuvN.js → empty-state-CdcwJcHp.js} +1 -1
  128. package/dist/client/assets/{extract-connection-data-CDeCZEXj.js → extract-connection-data-BYZdGxJz.js} +1 -1
  129. package/dist/client/assets/{feature-gate-CVihx7r6.js → feature-gate-DnBD8lbt.js} +1 -1
  130. package/dist/client/assets/{feature-paywall-BWXzTC8M.js → feature-paywall-CXAok1MA.js} +1 -1
  131. package/dist/client/assets/{file-explorer-C8-AkN7L.js → file-explorer-CprZ5S2c.js} +1 -1
  132. package/dist/client/assets/{file-preview-DCDQ1qgJ.js → file-preview-D-fY1vxt.js} +1 -1
  133. package/dist/client/assets/{file-share-button-Cty0rZxy.js → file-share-button-BojriL0f.js} +1 -1
  134. package/dist/client/assets/{file-type-icon-C06txfjh.js → file-type-icon-BDgGUbiO.js} +1 -1
  135. package/dist/client/assets/{folder-icon-D94yBI09.js → folder-icon-DYCGfqo_.js} +1 -1
  136. package/dist/client/assets/{form-CeykBl5J.js → form-DDN0fmnr.js} +1 -1
  137. package/dist/client/assets/{gateway-client-Bv7LvgK9.js → gateway-client-aZG77Xf7.js} +1 -1
  138. package/dist/client/assets/{general-D80iGMZp.js → general-Br7EOWl5.js} +1 -1
  139. package/dist/client/assets/{github-icon-CbIIkcig.js → github-icon-BgXpeChB.js} +1 -1
  140. package/dist/client/assets/{home-Ckz9i9hX.js → home-BuOEAUJy.js} +1 -1
  141. package/dist/client/assets/{hooks-y4FNzMnr.js → hooks-BaT6zpiH.js} +1 -1
  142. package/dist/client/assets/{icon-button-eT6FWsHz.js → icon-button-D7VZdfmT.js} +1 -1
  143. package/dist/client/assets/{index-DVEm55Ak.js → index-A41c0be0.js} +1 -1
  144. package/dist/client/assets/{index-CESNu6n_.js → index-BEaxoeD8.js} +1 -1
  145. package/dist/client/assets/{index-DhDOCrMt.js → index-BOV18OwN.js} +1 -1
  146. package/dist/client/assets/{index-DQZsFtMU.js → index-C2zAJxiS.js} +1 -1
  147. package/dist/client/assets/{index-CC25Ppah.js → index-CK2jC1b8.js} +2 -2
  148. package/dist/client/assets/{index-Dn2PGa-1.js → index-CovgzY-C.js} +1 -1
  149. package/dist/client/assets/{index-ClcQkcu8.js → index-DBDtjD9g.js} +1 -1
  150. package/dist/client/assets/{index-sjAGIPtv.js → index-DP-N5syJ.js} +1 -1
  151. package/dist/client/assets/{index-bkwORM24.js → index-DS0-Afd0.js} +1 -1
  152. package/dist/client/assets/{index-BhpvncYH.js → index-DbfsNkVH.js} +1 -1
  153. package/dist/client/assets/{index-CMWq57js.js → index-N9XVciQ5.js} +1 -1
  154. package/dist/client/assets/{index-CKT6eBt7.js → index-Xi29qi2J.js} +1 -1
  155. package/dist/client/assets/{index-BawJz1J9.js → index-itMUnfUX.js} +1 -1
  156. package/dist/client/assets/{index-DjPOBo3H.js → index-oBvqCihi.js} +1 -1
  157. package/dist/client/assets/{index-redirect-DA2gVoAj.js → index-redirect-BH1-KtOd.js} +1 -1
  158. package/dist/client/assets/{infiniteQueryObserver-BKtbJar9.js → infiniteQueryObserver-r-3Zb0hn.js} +1 -1
  159. package/dist/client/assets/{infra-billing-xtFcZesZ.js → infra-billing-C_fJnzvO.js} +1 -1
  160. package/dist/client/assets/{input-mcA88pmm.js → input-BCcJ8Hmw.js} +1 -1
  161. package/dist/client/assets/{input-BkFUax8j.js → input-BSlf0cIW.js} +1 -1
  162. package/dist/client/assets/{input-DwcsciNr.js → input-DdZYEeuc.js} +1 -1
  163. package/dist/client/assets/{integration-icon-DzNK1v4_.js → integration-icon-CicyoW2g.js} +1 -1
  164. package/dist/client/assets/{label-5K8407_a.js → label-C32hF8xr.js} +1 -1
  165. package/dist/client/assets/{last-preview-page-BFJ4AUvo.js → last-preview-page-CUM_HBZO.js} +1 -1
  166. package/dist/client/assets/{layout-Cbc-ZMTn.js → layout-C7aLhCIT.js} +1 -1
  167. package/dist/client/assets/{legacy-agents-deep-CuLGH4ta.js → legacy-agents-deep-B5qs0t-f.js} +1 -1
  168. package/dist/client/assets/{legacy-main-redirect-5ChwjO4K.js → legacy-main-redirect-4eY9-lqG.js} +1 -1
  169. package/dist/client/assets/{library-FuZGXdY7.js → library-ZONMv_NM.js} +1 -1
  170. package/dist/client/assets/{login-BESokYtj.js → login-C_WqcNro.js} +1 -1
  171. package/dist/client/assets/{markdown-BU3lUbXy.js → markdown-CCVwyZmB.js} +1 -1
  172. package/dist/client/assets/{mcp-app-renderer-DT5aj_bA.js → mcp-app-renderer-CutrdRC_.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-CGCjtFIL.js → mcp-oauth-aTwtgi6X.js} +1 -1
  174. package/dist/client/assets/{members-D6d3YDya.js → members-BOvPF0VE.js} +1 -1
  175. package/dist/client/assets/{message-templates-BJgQYm2J.js → message-templates-CGfvrmF4.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-b1QX6rLb.js → mini-report-page-CMXtHyKe.js} +1 -1
  177. package/dist/client/assets/{mock-board-B8nkK2VT.js → mock-board-CGPXSvqq.js} +3 -3
  178. package/dist/client/assets/{monaco-editor-BfhKEQLl.js → monaco-editor-Em6ZNkGd.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-BWEDudJY.js → monitoring-stats-row-BvzAoKRs.js} +1 -1
  180. package/dist/client/assets/{multi-select-Mgyr0yZF.js → multi-select-CrUYDIyH.js} +1 -1
  181. package/dist/client/assets/{mustache-DlIZk22M.js → mustache-DR3KrOjx.js} +1 -1
  182. package/dist/client/assets/{oauth-callback-C6cn0WJr.js → oauth-callback-DpcsaVMs.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-ai-provider-3cLyFWDl.js → oauth-callback-ai-provider-Bj131oo2.js} +1 -1
  184. package/dist/client/assets/{onboarding-6J2rn57y.js → onboarding-90UHPvM3.js} +1 -1
  185. package/dist/client/assets/{optimistic-project-sidebar-views-DN1bS66D.js → optimistic-project-sidebar-views-DCTKx36B.js} +1 -1
  186. package/dist/client/assets/{org-file-open-context-CxjyfiTf.js → org-file-open-context-8FCTmLsE.js} +1 -1
  187. package/dist/client/assets/{organization-choice-Ci76yuJO.js → organization-choice-CxhUiOOZ.js} +1 -1
  188. package/dist/client/assets/{orgs-ChszBSbG.js → orgs-25uEO8Z8.js} +1 -1
  189. package/dist/client/assets/{page-seo-form-COrevNmR.js → page-seo-form-BnNRoPEM.js} +1 -1
  190. package/dist/client/assets/{pair-h-AKbDiX.js → pair-DNtCa00h.js} +1 -1
  191. package/dist/client/assets/{plan-ladder-DdvajrNu.js → plan-ladder-yAJPPpd3.js} +1 -1
  192. package/dist/client/assets/{popover-Ckvyzpb1.js → popover-D9fLEvti.js} +1 -1
  193. package/dist/client/assets/{post-calendar-DK_KPx-Z.js → post-calendar-CjmW0tkz.js} +1 -1
  194. package/dist/client/assets/{post-editor-BguSWLmG.js → post-editor-DnRxf2PZ.js} +1 -1
  195. package/dist/client/assets/{preview-content-C_A2MJh2.js → preview-content-B0ztTWdM.js} +1 -1
  196. package/dist/client/assets/{preview-dialog-Bpp6PBmH.js → preview-dialog-BPCHz2nB.js} +1 -1
  197. package/dist/client/assets/{profile-COoSSb-C.js → profile-DOoWHc2h.js} +1 -1
  198. package/dist/client/assets/{project-app-view-B-CtRlEH.js → project-app-view-CXQWtLpt.js} +1 -1
  199. package/dist/client/assets/{project-feed-CijFeCZm.js → project-feed-w07TksiO.js} +1 -1
  200. package/dist/client/assets/{project-icon-B8aarRYC.js → project-icon-D4PJG-i0.js} +1 -1
  201. package/dist/client/assets/project-reports-BMIOfd4b.js +1 -0
  202. package/dist/client/assets/project-tasks-CCRlEBDq.js +1 -0
  203. package/dist/client/assets/{prompts-DtZMitBK.js → prompts-CXImayyy.js} +1 -1
  204. package/dist/client/assets/record-editor-DcZoL5j2.js +1 -0
  205. package/dist/client/assets/{redirect-editor-d9lKn-Hk.js → redirect-editor-CZyQzBp3.js} +1 -1
  206. package/dist/client/assets/reports-CzJ4b030.js +1 -0
  207. package/dist/client/assets/{reports-w3F-AXn2.js → reports-D5Ws-Z-Z.js} +2 -2
  208. package/dist/client/assets/{reports-aVRaDDaG.css → reports-Dl0n8WK0.css} +1 -1
  209. package/dist/client/assets/{reports-onboarding-CRlCaHnm.js → reports-onboarding-C3LauMpv.js} +1 -1
  210. package/dist/client/assets/{reports-tab-BKjilIxh.js → reports-tab-CrHdPk7J.js} +2 -2
  211. package/dist/client/assets/{repositories-CPDrDXOZ.js → repositories-D8nv7Xk5.js} +1 -1
  212. package/dist/client/assets/{repository-import-picker-DgRDvroV.js → repository-import-picker-B_yB2gqJ.js} +1 -1
  213. package/dist/client/assets/{repository-picker-DJ0Bq0Gn.js → repository-picker-BEpNu3ZO.js} +1 -1
  214. package/dist/client/assets/{require-capability-LrdDjhZ1.js → require-capability-DJOR9y0I.js} +1 -1
  215. package/dist/client/assets/{required-auth-layout-DxuleY4O.js → required-auth-layout-DB5JpRTU.js} +1 -1
  216. package/dist/client/assets/{reset-password-CviYfK6_.js → reset-password-kvrUhFut.js} +1 -1
  217. package/dist/client/assets/{resizable-DI9TRgqq.js → resizable-DTOjgT4Y.js} +1 -1
  218. package/dist/client/assets/{resolve-tab-icon-DXJnhSrQ.js → resolve-tab-icon-DRTn2NwY.js} +1 -1
  219. package/dist/client/assets/{review-settings-B9NDOqi3.js → review-settings-E3kmj1nz.js} +1 -1
  220. package/dist/client/assets/{rich-text-link-control-CGgVTmqZ.js → rich-text-link-control-D3evQDCf.js} +1 -1
  221. package/dist/client/assets/{roles-DD9S2BWe.js → roles-BzYnDfEr.js} +1 -1
  222. package/dist/client/assets/{route-C2cWZSDL.js → route-BK1UYpJJ.js} +1 -1
  223. package/dist/client/assets/{route-B_khi6wn.js → route-BWaewmAq.js} +1 -1
  224. package/dist/client/assets/{route-Cd4OR2Vk.js → route-DGBW5u-y.js} +1 -1
  225. package/dist/client/assets/{route-page-header-C3phk_gY.js → route-page-header-DsLKRhCA.js} +1 -1
  226. package/dist/client/assets/{runnable-block-editor-CqnIW6eK.js → runnable-block-editor-CTcUBv1Z.js} +1 -1
  227. package/dist/client/assets/{sandbox-lifecycle-context-DQzttex0.js → sandbox-lifecycle-context-DVklx5ib.js} +1 -1
  228. package/dist/client/assets/{schema-DW2eCFm-.js → schema-YWMvOOES.js} +1 -1
  229. package/dist/client/assets/{scroll-area-CRSx-oF3.js → scroll-area-DCufqOiC.js} +1 -1
  230. package/dist/client/assets/{search-input-DZFOIFWl.js → search-input-DZ5LjK8B.js} +1 -1
  231. package/dist/client/assets/{search-toggle-C8zsunL3.js → search-toggle-MqWnt0CW.js} +1 -1
  232. package/dist/client/assets/{secret-picker-BSKOhI0I.js → secret-picker-B0gTMC8S.js} +1 -1
  233. package/dist/client/assets/{secrets-DBJKBNLw.js → secrets-BSAIgPVP.js} +1 -1
  234. package/dist/client/assets/{sections-editor-DZc2rx0-.js → sections-editor-DuMAlIKj.js} +1 -1
  235. package/dist/client/assets/{select-Cfsqli3Z.js → select-D4vELKrF.js} +1 -1
  236. package/dist/client/assets/{select-model-CyT9vd4S.js → select-model-CRu7b7k2.js} +1 -1
  237. package/dist/client/assets/{seo-editor-DGGq3jmD.js → seo-editor-DJJVGtAU.js} +1 -1
  238. package/dist/client/assets/{separator-BSrhq7Cs.js → separator-HBV5anuo.js} +1 -1
  239. package/dist/client/assets/{settings-tab-Jt6e4-NS.js → settings-tab-C59u0Vwx.js} +1 -1
  240. package/dist/client/assets/{sheet-BhcdHJA0.js → sheet-6Vxtignr.js} +1 -1
  241. package/dist/client/assets/{shell-layout-Bq2laVk4.js → shell-layout-0w3S7Z17.js} +1 -1
  242. package/dist/client/assets/{skill-preview-XcnB5GU4.js → skill-preview-CNZdtGsC.js} +1 -1
  243. package/dist/client/assets/{skills-Bz3eOc9s.js → skills-BtaqsxQu.js} +1 -1
  244. package/dist/client/assets/{sso-w4y2xRSU.js → sso--qHgD-FF.js} +1 -1
  245. package/dist/client/assets/{suggestion-DpmAiVaO.js → suggestion-CTZ4P7Cg.js} +1 -1
  246. package/dist/client/assets/{switch-EEYQU2u1.js → switch-DCOUunxF.js} +1 -1
  247. package/dist/client/assets/{synced-repos-DUfGHrhe.js → synced-repos-CfI16RaS.js} +1 -1
  248. package/dist/client/assets/{tab-icon-glyph-CZyIWS8W.js → tab-icon-glyph-AK9UZj7M.js} +1 -1
  249. package/dist/client/assets/{table-CvgH2_1o.js → table-CcJ0WsFv.js} +1 -1
  250. package/dist/client/assets/{tabs-B6noAKK3.js → tabs-C_SkK0zq.js} +1 -1
  251. package/dist/client/assets/{task-board-DQdrQPfw.js → task-board-CD8iA_oi.js} +1 -1
  252. package/dist/client/assets/{task-route-CuzZF1yz.js → task-route-PE3bfn_g.js} +1 -1
  253. package/dist/client/assets/{task-status-SfODZErT.js → task-status-BVK9hOjZ.js} +1 -1
  254. package/dist/client/assets/{taskboard-analytics-CerK1Pau.js → taskboard-analytics-CiXYmN63.js} +1 -1
  255. package/dist/client/assets/{tasks-D-ll0tka.js → tasks-BjZo5Fo1.js} +1 -1
  256. package/dist/client/assets/tasks-DcpRISSh.js +1 -0
  257. package/dist/client/assets/{textarea-Czh9V7Yz.js → textarea-Crbkqbuz.js} +1 -1
  258. package/dist/client/assets/{thread-analytics-jaTbSvK6.js → thread-analytics-CGJ4dU6A.js} +1 -1
  259. package/dist/client/assets/{thread-button-1Q3JXQEU.js → thread-button-Iiae4spP.js} +1 -1
  260. package/dist/client/assets/{thread-intent-CEfA_P9I.js → thread-intent-3sZpI08X.js} +1 -1
  261. package/dist/client/assets/{thread-route-uijiMPxh.js → thread-route-BAA8UtFQ.js} +1 -1
  262. package/dist/client/assets/{thread-route-Bqw7sU0F.js → thread-route-Bvyqd7wd.js} +1 -1
  263. package/dist/client/assets/{thread-sheet-body-C9l7h07l.js → thread-sheet-body-DqxbC3Or.js} +1 -1
  264. package/dist/client/assets/{toggle-group-lq2B3qIc.js → toggle-group-7Dr1QRv7.js} +1 -1
  265. package/dist/client/assets/{toolbar-icon-button-DOWuqRsT.js → toolbar-icon-button-CkizyPM4.js} +1 -1
  266. package/dist/client/assets/{tooltip-CxCpd2vh.js → tooltip-BX_EIFZx.js} +1 -1
  267. package/dist/client/assets/{track-Dhm24-m4.js → track-vmG-nRxn.js} +1 -1
  268. package/dist/client/assets/{types-B6rztgnY.js → types-D5TGgE6N.js} +1 -1
  269. package/dist/client/assets/{usage-stats-BFEJJHEo.js → usage-stats-CvltoOBH.js} +1 -1
  270. package/dist/client/assets/{use-ai-providers-B23SXI_f.js → use-ai-providers-BBTYyg8P.js} +1 -1
  271. package/dist/client/assets/{use-automations-D-adRU5z.js → use-automations-BlZlh8mp.js} +1 -1
  272. package/dist/client/assets/{use-autosave-Dc8uh5nF.js → use-autosave-xXDIWIWJ.js} +1 -1
  273. package/dist/client/assets/{use-connect-companion-JFx8RLXa.js → use-connect-companion-BSbW_Ju3.js} +1 -1
  274. package/dist/client/assets/{use-connection-B9c3iEps.js → use-connection-CrE81qJi.js} +1 -1
  275. package/dist/client/assets/{use-copy-C57femQY.js → use-copy-D4TIbhMe.js} +1 -1
  276. package/dist/client/assets/{use-create-virtual-mcp-Dfs-9sda.js → use-create-virtual-mcp-CuRBfvLz.js} +1 -1
  277. package/dist/client/assets/{use-date-fns-locale-BFb3ULJS.js → use-date-fns-locale-BhHWTG3K.js} +1 -1
  278. package/dist/client/assets/{use-debounced-autosave-Dco5Jt9P.js → use-debounced-autosave-Bw4o3_Zw.js} +1 -1
  279. package/dist/client/assets/{use-debounced-value-IfXb0kJG.js → use-debounced-value-DfVIFpLg.js} +1 -1
  280. package/dist/client/assets/{use-deco-credits-DNa0dEA5.js → use-deco-credits-CF4bywq4.js} +1 -1
  281. package/dist/client/assets/{use-decopilot-events-DyDz5Dvh.js → use-decopilot-events-YF4HlwXb.js} +1 -1
  282. package/dist/client/assets/{use-delete-connection-Du2Nx9s-.js → use-delete-connection-wMr9Uu7f.js} +1 -1
  283. package/dist/client/assets/{use-deployment-admin-D6zDzsS_.js → use-deployment-admin-Mn0HEYuD.js} +1 -1
  284. package/dist/client/assets/{use-entitlements-R7iGGl1k.js → use-entitlements-yqpltSF-.js} +1 -1
  285. package/dist/client/assets/{use-fast-preview-draft-url-UqkQUKSb.js → use-fast-preview-draft-url-BOIphrSf.js} +1 -1
  286. package/dist/client/assets/{use-file-configs-Cdbct8Cf.js → use-file-configs-MemDO-me.js} +1 -1
  287. package/dist/client/assets/{use-in-settings-CH61l7dC.js → use-in-settings-DB0hw1zu.js} +1 -1
  288. package/dist/client/assets/{use-infinite-scroll-CyOQA4SB.js → use-infinite-scroll-Cbikj4Pq.js} +1 -1
  289. package/dist/client/assets/{use-join-requests-CPo5qDn_.js → use-join-requests-TjFchFSd.js} +1 -1
  290. package/dist/client/assets/{use-main-panel-tabs-DT72lles.js → use-main-panel-tabs-r00ZOqDA.js} +1 -1
  291. package/dist/client/assets/{use-mcp-auth-status-CE4mQood.js → use-mcp-auth-status-Myd-JPfa.js} +1 -1
  292. package/dist/client/assets/{use-mcp-client-CgA0k7AX.js → use-mcp-client-BR_DXeP8.js} +1 -1
  293. package/dist/client/assets/{use-mcp-prompts--gNDdjf0.js → use-mcp-prompts-DkqcWZgO.js} +1 -1
  294. package/dist/client/assets/{use-mcp-tools-DjC5fBeS.js → use-mcp-tools-Be3QJcU4.js} +1 -1
  295. package/dist/client/assets/{use-members-i2T2it_v.js → use-members-D-Y2ThV6.js} +1 -1
  296. package/dist/client/assets/{use-mobile-DNQy-neC.js → use-mobile-Conlu_a3.js} +1 -1
  297. package/dist/client/assets/{use-navigate-to-agent-BmpybU3_.js → use-navigate-to-agent-EF0ZR5Ia.js} +1 -1
  298. package/dist/client/assets/{use-open-billing-url-jz-QPVzs.js → use-open-billing-url-De_dcOCW.js} +1 -1
  299. package/dist/client/assets/{use-org-auth-client-B7ZtWQAU.js → use-org-auth-client-CttLYCV5.js} +1 -1
  300. package/dist/client/assets/{use-org-fs-Dax61xWP.js → use-org-fs-CkOSi_FE.js} +1 -1
  301. package/dist/client/assets/{use-org-sso-0Z0wHR7c.js → use-org-sso-B2X6FOxf.js} +1 -1
  302. package/dist/client/assets/{use-organization-roles-OVZBs-M_.js → use-organization-roles-DylX1P3j.js} +1 -1
  303. package/dist/client/assets/{use-organization-settings-dzIa476E.js → use-organization-settings-DSpO89g3.js} +1 -1
  304. package/dist/client/assets/{use-panel-navigate-Dl11oG8L.js → use-panel-navigate-DA-8PNPm.js} +1 -1
  305. package/dist/client/assets/{use-project-native-view-presence-pXoLbAJi.js → use-project-native-view-presence-DBUyMyFo.js} +1 -1
  306. package/dist/client/assets/{use-project-scope-eV1RUVZG.js → use-project-scope-3ou33Tvp.js} +1 -1
  307. package/dist/client/assets/{use-releases-D4jayvGP.js → use-releases-KBXbo7MP.js} +1 -1
  308. package/dist/client/assets/{use-reports-diagnostic-C7fMxKgO.js → use-reports-diagnostic-B3bhjY1I.js} +1 -1
  309. package/dist/client/assets/{use-route-default-main-CXl47PXA.js → use-route-default-main-CGb0z4AT.js} +1 -1
  310. package/dist/client/assets/{use-secrets-CvGXZI7J.js → use-secrets-C9OyvdtH.js} +1 -1
  311. package/dist/client/assets/{use-section-preview-base-iip3gtjU.js → use-section-preview-base-CalUCZhG.js} +1 -1
  312. package/dist/client/assets/{use-session-runtime-CXsIHSqC.js → use-session-runtime-PHj1tP1Y.js} +1 -1
  313. package/dist/client/assets/{use-tags-DaYz9bo1.js → use-tags-B-gLtKGQ.js} +1 -1
  314. package/dist/client/assets/{use-task-board-analytics-DEETXgb8.js → use-task-board-analytics-D1MMktP0.js} +1 -1
  315. package/dist/client/assets/{use-task-metadata-B50R7YVb.js → use-task-metadata-BcDrCgHz.js} +1 -1
  316. package/dist/client/assets/{use-thread-analytics-B7GKRETB.js → use-thread-analytics-Dfm_RqUN.js} +1 -1
  317. package/dist/client/assets/{use-thread-outputs-a13sDbFX.js → use-thread-outputs-uJ7yrzFy.js} +1 -1
  318. package/dist/client/assets/{use-virtual-mcp-CDAUj4PY.js → use-virtual-mcp-C01zDEqD.js} +1 -1
  319. package/dist/client/assets/useInfiniteQuery-RDUps_Fq.js +1 -0
  320. package/dist/client/assets/{useQueries-qsAfW5MY.js → useQueries-BP5GI7XD.js} +1 -1
  321. package/dist/client/assets/useSuspenseInfiniteQuery-CUJCDA4c.js +1 -0
  322. package/dist/client/assets/{users-Dg0Pugfo.js → users-CaTn1vrt.js} +1 -1
  323. package/dist/client/assets/{utils-C77-XjSJ.js → utils-jA0q__Q1.js} +1 -1
  324. package/dist/client/assets/{variant-calendar-Bf5XWw8C.js → variant-calendar-CU0P3xXN.js} +1 -1
  325. package/dist/client/assets/{variant-matcher-override-W93uDCwe.js → variant-matcher-override-CSncXAh3.js} +1 -1
  326. package/dist/client/assets/{view-mode-toggle-DceLwxgk.js → view-mode-toggle-XPVtRrri.js} +1 -1
  327. package/dist/client/assets/{virtual-mcp-DhabdkeJ.js → virtual-mcp-CYKM5gcZ.js} +1 -1
  328. package/dist/client/index.html +1 -1
  329. package/dist/server/cli.js +367 -367
  330. package/dist/server/server.js +280 -280
  331. package/package.json +1 -1
  332. package/dist/client/assets/agent-app-BpLFU4fH.js +0 -1
  333. package/dist/client/assets/agent-deck-idtinKR_.js +0 -1
  334. package/dist/client/assets/agent-library-file-MlJkgMqI.js +0 -1
  335. package/dist/client/assets/agent-settings-CrMnMoYM.js +0 -1
  336. package/dist/client/assets/agent-site-editor-code-D8cBK_Ux.js +0 -2
  337. package/dist/client/assets/agent-view-Bohb1wKC.js +0 -1
  338. package/dist/client/assets/api-keys-CL0QJc9S.js +0 -1
  339. package/dist/client/assets/app-editor-CR1c2RpF.js +0 -1
  340. package/dist/client/assets/project-reports-DM8FxeCU.js +0 -1
  341. package/dist/client/assets/project-tasks-y98lccVT.js +0 -1
  342. package/dist/client/assets/record-editor-eoqHGqFA.js +0 -1
  343. package/dist/client/assets/reports-B2pQ333W.js +0 -1
  344. package/dist/client/assets/tasks-gcF8REwt.js +0 -1
  345. package/dist/client/assets/useInfiniteQuery-DW7bCHpf.js +0 -1
  346. package/dist/client/assets/useSuspenseInfiniteQuery-DF4BukrQ.js +0 -1
@@ -1 +1 @@
1
- import{c as w,o as D,K as k,b as L,aH as P,j as i}from"./index-CC25Ppah.js";import{j as $,aU as O,aV as I,a6 as F,aW as Q,aX as Y,aY as U}from"./runnable-block-editor-CqnIW6eK.js";import{L as A}from"./label-5K8407_a.js";import{S as K}from"./switch-EEYQU2u1.js";import{c as W,b as q,a as z,d as H,S as M}from"./select-Cfsqli3Z.js";function _(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function V(c,e,s,d){if(c.kind==="page"){if(!_(s))return null;const h=s.seo!==void 0?s.seo:e.rawSeoData;return{...s,seo:d===null?null:O(d,h)}}return _(s)?e.siteKind==="block"?d:{...s,seo:d}:null}function le(c,e){const s=c.__resolveType;return typeof s=="string"&&s.length>0?s:e.seoResolveType}function re(c){const e=w.c(23),{orgSlug:s,virtualMcpId:d,branch:h,target:o,resolved:t,onSaved:f}=c,a=D(),l=`${s}/${d}/${h}`;let u;e[0]!==h||e[1]!==s||e[2]!==d?(u={orgSlug:s,virtualMcpId:d,branch:h},e[0]=h,e[1]=s,e[2]=d,e[3]=u):u=e[3];let r;e[4]!==f?(r={onSaved:f},e[4]=f,e[5]=r):r=e[5];const{save:n,flush:m,isPending:p}=$(u,r);let y;e[6]!==l||e[7]!==a||e[8]!==t||e[9]!==n||e[10]!==o?(y=v=>{t&&n(t.blockKey,()=>{const S=a.getQueryData(k.decofile(l))?.[t.blockKey];return V(o,t,S,v)})},e[6]=l,e[7]=a,e[8]=t,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let x;e[12]!==l||e[13]!==a||e[14]!==t||e[15]!==n||e[16]!==o?(x=v=>{!t||o.kind!=="page"||n(t.blockKey,()=>{const S=a.getQueryData(k.decofile(l))?.[t.blockKey];return _(S)?{...S,seo:v}:null})},e[12]=l,e[13]=a,e[14]=t,e[15]=n,e[16]=o,e[17]=x):x=e[17];const b=x;let j;return e[18]!==m||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:m,isPending:p},e[18]=m,e[19]=p,e[20]=b,e[21]=g,e[22]=j):j=e[22],j}const X="https://deco.cx/docs/en/performance/edge-async-render";function G(c){const e=w.c(24),{rawSeo:s,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,t=L(),f=P();let a;e[0]!==s?(a=F(s),e[0]=s,e[1]=a):a=e[1];const l=a;let u;e[2]!==s?(u=I(s),e[2]=s,e[3]=u):u=e[3];const r=u;let n;e[4]!==t?(n=t("sectionsEditor.seoFormChrome.enableLabel"),e[4]=t,e[5]=n):n=e[5];let m;e[6]!==n?(m=i.jsx(A,{htmlFor:"seo-enable",className:"text-sm font-medium",children:n}),e[6]=n,e[7]=m):m=e[7];let p;e[8]!==l||e[9]!==d?(p=i.jsx(K,{id:"seo-enable",checked:l,onCheckedChange:d}),e[8]=l,e[9]=d,e[10]=p):p=e[10];let y;e[11]!==m||e[12]!==p?(y=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,p]}),e[11]=m,e[12]=p,e[13]=y):y=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==f||e[17]!==l||e[18]!==h||e[19]!==t?(g=l&&(f?o:i.jsxs(i.Fragment,{children:[o,i.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[i.jsxs("div",{className:"min-w-0 space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:t("sectionsEditor.seoFormChrome.asyncRenderLabel")}),i.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",i.jsx("a",{href:X,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:t("sectionsEditor.seoFormChrome.documentationLinkText")}),"."]})]}),i.jsx(K,{id:"seo-async-render",checked:r,onCheckedChange:h,className:"shrink-0"})]})]})),e[14]=r,e[15]=o,e[16]=f,e[17]=l,e[18]=h,e[19]=t,e[20]=g):g=e[20];let x;return e[21]!==y||e[22]!==g?(x=i.jsxs("div",{className:"space-y-4",children:[y,g]}),e[21]=y,e[22]=g,e[23]=x):x=e[23],x}function J(c){const e=w.c(20),{options:s,value:d,onChange:h}=c,o=L();if(s.length<=1)return null;let t;e[0]!==o?(t=o("sectionsEditor.seoTypeSelect.label"),e[0]=o,e[1]=t):t=e[1];let f;e[2]!==t?(f=i.jsx(A,{className:"text-xs text-muted-foreground",children:t}),e[2]=t,e[3]=f):f=e[3];let a;e[4]!==o?(a=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=a):a=e[5];let l;e[6]!==a?(l=i.jsx(q,{className:"w-full",children:i.jsx(z,{placeholder:a})}),e[6]=a,e[7]=l):l=e[7];let u;e[8]!==s?(u=s.filter(B).map(Z),e[8]=s,e[9]=u):u=e[9];let r;e[10]!==u?(r=i.jsx(H,{children:u}),e[10]=u,e[11]=r):r=e[11];let n;e[12]!==h||e[13]!==l||e[14]!==r||e[15]!==d?(n=i.jsxs(M,{value:d,onValueChange:h,children:[l,r]}),e[12]=h,e[13]=l,e[14]=r,e[15]=d,e[16]=n):n=e[16];let m;return e[17]!==f||e[18]!==n?(m=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=m):m=e[19],m}function Z(c){return i.jsx(W,{value:c.resolveType,children:c.title},c.resolveType)}function B(c){return c.resolveType.length>0}function ae(c){const e=w.c(33),{rawSeo:s,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:t,seoTypeOptions:f,formResetKey:a,siteDefaultSeo:l,onBreadcrumbChange:u,onPersistRaw:r,onInnerChange:n,onClearForm:m,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==m||e[3]!==r?(g=C=>{if(C){const N=U(h);r(N),m(),p();return}r(null),m(),p()},e[0]=h,e[1]=p,e[2]=m,e[3]=r,e[4]=g):g=e[4];const x=g;let b;e[5]!==r||e[6]!==s?(b=C=>{const N=Q(C,s);r(N)},e[5]=r,e[6]=s,e[7]=b):b=e[7];const j=b;let v;e[8]!==p||e[9]!==n?(v=C=>{n({__resolveType:C}),p()},e[8]=p,e[9]=n,e[10]=v):v=e[10];const T=v;let S;e[11]!==t||e[12]!==T||e[13]!==s||e[14]!==o||e[15]!==f?(S=F(s)&&o&&t&&f&&f.length>0&&i.jsx(J,{options:f,value:t,onChange:T}),e[11]=t,e[12]=T,e[13]=s,e[14]=o,e[15]=f,e[16]=S):S=e[16];let R;e[17]!==t||e[18]!==a||e[19]!==d||e[20]!==u||e[21]!==n||e[22]!==s||e[23]!==o||e[24]!==l?(R=F(s)&&o&&t&&i.jsx(Y,{schema:o,resolveType:t,value:d,formResetKey:a,onChange:C=>n(C),onBreadcrumbChange:u,siteDefaultSeo:l}),e[17]=t,e[18]=a,e[19]=d,e[20]=u,e[21]=n,e[22]=s,e[23]=o,e[24]=l,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==x||e[29]!==s||e[30]!==S||e[31]!==R?(E=i.jsxs(G,{rawSeo:s,onEnableChange:x,onAsyncRenderChange:j,children:[y,S,R]}),e[26]=y,e[27]=j,e[28]=x,e[29]=s,e[30]=S,e[31]=R,e[32]=E):E=e[32],E}export{ae as P,le as a,V as b,re as u};
1
+ import{c as w,o as D,K as k,b as L,aH as P,j as i}from"./index-CK2jC1b8.js";import{j as $,aU as O,aV as I,a6 as F,aW as Q,aX as Y,aY as U}from"./runnable-block-editor-CTcUBv1Z.js";import{L as A}from"./label-C32hF8xr.js";import{S as K}from"./switch-DCOUunxF.js";import{c as W,b as q,a as z,d as H,S as M}from"./select-D4vELKrF.js";function _(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function V(c,e,s,d){if(c.kind==="page"){if(!_(s))return null;const h=s.seo!==void 0?s.seo:e.rawSeoData;return{...s,seo:d===null?null:O(d,h)}}return _(s)?e.siteKind==="block"?d:{...s,seo:d}:null}function le(c,e){const s=c.__resolveType;return typeof s=="string"&&s.length>0?s:e.seoResolveType}function re(c){const e=w.c(23),{orgSlug:s,virtualMcpId:d,branch:h,target:o,resolved:t,onSaved:f}=c,a=D(),l=`${s}/${d}/${h}`;let u;e[0]!==h||e[1]!==s||e[2]!==d?(u={orgSlug:s,virtualMcpId:d,branch:h},e[0]=h,e[1]=s,e[2]=d,e[3]=u):u=e[3];let r;e[4]!==f?(r={onSaved:f},e[4]=f,e[5]=r):r=e[5];const{save:n,flush:m,isPending:p}=$(u,r);let y;e[6]!==l||e[7]!==a||e[8]!==t||e[9]!==n||e[10]!==o?(y=v=>{t&&n(t.blockKey,()=>{const S=a.getQueryData(k.decofile(l))?.[t.blockKey];return V(o,t,S,v)})},e[6]=l,e[7]=a,e[8]=t,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let x;e[12]!==l||e[13]!==a||e[14]!==t||e[15]!==n||e[16]!==o?(x=v=>{!t||o.kind!=="page"||n(t.blockKey,()=>{const S=a.getQueryData(k.decofile(l))?.[t.blockKey];return _(S)?{...S,seo:v}:null})},e[12]=l,e[13]=a,e[14]=t,e[15]=n,e[16]=o,e[17]=x):x=e[17];const b=x;let j;return e[18]!==m||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:m,isPending:p},e[18]=m,e[19]=p,e[20]=b,e[21]=g,e[22]=j):j=e[22],j}const X="https://deco.cx/docs/en/performance/edge-async-render";function G(c){const e=w.c(24),{rawSeo:s,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,t=L(),f=P();let a;e[0]!==s?(a=F(s),e[0]=s,e[1]=a):a=e[1];const l=a;let u;e[2]!==s?(u=I(s),e[2]=s,e[3]=u):u=e[3];const r=u;let n;e[4]!==t?(n=t("sectionsEditor.seoFormChrome.enableLabel"),e[4]=t,e[5]=n):n=e[5];let m;e[6]!==n?(m=i.jsx(A,{htmlFor:"seo-enable",className:"text-sm font-medium",children:n}),e[6]=n,e[7]=m):m=e[7];let p;e[8]!==l||e[9]!==d?(p=i.jsx(K,{id:"seo-enable",checked:l,onCheckedChange:d}),e[8]=l,e[9]=d,e[10]=p):p=e[10];let y;e[11]!==m||e[12]!==p?(y=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,p]}),e[11]=m,e[12]=p,e[13]=y):y=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==f||e[17]!==l||e[18]!==h||e[19]!==t?(g=l&&(f?o:i.jsxs(i.Fragment,{children:[o,i.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[i.jsxs("div",{className:"min-w-0 space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:t("sectionsEditor.seoFormChrome.asyncRenderLabel")}),i.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",i.jsx("a",{href:X,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:t("sectionsEditor.seoFormChrome.documentationLinkText")}),"."]})]}),i.jsx(K,{id:"seo-async-render",checked:r,onCheckedChange:h,className:"shrink-0"})]})]})),e[14]=r,e[15]=o,e[16]=f,e[17]=l,e[18]=h,e[19]=t,e[20]=g):g=e[20];let x;return e[21]!==y||e[22]!==g?(x=i.jsxs("div",{className:"space-y-4",children:[y,g]}),e[21]=y,e[22]=g,e[23]=x):x=e[23],x}function J(c){const e=w.c(20),{options:s,value:d,onChange:h}=c,o=L();if(s.length<=1)return null;let t;e[0]!==o?(t=o("sectionsEditor.seoTypeSelect.label"),e[0]=o,e[1]=t):t=e[1];let f;e[2]!==t?(f=i.jsx(A,{className:"text-xs text-muted-foreground",children:t}),e[2]=t,e[3]=f):f=e[3];let a;e[4]!==o?(a=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=a):a=e[5];let l;e[6]!==a?(l=i.jsx(q,{className:"w-full",children:i.jsx(z,{placeholder:a})}),e[6]=a,e[7]=l):l=e[7];let u;e[8]!==s?(u=s.filter(B).map(Z),e[8]=s,e[9]=u):u=e[9];let r;e[10]!==u?(r=i.jsx(H,{children:u}),e[10]=u,e[11]=r):r=e[11];let n;e[12]!==h||e[13]!==l||e[14]!==r||e[15]!==d?(n=i.jsxs(M,{value:d,onValueChange:h,children:[l,r]}),e[12]=h,e[13]=l,e[14]=r,e[15]=d,e[16]=n):n=e[16];let m;return e[17]!==f||e[18]!==n?(m=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=m):m=e[19],m}function Z(c){return i.jsx(W,{value:c.resolveType,children:c.title},c.resolveType)}function B(c){return c.resolveType.length>0}function ae(c){const e=w.c(33),{rawSeo:s,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:t,seoTypeOptions:f,formResetKey:a,siteDefaultSeo:l,onBreadcrumbChange:u,onPersistRaw:r,onInnerChange:n,onClearForm:m,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==m||e[3]!==r?(g=C=>{if(C){const N=U(h);r(N),m(),p();return}r(null),m(),p()},e[0]=h,e[1]=p,e[2]=m,e[3]=r,e[4]=g):g=e[4];const x=g;let b;e[5]!==r||e[6]!==s?(b=C=>{const N=Q(C,s);r(N)},e[5]=r,e[6]=s,e[7]=b):b=e[7];const j=b;let v;e[8]!==p||e[9]!==n?(v=C=>{n({__resolveType:C}),p()},e[8]=p,e[9]=n,e[10]=v):v=e[10];const T=v;let S;e[11]!==t||e[12]!==T||e[13]!==s||e[14]!==o||e[15]!==f?(S=F(s)&&o&&t&&f&&f.length>0&&i.jsx(J,{options:f,value:t,onChange:T}),e[11]=t,e[12]=T,e[13]=s,e[14]=o,e[15]=f,e[16]=S):S=e[16];let R;e[17]!==t||e[18]!==a||e[19]!==d||e[20]!==u||e[21]!==n||e[22]!==s||e[23]!==o||e[24]!==l?(R=F(s)&&o&&t&&i.jsx(Y,{schema:o,resolveType:t,value:d,formResetKey:a,onChange:C=>n(C),onBreadcrumbChange:u,siteDefaultSeo:l}),e[17]=t,e[18]=a,e[19]=d,e[20]=u,e[21]=n,e[22]=s,e[23]=o,e[24]=l,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==x||e[29]!==s||e[30]!==S||e[31]!==R?(E=i.jsxs(G,{rawSeo:s,onEnableChange:x,onAsyncRenderChange:j,children:[y,S,R]}),e[26]=y,e[27]=j,e[28]=x,e[29]=s,e[30]=S,e[31]=R,e[32]=E):E=e[32],E}export{ae as P,le as a,V as b,re as u};
@@ -1,4 +1,4 @@
1
- import{r as R,c as E,b as U,j as a,ak as tt,l as K,X as ge,o as es,a3 as ts,e as ss,K as he,t as ze,m as dt,aa as ns,E as ls,h as as,B as He,aD as ft,a9 as os,dU as mt,s as rs,p as qe,d as We,d1 as is,dJ as cs,dV as us}from"./index-CC25Ppah.js";import{aL as ds,aM as fs,au as ms,Q as De,J as ps,a as st,an as gs,Y as xs,aN as hs,aO as pt,aP as bs,l as Fe,aG as ys,aF as js,aQ as gt,aR as xt,A as ht,aS as fe,R as vs,y as Ns,e as Ss}from"./agent-icon-CPkpuu5N.js";import{t as Ie,f as ks,b as _s}from"./Tool01-TjgiGeiC.js";import{i as bt}from"./ArrowRight-DiT079bV.js";import{i as yt}from"./Check-DAeVWel0.js";import{a as ws}from"./Copy01-DAVjKSIW.js";import{b as je,t as Ge,c as nt}from"./format-time-BtXRrtv4.js";import{b as Cs,C as Ts,a as Is}from"./collapsible-Cvuvqexz.js";import{u as $s}from"./use-copy-C57femQY.js";import{a as jt,M as $e,b as As}from"./usage-stats-BFEJJHEo.js";import{h as Ms,u as Es,r as Ls,i as Ps}from"./hooks-y4FNzMnr.js";import{f as ve,r as Rs,u as Ne,v as zs,a as Ds,w as Fs,x as Bs}from"./chat-context-WNSIRKCQ.js";import{b as Ke,a as Os,e as Us}from"./shell-layout-Bq2laVk4.js";import{c as Hs}from"./content-blocks-o63cs2vh.js";import{M as qs}from"./mcp-app-renderer-DT5aj_bA.js";import{g as vt}from"./types-B6rztgnY.js";import{o as Ws}from"./omit-sandbox-map-jj4lCB2U.js";import{T as Nt,a as St,c as kt}from"./tooltip-CxCpd2vh.js";import{c as Gs,u as _t}from"./use-mcp-client-CgA0k7AX.js";import{g as wt,s as Ct}from"./gateway-client-Bv7LvgK9.js";import{s as Tt}from"./tool-namespace-DmnQIdtF.js";import{t as Ks,g as pe,u as be}from"./utils-CVEq3hMx.js";import{i as It}from"./AlertCircle-BjnxyDOP.js";import{s as Vs,n as Js}from"./Eye-DQ7cfCM0.js";import{s as Qs}from"./XClose-Ck6U0czU.js";import{a as Xs,i as Ys}from"./Share07-BnshXTQj.js";import{i as Zs}from"./SearchMd-DX0K-HMy.js";import{a as Ve}from"./use-panel-navigate-Dl11oG8L.js";import{a as _e}from"./Image01-DbwBpUqU.js";import{b as $t}from"./use-entitlements-R7iGGl1k.js";import{I as en,M as At}from"./markdown-BU3lUbXy.js";import{n as Mt}from"./LinkExternal01-CXDDMqr6.js";import{c as tn,S as sn,a as nn,b as ln}from"./sheet-BhcdHJA0.js";import{I as Se}from"./integration-icon-DzNK1v4_.js";import{a as Et}from"./use-connection-B9c3iEps.js";import{a as me}from"./Palette-DWlnTZiX.js";import{u as Lt}from"./use-navigate-to-agent-BmpybU3_.js";import{i as we}from"./Link01-zc_yw7bC.js";import{g as an}from"./use-mcp-prompts--gNDdjf0.js";import{c as on,P as rn,u as cn,e as un,F as dn,s as fn,b as mn}from"./index-DVEm55Ak.js";import{i as pn}from"./Monitor01-DWGOwDQg.js";import{a as gn}from"./use-thread-outputs-a13sDbFX.js";import{F as xn}from"./file-type-icon-C06txfjh.js";import{t as hn}from"./ChevronUp-BZ-l57nk.js";const bn={damping:.7,stiffness:.05,mass:1.25},yn=70,jn=1e3/60,vn=350;let Ae=!1;globalThis.document?.addEventListener("mousedown",()=>{Ae=!0});globalThis.document?.addEventListener("mouseup",()=>{Ae=!1});globalThis.document?.addEventListener("click",()=>{Ae=!1});const Nn=(s={})=>{const[e,t]=R.useState(!1),[l,n]=R.useState(s.initial!==!1),[c,u]=R.useState(!1),i=R.useRef(null);i.current=s;const r=R.useCallback(()=>{if(!Ae)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),o=R.useCallback(b=>{d.isAtBottom=b,n(b)},[]),m=R.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:j}=getComputedStyle(x.current);j!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,j!=="auto"&&(x.current.style.scrollBehavior=j)}},get targetScrollTop(){return!x.current||!v.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!v.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:x.current,contentElement:v.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=yn}}},[]),f=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||o(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:_=!1}=b;let y,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{y=Date.now()}):y=k+(b.duration??0);const N=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,M=performance.now(),A=(M-(d.lastTick??M))/jn;if(d.animation||(d.animation={behavior:j,promise:w,ignoreEscapes:_}),d.animation.behavior===j&&(d.lastTick=M),r()||k>Date.now())return N();if(C<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*A,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return N()}return y>Date.now()?(S=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Le(i.current,i.current.resize),ignoreEscapes:_,duration:Math.max(0,y-Date.now())||void 0}):d.isAtBottom)});return w.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:N()},[o,r,d]),p=R.useCallback(()=>{m(!0),o(!1)},[m,o]),g=R.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:_=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(_=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(r()){m(!0),o(!1);return}const y=k>_,S=k<_;if(d.animation?.ignoreEscapes){d.scrollTop=_;return}S&&(m(!0),o(!1)),y&&m(!1),!d.escapedFromLock&&d.isNearBottom&&o(!0)},1)},[m,o,r,d]),h=R.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),o(!1))},[m,o,d]),x=lt(b=>{x.current?.removeEventListener("scroll",g),x.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),v=lt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:_}=j.contentRect,y=_-(k??_);if(d.resizeDifference=y,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),y>=0){const S=Le(i.current,k?i.current.resize:i.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:vn})}else d.isNearBottom&&(m(!1),o(!0));k=_,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===y&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:v,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:l||c,isNearBottom:c,escapedFromLock:e,state:d}};function lt(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const Ee=new Map;function Le(...s){const e={...bn};let t=!1;for(const n of s){if(n==="instant"){t=!0;continue}typeof n=="object"&&(t=!1,e.damping=n.damping??e.damping,e.stiffness=n.stiffness??e.stiffness,e.mass=n.mass??e.mass)}const l=JSON.stringify(e);return Ee.has(l)||Ee.set(l,Object.freeze(e)),t?"instant":Ee.get(l)}function H({icon:s,title:e,usage:t,summary:l,state:n,detail:c,detailVariant:u="code",forceOpen:i,variant:r="default",trailing:o,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[h,x]=R.useState(f??!1),{handleCopy:v,copied:b}=$s(),k=n==="loading",j=n==="error",y=!!(c&&c.trim())||!!p,S=r==="subtask",N=(i??!1)||h,w=Nn({initial:k?"instant":!1}),C=a.jsxs(Cs,{open:N,onOpenChange:i?void 0:x,className:"min-w-0",children:[a.jsxs(Ts,{disabled:!y,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",y&&"[@media(hover:hover)]:hover:bg-accent/30",!y&&"cursor-default",k&&"shimmer"),"aria-disabled":!y,children:[a.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?a.jsx(tt,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",y&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),y&&a.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:a.jsx(tt,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),a.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):a.jsx("div",{className:"flex-1"}),o&&a.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:o}),a.jsx(jt,{usage:t})]}),y&&a.jsx(Is,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?a.jsx("div",{className:"mt-1 mb-1",children:a.jsx("div",{ref:w.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a.jsx("p",{ref:w.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:c})})}):a.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:a.jsx("div",{ref:w.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:a.jsxs("div",{ref:w.contentRef,className:"flex items-start justify-between gap-2",children:[a.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:a.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:c})}),a.jsx("button",{type:"button",onClick:()=>v(c),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?a.jsx(yt,{className:"size-3.5"}):a.jsx(ws,{className:"size-3.5"})})]})})}))})]});return S?a.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:C}):C}function ne(s){const e=E.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=je(t),e[0]=t,e[1]=l):l=e[1];let n;return e[2]!==l?(n=a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=n):n=e[3],n}const Pt=4;function Rt(s){const e=E.c(8),{count:t,noun:l,onClick:n}=s,c=U();let u;e[0]!==t||e[1]!==l||e[2]!==c?(u=c("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=c,e[3]=u):u=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(bt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==u?(r=a.jsxs("button",{type:"button",onClick:n,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,i]}),e[5]=n,e[6]=u,e[7]=r):r=e[7],r}function zt(s){const e=E.c(12),{message:t,className:l}=s,n=t.created_at??t.metadata?.created_at??null;let c,u,i,r;if(e[0]!==l||e[1]!==n){r=Symbol.for("react.early_return_sentinel");e:{const m=Ge(n);if(m===null){r=null;break e}const d=new Date(m);c=d.toLocaleString(),e[6]!==l?(u=K("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=u):u=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=n,e[2]=c,e[3]=u,e[4]=i,e[5]=r}else c=e[2],u=e[3],i=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let o;return e[8]!==c||e[9]!==u||e[10]!==i?(o=a.jsx("span",{title:c,className:u,children:i}),e[8]=c,e[9]=u,e[10]=i,e[11]=o):o=e[11],o}function Be(s){const e=E.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>nt(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[n,c]=R.useState(l);let u,i;e[2]!==t?(u=()=>{const d=setInterval(()=>c(nt(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=u,e[4]=i):(u=e[3],i=e[4]),R.useEffect(u,i);const r=n/1e3;let o;e[5]!==r?(o=je(r),e[5]=r,e[6]=o):o=e[6];let m;return e[7]!==o?(m=a.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:o}),e[7]=o,e[8]=m):m=e[8],m}const Dt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=E.c(5),[e]=R.useState(kn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Dt.map((c,u)=>{const{delay:i}=c;return a.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},u)}),s[1]=e,s[2]=l):l=s[2];let n;return s[3]!==l?(n=a.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=n):n=s[4],n}function kn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Dt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function _n(s){return{planning:{icon:a.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const wn=1200;function Oe(s){const e=E.c(8),{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:i,trailing:r}=s,o=i===void 0?"prose":i;let m;return e[0]!==c||e[1]!==o||e[2]!==t||e[3]!==u||e[4]!==n||e[5]!==l||e[6]!==r?(m=a.jsx(H,{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:o,trailing:r}),e[0]=c,e[1]=o,e[2]=t,e[3]=u,e[4]=n,e[5]=l,e[6]=r,e[7]=m):m=e[7],m}function Cn(s){const e=E.c(22),{startedAt:t}=s,l=U(),n=ve()?.runStatusStage??null,[c,u]=R.useState("planning");let i,r;if(e[0]!==n?(i=()=>{if(n!==null)return;const h=setTimeout(()=>{u("thinking")},wn);return()=>{clearTimeout(h)}},r=[n],e[0]=n,e[1]=i,e[2]=r):(i=e[1],r=e[2]),R.useEffect(i,r),n!==null){let h;e[3]!==n||e[4]!==l?(h=Ms(l,n),e[3]=n,e[4]=l,e[5]=h):h=e[5];const x=h;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Ie,{className:"size-4"}),e[6]=v):v=e[6];const b=`${x.label}...`;let k;e[7]!==t?(k=t!==null&&a.jsx(Be,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==x.detail||e[10]!==b||e[11]!==k?(j=a.jsx(Oe,{icon:v,title:b,summary:x.detail,state:"loading",trailing:k}),e[9]=x.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let o;e[13]!==l?(o=_n(l),e[13]=l,e[14]=o):o=e[14];const d=o[c],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&a.jsx(Be,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=a.jsx(Oe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function Tn(s){const e=E.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(Sn,{}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=a.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,a.jsx(Be,{since:t})]}),e[1]=t,e[2]=n):n=e[2],n}const In=2e4;function $n(s){const e=E.c(9),{startedAt:t}=s,l=U(),n=Ke(1e3),c=ve(),i=(t!==null?n-t:0)>=In;let r;e[0]!==t?(r=a.jsx(Cn,{startedAt:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==i||e[3]!==c||e[4]!==l?(o=i&&c?.stop&&a.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[a.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),a.jsx("button",{type:"button",onClick:()=>c.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=c,e[4]=l,e[5]=o):o=e[5];let m;return e[6]!==r||e[7]!==o?(m=a.jsxs("div",{className:"flex flex-col gap-0.5",children:[r,o]}),e[6]=r,e[7]=o,e[8]=m):m=e[8],m}function An(s){const e=E.c(24),{duration:t,parts:l,isStreaming:n}=s,c=U();let u;e[0]!==l?(u=l.every(Ln),e[0]=l,e[1]=u):u=e[1];const i=u;let r;e[2]!==t||e[3]!==c?(r=t&&t/1e3>1?c("chat.thinkingIndicator.thoughtFor",{duration:je(t/1e3)}):c("chat.thinkingIndicator.thought"),e[2]=t,e[3]=c,e[4]=r):r=e[4];const o=r;let m;if(e[5]!==i||e[6]!==n||e[7]!==l){const k=l.map(En).join(`
1
+ import{r as R,c as E,b as U,j as a,ak as tt,l as K,X as ge,o as es,a3 as ts,e as ss,K as he,t as ze,m as dt,aa as ns,E as ls,h as as,B as He,aD as ft,a9 as os,dU as mt,s as rs,p as qe,d as We,d1 as is,dJ as cs,dV as us}from"./index-CK2jC1b8.js";import{aL as ds,aM as fs,au as ms,Q as De,J as ps,a as st,an as gs,Y as xs,aN as hs,aO as pt,aP as bs,l as Fe,aG as ys,aF as js,aQ as gt,aR as xt,A as ht,aS as fe,R as vs,y as Ns,e as Ss}from"./agent-icon-Jo8-4dPq.js";import{t as Ie,f as ks,b as _s}from"./Tool01-PaohPsXN.js";import{i as bt}from"./ArrowRight-Cx_2CtPy.js";import{i as yt}from"./Check-DMZ0RIwh.js";import{a as ws}from"./Copy01-B-dz9iXg.js";import{b as je,t as Ge,c as nt}from"./format-time-BtXRrtv4.js";import{b as Cs,C as Ts,a as Is}from"./collapsible-ATnyEj_S.js";import{u as $s}from"./use-copy-D4TIbhMe.js";import{a as jt,M as $e,b as As}from"./usage-stats-CvltoOBH.js";import{h as Ms,u as Es,r as Ls,i as Ps}from"./hooks-BaT6zpiH.js";import{f as ve,r as Rs,u as Ne,v as zs,a as Ds,w as Fs,x as Bs}from"./chat-context-CNmaHg6E.js";import{b as Ke,a as Os,e as Us}from"./shell-layout-0w3S7Z17.js";import{c as Hs}from"./content-blocks-o63cs2vh.js";import{M as qs}from"./mcp-app-renderer-CutrdRC_.js";import{g as vt}from"./types-D5TGgE6N.js";import{o as Ws}from"./omit-sandbox-map-jj4lCB2U.js";import{T as Nt,a as St,c as kt}from"./tooltip-BX_EIFZx.js";import{c as Gs,u as _t}from"./use-mcp-client-BR_DXeP8.js";import{g as wt,s as Ct}from"./gateway-client-aZG77Xf7.js";import{s as Tt}from"./tool-namespace-DmnQIdtF.js";import{t as Ks,g as pe,u as be}from"./utils-CVEq3hMx.js";import{i as It}from"./AlertCircle-YzP1ItvL.js";import{s as Vs,n as Js}from"./Eye-ZgodVkyQ.js";import{s as Qs}from"./XClose-CbmBXBAq.js";import{a as Xs,i as Ys}from"./Share07-DGVeEnhS.js";import{i as Zs}from"./SearchMd-CqrAQSvB.js";import{a as Ve}from"./use-panel-navigate-DA-8PNPm.js";import{a as _e}from"./Image01-GZwmFlKM.js";import{b as $t}from"./use-entitlements-yqpltSF-.js";import{I as en,M as At}from"./markdown-CCVwyZmB.js";import{n as Mt}from"./LinkExternal01-D-eEFhKO.js";import{c as tn,S as sn,a as nn,b as ln}from"./sheet-6Vxtignr.js";import{I as Se}from"./integration-icon-CicyoW2g.js";import{a as Et}from"./use-connection-CrE81qJi.js";import{a as me}from"./Palette-H8aWBRVl.js";import{u as Lt}from"./use-navigate-to-agent-EF0ZR5Ia.js";import{i as we}from"./Link01-BdK1ByU5.js";import{g as an}from"./use-mcp-prompts-DkqcWZgO.js";import{c as on,P as rn,u as cn,e as un,F as dn,s as fn,b as mn}from"./index-A41c0be0.js";import{i as pn}from"./Monitor01-Dqm9KsCN.js";import{a as gn}from"./use-thread-outputs-uJ7yrzFy.js";import{F as xn}from"./file-type-icon-BDgGUbiO.js";import{t as hn}from"./ChevronUp-G7F3VYIf.js";const bn={damping:.7,stiffness:.05,mass:1.25},yn=70,jn=1e3/60,vn=350;let Ae=!1;globalThis.document?.addEventListener("mousedown",()=>{Ae=!0});globalThis.document?.addEventListener("mouseup",()=>{Ae=!1});globalThis.document?.addEventListener("click",()=>{Ae=!1});const Nn=(s={})=>{const[e,t]=R.useState(!1),[l,n]=R.useState(s.initial!==!1),[c,u]=R.useState(!1),i=R.useRef(null);i.current=s;const r=R.useCallback(()=>{if(!Ae)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),o=R.useCallback(b=>{d.isAtBottom=b,n(b)},[]),m=R.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:j}=getComputedStyle(x.current);j!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,j!=="auto"&&(x.current.style.scrollBehavior=j)}},get targetScrollTop(){return!x.current||!v.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!v.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:x.current,contentElement:v.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=yn}}},[]),f=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||o(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:_=!1}=b;let y,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{y=Date.now()}):y=k+(b.duration??0);const N=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,M=performance.now(),A=(M-(d.lastTick??M))/jn;if(d.animation||(d.animation={behavior:j,promise:w,ignoreEscapes:_}),d.animation.behavior===j&&(d.lastTick=M),r()||k>Date.now())return N();if(C<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*A,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return N()}return y>Date.now()?(S=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Le(i.current,i.current.resize),ignoreEscapes:_,duration:Math.max(0,y-Date.now())||void 0}):d.isAtBottom)});return w.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:N()},[o,r,d]),p=R.useCallback(()=>{m(!0),o(!1)},[m,o]),g=R.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:_=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(_=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(r()){m(!0),o(!1);return}const y=k>_,S=k<_;if(d.animation?.ignoreEscapes){d.scrollTop=_;return}S&&(m(!0),o(!1)),y&&m(!1),!d.escapedFromLock&&d.isNearBottom&&o(!0)},1)},[m,o,r,d]),h=R.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),o(!1))},[m,o,d]),x=lt(b=>{x.current?.removeEventListener("scroll",g),x.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),v=lt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:_}=j.contentRect,y=_-(k??_);if(d.resizeDifference=y,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),y>=0){const S=Le(i.current,k?i.current.resize:i.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:vn})}else d.isNearBottom&&(m(!1),o(!0));k=_,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===y&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:v,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:l||c,isNearBottom:c,escapedFromLock:e,state:d}};function lt(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const Ee=new Map;function Le(...s){const e={...bn};let t=!1;for(const n of s){if(n==="instant"){t=!0;continue}typeof n=="object"&&(t=!1,e.damping=n.damping??e.damping,e.stiffness=n.stiffness??e.stiffness,e.mass=n.mass??e.mass)}const l=JSON.stringify(e);return Ee.has(l)||Ee.set(l,Object.freeze(e)),t?"instant":Ee.get(l)}function H({icon:s,title:e,usage:t,summary:l,state:n,detail:c,detailVariant:u="code",forceOpen:i,variant:r="default",trailing:o,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[h,x]=R.useState(f??!1),{handleCopy:v,copied:b}=$s(),k=n==="loading",j=n==="error",y=!!(c&&c.trim())||!!p,S=r==="subtask",N=(i??!1)||h,w=Nn({initial:k?"instant":!1}),C=a.jsxs(Cs,{open:N,onOpenChange:i?void 0:x,className:"min-w-0",children:[a.jsxs(Ts,{disabled:!y,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",y&&"[@media(hover:hover)]:hover:bg-accent/30",!y&&"cursor-default",k&&"shimmer"),"aria-disabled":!y,children:[a.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?a.jsx(tt,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",y&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),y&&a.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:a.jsx(tt,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),a.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):a.jsx("div",{className:"flex-1"}),o&&a.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:o}),a.jsx(jt,{usage:t})]}),y&&a.jsx(Is,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?a.jsx("div",{className:"mt-1 mb-1",children:a.jsx("div",{ref:w.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a.jsx("p",{ref:w.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:c})})}):a.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:a.jsx("div",{ref:w.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:a.jsxs("div",{ref:w.contentRef,className:"flex items-start justify-between gap-2",children:[a.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:a.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:c})}),a.jsx("button",{type:"button",onClick:()=>v(c),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?a.jsx(yt,{className:"size-3.5"}):a.jsx(ws,{className:"size-3.5"})})]})})}))})]});return S?a.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:C}):C}function ne(s){const e=E.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=je(t),e[0]=t,e[1]=l):l=e[1];let n;return e[2]!==l?(n=a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=n):n=e[3],n}const Pt=4;function Rt(s){const e=E.c(8),{count:t,noun:l,onClick:n}=s,c=U();let u;e[0]!==t||e[1]!==l||e[2]!==c?(u=c("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=c,e[3]=u):u=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(bt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==u?(r=a.jsxs("button",{type:"button",onClick:n,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,i]}),e[5]=n,e[6]=u,e[7]=r):r=e[7],r}function zt(s){const e=E.c(12),{message:t,className:l}=s,n=t.created_at??t.metadata?.created_at??null;let c,u,i,r;if(e[0]!==l||e[1]!==n){r=Symbol.for("react.early_return_sentinel");e:{const m=Ge(n);if(m===null){r=null;break e}const d=new Date(m);c=d.toLocaleString(),e[6]!==l?(u=K("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=u):u=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=n,e[2]=c,e[3]=u,e[4]=i,e[5]=r}else c=e[2],u=e[3],i=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let o;return e[8]!==c||e[9]!==u||e[10]!==i?(o=a.jsx("span",{title:c,className:u,children:i}),e[8]=c,e[9]=u,e[10]=i,e[11]=o):o=e[11],o}function Be(s){const e=E.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>nt(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[n,c]=R.useState(l);let u,i;e[2]!==t?(u=()=>{const d=setInterval(()=>c(nt(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=u,e[4]=i):(u=e[3],i=e[4]),R.useEffect(u,i);const r=n/1e3;let o;e[5]!==r?(o=je(r),e[5]=r,e[6]=o):o=e[6];let m;return e[7]!==o?(m=a.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:o}),e[7]=o,e[8]=m):m=e[8],m}const Dt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=E.c(5),[e]=R.useState(kn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Dt.map((c,u)=>{const{delay:i}=c;return a.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},u)}),s[1]=e,s[2]=l):l=s[2];let n;return s[3]!==l?(n=a.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=n):n=s[4],n}function kn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Dt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function _n(s){return{planning:{icon:a.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const wn=1200;function Oe(s){const e=E.c(8),{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:i,trailing:r}=s,o=i===void 0?"prose":i;let m;return e[0]!==c||e[1]!==o||e[2]!==t||e[3]!==u||e[4]!==n||e[5]!==l||e[6]!==r?(m=a.jsx(H,{icon:t,title:l,summary:n,detail:c,state:u,detailVariant:o,trailing:r}),e[0]=c,e[1]=o,e[2]=t,e[3]=u,e[4]=n,e[5]=l,e[6]=r,e[7]=m):m=e[7],m}function Cn(s){const e=E.c(22),{startedAt:t}=s,l=U(),n=ve()?.runStatusStage??null,[c,u]=R.useState("planning");let i,r;if(e[0]!==n?(i=()=>{if(n!==null)return;const h=setTimeout(()=>{u("thinking")},wn);return()=>{clearTimeout(h)}},r=[n],e[0]=n,e[1]=i,e[2]=r):(i=e[1],r=e[2]),R.useEffect(i,r),n!==null){let h;e[3]!==n||e[4]!==l?(h=Ms(l,n),e[3]=n,e[4]=l,e[5]=h):h=e[5];const x=h;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Ie,{className:"size-4"}),e[6]=v):v=e[6];const b=`${x.label}...`;let k;e[7]!==t?(k=t!==null&&a.jsx(Be,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==x.detail||e[10]!==b||e[11]!==k?(j=a.jsx(Oe,{icon:v,title:b,summary:x.detail,state:"loading",trailing:k}),e[9]=x.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let o;e[13]!==l?(o=_n(l),e[13]=l,e[14]=o):o=e[14];const d=o[c],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&a.jsx(Be,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=a.jsx(Oe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function Tn(s){const e=E.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(Sn,{}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=a.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,a.jsx(Be,{since:t})]}),e[1]=t,e[2]=n):n=e[2],n}const In=2e4;function $n(s){const e=E.c(9),{startedAt:t}=s,l=U(),n=Ke(1e3),c=ve(),i=(t!==null?n-t:0)>=In;let r;e[0]!==t?(r=a.jsx(Cn,{startedAt:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==i||e[3]!==c||e[4]!==l?(o=i&&c?.stop&&a.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[a.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),a.jsx("button",{type:"button",onClick:()=>c.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=c,e[4]=l,e[5]=o):o=e[5];let m;return e[6]!==r||e[7]!==o?(m=a.jsxs("div",{className:"flex flex-col gap-0.5",children:[r,o]}),e[6]=r,e[7]=o,e[8]=m):m=e[8],m}function An(s){const e=E.c(24),{duration:t,parts:l,isStreaming:n}=s,c=U();let u;e[0]!==l?(u=l.every(Ln),e[0]=l,e[1]=u):u=e[1];const i=u;let r;e[2]!==t||e[3]!==c?(r=t&&t/1e3>1?c("chat.thinkingIndicator.thoughtFor",{duration:je(t/1e3)}):c("chat.thinkingIndicator.thought"),e[2]=t,e[3]=c,e[4]=r):r=e[4];const o=r;let m;if(e[5]!==i||e[6]!==n||e[7]!==l){const k=l.map(En).join(`
2
2
  `).trim().split(`
3
3
  `).filter(Boolean),j=n?k[k.length-1]??"":k[0]??"";m=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=n,e[7]=l,e[8]=m}else m=e[8];const d=m;let f;if(e[9]!==i||e[10]!==l){const b=l.map(Mn).join(`
4
4
 
@@ -1 +1 @@
1
- import{c as f,X as _,a3 as y,K as P,m as b,l as A,j as d}from"./index-CC25Ppah.js";import{u as x}from"./use-entitlements-R7iGGl1k.js";function C(){const e=f.c(6),t=y(),r=x();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:a}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(a.map(v))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==r||e[4]!==n?(s={queryKey:o,enabled:r,staleTime:6e5,queryFn:n},e[3]=r,e[4]=n,e[5]=s):s=e[5],b(s)}function v(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function I(e,t){if(t!=="free")return e?.[t];const r=e&&Object.values(e)[0];return r?{amountCents:0,currency:r.currency,interval:r.interval}:void 0}function S(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const T=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function j(e,t){if(!e)return null;const r=e.findIndex(n=>n.features[t]===!0),o=r>=0?e[r]:void 0;return o?{plan:o,index:r}:null}function R(){const e=f.c(8),{org:t}=_(),r=y(),o=x();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==r?(s=async()=>{const{plans:c}=await r.call("AI_PLAN_LIST",{providerId:"deco"});return c},e[2]=r,e[3]=s):s=e[3];let a;return e[4]!==o||e[5]!==n||e[6]!==s?(a={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=a):a=e[7],b(a)}const u=[{symbol:"free",color:"text-chart-2"},{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],E=u[u.length-1];function F(e){return h(e).color}function h(e){return u[Math.min(e,u.length-1)]??E}function O(e){const t=f.c(13),{index:r,className:o}=e;let n,s,a,c;if(t[0]!==o||t[1]!==r){const{symbol:g,color:p}=h(r);n=g,s="0 0 16 16",a="true",c=A("size-8 shrink-0",p,o),t[0]=o,t[1]=r,t[2]=n,t[3]=s,t[4]=a,t[5]=c}else n=t[2],s=t[3],a=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==a||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":a,className:c,children:l}),t[8]=s,t[9]=a,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{T as F,O as P,C as a,F as b,I as c,S as f,j as p,R as u};
1
+ import{c as f,X as _,a3 as y,K as P,m as b,l as A,j as d}from"./index-CK2jC1b8.js";import{u as x}from"./use-entitlements-yqpltSF-.js";function C(){const e=f.c(6),t=y(),r=x();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:a}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(a.map(v))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==r||e[4]!==n?(s={queryKey:o,enabled:r,staleTime:6e5,queryFn:n},e[3]=r,e[4]=n,e[5]=s):s=e[5],b(s)}function v(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function I(e,t){if(t!=="free")return e?.[t];const r=e&&Object.values(e)[0];return r?{amountCents:0,currency:r.currency,interval:r.interval}:void 0}function S(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const T=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function j(e,t){if(!e)return null;const r=e.findIndex(n=>n.features[t]===!0),o=r>=0?e[r]:void 0;return o?{plan:o,index:r}:null}function R(){const e=f.c(8),{org:t}=_(),r=y(),o=x();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==r?(s=async()=>{const{plans:c}=await r.call("AI_PLAN_LIST",{providerId:"deco"});return c},e[2]=r,e[3]=s):s=e[3];let a;return e[4]!==o||e[5]!==n||e[6]!==s?(a={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=a):a=e[7],b(a)}const u=[{symbol:"free",color:"text-chart-2"},{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],E=u[u.length-1];function F(e){return h(e).color}function h(e){return u[Math.min(e,u.length-1)]??E}function O(e){const t=f.c(13),{index:r,className:o}=e;let n,s,a,c;if(t[0]!==o||t[1]!==r){const{symbol:g,color:p}=h(r);n=g,s="0 0 16 16",a="true",c=A("size-8 shrink-0",p,o),t[0]=o,t[1]=r,t[2]=n,t[3]=s,t[4]=a,t[5]=c}else n=t[2],s=t[3],a=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==a||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":a,className:c,children:l}),t[8]=s,t[9]=a,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{T as F,O as P,C as a,F as b,I as c,S as f,j as p,R as u};
@@ -1 +1 @@
1
- import{r as i,bn as A,j as c,bp as O,bq as h,bu as _,bs as G,bt as H,bo as L,by as j,dk as w,bG as z,bB as K,bD as q,bH as B,bC as J,bE as U,bF as V,bI as W,bJ as Z,bw as Q,c as C,l as X}from"./index-CC25Ppah.js";var m="Popover",[E]=z(m,[j]),x=j(),[Y,v]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=x(e),d=i.useRef(null),[l,u]=i.useState(!1),[f,P]=G({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(H,{...p,children:c.jsx(Y,{scope:e,contentId:L(),triggerRef:d,open:f,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(R=>!R),[P]),hasCustomAnchor:l,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(F,o),s=x(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});y.displayName=F;var S="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(S,o),s=x(o),a=A(e,n.triggerRef),p=c.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:a,onClick:h(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});D.displayName=S;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=v(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(Q,{asChild:!0,container:n,children:r})})})};M.displayName=b;var g="PopoverContent",k=i.forwardRef((t,e)=>{const o=oe(g,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=v(g,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})})});k.displayName=g;var te=B("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(q,{as:te,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:h(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,d=p.button===0&&p.ctrlKey===!0,l=p.button===2||d;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:h(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(I,{...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()}})}),I=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:u,...f}=t,P=v(g,o),R=x(o);return J(),c.jsx(U,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(V,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onDismiss:()=>P.onOpenChange(!1),children:c.jsx(W,{"data-state":$(P.open),role:"dialog",id:P.contentId,...R,...f,ref:e,style:{...f.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)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(T,o);return c.jsx(O.button,{type:"button",...r,ref:e,onClick:h(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=x(o);return c.jsx(Z,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=y,le=D,ue=M,de=k;function ve(t){const e=C.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 Pe(t){const e=C.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(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(16);let o,r,n,s,a;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5]);const p=s===void 0?"center":s,d=a===void 0?4:a;let l;e[6]!==o?(l=X("notranslate 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-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden border p-4 shadow-md outline-hidden",o),e[6]=o,e[7]=l):l=e[7];let u;e[8]!==p||e[9]!==n||e[10]!==d||e[11]!==l?(u=c.jsx(de,{"data-slot":"popover-content",align:p,sideOffset:d,translate:"no",className:l,...n}),e[8]=p,e[9]=n,e[10]=d,e[11]=l,e[12]=u):u=e[12];let f;return e[13]!==r||e[14]!==u?(f=c.jsx(ue,{container:r,children:u}),e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function he(t){const e=C.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-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
1
+ import{r as i,bn as A,j as c,bp as O,bq as h,bu as _,bs as G,bt as H,bo as L,by as j,dk as w,bG as z,bB as K,bD as q,bH as B,bC as J,bE as U,bF as V,bI as W,bJ as Z,bw as Q,c as C,l as X}from"./index-CK2jC1b8.js";var m="Popover",[E]=z(m,[j]),x=j(),[Y,v]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=x(e),d=i.useRef(null),[l,u]=i.useState(!1),[f,P]=G({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(H,{...p,children:c.jsx(Y,{scope:e,contentId:L(),triggerRef:d,open:f,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(R=>!R),[P]),hasCustomAnchor:l,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(F,o),s=x(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});y.displayName=F;var S="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(S,o),s=x(o),a=A(e,n.triggerRef),p=c.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:a,onClick:h(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});D.displayName=S;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=v(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(Q,{asChild:!0,container:n,children:r})})})};M.displayName=b;var g="PopoverContent",k=i.forwardRef((t,e)=>{const o=oe(g,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=v(g,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})})});k.displayName=g;var te=B("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(q,{as:te,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:h(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,d=p.button===0&&p.ctrlKey===!0,l=p.button===2||d;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:h(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(I,{...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()}})}),I=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:u,...f}=t,P=v(g,o),R=x(o);return J(),c.jsx(U,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(V,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onDismiss:()=>P.onOpenChange(!1),children:c.jsx(W,{"data-state":$(P.open),role:"dialog",id:P.contentId,...R,...f,ref:e,style:{...f.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)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(T,o);return c.jsx(O.button,{type:"button",...r,ref:e,onClick:h(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=x(o);return c.jsx(Z,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=y,le=D,ue=M,de=k;function ve(t){const e=C.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 Pe(t){const e=C.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(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(16);let o,r,n,s,a;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5]);const p=s===void 0?"center":s,d=a===void 0?4:a;let l;e[6]!==o?(l=X("notranslate 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-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden border p-4 shadow-md outline-hidden",o),e[6]=o,e[7]=l):l=e[7];let u;e[8]!==p||e[9]!==n||e[10]!==d||e[11]!==l?(u=c.jsx(de,{"data-slot":"popover-content",align:p,sideOffset:d,translate:"no",className:l,...n}),e[8]=p,e[9]=n,e[10]=d,e[11]=l,e[12]=u):u=e[12];let f;return e[13]!==r||e[14]!==u?(f=c.jsx(ue,{container:r,children:u}),e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function he(t){const e=C.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-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
@@ -1 +1 @@
1
- import{c as nt,b as ct,r as ft,x as wt,l as Y,j as e,B as at,ak as Tt}from"./index-CC25Ppah.js";import{i as zt}from"./AlertCircle-BjnxyDOP.js";import{T as _t,r as At}from"./agent-icon-CPkpuu5N.js";import{s as Et}from"./Plus-qxuO6WDR.js";import{a as Pt,b as $t,A as Lt}from"./alert-Cs-bStiD.js";import{S as Mt}from"./scroll-area-CRSx-oF3.js";import{d as Ut,Z as It,l as Ht,U as Ot,V as Rt,_ as Bt,S as bt,X as ht,$ as Ft}from"./agent-site-editor-content-a5TI2r7z.js";import"./Tool01-TjgiGeiC.js";import"./ArrowUp-BKoObjW-.js";import"./ArrowLeft-DQ9UKKAN.js";import"./ArrowRight-DiT079bV.js";import"./ZoomOut-Dcywub4h.js";import"./Globe04-DKoPzLrY.js";import"./CheckCircle-i5UWgig8.js";import"./Check-DAeVWel0.js";import"./ChevronUp-BZ-l57nk.js";import"./UserSquare-opUUQIJ1.js";import"./Copy01-DAVjKSIW.js";import"./CreditCard01-BdF-cK8s.js";import"./DotsVertical-Cwch2oVB.js";import"./Eye-DQ7cfCM0.js";import"./Share07-BnshXTQj.js";import"./XClose-Ck6U0czU.js";import"./Image01-DbwBpUqU.js";import"./Key01-zwp6W4d5.js";import"./LayoutLeft-C-SKczLZ.js";import"./Link01-zc_yw7bC.js";import"./LinkExternal01-CXDDMqr6.js";import"./Monitor01-DWGOwDQg.js";import"./Sun-ANdrraHV.js";import"./Palette-DWlnTZiX.js";import"./SearchMd-DX0K-HMy.js";import"./Trash01-CrHs9whM.js";import"./Upload01-C5ztKcks.js";import"./User01-CXM1GVfD.js";import"./Users01-5Z8_4Xc4.js";import"./X-DmIzVIVO.js";import"./Zap-DA1b9hd1.js";import"./select-Cfsqli3Z.js";import"./index-CESNu6n_.js";import"./agent-view-guard-tp4TNcN4.js";import"./use-main-panel-tabs-DT72lles.js";import"./use-route-default-main-CXl47PXA.js";import"./use-connection-B9c3iEps.js";import"./use-mcp-client-CgA0k7AX.js";import"./auth-DMDdodew.js";import"./use-mcp-tools-DjC5fBeS.js";import"./use-virtual-mcp-CDAUj4PY.js";import"./types-B6rztgnY.js";import"./utils-CVEq3hMx.js";import"./use-project-scope-eV1RUVZG.js";import"./github-repo-BknN0SVI.js";import"./index-DQZsFtMU.js";import"./chat-context-WNSIRKCQ.js";import"./use-panel-navigate-Dl11oG8L.js";import"./thread-route-Bqw7sU0F.js";import"./autosend-o13Aw1Rn.js";import"./thread-intent-CEfA_P9I.js";import"./slugify-CEUa2lfQ.js";import"./hooks-y4FNzMnr.js";import"./backoff-8mStPHYB.js";import"./task-board-DQdrQPfw.js";import"./schema-DW2eCFm-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-R7iGGl1k.js";import"./use-ai-providers-B23SXI_f.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DyDz5Dvh.js";import"./use-organization-settings-dzIa476E.js";import"./gateway-client-Bv7LvgK9.js";import"./tooltip-CxCpd2vh.js";import"./dialog-GV2-AWhM.js";import"./drawer-BpYKYeO-.js";import"./collection-search-Dj-lj2Fa.js";import"./use-mobile-DNQy-neC.js";import"./use-mcp-prompts--gNDdjf0.js";import"./index-DVEm55Ak.js";import"./form-CeykBl5J.js";import"./label-5K8407_a.js";import"./input-mcA88pmm.js";import"./org-file-open-context-CxjyfiTf.js";import"./input-BkFUax8j.js";import"./shell-layout-Bq2laVk4.js";import"./avatar-D35e4GmC.js";import"./download-app-dialog-CwDsIUWZ.js";import"./command-CaZijnVF.js";import"./index-Dn2PGa-1.js";import"./integration-icon-DzNK1v4_.js";import"./project-icon-B8aarRYC.js";import"./required-auth-layout-DxuleY4O.js";import"./use-org-sso-0Z0wHR7c.js";import"./chat-draft-BcyCtTKR.js";import"./use-session-runtime-CXsIHSqC.js";import"./usage-stats-BFEJJHEo.js";import"./use-copy-C57femQY.js";import"./markdown-BU3lUbXy.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-B6noAKK3.js";import"./use-deco-credits-DNa0dEA5.js";import"./toggle-group-lq2B3qIc.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-jz-QPVzs.js";import"./decopilot-CZjF5g1z.js";import"./checkbox-JdVFVT9j.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-Ckvyzpb1.js";import"./index-ClcQkcu8.js";import"./input-DwcsciNr.js";import"./suggestion-DpmAiVaO.js";import"./use-org-fs-Dax61xWP.js";import"./question-004-sINsf4GQ.js";import"./use-members-i2T2it_v.js";import"./use-org-auth-client-B7ZtWQAU.js";import"./feature-paywall-BWXzTC8M.js";import"./plan-ladder-DdvajrNu.js";import"./add-connection-dialog-DU7LzF51.js";import"./extract-connection-data-CDeCZEXj.js";import"./metadata-D72DunRR.js";import"./connection-Bp_V6T8B.js";import"./connection-card-CtvZJL9l.js";import"./useInfiniteQuery-DW7bCHpf.js";import"./infiniteQueryObserver-BKtbJar9.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-Czh9V7Yz.js";import"./connection-form-helpers-BsreWXIJ.js";import"./authenticate-and-persist-oauth-CNlmBCGw.js";import"./mcp-oauth-CGCjtFIL.js";import"./collection-tabs-glsScWrF.js";import"./badge-B194cO51.js";import"./use-infinite-scroll-CyOQA4SB.js";import"./useSuspenseInfiniteQuery-DF4BukrQ.js";import"./pair-h-AKbDiX.js";import"./collapsible-Cvuvqexz.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DT5aj_bA.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-BhcdHJA0.js";import"./use-navigate-to-agent-BmpybU3_.js";import"./use-thread-outputs-a13sDbFX.js";import"./file-type-icon-C06txfjh.js";import"./sandbox-lifecycle-context-DQzttex0.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resolve-tab-icon-DXJnhSrQ.js";import"./use-task-metadata-B50R7YVb.js";import"./use-project-native-view-presence-pXoLbAJi.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-Cdbct8Cf.js";import"./site-slug-DebpOoQq.js";import"./virtual-mcp-DhabdkeJ.js";import"./feature-gate-CVihx7r6.js";import"./alert-dialog-BqYCADnJ.js";import"./runnable-block-editor-CqnIW6eK.js";import"./claim-phase-copy-DWojSJiP.js";import"./utils-C77-XjSJ.js";import"./monaco-editor-BfhKEQLl.js";import"./editor-D-V05JcK.js";import"./calendar-C6nVhblX.js";import"./rich-text-link-control-CGgVTmqZ.js";import"./switch-EEYQU2u1.js";import"./combobox-CRDHNq4d.js";import"./search-input-DZFOIFWl.js";import"./use-debounced-value-IfXb0kJG.js";import"./asset-utils-CFWp7R-O.js";import"./decofile-api-SdRYqTHk.js";import"./sandbox-git-api-B1R0585s.js";import"./mustache-DlIZk22M.js";import"./empty-state-BIGrNuvN.js";import"./empty-state-DD1de6E_.js";import"./github-icon-CbIIkcig.js";import"./repository-import-picker-DgRDvroV.js";import"./repository-picker-DJ0Bq0Gn.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",yt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function qt(C){const t=nt.c(37),{support:j}=C,a=ct();let i,l,o,b,s,y,r,m,p,c;if(t[0]!==j||t[1]!==a){c=Symbol.for("react.early_return_sentinel");t:{if(o=Ft(j,"scheduled"),!o){c=null;break t}const v=o.reason==="outdated"?"sandbox.postCalendar.outdatedAppsTitle":o.reason==="no-app"?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.unknownAppTitle";p="absolute inset-0 flex items-center justify-center bg-background/30 p-6",l=Pt,y="warning",r="max-w-md bg-background/95 shadow-lg backdrop-blur",t[12]===Symbol.for("react.memo_cache_sentinel")?(m=e.jsx(zt,{}),t[12]=m):m=t[12];let n;t[13]!==a||t[14]!==v?(n=a(v),t[13]=a,t[14]=v,t[15]=n):n=t[15],t[16]!==n?(s=e.jsx($t,{children:n}),t[16]=n,t[17]=s):s=t[17],i=Lt,b=o.reason==="outdated"?a("sandbox.postCalendar.outdatedAppsDescription",{required:o.required}):o.reason==="no-app"?a("sandbox.postCalendar.unsupportedRuntimeDescription"):a("sandbox.postCalendar.unknownAppDescription")}t[0]=j,t[1]=a,t[2]=i,t[3]=l,t[4]=o,t[5]=b,t[6]=s,t[7]=y,t[8]=r,t[9]=m,t[10]=p,t[11]=c}else i=t[2],l=t[3],o=t[4],b=t[5],s=t[6],y=t[7],r=t[8],m=t[9],p=t[10],c=t[11];if(c!==Symbol.for("react.early_return_sentinel"))return c;let u;t[18]!==i||t[19]!==b?(u=e.jsx(i,{children:b}),t[18]=i,t[19]=b,t[20]=u):u=t[20];let x;t[21]!==o.command||t[22]!==o.reason?(x=o.reason==="outdated"&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:o.command}),t[21]=o.command,t[22]=o.reason,t[23]=x):x=t[23];let d;t[24]!==s||t[25]!==u||t[26]!==x?(d=e.jsxs("div",{children:[s,u,x]}),t[24]=s,t[25]=u,t[26]=x,t[27]=d):d=t[27];let h;t[28]!==l||t[29]!==d||t[30]!==y||t[31]!==r||t[32]!==m?(h=e.jsxs(l,{variant:y,className:r,children:[m,d]}),t[28]=l,t[29]=d,t[30]=y,t[31]=r,t[32]=m,t[33]=h):h=t[33];let f;return t[34]!==h||t[35]!==p?(f=e.jsx("div",{className:p,children:h}),t[34]=h,t[35]=p,t[36]=f):f=t[36],f}function li(C){const t=nt.c(94),{decofile:j,support:a,selectedKey:i,onSelect:l,onCreate:o,onReschedule:b,isCreating:s}=C,y=s===void 0?!1:s,r=ct();let m;t[0]!==a?(m=Ut(a),t[0]=a,t[1]=m):m=t[1];const p=m,[c,u]=ft.useState(null),[x]=wt(),[d,h]=ft.useState(Vt),f=x.language;let v;t[2]!==d||t[3]!==f?(v=new Intl.DateTimeFormat(f,{month:"long",year:"numeric"}).format(d),t[2]=d,t[3]=f,t[4]=v):v=t[4];const n=v;let k,D,T,z,S,_,A,E,P,$,w;if(t[5]!==p||t[6]!==d||t[7]!==j||t[8]!==c||t[9]!==y||t[10]!==f||t[11]!==n||t[12]!==o||t[13]!==b||t[14]!==l||t[15]!==i||t[16]!==r){const vt=new Intl.DateTimeFormat(f,{weekday:"short"}),Ct=new Intl.DateTimeFormat(f,{dateStyle:"long"}),{byDay:kt,undated:mt}=It(Ht(j)),dt=Ot(d),Nt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>h(bt(new Date)),t[28]=et):et=t[28];let O;t[29]!==r?(O=r("sandbox.postCalendar.today"),t[29]=r,t[30]=O):O=t[30];let R;t[31]!==O?(R=e.jsx(at,{variant:"outline",size:"sm",onClick:et,children:O}),t[31]=O,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>h(Wt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(At,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let it;t[39]===Symbol.for("react.memo_cache_sentinel")?(it=()=>h(Kt),t[39]=it):it=t[39];let q;t[40]!==r?(q=r("sandbox.postCalendar.next"),t[40]=r,t[41]=q):q=t[41];let st;t[42]===Symbol.for("react.memo_cache_sentinel")?(st=e.jsx(Tt,{size:16}),t[42]=st):st=t[42];let K;t[43]!==q?(K=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:it,"aria-label":q,children:st}),t[43]=q,t[44]=K):K=t[44];let W;t[45]!==n?(W=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:n}),t[45]=n,t[46]=W):W=t[46];let V;t[47]!==r?(V=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=V):V=t[48];let X;t[49]!==V?(X=e.jsx(xt,{className:jt,label:V}),t[49]=V,t[50]=X):X=t[50];let Z;t[51]!==r?(Z=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=Z):Z=t[52];let G;t[53]!==Z?(G=e.jsx(xt,{className:yt,label:Z}),t[53]=Z,t[54]=G):G=t[54];let J;t[55]!==X||t[56]!==G?(J=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[X,G]}),t[55]=X,t[56]=G,t[57]=J):J=t[57],t[58]!==R||t[59]!==F||t[60]!==K||t[61]!==W||t[62]!==J?(S=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,K,W,J]}),t[58]=R,t[59]=F,t[60]=K,t[61]=W,t[62]=J,t[63]=S):S=t[63],T="relative flex-1 min-h-0",k=Mt;const pt=!p&&"blur-[2px] select-none";t[64]!==pt?(w=Y("h-full",pt),t[64]=pt,t[65]=w):w=t[65],D=!p,P="flex min-w-[880px] gap-4 p-4";let Q;t[66]!==r?(Q=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Q):Q=t[67];let lt;t[68]!==Q?(lt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Q}),t[68]=Q,t[69]=lt):lt=t[69],$=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(g=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:vt.format(g)},g.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(g=>{const Dt=g.getMonth()===d.getMonth(),St=kt.get(Bt(g))??[];return e.jsxs("div",{onDragOver:N=>{c&&(N.preventDefault(),N.dataTransfer.dropEffect="move")},onDrop:N=>{N.preventDefault();const ut=N.dataTransfer.getData("text/plain");u(null),ut&&b(ut,g)},className:Y("group/day min-h-28 space-y-1 p-2 transition-colors",Dt?"bg-background":"bg-muted/40",c&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Y("grid size-6 place-items-center rounded-full text-xs",g.getTime()===Nt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:g.getDate()}),p&&e.jsx(at,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:y,onClick:()=>o(g),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Ct.format(g)}),children:e.jsx(Et,{size:14})})]}),St.map(N=>e.jsx(gt,{entry:N,active:N.post.key===i,draggable:p&&N.scheduled,onSelect:l,onDragStateChange:u},N.post.key))]},g.getTime())})}),lt]}),_="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",A=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:mt.length})}),E=mt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(_t,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):mt.map(g=>e.jsx(gt,{entry:g,active:g.post.key===i,draggable:!1,onSelect:l,onDragStateChange:u},g.post.key)),t[5]=p,t[6]=d,t[7]=j,t[8]=c,t[9]=y,t[10]=f,t[11]=n,t[12]=o,t[13]=b,t[14]=l,t[15]=i,t[16]=r,t[17]=k,t[18]=D,t[19]=T,t[20]=z,t[21]=S,t[22]=_,t[23]=A,t[24]=E,t[25]=P,t[26]=$,t[27]=w}else k=t[17],D=t[18],T=t[19],z=t[20],S=t[21],_=t[22],A=t[23],E=t[24],P=t[25],$=t[26],w=t[27];let L;t[70]!==_||t[71]!==A||t[72]!==E?(L=e.jsxs("div",{className:_,children:[A,E]}),t[70]=_,t[71]=A,t[72]=E,t[73]=L):L=t[73];let M;t[74]!==L||t[75]!==P||t[76]!==$?(M=e.jsxs("div",{className:P,children:[$,L]}),t[74]=L,t[75]=P,t[76]=$,t[77]=M):M=t[77];let U;t[78]!==k||t[79]!==D||t[80]!==M||t[81]!==w?(U=e.jsx(k,{className:w,inert:D,children:M}),t[78]=k,t[79]=D,t[80]=M,t[81]=w,t[82]=U):U=t[82];let I;t[83]!==p||t[84]!==a?(I=!p&&e.jsx(qt,{support:a}),t[83]=p,t[84]=a,t[85]=I):I=t[85];let H;t[86]!==T||t[87]!==U||t[88]!==I?(H=e.jsxs("div",{className:T,children:[U,I]}),t[86]=T,t[87]=U,t[88]=I,t[89]=H):H=t[89];let tt;return t[90]!==z||t[91]!==S||t[92]!==H?(tt=e.jsxs("div",{className:z,children:[S,H]}),t[90]=z,t[91]=S,t[92]=H,t[93]=tt):tt=t[93],tt}function Kt(C){return ht(C,1)}function Wt(C){return ht(C,-1)}function Vt(){return bt(new Date)}function xt(C){const t=nt.c(7),{className:j,label:a}=C;let i;t[0]!==j?(i=Y("size-3 rounded-sm border",j),t[0]=j,t[1]=i):i=t[1];let l;t[2]!==i?(l=e.jsx("span",{className:i}),t[2]=i,t[3]=l):l=t[3];let o;return t[4]!==a||t[5]!==l?(o=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,a]}),t[4]=a,t[5]=l,t[6]=o):o=t[6],o}function gt(C){const t=nt.c(23),{entry:j,active:a,draggable:i,onSelect:l,onDragStateChange:o}=C,b=ct(),{post:s,scheduled:y}=j,r=y?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let m;t[0]!==b||t[1]!==r?(m=b(r),t[0]=b,t[1]=r,t[2]=m):m=t[2];const p=m;let c;t[3]!==o||t[4]!==s.key?(c=D=>{D.dataTransfer.setData("text/plain",s.key),D.dataTransfer.effectAllowed="move",o(s.key)},t[3]=o,t[4]=s.key,t[5]=c):c=t[5];let u;t[6]!==o?(u=()=>o(null),t[6]=o,t[7]=u):u=t[7];let x;t[8]!==l||t[9]!==s.key?(x=()=>l(s.key),t[8]=l,t[9]=s.key,t[10]=x):x=t[10];const d=`${s.title} · ${p}`,h=y?jt:yt,f=i&&"cursor-grab active:cursor-grabbing",v=a&&"ring-2 ring-primary";let n;t[11]!==h||t[12]!==f||t[13]!==v?(n=Y("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",h,f,v),t[11]=h,t[12]=f,t[13]=v,t[14]=n):n=t[14];let k;return t[15]!==i||t[16]!==s.title||t[17]!==n||t[18]!==c||t[19]!==u||t[20]!==x||t[21]!==d?(k=e.jsx("button",{type:"button",draggable:i,onDragStart:c,onDragEnd:u,onClick:x,title:d,className:n,children:s.title}),t[15]=i,t[16]=s.title,t[17]=n,t[18]=c,t[19]=u,t[20]=x,t[21]=d,t[22]=k):k=t[22],k}export{li as PostCalendar};
1
+ import{c as nt,b as ct,r as ft,x as wt,l as Y,j as e,B as at,ak as Tt}from"./index-CK2jC1b8.js";import{i as zt}from"./AlertCircle-YzP1ItvL.js";import{T as _t,r as At}from"./agent-icon-Jo8-4dPq.js";import{s as Et}from"./Plus-Cc4ubNGu.js";import{a as Pt,b as $t,A as Lt}from"./alert-Dd873hHW.js";import{S as Mt}from"./scroll-area-DCufqOiC.js";import{d as Ut,Z as It,l as Ht,U as Ot,V as Rt,_ as Bt,S as bt,X as ht,$ as Ft}from"./agent-site-editor-content-CnwpjMKB.js";import"./Tool01-PaohPsXN.js";import"./ArrowUp-qgp0EG1S.js";import"./ArrowLeft-CYpMPcOZ.js";import"./ArrowRight-Cx_2CtPy.js";import"./ZoomOut-BikQEs2y.js";import"./Globe04-Dy5lW2tL.js";import"./CheckCircle-gIlSms3T.js";import"./Check-DMZ0RIwh.js";import"./ChevronUp-G7F3VYIf.js";import"./UserSquare-DrIVMzs5.js";import"./Copy01-B-dz9iXg.js";import"./CreditCard01-CAP8dDsb.js";import"./DotsVertical-BdurgnSh.js";import"./Eye-ZgodVkyQ.js";import"./Share07-DGVeEnhS.js";import"./XClose-CbmBXBAq.js";import"./Image01-GZwmFlKM.js";import"./Key01-Da1KKUib.js";import"./LayoutLeft-DbkGyzH4.js";import"./Link01-BdK1ByU5.js";import"./LinkExternal01-D-eEFhKO.js";import"./Monitor01-Dqm9KsCN.js";import"./Sun-C7ngZDnN.js";import"./Palette-H8aWBRVl.js";import"./SearchMd-CqrAQSvB.js";import"./Trash01-DngK_rxV.js";import"./Upload01-BM_RpwaJ.js";import"./User01--_GcM9Nm.js";import"./Users01-CbmiNtCo.js";import"./X-DqB0NFUe.js";import"./Zap-BoM6OXqO.js";import"./select-D4vELKrF.js";import"./index-BEaxoeD8.js";import"./agent-view-guard-C89vuUCE.js";import"./use-main-panel-tabs-r00ZOqDA.js";import"./use-route-default-main-CGb0z4AT.js";import"./use-connection-CrE81qJi.js";import"./use-mcp-client-BR_DXeP8.js";import"./auth-gtdPpHjL.js";import"./use-mcp-tools-Be3QJcU4.js";import"./use-virtual-mcp-C01zDEqD.js";import"./types-D5TGgE6N.js";import"./utils-CVEq3hMx.js";import"./use-project-scope-3ou33Tvp.js";import"./github-repo-BknN0SVI.js";import"./index-C2zAJxiS.js";import"./chat-context-CNmaHg6E.js";import"./use-panel-navigate-DA-8PNPm.js";import"./thread-route-Bvyqd7wd.js";import"./autosend-D8qwra7k.js";import"./thread-intent-3sZpI08X.js";import"./slugify-CEUa2lfQ.js";import"./hooks-BaT6zpiH.js";import"./backoff-8mStPHYB.js";import"./task-board-CD8iA_oi.js";import"./schema-YWMvOOES.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-yqpltSF-.js";import"./use-ai-providers-BBTYyg8P.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-YF4HlwXb.js";import"./use-organization-settings-DSpO89g3.js";import"./gateway-client-aZG77Xf7.js";import"./tooltip-BX_EIFZx.js";import"./dialog-DdqSoRM9.js";import"./drawer-DD_EvNka.js";import"./collection-search-CQtm6ZPr.js";import"./use-mobile-Conlu_a3.js";import"./use-mcp-prompts-DkqcWZgO.js";import"./index-A41c0be0.js";import"./form-DDN0fmnr.js";import"./label-C32hF8xr.js";import"./input-BCcJ8Hmw.js";import"./org-file-open-context-8FCTmLsE.js";import"./input-BSlf0cIW.js";import"./shell-layout-0w3S7Z17.js";import"./avatar-DzaDPlqs.js";import"./download-app-dialog-BlOmHAsj.js";import"./command-Be1FiAet.js";import"./index-CovgzY-C.js";import"./integration-icon-CicyoW2g.js";import"./project-icon-D4PJG-i0.js";import"./required-auth-layout-DB5JpRTU.js";import"./use-org-sso-B2X6FOxf.js";import"./chat-draft-BAXNdbwi.js";import"./use-session-runtime-PHj1tP1Y.js";import"./usage-stats-CvltoOBH.js";import"./use-copy-D4TIbhMe.js";import"./markdown-CCVwyZmB.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-C_SkK0zq.js";import"./use-deco-credits-CF4bywq4.js";import"./toggle-group-7Dr1QRv7.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-De_dcOCW.js";import"./decopilot-Dvgnn1td.js";import"./checkbox-CCgxRg-G.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-D9fLEvti.js";import"./index-DBDtjD9g.js";import"./input-DdZYEeuc.js";import"./suggestion-CTZ4P7Cg.js";import"./use-org-fs-CkOSi_FE.js";import"./question-004-sINsf4GQ.js";import"./use-members-D-Y2ThV6.js";import"./use-org-auth-client-CttLYCV5.js";import"./feature-paywall-CXAok1MA.js";import"./plan-ladder-yAJPPpd3.js";import"./add-connection-dialog-D8Ox25XG.js";import"./extract-connection-data-BYZdGxJz.js";import"./metadata-D72DunRR.js";import"./connection-DpBbRAF7.js";import"./connection-card-Cbi3TS91.js";import"./useInfiniteQuery-RDUps_Fq.js";import"./infiniteQueryObserver-r-3Zb0hn.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-Crbkqbuz.js";import"./connection-form-helpers-B6j-CkAe.js";import"./authenticate-and-persist-oauth-CVOY3bdK.js";import"./mcp-oauth-aTwtgi6X.js";import"./collection-tabs-Ctgaf4Pj.js";import"./badge-DAnEDAAp.js";import"./use-infinite-scroll-Cbikj4Pq.js";import"./useSuspenseInfiniteQuery-CUJCDA4c.js";import"./pair-DNtCa00h.js";import"./collapsible-ATnyEj_S.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CutrdRC_.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-6Vxtignr.js";import"./use-navigate-to-agent-EF0ZR5Ia.js";import"./use-thread-outputs-uJ7yrzFy.js";import"./file-type-icon-BDgGUbiO.js";import"./sandbox-lifecycle-context-DVklx5ib.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resolve-tab-icon-DRTn2NwY.js";import"./use-task-metadata-BcDrCgHz.js";import"./use-project-native-view-presence-DBUyMyFo.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-MemDO-me.js";import"./site-slug-DebpOoQq.js";import"./virtual-mcp-CYKM5gcZ.js";import"./feature-gate-DnBD8lbt.js";import"./alert-dialog-BLhLimu7.js";import"./runnable-block-editor-CTcUBv1Z.js";import"./claim-phase-copy-DiN3tSVA.js";import"./utils-jA0q__Q1.js";import"./monaco-editor-Em6ZNkGd.js";import"./editor-oQiihuTN.js";import"./calendar-C6S4gjZ0.js";import"./rich-text-link-control-D3evQDCf.js";import"./switch-DCOUunxF.js";import"./combobox-Ce_kogEm.js";import"./search-input-DZ5LjK8B.js";import"./use-debounced-value-DfVIFpLg.js";import"./asset-utils-BkBA20sO.js";import"./decofile-api-lyYnBz8F.js";import"./sandbox-git-api-B1R0585s.js";import"./mustache-DR3KrOjx.js";import"./empty-state-CdcwJcHp.js";import"./empty-state-B0qH2Kts.js";import"./github-icon-BgXpeChB.js";import"./repository-import-picker-B_yB2gqJ.js";import"./repository-picker-BEpNu3ZO.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",yt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function qt(C){const t=nt.c(37),{support:j}=C,a=ct();let i,l,o,b,s,y,r,m,p,c;if(t[0]!==j||t[1]!==a){c=Symbol.for("react.early_return_sentinel");t:{if(o=Ft(j,"scheduled"),!o){c=null;break t}const v=o.reason==="outdated"?"sandbox.postCalendar.outdatedAppsTitle":o.reason==="no-app"?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.unknownAppTitle";p="absolute inset-0 flex items-center justify-center bg-background/30 p-6",l=Pt,y="warning",r="max-w-md bg-background/95 shadow-lg backdrop-blur",t[12]===Symbol.for("react.memo_cache_sentinel")?(m=e.jsx(zt,{}),t[12]=m):m=t[12];let n;t[13]!==a||t[14]!==v?(n=a(v),t[13]=a,t[14]=v,t[15]=n):n=t[15],t[16]!==n?(s=e.jsx($t,{children:n}),t[16]=n,t[17]=s):s=t[17],i=Lt,b=o.reason==="outdated"?a("sandbox.postCalendar.outdatedAppsDescription",{required:o.required}):o.reason==="no-app"?a("sandbox.postCalendar.unsupportedRuntimeDescription"):a("sandbox.postCalendar.unknownAppDescription")}t[0]=j,t[1]=a,t[2]=i,t[3]=l,t[4]=o,t[5]=b,t[6]=s,t[7]=y,t[8]=r,t[9]=m,t[10]=p,t[11]=c}else i=t[2],l=t[3],o=t[4],b=t[5],s=t[6],y=t[7],r=t[8],m=t[9],p=t[10],c=t[11];if(c!==Symbol.for("react.early_return_sentinel"))return c;let u;t[18]!==i||t[19]!==b?(u=e.jsx(i,{children:b}),t[18]=i,t[19]=b,t[20]=u):u=t[20];let x;t[21]!==o.command||t[22]!==o.reason?(x=o.reason==="outdated"&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:o.command}),t[21]=o.command,t[22]=o.reason,t[23]=x):x=t[23];let d;t[24]!==s||t[25]!==u||t[26]!==x?(d=e.jsxs("div",{children:[s,u,x]}),t[24]=s,t[25]=u,t[26]=x,t[27]=d):d=t[27];let h;t[28]!==l||t[29]!==d||t[30]!==y||t[31]!==r||t[32]!==m?(h=e.jsxs(l,{variant:y,className:r,children:[m,d]}),t[28]=l,t[29]=d,t[30]=y,t[31]=r,t[32]=m,t[33]=h):h=t[33];let f;return t[34]!==h||t[35]!==p?(f=e.jsx("div",{className:p,children:h}),t[34]=h,t[35]=p,t[36]=f):f=t[36],f}function li(C){const t=nt.c(94),{decofile:j,support:a,selectedKey:i,onSelect:l,onCreate:o,onReschedule:b,isCreating:s}=C,y=s===void 0?!1:s,r=ct();let m;t[0]!==a?(m=Ut(a),t[0]=a,t[1]=m):m=t[1];const p=m,[c,u]=ft.useState(null),[x]=wt(),[d,h]=ft.useState(Vt),f=x.language;let v;t[2]!==d||t[3]!==f?(v=new Intl.DateTimeFormat(f,{month:"long",year:"numeric"}).format(d),t[2]=d,t[3]=f,t[4]=v):v=t[4];const n=v;let k,D,T,z,S,_,A,E,P,$,w;if(t[5]!==p||t[6]!==d||t[7]!==j||t[8]!==c||t[9]!==y||t[10]!==f||t[11]!==n||t[12]!==o||t[13]!==b||t[14]!==l||t[15]!==i||t[16]!==r){const vt=new Intl.DateTimeFormat(f,{weekday:"short"}),Ct=new Intl.DateTimeFormat(f,{dateStyle:"long"}),{byDay:kt,undated:mt}=It(Ht(j)),dt=Ot(d),Nt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>h(bt(new Date)),t[28]=et):et=t[28];let O;t[29]!==r?(O=r("sandbox.postCalendar.today"),t[29]=r,t[30]=O):O=t[30];let R;t[31]!==O?(R=e.jsx(at,{variant:"outline",size:"sm",onClick:et,children:O}),t[31]=O,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>h(Wt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(At,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let it;t[39]===Symbol.for("react.memo_cache_sentinel")?(it=()=>h(Kt),t[39]=it):it=t[39];let q;t[40]!==r?(q=r("sandbox.postCalendar.next"),t[40]=r,t[41]=q):q=t[41];let st;t[42]===Symbol.for("react.memo_cache_sentinel")?(st=e.jsx(Tt,{size:16}),t[42]=st):st=t[42];let K;t[43]!==q?(K=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:it,"aria-label":q,children:st}),t[43]=q,t[44]=K):K=t[44];let W;t[45]!==n?(W=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:n}),t[45]=n,t[46]=W):W=t[46];let V;t[47]!==r?(V=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=V):V=t[48];let X;t[49]!==V?(X=e.jsx(xt,{className:jt,label:V}),t[49]=V,t[50]=X):X=t[50];let Z;t[51]!==r?(Z=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=Z):Z=t[52];let G;t[53]!==Z?(G=e.jsx(xt,{className:yt,label:Z}),t[53]=Z,t[54]=G):G=t[54];let J;t[55]!==X||t[56]!==G?(J=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[X,G]}),t[55]=X,t[56]=G,t[57]=J):J=t[57],t[58]!==R||t[59]!==F||t[60]!==K||t[61]!==W||t[62]!==J?(S=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,K,W,J]}),t[58]=R,t[59]=F,t[60]=K,t[61]=W,t[62]=J,t[63]=S):S=t[63],T="relative flex-1 min-h-0",k=Mt;const pt=!p&&"blur-[2px] select-none";t[64]!==pt?(w=Y("h-full",pt),t[64]=pt,t[65]=w):w=t[65],D=!p,P="flex min-w-[880px] gap-4 p-4";let Q;t[66]!==r?(Q=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Q):Q=t[67];let lt;t[68]!==Q?(lt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Q}),t[68]=Q,t[69]=lt):lt=t[69],$=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(g=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:vt.format(g)},g.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(g=>{const Dt=g.getMonth()===d.getMonth(),St=kt.get(Bt(g))??[];return e.jsxs("div",{onDragOver:N=>{c&&(N.preventDefault(),N.dataTransfer.dropEffect="move")},onDrop:N=>{N.preventDefault();const ut=N.dataTransfer.getData("text/plain");u(null),ut&&b(ut,g)},className:Y("group/day min-h-28 space-y-1 p-2 transition-colors",Dt?"bg-background":"bg-muted/40",c&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Y("grid size-6 place-items-center rounded-full text-xs",g.getTime()===Nt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:g.getDate()}),p&&e.jsx(at,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:y,onClick:()=>o(g),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Ct.format(g)}),children:e.jsx(Et,{size:14})})]}),St.map(N=>e.jsx(gt,{entry:N,active:N.post.key===i,draggable:p&&N.scheduled,onSelect:l,onDragStateChange:u},N.post.key))]},g.getTime())})}),lt]}),_="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",A=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:mt.length})}),E=mt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(_t,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):mt.map(g=>e.jsx(gt,{entry:g,active:g.post.key===i,draggable:!1,onSelect:l,onDragStateChange:u},g.post.key)),t[5]=p,t[6]=d,t[7]=j,t[8]=c,t[9]=y,t[10]=f,t[11]=n,t[12]=o,t[13]=b,t[14]=l,t[15]=i,t[16]=r,t[17]=k,t[18]=D,t[19]=T,t[20]=z,t[21]=S,t[22]=_,t[23]=A,t[24]=E,t[25]=P,t[26]=$,t[27]=w}else k=t[17],D=t[18],T=t[19],z=t[20],S=t[21],_=t[22],A=t[23],E=t[24],P=t[25],$=t[26],w=t[27];let L;t[70]!==_||t[71]!==A||t[72]!==E?(L=e.jsxs("div",{className:_,children:[A,E]}),t[70]=_,t[71]=A,t[72]=E,t[73]=L):L=t[73];let M;t[74]!==L||t[75]!==P||t[76]!==$?(M=e.jsxs("div",{className:P,children:[$,L]}),t[74]=L,t[75]=P,t[76]=$,t[77]=M):M=t[77];let U;t[78]!==k||t[79]!==D||t[80]!==M||t[81]!==w?(U=e.jsx(k,{className:w,inert:D,children:M}),t[78]=k,t[79]=D,t[80]=M,t[81]=w,t[82]=U):U=t[82];let I;t[83]!==p||t[84]!==a?(I=!p&&e.jsx(qt,{support:a}),t[83]=p,t[84]=a,t[85]=I):I=t[85];let H;t[86]!==T||t[87]!==U||t[88]!==I?(H=e.jsxs("div",{className:T,children:[U,I]}),t[86]=T,t[87]=U,t[88]=I,t[89]=H):H=t[89];let tt;return t[90]!==z||t[91]!==S||t[92]!==H?(tt=e.jsxs("div",{className:z,children:[S,H]}),t[90]=z,t[91]=S,t[92]=H,t[93]=tt):tt=t[93],tt}function Kt(C){return ht(C,1)}function Wt(C){return ht(C,-1)}function Vt(){return bt(new Date)}function xt(C){const t=nt.c(7),{className:j,label:a}=C;let i;t[0]!==j?(i=Y("size-3 rounded-sm border",j),t[0]=j,t[1]=i):i=t[1];let l;t[2]!==i?(l=e.jsx("span",{className:i}),t[2]=i,t[3]=l):l=t[3];let o;return t[4]!==a||t[5]!==l?(o=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,a]}),t[4]=a,t[5]=l,t[6]=o):o=t[6],o}function gt(C){const t=nt.c(23),{entry:j,active:a,draggable:i,onSelect:l,onDragStateChange:o}=C,b=ct(),{post:s,scheduled:y}=j,r=y?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let m;t[0]!==b||t[1]!==r?(m=b(r),t[0]=b,t[1]=r,t[2]=m):m=t[2];const p=m;let c;t[3]!==o||t[4]!==s.key?(c=D=>{D.dataTransfer.setData("text/plain",s.key),D.dataTransfer.effectAllowed="move",o(s.key)},t[3]=o,t[4]=s.key,t[5]=c):c=t[5];let u;t[6]!==o?(u=()=>o(null),t[6]=o,t[7]=u):u=t[7];let x;t[8]!==l||t[9]!==s.key?(x=()=>l(s.key),t[8]=l,t[9]=s.key,t[10]=x):x=t[10];const d=`${s.title} · ${p}`,h=y?jt:yt,f=i&&"cursor-grab active:cursor-grabbing",v=a&&"ring-2 ring-primary";let n;t[11]!==h||t[12]!==f||t[13]!==v?(n=Y("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",h,f,v),t[11]=h,t[12]=f,t[13]=v,t[14]=n):n=t[14];let k;return t[15]!==i||t[16]!==s.title||t[17]!==n||t[18]!==c||t[19]!==u||t[20]!==x||t[21]!==d?(k=e.jsx("button",{type:"button",draggable:i,onDragStart:c,onDragEnd:u,onClick:x,title:d,className:n,children:s.title}),t[15]=i,t[16]=s.title,t[17]=n,t[18]=c,t[19]=u,t[20]=x,t[21]=d,t[22]=k):k=t[22],k}export{li as PostCalendar};
@@ -1,2 +1,2 @@
1
- import{b as Se,a3 as Xe,r as Ae,j as t,B as De,l as Ue,t as qe,c as Fe}from"./index-CC25Ppah.js";import{u as et}from"./chat-context-WNSIRKCQ.js";import{i as tt}from"./AlertCircle-BjnxyDOP.js";import{Z as st,ak as ot,ah as it,a0 as lt,U as at}from"./agent-icon-CPkpuu5N.js";import{n as rt}from"./LinkExternal01-CXDDMqr6.js";import{s as nt}from"./XClose-Ck6U0czU.js";import{I as Ie}from"./input-mcA88pmm.js";import{L as ve}from"./label-5K8407_a.js";import{M as ct}from"./multi-select-Mgyr0yZF.js";import{T as Oe,a as pt,c as Re,b as dt}from"./tabs-B6noAKK3.js";import{S as mt}from"./switch-EEYQU2u1.js";import{T as He}from"./textarea-Czh9V7Yz.js";import{u as ft,a_ as ut,a$ as _e,b0 as xt,b1 as Ve}from"./runnable-block-editor-CqnIW6eK.js";import{b as ht,l as gt,u as bt,g as jt,m as vt,s as fe,a as yt,c as St,E as Et,p as Ge,d as kt,R as Nt,e as Ct,f as Pt,A as Tt,P as Lt,h as wt}from"./agent-site-editor-content-a5TI2r7z.js";import{c as Ye,T as We,a as Qe}from"./tooltip-CxCpd2vh.js";import{f as Bt,a as At,b as Ft,c as Me,B as $t}from"./block-document-BOCciQCf.js";import{i as Dt}from"./Check-DAeVWel0.js";import{i as It}from"./Link01-zc_yw7bC.js";import{D as zt,b as qt,c as _t,d as Ot,h as Rt,e as Mt}from"./dialog-GV2-AWhM.js";import{u as Kt}from"./use-ai-providers-B23SXI_f.js";import{a as Ut}from"./use-fast-preview-draft-url-UqkQUKSb.js";import{u as Ht}from"./use-autosave-Dc8uh5nF.js";import"./use-panel-navigate-Dl11oG8L.js";import"./thread-route-Bqw7sU0F.js";import"./use-project-scope-eV1RUVZG.js";import"./use-virtual-mcp-CDAUj4PY.js";import"./use-mcp-client-CgA0k7AX.js";import"./auth-DMDdodew.js";import"./github-repo-BknN0SVI.js";import"./autosend-o13Aw1Rn.js";import"./thread-intent-CEfA_P9I.js";import"./slugify-CEUa2lfQ.js";import"./hooks-y4FNzMnr.js";import"./backoff-8mStPHYB.js";import"./task-board-DQdrQPfw.js";import"./schema-DW2eCFm-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-R7iGGl1k.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DyDz5Dvh.js";import"./use-organization-settings-dzIa476E.js";import"./Tool01-TjgiGeiC.js";import"./ArrowUp-BKoObjW-.js";import"./ArrowLeft-DQ9UKKAN.js";import"./ArrowRight-DiT079bV.js";import"./ZoomOut-Dcywub4h.js";import"./Globe04-DKoPzLrY.js";import"./CheckCircle-i5UWgig8.js";import"./ChevronUp-BZ-l57nk.js";import"./UserSquare-opUUQIJ1.js";import"./Copy01-DAVjKSIW.js";import"./CreditCard01-BdF-cK8s.js";import"./DotsVertical-Cwch2oVB.js";import"./Eye-DQ7cfCM0.js";import"./Share07-BnshXTQj.js";import"./Image01-DbwBpUqU.js";import"./Key01-zwp6W4d5.js";import"./LayoutLeft-C-SKczLZ.js";import"./Monitor01-DWGOwDQg.js";import"./Sun-ANdrraHV.js";import"./Palette-DWlnTZiX.js";import"./Plus-qxuO6WDR.js";import"./SearchMd-DX0K-HMy.js";import"./Trash01-CrHs9whM.js";import"./Upload01-C5ztKcks.js";import"./User01-CXM1GVfD.js";import"./Users01-5Z8_4Xc4.js";import"./X-DmIzVIVO.js";import"./Zap-DA1b9hd1.js";import"./badge-B194cO51.js";import"./checkbox-JdVFVT9j.js";import"./command-CaZijnVF.js";import"./index-Dn2PGa-1.js";import"./popover-Ckvyzpb1.js";import"./use-session-runtime-CXsIHSqC.js";import"./claim-phase-copy-DWojSJiP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-h-AKbDiX.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-Cvuvqexz.js";import"./use-copy-C57femQY.js";import"./usage-stats-BFEJJHEo.js";import"./markdown-BU3lUbXy.js";import"./org-file-open-context-CxjyfiTf.js";import"./use-mobile-DNQy-neC.js";import"./shell-layout-Bq2laVk4.js";import"./avatar-D35e4GmC.js";import"./download-app-dialog-CwDsIUWZ.js";import"./integration-icon-DzNK1v4_.js";import"./project-icon-B8aarRYC.js";import"./required-auth-layout-DxuleY4O.js";import"./use-org-sso-0Z0wHR7c.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DT5aj_bA.js";import"./types-B6rztgnY.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-Bv7LvgK9.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-BhcdHJA0.js";import"./use-connection-B9c3iEps.js";import"./use-navigate-to-agent-BmpybU3_.js";import"./use-mcp-prompts--gNDdjf0.js";import"./index-DVEm55Ak.js";import"./form-CeykBl5J.js";import"./use-thread-outputs-a13sDbFX.js";import"./file-type-icon-C06txfjh.js";import"./utils-C77-XjSJ.js";import"./scroll-area-CRSx-oF3.js";import"./select-Cfsqli3Z.js";import"./index-CESNu6n_.js";import"./monaco-editor-BfhKEQLl.js";import"./editor-D-V05JcK.js";import"./calendar-C6nVhblX.js";import"./rich-text-link-control-CGgVTmqZ.js";import"./combobox-CRDHNq4d.js";import"./alert-dialog-BqYCADnJ.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-DZFOIFWl.js";import"./use-debounced-value-IfXb0kJG.js";import"./use-file-configs-Cdbct8Cf.js";import"./asset-utils-CFWp7R-O.js";import"./useInfiniteQuery-DW7bCHpf.js";import"./infiniteQueryObserver-BKtbJar9.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-lq2B3qIc.js";import"./decofile-api-SdRYqTHk.js";import"./sandbox-git-api-B1R0585s.js";import"./agent-view-guard-tp4TNcN4.js";import"./use-main-panel-tabs-DT72lles.js";import"./use-route-default-main-CXl47PXA.js";import"./use-mcp-tools-DjC5fBeS.js";import"./index-DQZsFtMU.js";import"./drawer-BpYKYeO-.js";import"./collection-search-Dj-lj2Fa.js";import"./input-BkFUax8j.js";import"./chat-draft-BcyCtTKR.js";import"./use-deco-credits-DNa0dEA5.js";import"./use-open-billing-url-jz-QPVzs.js";import"./decopilot-CZjF5g1z.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-ClcQkcu8.js";import"./input-DwcsciNr.js";import"./suggestion-DpmAiVaO.js";import"./use-org-fs-Dax61xWP.js";import"./question-004-sINsf4GQ.js";import"./use-members-i2T2it_v.js";import"./use-org-auth-client-B7ZtWQAU.js";import"./feature-paywall-BWXzTC8M.js";import"./plan-ladder-DdvajrNu.js";import"./add-connection-dialog-DU7LzF51.js";import"./extract-connection-data-CDeCZEXj.js";import"./metadata-D72DunRR.js";import"./connection-Bp_V6T8B.js";import"./connection-card-CtvZJL9l.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-BsreWXIJ.js";import"./authenticate-and-persist-oauth-CNlmBCGw.js";import"./mcp-oauth-CGCjtFIL.js";import"./collection-tabs-glsScWrF.js";import"./use-infinite-scroll-CyOQA4SB.js";import"./useSuspenseInfiniteQuery-DF4BukrQ.js";import"./sandbox-lifecycle-context-DQzttex0.js";import"./resolve-tab-icon-DXJnhSrQ.js";import"./use-task-metadata-B50R7YVb.js";import"./use-project-native-view-presence-pXoLbAJi.js";import"./site-slug-DebpOoQq.js";import"./virtual-mcp-DhabdkeJ.js";import"./feature-gate-CVihx7r6.js";import"./mustache-DlIZk22M.js";import"./empty-state-BIGrNuvN.js";import"./empty-state-DD1de6E_.js";import"./github-icon-CbIIkcig.js";import"./repository-import-picker-DgRDvroV.js";import"./repository-picker-DJ0Bq0Gn.js";import"./section-preview-url-Csj0_ZDg.js";import"./index-CKT6eBt7.js";const $e=p=>typeof p=="string"?p:"",Vt={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#39;":"'"};function Ze(p){const e=[];let s=0,r=!1;for(;s<p.length;){if(p[s]==="<"){const n=p.indexOf(">",s);s=n<0?p.length:n+1;continue}let l=p[s]??"",o=s+1;if(p[s]==="&"){const n=p.indexOf(";",s);if(n>=0&&n-s<=10){const c=Vt[p.slice(s,n+1).toLowerCase()];c!==void 0&&(l=c,o=n+1)}}const d=s;if(s=o,/\s/.test(l)){if(r){const n=e[e.length-1];n&&(n.end=o);continue}e.push({ch:" ",start:d,end:o}),r=!0}else e.push({ch:l,start:d,end:o}),r=!1}return{text:e.map(l=>l.ch).join(""),chars:e}}function Gt(p){return Ze(p).text.trim()}function Yt(p){const e=[];for(const s of p)switch(ht($e(s.__resolveType))){case"Paragraph":e.push(Gt($e(s.html)));break;case"Heading":e.push($e(s.text));break;case"Quote":e.push($e(s.quote));break;case"List":e.push($e(s.items));break}return e.filter(Boolean).join(`
1
+ import{b as Se,a3 as Xe,r as Ae,j as t,B as De,l as Ue,t as qe,c as Fe}from"./index-CK2jC1b8.js";import{u as et}from"./chat-context-CNmaHg6E.js";import{i as tt}from"./AlertCircle-YzP1ItvL.js";import{Z as st,ak as ot,ah as it,a0 as lt,U as at}from"./agent-icon-Jo8-4dPq.js";import{n as rt}from"./LinkExternal01-D-eEFhKO.js";import{s as nt}from"./XClose-CbmBXBAq.js";import{I as Ie}from"./input-BCcJ8Hmw.js";import{L as ve}from"./label-C32hF8xr.js";import{M as ct}from"./multi-select-CrUYDIyH.js";import{T as Oe,a as pt,c as Re,b as dt}from"./tabs-C_SkK0zq.js";import{S as mt}from"./switch-DCOUunxF.js";import{T as He}from"./textarea-Crbkqbuz.js";import{u as ft,a_ as ut,a$ as _e,b0 as xt,b1 as Ve}from"./runnable-block-editor-CTcUBv1Z.js";import{b as ht,l as gt,u as bt,g as jt,m as vt,s as fe,a as yt,c as St,E as Et,p as Ge,d as kt,R as Nt,e as Ct,f as Pt,A as Tt,P as Lt,h as wt}from"./agent-site-editor-content-CnwpjMKB.js";import{c as Ye,T as We,a as Qe}from"./tooltip-BX_EIFZx.js";import{f as Bt,a as At,b as Ft,c as Me,B as $t}from"./block-document-GGgZ2xCN.js";import{i as Dt}from"./Check-DMZ0RIwh.js";import{i as It}from"./Link01-BdK1ByU5.js";import{D as zt,b as qt,c as _t,d as Ot,h as Rt,e as Mt}from"./dialog-DdqSoRM9.js";import{u as Kt}from"./use-ai-providers-BBTYyg8P.js";import{a as Ut}from"./use-fast-preview-draft-url-BOIphrSf.js";import{u as Ht}from"./use-autosave-xXDIWIWJ.js";import"./use-panel-navigate-DA-8PNPm.js";import"./thread-route-Bvyqd7wd.js";import"./use-project-scope-3ou33Tvp.js";import"./use-virtual-mcp-C01zDEqD.js";import"./use-mcp-client-BR_DXeP8.js";import"./auth-gtdPpHjL.js";import"./github-repo-BknN0SVI.js";import"./autosend-D8qwra7k.js";import"./thread-intent-3sZpI08X.js";import"./slugify-CEUa2lfQ.js";import"./hooks-BaT6zpiH.js";import"./backoff-8mStPHYB.js";import"./task-board-CD8iA_oi.js";import"./schema-YWMvOOES.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-yqpltSF-.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-YF4HlwXb.js";import"./use-organization-settings-DSpO89g3.js";import"./Tool01-PaohPsXN.js";import"./ArrowUp-qgp0EG1S.js";import"./ArrowLeft-CYpMPcOZ.js";import"./ArrowRight-Cx_2CtPy.js";import"./ZoomOut-BikQEs2y.js";import"./Globe04-Dy5lW2tL.js";import"./CheckCircle-gIlSms3T.js";import"./ChevronUp-G7F3VYIf.js";import"./UserSquare-DrIVMzs5.js";import"./Copy01-B-dz9iXg.js";import"./CreditCard01-CAP8dDsb.js";import"./DotsVertical-BdurgnSh.js";import"./Eye-ZgodVkyQ.js";import"./Share07-DGVeEnhS.js";import"./Image01-GZwmFlKM.js";import"./Key01-Da1KKUib.js";import"./LayoutLeft-DbkGyzH4.js";import"./Monitor01-Dqm9KsCN.js";import"./Sun-C7ngZDnN.js";import"./Palette-H8aWBRVl.js";import"./Plus-Cc4ubNGu.js";import"./SearchMd-CqrAQSvB.js";import"./Trash01-DngK_rxV.js";import"./Upload01-BM_RpwaJ.js";import"./User01--_GcM9Nm.js";import"./Users01-CbmiNtCo.js";import"./X-DqB0NFUe.js";import"./Zap-BoM6OXqO.js";import"./badge-DAnEDAAp.js";import"./checkbox-CCgxRg-G.js";import"./command-Be1FiAet.js";import"./index-CovgzY-C.js";import"./popover-D9fLEvti.js";import"./use-session-runtime-PHj1tP1Y.js";import"./claim-phase-copy-DiN3tSVA.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DNtCa00h.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-ATnyEj_S.js";import"./use-copy-D4TIbhMe.js";import"./usage-stats-CvltoOBH.js";import"./markdown-CCVwyZmB.js";import"./org-file-open-context-8FCTmLsE.js";import"./use-mobile-Conlu_a3.js";import"./shell-layout-0w3S7Z17.js";import"./avatar-DzaDPlqs.js";import"./download-app-dialog-BlOmHAsj.js";import"./integration-icon-CicyoW2g.js";import"./project-icon-D4PJG-i0.js";import"./required-auth-layout-DB5JpRTU.js";import"./use-org-sso-B2X6FOxf.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CutrdRC_.js";import"./types-D5TGgE6N.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-aZG77Xf7.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-6Vxtignr.js";import"./use-connection-CrE81qJi.js";import"./use-navigate-to-agent-EF0ZR5Ia.js";import"./use-mcp-prompts-DkqcWZgO.js";import"./index-A41c0be0.js";import"./form-DDN0fmnr.js";import"./use-thread-outputs-uJ7yrzFy.js";import"./file-type-icon-BDgGUbiO.js";import"./utils-jA0q__Q1.js";import"./scroll-area-DCufqOiC.js";import"./select-D4vELKrF.js";import"./index-BEaxoeD8.js";import"./monaco-editor-Em6ZNkGd.js";import"./editor-oQiihuTN.js";import"./calendar-C6S4gjZ0.js";import"./rich-text-link-control-D3evQDCf.js";import"./combobox-Ce_kogEm.js";import"./alert-dialog-BLhLimu7.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-DZ5LjK8B.js";import"./use-debounced-value-DfVIFpLg.js";import"./use-file-configs-MemDO-me.js";import"./asset-utils-BkBA20sO.js";import"./useInfiniteQuery-RDUps_Fq.js";import"./infiniteQueryObserver-r-3Zb0hn.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-7Dr1QRv7.js";import"./decofile-api-lyYnBz8F.js";import"./sandbox-git-api-B1R0585s.js";import"./agent-view-guard-C89vuUCE.js";import"./use-main-panel-tabs-r00ZOqDA.js";import"./use-route-default-main-CGb0z4AT.js";import"./use-mcp-tools-Be3QJcU4.js";import"./index-C2zAJxiS.js";import"./drawer-DD_EvNka.js";import"./collection-search-CQtm6ZPr.js";import"./input-BSlf0cIW.js";import"./chat-draft-BAXNdbwi.js";import"./use-deco-credits-CF4bywq4.js";import"./use-open-billing-url-De_dcOCW.js";import"./decopilot-Dvgnn1td.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-DBDtjD9g.js";import"./input-DdZYEeuc.js";import"./suggestion-CTZ4P7Cg.js";import"./use-org-fs-CkOSi_FE.js";import"./question-004-sINsf4GQ.js";import"./use-members-D-Y2ThV6.js";import"./use-org-auth-client-CttLYCV5.js";import"./feature-paywall-CXAok1MA.js";import"./plan-ladder-yAJPPpd3.js";import"./add-connection-dialog-D8Ox25XG.js";import"./extract-connection-data-BYZdGxJz.js";import"./metadata-D72DunRR.js";import"./connection-DpBbRAF7.js";import"./connection-card-Cbi3TS91.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-B6j-CkAe.js";import"./authenticate-and-persist-oauth-CVOY3bdK.js";import"./mcp-oauth-aTwtgi6X.js";import"./collection-tabs-Ctgaf4Pj.js";import"./use-infinite-scroll-Cbikj4Pq.js";import"./useSuspenseInfiniteQuery-CUJCDA4c.js";import"./sandbox-lifecycle-context-DVklx5ib.js";import"./resolve-tab-icon-DRTn2NwY.js";import"./use-task-metadata-BcDrCgHz.js";import"./use-project-native-view-presence-DBUyMyFo.js";import"./site-slug-DebpOoQq.js";import"./virtual-mcp-CYKM5gcZ.js";import"./feature-gate-DnBD8lbt.js";import"./mustache-DR3KrOjx.js";import"./empty-state-CdcwJcHp.js";import"./empty-state-B0qH2Kts.js";import"./github-icon-BgXpeChB.js";import"./repository-import-picker-B_yB2gqJ.js";import"./repository-picker-BEpNu3ZO.js";import"./section-preview-url-Csj0_ZDg.js";import"./index-Xi29qi2J.js";const $e=p=>typeof p=="string"?p:"",Vt={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#39;":"'"};function Ze(p){const e=[];let s=0,r=!1;for(;s<p.length;){if(p[s]==="<"){const n=p.indexOf(">",s);s=n<0?p.length:n+1;continue}let l=p[s]??"",o=s+1;if(p[s]==="&"){const n=p.indexOf(";",s);if(n>=0&&n-s<=10){const c=Vt[p.slice(s,n+1).toLowerCase()];c!==void 0&&(l=c,o=n+1)}}const d=s;if(s=o,/\s/.test(l)){if(r){const n=e[e.length-1];n&&(n.end=o);continue}e.push({ch:" ",start:d,end:o}),r=!0}else e.push({ch:l,start:d,end:o}),r=!1}return{text:e.map(l=>l.ch).join(""),chars:e}}function Gt(p){return Ze(p).text.trim()}function Yt(p){const e=[];for(const s of p)switch(ht($e(s.__resolveType))){case"Paragraph":e.push(Gt($e(s.html)));break;case"Heading":e.push($e(s.text));break;case"Quote":e.push($e(s.quote));break;case"List":e.push($e(s.items));break}return e.filter(Boolean).join(`
2
2
  `)}function Wt(p){return p.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function Qt(p,e){const s=p.slice(0,e);return s.lastIndexOf("<a")>s.lastIndexOf("</a")}function Zt(p,e,s){const r=e.trim();if(!r||!s)return{blocks:p,applied:!1};for(let l=0;l<p.length;l++){const o=p[l];if(!o||typeof o.html!="string")continue;const d=o.html,{text:n,chars:c}=Ze(d);let i=n.indexOf(r);for(;i>=0;){const m=c[i],h=c[i+r.length-1];if(m&&h){const b=m.start,v=h.end,a=d.slice(b,v);if(!a.includes("<")&&!Qt(d,b)){const j=d.slice(0,b)+`<a href="${Wt(s)}">${a}</a>`+d.slice(v),f=p.slice();return f[l]={...o,html:j},{blocks:f,applied:!0}}}i=n.indexOf(r,i+1)}}return{blocks:p,applied:!1}}function Jt(p,e){let s=p,r=0;for(const l of e){const o=Zt(s,l.quote,l.href);o.applied&&(s=o.blocks,r++)}return{blocks:s,applied:r}}function Xt({decofile:p,sections:e,currentKey:s,hasAi:r,onApply:l}){const o=Se(),d=Xe(),[n,c]=Ae.useState(!1),[i,m]=Ae.useState(!1),[h,b]=Ae.useState([]),[v,a]=Ae.useState(new Set),j=Bt(p),f=gt(p).filter(u=>u.key!==s&&u.slug),g=async()=>{m(!0);try{const u=Yt(e),E=await d.call("BLOG_LINK_SUGGEST",{body:u,posts:f.map(N=>({title:N.title,slug:N.slug}))}),y=[],L=new Set;for(const N of E.suggestions){const P=f.find(Y=>Y.slug===N.slug);if(!P||!j)continue;const F=At(j,{category:P.categorySlugs[0]??"",slug:P.slug});if(!F||!u.includes(N.quote))continue;const x=`${N.quote}→${P.slug}`;L.has(x)||(L.add(x),y.push({quote:N.quote,href:F,title:P.title}))}b(y),a(new Set(y.map((N,P)=>P))),c(!0),y.length===0&&qe.info(o("sandbox.linkSuggest.none"))}catch(u){qe.error(u instanceof Error?u.message:o("sandbox.linkSuggest.failed"))}finally{m(!1)}},S=u=>a(E=>{const y=new Set(E);return y.has(u)?y.delete(u):y.add(u),y}),C=()=>{const u=h.filter((L,N)=>v.has(N)).map(L=>({quote:L.quote,href:L.href})),{blocks:E,applied:y}=Jt(e,u);l(E),c(!1),qe.success(o("sandbox.linkSuggest.applied",{count:String(y)}))};return t.jsxs(t.Fragment,{children:[t.jsxs(De,{type:"button",variant:"outline",size:"sm",disabled:i||!r||f.length===0,title:r?f.length===0?o("sandbox.linkSuggest.noCandidates"):o("sandbox.linkSuggest.hint"):o("sandbox.autonomous.noAiProvider"),onClick:()=>{g()},children:[i?t.jsx(st,{size:14,className:"animate-spin"}):t.jsx(It,{size:14}),o("sandbox.linkSuggest.button")]}),t.jsx(zt,{open:n,onOpenChange:c,children:t.jsxs(qt,{className:"max-h-[85vh] sm:max-w-lg",children:[t.jsxs(_t,{children:[t.jsx(Ot,{children:o("sandbox.linkSuggest.title")}),t.jsx(Rt,{children:o("sandbox.linkSuggest.description")})]}),h.length===0?t.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("sandbox.linkSuggest.none")}):t.jsx("ul",{className:"max-h-[50vh] space-y-1 overflow-y-auto",children:h.map((u,E)=>{const y=v.has(E);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>S(E),className:"flex w-full items-start gap-2.5 rounded-lg border p-2.5 text-left transition-colors hover:bg-muted/50",children:[t.jsx("span",{className:Ue("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border",y?"border-primary bg-primary text-primary-foreground":"border-input"),children:y&&t.jsx(Dt,{size:11})}),t.jsxs("span",{className:"min-w-0 flex-1 text-sm",children:[t.jsxs("span",{className:"font-medium",children:["“",u.quote,"”"]}),t.jsxs("span",{className:"text-muted-foreground",children:[" → ",u.title]})]})]})},`${u.quote}-${u.href}`)})}),t.jsx(Mt,{children:t.jsx(De,{type:"button",disabled:v.size===0,onClick:C,children:o("sandbox.linkSuggest.apply",{count:String(v.size)})})})]})})]})}function es(p){return Array.isArray(p)?p.map(e=>({key:fe(e?.key),value:fe(e?.value)})):[]}function Nl(p){const e=Fe.c(146),{orgSlug:s,virtualMcpId:r,branch:l,blockKey:o,block:d,decofile:n,meta:c,previewBaseUrl:i,move:m,onClose:h,expanded:b,onToggleExpand:v}=p,a=Se(),j=et()?.taskId??null;let f;e[0]!==l||e[1]!==s||e[2]!==r?(f={orgSlug:s,virtualMcpId:r,branch:l},e[0]=l,e[1]=s,e[2]=r,e[3]=f):f=e[3];const g=ft(f);let S;e[4]!==l||e[5]!==c||e[6]!==s||e[7]!==r?(S={orgSlug:s,virtualMcpId:r,branch:l,meta:c},e[4]=l,e[5]=c,e[6]=s,e[7]=r,e[8]=S):S=e[8];const C=bt(S),u=Kt().length>0;let E;e[9]!==l||e[10]!==s||e[11]!==r?(E={orgSlug:s,virtualMcpId:r,branch:l},e[9]=l,e[10]=s,e[11]=r,e[12]=E):E=e[12];const y=Ut(E);let L;e[13]!==d?(L=jt(d,"posts"),e[13]=d,e[14]=L):L=e[14];const N=L;let P;e[15]!==o||e[16]!==g?(P=be=>{g.mutate({blockKey:o,data:yt(o,St(be))})},e[15]=o,e[16]=g,e[17]=P):P=e[17];let F;e[18]!==g.isPending?(F={isSaving:g.isPending},e[18]=g.isPending,e[19]=F):F=e[19];const[x,Y,$,M]=Ht(N,P,F),[K,U]=Ae.useState(o);K!==o&&(U(o),$(N));let D;e[20]!==o||e[21]!==m||e[22]!==x||e[23]!==$?(D=be=>{$(x),m.apply(o,be,x)},e[20]=o,e[21]=m,e[22]=x,e[23]=$,e[24]=D):D=e[24];const _=D;let I;e[25]!==x||e[26]!==Y?(I=(be,Je)=>Y({...x,[be]:Je}),e[25]=x,e[26]=Y,e[27]=I):I=e[27];const T=I,[O,H]=Ae.useState(0);let z;e[28]!==n||e[29]!==y||e[30]!==x||e[31]!==i?(z=Ft({decofile:n,post:x,previewBaseUrl:i,draftPointer:y}),e[28]=n,e[29]=y,e[30]=x,e[31]=i,e[32]=z):z=e[32];const A=z;let W,w,q;e[33]!==x||e[34]!==a?(w=vt(x),W=w.length>0,q=w.length===1?a("sandbox.postEditor.missingFieldSingular",{fields:w.join(", ")}):a("sandbox.postEditor.missingFieldPlural",{fields:w.join(", ")}),e[33]=x,e[34]=a,e[35]=W,e[36]=w,e[37]=q):(W=e[35],w=e[36],q=e[37]);const R=q,V=g.isPending||M;let B;e[38]!==g.isError||e[39]!==V?(B=t.jsx(ut,{isPending:V,isError:g.isError}),e[38]=g.isError,e[39]=V,e[40]=B):B=e[40];let G;e[41]!==W||e[42]!==w||e[43]!==R||e[44]!==a?(G=W&&t.jsxs(Ye,{children:[t.jsx(We,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(tt,{size:14}),w.length," ",w.length===1?a("sandbox.postEditor.issueSingular"):a("sandbox.postEditor.issuePlural")]})}),t.jsx(Qe,{side:"bottom",children:R})]}),e[41]=W,e[42]=w,e[43]=R,e[44]=a,e[45]=G):G=e[45];let ye;e[46]!==B||e[47]!==G?(ye=t.jsxs("div",{className:"flex items-center gap-3",children:[B,G]}),e[46]=B,e[47]=G,e[48]=ye):ye=e[48];let Q;e[49]!==b||e[50]!==h||e[51]!==v||e[52]!==a?(Q=(v||h)&&t.jsxs("div",{className:"-mr-2 flex items-center gap-0.5",children:[v&&t.jsx(De,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:v,title:a(b?"sandbox.postBoard.collapse":"sandbox.postBoard.expand"),children:b?t.jsx(ot,{size:16}):t.jsx(it,{size:16})}),h&&t.jsx(De,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:h,title:a("sandbox.postBoard.close"),children:t.jsx(nt,{size:16})})]}),e[49]=b,e[50]=h,e[51]=v,e[52]=a,e[53]=Q):Q=e[53];let Z;e[54]!==ye||e[55]!==Q?(Z=t.jsx("div",{className:"absolute inset-x-0 top-0 z-10 bg-background/80 backdrop-blur-sm",children:t.jsxs("div",{className:"mx-auto flex max-w-4xl items-center justify-between gap-2 px-8 py-3",children:[ye,Q]})}),e[54]=ye,e[55]=Q,e[56]=Z):Z=e[56];let J;e[57]!==x.title?(J=fe(x.title),e[57]=x.title,e[58]=J):J=e[58];let X;e[59]!==T?(X=be=>T("title",be),e[59]=T,e[60]=X):X=e[60];let ee;e[61]!==a?(ee=a("sandbox.postEditor.postTitlePlaceholder"),e[61]=a,e[62]=ee):ee=e[62];let te;e[63]!==J||e[64]!==X||e[65]!==ee?(te=t.jsx(Et,{value:J,onChange:X,placeholder:ee,className:"py-1 text-4xl font-bold text-foreground"}),e[63]=J,e[64]=X,e[65]=ee,e[66]=te):te=e[66];let ue;e[67]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(lt,{}),e[67]=ue):ue=e[67];let se;e[68]!==a?(se=a("sandbox.postEditor.contentTab"),e[68]=a,e[69]=se):se=e[69];let oe;e[70]!==se?(oe=t.jsxs(Oe,{value:"content",children:[ue,se]}),e[70]=se,e[71]=oe):oe=e[71];let xe;e[72]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(at,{}),e[72]=xe):xe=e[72];let ie;e[73]!==a?(ie=a("sandbox.postEditor.settingsTab"),e[73]=a,e[74]=ie):ie=e[74];let le;e[75]!==ie?(le=t.jsxs(Oe,{value:"settings",children:[xe,ie]}),e[75]=ie,e[76]=le):le=e[76];let ae;e[77]!==oe||e[78]!==le?(ae=t.jsxs(pt,{children:[oe,le]}),e[77]=oe,e[78]=le,e[79]=ae):ae=e[79];let re;e[80]!==x.sections?(re=Me(x.sections),e[80]=x.sections,e[81]=re):re=e[81];let ne;e[82]!==T?(ne=be=>{T("sections",be),H(ts)},e[82]=T,e[83]=ne):ne=e[83];let ce;e[84]!==o||e[85]!==n||e[86]!==u||e[87]!==re||e[88]!==ne?(ce=t.jsx(Xt,{decofile:n,sections:re,currentKey:o,hasAi:u,onApply:ne}),e[84]=o,e[85]=n,e[86]=u,e[87]=re,e[88]=ne,e[89]=ce):ce=e[89];const je=!A;let pe;e[90]!==A||e[91]!==a?(pe=a(A?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),e[90]=A,e[91]=a,e[92]=pe):pe=e[92];let de;e[93]!==A?(de=()=>{A&&window.open(A,"_blank","noopener,noreferrer")},e[93]=A,e[94]=de):de=e[94];let he;e[95]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(rt,{size:14}),e[95]=he):he=e[95];let me;e[96]!==a?(me=a("sandbox.postEditor.seePreview"),e[96]=a,e[97]=me):me=e[97];let ge;e[98]!==je||e[99]!==pe||e[100]!==de||e[101]!==me?(ge=t.jsxs(De,{type:"button",variant:"outline",size:"sm",disabled:je,title:pe,onClick:de,children:[he,me]}),e[98]=je,e[99]=pe,e[100]=de,e[101]=me,e[102]=ge):ge=e[102];let k;e[103]!==ce||e[104]!==ge?(k=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[ce,ge]}),e[103]=ce,e[104]=ge,e[105]=k):k=e[105];let Ee;e[106]!==ae||e[107]!==k?(Ee=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[ae,k]}),e[106]=ae,e[107]=k,e[108]=Ee):Ee=e[108];let ke;e[109]!==x.sections?(ke=Me(x.sections),e[109]=x.sections,e[110]=ke):ke=e[110];let Ne;e[111]!==T?(Ne=be=>T("sections",be),e[111]=T,e[112]=Ne):Ne=e[112];let Ce;e[113]!==l||e[114]!==s||e[115]!==j||e[116]!==r?(Ce={orgSlug:s,virtualMcpId:r,branch:l,threadId:j},e[113]=l,e[114]=s,e[115]=j,e[116]=r,e[117]=Ce):Ce=e[117];let Pe;e[118]!==a?(Pe=a("sandbox.postEditor.noContentYet"),e[118]=a,e[119]=Pe):Pe=e[119];let Te;e[120]!==O||e[121]!==n||e[122]!==c||e[123]!==ke||e[124]!==Ne||e[125]!==Ce||e[126]!==Pe?(Te=t.jsx(Re,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx($t,{value:ke,onChange:Ne,meta:c,decofile:n,sandboxRef:Ce,emptyMessage:Pe},O)})}),e[120]=O,e[121]=n,e[122]=c,e[123]=ke,e[124]=Ne,e[125]=Ce,e[126]=Pe,e[127]=Te):Te=e[127];let Le;e[128]!==o||e[129]!==n||e[130]!==m||e[131]!==_||e[132]!==x||e[133]!==T||e[134]!==C?(Le=t.jsx(Re,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(os,{post:x,decofile:n,support:C,onChange:T,blockKey:o,move:m,onMoveStatus:_})})}),e[128]=o,e[129]=n,e[130]=m,e[131]=_,e[132]=x,e[133]=T,e[134]=C,e[135]=Le):Le=e[135];let we;e[136]!==Ee||e[137]!==Te||e[138]!==Le?(we=t.jsxs(dt,{defaultValue:"content",className:"mt-6 gap-4",children:[Ee,Te,Le]}),e[136]=Ee,e[137]=Te,e[138]=Le,e[139]=we):we=e[139];let Be;e[140]!==te||e[141]!==we?(Be=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 pb-6 pt-14",children:[te,we]})}),e[140]=te,e[141]=we,e[142]=Be):Be=e[142];let ze;return e[143]!==Z||e[144]!==Be?(ze=t.jsxs("div",{className:"relative flex h-full flex-col",children:[Z,Be]}),e[143]=Z,e[144]=Be,e[145]=ze):ze=e[145],ze}function ts(p){return p+1}function ss(p){const e=Fe.c(15),{blockKey:s,post:r,move:l,onMoveStatus:o}=p,d=Se();let n;e[0]!==r?(n=Ge(r),e[0]=r,e[1]=n):n=e[1];const c=n;let i,m;if(e[2]!==s||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==r||e[7]!==d){let b;e[10]!==c?(b=a=>a!=="generating"||c==="generating",e[10]=c,e[11]=b):b=e[11];const v=Lt.filter(b);i="flex flex-wrap gap-1.5",m=v.map(a=>{const j=a===c,f=j?null:l.refuse(s,a,r);return t.jsxs(Ye,{children:[t.jsx(We,{asChild:!0,children:t.jsx("span",{children:t.jsx("button",{type:"button",disabled:!!f,"aria-pressed":j,onClick:()=>o(a),className:Ue("rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",j?"border-primary bg-primary text-primary-foreground":"cursor-pointer bg-card hover:bg-muted",f&&"cursor-not-allowed opacity-50"),children:d(wt[a])})})}),f&&t.jsx(Qe,{side:"bottom",children:l.reasonText(f)})]},a)}),e[2]=s,e[3]=c,e[4]=l,e[5]=o,e[6]=r,e[7]=d,e[8]=i,e[9]=m}else i=e[8],m=e[9];let h;return e[12]!==i||e[13]!==m?(h=t.jsx("div",{className:i,children:m}),e[12]=i,e[13]=m,e[14]=h):h=e[14],h}function os(p){const e=Fe.c(159),{post:s,decofile:r,support:l,onChange:o,blockKey:d,move:n,onMoveStatus:c}=p,i=Se();let m;e[0]!==s?(m=Ge(s),e[0]=s,e[1]=m):m=e[1];const h=m;let b;e[2]!==h||e[3]!==l?(b=kt(l)&&h==="scheduled",e[2]=h,e[3]=l,e[4]=b):b=e[4];const v=b;let a;e[5]!==i?(a=i("sandbox.postEditor.statusLabel"),e[5]=i,e[6]=a):a=e[6];let j;e[7]!==a?(j=t.jsx(ve,{children:a}),e[7]=a,e[8]=j):j=e[8];let f;e[9]!==d||e[10]!==n||e[11]!==c||e[12]!==s?(f=t.jsx(ss,{blockKey:d,post:s,move:n,onMoveStatus:c}),e[9]=d,e[10]=n,e[11]=c,e[12]=s,e[13]=f):f=e[13];let g;e[14]!==j||e[15]!==f?(g=t.jsxs("div",{className:"space-y-2",children:[j,f]}),e[14]=j,e[15]=f,e[16]=g):g=e[16];let S;e[17]!==v||e[18]!==o||e[19]!==s.scheduledDatetime||e[20]!==i?(S=v&&t.jsx(_e,{schema:{type:"string",format:"date-time",title:i("sandbox.postEditor.scheduledDatetimeLabel"),description:i("sandbox.postEditor.scheduledDatetimeDescription")},value:fe(s.scheduledDatetime),onChange:k=>o("scheduledDatetime",k),path:"post-scheduled-datetime",label:i("sandbox.postEditor.scheduledDatetimeLabel")}),e[17]=v,e[18]=o,e[19]=s.scheduledDatetime,e[20]=i,e[21]=S):S=e[21];let C;e[22]!==g||e[23]!==S?(C=t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[g,S]}),e[22]=g,e[23]=S,e[24]=C):C=e[24];let u;e[25]!==i?(u=i("sandbox.postEditor.excerptLabel"),e[25]=i,e[26]=u):u=e[26];let E;e[27]!==u?(E=t.jsx(ve,{htmlFor:"post-excerpt",children:u}),e[27]=u,e[28]=E):E=e[28];let y;e[29]!==s.excerpt?(y=fe(s.excerpt),e[29]=s.excerpt,e[30]=y):y=e[30];let L;e[31]!==o?(L=k=>o("excerpt",k.target.value),e[31]=o,e[32]=L):L=e[32];let N;e[33]!==y||e[34]!==L?(N=t.jsx(He,{id:"post-excerpt",value:y,onChange:L,rows:2}),e[33]=y,e[34]=L,e[35]=N):N=e[35];let P;e[36]!==E||e[37]!==N?(P=t.jsxs("div",{className:"space-y-2",children:[E,N]}),e[36]=E,e[37]=N,e[38]=P):P=e[38];let F;e[39]!==i?(F=i("sandbox.postEditor.slugLabel"),e[39]=i,e[40]=F):F=e[40];let x;e[41]!==F?(x=t.jsx(ve,{htmlFor:"post-slug",children:F}),e[41]=F,e[42]=x):x=e[42];let Y;e[43]!==s.slug?(Y=fe(s.slug),e[43]=s.slug,e[44]=Y):Y=e[44];let $;e[45]!==o?($=k=>o("slug",k.target.value),e[45]=o,e[46]=$):$=e[46];let M;e[47]!==i?(M=i("sandbox.postEditor.slugPlaceholder"),e[47]=i,e[48]=M):M=e[48];let K;e[49]!==Y||e[50]!==$||e[51]!==M?(K=t.jsx(Ie,{id:"post-slug",value:Y,onChange:$,placeholder:M,className:"h-10"}),e[49]=Y,e[50]=$,e[51]=M,e[52]=K):K=e[52];let U;e[53]!==x||e[54]!==K?(U=t.jsxs("div",{className:"space-y-2",children:[x,K]}),e[53]=x,e[54]=K,e[55]=U):U=e[55];let D;e[56]!==i?(D=i("sandbox.postEditor.dateLabel"),e[56]=i,e[57]=D):D=e[57];let _;e[58]!==D?(_={type:"string",format:"date",title:D},e[58]=D,e[59]=_):_=e[59];let I;e[60]!==s.date?(I=fe(s.date),e[60]=s.date,e[61]=I):I=e[61];let T;e[62]!==o?(T=k=>o("date",k),e[62]=o,e[63]=T):T=e[63];let O;e[64]!==i?(O=i("sandbox.postEditor.dateLabel"),e[64]=i,e[65]=O):O=e[65];let H;e[66]!==_||e[67]!==I||e[68]!==T||e[69]!==O?(H=t.jsx(_e,{schema:_,value:I,onChange:T,path:"post-date",label:O}),e[66]=_,e[67]=I,e[68]=T,e[69]=O,e[70]=H):H=e[70];let z;e[71]!==i?(z=i("sandbox.postEditor.readTimeLabel"),e[71]=i,e[72]=z):z=e[72];let A;e[73]!==z?(A={type:"integer",title:z},e[73]=z,e[74]=A):A=e[74];const W=typeof s.readTime=="number"?s.readTime:void 0;let w;e[75]!==o?(w=k=>o("readTime",k),e[75]=o,e[76]=w):w=e[76];let q;e[77]!==i?(q=i("sandbox.postEditor.readTimeLabel"),e[77]=i,e[78]=q):q=e[78];let R;e[79]!==A||e[80]!==W||e[81]!==w||e[82]!==q?(R=t.jsx(xt,{schema:A,value:W,onChange:w,path:"post-read-time",label:q}),e[79]=A,e[80]=W,e[81]=w,e[82]=q,e[83]=R):R=e[83];let V;e[84]!==U||e[85]!==H||e[86]!==R?(V=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[U,H,R]}),e[84]=U,e[85]=H,e[86]=R,e[87]=V):V=e[87];let B;e[88]!==i?(B=i("sandbox.postEditor.coverImageLabel"),e[88]=i,e[89]=B):B=e[89];let G;e[90]!==B?(G={type:"string",format:"image-uri",title:B},e[90]=B,e[91]=G):G=e[91];const ye=s.image;let Q;e[92]!==o?(Q=k=>o("image",k),e[92]=o,e[93]=Q):Q=e[93];let Z;e[94]!==i?(Z=i("sandbox.postEditor.coverImageLabel"),e[94]=i,e[95]=Z):Z=e[95];let J;e[96]!==s.image||e[97]!==G||e[98]!==Q||e[99]!==Z?(J=t.jsx(Ve,{schema:G,value:ye,onChange:Q,path:"post-image",label:Z}),e[96]=s.image,e[97]=G,e[98]=Q,e[99]=Z,e[100]=J):J=e[100];let X;e[101]!==i?(X=i("sandbox.postEditor.coverAltLabel"),e[101]=i,e[102]=X):X=e[102];let ee;e[103]!==i?(ee=i("sandbox.postEditor.coverAltDescription"),e[103]=i,e[104]=ee):ee=e[104];let te;e[105]!==X||e[106]!==ee?(te={type:"string",title:X,description:ee},e[105]=X,e[106]=ee,e[107]=te):te=e[107];let ue;e[108]!==s.alt?(ue=fe(s.alt),e[108]=s.alt,e[109]=ue):ue=e[109];let se;e[110]!==o?(se=k=>o("alt",k),e[110]=o,e[111]=se):se=e[111];let oe;e[112]!==i?(oe=i("sandbox.postEditor.coverAltLabel"),e[112]=i,e[113]=oe):oe=e[113];let xe;e[114]!==te||e[115]!==ue||e[116]!==se||e[117]!==oe?(xe=t.jsx(_e,{schema:te,value:ue,onChange:se,path:"post-alt",label:oe}),e[114]=te,e[115]=ue,e[116]=se,e[117]=oe,e[118]=xe):xe=e[118];let ie;e[119]!==J||e[120]!==xe?(ie=t.jsxs("div",{className:"space-y-2",children:[J,xe]}),e[119]=J,e[120]=xe,e[121]=ie):ie=e[121];let le;e[122]!==i?(le=i("sandbox.postEditor.authorsLabel"),e[122]=i,e[123]=le):le=e[123];let ae;e[124]!==o?(ae=k=>o("authors",k),e[124]=o,e[125]=ae):ae=e[125];let re;e[126]!==r||e[127]!==s.authors||e[128]!==le||e[129]!==ae?(re=t.jsx(Ke,{label:le,decofile:r,kind:"authors",valueField:"email",toRef:ls,selected:s.authors,onChange:ae}),e[126]=r,e[127]=s.authors,e[128]=le,e[129]=ae,e[130]=re):re=e[130];let ne;e[131]!==i?(ne=i("sandbox.postEditor.categoriesLabel"),e[131]=i,e[132]=ne):ne=e[132];let ce;e[133]!==o?(ce=k=>o("categories",k),e[133]=o,e[134]=ce):ce=e[134];let je;e[135]!==r||e[136]!==s.categories||e[137]!==ne||e[138]!==ce?(je=t.jsx(Ke,{label:ne,decofile:r,kind:"categories",valueField:"slug",toRef:is,selected:s.categories,onChange:ce}),e[135]=r,e[136]=s.categories,e[137]=ne,e[138]=ce,e[139]=je):je=e[139];let pe;e[140]!==o?(pe=k=>o("extraProps",k),e[140]=o,e[141]=pe):pe=e[141];let de;e[142]!==s.extraProps||e[143]!==pe?(de=t.jsx(rs,{value:s.extraProps,onChange:pe}),e[142]=s.extraProps,e[143]=pe,e[144]=de):de=e[144];let he;e[145]!==o?(he=k=>o("seo",k),e[145]=o,e[146]=he):he=e[146];let me;e[147]!==s.seo||e[148]!==he?(me=t.jsx(as,{value:s.seo,onChange:he}),e[147]=s.seo,e[148]=he,e[149]=me):me=e[149];let ge;return e[150]!==P||e[151]!==V||e[152]!==ie||e[153]!==re||e[154]!==je||e[155]!==de||e[156]!==me||e[157]!==C?(ge=t.jsxs("div",{className:"space-y-5",children:[C,P,V,ie,re,je,de,me]}),e[150]=P,e[151]=V,e[152]=ie,e[153]=re,e[154]=je,e[155]=de,e[156]=me,e[157]=C,e[158]=ge):ge=e[158],ge}function is(p){return{name:fe(p.name),slug:fe(p.slug)}}function ls(p){return{...p}}function as(p){const e=Fe.c(93),{value:s,onChange:r}=p,l=Se();let o;e[0]!==s?(o=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=o):o=e[1];const d=o;let n;e[2]!==r||e[3]!==d?(n=(B,G)=>r({...d,[B]:G}),e[2]=r,e[3]=d,e[4]=n):n=e[4];const c=n;let i;e[5]!==l?(i=l("sandbox.postEditor.seoSectionLabel"),e[5]=l,e[6]=i):i=e[6];let m;e[7]!==i?(m=t.jsx("p",{className:"text-sm font-medium",children:i}),e[7]=i,e[8]=m):m=e[8];let h;e[9]!==l?(h=l("sandbox.postEditor.seoSectionHint"),e[9]=l,e[10]=h):h=e[10];let b;e[11]!==h?(b=t.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[11]=h,e[12]=b):b=e[12];let v;e[13]!==m||e[14]!==b?(v=t.jsxs("div",{className:"space-y-1",children:[m,b]}),e[13]=m,e[14]=b,e[15]=v):v=e[15];let a;e[16]!==l?(a=l("sandbox.postEditor.seoTitleLabel"),e[16]=l,e[17]=a):a=e[17];let j;e[18]!==a?(j=t.jsx(ve,{htmlFor:"post-seo-title",children:a}),e[18]=a,e[19]=j):j=e[19];let f;e[20]!==d.title?(f=fe(d.title),e[20]=d.title,e[21]=f):f=e[21];let g;e[22]!==c?(g=B=>c("title",B.target.value),e[22]=c,e[23]=g):g=e[23];let S;e[24]!==f||e[25]!==g?(S=t.jsx(Ie,{id:"post-seo-title",value:f,onChange:g,className:"h-10"}),e[24]=f,e[25]=g,e[26]=S):S=e[26];let C;e[27]!==S||e[28]!==j?(C=t.jsxs("div",{className:"space-y-2",children:[j,S]}),e[27]=S,e[28]=j,e[29]=C):C=e[29];let u;e[30]!==l?(u=l("sandbox.postEditor.seoDescriptionLabel"),e[30]=l,e[31]=u):u=e[31];let E;e[32]!==u?(E=t.jsx(ve,{htmlFor:"post-seo-description",children:u}),e[32]=u,e[33]=E):E=e[33];let y;e[34]!==d.description?(y=fe(d.description),e[34]=d.description,e[35]=y):y=e[35];let L;e[36]!==c?(L=B=>c("description",B.target.value),e[36]=c,e[37]=L):L=e[37];let N;e[38]!==y||e[39]!==L?(N=t.jsx(He,{id:"post-seo-description",value:y,onChange:L,rows:2}),e[38]=y,e[39]=L,e[40]=N):N=e[40];let P;e[41]!==E||e[42]!==N?(P=t.jsxs("div",{className:"space-y-2",children:[E,N]}),e[41]=E,e[42]=N,e[43]=P):P=e[43];let F;e[44]!==l?(F=l("sandbox.postEditor.seoImageLabel"),e[44]=l,e[45]=F):F=e[45];let x;e[46]!==F?(x={type:"string",format:"image-uri",title:F},e[46]=F,e[47]=x):x=e[47];const Y=d.image;let $;e[48]!==c?($=B=>c("image",B),e[48]=c,e[49]=$):$=e[49];let M;e[50]!==l?(M=l("sandbox.postEditor.seoImageLabel"),e[50]=l,e[51]=M):M=e[51];let K;e[52]!==d.image||e[53]!==x||e[54]!==$||e[55]!==M?(K=t.jsx(Ve,{schema:x,value:Y,onChange:$,path:"post-seo-image",label:M}),e[52]=d.image,e[53]=x,e[54]=$,e[55]=M,e[56]=K):K=e[56];let U;e[57]!==l?(U=l("sandbox.postEditor.seoCanonicalLabel"),e[57]=l,e[58]=U):U=e[58];let D;e[59]!==U?(D=t.jsx(ve,{htmlFor:"post-seo-canonical",children:U}),e[59]=U,e[60]=D):D=e[60];let _;e[61]!==d.canonical?(_=fe(d.canonical),e[61]=d.canonical,e[62]=_):_=e[62];let I;e[63]!==c?(I=B=>c("canonical",B.target.value),e[63]=c,e[64]=I):I=e[64];let T;e[65]!==l?(T=l("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=l,e[66]=T):T=e[66];let O;e[67]!==_||e[68]!==I||e[69]!==T?(O=t.jsx(Ie,{id:"post-seo-canonical",value:_,onChange:I,placeholder:T,className:"h-10"}),e[67]=_,e[68]=I,e[69]=T,e[70]=O):O=e[70];let H;e[71]!==D||e[72]!==O?(H=t.jsxs("div",{className:"space-y-2",children:[D,O]}),e[71]=D,e[72]=O,e[73]=H):H=e[73];let z;e[74]!==l?(z=l("sandbox.postEditor.seoNoIndexingLabel"),e[74]=l,e[75]=z):z=e[75];let A;e[76]!==z?(A=t.jsx(ve,{htmlFor:"post-seo-no-indexing",children:z}),e[76]=z,e[77]=A):A=e[77];const W=d.noIndexing===!0;let w;e[78]!==c?(w=B=>c("noIndexing",B),e[78]=c,e[79]=w):w=e[79];let q;e[80]!==W||e[81]!==w?(q=t.jsx(mt,{id:"post-seo-no-indexing",checked:W,onCheckedChange:w}),e[80]=W,e[81]=w,e[82]=q):q=e[82];let R;e[83]!==A||e[84]!==q?(R=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[A,q]}),e[83]=A,e[84]=q,e[85]=R):R=e[85];let V;return e[86]!==C||e[87]!==P||e[88]!==K||e[89]!==H||e[90]!==R||e[91]!==v?(V=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[v,C,P,K,H,R]}),e[86]=C,e[87]=P,e[88]=K,e[89]=H,e[90]=R,e[91]=v,e[92]=V):V=e[92],V}function rs(p){const e=Fe.c(24),{value:s,onChange:r}=p,l=Se();let o,d,n,c;if(e[0]!==r||e[1]!==l||e[2]!==s){o=es(s);const v=(j,f)=>r(o.map((g,S)=>S===j?{...g,...f}:g));d="space-y-2";let a;e[7]!==l?(a=l("sandbox.postEditor.extraPropsLabel"),e[7]=l,e[8]=a):a=e[8],e[9]!==a?(n=t.jsx(ve,{children:a}),e[9]=a,e[10]=n):n=e[10],c=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((j,f)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(Ie,{value:j.key,onChange:g=>v(f,{key:g.target.value}),placeholder:l("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(Ie,{value:j.value,onChange:g=>v(f,{value:g.target.value}),placeholder:l("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(Nt,{label:l("sandbox.postEditor.removePropLabel"),onClick:()=>r(o.filter((g,S)=>S!==f))})]},f))}),e[0]=r,e[1]=l,e[2]=s,e[3]=o,e[4]=d,e[5]=n,e[6]=c}else o=e[3],d=e[4],n=e[5],c=e[6];let i;e[11]!==l?(i=l("sandbox.postEditor.addPropLabel"),e[11]=l,e[12]=i):i=e[12];let m;e[13]!==o||e[14]!==r?(m=()=>r([...o,{key:"",value:""}]),e[13]=o,e[14]=r,e[15]=m):m=e[15];let h;e[16]!==i||e[17]!==m?(h=t.jsx(Tt,{label:i,onClick:m}),e[16]=i,e[17]=m,e[18]=h):h=e[18];let b;return e[19]!==d||e[20]!==n||e[21]!==c||e[22]!==h?(b=t.jsxs("div",{className:d,children:[n,c,h]}),e[19]=d,e[20]=n,e[21]=c,e[22]=h,e[23]=b):b=e[23],b}function Ke(p){const e=Fe.c(24),{label:s,decofile:r,kind:l,valueField:o,toRef:d,selected:n,onChange:c}=p,i=Se();let m;e[0]!==r||e[1]!==l||e[2]!==n||e[3]!==d||e[4]!==o?(m=Ct({records:Pt(r,l),selected:n,valueField:o,toRef:d}),e[0]=r,e[1]=l,e[2]=n,e[3]=d,e[4]=o,e[5]=m):m=e[5];const{options:h,selectedValues:b,refsForValues:v}=m;let a;e[6]!==l||e[7]!==i?(a=i(l==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=l,e[7]=i,e[8]=a):a=e[8];const j=a;let f;e[9]!==l||e[10]!==i?(f=i(l==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=l,e[10]=i,e[11]=f):f=e[11];const g=f;let S;e[12]!==s?(S=t.jsx(ve,{children:s}),e[12]=s,e[13]=S):S=e[13];let C;e[14]!==j||e[15]!==c||e[16]!==h||e[17]!==v||e[18]!==g||e[19]!==b?(C=h.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:j}):t.jsx(ct,{options:h,defaultValue:b,onValueChange:E=>c(v(E)),placeholder:g,maxCount:4}),e[14]=j,e[15]=c,e[16]=h,e[17]=v,e[18]=g,e[19]=b,e[20]=C):C=e[20];let u;return e[21]!==S||e[22]!==C?(u=t.jsxs("div",{className:"space-y-2",children:[S,C]}),e[21]=S,e[22]=C,e[23]=u):u=e[23],u}export{Nl as PostEditor};
@@ -1 +1 @@
1
- import{c as J,b as K,d as Z,f as ee,a6 as te,j as t,B as L,l as se}from"./index-CC25Ppah.js";import{d as Q}from"./dialog-GV2-AWhM.js";import{c as A,T as q,a as G}from"./tooltip-CxCpd2vh.js";import{n as ie}from"./Eye-DQ7cfCM0.js";import{n as le}from"./LinkExternal01-CXDDMqr6.js";import{s as re}from"./XClose-Ck6U0czU.js";import{a as ne}from"./Share07-BnshXTQj.js";import{f as oe,F as ae,a as ce}from"./file-preview-DCDQ1qgJ.js";import{F as V,H as de}from"./file-share-button-Cty0rZxy.js";import{F as W}from"./file-type-icon-C06txfjh.js";import{u as fe,b as me,e as he}from"./use-org-fs-Dax61xWP.js";import{p as xe,b as pe}from"./location-oTTXFrSF.js";function ue(u){const e=J.c(13),{previewPath:i}=u,a=K(),x=Z(),c=ee({strict:!1}).org??"";let o;e[0]!==i?(o=i.split("/").slice(0,-1).join("/"),e[0]=i,e[1]=o):o=e[1];const r=o;let d;e[2]!==x||e[3]!==c||e[4]!==r||e[5]!==i?(d=()=>{x({to:te.library,params:{org:c},search:{path:r||void 0,preview:i}})},e[2]=x,e[3]=c,e[4]=r,e[5]=i,e[6]=d):d=e[6];const S=d;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ne,{size:14}),e[7]=f):f=e[7];let n;e[8]!==a?(n=a("library.seeInLibrary.label"),e[8]=a,e[9]=n):n=e[9];let s;return e[10]!==S||e[11]!==n?(s=t.jsxs(L,{variant:"ghost",size:"sm",onClick:S,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:[f,n]}),e[10]=S,e[11]=n,e[12]=s):s=e[12],s}const je=u=>/\.html?$/i.test(u);function X(u){const e=J.c(10),{onClose:i}=u,a=K();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(re,{size:14}),e[0]=x):x=e[0];let c;e[1]!==i?(c=t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:i,children:x})}),e[1]=i,e[2]=c):c=e[2];let o;e[3]!==a?(o=a("library.previewContent.close"),e[3]=a,e[4]=o):o=e[4];let r;e[5]!==o?(r=t.jsx(G,{side:"bottom",children:o}),e[5]=o,e[6]=r):r=e[6];let d;return e[7]!==c||e[8]!==r?(d=t.jsxs(A,{children:[c,r]}),e[7]=c,e[8]=r,e[9]=d):d=e[9],d}function Te(u){const e=J.c(67),{previewPath:i,onClose:a,showSeeInLibrary:x,variant:c}=u,o=x===void 0?!1:x,r=K();let d;e[0]!==i?(d=xe(i),e[0]=i,e[1]=d):d=e[1];const S=d,{volume:f,dirPath:n}=S,{data:s,isPending:M}=fe(f,n),$=me(f??"");let l,m,h,j,b,v,g,p,w;if(e[2]!==$||e[3]!==s||e[4]!==n||e[5]!==a||e[6]!==i||e[7]!==o||e[8]!==c||e[9]!==f){w=Symbol.for("react.early_return_sentinel");e:{m=pe(n),h=c==="dialog";let U;e[19]!==i||e[20]!==o?(U=o?t.jsx(ue,{previewPath:i}):null,e[19]=i,e[20]=o,e[21]=U):U=e[21];const B=U;if(l=s&&s.kind==="file"?{key:i,filename:m,size:s.size,downloadUrl:$(s.path)}:null,l&&s&&je(m)){const Y=l.downloadUrl;let _;e[22]!==s?(_=he(s),e[22]=s,e[23]=_):_=e[23];const E=f??"",O=s.shareMode??"private",H=s.effectivePublic??!1,R=window.location.origin+l.downloadUrl;let F;e[24]!==n||e[25]!==E||e[26]!==O||e[27]!==H||e[28]!==R?(F=t.jsx(V,{volume:E,path:n,shareMode:O,effectivePublic:H,url:R}),e[24]=n,e[25]=E,e[26]=O,e[27]=H,e[28]=R,e[29]=F):F=e[29];let z;e[30]!==h||e[31]!==a?(z=h?t.jsx("div",{className:"w-8 shrink-0"}):t.jsx(X,{onClose:a}),e[30]=h,e[31]=a,e[32]=z):z=e[32];let I;e[33]!==B||e[34]!==F||e[35]!==z?(I=t.jsxs(t.Fragment,{children:[F,B,z]}),e[33]=B,e[34]=F,e[35]=z,e[36]=I):I=e[36],w=t.jsxs(t.Fragment,{children:[h&&t.jsx(Q,{className:"sr-only",children:m}),t.jsx(de,{readUrl:Y,marker:_,title:m,savePath:f==="home"?n:void 0,trailing:I},i)]});break e}const D=h?"h-11 py-1 pr-12 pl-2":"h-9 px-2";e[37]!==D?(p=se("flex shrink-0 items-center gap-1 border-b border-border/60",D),e[37]=D,e[38]=p):p=e[38],j="flex min-w-0 flex-1 items-center gap-2 px-2",b=t.jsx(W,{filename:m,className:"h-4.5 w-3.5 shrink-0"}),v=h?t.jsx(Q,{className:"truncate text-xs font-medium text-foreground",children:m}):t.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:m}),g=l&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:oe(l.size)})}e[2]=$,e[3]=s,e[4]=n,e[5]=a,e[6]=i,e[7]=o,e[8]=c,e[9]=f,e[10]=l,e[11]=m,e[12]=h,e[13]=j,e[14]=b,e[15]=v,e[16]=g,e[17]=p,e[18]=w}else l=e[10],m=e[11],h=e[12],j=e[13],b=e[14],v=e[15],g=e[16],p=e[17],w=e[18];if(w!==Symbol.for("react.early_return_sentinel"))return w;let y;e[39]!==j||e[40]!==b||e[41]!==v||e[42]!==g?(y=t.jsxs("div",{className:j,children:[b,v,g]}),e[39]=j,e[40]=b,e[41]=v,e[42]=g,e[43]=y):y=e[43];let P;e[44]!==s?.effectivePublic||e[45]!==s?.shareMode||e[46]!==l||e[47]!==n||e[48]!==r||e[49]!==f?(P=l&&t.jsxs(t.Fragment,{children:[t.jsx(V,{volume:f??"",path:n,shareMode:s?.shareMode??"private",effectivePublic:s?.effectivePublic??!1,url:window.location.origin+l.downloadUrl}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:l.downloadUrl,download:l.filename,children:t.jsx(ie,{size:14})})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.download")})]}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:()=>window.open(l.downloadUrl,"_blank","noopener"),children:t.jsx(le,{size:14})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.openInNewTab")})]})]}),e[44]=s?.effectivePublic,e[45]=s?.shareMode,e[46]=l,e[47]=n,e[48]=r,e[49]=f,e[50]=P):P=e[50];let N;e[51]!==h||e[52]!==a?(N=!h&&t.jsx(X,{onClose:a}),e[51]=h,e[52]=a,e[53]=N):N=e[53];let k;e[54]!==P||e[55]!==N||e[56]!==p||e[57]!==y?(k=t.jsxs("div",{className:p,children:[y,P,N]}),e[54]=P,e[55]=N,e[56]=p,e[57]=y,e[58]=k):k=e[58];let C;e[59]!==l||e[60]!==m||e[61]!==M||e[62]!==r?(C=t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:l?t.jsx(ae,{file:l}):M?t.jsx(ce,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(W,{filename:m,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:r("library.previewContent.fileNotAvailable")})]})}),e[59]=l,e[60]=m,e[61]=M,e[62]=r,e[63]=C):C=e[63];let T;return e[64]!==k||e[65]!==C?(T=t.jsxs(t.Fragment,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=T):T=e[66],T}export{Te as L};
1
+ import{c as J,b as K,d as Z,f as ee,a6 as te,j as t,B as L,l as se}from"./index-CK2jC1b8.js";import{d as Q}from"./dialog-DdqSoRM9.js";import{c as A,T as q,a as G}from"./tooltip-BX_EIFZx.js";import{n as ie}from"./Eye-ZgodVkyQ.js";import{n as le}from"./LinkExternal01-D-eEFhKO.js";import{s as re}from"./XClose-CbmBXBAq.js";import{a as ne}from"./Share07-DGVeEnhS.js";import{f as oe,F as ae,a as ce}from"./file-preview-D-fY1vxt.js";import{F as V,H as de}from"./file-share-button-BojriL0f.js";import{F as W}from"./file-type-icon-BDgGUbiO.js";import{u as fe,b as me,e as he}from"./use-org-fs-CkOSi_FE.js";import{p as xe,b as pe}from"./location-oTTXFrSF.js";function ue(u){const e=J.c(13),{previewPath:i}=u,a=K(),x=Z(),c=ee({strict:!1}).org??"";let o;e[0]!==i?(o=i.split("/").slice(0,-1).join("/"),e[0]=i,e[1]=o):o=e[1];const r=o;let d;e[2]!==x||e[3]!==c||e[4]!==r||e[5]!==i?(d=()=>{x({to:te.library,params:{org:c},search:{path:r||void 0,preview:i}})},e[2]=x,e[3]=c,e[4]=r,e[5]=i,e[6]=d):d=e[6];const S=d;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ne,{size:14}),e[7]=f):f=e[7];let n;e[8]!==a?(n=a("library.seeInLibrary.label"),e[8]=a,e[9]=n):n=e[9];let s;return e[10]!==S||e[11]!==n?(s=t.jsxs(L,{variant:"ghost",size:"sm",onClick:S,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:[f,n]}),e[10]=S,e[11]=n,e[12]=s):s=e[12],s}const je=u=>/\.html?$/i.test(u);function X(u){const e=J.c(10),{onClose:i}=u,a=K();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(re,{size:14}),e[0]=x):x=e[0];let c;e[1]!==i?(c=t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:i,children:x})}),e[1]=i,e[2]=c):c=e[2];let o;e[3]!==a?(o=a("library.previewContent.close"),e[3]=a,e[4]=o):o=e[4];let r;e[5]!==o?(r=t.jsx(G,{side:"bottom",children:o}),e[5]=o,e[6]=r):r=e[6];let d;return e[7]!==c||e[8]!==r?(d=t.jsxs(A,{children:[c,r]}),e[7]=c,e[8]=r,e[9]=d):d=e[9],d}function Te(u){const e=J.c(67),{previewPath:i,onClose:a,showSeeInLibrary:x,variant:c}=u,o=x===void 0?!1:x,r=K();let d;e[0]!==i?(d=xe(i),e[0]=i,e[1]=d):d=e[1];const S=d,{volume:f,dirPath:n}=S,{data:s,isPending:M}=fe(f,n),$=me(f??"");let l,m,h,j,b,v,g,p,w;if(e[2]!==$||e[3]!==s||e[4]!==n||e[5]!==a||e[6]!==i||e[7]!==o||e[8]!==c||e[9]!==f){w=Symbol.for("react.early_return_sentinel");e:{m=pe(n),h=c==="dialog";let U;e[19]!==i||e[20]!==o?(U=o?t.jsx(ue,{previewPath:i}):null,e[19]=i,e[20]=o,e[21]=U):U=e[21];const B=U;if(l=s&&s.kind==="file"?{key:i,filename:m,size:s.size,downloadUrl:$(s.path)}:null,l&&s&&je(m)){const Y=l.downloadUrl;let _;e[22]!==s?(_=he(s),e[22]=s,e[23]=_):_=e[23];const E=f??"",O=s.shareMode??"private",H=s.effectivePublic??!1,R=window.location.origin+l.downloadUrl;let F;e[24]!==n||e[25]!==E||e[26]!==O||e[27]!==H||e[28]!==R?(F=t.jsx(V,{volume:E,path:n,shareMode:O,effectivePublic:H,url:R}),e[24]=n,e[25]=E,e[26]=O,e[27]=H,e[28]=R,e[29]=F):F=e[29];let z;e[30]!==h||e[31]!==a?(z=h?t.jsx("div",{className:"w-8 shrink-0"}):t.jsx(X,{onClose:a}),e[30]=h,e[31]=a,e[32]=z):z=e[32];let I;e[33]!==B||e[34]!==F||e[35]!==z?(I=t.jsxs(t.Fragment,{children:[F,B,z]}),e[33]=B,e[34]=F,e[35]=z,e[36]=I):I=e[36],w=t.jsxs(t.Fragment,{children:[h&&t.jsx(Q,{className:"sr-only",children:m}),t.jsx(de,{readUrl:Y,marker:_,title:m,savePath:f==="home"?n:void 0,trailing:I},i)]});break e}const D=h?"h-11 py-1 pr-12 pl-2":"h-9 px-2";e[37]!==D?(p=se("flex shrink-0 items-center gap-1 border-b border-border/60",D),e[37]=D,e[38]=p):p=e[38],j="flex min-w-0 flex-1 items-center gap-2 px-2",b=t.jsx(W,{filename:m,className:"h-4.5 w-3.5 shrink-0"}),v=h?t.jsx(Q,{className:"truncate text-xs font-medium text-foreground",children:m}):t.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:m}),g=l&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:oe(l.size)})}e[2]=$,e[3]=s,e[4]=n,e[5]=a,e[6]=i,e[7]=o,e[8]=c,e[9]=f,e[10]=l,e[11]=m,e[12]=h,e[13]=j,e[14]=b,e[15]=v,e[16]=g,e[17]=p,e[18]=w}else l=e[10],m=e[11],h=e[12],j=e[13],b=e[14],v=e[15],g=e[16],p=e[17],w=e[18];if(w!==Symbol.for("react.early_return_sentinel"))return w;let y;e[39]!==j||e[40]!==b||e[41]!==v||e[42]!==g?(y=t.jsxs("div",{className:j,children:[b,v,g]}),e[39]=j,e[40]=b,e[41]=v,e[42]=g,e[43]=y):y=e[43];let P;e[44]!==s?.effectivePublic||e[45]!==s?.shareMode||e[46]!==l||e[47]!==n||e[48]!==r||e[49]!==f?(P=l&&t.jsxs(t.Fragment,{children:[t.jsx(V,{volume:f??"",path:n,shareMode:s?.shareMode??"private",effectivePublic:s?.effectivePublic??!1,url:window.location.origin+l.downloadUrl}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:l.downloadUrl,download:l.filename,children:t.jsx(ie,{size:14})})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.download")})]}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:()=>window.open(l.downloadUrl,"_blank","noopener"),children:t.jsx(le,{size:14})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.openInNewTab")})]})]}),e[44]=s?.effectivePublic,e[45]=s?.shareMode,e[46]=l,e[47]=n,e[48]=r,e[49]=f,e[50]=P):P=e[50];let N;e[51]!==h||e[52]!==a?(N=!h&&t.jsx(X,{onClose:a}),e[51]=h,e[52]=a,e[53]=N):N=e[53];let k;e[54]!==P||e[55]!==N||e[56]!==p||e[57]!==y?(k=t.jsxs("div",{className:p,children:[y,P,N]}),e[54]=P,e[55]=N,e[56]=p,e[57]=y,e[58]=k):k=e[58];let C;e[59]!==l||e[60]!==m||e[61]!==M||e[62]!==r?(C=t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:l?t.jsx(ae,{file:l}):M?t.jsx(ce,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(W,{filename:m,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:r("library.previewContent.fileNotAvailable")})]})}),e[59]=l,e[60]=m,e[61]=M,e[62]=r,e[63]=C):C=e[63];let T;return e[64]!==k||e[65]!==C?(T=t.jsxs(t.Fragment,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=T):T=e[66],T}export{Te as L};
@@ -1 +1 @@
1
- import{c as p,j as n}from"./index-CC25Ppah.js";import{b as x,D as c}from"./dialog-GV2-AWhM.js";import{L as w}from"./preview-content-C_A2MJh2.js";function g(m){const e=p.c(9),{previewPath:t,onClose:o,showSeeInLibrary:l}=m,a=l===void 0?!1:l;let i;e[0]!==o?(i=f=>{f||o()},e[0]=o,e[1]=i):i=e[1];let r;e[2]!==o||e[3]!==t||e[4]!==a?(r=n.jsx(x,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:n.jsx(w,{previewPath:t,onClose:o,showSeeInLibrary:a,variant:"dialog"})}),e[2]=o,e[3]=t,e[4]=a,e[5]=r):r=e[5];let s;return e[6]!==i||e[7]!==r?(s=n.jsx(c,{open:!0,onOpenChange:i,children:r}),e[6]=i,e[7]=r,e[8]=s):s=e[8],s}export{g as L};
1
+ import{c as p,j as n}from"./index-CK2jC1b8.js";import{b as x,D as c}from"./dialog-DdqSoRM9.js";import{L as w}from"./preview-content-B0ztTWdM.js";function g(m){const e=p.c(9),{previewPath:t,onClose:o,showSeeInLibrary:l}=m,a=l===void 0?!1:l;let i;e[0]!==o?(i=f=>{f||o()},e[0]=o,e[1]=i):i=e[1];let r;e[2]!==o||e[3]!==t||e[4]!==a?(r=n.jsx(x,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:n.jsx(w,{previewPath:t,onClose:o,showSeeInLibrary:a,variant:"dialog"})}),e[2]=o,e[3]=t,e[4]=a,e[5]=r):r=e[5];let s;return e[6]!==i||e[7]!==r?(s=n.jsx(c,{open:!0,onOpenChange:i,children:r}),e[6]=i,e[7]=r,e[8]=s):s=e[8],s}export{g as L};
@@ -1 +1 @@
1
- import{c as R,b as Ue,o as Je,m as et,K as Ge,a as Pe,t as L,l as ze,j as s,r as I,B as Re,h as tt,n as Te,f5 as st,am as at,aU as lt,x as it,q as E,dY as M,dW as Ke,dX as Xe}from"./index-CC25Ppah.js";import{A as nt}from"./avatar-D35e4GmC.js";import{D as ot,b as rt,c as ct,d as ft,h as dt,e as ut}from"./dialog-GV2-AWhM.js";import{T as mt,a as pt,R as gt,b as ht}from"./index-DjPOBo3H.js";import{s as xt}from"./Trash01-CrHs9whM.js";import{i as vt}from"./Upload01-C5ztKcks.js";import{S as Oe}from"./switch-EEYQU2u1.js";import{d as qe,S as Fe,c as Ve,b as We}from"./select-Cfsqli3Z.js";import{T as Ie,a as bt}from"./toggle-group-lq2B3qIc.js";import{I as yt}from"./input-mcA88pmm.js";import{i as jt}from"./Monitor01-DWGOwDQg.js";import{n as wt,a as St,i as _t}from"./Sun-ANdrraHV.js";import{u as At}from"./use-debounced-autosave-Dco5Jt9P.js";import{p as Nt,q as kt}from"./question-004-sINsf4GQ.js";import"./User01-CXM1GVfD.js";import"./X-DmIzVIVO.js";import"./index-CESNu6n_.js";import"./Check-DAeVWel0.js";import"./ChevronUp-BZ-l57nk.js";const Ct=2*1024*1024,Pt=["image/png","image/jpeg","image/gif","image/webp"];async function Ut(e){try{return(await e.json()).error??""}catch{return""}}async function Ee(e){if(!e.ok)throw new Error(await Ut(e));return e}function Dt(e){const t=R.c(3);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ge.userAvatars(),t[0]=l):l=t[0];let a;return t[1]!==e?(a={queryKey:l,enabled:e,queryFn:zt},t[1]=e,t[2]=a):a=t[2],et(a)}async function zt(){return(await(await Ee(await fetch("/api/_users/avatars"))).json()).avatars}function Et(){const e=R.c(22),t=Ue(),l=Je();let a;e[0]!==l?(a=async()=>{await Promise.all([l.invalidateQueries({queryKey:Ge.userAvatars()}),Pe.getSession({query:{disableCookieCache:!0}})])},e[0]=l,e[1]=a):a=e[1];const i=a;let r;e[2]!==i||e[3]!==t?(r=async(f,b)=>{try{return await f(),await i(),L.success(b),!0}catch(y){const x=y;return L.error(x instanceof Error&&x.message?x.message:t("settings.profile.avatarUploadError")),!1}},e[2]=i,e[3]=t,e[4]=r):r=e[4];const o=r;let m;e[5]!==t||e[6]!==o?(m=async f=>{let b=null;return await o(async()=>{b=(await(await Ee(await fetch("/api/_users/avatar",{method:"POST",headers:{"content-type":f.type||"image/webp"},body:f}))).json()).url,await Pe.updateUser({image:b})},t("settings.profile.avatarUpdated"))?b:null},e[5]=t,e[6]=o,e[7]=m):m=e[7];const p=m;let h;e[8]!==t||e[9]!==o?(h=f=>o(async()=>{const b=await Ee(await fetch("/api/_users/avatar/select",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:f})})),{url:y}=await b.json();await Pe.updateUser({image:y})},t("settings.profile.avatarUpdated")),e[8]=t,e[9]=o,e[10]=h):h=e[10];const d=h;let _;e[11]!==t||e[12]!==o?(_=f=>o(async()=>{await Ee(await fetch(`/api/_users/avatar?path=${encodeURIComponent(f)}`,{method:"DELETE"}))},t("settings.profile.avatarDeleted")),e[11]=t,e[12]=o,e[13]=_):_=e[13];const g=_;let c;e[14]!==t||e[15]!==o?(c=()=>o(Mt,t("settings.profile.avatarRemoved")),e[14]=t,e[15]=o,e[16]=c):c=e[16];const v=c;let u;return e[17]!==g||e[18]!==v||e[19]!==d||e[20]!==p?(u={uploadAvatar:p,selectAvatar:d,deleteStoredAvatar:g,removeAvatar:v},e[17]=g,e[18]=v,e[19]=d,e[20]=p,e[21]=u):u=e[21],u}async function Mt(){await Pe.updateUser({image:null}),await Ee(await fetch("/api/_users/avatar",{method:"DELETE"}))}function Lt(e){const t=R.c(26);let l,a,i,r,o,m;t[0]!==e?({className:l,defaultValue:a,value:m,min:r,max:o,...i}=e,t[0]=e,t[1]=l,t[2]=a,t[3]=i,t[4]=r,t[5]=o,t[6]=m):(l=t[1],a=t[2],i=t[3],r=t[4],o=t[5],m=t[6]);const p=r===void 0?0:r,h=o===void 0?100:o;let d;t[7]!==a||t[8]!==h||t[9]!==p||t[10]!==m?(d=Array.isArray(m)?m:Array.isArray(a)?a:[p,h],t[7]=a,t[8]=h,t[9]=p,t[10]=m,t[11]=d):d=t[11];const _=d;let g;t[12]!==l?(g=ze("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",l),t[12]=l,t[13]=g):g=t[13];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=ze("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),t[14]=c):c=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(mt,{"data-slot":"slider-track",className:c,children:s.jsx(pt,{"data-slot":"slider-range",className:ze("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),t[15]=v):v=t[15];let u;t[16]!==_.length?(u=Array.from({length:_.length},Tt),t[16]=_.length,t[17]=u):u=t[17];let f;return t[18]!==a||t[19]!==h||t[20]!==p||t[21]!==i||t[22]!==g||t[23]!==u||t[24]!==m?(f=s.jsxs(gt,{"data-slot":"slider",defaultValue:a,value:m,min:p,max:h,className:g,...i,children:[v,u]}),t[18]=a,t[19]=h,t[20]=p,t[21]=i,t[22]=g,t[23]=u,t[24]=m,t[25]=f):f=t[25],f}function Tt(e,t){return s.jsx(ht,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t)}function Be(e){return Math.max(e.viewport/e.imageWidth,e.viewport/e.imageHeight)}function Rt(e){const t=Be(e)*e.zoom;return{x:Math.max(0,(e.imageWidth*t-e.viewport)/2),y:Math.max(0,(e.imageHeight*t-e.viewport)/2)}}function Qe(e){const t=Rt(e);return{x:Math.min(t.x,Math.max(-t.x,e.offset.x)),y:Math.min(t.y,Math.max(-t.y,e.offset.y))}}function Ot(e){const t=Be(e)*e.zoom,l=Qe(e),a=e.viewport/t,i=e.imageWidth/2-a/2-l.x/t,r=e.imageHeight/2-a/2-l.y/t;return{sx:Math.min(Math.max(0,i),Math.max(0,e.imageWidth-a)),sy:Math.min(Math.max(0,r),Math.max(0,e.imageHeight-a)),size:a}}function It(e,t){return Math.max(1,Math.round(Math.min(t,e.size)))}const $e=288,De=1,He=4;function $t(e){return new Promise((t,l)=>{const a=URL.createObjectURL(e),i=new Image;i.onload=()=>t({element:i,url:a,width:i.naturalWidth,height:i.naturalHeight}),i.onerror=()=>{URL.revokeObjectURL(a),l(new Error("decode failed"))},i.src=a})}function Vt(e,t,l){const a=Ot(t),i=It(a,l),r=document.createElement("canvas");r.width=i,r.height=i;const o=r.getContext("2d");return o?(o.drawImage(e.element,a.sx,a.sy,a.size,a.size,0,0,i,i),new Promise(m=>{r.toBlob(p=>m(p),"image/webp",.92)})):Promise.resolve(null)}function Bt({open:e,onOpenChange:t,title:l,description:a,shape:i="circle",maxOutputSize:r=512,accept:o,maxBytes:m,onUpload:p,gallery:h}){const d=Ue(),_=I.useRef(null),g=I.useRef(null),[c,v]=I.useState(null),[u,f]=I.useState(De),[b,y]=I.useState({x:0,y:0}),[x,w]=I.useState(!1),N=i==="circle"?"rounded-full":"rounded-xl";function j(){c&&URL.revokeObjectURL(c.url),v(null),f(De),y({x:0,y:0})}function S(){j(),t(!1)}async function D(n){if(!o.includes(n.type)){L.error(d("imageUpload.unsupportedType"));return}if(n.size>m){L.error(d("imageUpload.tooLarge",{max:String(Math.round(m/(1024*1024)))}));return}try{j(),v(await $t(n))}catch{L.error(d("imageUpload.decodeFailed"))}}const k=c&&{imageWidth:c.width,imageHeight:c.height,viewport:$e,zoom:u,offset:b},C=k?Qe(k):{x:0,y:0},P=k?Be(k)*u:1;async function T(){if(!(!c||!k)){w(!0);try{const n=await Vt(c,k,r);if(!n){L.error(d("imageUpload.encodeFailed"));return}await p(n)&&S()}finally{w(!1)}}}async function O(n){w(!0);try{await n}finally{w(!1)}}return s.jsx(ot,{open:e,onOpenChange:n=>n?t(!0):S(),children:s.jsxs(rt,{className:"sm:max-w-[26rem]",children:[s.jsxs(ct,{children:[s.jsx(ft,{children:l}),a?s.jsx(dt,{children:a}):null]}),c&&k?s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx("div",{className:ze("relative overflow-hidden bg-muted touch-none cursor-grab active:cursor-grabbing",N),style:{width:$e,height:$e},onPointerDown:n=>{g.current={x:n.clientX-C.x,y:n.clientY-C.y},n.currentTarget.setPointerCapture(n.pointerId)},onPointerMove:n=>{const U=g.current;U&&y({x:n.clientX-U.x,y:n.clientY-U.y})},onPointerUp:n=>{g.current=null,n.currentTarget.releasePointerCapture(n.pointerId)},onPointerCancel:()=>{g.current=null},onWheel:n=>{const U=u-n.deltaY*.002;f(Math.min(He,Math.max(De,U)))},children:s.jsx("img",{src:c.url,alt:"",draggable:!1,className:"absolute left-1/2 top-1/2 max-w-none select-none",style:{width:c.width*P,height:c.height*P,transform:`translate(calc(-50% + ${C.x}px), calc(-50% + ${C.y}px))`}})}),s.jsxs("div",{className:"flex w-full items-center gap-3 px-1",children:[s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:d("imageUpload.zoom")}),s.jsx(Lt,{value:[u],min:De,max:He,step:.01,onValueChange:([n])=>f(n??De),"aria-label":d("imageUpload.zoom")})]})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("button",{type:"button",onClick:()=>_.current?.click(),className:"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border py-10 text-sm text-muted-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[s.jsx(vt,{className:"size-5"}),d("imageUpload.choose")]}),h&&h.items.length>0?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:d("imageUpload.recent")}),s.jsx("div",{className:"flex flex-wrap gap-2",children:h.items.map(n=>s.jsxs("div",{className:"group relative",children:[s.jsx("button",{type:"button",disabled:x,onClick:()=>{O(h.onSelect(n.path)).then(S)},"aria-label":d("imageUpload.usePicture"),className:ze("size-14 overflow-hidden border transition-opacity hover:opacity-80 disabled:opacity-50",N,n.current?"border-primary ring-2 ring-primary/40":"border-border"),children:s.jsx("img",{src:n.url,alt:"",className:"size-full object-cover"})}),h.onDelete&&!n.current?s.jsx("button",{type:"button",disabled:x,onClick:()=>{O(h.onDelete(n.path))},"aria-label":d("imageUpload.deletePicture"),className:"absolute -right-1 -top-1 hidden rounded-lg bg-background p-1 text-muted-foreground shadow-sm hover:text-destructive group-hover:block",children:s.jsx(xt,{className:"size-3"})}):null]},n.path))})]}):null]}),s.jsx("input",{ref:_,type:"file",accept:o.join(","),className:"hidden",onChange:n=>{const U=n.target.files?.[0];n.target.value="",U&&D(U)}}),s.jsx(ut,{children:c?s.jsxs(s.Fragment,{children:[s.jsx(Re,{variant:"ghost",onClick:j,disabled:x,children:d("imageUpload.back")}),s.jsxs(Re,{onClick:()=>{T()},disabled:x,children:[x?s.jsx(tt,{size:"sm"}):null,d("imageUpload.save")]})]}):s.jsx(Re,{variant:"ghost",onClick:S,children:d("imageUpload.cancel")})})]})})}const Ye=[{value:"en",label:"English"},{value:"pt-BR",label:"Português (Brasil)"}];function qt(e){const t=R.c(36),{url:l,fallback:a}=e,i=Ue(),[r,o]=I.useState(!1),{uploadAvatar:m,selectAvatar:p,deleteStoredAvatar:h,removeAvatar:d}=Et(),_=Dt(r);let g;t[0]!==d||t[1]!==i||t[2]!==l?(g=l?s.jsx(Re,{variant:"ghost",size:"sm",onClick:()=>{d()},children:i("settings.profile.avatarRemove")}):null,t[0]=d,t[1]=i,t[2]=l,t[3]=g):g=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>o(!0),t[4]=c):c=t[4];let v;t[5]!==i?(v=i("settings.profile.avatarUpload"),t[5]=i,t[6]=v):v=t[6];let u;t[7]!==i?(u=i("settings.profile.avatarUpload"),t[7]=i,t[8]=u):u=t[8];let f;t[9]!==a||t[10]!==l?(f=s.jsx(nt,{url:l,fallback:a,shape:"circle",size:"base"}),t[9]=a,t[10]=l,t[11]=f):f=t[11];let b;t[12]!==v||t[13]!==u||t[14]!==f?(b=s.jsx("button",{type:"button",onClick:c,"aria-label":v,title:u,className:"rounded-full transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:f}),t[12]=v,t[13]=u,t[14]=f,t[15]=b):b=t[15];let y;t[16]!==i?(y=i("settings.profile.avatarDialogTitle"),t[16]=i,t[17]=y):y=t[17];let x;t[18]!==i?(x=i("settings.profile.avatarDialogDescription"),t[18]=i,t[19]=x):x=t[19];let w;t[20]!==_.data?(w=_.data??[],t[20]=_.data,t[21]=w):w=t[21];let N;t[22]!==h||t[23]!==p||t[24]!==w?(N={items:w,onSelect:p,onDelete:h},t[22]=h,t[23]=p,t[24]=w,t[25]=N):N=t[25];let j;t[26]!==r||t[27]!==N||t[28]!==y||t[29]!==x||t[30]!==m?(j=s.jsx(Bt,{open:r,onOpenChange:o,title:y,description:x,shape:"circle",accept:Pt,maxBytes:Ct,onUpload:m,gallery:N}),t[26]=r,t[27]=N,t[28]=y,t[29]=x,t[30]=m,t[31]=j):j=t[31];let S;return t[32]!==g||t[33]!==j||t[34]!==b?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[g,b,j]}),t[32]=g,t[33]=j,t[34]=b,t[35]=S):S=t[35],S}function Ft(){const e=R.c(36),t=Ue(),{data:l,isPending:a}=Pe.useSession(),i=l?.user,r=i?.image,o=i?.name??"";let m;e[0]!==o?(m={values:{name:o}},e[0]=o,e[1]=m):m=e[1];const p=at(m);let h;e[2]!==p||e[3]!==t?(h={save:async()=>{const k=p.control._formState.dirtyFields;if(Object.keys(k).length===0)return;const C=p.getValues(),P=p.control._defaultValues;p.reset(C,{keepValues:!0});try{await Pe.updateUser({name:C.name}),E("profile_updated",{fields:["name"]}),L.success(t("settings.profile.updateSuccess"))}catch{p.reset(P,{keepValues:!0}),L.error(t("settings.profile.updateError"))}}},e[2]=p,e[3]=t,e[4]=h):h=e[4];const{schedule:d,flush:_}=At(h);if(a)return null;let g;e[5]!==t?(g=t("settings.profile.avatar"),e[5]=t,e[6]=g):g=e[6];const c=i?.name??"U";let v;e[7]!==c||e[8]!==r?(v=s.jsx(qt,{url:r,fallback:c}),e[7]=c,e[8]=r,e[9]=v):v=e[9];let u;e[10]!==g||e[11]!==v?(u=s.jsx(M,{title:g,action:v}),e[10]=g,e[11]=v,e[12]=u):u=e[12];let f;e[13]!==t?(f=t("settings.profile.displayName"),e[13]=t,e[14]=f):f=e[14];let b;e[15]!==_||e[16]!==d||e[17]!==t?(b=k=>{const{field:C}=k;return s.jsx(yt,{id:"display-name",...C,onChange:P=>{C.onChange(P),d()},onBlur:()=>{C.onBlur(),_()},onKeyDown:P=>{P.key==="Enter"&&_()},placeholder:t("settings.profile.displayNamePlaceholder"),className:"w-[280px]"})},e[15]=_,e[16]=d,e[17]=t,e[18]=b):b=e[18];let y;e[19]!==p.control||e[20]!==b?(y=s.jsx(lt,{control:p.control,name:"name",render:b}),e[19]=p.control,e[20]=b,e[21]=y):y=e[21];let x;e[22]!==f||e[23]!==y?(x=s.jsx(M,{title:f,action:y}),e[22]=f,e[23]=y,e[24]=x):x=e[24];let w;e[25]!==t?(w=t("settings.profile.email"),e[25]=t,e[26]=w):w=e[26];const N=i?.email;let j;e[27]!==N?(j=s.jsx("span",{className:"text-sm text-muted-foreground",children:N}),e[27]=N,e[28]=j):j=e[28];let S;e[29]!==w||e[30]!==j?(S=s.jsx(M,{title:w,action:j}),e[29]=w,e[30]=j,e[31]=S):S=e[31];let D;return e[32]!==x||e[33]!==S||e[34]!==u?(D=s.jsx(Ke,{children:s.jsxs(Xe,{children:[u,x,S]})}),e[32]=x,e[33]=S,e[34]=u,e[35]=D):D=e[35],D}function Wt(){const e=R.c(180),t=Ue(),[l,a]=it();let i;e[0]!==a||e[1]!==t?(i=async A=>{if(A&&await Notification.requestPermission()!=="granted"){E("preferences_notifications_permission_denied"),L.error(t("settings.preferences.notificationsDenied")),a(Xt);return}E("preferences_notifications_toggled",{enabled:A}),a(z=>({...z,enableNotifications:A}))},e[0]=a,e[1]=t,e[2]=i):i=e[2];const r=i;let o;e[3]!==a?(o=A=>{E("preferences_blocks_editor_toggled",{enabled:A}),a(z=>({...z,compactPageLayout:A}))},e[3]=a,e[4]=o):o=e[4];const m=o;let p;e[5]!==t?(p=t("settings.preferences.title"),e[5]=t,e[6]=p):p=e[6];let h;e[7]!==t?(h=t("settings.preferences.theme"),e[7]=t,e[8]=h):h=e[8];let d;e[9]!==t?(d=t("settings.preferences.themeDescription"),e[9]=t,e[10]=d):d=e[10];const _=l.theme;let g;e[11]!==a?(g=A=>{A&&(E("preferences_theme_changed",{to_value:A}),a(z=>({...z,theme:A})))},e[11]=a,e[12]=g):g=e[12];let c;e[13]!==t?(c=t("settings.preferences.themeLight"),e[13]=t,e[14]=c):c=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(wt,{size:14}),e[15]=v):v=e[15];let u;e[16]!==c?(u=s.jsx(Ie,{value:"light",className:"rounded-lg data-[variant=outline]:border-l","aria-label":c,children:v}),e[16]=c,e[17]=u):u=e[17];let f;e[18]!==t?(f=t("settings.preferences.themeDark"),e[18]=t,e[19]=f):f=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(St,{size:14}),e[20]=b):b=e[20];let y;e[21]!==f?(y=s.jsx(Ie,{value:"dark",className:"rounded-lg data-[variant=outline]:border-l","aria-label":f,children:b}),e[21]=f,e[22]=y):y=e[22];let x;e[23]!==t?(x=t("settings.preferences.themeSystem"),e[23]=t,e[24]=x):x=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(jt,{size:14}),e[25]=w):w=e[25];let N;e[26]!==x?(N=s.jsx(Ie,{value:"system",className:"rounded-lg data-[variant=outline]:border-l","aria-label":x,children:w}),e[26]=x,e[27]=N):N=e[27];let j;e[28]!==l.theme||e[29]!==y||e[30]!==N||e[31]!==g||e[32]!==u?(j=s.jsxs(bt,{type:"single",size:"sm",variant:"outline",className:"gap-2 data-[variant=outline]:shadow-none",value:_,onValueChange:g,children:[u,y,N]}),e[28]=l.theme,e[29]=y,e[30]=N,e[31]=g,e[32]=u,e[33]=j):j=e[33];let S;e[34]!==j||e[35]!==h||e[36]!==d?(S=s.jsx(M,{title:h,description:d,action:j}),e[34]=j,e[35]=h,e[36]=d,e[37]=S):S=e[37];let D;e[38]!==t?(D=t("settings.preferences.language"),e[38]=t,e[39]=D):D=e[39];let k;e[40]!==t?(k=t("settings.preferences.languageDescription"),e[40]=t,e[41]=k):k=e[41];let C;e[42]!==a?(C=A=>{E("preferences_language_changed",{to_value:A}),a(z=>({...z,language:A}))},e[42]=a,e[43]=C):C=e[43];let P;e[44]!==l.language?(P=Ye.find(A=>A.value===l.language)?.label,e[44]=l.language,e[45]=P):P=e[45];let T;e[46]!==P?(T=s.jsx(We,{className:"w-44 h-7 text-xs",children:s.jsx("span",{children:P})}),e[46]=P,e[47]=T):T=e[47];let O;e[48]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(qe,{children:Ye.map(Kt)}),e[48]=O):O=e[48];let n;e[49]!==l.language||e[50]!==C||e[51]!==T?(n=s.jsxs(Fe,{value:l.language,onValueChange:C,children:[T,O]}),e[49]=l.language,e[50]=C,e[51]=T,e[52]=n):n=e[52];let U;e[53]!==D||e[54]!==k||e[55]!==n?(U=s.jsx(M,{title:D,description:k,action:n}),e[53]=D,e[54]=k,e[55]=n,e[56]=U):U=e[56];let $;e[57]!==t?($=t("settings.preferences.notifications"),e[57]=t,e[58]=$):$=e[58];let V;e[59]!==t?(V=t("settings.preferences.notificationsDescription"),e[59]=t,e[60]=V):V=e[60];let B;e[61]!==r||e[62]!==l.enableNotifications?(B=typeof Notification<"u"?()=>r(!l.enableNotifications):void 0,e[61]=r,e[62]=l.enableNotifications,e[63]=B):B=e[63];let q;e[64]!==r||e[65]!==l.enableNotifications?(q=s.jsx(Oe,{disabled:typeof Notification>"u",checked:l.enableNotifications,onCheckedChange:r}),e[64]=r,e[65]=l.enableNotifications,e[66]=q):q=e[66];let F;e[67]!==$||e[68]!==V||e[69]!==B||e[70]!==q?(F=s.jsx(M,{title:$,description:V,onClick:B,action:q}),e[67]=$,e[68]=V,e[69]=B,e[70]=q,e[71]=F):F=e[71];let W;e[72]!==t?(W=t("settings.preferences.sounds"),e[72]=t,e[73]=W):W=e[73];let H;e[74]!==t?(H=t("settings.preferences.soundsDescription"),e[74]=t,e[75]=H):H=e[75];let Y;e[76]!==l.enableSounds||e[77]!==a?(Y=()=>{E("preferences_sounds_toggled",{enabled:!l.enableSounds}),a(Gt)},e[76]=l.enableSounds,e[77]=a,e[78]=Y):Y=e[78];let G;e[79]!==t?(G=t("settings.preferences.soundsPreview"),e[79]=t,e[80]=G):G=e[80];let Me;e[81]===Symbol.for("react.memo_cache_sentinel")?(Me=s.jsx(_t,{size:11}),e[81]=Me):Me=e[81];let K;e[82]!==G?(K=s.jsx("button",{type:"button","aria-label":G,onClick:Ht,className:"size-6 flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer rounded-lg",children:Me}),e[82]=G,e[83]=K):K=e[83];let X;e[84]!==a?(X=A=>{E("preferences_sounds_toggled",{enabled:A}),a(z=>({...z,enableSounds:A}))},e[84]=a,e[85]=X):X=e[85];let Q;e[86]!==l.enableSounds||e[87]!==X?(Q=s.jsx(Oe,{checked:l.enableSounds,onCheckedChange:X}),e[86]=l.enableSounds,e[87]=X,e[88]=Q):Q=e[88];let Z;e[89]!==K||e[90]!==Q?(Z=s.jsxs("div",{className:"flex items-center gap-2",children:[K,Q]}),e[89]=K,e[90]=Q,e[91]=Z):Z=e[91];let J;e[92]!==W||e[93]!==H||e[94]!==Y||e[95]!==Z?(J=s.jsx(M,{title:W,description:H,onClick:Y,action:Z}),e[92]=W,e[93]=H,e[94]=Y,e[95]=Z,e[96]=J):J=e[96];let ee;e[97]!==t?(ee=t("settings.preferences.newBlocksEditor"),e[97]=t,e[98]=ee):ee=e[98];let te;e[99]!==t?(te=t("settings.preferences.newBlocksEditorDescription"),e[99]=t,e[100]=te):te=e[100];let se;e[101]!==m||e[102]!==l.compactPageLayout?(se=()=>m(!l.compactPageLayout),e[101]=m,e[102]=l.compactPageLayout,e[103]=se):se=e[103];let ae;e[104]!==t?(ae=t("settings.preferences.newBlocksEditor"),e[104]=t,e[105]=ae):ae=e[105];let le;e[106]!==m||e[107]!==l.compactPageLayout||e[108]!==ae?(le=s.jsx(Oe,{"aria-label":ae,checked:l.compactPageLayout,onCheckedChange:m}),e[106]=m,e[107]=l.compactPageLayout,e[108]=ae,e[109]=le):le=e[109];let ie;e[110]!==ee||e[111]!==te||e[112]!==se||e[113]!==le?(ie=s.jsx(M,{title:ee,description:te,onClick:se,action:le}),e[110]=ee,e[111]=te,e[112]=se,e[113]=le,e[114]=ie):ie=e[114];let ne;e[115]!==t?(ne=t("settings.preferences.toolApproval"),e[115]=t,e[116]=ne):ne=e[116];let oe;e[117]!==t?(oe=t("settings.preferences.toolApprovalDescription"),e[117]=t,e[118]=oe):oe=e[118];const Ze=l.toolApprovalLevel;let re;e[119]!==a?(re=A=>{E("preferences_tool_approval_changed",{to_value:A}),a(z=>({...z,toolApprovalLevel:A}))},e[119]=a,e[120]=re):re=e[120];let ce;e[121]!==l.toolApprovalLevel||e[122]!==t?(ce={readonly:t("settings.preferences.toolApprovalAsk"),auto:t("settings.preferences.toolApprovalAuto")}[l.toolApprovalLevel]??t("settings.preferences.toolApprovalAsk"),e[121]=l.toolApprovalLevel,e[122]=t,e[123]=ce):ce=e[123];let fe;e[124]!==ce?(fe=s.jsx(We,{className:"w-36 h-7 text-xs",children:s.jsx("span",{children:ce})}),e[124]=ce,e[125]=fe):fe=e[125];let de;e[126]!==t?(de=t("settings.preferences.toolApprovalAsk"),e[126]=t,e[127]=de):de=e[127];let ue;e[128]!==t?(ue=t("settings.preferences.toolApprovalAsk"),e[128]=t,e[129]=ue):ue=e[129];let me;e[130]!==ue?(me=s.jsx("span",{className:"font-medium",children:ue}),e[130]=ue,e[131]=me):me=e[131];let pe;e[132]!==t?(pe=t("settings.preferences.toolApprovalAskDescription"),e[132]=t,e[133]=pe):pe=e[133];let ge;e[134]!==pe?(ge=s.jsx("span",{className:"text-xs text-muted-foreground",children:pe}),e[134]=pe,e[135]=ge):ge=e[135];let he;e[136]!==me||e[137]!==ge?(he=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[me,ge]}),e[136]=me,e[137]=ge,e[138]=he):he=e[138];let xe;e[139]!==de||e[140]!==he?(xe=s.jsx(Ve,{value:"readonly",textValue:de,children:he}),e[139]=de,e[140]=he,e[141]=xe):xe=e[141];let ve;e[142]!==t?(ve=t("settings.preferences.toolApprovalAuto"),e[142]=t,e[143]=ve):ve=e[143];let be;e[144]!==t?(be=t("settings.preferences.toolApprovalAuto"),e[144]=t,e[145]=be):be=e[145];let ye;e[146]!==be?(ye=s.jsx("span",{className:"font-medium",children:be}),e[146]=be,e[147]=ye):ye=e[147];let je;e[148]!==t?(je=t("settings.preferences.toolApprovalAutoDescription"),e[148]=t,e[149]=je):je=e[149];let we;e[150]!==je?(we=s.jsx("span",{className:"text-xs text-muted-foreground",children:je}),e[150]=je,e[151]=we):we=e[151];let Se;e[152]!==ye||e[153]!==we?(Se=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[ye,we]}),e[152]=ye,e[153]=we,e[154]=Se):Se=e[154];let _e;e[155]!==ve||e[156]!==Se?(_e=s.jsx(Ve,{value:"auto",textValue:ve,children:Se}),e[155]=ve,e[156]=Se,e[157]=_e):_e=e[157];let Ae;e[158]!==xe||e[159]!==_e?(Ae=s.jsxs(qe,{children:[xe,_e]}),e[158]=xe,e[159]=_e,e[160]=Ae):Ae=e[160];let Ne;e[161]!==l.toolApprovalLevel||e[162]!==re||e[163]!==fe||e[164]!==Ae?(Ne=s.jsxs(Fe,{value:Ze,onValueChange:re,children:[fe,Ae]}),e[161]=l.toolApprovalLevel,e[162]=re,e[163]=fe,e[164]=Ae,e[165]=Ne):Ne=e[165];let ke;e[166]!==ne||e[167]!==oe||e[168]!==Ne?(ke=s.jsx(M,{title:ne,description:oe,action:Ne}),e[166]=ne,e[167]=oe,e[168]=Ne,e[169]=ke):ke=e[169];let Ce;e[170]!==S||e[171]!==U||e[172]!==F||e[173]!==J||e[174]!==ie||e[175]!==ke?(Ce=s.jsxs(Xe,{children:[S,U,F,J,ie,ke]}),e[170]=S,e[171]=U,e[172]=F,e[173]=J,e[174]=ie,e[175]=ke,e[176]=Ce):Ce=e[176];let Le;return e[177]!==p||e[178]!==Ce?(Le=s.jsx(Ke,{title:p,children:Ce}),e[177]=p,e[178]=Ce,e[179]=Le):Le=e[179],Le}function Ht(){E("preferences_sounds_previewed"),Nt(kt.dataUri).catch(Yt)}function Yt(){}function Gt(e){return{...e,enableSounds:!e.enableSounds}}function Kt(e){return s.jsx(Ve,{value:e.value,textValue:e.label,children:e.label},e.value)}function Xt(e){return{...e,enableNotifications:!1}}function Qt(){const e=R.c(8),t=Ue();let l;e[0]!==t?(l=t("settings.title"),e[0]=t,e[1]=l):l=e[1];let a;e[2]!==l?(a=s.jsx(Te.Title,{children:l}),e[2]=l,e[3]=a):a=e[3];let i,r;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ft,{}),r=s.jsx(Wt,{}),e[4]=i,e[5]=r):(i=e[4],r=e[5]);let o;return e[6]!==a?(o=s.jsx(Te,{children:s.jsx(Te.Content,{children:s.jsx(Te.Container,{children:s.jsxs(st,{children:[a,i,r]})})})}),e[6]=a,e[7]=o):o=e[7],o}function xs(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Qt,{}),e[0]=t):t=e[0],t}export{xs as default};
1
+ import{c as R,b as Ue,o as Je,m as et,K as Ge,a as Pe,t as L,l as ze,j as s,r as I,B as Re,h as tt,n as Te,f5 as st,am as at,aU as lt,x as it,q as E,dY as M,dW as Ke,dX as Xe}from"./index-CK2jC1b8.js";import{A as nt}from"./avatar-DzaDPlqs.js";import{D as ot,b as rt,c as ct,d as ft,h as dt,e as ut}from"./dialog-DdqSoRM9.js";import{T as mt,a as pt,R as gt,b as ht}from"./index-oBvqCihi.js";import{s as xt}from"./Trash01-DngK_rxV.js";import{i as vt}from"./Upload01-BM_RpwaJ.js";import{S as Oe}from"./switch-DCOUunxF.js";import{d as qe,S as Fe,c as Ve,b as We}from"./select-D4vELKrF.js";import{T as Ie,a as bt}from"./toggle-group-7Dr1QRv7.js";import{I as yt}from"./input-BCcJ8Hmw.js";import{i as jt}from"./Monitor01-Dqm9KsCN.js";import{n as wt,a as St,i as _t}from"./Sun-C7ngZDnN.js";import{u as At}from"./use-debounced-autosave-Bw4o3_Zw.js";import{p as Nt,q as kt}from"./question-004-sINsf4GQ.js";import"./User01--_GcM9Nm.js";import"./X-DqB0NFUe.js";import"./index-BEaxoeD8.js";import"./Check-DMZ0RIwh.js";import"./ChevronUp-G7F3VYIf.js";const Ct=2*1024*1024,Pt=["image/png","image/jpeg","image/gif","image/webp"];async function Ut(e){try{return(await e.json()).error??""}catch{return""}}async function Ee(e){if(!e.ok)throw new Error(await Ut(e));return e}function Dt(e){const t=R.c(3);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ge.userAvatars(),t[0]=l):l=t[0];let a;return t[1]!==e?(a={queryKey:l,enabled:e,queryFn:zt},t[1]=e,t[2]=a):a=t[2],et(a)}async function zt(){return(await(await Ee(await fetch("/api/_users/avatars"))).json()).avatars}function Et(){const e=R.c(22),t=Ue(),l=Je();let a;e[0]!==l?(a=async()=>{await Promise.all([l.invalidateQueries({queryKey:Ge.userAvatars()}),Pe.getSession({query:{disableCookieCache:!0}})])},e[0]=l,e[1]=a):a=e[1];const i=a;let r;e[2]!==i||e[3]!==t?(r=async(f,b)=>{try{return await f(),await i(),L.success(b),!0}catch(y){const x=y;return L.error(x instanceof Error&&x.message?x.message:t("settings.profile.avatarUploadError")),!1}},e[2]=i,e[3]=t,e[4]=r):r=e[4];const o=r;let m;e[5]!==t||e[6]!==o?(m=async f=>{let b=null;return await o(async()=>{b=(await(await Ee(await fetch("/api/_users/avatar",{method:"POST",headers:{"content-type":f.type||"image/webp"},body:f}))).json()).url,await Pe.updateUser({image:b})},t("settings.profile.avatarUpdated"))?b:null},e[5]=t,e[6]=o,e[7]=m):m=e[7];const p=m;let h;e[8]!==t||e[9]!==o?(h=f=>o(async()=>{const b=await Ee(await fetch("/api/_users/avatar/select",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:f})})),{url:y}=await b.json();await Pe.updateUser({image:y})},t("settings.profile.avatarUpdated")),e[8]=t,e[9]=o,e[10]=h):h=e[10];const d=h;let _;e[11]!==t||e[12]!==o?(_=f=>o(async()=>{await Ee(await fetch(`/api/_users/avatar?path=${encodeURIComponent(f)}`,{method:"DELETE"}))},t("settings.profile.avatarDeleted")),e[11]=t,e[12]=o,e[13]=_):_=e[13];const g=_;let c;e[14]!==t||e[15]!==o?(c=()=>o(Mt,t("settings.profile.avatarRemoved")),e[14]=t,e[15]=o,e[16]=c):c=e[16];const v=c;let u;return e[17]!==g||e[18]!==v||e[19]!==d||e[20]!==p?(u={uploadAvatar:p,selectAvatar:d,deleteStoredAvatar:g,removeAvatar:v},e[17]=g,e[18]=v,e[19]=d,e[20]=p,e[21]=u):u=e[21],u}async function Mt(){await Pe.updateUser({image:null}),await Ee(await fetch("/api/_users/avatar",{method:"DELETE"}))}function Lt(e){const t=R.c(26);let l,a,i,r,o,m;t[0]!==e?({className:l,defaultValue:a,value:m,min:r,max:o,...i}=e,t[0]=e,t[1]=l,t[2]=a,t[3]=i,t[4]=r,t[5]=o,t[6]=m):(l=t[1],a=t[2],i=t[3],r=t[4],o=t[5],m=t[6]);const p=r===void 0?0:r,h=o===void 0?100:o;let d;t[7]!==a||t[8]!==h||t[9]!==p||t[10]!==m?(d=Array.isArray(m)?m:Array.isArray(a)?a:[p,h],t[7]=a,t[8]=h,t[9]=p,t[10]=m,t[11]=d):d=t[11];const _=d;let g;t[12]!==l?(g=ze("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",l),t[12]=l,t[13]=g):g=t[13];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=ze("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),t[14]=c):c=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(mt,{"data-slot":"slider-track",className:c,children:s.jsx(pt,{"data-slot":"slider-range",className:ze("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),t[15]=v):v=t[15];let u;t[16]!==_.length?(u=Array.from({length:_.length},Tt),t[16]=_.length,t[17]=u):u=t[17];let f;return t[18]!==a||t[19]!==h||t[20]!==p||t[21]!==i||t[22]!==g||t[23]!==u||t[24]!==m?(f=s.jsxs(gt,{"data-slot":"slider",defaultValue:a,value:m,min:p,max:h,className:g,...i,children:[v,u]}),t[18]=a,t[19]=h,t[20]=p,t[21]=i,t[22]=g,t[23]=u,t[24]=m,t[25]=f):f=t[25],f}function Tt(e,t){return s.jsx(ht,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t)}function Be(e){return Math.max(e.viewport/e.imageWidth,e.viewport/e.imageHeight)}function Rt(e){const t=Be(e)*e.zoom;return{x:Math.max(0,(e.imageWidth*t-e.viewport)/2),y:Math.max(0,(e.imageHeight*t-e.viewport)/2)}}function Qe(e){const t=Rt(e);return{x:Math.min(t.x,Math.max(-t.x,e.offset.x)),y:Math.min(t.y,Math.max(-t.y,e.offset.y))}}function Ot(e){const t=Be(e)*e.zoom,l=Qe(e),a=e.viewport/t,i=e.imageWidth/2-a/2-l.x/t,r=e.imageHeight/2-a/2-l.y/t;return{sx:Math.min(Math.max(0,i),Math.max(0,e.imageWidth-a)),sy:Math.min(Math.max(0,r),Math.max(0,e.imageHeight-a)),size:a}}function It(e,t){return Math.max(1,Math.round(Math.min(t,e.size)))}const $e=288,De=1,He=4;function $t(e){return new Promise((t,l)=>{const a=URL.createObjectURL(e),i=new Image;i.onload=()=>t({element:i,url:a,width:i.naturalWidth,height:i.naturalHeight}),i.onerror=()=>{URL.revokeObjectURL(a),l(new Error("decode failed"))},i.src=a})}function Vt(e,t,l){const a=Ot(t),i=It(a,l),r=document.createElement("canvas");r.width=i,r.height=i;const o=r.getContext("2d");return o?(o.drawImage(e.element,a.sx,a.sy,a.size,a.size,0,0,i,i),new Promise(m=>{r.toBlob(p=>m(p),"image/webp",.92)})):Promise.resolve(null)}function Bt({open:e,onOpenChange:t,title:l,description:a,shape:i="circle",maxOutputSize:r=512,accept:o,maxBytes:m,onUpload:p,gallery:h}){const d=Ue(),_=I.useRef(null),g=I.useRef(null),[c,v]=I.useState(null),[u,f]=I.useState(De),[b,y]=I.useState({x:0,y:0}),[x,w]=I.useState(!1),N=i==="circle"?"rounded-full":"rounded-xl";function j(){c&&URL.revokeObjectURL(c.url),v(null),f(De),y({x:0,y:0})}function S(){j(),t(!1)}async function D(n){if(!o.includes(n.type)){L.error(d("imageUpload.unsupportedType"));return}if(n.size>m){L.error(d("imageUpload.tooLarge",{max:String(Math.round(m/(1024*1024)))}));return}try{j(),v(await $t(n))}catch{L.error(d("imageUpload.decodeFailed"))}}const k=c&&{imageWidth:c.width,imageHeight:c.height,viewport:$e,zoom:u,offset:b},C=k?Qe(k):{x:0,y:0},P=k?Be(k)*u:1;async function T(){if(!(!c||!k)){w(!0);try{const n=await Vt(c,k,r);if(!n){L.error(d("imageUpload.encodeFailed"));return}await p(n)&&S()}finally{w(!1)}}}async function O(n){w(!0);try{await n}finally{w(!1)}}return s.jsx(ot,{open:e,onOpenChange:n=>n?t(!0):S(),children:s.jsxs(rt,{className:"sm:max-w-[26rem]",children:[s.jsxs(ct,{children:[s.jsx(ft,{children:l}),a?s.jsx(dt,{children:a}):null]}),c&&k?s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx("div",{className:ze("relative overflow-hidden bg-muted touch-none cursor-grab active:cursor-grabbing",N),style:{width:$e,height:$e},onPointerDown:n=>{g.current={x:n.clientX-C.x,y:n.clientY-C.y},n.currentTarget.setPointerCapture(n.pointerId)},onPointerMove:n=>{const U=g.current;U&&y({x:n.clientX-U.x,y:n.clientY-U.y})},onPointerUp:n=>{g.current=null,n.currentTarget.releasePointerCapture(n.pointerId)},onPointerCancel:()=>{g.current=null},onWheel:n=>{const U=u-n.deltaY*.002;f(Math.min(He,Math.max(De,U)))},children:s.jsx("img",{src:c.url,alt:"",draggable:!1,className:"absolute left-1/2 top-1/2 max-w-none select-none",style:{width:c.width*P,height:c.height*P,transform:`translate(calc(-50% + ${C.x}px), calc(-50% + ${C.y}px))`}})}),s.jsxs("div",{className:"flex w-full items-center gap-3 px-1",children:[s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:d("imageUpload.zoom")}),s.jsx(Lt,{value:[u],min:De,max:He,step:.01,onValueChange:([n])=>f(n??De),"aria-label":d("imageUpload.zoom")})]})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("button",{type:"button",onClick:()=>_.current?.click(),className:"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border py-10 text-sm text-muted-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[s.jsx(vt,{className:"size-5"}),d("imageUpload.choose")]}),h&&h.items.length>0?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:d("imageUpload.recent")}),s.jsx("div",{className:"flex flex-wrap gap-2",children:h.items.map(n=>s.jsxs("div",{className:"group relative",children:[s.jsx("button",{type:"button",disabled:x,onClick:()=>{O(h.onSelect(n.path)).then(S)},"aria-label":d("imageUpload.usePicture"),className:ze("size-14 overflow-hidden border transition-opacity hover:opacity-80 disabled:opacity-50",N,n.current?"border-primary ring-2 ring-primary/40":"border-border"),children:s.jsx("img",{src:n.url,alt:"",className:"size-full object-cover"})}),h.onDelete&&!n.current?s.jsx("button",{type:"button",disabled:x,onClick:()=>{O(h.onDelete(n.path))},"aria-label":d("imageUpload.deletePicture"),className:"absolute -right-1 -top-1 hidden rounded-lg bg-background p-1 text-muted-foreground shadow-sm hover:text-destructive group-hover:block",children:s.jsx(xt,{className:"size-3"})}):null]},n.path))})]}):null]}),s.jsx("input",{ref:_,type:"file",accept:o.join(","),className:"hidden",onChange:n=>{const U=n.target.files?.[0];n.target.value="",U&&D(U)}}),s.jsx(ut,{children:c?s.jsxs(s.Fragment,{children:[s.jsx(Re,{variant:"ghost",onClick:j,disabled:x,children:d("imageUpload.back")}),s.jsxs(Re,{onClick:()=>{T()},disabled:x,children:[x?s.jsx(tt,{size:"sm"}):null,d("imageUpload.save")]})]}):s.jsx(Re,{variant:"ghost",onClick:S,children:d("imageUpload.cancel")})})]})})}const Ye=[{value:"en",label:"English"},{value:"pt-BR",label:"Português (Brasil)"}];function qt(e){const t=R.c(36),{url:l,fallback:a}=e,i=Ue(),[r,o]=I.useState(!1),{uploadAvatar:m,selectAvatar:p,deleteStoredAvatar:h,removeAvatar:d}=Et(),_=Dt(r);let g;t[0]!==d||t[1]!==i||t[2]!==l?(g=l?s.jsx(Re,{variant:"ghost",size:"sm",onClick:()=>{d()},children:i("settings.profile.avatarRemove")}):null,t[0]=d,t[1]=i,t[2]=l,t[3]=g):g=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>o(!0),t[4]=c):c=t[4];let v;t[5]!==i?(v=i("settings.profile.avatarUpload"),t[5]=i,t[6]=v):v=t[6];let u;t[7]!==i?(u=i("settings.profile.avatarUpload"),t[7]=i,t[8]=u):u=t[8];let f;t[9]!==a||t[10]!==l?(f=s.jsx(nt,{url:l,fallback:a,shape:"circle",size:"base"}),t[9]=a,t[10]=l,t[11]=f):f=t[11];let b;t[12]!==v||t[13]!==u||t[14]!==f?(b=s.jsx("button",{type:"button",onClick:c,"aria-label":v,title:u,className:"rounded-full transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:f}),t[12]=v,t[13]=u,t[14]=f,t[15]=b):b=t[15];let y;t[16]!==i?(y=i("settings.profile.avatarDialogTitle"),t[16]=i,t[17]=y):y=t[17];let x;t[18]!==i?(x=i("settings.profile.avatarDialogDescription"),t[18]=i,t[19]=x):x=t[19];let w;t[20]!==_.data?(w=_.data??[],t[20]=_.data,t[21]=w):w=t[21];let N;t[22]!==h||t[23]!==p||t[24]!==w?(N={items:w,onSelect:p,onDelete:h},t[22]=h,t[23]=p,t[24]=w,t[25]=N):N=t[25];let j;t[26]!==r||t[27]!==N||t[28]!==y||t[29]!==x||t[30]!==m?(j=s.jsx(Bt,{open:r,onOpenChange:o,title:y,description:x,shape:"circle",accept:Pt,maxBytes:Ct,onUpload:m,gallery:N}),t[26]=r,t[27]=N,t[28]=y,t[29]=x,t[30]=m,t[31]=j):j=t[31];let S;return t[32]!==g||t[33]!==j||t[34]!==b?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[g,b,j]}),t[32]=g,t[33]=j,t[34]=b,t[35]=S):S=t[35],S}function Ft(){const e=R.c(36),t=Ue(),{data:l,isPending:a}=Pe.useSession(),i=l?.user,r=i?.image,o=i?.name??"";let m;e[0]!==o?(m={values:{name:o}},e[0]=o,e[1]=m):m=e[1];const p=at(m);let h;e[2]!==p||e[3]!==t?(h={save:async()=>{const k=p.control._formState.dirtyFields;if(Object.keys(k).length===0)return;const C=p.getValues(),P=p.control._defaultValues;p.reset(C,{keepValues:!0});try{await Pe.updateUser({name:C.name}),E("profile_updated",{fields:["name"]}),L.success(t("settings.profile.updateSuccess"))}catch{p.reset(P,{keepValues:!0}),L.error(t("settings.profile.updateError"))}}},e[2]=p,e[3]=t,e[4]=h):h=e[4];const{schedule:d,flush:_}=At(h);if(a)return null;let g;e[5]!==t?(g=t("settings.profile.avatar"),e[5]=t,e[6]=g):g=e[6];const c=i?.name??"U";let v;e[7]!==c||e[8]!==r?(v=s.jsx(qt,{url:r,fallback:c}),e[7]=c,e[8]=r,e[9]=v):v=e[9];let u;e[10]!==g||e[11]!==v?(u=s.jsx(M,{title:g,action:v}),e[10]=g,e[11]=v,e[12]=u):u=e[12];let f;e[13]!==t?(f=t("settings.profile.displayName"),e[13]=t,e[14]=f):f=e[14];let b;e[15]!==_||e[16]!==d||e[17]!==t?(b=k=>{const{field:C}=k;return s.jsx(yt,{id:"display-name",...C,onChange:P=>{C.onChange(P),d()},onBlur:()=>{C.onBlur(),_()},onKeyDown:P=>{P.key==="Enter"&&_()},placeholder:t("settings.profile.displayNamePlaceholder"),className:"w-[280px]"})},e[15]=_,e[16]=d,e[17]=t,e[18]=b):b=e[18];let y;e[19]!==p.control||e[20]!==b?(y=s.jsx(lt,{control:p.control,name:"name",render:b}),e[19]=p.control,e[20]=b,e[21]=y):y=e[21];let x;e[22]!==f||e[23]!==y?(x=s.jsx(M,{title:f,action:y}),e[22]=f,e[23]=y,e[24]=x):x=e[24];let w;e[25]!==t?(w=t("settings.profile.email"),e[25]=t,e[26]=w):w=e[26];const N=i?.email;let j;e[27]!==N?(j=s.jsx("span",{className:"text-sm text-muted-foreground",children:N}),e[27]=N,e[28]=j):j=e[28];let S;e[29]!==w||e[30]!==j?(S=s.jsx(M,{title:w,action:j}),e[29]=w,e[30]=j,e[31]=S):S=e[31];let D;return e[32]!==x||e[33]!==S||e[34]!==u?(D=s.jsx(Ke,{children:s.jsxs(Xe,{children:[u,x,S]})}),e[32]=x,e[33]=S,e[34]=u,e[35]=D):D=e[35],D}function Wt(){const e=R.c(180),t=Ue(),[l,a]=it();let i;e[0]!==a||e[1]!==t?(i=async A=>{if(A&&await Notification.requestPermission()!=="granted"){E("preferences_notifications_permission_denied"),L.error(t("settings.preferences.notificationsDenied")),a(Xt);return}E("preferences_notifications_toggled",{enabled:A}),a(z=>({...z,enableNotifications:A}))},e[0]=a,e[1]=t,e[2]=i):i=e[2];const r=i;let o;e[3]!==a?(o=A=>{E("preferences_blocks_editor_toggled",{enabled:A}),a(z=>({...z,compactPageLayout:A}))},e[3]=a,e[4]=o):o=e[4];const m=o;let p;e[5]!==t?(p=t("settings.preferences.title"),e[5]=t,e[6]=p):p=e[6];let h;e[7]!==t?(h=t("settings.preferences.theme"),e[7]=t,e[8]=h):h=e[8];let d;e[9]!==t?(d=t("settings.preferences.themeDescription"),e[9]=t,e[10]=d):d=e[10];const _=l.theme;let g;e[11]!==a?(g=A=>{A&&(E("preferences_theme_changed",{to_value:A}),a(z=>({...z,theme:A})))},e[11]=a,e[12]=g):g=e[12];let c;e[13]!==t?(c=t("settings.preferences.themeLight"),e[13]=t,e[14]=c):c=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(wt,{size:14}),e[15]=v):v=e[15];let u;e[16]!==c?(u=s.jsx(Ie,{value:"light",className:"rounded-lg data-[variant=outline]:border-l","aria-label":c,children:v}),e[16]=c,e[17]=u):u=e[17];let f;e[18]!==t?(f=t("settings.preferences.themeDark"),e[18]=t,e[19]=f):f=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(St,{size:14}),e[20]=b):b=e[20];let y;e[21]!==f?(y=s.jsx(Ie,{value:"dark",className:"rounded-lg data-[variant=outline]:border-l","aria-label":f,children:b}),e[21]=f,e[22]=y):y=e[22];let x;e[23]!==t?(x=t("settings.preferences.themeSystem"),e[23]=t,e[24]=x):x=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(jt,{size:14}),e[25]=w):w=e[25];let N;e[26]!==x?(N=s.jsx(Ie,{value:"system",className:"rounded-lg data-[variant=outline]:border-l","aria-label":x,children:w}),e[26]=x,e[27]=N):N=e[27];let j;e[28]!==l.theme||e[29]!==y||e[30]!==N||e[31]!==g||e[32]!==u?(j=s.jsxs(bt,{type:"single",size:"sm",variant:"outline",className:"gap-2 data-[variant=outline]:shadow-none",value:_,onValueChange:g,children:[u,y,N]}),e[28]=l.theme,e[29]=y,e[30]=N,e[31]=g,e[32]=u,e[33]=j):j=e[33];let S;e[34]!==j||e[35]!==h||e[36]!==d?(S=s.jsx(M,{title:h,description:d,action:j}),e[34]=j,e[35]=h,e[36]=d,e[37]=S):S=e[37];let D;e[38]!==t?(D=t("settings.preferences.language"),e[38]=t,e[39]=D):D=e[39];let k;e[40]!==t?(k=t("settings.preferences.languageDescription"),e[40]=t,e[41]=k):k=e[41];let C;e[42]!==a?(C=A=>{E("preferences_language_changed",{to_value:A}),a(z=>({...z,language:A}))},e[42]=a,e[43]=C):C=e[43];let P;e[44]!==l.language?(P=Ye.find(A=>A.value===l.language)?.label,e[44]=l.language,e[45]=P):P=e[45];let T;e[46]!==P?(T=s.jsx(We,{className:"w-44 h-7 text-xs",children:s.jsx("span",{children:P})}),e[46]=P,e[47]=T):T=e[47];let O;e[48]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(qe,{children:Ye.map(Kt)}),e[48]=O):O=e[48];let n;e[49]!==l.language||e[50]!==C||e[51]!==T?(n=s.jsxs(Fe,{value:l.language,onValueChange:C,children:[T,O]}),e[49]=l.language,e[50]=C,e[51]=T,e[52]=n):n=e[52];let U;e[53]!==D||e[54]!==k||e[55]!==n?(U=s.jsx(M,{title:D,description:k,action:n}),e[53]=D,e[54]=k,e[55]=n,e[56]=U):U=e[56];let $;e[57]!==t?($=t("settings.preferences.notifications"),e[57]=t,e[58]=$):$=e[58];let V;e[59]!==t?(V=t("settings.preferences.notificationsDescription"),e[59]=t,e[60]=V):V=e[60];let B;e[61]!==r||e[62]!==l.enableNotifications?(B=typeof Notification<"u"?()=>r(!l.enableNotifications):void 0,e[61]=r,e[62]=l.enableNotifications,e[63]=B):B=e[63];let q;e[64]!==r||e[65]!==l.enableNotifications?(q=s.jsx(Oe,{disabled:typeof Notification>"u",checked:l.enableNotifications,onCheckedChange:r}),e[64]=r,e[65]=l.enableNotifications,e[66]=q):q=e[66];let F;e[67]!==$||e[68]!==V||e[69]!==B||e[70]!==q?(F=s.jsx(M,{title:$,description:V,onClick:B,action:q}),e[67]=$,e[68]=V,e[69]=B,e[70]=q,e[71]=F):F=e[71];let W;e[72]!==t?(W=t("settings.preferences.sounds"),e[72]=t,e[73]=W):W=e[73];let H;e[74]!==t?(H=t("settings.preferences.soundsDescription"),e[74]=t,e[75]=H):H=e[75];let Y;e[76]!==l.enableSounds||e[77]!==a?(Y=()=>{E("preferences_sounds_toggled",{enabled:!l.enableSounds}),a(Gt)},e[76]=l.enableSounds,e[77]=a,e[78]=Y):Y=e[78];let G;e[79]!==t?(G=t("settings.preferences.soundsPreview"),e[79]=t,e[80]=G):G=e[80];let Me;e[81]===Symbol.for("react.memo_cache_sentinel")?(Me=s.jsx(_t,{size:11}),e[81]=Me):Me=e[81];let K;e[82]!==G?(K=s.jsx("button",{type:"button","aria-label":G,onClick:Ht,className:"size-6 flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer rounded-lg",children:Me}),e[82]=G,e[83]=K):K=e[83];let X;e[84]!==a?(X=A=>{E("preferences_sounds_toggled",{enabled:A}),a(z=>({...z,enableSounds:A}))},e[84]=a,e[85]=X):X=e[85];let Q;e[86]!==l.enableSounds||e[87]!==X?(Q=s.jsx(Oe,{checked:l.enableSounds,onCheckedChange:X}),e[86]=l.enableSounds,e[87]=X,e[88]=Q):Q=e[88];let Z;e[89]!==K||e[90]!==Q?(Z=s.jsxs("div",{className:"flex items-center gap-2",children:[K,Q]}),e[89]=K,e[90]=Q,e[91]=Z):Z=e[91];let J;e[92]!==W||e[93]!==H||e[94]!==Y||e[95]!==Z?(J=s.jsx(M,{title:W,description:H,onClick:Y,action:Z}),e[92]=W,e[93]=H,e[94]=Y,e[95]=Z,e[96]=J):J=e[96];let ee;e[97]!==t?(ee=t("settings.preferences.newBlocksEditor"),e[97]=t,e[98]=ee):ee=e[98];let te;e[99]!==t?(te=t("settings.preferences.newBlocksEditorDescription"),e[99]=t,e[100]=te):te=e[100];let se;e[101]!==m||e[102]!==l.compactPageLayout?(se=()=>m(!l.compactPageLayout),e[101]=m,e[102]=l.compactPageLayout,e[103]=se):se=e[103];let ae;e[104]!==t?(ae=t("settings.preferences.newBlocksEditor"),e[104]=t,e[105]=ae):ae=e[105];let le;e[106]!==m||e[107]!==l.compactPageLayout||e[108]!==ae?(le=s.jsx(Oe,{"aria-label":ae,checked:l.compactPageLayout,onCheckedChange:m}),e[106]=m,e[107]=l.compactPageLayout,e[108]=ae,e[109]=le):le=e[109];let ie;e[110]!==ee||e[111]!==te||e[112]!==se||e[113]!==le?(ie=s.jsx(M,{title:ee,description:te,onClick:se,action:le}),e[110]=ee,e[111]=te,e[112]=se,e[113]=le,e[114]=ie):ie=e[114];let ne;e[115]!==t?(ne=t("settings.preferences.toolApproval"),e[115]=t,e[116]=ne):ne=e[116];let oe;e[117]!==t?(oe=t("settings.preferences.toolApprovalDescription"),e[117]=t,e[118]=oe):oe=e[118];const Ze=l.toolApprovalLevel;let re;e[119]!==a?(re=A=>{E("preferences_tool_approval_changed",{to_value:A}),a(z=>({...z,toolApprovalLevel:A}))},e[119]=a,e[120]=re):re=e[120];let ce;e[121]!==l.toolApprovalLevel||e[122]!==t?(ce={readonly:t("settings.preferences.toolApprovalAsk"),auto:t("settings.preferences.toolApprovalAuto")}[l.toolApprovalLevel]??t("settings.preferences.toolApprovalAsk"),e[121]=l.toolApprovalLevel,e[122]=t,e[123]=ce):ce=e[123];let fe;e[124]!==ce?(fe=s.jsx(We,{className:"w-36 h-7 text-xs",children:s.jsx("span",{children:ce})}),e[124]=ce,e[125]=fe):fe=e[125];let de;e[126]!==t?(de=t("settings.preferences.toolApprovalAsk"),e[126]=t,e[127]=de):de=e[127];let ue;e[128]!==t?(ue=t("settings.preferences.toolApprovalAsk"),e[128]=t,e[129]=ue):ue=e[129];let me;e[130]!==ue?(me=s.jsx("span",{className:"font-medium",children:ue}),e[130]=ue,e[131]=me):me=e[131];let pe;e[132]!==t?(pe=t("settings.preferences.toolApprovalAskDescription"),e[132]=t,e[133]=pe):pe=e[133];let ge;e[134]!==pe?(ge=s.jsx("span",{className:"text-xs text-muted-foreground",children:pe}),e[134]=pe,e[135]=ge):ge=e[135];let he;e[136]!==me||e[137]!==ge?(he=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[me,ge]}),e[136]=me,e[137]=ge,e[138]=he):he=e[138];let xe;e[139]!==de||e[140]!==he?(xe=s.jsx(Ve,{value:"readonly",textValue:de,children:he}),e[139]=de,e[140]=he,e[141]=xe):xe=e[141];let ve;e[142]!==t?(ve=t("settings.preferences.toolApprovalAuto"),e[142]=t,e[143]=ve):ve=e[143];let be;e[144]!==t?(be=t("settings.preferences.toolApprovalAuto"),e[144]=t,e[145]=be):be=e[145];let ye;e[146]!==be?(ye=s.jsx("span",{className:"font-medium",children:be}),e[146]=be,e[147]=ye):ye=e[147];let je;e[148]!==t?(je=t("settings.preferences.toolApprovalAutoDescription"),e[148]=t,e[149]=je):je=e[149];let we;e[150]!==je?(we=s.jsx("span",{className:"text-xs text-muted-foreground",children:je}),e[150]=je,e[151]=we):we=e[151];let Se;e[152]!==ye||e[153]!==we?(Se=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[ye,we]}),e[152]=ye,e[153]=we,e[154]=Se):Se=e[154];let _e;e[155]!==ve||e[156]!==Se?(_e=s.jsx(Ve,{value:"auto",textValue:ve,children:Se}),e[155]=ve,e[156]=Se,e[157]=_e):_e=e[157];let Ae;e[158]!==xe||e[159]!==_e?(Ae=s.jsxs(qe,{children:[xe,_e]}),e[158]=xe,e[159]=_e,e[160]=Ae):Ae=e[160];let Ne;e[161]!==l.toolApprovalLevel||e[162]!==re||e[163]!==fe||e[164]!==Ae?(Ne=s.jsxs(Fe,{value:Ze,onValueChange:re,children:[fe,Ae]}),e[161]=l.toolApprovalLevel,e[162]=re,e[163]=fe,e[164]=Ae,e[165]=Ne):Ne=e[165];let ke;e[166]!==ne||e[167]!==oe||e[168]!==Ne?(ke=s.jsx(M,{title:ne,description:oe,action:Ne}),e[166]=ne,e[167]=oe,e[168]=Ne,e[169]=ke):ke=e[169];let Ce;e[170]!==S||e[171]!==U||e[172]!==F||e[173]!==J||e[174]!==ie||e[175]!==ke?(Ce=s.jsxs(Xe,{children:[S,U,F,J,ie,ke]}),e[170]=S,e[171]=U,e[172]=F,e[173]=J,e[174]=ie,e[175]=ke,e[176]=Ce):Ce=e[176];let Le;return e[177]!==p||e[178]!==Ce?(Le=s.jsx(Ke,{title:p,children:Ce}),e[177]=p,e[178]=Ce,e[179]=Le):Le=e[179],Le}function Ht(){E("preferences_sounds_previewed"),Nt(kt.dataUri).catch(Yt)}function Yt(){}function Gt(e){return{...e,enableSounds:!e.enableSounds}}function Kt(e){return s.jsx(Ve,{value:e.value,textValue:e.label,children:e.label},e.value)}function Xt(e){return{...e,enableNotifications:!1}}function Qt(){const e=R.c(8),t=Ue();let l;e[0]!==t?(l=t("settings.title"),e[0]=t,e[1]=l):l=e[1];let a;e[2]!==l?(a=s.jsx(Te.Title,{children:l}),e[2]=l,e[3]=a):a=e[3];let i,r;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ft,{}),r=s.jsx(Wt,{}),e[4]=i,e[5]=r):(i=e[4],r=e[5]);let o;return e[6]!==a?(o=s.jsx(Te,{children:s.jsx(Te.Content,{children:s.jsx(Te.Container,{children:s.jsxs(st,{children:[a,i,r]})})})}),e[6]=a,e[7]=o):o=e[7],o}function xs(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Qt,{}),e[0]=t):t=e[0],t}export{xs as default};