decocms 4.383.1 → 4.383.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-LJkM8Umc.js → AlertCircle-3NjmS2Me.js} +1 -1
- package/dist/client/assets/{AreaChart-CjJaUtwC.js → AreaChart-BK98ay_e.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CGkn-m8f.js → ArrowLeft-BDJocc-E.js} +1 -1
- package/dist/client/assets/{ArrowRight-BX2App8Z.js → ArrowRight-7HllOSKn.js} +1 -1
- package/dist/client/assets/{ArrowUp-BAUR8mSe.js → ArrowUp-hZF6_Dg8.js} +1 -1
- package/dist/client/assets/{CartesianChart-vw1yMsWr.js → CartesianChart-B3ONOnv3.js} +1 -1
- package/dist/client/assets/{CheckCircle-BpX5Mb8t.js → CheckCircle-CHH7PvQv.js} +1 -1
- package/dist/client/assets/{ChevronUp-DsbltOpN.js → ChevronUp-K_DSezIa.js} +1 -1
- package/dist/client/assets/{Copy01-0jm4SeRe.js → Copy01-BD66Qy1p.js} +1 -1
- package/dist/client/assets/{CreditCard01-73-vkmvl.js → CreditCard01-Bh3w7Hgk.js} +1 -1
- package/dist/client/assets/{DotsVertical-CSfkrc8O.js → DotsVertical-DMXzeMxu.js} +1 -1
- package/dist/client/assets/{Download01-xiBeRwHN.js → Download01-CZiiid2z.js} +1 -1
- package/dist/client/assets/{ErrorBarContext--VCU3oBZ.js → ErrorBarContext-BzVNZ25-.js} +1 -1
- package/dist/client/assets/{Eye-Bigici17.js → Eye-oxb_RsMQ.js} +1 -1
- package/dist/client/assets/{Globe01-Cna45P6a.js → Globe01-BGyzTJzS.js} +1 -1
- package/dist/client/assets/{Globe04-Dg8SD1vo.js → Globe04-BKLGp0-t.js} +1 -1
- package/dist/client/assets/{Image01-C2MdYCtR.js → Image01-CABBJzvK.js} +1 -1
- package/dist/client/assets/{Key01-DffQxPlE.js → Key01-DP1rdVgR.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BfYzK4mo.js → LayoutLeft-DlOBiWF7.js} +1 -1
- package/dist/client/assets/{Line-ClkAgrJb.js → Line-BoY-_HRo.js} +1 -1
- package/dist/client/assets/{Link01-CynYhkLr.js → Link01-IxSW8a5k.js} +1 -1
- package/dist/client/assets/{LinkExternal01-nQSknRCR.js → LinkExternal01-BJ0NvAtL.js} +1 -1
- package/dist/client/assets/{Monitor01-CDfch8oz.js → Monitor01-C8HMQtDc.js} +1 -1
- package/dist/client/assets/{Package-3ZLy52FE.js → Package-DbqCrAqt.js} +1 -1
- package/dist/client/assets/{Palette-CMZu59LK.js → Palette-D2CzWakp.js} +1 -1
- package/dist/client/assets/{Play-D_Dr-HEG.js → Play-C375qAFd.js} +1 -1
- package/dist/client/assets/{Plus-C1CKVAFo.js → Plus-KuC07360.js} +1 -1
- package/dist/client/assets/{SearchLg-B6NToYZC.js → SearchLg-CnAwayoV.js} +1 -1
- package/dist/client/assets/{SearchMd-zePyurMS.js → SearchMd-Db_7ZS_U.js} +1 -1
- package/dist/client/assets/{Sector-E8uUdeHk.js → Sector-C1hdz8Rd.js} +1 -1
- package/dist/client/assets/{Settings02-DMaVDtfM.js → Settings02-2SBOLpFQ.js} +1 -1
- package/dist/client/assets/{Share07-BSfD4Af0.js → Share07-BE4JtC9a.js} +1 -1
- package/dist/client/assets/{Stars01-CXObStKI.js → Stars01-DLpAYXhL.js} +1 -1
- package/dist/client/assets/{Sun-BQGS4Y0R.js → Sun-CwUe69CG.js} +1 -1
- package/dist/client/assets/{Tool01-DZu8RUzZ.js → Tool01-C8yYoxGr.js} +1 -1
- package/dist/client/assets/{Tool02-C7BRTm2R.js → Tool02-B6NEJ959.js} +1 -1
- package/dist/client/assets/{Trash01-CacMXriS.js → Trash01-sdbYLhwG.js} +1 -1
- package/dist/client/assets/{TrendUp01-C3boeLIB.js → TrendUp01-C0ETH40N.js} +1 -1
- package/dist/client/assets/{Upload01-B5kYxzoc.js → Upload01-B4XZygwf.js} +1 -1
- package/dist/client/assets/{User01-Ba34kYTP.js → User01-BUAGbw_8.js} +1 -1
- package/dist/client/assets/{UserSquare-PE4kARaY.js → UserSquare-CI-Lmxvt.js} +1 -1
- package/dist/client/assets/{Users01-CgytyhS2.js → Users01-DFi4f9KY.js} +1 -1
- package/dist/client/assets/{X-DfPrIb4m.js → X-ByVEErG0.js} +1 -1
- package/dist/client/assets/{XCircle-BRTsqRTs.js → XCircle-CNDaDHqM.js} +1 -1
- package/dist/client/assets/{XClose-DtruhyLM.js → XClose-fZr02TyX.js} +1 -1
- package/dist/client/assets/{Zap-FPirisgg.js → Zap-CcN1LA-b.js} +1 -1
- package/dist/client/assets/{ZoomOut-CW6c9gjM.js → ZoomOut-Cm9QeblW.js} +1 -1
- package/dist/client/assets/{access-gate-BzYSaxi9.js → access-gate-B7Hr_Vyu.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CNPkccVn.js → add-connection-dialog-B8LN3H0I.js} +1 -1
- package/dist/client/assets/{agent-analytics-CQAuAwQm.js → agent-analytics-DjxFq_6k.js} +1 -1
- package/dist/client/assets/agent-app-Be-jZ6Z_.js +1 -0
- package/dist/client/assets/{agent-assets-CSDWDAzC.js → agent-assets-B-5Linet.js} +1 -1
- package/dist/client/assets/{agent-automation-DlwOjUyC.js → agent-automation-DjCegdGk.js} +1 -1
- package/dist/client/assets/{agent-automations-Ck5Z78ep.js → agent-automations-BYFtuh6D.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-B0nJ5Jnx.js → agent-connect-sources-fzMxZVXi.js} +1 -1
- package/dist/client/assets/agent-deck-CttdAsKv.js +1 -0
- package/dist/client/assets/{agent-e2e-W_xfJoJ5.js → agent-e2e-BVjNlxp7.js} +1 -1
- package/dist/client/assets/{agent-experiments-C17LBhzf.js → agent-experiments-bIaPEubL.js} +1 -1
- package/dist/client/assets/agent-file-Cg7gDgXE.js +1 -0
- package/dist/client/assets/{agent-git-CucerCdW.js → agent-git-xlLroAsu.js} +1 -1
- package/dist/client/assets/{agent-hosting-BC5wIkhQ.js → agent-hosting-CpBNlKk6.js} +1 -1
- package/dist/client/assets/{agent-icon-Bo-J8xeh.js → agent-icon-Db2N7oq5.js} +1 -1
- package/dist/client/assets/agent-library-file-iYf02uq5.js +1 -0
- package/dist/client/assets/{agent-monitor-X5R8xXZE.js → agent-monitor-DwSdgE9U.js} +1 -1
- package/dist/client/assets/{agent-overview-BkNGszRe.js → agent-overview--PnZQbiS.js} +1 -1
- package/dist/client/assets/agent-settings-AuePgxNE.js +1 -0
- package/dist/client/assets/{agent-site-editor-CEhI3_3Z.js → agent-site-editor-Dzbd_nwj.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-BQ2qIFBp.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-CDfpLYm0.js → agent-site-editor-content-I4ul7yAQ.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-WNAkww5C.js → agent-site-editor-preview-ChZS3PJI.js} +3 -3
- package/dist/client/assets/agent-view-BHHzTuyV.js +1 -0
- package/dist/client/assets/{agent-view-guard-DvQUI0V1.js → agent-view-guard-w0jt9Xeo.js} +1 -1
- package/dist/client/assets/{agents-list-CObp6lJb.js → agents-list-Br_biSiG.js} +1 -1
- package/dist/client/assets/{ai-providers-D3ERn1aD.js → ai-providers-D_cdmhC4.js} +1 -1
- package/dist/client/assets/{alert-dialog-Cp2DKCaA.js → alert-dialog-C3aY_yJw.js} +1 -1
- package/dist/client/assets/{alert-Clqdl7aR.js → alert-yBQ4R7_-.js} +1 -1
- package/dist/client/assets/{api-keys-DaFJqFvy.js → api-keys-CPtf4pK1.js} +1 -1
- package/dist/client/assets/api-keys-DduoJLke.js +1 -0
- package/dist/client/assets/app-editor-hUN-DTW_.js +1 -0
- package/dist/client/assets/{asset-utils-PfPLdECv.js → asset-utils-aI3pZanR.js} +1 -1
- package/dist/client/assets/{auth-BrLmBihg.js → auth-DJ59GovO.js} +1 -1
- package/dist/client/assets/{auth-catchall-Cl7oTkwa.js → auth-catchall-gaeaQgzD.js} +1 -1
- package/dist/client/assets/{auth-entry-CNGgF6Ba.js → auth-entry-BBtIvObS.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DQwh8CIC.js → auth-split-layout-CUD4rmtG.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B2zy35Vj.js → authenticate-and-persist-oauth-DZROLLbx.js} +1 -1
- package/dist/client/assets/{automation-list-row-CjcXeXwE.js → automation-list-row-1hBZHliW.js} +1 -1
- package/dist/client/assets/{automation-runs-BD5ZIGkp.js → automation-runs-evvol08d.js} +1 -1
- package/dist/client/assets/{automations-CS1mUqQ5.js → automations-BgspSKqV.js} +1 -1
- package/dist/client/assets/{autosend-gR5Q16Ik.js → autosend-0RKjkzJ3.js} +1 -1
- package/dist/client/assets/{avatar-DT4l4CGp.js → avatar-TzyTAv0e.js} +1 -1
- package/dist/client/assets/{badge-DkEJ8U-u.js → badge-CBvHT4W2.js} +1 -1
- package/dist/client/assets/{block-document-D8KCO97C.js → block-document-BxYHh7_L.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Cqex6ZSI.js → blocks-preview-workspace-context--TaVDJ6X.js} +1 -1
- package/dist/client/assets/{breadcrumb-BWA-hs-k.js → breadcrumb-DxgRqy9o.js} +1 -1
- package/dist/client/assets/{buckets-B_1NDeu-.js → buckets-BuCbJiAZ.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-Dgee_BLo.js → build-improve-prompt-doc-B3Yght0d.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CNsJoPO6.js → bulk-category-panel-BYEmvtdM.js} +1 -1
- package/dist/client/assets/{calendar-DifXWLQ2.js → calendar-DhHcogG2.js} +1 -1
- package/dist/client/assets/{capability-load-error-wP3oA9Nb.js → capability-load-error-D24jurVu.js} +1 -1
- package/dist/client/assets/category-editor-RYWEbSCN.js +1 -0
- package/dist/client/assets/{chart-B4o0da4o.js → chart-CKJrzaz-.js} +1 -1
- package/dist/client/assets/{chat-context-ChL7WN2U.js → chat-context-CDFEG_L-.js} +1 -1
- package/dist/client/assets/{chat-draft-C8cjqBXv.js → chat-draft-bNjBsvCn.js} +1 -1
- package/dist/client/assets/{checkbox-DPYd0GE1.js → checkbox-CFNy5ggI.js} +1 -1
- package/dist/client/assets/{choose-editor-jaVFOS3r.js → choose-editor-BCMBTGxZ.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BuHD5-Ma.js → cli-auth-success-CLVV3kIA.js} +1 -1
- package/dist/client/assets/{client-icons-DbAlWXgF.js → client-icons-CEwmj9O8.js} +1 -1
- package/dist/client/assets/{collapsible-Dy8o0xUs.js → collapsible-BNufaH68.js} +1 -1
- package/dist/client/assets/{collection-detail-BeYuiuss.js → collection-detail-BTb2x4MW.js} +1 -1
- package/dist/client/assets/{collection-display-button-ByLd5rVn.js → collection-display-button-tz9JsEZx.js} +1 -1
- package/dist/client/assets/{collection-search-CuWCjS6d.js → collection-search-C2RG2e5J.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BrX4iG6f.js → collection-table-wrapper-yV9vdeMr.js} +1 -1
- package/dist/client/assets/{collection-tabs-sbmCBX8D.js → collection-tabs-CA-gB6LT.js} +1 -1
- package/dist/client/assets/{combobox-B-tcdQh6.js → combobox-BNKKrbgQ.js} +1 -1
- package/dist/client/assets/{command-DavQMzl4.js → command-CBz2JIJh.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BoaiIO2s.js → companion-mcps-section-ARCn5F6_.js} +1 -1
- package/dist/client/assets/{connect-fIpSHD9U.js → connect-LIoq5BO0.js} +1 -1
- package/dist/client/assets/{connect-layout-wd1v6Pwi.js → connect-layout-D-vfRaoG.js} +1 -1
- package/dist/client/assets/{connection-BbOsKsIS.js → connection-BJjKfm3v.js} +1 -1
- package/dist/client/assets/{connection-card-rmPhqAiw.js → connection-card-TT_MwfFx.js} +1 -1
- package/dist/client/assets/{connection-detail-OuprsHor.js → connection-detail-GtAfvYCe.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-xq1JVrlH.js → connection-form-helpers-Bg70Jvku.js} +1 -1
- package/dist/client/assets/{connections-BNmysMRu.js → connections-CEA8JdbO.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CZ3KvKHK.js → create-organization-dialog-BMknOnpY.js} +1 -1
- package/dist/client/assets/{decofile-api-B-ltS0w-.js → decofile-api-C_AZXr3X.js} +1 -1
- package/dist/client/assets/{decopilot-Gurm5JcG.js → decopilot-DZ3ibpY_.js} +1 -1
- package/dist/client/assets/{dialog-C--_G9bM.js → dialog-lfdH0lhI.js} +1 -1
- package/dist/client/assets/{discover-DaVcoHow.js → discover-DJv1U60H.js} +1 -1
- package/dist/client/assets/{domain-settings-DMLNW66S.js → domain-settings-DNjlHce_.js} +1 -1
- package/dist/client/assets/{download-app-dialog-BEPIC2WD.js → download-app-dialog-Cpkyx2ph.js} +1 -1
- package/dist/client/assets/{drawer-CZUY_VVA.js → drawer-CDjyI_Jg.js} +1 -1
- package/dist/client/assets/{editor-1m8LO4yq.js → editor-CxCZwxPG.js} +1 -1
- package/dist/client/assets/{empty-state-DULFVqUb.js → empty-state-CRwclXBM.js} +1 -1
- package/dist/client/assets/{empty-state-CE_mQRYC.js → empty-state-CnzoHD25.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dt8HdsMK.js → extract-connection-data-B5VokLhW.js} +1 -1
- package/dist/client/assets/{feature-gate-K-34Dfx0.js → feature-gate--43iJYr4.js} +1 -1
- package/dist/client/assets/{feature-paywall-D81N--IK.js → feature-paywall-BpCcxWM5.js} +1 -1
- package/dist/client/assets/{file-explorer-DkvAGvo_.js → file-explorer-gOjI5bwl.js} +1 -1
- package/dist/client/assets/{file-preview-9riFcqVE.js → file-preview-Do5Q3f1c.js} +1 -1
- package/dist/client/assets/{file-share-button-CxSyaqG1.js → file-share-button-DIj22Ecz.js} +1 -1
- package/dist/client/assets/{file-type-icon-BEvHZV8X.js → file-type-icon-BSsIsHaI.js} +1 -1
- package/dist/client/assets/{folder-icon-BppDSJES.js → folder-icon-BA4vqw44.js} +1 -1
- package/dist/client/assets/{form-BBJYOW9S.js → form-Dx6ZBu4I.js} +1 -1
- package/dist/client/assets/{gateway-client-BwsPUN8V.js → gateway-client-CRExBxKg.js} +1 -1
- package/dist/client/assets/{general-BZBOXoTC.js → general-_6WM8Zra.js} +1 -1
- package/dist/client/assets/{github-icon-CMPb9KoS.js → github-icon-BJK5yOYO.js} +1 -1
- package/dist/client/assets/{home-XMANan_t.js → home-C2oIZ78H.js} +1 -1
- package/dist/client/assets/{hooks-BT7beeUw.js → hooks-BwYFpgJq.js} +1 -1
- package/dist/client/assets/{hooks-B578kLR9.js → hooks-mgPEmVyE.js} +1 -1
- package/dist/client/assets/{icon-button-B5fNLlz3.js → icon-button-70-sYY4G.js} +1 -1
- package/dist/client/assets/{index-D0SVmTgB.js → index-B0zSNJbI.js} +1 -1
- package/dist/client/assets/{index-BO5Kkf0J.js → index-B3ftKcNC.js} +1 -1
- package/dist/client/assets/{index-BmK9sOLy.js → index-BD2EmVnh.js} +1 -1
- package/dist/client/assets/{index-DwbqeRvp.js → index-BepxzUTL.js} +1 -1
- package/dist/client/assets/{index-29FPmOVD.js → index-BfRdTBn9.js} +1 -1
- package/dist/client/assets/{index-DK-m4zyI.js → index-BuXlZ7Xk.js} +1 -1
- package/dist/client/assets/{index-B96PBdkB.js → index-C7OHOxwl.js} +1 -1
- package/dist/client/assets/{index-DXNGe5Ja.js → index-CBwjcqc7.js} +1 -1
- package/dist/client/assets/{index-DondjAWZ.js → index-CJdWCH17.js} +1 -1
- package/dist/client/assets/{index-DuN9g6_W.js → index-CWNSMfD0.js} +1 -1
- package/dist/client/assets/{index-fmzc-5YR.js → index-D5GfY9ep.js} +2 -2
- package/dist/client/assets/{index-sY3wVVMd.js → index-Dfk55oii.js} +1 -1
- package/dist/client/assets/{index-CEG_XSgp.js → index-K7AY71Ty.js} +1 -1
- package/dist/client/assets/{index-BHJ4Cdqa.js → index-pVhbfkhf.js} +1 -1
- package/dist/client/assets/{index-redirect-BINM_u22.js → index-redirect-Dc85XyrD.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C8r1uJuJ.js → infiniteQueryObserver-8LFHG5jD.js} +1 -1
- package/dist/client/assets/{infra-billing-Cf7vNa5x.js → infra-billing-md-WcFQk.js} +1 -1
- package/dist/client/assets/{input-0m53gxPF.js → input--eOKSICy.js} +1 -1
- package/dist/client/assets/{input-DnuTI592.js → input-BFIZ4TYm.js} +1 -1
- package/dist/client/assets/{input-Cd4zhIdI.js → input-i_Y4EUYe.js} +1 -1
- package/dist/client/assets/{integration-icon-BK2IoSQO.js → integration-icon-BKsmKoE7.js} +1 -1
- package/dist/client/assets/{label-DGWQJyZd.js → label-DwreXpUN.js} +1 -1
- package/dist/client/assets/{last-preview-page-CNeddLx4.js → last-preview-page-i7VIjFLQ.js} +1 -1
- package/dist/client/assets/{layout-BczTtTyQ.js → layout-MShO-PcN.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-B_KvmQGx.js → legacy-agents-deep-DEkE_Ifm.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BTufX_Ez.js → legacy-main-redirect-5YTSB2tk.js} +1 -1
- package/dist/client/assets/{library-BiwfkQAe.js → library-CdCM9J8p.js} +1 -1
- package/dist/client/assets/{login-C2OMCq-b.js → login-Bwh4jMgb.js} +1 -1
- package/dist/client/assets/{markdown-CcgXCeWS.js → markdown-WJDeiHFM.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-qUU136mr.js → mcp-app-renderer-DY6yKadW.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C5fzXDUg.js → mcp-oauth-C6Sgd7FV.js} +1 -1
- package/dist/client/assets/{members-TO4zbHgb.js → members-Bmk2EDKN.js} +1 -1
- package/dist/client/assets/{message-templates-BS1amKSu.js → message-templates-CrgEJOAj.js} +1 -1
- package/dist/client/assets/{mini-report-page-D-dwO5gS.js → mini-report-page-LtzYPO_i.js} +1 -1
- package/dist/client/assets/{mock-board-wUKFGvu9.js → mock-board-zZsRfmrF.js} +3 -3
- package/dist/client/assets/{monaco-editor-ZdKL9FIJ.js → monaco-editor-Do8S48ks.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bs007IMN.js → monitoring-stats-row-Bx4cWgra.js} +1 -1
- package/dist/client/assets/{multi-select-DaeS8uML.js → multi-select-D469W8sD.js} +1 -1
- package/dist/client/assets/{mustache-BtYFB6VI.js → mustache-CmNRGKWY.js} +1 -1
- package/dist/client/assets/{oauth-callback-BHFlZWOH.js → oauth-callback-CxtrbO-9.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-qukMAzP9.js → oauth-callback-ai-provider-DcCeNsRI.js} +1 -1
- package/dist/client/assets/{onboarding-r4Ej3daV.js → onboarding-DRSUQvyY.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-IS3aIvG3.js → optimistic-project-sidebar-views-DFzGWNsL.js} +1 -1
- package/dist/client/assets/{org-file-open-context-CsLVzm0L.js → org-file-open-context-CVN97RZc.js} +1 -1
- package/dist/client/assets/{organization-choice-B8Jprsi2.js → organization-choice-wdWQxrHa.js} +1 -1
- package/dist/client/assets/{orgs-7TtpxkU6.js → orgs-QoXHYZri.js} +1 -1
- package/dist/client/assets/{page-seo-form-BA31O6yp.js → page-seo-form-cedG3AU7.js} +1 -1
- package/dist/client/assets/{pair-Ax9qD1ST.js → pair-CniwTMo1.js} +1 -1
- package/dist/client/assets/{plan-ladder-V8GNYGA4.js → plan-ladder-B8UbPvkZ.js} +1 -1
- package/dist/client/assets/{popover-DjiStQSG.js → popover-B9xJOTEM.js} +1 -1
- package/dist/client/assets/{post-calendar-CB4Ut6FT.js → post-calendar-CFNb_x36.js} +1 -1
- package/dist/client/assets/{post-editor-D2tKW_xB.js → post-editor-DJPJ_7wF.js} +1 -1
- package/dist/client/assets/{preview-content-C6BpJMpN.js → preview-content-Djz6zUXX.js} +1 -1
- package/dist/client/assets/{preview-dialog-C5Pqo3dG.js → preview-dialog-BhpyTFJl.js} +1 -1
- package/dist/client/assets/{primitives-BAd94TKT.js → primitives-Jinax-v_.js} +1 -1
- package/dist/client/assets/{profile-Bqnl1vMp.js → profile-CgTpTnu4.js} +1 -1
- package/dist/client/assets/{project-app-view-CD9Zdt9k.js → project-app-view-DVhZbG_O.js} +1 -1
- package/dist/client/assets/{project-feed-DDSjygkw.js → project-feed-BtJsqM4V.js} +1 -1
- package/dist/client/assets/{project-icon-Bb8n1f1c.js → project-icon-9U2WquDG.js} +1 -1
- package/dist/client/assets/project-reports-CxHRzGXg.js +1 -0
- package/dist/client/assets/project-tasks-BbRhvRR0.js +1 -0
- package/dist/client/assets/{prompts-KM7eCzO-.js → prompts-B6m8lARO.js} +1 -1
- package/dist/client/assets/record-editor-BdXa2XHA.js +1 -0
- package/dist/client/assets/{redirect-editor-DRxzpjvy.js → redirect-editor-CH8vgP-f.js} +1 -1
- package/dist/client/assets/registry-D9E3wLoC.js +2 -0
- package/dist/client/assets/{registry-layout-BZ34q9_g.js → registry-layout-DsDx2i4p.js} +1 -1
- package/dist/client/assets/{reports-DVYraJFa.js → reports-DoC4qpNt.js} +1 -1
- package/dist/client/assets/{reports-onboarding-qyjOlUrU.js → reports-onboarding-BmQpXMqt.js} +1 -1
- package/dist/client/assets/reports-qsBAApcr.js +1 -0
- package/dist/client/assets/{reports-tab-CvviuXSm.js → reports-tab-CurzU_Px.js} +2 -2
- package/dist/client/assets/{repositories-Cr9zCxlF.js → repositories-hx9ULw-X.js} +1 -1
- package/dist/client/assets/{repository-import-picker-f-9x5_dE.js → repository-import-picker-D6aVqpVy.js} +1 -1
- package/dist/client/assets/{repository-picker-BUcKVsp1.js → repository-picker-DnXw9RPW.js} +1 -1
- package/dist/client/assets/{require-capability-DIAZVIUA.js → require-capability-Me9T92M_.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C6uKGAkK.js → required-auth-layout-CQKtej-F.js} +1 -1
- package/dist/client/assets/{reset-password-B9Kytu_p.js → reset-password-Csx-qFuK.js} +1 -1
- package/dist/client/assets/{resizable-BCEp9Elx.js → resizable-SGt69Yx0.js} +1 -1
- package/dist/client/assets/{review-settings-qXj6dD0l.js → review-settings-qJuTO7en.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-BrmBB2j2.js → rich-text-link-control-BcTvBRHf.js} +1 -1
- package/dist/client/assets/{roles-D6erruW_.js → roles-By0QS5jD.js} +1 -1
- package/dist/client/assets/{route-CmZQ1AQ0.js → route-ArFb8NKa.js} +1 -1
- package/dist/client/assets/{route-tyO-k881.js → route-ChYtCcTU.js} +1 -1
- package/dist/client/assets/{route-M1-d0G6M.js → route-DRvCh4mQ.js} +1 -1
- package/dist/client/assets/{route-page-header-BUr3e-ra.js → route-page-header-BYdDlPxf.js} +1 -1
- package/dist/client/assets/runnable-block-editor-DXLcjI9M.js +16 -0
- package/dist/client/assets/{sandbox-lifecycle-context-CZpPS0j1.js → sandbox-lifecycle-context-KqllpPFh.js} +1 -1
- package/dist/client/assets/{schema-CHL8_jWB.js → schema-B8zTDh4T.js} +1 -1
- package/dist/client/assets/{scroll-area-CXTYyDBj.js → scroll-area-CLDYN-1F.js} +1 -1
- package/dist/client/assets/{search-input-OeEY_aWb.js → search-input-Jjxs_ylZ.js} +1 -1
- package/dist/client/assets/{search-toggle-B4GHPbD5.js → search-toggle-BMo4jYM9.js} +1 -1
- package/dist/client/assets/{secrets-DpBLF-Q6.js → secrets-hLdRHQSc.js} +1 -1
- package/dist/client/assets/{sections-editor-DN84ShBs.js → sections-editor-C4Zrjgg_.js} +1 -1
- package/dist/client/assets/{select-model-CmLziz3K.js → select-model-CHXHQ2_o.js} +1 -1
- package/dist/client/assets/{select-D0baifrN.js → select-rsdXMOmu.js} +1 -1
- package/dist/client/assets/{seo-editor-CZ2WoqrW.js → seo-editor-D8h7PsFd.js} +1 -1
- package/dist/client/assets/{separator-BjkdR6rZ.js → separator-BOJFx7BB.js} +1 -1
- package/dist/client/assets/{settings-tab-C0QSOJCY.js → settings-tab-D3sm6hYV.js} +1 -1
- package/dist/client/assets/{sheet-5ssYXkXq.js → sheet-B6sXHBfO.js} +1 -1
- package/dist/client/assets/{shell-layout-Dv1BAQBH.js → shell-layout-CPue6FpY.js} +1 -1
- package/dist/client/assets/{sidebar-DIKvlDwY.js → sidebar-BY7OkUYu.js} +1 -1
- package/dist/client/assets/{skill-preview-DaL0R4QE.js → skill-preview-Ca4rmhYB.js} +1 -1
- package/dist/client/assets/{skills-oEqOsX33.js → skills-IyoOyuaB.js} +1 -1
- package/dist/client/assets/{sso-C2KqzLvQ.js → sso-BAwCy2Jc.js} +1 -1
- package/dist/client/assets/{store-DU14BrMb.js → store-DOxioaPl.js} +1 -1
- package/dist/client/assets/store-registry-PuCzRjMU.js +2 -0
- package/dist/client/assets/{switch-C6Il1ZWh.js → switch-3_30Hq56.js} +1 -1
- package/dist/client/assets/{synced-repos-_SV0wn-k.js → synced-repos-CNR5qFdz.js} +1 -1
- package/dist/client/assets/{table-CTz-n2bW.js → table-BcLHZANQ.js} +1 -1
- package/dist/client/assets/{tabs-DSWYIolk.js → tabs-Bj4_8GUh.js} +1 -1
- package/dist/client/assets/{task-board-DKe3wdiq.js → task-board-CslA-FwT.js} +1 -1
- package/dist/client/assets/{task-route-DBh2fSaQ.js → task-route-BNtI9f6O.js} +1 -1
- package/dist/client/assets/{task-status-BNxu2J3_.js → task-status-Drhs7Fwh.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-D-F7-GoP.js → taskboard-analytics-D5zjpsdj.js} +1 -1
- package/dist/client/assets/tasks-D2FpMcF2.js +1 -0
- package/dist/client/assets/{tasks-D4I3SBXQ.js → tasks-DdqceGp0.js} +1 -1
- package/dist/client/assets/{textarea-CaQxICAV.js → textarea-D8cpAa8h.js} +1 -1
- package/dist/client/assets/{thread-button-CfjjFhjy.js → thread-button-DGZyQ1E_.js} +1 -1
- package/dist/client/assets/{thread-intent-Cb9GZZN5.js → thread-intent-CwhSEEGz.js} +1 -1
- package/dist/client/assets/{thread-route-DsBIhxCv.js → thread-route-BiPK2LUJ.js} +1 -1
- package/dist/client/assets/{thread-route-Du4cHT2w.js → thread-route-i4MDHqFd.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-_30HS_im.js → thread-sheet-body-b02tBO2e.js} +1 -1
- package/dist/client/assets/{toggle-group-tppf_gd5.js → toggle-group-DPMwuwMR.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DA2hOIxm.js → toolbar-icon-button-DvBSEsXy.js} +1 -1
- package/dist/client/assets/{tooltip-zizb--cq.js → tooltip-OTJWd5I_.js} +1 -1
- package/dist/client/assets/{track-CnM6YABU.js → track-CVuEE-Ja.js} +1 -1
- package/dist/client/assets/{types-D5VCiqQr.js → types-D_sN4rB-.js} +1 -1
- package/dist/client/assets/{usage-stats-1eJOdcXv.js → usage-stats-Dg30HMJj.js} +1 -1
- package/dist/client/assets/{use-ai-providers-COtUB3xq.js → use-ai-providers-BPI8963x.js} +1 -1
- package/dist/client/assets/{use-automations-BUrDWVbs.js → use-automations-CRWusD_x.js} +1 -1
- package/dist/client/assets/{use-autosave-qlFdTnRf.js → use-autosave-j39rI6vk.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BGRDt-7V.js → use-connect-companion-B5z-NExP.js} +1 -1
- package/dist/client/assets/{use-connection-B6mAxHy2.js → use-connection-uV-VP0gX.js} +1 -1
- package/dist/client/assets/{use-copy-CkPsgpMc.js → use-copy-FLJ5XV9J.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CvGsbVkj.js → use-create-virtual-mcp-P1B33NrF.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BzqONKX7.js → use-date-fns-locale-BuofAadj.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-0Vkdi2aW.js → use-debounced-autosave-CF81qzvu.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DrvAsscn.js → use-debounced-value-CrGSRGNy.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DMSGgIrA.js → use-deco-credits-z8utUejJ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D-Dz9w48.js → use-decopilot-events-DjboVZiO.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C5Gjl97D.js → use-delete-connection-B_xNjAKC.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BjSD_HI7.js → use-deployment-admin-Co5-jiSO.js} +1 -1
- package/dist/client/assets/{use-entitlements-BJ2fU3xk.js → use-entitlements-BqqEvjPg.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-q4MoMELy.js → use-fast-preview-draft-url-B_fFA7zf.js} +1 -1
- package/dist/client/assets/{use-file-configs-B9J96Cm2.js → use-file-configs-B1pr8ET8.js} +1 -1
- package/dist/client/assets/{use-in-settings-CmHVpB2J.js → use-in-settings-C-Qktb6a.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CAlJFrTh.js → use-infinite-scroll-D7ftQyZ1.js} +1 -1
- package/dist/client/assets/{use-join-requests-DRcItn4u.js → use-join-requests-UXS5L54E.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-YYCWz3ix.js → use-main-panel-tabs-Q8s4YRRz.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BOuLM5gU.js → use-mcp-auth-status-DsC-McEq.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CxqTiuzZ.js → use-mcp-client-DucDZTqc.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-iHzcvLJ6.js → use-mcp-prompts-C7O_WXgf.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-TV22SR83.js → use-mcp-tools-Dar25Qt8.js} +1 -1
- package/dist/client/assets/{use-members-BFcRJRUN.js → use-members-Cz23u8UI.js} +1 -1
- package/dist/client/assets/{use-mobile-BUhktowg.js → use-mobile-CLWKkyXU.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BBKSnPWE.js → use-navigate-to-agent-DkyDtkl9.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-pkL0KGK6.js → use-open-billing-url-CwIiL2GE.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-D8SU0dQC.js → use-org-auth-client-BlcnnSM0.js} +1 -1
- package/dist/client/assets/{use-org-fs-v5nOxtD0.js → use-org-fs-UwG8j-Jn.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Bo1SAH6u.js → use-org-repo-syncs-CGumLqpP.js} +1 -1
- package/dist/client/assets/{use-org-sso-RpMHawvG.js → use-org-sso-Z0-UYTzJ.js} +1 -1
- package/dist/client/assets/{use-organization-roles-B_FlXSsl.js → use-organization-roles-DIOxh3px.js} +1 -1
- package/dist/client/assets/{use-organization-settings-f8Kb8g_i.js → use-organization-settings-8Qf5CO0q.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BxPg1yeZ.js → use-panel-navigate-JtzJfijF.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-D4PcfZz_.js → use-project-native-view-presence-zLKQQ3F3.js} +1 -1
- package/dist/client/assets/{use-project-scope-CjIHPrZt.js → use-project-scope-ooe9AxCw.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BhzX8XJt.js → use-registry-connections-BfqOdrxb.js} +1 -1
- package/dist/client/assets/{use-releases-BbtuIcVh.js → use-releases-BmxVYWob.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BqU_lr8I.js → use-reports-diagnostic-Ctc-6YjU.js} +1 -1
- package/dist/client/assets/{use-route-default-main-Cv1ggVfc.js → use-route-default-main-BSPrYjfJ.js} +1 -1
- package/dist/client/assets/{use-secrets-brlU-7jS.js → use-secrets-xjZ491Gh.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Efm1fB5a.js → use-section-preview-base-B8wYavun.js} +1 -1
- package/dist/client/assets/{use-session-runtime-N5BeCPEE.js → use-session-runtime-CmBpc3xW.js} +1 -1
- package/dist/client/assets/{use-tags-C9WZJKFW.js → use-tags-BGbYsMTn.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BKjmCR55.js → use-task-board-analytics-K0YzQxvj.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BX8DOL0g.js → use-task-metadata-BLKvYi7z.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Cyl9wrzu.js → use-thread-outputs-BiZSgJdo.js} +1 -1
- package/dist/client/assets/{use-view-mode-BxRB1gja.js → use-view-mode-BcKnCYw2.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DJlu-91-.js → use-virtual-mcp-DtPQZrM3.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Ukl_Kss8.js +1 -0
- package/dist/client/assets/{useQueries-jWWqJE84.js → useQueries-BZJlFP8l.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BHNhmGMF.js +1 -0
- package/dist/client/assets/{users-FxfWAMqM.js → users-CJ2f925J.js} +1 -1
- package/dist/client/assets/{utils-Ho1uEbeL.js → utils-C9aDXnK4.js} +1 -1
- package/dist/client/assets/{variant-calendar-BGruXdFw.js → variant-calendar-MSXSWdKs.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-Bq6VeSQ8.js → variant-matcher-override-ChtiN8zH.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BHtFEfW-.js → view-mode-toggle-Dcb2ZdjF.js} +1 -1
- package/dist/client/assets/{virtual-mcp-mb0zKoMr.js → virtual-mcp-BEHAGFsi.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Din-9LnG.js +0 -1
- package/dist/client/assets/agent-deck-CXES1XUt.js +0 -1
- package/dist/client/assets/agent-file-BA3EHF-e.js +0 -1
- package/dist/client/assets/agent-library-file-N4jZXvcS.js +0 -1
- package/dist/client/assets/agent-settings-BATbyIjT.js +0 -1
- package/dist/client/assets/agent-site-editor-code-7-NVo0xn.js +0 -2
- package/dist/client/assets/agent-view-SZrC183A.js +0 -1
- package/dist/client/assets/api-keys-Bv6qak-q.js +0 -1
- package/dist/client/assets/app-editor-GK1LWSuy.js +0 -1
- package/dist/client/assets/category-editor-B4_X4ad1.js +0 -1
- package/dist/client/assets/project-reports-DJxSltW7.js +0 -1
- package/dist/client/assets/project-tasks-BOvk6C5p.js +0 -1
- package/dist/client/assets/record-editor-DDVq3M39.js +0 -1
- package/dist/client/assets/registry-BOkJLVB2.js +0 -2
- package/dist/client/assets/reports-D1_eGgks.js +0 -1
- package/dist/client/assets/runnable-block-editor-nGBfZiGl.js +0 -16
- package/dist/client/assets/store-registry-C-Xpsd9_.js +0 -2
- package/dist/client/assets/tasks-DFMbWCSN.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DrRYdT6d.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-pDODlTU-.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as j,r as o,dp as Ce,dm as De,c as Pe,e as Ae,dj as ee,a0 as Ee,j as ye,K as M,z as _e}from"./index-
|
|
1
|
+
import{o as j,r as o,dp as Ce,dm as De,c as Pe,e as Ae,dj as ee,a0 as Ee,j as ye,K as M,z as _e}from"./index-D5GfY9ep.js";import{u as Le}from"./use-mcp-client-DucDZTqc.js";import{u as Ue}from"./use-session-runtime-CmBpc3xW.js";import{u as Re,b as Oe}from"./chat-context-CDFEG_L-.js";import{u as Be}from"./hooks-mgPEmVyE.js";import{e as ge}from"./backoff-8mStPHYB.js";import{b as Ne}from"./sandbox-url-D3mC8qhT.js";import{a as Fe}from"./use-virtual-mcp-DtPQZrM3.js";import{d as $e}from"./sandbox-start-errors-BK_aDCyt.js";function Ke(e,t){const n=j(t);return Ve({filters:{...e,status:"pending"}},n).length}function fe(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Ve(e={},t){const n=j(t).getMutationCache(),s=o.useRef(e),u=o.useRef(null);return u.current===null&&(u.current=fe(n,e)),o.useEffect(()=>{s.current=e}),o.useSyncExternalStore(o.useCallback(c=>n.subscribe(()=>{const a=Ce(u.current,fe(n,s.current));u.current!==a&&(u.current=a,De.schedule(c))}),[n]),()=>u.current,()=>u.current)}async function qe(e,t,n){const s=await e.callTool({name:t,arguments:n});if(s.isError){const u=s.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(u)}return s}const be=["SANDBOX_START"],W=new Map,He=e=>`${e.virtualMcpId}::${e.branch??""}`,Qe=e=>e.message.includes("retry shortly"),ie=new Set,le={mark:(e,t)=>ie.add(`${e}::${t}`),clear:(e,t)=>ie.delete(`${e}::${t}`),isStopped:(e,t)=>ie.has(`${e}::${t}`)};function Ye(e,t){const n=j();return Ae({mutationKey:be,retry:(s,u)=>Qe(u)&&s<6,retryDelay:s=>ge(5e3,500,s,2,0),mutationFn:async s=>{s.branch&&le.clear(s.virtualMcpId,s.branch);const u=He(s),c=W.get(u);if(c)return c;const a=(async()=>(await qe(e,"SANDBOX_START",s)).structuredContent)();W.set(u,a);try{return await a}finally{W.get(u)===a&&W.delete(u)}},onSuccess:()=>{ee(n),t?.onStarted?.()}})}function Rt(e,t){const n=Pe.c(3);let s;return n[0]!==t||n[1]!==e?(s={mutationKey:be,predicate:c=>{if(!e)return!1;const a=c.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=s):s=n[2],Ke(s)>0}function Se(e){return e==="installing"||e==="install-failed"||e==="starting"||e==="start-failed"||e==="running"||e==="crashed"}const Me={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},ve=o.createContext(Me),me=16384;class je{data="";append(t){this.data+=t,this.data.length>me&&(this.data=this.data.slice(this.data.length-me))}get(){return this.data}clear(){this.data=""}}const Ge=1e3,Xe=3e4,Ie=3e3,he=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],pe="log";function Je(e){if(!e)return null;try{return new URL("/_sandbox/events",e).href}catch{return null}}function We(e){return e===404}async function ze(e){try{const t=await fetch(e,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Ie)});return await t.body?.cancel().catch(()=>{}),We(t.status)}catch{return!1}}function gt({virtualMcpId:e,branch:t,previewUrl:n=null,enabled:s=!0,children:u}){const{org:c}=Ee(),a=j(),V=Re()?.taskId??null,[G,E]=o.useState(null),[te,b]=o.useState({phase:"idle"}),[ne,U]=o.useState({state:"running"}),[re,y]=o.useState({kind:"unknown"}),[X,h]=o.useState(!1),[k,q]=o.useState([]),[se,R]=o.useState([]),[,H]=o.useState(0),v=o.useRef(new Map),O=o.useRef(new Set),w=o.useRef(new Set),C=o.useRef(null),p=Je(n),Q=Fe(e)?.metadata?.runtime?.selected==="deno",_=d=>{let S=v.current.get(d);return S||(S=new je,v.current.set(d,S)),S};o.useEffect(()=>{if(E(null),b({phase:"idle"}),U({state:"running"}),y({kind:"unknown"}),C.current=null,h(!1),q([]),R([]),v.current.clear(),!e||!t||!s)return;const d=Ne({orgSlug:c.slug,virtualMcpId:e,branch:t,threadId:V??null},"events");let S=!1,D=0,L=null,T=null,P=null,g=null,m=null,A=null;const I=r=>{try{const i=JSON.parse(r.data);E(i),i.kind!=="failed"&&(h(!1),D=0),i.kind==="ready"&&ae()}catch(i){console.warn("[vm-events] bad phase payload",i)}},B=()=>{h(!0),E(null),b({phase:"idle"}),U({state:"running"}),y({kind:"unknown"}),q([]),R([]),v.current.clear()},Y=r=>{try{const i=JSON.parse(r.data);if(typeof i.data!="string")return;D=0;const f=i.data.replace(/\r?\n/g,`\r
|
|
2
2
|
`);_(i.source).append(f);for(const l of O.current)try{l(i.source,f)}catch{}H(l=>l+1)}catch{}},J=r=>{const i=r.type;try{const f=JSON.parse(r.data);switch(D=0,i){case"lifecycle":{const l=f;b(l.state);const F=`${c.slug}/${e}/${t}`;if(Se(l.state.phase)&&!(A&&Se(A))){ee(a,c.id);const K=M.decofile(F);a.getQueryData(K)===void 0&&a.invalidateQueries({queryKey:K})}l.state.phase==="running"&&A!=="running"&&(ee(a,c.id),a.invalidateQueries({queryKey:M.decofile(F)}),a.invalidateQueries({queryKey:M.liveMeta(c.slug,e,t)})),A=l.state.phase;const $=l.state.phase==="running"?l.state.port:null,ce=C.current;if(C.current=$,ce!==null&&$!==null&&ce!==$)for(const K of w.current)try{K()}catch{}return}case"status":U(f);return;case"tasks":{const F=f.active.map($=>$.logName??"").filter(Boolean);R(F);return}case"scripts":q(f.scripts);return;case"branch":{const l=f.meta;y(l);return}case"reload":for(const l of w.current)try{l()}catch{}return;case"file-changed":{const{path:l}=f,F=`${c.slug}/${e}/${t}`;if(l.startsWith(".deco/")||l.includes("/.deco/")){if(!(A==="running"))return;P&&clearTimeout(P),P=setTimeout(()=>{if(P=null,a.invalidateQueries({queryKey:M.decofile(F)}),Q)for(const K of w.current)try{K()}catch{}},500)}else T&&clearTimeout(T),T=setTimeout(()=>{T=null,a.invalidateQueries({queryKey:M.liveMeta(c.slug,e,t)})},1e3);return}}}catch{}};function N(){if(S)return;const r=new EventSource(d);g=r,r.onopen=()=>{},r.onerror=()=>{g===r&&r.readyState===EventSource.CLOSED&&x("studio")},r.addEventListener("phase",I),r.addEventListener("gone",B),r.addEventListener(pe,Y);for(const i of he)r.addEventListener(i,J)}function ae(){if(S||!p||m)return;const r=new EventSource(p);m=r;let i=!1;r.onopen=()=>{if(S||m!==r)return;i=!0,D=0;const f=g;g=null,f?.close()},r.onerror=()=>{m===r&&r.readyState===EventSource.CLOSED&&ue(r,i)},r.addEventListener(pe,Y);for(const f of he)r.addEventListener(f,J)}async function ue(r,i){const f=p?await ze(p):!1;if(!(S||m!==r)){if(r.close(),m=null,f){B(),g||N();return}i&&x("direct")}}function x(r){if(S||L)return;const i=ge(Xe,Ge,D,2,0);D++,L=setTimeout(()=>{if(L=null,!S){if(r==="direct"){m?.close(),m=null,ae();return}g?.close(),g=null,N()}},i)}return N(),()=>{S=!0,g?.close(),m?.close(),L&&clearTimeout(L),T&&clearTimeout(T),P&&clearTimeout(P)}},[e,t,c.slug,c.id,s,V,p,a,Q]);const oe={phase:G,lifecycle:te,status:ne,branch:re,notFound:X,scripts:k,activeProcesses:se,getBuffer:d=>v.current.get(d)?.get()??"",hasData:d=>(v.current.get(d)?.get().length??0)>0,subscribeChunks:d=>(O.current.add(d),()=>{O.current.delete(d)}),subscribeReload:d=>(w.current.add(d),()=>{w.current.delete(d)})};return ye.jsx(ve,{value:oe,children:u})}function de(){return o.use(ve)}function bt(e){const{subscribeChunks:t}=de(),n=o.useRef(e);n.current=e,o.useEffect(()=>t((c,a)=>{n.current?.(c,a)}),[t])}function vt(e){const{subscribeReload:t}=de(),n=o.useRef(e);n.current=e,o.useEffect(()=>t(()=>{n.current?.()}),[t])}function Ze(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function et(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveGithubRepo&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function wt(e){return e.threadLoaded&&e.isOwner&&e.hasActiveGithubRepo&&!e.branch&&!e.attempted}function tt(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function Tt(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:s,branch:u}=e,c=e.ownerId??s;if(!s||!c||!u)return t;const a=n?.[c]?.[u];return a?{...t??{},[s]:{...t?.[s]??{},[u]:a}}:t}function z(e,t,n){const s={virtualMcpId:e};return t&&(s.branch=t),n&&(s.threadId=n),s}const we=2,nt=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function Te(e){return nt.has(e)}function rt(e){return e.executionEnabled&&e.failedReason!==null&&Te(e.failedReason)&&e.attempts<we&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const st={branch:null,count:0,handled:!1};function ot(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function at(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function ut(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function xe(e,t){return`${e??""}::${t??""}`}function ct(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function Z(e){const{data:t,virtualMcpId:n,branch:s}=e;t?.branch&&!s&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:xe(n,t.branch??s),url:t.previewUrl})}const it={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},ke=o.createContext(it);function xt(){return o.use(ke)}function kt({executionEnabled:e,virtualMcpId:t,branch:n,userId:s,hasActiveGithubRepo:u,vmEntry:c,threadId:a,children:V}){const{org:G}=Ee(),{setCurrentTaskBranch:E}=Oe(),te=Be(),b=de(),ne=j(),U=Ue(t),re=U.resolved?U.runtime:null,y=Re()?.taskId??null,X=Le({connectionId:_e,orgId:G.id,orgSlug:G.slug}),h=Ye(X,{onStarted:()=>{a&&te?.refreshThreadMetadata(a)}}),{mutate:k,reset:q}=h,[se,R]=o.useState(null),H=o.useRef(new Set),v=o.useRef(null),[O,w]=o.useState(st),C=ot(O,n);C!==O&&w(C);const p=b.phase?.kind==="failed"?b.phase:null,Q=ct({vmEntry:c,seeded:p?null:se,key:xe(t,n)}),_=!!t&&!!n&&le.isStopped(t,n),oe=b.status.state==="paused",d=!p||!Te(p.reason)||C.count>=we,S=at({mutationError:h.isError&&h.error?$e(h.error.message):null,phase:b.phase,startPending:h.isPending,claimRetryExhausted:d}),D=Ze({previewUrl:Q,appPaused:oe,userStopped:_,startError:S}),L=ut(D),T=n??"",P=H.current.has(T),g=et({executionEnabled:e,hasActiveGithubRepo:u,userId:s,branch:n,vmEntry:c,userStopped:_,isPending:h.isPending,attempted:P,sessionRuntime:re});o.useEffect(()=>{if(!g||!t)return;H.current.add(T);const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] auto-start failed:",r)}})},[g,T,n,t,y,k,E,R]);const m=b.notFound?c?.sandboxHandle??null:null,A=tt({executionEnabled:e,notFound:b.notFound,deadVmId:m,lastDeadVmId:v.current,isPending:h.isPending,userStopped:_});o.useEffect(()=>{if(!A||!m||!t)return;v.current=m;const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] self-heal failed:",r)}})},[A,m,t,n,y,k,E,R]);const I=rt({executionEnabled:e,failedReason:p?.reason??null,attempts:C.count,isPending:h.isPending,userStopped:_,alreadyHandled:C.handled});o.useEffect(()=>{if(!p){w(r=>r.handled?{...r,handled:!1}:r);return}if(!I||!t)return;w(r=>({...r,handled:!0,count:r.count+1}));const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",r)}})},[p,I,t,n,y,k,E,R]);const B=()=>{if(!e||!t)return;const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] user start failed:",r)}})},Y=async()=>{if(!(!e||!t||!n)&&c){le.mark(t,n);try{await X.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}ee(ne)}},J=async()=>{await Y(),B()},N=()=>{H.current=new Set,v.current=null,w({branch:n,count:0,handled:!1}),q(),B()},ue={branch:n,previewState:D,status:L,vmEntry:c,previewUrl:Q,userStopped:_,start:B,stop:Y,restart:J,retry:N,resume:N};return ye.jsx(ke,{value:ue,children:V})}export{gt as S,kt as a,Ye as b,de as c,xt as d,bt as e,vt as f,Ke as g,Tt as o,wt as s,Rt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as a,bM as t,ap as e,bN as c,bO as d,bP as p,bQ as m}from"./index-
|
|
1
|
+
import{ao as a,bM as t,ap as e,bN as c,bO as d,bP as p,bQ as m}from"./index-D5GfY9ep.js";const i=500;a({title:e().max(i),url:e().max(i),icon:e().max(i)});a({registries:d(e().max(i),a({enabled:t()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:c(e().max(i)).describe("List of MCP app_name or app_id values to hide from the store.")});const s=a({keyId:e().max(i),modelId:e().max(i),title:e().max(i).optional()}).nullable();p(["fast","smart","thinking","image","web_search","deep_research"]);p(["fast","smart","thinking"]);const _=a({tiers:a({fast:s,smart:s,thinking:s,image:s,web_search:s,deep_research:s})});a({tiers:a({fast:s.optional(),smart:s.optional(),thinking:s.optional()})});a({ids:c(e().max(i)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const y=a({home_task_intake_enabled:t().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:t().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:t().optional().describe("Curated commerce (reports) look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:t().optional().describe("Run the Reviewer on a task's pull request once it's In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:t().optional().describe("When the Reviewer approves a task's pull request, merge it automatically instead of leaving the merge to a human."),auto_resolve_conflicts:t().optional().describe("When an approved pull request can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:t().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:t().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow task-run surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:t().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),auto_assign_report_tasks_to_super_agent:t().optional().describe("When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:t().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:t().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:t().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:t().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),monitor_enabled:t().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),delivery_lanes_enabled:t().optional().describe("Board lanes for shipping: Approved, Merged and Post-deploy Validation sit between In Review and Done, and a merged pull request lands on Merged instead of Done. For teams whose release process continues after the merge. Off by default — with it off the board and the state machine behave exactly as if the lanes did not exist."),cms_auto_fresh_branch:t().optional().describe("When a user opens the CMS on a branch whose last commit is older than the staleness window (2 days), move the session to a freshly minted branch cut from the default branch. The stale branch is left intact on GitHub. Off by default.")}),b=new Set(["reviewer_enabled","cheap_reviewer_model"]);function v(n,r){const h=n?.[r];return b.has(r)?h!==!1:h===!0}function x(n){const r=n?.auto_resolve_conflicts;return typeof r=="boolean"?r:n?.auto_merge===!0}const l=256*1024,f=50,o=500,u=5e3;a({id:e().describe("Brand context ID"),name:e().max(o).describe("Company name"),domain:e().max(o).describe("Company domain (e.g. example.com)"),overview:e().max(u).describe("Company overview / description"),logo:e().max(o).nullable().optional().describe("Logo URL"),favicon:e().max(o).nullable().optional().describe("Favicon URL"),ogImage:e().max(o).nullable().optional().describe("OG image URL"),fonts:a({heading:e().max(o).optional().describe("Font family for headings"),body:e().max(o).optional().describe("Font family for body text"),code:e().max(o).optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:a({primary:e().max(o).optional().describe("Primary brand color (hex)"),secondary:e().max(o).optional().describe("Secondary brand color (hex)"),accent:e().max(o).optional().describe("Accent / highlight color (hex)"),background:e().max(o).optional().describe("Background color (hex)"),foreground:e().max(o).optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:c(d(e(),m())).max(f).nullable().optional().refine(n=>n==null||JSON.stringify(n).length<=l,{message:`images must serialize to at most ${l} bytes`}).describe("Brand images"),metadata:d(e(),m()).nullable().optional().refine(n=>n==null||JSON.stringify(n).length<=l,{message:`metadata must serialize to at most ${l} bytes`}).describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:e().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:t().optional().describe("Whether this is the default brand for the organization")});export{b as D,y as O,_ as S,x as a,v as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,bo as A,bv as ce,j as b,bq as _,bH as ae,dk as O,br as C,bA as P,bt as ie,c as F,l as $}from"./index-fmzc-5YR.js";import{e as de}from"./select-D0baifrN.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,H]=d.useState(!1),v=A(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:H,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=B(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=B(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,T]=d.useState(null),Y=A(e,v=>T(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function H(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),H(v))}),onPointerMove:C(r.onPointerMove,H),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),W="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(W,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(W,o),s=ee(W,o),{onThumbPositionChange:a}=s,c=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=W;var k="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(k,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=k;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(k,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function B(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
|
|
1
|
+
import{r as d,bo as A,bv as ce,j as b,bq as _,bH as ae,dk as O,br as C,bA as P,bt as ie,c as F,l as $}from"./index-D5GfY9ep.js";import{e as de}from"./select-rsdXMOmu.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,H]=d.useState(!1),v=A(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:H,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=B(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=B(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,T]=d.useState(null),Y=A(e,v=>T(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function H(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),H(v))}),onPointerMove:C(r.onPointerMove,H),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),W="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(W,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(W,o),s=ee(W,o),{onThumbPositionChange:a}=s,c=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=W;var k="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(k,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=k;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(k,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function B(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,l as w,j as a,h as j}from"./index-
|
|
1
|
+
import{c as b,l as w,j as a,h as j}from"./index-D5GfY9ep.js";import{i as v}from"./SearchMd-Db_7ZS_U.js";function k(f){const e=b.c(17),{value:l,onChange:c,placeholder:m,onKeyDown:u,className:d,isSearching:p,disabled:r}=f,x=m===void 0?"Search...":m,h=r&&"pointer-events-none opacity-50";let t;e[0]!==d||e[1]!==h?(t=w("flex items-center gap-4 rounded-lg bg-[var(--studio-input-background)] px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",h,d),e[0]=d,e[1]=h,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{className:"size-4 text-muted-foreground/75 shrink-0"}):a.jsx(v,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=g=>c(g.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==r||e[8]!==u||e[9]!==x||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:u,placeholder:x,disabled:r,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=r,e[8]=u,e[9]=x,e[10]=s,e[11]=l,e[12]=o):o=e[12];let i;return e[13]!==t||e[14]!==n||e[15]!==o?(i=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=i):i=e[16],i}export{k as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,r as C,l as B,j as a}from"./index-
|
|
1
|
+
import{c as K,r as C,l as B,j as a}from"./index-D5GfY9ep.js";import{i as I}from"./SearchMd-Db_7ZS_U.js";import{i as M}from"./X-ByVEErG0.js";import{I as O}from"./icon-button-70-sYY4G.js";function H(S){const e=K.c(34),{value:t,onChange:s,label:E,placeholder:D,clearLabel:F,expanded:o,className:j}=S,w=E===void 0?"Search":E,d=D===void 0?"Search…":D,y=F===void 0?"Clear search":F,[L,p]=C.useState(t!==""),[R,z]=C.useState(!1),[V,$]=C.useState(t);if(t!==V&&($(t),t===""&&!R&&p(!1)),!L&&!o){let l,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>p(!0),g=a.jsx(I,{}),e[0]=l,e[1]=g):(l=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"secondary",onClick:l,children:g}),e[2]=w,e[3]=v):v=e[3],v}const _=o?"h-10 w-full px-3":"h-7 w-32 animate-search-expand px-2.5 sm:w-44";let n;e[4]!==j||e[5]!==_?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground card-shadow",_,j),e[4]=j,e[5]=_,e[6]=n):n=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(I,{className:"size-4 shrink-0 text-muted-foreground"}),e[7]=x):x=e[7];const k=!o;let r;e[8]!==s?(r=l=>s(l.target.value),e[8]=s,e[9]=r):r=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>z(!0),e[10]=h):h=e[10];let i;e[11]!==t?(i=()=>{z(!1),t===""&&p(!1)},e[11]=t,e[12]=i):i=e[12];let c;e[13]!==s?(c=l=>{l.key==="Escape"&&s("")},e[13]=s,e[14]=c):c=e[14];const N=o?"text-sm":"text-xs";let f;e[15]!==N?(f=B("w-full min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",N),e[15]=N,e[16]=f):f=e[16];let u;e[17]!==d||e[18]!==i||e[19]!==c||e[20]!==f||e[21]!==k||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:k,value:t,onChange:r,onFocus:h,onBlur:i,onKeyDown:c,placeholder:d,"aria-label":d,className:f}),e[17]=d,e[18]=i,e[19]=c,e[20]=f,e[21]=k,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==y||e[26]!==o||e[27]!==s||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":y,onMouseDown:P,onClick:()=>{s(""),o||p(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(M,{className:"size-3.5"})}),e[25]=y,e[26]=o,e[27]=s,e[28]=t,e[29]=m):m=e[29];let b;return e[30]!==u||e[31]!==m||e[32]!==n?(b=a.jsxs("div",{className:n,children:[x,u,m]}),e[30]=u,e[31]=m,e[32]=n,e[33]=b):b=e[33],b}function P(S){return S.preventDefault()}export{H as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,b as C,j as s,n as w,e$ as F,E as L,r as y,aQ as O,Z as B,B as z,R as E,t as _}from"./index-
|
|
1
|
+
import{c as v,b as C,j as s,n as w,e$ as F,E as L,r as y,aQ as O,Z as B,B as z,R as E,t as _}from"./index-D5GfY9ep.js";import{i as R}from"./AlertCircle-3NjmS2Me.js";import{s as A}from"./Plus-KuC07360.js";import{s as I}from"./User01-BUAGbw_8.js";import{t as q}from"./Users01-DFi4f9KY.js";import{D as V,b as H,c as Q,d as Z,h as G,e as J}from"./dialog-lfdH0lhI.js";import{I as P}from"./input--eOKSICy.js";import{L as D}from"./label-DwreXpUN.js";import{S as K,b as M,a as U,d as W,c as $}from"./select-rsdXMOmu.js";import{T as X}from"./textarea-D8cpAa8h.js";import{u as Y,a as ee}from"./use-secrets-xjZ491Gh.js";import{R as te}from"./require-capability-Me9T92M_.js";import"./X-ByVEErG0.js";import"./index-pVhbfkhf.js";import"./ChevronUp-K_DSezIa.js";import"./access-gate-B7Hr_Vyu.js";import"./capability-load-error-D24jurVu.js";function se(t){const e=v.c(6),{error:r}=t,n=C();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(R,{size:16}),e[0]=c):c=e[0];let i;e[1]!==r.message||e[2]!==n?(i=n("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=n,e[3]=i):i=e[3];let l;return e[4]!==i?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:i})]}),e[4]=i,e[5]=l):l=e[5],l}function re(t){const e=v.c(8),{scope:r}=t,n=C(),c=r==="user"?I:q;let i;e[0]!==r||e[1]!==n?(i=n(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=n,e[2]=i):i=e[2];const l=i;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let o;return e[5]!==l||e[6]!==a?(o=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[a,l]}),e[5]=l,e[6]=a,e[7]=o):o=e[7],o}function T(t){const e=v.c(20),{secret:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(E,{size:16,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let i;e[3]!==r.scope?(i=s.jsx(re,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let l;e[5]!==c||e[6]!==i?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,i]}),e[5]=c,e[6]=i,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=a):a=e[9];let o;e[10]!==l||e[11]!==a?(o=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[n,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=o):o=e[12];let m;e[13]!==r.createdAt?(m=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=m):m=e[14];let d;e[15]!==m?(d=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:m}),e[15]=m,e[16]=d):d=e[16];let u;return e[17]!==o||e[18]!==d?(u=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[o,d]}),e[17]=o,e[18]=d,e[19]=u):u=e[19],u}function ne(t){const e=v.c(15),{action:r}=t,n=C();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(E,{size:20,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let i;e[1]!==n?(i=n("settings.secrets.emptyTitle"),e[1]=n,e[2]=i):i=e[2];let l;e[3]!==i?(l=s.jsx("p",{className:"font-medium text-sm",children:i}),e[3]=i,e[4]=l):l=e[4];let a;e[5]!==n?(a=n("settings.secrets.emptyDescription"),e[5]=n,e[6]=a):a=e[6];let o;e[7]!==a?(o=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:a}),e[7]=a,e[8]=o):o=e[8];let m;e[9]!==l||e[10]!==o?(m=s.jsxs("div",{children:[l,o]}),e[9]=l,e[10]=o,e[11]=m):m=e[11];let d;return e[12]!==r||e[13]!==m?(d=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,m,r]}),e[12]=r,e[13]=m,e[14]=d):d=e[14],d}function k({open:t,onOpenChange:e}){const r=C(),[n,c]=y.useState("organization"),[i,l]=y.useState(""),[a,o]=y.useState(""),[m,d]=y.useState(""),u=ee();function b(){c("organization"),l(""),o(""),d("")}function g(){b(),e(!1)}async function S(x){if(x.preventDefault(),!(!i.trim()||!a))try{await u.mutateAsync({scope:n,name:i.trim(),value:a,description:m.trim()||void 0}),_.success(r("settings.secrets.secretCreated",{name:i.trim()})),g()}catch(j){_.error(j instanceof Error?j.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(V,{open:t,onOpenChange:x=>{x?e(x):g()},children:s.jsxs(H,{className:"sm:max-w-lg",children:[s.jsxs(Q,{children:[s.jsx(Z,{children:r("settings.secrets.newSecretTitle")}),s.jsx(G,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(K,{value:n,onValueChange:x=>c(x),children:[s.jsx(M,{id:"secret-scope",children:s.jsx(U,{})}),s.jsxs(W,{children:[s.jsx($,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx($,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(P,{id:"secret-name",value:i,onChange:x=>l(x.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(P,{id:"secret-value",type:"password",value:a,onChange:x=>o(x.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(X,{id:"secret-description",value:m,onChange:x=>d(x.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(J,{children:[s.jsx(z,{type:"button",variant:"outline",onClick:g,disabled:u.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(z,{type:"submit",disabled:u.isPending||!i.trim()||!a,children:u.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=v.c(36),e=B(),r=C(),n=Y(),[c,i]=y.useState(!1);let l,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>i(!0),a=s.jsx(A,{size:14}),t[0]=l,t[1]=a):(l=t[0],a=t[1]);let o;t[2]!==r?(o=r("settings.secrets.newSecret"),t[2]=r,t[3]=o):o=t[3];let m;t[4]!==o?(m=s.jsx(w.Actions,{children:s.jsxs(z,{size:"sm",onClick:l,children:[a,o]})}),t[4]=o,t[5]=m):m=t[5];const d=m;if(n.length===0){const j=e&&d,N=!e&&d;let h;t[6]!==N?(h=s.jsx(ne,{action:N}),t[6]=N,t[7]=h):h=t[7];let f;t[8]!==c?(f=s.jsx(k,{open:c,onOpenChange:i}),t[8]=c,t[9]=f):f=t[9];let p;return t[10]!==j||t[11]!==h||t[12]!==f?(p=s.jsxs(s.Fragment,{children:[j,h,f]}),t[10]=j,t[11]=h,t[12]=f,t[13]=p):p=t[13],p}let u,b,g;if(t[14]!==d||t[15]!==n||t[16]!==r){const j=n.filter(oe),N=n.filter(ae),h=n.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let f;t[20]!==n.length||t[21]!==r||t[22]!==h?(f=r(h,{count:n.length}),t[20]=n.length,t[21]=r,t[22]=h,t[23]=f):f=t[23];let p;t[24]!==f?(p=s.jsx("p",{className:"text-sm text-muted-foreground",children:f}),t[24]=f,t[25]=p):p=t[25],t[26]!==d||t[27]!==p?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[p,d]}),t[26]=d,t[27]=p,t[28]=u):u=t[28],b=j.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:r("settings.secrets.sectionOrganization")}),s.jsx("div",{children:j.map(le)})]}):null,g=N.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:r("settings.secrets.sectionPrivate")}),s.jsx("div",{children:N.map(ce)})]}):null,t[14]=d,t[15]=n,t[16]=r,t[17]=u,t[18]=b,t[19]=g}else u=t[17],b=t[18],g=t[19];let S;t[29]!==c?(S=s.jsx(k,{open:c,onOpenChange:i}),t[29]=c,t[30]=S):S=t[30];let x;return t[31]!==u||t[32]!==b||t[33]!==g||t[34]!==S?(x=s.jsxs(s.Fragment,{children:[u,b,g,S]}),t[31]=u,t[32]=b,t[33]=g,t[34]=S,t[35]=x):x=t[35],x}function ce(t){return s.jsx(T,{secret:t},t.id)}function le(t){return s.jsx(T,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function de(){const t=v.c(7),e=C();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let n;t[2]!==r?(n=s.jsx(w.Title,{children:r}),t[2]=r,t[3]=n):n=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(L,{fallback:me,children:s.jsx(y.Suspense,{fallback:s.jsx(O,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),t[4]=c):c=t[4];let i;return t[5]!==n?(i=s.jsx(w,{children:s.jsx(w.Content,{children:s.jsx(w.Container,{children:s.jsxs(F,{children:[n,c]})})})}),t[5]=n,t[6]=i):i=t[6],i}function me(t){const{error:e}=t;return s.jsx(se,{error:e??new Error("Failed to load secrets")})}function Pe(){const t=v.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(de,{})}),t[0]=e):e=t[0],e}export{Pe as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as it,b as Ct,r as w,l as Ie,j as s,aO as cn,Z as os,B as at,F as un,G as vt,I as dn,aN as mn,H as fn,h as pn,aM as qa,o as Ga,t as Z,K as Wa}from"./index-fmzc-5YR.js";import{u as Ya}from"./chat-context-ChL7WN2U.js";import{I as gn,J as Ja,K as Qa,L as hn,N as Za,O as Xa,V as eo,Q as to,T as vn,U as so,W as no,X as Ft,Y as Sn,Z as ao,_ as oo,e as io,f as ro,h as lo,u as co,$ as Gs,a0 as uo,a1 as mo,a2 as fo,a3 as po,a4 as go,p as Xt,a5 as ho,A as xt,a6 as Bt,a7 as vo,a8 as So,a9 as ot,aa as Ws,z as yo,ab as bo,ac as Ys,ad as xo,ae as _o,H as It,af as es,ag as Js,M as jo,C as xs,ah as ht,G as Vt,ai as Eo,aj as Ro,ak as wo,F as ko,al as To,am as Vo,an as _t,ao as Do,ap as No,aq as Ao,d as Po,ar as Qs,as as Ot,at as Zs,au as Co,av as Mo,aw as Ko,ax as Lo,y as _s,ay as Xs,az as en,aA as Dt,aB as ts,aC as js,aD as Bo,aE as Io,aF as Oo,aG as Fo,aH as zo}from"./runnable-block-editor-nGBfZiGl.js";import{d as $o}from"./use-virtual-mcp-DJlu-91-.js";import{n as Ho,t as Uo}from"./ChevronUp-DsbltOpN.js";import{z as Rs,bj as qo,a2 as ws,a5 as Go,o as Wo,P as Yo,x as Jo}from"./agent-icon-Bo-J8xeh.js";import{i as yn}from"./Globe01-Cna45P6a.js";import{S as ss}from"./scroll-area-CXTYyDBj.js";import{c as Nt,T as At,a as Pt}from"./tooltip-zizb--cq.js";import{d as Qo,h as Zo,c as Xo,e as ei,b as ti,D as si}from"./dialog-C--_G9bM.js";import{I as ni}from"./input-0m53gxPF.js";import{m as ai,u as oi,P as ii}from"./mustache-BtYFB6VI.js";import{b as bn,G as ri,e as li,j as ci,g as ui,r as ns,M as tn}from"./claim-phase-copy-0btUuJoC.js";import{a as xn}from"./Copy01-0jm4SeRe.js";import{c as _n}from"./UserSquare-PE4kARaY.js";import{i as di}from"./Settings02-DMaVDtfM.js";import{s as mi}from"./Eye-Bigici17.js";import{s as fi}from"./TrendUp01-C3boeLIB.js";import{s as ks}from"./Plus-C1CKVAFo.js";import{s as jn}from"./Trash01-CacMXriS.js";import{i as pi}from"./Zap-FPirisgg.js";import{a as En,b as as,d as Rn,K as wn,P as kn,u as Tn,C as Vn,s as Dn,e as zt,D as Nn,c as An,S as Pn,v as Cn}from"./rich-text-link-control-BrmBB2j2.js";import{s as gi}from"./safe-image-url-D5z803Ot.js";import{a as hi,P as vi,b as Si}from"./page-seo-form-BA31O6yp.js";import{a as yi}from"./Tool01-DZu8RUzZ.js";import{u as bi,A as xi}from"./use-section-preview-base-Efm1fB5a.js";import{b as sn,a as _i}from"./variant-matcher-override-Bq6VeSQ8.js";import"./use-panel-navigate-BxPg1yeZ.js";import"./thread-route-Du4cHT2w.js";import"./use-project-scope-CjIHPrZt.js";import"./github-repo-BknN0SVI.js";import"./autosend-gR5Q16Ik.js";import"./thread-intent-Cb9GZZN5.js";import"./slugify-CEUa2lfQ.js";import"./hooks-B578kLR9.js";import"./use-mcp-client-CxqTiuzZ.js";import"./auth-BrLmBihg.js";import"./backoff-8mStPHYB.js";import"./task-board-DKe3wdiq.js";import"./schema-CHL8_jWB.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-BJ2fU3xk.js";import"./use-ai-providers-COtUB3xq.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-D-Dz9w48.js";import"./use-organization-settings-f8Kb8g_i.js";import"./use-session-runtime-N5BeCPEE.js";import"./decofile-api-B-ltS0w-.js";import"./utils-Ho1uEbeL.js";import"./ZoomOut-CW6c9gjM.js";import"./Image01-C2MdYCtR.js";import"./sandbox-url-D3mC8qhT.js";import"./Play-D_Dr-HEG.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-Ax9qD1ST.js";import"./Stars01-CXObStKI.js";import"./Tool02-C7BRTm2R.js";import"./ArrowRight-BX2App8Z.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-Dy8o0xUs.js";import"./use-copy-CkPsgpMc.js";import"./usage-stats-1eJOdcXv.js";import"./markdown-CcgXCeWS.js";import"./Download01-xiBeRwHN.js";import"./org-file-open-context-CsLVzm0L.js";import"./use-mobile-BUhktowg.js";import"./shell-layout-Dv1BAQBH.js";import"./avatar-DT4l4CGp.js";import"./User01-Ba34kYTP.js";import"./Globe04-Dg8SD1vo.js";import"./SearchLg-B6NToYZC.js";import"./XClose-DtruhyLM.js";import"./download-app-dialog-BEPIC2WD.js";import"./CheckCircle-BpX5Mb8t.js";import"./Monitor01-CDfch8oz.js";import"./Share07-BSfD4Af0.js";import"./command-DavQMzl4.js";import"./index-DK-m4zyI.js";import"./SearchMd-zePyurMS.js";import"./integration-icon-BK2IoSQO.js";import"./project-icon-Bb8n1f1c.js";import"./required-auth-layout-C6uKGAkK.js";import"./use-org-sso-RpMHawvG.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-qUU136mr.js";import"./types-D5VCiqQr.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-BwsPUN8V.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./AlertCircle-LJkM8Umc.js";import"./LinkExternal01-nQSknRCR.js";import"./sheet-5ssYXkXq.js";import"./X-DfPrIb4m.js";import"./use-connection-B6mAxHy2.js";import"./Palette-CMZu59LK.js";import"./use-navigate-to-agent-BBKSnPWE.js";import"./Link01-CynYhkLr.js";import"./use-mcp-prompts-iHzcvLJ6.js";import"./index-DXNGe5Ja.js";import"./form-BBJYOW9S.js";import"./label-DGWQJyZd.js";import"./use-thread-outputs-Cyl9wrzu.js";import"./file-type-icon-BEvHZV8X.js";import"./popover-DjiStQSG.js";import"./monaco-editor-ZdKL9FIJ.js";import"./editor-1m8LO4yq.js";import"./calendar-DifXWLQ2.js";import"./textarea-CaQxICAV.js";import"./select-D0baifrN.js";import"./index-BHJ4Cdqa.js";import"./switch-C6Il1ZWh.js";import"./Upload01-B5kYxzoc.js";import"./DotsVertical-CSfkrc8O.js";import"./search-input-OeEY_aWb.js";import"./tabs-DSWYIolk.js";import"./use-debounced-value-DrvAsscn.js";import"./use-file-configs-B9J96Cm2.js";import"./asset-utils-PfPLdECv.js";import"./useInfiniteQuery-DrRYdT6d.js";import"./infiniteQueryObserver-C8r1uJuJ.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-tppf_gd5.js";import"./alert-dialog-Cp2DKCaA.js";import"./sandbox-git-api-CMdpE2TE.js";import"./ArrowUp-BAUR8mSe.js";import"./ArrowLeft-CGkn-m8f.js";import"./CreditCard01-73-vkmvl.js";import"./Key01-DffQxPlE.js";import"./LayoutLeft-BfYzK4mo.js";import"./Sun-BQGS4Y0R.js";import"./Package-3ZLy52FE.js";import"./Users01-CgytyhS2.js";import"./XCircle-BRTsqRTs.js";import"./section-preview-url-Csj0_ZDg.js";function ji(d){return d.schema?.definitions??d.schema?.$defs??{}}function Mn(d,e){const o=ji(e),l=o[btoa(d)];if(!l)return[];const m=[l];if(Array.isArray(l.allOf)){const _=l.allOf.find(x=>typeof x.$ref=="string")?.$ref;if(typeof _=="string"){const x=o[_.replace("#/definitions/","")];x&&m.push(x)}}return m}function Ei(d,e){for(const o of Mn(d,e)){const l=typeof o.image=="string"?o.image:void 0;if(l?.includes("{{{"))return l}}function Ri(d,e){if(!e)return;const o=gn(d);if(!o)return;const l=Ei(o.resolveType,e);if(!l)return;const m=Ja(l,o.data);if(m)return gi(m)}const wi={escape:Qa};function ki(d,e){for(const o of Mn(d,e)){const l=typeof o.title=="string"?o.title:void 0;if(l?.includes("{{"))return l}}function Ti(d,e){if(!e)return;const o=gn(d);if(o)try{const l=ki(o.resolveType,e);return l&&ai.render(l,o.data,{},wi).trim()||void 0}catch{return}}const Vi="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Di="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function nn(d){return Array.from({length:d},(e,o)=>({id:crypto.randomUUID(),index:o}))}function Kn(d){return d.map((e,o)=>({...e,index:o}))}function Ni(d,e){if(e===d.length)return d;if(e<d.length)return Kn(d.slice(0,e));const o=Array.from({length:e-d.length},(l,m)=>({id:crypto.randomUUID(),index:d.length+m}));return[...d,...o]}function Ln(d){const e=it.c(38),{section:o,raw:l,meta:m,decofile:_}=d,x=os(),v=o.isSavedBlock===!0,b=o.isMultivariate===!0;let g;e[0]!==m||e[1]!==l?(g=l&&m?Ri(l,m):void 0,e[0]=m,e[1]=l,e[2]=g):g=e[2];const R=g;let H;e[3]!==m||e[4]!==b||e[5]!==l||e[6]!==v?(H=l&&m&&!v&&!b?Ti(l,m):void 0,e[3]=m,e[4]=b,e[5]=l,e[6]=v,e[7]=H):H=e[7];const z=H;let I;e[8]!==_||e[9]!==m||e[10]!==l||e[11]!==o?(I=to(l,o,_,m),e[8]=_,e[9]=m,e[10]=l,e[11]=o,e[12]=I):I=e[12];const E=I,f=b?qo:_n;let h;e[13]!==b||e[14]!==v?(h=v?{color:ri}:b?{color:"oklch(0.65 0.15 160)"}:void 0,e[13]=b,e[14]=v,e[15]=h):h=e[15];const C=h;let N;e[16]!==f||e[17]!==x||e[18]!==C?(N=x?s.jsxs("span",{className:"relative size-4 shrink-0",children:[s.jsx(f,{className:"absolute inset-0 size-4 transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0",style:C}),s.jsx(ws,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):s.jsx(ws,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[16]=f,e[17]=x,e[18]=C,e[19]=N):N=e[19];let i;e[20]!==R?(i=R&&s.jsx("img",{src:R,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[20]=R,e[21]=i):i=e[21];let V;e[22]!==x||e[23]!==C?(V=!x&&s.jsx(Rs,{className:"h-4 w-4 shrink-0",style:C}),e[22]=x,e[23]=C,e[24]=V):V=e[24];const c=o.isHidden&&"line-through opacity-50";let B;e[25]!==c?(B=Ie("min-w-0 flex-1 truncate text-sm font-medium",c),e[25]=c,e[26]=B):B=e[26];const F=z??o.label;let U;e[27]!==F||e[28]!==B?(U=s.jsx("span",{className:B,children:F}),e[27]=F,e[28]=B,e[29]=U):U=e[29];let ae;e[30]!==E?(ae=E&&s.jsx(so,{className:"absolute -right-0.5 -top-0.5"}),e[30]=E,e[31]=ae):ae=e[31];let fe;return e[32]!==U||e[33]!==ae||e[34]!==N||e[35]!==i||e[36]!==V?(fe=s.jsxs(s.Fragment,{children:[N,i,V,U,ae]}),e[32]=U,e[33]=ae,e[34]=N,e[35]=i,e[36]=V,e[37]=fe):fe=e[37],fe}const Ai="w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]",Pi="w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]",Ci="w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100";function Es(d,e){return Ie("h-7 shrink-0 overflow-hidden",e?Ai:d?Ci:Pi)}function Bn(d,e){const o=d.isSavedBlock===!0,l=d.isMultivariate===!0;return Ie("group relative flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":o?Vi:l?vn:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Mi(d){const e=it.c(85),{section:o,raw:l,meta:m,decofile:_,sortableId:x,selected:v,onSelect:b,onDelete:g,onDuplicate:R,onMakeReusable:H,onToggleHidden:z,onToggleLazy:I,onAddVariant:E,onDetach:f}=d,h=Ct(),C=os(),N=l?bn(l.__resolveType??""):!1,i=o.isHidden===!0,V=N||i;let c;e[0]!==o?(c=Za(o),e[0]=o,e[1]=c):c=e[1];const B=c;let F;e[2]!==x?(F={id:x,animateLayoutChanges:Oi},e[2]=x,e[3]=F):F=e[3];const{attributes:U,listeners:ae,setNodeRef:fe,transform:oe,isDragging:u}=Tn(F);let D;e[4]!==oe?(D=Vn.Transform.toString(oe?{...oe,x:0}:null),e[4]=oe,e[5]=D):D=e[5];const ne=u?0:void 0;let k;e[6]!==D||e[7]!==ne?(k={transform:D,opacity:ne},e[6]=D,e[7]=ne,e[8]=k):k=e[8];const ke=k;let P;e[9]!==o?(P=Xa(o),e[9]=o,e[10]=P):P=e[10];const Te=P;let J;e[11]!==b?(J=T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),b())},e[11]=b,e[12]=J):J=e[12];const Ne=u?"cursor-grabbing":"cursor-pointer";let Je;e[13]!==o||e[14]!==v||e[15]!==Ne?(Je=Ie("touch-none transition-colors",Ne,Bn(o,v)),e[13]=o,e[14]=v,e[15]=Ne,e[16]=Je):Je=e[16];let Ue;e[17]!==_||e[18]!==m||e[19]!==l||e[20]!==o?(Ue=s.jsx(Ln,{section:o,raw:l,meta:m,decofile:_}),e[17]=_,e[18]=m,e[19]=l,e[20]=o,e[21]=Ue):Ue=e[21];let ye;e[22]!==i||e[23]!==h?(ye=h(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[22]=i,e[23]=h,e[24]=ye):ye=e[24];let Ae;e[25]!==z?(Ae=T=>{T.stopPropagation(),z()},e[25]=z,e[26]=Ae):Ae=e[26];let Ee;e[27]!==i?(Ee=i?s.jsx(di,{className:"h-3.5 w-3.5"}):s.jsx(mi,{className:"h-3.5 w-3.5"}),e[27]=i,e[28]=Ee):Ee=e[28];let q;e[29]!==i||e[30]!==h?(q=h(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[29]=i,e[30]=h,e[31]=q):q=e[31];let M;e[32]!==q?(M=s.jsx(Pt,{side:"bottom",children:q}),e[32]=q,e[33]=M):M=e[33];const pe=dn,be=un,ze=!0,Pe=at,te="button",ge="ghost",Be="icon";let le;e[34]!==h?(le=h("sectionsEditor.sectionList.sectionActionsMenu"),e[34]=h,e[35]=le):le=e[35];const ie=Ie(Es(V,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let he;e[36]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(mn,{className:"h-3.5 w-3.5"}),e[36]=he):he=e[36];let se;e[37]!==Pe||e[38]!==le||e[39]!==ie?(se=s.jsx(Pe,{type:te,variant:ge,size:Be,"aria-label":le,className:ie,onClick:Li,onPointerDown:Ki,children:he}),e[37]=Pe,e[38]=le,e[39]=ie,e[40]=se):se=e[40];let de;e[41]!==be||e[42]!==se?(de=s.jsx(be,{asChild:ze,children:se}),e[41]=be,e[42]=se,e[43]=de):de=e[43];let Re;e[44]!==R?(Re=T=>{T.stopPropagation(),R()},e[44]=R,e[45]=Re):Re=e[45];let Ce;e[46]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(xn,{className:"h-4 w-4"}),e[46]=Ce):Ce=e[46];let ce;e[47]!==h?(ce=h("sectionsEditor.sectionList.duplicateMenuItem"),e[47]=h,e[48]=ce):ce=e[48];let Ve;e[49]!==Re||e[50]!==ce?(Ve=s.jsxs(vt,{onClick:Re,children:[Ce,ce]}),e[49]=Re,e[50]=ce,e[51]=Ve):Ve=e[51];let ve;e[52]!==B||e[53]!==E||e[54]!==h?(ve=B&&s.jsxs(vt,{className:eo,onClick:T=>{T.stopPropagation(),E()},children:[s.jsx(fi,{className:"h-4 w-4"}),h("sectionsEditor.sectionList.addVariantMenuItem")]}),e[52]=B,e[53]=E,e[54]=h,e[55]=ve):ve=e[55];let X;e[56]!==C||e[57]!==Te||e[58]!==H||e[59]!==h?(X=Te&&s.jsxs(vt,{className:Di,onClick:T=>{T.stopPropagation(),H()},children:[C?s.jsx(yn,{className:"h-4 w-4"}):s.jsx(Rs,{className:"h-4 w-4"}),h("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[56]=C,e[57]=Te,e[58]=H,e[59]=h,e[60]=X):X=e[60];let O;e[61]!==C||e[62]!==f||e[63]!==o.isMultivariate||e[64]!==o.isSavedBlock||e[65]!==h?(O=o.isSavedBlock===!0&&!o.isMultivariate&&s.jsxs(vt,{onClick:T=>{T.stopPropagation(),f()},children:[C?s.jsx(_n,{className:"h-4 w-4"}):s.jsx(Rs,{className:"h-4 w-4"}),h("sectionsEditor.sectionList.detachMenuItem")]}),e[61]=C,e[62]=f,e[63]=o.isMultivariate,e[64]=o.isSavedBlock,e[65]=h,e[66]=O):O=e[66];let re;e[67]!==g?(re=T=>{T.stopPropagation(),g()},e[67]=g,e[68]=re):re=e[68];let xe;e[69]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(jn,{className:"h-4 w-4"}),e[69]=xe):xe=e[69];let me;e[70]!==h?(me=h("sectionsEditor.sectionList.deleteMenuItem"),e[70]=h,e[71]=me):me=e[71];let Me;e[72]!==re||e[73]!==me?(Me=s.jsxs(vt,{className:"text-destructive focus:text-destructive",onClick:re,children:[xe,me]}),e[72]=re,e[73]=me,e[74]=Me):Me=e[74];let ue;e[75]!==Ve||e[76]!==ve||e[77]!==X||e[78]!==O||e[79]!==Me?(ue=s.jsxs(fn,{align:"end",className:"w-44",children:[Ve,ve,X,O,Me]}),e[75]=Ve,e[76]=ve,e[77]=X,e[78]=O,e[79]=Me,e[80]=ue):ue=e[80];let L;return e[81]!==pe||e[82]!==de||e[83]!==ue?(L=s.jsxs(pe,{children:[de,ue]}),e[81]=pe,e[82]=de,e[83]=ue,e[84]=L):L=e[84],s.jsxs("div",{ref:fe,style:ke,...U,...ae,role:"button",tabIndex:0,onClick:b,onKeyDown:J,className:Je,children:[Ue,!o.isMultivariate&&s.jsxs(Nt,{children:[s.jsx(At,{asChild:!0,children:s.jsx(at,{type:"button",variant:"ghost",size:"icon","aria-label":h(N?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Ie(Es(V,N)),onClick:T=>{T.stopPropagation(),I()},onPointerDown:Ii,children:s.jsx(pi,{className:Ie("h-3.5 w-3.5",N&&"text-yellow-500")})})}),s.jsx(Pt,{side:"bottom",children:h(N?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),s.jsxs(Nt,{children:[s.jsx(At,{asChild:!0,children:s.jsx(at,{type:"button",variant:"ghost",size:"icon","aria-label":ye,className:Ie(Es(V,i)),onClick:Ae,onPointerDown:Bi,children:Ee})}),M]}),L]})}function Ki(d){return d.stopPropagation()}function Li(d){return d.stopPropagation()}function Bi(d){return d.stopPropagation()}function Ii(d){return d.stopPropagation()}function Oi(){return!1}function Fi(d){const e=it.c(106),{listKey:o,rawSections:l,sections:m,meta:_,decofile:x,selectedIndex:v,onSelect:b,onReorder:g,onDelete:R,onDuplicate:H,onMakeReusable:z,onToggleHidden:I,onToggleLazy:E,onAddVariant:f,onDetach:h,onAddSection:C,canAddSection:N}=d,i=N===void 0?!0:N,V=Ct();let c;e[0]!==m.length?(c=()=>nn(m.length),e[0]=m.length,e[1]=c):c=e[1];const[B,F]=w.useState(c),[U,ae]=w.useState(null),[fe,oe]=w.useState(o),[u,D]=w.useState(m.length),ne=w.useRef(!1);fe!==o?(oe(o),D(m.length),F(nn(m.length))):u!==m.length&&(D(m.length),F(ue=>Ni(ue,m.length)));let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k={activationConstraint:{distance:8}},e[2]=k):k=e[2];let ke;e[3]===Symbol.for("react.memo_cache_sentinel")?(ke={coordinateGetter:Dn},e[3]=ke):ke=e[3];const P=En(as(kn,k),as(wn,ke));let Te;e[4]!==B?(Te=B.map(zi),e[4]=B,e[5]=Te):Te=e[5];const J=Te;let Ne;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ne=ue=>{ae(String(ue.active.id))},e[6]=Ne):Ne=e[6];const Je=Ne;let Ue;e[7]!==J||e[8]!==g?(Ue=ue=>{ae(null);const{active:L,over:T}=ue;if(!T||L.id===T.id)return;const Qe=J.indexOf(String(L.id)),Ge=J.indexOf(String(T.id));Qe===-1||Ge===-1||(F(mt=>Kn(zt([...mt],Qe,Ge))),ne.current=!0,requestAnimationFrame(()=>{ne.current=!1}),g?.(Qe,Ge))},e[7]=J,e[8]=g,e[9]=Ue):Ue=e[9];const ye=Ue;let Ae;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ae=()=>{ae(null)},e[10]=Ae):Ae=e[10];const Ee=Ae;let q,M,pe,be,ze,Pe,te,ge,Be,le,ie,he,se,de,Re;if(e[11]!==U||e[12]!==i||e[13]!==x||e[14]!==B||e[15]!==J||e[16]!==ye||e[17]!==_||e[18]!==C||e[19]!==f||e[20]!==R||e[21]!==h||e[22]!==H||e[23]!==z||e[24]!==b||e[25]!==I||e[26]!==E||e[27]!==l||e[28]!==m||e[29]!==v||e[30]!==P||e[31]!==V){de=Symbol.for("react.early_return_sentinel");e:{const ue=L=>{ne.current||b(L)};if(e[47]!==U||e[48]!==i||e[49]!==B||e[50]!==C||e[51]!==l||e[52]!==m||e[53]!==V){const L=U?B.find(T=>T.id===U):null;if(be=L!=null?m[L.index]:null,pe=L!=null?l[L.index]:void 0,B.length===0){let T;e[57]!==V?(T=V("sectionsEditor.sectionList.noSections"),e[57]=V,e[58]=T):T=e[58];let Qe;e[59]!==T?(Qe=s.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:T}),e[59]=T,e[60]=Qe):Qe=e[60];const Ge=!i;let mt;e[61]===Symbol.for("react.memo_cache_sentinel")?(mt=s.jsx(ks,{size:14}),e[61]=mt):mt=e[61];let Ze;e[62]!==V?(Ze=V("sectionsEditor.sectionList.addSectionButton"),e[62]=V,e[63]=Ze):Ze=e[63];let De;e[64]!==C||e[65]!==Ge||e[66]!==Ze?(De=s.jsxs(at,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Ge,onClick:C,children:[mt,Ze]}),e[64]=C,e[65]=Ge,e[66]=Ze,e[67]=De):De=e[67];let $e;e[68]!==Qe||e[69]!==De?($e=s.jsxs("div",{className:"space-y-2",children:[Qe,De]}),e[68]=Qe,e[69]=De,e[70]=$e):$e=e[70],de=$e;break e}se=Ie(L&&"cursor-grabbing"),e[47]=U,e[48]=i,e[49]=B,e[50]=C,e[51]=l,e[52]=m,e[53]=V,e[54]=pe,e[55]=be,e[56]=se}else pe=e[54],be=e[55],se=e[56];M=Nn,ge=P,Be=An,le=Je,ie=ye,he=Ee,q=Pn,Pe=J,te=Cn,Re="space-y-1",ze=B.map(L=>{const T=m[L.index];return T?s.jsx(Mi,{sortableId:L.id,section:T,raw:l[L.index],meta:_,decofile:x,selected:v===L.index,onSelect:()=>ue(L.index),onDelete:()=>R(L.index),onDuplicate:()=>H(L.index),onMakeReusable:()=>z(L.index),onToggleHidden:()=>I(L.index),onToggleLazy:()=>E(L.index),onAddVariant:()=>f(L.index),onDetach:()=>h(L.index)},L.id):null})}e[11]=U,e[12]=i,e[13]=x,e[14]=B,e[15]=J,e[16]=ye,e[17]=_,e[18]=C,e[19]=f,e[20]=R,e[21]=h,e[22]=H,e[23]=z,e[24]=b,e[25]=I,e[26]=E,e[27]=l,e[28]=m,e[29]=v,e[30]=P,e[31]=V,e[32]=q,e[33]=M,e[34]=pe,e[35]=be,e[36]=ze,e[37]=Pe,e[38]=te,e[39]=ge,e[40]=Be,e[41]=le,e[42]=ie,e[43]=he,e[44]=se,e[45]=de,e[46]=Re}else q=e[32],M=e[33],pe=e[34],be=e[35],ze=e[36],Pe=e[37],te=e[38],ge=e[39],Be=e[40],le=e[41],ie=e[42],he=e[43],se=e[44],de=e[45],Re=e[46];if(de!==Symbol.for("react.early_return_sentinel"))return de;let Ce;e[71]!==ze||e[72]!==Re?(Ce=s.jsx("div",{className:Re,children:ze}),e[71]=ze,e[72]=Re,e[73]=Ce):Ce=e[73];let ce;e[74]!==q||e[75]!==Pe||e[76]!==te||e[77]!==Ce?(ce=s.jsx(q,{items:Pe,strategy:te,children:Ce}),e[74]=q,e[75]=Pe,e[76]=te,e[77]=Ce,e[78]=ce):ce=e[78];let Ve;e[79]!==pe||e[80]!==be||e[81]!==x||e[82]!==_?(Ve=be?s.jsx("div",{className:Ie("cursor-grabbing shadow-lg ring-1 ring-border/60",Bn(be,!1)),children:s.jsx(Ln,{section:be,raw:pe,meta:_,decofile:x})}):null,e[79]=pe,e[80]=be,e[81]=x,e[82]=_,e[83]=Ve):Ve=e[83];let ve;e[84]!==Ve?(ve=cn.createPortal(s.jsx(Rn,{dropAnimation:hn,children:Ve}),document.body),e[84]=Ve,e[85]=ve):ve=e[85];let X;e[86]!==M||e[87]!==ge||e[88]!==Be||e[89]!==le||e[90]!==ie||e[91]!==he||e[92]!==ce||e[93]!==ve?(X=s.jsxs(M,{sensors:ge,collisionDetection:Be,onDragStart:le,onDragEnd:ie,onDragCancel:he,children:[ce,ve]}),e[86]=M,e[87]=ge,e[88]=Be,e[89]=le,e[90]=ie,e[91]=he,e[92]=ce,e[93]=ve,e[94]=X):X=e[94];const O=!i;let re;e[95]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(ks,{size:14}),e[95]=re):re=e[95];let xe;e[96]!==V?(xe=V("sectionsEditor.sectionList.addSectionButton"),e[96]=V,e[97]=xe):xe=e[97];let me;e[98]!==C||e[99]!==O||e[100]!==xe?(me=s.jsxs(at,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:O,onClick:C,children:[re,xe]}),e[98]=C,e[99]=O,e[100]=xe,e[101]=me):me=e[101];let Me;return e[102]!==se||e[103]!==X||e[104]!==me?(Me=s.jsxs("div",{className:se,children:[X,me]}),e[102]=se,e[103]=X,e[104]=me,e[105]=Me):Me=e[105],Me}function zi(d){return d.id}function an(d){const e=it.c(57),{open:o,initialName:l,autoLabel:m,isPending:_,onSubmit:x,onOpenChange:v}=d,b=_===void 0?!1:_,g=Ct(),[R,H]=w.useState(l),[z,I]=w.useState(o);o!==z&&(I(o),o&&H(l));let E;e[0]!==b||e[1]!==v?(E=Ne=>{!Ne&&!b&&v(!1)},e[0]=b,e[1]=v,e[2]=E):E=e[2];const f=E;let h;e[3]!==b||e[4]!==R||e[5]!==x?(h=async Ne=>{Ne.preventDefault(),!b&&await x(R.trim())},e[3]=b,e[4]=R,e[5]=x,e[6]=h):h=e[6];const C=h;let N;e[7]!==g?(N=g("sectionsEditor.variantRenameDialog.title"),e[7]=g,e[8]=N):N=e[8];let i;e[9]!==N?(i=s.jsx(Qo,{children:N}),e[9]=N,e[10]=i):i=e[10];let V;e[11]!==m||e[12]!==g?(V=g("sectionsEditor.variantRenameDialog.description",{fallback:m||g("sectionsEditor.variantRenameDialog.defaultFallback")}),e[11]=m,e[12]=g,e[13]=V):V=e[13];let c;e[14]!==V?(c=s.jsx(Zo,{children:V}),e[14]=V,e[15]=c):c=e[15];let B;e[16]!==i||e[17]!==c?(B=s.jsxs(Xo,{children:[i,c]}),e[16]=i,e[17]=c,e[18]=B):B=e[18];let F;e[19]!==g?(F=g("sectionsEditor.variantRenameDialog.nameLabel"),e[19]=g,e[20]=F):F=e[20];let U;e[21]!==F?(U=s.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:F}),e[21]=F,e[22]=U):U=e[22];let ae;e[23]===Symbol.for("react.memo_cache_sentinel")?(ae=Ne=>H(Ne.target.value),e[23]=ae):ae=e[23];let fe;e[24]!==m||e[25]!==b||e[26]!==R?(fe=s.jsx(ni,{id:"variant-rename-name",value:R,onChange:ae,placeholder:m,autoFocus:!0,disabled:b}),e[24]=m,e[25]=b,e[26]=R,e[27]=fe):fe=e[27];let oe;e[28]!==U||e[29]!==fe?(oe=s.jsxs("div",{className:"space-y-1.5 py-4",children:[U,fe]}),e[28]=U,e[29]=fe,e[30]=oe):oe=e[30];let u;e[31]!==v?(u=()=>v(!1),e[31]=v,e[32]=u):u=e[32];let D;e[33]!==g?(D=g("sectionsEditor.variantRenameDialog.cancel"),e[33]=g,e[34]=D):D=e[34];let ne;e[35]!==b||e[36]!==u||e[37]!==D?(ne=s.jsx(at,{type:"button",variant:"outline",onClick:u,disabled:b,children:D}),e[35]=b,e[36]=u,e[37]=D,e[38]=ne):ne=e[38];let k;e[39]!==b||e[40]!==g?(k=b?s.jsxs(s.Fragment,{children:[s.jsx(pn,{className:"size-3.5"}),g("sectionsEditor.variantRenameDialog.saving")]}):g("sectionsEditor.variantRenameDialog.save"),e[39]=b,e[40]=g,e[41]=k):k=e[41];let ke;e[42]!==b||e[43]!==k?(ke=s.jsx(at,{type:"submit",disabled:b,children:k}),e[42]=b,e[43]=k,e[44]=ke):ke=e[44];let P;e[45]!==ne||e[46]!==ke?(P=s.jsxs(ei,{children:[ne,ke]}),e[45]=ne,e[46]=ke,e[47]=P):P=e[47];let Te;e[48]!==C||e[49]!==oe||e[50]!==P||e[51]!==B?(Te=s.jsx(ti,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:C,children:[B,oe,P]})}),e[48]=C,e[49]=oe,e[50]=P,e[51]=B,e[52]=Te):Te=e[52];let J;return e[53]!==f||e[54]!==o||e[55]!==Te?(J=s.jsx(si,{open:o,onOpenChange:f,children:Te}),e[53]=f,e[54]=o,e[55]=Te,e[56]=J):J=e[56],J}function Ts(d){const e=it.c(5),{rule:o,matchers:l}=d,m=o?.__resolveType??"";let _;if(e[0]!==l||e[1]!==m){const g=l.find(R=>R.resolveType===m)?.iconName??no(m);_=Go(g),e[0]=l,e[1]=m,e[2]=_}else _=e[2];const x=_;if(!x)return null;let v;return e[3]!==x?(v=s.jsx(x,{size:14,className:"shrink-0"}),e[3]=x,e[4]=v):v=e[4],v}function on(d){return d.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
1
|
+
import{c as it,b as Ct,r as w,l as Ie,j as s,aO as cn,Z as os,B as at,F as un,G as vt,I as dn,aN as mn,H as fn,h as pn,aM as qa,o as Ga,t as Z,K as Wa}from"./index-D5GfY9ep.js";import{u as Ya}from"./chat-context-CDFEG_L-.js";import{I as gn,J as Ja,K as Qa,L as hn,N as Za,O as Xa,V as eo,Q as to,T as vn,U as so,W as no,X as Ft,Y as Sn,Z as ao,_ as oo,e as io,f as ro,h as lo,u as co,$ as Gs,a0 as uo,a1 as mo,a2 as fo,a3 as po,a4 as go,p as Xt,a5 as ho,A as xt,a6 as Bt,a7 as vo,a8 as So,a9 as ot,aa as Ws,z as yo,ab as bo,ac as Ys,ad as xo,ae as _o,H as It,af as es,ag as Js,M as jo,C as xs,ah as ht,G as Vt,ai as Eo,aj as Ro,ak as wo,F as ko,al as To,am as Vo,an as _t,ao as Do,ap as No,aq as Ao,d as Po,ar as Qs,as as Ot,at as Zs,au as Co,av as Mo,aw as Ko,ax as Lo,y as _s,ay as Xs,az as en,aA as Dt,aB as ts,aC as js,aD as Bo,aE as Io,aF as Oo,aG as Fo,aH as zo}from"./runnable-block-editor-DXLcjI9M.js";import{d as $o}from"./use-virtual-mcp-DtPQZrM3.js";import{n as Ho,t as Uo}from"./ChevronUp-K_DSezIa.js";import{z as Rs,bj as qo,a2 as ws,a5 as Go,o as Wo,P as Yo,x as Jo}from"./agent-icon-Db2N7oq5.js";import{i as yn}from"./Globe01-BGyzTJzS.js";import{S as ss}from"./scroll-area-CLDYN-1F.js";import{c as Nt,T as At,a as Pt}from"./tooltip-OTJWd5I_.js";import{d as Qo,h as Zo,c as Xo,e as ei,b as ti,D as si}from"./dialog-lfdH0lhI.js";import{I as ni}from"./input--eOKSICy.js";import{m as ai,u as oi,P as ii}from"./mustache-CmNRGKWY.js";import{b as bn,G as ri,e as li,j as ci,g as ui,r as ns,M as tn}from"./claim-phase-copy-0btUuJoC.js";import{a as xn}from"./Copy01-BD66Qy1p.js";import{c as _n}from"./UserSquare-CI-Lmxvt.js";import{i as di}from"./Settings02-2SBOLpFQ.js";import{s as mi}from"./Eye-oxb_RsMQ.js";import{s as fi}from"./TrendUp01-C0ETH40N.js";import{s as ks}from"./Plus-KuC07360.js";import{s as jn}from"./Trash01-sdbYLhwG.js";import{i as pi}from"./Zap-CcN1LA-b.js";import{a as En,b as as,d as Rn,K as wn,P as kn,u as Tn,C as Vn,s as Dn,e as zt,D as Nn,c as An,S as Pn,v as Cn}from"./rich-text-link-control-BcTvBRHf.js";import{s as gi}from"./safe-image-url-D5z803Ot.js";import{a as hi,P as vi,b as Si}from"./page-seo-form-cedG3AU7.js";import{a as yi}from"./Tool01-C8yYoxGr.js";import{u as bi,A as xi}from"./use-section-preview-base-B8wYavun.js";import{b as sn,a as _i}from"./variant-matcher-override-ChtiN8zH.js";import"./use-panel-navigate-JtzJfijF.js";import"./thread-route-i4MDHqFd.js";import"./use-project-scope-ooe9AxCw.js";import"./github-repo-BknN0SVI.js";import"./autosend-0RKjkzJ3.js";import"./thread-intent-CwhSEEGz.js";import"./slugify-CEUa2lfQ.js";import"./hooks-mgPEmVyE.js";import"./use-mcp-client-DucDZTqc.js";import"./auth-DJ59GovO.js";import"./backoff-8mStPHYB.js";import"./task-board-CslA-FwT.js";import"./schema-B8zTDh4T.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-BqqEvjPg.js";import"./use-ai-providers-BPI8963x.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DjboVZiO.js";import"./use-organization-settings-8Qf5CO0q.js";import"./use-session-runtime-CmBpc3xW.js";import"./decofile-api-C_AZXr3X.js";import"./utils-C9aDXnK4.js";import"./ZoomOut-Cm9QeblW.js";import"./Image01-CABBJzvK.js";import"./sandbox-url-D3mC8qhT.js";import"./Play-C375qAFd.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-CniwTMo1.js";import"./Stars01-DLpAYXhL.js";import"./Tool02-B6NEJ959.js";import"./ArrowRight-7HllOSKn.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-BNufaH68.js";import"./use-copy-FLJ5XV9J.js";import"./usage-stats-Dg30HMJj.js";import"./markdown-WJDeiHFM.js";import"./Download01-CZiiid2z.js";import"./org-file-open-context-CVN97RZc.js";import"./use-mobile-CLWKkyXU.js";import"./shell-layout-CPue6FpY.js";import"./avatar-TzyTAv0e.js";import"./User01-BUAGbw_8.js";import"./Globe04-BKLGp0-t.js";import"./SearchLg-CnAwayoV.js";import"./XClose-fZr02TyX.js";import"./download-app-dialog-Cpkyx2ph.js";import"./CheckCircle-CHH7PvQv.js";import"./Monitor01-C8HMQtDc.js";import"./Share07-BE4JtC9a.js";import"./command-CBz2JIJh.js";import"./index-BuXlZ7Xk.js";import"./SearchMd-Db_7ZS_U.js";import"./integration-icon-BKsmKoE7.js";import"./project-icon-9U2WquDG.js";import"./required-auth-layout-CQKtej-F.js";import"./use-org-sso-Z0-UYTzJ.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DY6yKadW.js";import"./types-D_sN4rB-.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-CRExBxKg.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./AlertCircle-3NjmS2Me.js";import"./LinkExternal01-BJ0NvAtL.js";import"./sheet-B6sXHBfO.js";import"./X-ByVEErG0.js";import"./use-connection-uV-VP0gX.js";import"./Palette-D2CzWakp.js";import"./use-navigate-to-agent-DkyDtkl9.js";import"./Link01-IxSW8a5k.js";import"./use-mcp-prompts-C7O_WXgf.js";import"./index-CBwjcqc7.js";import"./form-Dx6ZBu4I.js";import"./label-DwreXpUN.js";import"./use-thread-outputs-BiZSgJdo.js";import"./file-type-icon-BSsIsHaI.js";import"./popover-B9xJOTEM.js";import"./monaco-editor-Do8S48ks.js";import"./editor-CxCZwxPG.js";import"./calendar-DhHcogG2.js";import"./textarea-D8cpAa8h.js";import"./select-rsdXMOmu.js";import"./index-pVhbfkhf.js";import"./switch-3_30Hq56.js";import"./Upload01-B4XZygwf.js";import"./DotsVertical-DMXzeMxu.js";import"./search-input-Jjxs_ylZ.js";import"./tabs-Bj4_8GUh.js";import"./use-debounced-value-CrGSRGNy.js";import"./use-file-configs-B1pr8ET8.js";import"./asset-utils-aI3pZanR.js";import"./useInfiniteQuery-Ukl_Kss8.js";import"./infiniteQueryObserver-8LFHG5jD.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-DPMwuwMR.js";import"./alert-dialog-C3aY_yJw.js";import"./sandbox-git-api-CMdpE2TE.js";import"./ArrowUp-hZF6_Dg8.js";import"./ArrowLeft-BDJocc-E.js";import"./CreditCard01-Bh3w7Hgk.js";import"./Key01-DP1rdVgR.js";import"./LayoutLeft-DlOBiWF7.js";import"./Sun-CwUe69CG.js";import"./Package-DbqCrAqt.js";import"./Users01-DFi4f9KY.js";import"./XCircle-CNDaDHqM.js";import"./section-preview-url-Csj0_ZDg.js";function ji(d){return d.schema?.definitions??d.schema?.$defs??{}}function Mn(d,e){const o=ji(e),l=o[btoa(d)];if(!l)return[];const m=[l];if(Array.isArray(l.allOf)){const _=l.allOf.find(x=>typeof x.$ref=="string")?.$ref;if(typeof _=="string"){const x=o[_.replace("#/definitions/","")];x&&m.push(x)}}return m}function Ei(d,e){for(const o of Mn(d,e)){const l=typeof o.image=="string"?o.image:void 0;if(l?.includes("{{{"))return l}}function Ri(d,e){if(!e)return;const o=gn(d);if(!o)return;const l=Ei(o.resolveType,e);if(!l)return;const m=Ja(l,o.data);if(m)return gi(m)}const wi={escape:Qa};function ki(d,e){for(const o of Mn(d,e)){const l=typeof o.title=="string"?o.title:void 0;if(l?.includes("{{"))return l}}function Ti(d,e){if(!e)return;const o=gn(d);if(o)try{const l=ki(o.resolveType,e);return l&&ai.render(l,o.data,{},wi).trim()||void 0}catch{return}}const Vi="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Di="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function nn(d){return Array.from({length:d},(e,o)=>({id:crypto.randomUUID(),index:o}))}function Kn(d){return d.map((e,o)=>({...e,index:o}))}function Ni(d,e){if(e===d.length)return d;if(e<d.length)return Kn(d.slice(0,e));const o=Array.from({length:e-d.length},(l,m)=>({id:crypto.randomUUID(),index:d.length+m}));return[...d,...o]}function Ln(d){const e=it.c(38),{section:o,raw:l,meta:m,decofile:_}=d,x=os(),v=o.isSavedBlock===!0,b=o.isMultivariate===!0;let g;e[0]!==m||e[1]!==l?(g=l&&m?Ri(l,m):void 0,e[0]=m,e[1]=l,e[2]=g):g=e[2];const R=g;let H;e[3]!==m||e[4]!==b||e[5]!==l||e[6]!==v?(H=l&&m&&!v&&!b?Ti(l,m):void 0,e[3]=m,e[4]=b,e[5]=l,e[6]=v,e[7]=H):H=e[7];const z=H;let I;e[8]!==_||e[9]!==m||e[10]!==l||e[11]!==o?(I=to(l,o,_,m),e[8]=_,e[9]=m,e[10]=l,e[11]=o,e[12]=I):I=e[12];const E=I,f=b?qo:_n;let h;e[13]!==b||e[14]!==v?(h=v?{color:ri}:b?{color:"oklch(0.65 0.15 160)"}:void 0,e[13]=b,e[14]=v,e[15]=h):h=e[15];const C=h;let N;e[16]!==f||e[17]!==x||e[18]!==C?(N=x?s.jsxs("span",{className:"relative size-4 shrink-0",children:[s.jsx(f,{className:"absolute inset-0 size-4 transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0",style:C}),s.jsx(ws,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):s.jsx(ws,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[16]=f,e[17]=x,e[18]=C,e[19]=N):N=e[19];let i;e[20]!==R?(i=R&&s.jsx("img",{src:R,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[20]=R,e[21]=i):i=e[21];let V;e[22]!==x||e[23]!==C?(V=!x&&s.jsx(Rs,{className:"h-4 w-4 shrink-0",style:C}),e[22]=x,e[23]=C,e[24]=V):V=e[24];const c=o.isHidden&&"line-through opacity-50";let B;e[25]!==c?(B=Ie("min-w-0 flex-1 truncate text-sm font-medium",c),e[25]=c,e[26]=B):B=e[26];const F=z??o.label;let U;e[27]!==F||e[28]!==B?(U=s.jsx("span",{className:B,children:F}),e[27]=F,e[28]=B,e[29]=U):U=e[29];let ae;e[30]!==E?(ae=E&&s.jsx(so,{className:"absolute -right-0.5 -top-0.5"}),e[30]=E,e[31]=ae):ae=e[31];let fe;return e[32]!==U||e[33]!==ae||e[34]!==N||e[35]!==i||e[36]!==V?(fe=s.jsxs(s.Fragment,{children:[N,i,V,U,ae]}),e[32]=U,e[33]=ae,e[34]=N,e[35]=i,e[36]=V,e[37]=fe):fe=e[37],fe}const Ai="w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]",Pi="w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]",Ci="w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100";function Es(d,e){return Ie("h-7 shrink-0 overflow-hidden",e?Ai:d?Ci:Pi)}function Bn(d,e){const o=d.isSavedBlock===!0,l=d.isMultivariate===!0;return Ie("group relative flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":o?Vi:l?vn:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Mi(d){const e=it.c(85),{section:o,raw:l,meta:m,decofile:_,sortableId:x,selected:v,onSelect:b,onDelete:g,onDuplicate:R,onMakeReusable:H,onToggleHidden:z,onToggleLazy:I,onAddVariant:E,onDetach:f}=d,h=Ct(),C=os(),N=l?bn(l.__resolveType??""):!1,i=o.isHidden===!0,V=N||i;let c;e[0]!==o?(c=Za(o),e[0]=o,e[1]=c):c=e[1];const B=c;let F;e[2]!==x?(F={id:x,animateLayoutChanges:Oi},e[2]=x,e[3]=F):F=e[3];const{attributes:U,listeners:ae,setNodeRef:fe,transform:oe,isDragging:u}=Tn(F);let D;e[4]!==oe?(D=Vn.Transform.toString(oe?{...oe,x:0}:null),e[4]=oe,e[5]=D):D=e[5];const ne=u?0:void 0;let k;e[6]!==D||e[7]!==ne?(k={transform:D,opacity:ne},e[6]=D,e[7]=ne,e[8]=k):k=e[8];const ke=k;let P;e[9]!==o?(P=Xa(o),e[9]=o,e[10]=P):P=e[10];const Te=P;let J;e[11]!==b?(J=T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),b())},e[11]=b,e[12]=J):J=e[12];const Ne=u?"cursor-grabbing":"cursor-pointer";let Je;e[13]!==o||e[14]!==v||e[15]!==Ne?(Je=Ie("touch-none transition-colors",Ne,Bn(o,v)),e[13]=o,e[14]=v,e[15]=Ne,e[16]=Je):Je=e[16];let Ue;e[17]!==_||e[18]!==m||e[19]!==l||e[20]!==o?(Ue=s.jsx(Ln,{section:o,raw:l,meta:m,decofile:_}),e[17]=_,e[18]=m,e[19]=l,e[20]=o,e[21]=Ue):Ue=e[21];let ye;e[22]!==i||e[23]!==h?(ye=h(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[22]=i,e[23]=h,e[24]=ye):ye=e[24];let Ae;e[25]!==z?(Ae=T=>{T.stopPropagation(),z()},e[25]=z,e[26]=Ae):Ae=e[26];let Ee;e[27]!==i?(Ee=i?s.jsx(di,{className:"h-3.5 w-3.5"}):s.jsx(mi,{className:"h-3.5 w-3.5"}),e[27]=i,e[28]=Ee):Ee=e[28];let q;e[29]!==i||e[30]!==h?(q=h(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[29]=i,e[30]=h,e[31]=q):q=e[31];let M;e[32]!==q?(M=s.jsx(Pt,{side:"bottom",children:q}),e[32]=q,e[33]=M):M=e[33];const pe=dn,be=un,ze=!0,Pe=at,te="button",ge="ghost",Be="icon";let le;e[34]!==h?(le=h("sectionsEditor.sectionList.sectionActionsMenu"),e[34]=h,e[35]=le):le=e[35];const ie=Ie(Es(V,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let he;e[36]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(mn,{className:"h-3.5 w-3.5"}),e[36]=he):he=e[36];let se;e[37]!==Pe||e[38]!==le||e[39]!==ie?(se=s.jsx(Pe,{type:te,variant:ge,size:Be,"aria-label":le,className:ie,onClick:Li,onPointerDown:Ki,children:he}),e[37]=Pe,e[38]=le,e[39]=ie,e[40]=se):se=e[40];let de;e[41]!==be||e[42]!==se?(de=s.jsx(be,{asChild:ze,children:se}),e[41]=be,e[42]=se,e[43]=de):de=e[43];let Re;e[44]!==R?(Re=T=>{T.stopPropagation(),R()},e[44]=R,e[45]=Re):Re=e[45];let Ce;e[46]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(xn,{className:"h-4 w-4"}),e[46]=Ce):Ce=e[46];let ce;e[47]!==h?(ce=h("sectionsEditor.sectionList.duplicateMenuItem"),e[47]=h,e[48]=ce):ce=e[48];let Ve;e[49]!==Re||e[50]!==ce?(Ve=s.jsxs(vt,{onClick:Re,children:[Ce,ce]}),e[49]=Re,e[50]=ce,e[51]=Ve):Ve=e[51];let ve;e[52]!==B||e[53]!==E||e[54]!==h?(ve=B&&s.jsxs(vt,{className:eo,onClick:T=>{T.stopPropagation(),E()},children:[s.jsx(fi,{className:"h-4 w-4"}),h("sectionsEditor.sectionList.addVariantMenuItem")]}),e[52]=B,e[53]=E,e[54]=h,e[55]=ve):ve=e[55];let X;e[56]!==C||e[57]!==Te||e[58]!==H||e[59]!==h?(X=Te&&s.jsxs(vt,{className:Di,onClick:T=>{T.stopPropagation(),H()},children:[C?s.jsx(yn,{className:"h-4 w-4"}):s.jsx(Rs,{className:"h-4 w-4"}),h("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[56]=C,e[57]=Te,e[58]=H,e[59]=h,e[60]=X):X=e[60];let O;e[61]!==C||e[62]!==f||e[63]!==o.isMultivariate||e[64]!==o.isSavedBlock||e[65]!==h?(O=o.isSavedBlock===!0&&!o.isMultivariate&&s.jsxs(vt,{onClick:T=>{T.stopPropagation(),f()},children:[C?s.jsx(_n,{className:"h-4 w-4"}):s.jsx(Rs,{className:"h-4 w-4"}),h("sectionsEditor.sectionList.detachMenuItem")]}),e[61]=C,e[62]=f,e[63]=o.isMultivariate,e[64]=o.isSavedBlock,e[65]=h,e[66]=O):O=e[66];let re;e[67]!==g?(re=T=>{T.stopPropagation(),g()},e[67]=g,e[68]=re):re=e[68];let xe;e[69]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(jn,{className:"h-4 w-4"}),e[69]=xe):xe=e[69];let me;e[70]!==h?(me=h("sectionsEditor.sectionList.deleteMenuItem"),e[70]=h,e[71]=me):me=e[71];let Me;e[72]!==re||e[73]!==me?(Me=s.jsxs(vt,{className:"text-destructive focus:text-destructive",onClick:re,children:[xe,me]}),e[72]=re,e[73]=me,e[74]=Me):Me=e[74];let ue;e[75]!==Ve||e[76]!==ve||e[77]!==X||e[78]!==O||e[79]!==Me?(ue=s.jsxs(fn,{align:"end",className:"w-44",children:[Ve,ve,X,O,Me]}),e[75]=Ve,e[76]=ve,e[77]=X,e[78]=O,e[79]=Me,e[80]=ue):ue=e[80];let L;return e[81]!==pe||e[82]!==de||e[83]!==ue?(L=s.jsxs(pe,{children:[de,ue]}),e[81]=pe,e[82]=de,e[83]=ue,e[84]=L):L=e[84],s.jsxs("div",{ref:fe,style:ke,...U,...ae,role:"button",tabIndex:0,onClick:b,onKeyDown:J,className:Je,children:[Ue,!o.isMultivariate&&s.jsxs(Nt,{children:[s.jsx(At,{asChild:!0,children:s.jsx(at,{type:"button",variant:"ghost",size:"icon","aria-label":h(N?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Ie(Es(V,N)),onClick:T=>{T.stopPropagation(),I()},onPointerDown:Ii,children:s.jsx(pi,{className:Ie("h-3.5 w-3.5",N&&"text-yellow-500")})})}),s.jsx(Pt,{side:"bottom",children:h(N?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),s.jsxs(Nt,{children:[s.jsx(At,{asChild:!0,children:s.jsx(at,{type:"button",variant:"ghost",size:"icon","aria-label":ye,className:Ie(Es(V,i)),onClick:Ae,onPointerDown:Bi,children:Ee})}),M]}),L]})}function Ki(d){return d.stopPropagation()}function Li(d){return d.stopPropagation()}function Bi(d){return d.stopPropagation()}function Ii(d){return d.stopPropagation()}function Oi(){return!1}function Fi(d){const e=it.c(106),{listKey:o,rawSections:l,sections:m,meta:_,decofile:x,selectedIndex:v,onSelect:b,onReorder:g,onDelete:R,onDuplicate:H,onMakeReusable:z,onToggleHidden:I,onToggleLazy:E,onAddVariant:f,onDetach:h,onAddSection:C,canAddSection:N}=d,i=N===void 0?!0:N,V=Ct();let c;e[0]!==m.length?(c=()=>nn(m.length),e[0]=m.length,e[1]=c):c=e[1];const[B,F]=w.useState(c),[U,ae]=w.useState(null),[fe,oe]=w.useState(o),[u,D]=w.useState(m.length),ne=w.useRef(!1);fe!==o?(oe(o),D(m.length),F(nn(m.length))):u!==m.length&&(D(m.length),F(ue=>Ni(ue,m.length)));let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k={activationConstraint:{distance:8}},e[2]=k):k=e[2];let ke;e[3]===Symbol.for("react.memo_cache_sentinel")?(ke={coordinateGetter:Dn},e[3]=ke):ke=e[3];const P=En(as(kn,k),as(wn,ke));let Te;e[4]!==B?(Te=B.map(zi),e[4]=B,e[5]=Te):Te=e[5];const J=Te;let Ne;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ne=ue=>{ae(String(ue.active.id))},e[6]=Ne):Ne=e[6];const Je=Ne;let Ue;e[7]!==J||e[8]!==g?(Ue=ue=>{ae(null);const{active:L,over:T}=ue;if(!T||L.id===T.id)return;const Qe=J.indexOf(String(L.id)),Ge=J.indexOf(String(T.id));Qe===-1||Ge===-1||(F(mt=>Kn(zt([...mt],Qe,Ge))),ne.current=!0,requestAnimationFrame(()=>{ne.current=!1}),g?.(Qe,Ge))},e[7]=J,e[8]=g,e[9]=Ue):Ue=e[9];const ye=Ue;let Ae;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ae=()=>{ae(null)},e[10]=Ae):Ae=e[10];const Ee=Ae;let q,M,pe,be,ze,Pe,te,ge,Be,le,ie,he,se,de,Re;if(e[11]!==U||e[12]!==i||e[13]!==x||e[14]!==B||e[15]!==J||e[16]!==ye||e[17]!==_||e[18]!==C||e[19]!==f||e[20]!==R||e[21]!==h||e[22]!==H||e[23]!==z||e[24]!==b||e[25]!==I||e[26]!==E||e[27]!==l||e[28]!==m||e[29]!==v||e[30]!==P||e[31]!==V){de=Symbol.for("react.early_return_sentinel");e:{const ue=L=>{ne.current||b(L)};if(e[47]!==U||e[48]!==i||e[49]!==B||e[50]!==C||e[51]!==l||e[52]!==m||e[53]!==V){const L=U?B.find(T=>T.id===U):null;if(be=L!=null?m[L.index]:null,pe=L!=null?l[L.index]:void 0,B.length===0){let T;e[57]!==V?(T=V("sectionsEditor.sectionList.noSections"),e[57]=V,e[58]=T):T=e[58];let Qe;e[59]!==T?(Qe=s.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:T}),e[59]=T,e[60]=Qe):Qe=e[60];const Ge=!i;let mt;e[61]===Symbol.for("react.memo_cache_sentinel")?(mt=s.jsx(ks,{size:14}),e[61]=mt):mt=e[61];let Ze;e[62]!==V?(Ze=V("sectionsEditor.sectionList.addSectionButton"),e[62]=V,e[63]=Ze):Ze=e[63];let De;e[64]!==C||e[65]!==Ge||e[66]!==Ze?(De=s.jsxs(at,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Ge,onClick:C,children:[mt,Ze]}),e[64]=C,e[65]=Ge,e[66]=Ze,e[67]=De):De=e[67];let $e;e[68]!==Qe||e[69]!==De?($e=s.jsxs("div",{className:"space-y-2",children:[Qe,De]}),e[68]=Qe,e[69]=De,e[70]=$e):$e=e[70],de=$e;break e}se=Ie(L&&"cursor-grabbing"),e[47]=U,e[48]=i,e[49]=B,e[50]=C,e[51]=l,e[52]=m,e[53]=V,e[54]=pe,e[55]=be,e[56]=se}else pe=e[54],be=e[55],se=e[56];M=Nn,ge=P,Be=An,le=Je,ie=ye,he=Ee,q=Pn,Pe=J,te=Cn,Re="space-y-1",ze=B.map(L=>{const T=m[L.index];return T?s.jsx(Mi,{sortableId:L.id,section:T,raw:l[L.index],meta:_,decofile:x,selected:v===L.index,onSelect:()=>ue(L.index),onDelete:()=>R(L.index),onDuplicate:()=>H(L.index),onMakeReusable:()=>z(L.index),onToggleHidden:()=>I(L.index),onToggleLazy:()=>E(L.index),onAddVariant:()=>f(L.index),onDetach:()=>h(L.index)},L.id):null})}e[11]=U,e[12]=i,e[13]=x,e[14]=B,e[15]=J,e[16]=ye,e[17]=_,e[18]=C,e[19]=f,e[20]=R,e[21]=h,e[22]=H,e[23]=z,e[24]=b,e[25]=I,e[26]=E,e[27]=l,e[28]=m,e[29]=v,e[30]=P,e[31]=V,e[32]=q,e[33]=M,e[34]=pe,e[35]=be,e[36]=ze,e[37]=Pe,e[38]=te,e[39]=ge,e[40]=Be,e[41]=le,e[42]=ie,e[43]=he,e[44]=se,e[45]=de,e[46]=Re}else q=e[32],M=e[33],pe=e[34],be=e[35],ze=e[36],Pe=e[37],te=e[38],ge=e[39],Be=e[40],le=e[41],ie=e[42],he=e[43],se=e[44],de=e[45],Re=e[46];if(de!==Symbol.for("react.early_return_sentinel"))return de;let Ce;e[71]!==ze||e[72]!==Re?(Ce=s.jsx("div",{className:Re,children:ze}),e[71]=ze,e[72]=Re,e[73]=Ce):Ce=e[73];let ce;e[74]!==q||e[75]!==Pe||e[76]!==te||e[77]!==Ce?(ce=s.jsx(q,{items:Pe,strategy:te,children:Ce}),e[74]=q,e[75]=Pe,e[76]=te,e[77]=Ce,e[78]=ce):ce=e[78];let Ve;e[79]!==pe||e[80]!==be||e[81]!==x||e[82]!==_?(Ve=be?s.jsx("div",{className:Ie("cursor-grabbing shadow-lg ring-1 ring-border/60",Bn(be,!1)),children:s.jsx(Ln,{section:be,raw:pe,meta:_,decofile:x})}):null,e[79]=pe,e[80]=be,e[81]=x,e[82]=_,e[83]=Ve):Ve=e[83];let ve;e[84]!==Ve?(ve=cn.createPortal(s.jsx(Rn,{dropAnimation:hn,children:Ve}),document.body),e[84]=Ve,e[85]=ve):ve=e[85];let X;e[86]!==M||e[87]!==ge||e[88]!==Be||e[89]!==le||e[90]!==ie||e[91]!==he||e[92]!==ce||e[93]!==ve?(X=s.jsxs(M,{sensors:ge,collisionDetection:Be,onDragStart:le,onDragEnd:ie,onDragCancel:he,children:[ce,ve]}),e[86]=M,e[87]=ge,e[88]=Be,e[89]=le,e[90]=ie,e[91]=he,e[92]=ce,e[93]=ve,e[94]=X):X=e[94];const O=!i;let re;e[95]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(ks,{size:14}),e[95]=re):re=e[95];let xe;e[96]!==V?(xe=V("sectionsEditor.sectionList.addSectionButton"),e[96]=V,e[97]=xe):xe=e[97];let me;e[98]!==C||e[99]!==O||e[100]!==xe?(me=s.jsxs(at,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:O,onClick:C,children:[re,xe]}),e[98]=C,e[99]=O,e[100]=xe,e[101]=me):me=e[101];let Me;return e[102]!==se||e[103]!==X||e[104]!==me?(Me=s.jsxs("div",{className:se,children:[X,me]}),e[102]=se,e[103]=X,e[104]=me,e[105]=Me):Me=e[105],Me}function zi(d){return d.id}function an(d){const e=it.c(57),{open:o,initialName:l,autoLabel:m,isPending:_,onSubmit:x,onOpenChange:v}=d,b=_===void 0?!1:_,g=Ct(),[R,H]=w.useState(l),[z,I]=w.useState(o);o!==z&&(I(o),o&&H(l));let E;e[0]!==b||e[1]!==v?(E=Ne=>{!Ne&&!b&&v(!1)},e[0]=b,e[1]=v,e[2]=E):E=e[2];const f=E;let h;e[3]!==b||e[4]!==R||e[5]!==x?(h=async Ne=>{Ne.preventDefault(),!b&&await x(R.trim())},e[3]=b,e[4]=R,e[5]=x,e[6]=h):h=e[6];const C=h;let N;e[7]!==g?(N=g("sectionsEditor.variantRenameDialog.title"),e[7]=g,e[8]=N):N=e[8];let i;e[9]!==N?(i=s.jsx(Qo,{children:N}),e[9]=N,e[10]=i):i=e[10];let V;e[11]!==m||e[12]!==g?(V=g("sectionsEditor.variantRenameDialog.description",{fallback:m||g("sectionsEditor.variantRenameDialog.defaultFallback")}),e[11]=m,e[12]=g,e[13]=V):V=e[13];let c;e[14]!==V?(c=s.jsx(Zo,{children:V}),e[14]=V,e[15]=c):c=e[15];let B;e[16]!==i||e[17]!==c?(B=s.jsxs(Xo,{children:[i,c]}),e[16]=i,e[17]=c,e[18]=B):B=e[18];let F;e[19]!==g?(F=g("sectionsEditor.variantRenameDialog.nameLabel"),e[19]=g,e[20]=F):F=e[20];let U;e[21]!==F?(U=s.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:F}),e[21]=F,e[22]=U):U=e[22];let ae;e[23]===Symbol.for("react.memo_cache_sentinel")?(ae=Ne=>H(Ne.target.value),e[23]=ae):ae=e[23];let fe;e[24]!==m||e[25]!==b||e[26]!==R?(fe=s.jsx(ni,{id:"variant-rename-name",value:R,onChange:ae,placeholder:m,autoFocus:!0,disabled:b}),e[24]=m,e[25]=b,e[26]=R,e[27]=fe):fe=e[27];let oe;e[28]!==U||e[29]!==fe?(oe=s.jsxs("div",{className:"space-y-1.5 py-4",children:[U,fe]}),e[28]=U,e[29]=fe,e[30]=oe):oe=e[30];let u;e[31]!==v?(u=()=>v(!1),e[31]=v,e[32]=u):u=e[32];let D;e[33]!==g?(D=g("sectionsEditor.variantRenameDialog.cancel"),e[33]=g,e[34]=D):D=e[34];let ne;e[35]!==b||e[36]!==u||e[37]!==D?(ne=s.jsx(at,{type:"button",variant:"outline",onClick:u,disabled:b,children:D}),e[35]=b,e[36]=u,e[37]=D,e[38]=ne):ne=e[38];let k;e[39]!==b||e[40]!==g?(k=b?s.jsxs(s.Fragment,{children:[s.jsx(pn,{className:"size-3.5"}),g("sectionsEditor.variantRenameDialog.saving")]}):g("sectionsEditor.variantRenameDialog.save"),e[39]=b,e[40]=g,e[41]=k):k=e[41];let ke;e[42]!==b||e[43]!==k?(ke=s.jsx(at,{type:"submit",disabled:b,children:k}),e[42]=b,e[43]=k,e[44]=ke):ke=e[44];let P;e[45]!==ne||e[46]!==ke?(P=s.jsxs(ei,{children:[ne,ke]}),e[45]=ne,e[46]=ke,e[47]=P):P=e[47];let Te;e[48]!==C||e[49]!==oe||e[50]!==P||e[51]!==B?(Te=s.jsx(ti,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:C,children:[B,oe,P]})}),e[48]=C,e[49]=oe,e[50]=P,e[51]=B,e[52]=Te):Te=e[52];let J;return e[53]!==f||e[54]!==o||e[55]!==Te?(J=s.jsx(si,{open:o,onOpenChange:f,children:Te}),e[53]=f,e[54]=o,e[55]=Te,e[56]=J):J=e[56],J}function Ts(d){const e=it.c(5),{rule:o,matchers:l}=d,m=o?.__resolveType??"";let _;if(e[0]!==l||e[1]!==m){const g=l.find(R=>R.resolveType===m)?.iconName??no(m);_=Go(g),e[0]=l,e[1]=m,e[2]=_}else _=e[2];const x=_;if(!x)return null;let v;return e[3]!==x?(v=s.jsx(x,{size:14,className:"shrink-0"}),e[3]=x,e[4]=v):v=e[4],v}function on(d){return d.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
2
2
|
`)}function rn(d){return d.map((e,o)=>({id:crypto.randomUUID(),index:o,variant:e}))}function $i(d,e){const o=new Map;for(const l of d){const m=o.get(l.variant.label);m?m.push(l):o.set(l.variant.label,[l])}return e.map((l,m)=>({id:o.get(l.label)?.shift()?.id??crypto.randomUUID(),index:m,variant:l}))}function Hi(d){return d.map((e,o)=>({...e,index:o}))}function In(d){const e=it.c(19),{label:o,effectiveRule:l,matchers:m,canDelete:_,dragging:x,onRename:v,onDuplicate:b,onDelete:g}=d,R=Ct(),H=os();let z;e[0]!==H||e[1]!==x||e[2]!==l||e[3]!==m?(z=H?s.jsxs("span",{className:"relative size-4 shrink-0",children:[s.jsx("span",{className:Ie("absolute inset-0 flex items-center justify-center transition-opacity",x?"opacity-0":"group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"),children:s.jsx(Ts,{rule:l,matchers:m})}),s.jsx(ws,{"aria-hidden":!0,className:Ie("absolute inset-0 size-4 transition-opacity",x?"opacity-100":"opacity-0 group-hover:opacity-100 group-has-[:focus-visible]:opacity-100")})]}):s.jsx(Ts,{rule:l,matchers:m}),e[0]=H,e[1]=x,e[2]=l,e[3]=m,e[4]=z):z=e[4];let I;e[5]!==o?(I=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:o}),e[5]=o,e[6]=I):I=e[6];let E;e[7]!==_||e[8]!==x||e[9]!==o||e[10]!==g||e[11]!==b||e[12]!==v||e[13]!==R?(E=!x&&s.jsxs(dn,{children:[s.jsx(un,{asChild:!0,children:s.jsx(at,{type:"button",variant:"ghost",size:"icon","aria-label":R("sectionsEditor.pageVariantTabs.actionsAriaLabel",{label:o}),className:"size-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100",onClick:qi,onPointerDown:Ui,children:s.jsx(mn,{size:14})})}),s.jsxs(fn,{align:"end",className:"w-36",children:[s.jsxs(vt,{onClick:h=>{h.stopPropagation(),v?.()},children:[s.jsx(yi,{size:14}),R("sectionsEditor.pageVariantTabs.renameAction")]}),s.jsxs(vt,{onClick:h=>{h.stopPropagation(),b?.()},children:[s.jsx(xn,{size:14}),R("sectionsEditor.pageVariantTabs.duplicateAction")]}),s.jsx(qa,{}),s.jsxs(vt,{variant:"destructive",disabled:!_,onClick:h=>{h.stopPropagation(),g?.()},children:[s.jsx(jn,{size:14}),R("sectionsEditor.pageVariantTabs.deleteAction")]})]})]}),e[7]=_,e[8]=x,e[9]=o,e[10]=g,e[11]=b,e[12]=v,e[13]=R,e[14]=E):E=e[14];let f;return e[15]!==z||e[16]!==I||e[17]!==E?(f=s.jsxs(s.Fragment,{children:[z,I,E]}),e[15]=z,e[16]=I,e[17]=E,e[18]=f):f=e[18],f}function Ui(d){return d.stopPropagation()}function qi(d){return d.stopPropagation()}function Gi(d){const e=it.c(33),{entry:o,isActive:l,canDelete:m,decofile:_,meta:x,matchers:v,onSelect:b,onRename:g,onDuplicate:R,onDelete:H}=d;let z;e[0]!==o.id?(z={id:o.id,animateLayoutChanges:Wi},e[0]=o.id,e[1]=z):z=e[1];const{attributes:I,listeners:E,setNodeRef:f,transform:h,isDragging:C}=Tn(z);let N;e[2]!==h?(N=Vn.Transform.toString(h?{...h,x:0}:null),e[2]=h,e[3]=N):N=e[3];const i=C?0:void 0;let V;e[4]!==N||e[5]!==i?(V={transform:N,opacity:i},e[4]=N,e[5]=i,e[6]=V):V=e[6];const c=V,B=x??void 0;let F;e[7]!==_||e[8]!==o.variant.rule||e[9]!==B?(F=Ft(o.variant.rule,_,B),e[7]=_,e[8]=o.variant.rule,e[9]=B,e[10]=F):F=e[10];const U=F;let ae;e[11]!==b?(ae=k=>{k.target===k.currentTarget&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),b())},e[11]=b,e[12]=ae):ae=e[12];const fe=C?"cursor-grabbing":"cursor-pointer active:cursor-grabbing",oe=l?Sn:vn;let u;e[13]!==fe||e[14]!==oe?(u=Ie("group flex select-none items-center gap-2 rounded-md px-2 py-2.5 transition-colors touch-none",fe,oe),e[13]=fe,e[14]=oe,e[15]=u):u=e[15];let D;e[16]!==m||e[17]!==U||e[18]!==o.variant.label||e[19]!==v||e[20]!==H||e[21]!==R||e[22]!==g?(D=s.jsx(In,{label:o.variant.label,effectiveRule:U,matchers:v,canDelete:m,onRename:g,onDuplicate:R,onDelete:H}),e[16]=m,e[17]=U,e[18]=o.variant.label,e[19]=v,e[20]=H,e[21]=R,e[22]=g,e[23]=D):D=e[23];let ne;return e[24]!==I||e[25]!==E||e[26]!==b||e[27]!==f||e[28]!==c||e[29]!==u||e[30]!==D||e[31]!==ae?(ne=s.jsx("div",{ref:f,style:c,...I,...E,onClick:b,onKeyDown:ae,className:u,children:D}),e[24]=I,e[25]=E,e[26]=b,e[27]=f,e[28]=c,e[29]=u,e[30]=D,e[31]=ae,e[32]=ne):ne=e[32],ne}function Wi(){return!1}function Yi(d){const e=it.c(9),{variant:o,decofile:l,meta:m,matchers:_}=d,x=m??void 0;let v;e[0]!==l||e[1]!==x||e[2]!==o.rule?(v=Ft(o.rule,l,x),e[0]=l,e[1]=x,e[2]=o.rule,e[3]=v):v=e[3];const b=v;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=Ie("flex items-center gap-2 rounded-md px-2 py-2.5 shadow-lg ring-1 ring-border/60 cursor-grabbing",Sn),e[4]=g):g=e[4];let R;return e[5]!==b||e[6]!==_||e[7]!==o.label?(R=s.jsx("div",{className:g,children:s.jsx(In,{label:o.label,effectiveRule:b,matchers:_,canDelete:!1,dragging:!0})}),e[5]=b,e[6]=_,e[7]=o.label,e[8]=R):R=e[8],R}function Ji(d){const e=it.c(91),{listKey:o,variants:l,activeIndex:m,decofile:_,meta:x,matchers:v,onSelect:b,onReorder:g,onRename:R,onDuplicate:H,onDelete:z,onAdd:I}=d,E=Ct();let f;e[0]!==l?(f=()=>rn(l),e[0]=l,e[1]=f):f=e[1];const[h,C]=w.useState(f),[N,i]=w.useState(null),[V,c]=w.useState(o),[B,F]=w.useState(l.length);let U;e[2]!==l?(U=()=>on(l),e[2]=l,e[3]=U):U=e[3];const[ae,fe]=w.useState(U),oe=w.useRef(!1),u=on(l);V!==o?(c(o),F(l.length),fe(u),C(rn(l))):(B!==l.length||ae!==u)&&(F(l.length),fe(u),C(ve=>$i(ve,l)));let D;e[4]===Symbol.for("react.memo_cache_sentinel")?(D={activationConstraint:{distance:8}},e[4]=D):D=e[4];let ne;e[5]===Symbol.for("react.memo_cache_sentinel")?(ne={coordinateGetter:Dn},e[5]=ne):ne=e[5];const k=En(as(kn,D),as(wn,ne));let ke;e[6]!==h?(ke=h.map(Qi),e[6]=h,e[7]=ke):ke=e[7];const P=ke,Te=l.length>1;let J;e[8]!==h?(J=ve=>{const X=String(ve.active.id);i(h.find(O=>O.id===X)??null)},e[8]=h,e[9]=J):J=e[9];const Ne=J;let Je;e[10]!==P||e[11]!==g?(Je=ve=>{i(null);const{active:X,over:O}=ve;if(!O||X.id===O.id)return;const re=P.indexOf(String(X.id)),xe=P.indexOf(String(O.id));re===-1||xe===-1||(C(me=>Hi(zt([...me],re,xe))),oe.current=!0,requestAnimationFrame(()=>{oe.current=!1}),g(re,xe))},e[10]=P,e[11]=g,e[12]=Je):Je=e[12];const Ue=Je;let ye;e[13]===Symbol.for("react.memo_cache_sentinel")?(ye=()=>{i(null)},e[13]=ye):ye=e[13];const Ae=ye;let Ee,q,M,pe,be,ze,Pe,te,ge,Be,le,ie,he;if(e[14]!==m||e[15]!==Te||e[16]!==_||e[17]!==h||e[18]!==P||e[19]!==Ue||e[20]!==Ne||e[21]!==v||e[22]!==x||e[23]!==I||e[24]!==z||e[25]!==H||e[26]!==R||e[27]!==b||e[28]!==k||e[29]!==E){const ve=T=>{oe.current||b(T)};le="space-y-1 border-b p-2";let X;e[43]!==E?(X=E("sectionsEditor.pageVariantTabs.variantsLabel"),e[43]=E,e[44]=X):X=e[44];let O;e[45]!==X?(O=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:X}),e[45]=X,e[46]=O):O=e[46];let re;e[47]!==E?(re=E("sectionsEditor.pageVariantTabs.addVariantAriaLabel"),e[47]=E,e[48]=re):re=e[48];let xe;e[49]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(ks,{size:14}),e[49]=xe):xe=e[49];let me;e[50]!==I||e[51]!==re?(me=s.jsx(At,{asChild:!0,children:s.jsx(at,{type:"button",variant:"ghost",size:"icon","aria-label":re,className:"size-6",onClick:I,children:xe})}),e[50]=I,e[51]=re,e[52]=me):me=e[52];let Me;e[53]!==E?(Me=E("sectionsEditor.pageVariantTabs.addVariantTooltip"),e[53]=E,e[54]=Me):Me=e[54];let ue;e[55]!==Me?(ue=s.jsx(Pt,{children:Me}),e[55]=Me,e[56]=ue):ue=e[56];let L;e[57]!==me||e[58]!==ue?(L=s.jsxs(Nt,{children:[me,ue]}),e[57]=me,e[58]=ue,e[59]=L):L=e[59],e[60]!==O||e[61]!==L?(ie=s.jsxs("div",{className:"flex items-center justify-between",children:[O,L]}),e[60]=O,e[61]=L,e[62]=ie):ie=e[62],q=Nn,ze=k,Pe=An,te=Ne,ge=Ue,Be=Ae,Ee=Pn,pe=P,be=Cn,he="space-y-0.5",M=h.map(T=>s.jsx(Gi,{entry:T,isActive:T.index===m,canDelete:Te,decofile:_,meta:x,matchers:v,onSelect:()=>ve(T.index),onRename:()=>R(T.index),onDuplicate:()=>H(T.index),onDelete:()=>z(T.index)},T.id)),e[14]=m,e[15]=Te,e[16]=_,e[17]=h,e[18]=P,e[19]=Ue,e[20]=Ne,e[21]=v,e[22]=x,e[23]=I,e[24]=z,e[25]=H,e[26]=R,e[27]=b,e[28]=k,e[29]=E,e[30]=Ee,e[31]=q,e[32]=M,e[33]=pe,e[34]=be,e[35]=ze,e[36]=Pe,e[37]=te,e[38]=ge,e[39]=Be,e[40]=le,e[41]=ie,e[42]=he}else Ee=e[30],q=e[31],M=e[32],pe=e[33],be=e[34],ze=e[35],Pe=e[36],te=e[37],ge=e[38],Be=e[39],le=e[40],ie=e[41],he=e[42];let se;e[63]!==M||e[64]!==he?(se=s.jsx("div",{className:he,children:M}),e[63]=M,e[64]=he,e[65]=se):se=e[65];let de;e[66]!==Ee||e[67]!==pe||e[68]!==be||e[69]!==se?(de=s.jsx(Ee,{items:pe,strategy:be,children:se}),e[66]=Ee,e[67]=pe,e[68]=be,e[69]=se,e[70]=de):de=e[70];let Re;e[71]!==N||e[72]!==_||e[73]!==v||e[74]!==x?(Re=N?s.jsx(Yi,{variant:N.variant,decofile:_,meta:x,matchers:v}):null,e[71]=N,e[72]=_,e[73]=v,e[74]=x,e[75]=Re):Re=e[75];let Ce;e[76]!==Re?(Ce=cn.createPortal(s.jsx(Rn,{dropAnimation:hn,children:Re}),document.body),e[76]=Re,e[77]=Ce):Ce=e[77];let ce;e[78]!==q||e[79]!==ze||e[80]!==Pe||e[81]!==te||e[82]!==ge||e[83]!==Be||e[84]!==de||e[85]!==Ce?(ce=s.jsxs(q,{sensors:ze,collisionDetection:Pe,onDragStart:te,onDragEnd:ge,onDragCancel:Be,children:[de,Ce]}),e[78]=q,e[79]=ze,e[80]=Pe,e[81]=te,e[82]=ge,e[83]=Be,e[84]=de,e[85]=Ce,e[86]=ce):ce=e[86];let Ve;return e[87]!==le||e[88]!==ie||e[89]!==ce?(Ve=s.jsxs("div",{className:le,children:[ie,ce]}),e[87]=le,e[88]=ie,e[89]=ce,e[90]=Ve):Ve=e[90],Ve}function Qi(d){return d.id}function ln(d){const e=it.c(21),{currentRt:o,currentLabel:l,currentGlobalKey:m,matchers:_,globals:x,onSelect:v,onSelectGlobal:b,schema:g,formValue:R,onChange:H,formKey:z,formWrapperClassName:I,meta:E,decofile:f,onSaveReferencedBlock:h,sandbox:C}=d;let N;e[0]!==m||e[1]!==l||e[2]!==o||e[3]!==x||e[4]!==_||e[5]!==v||e[6]!==b?(N=s.jsx(ao,{currentRt:o,currentLabel:l,currentGlobalKey:m,matchers:_,globals:x,onSelect:v,onSelectGlobal:b}),e[0]=m,e[1]=l,e[2]=o,e[3]=x,e[4]=_,e[5]=v,e[6]=b,e[7]=N):N=e[7];let i;e[8]!==f||e[9]!==z||e[10]!==R||e[11]!==I||e[12]!==E||e[13]!==H||e[14]!==h||e[15]!==C||e[16]!==g?(i=g&&R&&s.jsx("div",{className:I,children:s.jsx(oo,{schema:g,value:R,onChange:H,meta:E,decofile:f,onSaveReferencedBlock:h,sandbox:C},z)}),e[8]=f,e[9]=z,e[10]=R,e[11]=I,e[12]=E,e[13]=H,e[14]=h,e[15]=C,e[16]=g,e[17]=i):i=e[17];let V;return e[18]!==N||e[19]!==i?(V=s.jsxs(s.Fragment,{children:[N,i]}),e[18]=N,e[19]=i,e[20]=V):V=e[20],V}function wc({orgSlug:d,virtualMcpId:e,branch:o,previewReady:l=!0,previewUrl:m,currentPath:_,activePageBlockKey:x=null,activeGlobalBlockKey:v=null,externalSelection:b,onSaved:g,initialEditSeo:R=!1,onExitSeo:H,onSelectRoot:z,onViewJsonFile:I,onVariantPreviewOverride:E}){const f=Ct(),h=Ya(),C=h?.taskId??null,N=l?{orgSlug:d,virtualMcpId:e,branch:o,threadId:C,previewUrl:m}:null,{data:i,isLoading:V}=io(N),{data:c,isLoading:B}=ro(N),F=os(),U=h?.virtualMcpId,fe=$o(U===e?e:null)?.metadata?.siteSlug??null,oe=bi({virtualMcpId:e,sandboxUrl:m}),[u,D]=w.useState(null),[ne,k]=w.useState(null),[ke,P]=w.useState(null),[Te,J]=w.useState(0),[Ne,Je]=w.useState(void 0),[Ue,ye]=w.useState(null),[Ae,Ee]=w.useState(null),[q,M]=w.useState([]),pe=w.useRef(null),[be,ze]=w.useState(q.length);be!==q.length&&(ze(q.length),requestAnimationFrame(()=>{pe.current&&(pe.current.scrollTop=0)}));const[Pe,te]=w.useState(0),[ge,Be]=w.useState(null),[le,ie]=w.useState(null),[he,se]=w.useState(null),[de,Re]=w.useState(!0),[Ce,ce]=w.useState(!1),[Ve,ve]=w.useState(!1),X=w.useRef(null),[O,re]=w.useState(R),[xe,me]=w.useState(R);R&&!xe&&(me(!0),re(!0),D(null),k(null),P(null),M([])),!R&&xe&&me(!1);const[Me,ue]=w.useState(null),[L,T]=w.useState(void 0),[Qe,Ge]=w.useState([]),[mt,Ze]=w.useState(0),[De,$e]=w.useState(0),[On,qe]=w.useState(null),[jt,We]=w.useState(null),[Vs,Ds]=w.useState(null),Fn=Ga(),zn=`${d}/${e}/${o}`,$t=lo({orgSlug:d,virtualMcpId:e,branch:o}),[$n,Hn]=w.useState(_),[Un,qn]=w.useState(x),[Gn,Wn]=w.useState(v);($n!==_||Un!==x||Gn!==v)&&(queueMicrotask(()=>$t.flush()),Hn(_),qn(x),Wn(v),D(null),k(null),P(null),J(0),ye(null),Ee(null),$e(0),qe(null),We(null),M([]),te(t=>t+1),re(!1),ue(null),T(void 0),Ge([]),Ze(t=>t+1));const we=co({orgSlug:d,virtualMcpId:e,branch:o}),Ht=Po((t,n)=>{we.mutate({blockKey:t,data:n},{onSuccess:()=>g?.(),onError:a=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:a.message}))})}),is=oi({orgSlug:d,virtualMcpId:e,branch:o}),[Mt,Ut]=w.useState(!1),Oe=w.useRef(null),rt=w.useRef(null),lt=w.useRef(null),rs=w.useRef({}),tt=w.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Yn,Jn]=w.useState(null);if(!l||V||B)return s.jsx("div",{className:"h-full w-full flex items-center justify-center",children:s.jsx(pn,{className:"size-5 text-muted-foreground"})});if(!i||!c)return s.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const Qn=li(i),_e=!!v,Ye=_e?null:ci(Qn,_,x),j=_e?v:Ye?.key??null,ls=_e&&v?i[v]:void 0,Ns=_e&&v&&ls?ui(v,ls):_e&&v?v:"",qt=!_e&&j&&i[j]?i[j]:null,cs=O&&i&&c&&j&&Ye?Gs(i,{kind:"page",pageKey:j,pageName:String(Ye.name??""),path:String(Ye.path??"")},c):null,Zn=O?qt?.seo:void 0,us=L!==void 0?L:Zn,Xn=O?uo(us):void 0,ea=cs?.seoTypeOptions??[],ta=O&&c?mo(c):"",As=Me??Xn??{},ds=O&&cs?hi(As,cs):null,sa=O&&ds&&fo(us)?ns(ds,c):null,na=O?po(i,c)?.seoData:void 0,He=_e?[{label:"Default",sections:[{__resolveType:v}]}]:go(qt?.sections,i??{}),Et=He.length>1,Ke=Math.min(Te,He.length-1),ct=He[Ke],Y=ct?.sections??[],Fe=Xt(Y,i),ms=!_e&&ho(qt?.sections);if(_e&&v&&Vs!==v){Ds(v);const t=Y[0],n=Fe[0];if(t&&n){D(0),$e(0),M([]);const a=xt(t,n,i);a&&(k(a.data),P(a.resolveType),We(null),qe(null))}}!_e&&Vs!==null&&Ds(null),tt.current={rawSections:Y,parsedSections:Fe,decofile:i??{},activePageKey:j,pageVariants:He,variantIndex:Ke,sectionVariantIndex:De,selectedSectionIndex:u};const aa=()=>({multivariate:ms,index:Ke,variants:He.map(t=>({rule:t.rule}))}),fs=(t,n)=>{if(!E)return;if(!j||!ms||t.length<=1){E(null);return}const a=sn(j,{multivariate:!0,index:n,variants:t},i,c);E(a.length>0?a:null)},ps=E&&j&&ms&&Et&&!V&&!B?j:null;if(ps!==Yn&&(Jn(ps),ps)){const t=He.map(a=>({rule:a.rule})),n=Ke;queueMicrotask(()=>fs(t,n))}const Rt=(t,n,a)=>{if(!E)return;if(!j){E(null);return}const r=aa(),p=sn(j,r,i,c);if(!t||n<0){E(p.length>0?p:null);return}const y=_i({pageKey:j,page:r,sectionIndex:n,sectionLazy:Fe[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:i,meta:c}),S=[...p,...y];E(S.length>0?S:null)},ft=(t,n,a,r=u??-1,p=!1)=>{const y=ot(t,n);if(!y){k(null),P(null),We(null),qe(null),p&&Rt(null,r,a);return}const A=Ws(y,ht)[a];if(!A){k(null),P(null),We(null),qe(null),p&&Rt(null,r,a);return}const ee=Eo(A.value,i);k(ee?.data??null),P(ee?.resolveType??null);const{resolveType:K,formValue:$}=Bt(A.rule,i,c??void 0);We(K),qe($),p&&Rt(y,r,a)},Kt=b?.index;if(b!==void 0&&(b?.seq??null)!==Ne&&(Je(b?.seq??null),typeof Kt=="number")){const t=Y[Kt],n=Fe[Kt];if(t&&n)if(D(Kt),$e(0),M([]),te(a=>a+1),n.isMultivariate)ft(t,n,0,Kt);else{const a=xt(t,n,i);a?(k(a.data),P(a.resolveType)):(k(null),P(null)),We(null),qe(null)}}const Gt={orgSlug:d,virtualMcpId:e,branch:o,threadId:C,previewUrl:m??void 0,siteSlug:fe},gs=ke&&c?ns(ke,c):null,Xe=(t,n)=>{if(!j)return;Oe.current&&(clearTimeout(Oe.current),Oe.current=null),lt.current&&(clearTimeout(lt.current),lt.current=null),rt.current&&(clearTimeout(rt.current),rt.current=null);const a=Ot(i,j,t,Ke,He);we.mutate({blockKey:j,data:a},{onSuccess:()=>n?.onSuccess?.()??g?.(),onError:r=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:r.message}))})},wt=()=>{D(null),k(null),P(null),$e(0),qe(null),We(null),M([]),te(t=>t+1)},oa=(t,n)=>{Oe.current&&clearTimeout(Oe.current);const a=tt.current.sectionVariantIndex;Oe.current=setTimeout(()=>{const{rawSections:r,parsedSections:p,decofile:y,activePageKey:S,pageVariants:A,variantIndex:ee}=tt.current,K=r[n];if(!K)return;const $=p[n];if(!$)return;if($.isSavedBlock){const W=Io(K,$);if(!W)return;we.mutate({blockKey:W,data:t},{onSuccess:()=>g?.(),onError:Q=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:Q.message}))});return}if(!S)return;const G={...y[S]},je=[...r];if($.isMultivariate){const W=ot(K,$);if(!W||!S)return;const Q=Oo(W,a,t);je[n]=_t(K,$,Q)}else if($.isHidden){const W=bn(K.__resolveType),Q=W?{...K.section}:{...K},Le=Array.isArray(Q.variants)?[...Q.variants]:[];Le[0]&&(Le[0]={...Le[0],value:t}),Q.variants=Le,W?je[n]={...K,section:Q}:je[n]=Q}else $.isLazy?je[n]={...K,section:t}:je[n]=t;if(A.length>1){const W=G.sections,Q=[...W?.variants??[]];Q[ee]&&(Q[ee]={...Q[ee],value:je}),G.sections={...W,variants:Q}}else G.sections=je;we.mutate({blockKey:S,data:G},{onSuccess:()=>g?.(),onError:W=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:W.message}))})},js)},ia=t=>{D(t),$e(0),M([]),te(p=>p+1);const n=Y[t],a=Fe[t];if(!n||!a)return;if(a.isMultivariate){ft(n,a,0,t);return}const r=xt(n,a,i);if(!r){k(null),P(null),We(null),qe(null),Rt(null,t,0);return}k(r.data),P(r.resolveType),We(null),qe(null),Rt(null,t,0)},Ps=t=>{const n=t;k(n),u!==null&&oa(n,u)},hs=t=>{if(!j||!i||!c||!Ye)return;const n={kind:"page",pageKey:j,pageName:String(Ye.name??""),path:String(Ye.path??"")},a=Gs(i,n,c);a&&$t.save(j,()=>{const r=Fn.getQueryData(Wa.decofile(zn))?.[j];if(!r||typeof r!="object"||r===null||Array.isArray(r))return null;const p={...r,...rs.current};return rs.current={},t?.raw!==void 0?{...p,seo:t.raw}:t?.inner!==void 0?Si(n,a,p,t.inner):p})},ra=(t,n)=>{j&&(rs.current[t]=n,hs())},la=(t,n)=>{if(!j)return;const a=zt([...Y],t,n);u!==null&&(u===t?D(n):t<u&&n>=u?D(u-1):t>u&&n<=u&&D(u+1)),Xe(a)},ca=t=>{if(!j)return;const n=Y.filter((a,r)=>r!==t);u===t?wt():u!==null&&u>t&&D(u-1),Xe(n)},ua=t=>{if(!j)return;const n=Y[t];if(!n)return;const a=[...Y];a.splice(t+1,0,Lo(n)),u!==null&&u>t&&D(u+1),Xe(a)},da=t=>{if(!j)return;const n=Y[t],a=Fe[t];if(!n||!a)return;const r=a.isHidden?Mo(n):Ko(n);if(!r)return;const p=[...Y];p[t]=r,u===t&&wt(),Xe(p)},ma=t=>{if(!j)return;const n=Y[t],a=Fe[t];if(!n||!a||a.isMultivariate)return;const r=Co(n);if(!r)return;const p=[...Y];p[t]=r,u===t&&wt(),Xe(p)},fa=t=>{if(!j)return;const n=Y[t],a=Fe[t];if(!n||!a?.isSavedBlock)return;const r=xt(n,a,i);if(!r?.data)return;const{name:p,...y}=r.data,S=[...Y];a.isLazy?S[t]={...n,section:y}:S[t]=y,u===t&&wt(),Xe(S)},pa=t=>{if(!j)return;const n=[...Y,{__resolveType:t.resolveType}],a=n.length-1;Xe(n,{onSuccess:()=>{ce(!1),D(a),$e(0),M([]),te(S=>S+1);const r=n[a],p=Xt(n,i)[a];if(!r||!p)return;if(p.isMultivariate){ft(r,p,0);return}const y=xt(r,p,i);if(!y){k(null),P(null),We(null),qe(null);return}k(y.data),P(y.resolveType),We(null),qe(null)}})},Cs=t=>{X.current=t.append,ce(!0)},ga=t=>{const n=X.current;if(!n){pa(t);return}n({__resolveType:t.resolveType}),ce(!1),X.current=null},ha=t=>{if(u===null)return;const n=Y[u],a=Fe[u];!n||!a?.isMultivariate||($e(t),M([]),te(r=>r+1),ft(n,a,t,u,!0))},va=t=>{if(u===null||!j)return;const n=Y[u],a=Fe[u];if(!n||!a?.isMultivariate)return;const r=ot(n,a);if(!r)return;const p=No(r,t);if(!p){Z.error(f("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const y=[...Y];y[u]=_t(n,a,p);const S=p.variants;let A=De;t===De?A=Math.min(t,S.length-1):t<De&&(A=De-1),$e(A),M([]),te(ee=>ee+1),ft(y[u],a,A),Xe(y)},Sa=t=>{if(u===null||!j)return;const n=Y[u],a=Fe[u];if(!n||!a?.isMultivariate)return;const r=ot(n,a);if(!r)return;const p=Ao(r,t),y=[...Y];y[u]=_t(n,a,p);const S=t+1;$e(S),M([]),te(A=>A+1),ft(y[u],a,S),Xe(y)},ya=(t,n)=>{if(u===null||!j||t===n)return;const a=Y[u],r=Fe[u];if(!a||!r?.isMultivariate)return;const p=ot(a,r);if(!p)return;const y=Vo(p,t,n),S=[...Y];S[u]=_t(a,r,y);let A=De;De===t?A=n:t<De&&n>=De?A=De-1:t>De&&n<=De&&(A=De+1),$e(A),ft(S[u],r,A),Xe(S)},vs=t=>{const n=t??u;if(n===null||!j)return;const a=Y[n],r=Fe[n];if(!a||!r)return;const p=wo(a,r);if(!p){Z.error(f("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const y=[...Y];y[n]=p.section;const S=Xt(y,i)[n];if(!S?.isMultivariate){Z.error(f("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}D(n),$e(p.newVariantIndex),M([]),te(A=>A+1),ft(p.section,S,p.newVariantIndex,n),Xe(y)},ba=()=>{if(u===null||!j)return;const t=Y[u],n=Fe[u];if(!t||!n?.isMultivariate)return;const a=ot(t,n);if(!a)return;const r=Do(t,n,a);if(!r){Z.error(f("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const p=[...Y];p[u]=r;const y=Xt(p,i)[u];if(!y)return;$e(0),We(null),qe(null),M([]),te(A=>A+1);const S=xt(r,y,i);S?(k(S.data),P(S.resolveType)):(k(null),P(null)),Rt(null,u,0),Xe(p)},xa=async t=>{if(ge===null||!j)return;const n=_s(t,i);if(n){Z.error(n);return}const a=Y[ge],r=Fe[ge];if(!a||!r)return;const p=xt(a,r,i);if(!p){Z.error(f("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const y={...p.data,name:t};try{await we.mutateAsync({blockKey:t,data:y});const S=[...Y];S[ge]={__resolveType:t},await we.mutateAsync({blockKey:j,data:Ot(i,j,S,Ke,He)}),u===ge&&wt(),Be(null),Z.success(f("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),g?.()}catch(S){Z.error(S instanceof Error?S.message:f("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"))}},Ms=ct?.rule;if(Et&&u===null&&Ae===null&&Ms){const{resolveType:t,formValue:n}=Bt(Ms,i??{},c??void 0);Ee(t),ye(n)}const Wt=c?vo(c):[],Ks=c&&i?So(c,i):[],_a=!_e&&!!(oe&&c&&i),ja=Ae&&c?ns(Ae,c):null,kt=()=>{rt.current&&(clearTimeout(rt.current),rt.current=null),lt.current&&(clearTimeout(lt.current),lt.current=null)},Lt=async(t,n)=>{if(!(Bo(n,t,c)>0))try{await is.mutateAsync({blockKey:t})}catch(a){Z.error(a instanceof Error?a.message:f("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"))}},Ls=t=>{rt.current&&clearTimeout(rt.current),rt.current=setTimeout(()=>{const{activePageKey:n,decofile:a,variantIndex:r}=tt.current;if(!n)return;const p={...a[n]},y={...p.sections},S=[...y.variants??[]],A=S[r],ee=A?.rule;if(Vt(ee,a,c)){const K=ee?.__resolveType??"",$=a[K],G=typeof $?.name=="string"?$.name:K,{__resolveType:je,...W}=t;we.mutate({blockKey:K,data:Dt(je??"",W,G)},{onSuccess:()=>g?.(),onError:Q=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:Q.message}))});return}A&&(S[r]={...A,rule:t}),p.sections={...y,variants:S},we.mutate({blockKey:n,data:p},{onSuccess:()=>g?.(),onError:K=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:K.message}))})},js)},Ea=t=>{Ee(t);const n=t?Zs(t,c):{__resolveType:tn};ye(t?n:{}),Ls(n)},Ra=t=>{const n=t;ye(n);const a=Ae?{__resolveType:Ae,...n}:{...n};Ls(a)},wa=async t=>{kt();const{activePageKey:n,decofile:a,variantIndex:r}=tt.current;if(!n)return;const p=a[n],y=p?.sections;if(!y||typeof y!="object"||Array.isArray(y))return;const S=y;if(!Array.isArray(S.variants))return;const A=[...S.variants],ee=A[r];if(!ee)return;const K=It(ee.rule,a,c),$=ts(t);A[r]={...ee,rule:$};const G={...a,[n]:{...p,sections:{...S,variants:A}}},{resolveType:je,formValue:W}=Bt($,G,c??void 0);Ee(je),ye(W);try{await we.mutateAsync({blockKey:n,data:G[n]}),K&&K!==t&&await Lt(K,G),g?.()}catch(Q){Z.error(Q instanceof Error?Q.message:f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}},Bs=t=>{lt.current&&clearTimeout(lt.current);const{selectedSectionIndex:n,sectionVariantIndex:a}=tt.current;n!==null&&(lt.current=setTimeout(()=>{const{rawSections:r,parsedSections:p,decofile:y,activePageKey:S,pageVariants:A,variantIndex:ee}=tt.current;if(!S)return;const K=r[n],$=p[n];if(!K||!$?.isMultivariate)return;const G=ot(K,$);if(!G)return;const W=(G.variants??[])[a]?.rule;if(Vt(W,y,c)){const Se=W?.__resolveType??"",et=y[Se],ut=typeof et?.name=="string"?et.name:Se,{__resolveType:pt,...dt}=t;we.mutate({blockKey:Se,data:Dt(pt??"",dt,ut)},{onSuccess:()=>g?.(),onError:gt=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:gt.message}))});return}const Q=Qs(G,a,t),Le=[...r];Le[n]=_t(K,$,Q);const nt=Ot(y,S,Le,ee,A);we.mutate({blockKey:S,data:nt},{onSuccess:()=>g?.(),onError:Se=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:Se.message}))})},js))},ka=t=>{We(t);const n=t?Zs(t,c):{__resolveType:tn};qe(t?n:{}),Bs(n)},Ta=t=>{const n=t;qe(n);const a=jt?{__resolveType:jt,...n}:{...n};Bs(a)},Va=async t=>{kt();const{selectedSectionIndex:n,sectionVariantIndex:a,rawSections:r,parsedSections:p,decofile:y,activePageKey:S,pageVariants:A,variantIndex:ee}=tt.current;if(n===null||!S)return;const K=r[n],$=p[n];if(!K||!$?.isMultivariate)return;const G=ot(K,$);if(!G)return;const je=G.variants??[],W=It(je[a]?.rule,y,c),Q=ts(t),Le=Qs(G,a,Q),nt=[...r];nt[n]=_t(K,$,Le);const Se=Ot(y,S,nt,ee,A),et={...y,[S]:Se},{resolveType:ut,formValue:pt}=Bt(Q,et,c??void 0);We(ut),qe(pt);try{await we.mutateAsync({blockKey:S,data:Se}),W&&W!==t&&await Lt(W,et),g?.()}catch(dt){Z.error(dt instanceof Error?dt.message:f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}};if(!_e&&!Ye)return s.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.noPageFound",{currentPath:_})});if(_e&&!ls)return s.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.globalBlockNotFound")});const st=u!==null?Fe[u]??null:null,Is=u!==null?Y[u]:null,Os=Is&&st?.isMultivariate?ot(Is,st):null,St=Os?Ws(Os,ht):[],Ss=Math.min(De,Math.max(St.length-1,0)),Tt=St[Ss]??null,yt=st?.isMultivariate===!0,Fs=u!==null&&st!==null,Yt=Fs&&(yt||!!(gs&&ne)),Da=Yt&&!_e&&st?.isSavedBlock===!0,bt=_e||Da,Na=_e?Ns:st?.label??"",Aa=jt&&c?ns(jt,c):null,Jt=Yt&&(!_e||q.length>0)?_e?[Ns,...q]:[Ye.name,...yt&&Tt?F?[`${st.variantOf??st.label} · ${Tt.label}`]:[st.label,Tt.label]:[st.label],...q]:[],zs=O&&Ye?[Ye.name,"SEO",...Qe]:[],Qt=zs.length>0?zs:bt?Jt.length>0?Jt:[Na]:Jt.length>0?Jt:[Ye.name],$s=Fs&&!yt&&!st?.isHidden&&!!j,Pa=bt||!_e&&Et&&!!ct||$s,Ca=!F&&!O&&!_e&&yt&&q.length===0,Hs=()=>{if(!j)return;kt(),Oe.current&&(clearTimeout(Oe.current),Oe.current=null);const t=i[j],n=ko(t.sections,Y);if(!n)return;const a=To(n);we.mutate({blockKey:j,data:{...t,sections:n}},{onSuccess:()=>{J(a),D(null),k(null),P(null),M([]),ye(null),Ee(null)},onError:r=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:r.message}))})},ys=(t,n,a)=>{if(!j)return;kt(),Oe.current&&(clearTimeout(Oe.current),Oe.current=null);const r=i[j],p=r.sections;if(!p||typeof p!="object"||Array.isArray(p))return;const y=p;if(!Array.isArray(y.variants))return;const S=t([...y.variants]);if(!S)return;const A=Fo(y,S),ee={...i,[j]:{...r,sections:A}};we.mutate({blockKey:j,data:ee[j]},{onSuccess:()=>{n?.(),a&&Lt(a,ee)},onError:K=>Z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:K.message}))})},Ma=t=>{ie(null),J(t),D(null),k(null),P(null),M([]);const n=He[t]?.rule,{resolveType:a,formValue:r}=Bt(n,i??{},c??void 0);Ee(a),ye(r),fs(He.map(p=>({rule:p.rule})),t)},Ka=(t,n)=>{if(t===n)return;let a=Ke;Ke===t?a=n:t<Ke&&n>=Ke?a=Ke-1:t>Ke&&n<=Ke&&(a=Ke+1),J(a);const r=zt(He.map(p=>({rule:p.rule})),t,n);fs(r,a),ys(p=>zt(p,t,n))},La=t=>{const n=He[t]?.rule,a=It(n,i??{},c??void 0);ys(r=>r.length<=1?null:(r.splice(t,1),r),()=>{He.length-1===1?J(0):t<Ke?J(Ke-1):t===Ke&&J(Math.max(0,t-1)),D(null),k(null),P(null),M([]),ye(null),Ee(null)},a)},Ba=t=>{ys(n=>zo(n,t),()=>{J(t+1),D(null),k(null),P(null),M([]),ye(null),Ee(null)})},Ia=async(t,n)=>{kt(),Oe.current&&(clearTimeout(Oe.current),Oe.current=null);const a=tt.current.activePageKey,r=tt.current.decofile;if(!a)return;const p=r[a],y=p.sections;if(!y||typeof y!="object"||Array.isArray(y))return;const S=y;if(!Array.isArray(S.variants))return;const A=[...S.variants],ee=A[t];if(!ee?.rule||typeof ee.rule!="object"){Z.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const K=ee.rule,$=n.trim();Ut(!0);try{if(!$){if(!Vt(K,r,c)){ie(null);return}const nt=K.__resolveType??"";A[t]={...ee,rule:Xs(K,r,c)};const Se={...r,[a]:{...p,sections:{...S,variants:A}}};await we.mutateAsync({blockKey:a,data:Se[a]}),await Lt(nt,Se),ie(null),g?.();return}const G=en(K,r,c);if(!G){Z.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(G.blockKey){await we.mutateAsync({blockKey:G.blockKey,data:Dt(G.resolveType,G.data,$)}),ie(null),g?.();return}const je=xs($),W=_s(je,r);if(W){Z.error(W);return}const Q=Dt(G.resolveType,G.data,$);let Le=null;try{await we.mutateAsync({blockKey:je,data:Q}),Le=je,A[t]={...ee,rule:ts(je)},await we.mutateAsync({blockKey:a,data:{...p,sections:{...S,variants:A}}}),Le=null}catch(nt){throw Le&&await is.mutateAsync({blockKey:Le}).catch(()=>{}),nt}ie(null),Z.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:$})),g?.()}catch(G){Z.error(G instanceof Error?G.message:f("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Ut(!1)}},Oa=async(t,n)=>{kt(),Oe.current&&(clearTimeout(Oe.current),Oe.current=null);const{selectedSectionIndex:a,rawSections:r,parsedSections:p,decofile:y,activePageKey:S,pageVariants:A,variantIndex:ee}=tt.current;if(a===null||!S)return;const K=r[a],$=p[a];if(!K||!$?.isMultivariate)return;const G=ot(K,$);if(!G)return;const je=G.variants??[],W=je[t];if(!W?.rule||typeof W.rule!="object"){Z.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const Q=W.rule,Le=n.trim();Ut(!0);const nt=async Se=>{const et={...G,variants:Se},ut=[...r];ut[a]=_t(K,$,et);const pt=Ot(y,S,ut,ee,A);return await we.mutateAsync({blockKey:S,data:pt}),{...y,[S]:pt}};try{if(!Le){if(!Vt(Q,y,c)){se(null);return}const gt=Q.__resolveType??"",qs=[...je];qs[t]={...W,rule:Xs(Q,y,c)};const Ua=await nt(qs);await Lt(gt,Ua),se(null),g?.();return}const Se=en(Q,y,c);if(!Se){Z.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Se.blockKey){await we.mutateAsync({blockKey:Se.blockKey,data:Dt(Se.resolveType,Se.data,Le)}),se(null),g?.();return}const et=xs(Le),ut=_s(et,y);if(ut){Z.error(ut);return}const pt=Dt(Se.resolveType,Se.data,Le);let dt=null;try{await we.mutateAsync({blockKey:et,data:pt}),dt=et;const gt=[...je];gt[t]={...W,rule:ts(et)},await nt(gt),dt=null}catch(gt){throw dt&&await is.mutateAsync({blockKey:dt}).catch(()=>{}),gt}se(null),Z.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:Le})),g?.()}catch(Se){Z.error(Se instanceof Error?Se.message:f("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Ut(!1)}},Us=()=>{wt()},Fa=t=>{ue(t),hs({inner:t})},za=t=>{T(t),hs({raw:t})},$a=()=>{ue(null),Ge([])},Ha=()=>Ze(t=>t+1),bs=t=>{if(O){if(t===0){$t.flush(),re(!1),ue(null),T(void 0),Ge([]),Ze(a=>a+1),H?.();return}if(t===1){Ge([]),Ze(a=>a+1);return}Ge(Qe.slice(0,t-1)),Ze(a=>a+1);return}if(_e){M(q.slice(0,t)),te(a=>a+1);return}if(t===0){Us();return}if(t===1){M([]),te(a=>a+1);return}const n=!F&&yt&&Tt?1:0;if(n===1&&t===2){M([]),te(a=>a+1);return}M(q.slice(0,t-1-n))},Zt=Qt.length>1?s.jsx("button",{type:"button",onClick:()=>bs(Ro(Qt.length,{isMultivariateSectionTop:Ca})),title:f("sectionsEditor.sectionsEditor.back"),"aria-label":f("sectionsEditor.sectionsEditor.back"),className:Ie("shrink-0 inline-flex size-6 items-center justify-center classic:rounded-md compact:rounded-lg transition-colors",bt?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:s.jsx(Wo,{className:"size-4"})}):null;return s.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!F&&Zt&&s.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:Zt}),(F||Qt.length>1)&&s.jsx(yo,{crumbs:Qt,onSelect:bs,onSelectRoot:()=>{$t.flush(),z?z():bs(0)}}),s.jsx("div",{className:"shrink-0",children:bt||Yt||O?(Pa||F&&Zt)&&s.jsxs("div",{className:Ie("border-b px-3 py-2.5",bt&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[F&&Zt,!_e&&Et&&ct&&s.jsxs("button",{type:"button",onClick:Us,title:f("sectionsEditor.sectionsEditor.editingInVariant",{variant:ct.label}),className:Ie("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",bo),children:[s.jsx(Ts,{rule:Ft(ct.rule,i??{},c??void 0),matchers:Wt}),s.jsx("span",{className:"max-w-[160px] truncate",children:ct.label})]}),s.jsx("div",{className:"flex-1"}),bt&&s.jsxs(Nt,{children:[s.jsx(At,{asChild:!0,children:s.jsx("span",{className:"shrink-0 cursor-help",children:s.jsx(yn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),s.jsx(Pt,{side:"bottom",className:"max-w-[260px]",children:f("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),$s&&s.jsx(Ys,{onClick:()=>vs()})]}),bt&&s.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:f("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):s.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(xo,{pageKey:j,initialName:Ye.name,initialPath:Ye.path,onFieldChange:ra})}),s.jsxs(Nt,{children:[s.jsx(At,{asChild:!0,children:s.jsx(at,{type:"button",variant:"ghost",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:()=>re(!0),children:s.jsx(Yo,{size:14})})}),s.jsx(Pt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.editSeo")})]}),s.jsxs(Nt,{children:[s.jsx(At,{asChild:!0,children:s.jsx(at,{type:"button",variant:"ghost",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>I&&j?I():ve(!0),children:s.jsx(Jo,{size:14})})}),s.jsx(Pt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.viewJson")})]}),s.jsx(Ys,{onClick:Hs})]})}),O?s.jsx(ss,{className:"flex-1 min-h-0 [&_[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.jsx("div",{className:"mx-auto max-w-2xl",children:qt&&j?s.jsx(vi,{rawSeo:us,innerSeo:As,defaultResolveType:ta,seoSchema:sa,activeResolveType:ds,seoTypeOptions:ea,formResetKey:mt,siteDefaultSeo:na,onBreadcrumbChange:Ge,onPersistRaw:za,onInnerChange:Fa,onClearForm:$a,onBumpFormKey:Ha}):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"):Yt?s.jsxs(ss,{viewportRef:pe,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[yt&&St.length>0&&q.length===0&&s.jsxs(s.Fragment,{children:[s.jsx(_o,{listKey:`${j??""}:${u??""}`,variants:St.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ss,onSelect:ha,onRename:se,onDuplicate:Sa,onDelete:va,onRemoveAll:ba,onReorder:ya,onAdd:()=>vs()}),yt&&s.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:f("sectionsEditor.sectionsEditor.variantRule")}),s.jsx(ln,{currentRt:jt??"",currentLabel:es(Tt?.rule,i??{},ht,c??void 0),currentGlobalKey:It(Tt?.rule,i??{},c??void 0)??void 0,matchers:Wt,globals:Ks,onSelect:ka,onSelectGlobal:Va,schema:Aa,formValue:On,onChange:Ta,formKey:`${u??"none"}:${Ss}:${jt??""}`,formWrapperClassName:"pt-1",meta:c??void 0,decofile:i,onSaveReferencedBlock:Ht,sandbox:Gt})]})]}),s.jsx(Js,{activeSchema:gs,formValue:ne,formResetKey:Pe,onFormChange:Ps,onBreadcrumbChange:M,breadcrumbPath:q,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:c,decofile:i,onSaveReferencedBlock:Ht,sandbox:Gt,previewBaseUrl:oe,onRequestAddSection:Cs})]},"editor-section-form"):_e?s.jsx(ss,{viewportRef:pe,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx(Js,{activeSchema:gs,formValue:ne,formResetKey:Pe,onFormChange:Ps,onBreadcrumbChange:M,breadcrumbPath:q,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:c,decofile:i,onSaveReferencedBlock:Ht,sandbox:Gt,previewBaseUrl:oe,onRequestAddSection:Cs})},"editor-global-block"):s.jsxs(ss,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[Et&&j&&s.jsx(Ji,{listKey:j,variants:He,activeIndex:Ke,decofile:i??{},meta:c,matchers:Wt,onSelect:Ma,onReorder:Ka,onRename:ie,onDuplicate:Ba,onDelete:La,onAdd:Hs}),Et&&Ae!==null&&s.jsxs("div",{className:Ie("px-3 border-b",de?"pt-3 pb-5 space-y-3":"py-2"),children:[s.jsxs("button",{type:"button",onClick:()=>Re(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer classic:rounded-sm compact:rounded-lg py-0.5 hover:bg-muted/40","aria-expanded":de,children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:f("sectionsEditor.sectionsEditor.variantRule")}),de?s.jsx(Ho,{className:"size-3.5 shrink-0 text-muted-foreground"}):s.jsx(Uo,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),de&&s.jsx("div",{className:Ie("space-y-3",Mt&&"pointer-events-none opacity-50"),children:s.jsx(ln,{currentRt:Ae,currentLabel:es(ct?.rule,i??{},ht,c??void 0),currentGlobalKey:It(ct?.rule,i??{},c??void 0)??void 0,matchers:Wt,globals:Ks,onSelect:Ea,onSelectGlobal:wa,schema:ja,formValue:Ue,onChange:Ra,formKey:`${Ke}:${Ae??""}`,formWrapperClassName:"space-y-3",meta:c??void 0,decofile:i,onSaveReferencedBlock:Ht,sandbox:Gt})})]}),s.jsx("div",{className:"p-2 pt-3",children:s.jsx(Fi,{listKey:`${j??""}-${Ke}`,rawSections:Y,sections:Fe,meta:c,decofile:i,selectedIndex:u,onSelect:ia,onReorder:la,onDelete:ca,onDuplicate:ua,onMakeReusable:Be,onToggleHidden:da,onToggleLazy:ma,onAddVariant:vs,onDetach:fa,onAddSection:()=>ce(!0),canAddSection:_a})})]},"editor-section-list"),s.jsx(jo,{open:ge!==null,onOpenChange:t=>{t||Be(null)},defaultBlockId:ge!==null?xs(Fe[ge]?.label??""):"",isPending:we.isPending,onSubmit:xa}),oe&&s.jsx(xi,{open:Ce,onOpenChange:t=>{ce(t),t||(X.current=null)},meta:c,decofile:i,previewBaseUrl:oe,onSelect:ga}),Ve&&j&&i&&s.jsx(ii,{open:Ve,onOpenChange:ve,pageKey:j,decofile:i}),le!==null&&s.jsx(an,{open:!0,initialName:Vt(He[le]?.rule,i??{},c??void 0)?es(He[le]?.rule,i??{},ht,c??void 0):"",autoLabel:ht(Ft(He[le]?.rule,i??{},c??void 0)),isPending:Mt,onSubmit:async t=>{await Ia(le,t)},onOpenChange:t=>{!t&&!Mt&&ie(null)}}),he!==null&&s.jsx(an,{open:!0,initialName:Vt(St[he]?.rule,i??{},c??void 0)?es(St[he]?.rule,i??{},ht,c??void 0):"",autoLabel:ht(Ft(St[he]?.rule,i??{},c??void 0)),isPending:Mt,onSubmit:async t=>{await Oa(he,t)},onOpenChange:t=>{!t&&!Mt&&se(null)}})]})}export{wc as SectionsEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,b as A,r as R,l as G,j as s,B as H}from"./index-
|
|
1
|
+
import{c as $,b as A,r as R,l as G,j as s,B as H}from"./index-D5GfY9ep.js";import{a as J,d as K,b as Q,D as U}from"./dialog-lfdH0lhI.js";import{c as V,b as W,a as X,D as Y}from"./drawer-CDjyI_Jg.js";import{u as Z}from"./use-mobile-CLWKkyXU.js";import{c as ee}from"./chat-context-CDFEG_L-.js";import{S as F,M as se}from"./decopilot-DZ3ibpY_.js";import{M as le,a as oe}from"./index-CJdWCH17.js";function he(L){const e=$.c(48),{variant:t,className:o,placeholder:n,model:l,isLoading:I,credentialId:P,onCredentialChange:k,onModelChange:v,filterModels:E}=L,z=t===void 0?"borderless":t,w=n===void 0?"Select model":n,r=A(),[a,S]=R.useState(!1),i=v!==void 0,q=Z(),O=z==="borderless"?"ghost":"outline",_=z==="borderless"&&"md:border-none";let d;e[0]!==o||e[1]!==_?(d=G("text-sm hover:bg-accent classic:rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",_,o),e[0]=o,e[1]=_,e[2]=d):d=e[2];let c;e[3]!==I||e[4]!==l||e[5]!==w||e[6]!==i?(c=i?s.jsx(F,{model:l??null,placeholder:w,isLoading:I}):s.jsx(ne,{placeholder:w}),e[3]=I,e[4]=l,e[5]=w,e[6]=i,e[7]=c):c=e[7];let D;e[8]!==O||e[9]!==d||e[10]!==c?(D=s.jsx(H,{variant:O,size:"sm",className:d,children:c}),e[8]=O,e[9]=d,e[10]=c,e[11]=D):D=e[11];const f=D;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(se,{}),e[12]=y):y=e[12];let N;e[13]!==P||e[14]!==E||e[15]!==l||e[16]!==k||e[17]!==v||e[18]!==i?(N=s.jsx(R.Suspense,{fallback:y,children:i?s.jsx(le,{onClose:()=>S(!1),credentialId:P??null,onCredentialChange:k??te,selectedModel:l??null,onModelChange:v,filterModels:E}):s.jsx(oe,{onClose:()=>S(!1)})}),e[13]=P,e[14]=E,e[15]=l,e[16]=k,e[17]=v,e[18]=i,e[19]=N):N=e[19];const m=N;if(q){let g;e[20]!==f?(g=s.jsx(V,{asChild:!0,children:f}),e[20]=f,e[21]=g):g=e[21];let j;e[22]!==r?(j=r("chat.selectModel.selectModel"),e[22]=r,e[23]=j):j=e[23];let M;e[24]!==j?(M=s.jsx(W,{className:"sr-only",children:j}),e[24]=j,e[25]=M):M=e[25];let b;e[26]!==m?(b=s.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:m}),e[26]=m,e[27]=b):b=e[27];let C;e[28]!==M||e[29]!==b?(C=s.jsxs(X,{className:"p-0 flex flex-col max-h-[95vh]",children:[M,b]}),e[28]=M,e[29]=b,e[30]=C):C=e[30];let T;return e[31]!==a||e[32]!==g||e[33]!==C?(T=s.jsxs(Y,{open:a,onOpenChange:S,children:[g,C]}),e[31]=a,e[32]=g,e[33]=C,e[34]=T):T=e[34],T}let h;e[35]!==f?(h=s.jsx(J,{asChild:!0,children:f}),e[35]=f,e[36]=h):h=e[36];let x;e[37]!==r?(x=r("chat.selectModel.selectModel"),e[37]=r,e[38]=x):x=e[38];let p;e[39]!==x?(p=s.jsx(K,{className:"sr-only",children:x}),e[39]=x,e[40]=p):p=e[40];let u;e[41]!==m||e[42]!==p?(u=s.jsxs(Q,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[p,m]}),e[41]=m,e[42]=p,e[43]=u):u=e[43];let B;return e[44]!==a||e[45]!==h||e[46]!==u?(B=s.jsxs(U,{open:a,onOpenChange:S,children:[h,u]}),e[44]=a,e[45]=h,e[46]=u,e[47]=B):B=e[47],B}function te(){}function ne(L){const e=$.c(4),{placeholder:t}=L,{selectedModel:o,isModelsLoading:n}=ee();let l;return e[0]!==n||e[1]!==o||e[2]!==t?(l=s.jsx(F,{model:o,placeholder:t,isLoading:n}),e[0]=n,e[1]=o,e[2]=t,e[3]=l):l=e[3],l}export{he as M};
|