decocms 4.609.0 → 4.609.2
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-DgsOeALC.js → AlertCircle-Dt3GY0Bh.js} +1 -1
- package/dist/client/assets/{AreaChart-D_4jMbl4.js → AreaChart-C-iaogOR.js} +1 -1
- package/dist/client/assets/{ArrowLeft-ee9FD9EY.js → ArrowLeft-YUwyiwVw.js} +1 -1
- package/dist/client/assets/{ArrowRight-B4dtiIJD.js → ArrowRight-DenptpQc.js} +1 -1
- package/dist/client/assets/{ArrowUp-BIhe7Lhg.js → ArrowUp-CPULRpjx.js} +1 -1
- package/dist/client/assets/{BookOpen01-B__Mouay.js → BookOpen01-CxcJv7PA.js} +1 -1
- package/dist/client/assets/{CartesianChart-C_p0t44A.js → CartesianChart-DKQJ8ZHe.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CYGAPQwB.js → CategoricalChart-BITTkM6Z.js} +1 -1
- package/dist/client/assets/{CheckCircle-vFrDqZ4B.js → CheckCircle-7BnmcHqO.js} +1 -1
- package/dist/client/assets/{ChevronDown-HLxb8bS_.js → ChevronDown-D8DhHnMq.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-D_H0hZtd.js → ChevronSelectorVertical-D-BmJmT0.js} +1 -1
- package/dist/client/assets/{ChevronUp-L_lW7nwa.js → ChevronUp-DXnUGc0S.js} +1 -1
- package/dist/client/assets/{CreditCard01-D73oF3Mm.js → CreditCard01-BcT6bkOS.js} +1 -1
- package/dist/client/assets/{Eye-qHvXZckP.js → Eye-DtSBHO9f.js} +1 -1
- package/dist/client/assets/{File02-Dqb2iBoe.js → File02-CFZGfPVy.js} +1 -1
- package/dist/client/assets/{Fingerprint04-9msUtpR-.js → Fingerprint04-De4VufgL.js} +1 -1
- package/dist/client/assets/{Globe04-CkvC5czE.js → Globe04-DnTwfyGh.js} +1 -1
- package/dist/client/assets/{Image01-ChQ0r1W_.js → Image01-sXwH8-FK.js} +1 -1
- package/dist/client/assets/{Key01-DYK8BFv1.js → Key01-0BhoHNxq.js} +1 -1
- package/dist/client/assets/{LayoutLeft-7L-RzzTx.js → LayoutLeft-DhcW8L2l.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CbQ_msZQ.js → LinkBroken01-nJS8cN1w.js} +1 -1
- package/dist/client/assets/{MessageCircle01-B-ZSTXJs.js → MessageCircle01-DrWlC4OP.js} +1 -1
- package/dist/client/assets/{Minus-Bc7-o6jy.js → Minus-BnUrCu3K.js} +1 -1
- package/dist/client/assets/{Monitor01-Ddme45JH.js → Monitor01-CMAhieTY.js} +1 -1
- package/dist/client/assets/{Play-B4KVGqgs.js → Play-DGe00qZP.js} +1 -1
- package/dist/client/assets/{Plus-C1KkV9dn.js → Plus-BXH7i2b3.js} +1 -1
- package/dist/client/assets/{ReferenceLine-CuuR7S1w.js → ReferenceLine-Ch0qfjOg.js} +1 -1
- package/dist/client/assets/{SearchMd-B1LXZuWH.js → SearchMd-DgVjcl_1.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BdQC0ZUe.js → ShoppingBag01-Blomur-w.js} +1 -1
- package/dist/client/assets/{Sun-CmZ8bSeW.js → Sun-BsEDX0xb.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-8q3M45Gy.js → SwitchHorizontal01-z6tySRlC.js} +1 -1
- package/dist/client/assets/{Tool01-BXWKt8NX.js → Tool01-DOdYsq79.js} +1 -1
- package/dist/client/assets/{Tooltip-DoKCDtd8.js → Tooltip-BlmkPtAg.js} +1 -1
- package/dist/client/assets/{Trash01-BnkfN2k5.js → Trash01-C6DjwKcE.js} +1 -1
- package/dist/client/assets/{Upload01-CwKCC6d5.js → Upload01-BswyIwDw.js} +1 -1
- package/dist/client/assets/{UserCheck01-yDImsmrP.js → UserCheck01-DYJoLz9O.js} +1 -1
- package/dist/client/assets/{UserSquare-4oxgMoPf.js → UserSquare-B8TnRXAA.js} +1 -1
- package/dist/client/assets/{Users01-wCJ8kCIe.js → Users01-2WULI_RK.js} +1 -1
- package/dist/client/assets/{XClose-C7uUuAz2.js → XClose-kwcMavwj.js} +1 -1
- package/dist/client/assets/{Zap-Dcq6Ux-0.js → Zap-CAQ2824E.js} +1 -1
- package/dist/client/assets/{access-gate-DJZvxHOy.js → access-gate-D3VbJ5hb.js} +1 -1
- package/dist/client/assets/{add-connection-dialog--VmAC1xi.js → add-connection-dialog-yj7w7MEx.js} +1 -1
- package/dist/client/assets/agent-app-BLWgH57_.js +1 -0
- package/dist/client/assets/{agent-assets-C5m7Swv2.js → agent-assets-ZMeuuOY2.js} +1 -1
- package/dist/client/assets/agent-automation-DJ00NooN.js +20 -0
- package/dist/client/assets/{agent-automations-CUZ0lahk.js → agent-automations-Iq079Jmy.js} +1 -1
- package/dist/client/assets/agent-blog-CBo8Ngz6.js +2 -0
- package/dist/client/assets/agent-blog-post-CluN0LI_.js +2 -0
- package/dist/client/assets/agent-business-case-Ckxk5XzB.js +1 -0
- package/dist/client/assets/{agent-calendar-DCMZK0j2.js → agent-calendar-D2WF756G.js} +1 -1
- package/dist/client/assets/{agent-capabilities-2zrP_oST.js → agent-capabilities-DDJdPYLQ.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-84zH0vwS.js → agent-connect-sources-DfPdgSxy.js} +1 -1
- package/dist/client/assets/agent-deck-CW1yW8Vm.js +1 -0
- package/dist/client/assets/{agent-e2e-aQ_nLlS-.js → agent-e2e-4dV5u5EF.js} +1 -1
- package/dist/client/assets/agent-experiments-BWVQ9ZHh.js +1 -0
- package/dist/client/assets/agent-file-D-TRmaf6.js +1 -0
- package/dist/client/assets/{agent-hosting-CViOnhAa.js → agent-hosting-Cj4zPjoX.js} +1 -1
- package/dist/client/assets/{agent-icon-pvTjuJ6E.js → agent-icon-CH_f-N3x.js} +1 -1
- package/dist/client/assets/agent-library-DMIwgJWF.js +1 -0
- package/dist/client/assets/agent-library-file-CIrPVVPN.js +1 -0
- package/dist/client/assets/agent-overview-BAvllSSA.js +1 -0
- package/dist/client/assets/{agent-releases-D7GRVEkc.js → agent-releases-Bdvkby_i.js} +2 -2
- package/dist/client/assets/agent-settings-ClWfKZHb.js +1 -0
- package/dist/client/assets/{agent-site-editor-DKQpBiJD.js → agent-site-editor-DAwI7Kyr.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DCquxkpu.js +2 -0
- package/dist/client/assets/agent-site-editor-content-id2Bex58.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-BVLtK2Fr.js +1 -0
- package/dist/client/assets/agent-view-Ya3GHsqL.js +1 -0
- package/dist/client/assets/{agent-view-guard-FCDcxTY1.js → agent-view-guard-C935KHIb.js} +1 -1
- package/dist/client/assets/{ai-providers-_OzKFD2D.js → ai-providers-CqYI8qa5.js} +1 -1
- package/dist/client/assets/{alert-DT2Q_-E6.js → alert-DWWFKk-5.js} +1 -1
- package/dist/client/assets/{analytics-sections-DJl0OiuO.js → analytics-sections-D44Na4Nk.js} +1 -1
- package/dist/client/assets/api-keys-BJ2V0tem.js +1 -0
- package/dist/client/assets/{api-keys-BSTgDZzj.js → api-keys-CCVw99SU.js} +1 -1
- package/dist/client/assets/{app-editor-AgEiTs2_.js → app-editor-BhmqaaCu.js} +1 -1
- package/dist/client/assets/{asset-utils-BLyT1xNx.js → asset-utils-C3Wi1LwR.js} +1 -1
- package/dist/client/assets/{auth-Bw2tXN0z.js → auth-YQD6gAdb.js} +1 -1
- package/dist/client/assets/{auth-catchall-Bj2Dlg2C.js → auth-catchall-Dmtg29Qo.js} +1 -1
- package/dist/client/assets/{auth-entry-D409QQ5L.js → auth-entry-DsDcbFDM.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DuptqPjI.js → auth-split-layout-Cbbrw4Ki.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B9xNOiAT.js → authenticate-and-persist-oauth-DmyJjsW7.js} +1 -1
- package/dist/client/assets/{automation-list-row-BbSpR6Rl.js → automation-list-row-CUFPqnO8.js} +1 -1
- package/dist/client/assets/{automation-runs-BAsKz_ar.js → automation-runs-BUwZaqPB.js} +1 -1
- package/dist/client/assets/{automations-D6YtS_eT.js → automations-C7WLZUZV.js} +1 -1
- package/dist/client/assets/{badge-BPOibh1z.js → badge-BgjvI8Jn.js} +1 -1
- package/dist/client/assets/{block-document-BJflY3QM.js → block-document-BMs5yQbd.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DPs9YS5a.js → blocks-preview-workspace-context-CFskIuPO.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-DCYJUQtS.js → blocks-tab-states-DBpi4m7n.js} +1 -1
- package/dist/client/assets/{blog-preview-url-DzHxsCpo.js → blog-preview-url-PmkO-jQs.js} +1 -1
- package/dist/client/assets/{blog-schema-JIuXdDeK.js → blog-schema-DPJ6pbPE.js} +1 -1
- package/dist/client/assets/{blog-source-gate-CXt_mkFB.js → blog-source-gate-BNTns-Tj.js} +1 -1
- package/dist/client/assets/{blog-view-gate-Cn2JuBJ2.js → blog-view-gate-XHO990wv.js} +1 -1
- package/dist/client/assets/{buckets-D4CMCX6f.js → buckets-FwOH03Y6.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DdCMAWp-.js → build-improve-prompt-doc-CKSwvFRv.js} +1 -1
- package/dist/client/assets/{calendar-Bdj9jUmS.js → calendar-BjODMIQG.js} +1 -1
- package/dist/client/assets/{capability-load-error-I4Yc1ytM.js → capability-load-error-BZgx3S6r.js} +1 -1
- package/dist/client/assets/category-editor-D49fYnPR.js +1 -0
- package/dist/client/assets/{category-tree-BLoyW897.js → category-tree-BRAQfnIe.js} +5 -5
- package/dist/client/assets/{chart-DjJp6Be8.js → chart-B0EUkF3N.js} +2 -2
- package/dist/client/assets/{chat-context-DaK1Yrzk.js → chat-context-CtXhrjSm.js} +7 -7
- package/dist/client/assets/{chat-draft-GVRYGgVC.js → chat-draft-VC3sd6LG.js} +1 -1
- package/dist/client/assets/{checkbox-DFbpPbja.js → checkbox-CEz5sveC.js} +1 -1
- package/dist/client/assets/{choose-editor-Bo0L0UD1.js → choose-editor-BxH12yXf.js} +1 -1
- package/dist/client/assets/{cli-auth-success-gmD3SxqP.js → cli-auth-success-BhEsygAu.js} +1 -1
- package/dist/client/assets/cms-settings-editor-B-1aq1IS.js +1 -0
- package/dist/client/assets/{cms-store-drafts-Bq7pE-8n.js → cms-store-drafts-CHe8Yq48.js} +1 -1
- package/dist/client/assets/{collapsible-CmLYWXhM.js → collapsible-BaySCHgb.js} +1 -1
- package/dist/client/assets/{collection-detail-Cw7UAzp9.js → collection-detail-Dns-hBc0.js} +1 -1
- package/dist/client/assets/{collection-display-button-C0uT9g7-.js → collection-display-button-BEirnd5i.js} +1 -1
- package/dist/client/assets/{collection-search-DbqzyK2L.js → collection-search-C4zFbPFw.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BgxC_m_W.js → collection-table-wrapper-BGBEi7W9.js} +1 -1
- package/dist/client/assets/{collection-tabs-l9Rm1byP.js → collection-tabs-CJ_TiFfs.js} +1 -1
- package/dist/client/assets/{combobox-BfpG_5FA.js → combobox-YbQYNAI4.js} +1 -1
- package/dist/client/assets/{command-Cjlt4NYo.js → command-ClLr83k5.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Dt2PNYyF.js → companion-mcps-section-u7SmZnvS.js} +1 -1
- package/dist/client/assets/{config-Bl9iWUWu.js → config-VL9iqOxm.js} +1 -1
- package/dist/client/assets/{connect-CcotJE7P.js → connect-B5HJ-dj9.js} +3 -3
- package/dist/client/assets/{connect-key-BLdyzZfH.js → connect-key-Byohnb78.js} +1 -1
- package/dist/client/assets/{connect-layout-BMmFOnsY.js → connect-layout-0w96Vn6m.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CTPiWDc2.js → connect-source-dialog-DyTekM4a.js} +1 -1
- package/dist/client/assets/{connection-068pJ_io.js → connection-Dk3ZpWiR.js} +1 -1
- package/dist/client/assets/{connection-card-D4EugjwD.js → connection-card-X6LBG2kz.js} +1 -1
- package/dist/client/assets/{connection-detail-DLOruc56.js → connection-detail-CBLDUNQs.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Bun8v9J_.js → connection-form-helpers-xYGhC7rS.js} +1 -1
- package/dist/client/assets/{connection-slug-DBDVjDxP.js → connection-slug-DDIL8GBP.js} +1 -1
- package/dist/client/assets/{connections-CRDmqlHV.js → connections-CgZzcIpU.js} +1 -1
- package/dist/client/assets/{content-changes-CAdVNZYr.js → content-changes-D2Zs24rN.js} +1 -1
- package/dist/client/assets/{content-tab-Ctr84xPy.js → content-tab-nBcO35Ay.js} +3 -3
- package/dist/client/assets/{context-CyH8HKpn.js → context-DJXbSIqC.js} +1 -1
- package/dist/client/assets/{context-menu-hmngmOyV.js → context-menu-D6szttzM.js} +1 -1
- package/dist/client/assets/{context-shell-CzJ65eJF.js → context-shell-DucfEXXy.js} +5 -5
- package/dist/client/assets/{create-organization-dialog-CIUgKQxN.js → create-organization-dialog-CM_u8_eq.js} +1 -1
- package/dist/client/assets/{daily-pulse-BLIyG0FR.js → daily-pulse-C9clHv9l.js} +1 -1
- package/dist/client/assets/{delete-copy-ze2eTDiM.js → delete-copy-BQdwkEVM.js} +1 -1
- package/dist/client/assets/{device-hint-DunaGjJW.js → device-hint-DU6CIZHu.js} +1 -1
- package/dist/client/assets/{discover-D7SOfpwo.js → discover-DPkQbwQq.js} +1 -1
- package/dist/client/assets/{domain-settings-eGLSeNYd.js → domain-settings-1xFiEhJG.js} +1 -1
- package/dist/client/assets/{drawer-9GUvyTNb.js → drawer-BqcK626t.js} +1 -1
- package/dist/client/assets/{editor-BV5mmXeC.js → editor-ClEwQRn-.js} +2 -2
- package/dist/client/assets/{editor-classes-CoVLI63W.js → editor-classes-DSuutlS7.js} +1 -1
- package/dist/client/assets/{empty-state-BbNHwm8G.js → empty-state-C9z6v98n.js} +1 -1
- package/dist/client/assets/{empty-state-DHm6hawX.js → empty-state-E3VscpRN.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BfmfMfVM.js → experiments-tab-choice-Di5_08ju.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DOr6SLIT.js → extract-connection-data-BVkijTqO.js} +1 -1
- package/dist/client/assets/{feature-gate-l7M3kCNe.js → feature-gate-BVgfJghP.js} +1 -1
- package/dist/client/assets/{feature-paywall-Cje-blAj.js → feature-paywall-CeiuDVrJ.js} +1 -1
- package/dist/client/assets/{file-explorer-B4dsHeXL.js → file-explorer-HTKMVqMJ.js} +2 -2
- package/dist/client/assets/{file-preview-CbZualSz.js → file-preview-Bjz37LYm.js} +1 -1
- package/dist/client/assets/{file-share-button-CoeghTGi.js → file-share-button-DDv7yLFa.js} +1 -1
- package/dist/client/assets/{file-type-icon-CugZpl5p.js → file-type-icon-DZ13Kaio.js} +1 -1
- package/dist/client/assets/{folder-icon-dAFkoeuP.js → folder-icon-CXfmILS-.js} +1 -1
- package/dist/client/assets/{form-DD0ivG3M.js → form-CG-nxH4G.js} +1 -1
- package/dist/client/assets/frame-navigation-By99mATz.js +1 -0
- package/dist/client/assets/{gateway-client-DDyFFIgO.js → gateway-client-_ucPCL20.js} +1 -1
- package/dist/client/assets/general-CPN_jSyx.js +1 -0
- package/dist/client/assets/{github-icon-CIEsB1DB.js → github-icon-Q8GJQd2H.js} +1 -1
- package/dist/client/assets/{held-block-view-_p1jMUzm.js → held-block-view-CQqo1UsV.js} +1 -1
- package/dist/client/assets/{home-sFZggHF1.js → home-DSubmDCr.js} +1 -1
- package/dist/client/assets/{home-overview-DjxYvEip.js → home-overview-CYe7001d.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-BjTOedDx.js → hosted-reconcile-DRjsDibm.js} +1 -1
- package/dist/client/assets/{icon-button-OK_-LM30.js → icon-button-BuzP0C4n.js} +1 -1
- package/dist/client/assets/{index-DZ1lVzhF.js → index-B5Vy9pqV.js} +1 -1
- package/dist/client/assets/{index-vsG63i2D.js → index-BDTw_gvo.js} +1 -1
- package/dist/client/assets/{index-DmYgx-mG.js → index-BMYIuo3L.js} +1 -1
- package/dist/client/assets/{index-BsX9UbFy.js → index-BSDvsLw1.js} +2 -2
- package/dist/client/assets/{index-CgbncEFq.js → index-BoCsMgEt.js} +1 -1
- package/dist/client/assets/{index-DV5oCYMC.js → index-BzVjoBZR.js} +1 -1
- package/dist/client/assets/{index-Lyf_37T_.js → index-C5fHI9y5.js} +1 -1
- package/dist/client/assets/{index-CKiVSSTc.js → index-CCoda8hy.js} +1 -1
- package/dist/client/assets/{index-CG73SDwb.js → index-CM-KaTV3.js} +1 -1
- package/dist/client/assets/{index-Bc90cedN.js → index-CXyc1XRt.js} +1 -1
- package/dist/client/assets/{index-C1ub_U1Q.js → index-CaT4JsCE.js} +29 -29
- package/dist/client/assets/index-Ccbd_91u.js +1 -0
- package/dist/client/assets/{index-LESY8PsW.js → index-Cmw1-PfS.js} +1 -1
- package/dist/client/assets/{index-8__yj9A8.js → index-D-nior4c.js} +1 -1
- package/dist/client/assets/{index-654OnQGa.js → index-DUl_f6UU.js} +1 -1
- package/dist/client/assets/{index-Bq_D7Efs.js → index-qv7etdoP.js} +1 -1
- package/dist/client/assets/{index-redirect-UXX_5L78.js → index-redirect-Cqzj8viF.js} +1 -1
- package/dist/client/assets/{index-CC-bsUWE.js → index-zeN-7Cn6.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C0-hSbfo.js → infiniteQueryObserver-DjmxTVn9.js} +1 -1
- package/dist/client/assets/{infra-billing-IsVMflpq.js → infra-billing-CB7DZfYo.js} +1 -1
- package/dist/client/assets/{input-CYE8dEKJ.js → input-CpxUgj4y.js} +1 -1
- package/dist/client/assets/{input-CyFU8wN2.js → input-P7Rufjcy.js} +4 -4
- package/dist/client/assets/{integration-icon-BUwIBVDW.js → integration-icon-Dtih4xc7.js} +1 -1
- package/dist/client/assets/{item-actions-Bcd36NN2.js → item-actions-BkjvdFq4.js} +1 -1
- package/dist/client/assets/{jira-icon-DaKZ5C1y.js → jira-icon-Gki7sDDq.js} +1 -1
- package/dist/client/assets/{label-MEZXCG7R.js → label-BWgTIudr.js} +1 -1
- package/dist/client/assets/{layout-DqwW5KgT.js → layout-2b9a92kv.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-B5IdWm49.js → legacy-admin-welcome-dialog-BZk8Utt6.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BaFhGUvM.js → legacy-agents-deep-B4-aSX-9.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-8V-vUmHU.js → legacy-main-redirect-AdMA-EVm.js} +1 -1
- package/dist/client/assets/library-DJBjhiug.js +1 -0
- package/dist/client/assets/{library-tab-DOseUX7E.js → library-tab-oXjowMBh.js} +3 -3
- package/dist/client/assets/{login-BHMF8SEz.js → login-B0pEl3o0.js} +1 -1
- package/dist/client/assets/{markdown-ByDkuymE.js → markdown-r449Hfho.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DLiWo4pG.js → mcp-app-renderer-YPhCUxxb.js} +2 -2
- package/dist/client/assets/{mcp-oauth-DB4k4xDQ.js → mcp-oauth-B4C3DLh4.js} +1 -1
- package/dist/client/assets/{mcp-oauth-MdQqhUwI.js → mcp-oauth-CqXZxzFC.js} +1 -1
- package/dist/client/assets/{members-uZ5WIXj3.js → members-k-mj-5Va.js} +1 -1
- package/dist/client/assets/{memory-DH7ax2_S.js → memory-DXFBSY3B.js} +2 -2
- package/dist/client/assets/{mock-board-BKqriAsg.js → mock-board-DJRKIS_z.js} +4 -4
- package/dist/client/assets/{monaco-editor-BjoMxV0m.js → monaco-editor-D1CWShG9.js} +2 -2
- package/dist/client/assets/{monitoring-BXm8CKJz.js → monitoring-BWrsMdHd.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Ccq_5Pis.js → monitoring-stats-row-Ditvwbem.js} +1 -1
- package/dist/client/assets/{multi-select-BAUwYZSW.js → multi-select-DXPjvW15.js} +1 -1
- package/dist/client/assets/{mustache-DfiEfZhl.js → mustache-BPvtuZ9v.js} +1 -1
- package/dist/client/assets/{named-rule-step-CLhRTJ54.js → named-rule-step-Ez1gAQKy.js} +1 -1
- package/dist/client/assets/{named-rule-view-c0gBiUkc.js → named-rule-view-Ce8Aki88.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BFLZ9X71.js → new-project-dialog-Bf2X9J1F.js} +1 -1
- package/dist/client/assets/{new-project-store-t1LrYNy3.js → new-project-store-CcRyCfqt.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D8zI9QZ5.js → oauth-callback-ai-provider-DAJ1uvU8.js} +1 -1
- package/dist/client/assets/{oauth-callback-PJn9bt0u.js → oauth-callback-rmCqKqtn.js} +1 -1
- package/dist/client/assets/{oauth-consent-Cd5lUk6G.js → oauth-consent-CKBNTNpS.js} +1 -1
- package/dist/client/assets/{onboarding-GJ0kBKYC.js → onboarding-RLX1WNeL.js} +1 -1
- package/dist/client/assets/{openai-conversation-CgZdBmhP.js → openai-conversation-Cs4RFD_j.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-BHAN0czc.js → optimistic-project-sidebar-views-DHIvlN7w.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BB9WlRUK.js → order-monitor-day-wYgAIb03.js} +1 -1
- package/dist/client/assets/{organization-choice-DrL7bQKs.js → organization-choice-DF4YsbE1.js} +1 -1
- package/dist/client/assets/{orgs-D_FfwlAC.js → orgs-Cpo1HonV.js} +1 -1
- package/dist/client/assets/{own-accounts-section-Dgpn-cK2.js → own-accounts-section-D3b6SI3K.js} +1 -1
- package/dist/client/assets/{pair-DjSTW8vY.js → pair-fYdRIvpB.js} +1 -1
- package/dist/client/assets/{parse-sections-uNHSuM51.js → parse-sections-lZ6UNUvT.js} +4 -4
- package/dist/client/assets/plan-BGU2134I.js +1 -0
- package/dist/client/assets/{plan-ladder-BizSTmui.js → plan-ladder-BT6v1KK6.js} +1 -1
- package/dist/client/assets/{plan-page-DPXJjQjX.js → plan-page-DdRlUMZj.js} +2 -2
- package/dist/client/assets/{plan-usage-card-DucLuZ5s.js → plan-usage-card-BhjVJgyo.js} +2 -2
- package/dist/client/assets/{popover-C8MTUbMP.js → popover-BSXUrcE6.js} +1 -1
- package/dist/client/assets/{post-calendar-CNZ0zxSA.js → post-calendar-B3grhhbg.js} +1 -1
- package/dist/client/assets/{post-editor-Ah6UfRni.js → post-editor-Ch_iIOnp.js} +2 -2
- package/dist/client/assets/{preview-content-X88d2Q9c.js → preview-content-CBCToI9s.js} +1 -1
- package/dist/client/assets/{preview-dialog-6taKsS3H.js → preview-dialog-CC4_EzSj.js} +1 -1
- package/dist/client/assets/{preview-panel-hAvkZDhV.js → preview-panel-YpdH_fuF.js} +1 -1
- package/dist/client/assets/preview-tab-CwK2dFzK.js +557 -0
- package/dist/client/assets/{primitives-BSg0_WA9.js → primitives-DNHNToXc.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-Dmze2mN-.js → product-picker-dialog-Cj-HJUFE.js} +1 -1
- package/dist/client/assets/{profile-X9Pp8_LM.js → profile-BB8z9nD6.js} +1 -1
- package/dist/client/assets/project-app-view-Cs6lYsxe.js +1 -0
- package/dist/client/assets/{project-apps-a5epEY_s.js → project-apps-DVjGbegU.js} +1 -1
- package/dist/client/assets/{project-icon-DCW53jHQ.js → project-icon-BrcJONBf.js} +1 -1
- package/dist/client/assets/{project-index-BlU5s5jm.js → project-index-DkaIO5pU.js} +1 -1
- package/dist/client/assets/project-reports-Bq0nT_NV.js +1 -0
- package/dist/client/assets/project-tasks-B9M3BGrW.js +1 -0
- package/dist/client/assets/{projects-mj39aQMY.js → projects-DPWDj1Hp.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DNEvN2US.js → projects-empty-state-DwLmM-Bd.js} +1 -1
- package/dist/client/assets/{prompts-CRXoePx6.js → prompts-BG6VCS0b.js} +1 -1
- package/dist/client/assets/record-editor-B3XMUuBg.js +1 -0
- package/dist/client/assets/{redirect-editor-EMJ5thnl.js → redirect-editor-C2qzzTAe.js} +1 -1
- package/dist/client/assets/reports-BEraAvpt.js +1 -0
- package/dist/client/assets/{reports-Vs9r8j7y.js → reports-ftS1CTPN.js} +1 -1
- package/dist/client/assets/{reports-onboarding-B6osJ6J_.js → reports-onboarding-CZH0Mv_h.js} +1 -1
- package/dist/client/assets/{reports-tab-nsiK69b0.js → reports-tab-K95KTCvW.js} +2 -2
- package/dist/client/assets/{repositories-aKQRMXxV.js → repositories-BR1ZPeuP.js} +1 -1
- package/dist/client/assets/repositories-BoUeqVw4.js +1 -0
- package/dist/client/assets/{repository-binding-DsR2HngX.js → repository-binding-BVqJcY39.js} +1 -1
- package/dist/client/assets/{repository-picker-CEvPHE__.js → repository-picker-DWNj0wFN.js} +1 -1
- package/dist/client/assets/require-capability-CqlqzXSG.js +1 -0
- package/dist/client/assets/{required-auth-layout-BkH-QI99.js → required-auth-layout-CRxzoxmw.js} +1 -1
- package/dist/client/assets/{reset-password-CbE30Adb.js → reset-password-DanrtyLF.js} +1 -1
- package/dist/client/assets/{resizable-D1j5ZKXJ.js → resizable-C9TNCfpu.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DmN6MW3K.js → resolve-tab-icon-DMNzKqRz.js} +1 -1
- package/dist/client/assets/{review-settings-C5KcXNql.js → review-settings-Cchlz2PT.js} +1 -1
- package/dist/client/assets/{role-color-D4BjDPR1.js → role-color-BoRz3OOX.js} +1 -1
- package/dist/client/assets/{roles-BQZMPKR1.js → roles-DJvkg2rk.js} +1 -1
- package/dist/client/assets/{route-Cq6wHRqc.js → route-C3OSB4-2.js} +1 -1
- package/dist/client/assets/route-DF02kU9q.js +1 -0
- package/dist/client/assets/route-Dj7mU5aY.js +1 -0
- package/dist/client/assets/{route-page-header-TUh2jvxt.js → route-page-header-BtKcWz0X.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-BTCoe3SD.js → sandbox-git-api-DV2Rps3Q.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BNYPzUmr.js → sandbox-lifecycle-context-BEJFod31.js} +1 -1
- package/dist/client/assets/{save-status-sZNWYgwi.js → save-status-z4LtIZ69.js} +1 -1
- package/dist/client/assets/{schema-CL6RLkNE.js → schema-Am-4674Q.js} +1 -1
- package/dist/client/assets/{schema-CLnylEy_.js → schema-CBdCZe4x.js} +1 -1
- package/dist/client/assets/{scroll-area-jlFC4TAS.js → scroll-area-Cng2fvWP.js} +1 -1
- package/dist/client/assets/{search-input-Bq0ZqFg8.js → search-input-TR7sI7RN.js} +1 -1
- package/dist/client/assets/{search-toggle-U_qk24b2.js → search-toggle-0rIUYCou.js} +1 -1
- package/dist/client/assets/{secret-picker-Bn8GXEiI.js → secret-picker-DJowBB1m.js} +1 -1
- package/dist/client/assets/{secrets-DMHJfPvy.js → secrets-Ed66n9no.js} +1 -1
- package/dist/client/assets/section-array-field-e9ny1D-V.js +1 -0
- package/dist/client/assets/{sections-CLg-HWtr.js → sections-IlGnYknl.js} +1 -1
- package/dist/client/assets/{sections-editor-BCsQDadn.js → sections-editor-DfDMtXrY.js} +1 -1
- package/dist/client/assets/{select-D1KmAjMK.js → select-CZrUcB4m.js} +1 -1
- package/dist/client/assets/{select-model-CeTnhOq5.js → select-model-CTyZTiyK.js} +1 -1
- package/dist/client/assets/{seo-editor-ChPHbThU.js → seo-editor-Dr8_81n_.js} +1 -1
- package/dist/client/assets/{separator-Dof5-ye5.js → separator-DnBo8TF_.js} +1 -1
- package/dist/client/assets/{session-runtime-CgVs5kAm.js → session-runtime-C7lRk1bm.js} +1 -1
- package/dist/client/assets/settings-tab-BPEuO9Nb.js +1 -0
- package/dist/client/assets/{sheet-C8us_fGJ.js → sheet-CF7PsYXH.js} +1 -1
- package/dist/client/assets/{shell-layout-D2O4ysld.js → shell-layout-Dh4-Yy93.js} +1 -1
- package/dist/client/assets/{site-draft-actions-51pNQWzr.js → site-draft-actions-Bl2gM76X.js} +5 -5
- package/dist/client/assets/{site-draft-view-DWvUh_WK.js → site-draft-view-AsxHU4E-.js} +1 -1
- package/dist/client/assets/site-editor-BNSO7RL5.js +1 -0
- package/dist/client/assets/{site-editor-toast-uie07d22.js → site-editor-toast-BEQHRuj3.js} +1 -1
- package/dist/client/assets/{skills-BFZxwCkL.js → skills-CNmvamii.js} +1 -1
- package/dist/client/assets/{slider-HFdsWfEF.js → slider-DG3ddCcf.js} +1 -1
- package/dist/client/assets/{sortable.esm-B9245299.js → sortable.esm-DakfNCWl.js} +1 -1
- package/dist/client/assets/{sso-DT00q4fr.js → sso-CZJCHXw3.js} +1 -1
- package/dist/client/assets/{suggestion-BggpCZqm.js → suggestion-CyC2sguH.js} +2 -2
- package/dist/client/assets/{super-agent-icon-Bn4-UJ6J.js → super-agent-icon-Cv1v4K1q.js} +1 -1
- package/dist/client/assets/{switch-CTc8x0BQ.js → switch-CFYJyn7X.js} +1 -1
- package/dist/client/assets/{synced-repos-iykKzJd2.js → synced-repos-ZehP4MJA.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Ds1u4H1q.js → tab-icon-glyph-BnwiRAqQ.js} +1 -1
- package/dist/client/assets/{table-laIfNHWy.js → table-BahGaqnh.js} +1 -1
- package/dist/client/assets/{tabs-BB147dUo.js → tabs-CevBbuWX.js} +1 -1
- package/dist/client/assets/{task-board-2M4kKpcl.js → task-board-D4sEZC2J.js} +1 -1
- package/dist/client/assets/{task-key-G26zQGBv.js → task-key-BJmCPG8w.js} +2 -2
- package/dist/client/assets/{task-route-C9tK4RBt.js → task-route-C3App6nY.js} +1 -1
- package/dist/client/assets/{task-status-DX0qZOle.js → task-status-BRcYy_b3.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BI35CeEo.js → taskboard-analytics-DoXPramT.js} +1 -1
- package/dist/client/assets/tasks-DOZuoGKL.js +1 -0
- package/dist/client/assets/{tasks-DrAlCWGL.js → tasks-DszGSYGn.js} +3 -3
- package/dist/client/assets/{textarea-C6yf2vK0.js → textarea-CDH6DEPF.js} +1 -1
- package/dist/client/assets/{thread-analytics-CX2uqIzv.js → thread-analytics-JqF9lP4x.js} +1 -1
- package/dist/client/assets/{thread-button-YHB_c5xv.js → thread-button-BAd68SAf.js} +1 -1
- package/dist/client/assets/{thread-intent-CoKmpw2U.js → thread-intent-yju7EkUf.js} +4 -4
- package/dist/client/assets/{thread-route-DCVbYT2J.js → thread-route-BX6inU_N.js} +1 -1
- package/dist/client/assets/{thread-route-Dm7-78IA.js → thread-route-BYmLVBsa.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-pioajwMd.js → thread-sheet-body-Dw_TM17U.js} +1 -1
- package/dist/client/assets/{time-range-picker-CPWSqx-u.js → time-range-picker-hyR_HtS6.js} +1 -1
- package/dist/client/assets/{toggle-group-BRCHThnb.js → toggle-group-xl-tep-u.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DJv3lhmv.js → tool-set-selector-C1CP18jT.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-B8qI9Xe-.js → toolbar-icon-button-uyi5Sobp.js} +1 -1
- package/dist/client/assets/{tooltip-BOLZbpj7.js → tooltip-C-37wWLH.js} +1 -1
- package/dist/client/assets/{tooltipContext-B4wDHkzU.js → tooltipContext-TeVhWC1F.js} +1 -1
- package/dist/client/assets/{track-eV5Nkbyp.js → track-XaM8gmGf.js} +1 -1
- package/dist/client/assets/{types-BJJFFySR.js → types-B3fBNTfg.js} +3 -3
- package/dist/client/assets/{url-slug-6VNIFVy2.js → url-slug-BYlcIr9o.js} +1 -1
- package/dist/client/assets/{usage-stats-DjQ8xjIs.js → usage-stats-eYkU9yPk.js} +1 -1
- package/dist/client/assets/use-ai-providers-bUEURX0w.js +1 -0
- package/dist/client/assets/{use-api-keys-DXpxpkMH.js → use-api-keys-2PbXwDnW.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-CNVZfMlq.js → use-apply-named-rule-Ds-O2qrV.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-Dk1eKQ7U.js +1 -0
- package/dist/client/assets/{use-automations-DvRjIhQq.js → use-automations-DYXtS06g.js} +1 -1
- package/dist/client/assets/{use-autosave-DtAYL2g1.js → use-autosave-DeA6ij_2.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BIWQ4f6h.js +1 -0
- package/dist/client/assets/use-blog-view-BpUj7Xe1.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-Cd_LsYGN.js → use-chat-layout-state-BvzCvk0o.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-Chr3mwU6.js → use-cms-publish-actions-DcVrTizG.js} +6 -6
- package/dist/client/assets/{use-connect-companion-DaXYp_6I.js → use-connect-companion-Dtig4TU7.js} +1 -1
- package/dist/client/assets/{use-connection-BuctFlwT.js → use-connection-CiK8c3Rq.js} +1 -1
- package/dist/client/assets/{use-content-sync-DGkKMJx1.js → use-content-sync-C_bHHCMZ.js} +1 -1
- package/dist/client/assets/{use-copy-B1QPiUon.js → use-copy-3Av1V_Lb.js} +1 -1
- package/dist/client/assets/{use-current-view-B6YhRw2T.js → use-current-view-Ce-uPUNE.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DltBlMnb.js → use-date-fns-locale-B5HtkTCa.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CoQOjEPJ.js → use-debounced-autosave-CTQmD-RA.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BDlfWHh1.js → use-debounced-value-5Xxz9sDf.js} +1 -1
- package/dist/client/assets/use-deco-credits-BhK3nU70.js +1 -0
- package/dist/client/assets/{use-decopilot-events-DXxOHVW-.js → use-decopilot-events-_641Ov59.js} +1 -1
- package/dist/client/assets/{use-delete-block-DKPQf--N.js → use-delete-block-CtZrW5Tp.js} +1 -1
- package/dist/client/assets/use-delete-connection-YQsC5kJ2.js +1 -0
- package/dist/client/assets/{use-deployment-admin-BCtv0iLh.js → use-deployment-admin-r26zz2q8.js} +1 -1
- package/dist/client/assets/{use-entitlements-CACmQNFr.js → use-entitlements-D7RtNoTI.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Bm7i9COx.js → use-fast-preview-draft-url-DGbqLmFw.js} +1 -1
- package/dist/client/assets/{use-file-configs-BdTBWYMl.js → use-file-configs-BfS0tPOy.js} +1 -1
- package/dist/client/assets/{use-id-selection-DkUjjDot.js → use-id-selection-q4gmzD-G.js} +1 -1
- package/dist/client/assets/{use-in-settings-BxxJ3np_.js → use-in-settings-CwiXXVnc.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-HbcED_kU.js → use-inbox-feed-5l9MLvEO.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DUlkoAFo.js → use-infinite-scroll-DCsViXEp.js} +1 -1
- package/dist/client/assets/{use-join-requests-zqkmsQY_.js → use-join-requests-DBf1oGZ9.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Bg_X2-wJ.js → use-main-panel-tabs-X90T9xKg.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CxOne3EN.js → use-mcp-auth-status-DUsZigI7.js} +1 -1
- package/dist/client/assets/{use-mcp-client-qxB46vkc.js → use-mcp-client-CTvio_L5.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BpyrqxcY.js → use-mcp-prompts-CEPCAgjv.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CXH754vi.js → use-mcp-tools-BE_ZMsjl.js} +1 -1
- package/dist/client/assets/{use-mobile-BcxOmK-J.js → use-mobile-CLhCB1ec.js} +1 -1
- package/dist/client/assets/{use-move-blocks-DQHvwUPc.js → use-move-blocks-DWud6YXb.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CUw-xOEA.js → use-navigate-to-agent-DqZ2afZ_.js} +1 -1
- package/dist/client/assets/{use-never-published-C3irhERz.js → use-never-published-CDMbsQXF.js} +1 -1
- package/dist/client/assets/{use-org-fs-C6rwPPaE.js → use-org-fs-cNPBBpNZ.js} +1 -1
- package/dist/client/assets/use-org-notice-CUXeWF9K.js +1 -0
- package/dist/client/assets/{use-org-repo-syncs-Bn2yVUz_.js → use-org-repo-syncs-D9cEubUP.js} +1 -1
- package/dist/client/assets/{use-org-sso-hdCu5kD4.js → use-org-sso-DwhYKe5K.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BUtsdGXi.js → use-organization-settings-DsOm4fQ2.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-Dj1ZUU8u.js → use-panel-navigate-B5d8StTT.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-5ArCowYI.js → use-project-native-view-presence-DLzue4pE.js} +1 -1
- package/dist/client/assets/{use-project-scope-CCzY-N2k.js → use-project-scope-DD2NBlJU.js} +1 -1
- package/dist/client/assets/{use-recent-apps-BOJbSXk5.js → use-recent-apps-IXQff8O-.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BRuyL4ss.js → use-reports-diagnostic-DwPRH9dQ.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CmDtF5wo.js → use-sandbox-events-DezOKcND.js} +2 -2
- package/dist/client/assets/{use-secrets-DPttuCyM.js → use-secrets-DnrAThmr.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-D-z-mvAj.js → use-section-preview-base-BLAISjiC.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-BLsHptPn.js → use-sidebar-collapsed-D7vF4wTU.js} +1 -1
- package/dist/client/assets/{use-tags-DTwdffN3.js → use-tags-Cl8tsgI9.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-3PTRWMze.js → use-task-board-analytics-C7Gx2NpK.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-B5qHiP2P.js → use-task-board-item-prs-EGNEHlXU.js} +1 -1
- package/dist/client/assets/{use-task-board-items-BjByaBdg.js → use-task-board-items-DBI-S1K4.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-D0bB7pk4.js → use-task-board-prompts-CvGpBCID.js} +1 -1
- package/dist/client/assets/{use-task-metadata-C2wnm2Kl.js → use-task-metadata-mXn3J_39.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-C5VSoArb.js → use-thread-outputs-C3HzAtJ7.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-C9IdncTF.js → use-view-draft-kind-CQgXNieu.js} +1 -1
- package/dist/client/assets/{use-voice-input-C2RbHNgC.js → use-voice-input-CFCuPvYA.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Cark_fFU.js +1 -0
- package/dist/client/assets/{useQueries-ixTrcMGM.js → useQueries-D8baGR42.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Cnb2unAB.js +1 -0
- package/dist/client/assets/{users-DqTYEXAk.js → users-BVT97EjV.js} +1 -1
- package/dist/client/assets/{utils-20hZRv25.js → utils-DT9H-K9H.js} +1 -1
- package/dist/client/assets/{variant-calendar-BqMIpNPY.js → variant-calendar-BbK_wqOd.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BIajUN2O.js → variant-matcher-override-Dt7nYHUe.js} +1 -1
- package/dist/client/assets/{view-header-d-zjTxWn.js → view-header-D_odaMiu.js} +1 -1
- package/dist/client/assets/{virtual-mcp-D5ExCj22.js → virtual-mcp-C45xWPBS.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CwLVI1nD.js → watch-sse-pool-BU2YQMB0.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Dz1jjjVe.js +0 -1
- package/dist/client/assets/agent-automation-Cin_c-ej.js +0 -20
- package/dist/client/assets/agent-blog-BEmUtxJB.js +0 -2
- package/dist/client/assets/agent-blog-post-CRCuEIym.js +0 -2
- package/dist/client/assets/agent-business-case-BaqGpYBW.js +0 -1
- package/dist/client/assets/agent-deck-Cr1YjbMB.js +0 -1
- package/dist/client/assets/agent-experiments-BhfJlj6G.js +0 -1
- package/dist/client/assets/agent-file-dgzGDL0t.js +0 -1
- package/dist/client/assets/agent-library-DVCTBqyz.js +0 -1
- package/dist/client/assets/agent-library-file-Lp8prgqG.js +0 -1
- package/dist/client/assets/agent-overview-DYbd8V3Q.js +0 -1
- package/dist/client/assets/agent-settings-QTPmlbcv.js +0 -1
- package/dist/client/assets/agent-site-editor-code-LnmpcWvG.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Epu9dWVm.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-5ohlMisy.js +0 -1
- package/dist/client/assets/agent-view-2vMTi1CW.js +0 -1
- package/dist/client/assets/api-keys-NuFR_bS1.js +0 -1
- package/dist/client/assets/category-editor-DuIL0KKo.js +0 -1
- package/dist/client/assets/cms-settings-editor-C-CpWFZK.js +0 -1
- package/dist/client/assets/frame-navigation-D8_V5RRD.js +0 -1
- package/dist/client/assets/general-BE0UcGjs.js +0 -1
- package/dist/client/assets/index-CSWApQsd.js +0 -1
- package/dist/client/assets/library-Cm-EdAie.js +0 -1
- package/dist/client/assets/plan-GPTbEKWs.js +0 -1
- package/dist/client/assets/preview-tab-BJ7YObm7.js +0 -557
- package/dist/client/assets/project-app-view-GJSXmvbw.js +0 -1
- package/dist/client/assets/project-reports-DfWgrWSj.js +0 -1
- package/dist/client/assets/project-tasks-0_wJgrFD.js +0 -1
- package/dist/client/assets/record-editor-rzzFNWcY.js +0 -1
- package/dist/client/assets/reports-_FWhqgvH.js +0 -1
- package/dist/client/assets/repositories-DSUnBVL5.js +0 -1
- package/dist/client/assets/require-capability-BUCZmhwC.js +0 -1
- package/dist/client/assets/route-BaC97KyM.js +0 -1
- package/dist/client/assets/route-D25kyNEn.js +0 -1
- package/dist/client/assets/section-array-field-Bdq2X9R9.js +0 -1
- package/dist/client/assets/settings-tab-Dfi1zcxG.js +0 -1
- package/dist/client/assets/site-editor-DQxOUNwE.js +0 -1
- package/dist/client/assets/tasks-BoHqcXpT.js +0 -1
- package/dist/client/assets/use-ai-providers-CfgoSOxz.js +0 -1
- package/dist/client/assets/use-ask-in-chat-BGjd1yaA.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-CLTk3H1q.js +0 -1
- package/dist/client/assets/use-blog-view-imlI-wE_.js +0 -1
- package/dist/client/assets/use-deco-credits-BL2vimtb.js +0 -1
- package/dist/client/assets/use-delete-connection-DsP1pjJu.js +0 -1
- package/dist/client/assets/use-org-notice-vqcHuCJv.js +0 -1
- package/dist/client/assets/useInfiniteQuery-zsDGm_L7.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DV9_oC3-.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-
|
|
2
|
-
import{r as R,
|
|
3
|
-
`)||n.length>80,e[0]=n,e[1]=a):a=e[1];const[
|
|
4
|
-
`).length)),onChange:f=>t(f.target.value)}):s.jsx(ge,{id:l,value:n,onChange:f=>t(f.target.value)}),e[2]=l,e[3]=i,e[4]=t,e[5]=n,e[6]=r):r=e[6],r}function Ks(o){const e=W.c(15),{id:l,value:n,onChange:t}=o,a=X(),[i,r]=R.useState(String(n));let f;e[0]!==i?(f=Ee(i),e[0]=i,e[1]=f):f=e[1];const x=f===null;let b;e[2]!==t?(b=m=>{r(m.target.value);const d=Ee(m.target.value);d!==null&&t(d)},e[2]=t,e[3]=b):b=e[3];let h;e[4]!==l||e[5]!==x||e[6]!==b||e[7]!==i?(h=s.jsx(ge,{id:l,inputMode:"decimal",value:i,"aria-invalid":x,onChange:b}),e[4]=l,e[5]=x,e[6]=b,e[7]=i,e[8]=h):h=e[8];let p;e[9]!==x||e[10]!==a?(p=x&&s.jsx("p",{className:"text-xs text-destructive",children:a("sandbox.schemaless.notANumber")}),e[9]=x,e[10]=a,e[11]=p):p=e[11];let y;return e[12]!==h||e[13]!==p?(y=s.jsxs("div",{className:"flex flex-col gap-1",children:[h,p]}),e[12]=h,e[13]=p,e[14]=y):y=e[14],y}function Me(o){const e=W.c(67),{label:l,value:n,path:t,depth:a,onChange:i}=o,r=X();let f;e[0]!==t?(f=Fs(t),e[0]=t,e[1]=f):f=e[1];const x=f;if(typeof n=="boolean"){let m;e[2]!==x||e[3]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[2]=x,e[3]=l,e[4]=m):m=e[4];let d;e[5]!==i||e[6]!==t?(d=g=>i(t,g),e[5]=i,e[6]=t,e[7]=d):d=e[7];let u;e[8]!==x||e[9]!==d||e[10]!==n?(u=s.jsx(us,{id:x,checked:n,onCheckedChange:d}),e[8]=x,e[9]=d,e[10]=n,e[11]=u):u=e[11];let c;return e[12]!==m||e[13]!==u?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,u]}),e[12]=m,e[13]=u,e[14]=c):c=e[14],c}if(typeof n=="string"||typeof n=="number"){let m;e[15]!==x||e[16]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[15]=x,e[16]=l,e[17]=m):m=e[17];let d;e[18]!==x||e[19]!==i||e[20]!==t||e[21]!==n?(d=typeof n=="string"?s.jsx(Us,{id:x,value:n,onChange:c=>i(t,c)}):s.jsx(Ks,{id:x,value:n,onChange:c=>i(t,c)}),e[18]=x,e[19]=i,e[20]=t,e[21]=n,e[22]=d):d=e[22];let u;return e[23]!==m||e[24]!==d?(u=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,d]}),e[23]=m,e[24]=d,e[25]=u):u=e[25],u}if(Array.isArray(n)||te(n)){let m,d,u,c,g;if(e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==t||e[30]!==r||e[31]!==n){const E=Array.isArray(n)?n.map((T,C)=>[Ds(T,C,r),T,C]):Object.entries(n).filter(Gs).map(Ws),k=te(n)&&typeof n.__resolveType=="string"?n.__resolveType:null;u=a===0,c="group rounded-md border border-border";let S;e[37]!==l?(S=s.jsx("span",{className:"min-w-0 truncate",children:l}),e[37]=l,e[38]=S):S=e[38];let N;e[39]!==k?(N=k&&s.jsx("span",{className:"min-w-0 truncate font-mono text-xs font-normal text-muted-foreground",title:k,children:ke(k)}),e[39]=k,e[40]=N):N=e[40];let _;e[41]!==r||e[42]!==n?(_=Array.isArray(n)?r("sandbox.schemaless.itemCount",{count:n.length}):null,e[41]=r,e[42]=n,e[43]=_):_=e[43];let w;e[44]!==_?(w=s.jsx("span",{className:"ml-auto shrink-0 text-xs font-normal text-muted-foreground",children:_}),e[44]=_,e[45]=w):w=e[45],e[46]!==w||e[47]!==S||e[48]!==N?(g=s.jsxs("summary",{className:"flex cursor-pointer select-none items-center gap-2 px-3 py-2 text-sm font-medium text-foreground",children:[S,N,w]}),e[46]=w,e[47]=S,e[48]=N,e[49]=g):g=e[49],m="flex flex-col gap-4 border-t border-border px-3 py-3",d=E.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.schemaless.empty")}):E.map(T=>{const[C,B,O]=T;return s.jsx(Me,{label:C,value:B,path:[...t,O],depth:a+1,onChange:i},O)}),e[26]=a,e[27]=l,e[28]=i,e[29]=t,e[30]=r,e[31]=n,e[32]=m,e[33]=d,e[34]=u,e[35]=c,e[36]=g}else m=e[32],d=e[33],u=e[34],c=e[35],g=e[36];let j;e[50]!==m||e[51]!==d?(j=s.jsx("div",{className:m,children:d}),e[50]=m,e[51]=d,e[52]=j):j=e[52];let v;return e[53]!==u||e[54]!==c||e[55]!==g||e[56]!==j?(v=s.jsxs("details",{open:u,className:c,children:[g,j]}),e[53]=u,e[54]=c,e[55]=g,e[56]=j,e[57]=v):v=e[57],v}let b;e[58]!==l?(b=s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:l}),e[58]=l,e[59]=b):b=e[59];let h;e[60]!==r?(h=r("sandbox.schemaless.notSet"),e[60]=r,e[61]=h):h=e[61];let p;e[62]!==h?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:h}),e[62]=h,e[63]=p):p=e[63];let y;return e[64]!==b||e[65]!==p?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b,p]}),e[64]=b,e[65]=p,e[66]=y):y=e[66],y}function Ws(o){const[e,l]=o;return[e,l,e]}function Gs(o){const[e]=o;return e!=="__resolveType"}function Hs({blockKey:o,block:e,onChange:l,onBack:n,onOpenBlock:t}){const a=X(),[i,r]=R.useState(()=>(t?.(o),e)),[f,x]=R.useState(0),[b,h]=R.useState(null),[p,y]=R.useState(!1),m=v=>{r(v),l(o,v)},d=typeof i.__resolveType=="string"?i.__resolveType:null,u=Object.entries(i).filter(([v])=>v!=="__resolveType"),c=()=>{b!==null?(h(null),y(!1),x(v=>v+1)):h(JSON.stringify(i,null,2))},g=v=>{try{const E=JSON.parse(v??"");if(te(E)){y(!1),m(E);return}}catch{}y(!0)},j=a(b!==null?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson");return s.jsxs("div",{className:"flex h-full min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2",children:[n&&s.jsxs(K,{variant:"ghost",size:"sm",className:"shrink-0",onClick:n,children:[s.jsx($e,{"aria-hidden":"true"}),a("sandbox.schemaless.back")]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("h3",{className:"truncate text-sm font-medium",title:o,children:o}),d&&s.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:d,children:d})]}),s.jsx(K,{variant:b!==null?"default":"ghost",size:"icon",className:"shrink-0",onClick:c,"aria-label":j,"aria-pressed":b!==null,title:j,children:b!==null?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})]}),s.jsxs("div",{className:"relative min-h-0 flex-1",children:[s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("form",{"aria-label":o,className:"mx-auto flex max-w-2xl flex-col gap-4 px-6 py-4",onSubmit:v=>v.preventDefault(),children:u.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.schemaless.empty")}):u.map(([v,E])=>s.jsx(Me,{label:v,value:E,path:[v],depth:0,onChange:(k,S)=>m(hs(i,k,S))},v))},f)}),b!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[p&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:a("sandbox.savedSectionEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),children:s.jsx(Ms,{language:"json",height:"100%",code:b,onChange:g})})})]})]})]})}function Ys(o){const e=W.c(70),{decofile:l,onChange:n,onLeaveBlock:t,onOpenBlock:a,wrapEditor:i,v8:r,copyEpochOf:f,site:x,initialKey:b,compact:h}=o,p=r===void 0?!1:r,y=x===void 0?null:x,m=b===void 0?null:b,d=h===void 0?!1:h,u=X(),[c,g]=R.useState(m&&te(l[m])?m:null),[j,v]=R.useState("");let E;e[0]!==t||e[1]!==a||e[2]!==c||e[3]!==p?(E=A=>{A!==c&&(t?.(),!p&&A!==null&&a?.(A),g(A))},e[0]=t,e[1]=a,e[2]=c,e[3]=p,e[4]=E):E=e[4];const k=E;let S;e[5]!==f||e[6]!==c?(S=c?f?.(c)??0:0,e[5]=f,e[6]=c,e[7]=S):S=e[7];const N=S,[_,w]=R.useState(N);_!==N&&(w(N),!p&&c!==null&&a?.(c));const T=c?l[c]:void 0;let C,B,O,J,P;if(e[8]!==d||e[9]!==l||e[10]!==j||e[11]!==k||e[12]!==c||e[13]!==u){const A=j.trim().toLowerCase(),F=ps(l).map(M=>({...M,blocks:A?M.blocks.filter(U=>U.label.toLowerCase().includes(A)||U.key.toLowerCase().includes(A)||(M.resolveType??"").toLowerCase().includes(A)):M.blocks})).filter(qs),xe=Object.keys(l).length;e[19]!==u?(P=u("sandbox.schemaless.listLabel"),e[19]=u,e[20]=P):P=e[20];const re=d?"flex-1":"w-72 shrink-0 border-r";e[21]!==re?(C=ne("flex min-h-0 flex-col",re),e[21]=re,e[22]=C):C=e[22];let se;e[23]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(ds,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"}),e[23]=se):se=e[23];let ae;e[24]===Symbol.for("react.memo_cache_sentinel")?(ae=M=>v(M.target.value),e[24]=ae):ae=e[24];let Y;e[25]!==u?(Y=u("sandbox.schemaless.searchPlaceholder"),e[25]=u,e[26]=Y):Y=e[26];let q;e[27]!==u?(q=u("sandbox.schemaless.searchPlaceholder"),e[27]=u,e[28]=q):q=e[28],e[29]!==j||e[30]!==Y||e[31]!==q?(B=s.jsx("div",{className:"shrink-0 border-b p-2",children:s.jsxs("div",{className:"relative",children:[se,s.jsx(ge,{type:"search",value:j,onChange:ae,placeholder:Y,"aria-label":q,className:"pl-8"})]})}),e[29]=j,e[30]=Y,e[31]=q,e[32]=B):B=e[32],O="min-h-0 flex-1 overflow-y-auto py-1",J=xe===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noBlocks")}):F.length===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noMatches")}):F.map(M=>s.jsxs("section",{"aria-label":M.resolveType??u("sandbox.schemaless.noType"),className:"py-1",children:[s.jsxs("h3",{className:"flex items-baseline gap-2 px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground",title:M.resolveType??void 0,children:[s.jsx("span",{className:"truncate",children:M.resolveType?ke(M.resolveType):u("sandbox.schemaless.noType")}),s.jsx("span",{className:"ml-auto shrink-0 tabular-nums",children:M.blocks.length})]}),s.jsx("ul",{children:M.blocks.map(U=>s.jsx("li",{children:s.jsx("button",{type:"button",onClick:()=>k(U.key),"aria-current":U.key===c?"true":void 0,title:U.key,className:ne("block w-full truncate px-3 py-1.5 text-left text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",U.key===c&&"bg-accent font-medium"),children:U.label})},U.key))})]},M.resolveType??"")),e[8]=d,e[9]=l,e[10]=j,e[11]=k,e[12]=c,e[13]=u,e[14]=C,e[15]=B,e[16]=O,e[17]=J,e[18]=P}else C=e[14],B=e[15],O=e[16],J=e[17],P=e[18];let $;e[33]!==O||e[34]!==J?($=s.jsx("div",{className:O,children:J}),e[33]=O,e[34]=J,e[35]=$):$=e[35];let D;e[36]!==C||e[37]!==B||e[38]!==$||e[39]!==P?(D=s.jsxs("nav",{"aria-label":P,className:C,children:[B,$]}),e[36]=C,e[37]=B,e[38]=$,e[39]=P,e[40]=D):D=e[40];const I=D;let L;e[41]!==T||e[42]!==d||e[43]!==f||e[44]!==n||e[45]!==a||e[46]!==k||e[47]!==c||e[48]!==u||e[49]!==p?(L=c&&te(T)?s.jsx(Hs,{blockKey:c,block:T,onOpenBlock:p?a:void 0,onChange:n,onBack:d?()=>k(null):void 0},`${c}:${f?.(c)??0}`):s.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-center p-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:u("sandbox.schemaless.pickBlock")})}),e[41]=T,e[42]=d,e[43]=f,e[44]=n,e[45]=a,e[46]=k,e[47]=c,e[48]=u,e[49]=p,e[50]=L):L=e[50];const Q=L;let Z;e[51]!==Q||e[52]!==c||e[53]!==p||e[54]!==i?(Z=p&&c&&i?i(c,Q):Q,e[51]=Q,e[52]=c,e[53]=p,e[54]=i,e[55]=Z):Z=e[55];const ee=Z;let G;e[56]!==y?(G=s.jsx(Vs,{site:y}),e[56]=y,e[57]=G):G=e[57];let V;e[58]!==T||e[59]!==d||e[60]!==ee||e[61]!==I||e[62]!==c?(V=d&&c&&te(T)?ee:I,e[58]=T,e[59]=d,e[60]=ee,e[61]=I,e[62]=c,e[63]=V):V=e[63];const ie=!d&ⅇlet H;e[64]!==V||e[65]!==ie?(H=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[V,ie]}),e[64]=V,e[65]=ie,e[66]=H):H=e[66];let le;return e[67]!==G||e[68]!==H?(le=s.jsxs("div",{"data-testid":"schemaless-content",className:"flex h-full min-h-0 w-full flex-col",children:[G,H]}),e[67]=G,e[68]=H,e[69]=le):le=e[69],le}function qs(o){return o.blocks.length>0}function At(o){const e=W.c(35),{orgSlug:l,virtualMcpId:n,branch:t,decofile:a,initialKey:i,compact:r}=o,f=ls(n)?.metadata;let x;e[0]!==f?(x=Ke(f),e[0]=f,e[1]=x):x=e[1];const b=x;let h;e[2]!==t||e[3]!==l||e[4]!==n?(h={orgSlug:l,virtualMcpId:n,branch:t},e[2]=t,e[3]=l,e[4]=n,e[5]=h):h=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={holdsCopy:!0},e[6]=p):p=e[6];const{save:y,flush:m,hold:d,v8:u}=Le(h,p);let c;e[7]!==t||e[8]!==l||e[9]!==n?(c=ts({orgSlug:l,virtualMcpId:n,branch:t}),e[7]=t,e[8]=l,e[9]=n,e[10]=c):c=e[10];const g=ns(c);let j;e[11]!==m?(j=()=>m(),e[11]=m,e[12]=j):j=e[12];const v=R.useEffectEvent(j);let E;e[13]!==v?(E=()=>()=>v(),e[13]=v,e[14]=E):E=e[14];let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=[],e[15]=k):k=e[15],R.useEffect(E,k);let S;e[16]!==y?(S=(w,T)=>y(w,T),e[16]=y,e[17]=S):S=e[17];let N;e[18]!==t||e[19]!==a||e[20]!==l||e[21]!==u||e[22]!==n?(N=u?(w,T)=>s.jsx(qe,{listing:a,scope:{orgSlug:l,virtualMcpId:n,branch:t},names:[w],children:T}):void 0,e[18]=t,e[19]=a,e[20]=l,e[21]=u,e[22]=n,e[23]=N):N=e[23];let _;return e[24]!==r||e[25]!==g||e[26]!==a||e[27]!==m||e[28]!==d||e[29]!==i||e[30]!==b||e[31]!==N||e[32]!==S||e[33]!==u?(_=s.jsx(Ys,{decofile:a,site:b,onChange:S,onLeaveBlock:m,onOpenBlock:d,v8:u,wrapEditor:N,copyEpochOf:g,initialKey:i,compact:r}),e[24]=r,e[25]=g,e[26]=a,e[27]=m,e[28]=d,e[29]=i,e[30]=b,e[31]=N,e[32]=S,e[33]=u,e[34]=_):_=e[34],_}const we={resolveType:"website/pages/Page.tsx",seoResolveType:"website/sections/Seo/SeoV2.tsx"};function zt(o){return`pages-${encodeURIComponent(o)}-${crypto.randomUUID()}`}function It(o,e,l){if(bs(l))return{name:o,path:e,sections:[],__resolveType:"page"};const n=ys(l??void 0);if(!l||js(n))return{name:o,path:e,sections:[],seo:{__resolveType:we.seoResolveType},__resolveType:we.resolveType};const t=Ss(l);return{name:o,path:e,sections:[],...t?{seo:{__resolveType:t}}:{},__resolveType:n}}const Be="__blank__";function Mt(o){const e=W.c(65),{id:l,value:n,onChange:t,templates:a,disabled:i}=o,r=X(),[f,x]=R.useState(!1);let b;if(e[0]!==a||e[1]!==n){let I;e[3]!==n?(I=L=>L.key===n,e[3]=n,e[4]=I):I=e[4],b=a.find(I),e[0]=a,e[1]=n,e[2]=b}else b=e[2];const h=b;let p;e[5]!==h?.name||e[6]!==r?(p=h?.name??r("sectionsEditor.pageTemplateSelect.blankPageDefaultLabel"),e[5]=h?.name,e[6]=r,e[7]=p):p=e[7];let y;e[8]!==p?(y=s.jsx("span",{className:"max-w-full shrink-0 truncate",children:p}),e[8]=p,e[9]=y):y=e[9];let m;e[10]!==h?(m=h?.path?s.jsx("span",{className:"truncate text-muted-foreground",children:h.path}):null,e[10]=h,e[11]=m):m=e[11];let d;e[12]!==y||e[13]!==m?(d=s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[y,m]}),e[12]=y,e[13]=m,e[14]=d):d=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ts,{className:"shrink-0 opacity-50"}),e[15]=u):u=e[15];let c;e[16]!==i||e[17]!==l||e[18]!==f||e[19]!==d?(c=s.jsx(Rs,{asChild:!0,children:s.jsxs(K,{id:l,type:"button",variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:"w-full justify-between font-normal contain-inline-size",children:[d,u]})}),e[16]=i,e[17]=l,e[18]=f,e[19]=d,e[20]=c):c=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[21]=g):g=e[21];let j;e[22]!==r?(j=r("sectionsEditor.pageTemplateSelect.searchPlaceholder"),e[22]=r,e[23]=j):j=e[23];let v;e[24]!==j?(v=s.jsx(_s,{placeholder:j,className:"h-9"}),e[24]=j,e[25]=v):v=e[25];let E;e[26]!==r?(E=r("sectionsEditor.pageTemplateSelect.noPagesFoundMessage"),e[26]=r,e[27]=E):E=e[27];let k;e[28]!==E?(k=s.jsx(Es,{children:E}),e[28]=E,e[29]=k):k=e[29];let S;e[30]!==r?(S=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[30]=r,e[31]=S):S=e[31];let N;e[32]!==t?(N=()=>{t(Be),x(!1)},e[32]=t,e[33]=N):N=e[33];let _;e[34]!==r?(_=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[34]=r,e[35]=_):_=e[35];const w=n===Be?"opacity-100":"opacity-0";let T;e[36]!==w?(T=ne("ml-auto",w),e[36]=w,e[37]=T):T=e[37];let C;e[38]!==T?(C=s.jsx(ve,{className:T}),e[38]=T,e[39]=C):C=e[39];let B;e[40]!==S||e[41]!==N||e[42]!==_||e[43]!==C?(B=s.jsxs(Ce,{value:S,onSelect:N,children:[_,C]}),e[40]=S,e[41]=N,e[42]=_,e[43]=C,e[44]=B):B=e[44];let O;if(e[45]!==t||e[46]!==a||e[47]!==n){let I;e[49]!==t||e[50]!==n?(I=L=>s.jsxs(Ce,{value:`${L.name} ${L.path}`,onSelect:()=>{t(L.key),x(!1)},children:[s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:L.name}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:L.path})]}),s.jsx(ve,{className:ne("ml-auto",n===L.key?"opacity-100":"opacity-0")})]},L.key),e[49]=t,e[50]=n,e[51]=I):I=e[51],O=a.map(I),e[45]=t,e[46]=a,e[47]=n,e[48]=O}else O=e[48];let J;e[52]!==B||e[53]!==O?(J=s.jsxs(Cs,{children:[B,O]}),e[52]=B,e[53]=O,e[54]=J):J=e[54];let P;e[55]!==k||e[56]!==J?(P=s.jsxs(ws,{onWheel:Xs,children:[k,J]}),e[55]=k,e[56]=J,e[57]=P):P=e[57];let $;e[58]!==v||e[59]!==P?($=s.jsx(Ps,{className:"p-0",style:g,children:s.jsxs(Bs,{children:[v,P]})}),e[58]=v,e[59]=P,e[60]=$):$=e[60];let D;return e[61]!==f||e[62]!==$||e[63]!==c?(D=s.jsxs(Os,{open:f,onOpenChange:x,children:[c,$]}),e[61]=f,e[62]=$,e[63]=c,e[64]=D):D=e[64],D}function Xs(o){const e=o.deltaMode===1?16:1;o.currentTarget.scrollTop=o.currentTarget.scrollTop+o.deltaY*e}function Qs(o){const e=W.c(13),{crumbs:l,onSelect:n,onSelectRoot:t}=o;let a;e[0]!==n||e[1]!==t?(a=t??(()=>n(0)),e[0]=n,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==a?(i={onSelect:a},e[3]=a,e[4]=i):i=e[4];let r;if(e[5]!==l||e[6]!==n){let x;e[8]!==n?(x=(b,h)=>({key:`block-${h}`,label:Xe(b),onSelect:()=>n(h)}),e[8]=n,e[9]=x):x=e[9],r=l.map(x),e[5]=l,e[6]=n,e[7]=r}else r=e[7];let f;return e[10]!==i||e[11]!==r?(f=s.jsx(We.Breadcrumbs,{after:"page",parent:i,items:r}),e[10]=i,e[11]=r,e[12]=f):f=e[12],f}const Zs={loaders:"loader",actions:"action"},Je=new Set(["workflows"]);function et(o){return Zs[o]}function Ve(o,e,l){const n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(l)&&e in a)return!0;return!1}function st(o,e,l){return/\.tsx?$/.test(e)?!0:Ve(o,e,l)}function Jt(o,e){const l=new Set,n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(e))for(const i of Object.keys(a))l.add(i);return l}function tt(o,e){return/\.tsx?$/.test(o)?!1:e.has(`${o}.ts`)||e.has(`${o}.tsx`)}function nt(o,e){const l=o.manifest?.blocks??{},n=[],t=new Set;for(const[a,i]of Object.entries(l))if(a.includes(e))for(const r of Object.keys(i))t.add(r);for(const a of t){if(a.toLowerCase().includes("preview")||ze.has(a)||Je.has(Ne(a))||tt(a,t))continue;const i=gs(a,o);if(i.hidden)continue;const r=i.title&&i.title!==a?i.title:ce(a);n.push({resolveType:a,title:r})}return n.sort((a,i)=>a.title.localeCompare(i.title))}function Vt(o,e){return nt(o,e).length}function Ne(o){return o.startsWith("deco-sites/")?o.split("/")[1]||"site":o.startsWith("$live")||o.startsWith("deco/")?"deco":o.split("/")[0]||"other"}const lt={deco:"Deco",std:"Deco Standard",website:"Website"};function Dt(o){return lt[o]??o}function Ft(o){const e=Ne(o);let n=o.split("/").filter(Boolean).slice(o.startsWith("deco-sites/")?2:1);return(n[0]==="loaders"||n[0]==="actions")&&(n=n.slice(1)),[e,...n.slice(0,-1)]}function Ut(o,e,l){const n=[];for(const[t,a]of Object.entries(e)){if(st(o,t,l)||Ge(t)||!a||typeof a!="object"||Array.isArray(a))continue;const i=a,r=i.__resolveType;typeof r=="string"&&(ze.has(r)||Je.has(Ne(r))||Ve(o,r,l)&&n.push({key:t,resolveType:r,title:typeof i.name=="string"&&i.name?i.name:t}))}return n.sort((t,a)=>t.title.localeCompare(a.title))}function Kt(o,e){const l=o[e],n=typeof l?.__resolveType=="string"?l.__resolveType:"",{__resolveType:t,...a}=l??{},i=typeof l?.name=="string"&&l.name?l.name:e;return{resolveType:n,props:a,title:i}}const Re=3e4;function at(o,e,l,n){const t=new URL(`/deco/invoke/${e}`,o);return t.searchParams.set("__cb",n.toString(36)),t.searchParams.set("__decoFBT","0"),t.searchParams.set("__d",`run-${n.toString(36)}`),t.searchParams.set("props",btoa(encodeURIComponent(JSON.stringify(l)))),t.href}async function ot(o,{resolveType:e,props:l}){let n;try{n=await fetch(vs(o),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...l}),signal:AbortSignal.timeout(Re)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error(`Run timed out after ${Re/1e3}s — the block may be slow or the preview unresponsive.`):r}const t=await n.text();let a=null,i=!1;try{a=t?JSON.parse(t):null,i=!0}catch{}if(!n.ok){const r=i&&a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:t||`Run failed (${n.status})`;throw new Error(r)}return i?a:t}function it(o){const e=W.c(2);let l;return e[0]!==o?(l={mutationFn:n=>ot(o,n)},e[0]=o,e[1]=l):l=e[1],He(l)}function Wt({orgSlug:o,virtualMcpId:e,branch:l,previewUrl:n,meta:t,decofile:a,kind:i,target:r,initialValue:f,isCreating:x,onCreate:b,onSaveReferencedBlock:h,onBack:p,backLabel:y,showRun:m=!0}){const d=Ls(),u=d?.taskId??null,c=X(),g=d?.virtualMcpId,v=as(g===e?e:null)?.metadata?.siteSlug??null,E=Qe(r.resolveType,t),k=!E&&ks(r.resolveType,t),S=k?Ns(f):null,N=E??S,[_,w]=R.useState(f),[T,C]=R.useState([]),[B,O]=R.useState(0),[J,P]=R.useState(!1),[$,D]=R.useState(null),[I,L]=R.useState(!1),[Q,Z]=R.useState(!1),[ee,G]=R.useState(!1),V=$!==null,{save:ie,flush:H,isPending:le}=Le({orgSlug:o,virtualMcpId:e,branch:l},{holdsCopy:r.mode==="saved"}),A=it({orgSlug:o,virtualMcpId:e,branch:l,threadId:u});R.useEffect(()=>()=>{H()},[]);const F=et(i),xe=r.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")??r.resolveType,re={orgSlug:o,virtualMcpId:e,branch:l,threadId:u,previewUrl:n??void 0,siteSlug:v},se=z=>{w(z),r.mode==="saved"&&ie(r.blockKey,{__resolveType:r.resolveType,...z})},ae=()=>{V?(D(null),P(!1),O(z=>z+1)):D(JSON.stringify(_,null,2))},Y=z=>{const oe=z??"";try{const de=JSON.parse(oe);if(de&&typeof de=="object"&&!Array.isArray(de)){P(!1),se(de);return}P(!0)}catch{P(!0)}},q=async z=>{const oe=ss(z,a);if(oe){Pe.error(oe);return}await b(z,{__resolveType:r.resolveType,..._}),L(!1)},M=()=>{Z(!0),A.mutate({resolveType:r.resolveType,props:_})},U=()=>{n&&window.open(at(n,r.resolveType,_,Date.now()),"_blank","noopener")},De=[r.title,...T],Fe=z=>{C(T.slice(0,z)),O(oe=>oe+1)};return s.jsxs("div",{className:"flex h-full w-full min-w-0 flex-col",children:[s.jsx(Qs,{crumbs:De,onSelect:Fe,onSelectRoot:p}),s.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[p&&y&&s.jsxs(K,{variant:"ghost",size:"sm",className:"-ml-1 min-w-0 shrink gap-1",onClick:p,children:[s.jsx($e,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:y})]}),s.jsx("div",{className:"flex-1"}),r.mode==="saved"&&s.jsx(Is,{isPending:le,isError:!1}),m&&s.jsxs(K,{size:"default",variant:"outline",className:"shrink-0 gap-1.5",onClick:M,disabled:A.isPending,"aria-label":c("sandbox.runnableBlockEditor.runAriaLabel",{singular:F}),children:[A.isPending?s.jsx(je,{className:"size-3.5"}):s.jsx(As,{size:14}),c("sandbox.runnableBlockEditor.run")]}),r.mode==="available"&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{size:"icon",className:"shrink-0",disabled:x,onClick:()=>L(!0),"aria-label":c("sandbox.runnableBlockEditor.saveAsGlobalAriaLabel",{singular:F}),children:s.jsx(is,{size:14})})}),s.jsx(me,{side:"bottom",children:c("sandbox.runnableBlockEditor.saveAsGlobal",{singular:F})})]}),s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:V?"default":"ghost",size:"icon",className:"shrink-0",onClick:ae,"aria-label":c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson"),"aria-pressed":V,children:V?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})}),s.jsx(me,{side:"bottom",children:c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson")})]})]}),s.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:r.mode==="saved"?c("sandbox.runnableBlockEditor.savedModeDescription",{singular:F}):c("sandbox.runnableBlockEditor.availableModeDescription",{typeLabel:xe,singular:F})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[s.jsxs("div",{className:ne("relative min-h-0 flex-1",Q&&ee&&"hidden"),children:[s.jsx(zs,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsxs("div",{className:"mx-auto max-w-2xl",children:[S&&N===S&&s.jsx("p",{className:"mb-3 rounded-md bg-muted px-3 py-2 text-xs leading-snug text-muted-foreground",children:c("sandbox.runnableBlockEditor.inferredSchemaNotice",{singular:F})}),N?s.jsx(Ze,{schema:N,value:_,onChange:z=>se(z),basePath:"",breadcrumbPath:T,onBreadcrumbChange:C,meta:t,decofile:a,onSaveReferencedBlock:h,sandbox:re},B):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:k?c("sandbox.runnableBlockEditor.freeformPropsEmptyState",{singular:F}):c("sandbox.runnableBlockEditor.noInputEmptyState",{singular:F})})]})})}),$!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[J&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.runnableBlockEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Ie,{language:"json",height:"100%",code:$,onChange:Y,onSave:z=>{Y(z),H()}})})]})]}),Q&&s.jsx(rt,{singular:F,result:{isPending:A.isPending,error:A.error,data:A.data,hasRun:A.status!=="idle"},expanded:ee,onToggleExpand:()=>G(z=>!z),onOpenInNewTab:n?U:void 0,onClose:()=>{Z(!1),G(!1)}})]}),s.jsx(es,{open:I,onOpenChange:L,defaultBlockId:"",isPending:x,onSubmit:q})]})}function rt(o){const e=W.c(54),{singular:l,result:n,expanded:t,onToggleExpand:a,onOpenInNewTab:i,onClose:r}=o,f=X();let x;e[0]!==n.data?(x=typeof n.data=="string"?n.data:JSON.stringify(n.data??null,null,2),e[0]=n.data,e[1]=x):x=e[1];const b=x,h=t?"flex-1":"h-[45%] shrink-0";let p;e[2]!==h?(p=ne("flex min-h-0 flex-col border-t",h),e[2]=h,e[3]=p):p=e[3];let y;e[4]!==f?(y=f("sandbox.runnableBlockEditor.resultPanelTitle"),e[4]=f,e[5]=y):y=e[5];let m;e[6]!==y?(m=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:y}),e[6]=y,e[7]=m):m=e[7];let d;e[8]!==i||e[9]!==l||e[10]!==f?(d=i&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":f("sandbox.runnableBlockEditor.openResultInNewTabAriaLabel"),children:s.jsx(Oe,{size:14})})}),s.jsx(me,{side:"bottom",children:f("sandbox.runnableBlockEditor.openInNewTabTooltip",{singular:l})})]}),e[8]=i,e[9]=l,e[10]=f,e[11]=d):d=e[11];let u;e[12]!==t||e[13]!==f?(u=f(t?"sandbox.runnableBlockEditor.collapseResult":"sandbox.runnableBlockEditor.expandResult"),e[12]=t,e[13]=f,e[14]=u):u=e[14];let c;e[15]!==t?(c=t?s.jsx(rs,{size:14}):s.jsx($s,{size:14}),e[15]=t,e[16]=c):c=e[16];let g;e[17]!==t||e[18]!==a||e[19]!==u||e[20]!==c?(g=s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":u,"aria-pressed":t,children:c})}),e[17]=t,e[18]=a,e[19]=u,e[20]=c,e[21]=g):g=e[21];let j;e[22]!==t||e[23]!==f?(j=f(t?"sandbox.runnableBlockEditor.collapse":"sandbox.runnableBlockEditor.expand"),e[22]=t,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(me,{side:"bottom",children:j}),e[25]=j,e[26]=v):v=e[26];let E;e[27]!==v||e[28]!==g?(E=s.jsxs(ue,{children:[g,v]}),e[27]=v,e[28]=g,e[29]=E):E=e[29];let k;e[30]!==f?(k=f("sandbox.runnableBlockEditor.closeResult"),e[30]=f,e[31]=k):k=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ye,{size:14}),e[32]=S):S=e[32];let N;e[33]!==r||e[34]!==k?(N=s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:r,"aria-label":k,children:S}),e[33]=r,e[34]=k,e[35]=N):N=e[35];let _;e[36]!==E||e[37]!==N||e[38]!==d?(_=s.jsxs("div",{className:"flex items-center gap-0.5",children:[d,E,N]}),e[36]=E,e[37]=N,e[38]=d,e[39]=_):_=e[39];let w;e[40]!==_||e[41]!==m?(w=s.jsxs("div",{className:"flex h-9 shrink-0 items-center justify-between border-b px-3",children:[m,_]}),e[40]=_,e[41]=m,e[42]=w):w=e[42];let T;e[43]!==n.error||e[44]!==n.hasRun||e[45]!==n.isPending||e[46]!==b||e[47]!==l||e[48]!==f?(T=s.jsx("div",{className:"min-h-0 flex-1",children:n.isPending?s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-xs text-muted-foreground",children:[s.jsx(je,{className:"size-4"}),f("sandbox.runnableBlockEditor.running",{singular:l})]}):n.error?s.jsxs("div",{className:"h-full overflow-auto px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-destructive",children:f("sandbox.runnableBlockEditor.failedToRun",{singular:l})}),s.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-destructive/90",children:n.error.message})]}):n.hasRun?s.jsx(Ie,{language:"json",height:"100%",code:b,readOnly:!0}):s.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:f("sandbox.runnableBlockEditor.pressRunToInvoke",{singular:l})})}),e[43]=n.error,e[44]=n.hasRun,e[45]=n.isPending,e[46]=b,e[47]=l,e[48]=f,e[49]=T):T=e[49];let C;return e[50]!==w||e[51]!==T||e[52]!==p?(C=s.jsxs("div",{className:p,children:[w,T]}),e[50]=w,e[51]=T,e[52]=p,e[53]=C):C=e[53],C}function be(o,e,l){const n=l[o];return typeof n?.name=="string"&&n.name||o.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase())||`Section ${e+1}`}function Gt(o,e,l=!1){return o.map((n,t)=>{const a=n.__resolveType??"",i=Se(a);if(!i&&a!==""&&pe(a)&&a in e)return{index:t,resolveType:a,label:be(a,t,e),isLazy:!1,isSavedBlock:!0};const r=i?n.section:void 0,f=i?r?.__resolveType??"":a;if(Te(f,l)){const b=i?r:n,h=Array.isArray(b?.variants)?b.variants:[];if(h.length===1&&Ye(h[0]?.rule?.__resolveType,l)){const m=he(h[0],l)??{};let d=m.__resolveType??"";const u=Se(d);let c=m;if(u){const g=m.section;d=g?.__resolveType??d,g&&(c=g)}if(Te(d,l)){const g=Array.isArray(c.variants)?c.variants:[],j=he(g[0],l)?.__resolveType,v=j?ce(j):"Section";return{index:t,resolveType:a,label:`Variants of ${v}`,variantOf:v,isHidden:!0,isLazy:u}}return d!==""&&pe(d)&&d in e?{index:t,resolveType:a,label:be(d,t,e),isHidden:!0,isLazy:u,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(d)||`Section ${t+1}`,isHidden:!0,isLazy:u}}const p=he(h[0],l)?.__resolveType,y=p?ce(p):"Section";return{index:t,resolveType:a,label:`Variants of ${y}`,variantOf:y,isMultivariate:!0,isLazy:i}}const x=i?n.section?.__resolveType??a:a;return i&&x!==""&&pe(x)&&x in e?{index:t,resolveType:a,label:be(x,t,e),isLazy:!0,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(x)||`Section ${t+1}`,isLazy:i}})}function Ht(o){let e=o.length;for(;e>0&&o[e-1]?.isSavedBlock;)e--;return e>0?e:Math.max(o.length-1,0)}export{Be as B,Mt as P,Wt as R,At as S,nt as a,Ft as b,It as c,Dt as d,et as e,Qs as f,zt as g,Vt as h,Ut as l,Jt as m,Ht as n,Gt as p,Kt as r};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-D1CWShG9.js","assets/index-CaT4JsCE.js","assets/index-fCq5t58i.css","assets/editor-ClEwQRn-.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as R,bb as Ue,c as W,b as X,m as ne,j as s,B as K,b8 as ye,h as je,I as ge,t as Pe,a_ as ve,a9 as Oe,bA as Ke,n as We,bB as ce,bC as Ge,e as qe,br as Se,bD as xe,bo as Te,bp as He,bq as he}from"./index-CaT4JsCE.js";import{C as Ye,c as Xe,a as Qe,S as Ze,M as es,v as ss}from"./held-block-view-CQqo1UsV.js";import{b as Le}from"./use-never-published-CDMbsQXF.js";import{c as ts,u as ns}from"./hosted-reconcile-DRjsDibm.js";import{b as ls,a as as}from"./repository-binding-BVqJcY39.js";import{b as $e}from"./UserCheck01-DYJoLz9O.js";import{L as Ae,e as os,V as rs,_ as is}from"./agent-icon-CH_f-N3x.js";import{c as cs}from"./Tool01-DOdYsq79.js";import{i as ds}from"./SearchMd-DgVjcl_1.js";import{L as _e}from"./label-BWgTIudr.js";import{S as us}from"./switch-CFYJyn7X.js";import{T as fs}from"./textarea-CDH6DEPF.js";import{u as ms}from"./use-copy-3Av1V_Lb.js";import{D as ps}from"./section-array-field-e9ny1D-V.js";import{a2 as xs,a3 as ke,a4 as hs,a5 as Ee,w as bs,q as vs}from"./site-editor-toast-BEQHRuj3.js";import{X as ys,Y as js,O as ze,x as gs,Z as ks,_ as Ns}from"./blocks-tab-states-DBpi4m7n.js";import{X as Ss}from"./category-tree-BRAQfnIe.js";import{i as Ts}from"./ChevronSelectorVertical-D-BmJmT0.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-ClLr83k5.js";import{a as Rs,b as Ps,P as Os}from"./popover-BSXUrcE6.js";import{u as Ls}from"./chat-context-CtXhrjSm.js";import{a as $s}from"./MessageCircle01-DrWlC4OP.js";import{i as As}from"./Play-DGe00qZP.js";import{S as zs}from"./scroll-area-Cng2fvWP.js";import{c as ue,T as fe,a as me}from"./tooltip-C-37wWLH.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-D1CWShG9.js";import{S as Is}from"./save-status-z4LtIZ69.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-D1CWShG9.js"),__vite__mapDeps([0,1,2,3,4])).then(o=>({default:o.MonacoCodeEditor}))),te=o=>!!o&&typeof o=="object"&&!Array.isArray(o);function Js(o,e){return o("sandbox.schemaless.agentPrompt",{site:e?`"${e}"`:o("sandbox.schemaless.agentPromptSiteUnknown")})}function Vs(o){const e=W.c(56),{site:l,className:n}=o,t=X(),{handleCopy:a,copied:r}=ms();let i;e[0]!==n?(i=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=i):i=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(cs,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),e[2]=f):f=e[2];let p;e[3]!==t?(p=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=p):p=e[4];let b;e[5]!==p?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:p}),e[5]=p,e[6]=b):b=e[6];let h;e[7]!==t?(h=t("sandbox.schemaless.bannerBody"),e[7]=t,e[8]=h):h=e[8];let x;e[9]!==h?(x=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=x):x=e[10];let y;e[11]!==b||e[12]!==x?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[f,s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b,x]})]}),e[11]=b,e[12]=x,e[13]=y):y=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==t?(m=()=>{a(Js(t,l)).catch(()=>Pe.error(t("sandbox.schemaless.copyPromptFailed")))},e[14]=a,e[15]=l,e[16]=t,e[17]=m):m=e[17];let d;e[18]!==r?(d=r?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=r,e[19]=d):d=e[19];let u;e[20]!==r||e[21]!==t?(u=t(r?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=r,e[21]=t,e[22]=u):u=e[22];let c;e[23]!==u||e[24]!==m||e[25]!==d?(c=s.jsxs(K,{type:"button",variant:"outline",size:"sm",onClick:m,children:[d,u]}),e[23]=u,e[24]=m,e[25]=d,e[26]=c):c=e[26];let g;e[27]!==r||e[28]!==t?(g=r?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=r,e[28]=t,e[29]=g):g=e[29];let j;e[30]!==g?(j=s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g}),e[30]=g,e[31]=j):j=e[31];let v;e[32]!==t?(v=t("sandbox.schemaless.usesSkill"),e[32]=t,e[33]=v):v=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{"aria-hidden":"true",children:" · "}),e[34]=E):E=e[34];let k;e[35]!==t?(k=t("sandbox.schemaless.installSkill"),e[35]=t,e[36]=k):k=e[36];let S;e[37]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Oe,{"aria-hidden":"true",className:"size-3.5"}),e[37]=S):S=e[37];let N;e[38]!==t?(N=t("decoServe.docs.newTab"),e[38]=t,e[39]=N):N=e[39];let _;e[40]!==N?(_=s.jsx("span",{className:"sr-only",children:N}),e[40]=N,e[41]=_):_=e[41];let w;e[42]!==k||e[43]!==_?(w=s.jsxs("a",{href:ps,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[k,S,_]}),e[42]=k,e[43]=_,e[44]=w):w=e[44];let T;e[45]!==v||e[46]!==w?(T=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v,E,w]}),e[45]=v,e[46]=w,e[47]=T):T=e[47];let C;e[48]!==c||e[49]!==j||e[50]!==T?(C=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 pl-6",children:[c,j,T]}),e[48]=c,e[49]=j,e[50]=T,e[51]=C):C=e[51];let B;return e[52]!==i||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:i,children:[y,C]}),e[52]=i,e[53]=C,e[54]=y,e[55]=B):B=e[55],B}function Ds(o,e,l){if(te(o)){for(const n of["name","title","label"]){const t=o[n];if(typeof t=="string"&&t.trim())return t.trim()}if(typeof o.__resolveType=="string")return ke(o.__resolveType);for(const[n,t]of Object.entries(o)){if(n.startsWith("__")||typeof t!="string")continue;const a=t.trim();if(a&&a.length<=80&&!a.startsWith("<"))return a}}return l("sandbox.schemaless.item",{n:e+1})}const Fs=o=>`schemaless-${o.join(".")}`;function Us(o){const e=W.c(7),{id:l,value:n,onChange:t}=o;let a;e[0]!==n?(a=()=>n.includes(`
|
|
3
|
+
`)||n.length>80,e[0]=n,e[1]=a):a=e[1];const[r]=R.useState(a);let i;return e[2]!==l||e[3]!==r||e[4]!==t||e[5]!==n?(i=r?s.jsx(fs,{id:l,value:n,rows:Math.min(8,Math.max(3,n.split(`
|
|
4
|
+
`).length)),onChange:f=>t(f.target.value)}):s.jsx(ge,{id:l,value:n,onChange:f=>t(f.target.value)}),e[2]=l,e[3]=r,e[4]=t,e[5]=n,e[6]=i):i=e[6],i}function Ks(o){const e=W.c(15),{id:l,value:n,onChange:t}=o,a=X(),[r,i]=R.useState(String(n));let f;e[0]!==r?(f=Ee(r),e[0]=r,e[1]=f):f=e[1];const p=f===null;let b;e[2]!==t?(b=m=>{i(m.target.value);const d=Ee(m.target.value);d!==null&&t(d)},e[2]=t,e[3]=b):b=e[3];let h;e[4]!==l||e[5]!==p||e[6]!==b||e[7]!==r?(h=s.jsx(ge,{id:l,inputMode:"decimal",value:r,"aria-invalid":p,onChange:b}),e[4]=l,e[5]=p,e[6]=b,e[7]=r,e[8]=h):h=e[8];let x;e[9]!==p||e[10]!==a?(x=p&&s.jsx("p",{className:"text-xs text-destructive",children:a("sandbox.schemaless.notANumber")}),e[9]=p,e[10]=a,e[11]=x):x=e[11];let y;return e[12]!==h||e[13]!==x?(y=s.jsxs("div",{className:"flex flex-col gap-1",children:[h,x]}),e[12]=h,e[13]=x,e[14]=y):y=e[14],y}function Me(o){const e=W.c(67),{label:l,value:n,path:t,depth:a,onChange:r}=o,i=X();let f;e[0]!==t?(f=Fs(t),e[0]=t,e[1]=f):f=e[1];const p=f;if(typeof n=="boolean"){let m;e[2]!==p||e[3]!==l?(m=s.jsx(_e,{htmlFor:p,className:"min-w-0 truncate",children:l}),e[2]=p,e[3]=l,e[4]=m):m=e[4];let d;e[5]!==r||e[6]!==t?(d=g=>r(t,g),e[5]=r,e[6]=t,e[7]=d):d=e[7];let u;e[8]!==p||e[9]!==d||e[10]!==n?(u=s.jsx(us,{id:p,checked:n,onCheckedChange:d}),e[8]=p,e[9]=d,e[10]=n,e[11]=u):u=e[11];let c;return e[12]!==m||e[13]!==u?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,u]}),e[12]=m,e[13]=u,e[14]=c):c=e[14],c}if(typeof n=="string"||typeof n=="number"){let m;e[15]!==p||e[16]!==l?(m=s.jsx(_e,{htmlFor:p,className:"min-w-0 truncate",children:l}),e[15]=p,e[16]=l,e[17]=m):m=e[17];let d;e[18]!==p||e[19]!==r||e[20]!==t||e[21]!==n?(d=typeof n=="string"?s.jsx(Us,{id:p,value:n,onChange:c=>r(t,c)}):s.jsx(Ks,{id:p,value:n,onChange:c=>r(t,c)}),e[18]=p,e[19]=r,e[20]=t,e[21]=n,e[22]=d):d=e[22];let u;return e[23]!==m||e[24]!==d?(u=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,d]}),e[23]=m,e[24]=d,e[25]=u):u=e[25],u}if(Array.isArray(n)||te(n)){let m,d,u,c,g;if(e[26]!==a||e[27]!==l||e[28]!==r||e[29]!==t||e[30]!==i||e[31]!==n){const E=Array.isArray(n)?n.map((T,C)=>[Ds(T,C,i),T,C]):Object.entries(n).filter(Gs).map(Ws),k=te(n)&&typeof n.__resolveType=="string"?n.__resolveType:null;u=a===0,c="group rounded-md border border-border";let S;e[37]!==l?(S=s.jsx("span",{className:"min-w-0 truncate",children:l}),e[37]=l,e[38]=S):S=e[38];let N;e[39]!==k?(N=k&&s.jsx("span",{className:"min-w-0 truncate font-mono text-xs font-normal text-muted-foreground",title:k,children:ke(k)}),e[39]=k,e[40]=N):N=e[40];let _;e[41]!==i||e[42]!==n?(_=Array.isArray(n)?i("sandbox.schemaless.itemCount",{count:n.length}):null,e[41]=i,e[42]=n,e[43]=_):_=e[43];let w;e[44]!==_?(w=s.jsx("span",{className:"ml-auto shrink-0 text-xs font-normal text-muted-foreground",children:_}),e[44]=_,e[45]=w):w=e[45],e[46]!==w||e[47]!==S||e[48]!==N?(g=s.jsxs("summary",{className:"flex cursor-pointer select-none items-center gap-2 px-3 py-2 text-sm font-medium text-foreground",children:[S,N,w]}),e[46]=w,e[47]=S,e[48]=N,e[49]=g):g=e[49],m="flex flex-col gap-4 border-t border-border px-3 py-3",d=E.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.schemaless.empty")}):E.map(T=>{const[C,B,O]=T;return s.jsx(Me,{label:C,value:B,path:[...t,O],depth:a+1,onChange:r},O)}),e[26]=a,e[27]=l,e[28]=r,e[29]=t,e[30]=i,e[31]=n,e[32]=m,e[33]=d,e[34]=u,e[35]=c,e[36]=g}else m=e[32],d=e[33],u=e[34],c=e[35],g=e[36];let j;e[50]!==m||e[51]!==d?(j=s.jsx("div",{className:m,children:d}),e[50]=m,e[51]=d,e[52]=j):j=e[52];let v;return e[53]!==u||e[54]!==c||e[55]!==g||e[56]!==j?(v=s.jsxs("details",{open:u,className:c,children:[g,j]}),e[53]=u,e[54]=c,e[55]=g,e[56]=j,e[57]=v):v=e[57],v}let b;e[58]!==l?(b=s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:l}),e[58]=l,e[59]=b):b=e[59];let h;e[60]!==i?(h=i("sandbox.schemaless.notSet"),e[60]=i,e[61]=h):h=e[61];let x;e[62]!==h?(x=s.jsx("span",{className:"text-xs text-muted-foreground",children:h}),e[62]=h,e[63]=x):x=e[63];let y;return e[64]!==b||e[65]!==x?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b,x]}),e[64]=b,e[65]=x,e[66]=y):y=e[66],y}function Ws(o){const[e,l]=o;return[e,l,e]}function Gs(o){const[e]=o;return e!=="__resolveType"}function qs({blockKey:o,block:e,onChange:l,onBack:n,onOpenBlock:t}){const a=X(),[r,i]=R.useState(()=>(t?.(o),e)),[f,p]=R.useState(0),[b,h]=R.useState(null),[x,y]=R.useState(!1),m=v=>{i(v),l(o,v)},d=typeof r.__resolveType=="string"?r.__resolveType:null,u=Object.entries(r).filter(([v])=>v!=="__resolveType"),c=()=>{b!==null?(h(null),y(!1),p(v=>v+1)):h(JSON.stringify(r,null,2))},g=v=>{try{const E=JSON.parse(v??"");if(te(E)){y(!1),m(E);return}}catch{}y(!0)},j=a(b!==null?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson");return s.jsxs("div",{className:"flex h-full min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2",children:[n&&s.jsxs(K,{variant:"ghost",size:"sm",className:"shrink-0",onClick:n,children:[s.jsx($e,{"aria-hidden":"true"}),a("sandbox.schemaless.back")]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("h3",{className:"truncate text-sm font-medium",title:o,children:o}),d&&s.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:d,children:d})]}),s.jsx(K,{variant:b!==null?"default":"ghost",size:"icon",className:"shrink-0",onClick:c,"aria-label":j,"aria-pressed":b!==null,title:j,children:b!==null?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})]}),s.jsxs("div",{className:"relative min-h-0 flex-1",children:[s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("form",{"aria-label":o,className:"mx-auto flex max-w-2xl flex-col gap-4 px-6 py-4",onSubmit:v=>v.preventDefault(),children:u.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.schemaless.empty")}):u.map(([v,E])=>s.jsx(Me,{label:v,value:E,path:[v],depth:0,onChange:(k,S)=>m(hs(r,k,S))},v))},f)}),b!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[x&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:a("sandbox.savedSectionEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),children:s.jsx(Ms,{language:"json",height:"100%",code:b,onChange:g})})})]})]})]})}function Hs(o){const e=W.c(70),{decofile:l,onChange:n,onLeaveBlock:t,onOpenBlock:a,wrapEditor:r,v8:i,copyEpochOf:f,site:p,initialKey:b,compact:h}=o,x=i===void 0?!1:i,y=p===void 0?null:p,m=b===void 0?null:b,d=h===void 0?!1:h,u=X(),[c,g]=R.useState(m&&te(l[m])?m:null),[j,v]=R.useState("");let E;e[0]!==t||e[1]!==a||e[2]!==c||e[3]!==x?(E=A=>{A!==c&&(t?.(),!x&&A!==null&&a?.(A),g(A))},e[0]=t,e[1]=a,e[2]=c,e[3]=x,e[4]=E):E=e[4];const k=E;let S;e[5]!==f||e[6]!==c?(S=c?f?.(c)??0:0,e[5]=f,e[6]=c,e[7]=S):S=e[7];const N=S,[_,w]=R.useState(N);_!==N&&(w(N),!x&&c!==null&&a?.(c));const T=c?l[c]:void 0;let C,B,O,J,P;if(e[8]!==d||e[9]!==l||e[10]!==j||e[11]!==k||e[12]!==c||e[13]!==u){const A=j.trim().toLowerCase(),F=xs(l).map(M=>({...M,blocks:A?M.blocks.filter(U=>U.label.toLowerCase().includes(A)||U.key.toLowerCase().includes(A)||(M.resolveType??"").toLowerCase().includes(A)):M.blocks})).filter(Ys),pe=Object.keys(l).length;e[19]!==u?(P=u("sandbox.schemaless.listLabel"),e[19]=u,e[20]=P):P=e[20];const ie=d?"flex-1":"w-72 shrink-0 border-r";e[21]!==ie?(C=ne("flex min-h-0 flex-col",ie),e[21]=ie,e[22]=C):C=e[22];let se;e[23]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(ds,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"}),e[23]=se):se=e[23];let ae;e[24]===Symbol.for("react.memo_cache_sentinel")?(ae=M=>v(M.target.value),e[24]=ae):ae=e[24];let H;e[25]!==u?(H=u("sandbox.schemaless.searchPlaceholder"),e[25]=u,e[26]=H):H=e[26];let Y;e[27]!==u?(Y=u("sandbox.schemaless.searchPlaceholder"),e[27]=u,e[28]=Y):Y=e[28],e[29]!==j||e[30]!==H||e[31]!==Y?(B=s.jsx("div",{className:"shrink-0 border-b p-2",children:s.jsxs("div",{className:"relative",children:[se,s.jsx(ge,{type:"search",value:j,onChange:ae,placeholder:H,"aria-label":Y,className:"pl-8"})]})}),e[29]=j,e[30]=H,e[31]=Y,e[32]=B):B=e[32],O="min-h-0 flex-1 overflow-y-auto py-1",J=pe===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noBlocks")}):F.length===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noMatches")}):F.map(M=>s.jsxs("section",{"aria-label":M.resolveType??u("sandbox.schemaless.noType"),className:"py-1",children:[s.jsxs("h3",{className:"flex items-baseline gap-2 px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground",title:M.resolveType??void 0,children:[s.jsx("span",{className:"truncate",children:M.resolveType?ke(M.resolveType):u("sandbox.schemaless.noType")}),s.jsx("span",{className:"ml-auto shrink-0 tabular-nums",children:M.blocks.length})]}),s.jsx("ul",{children:M.blocks.map(U=>s.jsx("li",{children:s.jsx("button",{type:"button",onClick:()=>k(U.key),"aria-current":U.key===c?"true":void 0,title:U.key,className:ne("block w-full truncate px-3 py-1.5 text-left text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",U.key===c&&"bg-accent font-medium"),children:U.label})},U.key))})]},M.resolveType??"")),e[8]=d,e[9]=l,e[10]=j,e[11]=k,e[12]=c,e[13]=u,e[14]=C,e[15]=B,e[16]=O,e[17]=J,e[18]=P}else C=e[14],B=e[15],O=e[16],J=e[17],P=e[18];let $;e[33]!==O||e[34]!==J?($=s.jsx("div",{className:O,children:J}),e[33]=O,e[34]=J,e[35]=$):$=e[35];let D;e[36]!==C||e[37]!==B||e[38]!==$||e[39]!==P?(D=s.jsxs("nav",{"aria-label":P,className:C,children:[B,$]}),e[36]=C,e[37]=B,e[38]=$,e[39]=P,e[40]=D):D=e[40];const I=D;let L;e[41]!==T||e[42]!==d||e[43]!==f||e[44]!==n||e[45]!==a||e[46]!==k||e[47]!==c||e[48]!==u||e[49]!==x?(L=c&&te(T)?s.jsx(qs,{blockKey:c,block:T,onOpenBlock:x?a:void 0,onChange:n,onBack:d?()=>k(null):void 0},`${c}:${f?.(c)??0}`):s.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-center p-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:u("sandbox.schemaless.pickBlock")})}),e[41]=T,e[42]=d,e[43]=f,e[44]=n,e[45]=a,e[46]=k,e[47]=c,e[48]=u,e[49]=x,e[50]=L):L=e[50];const Q=L;let Z;e[51]!==Q||e[52]!==c||e[53]!==x||e[54]!==r?(Z=x&&c&&r?r(c,Q):Q,e[51]=Q,e[52]=c,e[53]=x,e[54]=r,e[55]=Z):Z=e[55];const ee=Z;let G;e[56]!==y?(G=s.jsx(Vs,{site:y}),e[56]=y,e[57]=G):G=e[57];let V;e[58]!==T||e[59]!==d||e[60]!==ee||e[61]!==I||e[62]!==c?(V=d&&c&&te(T)?ee:I,e[58]=T,e[59]=d,e[60]=ee,e[61]=I,e[62]=c,e[63]=V):V=e[63];const re=!d&ⅇlet q;e[64]!==V||e[65]!==re?(q=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[V,re]}),e[64]=V,e[65]=re,e[66]=q):q=e[66];let le;return e[67]!==G||e[68]!==q?(le=s.jsxs("div",{"data-testid":"schemaless-content",className:"flex h-full min-h-0 w-full flex-col",children:[G,q]}),e[67]=G,e[68]=q,e[69]=le):le=e[69],le}function Ys(o){return o.blocks.length>0}function At(o){const e=W.c(35),{orgSlug:l,virtualMcpId:n,branch:t,decofile:a,initialKey:r,compact:i}=o,f=ls(n)?.metadata;let p;e[0]!==f?(p=Ke(f),e[0]=f,e[1]=p):p=e[1];const b=p;let h;e[2]!==t||e[3]!==l||e[4]!==n?(h={orgSlug:l,virtualMcpId:n,branch:t},e[2]=t,e[3]=l,e[4]=n,e[5]=h):h=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x={holdsCopy:!0},e[6]=x):x=e[6];const{save:y,flush:m,hold:d,v8:u}=Le(h,x);let c;e[7]!==t||e[8]!==l||e[9]!==n?(c=ts({orgSlug:l,virtualMcpId:n,branch:t}),e[7]=t,e[8]=l,e[9]=n,e[10]=c):c=e[10];const g=ns(c);let j;e[11]!==m?(j=()=>m(),e[11]=m,e[12]=j):j=e[12];const v=R.useEffectEvent(j);let E;e[13]!==v?(E=()=>()=>v(),e[13]=v,e[14]=E):E=e[14];let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=[],e[15]=k):k=e[15],R.useEffect(E,k);let S;e[16]!==y?(S=(w,T)=>y(w,T),e[16]=y,e[17]=S):S=e[17];let N;e[18]!==t||e[19]!==a||e[20]!==l||e[21]!==u||e[22]!==n?(N=u?(w,T)=>s.jsx(Ye,{listing:a,scope:{orgSlug:l,virtualMcpId:n,branch:t},names:[w],children:T}):void 0,e[18]=t,e[19]=a,e[20]=l,e[21]=u,e[22]=n,e[23]=N):N=e[23];let _;return e[24]!==i||e[25]!==g||e[26]!==a||e[27]!==m||e[28]!==d||e[29]!==r||e[30]!==b||e[31]!==N||e[32]!==S||e[33]!==u?(_=s.jsx(Hs,{decofile:a,site:b,onChange:S,onLeaveBlock:m,onOpenBlock:d,v8:u,wrapEditor:N,copyEpochOf:g,initialKey:r,compact:i}),e[24]=i,e[25]=g,e[26]=a,e[27]=m,e[28]=d,e[29]=r,e[30]=b,e[31]=N,e[32]=S,e[33]=u,e[34]=_):_=e[34],_}const we={resolveType:"website/pages/Page.tsx",seoResolveType:"website/sections/Seo/SeoV2.tsx"};function zt(o){return`pages-${encodeURIComponent(o)}-${crypto.randomUUID()}`}function It(o,e,l){if(bs(l))return{name:o,path:e,sections:[],__resolveType:"page"};const n=ys(l??void 0);if(!l||js(n))return{name:o,path:e,sections:[],seo:{__resolveType:we.seoResolveType},__resolveType:we.resolveType};const t=Ss(l);return{name:o,path:e,sections:[],...t?{seo:{__resolveType:t}}:{},__resolveType:n}}const Be="__blank__";function Mt(o){const e=W.c(65),{id:l,value:n,onChange:t,templates:a,disabled:r}=o,i=X(),[f,p]=R.useState(!1);let b;if(e[0]!==a||e[1]!==n){let I;e[3]!==n?(I=L=>L.key===n,e[3]=n,e[4]=I):I=e[4],b=a.find(I),e[0]=a,e[1]=n,e[2]=b}else b=e[2];const h=b;let x;e[5]!==h?.name||e[6]!==i?(x=h?.name??i("sectionsEditor.pageTemplateSelect.blankPageDefaultLabel"),e[5]=h?.name,e[6]=i,e[7]=x):x=e[7];let y;e[8]!==x?(y=s.jsx("span",{className:"max-w-full shrink-0 truncate",children:x}),e[8]=x,e[9]=y):y=e[9];let m;e[10]!==h?(m=h?.path?s.jsx("span",{className:"truncate text-muted-foreground",children:h.path}):null,e[10]=h,e[11]=m):m=e[11];let d;e[12]!==y||e[13]!==m?(d=s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[y,m]}),e[12]=y,e[13]=m,e[14]=d):d=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ts,{className:"shrink-0 opacity-50"}),e[15]=u):u=e[15];let c;e[16]!==r||e[17]!==l||e[18]!==f||e[19]!==d?(c=s.jsx(Rs,{asChild:!0,children:s.jsxs(K,{id:l,type:"button",variant:"outline",role:"combobox","aria-expanded":f,disabled:r,className:"w-full justify-between font-normal contain-inline-size",children:[d,u]})}),e[16]=r,e[17]=l,e[18]=f,e[19]=d,e[20]=c):c=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[21]=g):g=e[21];let j;e[22]!==i?(j=i("sectionsEditor.pageTemplateSelect.searchPlaceholder"),e[22]=i,e[23]=j):j=e[23];let v;e[24]!==j?(v=s.jsx(_s,{placeholder:j,className:"h-9"}),e[24]=j,e[25]=v):v=e[25];let E;e[26]!==i?(E=i("sectionsEditor.pageTemplateSelect.noPagesFoundMessage"),e[26]=i,e[27]=E):E=e[27];let k;e[28]!==E?(k=s.jsx(Es,{children:E}),e[28]=E,e[29]=k):k=e[29];let S;e[30]!==i?(S=i("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[30]=i,e[31]=S):S=e[31];let N;e[32]!==t?(N=()=>{t(Be),p(!1)},e[32]=t,e[33]=N):N=e[33];let _;e[34]!==i?(_=i("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[34]=i,e[35]=_):_=e[35];const w=n===Be?"opacity-100":"opacity-0";let T;e[36]!==w?(T=ne("ml-auto",w),e[36]=w,e[37]=T):T=e[37];let C;e[38]!==T?(C=s.jsx(ve,{className:T}),e[38]=T,e[39]=C):C=e[39];let B;e[40]!==S||e[41]!==N||e[42]!==_||e[43]!==C?(B=s.jsxs(Ce,{value:S,onSelect:N,children:[_,C]}),e[40]=S,e[41]=N,e[42]=_,e[43]=C,e[44]=B):B=e[44];let O;if(e[45]!==t||e[46]!==a||e[47]!==n){let I;e[49]!==t||e[50]!==n?(I=L=>s.jsxs(Ce,{value:`${L.name} ${L.path}`,onSelect:()=>{t(L.key),p(!1)},children:[s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:L.name}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:L.path})]}),s.jsx(ve,{className:ne("ml-auto",n===L.key?"opacity-100":"opacity-0")})]},L.key),e[49]=t,e[50]=n,e[51]=I):I=e[51],O=a.map(I),e[45]=t,e[46]=a,e[47]=n,e[48]=O}else O=e[48];let J;e[52]!==B||e[53]!==O?(J=s.jsxs(Cs,{children:[B,O]}),e[52]=B,e[53]=O,e[54]=J):J=e[54];let P;e[55]!==k||e[56]!==J?(P=s.jsxs(ws,{onWheel:Xs,children:[k,J]}),e[55]=k,e[56]=J,e[57]=P):P=e[57];let $;e[58]!==v||e[59]!==P?($=s.jsx(Ps,{className:"p-0",style:g,children:s.jsxs(Bs,{children:[v,P]})}),e[58]=v,e[59]=P,e[60]=$):$=e[60];let D;return e[61]!==f||e[62]!==$||e[63]!==c?(D=s.jsxs(Os,{open:f,onOpenChange:p,children:[c,$]}),e[61]=f,e[62]=$,e[63]=c,e[64]=D):D=e[64],D}function Xs(o){const e=o.deltaMode===1?16:1;o.currentTarget.scrollTop=o.currentTarget.scrollTop+o.deltaY*e}function Qs(o){const e=W.c(13),{crumbs:l,onSelect:n,onSelectRoot:t}=o;let a;e[0]!==n||e[1]!==t?(a=t??(()=>n(0)),e[0]=n,e[1]=t,e[2]=a):a=e[2];let r;e[3]!==a?(r={onSelect:a},e[3]=a,e[4]=r):r=e[4];let i;if(e[5]!==l||e[6]!==n){let p;e[8]!==n?(p=(b,h)=>({key:`block-${h}`,label:Xe(b),onSelect:()=>n(h)}),e[8]=n,e[9]=p):p=e[9],i=l.map(p),e[5]=l,e[6]=n,e[7]=i}else i=e[7];let f;return e[10]!==r||e[11]!==i?(f=s.jsx(We.Breadcrumbs,{after:"page",parent:r,items:i}),e[10]=r,e[11]=i,e[12]=f):f=e[12],f}const Zs={loaders:"loader",actions:"action"},Je=new Set(["workflows"]);function et(o){return Zs[o]}function Ve(o,e,l){const n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(l)&&e in a)return!0;return!1}function st(o,e,l){return/\.tsx?$/.test(e)?!0:Ve(o,e,l)}function Jt(o,e){const l=new Set,n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(e))for(const r of Object.keys(a))l.add(r);return l}function tt(o,e){return/\.tsx?$/.test(o)?!1:e.has(`${o}.ts`)||e.has(`${o}.tsx`)}function nt(o,e){const l=o.manifest?.blocks??{},n=[],t=new Set;for(const[a,r]of Object.entries(l))if(a.includes(e))for(const i of Object.keys(r))t.add(i);for(const a of t){if(a.toLowerCase().includes("preview")||ze.has(a)||Je.has(Ne(a))||tt(a,t))continue;const r=gs(a,o);if(r.hidden)continue;const i=r.title&&r.title!==a?r.title:ce(a);n.push({resolveType:a,title:i})}return n.sort((a,r)=>a.title.localeCompare(r.title))}function Vt(o,e){return nt(o,e).length}function Ne(o){return o.startsWith("deco-sites/")?o.split("/")[1]||"site":o.startsWith("$live")||o.startsWith("deco/")?"deco":o.split("/")[0]||"other"}const lt={deco:"Deco",std:"Deco Standard",website:"Website"};function Dt(o){return lt[o]??o}function Ft(o){const e=Ne(o);let n=o.split("/").filter(Boolean).slice(o.startsWith("deco-sites/")?2:1);return(n[0]==="loaders"||n[0]==="actions")&&(n=n.slice(1)),[e,...n.slice(0,-1)]}function Ut(o,e,l){const n=[];for(const[t,a]of Object.entries(e)){if(st(o,t,l)||Ge(t)||!a||typeof a!="object"||Array.isArray(a))continue;const r=a,i=r.__resolveType;typeof i=="string"&&(ze.has(i)||Je.has(Ne(i))||Ve(o,i,l)&&n.push({key:t,resolveType:i,title:typeof r.name=="string"&&r.name?r.name:t}))}return n.sort((t,a)=>t.title.localeCompare(a.title))}function Kt(o,e){const l=o[e],n=typeof l?.__resolveType=="string"?l.__resolveType:"",{__resolveType:t,...a}=l??{},r=typeof l?.name=="string"&&l.name?l.name:e;return{resolveType:n,props:a,title:r}}const Re=3e4;function at(o,e,l,n){const t=new URL(`/deco/invoke/${e}`,o);return t.searchParams.set("__cb",n.toString(36)),t.searchParams.set("__decoFBT","0"),t.searchParams.set("__d",`run-${n.toString(36)}`),t.searchParams.set("props",btoa(encodeURIComponent(JSON.stringify(l)))),t.href}async function ot(o,{resolveType:e,props:l}){let n;try{n=await fetch(vs(o),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...l}),signal:AbortSignal.timeout(Re)})}catch(i){throw i instanceof DOMException&&i.name==="TimeoutError"?new Error(`Run timed out after ${Re/1e3}s — the block may be slow or the preview unresponsive.`):i}const t=await n.text();let a=null,r=!1;try{a=t?JSON.parse(t):null,r=!0}catch{}if(!n.ok){const i=r&&a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:t||`Run failed (${n.status})`;throw new Error(i)}return r?a:t}function rt(o){const e=W.c(2);let l;return e[0]!==o?(l={mutationFn:n=>ot(o,n)},e[0]=o,e[1]=l):l=e[1],qe(l)}function Wt({orgSlug:o,virtualMcpId:e,branch:l,previewUrl:n,meta:t,decofile:a,kind:r,target:i,initialValue:f,isCreating:p,onCreate:b,onSaveReferencedBlock:h,onBack:x,backLabel:y,showRun:m=!0}){const d=Ls(),u=d?.taskId??null,c=X(),g=d?.virtualMcpId,v=as(g===e?e:null)?.metadata?.siteSlug??null,E=Qe(i.resolveType,t),k=!E&&ks(i.resolveType,t),S=k?Ns(f):null,N=E??S,[_,w]=R.useState(f),[T,C]=R.useState([]),[B,O]=R.useState(0),[J,P]=R.useState(!1),[$,D]=R.useState(null),[I,L]=R.useState(!1),[Q,Z]=R.useState(!1),[ee,G]=R.useState(!1),V=$!==null,{save:re,flush:q,isPending:le}=Le({orgSlug:o,virtualMcpId:e,branch:l},{holdsCopy:i.mode==="saved"}),A=rt({orgSlug:o,virtualMcpId:e,branch:l,threadId:u});R.useEffect(()=>()=>{q()},[]);const F=et(r),pe=i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")??i.resolveType,ie={orgSlug:o,virtualMcpId:e,branch:l,threadId:u,previewUrl:n??void 0,siteSlug:v},se=z=>{w(z),i.mode==="saved"&&re(i.blockKey,{__resolveType:i.resolveType,...z})},ae=()=>{V?(D(null),P(!1),O(z=>z+1)):D(JSON.stringify(_,null,2))},H=z=>{const oe=z??"";try{const de=JSON.parse(oe);if(de&&typeof de=="object"&&!Array.isArray(de)){P(!1),se(de);return}P(!0)}catch{P(!0)}},Y=async z=>{const oe=ss(z,a);if(oe){Pe.error(oe);return}await b(z,{__resolveType:i.resolveType,..._}),L(!1)},M=()=>{Z(!0),A.mutate({resolveType:i.resolveType,props:_})},U=()=>{n&&window.open(at(n,i.resolveType,_,Date.now()),"_blank","noopener")},De=[i.title,...T],Fe=z=>{C(T.slice(0,z)),O(oe=>oe+1)};return s.jsxs("div",{className:"flex h-full w-full min-w-0 flex-col",children:[s.jsx(Qs,{crumbs:De,onSelect:Fe,onSelectRoot:x}),s.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[x&&y&&s.jsxs(K,{variant:"ghost",size:"sm",className:"-ml-1 min-w-0 shrink gap-1",onClick:x,children:[s.jsx($e,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:y})]}),s.jsx("div",{className:"flex-1"}),i.mode==="saved"&&s.jsx(Is,{isPending:le,isError:!1}),m&&s.jsxs(K,{size:"default",variant:"outline",className:"shrink-0 gap-1.5",onClick:M,disabled:A.isPending,"aria-label":c("sandbox.runnableBlockEditor.runAriaLabel",{singular:F}),children:[A.isPending?s.jsx(je,{className:"size-3.5"}):s.jsx(As,{size:14}),c("sandbox.runnableBlockEditor.run")]}),i.mode==="available"&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{size:"icon",className:"shrink-0",disabled:p,onClick:()=>L(!0),"aria-label":c("sandbox.runnableBlockEditor.saveAsGlobalAriaLabel",{singular:F}),children:s.jsx(rs,{size:14})})}),s.jsx(me,{side:"bottom",children:c("sandbox.runnableBlockEditor.saveAsGlobal",{singular:F})})]}),s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:V?"default":"ghost",size:"icon",className:"shrink-0",onClick:ae,"aria-label":c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson"),"aria-pressed":V,children:V?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})}),s.jsx(me,{side:"bottom",children:c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson")})]})]}),s.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:i.mode==="saved"?c("sandbox.runnableBlockEditor.savedModeDescription",{singular:F}):c("sandbox.runnableBlockEditor.availableModeDescription",{typeLabel:pe,singular:F})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[s.jsxs("div",{className:ne("relative min-h-0 flex-1",Q&&ee&&"hidden"),children:[s.jsx(zs,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsxs("div",{className:"mx-auto max-w-2xl",children:[S&&N===S&&s.jsx("p",{className:"mb-3 rounded-md bg-muted px-3 py-2 text-xs leading-snug text-muted-foreground",children:c("sandbox.runnableBlockEditor.inferredSchemaNotice",{singular:F})}),N?s.jsx(Ze,{schema:N,value:_,onChange:z=>se(z),basePath:"",breadcrumbPath:T,onBreadcrumbChange:C,meta:t,decofile:a,onSaveReferencedBlock:h,sandbox:ie},B):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:k?c("sandbox.runnableBlockEditor.freeformPropsEmptyState",{singular:F}):c("sandbox.runnableBlockEditor.noInputEmptyState",{singular:F})})]})})}),$!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[J&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.runnableBlockEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Ie,{language:"json",height:"100%",code:$,onChange:H,onSave:z=>{H(z),q()}})})]})]}),Q&&s.jsx(it,{singular:F,result:{isPending:A.isPending,error:A.error,data:A.data,hasRun:A.status!=="idle"},expanded:ee,onToggleExpand:()=>G(z=>!z),onOpenInNewTab:n?U:void 0,onClose:()=>{Z(!1),G(!1)}})]}),s.jsx(es,{open:I,onOpenChange:L,defaultBlockId:"",isPending:p,onSubmit:Y})]})}function it(o){const e=W.c(54),{singular:l,result:n,expanded:t,onToggleExpand:a,onOpenInNewTab:r,onClose:i}=o,f=X();let p;e[0]!==n.data?(p=typeof n.data=="string"?n.data:JSON.stringify(n.data??null,null,2),e[0]=n.data,e[1]=p):p=e[1];const b=p,h=t?"flex-1":"h-[45%] shrink-0";let x;e[2]!==h?(x=ne("flex min-h-0 flex-col border-t",h),e[2]=h,e[3]=x):x=e[3];let y;e[4]!==f?(y=f("sandbox.runnableBlockEditor.resultPanelTitle"),e[4]=f,e[5]=y):y=e[5];let m;e[6]!==y?(m=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:y}),e[6]=y,e[7]=m):m=e[7];let d;e[8]!==r||e[9]!==l||e[10]!==f?(d=r&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:r,"aria-label":f("sandbox.runnableBlockEditor.openResultInNewTabAriaLabel"),children:s.jsx(Oe,{size:14})})}),s.jsx(me,{side:"bottom",children:f("sandbox.runnableBlockEditor.openInNewTabTooltip",{singular:l})})]}),e[8]=r,e[9]=l,e[10]=f,e[11]=d):d=e[11];let u;e[12]!==t||e[13]!==f?(u=f(t?"sandbox.runnableBlockEditor.collapseResult":"sandbox.runnableBlockEditor.expandResult"),e[12]=t,e[13]=f,e[14]=u):u=e[14];let c;e[15]!==t?(c=t?s.jsx(is,{size:14}):s.jsx($s,{size:14}),e[15]=t,e[16]=c):c=e[16];let g;e[17]!==t||e[18]!==a||e[19]!==u||e[20]!==c?(g=s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":u,"aria-pressed":t,children:c})}),e[17]=t,e[18]=a,e[19]=u,e[20]=c,e[21]=g):g=e[21];let j;e[22]!==t||e[23]!==f?(j=f(t?"sandbox.runnableBlockEditor.collapse":"sandbox.runnableBlockEditor.expand"),e[22]=t,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(me,{side:"bottom",children:j}),e[25]=j,e[26]=v):v=e[26];let E;e[27]!==v||e[28]!==g?(E=s.jsxs(ue,{children:[g,v]}),e[27]=v,e[28]=g,e[29]=E):E=e[29];let k;e[30]!==f?(k=f("sandbox.runnableBlockEditor.closeResult"),e[30]=f,e[31]=k):k=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ye,{size:14}),e[32]=S):S=e[32];let N;e[33]!==i||e[34]!==k?(N=s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":k,children:S}),e[33]=i,e[34]=k,e[35]=N):N=e[35];let _;e[36]!==E||e[37]!==N||e[38]!==d?(_=s.jsxs("div",{className:"flex items-center gap-0.5",children:[d,E,N]}),e[36]=E,e[37]=N,e[38]=d,e[39]=_):_=e[39];let w;e[40]!==_||e[41]!==m?(w=s.jsxs("div",{className:"flex h-9 shrink-0 items-center justify-between border-b px-3",children:[m,_]}),e[40]=_,e[41]=m,e[42]=w):w=e[42];let T;e[43]!==n.error||e[44]!==n.hasRun||e[45]!==n.isPending||e[46]!==b||e[47]!==l||e[48]!==f?(T=s.jsx("div",{className:"min-h-0 flex-1",children:n.isPending?s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-xs text-muted-foreground",children:[s.jsx(je,{className:"size-4"}),f("sandbox.runnableBlockEditor.running",{singular:l})]}):n.error?s.jsxs("div",{className:"h-full overflow-auto px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-destructive",children:f("sandbox.runnableBlockEditor.failedToRun",{singular:l})}),s.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-destructive/90",children:n.error.message})]}):n.hasRun?s.jsx(Ie,{language:"json",height:"100%",code:b,readOnly:!0}):s.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:f("sandbox.runnableBlockEditor.pressRunToInvoke",{singular:l})})}),e[43]=n.error,e[44]=n.hasRun,e[45]=n.isPending,e[46]=b,e[47]=l,e[48]=f,e[49]=T):T=e[49];let C;return e[50]!==w||e[51]!==T||e[52]!==x?(C=s.jsxs("div",{className:x,children:[w,T]}),e[50]=w,e[51]=T,e[52]=x,e[53]=C):C=e[53],C}function be(o,e,l){const n=l[o];return typeof n?.name=="string"&&n.name||o.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase())||`Section ${e+1}`}function Gt(o,e,l=!1){return o.map((n,t)=>{const a=n.__resolveType??"",r=Se(a);if(!r&&a!==""&&xe(a)&&a in e)return{index:t,resolveType:a,label:be(a,t,e),isLazy:!1,isSavedBlock:!0};const i=r?n.section:void 0,f=r?i?.__resolveType??"":a;if(Te(f,l)){const b=r?i:n,h=Array.isArray(b?.variants)?b.variants:[];if(h.length===1&&He(h[0]?.rule?.__resolveType,l)){const m=he(h[0],l)??{};let d=m.__resolveType??"";const u=Se(d);let c=m;if(u){const g=m.section;d=g?.__resolveType??d,g&&(c=g)}if(Te(d,l)){const g=Array.isArray(c.variants)?c.variants:[],j=he(g[0],l)?.__resolveType,v=j?ce(j):"Section";return{index:t,resolveType:a,label:`Variants of ${v}`,variantOf:v,isHidden:!0,isLazy:u}}return d!==""&&xe(d)&&d in e?{index:t,resolveType:a,label:be(d,t,e),isHidden:!0,isLazy:u,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(d)||`Section ${t+1}`,isHidden:!0,isLazy:u}}const x=he(h[0],l)?.__resolveType,y=x?ce(x):"Section";return{index:t,resolveType:a,label:`Variants of ${y}`,variantOf:y,isMultivariate:!0,isLazy:r}}const p=r?n.section?.__resolveType??a:a;return r&&p!==""&&xe(p)&&p in e?{index:t,resolveType:a,label:be(p,t,e),isLazy:!0,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(p)||`Section ${t+1}`,isLazy:r}})}function qt(o){let e=o.length;for(;e>0&&o[e-1]?.isSavedBlock;)e--;return e>0?e:Math.max(o.length-1,0)}export{Be as B,Mt as P,Wt as R,At as S,nt as a,Ft as b,It as c,Dt as d,et as e,Qs as f,zt as g,Vt as h,Ut as l,Jt as m,qt as n,Gt as p,Kt as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m,j as i}from"./index-CaT4JsCE.js";import{ChatLayout as p}from"./index-zeN-7Cn6.js";import{C as e,P as a}from"./plan-page-DdRlUMZj.js";import{u as n}from"./use-organization-settings-DsOm4fQ2.js";import"./use-mobile-CLhCB1ec.js";import"./tooltip-C-37wWLH.js";import"./index-BzVjoBZR.js";import"./MessageCircle01-DrWlC4OP.js";import"./XClose-kwcMavwj.js";import"./thread-button-BAd68SAf.js";import"./use-sidebar-collapsed-D7vF4wTU.js";import"./sheet-CF7PsYXH.js";import"./use-chat-layout-state-BvzCvk0o.js";import"./use-panel-navigate-B5d8StTT.js";import"./thread-route-BX6inU_N.js";import"./use-project-scope-DD2NBlJU.js";import"./repository-binding-BVqJcY39.js";import"./use-mcp-client-CTvio_L5.js";import"./auth-YQD6gAdb.js";import"./toolbar-icon-button-uyi5Sobp.js";import"./use-in-settings-CwiXXVnc.js";import"./resizable-C9TNCfpu.js";import"./route-page-header-BtKcWz0X.js";import"./LayoutLeft-DhcW8L2l.js";import"./use-current-view-Ce-uPUNE.js";import"./agent-icon-CH_f-N3x.js";import"./AlertCircle-Dt3GY0Bh.js";import"./UserCheck01-DYJoLz9O.js";import"./Tool01-DOdYsq79.js";import"./ArrowUp-CPULRpjx.js";import"./ArrowLeft-YUwyiwVw.js";import"./ArrowRight-DenptpQc.js";import"./BookOpen01-CxcJv7PA.js";import"./Globe04-DnTwfyGh.js";import"./CheckCircle-7BnmcHqO.js";import"./ChevronDown-D8DhHnMq.js";import"./ChevronSelectorVertical-D-BmJmT0.js";import"./ChevronUp-DXnUGc0S.js";import"./UserSquare-B8TnRXAA.js";import"./LinkBroken01-nJS8cN1w.js";import"./CreditCard01-BcT6bkOS.js";import"./File02-CFZGfPVy.js";import"./SwitchHorizontal01-z6tySRlC.js";import"./Eye-DtSBHO9f.js";import"./Fingerprint04-De4VufgL.js";import"./Image01-sXwH8-FK.js";import"./Key01-0BhoHNxq.js";import"./Minus-BnUrCu3K.js";import"./Monitor01-CMAhieTY.js";import"./Sun-BsEDX0xb.js";import"./Play-DGe00qZP.js";import"./Plus-BXH7i2b3.js";import"./SearchMd-DgVjcl_1.js";import"./ShoppingBag01-Blomur-w.js";import"./Trash01-C6DjwKcE.js";import"./Upload01-BswyIwDw.js";import"./Users01-2WULI_RK.js";import"./Zap-CAQ2824E.js";import"./badge-BgjvI8Jn.js";import"./textarea-CDH6DEPF.js";import"./shell-layout-Dh4-Yy93.js";import"./use-deployment-admin-r26zz2q8.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-CUXeWF9K.js";import"./thread-intent-yju7EkUf.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BU2YQMB0.js";import"./task-board-D4sEZC2J.js";import"./schema-Am-4674Q.js";import"./session-runtime-C7lRk1bm.js";import"./command-ClLr83k5.js";import"./index-qv7etdoP.js";import"./integration-icon-Dtih4xc7.js";import"./project-icon-BrcJONBf.js";import"./use-navigate-to-agent-DqZ2afZ_.js";import"./use-debounced-value-5Xxz9sDf.js";import"./new-project-dialog-Bf2X9J1F.js";import"./label-BWgTIudr.js";import"./repository-picker-DWNj0wFN.js";import"./github-icon-Q8GJQd2H.js";import"./useInfiniteQuery-Cark_fFU.js";import"./infiniteQueryObserver-DjmxTVn9.js";import"./collection-search-C4zFbPFw.js";import"./new-project-store-CcRyCfqt.js";import"./legacy-admin-welcome-dialog-BZk8Utt6.js";import"./drawer-BqcK626t.js";import"./required-auth-layout-CRxzoxmw.js";import"./use-view-draft-kind-CQgXNieu.js";import"./use-blog-view-BpUj7Xe1.js";import"./use-org-sso-DwhYKe5K.js";import"./chat-context-CtXhrjSm.js";import"./use-entitlements-D7RtNoTI.js";import"./use-ai-providers-bUEURX0w.js";import"./use-decopilot-events-_641Ov59.js";import"./use-org-fs-cNPBBpNZ.js";import"./index-Cmw1-PfS.js";import"./input-P7Rufjcy.js";import"./usage-stats-eYkU9yPk.js";import"./utils-CVEq3hMx.js";import"./markdown-r449Hfho.js";import"./use-copy-3Av1V_Lb.js";import"./gateway-client-_ucPCL20.js";import"./form-CG-nxH4G.js";import"./icon-button-BuzP0C4n.js";import"./file-type-icon-DZ13Kaio.js";import"./chat-draft-VC3sd6LG.js";import"./use-voice-input-CFCuPvYA.js";import"./popover-BSXUrcE6.js";import"./index-BSDvsLw1.js";import"./checkbox-CEz5sveC.js";import"./select-CZrUcB4m.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-CevBbuWX.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-BhK3nU70.js";import"./toggle-group-xl-tep-u.js";import"./input-CpxUgj4y.js";import"./suggestion-CyC2sguH.js";import"./use-mcp-prompts-CEPCAgjv.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-CeiuDVrJ.js";import"./plan-ladder-BT6v1KK6.js";import"./add-connection-dialog-yj7w7MEx.js";import"./extract-connection-data-BVkijTqO.js";import"./metadata-D72DunRR.js";import"./connection-Dk3ZpWiR.js";import"./url-slug-BYlcIr9o.js";import"./connection-card-X6LBG2kz.js";import"./connection-slug-DDIL8GBP.js";import"./use-connection-CiK8c3Rq.js";import"./schema-CBdCZe4x.js";import"./connection-form-helpers-xYGhC7rS.js";import"./authenticate-and-persist-oauth-DmyJjsW7.js";import"./mcp-oauth-B4C3DLh4.js";import"./mcp-oauth-CqXZxzFC.js";import"./collection-tabs-CJ_TiFfs.js";import"./use-infinite-scroll-DCsViXEp.js";import"./useSuspenseInfiniteQuery-Cnb2unAB.js";import"./use-task-board-items-DBI-S1K4.js";import"./pair-fYdRIvpB.js";import"./collapsible-BaySCHgb.js";import"./task-key-BJmCPG8w.js";import"./config-VL9iqOxm.js";import"./task-route-C3App6nY.js";import"./project-index-DkaIO5pU.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-YPhCUxxb.js";import"./types-B3fBNTfg.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-C3HzAtJ7.js";import"./content-changes-D2Zs24rN.js";import"./agent-capabilities-DDJdPYLQ.js";import"./use-date-fns-locale-B5HtkTCa.js";function mr(){const o=m.c(2),r=n("plan_page_enabled");let t;return o[0]!==r?(t=i.jsx(p.Content,{children:r?i.jsx(a,{}):i.jsx(e,{kind:"plan"})}),o[0]=r,o[1]=t):t=o[1],t}export{mr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,a6 as g,
|
|
1
|
+
import{c as f,a6 as g,an as P,K as _,i as y,m as h,j as d}from"./index-CaT4JsCE.js";import{u as A}from"./use-entitlements-D7RtNoTI.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{c as O,b as K,j as n,n as J,m as Q,B as L,r as R,aH as xe,aI as Z,am as he,E as V,eu as oe,a as ge,au as be,t as je}from"./index-C1ub_U1Q.js";import{o as ve,bp as Ne,a as we,aq as ye}from"./agent-icon-pvTjuJ6E.js";import{i as ee,s as Se}from"./UserSquare-4oxgMoPf.js";import{B as re}from"./badge-BPOibh1z.js";import{i as _e}from"./ArrowLeft-ee9FD9EY.js";import{i as ce}from"./ArrowRight-B4dtiIJD.js";import{T as te}from"./textarea-C6yf2vK0.js";import{a as ke}from"./shell-layout-D2O4ysld.js";import{a7 as F,a8 as Pe,c as de,a9 as Ce,aa as Ie,ab as $e,ac as qe,ad as Ae}from"./chat-context-DaK1Yrzk.js";import"./index-LESY8PsW.js";import{g as ue,h as Te,i as Ee}from"./use-organization-settings-BUtsdGXi.js";import{d as se}from"./delay-CnY5UFtP.js";import{u as De,f as Oe}from"./use-date-fns-locale-DltBlMnb.js";import{u as Me}from"./use-org-fs-C6rwPPaE.js";import{P as ze}from"./schema-CL6RLkNE.js";const Be={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:ee,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:ve,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:Ne,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function Le(t){const e=O.c(4),{className:l}=t;let a;e[0]!==l?(a=Q("block h-2 rounded-full bg-muted",l),e[0]=l,e[1]=a):a=e[1];let s;return e[2]!==a?(s=n.jsx("span",{className:a}),e[2]=a,e[3]=s):s=e[3],s}const Re=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function Ke(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex flex-col gap-5",children:Re.map(Fe)}),t[0]=e):e=t[0],e}function Fe(t){return n.jsxs("div",{className:"flex flex-col gap-2.5",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:n.jsx(ee,{size:14})}),n.jsx(Le,{className:t.title}),n.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:t.value})]}),n.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:n.jsx("div",{className:Q("h-full rounded-full",t.fill,t.tone)})})]},t.value)}function Ot(t){const e=O.c(30),{kind:l}=t,a=K(),s=Be[l];let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=i):i=e[0];let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[i,n.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:n.jsx(Ke,{})})]}),e[1]=u):u=e[1];let o;e[2]!==a?(o=a("home.comingSoon.badge"),e[2]=a,e[3]=o):o=e[3];let d;e[4]!==o?(d=n.jsx(re,{variant:"muted",children:o}),e[4]=o,e[5]=d):d=e[5];let r;e[6]!==s.heading||e[7]!==a?(r=a(s.heading),e[6]=s.heading,e[7]=a,e[8]=r):r=e[8];let c;e[9]!==r?(c=n.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:r}),e[9]=r,e[10]=c):c=e[10];let f;e[11]!==s.description||e[12]!==a?(f=a(s.description),e[11]=s.description,e[12]=a,e[13]=f):f=e[13];let m;e[14]!==f?(m=n.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:f}),e[14]=f,e[15]=m):m=e[15];let p;e[16]!==d||e[17]!==c||e[18]!==m?(p=n.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[d,c,m]}),e[16]=d,e[17]=c,e[18]=m,e[19]=p):p=e[19];let h;if(e[20]!==s.points||e[21]!==a){let j;e[23]!==a?(j=x=>{const{Icon:v,labelKey:N,tone:w}=x;return n.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[n.jsx("span",{className:Q("flex size-9 shrink-0 items-center justify-center rounded-lg",w),children:n.jsx(v,{size:18})}),n.jsx("span",{className:"text-sm text-foreground",children:a(N)})]},N)},e[23]=a,e[24]=j):j=e[24],h=s.points.map(j),e[20]=s.points,e[21]=a,e[22]=h}else h=e[22];let g;e[25]!==h?(g=n.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:h}),e[25]=h,e[26]=g):g=e[26];let b;return e[27]!==g||e[28]!==p?(b=n.jsx(J,{children:n.jsx(J.Content,{children:n.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[u,p,g]})})}),e[27]=g,e[28]=p,e[29]=b):b=e[29],b}const Ue=["plan.guide.thinking1","plan.guide.thinking2","plan.guide.thinking3","plan.guide.thinking4","plan.guide.thinking5","plan.guide.thinking6","plan.guide.thinking7","plan.guide.thinking8"],Ge=["plan.guide.building1","plan.guide.building2","plan.guide.building3"],ne=900;function le(t){const e=O.c(13),{phrases:l,offset:a,building:s}=t,i=s===void 0?!1:s,u=K(),o=ke(ne),d=l[(Math.floor(o/ne)+a)%l.length];let r;e[0]!==i?(r=i?n.jsx("div",{className:"plan-guide-tiles","aria-hidden":"true",children:Array.from({length:9},He)}):n.jsxs("div",{className:"plan-guide-dots","aria-hidden":"true",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]}),e[0]=i,e[1]=r):r=e[1];let c;e[2]!==d||e[3]!==u?(c=u(d),e[2]=d,e[3]=u,e[4]=c):c=e[4];let f;e[5]!==c?(f=n.jsx("span",{className:"plan-guide-shimmer",children:c}),e[5]=c,e[6]=f):f=e[6];let m;e[7]!==d||e[8]!==f?(m=n.jsx("p",{className:"plan-guide-reveal text-base",children:f},d),e[7]=d,e[8]=f,e[9]=m):m=e[9];let p;return e[10]!==r||e[11]!==m?(p=n.jsxs("div",{role:"status","aria-live":"polite",className:"flex flex-col items-center gap-5 animate-in fade-in-0 duration-300 motion-reduce:animate-none",children:[r,m]}),e[10]=r,e[11]=m,e[12]=p):p=e[12],p}function He(t,e){return n.jsx("span",{style:{animationDelay:`${e*90}ms`}},e)}function We({text:t,delay:e}){return t.split(/\s+/).map((l,a)=>n.jsxs(R.Fragment,{children:[n.jsx("span",{className:"plan-guide-reveal inline-block",style:{animationDelay:`${e+a*me}ms`},children:l})," "]},a))}const me=45,Xe=350;function Je(t){const e=O.c(71),{view:l,onAnswer:a}=t,s=K(),[i,u]=R.useState(""),[o,d]=R.useState(null);let r;e[0]!==i?(r=i.trim(),e[0]=i,e[1]=r):r=e[1];const c=r.length>0,f=l.reaction?Xe:0;let m;if(e[2]!==l.question.text){let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=/\s+/,e[4]=y):y=e[4],m=l.question.text.split(y),e[2]=l.question.text,e[3]=m}else m=e[3];const p=f+m.length*me+150,h=p+l.question.options.length*70+100;let g;e[5]!==o||e[6]!==a?(g=y=>{if(o===null){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(y);return}d(y)}},e[5]=o,e[6]=a,e[7]=g):g=e[7];const b=g;let j;e[8]!==i||e[9]!==b||e[10]!==c?(j=y=>{y.preventDefault(),c&&b(i)},e[8]=i,e[9]=b,e[10]=c,e[11]=j):j=e[11];const x=j;let v;e[12]!==o||e[13]!==a?(v=y=>{y.target===y.currentTarget&&o!==null&&a(o)},e[12]=o,e[13]=a,e[14]=v):v=e[14];const N=o!==null&&"animate-out fade-out-0 slide-out-to-top-4 fill-mode-forwards duration-300 delay-150";let w;e[15]!==N?(w=Q("flex w-full flex-col gap-6",N),e[15]=N,e[16]=w):w=e[16];let _;e[17]!==l.reaction?(_=l.reaction&&n.jsx("p",{className:"plan-guide-reveal text-base text-muted-foreground",children:l.reaction}),e[17]=l.reaction,e[18]=_):_=e[18];let q;e[19]!==f||e[20]!==l.question.text?(q=n.jsx("h2",{className:"text-2xl font-medium text-balance text-foreground md:text-3xl",children:n.jsx(We,{text:l.question.text,delay:f})}),e[19]=f,e[20]=l.question.text,e[21]=q):q=e[21];let k;e[22]!==_||e[23]!==q?(k=n.jsxs("div",{className:"flex flex-col gap-3",children:[_,q]}),e[22]=_,e[23]=q,e[24]=k):k=e[24];let P;e[25]!==b||e[26]!==o||e[27]!==p||e[28]!==l.question.options?(P=l.question.options.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:l.question.options.map((y,pe)=>n.jsx(L,{type:"button",variant:"outline","aria-pressed":o===y,className:Q("h-auto rounded-full px-4 py-2 text-left whitespace-normal transition-[background-color,color,opacity,transform] duration-200 hover:-translate-y-0.5 animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-both duration-500 motion-reduce:animate-none motion-reduce:hover:translate-y-0",o===y&&"border-foreground bg-foreground text-background hover:bg-foreground hover:text-background",o!==null&&o!==y&&"opacity-30"),style:{animationDelay:`${p+pe*70}ms`},onClick:()=>b(y),children:y},y))}),e[25]=b,e[26]=o,e[27]=p,e[28]=l.question.options,e[29]=P):P=e[29];const E=`${h}ms`;let C;e[30]!==E?(C={animationDelay:E},e[30]=E,e[31]=C):C=e[31];let I;e[32]!==s?(I=s("plan.guide.answerLabel"),e[32]=s,e[33]=I):I=e[33];let $;e[34]!==s?($=s("plan.guide.answerPlaceholder"),e[34]=s,e[35]=$):$=e[35];let A;e[36]===Symbol.for("react.memo_cache_sentinel")?(A=y=>u(y.target.value),e[36]=A):A=e[36];let S;e[37]!==x?(S=y=>{y.key==="Enter"&&(y.metaKey||y.ctrlKey)&&x(y)},e[37]=x,e[38]=S):S=e[38];let D;e[39]!==i||e[40]!==I||e[41]!==$||e[42]!==S?(D=n.jsx(te,{autoFocus:!0,"aria-label":I,placeholder:$,value:i,onChange:A,onKeyDown:S,className:"min-h-24 text-[15px] transition-shadow"}),e[39]=i,e[40]=I,e[41]=$,e[42]=S,e[43]=D):D=e[43];let M;e[44]!==b?(M=()=>b(""),e[44]=b,e[45]=M):M=e[45];let z;e[46]!==s?(z=s("plan.guide.skip"),e[46]=s,e[47]=z):z=e[47];let B;e[48]!==M||e[49]!==z?(B=n.jsx(L,{type:"button",variant:"ghost",onClick:M,children:z}),e[48]=M,e[49]=z,e[50]=B):B=e[50];const U=!c;let T;e[51]!==s?(T=s("plan.guide.continue"),e[51]=s,e[52]=T):T=e[52];let G;e[53]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(ce,{className:"transition-transform duration-200 group-hover:translate-x-0.5"}),e[53]=G):G=e[53];let H;e[54]!==U||e[55]!==T?(H=n.jsxs(L,{type:"submit",disabled:U,className:"group transition-all duration-200",children:[T,G]}),e[54]=U,e[55]=T,e[56]=H):H=e[56];let W;e[57]!==B||e[58]!==H?(W=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[B,H]}),e[57]=B,e[58]=H,e[59]=W):W=e[59];let X;e[60]!==C||e[61]!==D||e[62]!==W?(X=n.jsxs("div",{className:"flex flex-col gap-6 animate-in fade-in-0 fill-mode-both duration-500 motion-reduce:animate-none",style:C,children:[D,W]}),e[60]=C,e[61]=D,e[62]=W,e[63]=X):X=e[63];let Y;return e[64]!==x||e[65]!==k||e[66]!==P||e[67]!==X||e[68]!==v||e[69]!==w?(Y=n.jsxs("form",{onSubmit:x,onAnimationEnd:v,className:w,children:[k,P,X]}),e[64]=x,e[65]=k,e[66]=P,e[67]=X,e[68]=v,e[69]=w,e[70]=Y):Y=e[70],Y}function Qe(t){const e=O.c(3),{state:l}=t,a=l.view.phase==="asking",s=l.answers.length+(a?1:0);if(s===0)return null;let i;return e[0]!==a||e[1]!==s?(i=n.jsx("div",{className:"ml-auto flex items-center gap-1.5","aria-hidden":"true",children:Array.from({length:s},(u,o)=>n.jsx("span",{className:Q("h-1.5 rounded-full transition-all duration-500 animate-in zoom-in-0 fade-in-0 motion-reduce:animate-none",a&&o===s-1?"w-5 bg-foreground":"w-1.5 bg-muted-foreground/40")},o))}),e[0]=a,e[1]=s,e[2]=i):i=e[2],i}function Ve(t){const e=O.c(7),{state:l,onAnswer:a}=t,{view:s}=l;switch(s.phase){case"thinking":{const i=l.step*3+l.idea.length;let u;return e[0]!==i?(u=n.jsx(le,{phrases:Ue,offset:i}),e[0]=i,e[1]=u):u=e[1],u}case"asking":{let i;return e[2]!==a||e[3]!==l.step||e[4]!==s?(i=n.jsx(Je,{view:s,onAnswer:a},l.step),e[2]=a,e[3]=l.step,e[4]=s,e[5]=i):i=e[5],i}case"building":{let i;return e[6]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(le,{phrases:Ge,offset:0,building:!0}),e[6]=i):i=e[6],i}}}function Ye({guide:t}){const e=K();return n.jsxs("div",{ref:t.screenRef,className:"flex h-full min-h-0 flex-col animate-in fade-in-0 duration-300 motion-reduce:animate-none",children:[n.jsxs("div",{className:"flex items-center gap-3 px-4 pt-4 md:px-8 animate-in fade-in-0 slide-in-from-top-1 duration-500 motion-reduce:animate-none",children:[n.jsxs(L,{variant:"ghost",size:"sm",onClick:t.cancel,children:[n.jsx(_e,{}),e("plan.guide.back")]}),n.jsxs("p",{className:"min-w-0 truncate text-sm text-muted-foreground",children:[n.jsx("span",{className:"text-meta mr-2",children:e("plan.guide.yourIdea")}),t.state.idea]}),n.jsx(Qe,{state:t.state})]}),n.jsx("div",{className:"flex min-h-0 flex-1 overflow-auto",children:n.jsx("div",{className:"m-auto flex w-full max-w-2xl justify-center px-4 py-10 md:px-8",children:n.jsx(Ve,{state:t.state,onAnswer:t.answer})})})]})}function Ze(t,e){const l=e.idea.trim(),a=e.objective?.trim(),s=e.casePath,i=a?t("plan.prompt.withObjective",{idea:l,objective:a,casePath:s}):t("plan.prompt.withoutObjective",{idea:l,casePath:s});if(!e.answers)return i;const u=e.answers.map(({question:o,answer:d})=>`- ${o.trim()}
|
|
1
|
+
import{c as O,b as R,j as n,n as X,m as Q,B as L,r as K,aJ as xe,aK as Z,an as he,E as V,ex as oe,a as ge,av as be,t as je}from"./index-CaT4JsCE.js";import{o as ve,bp as Ne,a as we,aq as ye}from"./agent-icon-CH_f-N3x.js";import{i as ee,s as Se}from"./UserSquare-B8TnRXAA.js";import{B as re}from"./badge-BgjvI8Jn.js";import{i as _e}from"./ArrowLeft-YUwyiwVw.js";import{i as ce}from"./ArrowRight-DenptpQc.js";import{T as te}from"./textarea-CDH6DEPF.js";import{a as ke}from"./shell-layout-Dh4-Yy93.js";import{a7 as F,a8 as Pe,c as de,a9 as Ce,aa as Ie,ab as $e,ac as qe,ad as Ae}from"./chat-context-CtXhrjSm.js";import"./index-Cmw1-PfS.js";import{g as ue,h as Te,i as Ee}from"./use-organization-settings-DsOm4fQ2.js";import{d as se}from"./delay-CnY5UFtP.js";import{u as De,f as Oe}from"./use-date-fns-locale-B5HtkTCa.js";import{u as Me}from"./use-org-fs-cNPBBpNZ.js";import{P as ze}from"./schema-Am-4674Q.js";const Be={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:ee,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:ve,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:Ne,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function Le(t){const e=O.c(4),{className:l}=t;let a;e[0]!==l?(a=Q("block h-2 rounded-full bg-muted",l),e[0]=l,e[1]=a):a=e[1];let s;return e[2]!==a?(s=n.jsx("span",{className:a}),e[2]=a,e[3]=s):s=e[3],s}const Ke=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function Re(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex flex-col gap-5",children:Ke.map(Fe)}),t[0]=e):e=t[0],e}function Fe(t){return n.jsxs("div",{className:"flex flex-col gap-2.5",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:n.jsx(ee,{size:14})}),n.jsx(Le,{className:t.title}),n.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:t.value})]}),n.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:n.jsx("div",{className:Q("h-full rounded-full",t.fill,t.tone)})})]},t.value)}function Ot(t){const e=O.c(30),{kind:l}=t,a=R(),s=Be[l];let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=i):i=e[0];let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[i,n.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:n.jsx(Re,{})})]}),e[1]=u):u=e[1];let o;e[2]!==a?(o=a("home.comingSoon.badge"),e[2]=a,e[3]=o):o=e[3];let d;e[4]!==o?(d=n.jsx(re,{variant:"muted",children:o}),e[4]=o,e[5]=d):d=e[5];let r;e[6]!==s.heading||e[7]!==a?(r=a(s.heading),e[6]=s.heading,e[7]=a,e[8]=r):r=e[8];let c;e[9]!==r?(c=n.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:r}),e[9]=r,e[10]=c):c=e[10];let f;e[11]!==s.description||e[12]!==a?(f=a(s.description),e[11]=s.description,e[12]=a,e[13]=f):f=e[13];let m;e[14]!==f?(m=n.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:f}),e[14]=f,e[15]=m):m=e[15];let p;e[16]!==d||e[17]!==c||e[18]!==m?(p=n.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[d,c,m]}),e[16]=d,e[17]=c,e[18]=m,e[19]=p):p=e[19];let h;if(e[20]!==s.points||e[21]!==a){let j;e[23]!==a?(j=x=>{const{Icon:v,labelKey:N,tone:w}=x;return n.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[n.jsx("span",{className:Q("flex size-9 shrink-0 items-center justify-center rounded-lg",w),children:n.jsx(v,{size:18})}),n.jsx("span",{className:"text-sm text-foreground",children:a(N)})]},N)},e[23]=a,e[24]=j):j=e[24],h=s.points.map(j),e[20]=s.points,e[21]=a,e[22]=h}else h=e[22];let g;e[25]!==h?(g=n.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:h}),e[25]=h,e[26]=g):g=e[26];let b;return e[27]!==g||e[28]!==p?(b=n.jsx(X,{children:n.jsx(X.Content,{children:n.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[u,p,g]})})}),e[27]=g,e[28]=p,e[29]=b):b=e[29],b}const Ue=["plan.guide.thinking1","plan.guide.thinking2","plan.guide.thinking3","plan.guide.thinking4","plan.guide.thinking5","plan.guide.thinking6","plan.guide.thinking7","plan.guide.thinking8"],Ge=["plan.guide.building1","plan.guide.building2","plan.guide.building3"],ne=900;function le(t){const e=O.c(13),{phrases:l,offset:a,building:s}=t,i=s===void 0?!1:s,u=R(),o=ke(ne),d=l[(Math.floor(o/ne)+a)%l.length];let r;e[0]!==i?(r=i?n.jsx("div",{className:"plan-guide-tiles","aria-hidden":"true",children:Array.from({length:9},He)}):n.jsxs("div",{className:"plan-guide-dots","aria-hidden":"true",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]}),e[0]=i,e[1]=r):r=e[1];let c;e[2]!==d||e[3]!==u?(c=u(d),e[2]=d,e[3]=u,e[4]=c):c=e[4];let f;e[5]!==c?(f=n.jsx("span",{className:"plan-guide-shimmer",children:c}),e[5]=c,e[6]=f):f=e[6];let m;e[7]!==d||e[8]!==f?(m=n.jsx("p",{className:"plan-guide-reveal text-base",children:f},d),e[7]=d,e[8]=f,e[9]=m):m=e[9];let p;return e[10]!==r||e[11]!==m?(p=n.jsxs("div",{role:"status","aria-live":"polite",className:"flex flex-col items-center gap-5 animate-in fade-in-0 duration-300 motion-reduce:animate-none",children:[r,m]}),e[10]=r,e[11]=m,e[12]=p):p=e[12],p}function He(t,e){return n.jsx("span",{style:{animationDelay:`${e*90}ms`}},e)}function Je({text:t,delay:e}){return t.split(/\s+/).map((l,a)=>n.jsxs(K.Fragment,{children:[n.jsx("span",{className:"plan-guide-reveal inline-block",style:{animationDelay:`${e+a*me}ms`},children:l})," "]},a))}const me=45,We=350;function Xe(t){const e=O.c(71),{view:l,onAnswer:a}=t,s=R(),[i,u]=K.useState(""),[o,d]=K.useState(null);let r;e[0]!==i?(r=i.trim(),e[0]=i,e[1]=r):r=e[1];const c=r.length>0,f=l.reaction?We:0;let m;if(e[2]!==l.question.text){let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=/\s+/,e[4]=y):y=e[4],m=l.question.text.split(y),e[2]=l.question.text,e[3]=m}else m=e[3];const p=f+m.length*me+150,h=p+l.question.options.length*70+100;let g;e[5]!==o||e[6]!==a?(g=y=>{if(o===null){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(y);return}d(y)}},e[5]=o,e[6]=a,e[7]=g):g=e[7];const b=g;let j;e[8]!==i||e[9]!==b||e[10]!==c?(j=y=>{y.preventDefault(),c&&b(i)},e[8]=i,e[9]=b,e[10]=c,e[11]=j):j=e[11];const x=j;let v;e[12]!==o||e[13]!==a?(v=y=>{y.target===y.currentTarget&&o!==null&&a(o)},e[12]=o,e[13]=a,e[14]=v):v=e[14];const N=o!==null&&"animate-out fade-out-0 slide-out-to-top-4 fill-mode-forwards duration-300 delay-150";let w;e[15]!==N?(w=Q("flex w-full flex-col gap-6",N),e[15]=N,e[16]=w):w=e[16];let _;e[17]!==l.reaction?(_=l.reaction&&n.jsx("p",{className:"plan-guide-reveal text-base text-muted-foreground",children:l.reaction}),e[17]=l.reaction,e[18]=_):_=e[18];let q;e[19]!==f||e[20]!==l.question.text?(q=n.jsx("h2",{className:"text-2xl font-medium text-balance text-foreground md:text-3xl",children:n.jsx(Je,{text:l.question.text,delay:f})}),e[19]=f,e[20]=l.question.text,e[21]=q):q=e[21];let k;e[22]!==_||e[23]!==q?(k=n.jsxs("div",{className:"flex flex-col gap-3",children:[_,q]}),e[22]=_,e[23]=q,e[24]=k):k=e[24];let P;e[25]!==b||e[26]!==o||e[27]!==p||e[28]!==l.question.options?(P=l.question.options.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:l.question.options.map((y,pe)=>n.jsx(L,{type:"button",variant:"outline","aria-pressed":o===y,className:Q("h-auto rounded-full px-4 py-2 text-left whitespace-normal transition-[background-color,color,opacity,transform] duration-200 hover:-translate-y-0.5 animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-both duration-500 motion-reduce:animate-none motion-reduce:hover:translate-y-0",o===y&&"border-foreground bg-foreground text-background hover:bg-foreground hover:text-background",o!==null&&o!==y&&"opacity-30"),style:{animationDelay:`${p+pe*70}ms`},onClick:()=>b(y),children:y},y))}),e[25]=b,e[26]=o,e[27]=p,e[28]=l.question.options,e[29]=P):P=e[29];const E=`${h}ms`;let C;e[30]!==E?(C={animationDelay:E},e[30]=E,e[31]=C):C=e[31];let I;e[32]!==s?(I=s("plan.guide.answerLabel"),e[32]=s,e[33]=I):I=e[33];let $;e[34]!==s?($=s("plan.guide.answerPlaceholder"),e[34]=s,e[35]=$):$=e[35];let A;e[36]===Symbol.for("react.memo_cache_sentinel")?(A=y=>u(y.target.value),e[36]=A):A=e[36];let S;e[37]!==x?(S=y=>{y.key==="Enter"&&(y.metaKey||y.ctrlKey)&&x(y)},e[37]=x,e[38]=S):S=e[38];let D;e[39]!==i||e[40]!==I||e[41]!==$||e[42]!==S?(D=n.jsx(te,{autoFocus:!0,"aria-label":I,placeholder:$,value:i,onChange:A,onKeyDown:S,className:"min-h-24 text-[15px] transition-shadow"}),e[39]=i,e[40]=I,e[41]=$,e[42]=S,e[43]=D):D=e[43];let M;e[44]!==b?(M=()=>b(""),e[44]=b,e[45]=M):M=e[45];let z;e[46]!==s?(z=s("plan.guide.skip"),e[46]=s,e[47]=z):z=e[47];let B;e[48]!==M||e[49]!==z?(B=n.jsx(L,{type:"button",variant:"ghost",onClick:M,children:z}),e[48]=M,e[49]=z,e[50]=B):B=e[50];const U=!c;let T;e[51]!==s?(T=s("plan.guide.continue"),e[51]=s,e[52]=T):T=e[52];let G;e[53]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(ce,{className:"transition-transform duration-200 group-hover:translate-x-0.5"}),e[53]=G):G=e[53];let H;e[54]!==U||e[55]!==T?(H=n.jsxs(L,{type:"submit",disabled:U,className:"group transition-all duration-200",children:[T,G]}),e[54]=U,e[55]=T,e[56]=H):H=e[56];let J;e[57]!==B||e[58]!==H?(J=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[B,H]}),e[57]=B,e[58]=H,e[59]=J):J=e[59];let W;e[60]!==C||e[61]!==D||e[62]!==J?(W=n.jsxs("div",{className:"flex flex-col gap-6 animate-in fade-in-0 fill-mode-both duration-500 motion-reduce:animate-none",style:C,children:[D,J]}),e[60]=C,e[61]=D,e[62]=J,e[63]=W):W=e[63];let Y;return e[64]!==x||e[65]!==k||e[66]!==P||e[67]!==W||e[68]!==v||e[69]!==w?(Y=n.jsxs("form",{onSubmit:x,onAnimationEnd:v,className:w,children:[k,P,W]}),e[64]=x,e[65]=k,e[66]=P,e[67]=W,e[68]=v,e[69]=w,e[70]=Y):Y=e[70],Y}function Qe(t){const e=O.c(3),{state:l}=t,a=l.view.phase==="asking",s=l.answers.length+(a?1:0);if(s===0)return null;let i;return e[0]!==a||e[1]!==s?(i=n.jsx("div",{className:"ml-auto flex items-center gap-1.5","aria-hidden":"true",children:Array.from({length:s},(u,o)=>n.jsx("span",{className:Q("h-1.5 rounded-full transition-all duration-500 animate-in zoom-in-0 fade-in-0 motion-reduce:animate-none",a&&o===s-1?"w-5 bg-foreground":"w-1.5 bg-muted-foreground/40")},o))}),e[0]=a,e[1]=s,e[2]=i):i=e[2],i}function Ve(t){const e=O.c(7),{state:l,onAnswer:a}=t,{view:s}=l;switch(s.phase){case"thinking":{const i=l.step*3+l.idea.length;let u;return e[0]!==i?(u=n.jsx(le,{phrases:Ue,offset:i}),e[0]=i,e[1]=u):u=e[1],u}case"asking":{let i;return e[2]!==a||e[3]!==l.step||e[4]!==s?(i=n.jsx(Xe,{view:s,onAnswer:a},l.step),e[2]=a,e[3]=l.step,e[4]=s,e[5]=i):i=e[5],i}case"building":{let i;return e[6]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(le,{phrases:Ge,offset:0,building:!0}),e[6]=i):i=e[6],i}}}function Ye({guide:t}){const e=R();return n.jsxs("div",{ref:t.screenRef,className:"flex h-full min-h-0 flex-col animate-in fade-in-0 duration-300 motion-reduce:animate-none",children:[n.jsxs("div",{className:"flex items-center gap-3 px-4 pt-4 md:px-8 animate-in fade-in-0 slide-in-from-top-1 duration-500 motion-reduce:animate-none",children:[n.jsxs(L,{variant:"ghost",size:"sm",onClick:t.cancel,children:[n.jsx(_e,{}),e("plan.guide.back")]}),n.jsxs("p",{className:"min-w-0 truncate text-sm text-muted-foreground",children:[n.jsx("span",{className:"text-meta mr-2",children:e("plan.guide.yourIdea")}),t.state.idea]}),n.jsx(Qe,{state:t.state})]}),n.jsx("div",{className:"flex min-h-0 flex-1 overflow-auto",children:n.jsx("div",{className:"m-auto flex w-full max-w-2xl justify-center px-4 py-10 md:px-8",children:n.jsx(Ve,{state:t.state,onAnswer:t.answer})})})]})}function Ze(t,e){const l=e.idea.trim(),a=e.objective?.trim(),s=e.casePath,i=a?t("plan.prompt.withObjective",{idea:l,objective:a,casePath:s}):t("plan.prompt.withoutObjective",{idea:l,casePath:s});if(!e.answers)return i;const u=e.answers.map(({question:o,answer:d})=>`- ${o.trim()}
|
|
2
2
|
${d.trim()||t("plan.prompt.skipped")}`).join(`
|
|
3
3
|
`);return`${i}
|
|
4
4
|
|
|
5
5
|
${u?t("plan.prompt.guidedAnswers",{answers:u}):t("plan.prompt.guidedNothing")}`}const fe="studio:plan-case-seed:",et=xe({title:Z().min(1).max(F.title),objective:Z().max(F.text).nullable(),request:Z().min(1).max(F.text)});function tt(t){const e=t.trim().split(`
|
|
6
|
-
`)[0]??"";return e.length>F.title?`${e.slice(0,F.title-1)}…`:e}function st(t,e,l){const a=l.request.trim().slice(0,F.text),s={title:tt(l.title?.trim()||a),objective:l.objective?.trim().slice(0,F.text)||null,request:a};try{t.setItem(fe+e,JSON.stringify(s))}catch{}}function Mt(t,e){let l;try{l=t.getItem(fe+e)}catch{return null}if(!l)return null;let a;try{a=JSON.parse(l)}catch{return null}const s=et.safeParse(a);return s.success?Pe(s.data):null}function nt(t){return{step:0,idea:t.trim(),answers:[],title:null,view:{phase:"thinking"}}}function ie(t,e){if(e.step!==t.step)return t;switch(e.type){case"answered":return t.view.phase!=="asking"?t:{...t,step:t.step+1,answers:[...t.answers,{question:t.view.question.text,answer:e.answer.trim()}],view:{phase:"thinking"}};case"resolved":{if(t.view.phase!=="thinking")return t;const{question:l,reaction:a,title:s}=e.result;return{...t,title:s??t.title,view:l?{phase:"asking",question:l,reaction:a}:{phase:"building",guided:!0}}}case"failed":return t.view.phase!=="thinking"?t:{...t,view:{phase:"building",guided:!1}}}}function lt(t){return t.view.phase==="building"&&t.view.guided||t.answers.length>0?t.answers:void 0}const it=1600,at=2200;function ot(){const t=O.c(20),e=K(),l=he(),{createTaskWithMessage:a}=de(),s=ue()?.statement??null,[i,u]=R.useState(null),o=R.useRef(null),d=R.useRef(!1);let r;t[0]!==a||t[1]!==s||t[2]!==e?(r=x=>{const v=lt(x);V("plan_guide_done",{has_objective:!!s,questions:x.answers.length,skipped:x.answers.filter(ct).length,guided:x.view.phase==="building"&&x.view.guided});const N=crypto.randomUUID(),w=Ce(N);st(sessionStorage,w,{objective:s,request:x.idea,title:x.title}),a({id:N,tabId:oe(w),message:{parts:[{type:"text",text:Ze(e,{idea:x.idea,objective:s,casePath:Ie(w),...v?{answers:v}:{}})}]}})},t[0]=a,t[1]=s,t[2]=e,t[3]=r):r=t[3];const c=r;let f;t[4]!==s||t[5]!==c||t[6]!==l?(f=async x=>{o.current?.abort();const v=new AbortController;o.current=v;const{signal:N}=v;u(x);let w;try{const[q]=await Promise.all([l.call("PLAN_CASE_NEXT_QUESTION",{idea:x.idea.slice(0,F.text),objective:s,answers:x.answers.map(rt)}),se(it,{signal:N})]);w={type:"resolved",step:x.step,result:q}}catch{w={type:"failed",step:x.step}}if(N.aborted)return;const _=ie(x,w);if(u(_),_.view.phase==="building"){try{await se(at,{signal:N})}catch{return}o.current=null,u(null),d.current&&c(_)}},t[4]=s,t[5]=c,t[6]=l,t[7]=f):f=t[7];const m=f;let p;t[8]===Symbol.for("react.memo_cache_sentinel")?(p=x=>{d.current=x!==null},t[8]=p):p=t[8];let h;t[9]!==s||t[10]!==m?(h=x=>{x.trim()&&(V("plan_idea_submitted",{has_objective:!!s}),m(nt(x)))},t[9]=s,t[10]=m,t[11]=h):h=t[11];let g;t[12]!==i||t[13]!==m?(g=x=>{if(!i)return;const v=ie(i,{type:"answered",step:i.step,answer:x});v!==i&&(V("plan_guide_question_answered",{step:i.step,skipped:!x.trim()}),m(v))},t[12]=i,t[13]=m,t[14]=g):g=t[14];let b;t[15]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{o.current?.abort(),o.current=null,u(null)},t[15]=b):b=t[15];let j;return t[16]!==i||t[17]!==h||t[18]!==g?(j={state:i,screenRef:p,start:h,answer:g,cancel:b},t[16]=i,t[17]=h,t[18]=g,t[19]=j):j=t[19],j}function rt(t){const{question:e,answer:l}=t;return{question:e.slice(0,F.item),answer:l.slice(0,F.text)}}function ct(t){return!t.answer}const dt=20,ut={framing:"plan.case.status.framing",building:"plan.case.status.building",ready:"plan.case.status.ready"};function mt(t){const e=O.c(28),{entry:l,threadId:a}=t,s=K(),i=De(),{openTask:u}=de(),o=qe(l.path),d=o.data?.value;let r;e[0]!==l.path||e[1]!==u||e[2]!==a?(r=()=>u(a,{tabId:oe(l.path)}),e[0]=l.path,e[1]=u,e[2]=a,e[3]=r):r=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(we,{className:"size-4 shrink-0 text-muted-foreground"}),e[4]=c):c=e[4];let f;e[5]!==o.isPending||e[6]!==s||e[7]!==d?.title?(f=d?.title??(o.isPending?"…":s("plan.cases.unreadable")),e[5]=o.isPending,e[6]=s,e[7]=d?.title,e[8]=f):f=e[8];let m;e[9]!==f?(m=n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:f}),e[9]=f,e[10]=m):m=e[10];let p;e[11]!==l.updatedAt||e[12]!==i||e[13]!==s?(p=s("plan.cases.updated",{when:Oe(new Date(l.updatedAt),{addSuffix:!0,locale:i})}),e[11]=l.updatedAt,e[12]=i,e[13]=s,e[14]=p):p=e[14];let h;e[15]!==p?(h=n.jsx("span",{className:"text-xs text-muted-foreground",children:p}),e[15]=p,e[16]=h):h=e[16];let g;e[17]!==m||e[18]!==h?(g=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[m,h]}),e[17]=m,e[18]=h,e[19]=g):g=e[19];let b;e[20]!==s||e[21]!==d?(b=d&&n.jsx(re,{variant:d.status==="ready"?"success":"agent",children:s(ut[d.status])}),e[20]=s,e[21]=d,e[22]=b):b=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(be,{className:"size-4 shrink-0 text-muted-foreground"}),e[23]=j):j=e[23];let x;return e[24]!==r||e[25]!==g||e[26]!==b?(x=n.jsx("li",{children:n.jsxs("button",{type:"button",onClick:r,className:"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left hover:bg-accent focus-ring",children:[c,g,b,j]})}),e[24]=r,e[25]=g,e[26]=b,e[27]=x):x=e[27],x}function ft(){const t=O.c(28),e=K(),{data:l}=ge.useSession(),a=l?.user?.id,s=Me("home",$e);let i,u,o,d,r;if(t[0]!==s.data||t[1]!==e||t[2]!==a){r=Symbol.for("react.early_return_sentinel");e:{let m;t[8]!==a?(m=x=>{const v=Ae(x.path);return x.kind==="file"&&v&&(!x.createdBy||x.createdBy===a)?[{entry:x,threadId:v}]:[]},t[8]=a,t[9]=m):m=t[9];const p=(s.data??[]).flatMap(m).toSorted(xt).slice(0,dt);if(p.length===0){r=null;break e}o="flex flex-col gap-3";let h;t[10]!==e?(h=e("plan.cases.heading"),t[10]=e,t[11]=h):h=t[11];let g;t[12]!==h?(g=n.jsx("h2",{className:"text-xl font-medium text-foreground",children:h}),t[12]=h,t[13]=g):g=t[13];let b;t[14]!==e?(b=e("plan.cases.description"),t[14]=e,t[15]=b):b=t[15];let j;t[16]!==b?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:b}),t[16]=b,t[17]=j):j=t[17],t[18]!==g||t[19]!==j?(d=n.jsxs("div",{className:"flex flex-col gap-1",children:[g,j]}),t[18]=g,t[19]=j,t[20]=d):d=t[20],i="-mx-3 flex flex-col",u=p.map(pt)}t[0]=s.data,t[1]=e,t[2]=a,t[3]=i,t[4]=u,t[5]=o,t[6]=d,t[7]=r}else i=t[3],u=t[4],o=t[5],d=t[6],r=t[7];if(r!==Symbol.for("react.early_return_sentinel"))return r;let c;t[21]!==i||t[22]!==u?(c=n.jsx("ul",{className:i,children:u}),t[21]=i,t[22]=u,t[23]=c):c=t[23];let f;return t[24]!==o||t[25]!==d||t[26]!==c?(f=n.jsxs("section",{className:o,children:[d,c]}),t[24]=o,t[25]=d,t[26]=c,t[27]=f):f=t[27],f}function pt(t){const{entry:e,threadId:l}=t;return n.jsx(mt,{entry:e,threadId:l},e.path)}function xt(t,e){return e.entry.updatedAt.localeCompare(t.entry.updatedAt)}const ht=[{label:"plan.idea.topic.shipping",prompt:"plan.idea.topic.shippingPrompt"},{label:"plan.idea.topic.pdp",prompt:"plan.idea.topic.pdpPrompt"},{label:"plan.idea.topic.checkout",prompt:"plan.idea.topic.checkoutPrompt"},{label:"plan.idea.topic.search",prompt:"plan.idea.topic.searchPrompt"},{label:"plan.idea.topic.performance",prompt:"plan.idea.topic.performancePrompt"},{label:"plan.idea.topic.paidMedia",prompt:"plan.idea.topic.paidMediaPrompt"}];function gt(t){const e=O.c(52),{initialIdea:l,onSubmit:a}=t,s=K(),[i,u]=R.useState(l);let o;e[0]!==i?(o=i.trim(),e[0]=i,e[1]=o):o=e[1];const d=o.length>0;let r;e[2]!==i||e[3]!==a||e[4]!==d?(r=S=>{S.preventDefault(),d&&a(i)},e[2]=i,e[3]=a,e[4]=d,e[5]=r):r=e[5];const c=r;let f;e[6]!==s?(f=s("plan.idea.heading"),e[6]=s,e[7]=f):f=e[7];let m;e[8]!==f?(m=n.jsx("h2",{className:"text-xl font-medium text-foreground",children:f}),e[8]=f,e[9]=m):m=e[9];let p;e[10]!==s?(p=s("plan.idea.description"),e[10]=s,e[11]=p):p=e[11];let h;e[12]!==p?(h=n.jsx("p",{className:"text-sm text-pretty text-muted-foreground",children:p}),e[12]=p,e[13]=h):h=e[13];let g;e[14]!==m||e[15]!==h?(g=n.jsxs("div",{className:"flex flex-col gap-1",children:[m,h]}),e[14]=m,e[15]=h,e[16]=g):g=e[16];let b;e[17]!==s?(b=s("plan.idea.label"),e[17]=s,e[18]=b):b=e[18];let j;e[19]!==s?(j=s("plan.idea.placeholder"),e[19]=s,e[20]=j):j=e[20];let x;e[21]===Symbol.for("react.memo_cache_sentinel")?(x=S=>u(S.target.value),e[21]=x):x=e[21];let v;e[22]!==c?(v=S=>{S.key==="Enter"&&(S.metaKey||S.ctrlKey)&&c(S)},e[22]=c,e[23]=v):v=e[23];let N;e[24]!==i||e[25]!==v||e[26]!==b||e[27]!==j?(N=n.jsx(te,{"aria-label":b,placeholder:j,value:i,onChange:x,onKeyDown:v,className:"min-h-32 text-[15px]"}),e[24]=i,e[25]=v,e[26]=b,e[27]=j,e[28]=N):N=e[28];const w=!d;let _;e[29]!==s?(_=s("plan.idea.submit"),e[29]=s,e[30]=_):_=e[30];let q;e[31]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx(ce,{}),e[31]=q):q=e[31];let k;e[32]!==w||e[33]!==_?(k=n.jsx("div",{className:"flex justify-end",children:n.jsxs(L,{type:"submit",disabled:w,children:[_,q]})}),e[32]=w,e[33]=_,e[34]=k):k=e[34];let P;e[35]!==c||e[36]!==N||e[37]!==k?(P=n.jsxs("form",{onSubmit:c,className:"flex flex-col gap-3",children:[N,k]}),e[35]=c,e[36]=N,e[37]=k,e[38]=P):P=e[38];let E;e[39]!==s?(E=s("plan.idea.startWith"),e[39]=s,e[40]=E):E=e[40];let C;e[41]!==E?(C=n.jsx("span",{className:"mr-1 text-meta",children:E}),e[41]=E,e[42]=C):C=e[42];let I;e[43]!==s?(I=ht.map(S=>n.jsx(L,{type:"button",variant:"outline",size:"sm",onClick:()=>u(D=>D||s(S.prompt)),children:s(S.label)},S.label)),e[43]=s,e[44]=I):I=e[44];let $;e[45]!==C||e[46]!==I?($=n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[C,I]}),e[45]=C,e[46]=I,e[47]=$):$=e[47];let A;return e[48]!==P||e[49]!==$||e[50]!==g?(A=n.jsxs("section",{className:"flex flex-col gap-4",children:[g,P,$]}),e[48]=P,e[49]=$,e[50]=g,e[51]=A):A=e[51],A}function bt(t){return t.found?{kind:"found",statement:t.found.statement,source:t.found.source.label,quote:t.found.quote}:{kind:"missing",message:t.reason==="unavailable"?"plan.objective.findUnavailable":"plan.objective.notFound",read:t.read,unread:t.unread}}function jt(t){const e=O.c(28),{notice:l,draft:a}=t,s=K();if(l.kind==="found"){if(!a)return null;let p;e[0]!==l.quote||e[1]!==l.source||e[2]!==s?(p=s("plan.objective.found",{source:l.source,quote:l.quote}),e[0]=l.quote,e[1]=l.source,e[2]=s,e[3]=p):p=e[3];let h;return e[4]!==p?(h=n.jsx("p",{className:"text-meta",children:p}),e[4]=p,e[5]=h):h=e[5],h}let i;e[6]!==l.message||e[7]!==s?(i=s(l.message),e[6]=l.message,e[7]=s,e[8]=i):i=e[8];let u;e[9]!==i?(u=n.jsx("p",{className:"text-foreground",children:i}),e[9]=i,e[10]=u):u=e[10];let o;e[11]!==l.read||e[12]!==s?(o=l.read.length>0?s("plan.objective.read",{sources:l.read.join(", ")}):s("plan.objective.readNothing"),e[11]=l.read,e[12]=s,e[13]=o):o=e[13];let d;e[14]!==o?(d=n.jsx("p",{children:o}),e[14]=o,e[15]=d):d=e[15];let r;e[16]!==l.unread||e[17]!==s?(r=l.unread.length>0&&n.jsx("p",{children:s("plan.objective.unread",{files:l.unread.join(", ")})}),e[16]=l.unread,e[17]=s,e[18]=r):r=e[18];let c;e[19]!==s?(c=s("plan.objective.connectHint"),e[19]=s,e[20]=c):c=e[20];let f;e[21]!==c?(f=n.jsx("p",{children:c}),e[21]=c,e[22]=f):f=e[22];let m;return e[23]!==u||e[24]!==d||e[25]!==r||e[26]!==f?(m=n.jsxs("div",{className:"flex flex-col gap-1 text-sm text-muted-foreground",children:[u,d,r,f]}),e[23]=u,e[24]=d,e[25]=r,e[26]=f,e[27]=m):m=e[27],m}function ae(t){const e=O.c(60),{initial:l,onDone:a}=t,s=K(),[i,u]=R.useState(l),[o,d]=R.useState(null),r=Te(),c=Ee();let f;e[0]!==i?(f=i.trim(),e[0]=i,e[1]=f):f=e[1];const m=f,p=r.isPending||c.isPending;let h;e[2]!==a||e[3]!==r||e[4]!==s?(h=T=>r.mutate({statement:T},{onSuccess:()=>a?.(),onError:()=>je.error(s("plan.objective.saveError"))}),e[2]=a,e[3]=r,e[4]=s,e[5]=h):h=e[5];const g=h;let b;e[6]!==m||e[7]!==g?(b=T=>{T.preventDefault(),m&&g(m)},e[6]=m,e[7]=g,e[8]=b):b=e[8];const j=b;let x;e[9]!==c?(x=()=>{V("plan_objective_find_clicked"),d(null),c.mutate(void 0,{onSuccess:T=>{const G=bt(T);V("plan_objective_find_answered",{outcome:T.found?"found":T.reason??"not_found"}),G.kind==="found"&&u(G.statement),d(G)},onError:()=>d({kind:"missing",message:"plan.objective.findUnavailable",read:[],unread:[]})})},e[9]=c,e[10]=x):x=e[10];const v=x;let N;e[11]!==s?(N=s("plan.objective.label"),e[11]=s,e[12]=N):N=e[12];let w;e[13]!==s?(w=s("plan.objective.placeholder"),e[13]=s,e[14]=w):w=e[14];let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=T=>u(T.target.value),e[15]=_):_=e[15];const q=a!==void 0;let k;e[16]!==i||e[17]!==c.isPending||e[18]!==N||e[19]!==w||e[20]!==q?(k=n.jsx(te,{"aria-label":N,placeholder:w,value:i,maxLength:ze,onChange:_,disabled:c.isPending,className:"min-h-20 text-base",autoFocus:q}),e[16]=i,e[17]=c.isPending,e[18]=N,e[19]=w,e[20]=q,e[21]=k):k=e[21];let P;e[22]!==c.isPending||e[23]!==o||e[24]!==m||e[25]!==s?(P=c.isPending?n.jsx("p",{className:"animate-pulse text-sm text-muted-foreground",children:s("plan.objective.finding")}):o?n.jsx(jt,{notice:o,draft:m}):n.jsx("span",{className:"text-meta",children:s("plan.objective.hint")}),e[22]=c.isPending,e[23]=o,e[24]=m,e[25]=s,e[26]=P):P=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Se,{}),e[27]=E):E=e[27];let C;e[28]!==s?(C=s("plan.objective.find"),e[28]=s,e[29]=C):C=e[29];let I;e[30]!==p||e[31]!==v||e[32]!==C?(I=n.jsxs(L,{type:"button",variant:"outline",size:"sm",disabled:p,onClick:v,children:[E,C]}),e[30]=p,e[31]=v,e[32]=C,e[33]=I):I=e[33];let $;e[34]!==p||e[35]!==l||e[36]!==s||e[37]!==g?($=l&&n.jsx(L,{type:"button",variant:"ghost",size:"sm",disabled:p,onClick:()=>g(null),children:s("plan.objective.clear")}),e[34]=p,e[35]=l,e[36]=s,e[37]=g,e[38]=$):$=e[38];let A;e[39]!==a||e[40]!==r.isPending||e[41]!==s?(A=a&&n.jsx(L,{type:"button",variant:"outline",size:"sm",disabled:r.isPending,onClick:a,children:s("plan.objective.cancel")}),e[39]=a,e[40]=r.isPending,e[41]=s,e[42]=A):A=e[42];const S=!m||p;let D;e[43]!==s?(D=s("plan.objective.save"),e[43]=s,e[44]=D):D=e[44];let M;e[45]!==S||e[46]!==D?(M=n.jsx(L,{type:"submit",size:"sm",disabled:S,children:D}),e[45]=S,e[46]=D,e[47]=M):M=e[47];let z;e[48]!==$||e[49]!==A||e[50]!==M?(z=n.jsxs("div",{className:"ml-auto flex gap-2",children:[$,A,M]}),e[48]=$,e[49]=A,e[50]=M,e[51]=z):z=e[51];let B;e[52]!==I||e[53]!==z?(B=n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[I,z]}),e[52]=I,e[53]=z,e[54]=B):B=e[54];let U;return e[55]!==j||e[56]!==P||e[57]!==B||e[58]!==k?(U=n.jsxs("form",{onSubmit:j,className:"flex flex-col gap-2",children:[k,P,B]}),e[55]=j,e[56]=P,e[57]=B,e[58]=k,e[59]=U):U=e[59],U}function vt(){const t=O.c(12),e=K(),l=ue(),[a,s]=R.useState(!1),i=l?.statement??"";let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(ee,{size:13}),t[0]=u):u=t[0];let o;t[1]!==e?(o=e("plan.objective.eyebrow"),t[1]=e,t[2]=o):o=t[2];let d;t[3]!==o?(d=n.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",children:[u,o]}),t[3]=o,t[4]=d):d=t[4];let r;t[5]!==a||t[6]!==i||t[7]!==e?(r=i?a?n.jsx(ae,{initial:i,onDone:()=>s(!1)}):n.jsxs("div",{className:"flex flex-col items-start gap-3",children:[n.jsx("p",{className:"max-w-[720px] text-2xl leading-snug font-medium text-balance text-foreground",children:i}),n.jsxs(L,{variant:"outline",size:"sm",onClick:()=>s(!0),children:[n.jsx(ye,{}),e("plan.objective.edit")]})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"max-w-[560px] text-base text-pretty text-muted-foreground",children:e("plan.objective.empty")}),n.jsx(ae,{initial:""})]}),t[5]=a,t[6]=i,t[7]=e,t[8]=r):r=t[8];let c;return t[9]!==d||t[10]!==r?(c=n.jsxs("section",{className:"flex flex-col gap-3",children:[d,r]}),t[9]=d,t[10]=r,t[11]=c):c=t[11],c}function zt(){const t=O.c(14),e=ot(),[l,a]=R.useState(""),{state:s}=e;if(s){let r;t[0]!==e||t[1]!==s?(r=()=>{a(s.idea),e.cancel()},t[0]=e,t[1]=s,t[2]=r):r=t[2];let c;return t[3]!==e||t[4]!==s||t[5]!==r?(c=n.jsx(J,{children:n.jsx(Ye,{guide:{...e,state:s,cancel:r}})}),t[3]=e,t[4]=s,t[5]=r,t[6]=c):c=t[6],c}let i;t[7]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(vt,{}),t[7]=i):i=t[7];let u;t[8]!==l||t[9]!==e.start?(u=n.jsx(gt,{initialIdea:l,onSubmit:e.start}),t[8]=l,t[9]=e.start,t[10]=u):u=t[10];let o;t[11]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ft,{}),t[11]=o):o=t[11];let d;return t[12]!==u?(d=n.jsx(J,{children:n.jsx(J.Content,{children:n.jsxs(J.Container,{width:"standard",className:"flex flex-col gap-12",children:[i,u,o]})})}),t[12]=u,t[13]=d):d=t[13],d}export{Ot as C,zt as P,Mt as r};
|
|
6
|
+
`)[0]??"";return e.length>F.title?`${e.slice(0,F.title-1)}…`:e}function st(t,e,l){const a=l.request.trim().slice(0,F.text),s={title:tt(l.title?.trim()||a),objective:l.objective?.trim().slice(0,F.text)||null,request:a};try{t.setItem(fe+e,JSON.stringify(s))}catch{}}function Mt(t,e){let l;try{l=t.getItem(fe+e)}catch{return null}if(!l)return null;let a;try{a=JSON.parse(l)}catch{return null}const s=et.safeParse(a);return s.success?Pe(s.data):null}function nt(t){return{step:0,idea:t.trim(),answers:[],title:null,view:{phase:"thinking"}}}function ie(t,e){if(e.step!==t.step)return t;switch(e.type){case"answered":return t.view.phase!=="asking"?t:{...t,step:t.step+1,answers:[...t.answers,{question:t.view.question.text,answer:e.answer.trim()}],view:{phase:"thinking"}};case"resolved":{if(t.view.phase!=="thinking")return t;const{question:l,reaction:a,title:s}=e.result;return{...t,title:s??t.title,view:l?{phase:"asking",question:l,reaction:a}:{phase:"building",guided:!0}}}case"failed":return t.view.phase!=="thinking"?t:{...t,view:{phase:"building",guided:!1}}}}function lt(t){return t.view.phase==="building"&&t.view.guided||t.answers.length>0?t.answers:void 0}const it=1600,at=2200;function ot(){const t=O.c(20),e=R(),l=he(),{createTaskWithMessage:a}=de(),s=ue()?.statement??null,[i,u]=K.useState(null),o=K.useRef(null),d=K.useRef(!1);let r;t[0]!==a||t[1]!==s||t[2]!==e?(r=x=>{const v=lt(x);V("plan_guide_done",{has_objective:!!s,questions:x.answers.length,skipped:x.answers.filter(ct).length,guided:x.view.phase==="building"&&x.view.guided});const N=crypto.randomUUID(),w=Ce(N);st(sessionStorage,w,{objective:s,request:x.idea,title:x.title}),a({id:N,tabId:oe(w),message:{parts:[{type:"text",text:Ze(e,{idea:x.idea,objective:s,casePath:Ie(w),...v?{answers:v}:{}})}]}})},t[0]=a,t[1]=s,t[2]=e,t[3]=r):r=t[3];const c=r;let f;t[4]!==s||t[5]!==c||t[6]!==l?(f=async x=>{o.current?.abort();const v=new AbortController;o.current=v;const{signal:N}=v;u(x);let w;try{const[q]=await Promise.all([l.call("PLAN_CASE_NEXT_QUESTION",{idea:x.idea.slice(0,F.text),objective:s,answers:x.answers.map(rt)}),se(it,{signal:N})]);w={type:"resolved",step:x.step,result:q}}catch{w={type:"failed",step:x.step}}if(N.aborted)return;const _=ie(x,w);if(u(_),_.view.phase==="building"){try{await se(at,{signal:N})}catch{return}o.current=null,u(null),d.current&&c(_)}},t[4]=s,t[5]=c,t[6]=l,t[7]=f):f=t[7];const m=f;let p;t[8]===Symbol.for("react.memo_cache_sentinel")?(p=x=>{d.current=x!==null},t[8]=p):p=t[8];let h;t[9]!==s||t[10]!==m?(h=x=>{x.trim()&&(V("plan_idea_submitted",{has_objective:!!s}),m(nt(x)))},t[9]=s,t[10]=m,t[11]=h):h=t[11];let g;t[12]!==i||t[13]!==m?(g=x=>{if(!i)return;const v=ie(i,{type:"answered",step:i.step,answer:x});v!==i&&(V("plan_guide_question_answered",{step:i.step,skipped:!x.trim()}),m(v))},t[12]=i,t[13]=m,t[14]=g):g=t[14];let b;t[15]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{o.current?.abort(),o.current=null,u(null)},t[15]=b):b=t[15];let j;return t[16]!==i||t[17]!==h||t[18]!==g?(j={state:i,screenRef:p,start:h,answer:g,cancel:b},t[16]=i,t[17]=h,t[18]=g,t[19]=j):j=t[19],j}function rt(t){const{question:e,answer:l}=t;return{question:e.slice(0,F.item),answer:l.slice(0,F.text)}}function ct(t){return!t.answer}const dt=20,ut={framing:"plan.case.status.framing",building:"plan.case.status.building",ready:"plan.case.status.ready"};function mt(t){const e=O.c(28),{entry:l,threadId:a}=t,s=R(),i=De(),{openTask:u}=de(),o=qe(l.path),d=o.data?.value;let r;e[0]!==l.path||e[1]!==u||e[2]!==a?(r=()=>u(a,{tabId:oe(l.path)}),e[0]=l.path,e[1]=u,e[2]=a,e[3]=r):r=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(we,{className:"size-4 shrink-0 text-muted-foreground"}),e[4]=c):c=e[4];let f;e[5]!==o.isPending||e[6]!==s||e[7]!==d?.title?(f=d?.title??(o.isPending?"…":s("plan.cases.unreadable")),e[5]=o.isPending,e[6]=s,e[7]=d?.title,e[8]=f):f=e[8];let m;e[9]!==f?(m=n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:f}),e[9]=f,e[10]=m):m=e[10];let p;e[11]!==l.updatedAt||e[12]!==i||e[13]!==s?(p=s("plan.cases.updated",{when:Oe(new Date(l.updatedAt),{addSuffix:!0,locale:i})}),e[11]=l.updatedAt,e[12]=i,e[13]=s,e[14]=p):p=e[14];let h;e[15]!==p?(h=n.jsx("span",{className:"text-xs text-muted-foreground",children:p}),e[15]=p,e[16]=h):h=e[16];let g;e[17]!==m||e[18]!==h?(g=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[m,h]}),e[17]=m,e[18]=h,e[19]=g):g=e[19];let b;e[20]!==s||e[21]!==d?(b=d&&n.jsx(re,{variant:d.status==="ready"?"success":"agent",children:s(ut[d.status])}),e[20]=s,e[21]=d,e[22]=b):b=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(be,{className:"size-4 shrink-0 text-muted-foreground"}),e[23]=j):j=e[23];let x;return e[24]!==r||e[25]!==g||e[26]!==b?(x=n.jsx("li",{children:n.jsxs("button",{type:"button",onClick:r,className:"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left hover:bg-accent focus-ring",children:[c,g,b,j]})}),e[24]=r,e[25]=g,e[26]=b,e[27]=x):x=e[27],x}function ft(){const t=O.c(28),e=R(),{data:l}=ge.useSession(),a=l?.user?.id,s=Me("home",$e);let i,u,o,d,r;if(t[0]!==s.data||t[1]!==e||t[2]!==a){r=Symbol.for("react.early_return_sentinel");e:{let m;t[8]!==a?(m=x=>{const v=Ae(x.path);return x.kind==="file"&&v&&(!x.createdBy||x.createdBy===a)?[{entry:x,threadId:v}]:[]},t[8]=a,t[9]=m):m=t[9];const p=(s.data??[]).flatMap(m).toSorted(xt).slice(0,dt);if(p.length===0){r=null;break e}o="flex flex-col gap-3";let h;t[10]!==e?(h=e("plan.cases.heading"),t[10]=e,t[11]=h):h=t[11];let g;t[12]!==h?(g=n.jsx("h2",{className:"text-xl font-medium text-foreground",children:h}),t[12]=h,t[13]=g):g=t[13];let b;t[14]!==e?(b=e("plan.cases.description"),t[14]=e,t[15]=b):b=t[15];let j;t[16]!==b?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:b}),t[16]=b,t[17]=j):j=t[17],t[18]!==g||t[19]!==j?(d=n.jsxs("div",{className:"flex flex-col gap-1",children:[g,j]}),t[18]=g,t[19]=j,t[20]=d):d=t[20],i="-mx-3 flex flex-col",u=p.map(pt)}t[0]=s.data,t[1]=e,t[2]=a,t[3]=i,t[4]=u,t[5]=o,t[6]=d,t[7]=r}else i=t[3],u=t[4],o=t[5],d=t[6],r=t[7];if(r!==Symbol.for("react.early_return_sentinel"))return r;let c;t[21]!==i||t[22]!==u?(c=n.jsx("ul",{className:i,children:u}),t[21]=i,t[22]=u,t[23]=c):c=t[23];let f;return t[24]!==o||t[25]!==d||t[26]!==c?(f=n.jsxs("section",{className:o,children:[d,c]}),t[24]=o,t[25]=d,t[26]=c,t[27]=f):f=t[27],f}function pt(t){const{entry:e,threadId:l}=t;return n.jsx(mt,{entry:e,threadId:l},e.path)}function xt(t,e){return e.entry.updatedAt.localeCompare(t.entry.updatedAt)}const ht=[{label:"plan.idea.topic.shipping",prompt:"plan.idea.topic.shippingPrompt"},{label:"plan.idea.topic.pdp",prompt:"plan.idea.topic.pdpPrompt"},{label:"plan.idea.topic.checkout",prompt:"plan.idea.topic.checkoutPrompt"},{label:"plan.idea.topic.search",prompt:"plan.idea.topic.searchPrompt"},{label:"plan.idea.topic.performance",prompt:"plan.idea.topic.performancePrompt"},{label:"plan.idea.topic.paidMedia",prompt:"plan.idea.topic.paidMediaPrompt"}];function gt(t){const e=O.c(52),{initialIdea:l,onSubmit:a}=t,s=R(),[i,u]=K.useState(l);let o;e[0]!==i?(o=i.trim(),e[0]=i,e[1]=o):o=e[1];const d=o.length>0;let r;e[2]!==i||e[3]!==a||e[4]!==d?(r=S=>{S.preventDefault(),d&&a(i)},e[2]=i,e[3]=a,e[4]=d,e[5]=r):r=e[5];const c=r;let f;e[6]!==s?(f=s("plan.idea.heading"),e[6]=s,e[7]=f):f=e[7];let m;e[8]!==f?(m=n.jsx("h2",{className:"text-xl font-medium text-foreground",children:f}),e[8]=f,e[9]=m):m=e[9];let p;e[10]!==s?(p=s("plan.idea.description"),e[10]=s,e[11]=p):p=e[11];let h;e[12]!==p?(h=n.jsx("p",{className:"text-sm text-pretty text-muted-foreground",children:p}),e[12]=p,e[13]=h):h=e[13];let g;e[14]!==m||e[15]!==h?(g=n.jsxs("div",{className:"flex flex-col gap-1",children:[m,h]}),e[14]=m,e[15]=h,e[16]=g):g=e[16];let b;e[17]!==s?(b=s("plan.idea.label"),e[17]=s,e[18]=b):b=e[18];let j;e[19]!==s?(j=s("plan.idea.placeholder"),e[19]=s,e[20]=j):j=e[20];let x;e[21]===Symbol.for("react.memo_cache_sentinel")?(x=S=>u(S.target.value),e[21]=x):x=e[21];let v;e[22]!==c?(v=S=>{S.key==="Enter"&&(S.metaKey||S.ctrlKey)&&c(S)},e[22]=c,e[23]=v):v=e[23];let N;e[24]!==i||e[25]!==v||e[26]!==b||e[27]!==j?(N=n.jsx(te,{"aria-label":b,placeholder:j,value:i,onChange:x,onKeyDown:v,className:"min-h-32 text-[15px]"}),e[24]=i,e[25]=v,e[26]=b,e[27]=j,e[28]=N):N=e[28];const w=!d;let _;e[29]!==s?(_=s("plan.idea.submit"),e[29]=s,e[30]=_):_=e[30];let q;e[31]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx(ce,{}),e[31]=q):q=e[31];let k;e[32]!==w||e[33]!==_?(k=n.jsx("div",{className:"flex justify-end",children:n.jsxs(L,{type:"submit",disabled:w,children:[_,q]})}),e[32]=w,e[33]=_,e[34]=k):k=e[34];let P;e[35]!==c||e[36]!==N||e[37]!==k?(P=n.jsxs("form",{onSubmit:c,className:"flex flex-col gap-3",children:[N,k]}),e[35]=c,e[36]=N,e[37]=k,e[38]=P):P=e[38];let E;e[39]!==s?(E=s("plan.idea.startWith"),e[39]=s,e[40]=E):E=e[40];let C;e[41]!==E?(C=n.jsx("span",{className:"mr-1 text-meta",children:E}),e[41]=E,e[42]=C):C=e[42];let I;e[43]!==s?(I=ht.map(S=>n.jsx(L,{type:"button",variant:"outline",size:"sm",onClick:()=>u(D=>D||s(S.prompt)),children:s(S.label)},S.label)),e[43]=s,e[44]=I):I=e[44];let $;e[45]!==C||e[46]!==I?($=n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[C,I]}),e[45]=C,e[46]=I,e[47]=$):$=e[47];let A;return e[48]!==P||e[49]!==$||e[50]!==g?(A=n.jsxs("section",{className:"flex flex-col gap-4",children:[g,P,$]}),e[48]=P,e[49]=$,e[50]=g,e[51]=A):A=e[51],A}function bt(t){return t.found?{kind:"found",statement:t.found.statement,source:t.found.source.label,quote:t.found.quote}:{kind:"missing",message:t.reason==="unavailable"?"plan.objective.findUnavailable":"plan.objective.notFound",read:t.read,unread:t.unread}}function jt(t){const e=O.c(28),{notice:l,draft:a}=t,s=R();if(l.kind==="found"){if(!a)return null;let p;e[0]!==l.quote||e[1]!==l.source||e[2]!==s?(p=s("plan.objective.found",{source:l.source,quote:l.quote}),e[0]=l.quote,e[1]=l.source,e[2]=s,e[3]=p):p=e[3];let h;return e[4]!==p?(h=n.jsx("p",{className:"text-meta",children:p}),e[4]=p,e[5]=h):h=e[5],h}let i;e[6]!==l.message||e[7]!==s?(i=s(l.message),e[6]=l.message,e[7]=s,e[8]=i):i=e[8];let u;e[9]!==i?(u=n.jsx("p",{className:"text-foreground",children:i}),e[9]=i,e[10]=u):u=e[10];let o;e[11]!==l.read||e[12]!==s?(o=l.read.length>0?s("plan.objective.read",{sources:l.read.join(", ")}):s("plan.objective.readNothing"),e[11]=l.read,e[12]=s,e[13]=o):o=e[13];let d;e[14]!==o?(d=n.jsx("p",{children:o}),e[14]=o,e[15]=d):d=e[15];let r;e[16]!==l.unread||e[17]!==s?(r=l.unread.length>0&&n.jsx("p",{children:s("plan.objective.unread",{files:l.unread.join(", ")})}),e[16]=l.unread,e[17]=s,e[18]=r):r=e[18];let c;e[19]!==s?(c=s("plan.objective.connectHint"),e[19]=s,e[20]=c):c=e[20];let f;e[21]!==c?(f=n.jsx("p",{children:c}),e[21]=c,e[22]=f):f=e[22];let m;return e[23]!==u||e[24]!==d||e[25]!==r||e[26]!==f?(m=n.jsxs("div",{className:"flex flex-col gap-1 text-sm text-muted-foreground",children:[u,d,r,f]}),e[23]=u,e[24]=d,e[25]=r,e[26]=f,e[27]=m):m=e[27],m}function ae(t){const e=O.c(60),{initial:l,onDone:a}=t,s=R(),[i,u]=K.useState(l),[o,d]=K.useState(null),r=Te(),c=Ee();let f;e[0]!==i?(f=i.trim(),e[0]=i,e[1]=f):f=e[1];const m=f,p=r.isPending||c.isPending;let h;e[2]!==a||e[3]!==r||e[4]!==s?(h=T=>r.mutate({statement:T},{onSuccess:()=>a?.(),onError:()=>je.error(s("plan.objective.saveError"))}),e[2]=a,e[3]=r,e[4]=s,e[5]=h):h=e[5];const g=h;let b;e[6]!==m||e[7]!==g?(b=T=>{T.preventDefault(),m&&g(m)},e[6]=m,e[7]=g,e[8]=b):b=e[8];const j=b;let x;e[9]!==c?(x=()=>{V("plan_objective_find_clicked"),d(null),c.mutate(void 0,{onSuccess:T=>{const G=bt(T);V("plan_objective_find_answered",{outcome:T.found?"found":T.reason??"not_found"}),G.kind==="found"&&u(G.statement),d(G)},onError:()=>d({kind:"missing",message:"plan.objective.findUnavailable",read:[],unread:[]})})},e[9]=c,e[10]=x):x=e[10];const v=x;let N;e[11]!==s?(N=s("plan.objective.label"),e[11]=s,e[12]=N):N=e[12];let w;e[13]!==s?(w=s("plan.objective.placeholder"),e[13]=s,e[14]=w):w=e[14];let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=T=>u(T.target.value),e[15]=_):_=e[15];const q=a!==void 0;let k;e[16]!==i||e[17]!==c.isPending||e[18]!==N||e[19]!==w||e[20]!==q?(k=n.jsx(te,{"aria-label":N,placeholder:w,value:i,maxLength:ze,onChange:_,disabled:c.isPending,className:"min-h-20 text-base",autoFocus:q}),e[16]=i,e[17]=c.isPending,e[18]=N,e[19]=w,e[20]=q,e[21]=k):k=e[21];let P;e[22]!==c.isPending||e[23]!==o||e[24]!==m||e[25]!==s?(P=c.isPending?n.jsx("p",{className:"animate-pulse text-sm text-muted-foreground",children:s("plan.objective.finding")}):o?n.jsx(jt,{notice:o,draft:m}):n.jsx("span",{className:"text-meta",children:s("plan.objective.hint")}),e[22]=c.isPending,e[23]=o,e[24]=m,e[25]=s,e[26]=P):P=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Se,{}),e[27]=E):E=e[27];let C;e[28]!==s?(C=s("plan.objective.find"),e[28]=s,e[29]=C):C=e[29];let I;e[30]!==p||e[31]!==v||e[32]!==C?(I=n.jsxs(L,{type:"button",variant:"outline",size:"sm",disabled:p,onClick:v,children:[E,C]}),e[30]=p,e[31]=v,e[32]=C,e[33]=I):I=e[33];let $;e[34]!==p||e[35]!==l||e[36]!==s||e[37]!==g?($=l&&n.jsx(L,{type:"button",variant:"ghost",size:"sm",disabled:p,onClick:()=>g(null),children:s("plan.objective.clear")}),e[34]=p,e[35]=l,e[36]=s,e[37]=g,e[38]=$):$=e[38];let A;e[39]!==a||e[40]!==r.isPending||e[41]!==s?(A=a&&n.jsx(L,{type:"button",variant:"outline",size:"sm",disabled:r.isPending,onClick:a,children:s("plan.objective.cancel")}),e[39]=a,e[40]=r.isPending,e[41]=s,e[42]=A):A=e[42];const S=!m||p;let D;e[43]!==s?(D=s("plan.objective.save"),e[43]=s,e[44]=D):D=e[44];let M;e[45]!==S||e[46]!==D?(M=n.jsx(L,{type:"submit",size:"sm",disabled:S,children:D}),e[45]=S,e[46]=D,e[47]=M):M=e[47];let z;e[48]!==$||e[49]!==A||e[50]!==M?(z=n.jsxs("div",{className:"ml-auto flex gap-2",children:[$,A,M]}),e[48]=$,e[49]=A,e[50]=M,e[51]=z):z=e[51];let B;e[52]!==I||e[53]!==z?(B=n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[I,z]}),e[52]=I,e[53]=z,e[54]=B):B=e[54];let U;return e[55]!==j||e[56]!==P||e[57]!==B||e[58]!==k?(U=n.jsxs("form",{onSubmit:j,className:"flex flex-col gap-2",children:[k,P,B]}),e[55]=j,e[56]=P,e[57]=B,e[58]=k,e[59]=U):U=e[59],U}function vt(){const t=O.c(12),e=R(),l=ue(),[a,s]=K.useState(!1),i=l?.statement??"";let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(ee,{size:13}),t[0]=u):u=t[0];let o;t[1]!==e?(o=e("plan.objective.eyebrow"),t[1]=e,t[2]=o):o=t[2];let d;t[3]!==o?(d=n.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",children:[u,o]}),t[3]=o,t[4]=d):d=t[4];let r;t[5]!==a||t[6]!==i||t[7]!==e?(r=i?a?n.jsx(ae,{initial:i,onDone:()=>s(!1)}):n.jsxs("div",{className:"flex flex-col items-start gap-3",children:[n.jsx("p",{className:"max-w-[720px] text-2xl leading-snug font-medium text-balance text-foreground",children:i}),n.jsxs(L,{variant:"outline",size:"sm",onClick:()=>s(!0),children:[n.jsx(ye,{}),e("plan.objective.edit")]})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"max-w-[560px] text-base text-pretty text-muted-foreground",children:e("plan.objective.empty")}),n.jsx(ae,{initial:""})]}),t[5]=a,t[6]=i,t[7]=e,t[8]=r):r=t[8];let c;return t[9]!==d||t[10]!==r?(c=n.jsxs("section",{className:"flex flex-col gap-3",children:[d,r]}),t[9]=d,t[10]=r,t[11]=c):c=t[11],c}function zt(){const t=O.c(14),e=ot(),[l,a]=K.useState(""),{state:s}=e;if(s){let r;t[0]!==e||t[1]!==s?(r=()=>{a(s.idea),e.cancel()},t[0]=e,t[1]=s,t[2]=r):r=t[2];let c;return t[3]!==e||t[4]!==s||t[5]!==r?(c=n.jsx(X,{children:n.jsx(Ye,{guide:{...e,state:s,cancel:r}})}),t[3]=e,t[4]=s,t[5]=r,t[6]=c):c=t[6],c}let i;t[7]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(vt,{}),t[7]=i):i=t[7];let u;t[8]!==l||t[9]!==e.start?(u=n.jsx(gt,{initialIdea:l,onSubmit:e.start}),t[8]=l,t[9]=e.start,t[10]=u):u=t[10];let o;t[11]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ft,{}),t[11]=o):o=t[11];let d;return t[12]!==u?(d=n.jsx(X,{children:n.jsx(X.Content,{children:n.jsxs(X.Container,{width:"standard",className:"flex flex-col gap-12",children:[i,u,o]})})}),t[12]=u,t[13]=d):d=t[13],d}export{Ot as C,zt as P,Mt as r};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{r as Y,j as s,
|
|
1
|
+
import{r as Y,j as s,d_ as me,hW as ye,c as G,m as Z,c1 as Pe,b as q,a6 as se,an as X,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aL as we,aM as Ee,aN as Ae,aO as Ie,bc as Ue,aP as De,aQ as Te,aR as Re,gl as le,gZ as ne,i as xe,e3 as pe,b9 as $e,at as Be,av as Le,L as ke,gK as He}from"./index-CaT4JsCE.js";import{s as Oe}from"./Plus-BXH7i2b3.js";import{B as Fe}from"./badge-BgjvI8Jn.js";import{a as Me,b as ze,P as Ve}from"./popover-BSXUrcE6.js";import{a as ce,T as Ge}from"./toggle-group-xl-tep-u.js";import{g as Ke}from"./use-ai-providers-bUEURX0w.js";import{u as ie,d as he,a as qe}from"./use-entitlements-D7RtNoTI.js";import{u as Qe,P as Ye}from"./plan-ladder-BT6v1KK6.js";var re="Progress",oe=100,[Ze]=ye(re),[Xe,Je]=Ze(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Xe,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var je="ProgressIndicator",be=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(je,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});be.displayName=je;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
2
|
- a positive number
|
|
3
3
|
- less than the value passed to \`max\` (or ${oe} if no \`max\` prop is set)
|
|
4
4
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5
5
|
|
|
6
|
-
Defaulting to \`null\`.`}var st=ve,lt=je;const nt=Pe("h-full w-full flex-1 rounded-full transition-transform duration-200 ease-[var(--ease-out-cubic)]",{variants:{tone:{default:"bg-brand-purple",warning:"bg-warning",dark:"bg-primary"}},defaultVariants:{tone:"default"}});function at(e){const t=G.c(18);let n,o,a,l;t[0]!==e?({className:n,value:l,tone:a,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=a,t[4]=l):(n=t[1],o=t[2],a=t[3],l=t[4]);const c=Math.min(100,Math.max(0,l??0));let i;t[5]!==n?(i=X("bg-muted relative h-1 w-full overflow-hidden rounded-full",n),t[5]=n,t[6]=i):i=t[6];let r;t[7]!==a?(r=nt({tone:a}),t[7]=a,t[8]=r):r=t[8];const u=`translateX(-${100-c}%)`;let m;t[9]!==u?(m={transform:u},t[9]=u,t[10]=m):m=t[10];let g;t[11]!==r||t[12]!==m?(g=s.jsx(lt,{"data-slot":"progress-indicator",className:r,style:m}),t[11]=r,t[12]=m,t[13]=g):g=t[13];let d;return t[14]!==o||t[15]!==i||t[16]!==g?(d=s.jsx(st,{"data-slot":"progress",className:i,...o,children:g}),t[14]=o,t[15]=i,t[16]=g,t[17]=d):d=t[17],d}const it={usd:[10,20,100],brl:[50,100,500]};function Ce(){const e=G.c(30),t=q(),n=Z(),[o]=ge(),[a,l]=Y.useState(!1);let c;e[0]!==t?(c=x=>{W.error(t("settings.decoCreditsHero.topUpFailed",{message:x.message}))},e[0]=t,e[1]=c):c=e[1];const{mutate:i,isPending:r}=ae({mutationFn:async x=>{const{url:E}=await n.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:x,currency:f});return E},onSuccess:rt,onError:c}),[u,m]=Y.useState(""),[g,d]=Y.useState(o.language==="pt-BR"?"brl":"usd"),f=g,h=parseFloat(u),C=!isNaN(h)&&h>=1,p=f==="brl"?"R$":"$";let _;e[2]!==d?(_=x=>{x&&d(x)},e[2]=d,e[3]=_):_=e[3];let b,w;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ce,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),w=s.jsx(ce,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=b,e[5]=w):(b=e[4],w=e[5]);let j;e[6]!==f||e[7]!==_?(j=s.jsxs(Ge,{type:"single",variant:"outline",size:"sm",value:f,onValueChange:_,children:[b,w]}),e[6]=f,e[7]=_,e[8]=j):j=e[8];let y;e[9]!==f||e[10]!==p||e[11]!==a||e[12]!==r||e[13]!==t||e[14]!==i?(y=!a&&s.jsxs(s.Fragment,{children:[it[f].map(x=>s.jsxs(V,{variant:"outline",className:"tabular-nums",disabled:r,onClick:()=>i(x*100),children:[p,x]},x)),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>l(!0),disabled:r,children:t("settings.decoCreditsHero.custom")})]}),e[9]=f,e[10]=p,e[11]=a,e[12]=r,e[13]=t,e[14]=i,e[15]=y):y=e[15];let N;e[16]!==p||e[17]!==u||e[18]!==h||e[19]!==a||e[20]!==C||e[21]!==r||e[22]!==m||e[23]!==t||e[24]!==i?(N=a&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:p}),s.jsx(Se,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:u,onChange:x=>m(x.target.value),size:"sm",className:"pl-7",autoFocus:!0})]}),s.jsx(V,{disabled:!C||r,onClick:()=>i(Math.round(h*100)),children:r?"...":t("settings.decoCreditsHero.add")}),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{l(!1),m("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=p,e[17]=u,e[18]=h,e[19]=a,e[20]=C,e[21]=r,e[22]=m,e[23]=t,e[24]=i,e[25]=N):N=e[25];let P;return e[26]!==j||e[27]!==y||e[28]!==N?(P=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j,y,N]})}),e[26]=j,e[27]=y,e[28]=N,e[29]=P):P=e[29],P}function rt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function ot(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function ct(e){const t=G.c(38),{enabled:n}=e,o=q(),{org:a}=se(),l=Z();let c;t[0]!==a.id?(c=ee.aiProviderCredits(a.id,"deco"),t[0]=a.id,t[1]=c):c=t[1];let i;t[2]!==l?(i=async()=>{try{return await l.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=l,t[3]=i):i=t[3];let r;t[4]!==n||t[5]!==c||t[6]!==i?(r={queryKey:c,enabled:n,staleTime:6e4,queryFn:i},t[4]=n,t[5]=c,t[6]=i,t[7]=r):r=t[7];const{data:u,isLoading:m,refetch:g,isFetching:d}=xe(r);if(!n)return null;const f=u?.balanceCents!=null?u.balanceCents/100:null;let h;t[8]!==f?(h=f!=null?`$${f.toFixed(2)}`:"—",t[8]=f,t[9]=h):h=t[9];const C=h;let p;t[10]!==f||t[11]!==C||t[12]!==d||t[13]!==m?(p=m||d?s.jsx(pe,{className:"h-9 w-24"}):s.jsx("span",{className:X("text-3xl font-semibold tabular-nums tracking-tight",f!=null&&ot(f)),children:C}),t[10]=f,t[11]=C,t[12]=d,t[13]=m,t[14]=p):p=t[14];let _;t[15]!==g?(_=()=>g(),t[15]=g,t[16]=_):_=t[16];let b;t[17]!==o?(b=o("settings.decoCreditsHero.refreshBalance"),t[17]=o,t[18]=b):b=t[18];const w=d&&"animate-spin";let j;t[19]!==w?(j=X("size-3.5",w),t[19]=w,t[20]=j):j=t[20];let y;t[21]!==j?(y=s.jsx(Re,{className:j}),t[21]=j,t[22]=y):y=t[22];let N;t[23]!==d||t[24]!==y||t[25]!==_||t[26]!==b?(N=s.jsx(V,{type:"button",variant:"ghost",size:"icon-xs",onClick:_,disabled:d,className:"text-muted-foreground hover:text-foreground","aria-label":b,children:y}),t[23]=d,t[24]=y,t[25]=_,t[26]=b,t[27]=N):N=t[27];let P;t[28]!==N||t[29]!==p?(P=s.jsxs("div",{className:"flex items-baseline gap-2",children:[p,N]}),t[28]=N,t[29]=p,t[30]=P):P=t[30];let x;t[31]!==o?(x=o("settings.decoCreditsHero.availableBalance"),t[31]=o,t[32]=x):x=t[32];let E;t[33]!==x?(E=s.jsx("p",{className:"text-xs text-muted-foreground",children:x}),t[33]=x,t[34]=E):E=t[34];let I;return t[35]!==P||t[36]!==E?(I=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[P,E]}),t[35]=P,t[36]=E,t[37]=I):I=t[37],I}function _t(){const e=G.c(74),t=q(),{org:n}=se(),o=Z(),a=_e(),l=Ke();let c;e[0]!==l?(c=l.find(dt),e[0]=l,e[1]=c):c=e[1];const i=c,r=ie(),u=he("credits"),[m,g]=Y.useState(!1);let d;e[2]!==i||e[3]!==o?(d=async()=>{i&&await o.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[2]=i,e[3]=o,e[4]=d):d=e[4];let f;e[5]!==n||e[6]!==a||e[7]!==t?(f=()=>{a.invalidateQueries({queryKey:ee.aiProviderKeys(n.id)}),a.invalidateQueries({queryKey:ee.aiProviders(n.id)}),W.success(t("settings.decoCreditsHero.disconnectSuccess")),g(!1)},e[5]=n,e[6]=a,e[7]=t,e[8]=f):f=e[8];let h;e[9]!==t?(h=K=>{W.error(t("settings.decoCreditsHero.disconnectError",{message:K.message}))},e[9]=t,e[10]=h):h=e[10];let C;e[11]!==d||e[12]!==f||e[13]!==h?(C={mutationFn:d,onSuccess:f,onError:h},e[11]=d,e[12]=f,e[13]=h,e[14]=C):C=e[14];const{mutate:p,isPending:_}=ae(C);if(!i)return null;let b;e[15]!==t?(b=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=b):b=e[16];let w;e[17]!==t?(w=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=w):w=e[18];let j;e[19]!==w?(j=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:w,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=w,e[20]=j):j=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=()=>g(!0),e[21]=y):y=e[21];let N;e[22]!==t?(N=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=N):N=e[23];let P;e[24]!==_||e[25]!==N?(P=s.jsx(V,{variant:"ghost-destructive",size:"sm",onClick:y,disabled:_,children:N}),e[24]=_,e[25]=N,e[26]=P):P=e[26];let x;e[27]!==P||e[28]!==j?(x=s.jsxs("div",{className:"flex items-center justify-between",children:[j,P]}),e[27]=P,e[28]=j,e[29]=x):x=e[29];let E;e[30]!==t?(E=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=E):E=e[31];let I;e[32]!==E?(I=s.jsx(we,{children:E}),e[32]=E,e[33]=I):I=e[33];let U;e[34]!==t?(U=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=U):U=e[35];let T;e[36]!==U?(T=s.jsx(Ee,{children:U}),e[36]=U,e[37]=T):T=e[37];let D;e[38]!==I||e[39]!==T?(D=s.jsxs(Ae,{children:[I,T]}),e[38]=I,e[39]=T,e[40]=D):D=e[40];let O;e[41]!==t?(O=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=O):O=e[42];let $;e[43]!==O?($=s.jsx(Ie,{children:O}),e[43]=O,e[44]=$):$=e[44];let z;e[45]!==p?(z=()=>p(),e[45]=p,e[46]=z):z=e[46];let R;e[47]!==t?(R=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=R):R=e[48];let B;e[49]!==z||e[50]!==R?(B=s.jsx(Ue,{onClick:z,variant:"destructive",children:R}),e[49]=z,e[50]=R,e[51]=B):B=e[51];let L;e[52]!==$||e[53]!==B?(L=s.jsxs(Te,{children:[$,B]}),e[52]=$,e[53]=B,e[54]=L):L=e[54];let k;e[55]!==D||e[56]!==L?(k=s.jsxs(De,{children:[D,L]}),e[55]=D,e[56]=L,e[57]=k):k=e[57];let F;e[58]!==m||e[59]!==k?(F=s.jsx($e,{open:m,onOpenChange:g,children:k}),e[58]=m,e[59]=k,e[60]=F):F=e[60];const v=!r;let S;e[61]!==v?(S=s.jsx(ct,{enabled:v}),e[61]=v,e[62]=S):S=e[62];let A;e[63]!==u||e[64]!==t?(A=u?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(Ce,{})]}):null,e[63]=u,e[64]=t,e[65]=A):A=e[65];let H;e[66]!==x||e[67]!==F||e[68]!==S||e[69]!==A?(H=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[x,F,S,A]})}),e[66]=x,e[67]=F,e[68]=S,e[69]=A,e[70]=H):H=e[70];let M;return e[71]!==H||e[72]!==b?(M=s.jsx(ne,{title:b,children:H}),e[71]=H,e[72]=b,e[73]=M):M=e[73],M}function dt(e){return e.providerId==="deco"}function ut(e,t){const n=G.c(9),o=Z(),a=q();let l;n[0]!==o||n[1]!==e?(l=async r=>{const{url:u}=await o.call(e,e==="ORGANIZATION_BILLING_CHECKOUT_START"&&r?{planId:r}:{});return u},n[0]=o,n[1]=e,n[2]=l):l=n[2];let c;n[3]!==t||n[4]!==a?(c=r=>W.error(a(t,{message:r.message})),n[3]=t,n[4]=a,n[5]=c):c=n[5];let i;return n[6]!==l||n[7]!==c?(i={mutationFn:l,onSuccess:ft,onError:c},n[6]=l,n[7]=c,n[8]=i):i=n[8],ae(i)}function ft(e){return window.open(e,"_blank","noopener,noreferrer")}const mt={ok:"text-foreground",warn:"text-warning",exhausted:"text-destructive",spent:"text-muted-foreground"},gt={ok:"[&>[data-slot=progress-indicator]]:bg-brand-purple",warn:"[&>[data-slot=progress-indicator]]:bg-warning",exhausted:"[&>[data-slot=progress-indicator]]:bg-destructive",spent:"[&>[data-slot=progress-indicator]]:bg-muted-foreground/40"};function fe(e){const t=G.c(22),{label:n,badge:o,value:a,unit:l,valueClassName:c,bar:i,footer:r}=e;let u;t[0]!==n?(u=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),t[0]=n,t[1]=u):u=t[1];let m;t[2]!==o||t[3]!==u?(m=s.jsxs("div",{className:"flex h-5 items-center gap-2",children:[u,o]}),t[2]=o,t[3]=u,t[4]=m):m=t[4];let g;t[5]!==c?(g=X("text-4xl font-semibold leading-none tracking-tight tabular-nums",c),t[5]=c,t[6]=g):g=t[6];let d;t[7]!==g||t[8]!==a?(d=s.jsx("span",{className:g,children:a}),t[7]=g,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==l?(f=l&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),t[10]=l,t[11]=f):f=t[11];let h;t[12]!==d||t[13]!==f?(h=s.jsxs("div",{className:"flex items-baseline gap-2",children:[d,f]}),t[12]=d,t[13]=f,t[14]=h):h=t[14];let C;t[15]!==i||t[16]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-2",children:[i,r]}),t[15]=i,t[16]=r,t[17]=C):C=t[17];let p;return t[18]!==m||t[19]!==h||t[20]!==C?(p=s.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[m,h,C]}),t[18]=m,t[19]=h,t[20]=C,t[21]=p):p=t[21],p}function xt(){const e=G.c(8),t=q();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{size:14}),e[0]=n):n=e[0];let o;e[1]!==t?(o=t("settings.decoCreditsHero.addCredits"),e[1]=t,e[2]=o):o=e[2];let a;e[3]!==o?(a=s.jsx(Me,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"sm",className:"w-fit",children:[n,o]})}),e[3]=o,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ze,{align:"start",className:"w-auto",children:s.jsx(Ce,{})}),e[5]=l):l=e[5];let c;return e[6]!==a?(c=s.jsxs(Ve,{children:[a,l]}),e[6]=a,e[7]=c):c=e[7],c}function pt(){const e=G.c(15),t=q(),{org:n}=se(),o=Z();let a;e[0]!==n.id?(a=ee.orgBillingAccount(n.id),e[0]=n.id,e[1]=a):a=e[1];let l;e[2]!==o?(l=()=>o.call("ORGANIZATION_BILLING_GET",{}),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={queryKey:a,staleTime:6e4,queryFn:l},e[4]=a,e[5]=l,e[6]=c):c=e[6];const{data:i}=xe(c),{mutate:r,isPending:u}=ut("ORGANIZATION_BILLING_PORTAL","settings.planUsage.portalFailed");if(!i?.hasBillingAccount)return null;let m;e[7]!==r?(m=()=>r(),e[7]=r,e[8]=m):m=e[8];let g;e[9]!==t?(g=t("settings.planUsage.manageBilling"),e[9]=t,e[10]=g):g=e[10];let d;return e[11]!==u||e[12]!==m||e[13]!==g?(d=s.jsx(V,{variant:"outline",size:"sm",disabled:u,onClick:m,children:g}),e[11]=u,e[12]=m,e[13]=g,e[14]=d):d=e[14],d}function St(){const e=G.c(9),t=q(),{org:n}=se(),o=ie(),{granted:a}=Be("monitoring:view");if(!o||!a)return null;let l;e[0]!==n.slug?(l={org:n.slug},e[0]=n.slug,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={tab:"overview"},e[2]=c):c=e[2];let i;e[3]!==t?(i=t("settings.planUsage.aiUsage"),e[3]=t,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{size:14}),e[5]=r):r=e[5];let u;return e[6]!==l||e[7]!==i?(u=s.jsx(V,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs(ke,{to:"/$org/settings/monitor",params:l,search:c,children:[i,r]})}),e[6]=l,e[7]=i,e[8]=u):u=e[8],u}function wt(){const e=G.c(71),t=q(),[n]=ge(),o=ie(),a=he("credits"),{data:l,isLoading:c,isError:i,refetch:r}=qe(),{data:u}=Qe();let m;e[0]!==l?.plan||e[1]!==u?(m=u?.findIndex(v=>v.id===l?.plan.id)??-1,e[0]=l?.plan,e[1]=u,e[2]=m):m=e[2];const g=m;if(!o)return null;if(c){let v;e[3]!==t?(v=t("settings.planUsage.title"),e[3]=t,e[4]=v):v=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(le,{children:s.jsx("div",{className:"px-5 py-5",children:s.jsx(pe,{className:"h-24 w-full"})})}),e[5]=S):S=e[5];let A;return e[6]!==v?(A=s.jsx(ne,{title:v,children:S}),e[6]=v,e[7]=A):A=e[7],A}if(i||!l){let v;e[8]!==t?(v=t("settings.planUsage.title"),e[8]=t,e[9]=v):v=e[9];let S;e[10]!==t?(S=t("settings.planUsage.loadFailed"),e[10]=t,e[11]=S):S=e[11];let A;e[12]!==S?(A=s.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[12]=S,e[13]=A):A=e[13];let H;e[14]!==r?(H=()=>r(),e[14]=r,e[15]=H):H=e[15];let M;e[16]!==t?(M=t("settings.planUsage.retry"),e[16]=t,e[17]=M):M=e[17];let K;e[18]!==H||e[19]!==M?(K=s.jsx(V,{variant:"outline",size:"sm",onClick:H,children:M}),e[18]=H,e[19]=M,e[20]=K):K=e[20];let Q;e[21]!==A||e[22]!==K?(Q=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex items-center justify-between gap-3",children:[A,K]})}),e[21]=A,e[22]=K,e[23]=Q):Q=e[23];let J;return e[24]!==v||e[25]!==Q?(J=s.jsx(ne,{title:v,children:Q}),e[24]=v,e[25]=Q,e[26]=J):J=e[26],J}if(l.plan.id==="free")return null;let d;if(e[27]!==l.usage){const v=l.usage?Math.round(l.usage.percent*100):null;d=v!==null&&Number.isFinite(v)?Math.min(100,Math.max(0,v)):null,e[27]=l.usage,e[28]=d}else d=e[28];const f=d,h=l.usage?.state??"ok",C=l.features.chat,p=l.credits?.remainingUsd??null;let _;e[29]!==n?(_=v=>{if(!v)return null;const S=new Date(v);return Number.isNaN(S.getTime())?null:S.toLocaleDateString(n.language,{day:"numeric",month:"short"})},e[29]=n,e[30]=_):_=e[30];const b=_;let w;e[31]!==l.periodStart||e[32]!==b?(w=b(l.periodStart),e[31]=l.periodStart,e[32]=b,e[33]=w):w=e[33];const j=w;let y;e[34]!==l.periodEnd||e[35]!==b?(y=b(l.periodEnd),e[34]=l.periodEnd,e[35]=b,e[36]=y):y=e[36];const N=y;let P;e[37]!==N||e[38]!==j?(P=j&&N?{start:j,end:N}:null,e[37]=N,e[38]=j,e[39]=P):P=e[39];const x=P,E=h==="exhausted"&&p!==null&&p>0,I=E?"spent":h;let U;e[40]!==g?(U=g>=0&&s.jsx(Ye,{index:g,className:"size-6"}),e[40]=g,e[41]=U):U=e[41];let T;e[42]!==l.plan.name?(T=s.jsx("span",{className:"text-sm font-medium",children:l.plan.name}),e[42]=l.plan.name,e[43]=T):T=e[43];let D;e[44]!==U||e[45]!==T?(D=s.jsxs("div",{className:"flex items-center gap-2",children:[U,T]}),e[44]=U,e[45]=T,e[46]=D):D=e[46];let O;e[47]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(pt,{}),e[47]=O):O=e[47];let $;e[48]!==D?($=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[D,O]}),e[48]=D,e[49]=$):$=e[49];const z=a&&"sm:grid-cols-[minmax(0,1fr)_minmax(0,15rem)]";let R;e[50]!==z?(R=X("grid gap-x-8 gap-y-6",z),e[50]=z,e[51]=R):R=e[51];let B;e[52]!==I||e[53]!==C||e[54]!==f||e[55]!==x||e[56]!==t?(B=C?s.jsx(fe,{label:t("settings.planUsage.included"),value:f===null?t("settings.planUsage.usageUnavailable"):`${f}%`,unit:f!==null?t("settings.planUsage.used"):void 0,valueClassName:mt[I],bar:f===null?s.jsx("div",{className:"h-3 w-full rounded-full bg-muted/60","aria-hidden":"true"}):s.jsx(at,{value:f,"aria-label":t("settings.planUsage.included"),className:X("h-3 bg-muted [&>[data-slot=progress-indicator]]:rounded-full",gt[I])}),footer:x?s.jsxs("div",{className:"flex items-baseline justify-between gap-4 text-meta",children:[s.jsx("span",{children:x.start}),s.jsx("span",{children:x.end})]}):s.jsx("span",{className:"text-meta",children:t("settings.planUsage.periodHint")})}):s.jsx("p",{className:"text-sm text-muted-foreground self-center",children:t("settings.planUsage.noAiIncluded")}),e[52]=I,e[53]=C,e[54]=f,e[55]=x,e[56]=t,e[57]=B):B=e[57];let L;e[58]!==a||e[59]!==p||e[60]!==E||e[61]!==n||e[62]!==t?(L=a&&s.jsx(fe,{label:t("settings.planUsage.credits"),badge:E?s.jsx(Fe,{variant:"success",size:"sm",children:t("settings.planUsage.creditsInUse")}):null,value:p===null?"—":p.toLocaleString(n.language,{style:"currency",currency:"USD"}),valueClassName:p!==null&&p>0?"text-foreground":"text-muted-foreground",footer:s.jsx(xt,{})}),e[58]=a,e[59]=p,e[60]=E,e[61]=n,e[62]=t,e[63]=L):L=e[63];let k;e[64]!==R||e[65]!==B||e[66]!==L?(k=s.jsxs("div",{className:R,children:[B,L]}),e[64]=R,e[65]=B,e[66]=L,e[67]=k):k=e[67];let F;return e[68]!==$||e[69]!==k?(F=s.jsxs(He,{className:"p-6 gap-6",children:[$,k]}),e[68]=$,e[69]=k,e[70]=F):F=e[70],F}export{St as A,_t as D,wt as P,ut as u};
|
|
6
|
+
Defaulting to \`null\`.`}var st=ve,lt=be;const nt=Pe("h-full w-full flex-1 rounded-full transition-transform duration-200 ease-[var(--ease-out-cubic)]",{variants:{tone:{default:"bg-brand-purple",warning:"bg-warning",dark:"bg-primary"}},defaultVariants:{tone:"default"}});function at(e){const t=G.c(18);let n,o,a,l;t[0]!==e?({className:n,value:l,tone:a,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=a,t[4]=l):(n=t[1],o=t[2],a=t[3],l=t[4]);const c=Math.min(100,Math.max(0,l??0));let i;t[5]!==n?(i=Z("bg-muted relative h-1 w-full overflow-hidden rounded-full",n),t[5]=n,t[6]=i):i=t[6];let r;t[7]!==a?(r=nt({tone:a}),t[7]=a,t[8]=r):r=t[8];const u=`translateX(-${100-c}%)`;let m;t[9]!==u?(m={transform:u},t[9]=u,t[10]=m):m=t[10];let g;t[11]!==r||t[12]!==m?(g=s.jsx(lt,{"data-slot":"progress-indicator",className:r,style:m}),t[11]=r,t[12]=m,t[13]=g):g=t[13];let d;return t[14]!==o||t[15]!==i||t[16]!==g?(d=s.jsx(st,{"data-slot":"progress",className:i,...o,children:g}),t[14]=o,t[15]=i,t[16]=g,t[17]=d):d=t[17],d}const it={usd:[10,20,100],brl:[50,100,500]};function Ce(){const e=G.c(30),t=q(),n=X(),[o]=ge(),[a,l]=Y.useState(!1);let c;e[0]!==t?(c=x=>{W.error(t("settings.decoCreditsHero.topUpFailed",{message:x.message}))},e[0]=t,e[1]=c):c=e[1];const{mutate:i,isPending:r}=ae({mutationFn:async x=>{const{url:E}=await n.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:x,currency:f});return E},onSuccess:rt,onError:c}),[u,m]=Y.useState(""),[g,d]=Y.useState(o.language==="pt-BR"?"brl":"usd"),f=g,h=parseFloat(u),C=!isNaN(h)&&h>=1,p=f==="brl"?"R$":"$";let _;e[2]!==d?(_=x=>{x&&d(x)},e[2]=d,e[3]=_):_=e[3];let j,w;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ce,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),w=s.jsx(ce,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=j,e[5]=w):(j=e[4],w=e[5]);let b;e[6]!==f||e[7]!==_?(b=s.jsxs(Ge,{type:"single",variant:"outline",size:"sm",value:f,onValueChange:_,children:[j,w]}),e[6]=f,e[7]=_,e[8]=b):b=e[8];let y;e[9]!==f||e[10]!==p||e[11]!==a||e[12]!==r||e[13]!==t||e[14]!==i?(y=!a&&s.jsxs(s.Fragment,{children:[it[f].map(x=>s.jsxs(V,{variant:"outline",className:"tabular-nums",disabled:r,onClick:()=>i(x*100),children:[p,x]},x)),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>l(!0),disabled:r,children:t("settings.decoCreditsHero.custom")})]}),e[9]=f,e[10]=p,e[11]=a,e[12]=r,e[13]=t,e[14]=i,e[15]=y):y=e[15];let N;e[16]!==p||e[17]!==u||e[18]!==h||e[19]!==a||e[20]!==C||e[21]!==r||e[22]!==m||e[23]!==t||e[24]!==i?(N=a&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:p}),s.jsx(Se,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:u,onChange:x=>m(x.target.value),size:"sm",className:"pl-7",autoFocus:!0})]}),s.jsx(V,{disabled:!C||r,onClick:()=>i(Math.round(h*100)),children:r?"...":t("settings.decoCreditsHero.add")}),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{l(!1),m("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=p,e[17]=u,e[18]=h,e[19]=a,e[20]=C,e[21]=r,e[22]=m,e[23]=t,e[24]=i,e[25]=N):N=e[25];let P;return e[26]!==b||e[27]!==y||e[28]!==N?(P=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b,y,N]})}),e[26]=b,e[27]=y,e[28]=N,e[29]=P):P=e[29],P}function rt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function ot(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function ct(e){const t=G.c(38),{enabled:n}=e,o=q(),{org:a}=se(),l=X();let c;t[0]!==a.id?(c=ee.aiProviderCredits(a.id,"deco"),t[0]=a.id,t[1]=c):c=t[1];let i;t[2]!==l?(i=async()=>{try{return await l.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=l,t[3]=i):i=t[3];let r;t[4]!==n||t[5]!==c||t[6]!==i?(r={queryKey:c,enabled:n,staleTime:6e4,queryFn:i},t[4]=n,t[5]=c,t[6]=i,t[7]=r):r=t[7];const{data:u,isLoading:m,refetch:g,isFetching:d}=xe(r);if(!n)return null;const f=u?.balanceCents!=null?u.balanceCents/100:null;let h;t[8]!==f?(h=f!=null?`$${f.toFixed(2)}`:"—",t[8]=f,t[9]=h):h=t[9];const C=h;let p;t[10]!==f||t[11]!==C||t[12]!==d||t[13]!==m?(p=m||d?s.jsx(pe,{className:"h-9 w-24"}):s.jsx("span",{className:Z("text-3xl font-semibold tabular-nums tracking-tight",f!=null&&ot(f)),children:C}),t[10]=f,t[11]=C,t[12]=d,t[13]=m,t[14]=p):p=t[14];let _;t[15]!==g?(_=()=>g(),t[15]=g,t[16]=_):_=t[16];let j;t[17]!==o?(j=o("settings.decoCreditsHero.refreshBalance"),t[17]=o,t[18]=j):j=t[18];const w=d&&"animate-spin";let b;t[19]!==w?(b=Z("size-3.5",w),t[19]=w,t[20]=b):b=t[20];let y;t[21]!==b?(y=s.jsx($e,{className:b}),t[21]=b,t[22]=y):y=t[22];let N;t[23]!==d||t[24]!==y||t[25]!==_||t[26]!==j?(N=s.jsx(V,{type:"button",variant:"ghost",size:"icon-xs",onClick:_,disabled:d,className:"text-muted-foreground hover:text-foreground","aria-label":j,children:y}),t[23]=d,t[24]=y,t[25]=_,t[26]=j,t[27]=N):N=t[27];let P;t[28]!==N||t[29]!==p?(P=s.jsxs("div",{className:"flex items-baseline gap-2",children:[p,N]}),t[28]=N,t[29]=p,t[30]=P):P=t[30];let x;t[31]!==o?(x=o("settings.decoCreditsHero.availableBalance"),t[31]=o,t[32]=x):x=t[32];let E;t[33]!==x?(E=s.jsx("p",{className:"text-xs text-muted-foreground",children:x}),t[33]=x,t[34]=E):E=t[34];let I;return t[35]!==P||t[36]!==E?(I=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[P,E]}),t[35]=P,t[36]=E,t[37]=I):I=t[37],I}function _t(){const e=G.c(74),t=q(),{org:n}=se(),o=X(),a=_e(),l=Ke();let c;e[0]!==l?(c=l.find(dt),e[0]=l,e[1]=c):c=e[1];const i=c,r=ie(),u=he("credits"),[m,g]=Y.useState(!1);let d;e[2]!==i||e[3]!==o?(d=async()=>{i&&await o.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[2]=i,e[3]=o,e[4]=d):d=e[4];let f;e[5]!==n||e[6]!==a||e[7]!==t?(f=()=>{a.invalidateQueries({queryKey:ee.aiProviderKeys(n.id)}),a.invalidateQueries({queryKey:ee.aiProviders(n.id)}),W.success(t("settings.decoCreditsHero.disconnectSuccess")),g(!1)},e[5]=n,e[6]=a,e[7]=t,e[8]=f):f=e[8];let h;e[9]!==t?(h=K=>{W.error(t("settings.decoCreditsHero.disconnectError",{message:K.message}))},e[9]=t,e[10]=h):h=e[10];let C;e[11]!==d||e[12]!==f||e[13]!==h?(C={mutationFn:d,onSuccess:f,onError:h},e[11]=d,e[12]=f,e[13]=h,e[14]=C):C=e[14];const{mutate:p,isPending:_}=ae(C);if(!i)return null;let j;e[15]!==t?(j=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=j):j=e[16];let w;e[17]!==t?(w=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=w):w=e[18];let b;e[19]!==w?(b=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:w,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=w,e[20]=b):b=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=()=>g(!0),e[21]=y):y=e[21];let N;e[22]!==t?(N=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=N):N=e[23];let P;e[24]!==_||e[25]!==N?(P=s.jsx(V,{variant:"ghost-destructive",size:"sm",onClick:y,disabled:_,children:N}),e[24]=_,e[25]=N,e[26]=P):P=e[26];let x;e[27]!==P||e[28]!==b?(x=s.jsxs("div",{className:"flex items-center justify-between",children:[b,P]}),e[27]=P,e[28]=b,e[29]=x):x=e[29];let E;e[30]!==t?(E=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=E):E=e[31];let I;e[32]!==E?(I=s.jsx(we,{children:E}),e[32]=E,e[33]=I):I=e[33];let U;e[34]!==t?(U=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=U):U=e[35];let D;e[36]!==U?(D=s.jsx(Ee,{children:U}),e[36]=U,e[37]=D):D=e[37];let T;e[38]!==I||e[39]!==D?(T=s.jsxs(Ae,{children:[I,D]}),e[38]=I,e[39]=D,e[40]=T):T=e[40];let O;e[41]!==t?(O=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=O):O=e[42];let R;e[43]!==O?(R=s.jsx(Ie,{children:O}),e[43]=O,e[44]=R):R=e[44];let z;e[45]!==p?(z=()=>p(),e[45]=p,e[46]=z):z=e[46];let $;e[47]!==t?($=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=$):$=e[48];let B;e[49]!==z||e[50]!==$?(B=s.jsx(Ue,{onClick:z,variant:"destructive",children:$}),e[49]=z,e[50]=$,e[51]=B):B=e[51];let L;e[52]!==R||e[53]!==B?(L=s.jsxs(De,{children:[R,B]}),e[52]=R,e[53]=B,e[54]=L):L=e[54];let k;e[55]!==T||e[56]!==L?(k=s.jsxs(Te,{children:[T,L]}),e[55]=T,e[56]=L,e[57]=k):k=e[57];let F;e[58]!==m||e[59]!==k?(F=s.jsx(Re,{open:m,onOpenChange:g,children:k}),e[58]=m,e[59]=k,e[60]=F):F=e[60];const v=!r;let S;e[61]!==v?(S=s.jsx(ct,{enabled:v}),e[61]=v,e[62]=S):S=e[62];let A;e[63]!==u||e[64]!==t?(A=u?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(Ce,{})]}):null,e[63]=u,e[64]=t,e[65]=A):A=e[65];let H;e[66]!==x||e[67]!==F||e[68]!==S||e[69]!==A?(H=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[x,F,S,A]})}),e[66]=x,e[67]=F,e[68]=S,e[69]=A,e[70]=H):H=e[70];let M;return e[71]!==H||e[72]!==j?(M=s.jsx(ne,{title:j,children:H}),e[71]=H,e[72]=j,e[73]=M):M=e[73],M}function dt(e){return e.providerId==="deco"}function ut(e,t){const n=G.c(9),o=X(),a=q();let l;n[0]!==o||n[1]!==e?(l=async r=>{const{url:u}=await o.call(e,e==="ORGANIZATION_BILLING_CHECKOUT_START"&&r?{planId:r}:{});return u},n[0]=o,n[1]=e,n[2]=l):l=n[2];let c;n[3]!==t||n[4]!==a?(c=r=>W.error(a(t,{message:r.message})),n[3]=t,n[4]=a,n[5]=c):c=n[5];let i;return n[6]!==l||n[7]!==c?(i={mutationFn:l,onSuccess:ft,onError:c},n[6]=l,n[7]=c,n[8]=i):i=n[8],ae(i)}function ft(e){return window.open(e,"_blank","noopener,noreferrer")}const mt={ok:"text-foreground",warn:"text-warning",exhausted:"text-destructive",spent:"text-muted-foreground"},gt={ok:"[&>[data-slot=progress-indicator]]:bg-brand-purple",warn:"[&>[data-slot=progress-indicator]]:bg-warning",exhausted:"[&>[data-slot=progress-indicator]]:bg-destructive",spent:"[&>[data-slot=progress-indicator]]:bg-muted-foreground/40"};function fe(e){const t=G.c(22),{label:n,badge:o,value:a,unit:l,valueClassName:c,bar:i,footer:r}=e;let u;t[0]!==n?(u=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),t[0]=n,t[1]=u):u=t[1];let m;t[2]!==o||t[3]!==u?(m=s.jsxs("div",{className:"flex h-5 items-center gap-2",children:[u,o]}),t[2]=o,t[3]=u,t[4]=m):m=t[4];let g;t[5]!==c?(g=Z("text-4xl font-semibold leading-none tracking-tight tabular-nums",c),t[5]=c,t[6]=g):g=t[6];let d;t[7]!==g||t[8]!==a?(d=s.jsx("span",{className:g,children:a}),t[7]=g,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==l?(f=l&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),t[10]=l,t[11]=f):f=t[11];let h;t[12]!==d||t[13]!==f?(h=s.jsxs("div",{className:"flex items-baseline gap-2",children:[d,f]}),t[12]=d,t[13]=f,t[14]=h):h=t[14];let C;t[15]!==i||t[16]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-2",children:[i,r]}),t[15]=i,t[16]=r,t[17]=C):C=t[17];let p;return t[18]!==m||t[19]!==h||t[20]!==C?(p=s.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[m,h,C]}),t[18]=m,t[19]=h,t[20]=C,t[21]=p):p=t[21],p}function xt(){const e=G.c(8),t=q();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{size:14}),e[0]=n):n=e[0];let o;e[1]!==t?(o=t("settings.decoCreditsHero.addCredits"),e[1]=t,e[2]=o):o=e[2];let a;e[3]!==o?(a=s.jsx(Me,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"sm",className:"w-fit",children:[n,o]})}),e[3]=o,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ze,{align:"start",className:"w-auto",children:s.jsx(Ce,{})}),e[5]=l):l=e[5];let c;return e[6]!==a?(c=s.jsxs(Ve,{children:[a,l]}),e[6]=a,e[7]=c):c=e[7],c}function pt(){const e=G.c(15),t=q(),{org:n}=se(),o=X();let a;e[0]!==n.id?(a=ee.orgBillingAccount(n.id),e[0]=n.id,e[1]=a):a=e[1];let l;e[2]!==o?(l=()=>o.call("ORGANIZATION_BILLING_GET",{}),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={queryKey:a,staleTime:6e4,queryFn:l},e[4]=a,e[5]=l,e[6]=c):c=e[6];const{data:i}=xe(c),{mutate:r,isPending:u}=ut("ORGANIZATION_BILLING_PORTAL","settings.planUsage.portalFailed");if(!i?.hasBillingAccount)return null;let m;e[7]!==r?(m=()=>r(),e[7]=r,e[8]=m):m=e[8];let g;e[9]!==t?(g=t("settings.planUsage.manageBilling"),e[9]=t,e[10]=g):g=e[10];let d;return e[11]!==u||e[12]!==m||e[13]!==g?(d=s.jsx(V,{variant:"outline",size:"sm",disabled:u,onClick:m,children:g}),e[11]=u,e[12]=m,e[13]=g,e[14]=d):d=e[14],d}function St(){const e=G.c(9),t=q(),{org:n}=se(),o=ie(),{granted:a}=Be("monitoring:view");if(!o||!a)return null;let l;e[0]!==n.slug?(l={org:n.slug},e[0]=n.slug,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={tab:"overview"},e[2]=c):c=e[2];let i;e[3]!==t?(i=t("settings.planUsage.aiUsage"),e[3]=t,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{size:14}),e[5]=r):r=e[5];let u;return e[6]!==l||e[7]!==i?(u=s.jsx(V,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs(ke,{to:"/$org/settings/monitor",params:l,search:c,children:[i,r]})}),e[6]=l,e[7]=i,e[8]=u):u=e[8],u}function wt(){const e=G.c(71),t=q(),[n]=ge(),o=ie(),a=he("credits"),{data:l,isLoading:c,isError:i,refetch:r}=qe(),{data:u}=Qe();let m;e[0]!==l?.plan||e[1]!==u?(m=u?.findIndex(v=>v.id===l?.plan.id)??-1,e[0]=l?.plan,e[1]=u,e[2]=m):m=e[2];const g=m;if(!o)return null;if(c){let v;e[3]!==t?(v=t("settings.planUsage.title"),e[3]=t,e[4]=v):v=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(le,{children:s.jsx("div",{className:"px-5 py-5",children:s.jsx(pe,{className:"h-24 w-full"})})}),e[5]=S):S=e[5];let A;return e[6]!==v?(A=s.jsx(ne,{title:v,children:S}),e[6]=v,e[7]=A):A=e[7],A}if(i||!l){let v;e[8]!==t?(v=t("settings.planUsage.title"),e[8]=t,e[9]=v):v=e[9];let S;e[10]!==t?(S=t("settings.planUsage.loadFailed"),e[10]=t,e[11]=S):S=e[11];let A;e[12]!==S?(A=s.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[12]=S,e[13]=A):A=e[13];let H;e[14]!==r?(H=()=>r(),e[14]=r,e[15]=H):H=e[15];let M;e[16]!==t?(M=t("settings.planUsage.retry"),e[16]=t,e[17]=M):M=e[17];let K;e[18]!==H||e[19]!==M?(K=s.jsx(V,{variant:"outline",size:"sm",onClick:H,children:M}),e[18]=H,e[19]=M,e[20]=K):K=e[20];let Q;e[21]!==A||e[22]!==K?(Q=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex items-center justify-between gap-3",children:[A,K]})}),e[21]=A,e[22]=K,e[23]=Q):Q=e[23];let J;return e[24]!==v||e[25]!==Q?(J=s.jsx(ne,{title:v,children:Q}),e[24]=v,e[25]=Q,e[26]=J):J=e[26],J}if(l.plan.id==="free")return null;let d;if(e[27]!==l.usage){const v=l.usage?Math.round(l.usage.percent*100):null;d=v!==null&&Number.isFinite(v)?Math.min(100,Math.max(0,v)):null,e[27]=l.usage,e[28]=d}else d=e[28];const f=d,h=l.usage?.state??"ok",C=l.features.chat,p=l.credits?.remainingUsd??null;let _;e[29]!==n?(_=v=>{if(!v)return null;const S=new Date(v);return Number.isNaN(S.getTime())?null:S.toLocaleDateString(n.language,{day:"numeric",month:"short"})},e[29]=n,e[30]=_):_=e[30];const j=_;let w;e[31]!==l.periodStart||e[32]!==j?(w=j(l.periodStart),e[31]=l.periodStart,e[32]=j,e[33]=w):w=e[33];const b=w;let y;e[34]!==l.periodEnd||e[35]!==j?(y=j(l.periodEnd),e[34]=l.periodEnd,e[35]=j,e[36]=y):y=e[36];const N=y;let P;e[37]!==N||e[38]!==b?(P=b&&N?{start:b,end:N}:null,e[37]=N,e[38]=b,e[39]=P):P=e[39];const x=P,E=h==="exhausted"&&p!==null&&p>0,I=E?"spent":h;let U;e[40]!==g?(U=g>=0&&s.jsx(Ye,{index:g,className:"size-6"}),e[40]=g,e[41]=U):U=e[41];let D;e[42]!==l.plan.name?(D=s.jsx("span",{className:"text-sm font-medium",children:l.plan.name}),e[42]=l.plan.name,e[43]=D):D=e[43];let T;e[44]!==U||e[45]!==D?(T=s.jsxs("div",{className:"flex items-center gap-2",children:[U,D]}),e[44]=U,e[45]=D,e[46]=T):T=e[46];let O;e[47]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(pt,{}),e[47]=O):O=e[47];let R;e[48]!==T?(R=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[T,O]}),e[48]=T,e[49]=R):R=e[49];const z=a&&"sm:grid-cols-[minmax(0,1fr)_minmax(0,15rem)]";let $;e[50]!==z?($=Z("grid gap-x-8 gap-y-6",z),e[50]=z,e[51]=$):$=e[51];let B;e[52]!==I||e[53]!==C||e[54]!==f||e[55]!==x||e[56]!==t?(B=C?s.jsx(fe,{label:t("settings.planUsage.included"),value:f===null?t("settings.planUsage.usageUnavailable"):`${f}%`,unit:f!==null?t("settings.planUsage.used"):void 0,valueClassName:mt[I],bar:f===null?s.jsx("div",{className:"h-3 w-full rounded-full bg-muted/60","aria-hidden":"true"}):s.jsx(at,{value:f,"aria-label":t("settings.planUsage.included"),className:Z("h-3 bg-muted [&>[data-slot=progress-indicator]]:rounded-full",gt[I])}),footer:x?s.jsxs("div",{className:"flex items-baseline justify-between gap-4 text-meta",children:[s.jsx("span",{children:x.start}),s.jsx("span",{children:x.end})]}):s.jsx("span",{className:"text-meta",children:t("settings.planUsage.periodHint")})}):s.jsx("p",{className:"text-sm text-muted-foreground self-center",children:t("settings.planUsage.noAiIncluded")}),e[52]=I,e[53]=C,e[54]=f,e[55]=x,e[56]=t,e[57]=B):B=e[57];let L;e[58]!==a||e[59]!==p||e[60]!==E||e[61]!==n||e[62]!==t?(L=a&&s.jsx(fe,{label:t("settings.planUsage.credits"),badge:E?s.jsx(Fe,{variant:"success",size:"sm",children:t("settings.planUsage.creditsInUse")}):null,value:p===null?"—":p.toLocaleString(n.language,{style:"currency",currency:"USD"}),valueClassName:p!==null&&p>0?"text-foreground":"text-muted-foreground",footer:s.jsx(xt,{})}),e[58]=a,e[59]=p,e[60]=E,e[61]=n,e[62]=t,e[63]=L):L=e[63];let k;e[64]!==$||e[65]!==B||e[66]!==L?(k=s.jsxs("div",{className:$,children:[B,L]}),e[64]=$,e[65]=B,e[66]=L,e[67]=k):k=e[67];let F;return e[68]!==R||e[69]!==k?(F=s.jsxs(He,{className:"p-6 gap-6",children:[R,k]}),e[68]=R,e[69]=k,e[70]=F):F=e[70],F}export{St as A,_t as D,wt as P,ut as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,
|
|
1
|
+
import{r as l,c7 as _,j as c,c9 as j,ca as x,c8 as w,c4 as z,c5 as G,c6 as H,ce as E,cn as K,e4 as b,ci as q,ck as U,co as V,cj as W,cl as Z,cm as B,cp as J,cq as Q,cc as X,c as R,m as Y}from"./index-CaT4JsCE.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=V("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return q(a)},[]),c.jsx(U,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return W(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.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)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(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(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(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(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(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-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};
|