decocms 3.19.1 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CfP2ydlK.js → AlertCircle-B-p2hhbf.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BG7K2o4g.js → ArrowUpRight-Bq-dJGgn.js} +1 -1
- package/dist/client/assets/{Check-Rzhysg8v.js → Check-CSixRgqh.js} +1 -1
- package/dist/client/assets/{CheckCircle-ByVfCd_z.js → CheckCircle-CqLcOI7o.js} +1 -1
- package/dist/client/assets/{ChevronDown-DgAQraB9.js → ChevronDown-BptXi8Ef.js} +1 -1
- package/dist/client/assets/{ChevronLeft-hIkmA-06.js → ChevronLeft-Bq6F--2K.js} +1 -1
- package/dist/client/assets/{ChevronRight-C-1GbVi6.js → ChevronRight-CtziSifX.js} +1 -1
- package/dist/client/assets/{ChevronUp-D95kdAWS.js → ChevronUp-DChs66VU.js} +1 -1
- package/dist/client/assets/{Container-EsK9R8Cs.js → Container-DIwdobum.js} +1 -1
- package/dist/client/assets/{DotsVertical--nxfulT_.js → DotsVertical-DQ3UGDDE.js} +1 -1
- package/dist/client/assets/{Eye-0u1NnyPn.js → Eye-DepFjUJE.js} +1 -1
- package/dist/client/assets/{FilterLines-lN6ZYEU6.js → FilterLines-CIJgiiLT.js} +1 -1
- package/dist/client/assets/{Globe01-CYJ5akFo.js → Globe01-BayTDYGC.js} +1 -1
- package/dist/client/assets/{HardDrive-Bi11tZlO.js → HardDrive-OwnJRrIS.js} +1 -1
- package/dist/client/assets/{Key01-ETI9VuA0.js → Key01-CR8zfCdU.js} +1 -1
- package/dist/client/assets/{LayoutLeft-D5P3SyL5.js → LayoutLeft-6fPyjOVd.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CMTN51kD.js → LinkExternal01-B2YZgRTN.js} +1 -1
- package/dist/client/assets/{Monitor01-B9COEs1V.js → Monitor01-BNXW6pu5.js} +1 -1
- package/dist/client/assets/{Palette-CvBtCHX7.js → Palette-siqkt4cQ.js} +1 -1
- package/dist/client/assets/{Play-zcNTCzY3.js → Play-CBt0NeLA.js} +1 -1
- package/dist/client/assets/{Plus-BVt3gf6N.js → Plus-gXoAw_mX.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Do9uT8r5.js → RefreshCcw01-DlKjMM-5.js} +1 -1
- package/dist/client/assets/{SearchMd-Ckbe6j0d.js → SearchMd-z6b-QOmX.js} +1 -1
- package/dist/client/assets/{Settings02-BFHOCA5h.js → Settings02-C7YqxsZL.js} +1 -1
- package/dist/client/assets/{Shield01-ebA_Mmqa.js → Shield01-BT66FEMI.js} +1 -1
- package/dist/client/assets/{Star01-DinMZEQp.js → Star01-q6EhXttt.js} +1 -1
- package/dist/client/assets/{Stars01-cUHrtzm6.js → Stars01-DcMeK1n0.js} +1 -1
- package/dist/client/assets/{Stars02-CovFPupV.js → Stars02-DJ4Y5TfK.js} +1 -1
- package/dist/client/assets/{Sun-D5MzBxyK.js → Sun-CeFpMHQU.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CLmvgZdy.js → SwitchHorizontal01-__hAuhZa.js} +1 -1
- package/dist/client/assets/{Tool01-D6Ixmgxm.js → Tool01-DXWYgeBe.js} +1 -1
- package/dist/client/assets/{Trash01-C6sXu2xm.js → Trash01-B91-1KNk.js} +1 -1
- package/dist/client/assets/{Upload01-DslYY_N3.js → Upload01-CcwGyBRP.js} +1 -1
- package/dist/client/assets/{User01-9CJ-p7XF.js → User01-JR_76gHl.js} +1 -1
- package/dist/client/assets/{Users01-Ds5_zubO.js → Users01-BM2QLqUJ.js} +1 -1
- package/dist/client/assets/{Users03-C3j_vENk.js → Users03-D5pU3_ql.js} +1 -1
- package/dist/client/assets/{X-Dzpu-bw3.js → X-DCWlm9Ta.js} +1 -1
- package/dist/client/assets/{XCircle-gezQrKJB.js → XCircle-CEKwTNMD.js} +1 -1
- package/dist/client/assets/{XClose-dfaecXcF.js → XClose-DhQ5V0ST.js} +1 -1
- package/dist/client/assets/{Zap-ZCJiHFB8.js → Zap-BLBAeivN.js} +1 -1
- package/dist/client/assets/{ZapSquare-Doe97qp7.js → ZapSquare-DSdwG_FE.js} +1 -1
- package/dist/client/assets/{ZoomOut-u9z9zRXH.js → ZoomOut-CCPaeWry.js} +1 -1
- package/dist/client/assets/{access-gate-CLs4hv6_.js → access-gate-DXlQ8iVy.js} +1 -1
- package/dist/client/assets/{accordion-y8ERtqeD.js → accordion-CsQ2TTIf.js} +1 -1
- package/dist/client/assets/add-section-modal-ilTOPIUe.js +1 -0
- package/dist/client/assets/{agent-capabilities-C4HO1AsU.js → agent-capabilities-CuNGQogd.js} +1 -1
- package/dist/client/assets/{agent-icon-atw8dEpB.js → agent-icon-Lc1AgwlE.js} +1 -1
- package/dist/client/assets/{agent-icons-BO9U458u.js → agent-icons-Cprwkzhw.js} +1 -1
- package/dist/client/assets/agents-list--b7dVWdV.js +1 -0
- package/dist/client/assets/ai-providers-Dw2EV4N6.js +1 -0
- package/dist/client/assets/{alert-f3LQH8ql.js → alert-HSAarVhN.js} +1 -1
- package/dist/client/assets/{alert-dialog-BDuu9Vea.js → alert-dialog-DJLxSS_E.js} +1 -1
- package/dist/client/assets/app-editor-ZPlbW7dI.js +1 -0
- package/dist/client/assets/{auth-catchall-kvc8ufSV.js → auth-catchall-DeBOSldf.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CJrIhcxn.js → auth-split-layout-DKKncNKx.js} +1 -1
- package/dist/client/assets/{automation-list-row-DCGCyvJL.js → automation-list-row-C8yWYA2H.js} +1 -1
- package/dist/client/assets/automation-runs-D-WPNg7m.js +1 -0
- package/dist/client/assets/automations-C0KOU0yb.js +1 -0
- package/dist/client/assets/{avatar-DiepLBEZ.js → avatar-3vQWE5Hu.js} +1 -1
- package/dist/client/assets/{badge-Cosh8Jv6.js → badge-DF6gVmsi.js} +1 -1
- package/dist/client/assets/brand-context-EmCiQUXD.js +1 -0
- package/dist/client/assets/buckets-SH6KUYAQ.js +1 -0
- package/dist/client/assets/{calendar-D85iiJjZ.js → calendar-CCqv5TgR.js} +1 -1
- package/dist/client/assets/{capability-load-error-h6odhJ2k.js → capability-load-error-Dn3qy9VI.js} +1 -1
- package/dist/client/assets/{card-B2dT-2ts.js → card-CeH_PUFE.js} +1 -1
- package/dist/client/assets/{chat-context-7nRfVaxU.js → chat-context-BIie9ysT.js} +1 -1
- package/dist/client/assets/{checkbox-B2YbUc0m.js → checkbox-DFFY_m2B.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BLeVCI6_.js → cli-auth-success-CKQ9nJ3v.js} +1 -1
- package/dist/client/assets/collection-detail-BVeEbzxz.js +1 -0
- package/dist/client/assets/{collection-display-button-COhijorf.js → collection-display-button-_le1JW4q.js} +1 -1
- package/dist/client/assets/{collection-search-C0bvNtM9.js → collection-search-Bryj5VYk.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C_B1r31J.js → collection-table-wrapper-DoTnvoII.js} +1 -1
- package/dist/client/assets/{collection-tabs-BN4In63u.js → collection-tabs-Y3w8w2D4.js} +1 -1
- package/dist/client/assets/{collections-BUCuRVxl.js → collections-B-UBhIxv.js} +1 -1
- package/dist/client/assets/{command-BjqkQYxa.js → command-KyGHPzm4.js} +1 -1
- package/dist/client/assets/connect-desktop-dialog-BeLm4wl6.js +1 -0
- package/dist/client/assets/connection-card-Dug8PvM2.js +1 -0
- package/dist/client/assets/connection-detail-BXK_93LF.js +1 -0
- package/dist/client/assets/{connection-form-helpers-B093QOVj.js → connection-form-helpers-Ce4ZXQGG.js} +1 -1
- package/dist/client/assets/connections-CVEBwrj4.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-DYhlxmFV.js → decopilot-sse-pool-vfZK3kan.js} +1 -1
- package/dist/client/assets/{dialog-CvJmXij7.js → dialog-nXKceTRB.js} +1 -1
- package/dist/client/assets/domain-settings-OHWjjHlQ.js +1 -0
- package/dist/client/assets/{drawer-Cm2a8ouX.js → drawer-lSnonzW3.js} +1 -1
- package/dist/client/assets/{dropdown-menu-jK5-EocK.js → dropdown-menu-DpfpR4kx.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-BYQB-ubA.js +1 -0
- package/dist/client/assets/{empty-state-BvMn8pb-.js → empty-state-BJuYi96S.js} +1 -1
- package/dist/client/assets/{empty-state-CZ6jnWLa.js → empty-state-CY7XUbo0.js} +1 -1
- package/dist/client/assets/extract-connection-data-DxtHEsy3.js +1 -0
- package/dist/client/assets/features-DeiC9LXr.js +1 -0
- package/dist/client/assets/file-explorer-Ch6ZQfZO.js +2 -0
- package/dist/client/assets/{file-type-icon-B565DmsG.js → file-type-icon-B2skJERp.js} +1 -1
- package/dist/client/assets/{files-DDtaNJV8.js → files-CZNNukx-.js} +1 -1
- package/dist/client/assets/{form-DAahwl9B.js → form-BM4RuTjX.js} +1 -1
- package/dist/client/assets/general-sYzqMtl5.js +1 -0
- package/dist/client/assets/{generate-id-CnLzNGg6.js → generate-id-DvX29Me7.js} +1 -1
- package/dist/client/assets/{github-repo-picker-qDFzaGLa.js → github-repo-picker-Dlio4Q6_.js} +1 -1
- package/dist/client/assets/{header-tab-button-sg2Bkh9m.js → header-tab-button-BY6bk4Fs.js} +1 -1
- package/dist/client/assets/{hover-card-DyNloM84.js → hover-card-DASEEDYA.js} +1 -1
- package/dist/client/assets/image-field-BTCmGBNs.js +1 -0
- package/dist/client/assets/{index-DaTDomcZ.js → index-1xoY7YJX.js} +1 -1
- package/dist/client/assets/{index-DU03U45c.js → index-BXzjL9VS.js} +4 -4
- package/dist/client/assets/{index-RoHcRkq0.js → index-BfzqpoYd.js} +3 -3
- package/dist/client/assets/{index-Dhy2A-ml.js → index-CVPVNlMM.js} +1 -1
- package/dist/client/assets/{index-BlWGRwfE.js → index-CaqKcth7.js} +1 -1
- package/dist/client/assets/{index-B2iHTL-o.js → index-CnLAq3ph.js} +1 -1
- package/dist/client/assets/{index-BloRy46B.js → index-D3hStv8f.js} +1 -1
- package/dist/client/assets/{index-BFIoANt_.js → index-D4BxVbG6.js} +1 -1
- package/dist/client/assets/index-DFmAjKzK.js +1 -0
- package/dist/client/assets/{index-nS3rTKOQ.js → index-DOW4VN4f.js} +1 -1
- package/dist/client/assets/{index-Dw66yPMC.js → index-DcxEaxY4.js} +1 -1
- package/dist/client/assets/index-Dey5W81J.js +1 -0
- package/dist/client/assets/index-e3NOZKNP.js +1 -0
- package/dist/client/assets/{index-BDzZll30.js → index-nkMA7ZNv.js} +1 -1
- package/dist/client/assets/{index-redirect-DNU9Ckad.js → index-redirect-Dz1DdiHC.js} +1 -1
- package/dist/client/assets/{index-3Euwx3bh.js → index-uO0JijnU.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-GkUb2zKT.js → infiniteQueryObserver-CvEVG_TM.js} +1 -1
- package/dist/client/assets/{input-DsRHjNfg.js → input-BGQcwAaL.js} +1 -1
- package/dist/client/assets/{integration-icon-BOg4uSLi.js → integration-icon-B-zr5uGs.js} +1 -1
- package/dist/client/assets/{label-WCbT5R_C.js → label-zIig0cjv.js} +1 -1
- package/dist/client/assets/{layout-B9kVRgC4.js → layout-VuI1aPBj.js} +1 -1
- package/dist/client/assets/{login-B2dT1ex9.js → login-DgI1VcxE.js} +1 -1
- package/dist/client/assets/members-BdlFzlWX.js +3 -0
- package/dist/client/assets/{monaco-editor-BleU3J2F.js → monaco-editor-DQviDtyP.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CwPKi62k.js → monitoring-stats-row-Bsjs_3xk.js} +1 -1
- package/dist/client/assets/{oauth-callback-D_06ga7T.js → oauth-callback-CuHVTba4.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-kq_yOJkf.js → oauth-callback-ai-provider-B-N2lOyI.js} +1 -1
- package/dist/client/assets/{onboarding-CFkZhYek.js → onboarding-CqGFHsnX.js} +1 -1
- package/dist/client/assets/{org-install-BNh6vn9t.js → org-install-B0qdlOKM.js} +1 -1
- package/dist/client/assets/{org-layout-3aD45RuC.js → org-layout-CMGneEfe.js} +1 -1
- package/dist/client/assets/org-plugin-layout-DGdROiZB.js +1 -0
- package/dist/client/assets/{page-seo-form-CtJ-H1-o.js → page-seo-form-C3bI8Neh.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Cs2jXSnd.js +1 -0
- package/dist/client/assets/{pair-DPmFvoFZ.js → pair-NC4sCATE.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-m3Z19NWv.js → plugin-empty-state-FQw8SLzO.js} +1 -1
- package/dist/client/assets/{plugin-header-CeEbbzl3.js → plugin-header-D-cxTW9a.js} +1 -1
- package/dist/client/assets/plugin-layout-DECTyQVg.js +1 -0
- package/dist/client/assets/{popover-00xsE00R.js → popover-B1xAxEac.js} +1 -1
- package/dist/client/assets/{post-editor-DHpEWcQc.js → post-editor-BXy1yxCV.js} +1 -1
- package/dist/client/assets/{primitives-DpFr-gq2.js → primitives-CANqy_LE.js} +1 -1
- package/dist/client/assets/{profile-BJCcQ1KU.js → profile-UNuXVjVg.js} +1 -1
- package/dist/client/assets/project-app-view-7DW_WhHA.js +1 -0
- package/dist/client/assets/record-editor-D9aMJ7nl.js +1 -0
- package/dist/client/assets/registry-Ddq3KnAW.js +2 -0
- package/dist/client/assets/{registry-layout-DfY363OJ.js → registry-layout-DH7-iD95.js} +1 -1
- package/dist/client/assets/{require-capability-USY4c6Pw.js → require-capability-Bi88Fg3q.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BTqABC6o.js → required-auth-layout-3IQyeREK.js} +1 -1
- package/dist/client/assets/{reset-password-DAzKe1m4.js → reset-password-Dstl0VXR.js} +1 -1
- package/dist/client/assets/{resizable-tvU32_PL.js → resizable-Cx-Y9zvP.js} +1 -1
- package/dist/client/assets/roles-BrYnRIt_.js +1 -0
- package/dist/client/assets/{save-status-c_gSkXRz.js → save-status-DSB279Mq.js} +1 -1
- package/dist/client/assets/{schema-form-DC8-fGrX.js → schema-form-f_EsRXt1.js} +1 -1
- package/dist/client/assets/{scroll-area-DjlF9Nhh.js → scroll-area-BYy84ztj.js} +1 -1
- package/dist/client/assets/{search-input-BIE6clnk.js → search-input-C3i2qrnL.js} +1 -1
- package/dist/client/assets/secrets-CAO0zPct.js +1 -0
- package/dist/client/assets/{sections-editor-S-fGjWCd.js → sections-editor-Dq0mEIsn.js} +1 -1
- package/dist/client/assets/{select-DzGY5lz9.js → select-DpYu937I.js} +1 -1
- package/dist/client/assets/{select-model-dzURvkLU.js → select-model-B8gz_8C_.js} +1 -1
- package/dist/client/assets/seo-editor-DCppyDVT.js +1 -0
- package/dist/client/assets/{settings-layout-B12mDVFK.js → settings-layout-BYi6Agz-.js} +1 -1
- package/dist/client/assets/{settings-section-DWjadbjH.js → settings-section-pgSq0Nbi.js} +1 -1
- package/dist/client/assets/{sheet-D-hNRlw_.js → sheet-y2Nja_Ue.js} +1 -1
- package/dist/client/assets/{shell-controls-BGifAFuQ.js → shell-controls-DyDfxDen.js} +1 -1
- package/dist/client/assets/shell-layout-D8qm1N5L.js +1 -0
- package/dist/client/assets/shell-route-loading-DQ0B9hX1.js +1 -0
- package/dist/client/assets/{sidebar-3Sp07kli.js → sidebar-B3S1MC-b.js} +1 -1
- package/dist/client/assets/{skeleton-CQGVA-Lx.js → skeleton-thGJKlMg.js} +1 -1
- package/dist/client/assets/{sortable.esm-DR5iV7W2.js → sortable.esm-DYE94iJD.js} +1 -1
- package/dist/client/assets/{spinner-CCf2Lbex.js → spinner-j70e5pPL.js} +1 -1
- package/dist/client/assets/sso-DUhv1jLf.js +1 -0
- package/dist/client/assets/store-DxrJkSaq.js +1 -0
- package/dist/client/assets/store-registry-B_QywLhG.js +2 -0
- package/dist/client/assets/{switch-DhDeb5VA.js → switch-BZi96ipJ.js} +1 -1
- package/dist/client/assets/{tab-id-BNsa7AXA.js → tab-id-CjkvF5Bz.js} +1 -1
- package/dist/client/assets/{table-BMoC5dcf.js → table-C3TjNbDC.js} +1 -1
- package/dist/client/assets/{tabs-DiVDzsDA.js → tabs-sqzEAKlk.js} +1 -1
- package/dist/client/assets/{task-status-DJjK_vX7.js → task-status-CgfEdw1R.js} +1 -1
- package/dist/client/assets/{textarea-Cq68Cg3C.js → textarea-Bo_ElpPh.js} +1 -1
- package/dist/client/assets/{toggle-group-CVuIqYb9.js → toggle-group-jYWXBndg.js} +1 -1
- package/dist/client/assets/{toolbar-CKVgGEMh.js → toolbar-BIjePcgn.js} +1 -1
- package/dist/client/assets/{tools-list-6s8Pp55V.js → tools-list-9Kj7tcM0.js} +1 -1
- package/dist/client/assets/{tooltip-CLHWv9z-.js → tooltip-CC_mfaKY.js} +1 -1
- package/dist/client/assets/{types-Cxg1qjf9.js → types-btWFnXlQ.js} +1 -1
- package/dist/client/assets/use-ai-providers-D2jZ5H5p.js +1 -0
- package/dist/client/assets/use-automations-B6ZTT5n1.js +1 -0
- package/dist/client/assets/{use-capability-DGItFWVB.js → use-capability-aJI8msnV.js} +1 -1
- package/dist/client/assets/{use-collections-DxWiIX9G.js → use-collections-vRlJo8MD.js} +1 -1
- package/dist/client/assets/use-connection-MP_sOdrQ.js +1 -0
- package/dist/client/assets/{use-copy-N9gIT0E2.js → use-copy-BkzArvj8.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DilrGBsI.js → use-create-virtual-mcp-C88u5wPn.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B43AQzLm.js → use-debounced-autosave-C2TtzjZB.js} +1 -1
- package/dist/client/assets/use-delete-connection-D8ryW-Gn.js +1 -0
- package/dist/client/assets/use-file-configs-DGSgkVs8.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-DVN8HYM6.js → use-infinite-scroll-BYw2UY-G.js} +1 -1
- package/dist/client/assets/{use-list-state-VA1tpljN.js → use-list-state-CyVLGIWk.js} +1 -1
- package/dist/client/assets/use-mcp-client-Brxiewn2.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-CY9OUQZa.js → use-mcp-prompts-CKvrvNSD.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DXY52I1e.js → use-mcp-tools-DFeiBffX.js} +1 -1
- package/dist/client/assets/{use-members-9msf87Qx.js → use-members-D6H6sd8q.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B_6LJV9r.js → use-navigate-to-agent-BRFls8tQ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-5h3UhfD-.js → use-org-auth-client-IT7XMFB9.js} +1 -1
- package/dist/client/assets/{use-org-sso-BTJacuR9.js → use-org-sso-BWWAvGBF.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D4RU1UCZ.js → use-organization-roles-S9xtJ6m2.js} +1 -1
- package/dist/client/assets/use-organization-settings-DjvlRnDe.js +1 -0
- package/dist/client/assets/use-registry-connections-BQfixYFV.js +1 -0
- package/dist/client/assets/use-secrets-DEcBibJG.js +1 -0
- package/dist/client/assets/{use-status-sounds-CFOYqswl.js → use-status-sounds-BJZxFfhN.js} +1 -1
- package/dist/client/assets/{use-view-mode-lzqGiNUo.js → use-view-mode-DXlui5dm.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-DDTG_-f6.js +1 -0
- package/dist/client/assets/useInfiniteQuery-BEouccKd.js +1 -0
- package/dist/client/assets/{useRouterState-mAFXQkAT.js → useRouterState-xsU2zFoM.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-wDDb-pw7.js +1 -0
- package/dist/client/assets/user-BZco0YX9.js +1 -0
- package/dist/client/assets/{view-mode-toggle-PpUBwSzB.js → view-mode-toggle-BN8FgH0K.js} +1 -1
- package/dist/client/assets/workflow-BxGrEeHN.js +1 -0
- package/dist/client/assets/workflow-detail-QkGhQ2hI.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +489 -488
- package/dist/server/migrate.js +59 -59
- package/dist/server/server.js +311 -310
- package/package.json +1 -1
- package/dist/client/assets/add-section-modal-MSG0lE-F.js +0 -1
- package/dist/client/assets/agents-list-BjNtpZI5.js +0 -1
- package/dist/client/assets/ai-providers-DzY2b1ST.js +0 -1
- package/dist/client/assets/app-editor-BOf1C0bR.js +0 -1
- package/dist/client/assets/automation-runs-BPWO4Oxo.js +0 -1
- package/dist/client/assets/automations-BzMfwiu_.js +0 -1
- package/dist/client/assets/brand-context-fK95FTJj.js +0 -1
- package/dist/client/assets/buckets-C3L_6HTA.js +0 -1
- package/dist/client/assets/collection-detail-CindHN_k.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-Cd86_kfs.js +0 -1
- package/dist/client/assets/connection-card-DEJjtCgn.js +0 -1
- package/dist/client/assets/connection-detail-ChUQp5-t.js +0 -1
- package/dist/client/assets/connections-DN6XHtGB.js +0 -1
- package/dist/client/assets/constants-DDZG6Edw.js +0 -10
- package/dist/client/assets/domain-settings-BfbT9yk-.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-DLdasNw1.js +0 -1
- package/dist/client/assets/extract-connection-data-uGXsWpo7.js +0 -1
- package/dist/client/assets/features-Dr9Pp0WS.js +0 -1
- package/dist/client/assets/file-explorer-VM_XUNbz.js +0 -2
- package/dist/client/assets/general-DwCAWtBz.js +0 -1
- package/dist/client/assets/image-field-BaHZoCuZ.js +0 -1
- package/dist/client/assets/index-CEv88FJY.js +0 -1
- package/dist/client/assets/index-CPhDomOg.js +0 -1
- package/dist/client/assets/index-CW47dQON.js +0 -1
- package/dist/client/assets/members-CNZCKoI1.js +0 -3
- package/dist/client/assets/org-plugin-layout-BZ9dFRVl.js +0 -1
- package/dist/client/assets/page-seo-sheet-EUvWIgmh.js +0 -1
- package/dist/client/assets/plugin-layout-Bi-w5408.js +0 -1
- package/dist/client/assets/project-app-view-I1ua83t6.js +0 -1
- package/dist/client/assets/record-editor-B1-ONBrf.js +0 -1
- package/dist/client/assets/registry-CbWwvuqp.js +0 -2
- package/dist/client/assets/roles-B2-ESfgD.js +0 -1
- package/dist/client/assets/secrets-Dx_3aWOf.js +0 -1
- package/dist/client/assets/seo-editor-II_27c8U.js +0 -1
- package/dist/client/assets/shell-layout-DSHLjHdv.js +0 -1
- package/dist/client/assets/shell-route-loading-BMFmixVz.js +0 -1
- package/dist/client/assets/sso-qnvxODbb.js +0 -1
- package/dist/client/assets/store-DDT_HXod.js +0 -1
- package/dist/client/assets/store-registry-IbxDOVas.js +0 -2
- package/dist/client/assets/use-ai-providers-BUmRVTXM.js +0 -1
- package/dist/client/assets/use-automations-BQsS5jcL.js +0 -1
- package/dist/client/assets/use-connection-BKakpvkk.js +0 -1
- package/dist/client/assets/use-delete-connection-Sa9GqDFj.js +0 -1
- package/dist/client/assets/use-file-configs-BSxIo3R0.js +0 -1
- package/dist/client/assets/use-organization-settings-DeuE04BS.js +0 -1
- package/dist/client/assets/use-registry-connections-BFubWEDK.js +0 -1
- package/dist/client/assets/use-secrets-CEE2TPN5.js +0 -1
- package/dist/client/assets/use-virtual-mcp-wf8itLFJ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-FaewV0Uc.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DzO-0tti.js +0 -1
- package/dist/client/assets/user-ujRRaChx.js +0 -1
- package/dist/client/assets/workflow-BQljQVTn.js +0 -1
- package/dist/client/assets/workflow-detail-BK_EcA2N.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as K,j as t,b as me,l as Q,a as ne,r as F,n as he,K as pe,B as oe,c as H,o as de}from"./index-RoHcRkq0.js";import{R as xe}from"./required-auth-layout-BTqABC6o.js";import{A as Y}from"./auth-split-layout-CJrIhcxn.js";import{A as ee}from"./avatar-DiepLBEZ.js";import{I as be}from"./input-DsRHjNfg.js";import{L as je}from"./label-WCbT5R_C.js";import{S as ye}from"./switch-DhDeb5VA.js";import{t as Ne,a as ve}from"./Users03-C3j_vENk.js";import{i as we}from"./CheckCircle-ByVfCd_z.js";import{t as Se,a as ke}from"./Palette-CvBtCHX7.js";import{i as ze}from"./Upload01-DslYY_N3.js";import"./useRouterState-mAFXQkAT.js";import"./User01-9CJ-p7XF.js";const Ce=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function le(r){return r.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function He(){const r=K.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(_e,{})}),r[0]=e):e=r[0],e}function te(r){const e=K.c(13),{title:g,description:l,logoUrl:f,logoFallback:s}=r;let a;e[0]!==s||e[1]!==f?(a=t.jsx("div",{children:f?t.jsx(ee,{url:f,fallback:s??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=s,e[1]=f,e[2]=a):a=e[2];let i;e[3]!==g?(i=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=i):i=e[4];let o;e[5]!==l?(o=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:l}),e[5]=l,e[6]=o):o=e[6];let h;e[7]!==i||e[8]!==o?(h=t.jsxs("div",{className:"space-y-2",children:[i,o]}),e[7]=i,e[8]=o,e[9]=h):h=e[9];let n;return e[10]!==a||e[11]!==h?(n=t.jsxs("div",{className:"grid gap-10",children:[a,h]}),e[10]=a,e[11]=h,e[12]=n):n=e[12],n}function _e(){const r=K.c(4),{data:e,isPending:g}=me.useSession();if(g){let a;return r[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Y,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(Q,{size:14,className:"animate-spin text-muted-foreground"})})}),r[0]=a):a=r[0],a}const l=e?.user?.email??"",f=e?.user?.name;let s;return r[1]!==f||r[2]!==l?(s=t.jsx(Oe,{email:l,userName:f}),r[1]=f,r[2]=l,r[3]=s):s=r[3],s}function Oe(r){const e=K.c(70),{email:g,userName:l}=r;let f,s,a,i,o,h;if(e[0]!==g||e[1]!==l){a=g.split("@")[1]?.toLowerCase()??"",i=!!a&&!Ce.has(a);const m=a.split(".")[0]??"";s=m.charAt(0).toUpperCase()+m.slice(1);let x;e[8]!==s||e[9]!==i||e[10]!==l?(x=i?s:l?.split(" ")[0]??"",e[8]=s,e[9]=i,e[10]=l,e[11]=x):x=e[11],f=x,h=he,o=pe.domainLookup(a),e[0]=g,e[1]=l,e[2]=f,e[3]=s,e[4]=a,e[5]=i,e[6]=o,e[7]=h}else f=e[2],s=e[3],a=e[4],i=e[5],o=e[6],h=e[7];let n;e[12]!==i||e[13]!==o?(n={queryKey:o,queryFn:Ae,enabled:i},e[12]=i,e[13]=o,e[14]=n):n=e[14];const{data:v,isLoading:d}=h(n);let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k={mutationFn:Pe},e[15]=k):k=e[15];const c=ne(k),[D,P]=F.useState(!1);if(d){let m;e[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Q,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=m):m=e[16];let x;return e[17]!==a?(x=t.jsx(Y,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[m,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=x):x=e[18],x}let E,y,z;if(e[19]!==D||e[20]!==s||e[21]!==v?.organizations||e[22]!==a||e[23]!==i||e[24]!==c||e[25]!==l){z=Symbol.for("react.early_return_sentinel");e:{y=v?.organizations??[];const m=y.filter(Ee);E=y.length>0;const x=m.length>0,N=c.variables??null;if(D){let u;e[29]!==l?(u=l?.split(" ")[0]??"",e[29]=l,e[30]=u):u=e[30];let b;e[31]===Symbol.for("react.memo_cache_sentinel")?(b=()=>P(!1),e[31]=b):b=e[31];let p;e[32]!==s||e[33]!==a||e[34]!==i||e[35]!==u?(p=t.jsx(re,{isCorporateEmail:i,emailDomain:a,domainLabel:s,defaultName:u,allowDomainClaim:!1,onBack:b}),e[32]=s,e[33]=a,e[34]=i,e[35]=u,e[36]=p):p=e[36],z=p;break e}if(x){const u=m.length===1?"You have access to an organization":"You have access to multiple organizations",b=m.length===1?"Your email domain matches an existing organization.":"Your email domain matches more than one. Pick one to join.";let p;e[37]!==u||e[38]!==b?(p=t.jsx(te,{title:u,description:b}),e[37]=u,e[38]=b,e[39]=p):p=e[39];let w;e[40]!==a||e[41]!==c||e[42]!==N?(w=O=>{const G=c.isPending&&N===O.slug;return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(ee,{url:O.logo??`https://www.google.com/s2/favicons?domain=${a}&sz=128`,fallback:O.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:O.name}),t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",a]})]}),t.jsx(oe,{size:"default",onClick:()=>c.mutate(O.slug),disabled:c.isPending,children:G?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Q,{size:14,className:"animate-spin"})," ","Joining..."]}):"Join"})]},O.id)},e[40]=a,e[41]=c,e[42]=N,e[43]=w):w=e[43];const _=t.jsx("div",{className:"grid gap-2",children:m.map(w)});let S;e[44]!==c.error?(S=c.error&&t.jsx("p",{className:"text-xs text-destructive",children:c.error instanceof Error?c.error.message:"Failed to join organization"}),e[44]=c.error,e[45]=S):S=e[45];let $;e[46]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>P(!0),children:"Create a new organization instead"}),e[46]=$):$=e[46];let L;e[47]!==_||e[48]!==S||e[49]!==p?(L=t.jsx(Y,{children:t.jsxs("div",{className:"grid gap-10",children:[p,_,S,$]})}),e[47]=_,e[48]=S,e[49]=p,e[50]=L):L=e[50],z=L;break e}}e[19]=D,e[20]=s,e[21]=v?.organizations,e[22]=a,e[23]=i,e[24]=c,e[25]=l,e[26]=E,e[27]=y,e[28]=z}else E=e[26],y=e[27],z=e[28];if(z!==Symbol.for("react.early_return_sentinel"))return z;if(E){const m=y.length===1?`${y[0].name} is already set up`:`${y.length} organizations use @${a}`,x=y.length===1?"This organization doesn't have auto-join enabled.":"None of them have auto-join enabled — ask an admin for an invitation, or create your own.";let N;e[51]!==m||e[52]!==x?(N=t.jsx(te,{title:m,description:x}),e[51]=m,e[52]=x,e[53]=N):N=e[53];let u;if(e[54]!==a||e[55]!==y){let _;e[57]!==a?(_=S=>t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(ee,{url:S.logo??`https://www.google.com/s2/favicons?domain=${a}&sz=128`,fallback:S.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:S.name}),t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",a]})]}),t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Ask admin for invitation"})]},S.id),e[57]=a,e[58]=_):_=e[58],u=y.map(_),e[54]=a,e[55]=y,e[56]=u}else u=e[56];let b;e[59]!==u?(b=t.jsx("div",{className:"grid gap-2",children:u}),e[59]=u,e[60]=b):b=e[60];let p;e[61]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(oe,{size:"xl",className:"w-full",onClick:()=>P(!0),children:"Create a new organization"}),e[61]=p):p=e[61];let w;return e[62]!==b||e[63]!==N?(w=t.jsx(Y,{children:t.jsxs("div",{className:"grid gap-10",children:[N,b,p]})}),e[62]=b,e[63]=N,e[64]=w):w=e[64],w}let A;return e[65]!==f||e[66]!==s||e[67]!==a||e[68]!==i?(A=t.jsx(re,{isCorporateEmail:i,emailDomain:a,domainLabel:s,defaultName:f}),e[65]=f,e[66]=s,e[67]=a,e[68]=i,e[69]=A):A=e[69],A}function Ee(r){return r.autoJoinEnabled}async function Pe(r){const e=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),g=await e.json();if(!e.ok||!g.success)throw new Error(g.error||"Failed to join organization");window.location.href=`/${g.slug}`}async function Ae(){return(await fetch("/api/auth/custom/domain-lookup",{credentials:"include"})).json()}function re(r){const e=K.c(70),{isCorporateEmail:g,emailDomain:l,domainLabel:f,defaultName:s,allowDomainClaim:a,onBack:i}=r,o=a===void 0?!0:a,h=g&&o?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null,[n,v]=F.useState(s),[d,k]=F.useState(h),[c,D]=F.useState(!0),[P,E]=F.useState(null);let y;e[0]!==c||e[1]!==d||e[2]!==n?(y=async()=>{const j=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n.trim()||void 0,logo:d??void 0,claimDomain:c})}),C=await j.json();if(!j.ok||!C.success)throw new Error(C.error||"Failed to set up organization");return C},e[0]=c,e[1]=d,e[2]=n,e[3]=y):y=e[3];let z;e[4]!==c?(z=j=>{if(!j.slug)return;const C=ue.filter(ge=>c||!ge.claimOnly).length,W=fe*(C-1)+800;E(j.slug),setTimeout(()=>{window.location.href=`/${j.slug}`},W)},e[4]=c,e[5]=z):z=e[5];let A;e[6]!==y||e[7]!==z?(A={mutationFn:y,onSuccess:z},e[6]=y,e[7]=z,e[8]=A):A=e[8];const m=ne(A);let x;e[9]!==d||e[10]!==n?(x={mutationFn:async()=>{const j=n.trim(),C=le(j);if(!C)throw new Error("Invalid organization name");const W=await me.organization.create({name:j,slug:C,...d?{logo:d}:{}});if(W?.error)throw new Error(W.error.message||"Failed to create organization");window.location.href=`/${W?.data?.slug??C}`}},e[9]=d,e[10]=n,e[11]=x):x=e[11];const N=ne(x);if(m.isPending||P){let j;e[12]!==f||e[13]!==n?(j=n.trim()||f,e[12]=f,e[13]=n,e[14]=j):j=e[14];let C;return e[15]!==c||e[16]!==l||e[17]!==d||e[18]!==j?(C=t.jsx(Y,{children:t.jsx(Fe,{orgName:j,domain:l,claimDomain:c,logoUrl:d})}),e[15]=c,e[16]=l,e[17]=d,e[18]=j,e[19]=C):C=e[19],C}const u=N.isPending;let b;e[20]!==n?(b=le(n.trim()),e[20]=n,e[21]=b):b=e[21];const p=!!b,w=m.error||N.error||null;let _;e[22]!==o||e[23]!==p||e[24]!==N||e[25]!==m||e[26]!==g?(_=j=>{j.preventDefault(),p&&(g&&o?m.mutate():N.mutate())},e[22]=o,e[23]=p,e[24]=N,e[25]=m,e[26]=g,e[27]=_):_=e[27];const S=_;let $;e[28]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(te,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=$):$=e[28];let L;e[29]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=L):L=e[29];let O;e[30]!==s||e[31]!==n?(O=(n.trim()||s||"?").charAt(0).toUpperCase(),e[30]=s,e[31]=n,e[32]=O):O=e[32];const G=u||m.isPending;let R;e[33]!==d||e[34]!==O||e[35]!==G?(R=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[L,t.jsx($e,{value:d,fallback:O,onChange:k,disabled:G})]}),e[33]=d,e[34]=O,e[35]=G,e[36]=R):R=e[36];let V;e[37]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(je,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=V):V=e[37];let X;e[38]===Symbol.for("react.memo_cache_sentinel")?(X=j=>v(j.target.value),e[38]=X):X=e[38];const ae=s||"My Organization",se=u||m.isPending;let T;e[39]!==n||e[40]!==ae||e[41]!==se?(T=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[V,t.jsx(be,{id:"org-name",value:n,onChange:X,placeholder:ae,disabled:se,className:"h-10 max-w-[220px]"})]}),e[39]=n,e[40]=ae,e[41]=se,e[42]=T):T=e[42];let U;e[43]!==o||e[44]!==c||e[45]!==m.isPending||e[46]!==l||e[47]!==g||e[48]!==u?(U=g&&o&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",l," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",l," email can join this org"]})]}),t.jsx(ye,{checked:c,onCheckedChange:D,disabled:u||m.isPending})]}),e[43]=o,e[44]=c,e[45]=m.isPending,e[46]=l,e[47]=g,e[48]=u,e[49]=U):U=e[49];let M;e[50]!==R||e[51]!==T||e[52]!==U?(M=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[R,T,U]}),e[50]=R,e[51]=T,e[52]=U,e[53]=M):M=e[53];let I;e[54]!==w?(I=w&&t.jsx("p",{className:"text-xs text-destructive",children:w instanceof Error?w.message:"Failed to create organization"}),e[54]=w,e[55]=I):I=e[55];const ie=!p||u||m.isPending;let J;e[56]!==m.isPending||e[57]!==u?(J=u||m.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Q,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=m.isPending,e[57]=u,e[58]=J):J=e[58];let q;e[59]!==ie||e[60]!==J?(q=t.jsx(oe,{type:"submit",size:"xl",className:"w-full",disabled:ie,children:J}),e[59]=ie,e[60]=J,e[61]=q):q=e[61];let B;e[62]!==i?(B=i&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:i,children:"See available organizations"}),e[62]=i,e[63]=B):B=e[63];let Z;return e[64]!==S||e[65]!==M||e[66]!==I||e[67]!==q||e[68]!==B?(Z=t.jsx(Y,{children:t.jsxs("form",{onSubmit:S,className:"grid gap-10",children:[$,M,I,q,B]})}),e[64]=S,e[65]=M,e[66]=I,e[67]=q,e[68]=B,e[69]=Z):Z=e[69],Z}function $e(r){const e=K.c(14),{value:g,fallback:l,onChange:f,disabled:s}=r,a=F.useRef(null);let i;e[0]!==f?(i=D=>{const P=D.target.files?.[0];if(!P)return;if(P.size>2097152){de.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const E=new FileReader;E.onerror=Le,E.onloadend=()=>{E.result&&f(E.result),a.current&&(a.current.value="")},E.readAsDataURL(P)},e[0]=f,e[1]=i):i=e[1];const o=i;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>a.current?.click(),e[2]=h):h=e[2];let n;e[3]!==s||e[4]!==o?(n=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:s}),e[3]=s,e[4]=o,e[5]=n):n=e[5];const v=g??void 0;let d;e[6]!==l||e[7]!==v?(d=t.jsx(ee,{url:v,fallback:l,shape:"square",size:"base"}),e[6]=l,e[7]=v,e[8]=d):d=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ze,{size:14,className:"text-white"})}),e[9]=k):k=e[9];let c;return e[10]!==s||e[11]!==n||e[12]!==d?(c=t.jsxs("button",{type:"button",onClick:h,disabled:s,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[n,d,k]}),e[10]=s,e[11]=n,e[12]=d,e[13]=c):c=e[13],c}function Le(){return de.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:Se,label:"Claiming email domain",claimOnly:!0},{icon:ve,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,ce=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:r,domain:e,claimDomain:g,logoUrl:l}){const f=ue.filter(o=>g||!o.claimOnly),[s,a]=F.useState(0),i=F.useRef(!1);if(!i.current){i.current=!0;for(let o=1;o<f.length;o++)setTimeout(()=>a(o),fe*o)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(te,{title:`Setting up ${r}`,description:`Getting everything ready from ${e}`,logoUrl:l??null,logoFallback:r.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:f.map((o,h)=>{const n=o.icon,v=h===s,d=h<s,k=ce[h%ce.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||v?1:.4},children:[t.jsxs("span",{className:H("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:k.bg,color:k.fg}:void 0,children:[t.jsx(we,{size:16,className:H("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(Q,{size:16,className:H("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(n,{size:16,className:H("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:H("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||d?"text-foreground":"text-muted-foreground"),children:o.label})]},o.label)})})]})}export{He as default};
|
|
1
|
+
import{e as K,j as t,b as me,l as Q,a as ne,r as F,n as he,K as pe,B as oe,c as H,o as de}from"./index-BfzqpoYd.js";import{R as xe}from"./required-auth-layout-3IQyeREK.js";import{A as Y}from"./auth-split-layout-DKKncNKx.js";import{A as ee}from"./avatar-3vQWE5Hu.js";import{I as be}from"./input-BGQcwAaL.js";import{L as je}from"./label-zIig0cjv.js";import{S as ye}from"./switch-BZi96ipJ.js";import{t as Ne,a as ve}from"./Users03-D5pU3_ql.js";import{i as we}from"./CheckCircle-CqLcOI7o.js";import{t as Se,a as ke}from"./Palette-siqkt4cQ.js";import{i as ze}from"./Upload01-CcwGyBRP.js";import"./useRouterState-xsU2zFoM.js";import"./User01-JR_76gHl.js";const Ce=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function le(r){return r.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function He(){const r=K.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(_e,{})}),r[0]=e):e=r[0],e}function te(r){const e=K.c(13),{title:g,description:l,logoUrl:f,logoFallback:s}=r;let a;e[0]!==s||e[1]!==f?(a=t.jsx("div",{children:f?t.jsx(ee,{url:f,fallback:s??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=s,e[1]=f,e[2]=a):a=e[2];let i;e[3]!==g?(i=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=i):i=e[4];let o;e[5]!==l?(o=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:l}),e[5]=l,e[6]=o):o=e[6];let h;e[7]!==i||e[8]!==o?(h=t.jsxs("div",{className:"space-y-2",children:[i,o]}),e[7]=i,e[8]=o,e[9]=h):h=e[9];let n;return e[10]!==a||e[11]!==h?(n=t.jsxs("div",{className:"grid gap-10",children:[a,h]}),e[10]=a,e[11]=h,e[12]=n):n=e[12],n}function _e(){const r=K.c(4),{data:e,isPending:g}=me.useSession();if(g){let a;return r[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Y,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(Q,{size:14,className:"animate-spin text-muted-foreground"})})}),r[0]=a):a=r[0],a}const l=e?.user?.email??"",f=e?.user?.name;let s;return r[1]!==f||r[2]!==l?(s=t.jsx(Oe,{email:l,userName:f}),r[1]=f,r[2]=l,r[3]=s):s=r[3],s}function Oe(r){const e=K.c(70),{email:g,userName:l}=r;let f,s,a,i,o,h;if(e[0]!==g||e[1]!==l){a=g.split("@")[1]?.toLowerCase()??"",i=!!a&&!Ce.has(a);const m=a.split(".")[0]??"";s=m.charAt(0).toUpperCase()+m.slice(1);let x;e[8]!==s||e[9]!==i||e[10]!==l?(x=i?s:l?.split(" ")[0]??"",e[8]=s,e[9]=i,e[10]=l,e[11]=x):x=e[11],f=x,h=he,o=pe.domainLookup(a),e[0]=g,e[1]=l,e[2]=f,e[3]=s,e[4]=a,e[5]=i,e[6]=o,e[7]=h}else f=e[2],s=e[3],a=e[4],i=e[5],o=e[6],h=e[7];let n;e[12]!==i||e[13]!==o?(n={queryKey:o,queryFn:Ae,enabled:i},e[12]=i,e[13]=o,e[14]=n):n=e[14];const{data:v,isLoading:d}=h(n);let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k={mutationFn:Pe},e[15]=k):k=e[15];const c=ne(k),[D,P]=F.useState(!1);if(d){let m;e[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Q,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=m):m=e[16];let x;return e[17]!==a?(x=t.jsx(Y,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[m,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=x):x=e[18],x}let E,y,z;if(e[19]!==D||e[20]!==s||e[21]!==v?.organizations||e[22]!==a||e[23]!==i||e[24]!==c||e[25]!==l){z=Symbol.for("react.early_return_sentinel");e:{y=v?.organizations??[];const m=y.filter(Ee);E=y.length>0;const x=m.length>0,N=c.variables??null;if(D){let u;e[29]!==l?(u=l?.split(" ")[0]??"",e[29]=l,e[30]=u):u=e[30];let b;e[31]===Symbol.for("react.memo_cache_sentinel")?(b=()=>P(!1),e[31]=b):b=e[31];let p;e[32]!==s||e[33]!==a||e[34]!==i||e[35]!==u?(p=t.jsx(re,{isCorporateEmail:i,emailDomain:a,domainLabel:s,defaultName:u,allowDomainClaim:!1,onBack:b}),e[32]=s,e[33]=a,e[34]=i,e[35]=u,e[36]=p):p=e[36],z=p;break e}if(x){const u=m.length===1?"You have access to an organization":"You have access to multiple organizations",b=m.length===1?"Your email domain matches an existing organization.":"Your email domain matches more than one. Pick one to join.";let p;e[37]!==u||e[38]!==b?(p=t.jsx(te,{title:u,description:b}),e[37]=u,e[38]=b,e[39]=p):p=e[39];let w;e[40]!==a||e[41]!==c||e[42]!==N?(w=O=>{const G=c.isPending&&N===O.slug;return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(ee,{url:O.logo??`https://www.google.com/s2/favicons?domain=${a}&sz=128`,fallback:O.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:O.name}),t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",a]})]}),t.jsx(oe,{size:"default",onClick:()=>c.mutate(O.slug),disabled:c.isPending,children:G?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Q,{size:14,className:"animate-spin"})," ","Joining..."]}):"Join"})]},O.id)},e[40]=a,e[41]=c,e[42]=N,e[43]=w):w=e[43];const _=t.jsx("div",{className:"grid gap-2",children:m.map(w)});let S;e[44]!==c.error?(S=c.error&&t.jsx("p",{className:"text-xs text-destructive",children:c.error instanceof Error?c.error.message:"Failed to join organization"}),e[44]=c.error,e[45]=S):S=e[45];let $;e[46]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>P(!0),children:"Create a new organization instead"}),e[46]=$):$=e[46];let L;e[47]!==_||e[48]!==S||e[49]!==p?(L=t.jsx(Y,{children:t.jsxs("div",{className:"grid gap-10",children:[p,_,S,$]})}),e[47]=_,e[48]=S,e[49]=p,e[50]=L):L=e[50],z=L;break e}}e[19]=D,e[20]=s,e[21]=v?.organizations,e[22]=a,e[23]=i,e[24]=c,e[25]=l,e[26]=E,e[27]=y,e[28]=z}else E=e[26],y=e[27],z=e[28];if(z!==Symbol.for("react.early_return_sentinel"))return z;if(E){const m=y.length===1?`${y[0].name} is already set up`:`${y.length} organizations use @${a}`,x=y.length===1?"This organization doesn't have auto-join enabled.":"None of them have auto-join enabled — ask an admin for an invitation, or create your own.";let N;e[51]!==m||e[52]!==x?(N=t.jsx(te,{title:m,description:x}),e[51]=m,e[52]=x,e[53]=N):N=e[53];let u;if(e[54]!==a||e[55]!==y){let _;e[57]!==a?(_=S=>t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(ee,{url:S.logo??`https://www.google.com/s2/favicons?domain=${a}&sz=128`,fallback:S.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:S.name}),t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",a]})]}),t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Ask admin for invitation"})]},S.id),e[57]=a,e[58]=_):_=e[58],u=y.map(_),e[54]=a,e[55]=y,e[56]=u}else u=e[56];let b;e[59]!==u?(b=t.jsx("div",{className:"grid gap-2",children:u}),e[59]=u,e[60]=b):b=e[60];let p;e[61]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(oe,{size:"xl",className:"w-full",onClick:()=>P(!0),children:"Create a new organization"}),e[61]=p):p=e[61];let w;return e[62]!==b||e[63]!==N?(w=t.jsx(Y,{children:t.jsxs("div",{className:"grid gap-10",children:[N,b,p]})}),e[62]=b,e[63]=N,e[64]=w):w=e[64],w}let A;return e[65]!==f||e[66]!==s||e[67]!==a||e[68]!==i?(A=t.jsx(re,{isCorporateEmail:i,emailDomain:a,domainLabel:s,defaultName:f}),e[65]=f,e[66]=s,e[67]=a,e[68]=i,e[69]=A):A=e[69],A}function Ee(r){return r.autoJoinEnabled}async function Pe(r){const e=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),g=await e.json();if(!e.ok||!g.success)throw new Error(g.error||"Failed to join organization");window.location.href=`/${g.slug}`}async function Ae(){return(await fetch("/api/auth/custom/domain-lookup",{credentials:"include"})).json()}function re(r){const e=K.c(70),{isCorporateEmail:g,emailDomain:l,domainLabel:f,defaultName:s,allowDomainClaim:a,onBack:i}=r,o=a===void 0?!0:a,h=g&&o?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null,[n,v]=F.useState(s),[d,k]=F.useState(h),[c,D]=F.useState(!0),[P,E]=F.useState(null);let y;e[0]!==c||e[1]!==d||e[2]!==n?(y=async()=>{const j=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n.trim()||void 0,logo:d??void 0,claimDomain:c})}),C=await j.json();if(!j.ok||!C.success)throw new Error(C.error||"Failed to set up organization");return C},e[0]=c,e[1]=d,e[2]=n,e[3]=y):y=e[3];let z;e[4]!==c?(z=j=>{if(!j.slug)return;const C=ue.filter(ge=>c||!ge.claimOnly).length,W=fe*(C-1)+800;E(j.slug),setTimeout(()=>{window.location.href=`/${j.slug}`},W)},e[4]=c,e[5]=z):z=e[5];let A;e[6]!==y||e[7]!==z?(A={mutationFn:y,onSuccess:z},e[6]=y,e[7]=z,e[8]=A):A=e[8];const m=ne(A);let x;e[9]!==d||e[10]!==n?(x={mutationFn:async()=>{const j=n.trim(),C=le(j);if(!C)throw new Error("Invalid organization name");const W=await me.organization.create({name:j,slug:C,...d?{logo:d}:{}});if(W?.error)throw new Error(W.error.message||"Failed to create organization");window.location.href=`/${W?.data?.slug??C}`}},e[9]=d,e[10]=n,e[11]=x):x=e[11];const N=ne(x);if(m.isPending||P){let j;e[12]!==f||e[13]!==n?(j=n.trim()||f,e[12]=f,e[13]=n,e[14]=j):j=e[14];let C;return e[15]!==c||e[16]!==l||e[17]!==d||e[18]!==j?(C=t.jsx(Y,{children:t.jsx(Fe,{orgName:j,domain:l,claimDomain:c,logoUrl:d})}),e[15]=c,e[16]=l,e[17]=d,e[18]=j,e[19]=C):C=e[19],C}const u=N.isPending;let b;e[20]!==n?(b=le(n.trim()),e[20]=n,e[21]=b):b=e[21];const p=!!b,w=m.error||N.error||null;let _;e[22]!==o||e[23]!==p||e[24]!==N||e[25]!==m||e[26]!==g?(_=j=>{j.preventDefault(),p&&(g&&o?m.mutate():N.mutate())},e[22]=o,e[23]=p,e[24]=N,e[25]=m,e[26]=g,e[27]=_):_=e[27];const S=_;let $;e[28]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(te,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=$):$=e[28];let L;e[29]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=L):L=e[29];let O;e[30]!==s||e[31]!==n?(O=(n.trim()||s||"?").charAt(0).toUpperCase(),e[30]=s,e[31]=n,e[32]=O):O=e[32];const G=u||m.isPending;let R;e[33]!==d||e[34]!==O||e[35]!==G?(R=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[L,t.jsx($e,{value:d,fallback:O,onChange:k,disabled:G})]}),e[33]=d,e[34]=O,e[35]=G,e[36]=R):R=e[36];let V;e[37]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(je,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=V):V=e[37];let X;e[38]===Symbol.for("react.memo_cache_sentinel")?(X=j=>v(j.target.value),e[38]=X):X=e[38];const ae=s||"My Organization",se=u||m.isPending;let T;e[39]!==n||e[40]!==ae||e[41]!==se?(T=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[V,t.jsx(be,{id:"org-name",value:n,onChange:X,placeholder:ae,disabled:se,className:"h-10 max-w-[220px]"})]}),e[39]=n,e[40]=ae,e[41]=se,e[42]=T):T=e[42];let U;e[43]!==o||e[44]!==c||e[45]!==m.isPending||e[46]!==l||e[47]!==g||e[48]!==u?(U=g&&o&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",l," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",l," email can join this org"]})]}),t.jsx(ye,{checked:c,onCheckedChange:D,disabled:u||m.isPending})]}),e[43]=o,e[44]=c,e[45]=m.isPending,e[46]=l,e[47]=g,e[48]=u,e[49]=U):U=e[49];let M;e[50]!==R||e[51]!==T||e[52]!==U?(M=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[R,T,U]}),e[50]=R,e[51]=T,e[52]=U,e[53]=M):M=e[53];let I;e[54]!==w?(I=w&&t.jsx("p",{className:"text-xs text-destructive",children:w instanceof Error?w.message:"Failed to create organization"}),e[54]=w,e[55]=I):I=e[55];const ie=!p||u||m.isPending;let J;e[56]!==m.isPending||e[57]!==u?(J=u||m.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Q,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=m.isPending,e[57]=u,e[58]=J):J=e[58];let q;e[59]!==ie||e[60]!==J?(q=t.jsx(oe,{type:"submit",size:"xl",className:"w-full",disabled:ie,children:J}),e[59]=ie,e[60]=J,e[61]=q):q=e[61];let B;e[62]!==i?(B=i&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:i,children:"See available organizations"}),e[62]=i,e[63]=B):B=e[63];let Z;return e[64]!==S||e[65]!==M||e[66]!==I||e[67]!==q||e[68]!==B?(Z=t.jsx(Y,{children:t.jsxs("form",{onSubmit:S,className:"grid gap-10",children:[$,M,I,q,B]})}),e[64]=S,e[65]=M,e[66]=I,e[67]=q,e[68]=B,e[69]=Z):Z=e[69],Z}function $e(r){const e=K.c(14),{value:g,fallback:l,onChange:f,disabled:s}=r,a=F.useRef(null);let i;e[0]!==f?(i=D=>{const P=D.target.files?.[0];if(!P)return;if(P.size>2097152){de.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const E=new FileReader;E.onerror=Le,E.onloadend=()=>{E.result&&f(E.result),a.current&&(a.current.value="")},E.readAsDataURL(P)},e[0]=f,e[1]=i):i=e[1];const o=i;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>a.current?.click(),e[2]=h):h=e[2];let n;e[3]!==s||e[4]!==o?(n=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:s}),e[3]=s,e[4]=o,e[5]=n):n=e[5];const v=g??void 0;let d;e[6]!==l||e[7]!==v?(d=t.jsx(ee,{url:v,fallback:l,shape:"square",size:"base"}),e[6]=l,e[7]=v,e[8]=d):d=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ze,{size:14,className:"text-white"})}),e[9]=k):k=e[9];let c;return e[10]!==s||e[11]!==n||e[12]!==d?(c=t.jsxs("button",{type:"button",onClick:h,disabled:s,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[n,d,k]}),e[10]=s,e[11]=n,e[12]=d,e[13]=c):c=e[13],c}function Le(){return de.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:Se,label:"Claiming email domain",claimOnly:!0},{icon:ve,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,ce=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:r,domain:e,claimDomain:g,logoUrl:l}){const f=ue.filter(o=>g||!o.claimOnly),[s,a]=F.useState(0),i=F.useRef(!1);if(!i.current){i.current=!0;for(let o=1;o<f.length;o++)setTimeout(()=>a(o),fe*o)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(te,{title:`Setting up ${r}`,description:`Getting everything ready from ${e}`,logoUrl:l??null,logoFallback:r.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:f.map((o,h)=>{const n=o.icon,v=h===s,d=h<s,k=ce[h%ce.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||v?1:.4},children:[t.jsxs("span",{className:H("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:k.bg,color:k.fg}:void 0,children:[t.jsx(we,{size:16,className:H("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(Q,{size:16,className:H("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(n,{size:16,className:H("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:H("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||d?"text-foreground":"text-muted-foreground"),children:o.label})]},o.label)})})]})}export{He as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as k,r as z,b8 as S,g as _,a3 as E,b9 as T,j as o,P as $}from"./index-
|
|
1
|
+
import{e as k,r as z,b8 as S,g as _,a3 as E,b9 as T,j as o,P as $}from"./index-BfzqpoYd.js";const P="#f6f4ed",L="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:L,theme_color:P,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function q(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as o,j as r,O as s}from"./index-
|
|
1
|
+
import{e as o,j as r,O as s}from"./index-BfzqpoYd.js";function m(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as f,g as p,ck as x,j as r,r as c,l as u}from"./index-BfzqpoYd.js";import{P as g}from"./plugin-layout-DECTyQVg.js";import"./use-connection-MP_sOdrQ.js";import"./use-collections-vRlJo8MD.js";import"./use-mcp-client-Brxiewn2.js";import"./Settings02-C7YqxsZL.js";import"./index-CVPVNlMM.js";import"./sidebar-B3S1MC-b.js";import"./LayoutLeft-6fPyjOVd.js";import"./tooltip-CC_mfaKY.js";import"./sheet-y2Nja_Ue.js";import"./X-DCWlm9Ta.js";function v(){const e=f.c(13);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org/plugins/$pluginId"},e[0]=i):i=e[0];const{pluginId:s}=p(i);let l;e[1]!==s?(l=x.find(n=>n.id===s),e[1]=s,e[2]=l):l=e[2];const t=l;if(t?.renderHeader&&t?.renderEmptyState&&t?.bindingName){let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r.jsx(u,{size:32,className:"animate-spin text-muted-foreground mb-4"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),e[3]=n):n=e[3];let d;return e[4]!==t.bindingName||e[5]!==t.renderEmptyState||e[6]!==t.renderHeader?(d=r.jsx(c.Suspense,{fallback:n,children:r.jsx(g,{bindingName:t.bindingName,renderHeader:t.renderHeader,renderEmptyState:t.renderEmptyState})}),e[4]=t.bindingName,e[5]=t.renderEmptyState,e[6]=t.renderHeader,e[7]=d):d=e[7],d}const a=t?.LayoutComponent;if(!a){let n;return e[8]!==s?(n=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Plugin "',s,'" not found']})}),e[8]=s,e[9]=n):n=e[9],n}let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r.jsx(u,{size:32,className:"animate-spin text-muted-foreground mb-4"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),e[10]=m):m=e[10];let o;return e[11]!==a?(o=r.jsx(c.Suspense,{fallback:m,children:r.jsx(a,{})}),e[11]=a,e[12]=o):o=e[12],o}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as L,G as te,K as U,j as a,r as G,c as ne}from"./index-RoHcRkq0.js";import{i as oe,j as M,X as se,Y as re,Z as ie,d as le}from"./index-DU03U45c.js";import{L as Y}from"./label-WCbT5R_C.js";import{S as $}from"./switch-DhDeb5VA.js";import{a as ce,S as ae}from"./schema-form-DC8-fGrX.js";import{c as ue,S as fe,a as pe,b as de,d as ye}from"./select-DzGY5lz9.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function z(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function Z(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=M(e,t),o=Z(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function W(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=M(n,t),s=Z(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??W(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:W(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function je(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function Ee(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(je(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function qe(t,e,n){if(e.kind==="site"){const l=Ee(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:z(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:z(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function He(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function Je(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=j=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,j)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=j=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:j}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=G.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=G.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const E={...o};if(T)delete E[u];else{const D=r?.[u];E[u]=D??(u==="type"?"website":"")}s(E)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const j=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const E=p&&d.includes(u),D=E&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),E&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>j(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Xe(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const E=me(s);p(E),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const E=Se(T,n);p(E)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let j;e[8]!==h||e[9]!==f?(j=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=j):j=e[10];const P=j;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Xe as P,Ie as S,He as a,Ce as b,Je as c,W as d,Ee as f,k as i,qe as r,w as u};
|
|
1
|
+
import{e as L,G as te,K as U,j as a,r as G,c as ne}from"./index-BfzqpoYd.js";import{i as oe,j as M,X as se,Y as re,Z as ie,d as le}from"./index-BXzjL9VS.js";import{L as Y}from"./label-zIig0cjv.js";import{S as $}from"./switch-BZi96ipJ.js";import{a as ce,S as ae}from"./schema-form-f_EsRXt1.js";import{c as ue,S as fe,a as pe,b as de,d as ye}from"./select-DpYu937I.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function z(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function Z(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=M(e,t),o=Z(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function W(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=M(n,t),s=Z(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??W(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:W(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function je(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function Ee(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(je(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function qe(t,e,n){if(e.kind==="site"){const l=Ee(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:z(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:z(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function He(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function Je(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=j=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,j)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=j=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:j}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=G.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=G.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const E={...o};if(T)delete E[u];else{const D=r?.[u];E[u]=D??(u==="type"?"website":"")}s(E)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const j=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const E=p&&d.includes(u),D=E&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),E&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>j(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Xe(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const E=me(s);p(E),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const E=Se(T,n);p(E)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let j;e[8]!==h||e[9]!==f?(j=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=j):j=e[10];const P=j;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Xe as P,Ie as S,He as a,Ce as b,Je as c,W as d,Ee as f,k as i,qe as r,w as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as it,r as E,j as e,l as rt}from"./index-BfzqpoYd.js";import{S as mt,d as pt,a as st,b as at}from"./sheet-y2Nja_Ue.js";import{S as nt}from"./scroll-area-BYy84ztj.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-C3bI8Neh.js";import{j as xt}from"./index-BXzjL9VS.js";import"./X-DCWlm9Ta.js";import"./select-DpYu937I.js";import"./tooltip-CC_mfaKY.js";import"./Check-CSixRgqh.js";import"./ChevronDown-BptXi8Ef.js";import"./ChevronUp-DChs66VU.js";import"./label-zIig0cjv.js";import"./switch-BZi96ipJ.js";import"./schema-form-f_EsRXt1.js";import"./agent-icon-Lc1AgwlE.js";import"./AlertCircle-B-p2hhbf.js";import"./Tool01-DXWYgeBe.js";import"./SwitchHorizontal01-__hAuhZa.js";import"./RefreshCcw01-DlKjMM-5.js";import"./XCircle-CEKwTNMD.js";import"./ArrowUpRight-Bq-dJGgn.js";import"./ZapSquare-DSdwG_FE.js";import"./Users03-D5pU3_ql.js";import"./CheckCircle-CqLcOI7o.js";import"./ChevronLeft-Bq6F--2K.js";import"./ChevronRight-CtziSifX.js";import"./DotsVertical-DQ3UGDDE.js";import"./Container-DIwdobum.js";import"./Eye-DepFjUJE.js";import"./ZoomOut-CCPaeWry.js";import"./Globe01-BayTDYGC.js";import"./FilterLines-CIJgiiLT.js";import"./Star01-q6EhXttt.js";import"./Palette-siqkt4cQ.js";import"./HardDrive-OwnJRrIS.js";import"./Stars02-DJ4Y5TfK.js";import"./Key01-CR8zfCdU.js";import"./LayoutLeft-6fPyjOVd.js";import"./LinkExternal01-B2YZgRTN.js";import"./Monitor01-BNXW6pu5.js";import"./Sun-CeFpMHQU.js";import"./Play-CBt0NeLA.js";import"./Plus-gXoAw_mX.js";import"./SearchMd-z6b-QOmX.js";import"./Settings02-C7YqxsZL.js";import"./Shield01-BT66FEMI.js";import"./Stars01-DcMeK1n0.js";import"./Trash01-B91-1KNk.js";import"./Upload01-CcwGyBRP.js";import"./User01-JR_76gHl.js";import"./Users01-BM2QLqUJ.js";import"./XClose-DhQ5V0ST.js";import"./Zap-BLBAeivN.js";import"./calendar-CCqv5TgR.js";import"./input-BGQcwAaL.js";import"./popover-B1xAxEac.js";import"./textarea-Bo_ElpPh.js";import"./dropdown-menu-DpfpR4kx.js";import"./image-field-BTCmGBNs.js";import"./dialog-nXKceTRB.js";import"./skeleton-thGJKlMg.js";import"./tabs-sqzEAKlk.js";import"./use-file-configs-DGSgkVs8.js";import"./use-mcp-client-Brxiewn2.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./useInfiniteQuery-BEouccKd.js";import"./infiniteQueryObserver-CvEVG_TM.js";import"./agent-capabilities-CuNGQogd.js";import"./chat-context-BIie9ysT.js";import"./tab-id-CjkvF5Bz.js";import"./decopilot-sse-pool-vfZK3kan.js";import"./create-sse-subscription-BS5983N4.js";import"./use-virtual-mcp-DDTG_-f6.js";import"./use-collections-vRlJo8MD.js";import"./use-ai-providers-D2jZ5H5p.js";import"./use-organization-settings-DjvlRnDe.js";import"./pair-NC4sCATE.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BkzArvj8.js";import"./file-type-icon-B2skJERp.js";import"./content-blocks-o63cs2vh.js";import"./types-btWFnXlQ.js";import"./shell-layout-D8qm1N5L.js";import"./avatar-3vQWE5Hu.js";import"./required-auth-layout-3IQyeREK.js";import"./useRouterState-xsU2zFoM.js";import"./use-org-sso-BWWAvGBF.js";import"./integration-icon-B-zr5uGs.js";import"./use-navigate-to-agent-BRFls8tQ.js";import"./use-connection-MP_sOdrQ.js";import"./use-mcp-prompts-CKvrvNSD.js";import"./form-BM4RuTjX.js";import"./spinner-j70e5pPL.js";import"./drawer-lSnonzW3.js";import"./collection-search-Bryj5VYk.js";import"./toggle-group-jYWXBndg.js";import"./connect-desktop-dialog-BeLm4wl6.js";import"./agent-icons-Cprwkzhw.js";import"./checkbox-DFFY_m2B.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-pgSq0Nbi.js";import"./card-CeH_PUFE.js";import"./command-KyGHPzm4.js";import"./index-CnLAq3ph.js";import"./sortable.esm-DYE94iJD.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Dug8PvM2.js";import"./use-registry-connections-BQfixYFV.js";import"./extract-connection-data-DxtHEsy3.js";import"./generate-id-DvX29Me7.js";import"./collections-B-UBhIxv.js";import"./collection-tabs-Y3w8w2D4.js";import"./badge-DF6gVmsi.js";import"./connection-form-helpers-Ce4ZXQGG.js";import"./use-infinite-scroll-BYw2UY-G.js";import"./useSuspenseInfiniteQuery-wDDb-pw7.js";import"./index-1xoY7YJX.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-DQ0B9hX1.js";import"./sidebar-B3S1MC-b.js";import"./toolbar-BIjePcgn.js";import"./use-create-virtual-mcp-C88u5wPn.js";import"./github-repo-picker-Dlio4Q6_.js";import"./use-mcp-tools-DFeiBffX.js";import"./alert-dialog-DJLxSS_E.js";import"./index-DOW4VN4f.js";import"./use-org-auth-client-IT7XMFB9.js";import"./hover-card-DASEEDYA.js";import"./task-status-CgfEdw1R.js";import"./use-status-sounds-BJZxFfhN.js";import"./empty-state-BJuYi96S.js";import"./resizable-Cx-Y9zvP.js";import"./use-capability-aJI8msnV.js";import"./header-tab-button-BY6bk4Fs.js";import"./index-DcxEaxY4.js";import"./user-BZco0YX9.js";import"./tools-list-9Kj7tcM0.js";import"./use-debounced-autosave-C2TtzjZB.js";import"./index-CVPVNlMM.js";import"./search-input-C3i2qrnL.js";import"./use-secrets-DEcBibJG.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-CsQ2TTIf.js";import"./view-mode-toggle-BN8FgH0K.js";import"./select-model-B8gz_8C_.js";import"./use-automations-B6ZTT5n1.js";import"./monaco-editor-DQviDtyP.js";import"./automation-runs-D-WPNg7m.js";import"./table-C3TjNbDC.js";import"./use-members-D6H6sd8q.js";import"./automation-list-row-C8yWYA2H.js";function Si(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(jt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),j=m.kind==="page",ot=j?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=j?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!j||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let w;t[0]!==s?(w=vt(s),t[0]=s,t[1]=w):w=t[1];const M=w;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=j&&o,B=m.kind==="site"&&o&&n,H=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function jt(u){return u+1}export{Si as SeoSheet};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as $,r as H,T as at,I as Ht,H as Bt,j as n,B as ke,W as Xe,c as V,t as Wt,q as he,G as Ut,a as qt,K as me,o as ze,n as Oe,f as je,E as Vt,C as Gt,bB as De}from"./index-RoHcRkq0.js";import{_ as Kt,F as Jt,z as Xt,ab as Qt,N as Yt,M as Zt,L as es,a7 as rt,ac as ts,ad as ss,A as it,ae as ie,af as ns,ag as ls,ah as os,b as as}from"./agent-icon-atw8dEpB.js";import{t as He}from"./Stars01-cUHrtzm6.js";import{a as ct,t as rs,b as we,d as is}from"./XCircle-gezQrKJB.js";import{i as Be}from"./Check-Rzhysg8v.js";import{i as Qe}from"./ChevronRight-C-1GbVi6.js";import{a as ut,s as cs}from"./Eye-0u1NnyPn.js";import{a as de,c as Ye,t as us}from"./format-time-Cy7tTmZp.js";import{N as dt,R as ft,e as mt,C as ds,f as fs,g as ms,u as ps,i as xs,d as gs}from"./scroll-area-DjlF9Nhh.js";import{u as pt}from"./use-copy-N9gIT0E2.js";import{T as pe,a as xe,b as ge}from"./tooltip-CLHWv9z-.js";import{M as xt,I as gt,F as hs}from"./file-type-icon-B565DmsG.js";import{c as bs}from"./content-blocks-o63cs2vh.js";import{g as ht,M as ys}from"./types-Cxg1qjf9.js";import{f as $e,i as js,d as We,a as vs}from"./chat-context-7nRfVaxU.js";import{S as Ns,u as Ue,c as ks,b as Ss}from"./constants-DDZG6Edw.js";import{n as _s,f as ws,o as Ts,q as Cs}from"./tab-id-BNsa7AXA.js";import{i as bt}from"./AlertCircle-CfP2ydlK.js";import{s as Ce,t as yt}from"./Star01-DinMZEQp.js";import{s as $s}from"./XClose-dfaecXcF.js";import{n as jt}from"./ZapSquare-Doe97qp7.js";import{n as vt,i as Is}from"./Globe01-CYJ5akFo.js";import{b as Ms,i as Ls,a as Le}from"./Tool01-D6Ixmgxm.js";import{i as Ze,a as Rs}from"./ZoomOut-u9z9zRXH.js";import{i as Ne}from"./Monitor01-B9COEs1V.js";import{i as As}from"./SearchMd-Ckbe6j0d.js";import{i as zs}from"./Upload01-DslYY_N3.js";import{u as Ps,c as Es}from"./shell-layout-DSHLjHdv.js";import{n as Nt}from"./LinkExternal01-CMTN51kD.js";import{I as Ie}from"./integration-icon-BOg4uSLi.js";import{u as Fs}from"./use-virtual-mcp-wf8itLFJ.js";import{a as kt}from"./Users03-C3j_vENk.js";import{a as ce}from"./Palette-CvBtCHX7.js";import{k as St}from"./use-navigate-to-agent-B_6LJV9r.js";import{a as Os}from"./use-connection-BKakpvkk.js";import{s as Ds}from"./Stars02-CovFPupV.js";import{g as Hs}from"./use-mcp-prompts-CY9OUQZa.js";import{c as Bs,b as Ws,d as Us,a as qs,D as Vs}from"./dialog-CvJmXij7.js";import{a as Gs,F as Ks,b as Js,c as Xs,d as Qs,f as Ys}from"./form-DAahwl9B.js";import{I as Zs}from"./input-DsRHjNfg.js";import{S as en}from"./spinner-CCf2Lbex.js";import{t as tn}from"./ChevronDown-DgAQraB9.js";const sn={openrouter:s=>{const e=s?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function _t(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(sn)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function wt(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Tt(s,e){if(!e)return s;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,l=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:s.inputTokens+(e.inputTokens??0),outputTokens:s.outputTokens+(e.outputTokens??0),reasoningTokens:s.reasoningTokens+(e.reasoningTokens??0),totalTokens:s.totalTokens+(e.totalTokens??0),cost:s.cost+_t(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function ma(s){return s.reduce((e,t)=>Tt(e,t.metadata?.usage),wt())}function nn(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function qe(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Ve(s,e){if(!e)return s;const t=`${nn(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function ln(s,e){return Ve(s,e).replace(/[_-]/g," ").toLowerCase()}function on(s){const e={};for(const t of s.arguments??[])e[t.name]=t.required?Xe().min(1,"Required"):Xe();return at(e)}function an(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function rn(s){const e=$.c(66),{prompt:t,setPrompt:l,onSubmit:r,defaultValues:a}=s,o=H.useId();let u;if(e[0]!==t){const A=t?on(t):at({});u=Ht(A),e[0]=t,e[1]=u}else u=e[1];const c=u;let m;e[2]!==a||e[3]!==t?(m=t?an(t,a):{},e[2]=a,e[3]=t,e[4]=m):m=e[4];let p;e[5]!==c||e[6]!==m?(p={resolver:c,defaultValues:m,mode:"onChange"},e[5]=c,e[6]=m,e[7]=p):p=e[7];const i=Bt(p);let d;e[8]!==t?.arguments?(d=t?.arguments??[],e[8]=t?.arguments,e[9]=d):d=e[9];const x=d;let g;e[10]!==i||e[11]!==r||e[12]!==l?(g=async A=>{await r(A),l(null),i.reset()},e[10]=i,e[11]=r,e[12]=l,e[13]=g):g=e[13];const b=g;let h;e[14]!==i||e[15]!==l?(h=A=>{A||(i.reset(),l(null))},e[14]=i,e[15]=l,e[16]=h):h=e[16];const N=h;if(!t)return null;let j;e[17]!==t._meta||e[18]!==t.name||e[19]!==t.title?(j=t.title||ln(t.name,qe(t._meta)),e[17]=t._meta,e[18]=t.name,e[19]=t.title,e[20]=j):j=e[20];let k;e[21]!==j?(k=n.jsx(Bs,{children:n.jsx("span",{className:"capitalize",children:j})}),e[21]=j,e[22]=k):k=e[22];let y;e[23]!==t.description?(y=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[23]=t.description,e[24]=y):y=e[24];let v;e[25]!==y||e[26]!==k?(v=n.jsxs(Ws,{children:[k,y]}),e[25]=y,e[26]=k,e[27]=v):v=e[27];let S;e[28]!==i||e[29]!==b?(S=A=>{A.stopPropagation(),i.handleSubmit(b)(A)},e[28]=i,e[29]=b,e[30]=S):S=e[30];let _;if(e[31]!==x||e[32]!==i.control||e[33]!==i.formState.isSubmitting){let A;e[35]!==i.control||e[36]!==i.formState.isSubmitting?(A=P=>n.jsx(Ks,{control:i.control,name:P.name,render:O=>{const{field:W}=O;return n.jsxs(Js,{children:[n.jsxs(Xs,{className:"text-xs",children:[P.name,P.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),n.jsx(Qs,{children:n.jsx(Zs,{...W,value:W.value??"",required:P.required,placeholder:P.description??"",className:"h-9",disabled:i.formState.isSubmitting})}),n.jsx(Ys,{})]})}},P.name),e[35]=i.control,e[36]=i.formState.isSubmitting,e[37]=A):A=e[37],_=x.map(A),e[31]=x,e[32]=i.control,e[33]=i.formState.isSubmitting,e[34]=_}else _=e[34];let w;e[38]!==N?(w=()=>N(!1),e[38]=N,e[39]=w):w=e[39];let T;e[40]!==i.formState.isSubmitting||e[41]!==w?(T=n.jsx(ke,{type:"button",variant:"ghost",onClick:w,disabled:i.formState.isSubmitting,children:"Cancel"}),e[40]=i.formState.isSubmitting,e[41]=w,e[42]=T):T=e[42];let I;e[43]!==i.formState.isSubmitting?(I=i.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(en,{size:"xs"}),"Loading..."]}):"Use prompt",e[43]=i.formState.isSubmitting,e[44]=I):I=e[44];let M;e[45]!==i.formState.isSubmitting||e[46]!==o||e[47]!==I?(M=n.jsx(ke,{type:"submit",form:o,disabled:i.formState.isSubmitting,children:I}),e[45]=i.formState.isSubmitting,e[46]=o,e[47]=I,e[48]=M):M=e[48];let C;e[49]!==T||e[50]!==M?(C=n.jsxs(Us,{children:[T,M]}),e[49]=T,e[50]=M,e[51]=C):C=e[51];let L;e[52]!==o||e[53]!==S||e[54]!==_||e[55]!==C?(L=n.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:S,children:[_,C]}),e[52]=o,e[53]=S,e[54]=_,e[55]=C,e[56]=L):L=e[56];let R;e[57]!==i||e[58]!==L?(R=n.jsx(Gs,{...i,children:L}),e[57]=i,e[58]=L,e[59]=R):R=e[59];let F;e[60]!==v||e[61]!==R?(F=n.jsxs(qs,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[v,R]}),e[60]=v,e[61]=R,e[62]=F):F=e[62];let z;return e[63]!==N||e[64]!==F?(z=n.jsx(Vs,{open:!0,onOpenChange:N,children:F}),e[63]=N,e[64]=F,e[65]=z):z=e[65],z}function Ct(s){return s?s.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function re(s,e){return s==="output-error"||s==="output-denied"?"error":s==="approval-requested"?"approval":s==="input-streaming"||s==="input-available"||s==="output-available"&&e===!0?"loading":"idle"}function ve(s){if(s==null||typeof s!="object")return;const e=s;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return s}function cn(s){return s.storage.mention}function pa(s,e,t){s.chain().focus().insertContentAt(e,[$t(t),{type:"text",text:" "}]).run()}function $t(s){return{type:"mention",attrs:s}}function un(s){const e=$.c(19),{node:t,selected:l,view:r,editor:a,getPos:o}=s,{name:u,char:f,kind:c,id:m,args:p}=t.attrs,i=l&&r.editable,d=f==="@",x=r.editable&&f==="/"&&c!=="resource";let g;e[0]!==p||e[1]!==a||e[2]!==o||e[3]!==m||e[4]!==x||e[5]!==u?(g=_=>{if(!x)return;const T=cn(a)?.onEditChip;if(!T||typeof o!="function")return;const I=o();typeof I=="number"&&(_.preventDefault(),_.stopPropagation(),T({promptId:m,promptName:u,args:p??{},pos:I}))},e[0]=p,e[1]=a,e[2]=o,e[3]=m,e[4]=x,e[5]=u,e[6]=g):g=e[6];const b=g,h=x?"cursor-pointer":"cursor-default",N=d?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",j=i&&"outline-2 outline-blue-300 outline-offset-0",k=x&&"hover:brightness-95";let y;e[7]!==h||e[8]!==N||e[9]!==j||e[10]!==k?(y=V("px-1 py-1 rounded","inline-flex items-center gap-1",h,"select-none","text-xs font-light",N,j,k,"capitalize"),e[7]=h,e[8]=N,e[9]=j,e[10]=k,e[11]=y):y=e[11];let v;e[12]!==u?(v=u?Ct(u):"",e[12]=u,e[13]=v):v=e[13];let S;return e[14]!==f||e[15]!==b||e[16]!==y||e[17]!==v?(S=n.jsxs(mt,{onClick:b,className:y,children:[f,v]}),e[14]=f,e[15]=b,e[16]=y,e[17]=v,e[18]=S):S=e[18],S}const dn=dt.create({name:"mention",group:"inline",inline:!0,atom:!0,addStorage(){return{onEditChip:null}},addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},char:{default:"/",parseHTML:s=>s.getAttribute("data-char")||"/",renderHTML:s=>s.char?{"data-char":s.char}:{}},metadata:{default:null,parseHTML:s=>{try{return JSON.parse(s.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:s=>s.metadata?{"data-metadata":JSON.stringify(s.metadata)}:{}},kind:{default:null,parseHTML:s=>s.getAttribute("data-kind")||null,renderHTML:s=>s.kind?{"data-kind":s.kind}:{}},args:{default:null,parseHTML:s=>{try{return JSON.parse(s.getAttribute("data-args")||"null")}catch{return null}},renderHTML:s=>s.args?{"data-args":JSON.stringify(s.args)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"mention"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.char&&(t["data-char"]=s.attrs.char),s.attrs.metadata&&(t["data-metadata"]=JSON.stringify(s.attrs.metadata)),s.attrs.kind&&(t["data-kind"]=s.attrs.kind),s.attrs.args&&(t["data-args"]=JSON.stringify(s.attrs.args)),["span",{...e,...t}]},renderText({node:s}){const e=s.attrs.char??"@",t=s.attrs.name??"";return`${e}${t}`},addNodeView(){return ft(un)}}),fn=/^mcp__[a-zA-Z0-9_-]+__/;function It(s){return s.replace(fn,"")}function Ge(s){const e=$.c(17),{id:t,part:l,copyable:r,extraActions:a,alwaysShowActions:o}=s,u=r===void 0?!1:r,f=o===void 0?!1:o,{handleCopy:c}=pt(),[m,p]=H.useState(!1);let i;e[0]!==c||e[1]!==t||e[2]!==l.text?(i=async()=>{Wt("chat_message_copied",{message_id:t,chars:l.text.length}),await c(l.text),p(!0),setTimeout(()=>p(!1),2e3)},e[0]=c,e[1]=t,e[2]=l.text,e[3]=i):i=e[3];const d=i,x=u&&a,g=x||a;let b;e[4]!==t||e[5]!==l.text?(b=n.jsx(xt,{id:t,text:l.text}),e[4]=t,e[5]=l.text,e[6]=b):b=e[6];let h;e[7]!==f||e[8]!==a||e[9]!==d||e[10]!==m||e[11]!==g||e[12]!==x?(h=g&&n.jsxs("div",{className:V("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",f?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[a,x&&a&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),x&&n.jsx("button",{type:"button",onClick:d,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":"Copy message",children:m?n.jsx(Be,{className:"size-4"}):n.jsx(ut,{className:"size-4"})})]}),e[7]=f,e[8]=a,e[9]=d,e[10]=m,e[11]=g,e[12]=x,e[13]=h):h=e[13];let N;return e[14]!==b||e[15]!==h?(N=n.jsxs("div",{className:"group/part relative",children:[b,h]}),e[14]=b,e[15]=h,e[16]=N):N=e[16],N}function xa(s,e,t){s.chain().focus().insertContentAt(e,[mn(t),{type:"text",text:" "}]).run()}function mn(s){return{type:"file",attrs:s}}function pn(s){const e=$.c(17),{node:t,selected:l,view:r}=s,{name:a,mimeType:o,data:u}=t.attrs,f=l&&r.editable;let c;e[0]!==o?(c=o.startsWith("image/"),e[0]=o,e[1]=c):c=e[1];const m=c,p=f&&"outline-2 outline-blue-300 outline-offset-0";let i;e[2]!==p?(i=V("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",p),e[2]=p,e[3]=i):i=e[3];let d;e[4]!==a?(d=n.jsx(pe,{asChild:!0,children:n.jsx("span",{children:a})}),e[4]=a,e[5]=d):d=e[5];let x;e[6]!==u||e[7]!==m||e[8]!==o||e[9]!==a?(x=n.jsx(xe,{side:"top",className:"max-w-sm p-1.5",children:m?n.jsx("img",{src:`data:${o};base64,${u}`,alt:a,className:"max-w-full max-h-64 object-contain rounded"}):n.jsxs("div",{className:"text-xs",children:[n.jsx("div",{className:"font-medium",children:a}),n.jsx("div",{className:"text-muted-foreground mt-1",children:o})]})}),e[6]=u,e[7]=m,e[8]=o,e[9]=a,e[10]=x):x=e[10];let g;e[11]!==d||e[12]!==x?(g=n.jsxs(ge,{children:[d,x]}),e[11]=d,e[12]=x,e[13]=g):g=e[13];let b;return e[14]!==i||e[15]!==g?(b=n.jsx(mt,{className:i,children:g}),e[14]=i,e[15]=g,e[16]=b):b=e[16],b}const xn=dt.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},mimeType:{default:null,parseHTML:s=>s.getAttribute("data-mime-type")||null,renderHTML:s=>s.mimeType?{"data-mime-type":s.mimeType}:{}},size:{default:0,parseHTML:s=>{const e=s.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:s=>s.size?{"data-size":String(s.size)}:{}},data:{default:null,parseHTML:s=>s.getAttribute("data-data")||null,renderHTML:s=>s.data?{"data-data":s.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"file"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.mimeType&&(t["data-mime-type"]=s.attrs.mimeType),s.attrs.size&&(t["data-size"]=String(s.attrs.size)),s.attrs.data&&(t["data-data"]=s.attrs.data),["span",{...e,...t}]},renderText({node:s}){return`[${s.attrs.name??""}]`},addNodeView(){return ft(pn)}}),fe=16,Pe=2.5,Ee=(fe-Pe)/2,Re=2*Math.PI*Ee;function gn(s){const e=$.c(31),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:r,outputTokens:a,cost:o}=t;if(!l&&!r&&!a)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Kt,{size:12}),e[0]=u):u=e[0];let f;e[1]!==o||e[2]!==l?(f=o>0?`$${o.toFixed(4)}`:l.toLocaleString(),e[1]=o,e[2]=l,e[3]=f):f=e[3];let c;e[4]!==f?(c=n.jsx(pe,{asChild:!0,children:n.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[u,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:f})]})}),e[4]=f,e[5]=c):c=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("span",{className:"text-muted",children:"in"}),e[7]=p):p=e[7];let i;e[8]!==r?(i=r.toLocaleString(),e[8]=r,e[9]=i):i=e[9];let d;e[10]!==i?(d=n.jsx("span",{className:"text-right tabular-nums",children:i}),e[10]=i,e[11]=d):d=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"text-muted",children:"out"}),e[12]=x):x=e[12];const g=a-(t.reasoningTokens??0);let b;e[13]!==g?(b=g.toLocaleString(),e[13]=g,e[14]=b):b=e[14];let h;e[15]!==b?(h=n.jsx("span",{className:"text-right tabular-nums",children:b}),e[15]=b,e[16]=h):h=e[16];let N;e[17]!==r||e[18]!==t.cacheReadTokens||e[19]!==t.cacheWriteTokens?(N=(t.cacheReadTokens>0||t.cacheWriteTokens>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:r>0?`${(t.cacheReadTokens/r*100).toFixed(0)}%`:"0%"})]}),e[17]=r,e[18]=t.cacheReadTokens,e[19]=t.cacheWriteTokens,e[20]=N):N=e[20];let j;e[21]!==o?(j=o>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",o.toFixed(4)]})]}),e[21]=o,e[22]=j):j=e[22];let k;e[23]!==h||e[24]!==N||e[25]!==j||e[26]!==d?(k=n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[m,n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[p,d,x,h,N,j]})]}),e[23]=h,e[24]=N,e[25]=j,e[26]=d,e[27]=k):k=e[27];let y;return e[28]!==k||e[29]!==c?(y=n.jsxs(ge,{children:[c,k]}),e[28]=k,e[29]=c,e[30]=y):y=e[30],y}function hn(s){const e=$.c(19),{usage:t,duration:l}=s,r=l!=null&&l>0,a=t!=null&&(t.cost??0)>0,o=t!=null&&(t.totalTokens??0)>0;if(!r&&!a&&!o)return null;let u;e[0]!==l||e[1]!==r?(u=r?de(l/1e3):null,e[0]=l,e[1]=r,e[2]=u):u=e[2];const f=u;let c;e[3]!==l||e[4]!==f||e[5]!==t?(c=f&&n.jsxs(ge,{children:[n.jsx(pe,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:f})}),n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),n.jsx("span",{className:"tabular-nums",children:de(l/1e3)}),(t?.reasoningTokens??0)>0&&n.jsxs("span",{className:"ml-2 opacity-50",children:[t.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=l,e[4]=f,e[5]=t,e[6]=c):c=e[6];let m;e[7]!==a||e[8]!==r||e[9]!==o?(m=r&&(a||o)&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=a,e[8]=r,e[9]=o,e[10]=m):m=e[10];let p;e[11]!==a||e[12]!==o||e[13]!==t?(p=(a||o)&&n.jsxs(ge,{children:[n.jsx(pe,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:a?`$${t.cost.toFixed(4)}`:`${t.totalTokens.toLocaleString()} tok`})}),n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[n.jsx("span",{className:"opacity-60",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:(t.inputTokens??0).toLocaleString()}),n.jsx("span",{className:"opacity-60",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:((t.outputTokens??0)-(t?.reasoningTokens??0)).toLocaleString()}),(t?.reasoningTokens??0)>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"think"}),n.jsx("span",{className:"text-right tabular-nums",children:t.reasoningTokens.toLocaleString()})]}),((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:(t?.inputTokens??0)>0?`${((t?.cacheReadTokens??0)/t.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=a,e[12]=o,e[13]=t,e[14]=p):p=e[14];let i;return e[15]!==c||e[16]!==m||e[17]!==p?(i=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[c,m,p]}),e[15]=c,e[16]=m,e[17]=p,e[18]=i):i=e[18],i}function ga(s){const e=$.c(51),{usage:t,totalTokens:l,contextWindow:r,onOpenContextPanel:a}=s,o=Math.min(l/r*100,100),u=Re-o/100*Re,f=t?.cost??0,c=t?.inputTokens??0,m=t?.outputTokens??0;let p;e[0]!==o?(p=o.toFixed(0),e[0]=o,e[1]=p):p=e[1];let i;e[2]!==f?(i=f>0?`, $${f.toFixed(2)}`:"",e[2]=f,e[3]=i):i=e[3];const d=`Context usage: ${p}%${i}`,x=a?"cursor-pointer":"cursor-default";let g;e[4]!==x?(g=V("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",x),e[4]=x,e[5]=g):g=e[5];let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("circle",{cx:fe/2,cy:fe/2,r:Ee,fill:"none",stroke:"currentColor",strokeWidth:Pe,className:"opacity-15"}),e[6]=b):b=e[6];const h=o>90?"text-destructive":o>70?"text-warning":"text-muted-foreground";let N;e[7]!==h?(N=V(h),e[7]=h,e[8]=N):N=e[8];let j;e[9]!==u||e[10]!==N?(j=n.jsxs("svg",{width:fe,height:fe,className:"-rotate-90",children:[b,n.jsx("circle",{cx:fe/2,cy:fe/2,r:Ee,fill:"none",stroke:"currentColor",strokeWidth:Pe,strokeDasharray:Re,strokeDashoffset:u,strokeLinecap:"round",className:N})]}),e[9]=u,e[10]=N,e[11]=j):j=e[11];let k;e[12]!==o?(k=o.toFixed(0),e[12]=o,e[13]=k):k=e[13];let y;e[14]!==f?(y=f>0?` · $${f.toFixed(2)}`:"",e[14]=f,e[15]=y):y=e[15];let v;e[16]!==k||e[17]!==y?(v=n.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[k,"%",y]}),e[16]=k,e[17]=y,e[18]=v):v=e[18];let S;e[19]!==a||e[20]!==v||e[21]!==d||e[22]!==g||e[23]!==j?(S=n.jsx(pe,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:a,"aria-label":d,className:g,children:[j,v]})}),e[19]=a,e[20]=v,e[21]=d,e[22]=g,e[23]=j,e[24]=S):S=e[24];let _;e[25]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("span",{className:"text-muted",children:"context"}),e[25]=_):_=e[25];let w;e[26]!==l?(w=l.toLocaleString(),e[26]=l,e[27]=w):w=e[27];let T;e[28]!==r?(T=r.toLocaleString(),e[28]=r,e[29]=T):T=e[29];let I;e[30]!==o?(I=o.toFixed(1),e[30]=o,e[31]=I):I=e[31];let M;e[32]!==w||e[33]!==T||e[34]!==I?(M=n.jsxs("span",{className:"text-right tabular-nums",children:[w," / ",T," (",I,"%)"]}),e[32]=w,e[33]=T,e[34]=I,e[35]=M):M=e[35];let C;e[36]!==f||e[37]!==c||e[38]!==m?(C=f>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",f.toFixed(4)]}),n.jsx("span",{className:"text-muted",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:c.toLocaleString()}),n.jsx("span",{className:"text-muted",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:m.toLocaleString()})]}),e[36]=f,e[37]=c,e[38]=m,e[39]=C):C=e[39];let L;e[40]!==c||e[41]!==t?.cacheReadTokens||e[42]!==t?.cacheWriteTokens?(L=((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:c>0?`${((t?.cacheReadTokens??0)/c*100).toFixed(0)}%`:"0%"})]}),e[40]=c,e[41]=t?.cacheReadTokens,e[42]=t?.cacheWriteTokens,e[43]=L):L=e[43];let R;e[44]!==M||e[45]!==C||e[46]!==L?(R=n.jsx(xe,{side:"top",className:"font-mono text-[11px]",children:n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[_,M,C,L]})}),e[44]=M,e[45]=C,e[46]=L,e[47]=R):R=e[47];let F;return e[48]!==S||e[49]!==R?(F=n.jsxs(ge,{children:[S,R]}),e[48]=S,e[49]=R,e[50]=F):F=e[50],F}function bn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(ms,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function yn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(ds,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function jn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(fs,{"data-slot":"collapsible-content",...t}),e[2]=t,e[3]=l):l=e[3],l}function Mt({containerRef:s,enabled:e,contentDeps:t=[],threshold:l,intervalMs:r=500}){const[a,o]=H.useState(null),[u,f]=H.useState(!1),c=l??(s?.95:.1),m=()=>{if(s?.current){s.current.scrollTop=s.current.scrollHeight;return}if(!a)return;let p=a.parentElement;for(;p;){const i=window.getComputedStyle(p);if(i.overflowY==="auto"||i.overflowY==="scroll"||i.overflow==="auto"||i.overflow==="scroll"){p.scrollTop=p.scrollHeight;return}p=p.parentElement}};return H.useEffect(()=>{if(!a)return;const p=new IntersectionObserver(i=>{const d=i[0]?.isIntersecting??!1;f(d)},{root:s?.current??null,threshold:c,rootMargin:"0px"});return p.observe(a),()=>p.disconnect()},[a,c]),H.useEffect(()=>{if(!e||!u)return;const p=setInterval(m,r);return()=>clearInterval(p)},[e,u,r]),H.useEffect(()=>{!e||!u||m()},[e,u,...t]),{sentinelRef:o,isTracking:u}}function D(s){const e=$.c(53),{icon:t,title:l,usage:r,summary:a,state:o,detail:u,detailVariant:f,forceOpen:c,variant:m,trailing:p,iconDestructive:i,alwaysChevron:d,defaultOpen:x,children:g}=s,b=f===void 0?"code":f,h=m===void 0?"default":m,[N,j]=H.useState(x??!1),{handleCopy:k,copied:y}=pt(),v=o==="loading",S=o==="error";let _;e[0]!==u?(_=u&&u.trim(),e[0]=u,e[1]=_):_=e[1];const T=!!_||!!g,I=h==="subtask",M=(c??!1)||N,C=H.useRef(null),L=v&&M;let R;e[2]!==u?(R=[u],e[2]=u,e[3]=R):R=e[3];let F;e[4]!==L||e[5]!==R?(F={containerRef:C,enabled:L,contentDeps:R},e[4]=L,e[5]=R,e[6]=F):F=e[6];const{sentinelRef:z}=Mt(F),A=c?void 0:j,P=!T,O=T&&"[@media(hover:hover)]:hover:bg-accent/30",W=!T&&"cursor-default",U=v&&"shimmer";let B;e[7]!==W||e[8]!==U||e[9]!==O?(B=V("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",O,W,U),e[7]=W,e[8]=U,e[9]=O,e[10]=B):B=e[10];const Y=!T;let K;e[11]!==d||e[12]!==M||e[13]!==t||e[14]!==i||e[15]!==S||e[16]!==T?(K=n.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?n.jsx(Qe,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",M&&"rotate-90")}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:V("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",i?"[&>svg]:text-destructive/70":S?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",T&&(M?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:t}),T&&n.jsx("div",{className:V("absolute inset-0 flex items-center justify-center transition-opacity duration-150",M?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:n.jsx(Qe,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",M&&"rotate-90")})})]})}),e[11]=d,e[12]=M,e[13]=t,e[14]=i,e[15]=S,e[16]=T,e[17]=K):K=e[17];const Q=S?"text-warning/80":"text-foreground";let X;e[18]!==Q?(X=V("shrink-0 text-[14px] font-normal",Q),e[18]=Q,e[19]=X):X=e[19];let Z;e[20]!==X||e[21]!==l?(Z=n.jsx("span",{className:X,children:l}),e[20]=X,e[21]=l,e[22]=Z):Z=e[22];let E;e[23]!==a?(E=a?n.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:a})}):n.jsx("div",{className:"flex-1"}),e[23]=a,e[24]=E):E=e[24];let q;e[25]!==p?(q=p&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:p}),e[25]=p,e[26]=q):q=e[26];let G;e[27]!==r?(G=n.jsx(gn,{usage:r}),e[27]=r,e[28]=G):G=e[28];let J;e[29]!==B||e[30]!==Y||e[31]!==K||e[32]!==Z||e[33]!==E||e[34]!==q||e[35]!==G||e[36]!==P?(J=n.jsxs(yn,{disabled:P,className:B,"aria-disabled":Y,children:[K,Z,E,q,G]}),e[29]=B,e[30]=Y,e[31]=K,e[32]=Z,e[33]=E,e[34]=q,e[35]=G,e[36]=P,e[37]=J):J=e[37];let ee;e[38]!==g||e[39]!==y||e[40]!==u||e[41]!==b||e[42]!==k||e[43]!==T||e[44]!==z?(ee=T&&n.jsx(jn,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:g||(b==="prose"?n.jsx("div",{className:"mt-1 mb-1",children:n.jsxs("div",{ref:C,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:[n.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:u}),n.jsx("div",{ref:z,className:"h-0 shrink-0"})]})}):n.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:n.jsxs("div",{ref:C,className:"flex flex-col max-h-48 overflow-y-auto",children:[n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:u})}),n.jsx("button",{type:"button",onClick:()=>k(u),className:"shrink-0 p-1.5 rounded-md 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":"Copy",children:y?n.jsx(Be,{className:"size-3.5"}):n.jsx(ut,{className:"size-3.5"})})]}),n.jsx("div",{ref:z,className:"h-0 shrink-0"})]})}))}),e[38]=g,e[39]=y,e[40]=u,e[41]=b,e[42]=k,e[43]=T,e[44]=z,e[45]=ee):ee=e[45];let ue;e[46]!==M||e[47]!==J||e[48]!==ee||e[49]!==A?(ue=n.jsxs(bn,{open:M,onOpenChange:A,className:"min-w-0",children:[J,ee]}),e[46]=M,e[47]=J,e[48]=ee,e[49]=A,e[50]=ue):ue=e[50];const le=ue;if(I){let oe;return e[51]!==le?(oe=n.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:le}),e[51]=le,e[52]=oe):oe=e[52],oe}return le}function te(s){const e=$.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=de(t),e[0]=t,e[1]=l):l=e[1];let r;return e[2]!==l?(r=n.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=r):r=e[3],r}const Lt=4;function Rt(s){const e=$.c(5),{count:t,noun:l,onClick:r}=s;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ct,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[0]=a):a=e[0];let o;return e[1]!==t||e[2]!==l||e[3]!==r?(o=n.jsxs("button",{type:"button",onClick:r,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:["See all ",t," ",l,a]}),e[1]=t,e[2]=l,e[3]=r,e[4]=o):o=e[4],o}function vn(s){const e=$.c(27),{org:t}=he(),l=Ut(),r=_s();let a;e[0]!==t.id||e[1]!==t.slug?(a={connectionId:Ns,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=a):a=e[2];const o=Ue(a);let u;e[3]!==o||e[4]!==s?(u=async b=>{if(!s)throw new Error("useTaskExpandedTools: no task in context");const h=await o.callTool({name:"COLLECTION_THREADS_GET",arguments:{id:s}}),j=(h.structuredContent??h).item?.metadata??{},y=(j.expanded_tools??[]).filter(S=>S.toolName!==b.toolName);y.push({...b,expandedAt:new Date().toISOString()});const v={...j,expanded_tools:y};return await o.callTool({name:"COLLECTION_THREADS_UPDATE",arguments:{id:s,data:{metadata:v}}}),y},e[3]=o,e[4]=s,e[5]=u):u=e[5];let f,c,m;e[6]!==t.id||e[7]!==l||e[8]!==s?(f=async b=>{const h=me.ensureTask(t.id,s??"");await l.cancelQueries({queryKey:h});const N=l.getQueryData(h),k=(N?.metadata?.expanded_tools??[]).filter(y=>y.toolName!==b.toolName);return k.push({...b,expandedAt:new Date().toISOString()}),l.setQueryData(h,y=>y&&{...y,metadata:{...y.metadata??{},expanded_tools:k}}),{previous:N}},c=()=>{l.invalidateQueries({queryKey:me.ensureTask(t.id,s??"")})},m=(b,h,N)=>{const j=me.ensureTask(t.id,s??"");N?.previous===void 0?l.removeQueries({queryKey:j,exact:!0}):l.setQueryData(j,N.previous),ze.error(b instanceof Error?b.message:"Failed to expand tool")},e[6]=t.id,e[7]=l,e[8]=s,e[9]=f,e[10]=c,e[11]=m):(f=e[9],c=e[10],m=e[11]);let p;e[12]!==u||e[13]!==f||e[14]!==c||e[15]!==m?(p={mutationFn:u,onMutate:f,onSuccess:c,onError:m},e[12]=u,e[13]=f,e[14]=c,e[15]=m,e[16]=p):p=e[16];const i=qt(p);let d;e[17]!==r||e[18]!==i||e[19]!==t.id||e[20]!==l||e[21]!==s?(d=b=>{if(!s||!r)return;const h=me.ensureTask(t.id,s),N=l.getQueryData(h),k=(N?.metadata?.expanded_tools??[]).filter(v=>v.toolName!==b.toolName);k.push({...b,expandedAt:new Date().toISOString()});const y={...N?.metadata??{},expanded_tools:k};l.setQueryData(h,v=>v&&{...v,metadata:y}),r.patchThread({id:s,metadata:y}),i.mutate(b)},e[17]=r,e[18]=i,e[19]=t.id,e[20]=l,e[21]=s,e[22]=d):d=e[22];const x=d;let g;return e[23]!==x||e[24]!==i.isPending||e[25]!==i.mutate?(g={addOrReplace:i.mutate,addOrReplaceEager:x,isPending:i.isPending},e[23]=x,e[24]=i.isPending,e[25]=i.mutate,e[26]=g):g=e[26],g}function Nn(s,e,t,l){const{data:r,isLoading:a}=Oe({queryKey:me.toolDefinitionLookup(e,t,s),queryFn:async()=>{if(!s||!e)return null;const o=await ks({connectionId:e,orgId:t,orgSlug:l});try{const{tools:u}=await o.listTools(),f=It(s);return u.find(c=>c.name===f)??null}finally{await o.close().catch(()=>{})}},enabled:!!s&&!!e,staleTime:6e4,gcTime:3e5,retry:!1});return{toolDef:r??void 0,isLoading:a}}const kn={read:{icon:Ze,label:"Read File"},write:{icon:Ls,label:"Write File"},edit:{icon:es,label:"Edit File"},grep:{icon:As,label:"Search Content"},glob:{icon:Rs,label:"Find Files"},bash:{icon:Zt,label:"Run Command"},read_tool_output:{icon:Ze,label:"Read Tool Output"},read_resource:{icon:Yt,label:"Read Resource"},read_prompt:{icon:jt,label:"Read Prompt"},enable_tool:{icon:Ms,label:"Enable Tool"},open_in_agent:{icon:Qt,label:"Open in Agent"},sandbox:{icon:Xt,label:"Run Code"},copy_to_sandbox:{icon:vt,label:"Load File"},share_with_user:{icon:zs,label:"Share with User"},take_screenshot:{icon:Ne,label:"Take Screenshot"},scrape_url:{icon:Ce,label:"Scrape URL"},inspect_page:{icon:Jt,label:"Inspect Page"}};function Ke(s,e="An unknown error occurred"){return"errorText"in s&&typeof s.errorText=="string"?s.errorText:e}function ye(s){if(s==null)return"";try{return JSON.stringify(s)}catch{return"[Non-serializable value]"}}const Sn=s=>s.type==="dynamic-tool"||s.type.startsWith("tool-");function _n(s){if(!s||typeof s!="object")return null;const e=s;if(!Array.isArray(e.parts))return null;const t=[];for(const l of e.parts)if(l.type==="text"&&typeof l.text=="string")t.push(l.text);else if(l.type==="reasoning")t.push(`## Reasoning
|
|
1
|
+
import{e as $,r as H,T as at,I as Ht,H as Bt,j as n,B as ke,W as Xe,c as V,t as Wt,q as he,G as Ut,a as qt,K as me,o as ze,n as Oe,f as je,E as Vt,C as Gt,bB as De}from"./index-BfzqpoYd.js";import{_ as Kt,F as Jt,z as Xt,ab as Qt,N as Yt,M as Zt,L as es,a7 as rt,ac as ts,ad as ss,A as it,ae as ie,af as ns,ag as ls,ah as os,b as as}from"./agent-icon-Lc1AgwlE.js";import{t as He}from"./Stars01-DcMeK1n0.js";import{a as ct,t as rs,b as we,d as is}from"./XCircle-CEKwTNMD.js";import{i as Be}from"./Check-CSixRgqh.js";import{i as Qe}from"./ChevronRight-CtziSifX.js";import{a as ut,s as cs}from"./Eye-DepFjUJE.js";import{a as de,c as Ye,t as us}from"./format-time-Cy7tTmZp.js";import{N as dt,R as ft,e as mt,C as ds,f as fs,g as ms,u as ps,i as xs,d as gs}from"./scroll-area-BYy84ztj.js";import{u as pt}from"./use-copy-BkzArvj8.js";import{T as pe,a as xe,b as ge}from"./tooltip-CC_mfaKY.js";import{M as xt,I as gt,F as hs}from"./file-type-icon-B2skJERp.js";import{c as bs}from"./content-blocks-o63cs2vh.js";import{g as ht,M as ys}from"./types-btWFnXlQ.js";import{f as $e,i as js,d as We,a as vs}from"./chat-context-BIie9ysT.js";import{S as Ns,u as Ue,c as ks,b as Ss}from"./use-mcp-client-Brxiewn2.js";import{n as _s,f as ws,o as Ts,q as Cs}from"./tab-id-CjkvF5Bz.js";import{i as bt}from"./AlertCircle-B-p2hhbf.js";import{s as Ce,t as yt}from"./Star01-q6EhXttt.js";import{s as $s}from"./XClose-DhQ5V0ST.js";import{n as jt}from"./ZapSquare-DSdwG_FE.js";import{n as vt,i as Is}from"./Globe01-BayTDYGC.js";import{b as Ms,i as Ls,a as Le}from"./Tool01-DXWYgeBe.js";import{i as Ze,a as Rs}from"./ZoomOut-CCPaeWry.js";import{i as Ne}from"./Monitor01-BNXW6pu5.js";import{i as As}from"./SearchMd-z6b-QOmX.js";import{i as zs}from"./Upload01-CcwGyBRP.js";import{u as Ps,c as Es}from"./shell-layout-D8qm1N5L.js";import{n as Nt}from"./LinkExternal01-B2YZgRTN.js";import{I as Ie}from"./integration-icon-B-zr5uGs.js";import{u as Fs}from"./use-virtual-mcp-DDTG_-f6.js";import{a as kt}from"./Users03-D5pU3_ql.js";import{a as ce}from"./Palette-siqkt4cQ.js";import{k as St}from"./use-navigate-to-agent-BRFls8tQ.js";import{a as Os}from"./use-connection-MP_sOdrQ.js";import{s as Ds}from"./Stars02-DJ4Y5TfK.js";import{g as Hs}from"./use-mcp-prompts-CKvrvNSD.js";import{c as Bs,b as Ws,d as Us,a as qs,D as Vs}from"./dialog-nXKceTRB.js";import{a as Gs,F as Ks,b as Js,c as Xs,d as Qs,f as Ys}from"./form-BM4RuTjX.js";import{I as Zs}from"./input-BGQcwAaL.js";import{S as en}from"./spinner-j70e5pPL.js";import{t as tn}from"./ChevronDown-BptXi8Ef.js";const sn={openrouter:s=>{const e=s?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function _t(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(sn)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function wt(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Tt(s,e){if(!e)return s;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,l=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:s.inputTokens+(e.inputTokens??0),outputTokens:s.outputTokens+(e.outputTokens??0),reasoningTokens:s.reasoningTokens+(e.reasoningTokens??0),totalTokens:s.totalTokens+(e.totalTokens??0),cost:s.cost+_t(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function ma(s){return s.reduce((e,t)=>Tt(e,t.metadata?.usage),wt())}function nn(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function qe(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Ve(s,e){if(!e)return s;const t=`${nn(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function ln(s,e){return Ve(s,e).replace(/[_-]/g," ").toLowerCase()}function on(s){const e={};for(const t of s.arguments??[])e[t.name]=t.required?Xe().min(1,"Required"):Xe();return at(e)}function an(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function rn(s){const e=$.c(66),{prompt:t,setPrompt:l,onSubmit:r,defaultValues:a}=s,o=H.useId();let u;if(e[0]!==t){const A=t?on(t):at({});u=Ht(A),e[0]=t,e[1]=u}else u=e[1];const c=u;let m;e[2]!==a||e[3]!==t?(m=t?an(t,a):{},e[2]=a,e[3]=t,e[4]=m):m=e[4];let p;e[5]!==c||e[6]!==m?(p={resolver:c,defaultValues:m,mode:"onChange"},e[5]=c,e[6]=m,e[7]=p):p=e[7];const i=Bt(p);let d;e[8]!==t?.arguments?(d=t?.arguments??[],e[8]=t?.arguments,e[9]=d):d=e[9];const x=d;let g;e[10]!==i||e[11]!==r||e[12]!==l?(g=async A=>{await r(A),l(null),i.reset()},e[10]=i,e[11]=r,e[12]=l,e[13]=g):g=e[13];const b=g;let h;e[14]!==i||e[15]!==l?(h=A=>{A||(i.reset(),l(null))},e[14]=i,e[15]=l,e[16]=h):h=e[16];const N=h;if(!t)return null;let j;e[17]!==t._meta||e[18]!==t.name||e[19]!==t.title?(j=t.title||ln(t.name,qe(t._meta)),e[17]=t._meta,e[18]=t.name,e[19]=t.title,e[20]=j):j=e[20];let k;e[21]!==j?(k=n.jsx(Bs,{children:n.jsx("span",{className:"capitalize",children:j})}),e[21]=j,e[22]=k):k=e[22];let y;e[23]!==t.description?(y=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[23]=t.description,e[24]=y):y=e[24];let v;e[25]!==y||e[26]!==k?(v=n.jsxs(Ws,{children:[k,y]}),e[25]=y,e[26]=k,e[27]=v):v=e[27];let S;e[28]!==i||e[29]!==b?(S=A=>{A.stopPropagation(),i.handleSubmit(b)(A)},e[28]=i,e[29]=b,e[30]=S):S=e[30];let _;if(e[31]!==x||e[32]!==i.control||e[33]!==i.formState.isSubmitting){let A;e[35]!==i.control||e[36]!==i.formState.isSubmitting?(A=P=>n.jsx(Ks,{control:i.control,name:P.name,render:O=>{const{field:W}=O;return n.jsxs(Js,{children:[n.jsxs(Xs,{className:"text-xs",children:[P.name,P.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),n.jsx(Qs,{children:n.jsx(Zs,{...W,value:W.value??"",required:P.required,placeholder:P.description??"",className:"h-9",disabled:i.formState.isSubmitting})}),n.jsx(Ys,{})]})}},P.name),e[35]=i.control,e[36]=i.formState.isSubmitting,e[37]=A):A=e[37],_=x.map(A),e[31]=x,e[32]=i.control,e[33]=i.formState.isSubmitting,e[34]=_}else _=e[34];let w;e[38]!==N?(w=()=>N(!1),e[38]=N,e[39]=w):w=e[39];let T;e[40]!==i.formState.isSubmitting||e[41]!==w?(T=n.jsx(ke,{type:"button",variant:"ghost",onClick:w,disabled:i.formState.isSubmitting,children:"Cancel"}),e[40]=i.formState.isSubmitting,e[41]=w,e[42]=T):T=e[42];let I;e[43]!==i.formState.isSubmitting?(I=i.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(en,{size:"xs"}),"Loading..."]}):"Use prompt",e[43]=i.formState.isSubmitting,e[44]=I):I=e[44];let M;e[45]!==i.formState.isSubmitting||e[46]!==o||e[47]!==I?(M=n.jsx(ke,{type:"submit",form:o,disabled:i.formState.isSubmitting,children:I}),e[45]=i.formState.isSubmitting,e[46]=o,e[47]=I,e[48]=M):M=e[48];let C;e[49]!==T||e[50]!==M?(C=n.jsxs(Us,{children:[T,M]}),e[49]=T,e[50]=M,e[51]=C):C=e[51];let L;e[52]!==o||e[53]!==S||e[54]!==_||e[55]!==C?(L=n.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:S,children:[_,C]}),e[52]=o,e[53]=S,e[54]=_,e[55]=C,e[56]=L):L=e[56];let R;e[57]!==i||e[58]!==L?(R=n.jsx(Gs,{...i,children:L}),e[57]=i,e[58]=L,e[59]=R):R=e[59];let F;e[60]!==v||e[61]!==R?(F=n.jsxs(qs,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[v,R]}),e[60]=v,e[61]=R,e[62]=F):F=e[62];let z;return e[63]!==N||e[64]!==F?(z=n.jsx(Vs,{open:!0,onOpenChange:N,children:F}),e[63]=N,e[64]=F,e[65]=z):z=e[65],z}function Ct(s){return s?s.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function re(s,e){return s==="output-error"||s==="output-denied"?"error":s==="approval-requested"?"approval":s==="input-streaming"||s==="input-available"||s==="output-available"&&e===!0?"loading":"idle"}function ve(s){if(s==null||typeof s!="object")return;const e=s;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return s}function cn(s){return s.storage.mention}function pa(s,e,t){s.chain().focus().insertContentAt(e,[$t(t),{type:"text",text:" "}]).run()}function $t(s){return{type:"mention",attrs:s}}function un(s){const e=$.c(19),{node:t,selected:l,view:r,editor:a,getPos:o}=s,{name:u,char:f,kind:c,id:m,args:p}=t.attrs,i=l&&r.editable,d=f==="@",x=r.editable&&f==="/"&&c!=="resource";let g;e[0]!==p||e[1]!==a||e[2]!==o||e[3]!==m||e[4]!==x||e[5]!==u?(g=_=>{if(!x)return;const T=cn(a)?.onEditChip;if(!T||typeof o!="function")return;const I=o();typeof I=="number"&&(_.preventDefault(),_.stopPropagation(),T({promptId:m,promptName:u,args:p??{},pos:I}))},e[0]=p,e[1]=a,e[2]=o,e[3]=m,e[4]=x,e[5]=u,e[6]=g):g=e[6];const b=g,h=x?"cursor-pointer":"cursor-default",N=d?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",j=i&&"outline-2 outline-blue-300 outline-offset-0",k=x&&"hover:brightness-95";let y;e[7]!==h||e[8]!==N||e[9]!==j||e[10]!==k?(y=V("px-1 py-1 rounded","inline-flex items-center gap-1",h,"select-none","text-xs font-light",N,j,k,"capitalize"),e[7]=h,e[8]=N,e[9]=j,e[10]=k,e[11]=y):y=e[11];let v;e[12]!==u?(v=u?Ct(u):"",e[12]=u,e[13]=v):v=e[13];let S;return e[14]!==f||e[15]!==b||e[16]!==y||e[17]!==v?(S=n.jsxs(mt,{onClick:b,className:y,children:[f,v]}),e[14]=f,e[15]=b,e[16]=y,e[17]=v,e[18]=S):S=e[18],S}const dn=dt.create({name:"mention",group:"inline",inline:!0,atom:!0,addStorage(){return{onEditChip:null}},addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},char:{default:"/",parseHTML:s=>s.getAttribute("data-char")||"/",renderHTML:s=>s.char?{"data-char":s.char}:{}},metadata:{default:null,parseHTML:s=>{try{return JSON.parse(s.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:s=>s.metadata?{"data-metadata":JSON.stringify(s.metadata)}:{}},kind:{default:null,parseHTML:s=>s.getAttribute("data-kind")||null,renderHTML:s=>s.kind?{"data-kind":s.kind}:{}},args:{default:null,parseHTML:s=>{try{return JSON.parse(s.getAttribute("data-args")||"null")}catch{return null}},renderHTML:s=>s.args?{"data-args":JSON.stringify(s.args)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"mention"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.char&&(t["data-char"]=s.attrs.char),s.attrs.metadata&&(t["data-metadata"]=JSON.stringify(s.attrs.metadata)),s.attrs.kind&&(t["data-kind"]=s.attrs.kind),s.attrs.args&&(t["data-args"]=JSON.stringify(s.attrs.args)),["span",{...e,...t}]},renderText({node:s}){const e=s.attrs.char??"@",t=s.attrs.name??"";return`${e}${t}`},addNodeView(){return ft(un)}}),fn=/^mcp__[a-zA-Z0-9_-]+__/;function It(s){return s.replace(fn,"")}function Ge(s){const e=$.c(17),{id:t,part:l,copyable:r,extraActions:a,alwaysShowActions:o}=s,u=r===void 0?!1:r,f=o===void 0?!1:o,{handleCopy:c}=pt(),[m,p]=H.useState(!1);let i;e[0]!==c||e[1]!==t||e[2]!==l.text?(i=async()=>{Wt("chat_message_copied",{message_id:t,chars:l.text.length}),await c(l.text),p(!0),setTimeout(()=>p(!1),2e3)},e[0]=c,e[1]=t,e[2]=l.text,e[3]=i):i=e[3];const d=i,x=u&&a,g=x||a;let b;e[4]!==t||e[5]!==l.text?(b=n.jsx(xt,{id:t,text:l.text}),e[4]=t,e[5]=l.text,e[6]=b):b=e[6];let h;e[7]!==f||e[8]!==a||e[9]!==d||e[10]!==m||e[11]!==g||e[12]!==x?(h=g&&n.jsxs("div",{className:V("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",f?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[a,x&&a&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),x&&n.jsx("button",{type:"button",onClick:d,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":"Copy message",children:m?n.jsx(Be,{className:"size-4"}):n.jsx(ut,{className:"size-4"})})]}),e[7]=f,e[8]=a,e[9]=d,e[10]=m,e[11]=g,e[12]=x,e[13]=h):h=e[13];let N;return e[14]!==b||e[15]!==h?(N=n.jsxs("div",{className:"group/part relative",children:[b,h]}),e[14]=b,e[15]=h,e[16]=N):N=e[16],N}function xa(s,e,t){s.chain().focus().insertContentAt(e,[mn(t),{type:"text",text:" "}]).run()}function mn(s){return{type:"file",attrs:s}}function pn(s){const e=$.c(17),{node:t,selected:l,view:r}=s,{name:a,mimeType:o,data:u}=t.attrs,f=l&&r.editable;let c;e[0]!==o?(c=o.startsWith("image/"),e[0]=o,e[1]=c):c=e[1];const m=c,p=f&&"outline-2 outline-blue-300 outline-offset-0";let i;e[2]!==p?(i=V("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",p),e[2]=p,e[3]=i):i=e[3];let d;e[4]!==a?(d=n.jsx(pe,{asChild:!0,children:n.jsx("span",{children:a})}),e[4]=a,e[5]=d):d=e[5];let x;e[6]!==u||e[7]!==m||e[8]!==o||e[9]!==a?(x=n.jsx(xe,{side:"top",className:"max-w-sm p-1.5",children:m?n.jsx("img",{src:`data:${o};base64,${u}`,alt:a,className:"max-w-full max-h-64 object-contain rounded"}):n.jsxs("div",{className:"text-xs",children:[n.jsx("div",{className:"font-medium",children:a}),n.jsx("div",{className:"text-muted-foreground mt-1",children:o})]})}),e[6]=u,e[7]=m,e[8]=o,e[9]=a,e[10]=x):x=e[10];let g;e[11]!==d||e[12]!==x?(g=n.jsxs(ge,{children:[d,x]}),e[11]=d,e[12]=x,e[13]=g):g=e[13];let b;return e[14]!==i||e[15]!==g?(b=n.jsx(mt,{className:i,children:g}),e[14]=i,e[15]=g,e[16]=b):b=e[16],b}const xn=dt.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},mimeType:{default:null,parseHTML:s=>s.getAttribute("data-mime-type")||null,renderHTML:s=>s.mimeType?{"data-mime-type":s.mimeType}:{}},size:{default:0,parseHTML:s=>{const e=s.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:s=>s.size?{"data-size":String(s.size)}:{}},data:{default:null,parseHTML:s=>s.getAttribute("data-data")||null,renderHTML:s=>s.data?{"data-data":s.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"file"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.mimeType&&(t["data-mime-type"]=s.attrs.mimeType),s.attrs.size&&(t["data-size"]=String(s.attrs.size)),s.attrs.data&&(t["data-data"]=s.attrs.data),["span",{...e,...t}]},renderText({node:s}){return`[${s.attrs.name??""}]`},addNodeView(){return ft(pn)}}),fe=16,Pe=2.5,Ee=(fe-Pe)/2,Re=2*Math.PI*Ee;function gn(s){const e=$.c(31),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:r,outputTokens:a,cost:o}=t;if(!l&&!r&&!a)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Kt,{size:12}),e[0]=u):u=e[0];let f;e[1]!==o||e[2]!==l?(f=o>0?`$${o.toFixed(4)}`:l.toLocaleString(),e[1]=o,e[2]=l,e[3]=f):f=e[3];let c;e[4]!==f?(c=n.jsx(pe,{asChild:!0,children:n.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[u,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:f})]})}),e[4]=f,e[5]=c):c=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("span",{className:"text-muted",children:"in"}),e[7]=p):p=e[7];let i;e[8]!==r?(i=r.toLocaleString(),e[8]=r,e[9]=i):i=e[9];let d;e[10]!==i?(d=n.jsx("span",{className:"text-right tabular-nums",children:i}),e[10]=i,e[11]=d):d=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"text-muted",children:"out"}),e[12]=x):x=e[12];const g=a-(t.reasoningTokens??0);let b;e[13]!==g?(b=g.toLocaleString(),e[13]=g,e[14]=b):b=e[14];let h;e[15]!==b?(h=n.jsx("span",{className:"text-right tabular-nums",children:b}),e[15]=b,e[16]=h):h=e[16];let N;e[17]!==r||e[18]!==t.cacheReadTokens||e[19]!==t.cacheWriteTokens?(N=(t.cacheReadTokens>0||t.cacheWriteTokens>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:r>0?`${(t.cacheReadTokens/r*100).toFixed(0)}%`:"0%"})]}),e[17]=r,e[18]=t.cacheReadTokens,e[19]=t.cacheWriteTokens,e[20]=N):N=e[20];let j;e[21]!==o?(j=o>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",o.toFixed(4)]})]}),e[21]=o,e[22]=j):j=e[22];let k;e[23]!==h||e[24]!==N||e[25]!==j||e[26]!==d?(k=n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[m,n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[p,d,x,h,N,j]})]}),e[23]=h,e[24]=N,e[25]=j,e[26]=d,e[27]=k):k=e[27];let y;return e[28]!==k||e[29]!==c?(y=n.jsxs(ge,{children:[c,k]}),e[28]=k,e[29]=c,e[30]=y):y=e[30],y}function hn(s){const e=$.c(19),{usage:t,duration:l}=s,r=l!=null&&l>0,a=t!=null&&(t.cost??0)>0,o=t!=null&&(t.totalTokens??0)>0;if(!r&&!a&&!o)return null;let u;e[0]!==l||e[1]!==r?(u=r?de(l/1e3):null,e[0]=l,e[1]=r,e[2]=u):u=e[2];const f=u;let c;e[3]!==l||e[4]!==f||e[5]!==t?(c=f&&n.jsxs(ge,{children:[n.jsx(pe,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:f})}),n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),n.jsx("span",{className:"tabular-nums",children:de(l/1e3)}),(t?.reasoningTokens??0)>0&&n.jsxs("span",{className:"ml-2 opacity-50",children:[t.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=l,e[4]=f,e[5]=t,e[6]=c):c=e[6];let m;e[7]!==a||e[8]!==r||e[9]!==o?(m=r&&(a||o)&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=a,e[8]=r,e[9]=o,e[10]=m):m=e[10];let p;e[11]!==a||e[12]!==o||e[13]!==t?(p=(a||o)&&n.jsxs(ge,{children:[n.jsx(pe,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:a?`$${t.cost.toFixed(4)}`:`${t.totalTokens.toLocaleString()} tok`})}),n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[n.jsx("span",{className:"opacity-60",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:(t.inputTokens??0).toLocaleString()}),n.jsx("span",{className:"opacity-60",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:((t.outputTokens??0)-(t?.reasoningTokens??0)).toLocaleString()}),(t?.reasoningTokens??0)>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"think"}),n.jsx("span",{className:"text-right tabular-nums",children:t.reasoningTokens.toLocaleString()})]}),((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:(t?.inputTokens??0)>0?`${((t?.cacheReadTokens??0)/t.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=a,e[12]=o,e[13]=t,e[14]=p):p=e[14];let i;return e[15]!==c||e[16]!==m||e[17]!==p?(i=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[c,m,p]}),e[15]=c,e[16]=m,e[17]=p,e[18]=i):i=e[18],i}function ga(s){const e=$.c(51),{usage:t,totalTokens:l,contextWindow:r,onOpenContextPanel:a}=s,o=Math.min(l/r*100,100),u=Re-o/100*Re,f=t?.cost??0,c=t?.inputTokens??0,m=t?.outputTokens??0;let p;e[0]!==o?(p=o.toFixed(0),e[0]=o,e[1]=p):p=e[1];let i;e[2]!==f?(i=f>0?`, $${f.toFixed(2)}`:"",e[2]=f,e[3]=i):i=e[3];const d=`Context usage: ${p}%${i}`,x=a?"cursor-pointer":"cursor-default";let g;e[4]!==x?(g=V("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",x),e[4]=x,e[5]=g):g=e[5];let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("circle",{cx:fe/2,cy:fe/2,r:Ee,fill:"none",stroke:"currentColor",strokeWidth:Pe,className:"opacity-15"}),e[6]=b):b=e[6];const h=o>90?"text-destructive":o>70?"text-warning":"text-muted-foreground";let N;e[7]!==h?(N=V(h),e[7]=h,e[8]=N):N=e[8];let j;e[9]!==u||e[10]!==N?(j=n.jsxs("svg",{width:fe,height:fe,className:"-rotate-90",children:[b,n.jsx("circle",{cx:fe/2,cy:fe/2,r:Ee,fill:"none",stroke:"currentColor",strokeWidth:Pe,strokeDasharray:Re,strokeDashoffset:u,strokeLinecap:"round",className:N})]}),e[9]=u,e[10]=N,e[11]=j):j=e[11];let k;e[12]!==o?(k=o.toFixed(0),e[12]=o,e[13]=k):k=e[13];let y;e[14]!==f?(y=f>0?` · $${f.toFixed(2)}`:"",e[14]=f,e[15]=y):y=e[15];let v;e[16]!==k||e[17]!==y?(v=n.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[k,"%",y]}),e[16]=k,e[17]=y,e[18]=v):v=e[18];let S;e[19]!==a||e[20]!==v||e[21]!==d||e[22]!==g||e[23]!==j?(S=n.jsx(pe,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:a,"aria-label":d,className:g,children:[j,v]})}),e[19]=a,e[20]=v,e[21]=d,e[22]=g,e[23]=j,e[24]=S):S=e[24];let _;e[25]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("span",{className:"text-muted",children:"context"}),e[25]=_):_=e[25];let w;e[26]!==l?(w=l.toLocaleString(),e[26]=l,e[27]=w):w=e[27];let T;e[28]!==r?(T=r.toLocaleString(),e[28]=r,e[29]=T):T=e[29];let I;e[30]!==o?(I=o.toFixed(1),e[30]=o,e[31]=I):I=e[31];let M;e[32]!==w||e[33]!==T||e[34]!==I?(M=n.jsxs("span",{className:"text-right tabular-nums",children:[w," / ",T," (",I,"%)"]}),e[32]=w,e[33]=T,e[34]=I,e[35]=M):M=e[35];let C;e[36]!==f||e[37]!==c||e[38]!==m?(C=f>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",f.toFixed(4)]}),n.jsx("span",{className:"text-muted",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:c.toLocaleString()}),n.jsx("span",{className:"text-muted",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:m.toLocaleString()})]}),e[36]=f,e[37]=c,e[38]=m,e[39]=C):C=e[39];let L;e[40]!==c||e[41]!==t?.cacheReadTokens||e[42]!==t?.cacheWriteTokens?(L=((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:c>0?`${((t?.cacheReadTokens??0)/c*100).toFixed(0)}%`:"0%"})]}),e[40]=c,e[41]=t?.cacheReadTokens,e[42]=t?.cacheWriteTokens,e[43]=L):L=e[43];let R;e[44]!==M||e[45]!==C||e[46]!==L?(R=n.jsx(xe,{side:"top",className:"font-mono text-[11px]",children:n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[_,M,C,L]})}),e[44]=M,e[45]=C,e[46]=L,e[47]=R):R=e[47];let F;return e[48]!==S||e[49]!==R?(F=n.jsxs(ge,{children:[S,R]}),e[48]=S,e[49]=R,e[50]=F):F=e[50],F}function bn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(ms,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function yn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(ds,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function jn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(fs,{"data-slot":"collapsible-content",...t}),e[2]=t,e[3]=l):l=e[3],l}function Mt({containerRef:s,enabled:e,contentDeps:t=[],threshold:l,intervalMs:r=500}){const[a,o]=H.useState(null),[u,f]=H.useState(!1),c=l??(s?.95:.1),m=()=>{if(s?.current){s.current.scrollTop=s.current.scrollHeight;return}if(!a)return;let p=a.parentElement;for(;p;){const i=window.getComputedStyle(p);if(i.overflowY==="auto"||i.overflowY==="scroll"||i.overflow==="auto"||i.overflow==="scroll"){p.scrollTop=p.scrollHeight;return}p=p.parentElement}};return H.useEffect(()=>{if(!a)return;const p=new IntersectionObserver(i=>{const d=i[0]?.isIntersecting??!1;f(d)},{root:s?.current??null,threshold:c,rootMargin:"0px"});return p.observe(a),()=>p.disconnect()},[a,c]),H.useEffect(()=>{if(!e||!u)return;const p=setInterval(m,r);return()=>clearInterval(p)},[e,u,r]),H.useEffect(()=>{!e||!u||m()},[e,u,...t]),{sentinelRef:o,isTracking:u}}function D(s){const e=$.c(53),{icon:t,title:l,usage:r,summary:a,state:o,detail:u,detailVariant:f,forceOpen:c,variant:m,trailing:p,iconDestructive:i,alwaysChevron:d,defaultOpen:x,children:g}=s,b=f===void 0?"code":f,h=m===void 0?"default":m,[N,j]=H.useState(x??!1),{handleCopy:k,copied:y}=pt(),v=o==="loading",S=o==="error";let _;e[0]!==u?(_=u&&u.trim(),e[0]=u,e[1]=_):_=e[1];const T=!!_||!!g,I=h==="subtask",M=(c??!1)||N,C=H.useRef(null),L=v&&M;let R;e[2]!==u?(R=[u],e[2]=u,e[3]=R):R=e[3];let F;e[4]!==L||e[5]!==R?(F={containerRef:C,enabled:L,contentDeps:R},e[4]=L,e[5]=R,e[6]=F):F=e[6];const{sentinelRef:z}=Mt(F),A=c?void 0:j,P=!T,O=T&&"[@media(hover:hover)]:hover:bg-accent/30",W=!T&&"cursor-default",U=v&&"shimmer";let B;e[7]!==W||e[8]!==U||e[9]!==O?(B=V("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",O,W,U),e[7]=W,e[8]=U,e[9]=O,e[10]=B):B=e[10];const Y=!T;let K;e[11]!==d||e[12]!==M||e[13]!==t||e[14]!==i||e[15]!==S||e[16]!==T?(K=n.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?n.jsx(Qe,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",M&&"rotate-90")}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:V("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",i?"[&>svg]:text-destructive/70":S?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",T&&(M?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:t}),T&&n.jsx("div",{className:V("absolute inset-0 flex items-center justify-center transition-opacity duration-150",M?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:n.jsx(Qe,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",M&&"rotate-90")})})]})}),e[11]=d,e[12]=M,e[13]=t,e[14]=i,e[15]=S,e[16]=T,e[17]=K):K=e[17];const Q=S?"text-warning/80":"text-foreground";let X;e[18]!==Q?(X=V("shrink-0 text-[14px] font-normal",Q),e[18]=Q,e[19]=X):X=e[19];let Z;e[20]!==X||e[21]!==l?(Z=n.jsx("span",{className:X,children:l}),e[20]=X,e[21]=l,e[22]=Z):Z=e[22];let E;e[23]!==a?(E=a?n.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:a})}):n.jsx("div",{className:"flex-1"}),e[23]=a,e[24]=E):E=e[24];let q;e[25]!==p?(q=p&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:p}),e[25]=p,e[26]=q):q=e[26];let G;e[27]!==r?(G=n.jsx(gn,{usage:r}),e[27]=r,e[28]=G):G=e[28];let J;e[29]!==B||e[30]!==Y||e[31]!==K||e[32]!==Z||e[33]!==E||e[34]!==q||e[35]!==G||e[36]!==P?(J=n.jsxs(yn,{disabled:P,className:B,"aria-disabled":Y,children:[K,Z,E,q,G]}),e[29]=B,e[30]=Y,e[31]=K,e[32]=Z,e[33]=E,e[34]=q,e[35]=G,e[36]=P,e[37]=J):J=e[37];let ee;e[38]!==g||e[39]!==y||e[40]!==u||e[41]!==b||e[42]!==k||e[43]!==T||e[44]!==z?(ee=T&&n.jsx(jn,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:g||(b==="prose"?n.jsx("div",{className:"mt-1 mb-1",children:n.jsxs("div",{ref:C,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:[n.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:u}),n.jsx("div",{ref:z,className:"h-0 shrink-0"})]})}):n.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:n.jsxs("div",{ref:C,className:"flex flex-col max-h-48 overflow-y-auto",children:[n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:u})}),n.jsx("button",{type:"button",onClick:()=>k(u),className:"shrink-0 p-1.5 rounded-md 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":"Copy",children:y?n.jsx(Be,{className:"size-3.5"}):n.jsx(ut,{className:"size-3.5"})})]}),n.jsx("div",{ref:z,className:"h-0 shrink-0"})]})}))}),e[38]=g,e[39]=y,e[40]=u,e[41]=b,e[42]=k,e[43]=T,e[44]=z,e[45]=ee):ee=e[45];let ue;e[46]!==M||e[47]!==J||e[48]!==ee||e[49]!==A?(ue=n.jsxs(bn,{open:M,onOpenChange:A,className:"min-w-0",children:[J,ee]}),e[46]=M,e[47]=J,e[48]=ee,e[49]=A,e[50]=ue):ue=e[50];const le=ue;if(I){let oe;return e[51]!==le?(oe=n.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:le}),e[51]=le,e[52]=oe):oe=e[52],oe}return le}function te(s){const e=$.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=de(t),e[0]=t,e[1]=l):l=e[1];let r;return e[2]!==l?(r=n.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=r):r=e[3],r}const Lt=4;function Rt(s){const e=$.c(5),{count:t,noun:l,onClick:r}=s;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ct,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[0]=a):a=e[0];let o;return e[1]!==t||e[2]!==l||e[3]!==r?(o=n.jsxs("button",{type:"button",onClick:r,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:["See all ",t," ",l,a]}),e[1]=t,e[2]=l,e[3]=r,e[4]=o):o=e[4],o}function vn(s){const e=$.c(27),{org:t}=he(),l=Ut(),r=_s();let a;e[0]!==t.id||e[1]!==t.slug?(a={connectionId:Ns,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=a):a=e[2];const o=Ue(a);let u;e[3]!==o||e[4]!==s?(u=async b=>{if(!s)throw new Error("useTaskExpandedTools: no task in context");const h=await o.callTool({name:"COLLECTION_THREADS_GET",arguments:{id:s}}),j=(h.structuredContent??h).item?.metadata??{},y=(j.expanded_tools??[]).filter(S=>S.toolName!==b.toolName);y.push({...b,expandedAt:new Date().toISOString()});const v={...j,expanded_tools:y};return await o.callTool({name:"COLLECTION_THREADS_UPDATE",arguments:{id:s,data:{metadata:v}}}),y},e[3]=o,e[4]=s,e[5]=u):u=e[5];let f,c,m;e[6]!==t.id||e[7]!==l||e[8]!==s?(f=async b=>{const h=me.ensureTask(t.id,s??"");await l.cancelQueries({queryKey:h});const N=l.getQueryData(h),k=(N?.metadata?.expanded_tools??[]).filter(y=>y.toolName!==b.toolName);return k.push({...b,expandedAt:new Date().toISOString()}),l.setQueryData(h,y=>y&&{...y,metadata:{...y.metadata??{},expanded_tools:k}}),{previous:N}},c=()=>{l.invalidateQueries({queryKey:me.ensureTask(t.id,s??"")})},m=(b,h,N)=>{const j=me.ensureTask(t.id,s??"");N?.previous===void 0?l.removeQueries({queryKey:j,exact:!0}):l.setQueryData(j,N.previous),ze.error(b instanceof Error?b.message:"Failed to expand tool")},e[6]=t.id,e[7]=l,e[8]=s,e[9]=f,e[10]=c,e[11]=m):(f=e[9],c=e[10],m=e[11]);let p;e[12]!==u||e[13]!==f||e[14]!==c||e[15]!==m?(p={mutationFn:u,onMutate:f,onSuccess:c,onError:m},e[12]=u,e[13]=f,e[14]=c,e[15]=m,e[16]=p):p=e[16];const i=qt(p);let d;e[17]!==r||e[18]!==i||e[19]!==t.id||e[20]!==l||e[21]!==s?(d=b=>{if(!s||!r)return;const h=me.ensureTask(t.id,s),N=l.getQueryData(h),k=(N?.metadata?.expanded_tools??[]).filter(v=>v.toolName!==b.toolName);k.push({...b,expandedAt:new Date().toISOString()});const y={...N?.metadata??{},expanded_tools:k};l.setQueryData(h,v=>v&&{...v,metadata:y}),r.patchThread({id:s,metadata:y}),i.mutate(b)},e[17]=r,e[18]=i,e[19]=t.id,e[20]=l,e[21]=s,e[22]=d):d=e[22];const x=d;let g;return e[23]!==x||e[24]!==i.isPending||e[25]!==i.mutate?(g={addOrReplace:i.mutate,addOrReplaceEager:x,isPending:i.isPending},e[23]=x,e[24]=i.isPending,e[25]=i.mutate,e[26]=g):g=e[26],g}function Nn(s,e,t,l){const{data:r,isLoading:a}=Oe({queryKey:me.toolDefinitionLookup(e,t,s),queryFn:async()=>{if(!s||!e)return null;const o=await ks({connectionId:e,orgId:t,orgSlug:l});try{const{tools:u}=await o.listTools(),f=It(s);return u.find(c=>c.name===f)??null}finally{await o.close().catch(()=>{})}},enabled:!!s&&!!e,staleTime:6e4,gcTime:3e5,retry:!1});return{toolDef:r??void 0,isLoading:a}}const kn={read:{icon:Ze,label:"Read File"},write:{icon:Ls,label:"Write File"},edit:{icon:es,label:"Edit File"},grep:{icon:As,label:"Search Content"},glob:{icon:Rs,label:"Find Files"},bash:{icon:Zt,label:"Run Command"},read_tool_output:{icon:Ze,label:"Read Tool Output"},read_resource:{icon:Yt,label:"Read Resource"},read_prompt:{icon:jt,label:"Read Prompt"},enable_tool:{icon:Ms,label:"Enable Tool"},open_in_agent:{icon:Qt,label:"Open in Agent"},sandbox:{icon:Xt,label:"Run Code"},copy_to_sandbox:{icon:vt,label:"Load File"},share_with_user:{icon:zs,label:"Share with User"},take_screenshot:{icon:Ne,label:"Take Screenshot"},scrape_url:{icon:Ce,label:"Scrape URL"},inspect_page:{icon:Jt,label:"Inspect Page"}};function Ke(s,e="An unknown error occurred"){return"errorText"in s&&typeof s.errorText=="string"?s.errorText:e}function ye(s){if(s==null)return"";try{return JSON.stringify(s)}catch{return"[Non-serializable value]"}}const Sn=s=>s.type==="dynamic-tool"||s.type.startsWith("tool-");function _n(s){if(!s||typeof s!="object")return null;const e=s;if(!Array.isArray(e.parts))return null;const t=[];for(const l of e.parts)if(l.type==="text"&&typeof l.text=="string")t.push(l.text);else if(l.type==="reasoning")t.push(`## Reasoning
|
|
2
2
|
${l.text}`);else if(l.type==="source-url")t.push(`## Source URL
|
|
3
3
|
${l.url}`);else if(l.type==="source-document")t.push(`## Source Document
|
|
4
4
|
${l.title}`);else if(l.type==="file")t.push(`## File
|
package/dist/client/assets/{plugin-empty-state-m3Z19NWv.js → plugin-empty-state-FQw8SLzO.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as o,j as t,dx as n}from"./index-
|
|
1
|
+
import{e as o,j as t,dx as n}from"./index-BfzqpoYd.js";function a(){const s=o.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),s[0]=e):e=s[0],e}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as S,j as s,r as w,dx as y}from"./index-
|
|
1
|
+
import{e as S,j as s,r as w,dx as y}from"./index-BfzqpoYd.js";import{i as R}from"./Check-CSixRgqh.js";import{t as _}from"./ChevronDown-BptXi8Ef.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function $(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{$ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as B,e as D,j as s,q as X,f as Z,g as ee,d as te,b as ne,K as se,n as ie,O as le,l as oe,B as re}from"./index-BfzqpoYd.js";import{u as ae}from"./use-connection-MP_sOdrQ.js";import{S as ce,u as ue,j as de}from"./use-mcp-client-Brxiewn2.js";import{a as me}from"./Settings02-C7YqxsZL.js";import{P as z}from"./index-CVPVNlMM.js";const ge=B.createContext(null);function F(i){const e=D.c(3),{value:h,children:m}=i,t=h;let l;return e[0]!==m||e[1]!==t?(l=s.jsx(ge.Provider,{value:t,children:m}),e[0]=m,e[1]=t,e[2]=l):l=e[2],l}B.createContext(null);function fe(i){return{id:i.id,title:i.title,icon:i.icon,description:i.description,app_name:i.app_name,app_id:i.app_id,tools:i.tools,metadata:i.metadata}}function _e(i){const e=D.c(60),{bindingName:h,renderEmptyState:m}=i,{org:t,project:l}=X(),T=Z();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={strict:!1},e[0]=j):j=e[0];const{org:k,taskId:w,pluginId:g}=ee(j);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I={strict:!1},e[1]=I):I=e[1];const G=te(I).virtualmcpid;let P;e[2]!==h?(P={binding:h},e[2]=h,e[3]=P):P=e[3];const K=ae(P),{data:f}=ne.useSession();let _;e[4]!==t.id||e[5]!==t.slug?(_={connectionId:ce,orgId:t.id,orgSlug:t.slug},e[4]=t.id,e[5]=t.slug,e[6]=_):_=e[6];const O=ue(_);let x;e[7]!==g||e[8]!==l.id?(x=se.projectPluginConfig(l.id??"",g),e[7]=g,e[8]=l.id,e[9]=x):x=e[9];let p;e[10]!==g||e[11]!==l.id||e[12]!==O?(p=async()=>{const n=await O.callTool({name:"VIRTUAL_MCP_PLUGIN_CONFIG_GET",arguments:{virtualMcpId:l.id,pluginId:g}});return n.structuredContent??n},e[10]=g,e[11]=l.id,e[12]=O,e[13]=p):p=e[13];const q=!!l.id&&!!g;let v;e[14]!==x||e[15]!==p||e[16]!==q?(v={queryKey:x,queryFn:p,enabled:q},e[14]=x,e[15]=p,e[16]=q,e[17]=v):v=e[17];const{data:V,isLoading:Q}=ie(v),R=V?.config?.connectionId,C=R?K.find(n=>n.id===R):null,y=de({connectionId:C?.id,orgId:t.id,orgSlug:t.slug});let S;e[18]!==f?(S=f?.user?{user:{id:f.user.id,name:f.user.name,email:f.user.email,image:f.user.image}}:null,e[18]=f,e[19]=S):S=e[19];const a=S;let b;e[20]!==t.id||e[21]!==t.name||e[22]!==t.slug?(b={id:t.id,slug:t.slug,name:t.name},e[20]=t.id,e[21]=t.name,e[22]=t.slug,e[23]=b):b=e[23];const c=b;if(Q){let n;return e[24]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(oe,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[24]=n):n=e[24],n}if(K.length===0){let n;e[25]!==c||e[26]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[25]=c,e[26]=a,e[27]=n):n=e[27];const u=n;let r;e[28]!==m?(r=m(),e[28]=m,e[29]=r):r=e[29];let o;e[30]!==r?(o=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r}),e[30]=r,e[31]=o):o=e[31];let d;return e[32]!==u||e[33]!==o?(d=s.jsx(F,{value:u,children:o}),e[32]=u,e[33]=o,e[34]=d):d=e[34],d}if(!C){let n;e[35]!==c||e[36]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[35]=c,e[36]=a,e[37]=n):n=e[37];const u=n;let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(me,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[38]=r):r=e[38];let o;e[39]!==T||e[40]!==t.slug||e[41]!==k||e[42]!==l.id||e[43]!==w||e[44]!==G?(o=s.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[r,s.jsx(re,{onClick:()=>{const H=k??t.slug,J=G??l.id??"",W=w??crypto.randomUUID();T({to:"/$org/$taskId",params:{org:H,taskId:W},search:{virtualmcpid:J,main:"settings"}})},children:"Go to Project Settings"})]}),e[39]=T,e[40]=t.slug,e[41]=k,e[42]=l.id,e[43]=w,e[44]=G,e[45]=o):o=e[45];let d;return e[46]!==u||e[47]!==o?(d=s.jsx(F,{value:u,children:o}),e[46]=u,e[47]=o,e[48]=d):d=e[48],d}const Y=C.id,U=fe(C);let N;e[49]!==y?(N=(n,u)=>y?y.callTool({name:n,arguments:u}).then(xe):Promise.reject(new Error("MCP client is not available")),e[49]=y,e[50]=N):N=e[50];const $=N;let E;e[51]!==C||e[52]!==c||e[53]!==a||e[54]!==U||e[55]!==$?(E={connectionId:Y,connection:U,toolCaller:$,org:c,session:a},e[51]=C,e[52]=c,e[53]=a,e[54]=U,e[55]=$,e[56]=E):E=e[56];const A=E;let L;e[57]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(z,{children:s.jsx(z.Content,{children:s.jsx(le,{})})}),e[57]=L):L=e[57];let M;return e[58]!==A?(M=s.jsx(F,{value:A,children:L}),e[58]=A,e[59]=M):M=e[59],M}function xe(i){return i.structuredContent??i}export{_e as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,bh as $,j as c,dj as L,bi as z,bx as A,a7 as _,a8 as g,dk as b,bk as j,dl as G,dm as w,ds as H,dt as K,ag as U,du as V,dv as W,dw as Z,dn as q,dp as B,dr as J,e as R,c as Q}from"./index-
|
|
1
|
+
import{r as i,bh as $,j as c,dj as L,bi as z,bx as A,a7 as _,a8 as g,dk as b,bk as j,dl as G,dm as w,ds as H,dt as K,ag as U,du as V,dv as W,dw as Z,dn as q,dp as B,dr as J,e as R,c as Q}from"./index-BfzqpoYd.js";var m="Popover",[E]=U(m,[w]),P=w(),[X,u]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(C=>!C),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(b,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(b,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=E(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};k.displayName=O;var v="PopoverContent",D=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});D.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(M,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(M,{...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()}})}),M=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),C=P(o);return W(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...C,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(T,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=k,de=D;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
|