decocms 4.491.3 → 4.493.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-CO9ka_yi.js → ActiveShapeUtils-5xWWHSL1.js} +1 -1
- package/dist/client/assets/{AlertCircle-C3fpFT5I.js → AlertCircle-B5gBB9h_.js} +1 -1
- package/dist/client/assets/{AreaChart-BvjH9pmK.js → AreaChart-BTyzss2a.js} +1 -1
- package/dist/client/assets/{ArrowLeft-C1IFj0Ic.js → ArrowLeft-B7455tPl.js} +1 -1
- package/dist/client/assets/{ArrowUp-DR-Jhbl1.js → ArrowUp-CP6XCJnB.js} +1 -1
- package/dist/client/assets/{BarChart-CJ_IiQ71.js → BarChart-Ch51NWPz.js} +1 -1
- package/dist/client/assets/{Building02-uHT4KVtK.js → Building02-BZItaEYx.js} +1 -1
- package/dist/client/assets/{CategoricalChart-zte0bRec.js → CategoricalChart-DqN5Jy74.js} +1 -1
- package/dist/client/assets/{CheckCircle-BKHstO_Q.js → CheckCircle-C3CiaCW4.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DAO6R1Op.js → ChevronSelectorVertical-DIPs2sw-.js} +1 -1
- package/dist/client/assets/{ChevronUp-CceLPRrE.js → ChevronUp-nynZHATg.js} +1 -1
- package/dist/client/assets/{Copy01-Dx3ZT0bA.js → Copy01-CdRMK9o7.js} +1 -1
- package/dist/client/assets/{CreditCard01-Dko0T335.js → CreditCard01-DVQTLvKO.js} +1 -1
- package/dist/client/assets/{DotsVertical-aHYBPlin.js → DotsVertical-3XBYz4yU.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-B8QqSSmC.js → ErrorBarContext-Csmpy3UX.js} +1 -1
- package/dist/client/assets/{Globe04-BDe-0jS0.js → Globe04-DoxNod_i.js} +1 -1
- package/dist/client/assets/{Image01-Cxa392ef.js → Image01-DdBetDCI.js} +1 -1
- package/dist/client/assets/{Key01-BHiUNW_5.js → Key01-DcSonP-G.js} +1 -1
- package/dist/client/assets/{Link01-BRZRc4wX.js → Link01-3BacRGrf.js} +1 -1
- package/dist/client/assets/{LinkBroken01-kK_na_OL.js → LinkBroken01-BZFZ6N-h.js} +1 -1
- package/dist/client/assets/{Monitor01-Cl4JLYVa.js → Monitor01-DU19-CHk.js} +1 -1
- package/dist/client/assets/{Play-CzTcIQz_.js → Play-B7i_-ibU.js} +1 -1
- package/dist/client/assets/{Plus-nldAzVeQ.js → Plus-XYNDZJ4s.js} +1 -1
- package/dist/client/assets/{SearchMd-BiZNveM1.js → SearchMd-BFitEH5z.js} +1 -1
- package/dist/client/assets/{Sector-DOgIwKt7.js → Sector-CYOl8Efm.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-o0DdjJD9.js → ShoppingBag01-Ci8H67G0.js} +1 -1
- package/dist/client/assets/{Sun-BYGxydmh.js → Sun-D1Mdg8Cq.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bx3d-jDI.js → SwitchHorizontal01-BHr8jCjb.js} +1 -1
- package/dist/client/assets/{Tool01-Blw6F5iV.js → Tool01-DQnW-zjg.js} +1 -1
- package/dist/client/assets/{Trash01-DAoFHSpp.js → Trash01-DZ8laRwu.js} +1 -1
- package/dist/client/assets/{Upload01-CtKBhqsv.js → Upload01-CrRTpeMX.js} +1 -1
- package/dist/client/assets/{User01-Awky2MVQ.js → User01-9bZ-cKa7.js} +1 -1
- package/dist/client/assets/{UserSquare-BMOlWqCu.js → UserSquare-CuRnLJZ6.js} +1 -1
- package/dist/client/assets/{Users01-D7ZFKC4W.js → Users01-cUGZjxDe.js} +1 -1
- package/dist/client/assets/{XAxis-BLZT-vtl.js → XAxis-DDG3qYHW.js} +1 -1
- package/dist/client/assets/{XClose-DBJ7sD1T.js → XClose-DjFCAP5F.js} +1 -1
- package/dist/client/assets/{ZoomOut-CQckFmS9.js → ZoomOut-BggitXDv.js} +1 -1
- package/dist/client/assets/{access-gate-DEyXiK2N.js → access-gate-Cu8JZecz.js} +1 -1
- package/dist/client/assets/add-connection-dialog-DBnkMFp9.js +1 -0
- package/dist/client/assets/agent-analytics-B1wni80p.js +2 -0
- package/dist/client/assets/agent-app-DY95_zYY.js +1 -0
- package/dist/client/assets/agent-assets-B18leh3z.js +1 -0
- package/dist/client/assets/agent-automation-CWXHzvtY.js +20 -0
- package/dist/client/assets/agent-automations-C0tbQ1R9.js +1 -0
- package/dist/client/assets/agent-connect-sources-CKiU44XZ.js +1 -0
- package/dist/client/assets/agent-deck-C8T7Jj3o.js +1 -0
- package/dist/client/assets/agent-e2e-LdVq-drf.js +1 -0
- package/dist/client/assets/agent-experiments-ClDYYnWj.js +1 -0
- package/dist/client/assets/agent-file-CjZFekiU.js +1 -0
- package/dist/client/assets/agent-hosting-zrg11_-A.js +1 -0
- package/dist/client/assets/agent-icon-BewGjsar.js +1 -0
- package/dist/client/assets/agent-library-BAUPDsyD.js +1 -0
- package/dist/client/assets/agent-library-file-CHlnBg90.js +1 -0
- package/dist/client/assets/agent-monitor-CKpvG_Lm.js +1 -0
- package/dist/client/assets/agent-overview-Di3y0uXp.js +1 -0
- package/dist/client/assets/agent-settings-C-kNuurj.js +1 -0
- package/dist/client/assets/{agent-site-editor-Dv8qh0xB.js → agent-site-editor-16duoEZY.js} +5 -5
- package/dist/client/assets/agent-site-editor-code-BUJylH9_.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-EotWUMUT.js → agent-site-editor-content-B64VGP55.js} +6 -6
- package/dist/client/assets/agent-site-editor-preview-DIihiuj0.js +518 -0
- package/dist/client/assets/agent-view-SjLiGW-o.js +1 -0
- package/dist/client/assets/{agent-view-guard-Bf5Bn5K4.js → agent-view-guard-CoiTTfLB.js} +1 -1
- package/dist/client/assets/agents-list-CFQQdh1t.js +1 -0
- package/dist/client/assets/{ai-providers-VCM02Z-N.js → ai-providers-CTzk8MgQ.js} +2 -2
- package/dist/client/assets/{alert-CGA3Ty0D.js → alert-Dyx5I-Y3.js} +1 -1
- package/dist/client/assets/{alert-dialog-kjq4dW3k.js → alert-dialog-BXEG2ySJ.js} +2 -2
- package/dist/client/assets/{analytics-sections-Cjkr8Muu.js → analytics-sections-BeEYJnmv.js} +1 -1
- package/dist/client/assets/api-keys-CH5G5_Qp.js +1 -0
- package/dist/client/assets/api-keys-JMxYvHms.js +1 -0
- package/dist/client/assets/app-editor-DqEmpUhy.js +1 -0
- package/dist/client/assets/asset-utils-Euq8y8zU.js +1 -0
- package/dist/client/assets/{auth-Cps-90jQ.js → auth-Dwu4WH32.js} +1 -1
- package/dist/client/assets/{auth-catchall-Batt4Wp1.js → auth-catchall-D9Xe8fii.js} +1 -1
- package/dist/client/assets/auth-entry-CCIy-Mhs.js +1 -0
- package/dist/client/assets/{auth-split-layout-lt03dL19.js → auth-split-layout-DXUbMgnq.js} +1 -1
- package/dist/client/assets/authenticate-and-persist-oauth-BEdNWkUl.js +1 -0
- package/dist/client/assets/{automation-list-row-C9YrfX3o.js → automation-list-row-Du4blVfm.js} +1 -1
- package/dist/client/assets/automation-runs-BsFnE3d4.js +1 -0
- package/dist/client/assets/automations-Cpff9O08.js +1 -0
- package/dist/client/assets/autosend-BaKgBZDQ.js +1 -0
- package/dist/client/assets/{avatar-TL9HUab0.js → avatar-BEl6nltF.js} +1 -1
- package/dist/client/assets/{badge-CKM84j2S.js → badge-DFdotQFQ.js} +1 -1
- package/dist/client/assets/{block-document-w2kAyl6z.js → block-document-BlUE8Eks.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-PwUYRK7b.js → blocks-preview-workspace-context-DSOKao_H.js} +1 -1
- package/dist/client/assets/{blog-schema-Cx6xDQRb.js → blog-schema-B_yGbArL.js} +1 -1
- package/dist/client/assets/{board-analytics-DT3f2AVB.js → board-analytics-UmA2i-Sq.js} +1 -1
- package/dist/client/assets/buckets-CJ11qX_5.js +1 -0
- package/dist/client/assets/{build-improve-prompt-doc-R0amEUpn.js → build-improve-prompt-doc-QS7b7hRr.js} +1 -1
- package/dist/client/assets/{calendar-DaaBbvOH.js → calendar-CT7cVD7N.js} +1 -1
- package/dist/client/assets/capability-load-error-yZzl8b80.js +1 -0
- package/dist/client/assets/category-editor-CTdWf8oW.js +1 -0
- package/dist/client/assets/{chart-DZbYggl3.js → chart-C-785ZEj.js} +1 -1
- package/dist/client/assets/chat-context-DJGYyGlB.js +39 -0
- package/dist/client/assets/chat-draft-DbBgaLY_.js +1 -0
- package/dist/client/assets/{checkbox-B2kVXKBD.js → checkbox-DmaIcPoL.js} +1 -1
- package/dist/client/assets/choose-editor-CirVpDXw.js +1 -0
- package/dist/client/assets/claim-phase-copy-BnoHLlrM.js +1 -0
- package/dist/client/assets/{cli-auth-success-DtMJnqjK.js → cli-auth-success-XcMuETZQ.js} +1 -1
- package/dist/client/assets/{client-icons-D3ZaOjXM.js → client-icons-DLhjrwzL.js} +1 -1
- package/dist/client/assets/{collapsible-vN3Y9B-p.js → collapsible-CgZ4-XuF.js} +1 -1
- package/dist/client/assets/collection-detail-gYU6aRKx.js +1 -0
- package/dist/client/assets/collection-display-button-YyNX5Efp.js +1 -0
- package/dist/client/assets/{collection-search-BoB9COGX.js → collection-search-BC0JMMNp.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CxJ6Bp-f.js → collection-table-wrapper-DFn43mg0.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cw7XLgNG.js → collection-tabs-DeQ7zbGh.js} +1 -1
- package/dist/client/assets/column-rules-b8eo73o4.js +3 -0
- package/dist/client/assets/{combobox-PSOtDaya.js → combobox-DeXU4vSR.js} +1 -1
- package/dist/client/assets/command-D2QlwSrW.js +1 -0
- package/dist/client/assets/{companion-mcps-section-gXkjR-XD.js → companion-mcps-section-DtzaYg0J.js} +1 -1
- package/dist/client/assets/config-DP6xvcYW.js +1 -0
- package/dist/client/assets/{connect-Dn2pI97X.js → connect-ClKIaF8K.js} +3 -3
- package/dist/client/assets/connect-layout-CyyX0xPx.js +1 -0
- package/dist/client/assets/{connection-FKmTBjan.js → connection-BjzBHJVc.js} +1 -1
- package/dist/client/assets/connection-card-BVD8Ppl9.js +1 -0
- package/dist/client/assets/connection-detail-DfYF7TR9.js +1 -0
- package/dist/client/assets/connection-form-helpers-5EXuPZ4G.js +1 -0
- package/dist/client/assets/connections-D1tC1_hB.js +1 -0
- package/dist/client/assets/context-DzTTGbcd.js +1 -0
- package/dist/client/assets/{context-menu-BLhcVqO0.js → context-menu-Can7-rLt.js} +1 -1
- package/dist/client/assets/{core.esm-DbclD67Y.js → core.esm-Cvui6jds.js} +1 -1
- package/dist/client/assets/create-organization-dialog-CD66iA3E.js +1 -0
- package/dist/client/assets/daily-pulse-Bz92WYIP.js +1 -0
- package/dist/client/assets/device-hint-DZcinuip.js +1 -0
- package/dist/client/assets/discover-BRALl0mU.js +1 -0
- package/dist/client/assets/domain-settings-DiitZO4z.js +1 -0
- package/dist/client/assets/{drawer-CXs6iEYK.js → drawer-BPz4t5dt.js} +1 -1
- package/dist/client/assets/{editor-CPkkN1Zr.js → editor-2jNHgdUN.js} +3 -3
- package/dist/client/assets/{empty-state-D45gZaZ-.js → empty-state-D8iC8fkc.js} +1 -1
- package/dist/client/assets/{empty-state-DnQ_qEjI.js → empty-state-Zf0MeIMv.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Q_j_fmQx.js → extract-connection-data-BTBLhbEe.js} +1 -1
- package/dist/client/assets/{feature-gate-CFL9eB8c.js → feature-gate-Dhf-LwS1.js} +1 -1
- package/dist/client/assets/feature-paywall-CHcwEHRJ.js +1 -0
- package/dist/client/assets/file-explorer-BhYSdjXu.js +2 -0
- package/dist/client/assets/{file-preview-DT-0IR-r.js → file-preview-DvxQuX3P.js} +1 -1
- package/dist/client/assets/file-share-button-C1EB3dOc.js +3 -0
- package/dist/client/assets/{file-type-icon-Du5QihE_.js → file-type-icon-DzYK4NqY.js} +1 -1
- package/dist/client/assets/flat-project-D2zrr-4_.js +1 -0
- package/dist/client/assets/{folder-icon-DXEgDwxo.js → folder-icon-C_Jv4E7N.js} +2 -2
- package/dist/client/assets/{form-BBtB5neb.js → form-BCYpCYIL.js} +1 -1
- package/dist/client/assets/general-D8kDc8NB.js +1 -0
- package/dist/client/assets/home-CiV29kW5.js +1 -0
- package/dist/client/assets/{icon-button-BiR7Hy07.js → icon-button-sHj7Q6Fp.js} +1 -1
- package/dist/client/assets/index-6UUldwCZ.js +1 -0
- package/dist/client/assets/index-BVmIdqXu.js +1 -0
- package/dist/client/assets/{index-C-3lNbMm.js → index-BhyQWjoM.js} +6 -6
- package/dist/client/assets/{index-D_7jfHk6.js → index-Bm9FTdjr.js} +43 -43
- package/dist/client/assets/{index-DWUcsrDk.js → index-CspW_Aw1.js} +2 -2
- package/dist/client/assets/{index-BvwJHqHQ.js → index-CuOTEpMz.js} +2 -2
- package/dist/client/assets/{index-D1CuHcEn.js → index-D2iZ6syL.js} +1 -1
- package/dist/client/assets/{index-CmC6v99h.js → index-DmfwrRER.js} +5 -5
- package/dist/client/assets/{index-CoDuotD7.js → index-GgiP6YIr.js} +1 -1
- package/dist/client/assets/{index-KqttCHw1.js → index-KCu_K9eF.js} +1 -1
- package/dist/client/assets/{index-CeMEs5dC.js → index-YEKHk89C.js} +2 -2
- package/dist/client/assets/{index-redirect-_9q4bmDQ.js → index-redirect-C_FoZNOn.js} +1 -1
- package/dist/client/assets/{index-DltLvtZg.js → index-s6P2p4h7.js} +1 -1
- package/dist/client/assets/{index-D8mID9PZ.js → index-wABYnbOM.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DG8sBe4B.js → infiniteQueryObserver-zxl9Rj5F.js} +1 -1
- package/dist/client/assets/infra-billing-heizZxEC.js +1 -0
- package/dist/client/assets/{input-DQp1LVsq.js → input-BkQDO0Ef.js} +5 -5
- package/dist/client/assets/input-Bvc3OT4I.js +1 -0
- package/dist/client/assets/{integration-icon-BM3EOzpn.js → integration-icon-DoYtKqdf.js} +1 -1
- package/dist/client/assets/jira-icon-BeORJXLw.js +1 -0
- package/dist/client/assets/{label-DxOPcXJe.js → label-BL2W0Pcn.js} +1 -1
- package/dist/client/assets/{layout-bHPl4zx9.js → layout-vy24lHLj.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-B5L4MOtR.js +1 -0
- package/dist/client/assets/{legacy-main-redirect-z5zSFE1g.js → legacy-main-redirect-Pp-THt9D.js} +1 -1
- package/dist/client/assets/library-DZte0T9-.js +1 -0
- package/dist/client/assets/{library-tab-Z6y7ewdW.js → library-tab-2usQWRYi.js} +3 -3
- package/dist/client/assets/login-CwsPhEpC.js +1 -0
- package/dist/client/assets/{markdown-6zdu9t3J.js → markdown-B3PJYX-4.js} +3 -3
- package/dist/client/assets/{mcp-app-renderer-D5zA7BfR.js → mcp-app-renderer-BLT3VM-G.js} +1 -1
- package/dist/client/assets/mcp-oauth-4gmyTyah.js +1 -0
- package/dist/client/assets/mcp-oauth-BTa4N28L.js +1 -0
- package/dist/client/assets/members-Dba6HROK.js +1 -0
- package/dist/client/assets/{memory-C67vpugN.js → memory-DAV2Pmj2.js} +2 -2
- package/dist/client/assets/{mini-report-page-jD0aWOQw.js → mini-report-page-B9WE5YW-.js} +1 -1
- package/dist/client/assets/{mock-board-DX11vRZx.js → mock-board-D9i0Vi9l.js} +1 -1
- package/dist/client/assets/{monaco-editor-BfKI4VlA.js → monaco-editor-DANiMmsL.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-DB55KTTw.js → monitoring-stats-row-B1hQA0Lu.js} +1 -1
- package/dist/client/assets/{multi-select-DVylmGoB.js → multi-select-BJgtMlC2.js} +1 -1
- package/dist/client/assets/mustache-GMlXm0yl.js +4 -0
- package/dist/client/assets/new-project-dialog-C-thpPQ-.js +1 -0
- package/dist/client/assets/{oauth-callback-Cqdj0zbM.js → oauth-callback-DZwrYGu7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Cwy6YGO7.js → oauth-callback-ai-provider-B7d3QWP4.js} +1 -1
- package/dist/client/assets/onboarding-DK0DTXli.js +1 -0
- package/dist/client/assets/openai-conversation-BMdPtMrp.js +3 -0
- package/dist/client/assets/optimistic-project-sidebar-views-B4v48qUS.js +1 -0
- package/dist/client/assets/{organization-choice-CG-C6xsW.js → organization-choice-BIWVNvRP.js} +1 -1
- package/dist/client/assets/orgs-D5AZUxP6.js +1 -0
- package/dist/client/assets/{page-seo-form-C6V8K2um.js → page-seo-form-gaHyPBMV.js} +1 -1
- package/dist/client/assets/pair-DXTFiJNl.js +48 -0
- package/dist/client/assets/plan-ladder-BUDRjzbj.js +1 -0
- package/dist/client/assets/{popover-C2vJrXky.js → popover-jNB4XciF.js} +1 -1
- package/dist/client/assets/post-calendar-D8EAMZvz.js +1 -0
- package/dist/client/assets/post-editor-BQa57f7n.js +2 -0
- package/dist/client/assets/preview-content-B6K8Jkd_.js +1 -0
- package/dist/client/assets/preview-dialog-Dl22mWwN.js +1 -0
- package/dist/client/assets/{preview-panel-CaQ4Pbpr.js → preview-panel-LWLVsrdx.js} +1 -1
- package/dist/client/assets/product-picker-dialog-RglVwX1Q.js +1 -0
- package/dist/client/assets/profile-BWcfZQ7V.js +1 -0
- package/dist/client/assets/project-app-view-qeunpPC-.js +1 -0
- package/dist/client/assets/project-feed-Dm758F3_.js +1 -0
- package/dist/client/assets/{project-icon-DU1uywdD.js → project-icon-D2vCEWQy.js} +1 -1
- package/dist/client/assets/project-reports-6TMbK6-4.js +1 -0
- package/dist/client/assets/project-tasks-3mU9NrZf.js +1 -0
- package/dist/client/assets/projects-DyGysCyv.js +1 -0
- package/dist/client/assets/{projects-empty-state-BsW_dfGL.js → projects-empty-state-BuMMPopD.js} +1 -1
- package/dist/client/assets/prompts-BrbpQc3X.js +1 -0
- package/dist/client/assets/record-editor-hwH5zZn-.js +1 -0
- package/dist/client/assets/redirect-editor-Dc4HBQwl.js +1 -0
- package/dist/client/assets/{reports-CMClJ0_S.js → reports-D7gOlgZm.js} +2 -2
- package/dist/client/assets/reports-DPHZG4Rx.js +1 -0
- package/dist/client/assets/reports-onboarding-DGmwN9iV.js +1 -0
- package/dist/client/assets/reports-tab-Bb7ApLUW.js +2 -0
- package/dist/client/assets/repositories-GlkzQQVy.js +1 -0
- package/dist/client/assets/repository-binding-D2wL-4Vr.js +1 -0
- package/dist/client/assets/repository-import-picker-DtM7QfYh.js +1 -0
- package/dist/client/assets/repository-picker-28zwGBgK.js +1 -0
- package/dist/client/assets/require-capability-Dm4XTD9Y.js +1 -0
- package/dist/client/assets/{required-auth-layout-CDif9NZC.js → required-auth-layout-CbgA2xIU.js} +1 -1
- package/dist/client/assets/reset-password-15IQ61HR.js +1 -0
- package/dist/client/assets/{resizable-CIqqPf7O.js → resizable-CGWosOTw.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-S311kwwr.js → resolve-tab-icon-BEIojUgL.js} +1 -1
- package/dist/client/assets/review-settings-BAqWAPVV.js +1 -0
- package/dist/client/assets/{rich-text-link-control-CMeXviAY.js → rich-text-link-control-CE4nCWAz.js} +1 -1
- package/dist/client/assets/roles-etRZjRQM.js +1 -0
- package/dist/client/assets/route-BCQ2a7UE.js +1 -0
- package/dist/client/assets/route-CdaJ86mX.js +1 -0
- package/dist/client/assets/route-DCLsEeq7.js +1 -0
- package/dist/client/assets/{runnable-block-editor-BWSWYcJ-.js → runnable-block-editor-xVvcrNA2.js} +4 -4
- package/dist/client/assets/sandbox-lifecycle-context-BKjyczlw.js +1 -0
- package/dist/client/assets/{schema-D1veJPjJ.js → schema-C_wSANSe.js} +1 -1
- package/dist/client/assets/{scroll-area-Ce9NeF1s.js → scroll-area-BT00diUA.js} +1 -1
- package/dist/client/assets/{search-input-DpJBHwWo.js → search-input-D-uP0R3f.js} +1 -1
- package/dist/client/assets/search-toggle-Hgq_Klme.js +1 -0
- package/dist/client/assets/{secret-picker-B_ADx-sY.js → secret-picker-BitsdCaD.js} +1 -1
- package/dist/client/assets/secrets-C_yZKBHs.js +1 -0
- package/dist/client/assets/sections-editor-DrNkE-5_.js +1 -0
- package/dist/client/assets/{select-CZdnCwuC.js → select-BVEgIanS.js} +1 -1
- package/dist/client/assets/select-model-CTmCsZzT.js +1 -0
- package/dist/client/assets/seo-editor-Cr-VPdNi.js +1 -0
- package/dist/client/assets/{separator-BtrJ5AFz.js → separator-CJOPtNz-.js} +1 -1
- package/dist/client/assets/settings-tab-zoRR23UC.js +4 -0
- package/dist/client/assets/sheet-D-h-caij.js +1 -0
- package/dist/client/assets/shell-layout-Ckss0QqA.js +1 -0
- package/dist/client/assets/skills-Dx8G-x-T.js +1 -0
- package/dist/client/assets/{slider-BpZoep6A.js → slider-DtTzb8JT.js} +1 -1
- package/dist/client/assets/{sortable.esm-DyjKGVzh.js → sortable.esm-DCsYtWcb.js} +1 -1
- package/dist/client/assets/sso-DDpjWaoO.js +1 -0
- package/dist/client/assets/{suggestion-DmBBrXFD.js → suggestion-Bso4uBRF.js} +2 -2
- package/dist/client/assets/{switch-hSsSQMgC.js → switch-DZo6rAtc.js} +1 -1
- package/dist/client/assets/{symbol-CkeqKRPe.js → symbol-Co3D-iSE.js} +1 -1
- package/dist/client/assets/synced-repos-B1f0culo.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-BRREqFJ3.js → tab-icon-glyph-ClCao4gx.js} +1 -1
- package/dist/client/assets/{table-Dfov51xE.js → table-Gm-jWCpy.js} +1 -1
- package/dist/client/assets/{tabs-Df848FrP.js → tabs-CXsAC8nO.js} +1 -1
- package/dist/client/assets/{task-board-ChFrokIN.js → task-board-Bgw_xVJW.js} +1 -1
- package/dist/client/assets/{task-route-4t67EvVC.js → task-route-BxRkc6kt.js} +1 -1
- package/dist/client/assets/{task-status-cI-KMHji.js → task-status-B92ESgef.js} +1 -1
- package/dist/client/assets/taskboard-analytics-BEBBYmzN.js +1 -0
- package/dist/client/assets/{tasks-Dcje4OJR.js → tasks-BS9sXVdl.js} +3 -3
- package/dist/client/assets/tasks-DckB4c8m.js +1 -0
- package/dist/client/assets/{textarea-DaHaRA0Z.js → textarea-bcNEcwC6.js} +1 -1
- package/dist/client/assets/thread-analytics-BE8EaB4a.js +1 -0
- package/dist/client/assets/thread-button-BdyWFdme.js +1 -0
- package/dist/client/assets/{thread-intent-Cxso0qKW.js → thread-intent-DzHkd78g.js} +4 -4
- package/dist/client/assets/thread-route-CIiqv6HG.js +1 -0
- package/dist/client/assets/thread-route-mhniW_q8.js +1 -0
- package/dist/client/assets/thread-sheet-body-C1CJm0mZ.js +1 -0
- package/dist/client/assets/time-range-picker-BUGifbSV.js +1 -0
- package/dist/client/assets/{toggle-group-BFX-9eHs.js → toggle-group-5iPAspL-.js} +1 -1
- package/dist/client/assets/{tool-namespace-BHB8Go32.js → tool-namespace-CYa7zzrf.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D9aCXzS4.js → toolbar-icon-button-CZBCq2Ko.js} +1 -1
- package/dist/client/assets/{tooltip-BULKkf4A.js → tooltip-XZmQWwgB.js} +1 -1
- package/dist/client/assets/{tooltipContext-1NNpJuJd.js → tooltipContext-BpyR0oly.js} +1 -1
- package/dist/client/assets/{track-CpjpKs1v.js → track-Ba2I9E5t.js} +1 -1
- package/dist/client/assets/{types-Blm6OQRg.js → types-2TlDAuAc.js} +3 -3
- package/dist/client/assets/{url-slug-d-Er1jOR.js → url-slug-B-L2Z8me.js} +1 -1
- package/dist/client/assets/{usage-stats-Dqycj-p-.js → usage-stats-BihPbkIg.js} +8 -8
- package/dist/client/assets/use-ai-providers-BP69qr77.js +1 -0
- package/dist/client/assets/use-automations-Biu6cV7d.js +1 -0
- package/dist/client/assets/{use-autosave-DBCPQM6l.js → use-autosave-9jHQ-y1f.js} +1 -1
- package/dist/client/assets/use-chat-layout-state-J-94EUwt.js +1 -0
- package/dist/client/assets/use-chat-navigation-BXZpM5MQ.js +1 -0
- package/dist/client/assets/{use-clock-tick-DGTQe72H.js → use-clock-tick-rPXqIJP8.js} +1 -1
- package/dist/client/assets/use-connect-companion-BupOmQ7x.js +1 -0
- package/dist/client/assets/use-connection-DUF3XC9E.js +1 -0
- package/dist/client/assets/{use-copy-CRIUfo35.js → use-copy-B01v9eRq.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DzmQH3J8.js → use-create-virtual-mcp-BxoXyDoq.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DIokBBqe.js → use-date-fns-locale-CPtrEugx.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BRSYFOGW.js → use-debounced-autosave-C__Xzre-.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DCB8Le0h.js → use-debounced-value-D5_QO1dT.js} +1 -1
- package/dist/client/assets/use-deco-credits-DkZSWK0d.js +1 -0
- package/dist/client/assets/{use-decopilot-events-uItZ_pJe.js → use-decopilot-events-1iPDcTcf.js} +1 -1
- package/dist/client/assets/use-delete-connection-DUG0172F.js +1 -0
- package/dist/client/assets/{use-deployment-admin-BSf-NdBG.js → use-deployment-admin-COeWRtXj.js} +1 -1
- package/dist/client/assets/use-ensure-project-folder-A0But3O1.js +1 -0
- package/dist/client/assets/{use-fast-preview-draft-url-8LcTSnsj.js → use-fast-preview-draft-url-BRdebqFC.js} +1 -1
- package/dist/client/assets/use-file-configs-B8mqylSR.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-B02yfFGd.js → use-infinite-scroll-DewChEmc.js} +1 -1
- package/dist/client/assets/use-join-requests-CDGwHERc.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-D7q-AygO.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-CUurQWMq.js +1 -0
- package/dist/client/assets/{use-mcp-client-MUIIizLf.js → use-mcp-client-Dh_4AZgb.js} +4 -4
- package/dist/client/assets/{use-mcp-prompts-C3siW74f.js → use-mcp-prompts-LJf01t7x.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CPLGkZB5.js → use-mcp-tools-p8MJKmfB.js} +1 -1
- package/dist/client/assets/use-members-DQe3FYGy.js +1 -0
- package/dist/client/assets/{use-mobile-DF1FX6Xv.js → use-mobile-UYmsi-dp.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-DDZo26Jw.js +1 -0
- package/dist/client/assets/use-new-blocks-editor-nCMzaJ9Q.js +1 -0
- package/dist/client/assets/{use-open-billing-url-CqJ0vDkP.js → use-open-billing-url-C0JU6CzN.js} +1 -1
- package/dist/client/assets/use-org-auth-client-CPbs0OVW.js +1 -0
- package/dist/client/assets/use-org-fs-gQ0RuIPK.js +1 -0
- package/dist/client/assets/use-org-repo-syncs-KkmagwRy.js +1 -0
- package/dist/client/assets/{use-org-sso-BEGhJLya.js → use-org-sso-DWtbATGD.js} +1 -1
- package/dist/client/assets/use-organization-roles-BKQWBZmO.js +1 -0
- package/dist/client/assets/use-organization-settings-xcc5-6DS.js +1 -0
- package/dist/client/assets/{use-panel-navigate-C4UE8Qkr.js → use-panel-navigate-A1obvdVI.js} +1 -1
- package/dist/client/assets/{use-project-scope-BMVXwaQ4.js → use-project-scope-BxCbtcTE.js} +1 -1
- package/dist/client/assets/use-releases-G79MSxhR.js +1 -0
- package/dist/client/assets/use-reports-diagnostic-a7ERyr_7.js +1 -0
- package/dist/client/assets/use-sandbox-events-CSN74_aC.js +2 -0
- package/dist/client/assets/use-secrets-CmTpPaF9.js +1 -0
- package/dist/client/assets/use-section-preview-base-DbQlCGNR.js +1 -0
- package/dist/client/assets/use-tags-Ch6_1it4.js +1 -0
- package/dist/client/assets/use-task-board-analytics-v7nFgyEB.js +1 -0
- package/dist/client/assets/{use-task-board-events-BDjHMnwS.js → use-task-board-events-DHjlo-9e.js} +1 -1
- package/dist/client/assets/use-task-board-item-prs-CoXnP9ys.js +1 -0
- package/dist/client/assets/use-task-board-items-erbHwxMh.js +1 -0
- package/dist/client/assets/use-task-metadata-DmWCG43J.js +1 -0
- package/dist/client/assets/{use-thread-analytics-DJQ2zz_B.js → use-thread-analytics-DJfFmK1j.js} +1 -1
- package/dist/client/assets/use-thread-outputs-7J4Ek_Zs.js +1 -0
- package/dist/client/assets/useInfiniteQuery-vZqvTY4f.js +1 -0
- package/dist/client/assets/{useQueries-DKVO6hGe.js → useQueries-DoURbZYb.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DdGuWYX3.js +1 -0
- package/dist/client/assets/{users-DbpeSClG.js → users-BfQBxfCk.js} +1 -1
- package/dist/client/assets/{utils-Cxy1EsFU.js → utils-DAEMarMy.js} +1 -1
- package/dist/client/assets/variant-calendar-DNADqO99.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BD9nzwGm.js → variant-matcher-override-BDRgB-Pq.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CVVPadaN.js → view-mode-toggle-DPJfZa3C.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CYDFCAA6.js → virtual-mcp-C54PVPPw.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BXtoXPGx.js → watch-sse-pool-DmOqvBBq.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +633 -633
- package/package.json +1 -1
- package/dist/client/assets/LinkExternal01-CILXo-bC.js +0 -1
- package/dist/client/assets/X-DzPShgV5.js +0 -1
- package/dist/client/assets/add-connection-dialog-Eph5CbUo.js +0 -1
- package/dist/client/assets/agent-analytics-DSdixv-f.js +0 -2
- package/dist/client/assets/agent-app-CT6U3s2r.js +0 -1
- package/dist/client/assets/agent-assets-G93-pOM9.js +0 -1
- package/dist/client/assets/agent-automation-DP6Bv0AB.js +0 -20
- package/dist/client/assets/agent-automations-YDqRnDcc.js +0 -1
- package/dist/client/assets/agent-connect-sources-CSrFX52j.js +0 -1
- package/dist/client/assets/agent-deck-D9Bphszm.js +0 -1
- package/dist/client/assets/agent-e2e-k9wCqssu.js +0 -1
- package/dist/client/assets/agent-experiments-CPSBbmYr.js +0 -1
- package/dist/client/assets/agent-file-BAkSJWMw.js +0 -1
- package/dist/client/assets/agent-hosting-B1Ag0zD8.js +0 -1
- package/dist/client/assets/agent-icon-CnnNyirr.js +0 -1
- package/dist/client/assets/agent-library-Ch3sHhuh.js +0 -1
- package/dist/client/assets/agent-library-file-Bq6m6SHP.js +0 -1
- package/dist/client/assets/agent-monitor-DyddEd79.js +0 -1
- package/dist/client/assets/agent-overview-BlP2a40h.js +0 -1
- package/dist/client/assets/agent-settings-CaxlA04S.js +0 -1
- package/dist/client/assets/agent-site-editor-code-D0j_GVVh.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-DaqE_qX4.js +0 -518
- package/dist/client/assets/agent-view-UQmbv7nk.js +0 -1
- package/dist/client/assets/agents-list-CJcm3Kq8.js +0 -1
- package/dist/client/assets/api-keys-BjTJSB_i.js +0 -1
- package/dist/client/assets/api-keys-BrfzhtIS.js +0 -1
- package/dist/client/assets/app-editor-CJudcxBz.js +0 -1
- package/dist/client/assets/asset-utils-Cdgz7yau.js +0 -1
- package/dist/client/assets/auth-entry-BUqhj_6T.js +0 -1
- package/dist/client/assets/authenticate-and-persist-oauth-eDHShxj5.js +0 -1
- package/dist/client/assets/automation-runs-BZA4OsIt.js +0 -1
- package/dist/client/assets/automations-DpWIQ3oV.js +0 -1
- package/dist/client/assets/autosend-BQ3F90GX.js +0 -1
- package/dist/client/assets/buckets-AVx7AXso.js +0 -1
- package/dist/client/assets/capability-load-error-BVlvKXjS.js +0 -1
- package/dist/client/assets/category-editor-B-jccGXu.js +0 -1
- package/dist/client/assets/chat-context-UMp8QwjT.js +0 -39
- package/dist/client/assets/chat-draft-CYy-Qv-a.js +0 -1
- package/dist/client/assets/choose-editor-BDo9cuNm.js +0 -1
- package/dist/client/assets/claim-phase-copy-DG8E1-gc.js +0 -1
- package/dist/client/assets/collection-detail-CBqQPzi0.js +0 -1
- package/dist/client/assets/collection-display-button-XaptFv9u.js +0 -1
- package/dist/client/assets/column-rules-Bq3eiowV.js +0 -3
- package/dist/client/assets/command-Doiz3O29.js +0 -1
- package/dist/client/assets/config-B01oZvpJ.js +0 -1
- package/dist/client/assets/connect-layout-CoxrwG6t.js +0 -1
- package/dist/client/assets/connection-card-Cvk5T5vt.js +0 -1
- package/dist/client/assets/connection-detail-BRdQkO7d.js +0 -1
- package/dist/client/assets/connection-form-helpers-D4Q7rLyt.js +0 -1
- package/dist/client/assets/connections-C8qSBDCe.js +0 -1
- package/dist/client/assets/context-Bt7kDQzj.js +0 -1
- package/dist/client/assets/create-organization-dialog-D-t_ZE2o.js +0 -1
- package/dist/client/assets/daily-pulse-DYPs4tl1.js +0 -1
- package/dist/client/assets/device-hint-CbxzMdRC.js +0 -1
- package/dist/client/assets/dialog-DRpbbWU1.js +0 -1
- package/dist/client/assets/discover-3ATGdKP8.js +0 -1
- package/dist/client/assets/domain-settings-C4-yAgIW.js +0 -1
- package/dist/client/assets/feature-paywall-0RYA-1Op.js +0 -1
- package/dist/client/assets/file-explorer-Cyg7RguR.js +0 -2
- package/dist/client/assets/file-share-button-C8ZBUx_e.js +0 -3
- package/dist/client/assets/flat-project-BpQGs-gN.js +0 -1
- package/dist/client/assets/general-B3jgLFML.js +0 -1
- package/dist/client/assets/home-DYCk_i5V.js +0 -1
- package/dist/client/assets/index-Cx0uPPmh.js +0 -1
- package/dist/client/assets/index-qeM6EfxB.js +0 -1
- package/dist/client/assets/infra-billing-BFh6IlFL.js +0 -1
- package/dist/client/assets/input-B0doV0os.js +0 -1
- package/dist/client/assets/input-BQ74PHN6.js +0 -1
- package/dist/client/assets/jira-icon-C1bLqdEg.js +0 -1
- package/dist/client/assets/legacy-agents-deep-BBjNU_wv.js +0 -1
- package/dist/client/assets/library-CVuXHyjV.js +0 -1
- package/dist/client/assets/login-DNhk4MX6.js +0 -1
- package/dist/client/assets/mcp-oauth-C5T-IVs8.js +0 -1
- package/dist/client/assets/members-BftWOm2t.js +0 -1
- package/dist/client/assets/mustache-D-VzFUJG.js +0 -4
- package/dist/client/assets/new-project-dialog-CXEwhrv6.js +0 -1
- package/dist/client/assets/onboarding-BisuojYF.js +0 -1
- package/dist/client/assets/openai-conversation-BICNFmxp.js +0 -3
- package/dist/client/assets/optimistic-project-sidebar-views-BINKTU3_.js +0 -1
- package/dist/client/assets/orgs-DCjydoUZ.js +0 -1
- package/dist/client/assets/pair-knnOGTuF.js +0 -47
- package/dist/client/assets/plan-ladder-DlpzxobM.js +0 -1
- package/dist/client/assets/post-calendar-3X9xGSKe.js +0 -1
- package/dist/client/assets/post-editor-BS-N2LHp.js +0 -2
- package/dist/client/assets/preview-content-CWMTMNmp.js +0 -1
- package/dist/client/assets/preview-dialog-CmtjgV1o.js +0 -1
- package/dist/client/assets/product-picker-dialog-904WCGJu.js +0 -1
- package/dist/client/assets/profile-aIUaVWtC.js +0 -1
- package/dist/client/assets/project-app-view-ChZmhZ13.js +0 -1
- package/dist/client/assets/project-feed-t8IHFF-d.js +0 -1
- package/dist/client/assets/project-reports-BF24m5b-.js +0 -1
- package/dist/client/assets/project-tasks-Wmmy6hRq.js +0 -1
- package/dist/client/assets/projects-CxEhyr52.js +0 -1
- package/dist/client/assets/prompts-Cad3gM_K.js +0 -1
- package/dist/client/assets/record-editor-Cu0LbDVm.js +0 -1
- package/dist/client/assets/redirect-editor-B65ggNrM.js +0 -1
- package/dist/client/assets/reports-B3_ASbsZ.js +0 -1
- package/dist/client/assets/reports-onboarding-DzC8BMPj.js +0 -1
- package/dist/client/assets/reports-tab-flC8aPMq.js +0 -2
- package/dist/client/assets/repositories-BRVHvY5X.js +0 -1
- package/dist/client/assets/repository-binding-DpX8yLri.js +0 -1
- package/dist/client/assets/repository-import-picker-CO5nKRxA.js +0 -1
- package/dist/client/assets/repository-picker-C2HnHK1A.js +0 -1
- package/dist/client/assets/require-capability-Do1773Hs.js +0 -1
- package/dist/client/assets/reset-password-Dh0gWEkU.js +0 -1
- package/dist/client/assets/review-settings-C9jJxNAv.js +0 -1
- package/dist/client/assets/roles-BOnFVbcr.js +0 -1
- package/dist/client/assets/route-Bvv7axF1.js +0 -1
- package/dist/client/assets/route-DNZvy3kt.js +0 -1
- package/dist/client/assets/route-DdkXah7z.js +0 -1
- package/dist/client/assets/sandbox-lifecycle-context-BJE24h7z.js +0 -1
- package/dist/client/assets/search-toggle-Br3rmrbk.js +0 -1
- package/dist/client/assets/secrets-t0Aczfol.js +0 -1
- package/dist/client/assets/sections-editor-CEBB7XW8.js +0 -1
- package/dist/client/assets/select-model-ER05JMp8.js +0 -1
- package/dist/client/assets/seo-editor-DHXJaGsL.js +0 -1
- package/dist/client/assets/settings-tab-CTiWw7bm.js +0 -4
- package/dist/client/assets/sheet-Gpaizien.js +0 -1
- package/dist/client/assets/shell-layout-B0-NcUCt.js +0 -1
- package/dist/client/assets/skills-BHEjjAUu.js +0 -1
- package/dist/client/assets/sso-Dgg4nP6H.js +0 -1
- package/dist/client/assets/synced-repos-B1QJsQos.js +0 -1
- package/dist/client/assets/taskboard-analytics-C5y5DQZh.js +0 -1
- package/dist/client/assets/tasks-B6PT7ia3.js +0 -1
- package/dist/client/assets/thread-analytics-5o8rlytc.js +0 -1
- package/dist/client/assets/thread-button-DwjwmudD.js +0 -1
- package/dist/client/assets/thread-route-BcAw7-v0.js +0 -1
- package/dist/client/assets/thread-route-CW2be8Kx.js +0 -1
- package/dist/client/assets/thread-sheet-body-B6geJ00B.js +0 -1
- package/dist/client/assets/time-range-picker-Bu58tMJr.js +0 -1
- package/dist/client/assets/use-ai-providers-C1bb7SnA.js +0 -1
- package/dist/client/assets/use-automations-zlAoF9SL.js +0 -1
- package/dist/client/assets/use-chat-layout-state-DDDFQN6Y.js +0 -1
- package/dist/client/assets/use-chat-navigation-BF9opsK8.js +0 -1
- package/dist/client/assets/use-connect-companion-DcLSyBxl.js +0 -1
- package/dist/client/assets/use-connection-5LUEsGlJ.js +0 -1
- package/dist/client/assets/use-deco-credits-BgPf-IIH.js +0 -1
- package/dist/client/assets/use-delete-connection-BLZ4VLoa.js +0 -1
- package/dist/client/assets/use-ensure-project-folder-BUpbRP81.js +0 -1
- package/dist/client/assets/use-file-configs-By7UB_YZ.js +0 -1
- package/dist/client/assets/use-join-requests-Cb1ihQM1.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-xXeWrfnF.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-B-gyzfqG.js +0 -1
- package/dist/client/assets/use-members-vjX9lJhj.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-p65xWFDF.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-DZnaAqkX.js +0 -1
- package/dist/client/assets/use-org-auth-client-CuZ7oLTb.js +0 -1
- package/dist/client/assets/use-org-fs-DPxqVRhB.js +0 -1
- package/dist/client/assets/use-org-repo-syncs-BG16MD5Q.js +0 -1
- package/dist/client/assets/use-organization-roles-DOROP0yS.js +0 -1
- package/dist/client/assets/use-organization-settings-CB0-LYjl.js +0 -1
- package/dist/client/assets/use-releases-DO5M1M4y.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-C3LmmHKo.js +0 -1
- package/dist/client/assets/use-sandbox-events-E2bKOQlM.js +0 -2
- package/dist/client/assets/use-secrets-C2sdbGJM.js +0 -1
- package/dist/client/assets/use-section-preview-base-26sYGS0B.js +0 -1
- package/dist/client/assets/use-tags-CFN9IU6i.js +0 -1
- package/dist/client/assets/use-task-board-analytics-BmwRnCgb.js +0 -1
- package/dist/client/assets/use-task-board-item-prs-DY1JtBFR.js +0 -1
- package/dist/client/assets/use-task-board-items-DUgOnZAe.js +0 -1
- package/dist/client/assets/use-task-metadata-BCqsxDXx.js +0 -1
- package/dist/client/assets/use-thread-outputs-DfIiLAuO.js +0 -1
- package/dist/client/assets/useInfiniteQuery-eYXaZ_bo.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-i_drPWHc.js +0 -1
- package/dist/client/assets/variant-calendar-BR3Tvz7m.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as q,l as le,j as t,al as Us,b as be,r as L,a2 as Ms,a9 as Cs,h as pa,Z as xa,B as ee,t as pe}from"./index-D_7jfHk6.js";import{s as ga}from"./thread-intent-Cxso0qKW.js";import{I as Vs,_ as ua,N as ba,n as ha,a5 as ks}from"./agent-icon-CnnNyirr.js";import{s as ht,i as fa}from"./UserSquare-BMOlWqCu.js";import{B as ut}from"./badge-CKM84j2S.js";import{I as J}from"./input-B0doV0os.js";import{L as I}from"./label-DxOPcXJe.js";import{S as ja}from"./switch-hSsSQMgC.js";import{T as xt}from"./textarea-DaHaRA0Z.js";import{D as Ut,b as Mt,c as us,d as Vt,h as _s,e as va,a as ya}from"./dialog-DRpbbWU1.js";import{a as bs,b as hs,P as fs}from"./popover-C2vJrXky.js";import{R as _t,A as jt,L as Na,M as js,N as Xs,w as Ws,O as Ca,Q as ka,S as wa,T as Ba,U as ms,V as rs,X as is,Y as Gt,Z as ws,_ as $t,$ as Ys,a0 as Ht,c as Z,a1 as Bs,a2 as Ss,a3 as Sa,a4 as Ps,a5 as Es,a6 as Ot,G as Pa,a7 as Ts,a8 as Ea,a9 as Ta,aa as Da,ab as La,ac as Ds,ad as Aa,ae as Ra,af as Ga,ag as Oa,ah as Ls,ai as Fa,aj as Ia,ak as za,al as As,am as $a,an as Ha}from"./agent-site-editor-content-EotWUMUT.js";import{u as Js}from"./use-ai-providers-C1bb7SnA.js";import{az as Ka,u as qs,aw as Qs}from"./runnable-block-editor-BWSWYcJ-.js";import{j as Ua}from"./claim-phase-copy-DG8E1-gc.js";import{u as Kt}from"./use-autosave-DBCPQM6l.js";import{i as Zs}from"./X-DzPShgV5.js";import{u as Ma}from"./use-debounced-value-DCB8Le0h.js";import{g as Va}from"./index-C-3lNbMm.js";import{t as ea}from"./ChevronUp-CceLPRrE.js";import{i as _a}from"./SwitchHorizontal01-Bx3d-jDI.js";import{s as Xa}from"./Plus-nldAzVeQ.js";import{s as ta}from"./Trash01-DAoFHSpp.js";import{u as Wa}from"./mustache-D-VzFUJG.js";import{f as Ya,e as Ja,b as qa,A as Qa,a as Za,d as en,c as tn,g as sn}from"./alert-dialog-kjq4dW3k.js";import{C as an}from"./calendar-DaaBbvOH.js";import{P as nn,r as sa,C as on}from"./product-picker-dialog-904WCGJu.js";import"./use-mcp-client-MUIIizLf.js";import"./auth-Cps-90jQ.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BXtoXPGx.js";import"./task-board-ChFrokIN.js";import"./schema-D1veJPjJ.js";import"./slugify-CEUa2lfQ.js";import"./AlertCircle-C3fpFT5I.js";import"./Tool01-Blw6F5iV.js";import"./ArrowUp-DR-Jhbl1.js";import"./ArrowLeft-C1IFj0Ic.js";import"./LinkBroken01-kK_na_OL.js";import"./ShoppingBag01-o0DdjJD9.js";import"./ZoomOut-CQckFmS9.js";import"./Building02-uHT4KVtK.js";import"./CheckCircle-BKHstO_Q.js";import"./ChevronSelectorVertical-DAO6R1Op.js";import"./Copy01-Dx3ZT0bA.js";import"./CreditCard01-Dko0T335.js";import"./DotsVertical-aHYBPlin.js";import"./Image01-Cxa392ef.js";import"./Globe04-BDe-0jS0.js";import"./Key01-BHiUNW_5.js";import"./Link01-BRZRc4wX.js";import"./LinkExternal01-CILXo-bC.js";import"./Monitor01-Cl4JLYVa.js";import"./Sun-BYGxydmh.js";import"./Play-CzTcIQz_.js";import"./SearchMd-BiZNveM1.js";import"./Upload01-CtKBhqsv.js";import"./User01-Awky2MVQ.js";import"./Users01-D7ZFKC4W.js";import"./XClose-DBJ7sD1T.js";import"./agent-view-guard-Bf5Bn5K4.js";import"./use-main-panel-tabs-xXeWrfnF.js";import"./use-chat-layout-state-DDDFQN6Y.js";import"./use-file-configs-By7UB_YZ.js";import"./use-organization-settings-CB0-LYjl.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-DpX8yLri.js";import"./thread-route-CW2be8Kx.js";import"./use-panel-navigate-C4UE8Qkr.js";import"./use-project-scope-BMVXwaQ4.js";import"./use-connection-5LUEsGlJ.js";import"./use-mcp-tools-CPLGkZB5.js";import"./types-Blm6OQRg.js";import"./utils-CVEq3hMx.js";import"./use-sandbox-events-E2bKOQlM.js";import"./chat-context-UMp8QwjT.js";import"./autosend-BQ3F90GX.js";import"./use-decopilot-events-uItZ_pJe.js";import"./use-chat-navigation-BF9opsK8.js";import"./location-BjlyegC2.js";import"./tool-namespace-BHB8Go32.js";import"./tooltip-BULKkf4A.js";import"./index-D1CuHcEn.js";import"./drawer-CXs6iEYK.js";import"./collection-search-BoB9COGX.js";import"./use-mobile-DF1FX6Xv.js";import"./use-mcp-prompts-C3siW74f.js";import"./usage-stats-Dqycj-p-.js";import"./form-BBtB5neb.js";import"./markdown-6zdu9t3J.js";import"./use-copy-CRIUfo35.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./input-DQp1LVsq.js";import"./icon-button-BiR7Hy07.js";import"./file-type-icon-Du5QihE_.js";import"./shell-layout-B0-NcUCt.js";import"./avatar-TL9HUab0.js";import"./use-clock-tick-DGTQe72H.js";import"./command-Doiz3O29.js";import"./index-DltLvtZg.js";import"./integration-icon-BM3EOzpn.js";import"./project-icon-DU1uywdD.js";import"./new-project-dialog-CXEwhrv6.js";import"./repository-import-picker-CO5nKRxA.js";import"./use-navigate-to-agent-p65xWFDF.js";import"./repository-picker-C2HnHK1A.js";import"./useInfiniteQuery-eYXaZ_bo.js";import"./infiniteQueryObserver-DG8sBe4B.js";import"./required-auth-layout-CDif9NZC.js";import"./use-org-sso-BEGhJLya.js";import"./chat-draft-CYy-Qv-a.js";import"./select-CZdnCwuC.js";import"./index-BdQq_4o_.js";import"./tabs-Df848FrP.js";import"./use-deco-credits-BgPf-IIH.js";import"./toggle-group-BFX-9eHs.js";import"./use-open-billing-url-CqJ0vDkP.js";import"./index-BvwJHqHQ.js";import"./checkbox-B2kVXKBD.js";import"./ai-providers-logos-DD3qZ33J.js";import"./input-BQ74PHN6.js";import"./suggestion-DmBBrXFD.js";import"./use-org-fs-DPxqVRhB.js";import"./question-004-sINsf4GQ.js";import"./use-members-vjX9lJhj.js";import"./use-org-auth-client-CuZ7oLTb.js";import"./feature-paywall-0RYA-1Op.js";import"./plan-ladder-DlpzxobM.js";import"./add-connection-dialog-Eph5CbUo.js";import"./extract-connection-data-Q_j_fmQx.js";import"./metadata-D72DunRR.js";import"./connection-FKmTBjan.js";import"./url-slug-d-Er1jOR.js";import"./connection-card-Cvk5T5vt.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-D4Q7rLyt.js";import"./authenticate-and-persist-oauth-eDHShxj5.js";import"./mcp-oauth-C5T-IVs8.js";import"./collection-tabs-Cw7XLgNG.js";import"./use-infinite-scroll-B02yfFGd.js";import"./useSuspenseInfiniteQuery-i_drPWHc.js";import"./use-task-board-events-BDjHMnwS.js";import"./pair-knnOGTuF.js";import"./collapsible-vN3Y9B-p.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-D5zA7BfR.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-Gpaizien.js";import"./use-thread-outputs-DfIiLAuO.js";import"./sandbox-url-D3mC8qhT.js";import"./resolve-tab-icon-S311kwwr.js";import"./use-task-metadata-BCqsxDXx.js";import"./virtual-mcp-CYDFCAA6.js";import"./feature-gate-CFL9eB8c.js";import"./scroll-area-Ce9NeF1s.js";import"./sandbox-lifecycle-context-BJE24h7z.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./sandbox-git-api-C7JbVL7R.js";import"./utils-Cxy1EsFU.js";import"./empty-state-D45gZaZ-.js";import"./monaco-editor-BfKI4VlA.js";import"./editor-CPkkN1Zr.js";import"./core.esm-DbclD67Y.js";import"./sortable.esm-DyjKGVzh.js";import"./empty-state-DnQ_qEjI.js";import"./use-new-blocks-editor-DZnaAqkX.js";import"./rich-text-link-control-CMeXviAY.js";import"./combobox-PSOtDaya.js";import"./search-input-DpJBHwWo.js";import"./asset-utils-Cdgz7yau.js";import"./index-D8mID9PZ.js";import"./get-initials-D-f_fDFw.js";function ps(f){const e=q.c(2),{children:n}=f;let r;return e[0]!==n?(r=t.jsx("ul",{className:"divide-y overflow-hidden rounded-lg border",children:n}),e[0]=n,e[1]=r):r=e[1],r}function xs(f){const e=q.c(22),{open:n,onToggle:r,title:l,untitledLabel:m,removeLabel:o,onRemove:a,leading:i,children:p}=f;let s;e[0]!==n?(s=n?t.jsx(ea,{size:14,className:"shrink-0"}):t.jsx(Us,{size:14,className:"shrink-0 text-muted-foreground"}),e[0]=n,e[1]=s):s=e[1];const u=!l&&"text-muted-foreground";let c;e[2]!==u?(c=le("truncate",u),e[2]=u,e[3]=c):c=e[3];const j=l||m;let b;e[4]!==c||e[5]!==j?(b=t.jsx("span",{className:c,children:j}),e[4]=c,e[5]=j,e[6]=b):b=e[6];let C;e[7]!==i||e[8]!==r||e[9]!==n||e[10]!==s||e[11]!==b?(C=t.jsxs("button",{type:"button",onClick:r,"aria-expanded":n,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 px-3 py-2.5 text-left text-sm transition-colors hover:bg-muted/50",children:[s,i,b]}),e[7]=i,e[8]=r,e[9]=n,e[10]=s,e[11]=b,e[12]=C):C=e[12];let y;e[13]!==a||e[14]!==o?(y=t.jsx(_t,{label:o,onClick:a}),e[13]=a,e[14]=o,e[15]=y):y=e[15];let k;e[16]!==C||e[17]!==y?(k=t.jsxs("div",{className:"flex items-center gap-1 pr-2",children:[C,y]}),e[16]=C,e[17]=y,e[18]=k):k=e[18];const P=n&&p;let A;return e[19]!==k||e[20]!==P?(A=t.jsxs("li",{className:"group/item bg-card",children:[k,P]}),e[19]=k,e[20]=P,e[21]=A):A=e[21],A}function vs(f){const e=q.c(24),{terms:n,onChange:r,placeholder:l,removeLabel:m}=f,[o,a]=L.useState("");let i;e[0]!==r||e[1]!==n?(i=y=>{const k=y.split(",").map(ln).filter(P=>P&&!n.includes(P));k.length>0&&r([...n,...k]),a("")},e[0]=r,e[1]=n,e[2]=i):i=e[2];const p=i;let s;e[3]!==r||e[4]!==m||e[5]!==n?(s=n.length>0&&t.jsx("ul",{className:"flex flex-wrap gap-1.5",children:n.map((y,k)=>t.jsx("li",{children:t.jsxs(ut,{variant:"secondary",className:"gap-1 pr-1",children:[t.jsx("span",{className:"truncate",children:y}),t.jsx("button",{type:"button","aria-label":`${m}: ${y}`,onClick:()=>r(n.filter((P,A)=>A!==k)),className:"cursor-pointer rounded-sm p-0.5 hover:bg-foreground/10",children:t.jsx(Zs,{size:11})})]})},`${y}-${k}`))}),e[3]=r,e[4]=m,e[5]=n,e[6]=s):s=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=y=>a(y.target.value),e[7]=u):u=e[7];let c;e[8]!==p||e[9]!==o?(c=()=>p(o),e[8]=p,e[9]=o,e[10]=c):c=e[10];let j;e[11]!==p||e[12]!==o||e[13]!==r||e[14]!==n?(j=y=>{if(y.key==="Enter"||y.key===","){y.preventDefault(),p(o);return}y.key==="Backspace"&&o===""&&n.length>0&&r(n.slice(0,-1))},e[11]=p,e[12]=o,e[13]=r,e[14]=n,e[15]=j):j=e[15];let b;e[16]!==o||e[17]!==l||e[18]!==c||e[19]!==j?(b=t.jsx(J,{value:o,placeholder:l,onChange:u,onBlur:c,onKeyDown:j,className:"border-0 shadow-none focus-visible:ring-0"}),e[16]=o,e[17]=l,e[18]=c,e[19]=j,e[20]=b):b=e[20];let C;return e[21]!==s||e[22]!==b?(C=t.jsxs("div",{className:"space-y-2 rounded-lg border bg-card p-2",children:[s,b]}),e[21]=s,e[22]=b,e[23]=C):C=e[23],C}function ln(f){return f.trim()}function gs(f){const e=q.c(40),{rules:n,onChange:r,revision:l,idPrefix:m,add:o,namePlaceholder:a,bodyPlaceholder:i,mentions:p,citationWarning:s}=f,u=be(),[c,j]=L.useState(null);let b;e[0]!==r||e[1]!==n?(b=(v,w)=>r(n.map((E,$)=>$===v?{...E,...w}:E)),e[0]=r,e[1]=n,e[2]=b):b=e[2];const C=b;let y;e[3]!==r||e[4]!==n?(y=v=>{r(n.filter((w,E)=>E!==v)),j(w=>w===null||w<v?w:null)},e[3]=r,e[4]=n,e[5]=y):y=e[5];const k=y;let P;if(e[6]!==i||e[7]!==s||e[8]!==m||e[9]!==p||e[10]!==a||e[11]!==c||e[12]!==k||e[13]!==C||e[14]!==l||e[15]!==n||e[16]!==u){let v;e[18]!==i||e[19]!==s||e[20]!==m||e[21]!==p||e[22]!==a||e[23]!==c||e[24]!==k||e[25]!==C||e[26]!==l||e[27]!==u?(v=(w,E)=>t.jsx(xs,{open:c===E,onToggle:()=>j(c===E?null:E),title:w.name,untitledLabel:u("sandbox.blogBrand.untitledRule"),removeLabel:u("sandbox.blogBrand.removeItem"),onRemove:()=>k(E),children:t.jsx(cn,{rule:w,editorKey:`${m}-${E}-${l}`,namePlaceholder:a,bodyPlaceholder:i,mentions:p,citationWarning:s,onPatch:$=>C(E,$)})},E),e[18]=i,e[19]=s,e[20]=m,e[21]=p,e[22]=a,e[23]=c,e[24]=k,e[25]=C,e[26]=l,e[27]=u,e[28]=v):v=e[28],P=n.map(v),e[6]=i,e[7]=s,e[8]=m,e[9]=p,e[10]=a,e[11]=c,e[12]=k,e[13]=C,e[14]=l,e[15]=n,e[16]=u,e[17]=P}else P=e[17];let A;e[29]!==P?(A=t.jsx(ps,{children:P}),e[29]=P,e[30]=A):A=e[30];let z;e[31]!==r||e[32]!==n?(z=()=>{r([...n,{name:"",value:""}]),j(n.length)},e[31]=r,e[32]=n,e[33]=z):z=e[33];let O;e[34]!==o||e[35]!==z?(O=t.jsx(jt,{label:o,onClick:z}),e[34]=o,e[35]=z,e[36]=O):O=e[36];let R;return e[37]!==A||e[38]!==O?(R=t.jsxs("div",{className:"space-y-2",children:[A,O]}),e[37]=A,e[38]=O,e[39]=R):R=e[39],R}const rn=600;function cn(f){const e=q.c(23),{rule:n,editorKey:r,namePlaceholder:l,bodyPlaceholder:m,mentions:o,citationWarning:a,onPatch:i}=f,p=Ma(n.value,rn);let s;e[0]!==a||e[1]!==p?(s=a?.(p),e[0]=a,e[1]=p,e[2]=s):s=e[2];const u=s;let c;e[3]!==i?(c=P=>i({name:P.target.value}),e[3]=i,e[4]=c):c=e[4];let j;e[5]!==l||e[6]!==n.name||e[7]!==c?(j=t.jsx(J,{value:n.name,placeholder:l,onChange:c,className:"h-9 font-medium"}),e[5]=l,e[6]=n.name,e[7]=c,e[8]=j):j=e[8];let b;e[9]!==i?(b=P=>i({value:P}),e[9]=i,e[10]=b):b=e[10];let C;e[11]!==m||e[12]!==r||e[13]!==o||e[14]!==n.value||e[15]!==b?(C=t.jsx(Va,{defaultValue:n.value,placeholder:m,attachments:!1,mentions:o,onChange:b},r),e[11]=m,e[12]=r,e[13]=o,e[14]=n.value,e[15]=b,e[16]=C):C=e[16];let y;e[17]!==u?(y=u&&t.jsx("p",{className:"text-xs text-warning",children:u}),e[17]=u,e[18]=y):y=e[18];let k;return e[19]!==j||e[20]!==C||e[21]!==y?(k=t.jsxs("div",{className:"space-y-3 border-t bg-background px-3 py-3",children:[j,C,y]}),e[19]=j,e[20]=C,e[21]=y,e[22]=k):k=e[22],k}const Rs=[{id:"seed",label:"sandbox.campaignGen.stepSeed"},{id:"running",label:"sandbox.campaignGen.stepRunning"},{id:"pick",label:"sandbox.campaignGen.stepPick"}],dn={strong:"sandbox.campaignGen.verdictStrong",workable:"sandbox.campaignGen.verdictWorkable",weak:"sandbox.campaignGen.verdictWeak"},mn={strong:"default",workable:"secondary",weak:"outline"},pn=["sandbox.campaignGen.phaseReading","sandbox.campaignGen.phaseWriting","sandbox.campaignGen.phaseReviewing"],xn={"no-site":"sandbox.campaignGen.gapNoSite","no-tools":"sandbox.campaignGen.gapNoTools","timeout-partial":"sandbox.campaignGen.gapTimeoutPartial","timeout-empty":"sandbox.campaignGen.gapTimeoutEmpty",failed:"sandbox.campaignGen.gapFailed","nothing-useful":"sandbox.campaignGen.gapNothingUseful","targets-dropped":"sandbox.campaignGen.gapTargetsDropped","products-dropped":"sandbox.campaignGen.gapProductsDropped"};function gn({open:f,onOpenChange:e,decofile:n,virtualMcpId:r,hasAi:l,onCreate:m}){const o=be(),{call:a}=Ms(),[i,p]=L.useState("seed"),[s,u]=L.useState(null),[c,j]=L.useState(""),[b,C]=L.useState([]),[y,k]=L.useState(""),[P,A]=L.useState(3),[z,O]=L.useState(0),[R,v]=L.useState(null),[w,E]=L.useState(new Set),[$,X]=L.useState(!1),Q=Na(n),re=js(n).map(d=>d.name).filter(Boolean),U=Xs(Ws(n).merged),M=Rs.findIndex(d=>d.id===i),te=y.trim().length>0&&l;function se(){p("seed"),u(null),j(""),C([]),k(""),A(3),O(0),v(null),E(new Set),X(!1)}function W(d){d||se(),e(d)}function H(d){u(d.key),j(d.name),C(d.keywords),k(d.prompt)}async function _(){p("running"),O(0);try{const d=await a("BLOG_SITE_GROUND",{virtualMcpId:r,purpose:"campaign",focus:y,language:U.language}).catch(T=>{console.warn("[campaignGen] grounding failed",T)}),B=d?await a("BLOG_SITE_CATALOGUE",{grounding:{report:d.report,outcome:d.outcome,evidence:d.evidence||void 0,evidenceUri:d.evidenceUri},storeUrl:U.storeUrl}).catch(T=>{console.warn("[campaignGen] reading the catalogue failed",T)}):void 0;O(1);const D=await a("BLOG_CAMPAIGN_SUGGEST",{seed:{keywords:b,prompt:y},brand:U,existingNames:re,count:P,virtualMcpId:r,grounding:d?{report:d.report,outcome:d.outcome}:void 0,catalogue:B?.read?{products:B.products,targets:B.targets}:void 0});O(2),v(D),E(new Set(D.campaigns.map((T,ie)=>ie))),p("pick")}catch(d){pe.error(d instanceof Error?d.message:o("sandbox.campaignGen.failed")),p("seed")}}async function h(){if(!R)return;const d=R.campaigns.filter((B,D)=>w.has(D));if(d.length!==0){X(!0);try{const B=new Date;await m({key:s??ka(),entry:{...Ca(B),name:c||y.slice(0,60),keywords:b,prompt:y}},d),W(!1)}catch(B){pe.error(B instanceof Error?B.message:o("sandbox.campaignGen.failed")),X(!1)}}}return t.jsx(Ut,{open:f,onOpenChange:W,children:t.jsxs(Mt,{className:"flex max-h-[85vh] flex-col sm:max-w-2xl",children:[t.jsxs(us,{children:[t.jsx(Vt,{children:o("sandbox.campaignGen.title")}),t.jsx(_s,{children:o("sandbox.campaignGen.subtitle")})]}),t.jsx("ol",{className:"flex shrink-0 items-center gap-1.5 text-xs",children:Rs.map((d,B)=>t.jsx("li",{className:le("rounded-md px-2 py-1",B===M?"bg-primary text-primary-foreground":B<M?"text-foreground":"text-muted-foreground"),children:o(d.label)},d.id))}),t.jsxs("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto py-1",children:[i==="seed"&&t.jsxs(t.Fragment,{children:[Q.length>0&&t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(I,{children:o("sandbox.campaignGen.savedSeeds")}),t.jsx("ul",{className:"divide-y overflow-hidden rounded-lg border",children:Q.map(d=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>H(d),className:le("flex w-full cursor-pointer flex-col gap-0.5 px-3 py-2 text-left text-sm transition-colors hover:bg-muted/50",s===d.key&&"bg-muted/60"),children:[t.jsx("span",{className:"truncate font-medium",children:d.name||o("sandbox.campaignGen.untitledSeed")}),t.jsx("span",{className:"truncate text-xs text-muted-foreground",children:d.prompt})]})},d.key))})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(I,{htmlFor:"seed-name",children:o("sandbox.campaignGen.seedNameLabel")}),t.jsx(J,{id:"seed-name",value:c,placeholder:o("sandbox.campaignGen.seedNamePlaceholder"),onChange:d=>j(d.target.value)})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(I,{htmlFor:"seed-prompt",children:o("sandbox.campaignGen.promptLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.campaignGen.promptHint")}),t.jsx(xt,{id:"seed-prompt",value:y,rows:4,placeholder:o("sandbox.campaignGen.promptPlaceholder"),onChange:d=>k(d.target.value)})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(I,{children:o("sandbox.campaignGen.keywordsLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.campaignGen.keywordsHint")}),t.jsx(vs,{terms:b,onChange:C,placeholder:o("sandbox.campaignGen.keywordsPlaceholder"),removeLabel:o("sandbox.campaignGen.removeKeyword")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(I,{htmlFor:"seed-count",children:o("sandbox.campaignGen.countLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.campaignGen.countHint")}),t.jsx(J,{id:"seed-count",type:"number",min:1,max:3,value:P,onChange:d=>A(Math.min(3,Math.max(1,Number(d.target.value)||1))),className:"w-24"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.postBoard.usesCredits")})]})]}),i==="running"&&t.jsx("ul",{className:"space-y-3 py-6",children:pn.map((d,B)=>t.jsxs("li",{className:le("flex items-center gap-2 text-sm",B>z&&"text-muted-foreground"),children:[B<z?t.jsx(Cs,{size:14,className:"text-success"}):B===z?t.jsx(pa,{size:"xs"}):t.jsx("span",{className:"size-3.5"}),o(d)]},d))}),i==="pick"&&R&&t.jsxs(t.Fragment,{children:[R.gaps.length>0&&t.jsxs("div",{className:"flex gap-2 rounded-lg border border-warning/40 bg-warning/5 p-3",children:[t.jsx(xa,{size:14,className:"mt-0.5 shrink-0 text-warning"}),t.jsx("ul",{className:"space-y-1 text-xs text-muted-foreground",children:R.gaps.map(d=>t.jsx("li",{children:o(xn[d.code],{count:d.count??0})},d.code))})]}),R.campaigns.length===0?t.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:o("sandbox.campaignGen.noCandidates")}):t.jsx("ul",{className:"space-y-2",children:R.campaigns.map((d,B)=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>E(D=>{const T=new Set(D);return T.has(B)?T.delete(B):T.add(B),T}),className:le("w-full cursor-pointer space-y-2 rounded-lg border p-3 text-left transition-colors",w.has(B)?"border-primary bg-primary/5":"bg-card hover:bg-muted/40"),children:[t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("span",{className:le("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded border",w.has(B)&&"border-primary bg-primary text-primary-foreground"),children:w.has(B)&&t.jsx(Cs,{size:11})}),t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:d.name}),t.jsx(ut,{variant:mn[d.review.verdict],children:o(dn[d.review.verdict])})]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:[o("sandbox.campaignGen.cardSummary",{targets:String(d.intent.targets.length),products:String(d.intent.products.length)}),d.period.start||d.period.end?` · ${d.period.start??"—"} / ${d.period.end??"—"}`:""]}),d.review.rationale&&t.jsx("p",{className:"text-xs text-muted-foreground",children:d.review.rationale}),d.review.risks.length>0&&t.jsx("ul",{className:"space-y-0.5 text-xs text-muted-foreground",children:d.review.risks.map(D=>t.jsxs("li",{children:["— ",D]},D))})]})},B))})]})]}),t.jsxs(va,{className:"shrink-0 sm:justify-between",children:[t.jsx(ee,{type:"button",variant:"outline",disabled:i!=="pick",onClick:()=>p("seed"),children:o("sandbox.campaignGen.back")}),i==="pick"?t.jsx(ee,{type:"button",disabled:w.size===0||$,onClick:h,children:o("sandbox.campaignGen.create",{count:String(w.size)})}):t.jsxs(ee,{type:"button",disabled:!te||i==="running",onClick:_,children:[t.jsx(ht,{size:14}),o("sandbox.campaignGen.generate")]})]})]})})}const Ft={awareness:"sandbox.campaigns.objectiveAwareness",education:"sandbox.campaigns.objectiveEducation",conversion:"sandbox.campaigns.objectiveConversion",retention:"sandbox.campaigns.objectiveRetention",repositioning:"sandbox.campaigns.objectiveRepositioning"},It={category:"sandbox.campaigns.targetCategory",collection:"sandbox.campaigns.targetCollection"},un={launch:"sandbox.campaigns.triggerLaunchHelp",seasonal:"sandbox.campaigns.triggerSeasonalHelp",trend:"sandbox.campaigns.triggerTrendHelp",seo_gap:"sandbox.campaigns.triggerSeoGapHelp",inventory:"sandbox.campaigns.triggerInventoryHelp",partnership:"sandbox.campaigns.triggerPartnershipHelp",reputation:"sandbox.campaigns.triggerReputationHelp"},bn={awareness:"sandbox.campaigns.objectiveAwarenessHelp",education:"sandbox.campaigns.objectiveEducationHelp",conversion:"sandbox.campaigns.objectiveConversionHelp",retention:"sandbox.campaigns.objectiveRetentionHelp",repositioning:"sandbox.campaigns.objectiveRepositioningHelp"},hn={awareness:{content:"sandbox.campaigns.objectiveAwarenessContent",product:"sandbox.campaigns.objectiveAwarenessProduct",cta:"sandbox.campaigns.objectiveAwarenessCta",metric:"sandbox.campaigns.objectiveAwarenessMetric"},education:{content:"sandbox.campaigns.objectiveEducationContent",product:"sandbox.campaigns.objectiveEducationProduct",cta:"sandbox.campaigns.objectiveEducationCta",metric:"sandbox.campaigns.objectiveEducationMetric"},conversion:{content:"sandbox.campaigns.objectiveConversionContent",product:"sandbox.campaigns.objectiveConversionProduct",cta:"sandbox.campaigns.objectiveConversionCta",metric:"sandbox.campaigns.objectiveConversionMetric"},retention:{content:"sandbox.campaigns.objectiveRetentionContent",product:"sandbox.campaigns.objectiveRetentionProduct",cta:"sandbox.campaigns.objectiveRetentionCta",metric:"sandbox.campaigns.objectiveRetentionMetric"},repositioning:{content:"sandbox.campaigns.objectiveRepositioningContent",product:"sandbox.campaigns.objectiveRepositioningProduct",cta:"sandbox.campaigns.objectiveRepositioningCta",metric:"sandbox.campaigns.objectiveRepositioningMetric"}},fn={education:"sandbox.campaigns.objectiveEducationNote",conversion:"sandbox.campaigns.objectiveConversionNote"},jn={};function Gs(f){return new Date(f.getTime()-f.getTimezoneOffset()*6e4).toISOString().slice(0,10)}function Os(f){if(!f)return;const e=new Date(`${f}T00:00:00`);return Number.isNaN(e.getTime())?void 0:e}function vn(f,e){const[n]=js({[f]:e??{}}),{key:r,...l}=n??{key:f,name:"",seedKey:"",status:"draft",period:{start:null,end:null},trigger:{type:"seasonal",note:""},intent:{objective:"awareness",targets:[],products:[],keywords:[]},guardrails:{avoidComplements:[],toneOverrides:""},createdAt:"",updatedAt:""};return l}function Fs(f){const e=q.c(262),{blockKey:n,block:r,onSave:l,onRemove:m,onClose:o,isSaving:a,sandboxRef:i,storeUrl:p}=f,s=be(),[u,c]=L.useState(!1),[j,b]=L.useState(null),[C,y]=L.useState(null);let k;e[0]!==l?(k=ue=>l(ue),e[0]=l,e[1]=k):k=e[1];let P;e[2]!==a?(P={isSaving:a},e[2]=a,e[3]=P):P=e[3];const[A,z,O]=Kt(r??jn,k,P);let R,v,w,E,$,X,Q,re,U,M,te,se,W,H,_;if(e[4]!==n||e[5]!==A||e[6]!==o||e[7]!==l||e[8]!==C||e[9]!==j||e[10]!==i||e[11]!==z||e[12]!==p||e[13]!==O||e[14]!==s){v=vn(n,A);const ue=x=>Ht(n,{...v,...x,updatedAt:new Date().toISOString()});w=x=>z(ue(x));const bt=x=>{const N=ue(x);O(N),l(N)},Oe=wa(v.intent.targets);E=Ba(v.intent.products);const Wt=x=>bt({intent:{...v.intent,targets:x}}),Nt=x=>bt({intent:{...v.intent,products:x}}),ys=(x,N)=>Oe.map((S,Pe)=>Pe===x?{...S,...N}:S),Ct=(x,N)=>w({intent:{...v.intent,targets:ys(x,N)}}),la=(x,N)=>Wt(ys(x,N)),Ns=x=>{Wt([...Oe,{kind:"category",id:"",name:"",url:"",description:"",...x}]),b(Oe.length)},ra=x=>{Wt(Oe.filter((N,S)=>S!==x)),b(N=>N===null||N<x?N:null)};R=()=>{Nt([...E,{id:"",name:"",url:"",images:[],category:"",description:""}]),y(E.length)};const ia=x=>{Nt(E.filter((N,S)=>S!==x)),y(N=>N===null||N<x?N:null)},Fe=(x,N)=>w({intent:{...v.intent,products:E.map((S,Pe)=>Pe===x?{...S,...N}:S)}});_=(x,N)=>{if(!N){Nt(E.filter(S=>S.id!==x.id));return}E.some(S=>S.id===x.id)||Nt([...E,{id:x.id,name:x.label,url:sa(x.url,p),images:(x.images??[]).slice(0,Ys),category:x.category??"",description:x.description??""}])},se="min-w-0 max-w-3xl space-y-6 px-8 py-6";let Ie;e[30]!==s?(Ie=s("sandbox.campaigns.nameLabel"),e[30]=s,e[31]=Ie):Ie=e[31];let kt;e[32]!==Ie?(kt=t.jsx(I,{htmlFor:"campaign-name",children:Ie}),e[32]=Ie,e[33]=kt):kt=e[33];const ca=v.name;let wt;e[34]!==s?(wt=s("sandbox.campaigns.namePlaceholder"),e[34]=s,e[35]=wt):wt=e[35];const Yt=t.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[kt,t.jsx(J,{id:"campaign-name",value:ca,placeholder:wt,onChange:x=>w({name:x.target.value})})]});let ze;e[36]!==o||e[37]!==s?(ze=o&&t.jsx(ee,{type:"button",variant:"ghost",size:"icon",className:"mt-6 shrink-0","aria-label":s("sandbox.campaigns.close"),onClick:o,children:t.jsx(Zs,{size:14})}),e[36]=o,e[37]=s,e[38]=ze):ze=e[38],e[39]!==Yt||e[40]!==ze?(W=t.jsxs("div",{className:"flex items-start gap-3",children:[Yt,ze]}),e[39]=Yt,e[40]=ze,e[41]=W):W=e[41];let $e;e[42]!==s?($e=s("sandbox.campaigns.statusLabel"),e[42]=s,e[43]=$e):$e=e[43];let Bt;e[44]!==$e?(Bt=t.jsx(I,{children:$e}),e[44]=$e,e[45]=Bt):Bt=e[45];let St;e[46]!==s?(St=ms.map(x=>s(ft[x])),e[46]=s,e[47]=St):St=e[47];const Jt=ft[v.status];let Pt;e[48]!==s||e[49]!==Jt?(Pt=s(Jt),e[48]=s,e[49]=Jt,e[50]=Pt):Pt=e[50];const qt=t.jsxs("div",{className:"space-y-1.5",children:[Bt,t.jsx(Gt,{options:St,value:Pt,onChange:x=>{const N=ms.find(S=>s(ft[S])===x);N&&bt({status:N})}})]});let He;e[51]!==s?(He=s("sandbox.campaigns.periodLabel"),e[51]=s,e[52]=He):He=e[52];let Ke;e[53]!==He?(Ke=t.jsx(I,{children:He}),e[53]=He,e[54]=Ke):Ke=e[54];const Qt=t.jsx(Sn,{period:v.period,onChange:x=>w({period:x})});let Ue;e[55]!==Ke||e[56]!==Qt?(Ue=t.jsxs("div",{className:"space-y-1.5",children:[Ke,Qt]}),e[55]=Ke,e[56]=Qt,e[57]=Ue):Ue=e[57],e[58]!==qt||e[59]!==Ue?(H=t.jsxs("div",{className:"flex flex-wrap items-end gap-6",children:[qt,Ue]}),e[58]=qt,e[59]=Ue,e[60]=H):H=e[60];let Me;e[61]!==s?(Me=s("sandbox.campaigns.triggerLabel"),e[61]=s,e[62]=Me):Me=e[62];let Ve;e[63]!==Me?(Ve=t.jsx(I,{children:Me}),e[63]=Me,e[64]=Ve):Ve=e[64];let _e;e[65]!==s?(_e=s("sandbox.campaigns.triggerHelpLabel"),e[65]=s,e[66]=_e):_e=e[66];let Xe;e[67]!==s?(Xe=rs.map(x=>({name:s(gt[x]),help:s(un[x])})),e[67]=s,e[68]=Xe):Xe=e[68];let We;e[69]!==_e||e[70]!==Xe?(We=t.jsx(Is,{label:_e,options:Xe}),e[69]=_e,e[70]=Xe,e[71]=We):We=e[71];let Ye;e[72]!==Ve||e[73]!==We?(Ye=t.jsxs("div",{className:"flex items-center gap-1",children:[Ve,We]}),e[72]=Ve,e[73]=We,e[74]=Ye):Ye=e[74];let Je;e[75]!==s?(Je=s("sandbox.campaigns.triggerHint"),e[75]=s,e[76]=Je):Je=e[76];let qe;e[77]!==Je?(qe=t.jsx("p",{className:"text-xs text-muted-foreground",children:Je}),e[77]=Je,e[78]=qe):qe=e[78];let Et;e[79]!==s?(Et=rs.map(x=>s(gt[x])),e[79]=s,e[80]=Et):Et=e[80];const Zt=gt[v.trigger.type];let Tt;e[81]!==s||e[82]!==Zt?(Tt=s(Zt),e[81]=s,e[82]=Zt,e[83]=Tt):Tt=e[83];const es=t.jsx(Gt,{options:Et,value:Tt,onChange:x=>{const N=rs.find(S=>s(gt[S])===x);N&&bt({trigger:{...v.trigger,type:N}})}}),da=v.trigger.note;let Dt;e[84]!==s?(Dt=s("sandbox.campaigns.triggerNotePlaceholder"),e[84]=s,e[85]=Dt):Dt=e[85];const ts=t.jsx(xt,{value:da,rows:3,placeholder:Dt,onChange:x=>w({trigger:{...v.trigger,note:x.target.value}})});e[86]!==Ye||e[87]!==qe||e[88]!==es||e[89]!==ts?($=t.jsxs("section",{className:"space-y-2",children:[Ye,qe,es,ts]}),e[86]=Ye,e[87]=qe,e[88]=es,e[89]=ts,e[90]=$):$=e[90];let Qe;e[91]!==s?(Qe=s("sandbox.campaigns.objectiveLabel"),e[91]=s,e[92]=Qe):Qe=e[92];let Ze;e[93]!==Qe?(Ze=t.jsx(I,{children:Qe}),e[93]=Qe,e[94]=Ze):Ze=e[94];let et;e[95]!==s?(et=s("sandbox.campaigns.objectiveHelpLabel"),e[95]=s,e[96]=et):et=e[96];let tt;e[97]!==s?(tt=is.map(x=>{const N=hn[x],S=fn[x];return{name:s(Ft[x]),help:s(bn[x]),facets:[{label:s("sandbox.campaigns.facetContent"),value:s(N.content)},{label:s("sandbox.campaigns.facetProduct"),value:s(N.product)},{label:s("sandbox.campaigns.facetCta"),value:s(N.cta)},{label:s("sandbox.campaigns.facetMetric"),value:s(N.metric)}],note:S?s(S):void 0}}),e[97]=s,e[98]=tt):tt=e[98];let st;e[99]!==et||e[100]!==tt?(st=t.jsx(Is,{label:et,options:tt}),e[99]=et,e[100]=tt,e[101]=st):st=e[101];let at;e[102]!==Ze||e[103]!==st?(at=t.jsxs("div",{className:"flex items-center gap-1",children:[Ze,st]}),e[102]=Ze,e[103]=st,e[104]=at):at=e[104];let nt;e[105]!==s?(nt=s("sandbox.campaigns.objectiveHint"),e[105]=s,e[106]=nt):nt=e[106];let ot;e[107]!==nt?(ot=t.jsx("p",{className:"text-xs text-muted-foreground",children:nt}),e[107]=nt,e[108]=ot):ot=e[108];let Lt;e[109]!==s?(Lt=is.map(x=>s(Ft[x])),e[109]=s,e[110]=Lt):Lt=e[110];const ss=Ft[v.intent.objective];let At;e[111]!==s||e[112]!==ss?(At=s(ss),e[111]=s,e[112]=ss,e[113]=At):At=e[113];const as=t.jsx(Gt,{options:Lt,value:At,onChange:x=>{const N=is.find(S=>s(Ft[S])===x);N&&bt({intent:{...v.intent,objective:N}})}});e[114]!==at||e[115]!==ot||e[116]!==as?(X=t.jsxs("section",{className:"space-y-2",children:[at,ot,as]}),e[114]=at,e[115]=ot,e[116]=as,e[117]=X):X=e[117];let lt;e[118]!==s?(lt=s("sandbox.campaigns.targetsLabel"),e[118]=s,e[119]=lt):lt=e[119];let rt;e[120]!==lt?(rt=t.jsx(I,{children:lt}),e[120]=lt,e[121]=rt):rt=e[121];let it;e[122]!==s?(it=s("sandbox.campaigns.targetsHint"),e[122]=s,e[123]=it):it=e[123];let ct;e[124]!==it?(ct=t.jsx("p",{className:"text-xs text-muted-foreground",children:it}),e[124]=it,e[125]=ct):ct=e[125];const ns=Oe.length>0&&t.jsx(ps,{children:Oe.map((x,N)=>t.jsx(xs,{open:j===N,onToggle:()=>b(j===N?null:N),title:x.name,untitledLabel:s("sandbox.campaigns.untitledTarget"),removeLabel:s("sandbox.campaigns.removeTarget"),onRemove:()=>ra(N),leading:t.jsx(ut,{variant:"secondary",className:"shrink-0",children:s(It[x.kind])}),children:t.jsxs("div",{className:"space-y-2 border-t px-3 py-3",children:[t.jsx(Gt,{options:ws.map(S=>s(It[S])),value:s(It[x.kind]),onChange:S=>{const Pe=ws.find(ma=>s(It[ma])===S);Pe&&la(N,Pe==="collection"?{kind:Pe,url:""}:{kind:Pe})}}),t.jsx(J,{value:x.name,placeholder:s("sandbox.campaigns.targetNamePlaceholder"),onChange:S=>Ct(N,{name:S.target.value}),className:"h-9"}),x.kind!=="collection"&&t.jsx(J,{value:x.url,placeholder:s("sandbox.campaigns.targetUrlPlaceholder"),onChange:S=>Ct(N,{url:S.target.value}),className:"h-9"}),t.jsx(J,{value:x.id,placeholder:s(x.kind==="collection"?"sandbox.campaigns.targetCollectionIdPlaceholder":"sandbox.campaigns.targetIdPlaceholder"),onChange:S=>Ct(N,{id:S.target.value}),className:"h-9"}),t.jsx(xt,{value:x.description,rows:2,placeholder:s("sandbox.campaigns.targetDescriptionPlaceholder"),onChange:S=>Ct(N,{description:S.target.value})}),x.kind!=="collection"&&!x.url.trim()&&t.jsx("p",{className:"text-xs text-warning",children:s("sandbox.campaigns.targetUrlRequired")})]})},N))}),os=i&&t.jsx(kn,{sandboxRef:i,storeUrl:p,onPick:x=>Ns(x)});let Rt;e[126]!==s?(Rt=s("sandbox.campaigns.addTarget"),e[126]=s,e[127]=Rt):Rt=e[127];const ls=t.jsx(jt,{label:Rt,onClick:()=>Ns({})});let dt;e[128]!==os||e[129]!==ls?(dt=t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[os,ls]}),e[128]=os,e[129]=ls,e[130]=dt):dt=e[130],e[131]!==rt||e[132]!==ct||e[133]!==ns||e[134]!==dt?(Q=t.jsxs("section",{className:"space-y-2",children:[rt,ct,ns,dt]}),e[131]=rt,e[132]=ct,e[133]=ns,e[134]=dt,e[135]=Q):Q=e[135],re="space-y-2";let mt;e[136]!==s?(mt=s("sandbox.campaigns.productsLabel"),e[136]=s,e[137]=mt):mt=e[137],e[138]!==mt?(U=t.jsx(I,{children:mt}),e[138]=mt,e[139]=U):U=e[139];let pt;e[140]!==s?(pt=s("sandbox.campaigns.productsHint"),e[140]=s,e[141]=pt):pt=e[141],e[142]!==pt?(M=t.jsx("p",{className:"text-xs text-muted-foreground",children:pt}),e[142]=pt,e[143]=M):M=e[143],te=E.length>0&&t.jsx(ps,{children:E.map((x,N)=>t.jsx(xs,{open:C===N,onToggle:()=>y(C===N?null:N),title:x.name,untitledLabel:s("sandbox.campaigns.untitledProduct"),removeLabel:s("sandbox.campaigns.removeProduct"),onRemove:()=>ia(N),leading:x.images[0]?t.jsx("img",{src:x.images[0],alt:"",className:"size-6 shrink-0 rounded border object-cover"}):t.jsx("div",{className:"size-6 shrink-0 rounded border bg-muted"}),children:t.jsxs("div",{className:"space-y-2 border-t px-3 py-3",children:[t.jsx(J,{value:x.name,placeholder:s("sandbox.campaigns.productNamePlaceholder"),onChange:S=>Fe(N,{name:S.target.value}),className:"h-9"}),t.jsx(J,{value:x.url,placeholder:s("sandbox.campaigns.productUrlPlaceholder"),onChange:S=>Fe(N,{url:S.target.value}),className:"h-9"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(J,{value:x.id,placeholder:s("sandbox.campaigns.productIdPlaceholder"),onChange:S=>Fe(N,{id:S.target.value}),className:"h-9"}),t.jsx(J,{value:x.category,placeholder:s("sandbox.campaigns.productCategoryPlaceholder"),onChange:S=>Fe(N,{category:S.target.value}),className:"h-9"})]}),t.jsx(xt,{value:x.description,rows:2,placeholder:s("sandbox.campaigns.productDescriptionPlaceholder"),onChange:S=>Fe(N,{description:S.target.value})}),t.jsx(Cn,{images:x.images,idPrefix:`${n}-product-${N}`,sandbox:i,onChange:S=>Fe(N,{images:S})})]})},`${x.id}-${N}`))}),e[4]=n,e[5]=A,e[6]=o,e[7]=l,e[8]=C,e[9]=j,e[10]=i,e[11]=z,e[12]=p,e[13]=O,e[14]=s,e[15]=R,e[16]=v,e[17]=w,e[18]=E,e[19]=$,e[20]=X,e[21]=Q,e[22]=re,e[23]=U,e[24]=M,e[25]=te,e[26]=se,e[27]=W,e[28]=H,e[29]=_}else R=e[15],v=e[16],w=e[17],E=e[18],$=e[19],X=e[20],Q=e[21],re=e[22],U=e[23],M=e[24],te=e[25],se=e[26],W=e[27],H=e[28],_=e[29];let h;e[144]!==i||e[145]!==s?(h=i&&t.jsxs(ee,{type:"button",variant:"outline",size:"sm",onClick:()=>c(!0),children:[t.jsx(Vs,{size:14}),s("sandbox.campaigns.pickProducts")]}),e[144]=i,e[145]=s,e[146]=h):h=e[146];let d;e[147]!==s?(d=s("sandbox.campaigns.addProduct"),e[147]=s,e[148]=d):d=e[148];let B;e[149]!==R?(B=()=>R(),e[149]=R,e[150]=B):B=e[150];let D;e[151]!==d||e[152]!==B?(D=t.jsx(jt,{label:d,onClick:B}),e[151]=d,e[152]=B,e[153]=D):D=e[153];let T;e[154]!==h||e[155]!==D?(T=t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h,D]}),e[154]=h,e[155]=D,e[156]=T):T=e[156];let ie;e[157]!==u||e[158]!==E||e[159]!==i||e[160]!==_?(ie=i&&t.jsx(nn,{open:u,onOpenChange:c,sandboxRef:i,selectedIds:E.map(Nn).filter(Boolean),onChange:yn,onPicked:_}),e[157]=u,e[158]=E,e[159]=i,e[160]=_,e[161]=ie):ie=e[161];let he;e[162]!==T||e[163]!==ie||e[164]!==re||e[165]!==U||e[166]!==M||e[167]!==te?(he=t.jsxs("section",{className:re,children:[U,M,te,T,ie]}),e[162]=T,e[163]=ie,e[164]=re,e[165]=U,e[166]=M,e[167]=te,e[168]=he):he=e[168];let fe;e[169]!==s?(fe=s("sandbox.campaigns.keywordsLabel"),e[169]=s,e[170]=fe):fe=e[170];let ae;e[171]!==fe?(ae=t.jsx(I,{children:fe}),e[171]=fe,e[172]=ae):ae=e[172];let xe;e[173]!==s?(xe=s("sandbox.campaigns.keywordsHint"),e[173]=s,e[174]=xe):xe=e[174];let je;e[175]!==xe?(je=t.jsx("p",{className:"text-xs text-muted-foreground",children:xe}),e[175]=xe,e[176]=je):je=e[176];const Xt=v.intent.keywords;let Y;e[177]!==v.intent||e[178]!==w?(Y=ue=>w({intent:{...v.intent,keywords:ue}}),e[177]=v.intent,e[178]=w,e[179]=Y):Y=e[179];let we;e[180]!==s?(we=s("sandbox.campaigns.keywordsPlaceholder"),e[180]=s,e[181]=we):we=e[181];let ve;e[182]!==s?(ve=s("sandbox.campaigns.removeKeyword"),e[182]=s,e[183]=ve):ve=e[183];let ye;e[184]!==v.intent.keywords||e[185]!==Y||e[186]!==we||e[187]!==ve?(ye=t.jsx(vs,{terms:Xt,onChange:Y,placeholder:we,removeLabel:ve}),e[184]=v.intent.keywords,e[185]=Y,e[186]=we,e[187]=ve,e[188]=ye):ye=e[188];let Be;e[189]!==ae||e[190]!==je||e[191]!==ye?(Be=t.jsxs("section",{className:"space-y-2",children:[ae,je,ye]}),e[189]=ae,e[190]=je,e[191]=ye,e[192]=Be):Be=e[192];let Ne;e[193]!==s?(Ne=s("sandbox.campaigns.avoidLabel"),e[193]=s,e[194]=Ne):Ne=e[194];let ne;e[195]!==Ne?(ne=t.jsx(I,{children:Ne}),e[195]=Ne,e[196]=ne):ne=e[196];let Se;e[197]!==s?(Se=s("sandbox.campaigns.avoidHint"),e[197]=s,e[198]=Se):Se=e[198];let g;e[199]!==Se?(g=t.jsx("p",{className:"text-xs text-muted-foreground",children:Se}),e[199]=Se,e[200]=g):g=e[200];let G;e[201]!==v.guardrails.avoidComplements?(G=$t(v.guardrails.avoidComplements),e[201]=v.guardrails.avoidComplements,e[202]=G):G=e[202];let V;e[203]!==v.guardrails||e[204]!==w?(V=ue=>w({guardrails:{...v.guardrails,avoidComplements:ue}}),e[203]=v.guardrails,e[204]=w,e[205]=V):V=e[205];const K=`campaign-avoid-${n}`;let F;e[206]!==s?(F=s("sandbox.campaigns.addAvoid"),e[206]=s,e[207]=F):F=e[207];let oe;e[208]!==s?(oe=s("sandbox.campaigns.avoidNamePlaceholder"),e[208]=s,e[209]=oe):oe=e[209];let de;e[210]!==s?(de=s("sandbox.campaigns.avoidBodyPlaceholder"),e[210]=s,e[211]=de):de=e[211];let me;e[212]!==G||e[213]!==V||e[214]!==K||e[215]!==F||e[216]!==oe||e[217]!==de?(me=t.jsx(gs,{rules:G,onChange:V,revision:0,idPrefix:K,add:F,namePlaceholder:oe,bodyPlaceholder:de}),e[212]=G,e[213]=V,e[214]=K,e[215]=F,e[216]=oe,e[217]=de,e[218]=me):me=e[218];let Ce;e[219]!==ne||e[220]!==g||e[221]!==me?(Ce=t.jsxs("section",{className:"space-y-2",children:[ne,g,me]}),e[219]=ne,e[220]=g,e[221]=me,e[222]=Ce):Ce=e[222];let ke;e[223]!==s?(ke=s("sandbox.campaigns.toneLabel"),e[223]=s,e[224]=ke):ke=e[224];let ge;e[225]!==ke?(ge=t.jsx(I,{htmlFor:"campaign-tone",children:ke}),e[225]=ke,e[226]=ge):ge=e[226];let ce;e[227]!==s?(ce=s("sandbox.campaigns.toneHint"),e[227]=s,e[228]=ce):ce=e[228];let Ee;e[229]!==ce?(Ee=t.jsx("p",{className:"text-xs text-muted-foreground",children:ce}),e[229]=ce,e[230]=Ee):Ee=e[230];const oa=v.guardrails.toneOverrides;let Te;e[231]!==s?(Te=s("sandbox.campaigns.tonePlaceholder"),e[231]=s,e[232]=Te):Te=e[232];let De;e[233]!==v.guardrails||e[234]!==w?(De=ue=>w({guardrails:{...v.guardrails,toneOverrides:ue.target.value}}),e[233]=v.guardrails,e[234]=w,e[235]=De):De=e[235];let Le;e[236]!==v.guardrails.toneOverrides||e[237]!==Te||e[238]!==De?(Le=t.jsx(xt,{id:"campaign-tone",value:oa,rows:3,placeholder:Te,onChange:De}),e[236]=v.guardrails.toneOverrides,e[237]=Te,e[238]=De,e[239]=Le):Le=e[239];let Ae;e[240]!==ge||e[241]!==Ee||e[242]!==Le?(Ae=t.jsxs("section",{className:"space-y-2",children:[ge,Ee,Le]}),e[240]=ge,e[241]=Ee,e[242]=Le,e[243]=Ae):Ae=e[243];let vt;e[244]===Symbol.for("react.memo_cache_sentinel")?(vt=t.jsx(ta,{size:14}),e[244]=vt):vt=e[244];let Re;e[245]!==s?(Re=s("sandbox.campaigns.remove"),e[245]=s,e[246]=Re):Re=e[246];let Ge;e[247]!==m||e[248]!==Re?(Ge=t.jsx("div",{className:"border-t pt-4",children:t.jsxs(ee,{type:"button",variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:m,children:[vt,Re]})}),e[247]=m,e[248]=Re,e[249]=Ge):Ge=e[249];let yt;return e[250]!==$||e[251]!==X||e[252]!==Q||e[253]!==he||e[254]!==Be||e[255]!==Ce||e[256]!==Ae||e[257]!==Ge||e[258]!==se||e[259]!==W||e[260]!==H?(yt=t.jsxs("div",{className:se,children:[W,H,$,X,Q,he,Be,Ce,Ae,Ge]}),e[250]=$,e[251]=X,e[252]=Q,e[253]=he,e[254]=Be,e[255]=Ce,e[256]=Ae,e[257]=Ge,e[258]=se,e[259]=W,e[260]=H,e[261]=yt):yt=e[261],yt}function yn(){}function Nn(f){return f.id}function Cn(f){const e=q.c(13),{images:n,idPrefix:r,sandbox:l,onChange:m}=f,o=be();let a;e[0]!==r||e[1]!==n||e[2]!==m||e[3]!==l||e[4]!==o?(a=n.map((s,u)=>t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("div",{className:"min-w-0 flex-1",children:t.jsx(Ka,{schema:{type:"string",format:"image-uri",title:o("sandbox.campaigns.productImageLabel")},value:s,onChange:c=>m(n.map((j,b)=>b===u?String(c??""):j)),path:`${r}-image-${u}`,label:"",sandbox:l,compact:!0})}),t.jsx(_t,{label:o("sandbox.campaigns.removeImage"),onClick:()=>m(n.filter((c,j)=>j!==u))})]},u)),e[0]=r,e[1]=n,e[2]=m,e[3]=l,e[4]=o,e[5]=a):a=e[5];let i;e[6]!==n||e[7]!==m||e[8]!==o?(i=n.length<Ys&&t.jsx(jt,{label:o("sandbox.campaigns.addImage"),onClick:()=>m([...n,""])}),e[6]=n,e[7]=m,e[8]=o,e[9]=i):i=e[9];let p;return e[10]!==a||e[11]!==i?(p=t.jsxs("div",{className:"space-y-2",children:[a,i]}),e[10]=a,e[11]=i,e[12]=p):p=e[12],p}function kn(f){const e=q.c(16),{sandboxRef:n,storeUrl:r,onPick:l}=f,m=be(),[o,a]=L.useState(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Vs,{size:14}),e[0]=i):i=e[0];let p;e[1]!==m?(p=m("sandbox.campaigns.pickCategory"),e[1]=m,e[2]=p):p=e[2];let s;e[3]!==p?(s=t.jsx(bs,{asChild:!0,children:t.jsxs(ee,{type:"button",variant:"outline",size:"sm",className:"h-8",children:[i,p]})}),e[3]=p,e[4]=s):s=e[4];let u;e[5]!==l||e[6]!==r?(u=b=>{l({id:b.path,name:b.label,url:sa(b.url,r)}),a(!1)},e[5]=l,e[6]=r,e[7]=u):u=e[7];let c;e[8]!==o||e[9]!==n||e[10]!==u?(c=t.jsx(hs,{align:"end",className:"w-80",children:t.jsx(on,{sandboxRef:n,enabled:o,className:"h-56",onSelect:u})}),e[8]=o,e[9]=n,e[10]=u,e[11]=c):c=e[11];let j;return e[12]!==o||e[13]!==s||e[14]!==c?(j=t.jsxs(fs,{open:o,onOpenChange:a,children:[s,c]}),e[12]=o,e[13]=s,e[14]=c,e[15]=j):j=e[15],j}function Is(f){const e=q.c(15),{label:n,options:r}=f;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ba,{size:14}),e[0]=l):l=e[0];let m;e[1]!==n?(m=t.jsx(ya,{asChild:!0,children:t.jsx(ee,{type:"button",variant:"ghost",size:"icon",className:"size-5 text-muted-foreground","aria-label":n,children:l})}),e[1]=n,e[2]=m):m=e[2];let o;e[3]!==n?(o=t.jsx(us,{children:t.jsx(Vt,{children:n})}),e[3]=n,e[4]=o):o=e[4];let a;e[5]!==r?(a=r.map(wn),e[5]=r,e[6]=a):a=e[6];let i;e[7]!==a?(i=t.jsx("dl",{className:"max-h-[70svh] space-y-5 overflow-y-auto pr-1",children:a}),e[7]=a,e[8]=i):i=e[8];let p;e[9]!==o||e[10]!==i?(p=t.jsxs(Mt,{className:"sm:max-w-lg",children:[o,i]}),e[9]=o,e[10]=i,e[11]=p):p=e[11];let s;return e[12]!==m||e[13]!==p?(s=t.jsxs(Ut,{children:[m,p]}),e[12]=m,e[13]=p,e[14]=s):s=e[14],s}function wn(f){return t.jsxs("div",{className:"space-y-1.5",children:[t.jsx("dt",{className:"text-sm font-medium",children:f.name}),t.jsxs("dd",{className:"space-y-1.5 text-sm text-muted-foreground",children:[t.jsx("p",{children:f.help}),f.facets&&t.jsx("ul",{className:"space-y-0.5",children:f.facets.map(Bn)}),f.note&&t.jsx("p",{className:"italic",children:f.note})]})]},f.name)}function Bn(f){return t.jsxs("li",{children:[t.jsxs("span",{className:"text-foreground",children:[f.label,":"]})," ",f.value]},f.label)}function Sn(f){const e=q.c(30),{period:n,onChange:r}=f,l=be();let m;e[0]!==n.start?(m=Os(n.start),e[0]=n.start,e[1]=m):m=e[1];const o=m;let a;e[2]!==n.end?(a=Os(n.end),e[2]=n.end,e[3]=a):a=e[3];const i=a;let p;e[4]!==n.end||e[5]!==n.start||e[6]!==l?(p=n.start||n.end?`${n.start??"—"} / ${n.end??"—"}`:l("sandbox.campaigns.periodEmpty"),e[4]=n.end,e[5]=n.start,e[6]=l,e[7]=p):p=e[7];const s=p;let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ua,{size:14}),e[8]=u):u=e[8];let c;e[9]!==s?(c=t.jsx(bs,{asChild:!0,children:t.jsxs(ee,{type:"button",variant:"outline",size:"sm",className:"h-9",children:[u,t.jsx("span",{className:"tabular-nums",children:s})]})}),e[9]=s,e[10]=c):c=e[10];let j;e[11]!==o||e[12]!==i?(j=o||i?{from:o,to:i}:void 0,e[11]=o,e[12]=i,e[13]=j):j=e[13];let b;e[14]!==r?(b=A=>r({start:A?.from?Gs(A.from):null,end:A?.to?Gs(A.to):null}),e[14]=r,e[15]=b):b=e[15];let C;e[16]!==j||e[17]!==b?(C=t.jsx(hs,{align:"start",className:"w-auto p-0",children:t.jsx(an,{mode:"range",selected:j,onSelect:b})}),e[16]=j,e[17]=b,e[18]=C):C=e[18];let y;e[19]!==c||e[20]!==C?(y=t.jsxs(fs,{children:[c,C]}),e[19]=c,e[20]=C,e[21]=y):y=e[21];let k;e[22]!==r||e[23]!==n.end||e[24]!==n.start||e[25]!==l?(k=(n.start||n.end)&&t.jsx(_t,{label:l("sandbox.campaigns.periodClear"),onClick:()=>r({start:null,end:null})}),e[22]=r,e[23]=n.end,e[24]=n.start,e[25]=l,e[26]=k):k=e[26];let P;return e[27]!==k||e[28]!==y?(P=t.jsxs("div",{className:"flex items-center gap-1",children:[y,k]}),e[27]=k,e[28]=y,e[29]=P):P=e[29],P}const aa="application/x-campaign-key",ft={draft:"sandbox.campaigns.statusDraft",active:"sandbox.campaigns.statusActive",paused:"sandbox.campaigns.statusPaused",finished:"sandbox.campaigns.statusFinished"},Pn={draft:"outline",active:"success",paused:"warning",finished:"secondary"},gt={launch:"sandbox.campaigns.triggerLaunch",seasonal:"sandbox.campaigns.triggerSeasonal",trend:"sandbox.campaigns.triggerTrend",seo_gap:"sandbox.campaigns.triggerSeoGap",inventory:"sandbox.campaigns.triggerInventory",partnership:"sandbox.campaigns.triggerPartnership",reputation:"sandbox.campaigns.triggerReputation"};function En(f){const{start:e,end:n}=f.period;return!e&&!n?null:`${e??"—"} / ${n??"—"}`}function Tn({orgSlug:f,virtualMcpId:e,branch:n,decofile:r}){const l=be(),m=qs({orgSlug:f,virtualMcpId:e,branch:n}),o=Wa({orgSlug:f,virtualMcpId:e,branch:n}),a={orgSlug:f,virtualMcpId:e,branch:n,threadId:null},i=Js().length>0,[p,s]=L.useState(!1),[u,c]=L.useState("board"),[j,b]=L.useState(null),[C,y]=L.useState(""),[k,P]=L.useState(null),[A,z]=L.useState({}),[O,R]=L.useState(new Set),v=js(r),w=Z(Ws(r).merged.storeUrl),E=(h,d)=>A[h]??d,$=(h,d)=>z(B=>({...B,[h]:d})),X=()=>{const h=Bs();m.mutate({blockKey:h,data:Ht(h,Ss(new Date))}),b(h)},Q=async(h,d)=>{const B=v.find(D=>D.key===h);if(!(!B||B.status===d||O.has(h))){R(D=>new Set(D).add(h));try{await m.mutateAsync({blockKey:h,data:Ht(h,{...B,status:d,updatedAt:new Date().toISOString()})})}catch(D){pe.error(D instanceof Error?D.message:l("sandbox.campaigns.moveFailed"))}finally{R(D=>{const T=new Set(D);return T.delete(h),T})}}},re=async(h,d)=>{const B=new Date().toISOString();await m.mutateAsync({blockKey:h.key,data:Sa(h.key,{...h.entry,updatedAt:B})});for(const D of d){const T=Bs();await m.mutateAsync({blockKey:T,data:Ht(T,{...Ss(new Date),name:D.name,seedKey:h.key,period:D.period,trigger:D.trigger,intent:D.intent,guardrails:D.guardrails})})}},[U,M]=L.useState(null),te=h=>{o.mutate({blockKey:h}),b(d=>d===h?null:d)},se=C.trim().toLowerCase(),W=se?v.filter(h=>`${h.name} ${h.trigger.note}`.toLowerCase().includes(se)):v,H=j&&r[j]!==void 0?j:null,_=j&&v.some(h=>h.key===j)?j:W[0]?.key??null;return t.jsxs("div",{className:"flex h-full min-w-0 flex-col",children:[t.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 px-8 pb-3 pt-4",children:[t.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg border p-0.5",children:[t.jsx(zs,{active:u==="board",onClick:()=>c("board"),icon:t.jsx(ha,{size:14}),label:l("sandbox.campaigns.viewBoard")}),t.jsx(zs,{active:u==="list",onClick:()=>c("list"),icon:t.jsx(_a,{size:14}),label:l("sandbox.campaigns.viewList")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsxs(ee,{type:"button",size:"sm",variant:"outline",disabled:!i,onClick:()=>s(!0),children:[t.jsx(ht,{size:14}),l("sandbox.campaignGen.open")]}),t.jsxs(ee,{type:"button",size:"sm",onClick:X,children:[t.jsx(Xa,{size:14}),l("sandbox.campaigns.add")]}),t.jsx(Qs,{isPending:m.isPending||o.isPending,isError:m.isError||o.isError})]})]}),u==="board"?t.jsx("div",{className:"flex min-h-0 flex-1 gap-3 overflow-x-auto px-8 pb-6",children:ms.map(h=>{const d=l(ft[h]),B=v.filter(T=>T.status===h),D=E(h,B.length===0);return t.jsx(L.Fragment,{children:t.jsx("div",{onDragOver:T=>{T.preventDefault(),P(h)},onDragLeave:()=>P(T=>T===h?null:T),onDrop:T=>{T.preventDefault(),P(null),Q(T.dataTransfer.getData(aa),h)},className:le("flex shrink-0 flex-col rounded-xl border bg-muted/30 transition-colors",D?"w-11":"w-72",k===h&&"border-primary bg-primary/5"),children:D?t.jsxs("button",{type:"button",onClick:()=>$(h,!1),"aria-label":l("sandbox.campaigns.expandLane",{lane:d}),"aria-expanded":!1,className:"flex min-h-0 flex-1 cursor-pointer flex-col items-center gap-2 py-2.5 text-muted-foreground hover:text-foreground",children:[t.jsx(Us,{size:14,className:"shrink-0"}),t.jsx("span",{className:"text-xs tabular-nums",children:B.length}),t.jsx("span",{className:"[writing-mode:vertical-rl] text-sm font-medium",children:d})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 text-sm font-medium",children:[t.jsxs("button",{type:"button",onClick:()=>$(h,!0),"aria-label":l("sandbox.campaigns.collapseLane",{lane:d}),"aria-expanded":!0,className:"flex min-w-0 cursor-pointer items-center gap-1.5 text-left hover:text-muted-foreground",children:[t.jsx(ea,{size:14,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:d})]}),t.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:B.length})]}),t.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto px-2 pb-2",children:B.length===0?t.jsx("p",{className:"px-1 py-6 text-center text-xs text-muted-foreground",children:l("sandbox.campaigns.laneEmpty")}):B.map(T=>t.jsx(Dn,{campaign:T,moving:O.has(T.key),onOpen:()=>b(T.key),onDelete:()=>M(T)},T.key))})]})})},h)})}):t.jsxs("div",{className:"flex min-h-0 flex-1 border-t",children:[t.jsxs("div",{className:"flex w-80 shrink-0 flex-col border-r",children:[t.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[t.jsx(fa,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsx(J,{value:C,onChange:h=>y(h.target.value),placeholder:l("sandbox.campaigns.searchPlaceholder"),className:"h-8 border-0 shadow-none focus-visible:ring-0"})]}),t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W.length===0?t.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:v.length===0?l("sandbox.campaigns.empty"):l("sandbox.campaigns.noMatches")}):t.jsx("ul",{className:"divide-y",children:W.map(h=>t.jsxs("li",{className:"group/row relative",children:[t.jsx(na,{label:l("sandbox.campaigns.remove"),onDelete:()=>M(h)}),t.jsxs("button",{type:"button",onClick:()=>b(h.key),"aria-current":h.key===_,className:le("w-full cursor-pointer px-4 py-3 text-left transition-colors hover:bg-muted/50",h.key===_&&"bg-muted"),children:[t.jsx("p",{className:"truncate pr-6 text-sm font-medium",children:h.name||l("sandbox.campaigns.untitled")}),t.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[t.jsx(ut,{variant:Pn[h.status],children:l(ft[h.status])}),t.jsx("span",{className:"truncate text-xs text-muted-foreground",children:l(gt[h.trigger.type])})]})]})]},h.key))})})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:_?t.jsx(Fs,{blockKey:_,block:r[_],onSave:h=>m.mutate({blockKey:_,data:h}),onRemove:()=>{const h=v.find(d=>d.key===_);h&&M(h)},isSaving:m.isPending,sandboxRef:a,storeUrl:w},_):t.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:l("sandbox.campaigns.selectPrompt")})})]}),t.jsx(Ya,{open:!!U,onOpenChange:h=>{h||M(null)},children:t.jsxs(Ja,{children:[t.jsxs(qa,{children:[t.jsx(Qa,{children:l("sandbox.campaigns.deleteTitle")}),t.jsx(Za,{children:l("sandbox.campaigns.deleteDescription",{name:U?.name||l("sandbox.campaigns.untitled")})})]}),t.jsxs(en,{children:[t.jsx(tn,{children:l("sandbox.campaigns.deleteCancel")}),t.jsx(sn,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{U&&te(U.key),M(null)},children:l("sandbox.campaigns.deleteConfirm")})]})]})}),t.jsx(gn,{open:p,onOpenChange:s,decofile:r,virtualMcpId:e,hasAi:i,onCreate:re}),t.jsx(Ut,{open:u==="board"&&!!H,onOpenChange:h=>{h||b(null)},children:t.jsxs(Mt,{closeButtonClassName:"hidden",className:"left-auto right-4 top-4 bottom-4 flex h-auto translate-x-0 translate-y-0 flex-col gap-0 overflow-y-auto p-0 sm:max-w-2xl",children:[t.jsx(Vt,{className:"sr-only",children:l("sandbox.blogContext.tabCampaigns")}),H&&t.jsx(Fs,{blockKey:H,block:r[H],onSave:h=>m.mutate({blockKey:H,data:h}),onRemove:()=>{const h=v.find(d=>d.key===H);h&&M(h)},onClose:()=>b(null),isSaving:m.isPending,sandboxRef:a,storeUrl:w},H)]})})]})}function Dn(f){const e=q.c(40),{campaign:n,moving:r,onOpen:l,onDelete:m}=f,o=be();let a;e[0]!==n?(a=En(n),e[0]=n,e[1]=a):a=e[1];const i=a,p=r&&"opacity-80";let s;e[2]!==p?(s=le("group/card relative rounded-lg border bg-card shadow-sm transition-colors hover:border-primary/40",p),e[2]=p,e[3]=s):s=e[3];let u;e[4]!==o?(u=o("sandbox.campaigns.remove"),e[4]=o,e[5]=u):u=e[5];let c;e[6]!==r||e[7]!==m||e[8]!==u?(c=t.jsx(na,{label:u,disabled:r,onDelete:m}),e[6]=r,e[7]=m,e[8]=u,e[9]=c):c=e[9];const j=!r;let b;e[10]!==n.key?(b=$=>$.dataTransfer.setData(aa,n.key),e[10]=n.key,e[11]=b):b=e[11];const C=r?"cursor-wait":"cursor-grab active:cursor-grabbing";let y;e[12]!==C?(y=le("block w-full p-3 text-left",C),e[12]=C,e[13]=y):y=e[13];let k;e[14]!==n.name||e[15]!==o?(k=n.name||o("sandbox.campaigns.untitled"),e[14]=n.name,e[15]=o,e[16]=k):k=e[16];let P;e[17]!==k?(P=t.jsx("p",{className:"line-clamp-2 pr-6 text-sm font-medium",children:k}),e[17]=k,e[18]=P):P=e[18];const A=gt[n.trigger.type];let z;e[19]!==o||e[20]!==A?(z=o(A),e[19]=o,e[20]=A,e[21]=z):z=e[21];let O;e[22]!==z?(O=t.jsx(ut,{variant:"secondary",className:"max-w-full truncate",children:z}),e[22]=z,e[23]=O):O=e[23];let R;e[24]!==i?(R=i&&t.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:i}),e[24]=i,e[25]=R):R=e[25];let v;e[26]!==O||e[27]!==R?(v=t.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[O,R]}),e[26]=O,e[27]=R,e[28]=v):v=e[28];let w;e[29]!==l||e[30]!==P||e[31]!==v||e[32]!==j||e[33]!==b||e[34]!==y?(w=t.jsxs("button",{type:"button",draggable:j,onDragStart:b,onClick:l,className:y,children:[P,v]}),e[29]=l,e[30]=P,e[31]=v,e[32]=j,e[33]=b,e[34]=y,e[35]=w):w=e[35];let E;return e[36]!==w||e[37]!==s||e[38]!==c?(E=t.jsxs("div",{className:s,children:[c,w]}),e[36]=w,e[37]=s,e[38]=c,e[39]=E):E=e[39],E}function na(f){const e=q.c(7),{label:n,onDelete:r,disabled:l}=f;let m;e[0]!==r?(m=i=>{i.stopPropagation(),r()},e[0]=r,e[1]=m):m=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(ta,{size:13}),e[2]=o):o=e[2];let a;return e[3]!==l||e[4]!==n||e[5]!==m?(a=t.jsx("button",{type:"button",disabled:l,"aria-label":n,title:n,onClick:m,className:"absolute right-2 top-2 z-10 flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-muted hover:text-destructive focus-visible:opacity-100 group-hover/card:opacity-100 group-hover/row:opacity-100",children:o}),e[3]=l,e[4]=n,e[5]=m,e[6]=a):a=e[6],a}function zs(f){const e=q.c(8),{active:n,onClick:r,icon:l,label:m}=f,o=n?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground";let a;e[0]!==o?(a=le("inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==n||e[3]!==l||e[4]!==m||e[5]!==r||e[6]!==a?(i=t.jsxs("button",{type:"button",onClick:r,"aria-pressed":n,className:a,children:[l,m]}),e[2]=n,e[3]=l,e[4]=m,e[5]=r,e[6]=a,e[7]=i):i=e[7],i}const Ln={},An=["description","targetAudience"],Rn=["values","competitors","commercialPolicies","specialDates"],Gn=["keywords"],$s=["dos","avoid","vocabulary"],On=["voiceExamples"],Fn=[{id:"basics",label:"sandbox.blogBrand.tabBasics"},{id:"dos",label:"sandbox.blogBrand.tabDos"},{id:"guardrails",label:"sandbox.blogBrand.tabGuardrails"},{id:"extra",label:"sandbox.blogBrand.tabExtra"}],Hs="sandbox.blogBrand.phaseReading",Ks="sandbox.formats.phaseReading";function In(f,e){return{name:f("sandbox.formats.starterName"),value:e.length?f("sandbox.formats.starterBody",{sections:e.map(n=>`@${n}`).join(", ")}):f("sandbox.formats.starterBodyNoSections")}}function Zr({orgSlug:f,virtualMcpId:e,branch:n,decofile:r,meta:l}){const m=Ps(r[Es]),o=Ps(r[Ot]),a=be(),i=Ms(),p=qs({orgSlug:f,virtualMcpId:e,branch:n}),s=Js().length>0,u=Pa(),[c,j]=Kt(m,g=>{p.mutate({blockKey:Es,data:Ga(g,m,r[Ot])})}),[b,C]=Kt(r[Ot]?o:m,g=>{p.mutate({blockKey:Ot,data:Oa(g,Ds)})}),y=(g,G)=>j({...c,[g]:G}),k=(g,G)=>C({...b,[g]:G}),P=r[Ts],[A,z]=Kt(P??Ln,g=>p.mutate({blockKey:Ts,data:g})),O=$t(A.formats),R=g=>z({...A,formats:g}),v=Ea(l,{hideDefaults:u}),w=Ta(l,{hideDefaults:u}),E=v.map(g=>g.resolveType),$={items:v.map(g=>({...g,href:g.resolveType})),hint:a("sandbox.formats.mentionHint"),emptyLabel:a("sandbox.formats.mentionEmpty")},[X,Q]=L.useState(!1),[re,U]=L.useState(Ks),[M,te]=L.useState(!1),[se,W]=L.useState(""),[H,_]=L.useState(3),[h,d]=L.useState(!1),[B,D]=L.useState(!1),[T,ie]=L.useState(Hs),[he,fe]=L.useState(0),[ae,xe]=L.useState("brand"),[je,Xt]=L.useState("basics"),Y=Da(r,Ua(r)),we=[...La.map(g=>c[g]),...Ds.map(g=>b[g])].some(g=>typeof g=="string"?g.trim().length>0:Aa($t(g)).length>0),ve=async g=>{if(Y.blocks.length!==0){d(!0),ie(Hs);try{const G=await i.call("BLOG_SITE_GROUND",{virtualMcpId:e,purpose:"brand",language:Z(c.language)||void 0}).catch(ce=>{console.warn("[blogBrand] grounding failed",ce)}),V=G?{report:G.report,outcome:G.outcome}:void 0,K=await i.call("BLOG_BRAND_EXTRACT",{virtualMcpId:e,blocks:Y.blocks,seo:Y.seo,grounding:V});ie("sandbox.blogBrand.phaseResearching");const F=await i.call("BLOG_BRAND_ENRICH",{profile:K,blocks:Y.blocks,seo:Y.seo,grounding:V}).catch(ce=>(console.warn("[blog] enriching the brand failed",ce),{...K,specialDates:[],researchSources:[],searched:!1,discarded:0,judged:!1})),oe={companyName:F.companyName||Z(c.companyName),language:F.language||Z(c.language),description:F.description||Z(c.description),targetAudience:F.targetAudience||Z(c.targetAudience)},de={...c},me=Ls(de,F,{mode:g,textFields:["companyName","language","storeUrl",...An],ruleFields:Rn,termFields:Gn});j(de),ie("sandbox.blogBrand.phaseInferring");const Ce=await i.call("BLOG_CONTEXT_EXTRACT",{brand:{...F,...oe},blocks:Y.blocks,seo:Y.seo}),ke={...b};me.push(...Ls(ke,Ce,{mode:g,textFields:["tone"],ruleFields:$s,exampleFields:On})),C(ke),fe(ce=>ce+1);const ge=F.discarded+Ce.discarded;pe.success(me.length>0?a(g==="replace"?"sandbox.blogBrand.extractReplaced":"sandbox.blogBrand.extractFilled",{count:String(me.length)}):a(ge>0?"sandbox.blogBrand.extractAllDiscarded":"sandbox.blogBrand.extractNothingEmpty"),ge>0&&me.length>0?{description:a("sandbox.blogBrand.extractDiscarded",{count:String(ge)})}:void 0),F.searched&&F.competitors.length===0&&pe.info(a("sandbox.blogBrand.noCompetitorsFound"))}catch(G){pe.error(G instanceof Error?G.message:a("sandbox.blogBrand.extractFailed"))}finally{d(!1)}}},ye=g=>{const G=new Set(O.map(K=>As(K.name))),V=g.filter(K=>K.name.trim()&&!G.has(As(K.name))).map(K=>({...K,value:$a(K.value,w)}));return V.length===0?0:(R([...O,...V]),fe(K=>K+1),V.length)},Be=()=>{if(ye([In(a,Ha(w))])===0){pe.info(a("sandbox.formats.noNewFormats"));return}pe.success(a("sandbox.formats.starterAdded"))},Ne=async()=>{Q(!0),U(Ks);const g=setTimeout(()=>U("sandbox.formats.phaseWriting"),6e3);try{const G=await i.call("BLOG_SITE_GROUND",{virtualMcpId:e,purpose:"format",language:Z(c.language)||void 0}).catch(F=>{console.warn("[blogFormats] grounding failed",F)}),V=await i.call("BLOG_FORMAT_SUGGEST",{grounding:G?{report:G.report,outcome:G.outcome}:void 0,virtualMcpId:e,brand:Xs({...c,...b}),sections:Object.keys(w).map(F=>{const oe=v.find(de=>de.name===F);return{name:F,title:oe?.title??F,description:oe?.description}}),postStructures:Fa(r).map(F=>({title:F.title,sections:F.sections})),guidance:se.trim()||void 0,count:H}),K=ye(V.formats);if(K===0){pe.info(a("sandbox.formats.noNewFormats"));return}pe.success(a("sandbox.formats.suggested",{count:String(K)}))}catch(G){pe.error(G instanceof Error?G.message:a("sandbox.formats.suggestFailed"))}finally{clearTimeout(g),Q(!1)}},ne=(g,G)=>{const V=$s.includes(g),K=V?b:c,F=V?k:y;return t.jsx(gs,{rules:$t(K[g]),onChange:oe=>F(g,oe),revision:he,idPrefix:g,...G})},Se=()=>{switch(je){case"basics":return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[t.jsx(cs,{id:"brand-company-name",label:a("sandbox.blogBrand.companyNameLabel"),value:Z(c.companyName),onChange:g=>y("companyName",g)}),t.jsx(cs,{id:"brand-language",label:a("sandbox.blogBrand.languageLabel"),placeholder:"pt-BR",value:Z(c.language),onChange:g=>y("language",g)})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(cs,{id:"brand-store-url",label:a("sandbox.blogBrand.storeUrlLabel"),placeholder:"https://loja.com.br",value:Z(c.storeUrl),onChange:g=>y("storeUrl",g)}),Z(c.storeUrl).trim()&&!ga(Z(c.storeUrl).trim())?t.jsx("p",{className:"text-xs text-warning",children:a("sandbox.blogBrand.storeUrlInvalid")}):t.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.blogBrand.storeUrlHint")})]}),t.jsx(ds,{id:"brand-description",label:a("sandbox.blogBrand.descriptionLabel"),value:Z(c.description),onChange:g=>y("description",g)}),t.jsx(ds,{id:"brand-tone",label:a("sandbox.blogBrand.toneLabel"),hint:a("sandbox.blogBrand.toneHint"),value:Z(b.tone),onChange:g=>k("tone",g),rows:5}),t.jsx(ds,{id:"brand-audience",label:a("sandbox.blogBrand.audienceLabel"),value:Z(c.targetAudience),onChange:g=>y("targetAudience",g)}),t.jsxs("section",{className:"space-y-2",children:[t.jsx(I,{children:a("sandbox.blogBrand.voiceExamplesLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.blogBrand.voiceExamplesHint")}),t.jsx(zn,{examples:za(b.voiceExamples),onChange:g=>k("voiceExamples",g)})]})]});case"dos":return t.jsxs("div",{className:"space-y-3",children:[t.jsx("p",{className:"text-sm text-muted-foreground",children:a("sandbox.blogBrand.dosHint")}),ne("dos",{add:a("sandbox.blogBrand.addDo"),namePlaceholder:a("sandbox.blogBrand.dosNamePlaceholder"),bodyPlaceholder:a("sandbox.blogBrand.dosBodyPlaceholder")}),t.jsxs("section",{className:"space-y-2 pt-4",children:[t.jsx(I,{children:a("sandbox.blogBrand.vocabularyLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.blogBrand.vocabularyHint")}),ne("vocabulary",{add:a("sandbox.blogBrand.addVocabulary"),namePlaceholder:a("sandbox.blogBrand.vocabularyNamePlaceholder"),bodyPlaceholder:a("sandbox.blogBrand.vocabularyBodyPlaceholder")})]})]});case"guardrails":return t.jsxs("div",{className:"space-y-3",children:[t.jsx("p",{className:"text-sm text-muted-foreground",children:a("sandbox.blogBrand.dontsHint")}),ne("avoid",{add:a("sandbox.blogBrand.addDont"),namePlaceholder:a("sandbox.blogBrand.dontsNamePlaceholder"),bodyPlaceholder:a("sandbox.blogBrand.dontsBodyPlaceholder")})]});case"extra":return t.jsxs("div",{className:"space-y-8",children:[t.jsxs("section",{className:"space-y-2",children:[t.jsx(I,{children:a("sandbox.blogBrand.valuesLabel")}),ne("values",{add:a("sandbox.blogBrand.addValue"),namePlaceholder:a("sandbox.blogBrand.valuesNamePlaceholder"),bodyPlaceholder:a("sandbox.blogBrand.valuesBodyPlaceholder")})]}),t.jsxs("section",{className:"space-y-2",children:[t.jsx(I,{children:a("sandbox.blogBrand.competitorsLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.blogBrand.competitorsHint")}),ne("competitors",{add:a("sandbox.blogBrand.addCompetitor"),namePlaceholder:a("sandbox.blogBrand.competitorsNamePlaceholder"),bodyPlaceholder:a("sandbox.blogBrand.competitorsBodyPlaceholder")})]}),t.jsxs("section",{className:"space-y-2",children:[t.jsx(I,{children:a("sandbox.blogBrand.keywordsLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.blogBrand.keywordsHint")}),t.jsx(vs,{terms:Ia(c.keywords),onChange:g=>y("keywords",g),placeholder:a("sandbox.blogBrand.keywordsPlaceholder"),removeLabel:a("sandbox.blogBrand.removeKeyword")})]}),t.jsxs("section",{className:"space-y-2",children:[t.jsx(I,{children:a("sandbox.blogBrand.specialDatesLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.blogBrand.specialDatesHint")}),ne("specialDates",{add:a("sandbox.blogBrand.addSpecialDate"),namePlaceholder:a("sandbox.blogBrand.specialDatesNamePlaceholder"),bodyPlaceholder:a("sandbox.blogBrand.specialDatesBodyPlaceholder")})]}),t.jsxs("section",{className:"space-y-2",children:[t.jsx(I,{children:a("sandbox.blogBrand.policiesLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.blogBrand.policiesHint")}),ne("commercialPolicies",{add:a("sandbox.blogBrand.addPolicy"),namePlaceholder:a("sandbox.blogBrand.policiesNamePlaceholder"),bodyPlaceholder:a("sandbox.blogBrand.policiesBodyPlaceholder")})]})]})}};return t.jsxs("div",{className:"flex h-full min-w-0 flex-col",children:[t.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-4 px-8 pt-6",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("h2",{className:"text-lg font-semibold",children:a("sandbox.blogContext.title")}),t.jsx("p",{className:"text-sm text-muted-foreground",children:a("sandbox.blogContext.subtitle")})]}),t.jsx(Qs,{isPending:p.isPending,isError:p.isError})]}),t.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b px-8",children:[t.jsxs("div",{className:"flex gap-1",children:[t.jsx(zt,{active:ae==="brand",onClick:()=>xe("brand"),children:a("sandbox.blogContext.tabBrand")}),t.jsx(zt,{active:ae==="formats",onClick:()=>xe("formats"),children:a("sandbox.blogContext.tabFormats")}),t.jsx(zt,{active:ae==="campaigns",onClick:()=>xe("campaigns"),children:a("sandbox.blogContext.tabCampaigns")}),t.jsxs(zt,{active:!1,disabled:!0,onClick:()=>{},children:[a("sandbox.blogContext.tabAutomations"),t.jsx(ut,{variant:"secondary",children:a("common.soon")})]})]}),ae==="brand"&&t.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h&&t.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground","aria-live":"polite",role:"status",children:[t.jsx(ks,{size:12,className:"shrink-0 animate-spin"}),t.jsx("span",{className:"truncate",children:a(T)})]}),t.jsxs(ee,{type:"button",variant:"outline",size:"sm",className:"my-2 shrink-0",disabled:h||Y.blocks.length===0||!s,title:s?Y.blocks.length>0?a("sandbox.blogBrand.extractHint",{count:String(Y.blocks.length)}):a("sandbox.blogBrand.extractNoContent"):a("sandbox.autonomous.noAiProvider"),onClick:()=>{we?D(!0):ve("empty")},children:[t.jsx(ht,{size:14}),a("sandbox.blogBrand.extractButton")]}),t.jsx(Ut,{open:B,onOpenChange:D,children:t.jsxs(Mt,{className:"sm:max-w-md",children:[t.jsxs(us,{children:[t.jsx(Vt,{children:a("sandbox.blogBrand.fillDialogTitle")}),t.jsx(_s,{children:a("sandbox.blogBrand.fillDialogDescription")})]}),t.jsx("div",{className:"flex flex-col gap-2",children:[{mode:"empty",label:"sandbox.blogBrand.fillOnlyEmpty",hint:"sandbox.blogBrand.fillOnlyEmptyHint"},{mode:"replace",label:"sandbox.blogBrand.fillReplace",hint:"sandbox.blogBrand.fillReplaceHint"}].map(g=>t.jsxs("button",{type:"button",onClick:()=>{D(!1),ve(g.mode)},className:"cursor-pointer rounded-lg border p-3 text-left transition-colors hover:bg-muted/50",children:[t.jsx("span",{className:"text-sm font-medium",children:a(g.label)}),t.jsx("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:a(g.hint)})]},g.mode))})]})})]}),ae==="formats"&&t.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[X&&t.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground","aria-live":"polite",role:"status",children:[t.jsx(ks,{size:12,className:"shrink-0 animate-spin"}),t.jsx("span",{className:"truncate",children:a(re)})]}),t.jsx(ee,{type:"button",variant:"ghost",size:"sm",className:"my-2 shrink-0",title:a("sandbox.formats.starterHint"),onClick:Be,children:a("sandbox.formats.starterButton")}),t.jsxs(fs,{open:M,onOpenChange:te,children:[t.jsx(bs,{asChild:!0,children:t.jsxs(ee,{type:"button",variant:"outline",size:"sm",className:"my-2 shrink-0",disabled:X||!s,title:a(s?"sandbox.formats.suggestHint":"sandbox.autonomous.noAiProvider"),children:[t.jsx(ht,{size:14}),a("sandbox.formats.suggestButton")]})}),t.jsxs(hs,{align:"end",className:"w-80 space-y-3",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx(I,{htmlFor:"format-guidance",children:a("sandbox.formats.guidanceLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.formats.guidanceHint")})]}),t.jsx(J,{id:"format-guidance",value:se,onChange:g=>W(g.target.value),placeholder:a("sandbox.formats.guidancePlaceholder"),onKeyDown:g=>{g.key==="Enter"&&(g.preventDefault(),te(!1),Ne())},className:"h-9"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(I,{htmlFor:"format-count",className:"text-xs",children:a("sandbox.formats.countLabel")}),t.jsx(J,{id:"format-count",type:"number",min:1,max:5,value:H,onChange:g=>_(Math.max(1,Math.min(5,Number(g.target.value)||1))),className:"h-9 w-16"}),t.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:a("sandbox.postBoard.usesCredits")})]}),t.jsxs(ee,{type:"button",size:"sm",className:"w-full",onClick:()=>{te(!1),Ne()},children:[t.jsx(ht,{size:14}),a("sandbox.formats.suggestButton")]})]})]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:ae==="campaigns"?t.jsx(Tn,{orgSlug:f,virtualMcpId:e,branch:n,decofile:r}):ae==="formats"?t.jsxs("div",{className:"min-w-0 max-w-3xl space-y-3 px-8 py-6",children:[t.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.formats.hint")}),t.jsx(gs,{rules:O,onChange:R,revision:he,idPrefix:"format",add:a("sandbox.formats.add"),namePlaceholder:a("sandbox.formats.namePlaceholder"),bodyPlaceholder:a("sandbox.formats.bodyPlaceholder"),mentions:$,citationWarning:g=>{const G=Ra(g,E,w);return G.length===0?null:a("sandbox.formats.unknownCitations",{names:G.map(V=>`@${V}`).join(", ")})}})]}):t.jsxs("div",{className:"grid grid-cols-[240px_1fr] gap-8 px-8 py-6",children:[t.jsx("nav",{className:"sticky top-0 h-fit space-y-0.5 rounded-xl border bg-card p-1.5",children:Fn.map(g=>t.jsx("button",{type:"button",onClick:()=>Xt(g.id),className:le("w-full rounded-lg px-2.5 py-2 text-left text-sm transition-colors cursor-pointer",je===g.id?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:a(g.label)},g.id))}),t.jsx("div",{className:"min-w-0 max-w-3xl",children:Se()})]})})]})}function zt(f){const e=q.c(10),{active:n,onClick:r,disabled:l,children:m}=f,o=l&&"cursor-not-allowed text-muted-foreground opacity-70",a=!l&&"cursor-pointer",i=n?"border-foreground font-medium text-foreground":"border-transparent text-muted-foreground",p=!l&&!n&&"hover:text-foreground";let s;e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==p?(s=le("-mb-px flex items-center gap-1.5 border-b-2 px-3 py-3 text-sm transition-colors",o,a,i,p),e[0]=o,e[1]=a,e[2]=i,e[3]=p,e[4]=s):s=e[4];let u;return e[5]!==m||e[6]!==l||e[7]!==r||e[8]!==s?(u=t.jsx("button",{type:"button",onClick:r,disabled:l,className:s,children:m}),e[5]=m,e[6]=l,e[7]=r,e[8]=s,e[9]=u):u=e[9],u}function cs(f){const e=q.c(13),{id:n,label:r,value:l,onChange:m,placeholder:o}=f;let a;e[0]!==n||e[1]!==r?(a=t.jsx(I,{htmlFor:n,children:r}),e[0]=n,e[1]=r,e[2]=a):a=e[2];let i;e[3]!==m?(i=u=>m(u.target.value),e[3]=m,e[4]=i):i=e[4];let p;e[5]!==n||e[6]!==o||e[7]!==i||e[8]!==l?(p=t.jsx(J,{id:n,value:l,placeholder:o,onChange:i,className:"h-10"}),e[5]=n,e[6]=o,e[7]=i,e[8]=l,e[9]=p):p=e[9];let s;return e[10]!==a||e[11]!==p?(s=t.jsxs("div",{className:"space-y-2",children:[a,p]}),e[10]=a,e[11]=p,e[12]=s):s=e[12],s}function ds(f){const e=q.c(16),{id:n,label:r,hint:l,value:m,onChange:o,rows:a}=f,i=a===void 0?3:a;let p;e[0]!==n||e[1]!==r?(p=t.jsx(I,{htmlFor:n,children:r}),e[0]=n,e[1]=r,e[2]=p):p=e[2];let s;e[3]!==l?(s=l&&t.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[3]=l,e[4]=s):s=e[4];let u;e[5]!==o?(u=b=>o(b.target.value),e[5]=o,e[6]=u):u=e[6];let c;e[7]!==n||e[8]!==i||e[9]!==u||e[10]!==m?(c=t.jsx(xt,{id:n,value:m,rows:i,onChange:u}),e[7]=n,e[8]=i,e[9]=u,e[10]=m,e[11]=c):c=e[11];let j;return e[12]!==p||e[13]!==s||e[14]!==c?(j=t.jsxs("div",{className:"space-y-2",children:[p,s,c]}),e[12]=p,e[13]=s,e[14]=c,e[15]=j):j=e[15],j}function zn(f){const e=q.c(19),{examples:n,onChange:r}=f,l=be();let m;e[0]!==n||e[1]!==r?(m=(c,j)=>r(n.map((b,C)=>C===c?{...b,...j}:b)),e[0]=n,e[1]=r,e[2]=m):m=e[2];const o=m;let a;e[3]!==n||e[4]!==r||e[5]!==o||e[6]!==l?(a=n.length>0&&t.jsx("ul",{className:"divide-y overflow-hidden rounded-lg border",children:n.map((c,j)=>t.jsxs("li",{className:"flex items-center gap-2 bg-card px-3 py-2",children:[t.jsx(J,{"aria-label":l("sandbox.blogBrand.voiceExamplesLabel"),placeholder:l("sandbox.blogBrand.voiceExamplesPlaceholder"),value:c.text,onChange:b=>o(j,{text:b.target.value}),className:"min-w-0 flex-1 border-0 shadow-none focus-visible:ring-0"}),t.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-xs text-muted-foreground",children:[t.jsx(ja,{checked:c.sounds,onCheckedChange:b=>o(j,{sounds:b})}),t.jsx("span",{className:"whitespace-nowrap",children:l(c.sounds?"sandbox.blogBrand.voiceExamplesSounds":"sandbox.blogBrand.voiceExamplesDoesNotSound")})]}),t.jsx(_t,{label:l("sandbox.blogBrand.removeItem"),onClick:()=>r(n.filter((b,C)=>C!==j))})]},j))}),e[3]=n,e[4]=r,e[5]=o,e[6]=l,e[7]=a):a=e[7];let i;e[8]!==l?(i=l("sandbox.blogBrand.addVoiceExample"),e[8]=l,e[9]=i):i=e[9];let p;e[10]!==n||e[11]!==r?(p=()=>r([...n,{text:"",sounds:!0}]),e[10]=n,e[11]=r,e[12]=p):p=e[12];let s;e[13]!==i||e[14]!==p?(s=t.jsx(jt,{label:i,onClick:p}),e[13]=i,e[14]=p,e[15]=s):s=e[15];let u;return e[16]!==a||e[17]!==s?(u=t.jsxs("div",{className:"space-y-2",children:[a,s]}),e[16]=a,e[17]=s,e[18]=u):u=e[18],u}export{Zr as BlogContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as G,b as H,at as P,au as J,e as K,j as i,h as Q,av as U,aw as W,a as X,B as Y}from"./index-D_7jfHk6.js";import{A as Z,a as ee,b as te,c as ae,d as ie,e as oe,f as re}from"./alert-dialog-kjq4dW3k.js";import{F as ne,a as se,b as le,c as ce,d as me,e as ge,f as fe}from"./form-BBtB5neb.js";import{I as ue}from"./input-B0doV0os.js";function k(A){return A.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const de=A=>U({name:W().min(2,A("common.createOrganizationDialog.nameRequired"))});function be(A){const e=G.c(72),{open:B,onOpenChange:I,onCreated:y}=A,t=H();let s;e[0]!==t?(s=P(de(t)),e[0]=t,e[1]=s):s=e[1];let E;e[2]===Symbol.for("react.memo_cache_sentinel")?(E={name:""},e[2]=E):E=e[2];let T;e[3]!==s?(T={resolver:s,defaultValues:E},e[3]=s,e[4]=T):T=e[4];const a=J(T);let l;e[5]!==t?(l=async n=>{const r=k(n.name);if(!r)throw new Error(t("common.createOrganizationDialog.invalidSlug"));const $=await X.organization.create({name:n.name,slug:r});if($?.error)throw new Error($.error.message||t("common.createOrganizationDialog.failedToCreate"));const V=$?.data?.slug??r;if(!V)throw new Error(t("common.createOrganizationDialog.failedToCreate"));return{orgSlug:V}},e[5]=t,e[6]=l):l=e[6];let c;e[7]!==y?(c=n=>{const{orgSlug:r}=n;if(y){y(r);return}window.location.href=`/${r}`},e[7]=y,e[8]=c):c=e[8];let N;e[9]!==l||e[10]!==c?(N={mutationFn:l,onSuccess:c},e[9]=l,e[10]=c,e[11]=N):N=e[11];const o=K(N);let _;e[12]!==o.error||e[13]!==t?(_=o.error instanceof Error?o.error.message:o.error?t("common.createOrganizationDialog.failedToCreateGeneric"):null,e[12]=o.error,e[13]=t,e[14]=_):_=e[14];const L=_;let m;e[15]!==t?(m=t("common.createOrganizationDialog.title"),e[15]=t,e[16]=m):m=e[16];let g;e[17]!==m?(g=i.jsx(Z,{children:m}),e[17]=m,e[18]=g):g=e[18];let f;e[19]!==t?(f=t("common.createOrganizationDialog.description"),e[19]=t,e[20]=f):f=e[20];let u;e[21]!==f?(u=i.jsx(ee,{children:f}),e[21]=f,e[22]=u):u=e[22];let d;e[23]!==u||e[24]!==g?(d=i.jsxs(te,{children:[g,u]}),e[23]=u,e[24]=g,e[25]=d):d=e[25];let x;if(e[26]!==o||e[27]!==a){let n;e[29]!==o?(n=r=>o.mutateAsync(r),e[29]=o,e[30]=n):n=e[30],x=a.handleSubmit(n),e[26]=o,e[27]=a,e[28]=x}else x=e[28];let S;e[31]!==a.formState.isSubmitting||e[32]!==t?(S=n=>{const{field:r}=n;return i.jsxs(le,{children:[i.jsx(ce,{children:t("common.createOrganizationDialog.nameLabel")}),i.jsx(me,{children:i.jsx(ue,{...r,placeholder:t("common.createOrganizationDialog.namePlaceholder"),disabled:a.formState.isSubmitting})}),i.jsx(ge,{children:t("common.createOrganizationDialog.nameDescription")}),r.value&&i.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[t("common.createOrganizationDialog.urlLabel")," ",i.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",k(r.value)]})]}),i.jsx(fe,{})]})},e[31]=a.formState.isSubmitting,e[32]=t,e[33]=S):S=e[33];let h;e[34]!==a.control||e[35]!==S?(h=i.jsx(ne,{control:a.control,name:"name",render:S}),e[34]=a.control,e[35]=S,e[36]=h):h=e[36];let p;e[37]!==L?(p=L&&i.jsx("div",{className:"text-destructive text-sm mt-2",children:L}),e[37]=L,e[38]=p):p=e[38];const q=a.formState.isSubmitting;let b;e[39]!==o||e[40]!==a?(b=()=>{o.reset(),a.reset()},e[39]=o,e[40]=a,e[41]=b):b=e[41];let j;e[42]!==t?(j=t("common.createOrganizationDialog.cancel"),e[42]=t,e[43]=j):j=e[43];let D;e[44]!==a.formState.isSubmitting||e[45]!==b||e[46]!==j?(D=i.jsx(ae,{disabled:q,onClick:b,children:j}),e[44]=a.formState.isSubmitting,e[45]=b,e[46]=j,e[47]=D):D=e[47];const R=!a.formState.isValid||a.formState.isSubmitting;let z;e[48]!==a.formState.isSubmitting||e[49]!==t?(z=a.formState.isSubmitting?i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Q,{size:"xs"})," ",t("common.createOrganizationDialog.creating")]}):t("common.createOrganizationDialog.createButton"),e[48]=a.formState.isSubmitting,e[49]=t,e[50]=z):z=e[50];let O;e[51]!==R||e[52]!==z?(O=i.jsx(Y,{type:"submit",variant:"default",disabled:R,children:z}),e[51]=R,e[52]=z,e[53]=O):O=e[53];let C;e[54]!==D||e[55]!==O?(C=i.jsxs(ie,{children:[D,O]}),e[54]=D,e[55]=O,e[56]=C):C=e[56];let w;e[57]!==x||e[58]!==h||e[59]!==p||e[60]!==C?(w=i.jsxs("form",{className:"space-y-6",onSubmit:x,autoComplete:"off",children:[h,p,C]}),e[57]=x,e[58]=h,e[59]=p,e[60]=C,e[61]=w):w=e[61];let F;e[62]!==a||e[63]!==w?(F=i.jsx(se,{...a,children:w}),e[62]=a,e[63]=w,e[64]=F):F=e[64];let v;e[65]!==d||e[66]!==F?(v=i.jsxs(oe,{children:[d,F]}),e[65]=d,e[66]=F,e[67]=v):v=e[67];let M;return e[68]!==I||e[69]!==B||e[70]!==v?(M=i.jsx(re,{open:B,onOpenChange:I,children:v}),e[68]=I,e[69]=B,e[70]=v,e[71]=M):M=e[71],M}export{be as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as T,c as m,U as D,k as O,V as y,ab as j}from"./index-D_7jfHk6.js";import{p as k,n as P,o as _,q as E,r as R,P as g}from"./thread-button-DwjwmudD.js";import{c as x}from"./repository-binding-DpX8yLri.js";import{i as b,a as I}from"./config-B01oZvpJ.js";import{p as d}from"./task-route-4t67EvVC.js";const A=[],N=[];function v(s){const t=m.c(7);let e;t[0]!==s?(e=y.appOpens(s),t[0]=s,t[1]=e):e=t[1];const[o,i]=D(e,N),p=Array.isArray(o)?o:N;let a;t[2]!==i?(a=n=>i(c=>_(Array.isArray(c)?c:[],n)),t[2]=i,t[3]=a):a=t[3];let r;return t[4]!==p||t[5]!==a?(r={opens:p,remember:a},t[4]=p,t[5]=a,t[6]=r):r=t[6],r}function C(s){const t=m.c(9);let e;t[0]!==s?(e=y.recentApps(s),t[0]=s,t[1]=e):e=t[1];const[o,i]=D(e,A),p=Array.isArray(o)?o:A;let a,r;t[2]!==i?(a=c=>i(f=>E(Array.isArray(f)?f:[],c)),r=c=>i(f=>R(Array.isArray(f)?f:[],c)),t[2]=i,t[3]=a,t[4]=r):(a=t[3],r=t[4]);let n;return t[5]!==p||t[6]!==a||t[7]!==r?(n={recent:p,remember:a,forget:r},t[5]=p,t[6]=a,t[7]=r,t[8]=n):n=t[8],n}function H(){const s=m.c(1);let t;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:V,structuralSharing:!0},s[0]=t):t=s[0],O(t)}function V(s){const t=s.matches.findLast(L),e=t?.staticData.mainView,o=t?.params,i=o?.agentId;if(!e||!i)return null;if(e==="app"&&o.connectionId&&o.toolName)return{app:j(o.connectionId,o.toolName),projectId:i,connection:{id:o.connectionId,toolName:o.toolName}};const p=t.staticData.siteEditorView?"site-editor":e;return p in g?{app:p,projectId:i}:null}function L(s){return s.staticData.mainView}function G(s){const{remember:t}=C(s),e=H(),o=v(s),i=x(e?.projectId),p=e&&i?.id===e.projectId?i.title:null,a=e?.connection&&i?k(i).find(n=>n.connectionId===e.connection?.id&&n.toolName===e.connection.toolName):void 0,r=e?.connection&&{id:e.connection.id,toolName:e.connection.toolName,label:a?.label||e.connection.toolName,icon:a?.icon};T.useEffect(()=>{e&&o.remember(P(e.projectId,e.app)),!(!e||!p)&&t({app:e.app,projectId:e.projectId,projectTitle:p,...r&&{connection:r}})},[s,e?.app,e?.projectId,p,r?.label,r?.icon])}const W=7,l=new Set(["post_deploy_validation","done"]),M=new Set(["done","archived"]),U=W*864e5;function w(s,t){if(!s)return!1;const e=Date.parse(s);return Number.isNaN(e)?!1:Math.max(0,t-e)<=U}function J(s,t){let e=0;for(const o of s){if(!l.has(o.status)||!o.updatedAt)continue;const i=Date.parse(o.updatedAt);!Number.isNaN(i)&&i>=t&&e++}return e}function Y(s,t){return s.filter(e=>M.has(e.status)?!1:t&&e.assigneeId===t?!0:b(e)||I(e)).sort((e,o)=>(e.updatedAt??"").localeCompare(o.updatedAt??""))}function z(s){return b(s)?"answer":I(s)?"review":"assigned"}function Q(s,t,e,o=Date.now()){const i=new Set(Y(t,e).map(n=>n.id)),p=new Map,a=(n,c)=>{const f=p.get(n)??{waiting:0,failed:0,shipped:0,open:0};f[c]+=1,p.set(n,f)};for(const n of t){const c=M.has(n.status),f=n.threads.some(u=>u.status==="failed"&&w(u.lastActiveAt,o)),S=l.has(n.status)&&w(n.updatedAt,o);for(const u of d(n,s))c||a(u.id,"open"),i.has(n.id)&&a(u.id,"waiting"),f&&a(u.id,"failed"),S&&a(u.id,"shipped")}const r=new Map;for(const[n,c]of p){const f=c.waiting?"waiting":c.failed?"failed":c.shipped?"shipped":c.open?"open":"quiet";r.set(n,{kind:f,count:f==="quiet"?0:c[f],open:c.open})}return r}function X(s){const t=[];for(const e of s)for(const o of e.threads)o.status==="in_progress"&&t.push({threadId:o.threadId,taskId:e.id,taskTitle:e.title,runTitle:o.title,startedAt:o.createdAt});return t.sort((e,o)=>o.startedAt.localeCompare(e.startedAt))}const Z=14;function tt(s,t,e,o,i=Date.now()){const p=new Array(o).fill(0);for(const a of t){if(!l.has(a.status)||!a.updatedAt||!d(a,s).some(c=>c.id===e))continue;const r=Date.parse(a.updatedAt);if(Number.isNaN(r))continue;const n=o-1-Math.floor(Math.max(0,i-r)/864e5);n>=0&&n<o&&(p[n]+=1)}return p}function et(s,t=Date.now()){const e=new Date(t);e.setHours(0,0,0,0);const o=e.getTime();let i=0,p=0;for(const a of s)for(const r of a.threads){r.status==="in_progress"&&p++;const n=Date.parse(r.lastActiveAt);!Number.isNaN(n)&&n>=o&&i++}return{runs:i,live:p}}function nt(s,t,e=Date.now()){const o=new Array(t).fill(0);for(const i of s)for(const p of i.threads){const a=Date.parse(p.lastActiveAt);if(Number.isNaN(a))continue;const r=t-1-Math.floor(Math.max(0,e-a)/864e5);r>=0&&r<t&&(o[r]+=1)}return o}function h(s){const t=new Date(s);t.setDate(1),t.setHours(0,0,0,0);const e=t.getTime();return{since:e,days:Math.floor((s-e)/864e5)+1}}function st(s,t=Date.now()){const{since:e,days:o}=h(t),i=new Array(o).fill(0);for(const p of s)for(const a of p.threads){const r=Date.parse(a.lastActiveAt);if(Number.isNaN(r)||r<e||r>t)continue;const n=Math.floor((r-e)/864e5);n>=0&&n<o&&(i[n]+=a.costUsd??0)}return i}function ot(s,t,e,o=Date.now()){const{since:i,days:p}=h(o),a=new Array(p).fill(0);for(const r of t)if(d(r,s).some(n=>n.id===e))for(const n of r.threads){const c=Date.parse(n.lastActiveAt);if(Number.isNaN(c)||c<i||c>o)continue;const f=Math.floor((c-i)/864e5);f>=0&&f<p&&(a[f]+=n.costUsd??0)}return a}function at(s,t,e=Date.now()){const{since:o}=h(e),i=n=>{if(!n)return!1;const c=Date.parse(n);return!Number.isNaN(c)&&c>=o&&c<=e};let p=0,a=0;const r=new Map;for(const n of t){l.has(n.status)&&i(n.updatedAt)&&a++;let c=0;for(const f of n.threads)i(f.lastActiveAt)&&(c+=f.costUsd??0);if(c!==0){p+=c;for(const f of d(n,s))r.set(f.id,(r.get(f.id)??0)+c)}}return{total:p,byProject:[...r].map(([n,c])=>({projectId:n,usd:c})).sort((n,c)=>c.usd-n.usd),perShipped:a>0?p/a:null}}export{Z as R,C as a,H as b,X as c,z as d,v as e,tt as f,ot as g,st as h,nt as i,at as m,Q as p,et as r,J as s,Y as t,G as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c}from"./index-D_7jfHk6.js";import{c as f}from"./sandbox-lifecycle-context-BJE24h7z.js";import{q as l}from"./claim-phase-copy-DG8E1-gc.js";function p(t,e,n){return t===null?0:Math.max(0,n-Math.max(0,e-t))}function m(t,e){const[n,r]=o.useState(t),a=o.useRef(null);return t&&!n&&r(!0),o.useEffect(()=>{if(t){a.current??=Date.now();return}if(!n)return;const s=()=>{a.current=null,r(!1)},i=p(a.current,Date.now(),e);if(i===0){s();return}const u=setTimeout(s,i);return()=>clearTimeout(u)},[t,n,e]),n}const y=500;function d(t,e,n){const r=c.c(6);let a;r[0]!==n||r[1]!==t||r[2]!==e?(a=l(t,e,n),r[0]=n,r[1]=t,r[2]=e,r[3]=a):a=r[3];let s;r[4]!==a?(s={mutationKey:a},r[4]=a,r[5]=s):s=r[5];const i=f(s)>0;return m(i,y)}function D(t,e,n){return`deco:preview:last-page:${t}:${e}:${n}`}function g(t){if(!t)return null;try{const e=JSON.parse(t);if(!e||typeof e!="object"||Array.isArray(e)||typeof e.path!="string"||!e.path.startsWith("/"))return null;const n=typeof e.pageKey=="string"?e.pageKey:null,r={};if(e.params&&typeof e.params=="object")for(const[a,s]of Object.entries(e.params))typeof s=="string"&&(r[a]=s);return{path:e.path,pageKey:n,params:r}}catch{return null}}function K(t){try{return g(localStorage.getItem(t))}catch{return null}}function x(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function A(t,e){try{const n=new URL(t,window.location.href);return n.searchParams.set("deviceHint",e),n.href}catch{return t}}export{x as a,D as l,K as r,d as u,A as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as n,j as i,bi as u,l as c,ax as m,bj as x,bk as b,bl as j,bm as N,bn as D,bo as p}from"./index-D_7jfHk6.js";import{i as h}from"./X-DzPShgV5.js";function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(p,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(D,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 rounded-lg","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(p,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let g;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(g=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=g):g=e[14],g}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{k as D,z as a,T as b,R as c,E as d,B as e,y as f,v as g,O as h,w as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as U,c as L,b as X,X as Z,j as i,n as oe,a9 as ee,l as K,B as O,L as G,a6 as le,q as re}from"./index-D_7jfHk6.js";import{C as ne}from"./index-Cx0uPPmh.js";import{i as ce}from"./LinkBroken01-kK_na_OL.js";import{T as me}from"./agent-icon-CnnNyirr.js";import{b as J}from"./ZoomOut-CQckFmS9.js";import{a as ae}from"./Image01-Cxa392ef.js";import{s as fe}from"./Plus-nldAzVeQ.js";import{t as de}from"./Users01-D7ZFKC4W.js";import{G as te}from"./repository-picker-C2HnHK1A.js";import{u as V}from"./use-connection-5LUEsGlJ.js";import{u as ie}from"./use-project-scope-BMVXwaQ4.js";import{g as se}from"./repository-binding-DpX8yLri.js";import{u as pe}from"./use-members-vjX9lJhj.js";import{u as ue}from"./use-file-configs-By7UB_YZ.js";import{d as xe}from"./use-chat-layout-state-DDDFQN6Y.js";import{r as he}from"./site-slug-DebpOoQq.js";import{r as ge}from"./virtual-mcp-CYDFCAA6.js";import"./use-mobile-DF1FX6Xv.js";import"./thread-button-DwjwmudD.js";import"./UserSquare-BMOlWqCu.js";import"./sheet-Gpaizien.js";import"./X-DzPShgV5.js";import"./tooltip-BULKkf4A.js";import"./index-D1CuHcEn.js";import"./toolbar-icon-button-D9aCXzS4.js";import"./shell-layout-B0-NcUCt.js";import"./avatar-TL9HUab0.js";import"./User01-Awky2MVQ.js";import"./Building02-uHT4KVtK.js";import"./XClose-DBJ7sD1T.js";import"./use-panel-navigate-C4UE8Qkr.js";import"./thread-route-CW2be8Kx.js";import"./CheckCircle-BKHstO_Q.js";import"./Monitor01-Cl4JLYVa.js";import"./use-clock-tick-DGTQe72H.js";import"./dialog-DRpbbWU1.js";import"./Tool01-Blw6F5iV.js";import"./command-Doiz3O29.js";import"./index-DltLvtZg.js";import"./SearchMd-BiZNveM1.js";import"./integration-icon-BM3EOzpn.js";import"./project-icon-DU1uywdD.js";import"./use-mcp-client-MUIIizLf.js";import"./auth-Cps-90jQ.js";import"./new-project-dialog-CXEwhrv6.js";import"./ArrowLeft-C1IFj0Ic.js";import"./input-B0doV0os.js";import"./label-DxOPcXJe.js";import"./repository-import-picker-CO5nKRxA.js";import"./use-navigate-to-agent-p65xWFDF.js";import"./thread-intent-Cxso0qKW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BXtoXPGx.js";import"./task-board-ChFrokIN.js";import"./schema-D1veJPjJ.js";import"./slugify-CEUa2lfQ.js";import"./required-auth-layout-CDif9NZC.js";import"./autosend-BQ3F90GX.js";import"./use-org-sso-BEGhJLya.js";import"./resizable-CIqqPf7O.js";import"./icon-button-BiR7Hy07.js";import"./AlertCircle-C3fpFT5I.js";import"./ArrowUp-DR-Jhbl1.js";import"./ShoppingBag01-o0DdjJD9.js";import"./ChevronUp-CceLPRrE.js";import"./ChevronSelectorVertical-DAO6R1Op.js";import"./Copy01-Dx3ZT0bA.js";import"./CreditCard01-Dko0T335.js";import"./DotsVertical-aHYBPlin.js";import"./Globe04-BDe-0jS0.js";import"./SwitchHorizontal01-Bx3d-jDI.js";import"./Key01-BHiUNW_5.js";import"./Link01-BRZRc4wX.js";import"./LinkExternal01-CILXo-bC.js";import"./Sun-BYGxydmh.js";import"./Play-CzTcIQz_.js";import"./Trash01-DAoFHSpp.js";import"./Upload01-CtKBhqsv.js";import"./useInfiniteQuery-eYXaZ_bo.js";import"./infiniteQueryObserver-DG8sBe4B.js";import"./collection-search-BoB9COGX.js";import"./use-debounced-value-DCB8Le0h.js";import"./use-organization-settings-CB0-LYjl.js";import"./use-org-auth-client-CuZ7oLTb.js";import"./url-slug-d-Er1jOR.js";function be(e){return[U.SELF(e),U.REGISTRY(e),U.COMMUNITY_REGISTRY(e),U.DEV_ASSETS(e)]}function je(e,t){const s=new Set(be(t));return e.some(l=>!s.has(l.id))}function ve(){const e=L.c(77),t=X(),{org:s}=Z(),l=V();let $;e[0]===Symbol.for("react.memo_cache_sentinel")?($={slug:"mcp-github"},e[0]=$):$=e[0];const u=V($),{projects:_}=ie(),o=pe();let r;e[1]!==s.slug?(r={org:s.slug},e[1]=s.slug,e[2]=r):r=e[2];const n=r;let x;e[3]!==t?(x=t("discover.setup.connectTitle"),e[3]=t,e[4]=x):x=e[4];let S;e[5]!==t?(S=t("discover.setup.connectBody"),e[5]=t,e[6]=S):S=e[6];let c;e[7]!==l||e[8]!==s.id?(c=je(l,s.id),e[7]=l,e[8]=s.id,e[9]=c):c=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(me,{size:18}),e[10]=h):h=e[10];let z;e[11]===Symbol.for("react.memo_cache_sentinel")?(z={tab:"all"},e[11]=z):z=e[11];let m;e[12]!==t?(m=t("discover.setup.connectAction"),e[12]=t,e[13]=m):m=e[13];let a;e[14]!==n||e[15]!==m?(a=i.jsx(O,{asChild:!0,variant:"outline",size:"sm",children:i.jsx(G,{to:"/$org/settings/connections",params:n,search:z,children:m})}),e[14]=n,e[15]=m,e[16]=a):a=e[16];let f;e[17]!==x||e[18]!==S||e[19]!==c||e[20]!==a?(f={key:"connect",title:x,body:S,done:c,icon:h,action:a},e[17]=x,e[18]=S,e[19]=c,e[20]=a,e[21]=f):f=e[21];let N;e[22]!==t?(N=t("discover.setup.githubTitle"),e[22]=t,e[23]=N):N=e[23];let g;e[24]!==t?(g=t("discover.setup.githubBody"),e[24]=t,e[25]=g):g=e[25];const C=u.length>0;let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsx(te,{className:"size-[18px]"}),e[26]=b):b=e[26];let j;e[27]===Symbol.for("react.memo_cache_sentinel")?(j={tab:"all"},e[27]=j):j=e[27];let v;e[28]!==t?(v=t("discover.setup.githubAction"),e[28]=t,e[29]=v):v=e[29];let d;e[30]!==n||e[31]!==v?(d=i.jsx(O,{asChild:!0,variant:"outline",size:"sm",children:i.jsx(G,{to:"/$org/settings/connections",params:n,search:j,children:v})}),e[30]=n,e[31]=v,e[32]=d):d=e[32];let y;e[33]!==N||e[34]!==g||e[35]!==C||e[36]!==d?(y={key:"github",title:N,body:g,done:C,icon:b,action:d},e[33]=N,e[34]=g,e[35]=C,e[36]=d,e[37]=y):y=e[37];let p;e[38]!==t?(p=t("discover.setup.projectTitle"),e[38]=t,e[39]=p):p=e[39];let k;e[40]!==t?(k=t("discover.setup.projectBody"),e[40]=t,e[41]=k):k=e[41];const T=_.length>0;let R;e[42]===Symbol.for("react.memo_cache_sentinel")?(R=i.jsx(fe,{size:18}),e[42]=R):R=e[42];let w;e[43]!==s.slug?(w={org:s.slug},e[43]=s.slug,e[44]=w):w=e[44];let A;e[45]!==t?(A=t("discover.setup.projectAction"),e[45]=t,e[46]=A):A=e[46];let q;e[47]!==w||e[48]!==A?(q=i.jsx(O,{asChild:!0,variant:"outline",size:"sm",children:i.jsx(G,{to:le.home,params:w,children:A})}),e[47]=w,e[48]=A,e[49]=q):q=e[49];let E;e[50]!==p||e[51]!==k||e[52]!==T||e[53]!==q?(E={key:"project",title:p,body:k,done:T,icon:R,action:q},e[50]=p,e[51]=k,e[52]=T,e[53]=q,e[54]=E):E=e[54];let B;e[55]!==t?(B=t("discover.setup.inviteTitle"),e[55]=t,e[56]=B):B=e[56];let P;e[57]!==t?(P=t("discover.setup.inviteBody"),e[57]=t,e[58]=P):P=e[58];let Y;e[59]!==o.data?.data?.members?(Y=o.data?.data?.members??[],e[59]=o.data?.data?.members,e[60]=Y):Y=e[60];const W=Y.length>1;let F;e[61]===Symbol.for("react.memo_cache_sentinel")?(F=i.jsx(de,{size:18}),e[61]=F):F=e[61];let D;e[62]!==t?(D=t("discover.setup.inviteAction"),e[62]=t,e[63]=D):D=e[63];let I;e[64]!==n||e[65]!==D?(I=i.jsx(O,{asChild:!0,variant:"outline",size:"sm",children:i.jsx(G,{to:"/$org/settings/members",params:n,children:D})}),e[64]=n,e[65]=D,e[66]=I):I=e[66];let M;e[67]!==B||e[68]!==P||e[69]!==W||e[70]!==I?(M={key:"invite",title:B,body:P,done:W,icon:F,action:I},e[67]=B,e[68]=P,e[69]=W,e[70]=I,e[71]=M):M=e[71];let Q;return e[72]!==y||e[73]!==E||e[74]!==M||e[75]!==f?(Q=[f,y,E,M],e[72]=y,e[73]=E,e[74]=M,e[75]=f,e[76]=Q):Q=e[76],Q}function ye(){const e=L.c(51),t=X(),{projects:s}=ie();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={slug:"mcp-github"},e[0]=l):l=e[0];const $=V(l),u=ue();let _;e[1]!==s?(_=s.some(Se),e[1]=s,e[2]=_):_=e[2];const o=_;let r;e[3]!==s?(r=s.some(_e),e[3]=s,e[4]=r):r=e[4];const n=r;let x;if(e[5]!==u||e[6]!==s){let w;e[8]!==u?(w=A=>xe(u.data?.configs??[],he(A)),e[8]=u,e[9]=w):w=e[9],x=s.some(w),e[5]=u,e[6]=s,e[7]=x}else x=e[7];const S=x;let c;e[10]!==t?(c=t("discover.capabilities.previewTitle"),e[10]=t,e[11]=c):c=e[11];let h;e[12]!==t?(h=t("discover.capabilities.previewRequirement"),e[12]=t,e[13]=h):h=e[13];let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=i.jsx(J,{size:18}),e[14]=z):z=e[14];let m;e[15]!==o||e[16]!==c||e[17]!==h?(m={key:"preview",title:c,requirement:h,satisfied:o,icon:z},e[15]=o,e[16]=c,e[17]=h,e[18]=m):m=e[18];let a;e[19]!==t?(a=t("discover.capabilities.gitTitle"),e[19]=t,e[20]=a):a=e[20];let f;e[21]!==t?(f=t("discover.capabilities.gitRequirement"),e[21]=t,e[22]=f):f=e[22];const N=$.length>0&&o;let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(te,{className:"size-[18px]"}),e[23]=g):g=e[23];let C;e[24]!==N||e[25]!==a||e[26]!==f?(C={key:"git",title:a,requirement:f,satisfied:N,icon:g},e[24]=N,e[25]=a,e[26]=f,e[27]=C):C=e[27];let b;e[28]!==t?(b=t("discover.capabilities.contentTitle"),e[28]=t,e[29]=b):b=e[29];let j;e[30]!==t?(j=t("discover.capabilities.contentRequirement"),e[30]=t,e[31]=j):j=e[31];let v;e[32]===Symbol.for("react.memo_cache_sentinel")?(v=i.jsx(J,{size:18}),e[32]=v):v=e[32];let d;e[33]!==n||e[34]!==b||e[35]!==j?(d={key:"content",title:b,requirement:j,satisfied:n,icon:v},e[33]=n,e[34]=b,e[35]=j,e[36]=d):d=e[36];let y;e[37]!==t?(y=t("discover.capabilities.assetsTitle"),e[37]=t,e[38]=y):y=e[38];let p;e[39]!==t?(p=t("discover.capabilities.assetsRequirement"),e[39]=t,e[40]=p):p=e[40];let k;e[41]===Symbol.for("react.memo_cache_sentinel")?(k=i.jsx(ae,{size:18}),e[41]=k):k=e[41];let T;e[42]!==S||e[43]!==y||e[44]!==p?(T={key:"assets",title:y,requirement:p,satisfied:S,icon:k},e[42]=S,e[43]=y,e[44]=p,e[45]=T):T=e[45];let R;return e[46]!==C||e[47]!==d||e[48]!==T||e[49]!==m?(R=[m,C,d,T],e[46]=C,e[47]=d,e[48]=T,e[49]=m,e[50]=R):R=e[50],R}function _e(e){return!!se(e)&&ge(e.metadata?.ui?.layout)!=="off"}function Se(e){return se(e)}function H(e){const t=L.c(10),{title:s,description:l,children:$}=e;let u;t[0]!==s?(u=i.jsx("h2",{className:"text-base font-semibold text-foreground",children:s}),t[0]=s,t[1]=u):u=t[1];let _;t[2]!==l?(_=i.jsx("p",{className:"max-w-prose text-sm text-muted-foreground",children:l}),t[2]=l,t[3]=_):_=t[3];let o;t[4]!==u||t[5]!==_?(o=i.jsxs("div",{className:"flex flex-col gap-1",children:[u,_]}),t[4]=u,t[5]=_,t[6]=o):o=t[6];let r;return t[7]!==$||t[8]!==o?(r=i.jsxs("section",{className:"flex flex-col gap-3",children:[o,$]}),t[7]=$,t[8]=o,t[9]=r):r=t[9],r}function Ne(){const e=L.c(63),t=X(),{org:s}=Z(),l=ve(),$=ye();let u;e[0]!==l?(u=l.filter(ze),e[0]=l,e[1]=u):u=e[1];const _=u;let o;e[2]!==t?(o=t("discover.title"),e[2]=t,e[3]=o):o=e[3];let r;e[4]!==o?(r=i.jsx(oe.Title,{children:o}),e[4]=o,e[5]=r):r=e[5];let n;e[6]!==t?(n=t("discover.subtitle"),e[6]=t,e[7]=n):n=e[7];let x;e[8]!==n?(x=i.jsx("p",{className:"max-w-prose text-sm text-muted-foreground",children:n}),e[8]=n,e[9]=x):x=e[9];let S;e[10]!==r||e[11]!==x?(S=i.jsxs("header",{className:"flex flex-col gap-2",children:[r,x]}),e[10]=r,e[11]=x,e[12]=S):S=e[12];let c;e[13]!==t?(c=t("discover.setup.title"),e[13]=t,e[14]=c):c=e[14];let h;e[15]!==_.length||e[16]!==t?(h=_.length===0?t("discover.setup.allDone"):t("discover.setup.description"),e[15]=_.length,e[16]=t,e[17]=h):h=e[17];let z;e[18]!==l?(z=l.map(Te),e[18]=l,e[19]=z):z=e[19];let m;e[20]!==z?(m=i.jsx("ul",{className:"flex flex-col gap-2",children:z}),e[20]=z,e[21]=m):m=e[21];let a;e[22]!==c||e[23]!==h||e[24]!==m?(a=i.jsx(H,{title:c,description:h,children:m}),e[22]=c,e[23]=h,e[24]=m,e[25]=a):a=e[25];let f;e[26]!==t?(f=t("discover.capabilities.title"),e[26]=t,e[27]=f):f=e[27];let N;e[28]!==t?(N=t("discover.capabilities.description"),e[28]=t,e[29]=N):N=e[29];let g;if(e[30]!==$||e[31]!==t){let A;e[33]!==t?(A=q=>i.jsxs("li",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[i.jsx("span",{className:K("mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg",q.satisfied?"bg-success/10 text-success":"bg-muted text-muted-foreground"),children:q.satisfied?i.jsx(ee,{size:18}):q.icon}),i.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[i.jsx("span",{className:"text-sm font-medium text-foreground",children:q.title}),i.jsx("span",{className:"text-sm text-muted-foreground",children:q.satisfied?t("discover.capabilities.ready"):q.requirement})]})]},q.key),e[33]=t,e[34]=A):A=e[34],g=$.map(A),e[30]=$,e[31]=t,e[32]=g}else g=e[32];let C;e[35]!==g?(C=i.jsx("ul",{className:"grid gap-2 sm:grid-cols-2",children:g}),e[35]=g,e[36]=C):C=e[36];let b;e[37]!==f||e[38]!==N||e[39]!==C?(b=i.jsx(H,{title:f,description:N,children:C}),e[37]=f,e[38]=N,e[39]=C,e[40]=b):b=e[40];let j;e[41]!==t?(j=t("discover.catalog.title"),e[41]=t,e[42]=j):j=e[42];let v;e[43]!==t?(v=t("discover.catalog.description"),e[43]=t,e[44]=v):v=e[44];let d;e[45]!==s.slug?(d={org:s.slug},e[45]=s.slug,e[46]=d):d=e[46];let y;e[47]===Symbol.for("react.memo_cache_sentinel")?(y={tab:"all"},e[47]=y):y=e[47];let p;e[48]!==t?(p=t("discover.catalog.action"),e[48]=t,e[49]=p):p=e[49];let k;e[50]===Symbol.for("react.memo_cache_sentinel")?(k=i.jsx(ce,{size:18}),e[50]=k):k=e[50];let T;e[51]!==d||e[52]!==p?(T=i.jsx("div",{children:i.jsx(O,{asChild:!0,size:"lg",children:i.jsxs(G,{to:"/$org/settings/connections",params:d,search:y,onClick:Ce,children:[p,k]})})}),e[51]=d,e[52]=p,e[53]=T):T=e[53];let R;e[54]!==j||e[55]!==v||e[56]!==T?(R=i.jsx(H,{title:j,description:v,children:T}),e[54]=j,e[55]=v,e[56]=T,e[57]=R):R=e[57];let w;return e[58]!==a||e[59]!==b||e[60]!==R||e[61]!==S?(w=i.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-y-auto",children:i.jsxs("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-10 p-6 md:p-10",children:[S,a,b,R]})}),e[58]=a,e[59]=b,e[60]=R,e[61]=S,e[62]=w):w=e[62],w}function Ce(){return re("discover_catalog_opened",{})}function Te(e){return i.jsxs("li",{className:K("flex items-start gap-3 rounded-xl border border-border bg-card p-4",e.done&&"opacity-60"),children:[i.jsx("span",{className:K("mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg",e.done?"bg-success/10 text-success":"bg-muted text-muted-foreground"),children:e.done?i.jsx(ee,{size:18}):e.icon}),i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[i.jsx("span",{className:"text-sm font-medium text-foreground",children:e.title}),i.jsx("span",{className:"text-sm text-muted-foreground",children:e.body})]}),!e.done&&i.jsx("div",{className:"shrink-0",children:e.action})]},e.key)}function ze(e){return!e.done}function ri(){const e=L.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(ne.Content,{children:i.jsx(Ne,{})}),e[0]=t):t=e[0],t}export{ri as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as oe,b as ae,X as re,o as de,a2 as ce,r as me,K as ie,m as ge,e as W,q as ue,t as N,j as s,eh as fe,B as te,eg as xe,ef as Se}from"./index-D_7jfHk6.js";import{B as ne}from"./badge-CKM84j2S.js";import{I as je}from"./input-B0doV0os.js";import{S as pe,b as he,a as Ne,d as ve,c as se}from"./select-CZdnCwuC.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function ye(){const e=oe.c(101),t=ae(),{org:o}=re(),p=de(),i=ce(),[r,v]=me.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=ge(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ue("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const d=W(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let O;e[27]!==t?(O=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=O):O=e[28];let U;e[29]!==O||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:O},e[29]=O,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=W(U);let b;e[33]!==i?(b=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==b||e[41]!==y||e[42]!==E?(Y={mutationFn:b,onSuccess:y,onError:E},e[40]=b,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=W(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=W($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let q;e[59]!==t?(q=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=q):q=e[60];let k;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],k=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=k}else k=e[66];let X;e[72]===Symbol.for("react.memo_cache_sentinel")?(X=n=>v(n.target.value),e[72]=X):X=e[72];let z;e[73]!==t?(z=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=z):z=e[74];let F;e[75]!==r||e[76]!==z?(F=s.jsx(je,{value:r,onChange:X,placeholder:z,className:"max-w-xs"}),e[75]=r,e[76]=z,e[77]=F):F=e[77];let w;e[78]!==d||e[79]!==r?(w=()=>d.mutate(r.trim()),e[78]=d,e[79]=r,e[80]=w):w=e[80];let G;e[81]!==d.isPending||e[82]!==r?(G=!r.trim()||d.isPending,e[81]=d.isPending,e[82]=r,e[83]=G):G=e[83];let Z;e[84]!==d.isPending||e[85]!==t?(Z=d.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=d.isPending,e[85]=t,e[86]=Z):Z=e[86];let B;e[87]!==w||e[88]!==G||e[89]!==Z?(B=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:Z}),e[87]=w,e[88]=G,e[89]=Z,e[90]=B):B=e[90];let H;e[91]!==F||e[92]!==B?(H=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[F,B]}),e[91]=F,e[92]=B,e[93]=H):H=e[93];let K;e[94]!==k||e[95]!==H?(K=s.jsxs(xe,{children:[k,H]}),e[94]=k,e[95]=H,e[96]=K):K=e[96];let J;return e[97]!==V||e[98]!==q||e[99]!==K?(J=s.jsx(Se,{title:V,description:q,children:K}),e[97]=V,e[98]=q,e[99]=K,e[100]=J):J=e[100],J}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let r;t[0]!==i?(r=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=r):r=t[1];const v=r;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let d;return t[31]!==j||t[32]!==m?(d=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=d):d=t[33],d}export{ye as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,l as B,j as t,b as F,d as R,X as O,x as M,a7 as H,a9 as W,B as U}from"./index-D_7jfHk6.js";import{d as X,h as q,c as G,b as I,D as J}from"./dialog-DRpbbWU1.js";import{u as K,a as Q,i as V,p as Y,b as Z,P as ee,f as te}from"./plan-ladder-DlpzxobM.js";import{a as se}from"./use-decopilot-events-uItZ_pJe.js";function le(N){const e=$.c(37),{open:a,onDismiss:n,accentClassName:i,icon:E,title:s,description:P,highlights:D,price:v,action:k,dismissAction:A}=N,T=a===void 0?!0:a,y=i??"text-muted-foreground";let l;e[0]!==n?(l=w=>!w&&n?.(),e[0]=n,e[1]=l):l=e[1];let c;e[2]!==y?(c=B("pointer-events-none",y),e[2]=y,e[3]=c):c=e[3];let h,b;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"absolute inset-x-0 top-0 h-60 opacity-60 dark:opacity-30",style:{background:"radial-gradient(ellipse 70% 100% at 50% 0%, currentColor 0%, transparent 72%)"}}),b=t.jsx("div",{className:"absolute inset-x-8 top-0 h-px bg-gradient-to-r from-transparent via-current to-transparent opacity-80 dark:opacity-60"}),e[4]=h,e[5]=b):(h=e[4],b=e[5]);let o;e[6]!==c?(o=t.jsxs("div",{"aria-hidden":"true",className:c,children:[h,b]}),e[6]=c,e[7]=o):o=e[7];let r;e[8]!==E?(r=t.jsx("div",{className:"mb-7",children:E}),e[8]=E,e[9]=r):r=e[9];let p;e[10]!==s?(p=t.jsx(X,{className:"text-2xl font-semibold leading-tight tracking-tight text-balance",children:s}),e[10]=s,e[11]=p):p=e[11];let d;e[12]!==P?(d=P&&t.jsx(q,{className:"mx-auto max-w-[32ch] text-sm leading-relaxed text-pretty",children:P}),e[12]=P,e[13]=d):d=e[13];let m;e[14]!==p||e[15]!==d?(m=t.jsxs(G,{className:"gap-2",children:[p,d]}),e[14]=p,e[15]=d,e[16]=m):m=e[16];let g;e[17]!==D?(g=D&&t.jsx("div",{className:"mt-6 w-fit",children:D}),e[17]=D,e[18]=g):g=e[18];let u;e[19]!==v?(u=v&&t.jsx("div",{className:"mt-7",children:v}),e[19]=v,e[20]=u):u=e[20];let x;e[21]!==k||e[22]!==A?(x=t.jsxs("div",{className:"mt-8 flex w-full flex-col items-center gap-2",children:[k,A]}),e[21]=k,e[22]=A,e[23]=x):x=e[23];let f;e[24]!==m||e[25]!==g||e[26]!==u||e[27]!==x||e[28]!==r?(f=t.jsxs("div",{className:"flex flex-col items-center px-8 pt-10 pb-8 text-center",children:[r,m,g,u,x]}),e[24]=m,e[25]=g,e[26]=u,e[27]=x,e[28]=r,e[29]=f):f=e[29];let j;e[30]!==f||e[31]!==o?(j=t.jsxs(I,{className:"gap-0 overflow-hidden p-0 sm:max-w-[480px]",onOpenAutoFocus:ae,children:[o,f]}),e[30]=f,e[31]=o,e[32]=j):j=e[32];let C;return e[33]!==T||e[34]!==j||e[35]!==l?(C=t.jsx(J,{open:T,onOpenChange:l,children:j}),e[33]=T,e[34]=j,e[35]=l,e[36]=C):C=e[36],C}function ae(N){return N.preventDefault()}function ne(N,e){if(!N||!e)return null;const a=N.findIndex(i=>i.id===e)+1,n=a>0?N[a]:void 0;return n?{plan:n,index:a}:null}const _={kanban:["settings.paywall.bullets.kanban.1","settings.paywall.bullets.kanban.2","settings.paywall.bullets.kanban.3"],cms:["settings.paywall.bullets.cms.1","settings.paywall.bullets.cms.2","settings.paywall.bullets.cms.3"],monitoring:["settings.paywall.bullets.monitoring.1","settings.paywall.bullets.monitoring.2","settings.paywall.bullets.monitoring.3"]},ie=["settings.paywall.bullets.allowance.1","settings.paywall.bullets.allowance.2","settings.paywall.bullets.allowance.3"];function de(N){const e=$.c(45),{feature:a,copy:n,onDismiss:i,onSeePlans:E}=N,s=F(),P=R(),{org:D}=O(),{data:v}=K(),{data:k}=se(),{data:A}=Q(),[T]=M();let y,l,c,h,b,o,r,p;if(e[0]!==n||e[1]!==k?.plan.id||e[2]!==a||e[3]!==i||e[4]!==v||e[5]!==A||e[6]!==s){const C=s(`settings.planUsage.feature.${a}`),w=V(k?.plan.id)?null:n?ne(v,k?.plan.id):Y(v,a),z=w?Z(w.index):void 0;l=w?A?.[w.plan.id]:void 0;const L=n?ie:a in _?_[a]:null;y=le,c=i,h=z,b=w?t.jsx(ee,{index:w.index,className:"size-20"}):t.jsx(H,{className:"size-12 text-muted-foreground"}),o=n?.title??(w?s("settings.paywall.upgradeTitle",{plan:w.plan.name,feature:C}):C),r=n?.description??(L?void 0:w?s("settings.paywall.upgradeDescription"):s("settings.paywall.description",{feature:C})),p=L&&t.jsx("ul",{className:"flex flex-col gap-2.5 text-left",children:L.map(S=>t.jsxs("li",{className:"flex items-center gap-3 text-sm",children:[t.jsx(W,{size:16,className:B("shrink-0",z)}),t.jsx("span",{children:s(S)})]},S))}),e[0]=n,e[1]=k?.plan.id,e[2]=a,e[3]=i,e[4]=v,e[5]=A,e[6]=s,e[7]=y,e[8]=l,e[9]=c,e[10]=h,e[11]=b,e[12]=o,e[13]=r,e[14]=p}else y=e[7],l=e[8],c=e[9],h=e[10],b=e[11],o=e[12],r=e[13],p=e[14];let d;e[15]!==T||e[16]!==l||e[17]!==s?(d=l!==void 0?t.jsxs("span",{className:"flex items-baseline justify-center gap-1.5",children:[t.jsx("span",{className:"text-2xl font-semibold tabular-nums tracking-tight",children:te(l,T.language)}),t.jsx("span",{className:"text-sm text-muted-foreground",children:s("settings.plans.perMonth")})]}):void 0,e[15]=T,e[16]=l,e[17]=s,e[18]=d):d=e[18];let m;e[19]!==P||e[20]!==i||e[21]!==E||e[22]!==D.slug?(m=()=>{P({to:"/$org/settings/ai-providers",params:{org:D.slug}}),(E??i)?.()},e[19]=P,e[20]=i,e[21]=E,e[22]=D.slug,e[23]=m):m=e[23];let g;e[24]!==s?(g=s("settings.paywall.seePlans"),e[24]=s,e[25]=g):g=e[25];let u;e[26]!==m||e[27]!==g?(u=t.jsx(U,{size:"lg",className:"w-full",onClick:m,children:g}),e[26]=m,e[27]=g,e[28]=u):u=e[28];let x;e[29]!==s?(x=s("settings.paywall.dismiss"),e[29]=s,e[30]=x):x=e[30];let f;e[31]!==i||e[32]!==x?(f=t.jsx(U,{variant:"ghost",size:"lg",className:"w-full",onClick:i,children:x}),e[31]=i,e[32]=x,e[33]=f):f=e[33];let j;return e[34]!==y||e[35]!==c||e[36]!==u||e[37]!==f||e[38]!==h||e[39]!==b||e[40]!==o||e[41]!==r||e[42]!==p||e[43]!==d?(j=t.jsx(y,{onDismiss:c,accentClassName:h,icon:b,title:o,description:r,highlights:p,price:d,action:u,dismissAction:f}),e[34]=y,e[35]=c,e[36]=u,e[37]=f,e[38]=h,e[39]=b,e[40]=o,e[41]=r,e[42]=p,e[43]=d,e[44]=j):j=e[44],j}export{de as F};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as Se,b as ve,r as f,j as s,h as fe,B as Ce,l as me,al as It,o as Gt,t as ee,K as Je}from"./index-D_7jfHk6.js";import{k as Vt,I as Bt,bE as qt,bF as Ht}from"./agent-icon-CnnNyirr.js";import{s as Wt}from"./XClose-DBJ7sD1T.js";import{S as Qt}from"./scroll-area-Ce9NeF1s.js";import{b as Ze,T as _e,a as et}from"./tooltip-BULKkf4A.js";import{a as Ut}from"./chat-context-UMp8QwjT.js";import{F as Xt}from"./editor-CPkkN1Zr.js";import{a as Yt}from"./shell-layout-B0-NcUCt.js";import{s as je}from"./save-changes-debug-nBi-n9eV.js";import{t as tt,f as Jt}from"./sandbox-git-api-C7JbVL7R.js";import{d as Zt,h as _t,c as en,e as tn,b as nn,D as rn}from"./dialog-DRpbbWU1.js";import{I as nt}from"./input-B0doV0os.js";import{A as sn,a as ln,b as on,c as an,g as cn,d as dn,e as fn,f as un}from"./alert-dialog-kjq4dW3k.js";import{a as pn,C as de,g as rt,b as mn,c as xn}from"./context-menu-BLhcVqO0.js";import{t as hn}from"./ChevronUp-CceLPRrE.js";import{b as gn}from"./sandbox-url-D3mC8qhT.js";import{i as bn,E as yn,c as Pe,e as wn,f as jn,h as Nn,j as Dn,t as ne,k as Ne,l as Me,m as De,g as Ke,n as Ae,o as En,s as Cn,v as Sn,p as Oe,q as Ee,r as ze,u as vn,w as Fn,x as kn,y as Tn}from"./utils-Cxy1EsFU.js";import"./AlertCircle-C3fpFT5I.js";import"./Tool01-Blw6F5iV.js";import"./ArrowUp-DR-Jhbl1.js";import"./ArrowLeft-C1IFj0Ic.js";import"./LinkBroken01-kK_na_OL.js";import"./ShoppingBag01-o0DdjJD9.js";import"./ZoomOut-CQckFmS9.js";import"./Building02-uHT4KVtK.js";import"./CheckCircle-BKHstO_Q.js";import"./ChevronSelectorVertical-DAO6R1Op.js";import"./UserSquare-BMOlWqCu.js";import"./Copy01-Dx3ZT0bA.js";import"./CreditCard01-Dko0T335.js";import"./DotsVertical-aHYBPlin.js";import"./Image01-Cxa392ef.js";import"./Globe04-BDe-0jS0.js";import"./SwitchHorizontal01-Bx3d-jDI.js";import"./Key01-BHiUNW_5.js";import"./Link01-BRZRc4wX.js";import"./LinkExternal01-CILXo-bC.js";import"./Monitor01-Cl4JLYVa.js";import"./Sun-BYGxydmh.js";import"./Play-CzTcIQz_.js";import"./Plus-nldAzVeQ.js";import"./SearchMd-BiZNveM1.js";import"./Trash01-DAoFHSpp.js";import"./Upload01-CtKBhqsv.js";import"./User01-Awky2MVQ.js";import"./Users01-D7ZFKC4W.js";import"./X-DzPShgV5.js";import"./index-BdQq_4o_.js";import"./index-D1CuHcEn.js";import"./use-panel-navigate-C4UE8Qkr.js";import"./thread-route-CW2be8Kx.js";import"./use-project-scope-BMVXwaQ4.js";import"./repository-binding-DpX8yLri.js";import"./use-mcp-client-MUIIizLf.js";import"./auth-Cps-90jQ.js";import"./autosend-BQ3F90GX.js";import"./thread-intent-Cxso0qKW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BXtoXPGx.js";import"./task-board-ChFrokIN.js";import"./schema-D1veJPjJ.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-uItZ_pJe.js";import"./use-ai-providers-C1bb7SnA.js";import"./use-chat-navigation-BF9opsK8.js";import"./location-BjlyegC2.js";import"./use-organization-settings-CB0-LYjl.js";import"./avatar-TL9HUab0.js";import"./use-clock-tick-DGTQe72H.js";import"./command-Doiz3O29.js";import"./index-DltLvtZg.js";import"./integration-icon-BM3EOzpn.js";import"./project-icon-DU1uywdD.js";import"./new-project-dialog-CXEwhrv6.js";import"./label-DxOPcXJe.js";import"./repository-import-picker-CO5nKRxA.js";import"./use-navigate-to-agent-p65xWFDF.js";import"./repository-picker-C2HnHK1A.js";import"./useInfiniteQuery-eYXaZ_bo.js";import"./infiniteQueryObserver-DG8sBe4B.js";import"./collection-search-BoB9COGX.js";import"./use-debounced-value-DCB8Le0h.js";import"./required-auth-layout-CDif9NZC.js";import"./use-org-sso-BEGhJLya.js";const Rn={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function Ln(A){const e=Se.c(71),{open:p,mode:X,initialName:y,parentLabel:N,isPending:L,onSubmit:d,onOpenChange:w}=A,O=y===void 0?"":y,m=L===void 0?!1:L,a=ve(),[o,P]=f.useState(O),[Y,M]=f.useState(p),x=Rn[X];p!==Y&&(M(p),p&&P(O));let c;e[0]!==m||e[1]!==w?(c=U=>{!U&&!m&&w(!1)},e[0]=m,e[1]=w,e[2]=c):c=e[2];const C=c;let z;e[3]!==m||e[4]!==o||e[5]!==d?(z=async U=>{U.preventDefault();const te=o.trim();!te||m||await d(te)},e[3]=m,e[4]=o,e[5]=d,e[6]=z):z=e[6];const R=z;let S;e[7]!==x.titleKey||e[8]!==a?(S=a(x.titleKey),e[7]=x.titleKey,e[8]=a,e[9]=S):S=e[9];let v;e[10]!==S?(v=s.jsx(Zt,{children:S}),e[10]=S,e[11]=v):v=e[11];let D;e[12]!==x.descriptionKey||e[13]!==a?(D=a(x.descriptionKey),e[12]=x.descriptionKey,e[13]=a,e[14]=D):D=e[14];let j;e[15]!==D?(j=s.jsx(_t,{children:D}),e[15]=D,e[16]=j):j=e[16];let g;e[17]!==v||e[18]!==j?(g=s.jsxs(en,{children:[v,j]}),e[17]=v,e[18]=j,e[19]=g):g=e[19];let E;e[20]!==N||e[21]!==a?(E=N&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:a("sandbox.fileExplorerNameDialog.location")}),s.jsx(nt,{value:N,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=N,e[21]=a,e[22]=E):E=e[22];let b;e[23]!==a?(b=a("sandbox.fileExplorerNameDialog.name"),e[23]=a,e[24]=b):b=e[24];let k;e[25]!==b?(k=s.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:b}),e[25]=b,e[26]=k):k=e[26];let H;e[27]===Symbol.for("react.memo_cache_sentinel")?(H=U=>P(U.target.value),e[27]=H):H=e[27];let $;e[28]!==x.placeholderKey||e[29]!==a?($=a(x.placeholderKey),e[28]=x.placeholderKey,e[29]=a,e[30]=$):$=e[30];let J;e[31]!==m||e[32]!==o||e[33]!==$?(J=s.jsx(nt,{id:"file-explorer-name",value:o,onChange:H,placeholder:$,autoFocus:!0,disabled:m}),e[31]=m,e[32]=o,e[33]=$,e[34]=J):J=e[34];let Z;e[35]!==k||e[36]!==J?(Z=s.jsxs("div",{className:"space-y-1.5",children:[k,J]}),e[35]=k,e[36]=J,e[37]=Z):Z=e[37];let _;e[38]!==E||e[39]!==Z?(_=s.jsxs("div",{className:"space-y-4 py-4",children:[E,Z]}),e[38]=E,e[39]=Z,e[40]=_):_=e[40];let I;e[41]!==w?(I=()=>w(!1),e[41]=w,e[42]=I):I=e[42];let T;e[43]!==a?(T=a("sandbox.fileExplorerNameDialog.cancel"),e[43]=a,e[44]=T):T=e[44];let W;e[45]!==m||e[46]!==I||e[47]!==T?(W=s.jsx(Ce,{type:"button",variant:"outline",onClick:I,disabled:m,children:T}),e[45]=m,e[46]=I,e[47]=T,e[48]=W):W=e[48];let K;e[49]!==m||e[50]!==o?(K=!o.trim()||m,e[49]=m,e[50]=o,e[51]=K):K=e[51];let Q;e[52]!==x.submitKey||e[53]!==m||e[54]!==a?(Q=m?s.jsxs(s.Fragment,{children:[s.jsx(fe,{className:"size-3.5"}),a("sandbox.fileExplorerNameDialog.saving")]}):a(x.submitKey),e[52]=x.submitKey,e[53]=m,e[54]=a,e[55]=Q):Q=e[55];let G;e[56]!==K||e[57]!==Q?(G=s.jsx(Ce,{type:"submit",disabled:K,children:Q}),e[56]=K,e[57]=Q,e[58]=G):G=e[58];let F;e[59]!==W||e[60]!==G?(F=s.jsxs(tn,{children:[W,G]}),e[59]=W,e[60]=G,e[61]=F):F=e[61];let V;e[62]!==R||e[63]!==_||e[64]!==F||e[65]!==g?(V=s.jsx(nn,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:R,children:[g,_,F]})}),e[62]=R,e[63]=_,e[64]=F,e[65]=g,e[66]=V):V=e[66];let B;return e[67]!==C||e[68]!==p||e[69]!==V?(B=s.jsx(rn,{open:p,onOpenChange:C,children:V}),e[67]=C,e[68]=p,e[69]=V,e[70]=B):B=e[70],B}function Pn(A){const e=Se.c(47),{deleteTarget:p,deleteDirtyPaths:X,fsActionPending:y,onOpenChange:N,onConfirm:L}=A,d=ve(),w=p?.kind==="directory",O=p!==null,m=w?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let a;e[0]!==d||e[1]!==m?(a=d(m),e[0]=d,e[1]=m,e[2]=a):a=e[2];let o;e[3]!==a?(o=s.jsx(sn,{children:a}),e[3]=a,e[4]=o):o=e[4];let P;e[5]!==d?(P=d("sandbox.fileExplorerDeleteDialog.description"),e[5]=d,e[6]=P):P=e[6];const Y=p?.name;let M;e[7]!==Y?(M=s.jsx("span",{className:"font-mono",children:Y}),e[7]=Y,e[8]=M):M=e[8];let x;e[9]!==w||e[10]!==d?(x=w?d("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=w,e[10]=d,e[11]=x):x=e[11];let c;e[12]!==X.length||e[13]!==d?(c=X.length>0&&s.jsxs(s.Fragment,{children:[" ",X.length===1?d("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):d("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:X.length})]}),e[12]=X.length,e[13]=d,e[14]=c):c=e[14];let C;e[15]!==P||e[16]!==M||e[17]!==x||e[18]!==c?(C=s.jsxs(ln,{children:[P," ",M,x,c]}),e[15]=P,e[16]=M,e[17]=x,e[18]=c,e[19]=C):C=e[19];let z;e[20]!==C||e[21]!==o?(z=s.jsxs(on,{children:[o,C]}),e[20]=C,e[21]=o,e[22]=z):z=e[22];let R;e[23]!==d?(R=d("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=d,e[24]=R):R=e[24];let S;e[25]!==y||e[26]!==R?(S=s.jsx(an,{disabled:y,children:R}),e[25]=y,e[26]=R,e[27]=S):S=e[27];const v=y||!p;let D;e[28]!==p||e[29]!==L?(D=H=>{H.preventDefault(),p&&L(p)},e[28]=p,e[29]=L,e[30]=D):D=e[30];let j;e[31]!==d?(j=d("sandbox.fileExplorerDeleteDialog.delete"),e[31]=d,e[32]=j):j=e[32];let g;e[33]!==v||e[34]!==D||e[35]!==j?(g=s.jsx(cn,{disabled:v,onClick:D,children:j}),e[33]=v,e[34]=D,e[35]=j,e[36]=g):g=e[36];let E;e[37]!==S||e[38]!==g?(E=s.jsxs(dn,{children:[S,g]}),e[37]=S,e[38]=g,e[39]=E):E=e[39];let b;e[40]!==z||e[41]!==E?(b=s.jsxs(fn,{children:[z,E]}),e[40]=z,e[41]=E,e[42]=b):b=e[42];let k;return e[43]!==N||e[44]!==O||e[45]!==b?(k=s.jsx(un,{open:O,onOpenChange:N,children:b}),e[43]=N,e[44]=O,e[45]=b,e[46]=k):k=e[46],k}const Mn="#d9a441";function Kn(A){const e=Se.c(63),{node:p,depth:X,isExpanded:y,isSelected:N,isLoading:L,fileVisual:d,onOpen:w,onSelect:O,onNewFile:m,onNewFolder:a,onCopyPath:o,onCopyRelativePath:P,onRename:Y,onDelete:M}=A,x=L===void 0?!1:L,c=ve(),C=p.kind==="directory",{Icon:z,color:R}=d,S=N&&"bg-accent";let v;e[0]!==S?(v=me("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=v):v=e[1];const D=`${X*14+8}px`;let j;e[2]!==D?(j={paddingLeft:D},e[2]=D,e[3]=j):j=e[3];let g;e[4]!==w||e[5]!==O?(g=()=>{O(),w()},e[4]=w,e[5]=O,e[6]=g):g=e[6];let E;e[7]!==z||e[8]!==R||e[9]!==C||e[10]!==y||e[11]!==x?(E=C?s.jsxs(s.Fragment,{children:[x?s.jsx(fe,{className:"size-3.5 shrink-0 text-muted-foreground"}):y?s.jsx(hn,{size:14,className:"shrink-0 text-muted-foreground"}):s.jsx(It,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx(Vt,{size:16,className:"shrink-0",style:{color:Mn}})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"w-3.5 shrink-0"}),s.jsx(z,{size:16,className:"shrink-0",style:{color:R}})]}),e[7]=z,e[8]=R,e[9]=C,e[10]=y,e[11]=x,e[12]=E):E=e[12];let b;e[13]!==p.name?(b=s.jsx("span",{className:"truncate",children:p.name}),e[13]=p.name,e[14]=b):b=e[14];let k;e[15]!==v||e[16]!==j||e[17]!==g||e[18]!==E||e[19]!==b?(k=s.jsx(pn,{asChild:!0,children:s.jsxs("button",{type:"button",className:v,style:j,onClick:g,children:[E,b]})}),e[15]=v,e[16]=j,e[17]=g,e[18]=E,e[19]=b,e[20]=k):k=e[20];let H;e[21]!==c?(H=c("sandbox.fileTreeRow.newFile"),e[21]=c,e[22]=H):H=e[22];let $;e[23]!==m||e[24]!==H?($=s.jsx(de,{onSelect:m,children:H}),e[23]=m,e[24]=H,e[25]=$):$=e[25];let J;e[26]!==c?(J=c("sandbox.fileTreeRow.newFolder"),e[26]=c,e[27]=J):J=e[27];let Z;e[28]!==a||e[29]!==J?(Z=s.jsx(de,{onSelect:a,children:J}),e[28]=a,e[29]=J,e[30]=Z):Z=e[30];let _;e[31]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(rt,{}),e[31]=_):_=e[31];let I;e[32]!==c?(I=c("sandbox.fileTreeRow.copyPath"),e[32]=c,e[33]=I):I=e[33];let T;e[34]!==o||e[35]!==I?(T=s.jsx(de,{onSelect:o,children:I}),e[34]=o,e[35]=I,e[36]=T):T=e[36];let W;e[37]!==c?(W=c("sandbox.fileTreeRow.copyRelativePath"),e[37]=c,e[38]=W):W=e[38];let K;e[39]!==P||e[40]!==W?(K=s.jsx(de,{onSelect:P,children:W}),e[39]=P,e[40]=W,e[41]=K):K=e[41];let Q;e[42]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(rt,{}),e[42]=Q):Q=e[42];let G;e[43]!==c?(G=c("sandbox.fileTreeRow.rename"),e[43]=c,e[44]=G):G=e[44];let F;e[45]!==Y||e[46]!==G?(F=s.jsx(de,{onSelect:Y,children:G}),e[45]=Y,e[46]=G,e[47]=F):F=e[47];let V;e[48]!==c?(V=c("sandbox.fileTreeRow.delete"),e[48]=c,e[49]=V):V=e[49];let B;e[50]!==M||e[51]!==V?(B=s.jsx(de,{variant:"destructive",onSelect:M,children:V}),e[50]=M,e[51]=V,e[52]=B):B=e[52];let U;e[53]!==$||e[54]!==Z||e[55]!==T||e[56]!==K||e[57]!==F||e[58]!==B?(U=s.jsxs(mn,{className:"w-52",children:[$,Z,_,T,K,Q,F,B]}),e[53]=$,e[54]=Z,e[55]=T,e[56]=K,e[57]=F,e[58]=B,e[59]=U):U=e[59];let te;return e[60]!==U||e[61]!==k?(te=s.jsxs(xn,{children:[k,U]}),e[60]=U,e[61]=k,e[62]=te):te=e[62],te}const st=200,An=2,On=250,it=200;function zn(A,e){return gn(A,e)}function $n(A){const e=Se.c(9),{text:p,query:X}=A;let y,N,L;if(e[0]!==X||e[1]!==p){const{leadingEllipsis:w,segments:O}=En(p,X);y="truncate font-mono text-muted-foreground",N=w&&s.jsx("span",{className:"text-muted-foreground/50",children:"…"}),L=O.map(In),e[0]=X,e[1]=p,e[2]=y,e[3]=N,e[4]=L}else y=e[2],N=e[3],L=e[4];let d;return e[5]!==y||e[6]!==N||e[7]!==L?(d=s.jsxs("span",{className:y,children:[N,L]}),e[5]=y,e[6]=N,e[7]=L,e[8]=d):d=e[8],d}function In(A,e){return A.match?s.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:A.text},e):s.jsx("span",{children:A.text},e)}function bs({orgSlug:A,virtualMcpId:e,branch:p,threadId:X,openPath:y}){const N={orgSlug:A,virtualMcpId:e,branch:p,threadId:X},[L,d]=f.useState({files:[],directories:[],truncated:!1}),{files:w,directories:O}=L,[m,a]=f.useState(new Set),[o,P]=f.useState(null),[Y,M]=f.useState(null),[x,c]=f.useState([]),[C,z]=f.useState(""),[R,S]=f.useState(null),[v,D]=f.useState(null),[j,g]=f.useState(!1),[E,b]=f.useState(!1),[k,H]=f.useState(!1),[$,J]=f.useState(!1),[,Z]=f.useState(new Set),[_,I]=f.useState(new Set),T=f.useRef(0),W=f.useRef(null),K=f.useRef(new Set),Q=f.useRef(new Map),G=f.useRef(null),F=f.useRef(0),V=f.useRef(null),B=f.useRef(null),U=f.useRef(null);function te(t){Z(n=>{const r=typeof t=="function"?t(n):t;return K.current=r,r})}const[oe,ae]=f.useState(new Map),Fe=f.useRef(null),[se,xe]=f.useState(null),{sendMessage:lt}=Ut(),{openSidePanel:ot}=Yt(),he=Gt(),[q,re]=f.useState(null),[ke,Te]=f.useState(null),[ge,be]=f.useState(!1);async function ie(t,n){const r=await fetch(zn(N,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.error??`Request failed (${r.status})`)}return r.json()}async function ye(){he.invalidateQueries({queryKey:tt(N)})}function $e(t,n,r){navigator.clipboard.writeText(r).then(()=>ee.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ee.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function at(t){const n=kn(t);if(!n)return;const r=`${A}/${e}/${p}`;he.setQueryData(Je.decofile(r),i=>{if(!i)return i;const{[n]:l,...u}=i;return u}),he.invalidateQueries({queryKey:Je.liveMeta(A,e,p)})}function ct(t){const n=t.kind==="file"?[t.path]:w.filter(r=>r.startsWith(".deco/blocks/")).map(r=>Ne(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)at(r)}function dt(t){const n=Ne(t);return x.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const i=oe.get(r);return!!(i?.loaded&&i.editorValue!==i.savedContent)})}function Ie(t){c(n=>n.map(r=>t(r)).filter(r=>r!==null)),P(n=>n&&t(n)),ae(n=>{const r=new Map;for(const[i,l]of n){const u=t(i);u&&r.set(u,l)}return r}),M(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function ft(t){const n=Ne(t);M(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),Ie(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function ut(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:ne(r),content:""}),await ue(),await ye(),re(null),pe(r)}async function pt(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const i=ne(r);await ie("mkdir",{path:i}),d(l=>({...l,directories:l.directories.includes(i)?l.directories:[...l.directories,i]})),await ue(),await ye(),re(null),a(l=>{const u=new Set(l);for(const le of Ae(r))u.add(le);return u.add(r),u}),M({name:n,path:r,kind:"directory",children:[]})}async function mt(t,n){if(!q)return;const r=q.node.path,i=De(r),l=Ee(i,n);if(l===r){re(null);return}if(ze(l,w,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:ne(r),to:ne(l)}),Ie(u=>u===r?l:u.startsWith(`${r}/`)?Ee(l,u.slice(r.length+1)):u),await ue(),await ye(),re(null)}async function xt(t,n){be(!0);try{await ie("unlink",{path:ne(n.path),recursive:n.kind==="directory"}),ct(n),ft(n.path),await ue(),await ye(),Te(null),ee.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(r){ee.error(r instanceof Error?r.message:t("sandbox.fileExplorer.deleteFailed"))}finally{be(!1)}}async function ht(t,n){const r=Sn(n);if(r){ee.error(r);return}be(!0);try{q?.mode==="new-file"?(await ut(t,n),ee.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):q?.mode==="new-folder"?(await pt(t,n),ee.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):q?.mode==="rename"&&(await mt(t,n),ee.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(i){ee.error(i instanceof Error?i.message:t("sandbox.fileExplorer.operationFailed"))}finally{be(!1)}}const Ge=f.useRef(!1);Ge.current||(Ge.current=!0,W.current=ue());const[gt,bt]=f.useState(null),h=ve();if(y&&y!==gt){bt(y);const t=y;queueMicrotask(()=>{bn(t)&&pe(t)})}async function Re(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,r){if(r!==T.current)return!1;let i=!1;return d(l=>{const u=n?Tn(l.files,l.directories,t,l.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return i=!!u.truncated,{files:u.files,directories:u.directories,truncated:i}}),i&&ee.warning(h("sandbox.fileExplorer.fileListTruncated")),i}async function yt(t){const n=Q.current.get(t);if(n)return n;const r=T.current,i=(async()=>{const l=await Re({pattern:"**/*",path:ne(t),limit:Pe}),u=Ve(l,!0,r);return!u&&r===T.current&&te(le=>{const we=new Set(le);return we.add(t),we}),u})();Q.current.set(t,i);try{return await i}finally{Q.current.delete(t)}}async function Be(t){if(!Oe(t,K.current))return!1;I(n=>new Set(n).add(t));try{return await yt(t)}finally{I(n=>{const r=new Set(n);return r.delete(t),r})}}async function wt(t,n){const r=new Set(K.current);for(const i of Ae(n)){if(!Oe(i,r))continue;if(await Be(i))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));r.add(i)}}async function ue(){const t=++T.current;V.current=null,B.current=null,Q.current.clear(),H(!0),te(new Set),a(new Set),I(new Set);try{const n=await Re({pattern:"**/*",limit:Pe,maxDepth:yn});Ve(n,!1,t),J(!0)}catch{$&&ee.error(h("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function qe(t){if(!oe.get(t)?.loaded){ae(r=>{const i=new Map(r);return i.set(t,{savedContent:"",editorValue:"",loaded:!1}),i});try{const r=await ie("read",{path:ne(t),full:!0}),i=Cn(r.content??"");ae(l=>{const u=new Map(l);return u.set(t,{savedContent:i,editorValue:i,loaded:!0}),u})}catch{}}}function jt(){F.current++,S(null),D(null),g(!1),b(!1)}async function Nt(){const t=T.current,n=V.current;if(n&&n.generation===t)return n.files;const r=B.current;if(r&&r.generation===t)return r.promise;const i=(async()=>{const l=await Re({pattern:"**/*",limit:Pe});return T.current===t&&(V.current={generation:t,files:l.files}),l.files})();B.current={generation:t,promise:i};try{return await i}finally{B.current?.generation===t&&(B.current=null)}}async function Dt(t,n){try{const r=await Nt();if(n!==F.current)return;S(vn(r,t,it))}catch{if(n!==F.current)return;S([])}}async function Et(t,n){g(!0);try{const r=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:st});if(n!==F.current)return;D(Fn(r.results??"")),b((r.matchCount??0)>=st)}catch{if(n!==F.current)return;D([]),b(!1)}finally{n===F.current&&g(!1)}}function Ct(t){const n=t.trim(),r=++F.current;Dt(n,r),n.length<An?(D(null),g(!1),b(!1)):Et(n,r)}function St(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){jt();return}G.current=setTimeout(()=>{Ct(t)},On)}function He(t){const n=U.current;if(!n||n.path!==o)return;U.current=null;const r=Math.max(1,n.line);t.revealLineInCenter(r),t.setPosition({lineNumber:r,column:1}),t.focus()}function vt(t){U.current={path:t.path,line:t.line};const n=o===t.path&&oe.get(t.path)?.loaded;pe(t.path),n&&Fe.current&&He(Fe.current)}async function Ft(t,n){try{await ie("write",{path:ne(t),content:n}),je("file saved via sandbox /write",{path:t}),he.invalidateQueries({queryKey:tt(N)});try{const r=await Jt(N);je("git status after save",r)}catch(r){je("git status after save failed",{path:t,error:r instanceof Error?r.message:String(r)})}ae(r=>{const i=new Map(r),l=i.get(t);return l&&i.set(t,{...l,savedContent:n}),i})}catch(r){je("file save failed",{path:t,error:r instanceof Error?r.message:String(r)})}}function kt(t){P(t),M({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),xe(null),x.includes(t)||c(n=>[...n,t]),qe(t)}function Tt(t){const n=oe.get(t);n?.loaded&&n.editorValue!==n.savedContent&&!window.confirm(h("sandbox.fileExplorer.discardUnsavedChangesConfirm"))||(c(i=>{const l=i.filter(u=>u!==t);return o===t&&P(l[l.length-1]??null),l}),ae(i=>{const l=new Map(i);return l.delete(t),l}))}function We(t){a(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function Rt(t){if(Oe(t,K.current))try{if(await Be(t))return}catch(n){ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToLoadFolder"));return}We(t)}async function Lt(t,n){if(n){We(t);return}await Rt(t)}async function Pt(t){await W.current,await wt(h,t);const n=Ae(t);a(r=>{const i=new Set(r);for(const l of n)i.add(l);return i}),kt(t)}function pe(t){Pt(t).catch(n=>{ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToOpenFile"))})}function Mt(){return Y?.kind==="directory"?Y.path:Y?.kind==="file"?De(Y.path):o?De(o):"/"}function Qe(t){const n=Mt();re({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Kt=wn(w,O),Ue=jn(Kt,m),Le=R?.length??0,Xe=Nn(v??[]),Ye=v?.length??0,ce=o?oe.get(o):null,At=ce?.loaded&&ce.editorValue!==ce.savedContent,Ot=ke?dt(ke.path):[],zt=(t,n)=>{Fe.current=t,He(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await Ft(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),i=t.getModel();if(!r||!i||!o)return;const l=i.getValueInRange(r);xe({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:l})})};function $t(t){if(!se)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${se.filePath}\``,`**Lines:** ${se.lineStart}–${se.lineEnd}`];if(se.selectedCode){const r=Ke(se.filePath),i=se.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,i,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),ot(),lt({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),xe(null)}return k&&!$?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[s.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[s.jsxs("div",{className:"relative min-w-0 flex-1",children:[s.jsx(Bt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"text",value:C,onChange:t=>St(t.target.value),placeholder:h("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":h("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),s.jsxs(Ze,{children:[s.jsx(_e,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":h("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:s.jsx(qt,{size:14})})}),s.jsx(et,{side:"bottom",children:h("sandbox.fileExplorer.newFile")})]}),s.jsxs(Ze,{children:[s.jsx(_e,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":h("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:s.jsx(Ht,{size:14})})}),s.jsx(et,{side:"bottom",children:h("sandbox.fileExplorer.newFolder")})]})]}),s.jsx(Qt,{className:"flex-1",children:s.jsxs("div",{className:"py-1",children:[!C&&Ue.map(t=>{const{node:n,depth:r}=t,i=n.kind==="directory",l=m.has(n.path),u=Y?.path===n.path,le=Dn(n.path,n.kind),we=i&&_.has(n.path);return s.jsx(Kn,{node:n,depth:r,isExpanded:l,isSelected:u,isLoading:we,fileVisual:Me(n.name),onSelect:()=>M(n),onOpen:()=>{i?Lt(n.path,l):pe(n.path)},onNewFile:()=>re({mode:"new-file",node:n,parentDir:le}),onNewFolder:()=>re({mode:"new-folder",node:n,parentDir:le}),onCopyPath:()=>$e(h,"Path",Ne(n.path)),onCopyRelativePath:()=>$e(h,"Relative path",ne(n.path)),onRename:()=>re({mode:"rename",node:n,parentDir:le}),onDelete:()=>Te(n)},n.path)}),!C&&$&&Ue.length===0&&s.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFilesFound")}),C&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.files")}),Le>0&&s.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Le,Le>=it?"+":""]})]}),R!==null&&R.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFileNamesMatch")}),R?.map(t=>{const n=t.split("/").pop()??t,r=De(t),{Icon:i,color:l}=Me(n),u=o===t;return s.jsxs("button",{type:"button",onClick:()=>pe(t),title:t,className:me("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",u&&"bg-accent"),children:[s.jsx(i,{size:14,className:me("shrink-0",l)}),s.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),r!=="/"&&s.jsx("span",{className:"truncate text-muted-foreground/60",children:r})]},t)})]}),C&&s.jsxs("div",{className:"mt-1 border-t pt-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.inFiles")}),Ye>0&&s.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Ye,E?"+":""]}),j&&s.jsx(fe,{className:"size-[10px]"})]}),!j&&v!==null&&Xe.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noMatchesInFileContents")}),Xe.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:r,color:i}=Me(n);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[s.jsx(r,{size:14,className:me("shrink-0",i)}),s.jsx("span",{className:"truncate",children:n}),s.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(l=>s.jsxs("button",{type:"button",onClick:()=>vt(l),title:`${t.path}:${l.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[s.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:l.line}),s.jsx($n,{text:l.text,query:C})]},`${t.path}:${l.line}`))]},t.path)})]})]})})]}),s.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[x.length>0&&s.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:x.map(t=>{const n=oe.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,i=o===t,l=t.split("/").pop()??t;return s.jsxs("div",{className:me("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",i?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{P(t),qe(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":i,children:[s.jsx("span",{className:"truncate max-w-32",children:l}),r&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),s.jsx("button",{type:"button",className:"ml-1 p-0.5 hover:bg-accent-foreground/10 rounded-lg",onClick:u=>{u.stopPropagation(),Tt(t)},children:s.jsx(Wt,{size:12})})]},t)})}),se&&s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:s.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&$t(r.value)},children:[s.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:h("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&xe(null)}}),s.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity",title:h("sandbox.fileExplorer.send"),children:s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[s.jsx("title",{children:h("sandbox.fileExplorer.send")}),s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),s.jsx("div",{className:"flex-1 overflow-hidden",children:o&&ce?.loaded?s.jsx(Xt,{language:Ke(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ce.editorValue,path:o,onChange:t=>{const n=o;n&&ae(r=>{const i=new Map(r),l=i.get(n);return l&&i.set(n,{...l,editorValue:t??""}),i})},onMount:zt,loading:s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},o):o&&!ce?.loaded?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:h("sandbox.fileExplorer.selectFileToEdit")})}),o&&s.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[s.jsx("span",{className:"truncate",children:o}),s.jsxs("span",{children:[h(At?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ke(o)]})]})]}),s.jsx(Ln,{open:q!==null,mode:q?.mode??"new-file",initialName:q?.mode==="rename"?q.node.name:"",parentLabel:q&&q.mode!=="rename"?q.parentDir==="/"?"/":ne(q.parentDir):void 0,isPending:ge,onSubmit:t=>ht(h,t),onOpenChange:t=>{!t&&!ge&&re(null)}}),s.jsx(Pn,{deleteTarget:ke,deleteDirtyPaths:Ot,fsActionPending:ge,onOpenChange:t=>{!t&&!ge&&Te(null)},onConfirm:t=>{xt(h,t)}})]})}export{bs as FileExplorer};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{c as te,b as se,j as t,B as _,aJ as ue,l as ee,I as fe,F as me,H as he,G as re,n as pe,X as xe,o as be,r as D,t as J,K as ie,a9 as ve,a7 as we}from"./index-D_7jfHk6.js";import{b as Q,T as Y,a as X}from"./tooltip-BULKkf4A.js";import{n as ae}from"./ZoomOut-CQckFmS9.js";import{ap as ke,a$ as ge,b as ye,m as Se,d as oe,b0 as je}from"./agent-icon-CnnNyirr.js";import{n as Me}from"./LinkExternal01-CILXo-bC.js";import{c as Te,e as Ce,d as De,u as Pe}from"./use-org-fs-DPxqVRhB.js";import{c as ze,d as Ne,b as Ee,D as Oe}from"./dialog-DRpbbWU1.js";import{I as $e}from"./input-B0doV0os.js";import{a as Be,b as Re,P as Ie}from"./popover-C2vJrXky.js";import{a as Ae}from"./Copy01-Dx3ZT0bA.js";import{i as Fe}from"./Key01-BHiUNW_5.js";function le(n){return n==="bar"?{variant:"ghost",size:"icon"}:{variant:"secondary",size:"icon-sm"}}function Le(n){const e=te.c(73),{readUrl:u,editor:a,downloadName:m,trailing:v,className:h,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==u?(p=new URL(u,window.location.origin).toString(),e[0]=u,e[1]=p):p=e[1];const o=p;let F;e[2]!==r?(F=le(r),e[2]=r,e[3]=F):F=e[3];const d=F;let x;e[4]!==a.agentUpdated||e[5]!==a.reload||e[6]!==s?(x=a.agentUpdated&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsxs(_,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:a.reload,children:[t.jsx(ue,{size:12}),s("deck.deckToolbar.agentUpdatedReload")]})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.agentRewriteWarning")})]}),e[4]=a.agentUpdated,e[5]=a.reload,e[6]=s,e[7]=x):x=e[7];let g;e[8]!==a.saving||e[9]!==s?(g=a.saving&&t.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:s("deck.deckToolbar.saving")}),e[8]=a.saving,e[9]=s,e[10]=g):g=e[10];let S;e[11]!==d.size||e[12]!==d.variant||e[13]!==a||e[14]!==s?(S=a.deckDetected&&a.writable&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:a.editMode?"secondary":d.variant,size:d.size,"aria-pressed":a.editMode,"aria-label":a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInline"),className:ee(a.editMode&&"text-primary"),onClick:()=>a.setEditMode(!a.editMode),children:t.jsx(ke,{size:14})})}),t.jsx(X,{side:"bottom",children:a.editMode?s("deck.deckToolbar.doneEditing"):s("deck.deckToolbar.editInlineTooltip")})]}),e[11]=d.size,e[12]=d.variant,e[13]=a,e[14]=s,e[15]=S):S=e[15];let w;e[16]!==o||e[17]!==d.size||e[18]!==d.variant||e[19]!==m||e[20]!==a.deckDetected||e[21]!==s?(w=a.deckDetected?t.jsxs(fe,{children:[t.jsx(me,{asChild:!0,children:t.jsx(_,{variant:d.variant,size:d.size,"aria-label":s("deck.deckToolbar.download"),children:t.jsx(ae,{size:14})})}),t.jsxs(he,{align:"end",children:[t.jsxs(re,{onClick:()=>window.open(`${o}#print`,"_blank","noopener"),children:[t.jsx(ge,{size:14}),s("deck.deckToolbar.exportAsPdf")]}),t.jsx(re,{asChild:!0,children:t.jsxs("a",{href:o,download:m,children:[t.jsx(ye,{size:14}),s("deck.deckToolbar.downloadHtml")]})})]})]}):t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:d.variant,size:d.size,"aria-label":s("deck.deckToolbar.download"),asChild:!0,children:t.jsx("a",{href:o,download:m,children:t.jsx(ae,{size:14})})})}),t.jsx(X,{side:"bottom",children:s("deck.deckToolbar.download")})]}),e[16]=o,e[17]=d.size,e[18]=d.variant,e[19]=m,e[20]=a.deckDetected,e[21]=s,e[22]=w):w=e[22];const j=d.variant,P=d.size;let M;e[23]!==s?(M=s("deck.deckToolbar.openInNewTab"),e[23]=s,e[24]=M):M=e[24];let T;e[25]!==o?(T=()=>window.open(o,"_blank","noopener"),e[25]=o,e[26]=T):T=e[26];let L;e[27]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(Me,{size:14}),e[27]=L):L=e[27];let c;e[28]!==d.size||e[29]!==d.variant||e[30]!==M||e[31]!==T?(c=t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:j,size:P,"aria-label":M,onClick:T,children:L})}),e[28]=d.size,e[29]=d.variant,e[30]=M,e[31]=T,e[32]=c):c=e[32];let B;e[33]!==s?(B=s("deck.deckToolbar.openInNewTab"),e[33]=s,e[34]=B):B=e[34];let R;e[35]!==B?(R=t.jsx(X,{side:"bottom",children:B}),e[35]=B,e[36]=R):R=e[36];let b;e[37]!==c||e[38]!==R?(b=t.jsxs(Q,{children:[c,R]}),e[37]=c,e[38]=R,e[39]=b):b=e[39];let O;e[40]!==b||e[41]!==x||e[42]!==g||e[43]!==S||e[44]!==w||e[45]!==v?(O=t.jsxs(t.Fragment,{children:[x,g,S,w,b,v]}),e[40]=b,e[41]=x,e[42]=g,e[43]=S,e[44]=w,e[45]=v,e[46]=O):O=e[46];const I=O;let U;e[47]!==a.railOpen||e[48]!==s?(U=a.railOpen?s("deck.deckToolbar.hideSlideList"):s("deck.deckToolbar.showSlideList"),e[47]=a.railOpen,e[48]=s,e[49]=U):U=e[49];const z=U;let $;e[50]!==d.size||e[51]!==d.variant||e[52]!==a||e[53]!==z?($=a.deckDetected&&t.jsxs(Q,{children:[t.jsx(Y,{asChild:!0,children:t.jsx(_,{variant:a.railOpen?"secondary":d.variant,size:d.size,"aria-pressed":a.railOpen,"aria-label":z,onClick:()=>a.setRailOpen(!a.railOpen),children:t.jsx(Se,{size:14})})}),t.jsx(X,{side:"bottom",children:z})]}),e[50]=d.size,e[51]=d.variant,e[52]=a,e[53]=z,e[54]=$):$=e[54];const C=$;if(r==="topbar"){let l;return e[55]!==I||e[56]!==C?(l=t.jsxs(pe.Actions,{children:[C,I]}),e[55]=I,e[56]=C,e[57]=l):l=e[57],l}let k;e[58]!==h?(k=ee("flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",h),e[58]=h,e[59]=k):k=e[59];let N;e[60]!==o?(N=()=>window.open(o,"_blank","noopener"),e[60]=o,e[61]=N):N=e[61];let E;e[62]!==m?(E=t.jsx("span",{className:"truncate",children:m}),e[62]=m,e[63]=E):E=e[63];let A;e[64]!==o||e[65]!==N||e[66]!==E?(A=t.jsx("button",{type:"button",onClick:N,className:"flex min-w-0 flex-1 items-center rounded-lg px-2 py-1 text-left text-sm font-medium text-foreground transition-colors hover:bg-muted",title:o,children:E}),e[64]=o,e[65]=N,e[66]=E,e[67]=A):A=e[67];let i;return e[68]!==I||e[69]!==C||e[70]!==k||e[71]!==A?(i=t.jsxs("div",{className:k,children:[C,A,I]}),e[68]=I,e[69]=C,e[70]=k,e[71]=A,e[72]=i):i=e[72],i}const G=1;function Ue(n){if(typeof n!="object"||n===null||n.v!==G||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class q extends Error{constructor(e,u){super(e),this.code=u,this.name="DeckOpError"}code}function ce(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function _e(n){const u=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return u?ce(u).length:null}function qe(n,e){const u=new DOMParser().parseFromString(n,"text/html"),a=u.querySelector("deck-viewer");if(!a)throw new q("no <deck-viewer> element in source","no-viewer");const m=ce(a),v=e.kind==="move"?e.from:e.at,h=m[v];if(!h)throw new q(`slide index ${v} out of range (${m.length})`,"stale-index");switch(e.kind){case"remove":{if(m.length<=1)throw new q("cannot remove the last slide","bad-op");h.remove();break}case"duplicate":{const r=h.cloneNode(!0);r.removeAttribute("id");for(const s of r.querySelectorAll("[id]"))s.removeAttribute("id");h.after(r);break}case"move":{if(e.to<0||e.to>=m.length)throw new q(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const r=e.to<e.from?m[e.to]:m[e.to].nextSibling;a.insertBefore(h,r)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new q(`invalid attribute name: ${e.name}`,"bad-op");h.setAttribute(e.name,e.value);break}case"remove-attr":{h.removeAttribute(e.name);break}case"replace":{const s=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!s)throw new q("replace html has no root element","bad-op");h.replaceWith(u.importNode(s,!0));break}default:throw new q(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
2
|
-
`:""}${u.documentElement.outerHTML}
|
|
3
|
-
`}const ne="home",Ke=400,He=800;function We(n){const e=n.savePath!==void 0,{org:u}=xe(),a=be(),m=Te(ne),[v,h]=D.useState(!1),[f,r]=D.useState(!1),[s,p]=D.useState(!1),[o,F]=D.useState(!1),[d,x]=D.useState(!1),[g,S]=D.useState(!1),[w,j]=D.useState(null),[P,M]=D.useState(null),[T,L]=D.useState(0),[c]=D.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),B=v||g||d,R=()=>{n.savePath!==void 0&&(a.invalidateQueries({queryKey:ie.orgFsStat(u.id,ne,n.savePath)}),a.invalidateQueries({queryKey:ie.orgFsRecent(u.id)}))},b=i=>{c.iframe?.contentWindow?.postMessage(i,"*")},O=()=>{c.source=null,F(!1),P&&j(P),L(i=>i+1),R()};n.statMarker!==P&&(M(n.statMarker),n.statMarker!==null&&(w===null?j(n.statMarker):c.selfMarkers.has(n.statMarker)||n.statMarker!==w&&(B?F(!0):(c.source=null,j(n.statMarker)))));const I=async()=>{c.saveTimer=null;const i=c.source;if(i===null){S(!1);return}x(!0);try{const l=await m.mutateAsync({path:n.savePath,body:i});c.selfMarkers.add(Ce(l)),R()}catch(l){console.error("[deck-editor] save failed",l),J.error("Couldn't save deck edits — reloading the preview."),k.current.reload()}finally{x(!1),S(!1)}},U=i=>{S(!0),c.saveTimer&&clearTimeout(c.saveTimer),c.saveTimer=setTimeout(()=>{k.current.flushSave()},i)},z=(i,l,y)=>{b({v:G,type:"ack",opId:i,ok:l,error:y})},$=async i=>{if(!e){z(i.opId,!1,"read-only preview");return}try{if(c.source===null){const y=await fetch(n.readUrl,{credentials:"include"});if(!y.ok)throw new Error(`HTTP ${y.status}`);c.source=await y.text()}const l=_e(c.source);if(l===null||l!==i.witness.childCount)throw new q(`slide count drifted (source ${l}, iframe ${i.witness.childCount})`,"stale-index");c.source=qe(c.source,i.op),z(i.opId,!0),U(i.op.kind==="replace"?He:Ke)}catch(l){console.error("[deck-editor] op failed",i.op,l),z(i.opId,!1,l instanceof Error?l.message:String(l)),J.error("That edit couldn't be saved — reloading the preview."),k.current.reload()}},C=i=>{if(!c.iframe||i.source!==c.iframe.contentWindow)return;const l=Ue(i.data);if(l){if(l.type==="ready"){r(!0),k.current.editMode?b({v:G,type:"set-edit-mode",enabled:!0}):k.current.railOpen&&b({v:G,type:"set-rail",open:!0});return}l.type==="op"&&(c.queue=c.queue.then(()=>k.current.handleOp(l)).catch(()=>{}))}},k=D.useRef({onMessage:C,handleOp:$,flushSave:I,reload:O,editMode:v,railOpen:s});k.current={onMessage:C,handleOp:$,flushSave:I,reload:O,editMode:v,railOpen:s};const[N]=D.useState(()=>{let i=null;return l=>{if(l){c.iframe=l;const y=K=>k.current.onMessage(K);window.addEventListener("message",y),i=()=>window.removeEventListener("message",y)}else i?.(),i=null,c.iframe=null}}),E=i=>{p(i),b({v:G,type:"set-rail",open:i})},A=i=>{h(i),b({v:G,type:"set-edit-mode",enabled:i}),i&&p(!0),!i&&o&&!g&&!d&&O()};return{iframeRef:N,deckDetected:f,writable:e,displayedMarker:w===null?null:`${w}.${T}`,editMode:v,setEditMode:A,railOpen:s,setRailOpen:E,saving:d,agentUpdated:o,reload:O,postToIframe:b}}const Ve=300;function nt({readUrl:n,marker:e,title:u,savePath:a,trailing:m,toolbarClassName:v,placement:h}){const f=We({readUrl:n,statMarker:e,savePath:a}),[r,s]=D.useState(null);if(f.displayedMarker===null)return null;const p=n.includes("?")?"&":"?",o=`${n}${p}v=${encodeURIComponent(f.displayedMarker)}`,F=r===o;return t.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[t.jsx(Le,{readUrl:n,editor:f,downloadName:u.split("/").pop()??u,trailing:m,className:v,placement:h}),t.jsx("div",{className:"relative flex-1",children:t.jsx("iframe",{ref:f.iframeRef,src:o,onLoad:()=>s(o),sandbox:"allow-scripts allow-downloads",className:ee("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",F?"opacity-100":"opacity-0"),style:{transitionDuration:`${Ve}ms`},title:u},o)})]})}const Qe=[{mode:"private",labelKey:"library.fileShareButton.modeOrgOnly",Icon:we},{mode:"public",labelKey:"library.fileShareButton.modePublic",Icon:oe},{mode:"password",labelKey:"library.fileShareButton.modePassword",Icon:Fe}];function de(n){const e=te.c(56),{volume:u,path:a,kind:m,shareMode:v,effectivePublic:h,url:f}=n,r=se(),s=De(u),{data:p}=Pe(u,a),o=p?.shareMode??v,d=(p?.effectivePublic??h)&&o==="private",x=m==="dir",g=x?"folder":"file",[S,w]=D.useState(!1),[j,P]=D.useState(""),[M,T]=D.useState(!1);let L;e[0]!==a||e[1]!==s||e[2]!==g||e[3]!==r?(L=(i,l)=>{s.mutate({path:a,mode:i,password:l},{onSuccess:()=>{w(!1),P(""),J.success(i==="private"?r("library.fileShareButton.toastOrgOnly",{subject:g}):i==="public"?r("library.fileShareButton.toastPublic",{subject:g}):r("library.fileShareButton.toastPassword",{subject:g}))},onError:y=>J.error(y instanceof Error?y.message:r("library.fileShareButton.failedUpdateSharing"))})},e[0]=a,e[1]=s,e[2]=g,e[3]=r,e[4]=L):L=e[4];const c=L;let B;e[5]!==c?(B=i=>{if(i==="password"){w(!0);return}w(!1),c(i)},e[5]=c,e[6]=B):B=e[6];const R=B,b=S?"password":o;let O;e[7]!==r||e[8]!==f?(O=async()=>{f&&(await navigator.clipboard.writeText(f),T(!0),J.success(r("library.fileShareButton.linkCopied")),setTimeout(()=>T(!1),2e3))},e[7]=r,e[8]=f,e[9]=O):O=e[9];const I=O;let U;e[10]!==M||e[11]!==I||e[12]!==r||e[13]!==f?(U=f?t.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[t.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f}),t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:I,"aria-label":r("library.fileShareButton.copyLink"),children:M?t.jsx(ve,{size:12,className:"text-success"}):t.jsx(Ae,{size:12})})]}):null,e[10]=M,e[11]=I,e[12]=r,e[13]=f,e[14]=U):U=e[14];const z=U;if(d){let i;e[15]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:t.jsx(oe,{size:16})}),e[15]=i):i=e[15];let l;e[16]!==r?(l=r("library.fileShareButton.sharedViaParent"),e[16]=r,e[17]=l):l=e[17];let y;e[18]!==l?(y=t.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),e[18]=l,e[19]=y):y=e[19];const K=x?"files in this folder":"this file";let H;e[20]!==r||e[21]!==K?(H=r("library.fileShareButton.inheritedDescription",{target:K}),e[20]=r,e[21]=K,e[22]=H):H=e[22];let W;e[23]!==H?(W=t.jsx("span",{className:"text-xs text-muted-foreground",children:H}),e[23]=H,e[24]=W):W=e[24];let V;e[25]!==W||e[26]!==y?(V=t.jsxs("div",{className:"flex items-start gap-3",children:[i,t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[y,W]})]}),e[25]=W,e[26]=y,e[27]=V):V=e[27];let Z;return e[28]!==z||e[29]!==V?(Z=t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[V,z]}),e[28]=z,e[29]=V,e[30]=Z):Z=e[30],Z}let $;e[31]!==b||e[32]!==R||e[33]!==s.isPending||e[34]!==r?($=Qe.map(i=>{const{mode:l,labelKey:y,Icon:K}=i;return t.jsxs("button",{type:"button",disabled:s.isPending,onClick:()=>R(l),className:ee("flex flex-col items-center gap-1 rounded-lg px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",b===l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[t.jsx(K,{size:15}),r(y)]},l)}),e[31]=b,e[32]=R,e[33]=s.isPending,e[34]=r,e[35]=$):$=e[35];let C;e[36]!==$?(C=t.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-lg bg-muted p-1",children:$}),e[36]=$,e[37]=C):C=e[37];let k;e[38]!==b||e[39]!==x||e[40]!==r?(k=b==="private"?r("library.fileShareButton.privateDescription",{target:x?"these files":"this link"}):b==="public"?r(x?"library.fileShareButton.publicFolderDescription":"library.fileShareButton.publicFileDescription"):r("library.fileShareButton.passwordDescription",{target:x?"files in this folder":"this file"}),e[38]=b,e[39]=x,e[40]=r,e[41]=k):k=e[41];let N;e[42]!==k?(N=t.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[42]=k,e[43]=N):N=e[43];let E;e[44]!==b||e[45]!==c||e[46]!==o||e[47]!==j||e[48]!==s.isPending||e[49]!==r?(E=b==="password"&&t.jsxs("form",{className:"flex items-center gap-2",onSubmit:i=>{i.preventDefault(),j&&c("password",j)},children:[t.jsx($e,{type:"password",value:j,onChange:i=>P(i.target.value),placeholder:r(o==="password"?"library.fileShareButton.newPasswordPlaceholder":"library.fileShareButton.passwordPlaceholder"),autoComplete:"new-password",className:"h-8 text-xs"}),t.jsx(_,{type:"submit",size:"sm",className:"shrink-0",disabled:!j||s.isPending,children:r(o==="password"?"library.fileShareButton.buttonUpdate":"library.fileShareButton.buttonSet")})]}),e[44]=b,e[45]=c,e[46]=o,e[47]=j,e[48]=s.isPending,e[49]=r,e[50]=E):E=e[50];let A;return e[51]!==z||e[52]!==C||e[53]!==N||e[54]!==E?(A=t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[C,N,E,z]}),e[51]=z,e[52]=C,e[53]=N,e[54]=E,e[55]=A):A=e[55],A}function ot(n){const e=te.c(25),{volume:u,path:a,shareMode:m,effectivePublic:v,url:h,placement:f}=n,r=f===void 0?"bar":f,s=se();let p;e[0]!==r?(p=le(r),e[0]=r,e[1]=p):p=e[1];const o=p,F=o.variant,d=o.size;let x;e[2]!==s?(x=s("library.fileShareButton.share"),e[2]=s,e[3]=x):x=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(je,{size:14}),e[4]=g):g=e[4];let S;e[5]!==o.size||e[6]!==o.variant||e[7]!==x?(S=t.jsx(Y,{asChild:!0,children:t.jsx(Be,{asChild:!0,children:t.jsx(_,{variant:F,size:d,"aria-label":x,children:g})})}),e[5]=o.size,e[6]=o.variant,e[7]=x,e[8]=S):S=e[8];let w;e[9]!==s?(w=s("library.fileShareButton.share"),e[9]=s,e[10]=w):w=e[10];let j;e[11]!==w?(j=t.jsx(X,{side:"bottom",children:w}),e[11]=w,e[12]=j):j=e[12];let P;e[13]!==S||e[14]!==j?(P=t.jsxs(Q,{children:[S,j]}),e[13]=S,e[14]=j,e[15]=P):P=e[15];let M;e[16]!==v||e[17]!==a||e[18]!==m||e[19]!==h||e[20]!==u?(M=t.jsx(Re,{align:"end",className:"w-80 p-3",children:t.jsx(de,{volume:u,path:a,kind:"file",shareMode:m,effectivePublic:v,url:h})}),e[16]=v,e[17]=a,e[18]=m,e[19]=h,e[20]=u,e[21]=M):M=e[21];let T;return e[22]!==P||e[23]!==M?(T=t.jsxs(Ie,{children:[P,M]}),e[22]=P,e[23]=M,e[24]=T):T=e[24],T}function lt(n){const e=te.c(14),{target:u,onOpenChange:a}=n,m=se(),v=!!u,h=u?.kind==="dir"?"folder":"file";let f;e[0]!==m||e[1]!==h?(f=m("library.fileShareButton.shareDialogTitle",{type:h}),e[0]=m,e[1]=h,e[2]=f):f=e[2];let r;e[3]!==f?(r=t.jsx(ze,{children:t.jsx(Ne,{children:f})}),e[3]=f,e[4]=r):r=e[4];let s;e[5]!==u?(s=u&&t.jsx(de,{...u}),e[5]=u,e[6]=s):s=e[6];let p;e[7]!==r||e[8]!==s?(p=t.jsxs(Ee,{className:"sm:max-w-md",children:[r,s]}),e[7]=r,e[8]=s,e[9]=p):p=e[9];let o;return e[10]!==a||e[11]!==v||e[12]!==p?(o=t.jsx(Oe,{open:v,onOpenChange:a,children:p}),e[10]=a,e[11]=v,e[12]=p,e[13]=o):o=e[13],o}export{ot as F,nt as H,lt as S,le as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as g,u as _,j as o,r as S,h as k,X as w,ae as C,n as y,b as N,d as T,P as F}from"./index-D_7jfHk6.js";import{k as $,p as R}from"./agent-icon-CnnNyirr.js";import{c as E}from"./SwitchHorizontal01-Bx3d-jDI.js";import{V as I}from"./view-mode-toggle-CVVPadaN.js";import{C as V}from"./index-Cx0uPPmh.js";import{s as B}from"./thread-button-DwjwmudD.js";import{P as L}from"./projects-empty-state-BsW_dfGL.js";import{T as A}from"./index-CmC6v99h.js";import{B as M}from"./board-analytics-DT3f2AVB.js";import{L as z}from"./library-tab-Z6y7ewdW.js";import{p as O}from"./location-BjlyegC2.js";import{u as U}from"./use-ensure-project-folder-BUpbRP81.js";import{s as H}from"./use-project-scope-BMVXwaQ4.js";import{b as X}from"./repository-binding-DpX8yLri.js";import"./AlertCircle-C3fpFT5I.js";import"./Tool01-Blw6F5iV.js";import"./ArrowUp-DR-Jhbl1.js";import"./ArrowLeft-C1IFj0Ic.js";import"./LinkBroken01-kK_na_OL.js";import"./ShoppingBag01-o0DdjJD9.js";import"./ZoomOut-CQckFmS9.js";import"./Building02-uHT4KVtK.js";import"./CheckCircle-BKHstO_Q.js";import"./ChevronUp-CceLPRrE.js";import"./ChevronSelectorVertical-DAO6R1Op.js";import"./UserSquare-BMOlWqCu.js";import"./Copy01-Dx3ZT0bA.js";import"./CreditCard01-Dko0T335.js";import"./DotsVertical-aHYBPlin.js";import"./Image01-Cxa392ef.js";import"./Globe04-BDe-0jS0.js";import"./Key01-BHiUNW_5.js";import"./Link01-BRZRc4wX.js";import"./LinkExternal01-CILXo-bC.js";import"./Monitor01-Cl4JLYVa.js";import"./Sun-BYGxydmh.js";import"./Play-CzTcIQz_.js";import"./Plus-nldAzVeQ.js";import"./SearchMd-BiZNveM1.js";import"./Trash01-DAoFHSpp.js";import"./Upload01-CtKBhqsv.js";import"./User01-Awky2MVQ.js";import"./Users01-D7ZFKC4W.js";import"./XClose-DBJ7sD1T.js";import"./X-DzPShgV5.js";import"./tooltip-BULKkf4A.js";import"./index-D1CuHcEn.js";import"./use-mobile-DF1FX6Xv.js";import"./resizable-CIqqPf7O.js";import"./use-chat-layout-state-DDDFQN6Y.js";import"./use-file-configs-By7UB_YZ.js";import"./use-organization-settings-CB0-LYjl.js";import"./schema-D1veJPjJ.js";import"./task-board-ChFrokIN.js";import"./site-slug-DebpOoQq.js";import"./thread-route-CW2be8Kx.js";import"./use-panel-navigate-C4UE8Qkr.js";import"./thread-intent-Cxso0qKW.js";import"./use-mcp-client-MUIIizLf.js";import"./auth-Cps-90jQ.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BXtoXPGx.js";import"./slugify-CEUa2lfQ.js";import"./icon-button-BiR7Hy07.js";import"./toolbar-icon-button-D9aCXzS4.js";import"./sheet-Gpaizien.js";import"./shell-layout-B0-NcUCt.js";import"./avatar-TL9HUab0.js";import"./use-clock-tick-DGTQe72H.js";import"./dialog-DRpbbWU1.js";import"./command-Doiz3O29.js";import"./index-DltLvtZg.js";import"./integration-icon-BM3EOzpn.js";import"./project-icon-DU1uywdD.js";import"./new-project-dialog-CXEwhrv6.js";import"./input-B0doV0os.js";import"./label-DxOPcXJe.js";import"./repository-import-picker-CO5nKRxA.js";import"./use-navigate-to-agent-p65xWFDF.js";import"./repository-picker-C2HnHK1A.js";import"./useInfiniteQuery-eYXaZ_bo.js";import"./infiniteQueryObserver-DG8sBe4B.js";import"./collection-search-BoB9COGX.js";import"./use-debounced-value-DCB8Le0h.js";import"./required-auth-layout-CDif9NZC.js";import"./autosend-BQ3F90GX.js";import"./use-org-sso-BEGhJLya.js";import"./core.esm-DbclD67Y.js";import"./sortable.esm-DyjKGVzh.js";import"./use-task-board-analytics-BmwRnCgb.js";import"./combobox-PSOtDaya.js";import"./popover-C2vJrXky.js";import"./usage-stats-Dqycj-p-.js";import"./tool-namespace-BHB8Go32.js";import"./form-BBtB5neb.js";import"./utils-CVEq3hMx.js";import"./markdown-6zdu9t3J.js";import"./use-copy-CRIUfo35.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-uItZ_pJe.js";import"./chat-context-UMp8QwjT.js";import"./use-ai-providers-C1bb7SnA.js";import"./use-chat-navigation-BF9opsK8.js";import"./suggestion-DmBBrXFD.js";import"./column-rules-Bq3eiowV.js";import"./badge-CKM84j2S.js";import"./switch-hSsSQMgC.js";import"./textarea-DaHaRA0Z.js";import"./use-org-fs-DPxqVRhB.js";import"./use-automations-zlAoF9SL.js";import"./get-initials-D-f_fDFw.js";import"./search-toggle-Br3rmrbk.js";import"./use-task-board-items-DUgOnZAe.js";import"./use-task-board-events-BDjHMnwS.js";import"./use-members-vjX9lJhj.js";import"./use-org-auth-client-CuZ7oLTb.js";import"./select-CZdnCwuC.js";import"./index-BdQq_4o_.js";import"./task-route-4t67EvVC.js";import"./config-B01oZvpJ.js";import"./use-tags-CFN9IU6i.js";import"./calendar-DaaBbvOH.js";import"./alert-CGA3Ty0D.js";import"./collapsible-vN3Y9B-p.js";import"./index-C-3lNbMm.js";import"./rich-text-link-control-CMeXviAY.js";import"./index-D8mID9PZ.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-DY1JtBFR.js";import"./use-connection-5LUEsGlJ.js";import"./github-repo-scope-ByTYKy_L.js";import"./thread-sheet-body-B6geJ00B.js";import"./useSuspenseInfiniteQuery-i_drPWHc.js";import"./pair-knnOGTuF.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-D5zA7BfR.js";import"./types-Blm6OQRg.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-mcp-prompts-C3siW74f.js";import"./use-thread-outputs-DfIiLAuO.js";import"./file-type-icon-Du5QihE_.js";import"./use-infinite-scroll-B02yfFGd.js";import"./task-status-cI-KMHji.js";import"./use-open-billing-url-CqJ0vDkP.js";import"./chat-draft-CYy-Qv-a.js";import"./separator-BtrJ5AFz.js";import"./collection-tabs-Cw7XLgNG.js";import"./time-range-picker-Bu58tMJr.js";import"./scroll-area-Ce9NeF1s.js";import"./analytics-sections-Cjkr8Muu.js";import"./chart-DZbYggl3.js";import"./index-CoDuotD7.js";import"./symbol-CkeqKRPe.js";import"./CategoricalChart-zte0bRec.js";import"./table-Dfov51xE.js";import"./BarChart-CJ_IiQ71.js";import"./tooltipContext-1NNpJuJd.js";import"./ActiveShapeUtils-CO9ka_yi.js";import"./Sector-DOgIwKt7.js";import"./ErrorBarContext-B8QqSSmC.js";import"./AreaChart-BvjH9pmK.js";import"./XAxis-BLZT-vtl.js";import"./alert-dialog-kjq4dW3k.js";import"./use-org-repo-syncs-BG16MD5Q.js";import"./file-share-button-C8ZBUx_e.js";import"./preview-dialog-CmtjgV1o.js";import"./preview-content-CWMTMNmp.js";import"./file-preview-DT-0IR-r.js";import"./utils-Cxy1EsFU.js";import"./editor-CPkkN1Zr.js";import"./folder-icon-DXEgDwxo.js";import"./empty-state-D45gZaZ-.js";function q(i){const t=g.c(25),{view:r}=i,p=N(),e=T();let m;t[0]!==e?(m=v=>e({to:".",search:P=>({...P,files:v==="files"||void 0,analytics:v==="analytics"||void 0,...v!=="project"?{task:void 0}:{}})}),t[0]=e,t[1]=m):m=t[1];const s=m;let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(E,{}),t[2]=b):b=t[2];let x;t[3]!==p?(x=p("projects.flat.viewProject"),t[3]=p,t[4]=x):x=t[4];let f;t[5]!==x?(f={value:"project",icon:b,label:x},t[5]=x,t[6]=f):f=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx($,{}),t[7]=d):d=t[7];let l;t[8]!==p?(l=p("projects.flat.viewFiles"),t[8]=p,t[9]=l):l=t[9];let a;t[10]!==l?(a={value:"files",icon:d,label:l},t[10]=l,t[11]=a):a=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(R,{}),t[12]=j):j=t[12];let u;t[13]!==p?(u=p("projects.flat.viewAnalytics"),t[13]=p,t[14]=u):u=t[14];let c;t[15]!==u?(c={value:"analytics",icon:j,label:u},t[15]=u,t[16]=c):c=t[16];let h;t[17]!==c||t[18]!==f||t[19]!==a?(h=[f,a,c],t[17]=c,t[18]=f,t[19]=a,t[20]=h):h=t[20];let n;return t[21]!==s||t[22]!==h||t[23]!==r?(n=o.jsx(F.Topbar.Right.Portal,{children:o.jsx("div",{className:"shrink-0",children:o.jsx(I,{value:r,onValueChange:s,options:h})})}),t[21]=s,t[22]=h,t[23]=r,t[24]=n):n=t[24],n}function D(i){const t=g.c(6),{project:r}=i;U(r);const p=r.id;let e;t[0]!==r?(e=O(r),t[0]=r,t[1]=e):e=t[1];const m=r.title??void 0;let s;return t[2]!==r.id||t[3]!==e||t[4]!==m?(s=o.jsx(z,{root:e,rootLabel:m,filePreview:"dialog"},p),t[2]=r.id,t[3]=e,t[4]=m,t[5]=s):s=t[5],s}function G(i){const t=g.c(21),{projectId:r,taskOpen:p,view:e}=i,{org:m}=w(),{granted:s}=C("agents:manage");let b;t[0]===Symbol.for("react.memo_cache_sentinel")?(b={pageSize:1e3},t[0]=b):b=t[0];const x=X(b);let f,d;if(t[1]!==x||t[2]!==s||t[3]!==m||t[4]!==r){d=Symbol.for("react.early_return_sentinel");t:{let c;t[7]!==m?(c=n=>n.id!==m.id,t[7]=m,t[8]=c):c=t[8];const h=H(x).filter(c);if(h.length===0){let n;t[9]!==s?(n=o.jsx(L,{canCreate:s}),t[9]=s,t[10]=n):n=t[10],d=n;break t}f=h.find(n=>n.id===r)??[...h].sort(J)[0]}t[1]=x,t[2]=s,t[3]=m,t[4]=r,t[5]=f,t[6]=d}else f=t[5],d=t[6];if(d!==Symbol.for("react.early_return_sentinel"))return d;const l=f;if(!l)return null;let a;t[11]!==e?(a=o.jsx(q,{view:e}),t[11]=e,t[12]=a):a=t[12];let j;t[13]!==m||t[14]!==l||t[15]!==p||t[16]!==e?(j=e==="files"?o.jsx(D,{project:l}):e==="analytics"?o.jsxs(o.Fragment,{children:[o.jsx(y.Title,{children:l.title}),o.jsx(M,{project:l.id,taskHref:c=>`/${m.slug}/projects?project=${encodeURIComponent(l.id)}&task=${encodeURIComponent(c)}`},l.id)]}):o.jsxs(o.Fragment,{children:[!p&&o.jsx("div",{className:"hidden shrink-0 border-b border-border has-[a]:block",children:o.jsx(y.Container,{className:"flex max-w-[1680px] flex-col gap-4 pb-6",children:o.jsx(B,{project:l,orgSlug:m.slug})})}),o.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:o.jsx(A,{scopeProject:l,inlineTabs:!0,taskInSearch:!0})})]}),t[13]=m,t[14]=l,t[15]=p,t[16]=e,t[17]=j):j=t[17];let u;return t[18]!==a||t[19]!==j?(u=o.jsxs("div",{className:"@container flex h-full min-h-0 min-w-0 flex-col",children:[a,j]}),t[18]=a,t[19]=j,t[20]=u):u=t[20],u}function J(i,t){return(t.updated_at??"").localeCompare(i.updated_at??"")}function li(){const i=g.c(6);let t;i[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},i[0]=t):t=i[0];const r=_(t);let p;i[1]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("div",{className:"flex min-h-64 items-center justify-center",children:o.jsx(k,{className:"size-5 text-muted-foreground"})}),i[1]=p):p=i[1];const e=!!r.task,m=r.files?"files":r.analytics?"analytics":"project";let s;return i[2]!==r.project||i[3]!==e||i[4]!==m?(s=o.jsx(V.Content,{children:o.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:o.jsx(S.Suspense,{fallback:p,children:o.jsx(G,{projectId:r.project,taskOpen:e,view:m})})})}),i[2]=r.project,i[3]=e,i[4]=m,i[5]=s):s=i[5],s}export{li as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as U,X as ie,o as re,au as le,at as ce,e as ne,q as H,t as q,K as J,j as i,ef as se,eg as oe,eh as Q,aX as ge,av as de,aw as ee,c as X,r as W,a2 as me,V as te,bR as ue,bS as fe,y as pe,B as xe,ae as he,n as $,fr as je,aM as Se}from"./index-D_7jfHk6.js";import{u as ze}from"./use-org-auth-client-CuZ7oLTb.js";import{u as be}from"./use-debounced-autosave-BRSYFOGW.js";import{A as ve}from"./avatar-TL9HUab0.js";import{I as ae}from"./input-B0doV0os.js";import{C as Oe,a as ye,V as Ce,B as _e,b as Fe}from"./review-settings-C9jJxNAv.js";import{D as Ae}from"./domain-settings-C4-yAgIW.js";import{A as De,a as we,b as Ne,c as Te,g as Ee,d as Le,e as Pe,f as ke}from"./alert-dialog-kjq4dW3k.js";import{C as Re}from"./capability-load-error-BVlvKXjS.js";import"./User01-Awky2MVQ.js";import"./switch-hSsSQMgC.js";import"./UserSquare-BMOlWqCu.js";import"./use-organization-settings-CB0-LYjl.js";import"./schema-D1veJPjJ.js";import"./task-board-ChFrokIN.js";import"./use-new-blocks-editor-DZnaAqkX.js";import"./use-connection-5LUEsGlJ.js";import"./use-mcp-client-MUIIizLf.js";import"./auth-Cps-90jQ.js";import"./badge-CKM84j2S.js";import"./select-CZdnCwuC.js";import"./index-BdQq_4o_.js";import"./index-D1CuHcEn.js";import"./ChevronUp-CceLPRrE.js";const Be=e=>de({name:ee().min(1,e("settings.organizationForm.nameRequired")).max(255,e("settings.organizationForm.nameTooLong")),logo:ee().optional()});function Ie(e){const t=X.c(17),{value:s,onChange:p,name:g,disabled:l}=e,c=U(),d=W.useRef(null);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>d.current?.click(),t[0]=r):r=t[0];const m=r;let n;t[1]!==p||t[2]!==c?(n=Y=>{const S=Y.target.files?.[0];if(!S)return;if(S.size>2097152){q.error(c("settings.organizationForm.imageTooLarge"));return}const x=new FileReader;x.onerror=()=>q.error(c("settings.organizationForm.failedToReadImage")),x.onloadend=()=>{x.result&&p(x.result),d.current&&(d.current.value="")},x.readAsDataURL(S)},t[1]=p,t[2]=c,t[3]=n):n=t[3];const o=n;let a;t[4]!==c?(a=c("settings.organizationForm.uploadLogoLabel"),t[4]=c,t[5]=a):a=t[5];let u;t[6]!==l||t[7]!==o?(u=i.jsx("input",{ref:d,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:l}),t[6]=l,t[7]=o,t[8]=u):u=t[8];const h=s||void 0,j=g??"?";let f;t[9]!==h||t[10]!==j?(f=i.jsx(ve,{url:h,fallback:j,shape:"square",size:"base"}),t[9]=h,t[10]=j,t[11]=f):f=t[11];let z;return t[12]!==l||t[13]!==a||t[14]!==u||t[15]!==f?(z=i.jsxs("button",{type:"button",onClick:m,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":a,children:[u,f]}),t[12]=l,t[13]=a,t[14]=u,t[15]=f,t[16]=z):z=t[16],z}function Ve(){const e=U(),{org:t}=ie(),s=ze(),p=re(),g=le({resolver:ce(Be(e)),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async n=>{const o={name:n.name};n.logo&&(o.logo=n.logo);const a=await s.organization.update({data:o});if(a?.error)throw new Error(a.error.message||e("settings.organizationForm.failedToUpdateOrg"));return a},onSuccess:(n,o)=>{H("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),p.invalidateQueries({queryKey:J.organizations()}),p.invalidateQueries({queryKey:J.activeOrganization(t.slug)}),q.success(e("settings.organizationForm.updateSuccess"))},onError:(n,o)=>{H("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:n instanceof Error?n.message:String(n)}),q.error(n instanceof Error?n.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:c,flush:d}=be({save:async()=>{const n=g.control._formState.dirtyFields;if(Object.keys(n).length===0||!await g.trigger())return;const a=g.getValues(),u=g.control._defaultValues;g.reset(a,{keepValues:!0});try{await l.mutateAsync(a)}catch{g.reset(u,{keepValues:!0})}}}),r=g.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(oe,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ie,{value:g.watch("logo"),onChange:n=>{g.setValue("logo",n??"",{shouldDirty:!0}),d()},name:g.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(ge,{control:g.control,name:"name",render:({field:n})=>i.jsx(ae,{id:"org-name",...n,onChange:o=>{n.onChange(o),c()},onBlur:()=>{n.onBlur(),d()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[m&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(r.name||r.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&i.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.logo&&i.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function qe(){const e=X.c(86),t=U(),{org:s}=ie(),[p,g]=W.useState(!1),[l,c]=W.useState(""),d=me();let r;e[0]!==s.id||e[1]!==d?(r=async()=>{await d.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=d,e[2]=r):r=e[2];let m;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(m=()=>{H("organization_deleted",{organization_id:s.id}),localStorage.getItem(te.lastOrgSlug())===s.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===s.slug&&fe(),pe(),q.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=m):m=e[6];let n;e[7]!==t?(n=b=>{q.error(b instanceof Error?b.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=n):n=e[8];let o;e[9]!==r||e[10]!==m||e[11]!==n?(o={mutationFn:r,onSuccess:m,onError:n},e[9]=r,e[10]=m,e[11]=n,e[12]=o):o=e[12];const a=ne(o);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let h;e[15]!==t?(h=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=h):h=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=()=>g(!0),e[21]=z):z=e[21];const Y=a.isPending;let S;e[22]!==t?(S=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=S):S=e[23];let x;e[24]!==a.isPending||e[25]!==S?(x=i.jsx(xe,{variant:"destructive",size:"sm",onClick:z,disabled:Y,children:S}),e[24]=a.isPending,e[25]=S,e[26]=x):x=e[26];let v;e[27]!==x||e[28]!==j||e[29]!==f?(v=i.jsx(oe,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:f,action:x})}),e[27]=x,e[28]=j,e[29]=f,e[30]=v):v=e[30];let O;e[31]!==v||e[32]!==u||e[33]!==h?(O=i.jsx(se,{title:u,description:h,children:v}),e[31]=v,e[32]=u,e[33]=h,e[34]=O):O=e[34];let G;e[35]===Symbol.for("react.memo_cache_sentinel")?(G=b=>{g(b),b||c("")},e[35]=G):G=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(De,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==s.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=_):_=e[42];let F;e[43]!==_?(F=i.jsx("p",{children:_}),e[43]=_,e[44]=F):F=e[44];let A;e[45]!==s.name||e[46]!==t?(A=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=A):A=e[47];let D;e[48]!==A?(D=i.jsx("p",{className:"mt-3 mb-1.5",children:A}),e[48]=A,e[49]=D):D=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=b=>c(b.target.value),e[50]=K):K=e[50];let w;e[51]!==l||e[52]!==s.name?(w=i.jsx(ae,{value:l,onChange:K,placeholder:s.name,autoFocus:!0}),e[51]=l,e[52]=s.name,e[53]=w):w=e[53];let N;e[54]!==F||e[55]!==D||e[56]!==w?(N=i.jsx(we,{asChild:!0,children:i.jsxs("div",{children:[F,D,w]})}),e[54]=F,e[55]=D,e[56]=w,e[57]=N):N=e[57];let T;e[58]!==C||e[59]!==N?(T=i.jsxs(Ne,{children:[C,N]}),e[58]=C,e[59]=N,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let L;e[63]!==E?(L=i.jsx(Te,{children:E}),e[63]=E,e[64]=L):L=e[64];let P;e[65]!==a?(P=()=>a.mutate(),e[65]=a,e[66]=P):P=e[66];const Z=l!==s.name||a.isPending;let k;e[67]!==a.isPending||e[68]!==t?(k=a.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=a.isPending,e[68]=t,e[69]=k):k=e[69];let R;e[70]!==P||e[71]!==Z||e[72]!==k?(R=i.jsx(Ee,{onClick:P,disabled:Z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=P,e[71]=Z,e[72]=k,e[73]=R):R=e[73];let B;e[74]!==L||e[75]!==R?(B=i.jsxs(Le,{children:[L,R]}),e[74]=L,e[75]=R,e[76]=B):B=e[76];let I;e[77]!==T||e[78]!==B?(I=i.jsxs(Pe,{children:[T,B]}),e[77]=T,e[78]=B,e[79]=I):I=e[79];let V;e[80]!==p||e[81]!==I?(V=i.jsx(ke,{open:p,onOpenChange:G,children:I}),e[80]=p,e[81]=I,e[82]=V):V=e[82];let M;return e[83]!==O||e[84]!==V?(M=i.jsxs(i.Fragment,{children:[O,V]}),e[83]=O,e[84]=V,e[85]=M):M=e[85],M}function Ge(){const e=X.c(15),t=U(),{granted:s,loading:p,error:g}=he("org:manage");if(p){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(Se,{}),e[0]=o):o=e[0],o}if(g){let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(Re,{}),e[1]=o):o=e[1],o}let l;e[2]!==t?(l=t("settings.orgGeneral.organization"),e[2]=t,e[3]=l):l=e[3];let c;e[4]!==l?(c=i.jsx($.Title,{children:l}),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==s?(d=s&&i.jsxs(i.Fragment,{children:[i.jsx(Ve,{}),i.jsx(Oe,{}),i.jsx(ye,{}),i.jsx(Ce,{}),i.jsx(_e,{})]}),e[6]=s,e[7]=d):d=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Fe,{}),e[8]=r):r=e[8];let m;e[9]!==s?(m=s&&i.jsxs(i.Fragment,{children:[i.jsx(Ae,{}),i.jsx(qe,{})]}),e[9]=s,e[10]=m):m=e[10];let n;return e[11]!==c||e[12]!==d||e[13]!==m?(n=i.jsx($,{children:i.jsx($.Content,{children:i.jsx($.Container,{children:i.jsxs(je,{children:[c,d,r,m]})})})}),e[11]=c,e[12]=d,e[13]=m,e[14]=n):n=e[14],n}function ut(){const e=X.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Ge,{}),e[0]=t):t=e[0],t}export{ut as default};
|