decocms 4.186.3 → 4.186.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BfuYC-ez.js → AlertCircle-BM2arXAG.js} +1 -1
- package/dist/client/assets/{AreaChart-Ci-A0btx.js → AreaChart-DAXzCJFT.js} +1 -1
- package/dist/client/assets/{ArrowUp-Dkm0nOGw.js → ArrowUp-Boc-905Z.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CRz_iHAu.js → ArrowUpRight-B3CxAPJj.js} +1 -1
- package/dist/client/assets/{Check-CfIRDOap.js → Check-D0s6wH1X.js} +1 -1
- package/dist/client/assets/{CheckCircle-UqA3DPGv.js → CheckCircle-BGu0rmUQ.js} +1 -1
- package/dist/client/assets/{ChevronDown-Dfx8ph9o.js → ChevronDown-CsqU07CB.js} +1 -1
- package/dist/client/assets/{ChevronRight-BXMKC2_M.js → ChevronRight-DzEO4WOO.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dl1S15_f.js → ChevronUp-CLKFL_od.js} +1 -1
- package/dist/client/assets/{Copy01-DDRpZJ1h.js → Copy01-Bu4T-_yj.js} +1 -1
- package/dist/client/assets/{CpuChip01-DZ_mRqyz.js → CpuChip01-C3l-ayM0.js} +1 -1
- package/dist/client/assets/{CreditCard01-DsphY5qx.js → CreditCard01-UMOdY0Uv.js} +1 -1
- package/dist/client/assets/{DotsVertical-CHkGthlj.js → DotsVertical-C4U-eO1-.js} +1 -1
- package/dist/client/assets/{Eye-mJ_2ivh6.js → Eye-BtghZBaq.js} +1 -1
- package/dist/client/assets/{FilterLines-C_1h3ZoJ.js → FilterLines-BMQz2giZ.js} +1 -1
- package/dist/client/assets/{HardDrive-Bdh7pAUM.js → HardDrive-CrMH19j9.js} +1 -1
- package/dist/client/assets/{Key01-BLGPH0DL.js → Key01-_U8PdKT-.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BfIP_r4O.js → LayoutLeft-DhqFICkJ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Ba5xXfz2.js → LinkExternal01-D1rq1_uq.js} +1 -1
- package/dist/client/assets/{LogOut01-CvwGYyrH.js → LogOut01--8dqoEbi.js} +1 -1
- package/dist/client/assets/{Monitor01-3irKmnvO.js → Monitor01-Cjz_FTaX.js} +1 -1
- package/dist/client/assets/{Palette-CbPK4Rpt.js → Palette-dgaramLA.js} +1 -1
- package/dist/client/assets/{Play-54eB0T2G.js → Play-CEjkQJmT.js} +1 -1
- package/dist/client/assets/{Plus-CKO7n5Po.js → Plus-C-ooojQ-.js} +1 -1
- package/dist/client/assets/{SearchLg-CrtIkrUb.js → SearchLg-BsbCGElD.js} +1 -1
- package/dist/client/assets/{SearchMd-Bx38R8jT.js → SearchMd-DJxFGUte.js} +1 -1
- package/dist/client/assets/{Settings02-CDjArU7G.js → Settings02-Dd6wiqD1.js} +1 -1
- package/dist/client/assets/{Shield01-DWbsBnKy.js → Shield01-C-gfca5T.js} +1 -1
- package/dist/client/assets/{Star01-DOCStMKN.js → Star01-COab1bwH.js} +1 -1
- package/dist/client/assets/{Stars01-CYjq7xRF.js → Stars01-CrqdYStA.js} +1 -1
- package/dist/client/assets/{Stars02-BHlXbARl.js → Stars02-6dK01kpk.js} +1 -1
- package/dist/client/assets/{Sun-BLG01WIk.js → Sun-SP_cSydQ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-25hapEqS.js → SwitchHorizontal01-ddUhxlHz.js} +1 -1
- package/dist/client/assets/{Tool01-DhSkNcMo.js → Tool01-n_pcUGI4.js} +1 -1
- package/dist/client/assets/{Tool02-CQZsqe8L.js → Tool02-CM2QQuSk.js} +1 -1
- package/dist/client/assets/{Trash01-DFj83XXx.js → Trash01-4ciIHO0v.js} +1 -1
- package/dist/client/assets/{TrendUp01-DEIKe0v4.js → TrendUp01-ok3-xVRP.js} +1 -1
- package/dist/client/assets/{Upload01-C4AUAXd5.js → Upload01-BN6NYqWG.js} +1 -1
- package/dist/client/assets/{User01-CDS7qDs6.js → User01-ZyVKonG8.js} +1 -1
- package/dist/client/assets/{Users01-Dev0Wnwe.js → Users01-Chm4EuVC.js} +1 -1
- package/dist/client/assets/{Users03-cydJxCq2.js → Users03-CAfxXxrx.js} +1 -1
- package/dist/client/assets/{X-ImXzxvCp.js → X-C9CNUxMc.js} +1 -1
- package/dist/client/assets/{XCircle-BlO0Qy51.js → XCircle-CgmQaEpw.js} +1 -1
- package/dist/client/assets/{XClose-D7r31LaY.js → XClose-Ir2v6njF.js} +1 -1
- package/dist/client/assets/{Zap-C1KfAU0L.js → Zap-DMOaYDez.js} +1 -1
- package/dist/client/assets/{ZapSquare-CCPTmscL.js → ZapSquare-DJ6Cr-Gd.js} +1 -1
- package/dist/client/assets/{access-gate-CT_xPmsE.js → access-gate-CJbiw1ui.js} +1 -1
- package/dist/client/assets/{add-section-modal-2h2v7Eix.js → add-section-modal-CPDfAg6v.js} +1 -1
- package/dist/client/assets/{agent-icon-DyvgCmDh.js → agent-icon-DZlxuF49.js} +1 -1
- package/dist/client/assets/{agents-list-B7uSsdOW.js → agents-list-yd5LMd0m.js} +1 -1
- package/dist/client/assets/{ai-providers-DYKYHtHN.js → ai-providers-BYQ_-U47.js} +1 -1
- package/dist/client/assets/{alert-DgOKny_5.js → alert-BUeQIcZG.js} +1 -1
- package/dist/client/assets/{alert-dialog-qODg0L4t.js → alert-dialog-xIkA8j5x.js} +2 -2
- package/dist/client/assets/app-editor-DOobewvH.js +1 -0
- package/dist/client/assets/{auth-CzoWoS_Q.js → auth-BS9hvljB.js} +1 -1
- package/dist/client/assets/{auth-catchall-Do2b1Q5s.js → auth-catchall-BQkJx0Q9.js} +1 -1
- package/dist/client/assets/{auth-entry-C1cRB-Mt.js → auth-entry-COeA_b06.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BpxjTMnc.js → auth-split-layout-D3vaJt1T.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-_aMCtvov.js → authenticate-and-persist-oauth-BpEFvvfk.js} +1 -1
- package/dist/client/assets/{automation-list-row-qM5LBHmY.js → automation-list-row-BeYIheNk.js} +1 -1
- package/dist/client/assets/automation-runs-DJDyx8Ab.js +281 -0
- package/dist/client/assets/{automations-DYJT_-Df.js → automations-Dc8V9snr.js} +1 -1
- package/dist/client/assets/{avatar-BzQ7WmXz.js → avatar-TMC1sUqM.js} +1 -1
- package/dist/client/assets/{badge-0OderU4R.js → badge-Cw8NAtiW.js} +1 -1
- package/dist/client/assets/{billing-sUUWLMkH.js → billing-C0B7lv24.js} +1 -1
- package/dist/client/assets/{block-document-B9MqZDy8.js → block-document-BAeei5ic.js} +3 -3
- package/dist/client/assets/{brand-context-Cd1XITlN.js → brand-context-B8Z3AOB1.js} +1 -1
- package/dist/client/assets/{buckets-BvDdA7ec.js → buckets-BUDz0wYB.js} +1 -1
- package/dist/client/assets/bulk-category-panel-Bp_iUjkm.js +1 -0
- package/dist/client/assets/{capability-load-error-CrHwHuDV.js → capability-load-error-DlPlQyTu.js} +1 -1
- package/dist/client/assets/{card-DmKStgES.js → card-f7IIAQow.js} +1 -1
- package/dist/client/assets/category-editor-Q4jhDglC.js +1 -0
- package/dist/client/assets/{chat-context-BTbaCF1T.js → chat-context-lZafrisH.js} +4 -4
- package/dist/client/assets/{checkbox-BZRzofDI.js → checkbox-DRvNUH73.js} +1 -1
- package/dist/client/assets/{cli-auth-success-GLWllWTp.js → cli-auth-success-C8NhW6ZX.js} +1 -1
- package/dist/client/assets/{collection-detail-BgGn5qWk.js → collection-detail-Cw8pxVYF.js} +1 -1
- package/dist/client/assets/{collection-display-button-1iQBb-oM.js → collection-display-button-Bt8fcXAU.js} +1 -1
- package/dist/client/assets/{collection-search-C1t7YBY3.js → collection-search-BcJG8MRL.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BoIzuQ13.js → collection-table-wrapper-KcuXHMSk.js} +1 -1
- package/dist/client/assets/{collection-tabs-DkKbZNxK.js → collection-tabs-DdOwtj6b.js} +1 -1
- package/dist/client/assets/{command-M0ieFwmm.js → command-DGcauViI.js} +1 -1
- package/dist/client/assets/commerce-onboarding-CfDDDw6y.js +1 -0
- package/dist/client/assets/{connect-DZ11YKFe.js → connect-BOHbND-E.js} +1 -1
- package/dist/client/assets/{connection-Vbw7_lND.js → connection-D6HFEYzq.js} +1 -1
- package/dist/client/assets/{connection-card-DuKkmMXb.js → connection-card-BVHwhA2v.js} +1 -1
- package/dist/client/assets/{connection-detail-27wuK5wq.js → connection-detail-DNk_cneF.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CAyGL1Rc.js → connection-form-helpers-4kXFEJvh.js} +1 -1
- package/dist/client/assets/{connections-CqIOOtH4.js → connections-BtTLDoE9.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Clmp1BFL.js → decopilot-sse-pool-DIaaeHkx.js} +1 -1
- package/dist/client/assets/{dialog-B5y5hFnb.js → dialog-CM96GyMN.js} +1 -1
- package/dist/client/assets/{domain-settings-B5CZtkpJ.js → domain-settings-B-8BrNH4.js} +1 -1
- package/dist/client/assets/{drawer-BZTnQot8.js → drawer-Dn3JbFxM.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CHizDN5S.js → dropdown-menu-CuE5oWLS.js} +1 -1
- package/dist/client/assets/{empty-state-DQHHZFK3.js → empty-state-B-rbOsZt.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DveMzJnj.js → extract-connection-data-D78MPGm0.js} +1 -1
- package/dist/client/assets/file-explorer-BNEWK43O.js +2 -0
- package/dist/client/assets/{form-Bq1A_P9t.js → form-DJREymz4.js} +1 -1
- package/dist/client/assets/{general-AzcYBHSb.js → general-Bvib2mwc.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CT456aBC.js → github-repo-picker-DnRkLuCY.js} +1 -1
- package/dist/client/assets/{hooks-_oUacd7x.js → hooks-DzdIDE_S.js} +5 -5
- package/dist/client/assets/{index-BE7mJhFy.js → index-B0fkC9lT.js} +27 -27
- package/dist/client/assets/{index-wxJpDGRQ.js → index-BKQvMWY3.js} +2 -2
- package/dist/client/assets/index-BLe-kRg3.js +1 -0
- package/dist/client/assets/index-C9Hb4-0H.js +1 -0
- package/dist/client/assets/index-CFru9TWd.js +738 -0
- package/dist/client/assets/{index-DAM0y29_.js → index-Cbb91-P4.js} +1 -1
- package/dist/client/assets/{index-NuvNvWBH.js → index-Ccnv49_z.js} +1 -1
- package/dist/client/assets/{index-BcXDjqbG.js → index-ClVafn5Q.js} +1 -1
- package/dist/client/assets/{index-jM_Cebcw.js → index-D3hIc5HE.js} +1 -1
- package/dist/client/assets/{index-C3N6oAxN.js → index-Dytal4UA.js} +1 -1
- package/dist/client/assets/{index-DmcNl6lo.js → index-Uyw3lO4W.js} +4 -4
- package/dist/client/assets/{index-redirect-DZYpYiG4.js → index-redirect-C63Ka-dC.js} +1 -1
- package/dist/client/assets/{input-SHG4kEt8.js → input-BLYKaojw.js} +1 -1
- package/dist/client/assets/{integration-icon-BPgt71bM.js → integration-icon-y2a679m_.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BMdHwRKu.js → invite-member-dialog-pvdnivHT.js} +1 -1
- package/dist/client/assets/{label-BoGYufMX.js → label-CpR3NhLK.js} +1 -1
- package/dist/client/assets/{layout-t1l41lNQ.js → layout-DkAn-olq.js} +1 -1
- package/dist/client/assets/{login-CbQVX_Ku.js → login-uBznkVFV.js} +1 -1
- package/dist/client/assets/{mcp-oauth-h1LtXs-F.js → mcp-oauth-Cbz6v_pp.js} +1 -1
- package/dist/client/assets/{members-DtiRSiv7.js → members-CYoo4I8Y.js} +1 -1
- package/dist/client/assets/{monaco-editor-AdkIaxez.js → monaco-editor-ChN-uCZ5.js} +4 -4
- package/dist/client/assets/{monitoring-stats-row-BH5n-y90.js → monitoring-stats-row-CaWJELM4.js} +1 -1
- package/dist/client/assets/{multi-select-CC0lBwV8.js → multi-select-HsDIiU9u.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bdfoq5pi.js → oauth-callback-D4B9fvV3.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DqX6IkBf.js → oauth-callback-ai-provider-D8wbGI6A.js} +1 -1
- package/dist/client/assets/{onboarding-B2fYGhas.js → onboarding-Ds1l48aO.js} +1 -1
- package/dist/client/assets/{org-layout-Nbsmhfuf.js → org-layout-D5C_xL5_.js} +1 -1
- package/dist/client/assets/{organization-choice-UHJGNPVD.js → organization-choice-DAqtf8QJ.js} +1 -1
- package/dist/client/assets/{orgs-rmUP3nva.js → orgs-D62MZerx.js} +1 -1
- package/dist/client/assets/{page-seo-form-DSI5Z6Xm.js → page-seo-form-C4SkFKsY.js} +1 -1
- package/dist/client/assets/{popover-Bu5EGKLW.js → popover-BbhyOPS3.js} +1 -1
- package/dist/client/assets/post-editor-Bpk6It1u.js +1 -0
- package/dist/client/assets/{primitives-zMJeNtQk.js → primitives-Bt3tuGeo.js} +1 -1
- package/dist/client/assets/{profile-Bh_w10qc.js → profile-BctbNEfJ.js} +1 -1
- package/dist/client/assets/project-app-view-BKQjXNca.js +1 -0
- package/dist/client/assets/{provision-repo-scoped-github-connection-B2s3ApVy.js → provision-repo-scoped-github-connection-ufuvpGD9.js} +1 -1
- package/dist/client/assets/record-editor-QqrTdXL4.js +1 -0
- package/dist/client/assets/redirect-editor-D8jJ6iR_.js +1 -0
- package/dist/client/assets/registry-DhILOcmJ.js +2 -0
- package/dist/client/assets/{registry-layout-BNL3rWwh.js → registry-layout-CQMbkd7b.js} +1 -1
- package/dist/client/assets/{reports-TRcjEu_G.js → reports-rEO41B-T.js} +1 -1
- package/dist/client/assets/{require-capability-D_i84gfM.js → require-capability-CZ-yYBiA.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DduipUtL.js → required-auth-layout-DtQVJg-L.js} +1 -1
- package/dist/client/assets/{reset-password-DWRCcb4-.js → reset-password-xaU8NkAt.js} +1 -1
- package/dist/client/assets/{roles-CBcjWl-7.js → roles-CaPOmG9k.js} +1 -1
- package/dist/client/assets/{search-input-CY-7-6Mr.js → search-input-CZdp52yV.js} +1 -1
- package/dist/client/assets/{secrets-kNdWJ7Jo.js → secrets-DizdSJgN.js} +1 -1
- package/dist/client/assets/sections-editor-B4E9k2Dl.js +2 -0
- package/dist/client/assets/{select-DE2zqg5r.js → select-BudfwrnS.js} +1 -1
- package/dist/client/assets/{select-model-D2N9Z9Ec.js → select-model-C7aX0FnY.js} +1 -1
- package/dist/client/assets/self-tool-result-Cj3FZK_q.js +1 -0
- package/dist/client/assets/seo-editor-Dgknhqwj.js +1 -0
- package/dist/client/assets/{settings-layout-DfS5HS2T.js → settings-layout-CU-4TAUD.js} +1 -1
- package/dist/client/assets/{settings-section-DBkfk9BB.js → settings-section-BE7oCApW.js} +1 -1
- package/dist/client/assets/{shell-controls-CPQdyoX4.js → shell-controls-crL6wfUO.js} +1 -1
- package/dist/client/assets/{shell-layout-DbBB0LUI.js → shell-layout-GtI-8lBm.js} +1 -1
- package/dist/client/assets/sidebar-D3IIq4Vk.js +1 -0
- package/dist/client/assets/{skeleton-AvMrml5O.js → skeleton-GgH9QFOh.js} +1 -1
- package/dist/client/assets/{spinner-BB2hby2t.js → spinner-DFReXmvo.js} +1 -1
- package/dist/client/assets/{sso-CFR5Du-O.js → sso-BWPSV72o.js} +1 -1
- package/dist/client/assets/{store-Gd8umnDO.js → store-BhZZOuCy.js} +1 -1
- package/dist/client/assets/store-registry-DJSlp72K.js +2 -0
- package/dist/client/assets/{studio-tools-DXVCK0sW.js → studio-tools-BaJrIiyZ.js} +1 -1
- package/dist/client/assets/{switch-BEKqgb1f.js → switch-tQg0oUQP.js} +1 -1
- package/dist/client/assets/{tab-id-xREOP0to.js → tab-id-7eVkCyFd.js} +1 -1
- package/dist/client/assets/{table-pV8D0u2m.js → table-C1MCilFh.js} +1 -1
- package/dist/client/assets/{tabs-C97TV6wP.js → tabs-DX3EM3Ee.js} +1 -1
- package/dist/client/assets/{textarea-BIsK3TvL.js → textarea-mkvWFVEl.js} +1 -1
- package/dist/client/assets/{toggle-group-B_DzWSgI.js → toggle-group-F8qf1aho.js} +1 -1
- package/dist/client/assets/{toolbar-CKmQWdVF.js → toolbar-Cf542s4U.js} +1 -1
- package/dist/client/assets/{tooltip-B-gahmZ0.js → tooltip-CD1UqZ9B.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Db5LNUJN.js → use-ai-providers-D16FGHJt.js} +1 -1
- package/dist/client/assets/{use-automations-DfD-q04Z.js → use-automations-D8H19XtT.js} +1 -1
- package/dist/client/assets/{use-autosave-Dbj26Vw8.js → use-autosave-DL6SLVUG.js} +1 -1
- package/dist/client/assets/{use-capability-DbPUHhbH.js → use-capability-CE9es946.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CU7u0LpL.js → use-clock-tick-B_PZSxjQ.js} +1 -1
- package/dist/client/assets/{use-connection-Di6VWa3L.js → use-connection-C9xGzeZ0.js} +1 -1
- package/dist/client/assets/{use-copy-B64dHmlD.js → use-copy-Biga7DQq.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BL707Luj.js → use-create-virtual-mcp-C5b_hYeV.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DsmYOWfj.js → use-debounced-autosave-oSeifFUO.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BMDLplmP.js → use-debounced-value-B6d-EEaH.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BKsepuUx.js → use-deco-credits-DEFWEFHy.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CZNjfghP.js → use-decopilot-events-DPOdIyZW.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CtqbbhKd.js → use-delete-connection-B83lgoSz.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D-SiWD8V.js → use-deployment-admin-BQjxPpS5.js} +1 -1
- package/dist/client/assets/{use-file-configs-B_bqkDL5.js → use-file-configs-lWDULD1a.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CmpA7aNk.js → use-infinite-scroll-BuArBLl_.js} +1 -1
- package/dist/client/assets/{use-join-requests-D3PioMCU.js → use-join-requests-CeBrzND0.js} +1 -1
- package/dist/client/assets/use-mcp-client-D8jVoojU.js +10 -0
- package/dist/client/assets/{use-mcp-tools-gs2BaxE7.js → use-mcp-tools-CxNi4RsV.js} +1 -1
- package/dist/client/assets/{use-members-Cw9Cvkx3.js → use-members-DYQSbhV-.js} +1 -1
- package/dist/client/assets/{use-mobile-Fq3m92SB.js → use-mobile-C76oZZ_y.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bpm8yGLA.js → use-navigate-to-agent-B7ku0JC8.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CAxNtzL4.js → use-open-billing-url-DquSLGrh.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bxh7oYIw.js → use-org-auth-client-CLw_zaJR.js} +1 -1
- package/dist/client/assets/{use-org-sso-CHpy2ljn.js → use-org-sso-DQRelBUr.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BhcqsdWg.js → use-organization-roles-B7ZCQVse.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B1oXAg8v.js → use-organization-settings-DAWGh7rb.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CMu53VQD.js → use-registry-connections-4HrWpBE2.js} +1 -1
- package/dist/client/assets/{use-secrets-DuSGJa4J.js → use-secrets-CV1UNts7.js} +1 -1
- package/dist/client/assets/{use-status-sounds--hLMjyxJ.js → use-status-sounds-Dxu-GZwE.js} +1 -1
- package/dist/client/assets/{use-tags-0YzsYO3f.js → use-tags-CF2jWoFP.js} +1 -1
- package/dist/client/assets/{use-view-mode-B1gvmNYJ.js → use-view-mode-8obytCVP.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-SgXDkg75.js → use-virtual-mcp-BRfZj2ng.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CuXI7a9b.js +1 -0
- package/dist/client/assets/{useRouterState-CrL8ZHBU.js → useRouterState-CIMkbMOV.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-FYAwQiAK.js +1 -0
- package/dist/client/assets/{users-Cv1B39Hm.js → users-l3buiqkJ.js} +1 -1
- package/dist/client/assets/variant-calendar-CufrhFsD.js +1 -0
- package/dist/client/assets/{view-mode-toggle-iaC8KMna.js → view-mode-toggle-CErBMjrv.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/app-editor-B0XFGNw1.js +0 -1
- package/dist/client/assets/automation-runs-BAj-VvKU.js +0 -47
- package/dist/client/assets/bulk-category-panel-DEFprjKz.js +0 -1
- package/dist/client/assets/calendar-DzZPxWQd.js +0 -235
- package/dist/client/assets/category-editor-CA0KjE4N.js +0 -1
- package/dist/client/assets/commerce-onboarding-BZW1JyaC.js +0 -1
- package/dist/client/assets/companions-core-B5XTmC8f.js +0 -1
- package/dist/client/assets/file-explorer-B-6UIupX.js +0 -2
- package/dist/client/assets/index-BUxqhuMH.js +0 -77
- package/dist/client/assets/index-BsA-EPSZ.js +0 -1
- package/dist/client/assets/index-D1QykbrQ.js +0 -663
- package/dist/client/assets/index-FQ8XLQdc.js +0 -1
- package/dist/client/assets/post-editor-D_0v5MIW.js +0 -1
- package/dist/client/assets/project-app-view-64N_hCxT.js +0 -1
- package/dist/client/assets/record-editor-CfyDRkai.js +0 -1
- package/dist/client/assets/redirect-editor-DtpQyamh.js +0 -1
- package/dist/client/assets/registry-wwH7QUtH.js +0 -2
- package/dist/client/assets/sections-editor-CTSmdAom.js +0 -2
- package/dist/client/assets/self-tool-result-DNH6ZaMF.js +0 -1
- package/dist/client/assets/seo-editor-y4WzGjJn.js +0 -1
- package/dist/client/assets/sidebar-jMHKufA-.js +0 -1
- package/dist/client/assets/store-registry-BhGNNIkp.js +0 -2
- package/dist/client/assets/use-mcp-client-B6rroWiF.js +0 -10
- package/dist/client/assets/useInfiniteQuery-ZHHCL_4m.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-k1g0FdzT.js +0 -1
- package/dist/client/assets/variant-calendar-BWhYWq7j.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as W,b as te,r as Xe,j as n,B as He,a5 as ke,m as Le,aH as Ye,F as Ge,o as We,K as qe,n as Je,e as Ee,p as se,t as G,a1 as Ze}from"./index-BE7mJhFy.js";import{t as et}from"./ChevronDown-Dfx8ph9o.js";import{i as tt}from"./ChevronRight-BXMKC2_M.js";import{s as Me}from"./Plus-CKO7n5Po.js";import{s as st,t as nt}from"./Star01-DOCStMKN.js";import{s as lt}from"./Trash01-DFj83XXx.js";import{A as ot,a as rt,b as it,c as at,d as ct,e as dt,f as ft,g as mt}from"./alert-dialog-qODg0L4t.js";import{P as Ke}from"./index-C3N6oAxN.js";import{u as Ve}from"./studio-tools-DXVCK0sW.js";import{u as ut}from"./use-debounced-autosave-DsmYOWfj.js";import{n as xt}from"./LinkExternal01-Ba5xXfz2.js";import{i as gt}from"./Zap-C1KfAU0L.js";import{I as we}from"./input-SHG4kEt8.js";import{T as bt}from"./textarea-BIsK3TvL.js";import{R as ht}from"./require-capability-D_i84gfM.js";import"./sidebar-jMHKufA-.js";import"./LayoutLeft-BfIP_r4O.js";import"./use-mobile-Fq3m92SB.js";import"./X-ImXzxvCp.js";import"./tooltip-B-gahmZ0.js";import"./use-capability-DbPUHhbH.js";import"./access-gate-CT_xPmsE.js";import"./capability-load-error-CrHwHuDV.js";function Ie(t){const e=W.c(8),{title:s,children:r,className:l}=t;let o;e[0]!==l?(o=Le("rounded-2xl border border-border/60 bg-background p-5",l),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==s?(i=n.jsx("div",{className:"mb-4",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s})}),e[2]=s,e[3]=i):i=e[3];let a;return e[4]!==r||e[5]!==o||e[6]!==i?(a=n.jsxs("div",{className:o,children:[i,r]}),e[4]=r,e[5]=o,e[6]=i,e[7]=a):a=e[7],a}function pt(t){const e=W.c(41),{onExtract:s,isExtracting:r}=t,l=te(),[o,i]=Xe.useState("");let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(gt,{size:18,className:"text-primary"})}),e[0]=a):a=e[0];let c;e[1]!==l?(c=l("settings.brandFormSections.autoExtractTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==c?(d=n.jsx("p",{className:"text-sm font-medium text-foreground",children:c}),e[3]=c,e[4]=d):d=e[4];let j;e[5]!==l?(j=l("settings.brandFormSections.autoExtractDescription"),e[5]=l,e[6]=j):j=e[6];let b;e[7]!==j?(b=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:j}),e[7]=j,e[8]=b):b=e[8];let x;e[9]!==l?(x=l("settings.brandFormSections.domainPlaceholder"),e[9]=l,e[10]=x):x=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=_=>i(_.target.value),e[11]=f):f=e[11];let u;e[12]!==o||e[13]!==r||e[14]!==s?(u=_=>{_.key==="Enter"&&o.trim()&&!r&&s(o.trim())},e[12]=o,e[13]=r,e[14]=s,e[15]=u):u=e[15];let h;e[16]!==o||e[17]!==x||e[18]!==u?(h=n.jsx(we,{placeholder:x,value:o,onChange:f,className:"max-w-xs",onKeyDown:u}),e[16]=o,e[17]=x,e[18]=u,e[19]=h):h=e[19];let m;e[20]!==o||e[21]!==r?(m=!o.trim()||r,e[20]=o,e[21]=r,e[22]=m):m=e[22];let g;e[23]!==o||e[24]!==s?(g=()=>s(o.trim()),e[23]=o,e[24]=s,e[25]=g):g=e[25];let N;e[26]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(st,{size:14}),e[26]=N):N=e[26];let p;e[27]!==r||e[28]!==l?(p=l(r?"settings.brandFormSections.extracting":"settings.brandFormSections.extract"),e[27]=r,e[28]=l,e[29]=p):p=e[29];let C;e[30]!==m||e[31]!==g||e[32]!==p?(C=n.jsxs(He,{variant:"outline",disabled:m,onClick:g,children:[N,p]}),e[30]=m,e[31]=g,e[32]=p,e[33]=C):C=e[33];let y;e[34]!==C||e[35]!==h?(y=n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,C]}),e[34]=C,e[35]=h,e[36]=y):y=e[36];let B;return e[37]!==y||e[38]!==d||e[39]!==b?(B=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[a,n.jsxs("div",{className:"flex-1",children:[d,b,y]})]})}),e[37]=y,e[38]=d,e[39]=b,e[40]=B):B=e[40],B}function jt(t){const e=W.c(61),{form:s,onFieldChange:r,onFieldCommit:l}=t,o=te();let i;e[0]!==s?(i=s.watch("domain"),e[0]=s,e[1]=i):i=e[1];const a=i;let c;e[2]!==o?(c=o("settings.brandFormSections.companyOverviewTitle"),e[2]=o,e[3]=c):c=e[3];let d;e[4]!==o?(d=o("settings.brandFormSections.companyNameLabel"),e[4]=o,e[5]=d):d=e[5];let j;e[6]!==d?(j=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:d}),e[6]=d,e[7]=j):j=e[7];let b;e[8]!==r||e[9]!==l||e[10]!==o?(b=O=>{const{field:F}=O;return n.jsx(we,{...F,onChange:A=>{F.onChange(A),r()},onBlur:()=>{F.onBlur(),l()},placeholder:o("settings.brandFormSections.companyNamePlaceholder")})},e[8]=r,e[9]=l,e[10]=o,e[11]=b):b=e[11];let x;e[12]!==s.control||e[13]!==b?(x=n.jsx(ke,{control:s.control,name:"name",render:b}),e[12]=s.control,e[13]=b,e[14]=x):x=e[14];let f;e[15]!==j||e[16]!==x?(f=n.jsxs("div",{children:[j,x]}),e[15]=j,e[16]=x,e[17]=f):f=e[17];let u;e[18]!==o?(u=o("settings.brandFormSections.domainLabel"),e[18]=o,e[19]=u):u=e[19];let h;e[20]!==u?(h=n.jsx("span",{children:u}),e[20]=u,e[21]=h):h=e[21];let m;e[22]!==a||e[23]!==o?(m=a&&n.jsxs("a",{href:`https://${a}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 transition-colors hover:text-foreground",children:[n.jsx(xt,{size:10}),o("settings.brandFormSections.openLink")]}),e[22]=a,e[23]=o,e[24]=m):m=e[24];let g;e[25]!==m||e[26]!==h?(g=n.jsxs("label",{className:"mb-1 flex items-center justify-between text-xs text-muted-foreground",children:[h,m]}),e[25]=m,e[26]=h,e[27]=g):g=e[27];let N;e[28]!==r||e[29]!==l||e[30]!==o?(N=O=>{const{field:F}=O;return n.jsx(we,{...F,onChange:A=>{F.onChange(A),r()},onBlur:()=>{F.onBlur(),l()},placeholder:o("settings.brandFormSections.domainInputPlaceholder")})},e[28]=r,e[29]=l,e[30]=o,e[31]=N):N=e[31];let p;e[32]!==s.control||e[33]!==N?(p=n.jsx(ke,{control:s.control,name:"domain",render:N}),e[32]=s.control,e[33]=N,e[34]=p):p=e[34];let C;e[35]!==g||e[36]!==p?(C=n.jsxs("div",{children:[g,p]}),e[35]=g,e[36]=p,e[37]=C):C=e[37];let y;e[38]!==C||e[39]!==f?(y=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[f,C]}),e[38]=C,e[39]=f,e[40]=y):y=e[40];let B;e[41]!==o?(B=o("settings.brandFormSections.overviewLabel"),e[41]=o,e[42]=B):B=e[42];let _;e[43]!==B?(_=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:B}),e[43]=B,e[44]=_):_=e[44];let T;e[45]!==r||e[46]!==l||e[47]!==o?(T=O=>{const{field:F}=O;return n.jsx(bt,{...F,onChange:A=>{F.onChange(A),r()},onBlur:()=>{F.onBlur(),l()},placeholder:o("settings.brandFormSections.overviewPlaceholder"),rows:3})},e[45]=r,e[46]=l,e[47]=o,e[48]=T):T=e[48];let k;e[49]!==s.control||e[50]!==T?(k=n.jsx(ke,{control:s.control,name:"overview",render:T}),e[49]=s.control,e[50]=T,e[51]=k):k=e[51];let w;e[52]!==_||e[53]!==k?(w=n.jsxs("div",{children:[_,k]}),e[52]=_,e[53]=k,e[54]=w):w=e[54];let E;e[55]!==y||e[56]!==w?(E=n.jsxs("div",{className:"space-y-3",children:[y,w]}),e[55]=y,e[56]=w,e[57]=E):E=e[57];let R;return e[58]!==c||e[59]!==E?(R=n.jsx(Ie,{title:c,children:E}),e[58]=c,e[59]=E,e[60]=R):R=e[60],R}const Ct={backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"};function Ue(t){const e=W.c(24),{form:s,name:r,label:l,imgClassName:o,onFieldChange:i,onFieldCommit:a}=t,c=o===void 0?"h-full w-full object-contain p-3":o,d=te();let j;e[0]!==s||e[1]!==r?(j=s.watch(r),e[0]=s,e[1]=r,e[2]=j):j=e[2];const b=j;let x;e[3]!==c||e[4]!==l||e[5]!==d||e[6]!==b?(x=n.jsx("div",{className:"flex aspect-video w-28 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:Ct,children:b?n.jsx("img",{src:b,alt:l,className:c,loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:d("settings.brandFormSections.noImageLabel",{label:l.toLowerCase()})})}),e[3]=c,e[4]=l,e[5]=d,e[6]=b,e[7]=x):x=e[7];let f;e[8]!==l?(f=n.jsxs("label",{className:"mb-1 block text-xs text-muted-foreground",children:[l," URL"]}),e[8]=l,e[9]=f):f=e[9];let u;e[10]!==i||e[11]!==a||e[12]!==d?(u=N=>{const{field:p}=N;return n.jsx(we,{...p,onChange:C=>{p.onChange(C),i()},onBlur:()=>{p.onBlur(),a()},placeholder:d("settings.brandFormSections.urlPlaceholder")})},e[10]=i,e[11]=a,e[12]=d,e[13]=u):u=e[13];let h;e[14]!==s.control||e[15]!==r||e[16]!==u?(h=n.jsx(ke,{control:s.control,name:r,render:u}),e[14]=s.control,e[15]=r,e[16]=u,e[17]=h):h=e[17];let m;e[18]!==f||e[19]!==h?(m=n.jsxs("div",{className:"flex-1",children:[f,h]}),e[18]=f,e[19]=h,e[20]=m):m=e[20];let g;return e[21]!==x||e[22]!==m?(g=n.jsxs("div",{className:"flex items-start gap-3",children:[x,m]}),e[21]=x,e[22]=m,e[23]=g):g=e[23],g}function yt(t){const e=W.c(30),{form:s,onFieldChange:r,onFieldCommit:l}=t,o=te();let i;e[0]!==o?(i=o("settings.brandFormSections.logosImagesTitle"),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==o?(a=o("settings.brandFormSections.logoLabel"),e[2]=o,e[3]=a):a=e[3];let c;e[4]!==s||e[5]!==r||e[6]!==l||e[7]!==a?(c=n.jsx(Ue,{form:s,name:"logo",label:a,onFieldChange:r,onFieldCommit:l}),e[4]=s,e[5]=r,e[6]=l,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==o?(d=o("settings.brandFormSections.faviconLabel"),e[9]=o,e[10]=d):d=e[10];let j;e[11]!==s||e[12]!==r||e[13]!==l||e[14]!==d?(j=n.jsx(Ue,{form:s,name:"favicon",label:d,imgClassName:"h-12 w-12 object-contain",onFieldChange:r,onFieldCommit:l}),e[11]=s,e[12]=r,e[13]=l,e[14]=d,e[15]=j):j=e[15];let b;e[16]!==o?(b=o("settings.brandFormSections.ogImageLabel"),e[16]=o,e[17]=b):b=e[17];let x;e[18]!==s||e[19]!==r||e[20]!==l||e[21]!==b?(x=n.jsx(Ue,{form:s,name:"ogImage",label:b,imgClassName:"h-full w-full object-contain",onFieldChange:r,onFieldCommit:l}),e[18]=s,e[19]=r,e[20]=l,e[21]=b,e[22]=x):x=e[22];let f;e[23]!==c||e[24]!==j||e[25]!==x?(f=n.jsxs("div",{className:"space-y-3",children:[c,j,x]}),e[23]=c,e[24]=j,e[25]=x,e[26]=f):f=e[26];let u;return e[27]!==i||e[28]!==f?(u=n.jsx(Ie,{title:i,children:f}),e[27]=i,e[28]=f,e[29]=u):u=e[29],u}const vt=[{key:"heading",labelKey:"settings.brandFormSections.fontRoleHeading"},{key:"body",labelKey:"settings.brandFormSections.fontRoleBody"},{key:"code",labelKey:"settings.brandFormSections.fontRoleCode"}];function Nt(t){const e=W.c(12),{form:s,onFieldChange:r,onFieldCommit:l}=t,o=te();let i;e[0]!==o?(i=o("settings.brandFormSections.fontsTitle"),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==s||e[3]!==r||e[4]!==l||e[5]!==o?(a=vt.map(j=>{const{key:b,labelKey:x}=j,f=`fonts.${b}`,u=s.watch(f),h=o(x);return n.jsxs("div",{children:[n.jsxs("label",{className:"mb-1 flex items-center gap-3 text-xs text-muted-foreground",children:[n.jsx("span",{className:"w-7 text-base font-medium leading-none text-foreground",children:"Aa"}),n.jsx("span",{children:h}),u&&n.jsx("span",{className:"ml-auto truncate text-foreground",style:{fontFamily:u},children:u})]}),n.jsx(ke,{control:s.control,name:f,render:m=>{const{field:g}=m;return n.jsx(we,{...g,value:g.value??"",onChange:N=>{g.onChange(N),r()},onBlur:()=>{g.onBlur(),l()},placeholder:o("settings.brandFormSections.fontFamilyPlaceholder",{role:h.toLowerCase()})})}})]},b)}),e[2]=s,e[3]=r,e[4]=l,e[5]=o,e[6]=a):a=e[6];let c;e[7]!==a?(c=n.jsx("div",{className:"space-y-2",children:a}),e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==i||e[10]!==c?(d=n.jsx(Ie,{title:i,children:c}),e[9]=i,e[10]=c,e[11]=d):d=e[11],d}const Bt=[{key:"primary",labelKey:"settings.brandFormSections.colorRolePrimary"},{key:"secondary",labelKey:"settings.brandFormSections.colorRoleSecondary"},{key:"accent",labelKey:"settings.brandFormSections.colorRoleAccent"},{key:"background",labelKey:"settings.brandFormSections.colorRoleBackground"},{key:"foreground",labelKey:"settings.brandFormSections.colorRoleForeground"}];function Ft(t){const e=W.c(12),{form:s,onFieldChange:r,onFieldCommit:l}=t,o=te();let i;e[0]!==o?(i=o("settings.brandFormSections.colorsTitle"),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==s||e[3]!==r||e[4]!==l||e[5]!==o?(a=Bt.map(j=>{const{key:b,labelKey:x}=j,f=`colors.${b}`,u=o(x);return n.jsx(ke,{control:s.control,name:f,render:h=>{const{field:m}=h;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:m.value??"#000000",onChange:g=>{m.onChange(g.target.value),r()},onBlur:()=>{m.onBlur(),l()},className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(we,{value:m.value??"",onChange:g=>{m.onChange(g.target.value),r()},onBlur:()=>{m.onBlur(),l()},placeholder:o("settings.brandFormSections.colorPlaceholder"),className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:u})]})}},b)}),e[2]=s,e[3]=r,e[4]=l,e[5]=o,e[6]=a):a=e[6];let c;e[7]!==a?(c=n.jsx("div",{className:"space-y-2",children:a}),e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==i||e[10]!==c?(d=n.jsx(Ie,{title:i,children:c}),e[9]=i,e[10]=c,e[11]=d):d=e[11],d}function St(t){const e=W.c(168),{brand:s,onChanged:r}=t,l=te(),o=Ve(),[i,a]=Xe.useState(s.isDefault??!1),[c,d]=Xe.useState(!1),j=s.name??"",b=s.domain??"",x=s.overview??"",f=s.logo??"",u=s.favicon??"",h=s.ogImage??"";let m;e[0]!==s.fonts?(m=s.fonts??{},e[0]=s.fonts,e[1]=m):m=e[1];let g;e[2]!==s.colors?(g=s.colors??{},e[2]=s.colors,e[3]=g):g=e[3];let N;e[4]!==j||e[5]!==b||e[6]!==x||e[7]!==f||e[8]!==u||e[9]!==h||e[10]!==m||e[11]!==g?(N={values:{name:j,domain:b,overview:x,logo:f,favicon:u,ogImage:h,fonts:m,colors:g}},e[4]=j,e[5]=b,e[6]=x,e[7]=f,e[8]=u,e[9]=h,e[10]=m,e[11]=g,e[12]=N):N=e[12];const p=Ze(N);let C;e[13]!==s.id||e[14]!==o?(C=async v=>{const Pe=Object.values(v.fonts).some(Tt),$e=Object.values(v.colors).some(At);await o.call("BRAND_CONTEXT_UPDATE",{id:s.id,name:v.name,domain:v.domain,overview:v.overview,logo:v.logo||null,favicon:v.favicon||null,ogImage:v.ogImage||null,fonts:Pe?v.fonts:null,colors:$e?v.colors:null})},e[13]=s.id,e[14]=o,e[15]=C):C=e[15];let y;e[16]!==l?(y=()=>G.error(l("settings.orgBrandContext.failedSaveBrandContext")),e[16]=l,e[17]=y):y=e[17];let B;e[18]!==C||e[19]!==y?(B={mutationFn:C,onError:y},e[18]=C,e[19]=y,e[20]=B):B=e[20];const _=Ee(B);let T;e[21]!==s.id||e[22]!==p||e[23]!==r||e[24]!==l||e[25]!==_?(T={delayMs:500,save:async()=>{const v=p.control._formState.dirtyFields,Pe=Object.keys(v);if(Pe.length===0)return;const $e=p.getValues(),Qe=p.control._defaultValues;p.reset($e,{keepValues:!0});try{await _.mutateAsync($e),se("brand_updated",{brand_id:s.id,fields:Pe}),G.success(l("settings.orgBrandContext.brandContextUpdated")),r()}catch{p.reset(Qe,{keepValues:!0})}}},e[21]=s.id,e[22]=p,e[23]=r,e[24]=l,e[25]=_,e[26]=T):T=e[26];const{schedule:k,flush:w}=ut(T);let E;e[27]!==s.id||e[28]!==o?(E=async()=>{await o.call("BRAND_CONTEXT_DELETE",{id:s.id})},e[27]=s.id,e[28]=o,e[29]=E):E=e[29];let R;e[30]!==s.id||e[31]!==r||e[32]!==l?(R=()=>{se("brand_deleted",{brand_id:s.id}),d(!1),r(),G.success(l("settings.orgBrandContext.brandDeleted"))},e[30]=s.id,e[31]=r,e[32]=l,e[33]=R):R=e[33];let O;e[34]!==l?(O=()=>G.error(l("settings.orgBrandContext.failedDeleteBrand")),e[34]=l,e[35]=O):O=e[35];let F;e[36]!==E||e[37]!==R||e[38]!==O?(F={mutationFn:E,onSuccess:R,onError:O},e[36]=E,e[37]=R,e[38]=O,e[39]=F):F=e[39];const{mutate:A,isPending:D}=Ee(F);let P;e[40]!==s.id||e[41]!==s.isDefault||e[42]!==o?(P=async()=>{await o.call("BRAND_CONTEXT_UPDATE",{id:s.id,isDefault:!s.isDefault})},e[40]=s.id,e[41]=s.isDefault,e[42]=o,e[43]=P):P=e[43];let $;e[44]!==s.id||e[45]!==s.isDefault||e[46]!==r||e[47]!==l?($=()=>{se(s.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:s.id}),r(),G.success(s.isDefault?l("settings.orgBrandContext.removedAsDefaultBrand"):l("settings.orgBrandContext.setAsDefaultBrand"))},e[44]=s.id,e[45]=s.isDefault,e[46]=r,e[47]=l,e[48]=$):$=e[48];let K;e[49]!==l?(K=()=>G.error(l("settings.orgBrandContext.failedUpdateDefaultBrand")),e[49]=l,e[50]=K):K=e[50];let J;e[51]!==P||e[52]!==$||e[53]!==K?(J={mutationFn:P,onSuccess:$,onError:K},e[51]=P,e[52]=$,e[53]=K,e[54]=J):J=e[54];const{mutate:q}=Ee(J),V=s.isDefault?"border-primary/30":"border-border/60";let L;e[55]!==V?(L=Le("rounded-2xl border bg-background",V),e[55]=V,e[56]=L):L=e[56];let I;e[57]!==i?(I=()=>a(!i),e[57]=i,e[58]=I):I=e[58];let Q;e[59]!==i?(Q=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:i?n.jsx(et,{size:14}):n.jsx(tt,{size:14})}),e[59]=i,e[60]=Q):Q=e[60];let Z;e[61]!==s.logo||e[62]!==s.name?(Z=s.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:s.logo,alt:"",className:"h-full w-full object-contain p-1",onError:Et})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s.name?.charAt(0)?.toUpperCase()||"?"})}),e[61]=s.logo,e[62]=s.name,e[63]=Z):Z=e[63];let M;e[64]!==s.name||e[65]!==l?(M=s.name||l("settings.orgBrandContext.untitledBrand"),e[64]=s.name,e[65]=l,e[66]=M):M=e[66];let Y;e[67]!==M?(Y=n.jsx("span",{className:"text-sm font-medium text-foreground",children:M}),e[67]=M,e[68]=Y):Y=e[68];let z;e[69]!==s.domain?(z=s.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s.domain}),e[69]=s.domain,e[70]=z):z=e[70];let U;e[71]!==Y||e[72]!==z?(U=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[Y,z]}),e[71]=Y,e[72]=z,e[73]=U):U=e[73];let X;e[74]!==s.colors||e[75]!==i?(X=!i&&s.colors&&Object.values(s.colors).some(wt)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(s.colors).filter(kt).map(Dt)}),e[74]=s.colors,e[75]=i,e[76]=X):X=e[76];let H;e[77]!==s.fonts||e[78]!==i?(H=!i&&s.fonts&&Object.values(s.fonts).some(_t)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(s.fonts).filter(Boolean).join(", ")}),e[77]=s.fonts,e[78]=i,e[79]=H):H=e[79];const ee=s.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let S;e[80]!==ee?(S=Le("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",ee),e[80]=ee,e[81]=S):S=e[81];let ne,le;e[82]!==q?(ne=v=>{v.stopPropagation(),q()},le=v=>{v.key==="Enter"&&(v.stopPropagation(),q())},e[82]=q,e[83]=ne,e[84]=le):(ne=e[83],le=e[84]);let oe;e[85]!==s.isDefault||e[86]!==l?(oe=s.isDefault?l("settings.orgBrandContext.unsetAsDefault"):l("settings.orgBrandContext.setAsDefault"),e[85]=s.isDefault,e[86]=l,e[87]=oe):oe=e[87];const ze=s.isDefault?"text-primary fill-primary":"text-muted-foreground";let re;e[88]!==ze?(re=Le(ze),e[88]=ze,e[89]=re):re=e[89];let ie;e[90]!==re?(ie=n.jsx(nt,{size:13,className:re}),e[90]=re,e[91]=ie):ie=e[91];let ae;e[92]!==S||e[93]!==ne||e[94]!==le||e[95]!==oe||e[96]!==ie?(ae=n.jsx("span",{role:"button",tabIndex:0,className:S,onClick:ne,onKeyDown:le,title:oe,children:ie}),e[92]=S,e[93]=ne,e[94]=le,e[95]=oe,e[96]=ie,e[97]=ae):ae=e[97];let Ae,Te;e[98]===Symbol.for("react.memo_cache_sentinel")?(Ae=v=>{v.stopPropagation(),d(!0)},Te=v=>{v.key==="Enter"&&(v.stopPropagation(),d(!0))},e[98]=Ae,e[99]=Te):(Ae=e[98],Te=e[99]);let ce;e[100]!==l?(ce=l("settings.orgBrandContext.deleteBrand"),e[100]=l,e[101]=ce):ce=e[101];let Re;e[102]===Symbol.for("react.memo_cache_sentinel")?(Re=n.jsx(lt,{size:13,className:"text-muted-foreground"}),e[102]=Re):Re=e[102];let de;e[103]!==ce?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:Ae,onKeyDown:Te,title:ce,children:Re}),e[103]=ce,e[104]=de):de=e[104];let fe;e[105]!==I||e[106]!==Q||e[107]!==Z||e[108]!==U||e[109]!==X||e[110]!==H||e[111]!==ae||e[112]!==de?(fe=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:I,children:[Q,Z,U,X,H,ae,de]}),e[105]=I,e[106]=Q,e[107]=Z,e[108]=U,e[109]=X,e[110]=H,e[111]=ae,e[112]=de,e[113]=fe):fe=e[113];let me;e[114]!==i||e[115]!==w||e[116]!==p||e[117]!==k?(me=i&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(jt,{form:p,onFieldChange:k,onFieldCommit:w}),n.jsx(yt,{form:p,onFieldChange:k,onFieldCommit:w}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(Ft,{form:p,onFieldChange:k,onFieldCommit:w}),n.jsx(Nt,{form:p,onFieldChange:k,onFieldCommit:w})]})]}),e[114]=i,e[115]=w,e[116]=p,e[117]=k,e[118]=me):me=e[118];let ue;e[119]!==D?(ue=v=>{!v&&!D&&d(!1)},e[119]=D,e[120]=ue):ue=e[120];let xe;e[121]!==l?(xe=l("settings.orgBrandContext.deleteBrandTitle"),e[121]=l,e[122]=xe):xe=e[122];let ge;e[123]!==xe?(ge=n.jsx(ot,{children:xe}),e[123]=xe,e[124]=ge):ge=e[124];let be;e[125]!==s.name||e[126]!==l?(be=l("settings.orgBrandContext.deleteConfirmMessage",{name:s.name||l("settings.orgBrandContext.thisBrand")}),e[125]=s.name,e[126]=l,e[127]=be):be=e[127];let he;e[128]!==be?(he=n.jsx("p",{children:be}),e[128]=be,e[129]=he):he=e[129];let pe;e[130]!==s.isDefault||e[131]!==l?(pe=s.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsxs("span",{className:"font-medium",children:[l("settings.orgBrandContext.headsUp"),":"]})," ",l("settings.orgBrandContext.deleteDefaultBrandWarning")]}),e[130]=s.isDefault,e[131]=l,e[132]=pe):pe=e[132];let je;e[133]!==he||e[134]!==pe?(je=n.jsx(rt,{asChild:!0,children:n.jsxs("div",{children:[he,pe]})}),e[133]=he,e[134]=pe,e[135]=je):je=e[135];let Ce;e[136]!==ge||e[137]!==je?(Ce=n.jsxs(it,{children:[ge,je]}),e[136]=ge,e[137]=je,e[138]=Ce):Ce=e[138];let ye;e[139]!==l?(ye=l("settings.orgBrandContext.cancel"),e[139]=l,e[140]=ye):ye=e[140];let ve;e[141]!==D||e[142]!==ye?(ve=n.jsx(at,{disabled:D,children:ye}),e[141]=D,e[142]=ye,e[143]=ve):ve=e[143];let Ne;e[144]!==A?(Ne=v=>{v.preventDefault(),A()},e[144]=A,e[145]=Ne):Ne=e[145];let Be;e[146]!==D||e[147]!==l?(Be=l(D?"settings.orgBrandContext.deleting":"settings.orgBrandContext.delete"),e[146]=D,e[147]=l,e[148]=Be):Be=e[148];let Fe;e[149]!==D||e[150]!==Ne||e[151]!==Be?(Fe=n.jsx(ct,{onClick:Ne,disabled:D,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Be}),e[149]=D,e[150]=Ne,e[151]=Be,e[152]=Fe):Fe=e[152];let Se;e[153]!==ve||e[154]!==Fe?(Se=n.jsxs(dt,{children:[ve,Fe]}),e[153]=ve,e[154]=Fe,e[155]=Se):Se=e[155];let _e;e[156]!==Ce||e[157]!==Se?(_e=n.jsxs(ft,{children:[Ce,Se]}),e[156]=Ce,e[157]=Se,e[158]=_e):_e=e[158];let De;e[159]!==c||e[160]!==ue||e[161]!==_e?(De=n.jsx(mt,{open:c,onOpenChange:ue,children:_e}),e[159]=c,e[160]=ue,e[161]=_e,e[162]=De):De=e[162];let Oe;return e[163]!==L||e[164]!==fe||e[165]!==me||e[166]!==De?(Oe=n.jsxs("div",{className:L,children:[fe,me,De]}),e[163]=L,e[164]=fe,e[165]=me,e[166]=De,e[167]=Oe):Oe=e[167],Oe}function _t(t){return t}function Dt(t){const[e,s]=t;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:s},title:`${e}: ${s}`},e)}function kt(t){const[,e]=t;return e}function wt(t){return t}function Et(t){t.target.style.display="none"}function At(t){return t?.trim()}function Tt(t){return t?.trim()}function Rt(){const t=W.c(77),e=te(),{brandExtractEnabled:s}=Ye(),{org:r}=Ge(),l=Ve(),o=We();let i;t[0]!==r.id?(i=qe.brandContext(r.id),t[0]=r.id,t[1]=i):i=t[1];let a;t[2]!==l?(a=async()=>{const{items:S}=await l.call("BRAND_CONTEXT_LIST",{includeArchived:!1});return S},t[2]=l,t[3]=a):a=t[3];let c;t[4]!==i||t[5]!==a?(c={queryKey:i,queryFn:a},t[4]=i,t[5]=a,t[6]=c):c=t[6];const{data:d}=Je(c),b=(d===void 0?[]:d).filter(Ot);let x;t[7]!==r.id||t[8]!==o?(x=()=>o.invalidateQueries({queryKey:qe.brandContext(r.id),refetchType:"all"}),t[7]=r.id,t[8]=o,t[9]=x):x=t[9];const f=x;let u;t[10]!==l?(u=async()=>{await l.call("BRAND_CONTEXT_CREATE",{name:"New Brand",domain:"example.com",overview:""})},t[10]=l,t[11]=u):u=t[11];let h;t[12]!==f||t[13]!==e?(h=()=>{se("brand_created"),f(),G.success(e("settings.orgBrandContext.brandCreated"))},t[12]=f,t[13]=e,t[14]=h):h=t[14];let m;t[15]!==e?(m=()=>G.error(e("settings.orgBrandContext.failedCreateBrand")),t[15]=e,t[16]=m):m=t[16];let g;t[17]!==u||t[18]!==h||t[19]!==m?(g={mutationFn:u,onSuccess:h,onError:m},t[17]=u,t[18]=h,t[19]=m,t[20]=g):g=t[20];const{mutate:N,isPending:p}=Ee(g);let C;t[21]!==l?(C=async S=>{se("brand_extract_started",{domain:S}),await l.call("BRAND_CONTEXT_EXTRACT",{domain:S})},t[21]=l,t[22]=C):C=t[22];let y;t[23]!==f||t[24]!==e?(y=()=>{se("brand_extract_succeeded"),f(),G.success(e("settings.orgBrandContext.brandExtractedSuccessfully"))},t[23]=f,t[24]=e,t[25]=y):y=t[25];let B;t[26]!==e?(B=S=>{se("brand_extract_failed",{error:S instanceof Error?S.message:"unknown"}),G.error(S instanceof Error?S.message:e("settings.orgBrandContext.failedExtractBrand"))},t[26]=e,t[27]=B):B=t[27];let _;t[28]!==y||t[29]!==B||t[30]!==C?(_={mutationFn:C,onSuccess:y,onError:B},t[28]=y,t[29]=B,t[30]=C,t[31]=_):_=t[31];const{mutate:T,isPending:k}=Ee(_),w=Ke,E=Ke,R=Ke,O="flex flex-col gap-6";let F;t[32]!==e?(F=e("settings.orgBrandContext.brandContext"),t[32]=e,t[33]=F):F=t[33];let A;t[34]!==F?(A=n.jsx(Ke.Title,{children:F}),t[34]=F,t[35]=A):A=t[35];let D;t[36]!==e?(D=e("settings.orgBrandContext.brandContextDescription"),t[36]=e,t[37]=D):D=t[37];let P;t[38]!==D?(P=n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:D}),t[38]=D,t[39]=P):P=t[39];let $;t[40]!==A||t[41]!==P?($=n.jsxs("div",{children:[A,P]}),t[40]=A,t[41]=P,t[42]=$):$=t[42];let K;t[43]!==N?(K=()=>N(),t[43]=N,t[44]=K):K=t[44];let J;t[45]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(Me,{size:14}),t[45]=J):J=t[45];let q;t[46]!==e?(q=e("settings.orgBrandContext.addBrand"),t[46]=e,t[47]=q):q=t[47];let V;t[48]!==p||t[49]!==K||t[50]!==q?(V=n.jsxs(He,{variant:"outline",onClick:K,disabled:p,children:[J,q]}),t[48]=p,t[49]=K,t[50]=q,t[51]=V):V=t[51];let L;t[52]!==$||t[53]!==V?(L=n.jsxs("div",{className:"flex items-center justify-between",children:[$,V]}),t[52]=$,t[53]=V,t[54]=L):L=t[54];let I;t[55]!==s||t[56]!==T||t[57]!==k?(I=s&&n.jsx(pt,{onExtract:S=>T(S),isExtracting:k}),t[55]=s,t[56]=T,t[57]=k,t[58]=I):I=t[58];const Q=b.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.orgBrandContext.noBrandsConfigured")}),n.jsxs(He,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>N(),disabled:p,children:[n.jsx(Me,{size:14}),e("settings.orgBrandContext.addYourFirstBrand")]})]}),Z="group space-y-3";let M;t[59]!==f?(M=S=>n.jsx(St,{brand:S,onChanged:f},S.id),t[59]=f,t[60]=M):M=t[60];const Y=b.map(M);let z;t[61]!==Y?(z=n.jsx("div",{className:Z,children:Y}),t[61]=Y,t[62]=z):z=t[62];let U;t[63]!==L||t[64]!==I||t[65]!==Q||t[66]!==z?(U=n.jsxs("div",{className:O,children:[L,I,Q,z]}),t[63]=L,t[64]=I,t[65]=Q,t[66]=z,t[67]=U):U=t[67];let X;t[68]!==R.Body||t[69]!==U?(X=n.jsx(R.Body,{children:U}),t[68]=R.Body,t[69]=U,t[70]=X):X=t[70];let H;t[71]!==E.Content||t[72]!==X?(H=n.jsx(E.Content,{children:X}),t[71]=E.Content,t[72]=X,t[73]=H):H=t[73];let ee;return t[74]!==w||t[75]!==H?(ee=n.jsx(w,{children:H}),t[74]=w,t[75]=H,t[76]=ee):ee=t[76],ee}function Ot(t){return!t.archivedAt}function os(){const t=W.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ht,{capability:"org:manage",area:"brand context",children:n.jsx(Rt,{})}),t[0]=e):e=t[0],e}export{os as default};
|
|
1
|
+
import{c as W,b as te,r as Xe,j as n,B as qe,a5 as ke,m as Le,aQ as Ye,F as Ge,o as We,K as He,n as Je,e as Ee,p as se,t as G,a1 as Ze}from"./index-B0fkC9lT.js";import{t as et}from"./ChevronDown-CsqU07CB.js";import{i as tt}from"./ChevronRight-DzEO4WOO.js";import{s as Me}from"./Plus-C-ooojQ-.js";import{s as st,t as nt}from"./Star01-COab1bwH.js";import{s as lt}from"./Trash01-4ciIHO0v.js";import{A as ot,a as rt,b as it,c as at,d as ct,e as dt,f as ft,g as mt}from"./alert-dialog-xIkA8j5x.js";import{P as Ke}from"./index-Dytal4UA.js";import{u as Qe}from"./studio-tools-BaJrIiyZ.js";import{u as ut}from"./use-debounced-autosave-oSeifFUO.js";import{n as xt}from"./LinkExternal01-D1rq1_uq.js";import{i as gt}from"./Zap-DMOaYDez.js";import{I as we}from"./input-BLYKaojw.js";import{T as bt}from"./textarea-mkvWFVEl.js";import{R as ht}from"./require-capability-CZ-yYBiA.js";import"./sidebar-D3IIq4Vk.js";import"./LayoutLeft-DhqFICkJ.js";import"./use-mobile-C76oZZ_y.js";import"./X-C9CNUxMc.js";import"./tooltip-CD1UqZ9B.js";import"./use-capability-CE9es946.js";import"./access-gate-CJbiw1ui.js";import"./capability-load-error-DlPlQyTu.js";function Ie(t){const e=W.c(8),{title:s,children:r,className:l}=t;let o;e[0]!==l?(o=Le("rounded-2xl border border-border/60 bg-background p-5",l),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==s?(i=n.jsx("div",{className:"mb-4",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s})}),e[2]=s,e[3]=i):i=e[3];let a;return e[4]!==r||e[5]!==o||e[6]!==i?(a=n.jsxs("div",{className:o,children:[i,r]}),e[4]=r,e[5]=o,e[6]=i,e[7]=a):a=e[7],a}function pt(t){const e=W.c(41),{onExtract:s,isExtracting:r}=t,l=te(),[o,i]=Xe.useState("");let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(gt,{size:18,className:"text-primary"})}),e[0]=a):a=e[0];let c;e[1]!==l?(c=l("settings.brandFormSections.autoExtractTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==c?(d=n.jsx("p",{className:"text-sm font-medium text-foreground",children:c}),e[3]=c,e[4]=d):d=e[4];let j;e[5]!==l?(j=l("settings.brandFormSections.autoExtractDescription"),e[5]=l,e[6]=j):j=e[6];let b;e[7]!==j?(b=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:j}),e[7]=j,e[8]=b):b=e[8];let x;e[9]!==l?(x=l("settings.brandFormSections.domainPlaceholder"),e[9]=l,e[10]=x):x=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=_=>i(_.target.value),e[11]=f):f=e[11];let u;e[12]!==o||e[13]!==r||e[14]!==s?(u=_=>{_.key==="Enter"&&o.trim()&&!r&&s(o.trim())},e[12]=o,e[13]=r,e[14]=s,e[15]=u):u=e[15];let h;e[16]!==o||e[17]!==x||e[18]!==u?(h=n.jsx(we,{placeholder:x,value:o,onChange:f,className:"max-w-xs",onKeyDown:u}),e[16]=o,e[17]=x,e[18]=u,e[19]=h):h=e[19];let m;e[20]!==o||e[21]!==r?(m=!o.trim()||r,e[20]=o,e[21]=r,e[22]=m):m=e[22];let g;e[23]!==o||e[24]!==s?(g=()=>s(o.trim()),e[23]=o,e[24]=s,e[25]=g):g=e[25];let N;e[26]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(st,{size:14}),e[26]=N):N=e[26];let p;e[27]!==r||e[28]!==l?(p=l(r?"settings.brandFormSections.extracting":"settings.brandFormSections.extract"),e[27]=r,e[28]=l,e[29]=p):p=e[29];let C;e[30]!==m||e[31]!==g||e[32]!==p?(C=n.jsxs(qe,{variant:"outline",disabled:m,onClick:g,children:[N,p]}),e[30]=m,e[31]=g,e[32]=p,e[33]=C):C=e[33];let y;e[34]!==C||e[35]!==h?(y=n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,C]}),e[34]=C,e[35]=h,e[36]=y):y=e[36];let B;return e[37]!==y||e[38]!==d||e[39]!==b?(B=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[a,n.jsxs("div",{className:"flex-1",children:[d,b,y]})]})}),e[37]=y,e[38]=d,e[39]=b,e[40]=B):B=e[40],B}function jt(t){const e=W.c(61),{form:s,onFieldChange:r,onFieldCommit:l}=t,o=te();let i;e[0]!==s?(i=s.watch("domain"),e[0]=s,e[1]=i):i=e[1];const a=i;let c;e[2]!==o?(c=o("settings.brandFormSections.companyOverviewTitle"),e[2]=o,e[3]=c):c=e[3];let d;e[4]!==o?(d=o("settings.brandFormSections.companyNameLabel"),e[4]=o,e[5]=d):d=e[5];let j;e[6]!==d?(j=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:d}),e[6]=d,e[7]=j):j=e[7];let b;e[8]!==r||e[9]!==l||e[10]!==o?(b=O=>{const{field:F}=O;return n.jsx(we,{...F,onChange:A=>{F.onChange(A),r()},onBlur:()=>{F.onBlur(),l()},placeholder:o("settings.brandFormSections.companyNamePlaceholder")})},e[8]=r,e[9]=l,e[10]=o,e[11]=b):b=e[11];let x;e[12]!==s.control||e[13]!==b?(x=n.jsx(ke,{control:s.control,name:"name",render:b}),e[12]=s.control,e[13]=b,e[14]=x):x=e[14];let f;e[15]!==j||e[16]!==x?(f=n.jsxs("div",{children:[j,x]}),e[15]=j,e[16]=x,e[17]=f):f=e[17];let u;e[18]!==o?(u=o("settings.brandFormSections.domainLabel"),e[18]=o,e[19]=u):u=e[19];let h;e[20]!==u?(h=n.jsx("span",{children:u}),e[20]=u,e[21]=h):h=e[21];let m;e[22]!==a||e[23]!==o?(m=a&&n.jsxs("a",{href:`https://${a}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 transition-colors hover:text-foreground",children:[n.jsx(xt,{size:10}),o("settings.brandFormSections.openLink")]}),e[22]=a,e[23]=o,e[24]=m):m=e[24];let g;e[25]!==m||e[26]!==h?(g=n.jsxs("label",{className:"mb-1 flex items-center justify-between text-xs text-muted-foreground",children:[h,m]}),e[25]=m,e[26]=h,e[27]=g):g=e[27];let N;e[28]!==r||e[29]!==l||e[30]!==o?(N=O=>{const{field:F}=O;return n.jsx(we,{...F,onChange:A=>{F.onChange(A),r()},onBlur:()=>{F.onBlur(),l()},placeholder:o("settings.brandFormSections.domainInputPlaceholder")})},e[28]=r,e[29]=l,e[30]=o,e[31]=N):N=e[31];let p;e[32]!==s.control||e[33]!==N?(p=n.jsx(ke,{control:s.control,name:"domain",render:N}),e[32]=s.control,e[33]=N,e[34]=p):p=e[34];let C;e[35]!==g||e[36]!==p?(C=n.jsxs("div",{children:[g,p]}),e[35]=g,e[36]=p,e[37]=C):C=e[37];let y;e[38]!==C||e[39]!==f?(y=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[f,C]}),e[38]=C,e[39]=f,e[40]=y):y=e[40];let B;e[41]!==o?(B=o("settings.brandFormSections.overviewLabel"),e[41]=o,e[42]=B):B=e[42];let _;e[43]!==B?(_=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:B}),e[43]=B,e[44]=_):_=e[44];let T;e[45]!==r||e[46]!==l||e[47]!==o?(T=O=>{const{field:F}=O;return n.jsx(bt,{...F,onChange:A=>{F.onChange(A),r()},onBlur:()=>{F.onBlur(),l()},placeholder:o("settings.brandFormSections.overviewPlaceholder"),rows:3})},e[45]=r,e[46]=l,e[47]=o,e[48]=T):T=e[48];let k;e[49]!==s.control||e[50]!==T?(k=n.jsx(ke,{control:s.control,name:"overview",render:T}),e[49]=s.control,e[50]=T,e[51]=k):k=e[51];let w;e[52]!==_||e[53]!==k?(w=n.jsxs("div",{children:[_,k]}),e[52]=_,e[53]=k,e[54]=w):w=e[54];let E;e[55]!==y||e[56]!==w?(E=n.jsxs("div",{className:"space-y-3",children:[y,w]}),e[55]=y,e[56]=w,e[57]=E):E=e[57];let R;return e[58]!==c||e[59]!==E?(R=n.jsx(Ie,{title:c,children:E}),e[58]=c,e[59]=E,e[60]=R):R=e[60],R}const Ct={backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"};function Ue(t){const e=W.c(24),{form:s,name:r,label:l,imgClassName:o,onFieldChange:i,onFieldCommit:a}=t,c=o===void 0?"h-full w-full object-contain p-3":o,d=te();let j;e[0]!==s||e[1]!==r?(j=s.watch(r),e[0]=s,e[1]=r,e[2]=j):j=e[2];const b=j;let x;e[3]!==c||e[4]!==l||e[5]!==d||e[6]!==b?(x=n.jsx("div",{className:"flex aspect-video w-28 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:Ct,children:b?n.jsx("img",{src:b,alt:l,className:c,loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:d("settings.brandFormSections.noImageLabel",{label:l.toLowerCase()})})}),e[3]=c,e[4]=l,e[5]=d,e[6]=b,e[7]=x):x=e[7];let f;e[8]!==l?(f=n.jsxs("label",{className:"mb-1 block text-xs text-muted-foreground",children:[l," URL"]}),e[8]=l,e[9]=f):f=e[9];let u;e[10]!==i||e[11]!==a||e[12]!==d?(u=N=>{const{field:p}=N;return n.jsx(we,{...p,onChange:C=>{p.onChange(C),i()},onBlur:()=>{p.onBlur(),a()},placeholder:d("settings.brandFormSections.urlPlaceholder")})},e[10]=i,e[11]=a,e[12]=d,e[13]=u):u=e[13];let h;e[14]!==s.control||e[15]!==r||e[16]!==u?(h=n.jsx(ke,{control:s.control,name:r,render:u}),e[14]=s.control,e[15]=r,e[16]=u,e[17]=h):h=e[17];let m;e[18]!==f||e[19]!==h?(m=n.jsxs("div",{className:"flex-1",children:[f,h]}),e[18]=f,e[19]=h,e[20]=m):m=e[20];let g;return e[21]!==x||e[22]!==m?(g=n.jsxs("div",{className:"flex items-start gap-3",children:[x,m]}),e[21]=x,e[22]=m,e[23]=g):g=e[23],g}function yt(t){const e=W.c(30),{form:s,onFieldChange:r,onFieldCommit:l}=t,o=te();let i;e[0]!==o?(i=o("settings.brandFormSections.logosImagesTitle"),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==o?(a=o("settings.brandFormSections.logoLabel"),e[2]=o,e[3]=a):a=e[3];let c;e[4]!==s||e[5]!==r||e[6]!==l||e[7]!==a?(c=n.jsx(Ue,{form:s,name:"logo",label:a,onFieldChange:r,onFieldCommit:l}),e[4]=s,e[5]=r,e[6]=l,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==o?(d=o("settings.brandFormSections.faviconLabel"),e[9]=o,e[10]=d):d=e[10];let j;e[11]!==s||e[12]!==r||e[13]!==l||e[14]!==d?(j=n.jsx(Ue,{form:s,name:"favicon",label:d,imgClassName:"h-12 w-12 object-contain",onFieldChange:r,onFieldCommit:l}),e[11]=s,e[12]=r,e[13]=l,e[14]=d,e[15]=j):j=e[15];let b;e[16]!==o?(b=o("settings.brandFormSections.ogImageLabel"),e[16]=o,e[17]=b):b=e[17];let x;e[18]!==s||e[19]!==r||e[20]!==l||e[21]!==b?(x=n.jsx(Ue,{form:s,name:"ogImage",label:b,imgClassName:"h-full w-full object-contain",onFieldChange:r,onFieldCommit:l}),e[18]=s,e[19]=r,e[20]=l,e[21]=b,e[22]=x):x=e[22];let f;e[23]!==c||e[24]!==j||e[25]!==x?(f=n.jsxs("div",{className:"space-y-3",children:[c,j,x]}),e[23]=c,e[24]=j,e[25]=x,e[26]=f):f=e[26];let u;return e[27]!==i||e[28]!==f?(u=n.jsx(Ie,{title:i,children:f}),e[27]=i,e[28]=f,e[29]=u):u=e[29],u}const vt=[{key:"heading",labelKey:"settings.brandFormSections.fontRoleHeading"},{key:"body",labelKey:"settings.brandFormSections.fontRoleBody"},{key:"code",labelKey:"settings.brandFormSections.fontRoleCode"}];function Nt(t){const e=W.c(12),{form:s,onFieldChange:r,onFieldCommit:l}=t,o=te();let i;e[0]!==o?(i=o("settings.brandFormSections.fontsTitle"),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==s||e[3]!==r||e[4]!==l||e[5]!==o?(a=vt.map(j=>{const{key:b,labelKey:x}=j,f=`fonts.${b}`,u=s.watch(f),h=o(x);return n.jsxs("div",{children:[n.jsxs("label",{className:"mb-1 flex items-center gap-3 text-xs text-muted-foreground",children:[n.jsx("span",{className:"w-7 text-base font-medium leading-none text-foreground",children:"Aa"}),n.jsx("span",{children:h}),u&&n.jsx("span",{className:"ml-auto truncate text-foreground",style:{fontFamily:u},children:u})]}),n.jsx(ke,{control:s.control,name:f,render:m=>{const{field:g}=m;return n.jsx(we,{...g,value:g.value??"",onChange:N=>{g.onChange(N),r()},onBlur:()=>{g.onBlur(),l()},placeholder:o("settings.brandFormSections.fontFamilyPlaceholder",{role:h.toLowerCase()})})}})]},b)}),e[2]=s,e[3]=r,e[4]=l,e[5]=o,e[6]=a):a=e[6];let c;e[7]!==a?(c=n.jsx("div",{className:"space-y-2",children:a}),e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==i||e[10]!==c?(d=n.jsx(Ie,{title:i,children:c}),e[9]=i,e[10]=c,e[11]=d):d=e[11],d}const Bt=[{key:"primary",labelKey:"settings.brandFormSections.colorRolePrimary"},{key:"secondary",labelKey:"settings.brandFormSections.colorRoleSecondary"},{key:"accent",labelKey:"settings.brandFormSections.colorRoleAccent"},{key:"background",labelKey:"settings.brandFormSections.colorRoleBackground"},{key:"foreground",labelKey:"settings.brandFormSections.colorRoleForeground"}];function Ft(t){const e=W.c(12),{form:s,onFieldChange:r,onFieldCommit:l}=t,o=te();let i;e[0]!==o?(i=o("settings.brandFormSections.colorsTitle"),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==s||e[3]!==r||e[4]!==l||e[5]!==o?(a=Bt.map(j=>{const{key:b,labelKey:x}=j,f=`colors.${b}`,u=o(x);return n.jsx(ke,{control:s.control,name:f,render:h=>{const{field:m}=h;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:m.value??"#000000",onChange:g=>{m.onChange(g.target.value),r()},onBlur:()=>{m.onBlur(),l()},className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(we,{value:m.value??"",onChange:g=>{m.onChange(g.target.value),r()},onBlur:()=>{m.onBlur(),l()},placeholder:o("settings.brandFormSections.colorPlaceholder"),className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:u})]})}},b)}),e[2]=s,e[3]=r,e[4]=l,e[5]=o,e[6]=a):a=e[6];let c;e[7]!==a?(c=n.jsx("div",{className:"space-y-2",children:a}),e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==i||e[10]!==c?(d=n.jsx(Ie,{title:i,children:c}),e[9]=i,e[10]=c,e[11]=d):d=e[11],d}function St(t){const e=W.c(168),{brand:s,onChanged:r}=t,l=te(),o=Qe(),[i,a]=Xe.useState(s.isDefault??!1),[c,d]=Xe.useState(!1),j=s.name??"",b=s.domain??"",x=s.overview??"",f=s.logo??"",u=s.favicon??"",h=s.ogImage??"";let m;e[0]!==s.fonts?(m=s.fonts??{},e[0]=s.fonts,e[1]=m):m=e[1];let g;e[2]!==s.colors?(g=s.colors??{},e[2]=s.colors,e[3]=g):g=e[3];let N;e[4]!==j||e[5]!==b||e[6]!==x||e[7]!==f||e[8]!==u||e[9]!==h||e[10]!==m||e[11]!==g?(N={values:{name:j,domain:b,overview:x,logo:f,favicon:u,ogImage:h,fonts:m,colors:g}},e[4]=j,e[5]=b,e[6]=x,e[7]=f,e[8]=u,e[9]=h,e[10]=m,e[11]=g,e[12]=N):N=e[12];const p=Ze(N);let C;e[13]!==s.id||e[14]!==o?(C=async v=>{const Pe=Object.values(v.fonts).some(Tt),$e=Object.values(v.colors).some(At);await o.call("BRAND_CONTEXT_UPDATE",{id:s.id,name:v.name,domain:v.domain,overview:v.overview,logo:v.logo||null,favicon:v.favicon||null,ogImage:v.ogImage||null,fonts:Pe?v.fonts:null,colors:$e?v.colors:null})},e[13]=s.id,e[14]=o,e[15]=C):C=e[15];let y;e[16]!==l?(y=()=>G.error(l("settings.orgBrandContext.failedSaveBrandContext")),e[16]=l,e[17]=y):y=e[17];let B;e[18]!==C||e[19]!==y?(B={mutationFn:C,onError:y},e[18]=C,e[19]=y,e[20]=B):B=e[20];const _=Ee(B);let T;e[21]!==s.id||e[22]!==p||e[23]!==r||e[24]!==l||e[25]!==_?(T={delayMs:500,save:async()=>{const v=p.control._formState.dirtyFields,Pe=Object.keys(v);if(Pe.length===0)return;const $e=p.getValues(),Ve=p.control._defaultValues;p.reset($e,{keepValues:!0});try{await _.mutateAsync($e),se("brand_updated",{brand_id:s.id,fields:Pe}),G.success(l("settings.orgBrandContext.brandContextUpdated")),r()}catch{p.reset(Ve,{keepValues:!0})}}},e[21]=s.id,e[22]=p,e[23]=r,e[24]=l,e[25]=_,e[26]=T):T=e[26];const{schedule:k,flush:w}=ut(T);let E;e[27]!==s.id||e[28]!==o?(E=async()=>{await o.call("BRAND_CONTEXT_DELETE",{id:s.id})},e[27]=s.id,e[28]=o,e[29]=E):E=e[29];let R;e[30]!==s.id||e[31]!==r||e[32]!==l?(R=()=>{se("brand_deleted",{brand_id:s.id}),d(!1),r(),G.success(l("settings.orgBrandContext.brandDeleted"))},e[30]=s.id,e[31]=r,e[32]=l,e[33]=R):R=e[33];let O;e[34]!==l?(O=()=>G.error(l("settings.orgBrandContext.failedDeleteBrand")),e[34]=l,e[35]=O):O=e[35];let F;e[36]!==E||e[37]!==R||e[38]!==O?(F={mutationFn:E,onSuccess:R,onError:O},e[36]=E,e[37]=R,e[38]=O,e[39]=F):F=e[39];const{mutate:A,isPending:D}=Ee(F);let P;e[40]!==s.id||e[41]!==s.isDefault||e[42]!==o?(P=async()=>{await o.call("BRAND_CONTEXT_UPDATE",{id:s.id,isDefault:!s.isDefault})},e[40]=s.id,e[41]=s.isDefault,e[42]=o,e[43]=P):P=e[43];let $;e[44]!==s.id||e[45]!==s.isDefault||e[46]!==r||e[47]!==l?($=()=>{se(s.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:s.id}),r(),G.success(s.isDefault?l("settings.orgBrandContext.removedAsDefaultBrand"):l("settings.orgBrandContext.setAsDefaultBrand"))},e[44]=s.id,e[45]=s.isDefault,e[46]=r,e[47]=l,e[48]=$):$=e[48];let K;e[49]!==l?(K=()=>G.error(l("settings.orgBrandContext.failedUpdateDefaultBrand")),e[49]=l,e[50]=K):K=e[50];let J;e[51]!==P||e[52]!==$||e[53]!==K?(J={mutationFn:P,onSuccess:$,onError:K},e[51]=P,e[52]=$,e[53]=K,e[54]=J):J=e[54];const{mutate:H}=Ee(J),Q=s.isDefault?"border-primary/30":"border-border/60";let L;e[55]!==Q?(L=Le("rounded-2xl border bg-background",Q),e[55]=Q,e[56]=L):L=e[56];let I;e[57]!==i?(I=()=>a(!i),e[57]=i,e[58]=I):I=e[58];let V;e[59]!==i?(V=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:i?n.jsx(et,{size:14}):n.jsx(tt,{size:14})}),e[59]=i,e[60]=V):V=e[60];let Z;e[61]!==s.logo||e[62]!==s.name?(Z=s.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:s.logo,alt:"",className:"h-full w-full object-contain p-1",onError:Et})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s.name?.charAt(0)?.toUpperCase()||"?"})}),e[61]=s.logo,e[62]=s.name,e[63]=Z):Z=e[63];let M;e[64]!==s.name||e[65]!==l?(M=s.name||l("settings.orgBrandContext.untitledBrand"),e[64]=s.name,e[65]=l,e[66]=M):M=e[66];let Y;e[67]!==M?(Y=n.jsx("span",{className:"text-sm font-medium text-foreground",children:M}),e[67]=M,e[68]=Y):Y=e[68];let z;e[69]!==s.domain?(z=s.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s.domain}),e[69]=s.domain,e[70]=z):z=e[70];let U;e[71]!==Y||e[72]!==z?(U=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[Y,z]}),e[71]=Y,e[72]=z,e[73]=U):U=e[73];let X;e[74]!==s.colors||e[75]!==i?(X=!i&&s.colors&&Object.values(s.colors).some(wt)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(s.colors).filter(kt).map(Dt)}),e[74]=s.colors,e[75]=i,e[76]=X):X=e[76];let q;e[77]!==s.fonts||e[78]!==i?(q=!i&&s.fonts&&Object.values(s.fonts).some(_t)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(s.fonts).filter(Boolean).join(", ")}),e[77]=s.fonts,e[78]=i,e[79]=q):q=e[79];const ee=s.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let S;e[80]!==ee?(S=Le("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",ee),e[80]=ee,e[81]=S):S=e[81];let ne,le;e[82]!==H?(ne=v=>{v.stopPropagation(),H()},le=v=>{v.key==="Enter"&&(v.stopPropagation(),H())},e[82]=H,e[83]=ne,e[84]=le):(ne=e[83],le=e[84]);let oe;e[85]!==s.isDefault||e[86]!==l?(oe=s.isDefault?l("settings.orgBrandContext.unsetAsDefault"):l("settings.orgBrandContext.setAsDefault"),e[85]=s.isDefault,e[86]=l,e[87]=oe):oe=e[87];const ze=s.isDefault?"text-primary fill-primary":"text-muted-foreground";let re;e[88]!==ze?(re=Le(ze),e[88]=ze,e[89]=re):re=e[89];let ie;e[90]!==re?(ie=n.jsx(nt,{size:13,className:re}),e[90]=re,e[91]=ie):ie=e[91];let ae;e[92]!==S||e[93]!==ne||e[94]!==le||e[95]!==oe||e[96]!==ie?(ae=n.jsx("span",{role:"button",tabIndex:0,className:S,onClick:ne,onKeyDown:le,title:oe,children:ie}),e[92]=S,e[93]=ne,e[94]=le,e[95]=oe,e[96]=ie,e[97]=ae):ae=e[97];let Ae,Te;e[98]===Symbol.for("react.memo_cache_sentinel")?(Ae=v=>{v.stopPropagation(),d(!0)},Te=v=>{v.key==="Enter"&&(v.stopPropagation(),d(!0))},e[98]=Ae,e[99]=Te):(Ae=e[98],Te=e[99]);let ce;e[100]!==l?(ce=l("settings.orgBrandContext.deleteBrand"),e[100]=l,e[101]=ce):ce=e[101];let Re;e[102]===Symbol.for("react.memo_cache_sentinel")?(Re=n.jsx(lt,{size:13,className:"text-muted-foreground"}),e[102]=Re):Re=e[102];let de;e[103]!==ce?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:Ae,onKeyDown:Te,title:ce,children:Re}),e[103]=ce,e[104]=de):de=e[104];let fe;e[105]!==I||e[106]!==V||e[107]!==Z||e[108]!==U||e[109]!==X||e[110]!==q||e[111]!==ae||e[112]!==de?(fe=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:I,children:[V,Z,U,X,q,ae,de]}),e[105]=I,e[106]=V,e[107]=Z,e[108]=U,e[109]=X,e[110]=q,e[111]=ae,e[112]=de,e[113]=fe):fe=e[113];let me;e[114]!==i||e[115]!==w||e[116]!==p||e[117]!==k?(me=i&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(jt,{form:p,onFieldChange:k,onFieldCommit:w}),n.jsx(yt,{form:p,onFieldChange:k,onFieldCommit:w}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(Ft,{form:p,onFieldChange:k,onFieldCommit:w}),n.jsx(Nt,{form:p,onFieldChange:k,onFieldCommit:w})]})]}),e[114]=i,e[115]=w,e[116]=p,e[117]=k,e[118]=me):me=e[118];let ue;e[119]!==D?(ue=v=>{!v&&!D&&d(!1)},e[119]=D,e[120]=ue):ue=e[120];let xe;e[121]!==l?(xe=l("settings.orgBrandContext.deleteBrandTitle"),e[121]=l,e[122]=xe):xe=e[122];let ge;e[123]!==xe?(ge=n.jsx(ot,{children:xe}),e[123]=xe,e[124]=ge):ge=e[124];let be;e[125]!==s.name||e[126]!==l?(be=l("settings.orgBrandContext.deleteConfirmMessage",{name:s.name||l("settings.orgBrandContext.thisBrand")}),e[125]=s.name,e[126]=l,e[127]=be):be=e[127];let he;e[128]!==be?(he=n.jsx("p",{children:be}),e[128]=be,e[129]=he):he=e[129];let pe;e[130]!==s.isDefault||e[131]!==l?(pe=s.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsxs("span",{className:"font-medium",children:[l("settings.orgBrandContext.headsUp"),":"]})," ",l("settings.orgBrandContext.deleteDefaultBrandWarning")]}),e[130]=s.isDefault,e[131]=l,e[132]=pe):pe=e[132];let je;e[133]!==he||e[134]!==pe?(je=n.jsx(rt,{asChild:!0,children:n.jsxs("div",{children:[he,pe]})}),e[133]=he,e[134]=pe,e[135]=je):je=e[135];let Ce;e[136]!==ge||e[137]!==je?(Ce=n.jsxs(it,{children:[ge,je]}),e[136]=ge,e[137]=je,e[138]=Ce):Ce=e[138];let ye;e[139]!==l?(ye=l("settings.orgBrandContext.cancel"),e[139]=l,e[140]=ye):ye=e[140];let ve;e[141]!==D||e[142]!==ye?(ve=n.jsx(at,{disabled:D,children:ye}),e[141]=D,e[142]=ye,e[143]=ve):ve=e[143];let Ne;e[144]!==A?(Ne=v=>{v.preventDefault(),A()},e[144]=A,e[145]=Ne):Ne=e[145];let Be;e[146]!==D||e[147]!==l?(Be=l(D?"settings.orgBrandContext.deleting":"settings.orgBrandContext.delete"),e[146]=D,e[147]=l,e[148]=Be):Be=e[148];let Fe;e[149]!==D||e[150]!==Ne||e[151]!==Be?(Fe=n.jsx(ct,{onClick:Ne,disabled:D,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Be}),e[149]=D,e[150]=Ne,e[151]=Be,e[152]=Fe):Fe=e[152];let Se;e[153]!==ve||e[154]!==Fe?(Se=n.jsxs(dt,{children:[ve,Fe]}),e[153]=ve,e[154]=Fe,e[155]=Se):Se=e[155];let _e;e[156]!==Ce||e[157]!==Se?(_e=n.jsxs(ft,{children:[Ce,Se]}),e[156]=Ce,e[157]=Se,e[158]=_e):_e=e[158];let De;e[159]!==c||e[160]!==ue||e[161]!==_e?(De=n.jsx(mt,{open:c,onOpenChange:ue,children:_e}),e[159]=c,e[160]=ue,e[161]=_e,e[162]=De):De=e[162];let Oe;return e[163]!==L||e[164]!==fe||e[165]!==me||e[166]!==De?(Oe=n.jsxs("div",{className:L,children:[fe,me,De]}),e[163]=L,e[164]=fe,e[165]=me,e[166]=De,e[167]=Oe):Oe=e[167],Oe}function _t(t){return t}function Dt(t){const[e,s]=t;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:s},title:`${e}: ${s}`},e)}function kt(t){const[,e]=t;return e}function wt(t){return t}function Et(t){t.target.style.display="none"}function At(t){return t?.trim()}function Tt(t){return t?.trim()}function Rt(){const t=W.c(77),e=te(),{brandExtractEnabled:s}=Ye(),{org:r}=Ge(),l=Qe(),o=We();let i;t[0]!==r.id?(i=He.brandContext(r.id),t[0]=r.id,t[1]=i):i=t[1];let a;t[2]!==l?(a=async()=>{const{items:S}=await l.call("BRAND_CONTEXT_LIST",{includeArchived:!1});return S},t[2]=l,t[3]=a):a=t[3];let c;t[4]!==i||t[5]!==a?(c={queryKey:i,queryFn:a},t[4]=i,t[5]=a,t[6]=c):c=t[6];const{data:d}=Je(c),b=(d===void 0?[]:d).filter(Ot);let x;t[7]!==r.id||t[8]!==o?(x=()=>o.invalidateQueries({queryKey:He.brandContext(r.id),refetchType:"all"}),t[7]=r.id,t[8]=o,t[9]=x):x=t[9];const f=x;let u;t[10]!==l?(u=async()=>{await l.call("BRAND_CONTEXT_CREATE",{name:"New Brand",domain:"example.com",overview:""})},t[10]=l,t[11]=u):u=t[11];let h;t[12]!==f||t[13]!==e?(h=()=>{se("brand_created"),f(),G.success(e("settings.orgBrandContext.brandCreated"))},t[12]=f,t[13]=e,t[14]=h):h=t[14];let m;t[15]!==e?(m=()=>G.error(e("settings.orgBrandContext.failedCreateBrand")),t[15]=e,t[16]=m):m=t[16];let g;t[17]!==u||t[18]!==h||t[19]!==m?(g={mutationFn:u,onSuccess:h,onError:m},t[17]=u,t[18]=h,t[19]=m,t[20]=g):g=t[20];const{mutate:N,isPending:p}=Ee(g);let C;t[21]!==l?(C=async S=>{se("brand_extract_started",{domain:S}),await l.call("BRAND_CONTEXT_EXTRACT",{domain:S})},t[21]=l,t[22]=C):C=t[22];let y;t[23]!==f||t[24]!==e?(y=()=>{se("brand_extract_succeeded"),f(),G.success(e("settings.orgBrandContext.brandExtractedSuccessfully"))},t[23]=f,t[24]=e,t[25]=y):y=t[25];let B;t[26]!==e?(B=S=>{se("brand_extract_failed",{error:S instanceof Error?S.message:"unknown"}),G.error(S instanceof Error?S.message:e("settings.orgBrandContext.failedExtractBrand"))},t[26]=e,t[27]=B):B=t[27];let _;t[28]!==y||t[29]!==B||t[30]!==C?(_={mutationFn:C,onSuccess:y,onError:B},t[28]=y,t[29]=B,t[30]=C,t[31]=_):_=t[31];const{mutate:T,isPending:k}=Ee(_),w=Ke,E=Ke,R=Ke,O="flex flex-col gap-6";let F;t[32]!==e?(F=e("settings.orgBrandContext.brandContext"),t[32]=e,t[33]=F):F=t[33];let A;t[34]!==F?(A=n.jsx(Ke.Title,{children:F}),t[34]=F,t[35]=A):A=t[35];let D;t[36]!==e?(D=e("settings.orgBrandContext.brandContextDescription"),t[36]=e,t[37]=D):D=t[37];let P;t[38]!==D?(P=n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:D}),t[38]=D,t[39]=P):P=t[39];let $;t[40]!==A||t[41]!==P?($=n.jsxs("div",{children:[A,P]}),t[40]=A,t[41]=P,t[42]=$):$=t[42];let K;t[43]!==N?(K=()=>N(),t[43]=N,t[44]=K):K=t[44];let J;t[45]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(Me,{size:14}),t[45]=J):J=t[45];let H;t[46]!==e?(H=e("settings.orgBrandContext.addBrand"),t[46]=e,t[47]=H):H=t[47];let Q;t[48]!==p||t[49]!==K||t[50]!==H?(Q=n.jsxs(qe,{variant:"outline",onClick:K,disabled:p,children:[J,H]}),t[48]=p,t[49]=K,t[50]=H,t[51]=Q):Q=t[51];let L;t[52]!==$||t[53]!==Q?(L=n.jsxs("div",{className:"flex items-center justify-between",children:[$,Q]}),t[52]=$,t[53]=Q,t[54]=L):L=t[54];let I;t[55]!==s||t[56]!==T||t[57]!==k?(I=s&&n.jsx(pt,{onExtract:S=>T(S),isExtracting:k}),t[55]=s,t[56]=T,t[57]=k,t[58]=I):I=t[58];const V=b.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.orgBrandContext.noBrandsConfigured")}),n.jsxs(qe,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>N(),disabled:p,children:[n.jsx(Me,{size:14}),e("settings.orgBrandContext.addYourFirstBrand")]})]}),Z="group space-y-3";let M;t[59]!==f?(M=S=>n.jsx(St,{brand:S,onChanged:f},S.id),t[59]=f,t[60]=M):M=t[60];const Y=b.map(M);let z;t[61]!==Y?(z=n.jsx("div",{className:Z,children:Y}),t[61]=Y,t[62]=z):z=t[62];let U;t[63]!==L||t[64]!==I||t[65]!==V||t[66]!==z?(U=n.jsxs("div",{className:O,children:[L,I,V,z]}),t[63]=L,t[64]=I,t[65]=V,t[66]=z,t[67]=U):U=t[67];let X;t[68]!==R.Body||t[69]!==U?(X=n.jsx(R.Body,{children:U}),t[68]=R.Body,t[69]=U,t[70]=X):X=t[70];let q;t[71]!==E.Content||t[72]!==X?(q=n.jsx(E.Content,{children:X}),t[71]=E.Content,t[72]=X,t[73]=q):q=t[73];let ee;return t[74]!==w||t[75]!==q?(ee=n.jsx(w,{children:q}),t[74]=w,t[75]=q,t[76]=ee):ee=t[76],ee}function Ot(t){return!t.archivedAt}function os(){const t=W.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ht,{capability:"org:manage",area:"brand context",children:n.jsx(Rt,{})}),t[0]=e):e=t[0],e}export{os as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as T,b as F,j as t,r as C,E as W,B as L,t as K}from"./index-BE7mJhFy.js";import{i as X}from"./AlertCircle-BfuYC-ez.js";import{i as I}from"./HardDrive-Bdh7pAUM.js";import{s as V}from"./Plus-CKO7n5Po.js";import{s as Y}from"./Trash01-DFj83XXx.js";import{d as Z,A as ee,a as te,b as se,c as ie,e as le,f as ne,g as re}from"./alert-dialog-qODg0L4t.js";import{e as ce,d as ae,a as oe,b as de,h as ue,c as me}from"./dialog-B5y5hFnb.js";import{I as P}from"./input-SHG4kEt8.js";import{L as B}from"./label-BoGYufMX.js";import{S as fe,a as ge,b as xe,c as pe,d as q}from"./select-DE2zqg5r.js";import{S as he}from"./switch-BEKqgb1f.js";import{S as be}from"./skeleton-AvMrml5O.js";import{T as je}from"./textarea-BIsK3TvL.js";import{P as E}from"./index-C3N6oAxN.js";import{c as ke}from"./settings-section-DBkfk9BB.js";import{u as ye,b as ve,c as Se}from"./use-file-configs-B_bqkDL5.js";import{R as Ce}from"./require-capability-D_i84gfM.js";import"./X-ImXzxvCp.js";import"./tooltip-B-gahmZ0.js";import"./Check-CfIRDOap.js";import"./ChevronDown-Dfx8ph9o.js";import"./ChevronUp-Dl1S15_f.js";import"./sidebar-jMHKufA-.js";import"./LayoutLeft-BfIP_r4O.js";import"./use-mobile-Fq3m92SB.js";import"./card-DmKStgES.js";import"./ArrowUpRight-CRz_iHAu.js";import"./studio-tools-DXVCK0sW.js";import"./use-capability-DbPUHhbH.js";import"./access-gate-CT_xPmsE.js";import"./capability-load-error-CrHwHuDV.js";function Ne(i,e){if(!(i instanceof Error))return e;const s=i.message.match(/\[\s*\{[\s\S]*\}\s*\]/);if(s)try{const l=JSON.parse(s[0])[0];if(l?.message){const n=l.path?.join(".");return n?`${n}: ${l.message}`:l.message}}catch{}return i.message||e}function Be(i){const e=T.c(6),{error:s}=i,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:16}),e[0]=l):l=e[0];let n;e[1]!==s.message||e[2]!==r?(n=r("settings.buckets.failedToLoadConfigs",{error:s.message}),e[1]=s.message,e[2]=r,e[3]=n):n=e[3];let c;return e[4]!==n?(c=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,t.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=c):c=e[5],c}function Pe(i){const e=T.c(51),{config:s,onDelete:r}=i,l=F();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(I,{size:16,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let c;e[1]!==s.name?(c=t.jsx("span",{className:"font-medium text-sm truncate",children:s.name}),e[1]=s.name,e[2]=c):c=e[2];let a;e[3]!==s.credentialType||e[4]!==l?(a=s.credentialType==="sts-session"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:"STS"}):s.credentialType==="managed"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:l("settings.buckets.managed")}):null,e[3]=s.credentialType,e[4]=l,e[5]=a):a=e[5];let u;e[6]!==s.bucket||e[7]!==s.region?(u=t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:[s.bucket," · ",s.region]}),e[6]=s.bucket,e[7]=s.region,e[8]=u):u=e[8];let o;e[9]!==c||e[10]!==a||e[11]!==u?(o=t.jsxs("div",{className:"flex items-center gap-2",children:[c,a,u]}),e[9]=c,e[10]=a,e[11]=u,e[12]=o):o=e[12];let g;e[13]!==s.description?(g=s.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:s.description}):null,e[13]=s.description,e[14]=g):g=e[14];let d;e[15]!==s.endpoint||e[16]!==s.forcePathStyle||e[17]!==l?(d=s.endpoint?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:[s.endpoint,s.forcePathStyle?` (${l("settings.buckets.pathStyle")})`:""]}):null,e[15]=s.endpoint,e[16]=s.forcePathStyle,e[17]=l,e[18]=d):d=e[18];let f;e[19]!==s.prefix||e[20]!==l?(f=s.prefix?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.prefix",{prefix:s.prefix})}):null,e[19]=s.prefix,e[20]=l,e[21]=f):f=e[21];let m;e[22]!==s.publicUrlBase||e[23]!==l?(m=s.publicUrlBase?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.public",{url:s.publicUrlBase})}):null,e[22]=s.publicUrlBase,e[23]=l,e[24]=m):m=e[24];let b;e[25]!==o||e[26]!==g||e[27]!==d||e[28]!==f||e[29]!==m?(b=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[n,t.jsxs("div",{className:"min-w-0",children:[o,g,d,f,m]})]}),e[25]=o,e[26]=g,e[27]=d,e[28]=f,e[29]=m,e[30]=b):b=e[30];let j;e[31]!==s.createdAt?(j=new Date(s.createdAt).toLocaleDateString(),e[31]=s.createdAt,e[32]=j):j=e[32];let S;e[33]!==j?(S=t.jsx("span",{className:"text-xs text-muted-foreground",children:j}),e[33]=j,e[34]=S):S=e[34];let v;e[35]!==s||e[36]!==r?(v=()=>r(s),e[35]=s,e[36]=r,e[37]=v):v=e[37];let k;e[38]!==s.name||e[39]!==l?(k=l("settings.buckets.deleteButton",{name:s.name}),e[38]=s.name,e[39]=l,e[40]=k):k=e[40];let y;e[41]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Y,{size:14}),e[41]=y):y=e[41];let x;e[42]!==v||e[43]!==k?(x=t.jsx(L,{variant:"ghost",size:"sm",onClick:v,"aria-label":k,children:y}),e[42]=v,e[43]=k,e[44]=x):x=e[44];let p;e[45]!==S||e[46]!==x?(p=t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[S,x]}),e[45]=S,e[46]=x,e[47]=p):p=e[47];let N;return e[48]!==b||e[49]!==p?(N=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[b,p]}),e[48]=b,e[49]=p,e[50]=N):N=e[50],N}function De(i){const e=T.c(21),{onCreate:s}=i,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(I,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let n;e[1]!==r?(n=r("settings.buckets.noBucketsConfigured"),e[1]=r,e[2]=n):n=e[2];let c;e[3]!==n?(c=t.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=c):c=e[4];let a;e[5]!==r?(a=r("settings.buckets.emptyStateDescription"),e[5]=r,e[6]=a):a=e[6];let u;e[7]!==a?(u=t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:a}),e[7]=a,e[8]=u):u=e[8];let o;e[9]!==c||e[10]!==u?(o=t.jsxs("div",{children:[c,u]}),e[9]=c,e[10]=u,e[11]=o):o=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),e[12]=g):g=e[12];let d;e[13]!==r?(d=r("settings.buckets.addBucket"),e[13]=r,e[14]=d):d=e[14];let f;e[15]!==s||e[16]!==d?(f=t.jsxs(L,{onClick:s,size:"sm",className:"mt-2",children:[g,d]}),e[15]=s,e[16]=d,e[17]=f):f=e[17];let m;return e[18]!==o||e[19]!==f?(m=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,o,f]}),e[18]=o,e[19]=f,e[20]=m):m=e[20],m}function O({open:i,onOpenChange:e}){const s=F(),[r,l]=C.useState(""),[n,c]=C.useState(""),[a,u]=C.useState(""),[o,g]=C.useState(""),[d,f]=C.useState(""),[m,b]=C.useState(!1),[j,S]=C.useState(""),[v,k]=C.useState(""),[y,x]=C.useState("static"),[p,N]=C.useState(""),[D,w]=C.useState(""),[_,A]=C.useState(""),[$,z]=C.useState(""),U=ve();function H(){l(""),c(""),u(""),g(""),f(""),b(!1),S(""),k(""),x("static"),N(""),w(""),A(""),z("")}const R=y==="sts-session"?!!(_.trim()&&$.trim()):!!(p&&D);async function J(h){if(h.preventDefault(),!r.trim()||!a.trim()||!o.trim()||!R)return;const M=y==="sts-session"?{credentialType:"sts-session",refreshUrl:_.trim(),apiKey:$.trim()}:{credentialType:"static",accessKeyId:p,secretAccessKey:D};try{await U.mutateAsync({name:r.trim(),description:n.trim()||void 0,bucket:a.trim(),region:o.trim(),endpoint:d.trim()||void 0,forcePathStyle:m,prefix:j.trim()||void 0,publicUrlBase:v.trim()||void 0,...M}),K.success(s("settings.buckets.bucketAdded",{name:r.trim()})),H(),e(!1)}catch(Q){K.error(Ne(Q,s("settings.buckets.failedToAddBucket")))}}const G=U.isPending||!r.trim()||!a.trim()||!o.trim()||!R;return t.jsx(ce,{open:i,onOpenChange:e,children:t.jsxs(ae,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto",children:[t.jsxs(oe,{children:[t.jsx(de,{children:s("settings.buckets.addS3Bucket")}),t.jsx(ue,{children:s("settings.buckets.credentialsEncryptedDescription")})]}),t.jsxs("form",{onSubmit:J,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-name",children:s("settings.buckets.nameLabel")}),t.jsx(P,{id:"file-config-name",value:r,onChange:h=>l(h.target.value),placeholder:s("settings.buckets.namePlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.nameHelperText")})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-bucket",children:s("settings.buckets.bucketLabel")}),t.jsx(P,{id:"file-config-bucket",value:a,onChange:h=>u(h.target.value),placeholder:s("settings.buckets.bucketPlaceholder"),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-region",children:s("settings.buckets.regionLabel")}),t.jsx(P,{id:"file-config-region",value:o,onChange:h=>g(h.target.value),placeholder:s("settings.buckets.regionPlaceholder"),autoComplete:"off",required:!0})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-endpoint",children:s("settings.buckets.endpointLabel")}),t.jsx(P,{id:"file-config-endpoint",type:"url",value:d,onChange:h=>f(h.target.value),placeholder:s("settings.buckets.endpointPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.endpointHelperText")})]}),t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border/60 p-3",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx(B,{htmlFor:"file-config-path-style",className:"text-sm",children:s("settings.buckets.forcePathStyleLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s("settings.buckets.forcePathStyleHelperText")})]}),t.jsx(he,{id:"file-config-path-style",checked:m,onCheckedChange:b})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-prefix",children:s("settings.buckets.prefixLabel")}),t.jsx(P,{id:"file-config-prefix",value:j,onChange:h=>S(h.target.value),placeholder:s("settings.buckets.prefixPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.prefixHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-public-url-base",children:s("settings.buckets.publicUrlBaseLabel")}),t.jsx(P,{id:"file-config-public-url-base",type:"url",value:v,onChange:h=>k(h.target.value),placeholder:s("settings.buckets.publicUrlBasePlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.publicUrlBaseHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-credential-type",children:s("settings.buckets.credentialsLabel")}),t.jsxs(fe,{value:y,onValueChange:h=>x(h),children:[t.jsx(ge,{id:"file-config-credential-type",className:"w-full",children:t.jsx(xe,{})}),t.jsxs(pe,{children:[t.jsx(q,{value:"static",children:s("settings.buckets.staticKeyOption")}),t.jsx(q,{value:"sts-session",children:s("settings.buckets.temporarySessionOption")})]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s(y==="sts-session"?"settings.buckets.stsSessionHelperText":"settings.buckets.staticKeyHelperText")})]}),y==="static"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-access-key",children:s("settings.buckets.accessKeyIdLabel")}),t.jsx(P,{id:"file-config-access-key",value:p,onChange:h=>N(h.target.value),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-secret-key",children:s("settings.buckets.secretAccessKeyLabel")}),t.jsx(P,{id:"file-config-secret-key",type:"password",value:D,onChange:h=>w(h.target.value),autoComplete:"new-password",required:!0})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-refresh-url",children:s("settings.buckets.refreshUrlLabel")}),t.jsx(P,{id:"file-config-refresh-url",type:"url",value:_,onChange:h=>A(h.target.value),placeholder:s("settings.buckets.refreshUrlPlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.refreshUrlHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-api-key",children:s("settings.buckets.apiKeyLabel")}),t.jsx(P,{id:"file-config-api-key",type:"password",value:$,onChange:h=>z(h.target.value),autoComplete:"new-password",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.apiKeyHelperText")})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-description",children:s("settings.buckets.descriptionLabel")}),t.jsx(je,{id:"file-config-description",value:n,onChange:h=>c(h.target.value),rows:2,placeholder:s("settings.buckets.descriptionPlaceholder")})]}),t.jsxs(me,{children:[t.jsx(L,{type:"button",variant:"outline",onClick:()=>{H(),e(!1)},disabled:U.isPending,children:s("settings.buckets.cancelButton")}),t.jsx(L,{type:"submit",disabled:G,children:U.isPending?s("settings.buckets.addingButton"):s("settings.buckets.addBucketButton")})]})]})]})})}function Te(i){const e=T.c(41),{config:s,onClose:r}=i,l=F(),n=Se();let c;e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==l?(c=async function(){if(s)try{await n.mutateAsync(s.id),K.success(l("settings.buckets.bucketRemoved",{name:s.name})),r()}catch(_){const A=_;K.error(A instanceof Error?A.message:l("settings.buckets.failedToRemoveBucket"))}},e[0]=s,e[1]=n,e[2]=r,e[3]=l,e[4]=c):c=e[4];const a=c,u=s!==null;let o;e[5]!==r?(o=w=>!w&&r(),e[5]=r,e[6]=o):o=e[6];let g;e[7]!==l?(g=l("settings.buckets.removeBucketTitle"),e[7]=l,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ee,{children:g}),e[9]=g,e[10]=d):d=e[10];const f=s?.name??"";let m;e[11]!==l||e[12]!==f?(m=l("settings.buckets.removeBucketDescription",{name:f}),e[11]=l,e[12]=f,e[13]=m):m=e[13];let b;e[14]!==m?(b=t.jsx(te,{children:m}),e[14]=m,e[15]=b):b=e[15];let j;e[16]!==d||e[17]!==b?(j=t.jsxs(se,{children:[d,b]}),e[16]=d,e[17]=b,e[18]=j):j=e[18];const S=n.isPending;let v;e[19]!==l?(v=l("settings.buckets.cancelButton"),e[19]=l,e[20]=v):v=e[20];let k;e[21]!==n.isPending||e[22]!==v?(k=t.jsx(ie,{disabled:S,children:v}),e[21]=n.isPending,e[22]=v,e[23]=k):k=e[23];let y;e[24]!==n.isPending||e[25]!==l?(y=n.isPending?l("settings.buckets.removingButton"):l("settings.buckets.removeButton"),e[24]=n.isPending,e[25]=l,e[26]=y):y=e[26];let x;e[27]!==n.isPending||e[28]!==a||e[29]!==y?(x=t.jsx(Z,{onClick:a,disabled:n.isPending,children:y}),e[27]=n.isPending,e[28]=a,e[29]=y,e[30]=x):x=e[30];let p;e[31]!==k||e[32]!==x?(p=t.jsxs(le,{children:[k,x]}),e[31]=k,e[32]=x,e[33]=p):p=e[33];let N;e[34]!==p||e[35]!==j?(N=t.jsxs(ne,{children:[j,p]}),e[34]=p,e[35]=j,e[36]=N):N=e[36];let D;return e[37]!==N||e[38]!==u||e[39]!==o?(D=t.jsx(re,{open:u,onOpenChange:o,children:N}),e[37]=N,e[38]=u,e[39]=o,e[40]=D):D=e[40],D}function Fe(){const i=T.c(32),e=F(),s=ye(),[r,l]=C.useState(!1),[n,c]=C.useState(null);if(s.length===0){let x;i[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(De,{onCreate:()=>l(!0)}),i[0]=x):x=i[0];let p;return i[1]!==r?(p=t.jsxs(t.Fragment,{children:[x,t.jsx(O,{open:r,onOpenChange:l})]}),i[1]=r,i[2]=p):p=i[2],p}let a;i[3]!==s.length||i[4]!==e?(a=e("settings.buckets.bucketsConfigured",{count:s.length}),i[3]=s.length,i[4]=e,i[5]=a):a=i[5];let u;i[6]!==a?(u=t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),i[6]=a,i[7]=u):u=i[7];let o;i[8]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(!0),i[8]=o):o=i[8];let g;i[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),i[9]=g):g=i[9];let d;i[10]!==e?(d=e("settings.buckets.addBucket"),i[10]=e,i[11]=d):d=i[11];let f;i[12]!==d?(f=t.jsxs(L,{onClick:o,size:"sm",children:[g,d]}),i[12]=d,i[13]=f):f=i[13];let m;i[14]!==u||i[15]!==f?(m=t.jsxs("div",{className:"flex items-center justify-between",children:[u,f]}),i[14]=u,i[15]=f,i[16]=m):m=i[16];let b;if(i[17]!==s){let x;i[19]===Symbol.for("react.memo_cache_sentinel")?(x=p=>t.jsx(Pe,{config:p,onDelete:c},p.id),i[19]=x):x=i[19],b=s.map(x),i[17]=s,i[18]=b}else b=i[18];let j;i[20]!==b?(j=t.jsx("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:t.jsx("div",{children:b})}),i[20]=b,i[21]=j):j=i[21];let S;i[22]!==r?(S=t.jsx(O,{open:r,onOpenChange:l}),i[22]=r,i[23]=S):S=i[23];let v;i[24]===Symbol.for("react.memo_cache_sentinel")?(v=()=>c(null),i[24]=v):v=i[24];let k;i[25]!==n?(k=t.jsx(Te,{config:n,onClose:v}),i[25]=n,i[26]=k):k=i[26];let y;return i[27]!==k||i[28]!==m||i[29]!==j||i[30]!==S?(y=t.jsxs(t.Fragment,{children:[m,j,S,k]}),i[27]=k,i[28]=m,i[29]=j,i[30]=S,i[31]=y):y=i[31],y}function we(){const i=T.c(12),e=F();let s;i[0]!==e?(s=e("settings.buckets.pageTitle"),i[0]=e,i[1]=s):s=i[1];let r;i[2]!==s?(r=t.jsx(E.Title,{children:s}),i[2]=s,i[3]=r):r=i[3];let l;i[4]!==e?(l=u=>{const{error:o}=u;return t.jsx(Be,{error:o??new Error(e("settings.buckets.failedToLoadConfigsFallback"))})},i[4]=e,i[5]=l):l=i[5];let n;i[6]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(C.Suspense,{fallback:t.jsx(be,{className:"h-32 w-full"}),children:t.jsx(Fe,{})}),i[6]=n):n=i[6];let c;i[7]!==l?(c=t.jsx(W,{fallback:l,children:n}),i[7]=l,i[8]=c):c=i[8];let a;return i[9]!==r||i[10]!==c?(a=t.jsx(E,{children:t.jsx(E.Content,{children:t.jsx(E.Body,{children:t.jsxs(ke,{children:[r,c]})})})}),i[9]=r,i[10]=c,i[11]=a):a=i[11],a}function ot(){const i=T.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ce,{capability:"file-configs:manage",area:"files",children:t.jsx(we,{})}),i[0]=e):e=i[0],e}export{ot as default};
|
|
1
|
+
import{c as T,b as F,j as t,r as C,E as W,B as L,t as K}from"./index-B0fkC9lT.js";import{i as X}from"./AlertCircle-BM2arXAG.js";import{i as I}from"./HardDrive-CrMH19j9.js";import{s as V}from"./Plus-C-ooojQ-.js";import{s as Y}from"./Trash01-4ciIHO0v.js";import{d as Z,A as ee,a as te,b as se,c as ie,e as le,f as ne,g as re}from"./alert-dialog-xIkA8j5x.js";import{e as ce,d as ae,a as oe,b as de,h as ue,c as me}from"./dialog-CM96GyMN.js";import{I as P}from"./input-BLYKaojw.js";import{L as B}from"./label-CpR3NhLK.js";import{S as fe,a as ge,b as xe,c as pe,d as q}from"./select-BudfwrnS.js";import{S as he}from"./switch-tQg0oUQP.js";import{S as be}from"./skeleton-GgH9QFOh.js";import{T as je}from"./textarea-mkvWFVEl.js";import{P as E}from"./index-Dytal4UA.js";import{c as ke}from"./settings-section-BE7oCApW.js";import{u as ye,b as ve,c as Se}from"./use-file-configs-lWDULD1a.js";import{R as Ce}from"./require-capability-CZ-yYBiA.js";import"./X-C9CNUxMc.js";import"./tooltip-CD1UqZ9B.js";import"./Check-D0s6wH1X.js";import"./ChevronDown-CsqU07CB.js";import"./ChevronUp-CLKFL_od.js";import"./sidebar-D3IIq4Vk.js";import"./LayoutLeft-DhqFICkJ.js";import"./use-mobile-C76oZZ_y.js";import"./card-f7IIAQow.js";import"./ArrowUpRight-B3CxAPJj.js";import"./studio-tools-BaJrIiyZ.js";import"./use-capability-CE9es946.js";import"./access-gate-CJbiw1ui.js";import"./capability-load-error-DlPlQyTu.js";function Ne(i,e){if(!(i instanceof Error))return e;const s=i.message.match(/\[\s*\{[\s\S]*\}\s*\]/);if(s)try{const l=JSON.parse(s[0])[0];if(l?.message){const n=l.path?.join(".");return n?`${n}: ${l.message}`:l.message}}catch{}return i.message||e}function Be(i){const e=T.c(6),{error:s}=i,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:16}),e[0]=l):l=e[0];let n;e[1]!==s.message||e[2]!==r?(n=r("settings.buckets.failedToLoadConfigs",{error:s.message}),e[1]=s.message,e[2]=r,e[3]=n):n=e[3];let c;return e[4]!==n?(c=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,t.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=c):c=e[5],c}function Pe(i){const e=T.c(51),{config:s,onDelete:r}=i,l=F();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(I,{size:16,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let c;e[1]!==s.name?(c=t.jsx("span",{className:"font-medium text-sm truncate",children:s.name}),e[1]=s.name,e[2]=c):c=e[2];let a;e[3]!==s.credentialType||e[4]!==l?(a=s.credentialType==="sts-session"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:"STS"}):s.credentialType==="managed"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:l("settings.buckets.managed")}):null,e[3]=s.credentialType,e[4]=l,e[5]=a):a=e[5];let u;e[6]!==s.bucket||e[7]!==s.region?(u=t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:[s.bucket," · ",s.region]}),e[6]=s.bucket,e[7]=s.region,e[8]=u):u=e[8];let o;e[9]!==c||e[10]!==a||e[11]!==u?(o=t.jsxs("div",{className:"flex items-center gap-2",children:[c,a,u]}),e[9]=c,e[10]=a,e[11]=u,e[12]=o):o=e[12];let g;e[13]!==s.description?(g=s.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:s.description}):null,e[13]=s.description,e[14]=g):g=e[14];let d;e[15]!==s.endpoint||e[16]!==s.forcePathStyle||e[17]!==l?(d=s.endpoint?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:[s.endpoint,s.forcePathStyle?` (${l("settings.buckets.pathStyle")})`:""]}):null,e[15]=s.endpoint,e[16]=s.forcePathStyle,e[17]=l,e[18]=d):d=e[18];let f;e[19]!==s.prefix||e[20]!==l?(f=s.prefix?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.prefix",{prefix:s.prefix})}):null,e[19]=s.prefix,e[20]=l,e[21]=f):f=e[21];let m;e[22]!==s.publicUrlBase||e[23]!==l?(m=s.publicUrlBase?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.public",{url:s.publicUrlBase})}):null,e[22]=s.publicUrlBase,e[23]=l,e[24]=m):m=e[24];let b;e[25]!==o||e[26]!==g||e[27]!==d||e[28]!==f||e[29]!==m?(b=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[n,t.jsxs("div",{className:"min-w-0",children:[o,g,d,f,m]})]}),e[25]=o,e[26]=g,e[27]=d,e[28]=f,e[29]=m,e[30]=b):b=e[30];let j;e[31]!==s.createdAt?(j=new Date(s.createdAt).toLocaleDateString(),e[31]=s.createdAt,e[32]=j):j=e[32];let S;e[33]!==j?(S=t.jsx("span",{className:"text-xs text-muted-foreground",children:j}),e[33]=j,e[34]=S):S=e[34];let v;e[35]!==s||e[36]!==r?(v=()=>r(s),e[35]=s,e[36]=r,e[37]=v):v=e[37];let k;e[38]!==s.name||e[39]!==l?(k=l("settings.buckets.deleteButton",{name:s.name}),e[38]=s.name,e[39]=l,e[40]=k):k=e[40];let y;e[41]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Y,{size:14}),e[41]=y):y=e[41];let x;e[42]!==v||e[43]!==k?(x=t.jsx(L,{variant:"ghost",size:"sm",onClick:v,"aria-label":k,children:y}),e[42]=v,e[43]=k,e[44]=x):x=e[44];let p;e[45]!==S||e[46]!==x?(p=t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[S,x]}),e[45]=S,e[46]=x,e[47]=p):p=e[47];let N;return e[48]!==b||e[49]!==p?(N=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[b,p]}),e[48]=b,e[49]=p,e[50]=N):N=e[50],N}function De(i){const e=T.c(21),{onCreate:s}=i,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(I,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let n;e[1]!==r?(n=r("settings.buckets.noBucketsConfigured"),e[1]=r,e[2]=n):n=e[2];let c;e[3]!==n?(c=t.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=c):c=e[4];let a;e[5]!==r?(a=r("settings.buckets.emptyStateDescription"),e[5]=r,e[6]=a):a=e[6];let u;e[7]!==a?(u=t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:a}),e[7]=a,e[8]=u):u=e[8];let o;e[9]!==c||e[10]!==u?(o=t.jsxs("div",{children:[c,u]}),e[9]=c,e[10]=u,e[11]=o):o=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),e[12]=g):g=e[12];let d;e[13]!==r?(d=r("settings.buckets.addBucket"),e[13]=r,e[14]=d):d=e[14];let f;e[15]!==s||e[16]!==d?(f=t.jsxs(L,{onClick:s,size:"sm",className:"mt-2",children:[g,d]}),e[15]=s,e[16]=d,e[17]=f):f=e[17];let m;return e[18]!==o||e[19]!==f?(m=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,o,f]}),e[18]=o,e[19]=f,e[20]=m):m=e[20],m}function O({open:i,onOpenChange:e}){const s=F(),[r,l]=C.useState(""),[n,c]=C.useState(""),[a,u]=C.useState(""),[o,g]=C.useState(""),[d,f]=C.useState(""),[m,b]=C.useState(!1),[j,S]=C.useState(""),[v,k]=C.useState(""),[y,x]=C.useState("static"),[p,N]=C.useState(""),[D,w]=C.useState(""),[_,A]=C.useState(""),[$,z]=C.useState(""),U=ve();function H(){l(""),c(""),u(""),g(""),f(""),b(!1),S(""),k(""),x("static"),N(""),w(""),A(""),z("")}const R=y==="sts-session"?!!(_.trim()&&$.trim()):!!(p&&D);async function J(h){if(h.preventDefault(),!r.trim()||!a.trim()||!o.trim()||!R)return;const M=y==="sts-session"?{credentialType:"sts-session",refreshUrl:_.trim(),apiKey:$.trim()}:{credentialType:"static",accessKeyId:p,secretAccessKey:D};try{await U.mutateAsync({name:r.trim(),description:n.trim()||void 0,bucket:a.trim(),region:o.trim(),endpoint:d.trim()||void 0,forcePathStyle:m,prefix:j.trim()||void 0,publicUrlBase:v.trim()||void 0,...M}),K.success(s("settings.buckets.bucketAdded",{name:r.trim()})),H(),e(!1)}catch(Q){K.error(Ne(Q,s("settings.buckets.failedToAddBucket")))}}const G=U.isPending||!r.trim()||!a.trim()||!o.trim()||!R;return t.jsx(ce,{open:i,onOpenChange:e,children:t.jsxs(ae,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto",children:[t.jsxs(oe,{children:[t.jsx(de,{children:s("settings.buckets.addS3Bucket")}),t.jsx(ue,{children:s("settings.buckets.credentialsEncryptedDescription")})]}),t.jsxs("form",{onSubmit:J,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-name",children:s("settings.buckets.nameLabel")}),t.jsx(P,{id:"file-config-name",value:r,onChange:h=>l(h.target.value),placeholder:s("settings.buckets.namePlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.nameHelperText")})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-bucket",children:s("settings.buckets.bucketLabel")}),t.jsx(P,{id:"file-config-bucket",value:a,onChange:h=>u(h.target.value),placeholder:s("settings.buckets.bucketPlaceholder"),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-region",children:s("settings.buckets.regionLabel")}),t.jsx(P,{id:"file-config-region",value:o,onChange:h=>g(h.target.value),placeholder:s("settings.buckets.regionPlaceholder"),autoComplete:"off",required:!0})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-endpoint",children:s("settings.buckets.endpointLabel")}),t.jsx(P,{id:"file-config-endpoint",type:"url",value:d,onChange:h=>f(h.target.value),placeholder:s("settings.buckets.endpointPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.endpointHelperText")})]}),t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border/60 p-3",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx(B,{htmlFor:"file-config-path-style",className:"text-sm",children:s("settings.buckets.forcePathStyleLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s("settings.buckets.forcePathStyleHelperText")})]}),t.jsx(he,{id:"file-config-path-style",checked:m,onCheckedChange:b})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-prefix",children:s("settings.buckets.prefixLabel")}),t.jsx(P,{id:"file-config-prefix",value:j,onChange:h=>S(h.target.value),placeholder:s("settings.buckets.prefixPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.prefixHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-public-url-base",children:s("settings.buckets.publicUrlBaseLabel")}),t.jsx(P,{id:"file-config-public-url-base",type:"url",value:v,onChange:h=>k(h.target.value),placeholder:s("settings.buckets.publicUrlBasePlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.publicUrlBaseHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-credential-type",children:s("settings.buckets.credentialsLabel")}),t.jsxs(fe,{value:y,onValueChange:h=>x(h),children:[t.jsx(ge,{id:"file-config-credential-type",className:"w-full",children:t.jsx(xe,{})}),t.jsxs(pe,{children:[t.jsx(q,{value:"static",children:s("settings.buckets.staticKeyOption")}),t.jsx(q,{value:"sts-session",children:s("settings.buckets.temporarySessionOption")})]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s(y==="sts-session"?"settings.buckets.stsSessionHelperText":"settings.buckets.staticKeyHelperText")})]}),y==="static"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-access-key",children:s("settings.buckets.accessKeyIdLabel")}),t.jsx(P,{id:"file-config-access-key",value:p,onChange:h=>N(h.target.value),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-secret-key",children:s("settings.buckets.secretAccessKeyLabel")}),t.jsx(P,{id:"file-config-secret-key",type:"password",value:D,onChange:h=>w(h.target.value),autoComplete:"new-password",required:!0})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-refresh-url",children:s("settings.buckets.refreshUrlLabel")}),t.jsx(P,{id:"file-config-refresh-url",type:"url",value:_,onChange:h=>A(h.target.value),placeholder:s("settings.buckets.refreshUrlPlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.refreshUrlHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-api-key",children:s("settings.buckets.apiKeyLabel")}),t.jsx(P,{id:"file-config-api-key",type:"password",value:$,onChange:h=>z(h.target.value),autoComplete:"new-password",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.apiKeyHelperText")})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-description",children:s("settings.buckets.descriptionLabel")}),t.jsx(je,{id:"file-config-description",value:n,onChange:h=>c(h.target.value),rows:2,placeholder:s("settings.buckets.descriptionPlaceholder")})]}),t.jsxs(me,{children:[t.jsx(L,{type:"button",variant:"outline",onClick:()=>{H(),e(!1)},disabled:U.isPending,children:s("settings.buckets.cancelButton")}),t.jsx(L,{type:"submit",disabled:G,children:U.isPending?s("settings.buckets.addingButton"):s("settings.buckets.addBucketButton")})]})]})]})})}function Te(i){const e=T.c(41),{config:s,onClose:r}=i,l=F(),n=Se();let c;e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==l?(c=async function(){if(s)try{await n.mutateAsync(s.id),K.success(l("settings.buckets.bucketRemoved",{name:s.name})),r()}catch(_){const A=_;K.error(A instanceof Error?A.message:l("settings.buckets.failedToRemoveBucket"))}},e[0]=s,e[1]=n,e[2]=r,e[3]=l,e[4]=c):c=e[4];const a=c,u=s!==null;let o;e[5]!==r?(o=w=>!w&&r(),e[5]=r,e[6]=o):o=e[6];let g;e[7]!==l?(g=l("settings.buckets.removeBucketTitle"),e[7]=l,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ee,{children:g}),e[9]=g,e[10]=d):d=e[10];const f=s?.name??"";let m;e[11]!==l||e[12]!==f?(m=l("settings.buckets.removeBucketDescription",{name:f}),e[11]=l,e[12]=f,e[13]=m):m=e[13];let b;e[14]!==m?(b=t.jsx(te,{children:m}),e[14]=m,e[15]=b):b=e[15];let j;e[16]!==d||e[17]!==b?(j=t.jsxs(se,{children:[d,b]}),e[16]=d,e[17]=b,e[18]=j):j=e[18];const S=n.isPending;let v;e[19]!==l?(v=l("settings.buckets.cancelButton"),e[19]=l,e[20]=v):v=e[20];let k;e[21]!==n.isPending||e[22]!==v?(k=t.jsx(ie,{disabled:S,children:v}),e[21]=n.isPending,e[22]=v,e[23]=k):k=e[23];let y;e[24]!==n.isPending||e[25]!==l?(y=n.isPending?l("settings.buckets.removingButton"):l("settings.buckets.removeButton"),e[24]=n.isPending,e[25]=l,e[26]=y):y=e[26];let x;e[27]!==n.isPending||e[28]!==a||e[29]!==y?(x=t.jsx(Z,{onClick:a,disabled:n.isPending,children:y}),e[27]=n.isPending,e[28]=a,e[29]=y,e[30]=x):x=e[30];let p;e[31]!==k||e[32]!==x?(p=t.jsxs(le,{children:[k,x]}),e[31]=k,e[32]=x,e[33]=p):p=e[33];let N;e[34]!==p||e[35]!==j?(N=t.jsxs(ne,{children:[j,p]}),e[34]=p,e[35]=j,e[36]=N):N=e[36];let D;return e[37]!==N||e[38]!==u||e[39]!==o?(D=t.jsx(re,{open:u,onOpenChange:o,children:N}),e[37]=N,e[38]=u,e[39]=o,e[40]=D):D=e[40],D}function Fe(){const i=T.c(32),e=F(),s=ye(),[r,l]=C.useState(!1),[n,c]=C.useState(null);if(s.length===0){let x;i[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(De,{onCreate:()=>l(!0)}),i[0]=x):x=i[0];let p;return i[1]!==r?(p=t.jsxs(t.Fragment,{children:[x,t.jsx(O,{open:r,onOpenChange:l})]}),i[1]=r,i[2]=p):p=i[2],p}let a;i[3]!==s.length||i[4]!==e?(a=e("settings.buckets.bucketsConfigured",{count:s.length}),i[3]=s.length,i[4]=e,i[5]=a):a=i[5];let u;i[6]!==a?(u=t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),i[6]=a,i[7]=u):u=i[7];let o;i[8]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(!0),i[8]=o):o=i[8];let g;i[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),i[9]=g):g=i[9];let d;i[10]!==e?(d=e("settings.buckets.addBucket"),i[10]=e,i[11]=d):d=i[11];let f;i[12]!==d?(f=t.jsxs(L,{onClick:o,size:"sm",children:[g,d]}),i[12]=d,i[13]=f):f=i[13];let m;i[14]!==u||i[15]!==f?(m=t.jsxs("div",{className:"flex items-center justify-between",children:[u,f]}),i[14]=u,i[15]=f,i[16]=m):m=i[16];let b;if(i[17]!==s){let x;i[19]===Symbol.for("react.memo_cache_sentinel")?(x=p=>t.jsx(Pe,{config:p,onDelete:c},p.id),i[19]=x):x=i[19],b=s.map(x),i[17]=s,i[18]=b}else b=i[18];let j;i[20]!==b?(j=t.jsx("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:t.jsx("div",{children:b})}),i[20]=b,i[21]=j):j=i[21];let S;i[22]!==r?(S=t.jsx(O,{open:r,onOpenChange:l}),i[22]=r,i[23]=S):S=i[23];let v;i[24]===Symbol.for("react.memo_cache_sentinel")?(v=()=>c(null),i[24]=v):v=i[24];let k;i[25]!==n?(k=t.jsx(Te,{config:n,onClose:v}),i[25]=n,i[26]=k):k=i[26];let y;return i[27]!==k||i[28]!==m||i[29]!==j||i[30]!==S?(y=t.jsxs(t.Fragment,{children:[m,j,S,k]}),i[27]=k,i[28]=m,i[29]=j,i[30]=S,i[31]=y):y=i[31],y}function we(){const i=T.c(12),e=F();let s;i[0]!==e?(s=e("settings.buckets.pageTitle"),i[0]=e,i[1]=s):s=i[1];let r;i[2]!==s?(r=t.jsx(E.Title,{children:s}),i[2]=s,i[3]=r):r=i[3];let l;i[4]!==e?(l=u=>{const{error:o}=u;return t.jsx(Be,{error:o??new Error(e("settings.buckets.failedToLoadConfigsFallback"))})},i[4]=e,i[5]=l):l=i[5];let n;i[6]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(C.Suspense,{fallback:t.jsx(be,{className:"h-32 w-full"}),children:t.jsx(Fe,{})}),i[6]=n):n=i[6];let c;i[7]!==l?(c=t.jsx(W,{fallback:l,children:n}),i[7]=l,i[8]=c):c=i[8];let a;return i[9]!==r||i[10]!==c?(a=t.jsx(E,{children:t.jsx(E.Content,{children:t.jsx(E.Body,{children:t.jsxs(ke,{children:[r,c]})})})}),i[9]=r,i[10]=c,i[11]=a):a=i[11],a}function ot(){const i=T.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ce,{capability:"file-configs:manage",area:"files",children:t.jsx(we,{})}),i[0]=e):e=i[0],e}export{ot as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as he,b as je,r as de,j as t,k as ye,B as ne}from"./index-B0fkC9lT.js";import{y as ue}from"./agent-icon-DZlxuF49.js";import{i as ke}from"./X-C9CNUxMc.js";import{L as ce}from"./label-CpR3NhLK.js";import{ak as xe,al as Ne}from"./index-CFru9TWd.js";import{S as Ce,a as Pe,b as Se,c as ve,d as _e}from"./select-BudfwrnS.js";import{T as Te,a as we,c as Be}from"./tooltip-CD1UqZ9B.js";import"./AlertCircle-BM2arXAG.js";import"./Tool01-n_pcUGI4.js";import"./ArrowUp-Boc-905Z.js";import"./Settings02-Dd6wiqD1.js";import"./Tool02-CM2QQuSk.js";import"./XCircle-CgmQaEpw.js";import"./ArrowUpRight-B3CxAPJj.js";import"./TrendUp01-ok3-xVRP.js";import"./ZapSquare-DJ6Cr-Gd.js";import"./Users03-CAfxXxrx.js";import"./CheckCircle-BGu0rmUQ.js";import"./Check-D0s6wH1X.js";import"./ChevronDown-CsqU07CB.js";import"./ChevronRight-DzEO4WOO.js";import"./ChevronUp-CLKFL_od.js";import"./DotsVertical-C4U-eO1-.js";import"./Stars02-6dK01kpk.js";import"./Copy01-Bu4T-_yj.js";import"./CpuChip01-C3l-ayM0.js";import"./CreditCard01-UMOdY0Uv.js";import"./Eye-BtghZBaq.js";import"./FilterLines-BMQz2giZ.js";import"./Star01-COab1bwH.js";import"./Palette-dgaramLA.js";import"./SwitchHorizontal01-ddUhxlHz.js";import"./HardDrive-CrMH19j9.js";import"./Key01-_U8PdKT-.js";import"./LayoutLeft-DhqFICkJ.js";import"./LinkExternal01-D1rq1_uq.js";import"./LogOut01--8dqoEbi.js";import"./Monitor01-Cjz_FTaX.js";import"./Sun-SP_cSydQ.js";import"./Play-CEjkQJmT.js";import"./Plus-C-ooojQ-.js";import"./SearchLg-BsbCGElD.js";import"./SearchMd-DJxFGUte.js";import"./Shield01-C-gfca5T.js";import"./Stars01-CrqdYStA.js";import"./Trash01-4ciIHO0v.js";import"./Upload01-BN6NYqWG.js";import"./User01-ZyVKonG8.js";import"./Users01-Chm4EuVC.js";import"./XClose-Ir2v6njF.js";import"./Zap-DMOaYDez.js";import"./chat-context-lZafrisH.js";import"./tab-id-7eVkCyFd.js";import"./dialog-CM96GyMN.js";import"./hooks-DzdIDE_S.js";import"./use-mcp-client-D8jVoojU.js";import"./auth-BS9hvljB.js";import"./decopilot-sse-pool-DIaaeHkx.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BRfZj2ng.js";import"./use-ai-providers-D16FGHJt.js";import"./studio-tools-BaJrIiyZ.js";import"./use-decopilot-events-DPOdIyZW.js";import"./use-organization-settings-DAWGh7rb.js";import"./automation-runs-DJDyx8Ab.js";import"./useInfiniteQuery-CuXI7a9b.js";import"./use-infinite-scroll-BuArBLl_.js";import"./use-connection-C9xGzeZ0.js";import"./card-f7IIAQow.js";import"./sidebar-D3IIq4Vk.js";import"./use-mobile-C76oZZ_y.js";import"./table-C1MCilFh.js";import"./empty-state-B-rbOsZt.js";import"./use-members-DYQSbhV-.js";import"./use-org-auth-client-CLw_zaJR.js";import"./use-clock-tick-B_PZSxjQ.js";import"./use-automations-D8H19XtT.js";import"./useSuspenseInfiniteQuery-FYAwQiAK.js";import"./avatar-TMC1sUqM.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Biga7DQq.js";import"./monaco-editor-ChN-uCZ5.js";import"./spinner-DFReXmvo.js";import"./index-Uyw3lO4W.js";import"./shell-layout-GtI-8lBm.js";import"./required-auth-layout-DtQVJg-L.js";import"./use-org-sso-DQRelBUr.js";import"./integration-icon-y2a679m_.js";import"./use-navigate-to-agent-B7ku0JC8.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-DAXzCJFT.js";import"./form-DJREymz4.js";import"./input-BLYKaojw.js";import"./drawer-Dn3JbFxM.js";import"./collection-search-BcJG8MRL.js";import"./tabs-DX3EM3Ee.js";import"./toggle-group-F8qf1aho.js";import"./use-deco-credits-DEFWEFHy.js";import"./popover-BbhyOPS3.js";import"./alert-dialog-xIkA8j5x.js";import"./toolbar-Cf542s4U.js";import"./skeleton-GgH9QFOh.js";import"./github-repo-picker-DnRkLuCY.js";import"./use-debounced-value-B6d-EEaH.js";import"./authenticate-and-persist-oauth-BpEFvvfk.js";import"./mcp-oauth-Cbz6v_pp.js";import"./use-mcp-tools-CxNi4RsV.js";import"./extract-connection-data-D78MPGm0.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-ufuvpGD9.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-BVHwhA2v.js";import"./use-registry-connections-4HrWpBE2.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-mkvWFVEl.js";import"./connection-form-helpers-4kXFEJvh.js";import"./collection-tabs-DdOwtj6b.js";import"./badge-Cw8NAtiW.js";import"./use-open-billing-url-DquSLGrh.js";import"./select-model-C7aX0FnY.js";import"./checkbox-DRvNUH73.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BE7oCApW.js";import"./dropdown-menu-CuE5oWLS.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Dxu-GZwE.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-CE9es946.js";import"./pt-BR-CLy76QW2.js";import"./switch-tQg0oUQP.js";import"./use-debounced-autosave-oSeifFUO.js";import"./index-Dytal4UA.js";import"./search-input-CZdp52yV.js";import"./index-ClVafn5Q.js";import"./use-secrets-CV1UNts7.js";import"./self-tool-result-Cj3FZK_q.js";import"./use-tags-CF2jWoFP.js";import"./get-initials-D-f_fDFw.js";import"./command-DGcauViI.js";import"./index-D3hIc5HE.js";import"./use-file-configs-lWDULD1a.js";import"./automation-list-row-BeYIheNk.js";function hi(i){const e=he.c(121),{posts:X,categories:r,initialSlug:le,isPending:s,onApply:re,onClose:p}=i,o=je(),[m,fe]=de.useState(le&&r.some(a=>a.slug===le)?le:r[0]?.slug??""),[n,ge]=de.useState("add");let Y;if(e[0]!==r||e[1]!==m){let a;e[3]!==m?(a=be=>be.slug===m,e[3]=m,e[4]=a):a=e[4],Y=r.find(a),e[0]=r,e[1]=m,e[2]=Y}else Y=e[2];const c=Y,l=X.length,me=String(l);let d;e[5]!==o||e[6]!==me?(d=o("sandbox.bulkCategoryPanel.selectedCount",{count:me}),e[5]=o,e[6]=me,e[7]=d):d=e[7];let x;e[8]!==d?(x=t.jsx("span",{className:"truncate text-sm font-medium",children:d}),e[8]=d,e[9]=x):x=e[9];let u;e[10]!==o?(u=o("sandbox.bulkCategoryPanel.exitSelection"),e[10]=o,e[11]=u):u=e[11];let Z;e[12]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(ke,{size:14}),e[12]=Z):Z=e[12];let f;e[13]!==s||e[14]!==p||e[15]!==u?(f=t.jsx(Te,{asChild:!0,children:t.jsx(ne,{type:"button",variant:"ghost",size:"icon",disabled:s,onClick:p,"aria-label":u,children:Z})}),e[13]=s,e[14]=p,e[15]=u,e[16]=f):f=e[16];let g;e[17]!==o?(g=o("sandbox.bulkCategoryPanel.exitSelection"),e[17]=o,e[18]=g):g=e[18];let b;e[19]!==g?(b=t.jsx(we,{side:"bottom",children:g}),e[19]=g,e[20]=b):b=e[20];let h;e[21]!==f||e[22]!==b?(h=t.jsxs(Be,{children:[f,b]}),e[21]=f,e[22]=b,e[23]=h):h=e[23];let j;e[24]!==h||e[25]!==x?(j=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[x,h]}),e[24]=h,e[25]=x,e[26]=j):j=e[26];let y;e[27]!==o?(y=o("sandbox.bulkCategoryPanel.title"),e[27]=o,e[28]=y):y=e[28];let k;e[29]!==y?(k=t.jsx("h2",{className:"text-2xl font-bold text-foreground",children:y}),e[29]=y,e[30]=k):k=e[30];let N;e[31]!==l||e[32]!==o?(N=l===0?o("sandbox.bulkCategoryPanel.descriptionEmpty"):o("sandbox.bulkCategoryPanel.descriptionWithCount",{count:String(l)}),e[31]=l,e[32]=o,e[33]=N):N=e[33];let C;e[34]!==N?(C=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:N}),e[34]=N,e[35]=C):C=e[35];let P;e[36]!==o?(P=o("sandbox.bulkCategoryPanel.categoryLabel"),e[36]=o,e[37]=P):P=e[37];let S;e[38]!==P?(S=t.jsx(ce,{children:P}),e[38]=P,e[39]=S):S=e[39];let v;e[40]!==r||e[41]!==m||e[42]!==o?(v=r.length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noCategoriesMessage")}):t.jsxs(Ce,{value:m,onValueChange:fe,children:[t.jsx(Pe,{className:"w-full",children:t.jsx(Se,{placeholder:o("sandbox.bulkCategoryPanel.selectCategoryPlaceholder")})}),t.jsx(ve,{children:r.map(ze)})]}),e[40]=r,e[41]=m,e[42]=o,e[43]=v):v=e[43];let _;e[44]!==S||e[45]!==v?(_=t.jsxs("div",{className:"space-y-2",children:[S,v]}),e[44]=S,e[45]=v,e[46]=_):_=e[46];let ee;e[47]===Symbol.for("react.memo_cache_sentinel")?(ee=a=>ge(a),e[47]=ee):ee=e[47];let te;e[48]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(xe,{value:"add",id:"cat-mode-add",className:"mt-0.5"}),e[48]=te):te=e[48];let T;e[49]!==o?(T=o("sandbox.bulkCategoryPanel.modeAddTitle"),e[49]=o,e[50]=T):T=e[50];let w;e[51]!==T?(w=t.jsx("span",{className:"block text-sm font-medium",children:T}),e[51]=T,e[52]=w):w=e[52];let B;e[53]!==o?(B=o("sandbox.bulkCategoryPanel.modeAddDescription"),e[53]=o,e[54]=B):B=e[54];let R;e[55]!==B?(R=t.jsx("span",{className:"block text-xs text-muted-foreground",children:B}),e[55]=B,e[56]=R):R=e[56];let z;e[57]!==w||e[58]!==R?(z=t.jsxs(ce,{htmlFor:"cat-mode-add",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[te,t.jsxs("span",{className:"space-y-0.5",children:[w,R]})]}),e[57]=w,e[58]=R,e[59]=z):z=e[59];let oe;e[60]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx(xe,{value:"replace",id:"cat-mode-replace",className:"mt-0.5"}),e[60]=oe):oe=e[60];let E;e[61]!==o?(E=o("sandbox.bulkCategoryPanel.modeReplaceTitle"),e[61]=o,e[62]=E):E=e[62];let L;e[63]!==E?(L=t.jsx("span",{className:"block text-sm font-medium",children:E}),e[63]=E,e[64]=L):L=e[64];let A;e[65]!==o?(A=o("sandbox.bulkCategoryPanel.modeReplaceDescription"),e[65]=o,e[66]=A):A=e[66];let F;e[67]!==A?(F=t.jsx("span",{className:"block text-xs text-muted-foreground",children:A}),e[67]=A,e[68]=F):F=e[68];let M;e[69]!==L||e[70]!==F?(M=t.jsxs(ce,{htmlFor:"cat-mode-replace",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[oe,t.jsxs("span",{className:"space-y-0.5",children:[L,F]})]}),e[69]=L,e[70]=F,e[71]=M):M=e[71];let V;e[72]!==n||e[73]!==z||e[74]!==M?(V=t.jsxs(Ne,{value:n,onValueChange:ee,className:"gap-2",children:[z,M]}),e[72]=n,e[73]=z,e[74]=M,e[75]=V):V=e[75];let $;e[76]!==o?($=o("sandbox.bulkCategoryPanel.cancelButton"),e[76]=o,e[77]=$):$=e[77];let D;e[78]!==s||e[79]!==p||e[80]!==$?(D=t.jsx(ne,{type:"button",variant:"outline",onClick:p,disabled:s,children:$}),e[78]=s,e[79]=p,e[80]=$,e[81]=D):D=e[81];const ae=!c||s||l===0;let G;e[82]!==n||e[83]!==re||e[84]!==c?(G=()=>c&&re(n,{name:c.name,slug:c.slug}),e[82]=n,e[83]=re,e[84]=c,e[85]=G):G=e[85];let I;e[86]!==s||e[87]!==o?(I=s?t.jsxs(t.Fragment,{children:[t.jsx(ye,{size:14,className:"animate-spin"}),o("sandbox.bulkCategoryPanel.updatingButton")]}):o("sandbox.bulkCategoryPanel.applyButton"),e[86]=s,e[87]=o,e[88]=I):I=e[88];let W;e[89]!==ae||e[90]!==G||e[91]!==I?(W=t.jsx(ne,{type:"button",disabled:ae,onClick:G,children:I}),e[89]=ae,e[90]=G,e[91]=I,e[92]=W):W=e[92];let q;e[93]!==D||e[94]!==W?(q=t.jsxs("div",{className:"flex justify-end gap-2",children:[D,W]}),e[93]=D,e[94]=W,e[95]=q):q=e[95];let H;e[96]!==_||e[97]!==V||e[98]!==q?(H=t.jsxs("div",{className:"mt-6 space-y-4",children:[_,V,q]}),e[96]=_,e[97]=V,e[98]=q,e[99]=H):H=e[99];let ie;e[100]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ue,{size:16,className:"shrink-0 text-muted-foreground"}),e[100]=ie):ie=e[100];const pe=String(l);let J;e[101]!==o||e[102]!==pe?(J=o("sandbox.bulkCategoryPanel.selectedPostsLabel",{count:pe}),e[101]=o,e[102]=pe,e[103]=J):J=e[103];let K;e[104]!==J?(K=t.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[ie,t.jsx("span",{className:"text-sm",children:J})]}),e[104]=J,e[105]=K):K=e[105];let O;e[106]!==l||e[107]!==X||e[108]!==o?(O=l===0?t.jsx("p",{className:"border-t bg-background px-4 py-3 text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noPostsSelectedMessage")}):t.jsx("ul",{className:"divide-y border-t bg-background",children:X.map(Re)}),e[106]=l,e[107]=X,e[108]=o,e[109]=O):O=e[109];let Q;e[110]!==K||e[111]!==O?(Q=t.jsxs("div",{className:"mt-8 overflow-hidden rounded-lg border bg-muted/30",children:[K,O]}),e[110]=K,e[111]=O,e[112]=Q):Q=e[112];let U;e[113]!==k||e[114]!==C||e[115]!==H||e[116]!==Q?(U=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-2xl px-8 py-8",children:[k,C,H,Q]})}),e[113]=k,e[114]=C,e[115]=H,e[116]=Q,e[117]=U):U=e[117];let se;return e[118]!==j||e[119]!==U?(se=t.jsxs("div",{className:"flex h-full flex-col",children:[j,U]}),e[118]=j,e[119]=U,e[120]=se):se=e[120],se}function Re(i){return t.jsxs("li",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[t.jsx(ue,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:i.title}),i.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:i.slug})]})]},i.key)}function ze(i){return t.jsx(_e,{value:i.slug,children:t.jsx("span",{className:"truncate",children:i.name})},i.slug)}export{hi as BulkCategoryPanel};
|
package/dist/client/assets/{capability-load-error-CrHwHuDV.js → capability-load-error-DlPlQyTu.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,b as y,o as h,F as j,j as s,z as b,K as C,B as E}from"./index-
|
|
1
|
+
import{c as p,b as y,o as h,F as j,j as s,z as b,K as C,B as E}from"./index-B0fkC9lT.js";function v(){const e=p.c(23),t=y(),d=h(),{locator:x}=j();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:s.jsx(b,{size:28})}),e[0]=u):u=e[0];let i;e[1]!==t?(i=t("common.capabilityLoadError.title"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==i?(l=s.jsx("h3",{className:"text-lg font-medium",children:i}),e[3]=i,e[4]=l):l=e[4];let r;e[5]!==t?(r=t("common.capabilityLoadError.description"),e[5]=t,e[6]=r):r=e[6];let a;e[7]!==r?(a=s.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=a):a=e[8];let o;e[9]!==l||e[10]!==a?(o=s.jsxs("div",{className:"space-y-1",children:[l,a]}),e[9]=l,e[10]=a,e[11]=o):o=e[11];let n;e[12]!==x||e[13]!==d?(n=()=>d.invalidateQueries({queryKey:C.myCapabilities(x)}),e[12]=x,e[13]=d,e[14]=n):n=e[14];let c;e[15]!==t?(c=t("common.capabilityLoadError.tryAgain"),e[15]=t,e[16]=c):c=e[16];let m;e[17]!==n||e[18]!==c?(m=s.jsx(E,{variant:"outline",size:"sm",onClick:n,children:c}),e[17]=n,e[18]=c,e[19]=m):m=e[19];let f;return e[20]!==o||e[21]!==m?(f=s.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[u,o,m]}),e[20]=o,e[21]=m,e[22]=f):f=e[22],f}export{v as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,m as n,j as c}from"./index-
|
|
1
|
+
import{c as l,m as n,j as c}from"./index-B0fkC9lT.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as J,r as k,m as V,j as t,b as X,B as I,k as Y,t as $}from"./index-B0fkC9lT.js";import{i as Z}from"./XCircle-CgmQaEpw.js";import{b1 as _,y as U}from"./agent-icon-DZlxuF49.js";import{n as K}from"./LinkExternal01-D1rq1_uq.js";import{g as tt,f as ot,b as et,A as rt,a as it,e as st,c as at,d as nt}from"./alert-dialog-xIkA8j5x.js";import{I as W}from"./input-BLYKaojw.js";import{L as H}from"./label-CpR3NhLK.js";import{P as mt,O as lt,Q as pt,ai as ct,I as dt,T as B,W as gt,aj as ut,U as xt}from"./index-CFru9TWd.js";import{c as ft,B as ht,a as yt}from"./block-document-BAeei5ic.js";import{u as bt}from"./use-autosave-DL6SLVUG.js";import{t as jt}from"./ChevronDown-CsqU07CB.js";import{ag as vt,ah as Et,af as Nt}from"./automation-runs-DJDyx8Ab.js";import{s as b,E as Ct}from"./primitives-Bt3tuGeo.js";import"./AlertCircle-BM2arXAG.js";import"./Tool01-n_pcUGI4.js";import"./ArrowUp-Boc-905Z.js";import"./Settings02-Dd6wiqD1.js";import"./Tool02-CM2QQuSk.js";import"./ArrowUpRight-B3CxAPJj.js";import"./TrendUp01-ok3-xVRP.js";import"./ZapSquare-DJ6Cr-Gd.js";import"./Users03-CAfxXxrx.js";import"./CheckCircle-BGu0rmUQ.js";import"./Check-D0s6wH1X.js";import"./ChevronRight-DzEO4WOO.js";import"./ChevronUp-CLKFL_od.js";import"./DotsVertical-C4U-eO1-.js";import"./Stars02-6dK01kpk.js";import"./Copy01-Bu4T-_yj.js";import"./CpuChip01-C3l-ayM0.js";import"./CreditCard01-UMOdY0Uv.js";import"./Eye-BtghZBaq.js";import"./FilterLines-BMQz2giZ.js";import"./Star01-COab1bwH.js";import"./Palette-dgaramLA.js";import"./SwitchHorizontal01-ddUhxlHz.js";import"./HardDrive-CrMH19j9.js";import"./Key01-_U8PdKT-.js";import"./LayoutLeft-DhqFICkJ.js";import"./LogOut01--8dqoEbi.js";import"./Monitor01-Cjz_FTaX.js";import"./Sun-SP_cSydQ.js";import"./Play-CEjkQJmT.js";import"./Plus-C-ooojQ-.js";import"./SearchLg-BsbCGElD.js";import"./SearchMd-DJxFGUte.js";import"./Shield01-C-gfca5T.js";import"./Stars01-CrqdYStA.js";import"./Trash01-4ciIHO0v.js";import"./Upload01-BN6NYqWG.js";import"./User01-ZyVKonG8.js";import"./Users01-Chm4EuVC.js";import"./XClose-Ir2v6njF.js";import"./X-C9CNUxMc.js";import"./Zap-DMOaYDez.js";import"./chat-context-lZafrisH.js";import"./tab-id-7eVkCyFd.js";import"./dialog-CM96GyMN.js";import"./hooks-DzdIDE_S.js";import"./use-mcp-client-D8jVoojU.js";import"./auth-BS9hvljB.js";import"./decopilot-sse-pool-DIaaeHkx.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BRfZj2ng.js";import"./use-ai-providers-D16FGHJt.js";import"./studio-tools-BaJrIiyZ.js";import"./use-decopilot-events-DPOdIyZW.js";import"./use-organization-settings-DAWGh7rb.js";import"./spinner-DFReXmvo.js";import"./tooltip-CD1UqZ9B.js";import"./drawer-Dn3JbFxM.js";import"./collection-search-BcJG8MRL.js";import"./use-mobile-C76oZZ_y.js";import"./AreaChart-DAXzCJFT.js";import"./index-Uyw3lO4W.js";import"./shell-layout-GtI-8lBm.js";import"./avatar-TMC1sUqM.js";import"./required-auth-layout-DtQVJg-L.js";import"./use-org-sso-DQRelBUr.js";import"./form-DJREymz4.js";import"./select-BudfwrnS.js";import"./tabs-DX3EM3Ee.js";import"./toggle-group-F8qf1aho.js";import"./use-deco-credits-DEFWEFHy.js";import"./sidebar-D3IIq4Vk.js";import"./popover-BbhyOPS3.js";import"./toolbar-Cf542s4U.js";import"./skeleton-GgH9QFOh.js";import"./github-repo-picker-DnRkLuCY.js";import"./use-debounced-value-B6d-EEaH.js";import"./use-connection-C9xGzeZ0.js";import"./authenticate-and-persist-oauth-BpEFvvfk.js";import"./mcp-oauth-Cbz6v_pp.js";import"./use-mcp-tools-CxNi4RsV.js";import"./extract-connection-data-D78MPGm0.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-B7ku0JC8.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-ufuvpGD9.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-BVHwhA2v.js";import"./use-registry-connections-4HrWpBE2.js";import"./useInfiniteQuery-CuXI7a9b.js";import"./use-infinite-scroll-BuArBLl_.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-f7IIAQow.js";import"./integration-icon-y2a679m_.js";import"./textarea-mkvWFVEl.js";import"./connection-form-helpers-4kXFEJvh.js";import"./collection-tabs-DdOwtj6b.js";import"./badge-Cw8NAtiW.js";import"./useSuspenseInfiniteQuery-FYAwQiAK.js";import"./use-open-billing-url-DquSLGrh.js";import"./select-model-C7aX0FnY.js";import"./checkbox-DRvNUH73.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BE7oCApW.js";import"./dropdown-menu-CuE5oWLS.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Dxu-GZwE.js";import"./empty-state-B-rbOsZt.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-CE9es946.js";import"./monaco-editor-ChN-uCZ5.js";import"./pt-BR-CLy76QW2.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./switch-tQg0oUQP.js";import"./use-debounced-autosave-oSeifFUO.js";import"./index-Dytal4UA.js";import"./search-input-CZdp52yV.js";import"./index-ClVafn5Q.js";import"./use-secrets-CV1UNts7.js";import"./self-tool-result-Cj3FZK_q.js";import"./format-time-BnbuEtat.js";import"./use-members-DYQSbhV-.js";import"./use-org-auth-client-CLw_zaJR.js";import"./use-copy-Biga7DQq.js";import"./use-tags-CF2jWoFP.js";import"./get-initials-D-f_fDFw.js";import"./command-DGcauViI.js";import"./index-D3hIc5HE.js";import"./use-file-configs-lWDULD1a.js";import"./use-automations-D8H19XtT.js";import"./automation-list-row-BeYIheNk.js";import"./table-C1MCilFh.js";import"./use-clock-tick-B_PZSxjQ.js";function St(j){const o=J.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,w=v===void 0?!1:v,[f,P]=k.useState(w);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Nt,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function ur({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:w,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=k.useState(s),[g,E]=k.useState(null),[N,T]=k.useState(!1),z=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],C=z.length,M=e=>n("slug",e),Q=async(e,S)=>{const G=b(i.name);T(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:G,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:B(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),$.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),$.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{T(!1)}},q=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(C===0){M(e);return}E({oldSlug:s,newSlug:e,count:C})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(K,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(Ct,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(H,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:q,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(H,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:_,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:w,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(C)})})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),C>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||N||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:N,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&Q(g.oldSlug,g.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{ur as CategoryEditor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Z as S,_ as C,a4 as J,$ as i,a0 as ue,a3 as Ie,aG as Ce,cw as wt,bj as qe,b8 as ct,c as ie,J as dt,u as Be,o as He,F as ee,K as de,t as ce,I as be,G as ge,d as ut,f as It,r as v,n as Mt,e as Tt,j as Me,b as De,a as Ct,v as At,a8 as Pt,p as _t}from"./index-BE7mJhFy.js";import{d as Rt,s as Et,A as pt,t as Dt,u as $t,o as Ut,w as Ot}from"./tab-id-xREOP0to.js";import{S as Lt,s as Nt,u as Ft,f as qt,i as jt,b as Vt}from"./hooks-_oUacd7x.js";import{u as Bt}from"./use-is-desktop-app-BNujXJc_.js";import{a as Ht,u as Kt,S as Qt}from"./use-mcp-client-B6rroWiF.js";import{u as Wt}from"./use-virtual-mcp-SgXDkg75.js";import{u as ht,p as Gt,b as xe,i as zt,c as Xt}from"./use-ai-providers-Db5LNUJN.js";import{u as Zt}from"./use-decopilot-events-CZNjfghP.js";import{u as Yt,c as Jt}from"./studio-tools-DXVCK0sW.js";import{b as en}from"./use-organization-settings-B1oXAg8v.js";const we=S({connection_id:i().describe("Connection ID"),selected_tools:C(i()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:C(i()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:C(i()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),mt=we.extend({selected_tools:we.shape.selected_tools.optional(),selected_resources:we.shape.selected_resources.optional(),selected_prompts:we.shape.selected_prompts.optional()}),tn=S({connectionId:i(),toolName:i(),label:i(),icon:i().nullable().optional()}),nn=S({id:i().describe("Stable id; used as React key and ?tab= value"),title:i().describe("Tab label"),icon:i().optional().describe("Optional lucide icon name"),view:S({type:qe("ext-app"),appId:i(),args:Ie(i(),ct()).optional()})}),sn=S({defaultMainView:S({type:i(),id:i().optional(),toolName:i().optional()}).nullable().optional(),chatDefaultOpen:J().nullable().optional(),cmsDefaultOpen:J().nullable().optional(),tabs:C(nn).optional()}),st=S({tileId:i().optional(),connectionId:i().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:i().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:i().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:Ie(i(),ct()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:Ce().int().positive().optional(),maxHeight:Ce().int().positive().optional()}),Ke=S({banner:i().nullable().optional(),bannerColor:i().nullable().optional(),icon:i().nullable().optional(),themeColor:i().nullable().optional(),pinnedViews:C(tn).nullable().optional(),layout:sn.nullable().optional(),homeTile:st.nullable().optional(),homeTiles:C(st).nullable().optional(),homePrompts:C(i()).nullable().optional()});function ms(t){const e=t?.homeTiles;if(Array.isArray(e)&&e.length>0)return e;const n=t?.homeTile;return n?[n]:[]}const on=/^[A-Za-z_][A-Za-z0-9_]*$/,ot=i().min(1).regex(on,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),an=wt("kind",[S({key:ot,kind:qe("literal"),value:i()}),S({key:ot,kind:qe("secret"),secretId:i().min(1)})]),rn=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,ln=S({host:i().min(1).regex(rn).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:i().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),Qe=S({selected:i().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:i().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:i().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:C(an).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:C(ln).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),We=S({url:i().describe("GitHub repository URL"),owner:i().describe("Repository owner"),name:i().describe("Repository name"),installationId:Ce().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:i().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),cn=ue(["agent-sandbox","user-desktop"]),dn=ue(["agent-sandbox","user-desktop","cluster"]);function Ge(t){return t==="cluster"?"agent-sandbox":t}const ft={sandboxHandle:i().describe("Provider-specific handle"),previewUrl:i().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:i().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:cn.optional(),createdAt:Ce().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:S({packageManager:i().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:i().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:i().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},bt=S(ft),un=S({...ft,sandboxProviderKind:dn.optional()});function pn(t){const e=un.parse(t);return bt.parse({...e,sandboxProviderKind:e.sandboxProviderKind?Ge(e.sandboxProviderKind):void 0})}function fs(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const e=t,n={};for(const[s,o]of Object.entries(e)){if(!o||typeof o!="object"||s!=="cluster"&&s!=="agent-sandbox"&&s!=="user-desktop")continue;const a=Ge(s);try{if(s==="cluster"&&n[a])continue;n[a]=pn(o)}catch{}}return n}const ze=Ie(i().describe("userId"),Ie(i().describe("branch"),Ie(i().describe("sandboxProviderKind"),bt))),hn=S({id:i().describe("Stable identifier for this knowledge file"),name:i().describe("File name shown in the UI"),kind:ue(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:i().describe("Org filesystem (Library) volume the file lives in"),path:i().describe("Path within the volume"),url:i().describe("Same-origin URL to read the file (display/download)"),contentType:i().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:Ce().nullable().optional().describe("File size in bytes"),addedAt:i().describe("ISO timestamp when the file was attached")}),Xe=C(hn).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),mn=ue(["smart","code-review","open"]),Ze=mn.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),Ye=J().nullable().optional().describe("Enable Fast Preview: render the draft instantly on productionUrl's own page via a ?__draft pointer while the sandbox boots. Requires productionUrl to be set to take effect."),bs=S({id:i().describe("Unique identifier"),title:i().describe("Human-readable name"),description:i().nullable().describe("Description"),icon:i().nullable().describe("Icon URL"),created_at:i().describe("Creation timestamp"),updated_at:i().describe("Last update timestamp"),created_by:i().describe("User ID who created this item"),updated_by:i().optional().describe("User ID who last updated this item"),organization_id:i().describe("Organization ID this item belongs to"),status:ue(["active","inactive"]).describe("Current status"),pinned:J().describe("Whether this space is pinned to the sidebar"),metadata:S({instructions:i().nullable().describe("Instructions also used as system prompt"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:ze.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking."),fieldDescriptionTooltips:J().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().describe("Metadata"),connections:C(we).describe("Connections with their selected tools, resources, and prompts")}),gt=S({title:i().min(1).max(120).describe("Short label shown on the chip"),description:i().max(280).optional().describe("One-line subtitle shown under the title"),text:i().min(1).describe("The message sent to the agent when the prompt is clicked")});S({title:i().min(1).max(255).describe("Name for the virtual MCP"),description:i().nullable().optional().describe("Optional description"),icon:i().nullish().describe("Optional icon URL"),status:ue(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:J().optional().default(!1).describe("Pin to sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:ze.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking."),fieldDescriptionTooltips:J().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(mt).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:C(gt).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});S({title:i().min(1).max(255).optional().describe("New name"),description:i().nullable().optional().describe("New description (null to clear)"),icon:i().nullish().describe("New icon URL"),status:ue(["active","inactive"]).optional().describe("New status"),pinned:J().optional().describe("Pin/unpin from sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:ze.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking."),fieldDescriptionTooltips:J().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(mt).optional().describe("New connections (replaces existing)"),prompts:C(gt).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});function fn(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const je={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"},"opencode-desktop":{harness:"opencode",sandbox:"user-desktop"}};function bn(t,e){if(!t)return null;const n=e?Ge(e):null;if(t==="decopilot"&&(n===null||n==="user-desktop"))return"decopilot";for(const[s,o]of Object.entries(je))if(o.harness===t&&o.sandbox===n)return s;return null}function gn({pendingOption:t,lockedHarness:e}){return e==="claude-code"?"claude-code-desktop":e==="codex"?"codex-desktop":e==="opencode"?"opencode-desktop":t==="claude-code-desktop"||t==="codex-desktop"||t==="opencode-desktop"?t:null}function yn(t){return t.thread?.harness_id!=null?{}:{harnessId:"decopilot",sandboxProviderKind:"agent-sandbox",branch:t.globals.branch??null}}const vn="home",Sn=new Set(["output","upload","public","home"]),kn=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function gs(t){return Sn.has(t)||!kn.test(t)?"home":t}function xn(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",s=n?e[1]??null:null,o=n?s?`public-${s}`:null:e[0]??null,a=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:o,dirPath:a,isPublic:n,publicSet:s,readOnly:n,isHomeRoot:o===vn&&a===""}}function ys(t){return t==="public"?"skills":t}function vs(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const at="public-";function yt(t){return t.startsWith(at)?t.slice(at.length):null}function Ss(t,e){const n=yt(t);return n?`public/${n}/${e}`:`${t}/${e}`}function wn(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function In(t){const{volume:e,dirPath:n}=xn(t);if(!e)return null;let s;if(e==="home")s="org/home";else if(e==="outputs")s="org/.outputs";else if(e==="uploads")s="org/.uploads";else{const o=yt(e);s=o?`org/public/${o}`:`org/${e}`}return n?`${s}/${n}`:s}function Mn(t){const e=ie.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=dt(n);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const a=Be(o);let l;e[2]!==a.brand||e[3]!==a.main||e[4]!==a.preview||e[5]!==a.skill?(l=(typeof a.main=="string"?Rt(a.main)?.path:void 0)??a.preview??a.skill??a.brand??null,e[2]=a.brand,e[3]=a.main,e[4]=a.preview,e[5]=a.skill,e[6]=l):l=e[6];const c=l;let h;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==c||e[11]!==t){if(h=[],t&&h.push(`### Selected Agent
|
|
1
|
+
import{Z as S,_ as C,a4 as J,$ as i,a0 as ue,a3 as Ie,aP as Ce,cw as wt,bj as qe,b8 as ct,c as ie,J as dt,u as Be,o as He,F as ee,K as de,t as ce,I as be,G as ge,d as ut,f as It,r as v,n as Mt,e as Tt,j as Me,b as De,a as Ct,v as At,a8 as Pt,p as _t}from"./index-B0fkC9lT.js";import{d as Rt,s as Et,A as pt,t as Dt,u as $t,o as Ut,w as Ot}from"./tab-id-7eVkCyFd.js";import{S as Lt,s as Nt,u as Ft,f as qt,i as jt,b as Vt}from"./hooks-DzdIDE_S.js";import{u as Bt}from"./use-is-desktop-app-BNujXJc_.js";import{a as Ht,u as Kt,S as Qt}from"./use-mcp-client-D8jVoojU.js";import{u as Wt}from"./use-virtual-mcp-BRfZj2ng.js";import{u as ht,p as zt,b as xe,i as Gt,c as Xt}from"./use-ai-providers-D16FGHJt.js";import{u as Zt}from"./use-decopilot-events-DPOdIyZW.js";import{u as Yt,c as Jt}from"./studio-tools-BaJrIiyZ.js";import{b as en}from"./use-organization-settings-DAWGh7rb.js";const we=S({connection_id:i().describe("Connection ID"),selected_tools:C(i()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:C(i()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:C(i()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),mt=we.extend({selected_tools:we.shape.selected_tools.optional(),selected_resources:we.shape.selected_resources.optional(),selected_prompts:we.shape.selected_prompts.optional()}),tn=S({connectionId:i(),toolName:i(),label:i(),icon:i().nullable().optional()}),nn=S({id:i().describe("Stable id; used as React key and ?tab= value"),title:i().describe("Tab label"),icon:i().optional().describe("Optional lucide icon name"),view:S({type:qe("ext-app"),appId:i(),args:Ie(i(),ct()).optional()})}),sn=S({defaultMainView:S({type:i(),id:i().optional(),toolName:i().optional()}).nullable().optional(),chatDefaultOpen:J().nullable().optional(),cmsDefaultOpen:J().nullable().optional(),tabs:C(nn).optional()}),st=S({tileId:i().optional(),connectionId:i().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:i().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:i().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:Ie(i(),ct()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:Ce().int().positive().optional(),maxHeight:Ce().int().positive().optional()}),Ke=S({banner:i().nullable().optional(),bannerColor:i().nullable().optional(),icon:i().nullable().optional(),themeColor:i().nullable().optional(),pinnedViews:C(tn).nullable().optional(),layout:sn.nullable().optional(),homeTile:st.nullable().optional(),homeTiles:C(st).nullable().optional(),homePrompts:C(i()).nullable().optional()});function ms(t){const e=t?.homeTiles;if(Array.isArray(e)&&e.length>0)return e;const n=t?.homeTile;return n?[n]:[]}const on=/^[A-Za-z_][A-Za-z0-9_]*$/,ot=i().min(1).regex(on,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),an=wt("kind",[S({key:ot,kind:qe("literal"),value:i()}),S({key:ot,kind:qe("secret"),secretId:i().min(1)})]),rn=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,ln=S({host:i().min(1).regex(rn).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:i().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),Qe=S({selected:i().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:i().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:i().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:C(an).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:C(ln).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),We=S({url:i().describe("GitHub repository URL"),owner:i().describe("Repository owner"),name:i().describe("Repository name"),installationId:Ce().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:i().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),cn=ue(["agent-sandbox","user-desktop"]),dn=ue(["agent-sandbox","user-desktop","cluster"]);function ze(t){return t==="cluster"?"agent-sandbox":t}const ft={sandboxHandle:i().describe("Provider-specific handle"),previewUrl:i().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:i().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:cn.optional(),createdAt:Ce().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:S({packageManager:i().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:i().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:i().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},bt=S(ft),un=S({...ft,sandboxProviderKind:dn.optional()});function pn(t){const e=un.parse(t);return bt.parse({...e,sandboxProviderKind:e.sandboxProviderKind?ze(e.sandboxProviderKind):void 0})}function fs(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const e=t,n={};for(const[s,o]of Object.entries(e)){if(!o||typeof o!="object"||s!=="cluster"&&s!=="agent-sandbox"&&s!=="user-desktop")continue;const a=ze(s);try{if(s==="cluster"&&n[a])continue;n[a]=pn(o)}catch{}}return n}const Ge=Ie(i().describe("userId"),Ie(i().describe("branch"),Ie(i().describe("sandboxProviderKind"),bt))),hn=S({id:i().describe("Stable identifier for this knowledge file"),name:i().describe("File name shown in the UI"),kind:ue(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:i().describe("Org filesystem (Library) volume the file lives in"),path:i().describe("Path within the volume"),url:i().describe("Same-origin URL to read the file (display/download)"),contentType:i().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:Ce().nullable().optional().describe("File size in bytes"),addedAt:i().describe("ISO timestamp when the file was attached")}),Xe=C(hn).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),mn=ue(["smart","code-review","open"]),Ze=mn.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),Ye=J().nullable().optional().describe("Enable Fast Preview: render the draft instantly on productionUrl's own page via a ?__draft pointer while the sandbox boots. Requires productionUrl to be set to take effect."),bs=S({id:i().describe("Unique identifier"),title:i().describe("Human-readable name"),description:i().nullable().describe("Description"),icon:i().nullable().describe("Icon URL"),created_at:i().describe("Creation timestamp"),updated_at:i().describe("Last update timestamp"),created_by:i().describe("User ID who created this item"),updated_by:i().optional().describe("User ID who last updated this item"),organization_id:i().describe("Organization ID this item belongs to"),status:ue(["active","inactive"]).describe("Current status"),pinned:J().describe("Whether this space is pinned to the sidebar"),metadata:S({instructions:i().nullable().describe("Instructions also used as system prompt"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:Ge.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking."),fieldDescriptionTooltips:J().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().describe("Metadata"),connections:C(we).describe("Connections with their selected tools, resources, and prompts")}),gt=S({title:i().min(1).max(120).describe("Short label shown on the chip"),description:i().max(280).optional().describe("One-line subtitle shown under the title"),text:i().min(1).describe("The message sent to the agent when the prompt is clicked")});S({title:i().min(1).max(255).describe("Name for the virtual MCP"),description:i().nullable().optional().describe("Optional description"),icon:i().nullish().describe("Optional icon URL"),status:ue(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:J().optional().default(!1).describe("Pin to sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:Ge.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking."),fieldDescriptionTooltips:J().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(mt).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:C(gt).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});S({title:i().min(1).max(255).optional().describe("New name"),description:i().nullable().optional().describe("New description (null to clear)"),icon:i().nullish().describe("New icon URL"),status:ue(["active","inactive"]).optional().describe("New status"),pinned:J().optional().describe("Pin/unpin from sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:Ge.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking."),fieldDescriptionTooltips:J().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(mt).optional().describe("New connections (replaces existing)"),prompts:C(gt).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});function fn(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const je={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"},"opencode-desktop":{harness:"opencode",sandbox:"user-desktop"}};function bn(t,e){if(!t)return null;const n=e?ze(e):null;if(t==="decopilot"&&(n===null||n==="user-desktop"))return"decopilot";for(const[s,o]of Object.entries(je))if(o.harness===t&&o.sandbox===n)return s;return null}function gn({pendingOption:t,lockedHarness:e}){return e==="claude-code"?"claude-code-desktop":e==="codex"?"codex-desktop":e==="opencode"?"opencode-desktop":t==="claude-code-desktop"||t==="codex-desktop"||t==="opencode-desktop"?t:null}function yn(t){return t.thread?.harness_id!=null?{}:{harnessId:"decopilot",sandboxProviderKind:"agent-sandbox",branch:t.globals.branch??null}}const vn="home",Sn=new Set(["output","upload","public","home"]),kn=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function gs(t){return Sn.has(t)||!kn.test(t)?"home":t}function xn(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",s=n?e[1]??null:null,o=n?s?`public-${s}`:null:e[0]??null,a=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:o,dirPath:a,isPublic:n,publicSet:s,readOnly:n,isHomeRoot:o===vn&&a===""}}function ys(t){return t==="public"?"skills":t}function vs(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const at="public-";function yt(t){return t.startsWith(at)?t.slice(at.length):null}function Ss(t,e){const n=yt(t);return n?`public/${n}/${e}`:`${t}/${e}`}function wn(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function In(t){const{volume:e,dirPath:n}=xn(t);if(!e)return null;let s;if(e==="home")s="org/home";else if(e==="outputs")s="org/.outputs";else if(e==="uploads")s="org/.uploads";else{const o=yt(e);s=o?`org/public/${o}`:`org/${e}`}return n?`${s}/${n}`:s}function Mn(t){const e=ie.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=dt(n);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const a=Be(o);let l;e[2]!==a.brand||e[3]!==a.main||e[4]!==a.preview||e[5]!==a.skill?(l=(typeof a.main=="string"?Rt(a.main)?.path:void 0)??a.preview??a.skill??a.brand??null,e[2]=a.brand,e[3]=a.main,e[4]=a.preview,e[5]=a.skill,e[6]=l):l=e[6];const c=l;let h;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==c||e[11]!==t){if(h=[],t&&h.push(`### Selected Agent
|
|
2
2
|
- ID: ${t}`),c){let f;e[13]!==c?(f=In(c),e[13]=c,e[14]=f):f=e[14];const k=f;let M;e[15]!==c?(M=wn(c),e[15]=c,e[16]=M):M=e[16],h.push(`### Currently Open File
|
|
3
3
|
The user has this file open in the Library and is most likely referring to it:
|
|
4
4
|
- Name: ${M}
|
|
@@ -26,10 +26,10 @@ ${l}`});break}case"image":case"audio":{if(!a.data||!a.mimeType)continue;n.push({
|
|
|
26
26
|
${l.text}`}):"blob"in l&&l.blob&&l.mimeType&&n.push({type:"file",url:`data:${l.mimeType};base64,${l.blob}`,filename:String(l.uri),mediaType:String(l.mimeType)}));break}}}return n}function St(t){if(!t)return[];const e=[];let n="";const s=o=>{if(o){if(o.type==="text"&&"text"in o&&typeof o.text=="string")n+=o.text;else if(o.type==="mention"&&o.attrs){const a=o.attrs.char??"/",l=`${a}${o.attrs.name}`;if(o.attrs.kind==="task"){const c=o.attrs.metadata,h=c?.title??o.attrs.name??"",m=c?.context?.trim()||[h,c?.description?.trim()].filter(Boolean).join(`
|
|
27
27
|
|
|
28
28
|
`);m&&e.push({type:"text",text:m});return}if(n+=l,a==="@"){const c=o.attrs.metadata;c&&typeof c=="object"&&!Array.isArray(c)&&"agentId"in c?e.push({type:"text",text:`[DELEGATE TO AGENT: ${c.title??o.attrs.name} (agent_id: ${c.agentId})]
|
|
29
|
-
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(c)&&e.push(...it(c,l))}else if(o.attrs.kind==="skill"){const c=o.attrs.metadata;c&&!Array.isArray(c)&&Array.isArray(c.files)&&e.push(..._n(c,l))}else{const c=o.attrs.metadata||o.attrs.prompts||[];Array.isArray(c)&&c.length>0&&typeof c[0]=="object"&&c[0]!==null&&"role"in c[0]?e.push(...Rn(c,l)):Array.isArray(c)&&e.push(...it(c,l))}}else if(o.type==="file"&&o.attrs){const a=o.attrs,l=`[file:://${encodeURIComponent(a.name)}]`;n+=l,e.push(...Pn(a,l))}if("content"in o&&Array.isArray(o.content))for(const a of o.content)s(a)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function ks(t){const e=St(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function xs(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function En(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function ws(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function Dn(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function $n(t,e){return t.filter(n=>n.messageId!==e)}const ye=new Map,Un=200;function On(t){if(ye.size<Un||ye.has(t))return;const e=ye.keys().next().value;if(e!==void 0){ye.delete(e),$e.delete(e);for(const n of ve.keys())n.startsWith(`${e}:`)&&ve.delete(n)}}const $e=new Set;function Ln(t){$e.add(t)}function Nn(t){return $e.has(t)}function Fn(t){$e.delete(t)}function Ae(t){let e=ye.get(t);return e||(On(t),e=new Lt([]),ye.set(t,e)),e}function kt(t,e){Ae(t).update(n=>Dn(n,e))}function Ve(t,e){Ae(t).update(n=>$n(n,e))}function qn(t,e){Ae(t).set(e)}const ve=new Map;function jn(t,e){ve.set(`${t}:${e.id}`,e)}function Vn(t,e){const n=`${t}:${e}`,s=ve.get(n);return ve.delete(n),s}function rt(t,e){ve.delete(`${t}:${e}`)}async function ae(t,e){try{const n=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!n.ok)return;const s=await n.json();qn(e,s.items??[])}catch{}}function Is(t){const e=ie.c(2);let n;e[0]!==t?(n=Ae(t),e[0]=t,e[1]=n):n=e[1];const s=n;return v.useSyncExternalStore(s.subscribe,s.get,s.get)}function Bn(){const{org:t}=ee();return{enqueue:kt,refresh:e=>ae(t.slug,e),cancel:async(e,n)=>{const s=`thread-run:${e}:${n}`;Ve(e,n);try{const o=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(s)}`,{method:"POST",credentials:"include"});if(!o.ok&&o.status!==404)throw new Error(`Cancel failed: ${o.status}`);return!0}catch(o){return ce.error(o instanceof Error?o.message:"Failed to cancel"),!1}finally{await ae(t.slug,e)}}}}function Ee(t,e){return t.find(n=>n!=null&&e.has(n.keyId))??null}function Hn(t,e,n){const s=o=>Ee([o],n);return{tiers:{fast:Ee([e.tiers.fast,t.tiers.fast],n),smart:Ee([e.tiers.smart,t.tiers.smart],n),thinking:Ee([e.tiers.thinking,t.tiers.thinking],n),image:s(t.tiers.image),web_search:s(t.tiers.web_search),deep_research:s(t.tiers.deep_research)}}}const Te={tiers:{}};function Kn(){const t=ie.c(7),{org:e}=ee();let n;t[0]!==e.id?(n=de.userModelPreferences(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==e.slug?(s=async()=>{const a=await Jt(e.slug,"USER_MODEL_PREFERENCES_GET",{});return a?.tiers?a:Te},t[2]=e.slug,t[3]=s):s=t[3];let o;return t[4]!==n||t[5]!==s?(o={queryKey:n,queryFn:s,staleTime:6e4},t[4]=n,t[5]=s,t[6]=o):o=t[6],Mt(o)}function Qn(){return Kn().data??Te}function Ms(){const t=ie.c(19),{org:e}=ee(),n=Yt(),s=He();let o;t[0]!==e.id?(o=de.userModelPreferences(e.id),t[0]=e.id,t[1]=o):o=t[1];const a=o;let l;t[2]!==a||t[3]!==s||t[4]!==n?(l=async M=>{const p=s.getQueryData(a)??Te;return await n.call("USER_MODEL_PREFERENCES_UPDATE",p)??p},t[2]=a,t[3]=s,t[4]=n,t[5]=l):l=t[5];let c,h,m,f;t[6]!==a||t[7]!==s?(c=M=>{const{tier:p,slot:A}=M,F=s.getQueryData(a),q=F??Te;return s.setQueryData(a,{tiers:{...q.tiers,[p]:A}}),{prev:F}},h=(M,p,A)=>{s.setQueryData(a,A?.prev??Te)},m=M=>{s.setQueryData(a,M)},f=()=>{s.isMutating({mutationKey:a})===1&&s.invalidateQueries({queryKey:a})},t[6]=a,t[7]=s,t[8]=c,t[9]=h,t[10]=m,t[11]=f):(c=t[8],h=t[9],m=t[10],f=t[11]);let k;return t[12]!==a||t[13]!==l||t[14]!==c||t[15]!==h||t[16]!==m||t[17]!==f?(k={mutationKey:a,mutationFn:l,onMutate:c,onError:h,onSuccess:m,onSettled:f},t[12]=a,t[13]=l,t[14]=c,t[15]=h,t[16]=m,t[17]=f,t[18]=k):k=t[18],Tt(k)}function Wn(){const t=ie.c(4),e=en(),n=Qn(),s=ht();let o;return t[0]!==s||t[1]!==e||t[2]!==n?(o=Hn(e,n,new Set(s.map(
|
|
30
|
-
`);if(!R){re(r);return}new TextEncoder().encode(R).length>Yn||ke(I=>Object.keys(I).length>=Jn&&!(r in I)?I:{...I,[r]:R})},re=r=>{ke(g=>{const{[r]:O,...R}=g;return R})},[Ne,Fe]=be(ge.chatLastAgentOption(e),r=>r&&r in je?r:null),Y=ss(),nt=Y?.isThreadLocked&&Y.lockedHarness!=null?bn(Y.lockedHarness,Y.lockedSandbox):null;gn({pendingOption:Ne,lockedHarness:Y?.isThreadLocked?Y.lockedHarness:null});const he=Y?.isThreadLocked?nt:"decopilot",Re=he?je[he]:null,d=Re?.harness??null,u=Re?.sandbox??null,[D,U]=v.useState(void 0),y=v.useRef(D);y.current=D;const w={selectedModel:
|
|
29
|
+
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(c)&&e.push(...it(c,l))}else if(o.attrs.kind==="skill"){const c=o.attrs.metadata;c&&!Array.isArray(c)&&Array.isArray(c.files)&&e.push(..._n(c,l))}else{const c=o.attrs.metadata||o.attrs.prompts||[];Array.isArray(c)&&c.length>0&&typeof c[0]=="object"&&c[0]!==null&&"role"in c[0]?e.push(...Rn(c,l)):Array.isArray(c)&&e.push(...it(c,l))}}else if(o.type==="file"&&o.attrs){const a=o.attrs,l=`[file:://${encodeURIComponent(a.name)}]`;n+=l,e.push(...Pn(a,l))}if("content"in o&&Array.isArray(o.content))for(const a of o.content)s(a)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function ks(t){const e=St(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function xs(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function En(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function ws(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function Dn(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function $n(t,e){return t.filter(n=>n.messageId!==e)}const ye=new Map,Un=200;function On(t){if(ye.size<Un||ye.has(t))return;const e=ye.keys().next().value;if(e!==void 0){ye.delete(e),$e.delete(e);for(const n of ve.keys())n.startsWith(`${e}:`)&&ve.delete(n)}}const $e=new Set;function Ln(t){$e.add(t)}function Nn(t){return $e.has(t)}function Fn(t){$e.delete(t)}function Ae(t){let e=ye.get(t);return e||(On(t),e=new Lt([]),ye.set(t,e)),e}function kt(t,e){Ae(t).update(n=>Dn(n,e))}function Ve(t,e){Ae(t).update(n=>$n(n,e))}function qn(t,e){Ae(t).set(e)}const ve=new Map;function jn(t,e){ve.set(`${t}:${e.id}`,e)}function Vn(t,e){const n=`${t}:${e}`,s=ve.get(n);return ve.delete(n),s}function rt(t,e){ve.delete(`${t}:${e}`)}async function ae(t,e){try{const n=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!n.ok)return;const s=await n.json();qn(e,s.items??[])}catch{}}function Is(t){const e=ie.c(2);let n;e[0]!==t?(n=Ae(t),e[0]=t,e[1]=n):n=e[1];const s=n;return v.useSyncExternalStore(s.subscribe,s.get,s.get)}function Bn(){const{org:t}=ee();return{enqueue:kt,refresh:e=>ae(t.slug,e),cancel:async(e,n)=>{const s=`thread-run:${e}:${n}`;Ve(e,n);try{const o=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(s)}`,{method:"POST",credentials:"include"});if(!o.ok&&o.status!==404)throw new Error(`Cancel failed: ${o.status}`);return!0}catch(o){return ce.error(o instanceof Error?o.message:"Failed to cancel"),!1}finally{await ae(t.slug,e)}}}}function Ee(t,e){return t.find(n=>n!=null&&e.has(n.keyId))??null}function Hn(t,e,n){const s=o=>Ee([o],n);return{tiers:{fast:Ee([e.tiers.fast,t.tiers.fast],n),smart:Ee([e.tiers.smart,t.tiers.smart],n),thinking:Ee([e.tiers.thinking,t.tiers.thinking],n),image:s(t.tiers.image),web_search:s(t.tiers.web_search),deep_research:s(t.tiers.deep_research)}}}const Te={tiers:{}};function Kn(){const t=ie.c(7),{org:e}=ee();let n;t[0]!==e.id?(n=de.userModelPreferences(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==e.slug?(s=async()=>{const a=await Jt(e.slug,"USER_MODEL_PREFERENCES_GET",{});return a?.tiers?a:Te},t[2]=e.slug,t[3]=s):s=t[3];let o;return t[4]!==n||t[5]!==s?(o={queryKey:n,queryFn:s,staleTime:6e4},t[4]=n,t[5]=s,t[6]=o):o=t[6],Mt(o)}function Qn(){return Kn().data??Te}function Ms(){const t=ie.c(19),{org:e}=ee(),n=Yt(),s=He();let o;t[0]!==e.id?(o=de.userModelPreferences(e.id),t[0]=e.id,t[1]=o):o=t[1];const a=o;let l;t[2]!==a||t[3]!==s||t[4]!==n?(l=async M=>{const p=s.getQueryData(a)??Te;return await n.call("USER_MODEL_PREFERENCES_UPDATE",p)??p},t[2]=a,t[3]=s,t[4]=n,t[5]=l):l=t[5];let c,h,m,f;t[6]!==a||t[7]!==s?(c=M=>{const{tier:p,slot:A}=M,F=s.getQueryData(a),q=F??Te;return s.setQueryData(a,{tiers:{...q.tiers,[p]:A}}),{prev:F}},h=(M,p,A)=>{s.setQueryData(a,A?.prev??Te)},m=M=>{s.setQueryData(a,M)},f=()=>{s.isMutating({mutationKey:a})===1&&s.invalidateQueries({queryKey:a})},t[6]=a,t[7]=s,t[8]=c,t[9]=h,t[10]=m,t[11]=f):(c=t[8],h=t[9],m=t[10],f=t[11]);let k;return t[12]!==a||t[13]!==l||t[14]!==c||t[15]!==h||t[16]!==m||t[17]!==f?(k={mutationKey:a,mutationFn:l,onMutate:c,onError:h,onSuccess:m,onSettled:f},t[12]=a,t[13]=l,t[14]=c,t[15]=h,t[16]=m,t[17]=f,t[18]=k):k=t[18],Tt(k)}function Wn(){const t=ie.c(4),e=en(),n=Qn(),s=ht();let o;return t[0]!==s||t[1]!==e||t[2]!==n?(o=Hn(e,n,new Set(s.map(zn))),t[0]=s,t[1]=e,t[2]=n,t[3]=o):o=t[3],o}function zn(t){return t.id}function le(t,e,n,s){if(!t)return null;const o=e.find(l=>l.id===t.keyId);if(!o)return null;const a=n.find(l=>l.modelId===t.modelId);return a?{...a,keyId:t.keyId}:{modelId:t.modelId,title:s??t.modelId,keyId:t.keyId,providerId:o.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function Gn(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function Xn(t,e,n,s){if(!n||s.length===0)return null;const o=e.find(h=>h.id===n);if(!o)return null;const a=zt([o],{[n]:s}),l=t==="fast"?a.chat.fast:t==="thinking"?a.chat.thinking:a.chat.smart;if(!l)return null;const c=s.find(h=>h.modelId===l.modelId);return c?{...c,keyId:n}:null}const lt=new Set,oe=new Set;function fe(t){return v.useSyncExternalStore(t.subscribe,t.get,t.get)}function Zn(t){return t.kind==="loading"?"ready":t.kind}const Yn=1e4,Jn=10,Je=v.createContext(null),et=v.createContext(null),tt=v.createContext(null),xt=v.createContext(null);function es({children:t}){const{locator:e}=ee(),{virtualMcpId:n}=vt(),[s,o]=be(ge.chatSelectedImageModel(e),null),[a,l]=be(ge.chatSelectedWebSearchModel(e),null),[c,h]=be(ge.chatSelectedDeepResearchModel(e),null),[m,f]=v.useState(null),[k,M]=v.useState("default"),p=Wn(),[A,F]=be(ge.chatSimpleModeTier(e),null),q=Gn(A),x=ht(),T=p.tiers[q],j=x.some(r=>r.id===T?.keyId)?T?.keyId:void 0,W=m&&x.some(r=>r.id===m)?m:j??x[0]?.id??null,{models:V,isLoading:_}=xe(W??void 0),{models:G}=xe(j),$=x.some(r=>r.id===p.tiers.image?.keyId)?p.tiers.image?.keyId:void 0,{models:te}=xe($),B=x.some(r=>r.id===p.tiers.web_search?.keyId)?p.tiers.web_search?.keyId:void 0,{models:H}=xe(B),ne=x.some(r=>r.id===p.tiers.deep_research?.keyId)?p.tiers.deep_research?.keyId:void 0,{models:K}=xe(ne),z=le(T,x,G,T?.title)??Xn(q,x,W,V),se=_,X=V.filter(r=>r.capabilities?.includes("image")),b=le(s,x,X),E=le(p.tiers.image,x,te,p.tiers.image?.title)??b??X[0]??null,L=V.filter(Gt),P=le(a,x,L),Q=L.find(r=>r.modelId==="perplexity/sonar")??L[0]??null,pe=le(p.tiers.web_search,x,H,p.tiers.web_search?.title)??P??Q,Z=V.filter(Xt),N=le(c,x,Z),Se=Z.find(r=>r.modelId==="perplexity/deep-research")??Z.find(r=>r.asyncResearch===!0)??Z[0]??null,Ue=le(p.tiers.deep_research,x,K,p.tiers.deep_research?.title)??N??Se,Le=Wt(n)??{id:n,title:"",description:null,icon:null},[Pe,ke]=v.useState({}),_e=(r,g)=>{const O=[];for(const I of g.content??[])I.type==="text"&&I.text?.trim()&&O.push(I.text.trim());const R=O.join(`
|
|
30
|
+
`);if(!R){re(r);return}new TextEncoder().encode(R).length>Yn||ke(I=>Object.keys(I).length>=Jn&&!(r in I)?I:{...I,[r]:R})},re=r=>{ke(g=>{const{[r]:O,...R}=g;return R})},[Ne,Fe]=be(ge.chatLastAgentOption(e),r=>r&&r in je?r:null),Y=ss(),nt=Y?.isThreadLocked&&Y.lockedHarness!=null?bn(Y.lockedHarness,Y.lockedSandbox):null;gn({pendingOption:Ne,lockedHarness:Y?.isThreadLocked?Y.lockedHarness:null});const he=Y?.isThreadLocked?nt:"decopilot",Re=he?je[he]:null,d=Re?.harness??null,u=Re?.sandbox??null,[D,U]=v.useState(void 0),y=v.useRef(D);y.current=D;const w={selectedModel:z,setModel:()=>{},credentialId:W,setCredentialId:f,allModelsConnections:x,isModelsLoading:se,selectedVirtualMcp:Le,imageModel:E,setImageModel:r=>{o(r?.keyId?{keyId:r.keyId,modelId:r.modelId}:null)},webSearchModel:pe,setWebSearchModel:r=>{l(r?.keyId?{keyId:r.keyId,modelId:r.modelId}:null)},deepResearchModel:Ue,setDeepResearchModel:r=>{h(r?.keyId?{keyId:r.keyId,modelId:r.modelId}:null)},chatMode:k,setChatMode:M,appContexts:Pe,setAppContext:_e,clearAppContext:re,tiptapDoc:D,setTiptapDoc:U,tiptapDocRef:y,resetInteraction:()=>{},simpleModeTier:q,setSimpleModeTier:r=>F(r),pendingAgentOption:he,setPendingAgentOption:Fe,pendingHarnessId:d,pendingSandboxProviderKind:u};return Me.jsx(tt.Provider,{value:w,children:t})}function Ts(t){const e=ie.c(41),{virtualMcpId:n,task:s,children:o}=t,{locator:a}=ee(),{data:l}=Ct.useSession(),c=l?.user??null,{taskId:h,virtualMcpId:m,navigateToTask:f}=vt(),[k]=At(),{markTaskRead:M}=Cn(),p=Vt(),A=h,F=m,q=Mn(F);let x;e[0]!==M||e[1]!==f?(x=(P,Q)=>{M(P),f(P,{virtualMcpId:Q?.virtualMcpId,autosend:Q?.autosend})},e[0]=M,e[1]=f,e[2]=x):x=e[2];const T=x,j=A&&s?.id===A?s:null,W=j?.harness_id??null,V=j?.sandbox_provider_kind??null,_=j?.branch??null,G=W!=null,$=_;let te;e[3]!==$||e[4]!==T||e[5]!==p||e[6]!==n?(te=()=>{const P=crypto.randomUUID();return p.create({id:P,virtual_mcp_id:n,...$?{branch:$}:{}}).then(()=>T(P)).catch(()=>{T(P)}),P},e[3]=$,e[4]=T,e[5]=p,e[6]=n,e[7]=te):te=e[7];const B=te;let H;e[8]!==$||e[9]!==a||e[10]!==T||e[11]!==p||e[12]!==n?(H=P=>{const Q=crypto.randomUUID(),pe=P.virtualMcpId??n,Z=pe===n?$:null;Ot(sessionStorage,a,Q,P.message),p.create({id:Q,virtual_mcp_id:pe,...Z?{branch:Z}:{}}).then(()=>T(Q,{virtualMcpId:P.virtualMcpId,autosend:!0})).catch(()=>{T(Q,{virtualMcpId:P.virtualMcpId,autosend:!0})})},e[8]=$,e[9]=a,e[10]=T,e[11]=p,e[12]=n,e[13]=H):H=e[13];const ne=H;let K;e[14]!==A||e[15]!==p?(K=P=>{A&&p.setBranch(A,P)},e[14]=A,e[15]=p,e[16]=K):K=e[16];let z;e[17]!==j||e[18]!==B||e[19]!==ne||e[20]!==$||e[21]!==A||e[22]!==F||e[23]!==G||e[24]!==_||e[25]!==W||e[26]!==V||e[27]!==T||e[28]!==K?(z={virtualMcpId:F,taskId:A,openTask:T,createTask:B,createTaskWithMessage:ne,activeTask:j,isThreadLocked:G,lockedHarness:W,lockedSandbox:V,lockedBranch:_,currentBranch:$,setCurrentTaskBranch:K},e[17]=j,e[18]=B,e[19]=ne,e[20]=$,e[21]=A,e[22]=F,e[23]=G,e[24]=_,e[25]=W,e[26]=V,e[27]=T,e[28]=K,e[29]=z):z=e[29];const se=z;let X;e[30]!==q||e[31]!==k||e[32]!==f||e[33]!==c?(X={user:c,contextPrompt:q,preferences:k,rawNavigateToTask:f},e[30]=q,e[31]=k,e[32]=f,e[33]=c,e[34]=X):X=e[34];const b=X;let E;e[35]!==o||e[36]!==b?(E=Me.jsx(es,{children:Me.jsx(xt.Provider,{value:b,children:o})}),e[35]=o,e[36]=b,e[37]=E):E=e[37];let L;return e[38]!==E||e[39]!==se?(L=Me.jsx(et.Provider,{value:se,children:E}),e[38]=E,e[39]=se,e[40]=L):L=e[40],L}function Cs({taskId:t,children:e}){const n=De(),s=Bt(),{virtualMcpId:o,activeTask:a,currentBranch:l}=ts(),c=Nt({isDesktopApp:s,harnessId:a?.harness_id,sandboxProviderKind:a?.sandbox_provider_kind}),h=n("chat.input.codingAgentRequiresDesktop");t&&!lt.has(t)&&(lt.add(t),_t("chat_opened",{thread_id:t}));const{imageModel:m,webSearchModel:f,deepResearchModel:k,chatMode:M,setChatMode:p,appContexts:A,setTiptapDoc:F,simpleModeTier:q}=ns(),x=v.useContext(xt);if(!x)throw new Error(n("chat.chatContext.activeTaskProviderMissingContext"));const{user:T,contextPrompt:j,preferences:W,rawNavigateToTask:V}=x,{org:_,locator:G}=ee(),$=Bn(),[te,B]=v.useState(null),H=()=>{B(new Error(h))},ne=Tn(),K=He(),z=Ft(),se=ut(),X=Kt({connectionId:Qt,orgId:_.id,orgSlug:_.slug}),b=qt(_.slug,t,{client:X,batch:jt(a?.harness_id)});v.use(b.ready);const E=fe(b.messages),L=fe(b.status),P=fe(b.finishReason),Q=fe(b.runStatusStage),pe=fe(b.hasMoreOlder),Z=fe(b.isFetchingOlder),N=v.useRef({onToolCall:ne,queryClient:K,rawNavigateToTask:V,taskId:t,manager:z,navigate:se,orgId:_.id,orgSlug:_.slug});N.current={onToolCall:ne,queryClient:K,rawNavigateToTask:V,taskId:t,manager:z,navigate:se,orgId:_.id,orgSlug:_.slug},Zt({orgSlug:_.slug,taskId:t,onTaskStatus:d=>{const u=N.current,D=d.data.message_id;if(d.data.status==="in_progress"&&D){Ve(u.taskId,D);const U=Vn(u.taskId,D);U&&b.applyLocalMessage(U),ae(u.orgSlug,u.taskId)}Nn(u.taskId)&&(async()=>(await ae(u.orgSlug,u.taskId),await b.reconcileFromServer()&&Ae(u.taskId).get().length===0&&Fn(u.taskId)))()}}),v.useEffect(()=>{const d={onData:y=>{if(y.type==="data-thread-title"){const w=y.data;if(!w?.title)return;const r=N.current;if(!r.taskId)return;r.manager.patchThread({id:r.taskId,title:w.title,updated_at:new Date().toISOString()});return}if(y.type==="data-deck-updated"){const w=y.data;if(!w?.path)return;const r=w.path,g=N.current;g.queryClient.invalidateQueries({queryKey:de.orgFsStat(g.orgId,"home",r)}),g.queryClient.invalidateQueries({queryKey:de.orgFsRecent(g.orgId)}),g.navigate({to:".",search:O=>({...O,main:Ut(r)}),replace:!0});return}if(y.type==="data-open-preview"){const w=y.data,r=N.current,g=r.taskId;if(g){const O=r.manager.threads.get().find(R=>R.id===g);r.manager.patchThread({id:g,...w?.branch?{branch:w.branch}:{},...w?.sandboxProviderKind?{sandbox_provider_kind:w.sandboxProviderKind}:{},metadata:{...O?.metadata??{},...w?.githubRepo?{githubRepo:w.githubRepo}:{},...w?.sandboxMap?{sandboxMap:w.sandboxMap}:{}}})}r.navigate({to:".",search:O=>({...O,main:"preview"}),replace:!0});return}},onFinish:(y,w,r)=>{const g=N.current;g.taskId&&ae(g.orgSlug,g.taskId),g.taskId&&g.manager.patchThread({id:g.taskId,status:fn(r,y.parts),updated_at:new Date().toISOString()});const O=y.parts?.some(I=>{const me=I;return(me.type==="tool-share_with_user"||me.type==="tool-bash"||me.type==="tool-write")&&me.state==="output-available"});if(g.taskId&&O){const I=de.threadOutputs(g.taskId);for(const me of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{g.queryClient.invalidateQueries({queryKey:I})},me)}g.queryClient.invalidateQueries({queryKey:de.homeNextActions(g.orgSlug)});const R=y.metadata?.thread_id;R&&R!==g.taskId&&g.rawNavigateToTask(R)},onError:y=>{B(y),console.error("[chat] Error",y)},onToolCall:y=>N.current.onToolCall(y)};b.observer=d,ae(N.current.orgSlug,N.current.taskId);const u=y=>y==="submitted"||y==="streaming";let D=u(b.status.get().kind);const U=b.status.subscribe(()=>{const y=u(b.status.get().kind);if(y===D)return;D=y;const w=N.current;ae(w.orgSlug,w.taskId)});return()=>{b.observer===d&&(b.observer=null),U()}},[b]);const Se=L.kind==="submitted"||L.kind==="streaming",Ue=E.length===0,Oe=E.at(-1),Le=!Se&&Oe?.role==="assistant"&&Oe.parts.some(d=>"state"in d&&d.state==="approval-requested"),Pe=a,ke=(Pe?.status==="in_progress"||Pe?.status==="expired")&&L.kind==="ready"&&E.length>0;async function _e(d){const u=t,D=o;if(c)return H(),oe.delete(u),!1;const U=Object.entries(A),y=U.length>0?U.map(([R,I])=>`### App Context: ${R}
|
|
31
31
|
${I}`).join(`
|
|
32
32
|
|
|
33
33
|
`):"",w=[j,y].filter(Boolean).join(`
|
|
34
34
|
|
|
35
|
-
`);let r=M;r==="gen-image"&&!m&&(r="default"),r==="web-search"&&!f&&(r="default"),r==="deep-research"&&!k&&(r="default"),(r==="web-search"||r==="deep-research")&&p("default");const g=yn({thread:a?{harness_id:a.harness_id??null,sandbox_provider_kind:a.sandbox_provider_kind??null,branch:a.branch??null}:null,globals:{branch:l}});a?.harness_id||
|
|
35
|
+
`);let r=M;r==="gen-image"&&!m&&(r="default"),r==="web-search"&&!f&&(r="default"),r==="deep-research"&&!k&&(r="default"),(r==="web-search"||r==="deep-research")&&p("default");const g=yn({thread:a?{harness_id:a.harness_id??null,sandbox_provider_kind:a.sandbox_provider_kind??null,branch:a.branch??null}:null,globals:{branch:l}});a?.harness_id||z.patchThread({id:u,harness_id:g.harnessId??"decopilot",updated_at:new Date().toISOString()});const O={tier:q,mode:r,toolApprovalLevel:W.toolApprovalLevel??Pt(),system:w||void 0,agent:{id:D},thread_id:u,...g};try{if(Se||ke){let R=!0;try{jn(u,d),await b.enqueue(d,O),kt(u,{workflowId:`thread-run:${u}:${d.id}`,messageId:d.id,text:En(d.parts),hasAttachments:d.parts.some(I=>I.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),Ln(u)}catch(I){R=!1,rt(u,d.id),Ve(u,d.id),B(I instanceof Error?I:new Error(String(I))),ce.error(I instanceof Error?I.message:n("chat.chatContext.failedToQueueMessage"))}return ae(_.slug,u),R}return await b.submit({kind:"message",message:d},O),!0}finally{oe.delete(u)}}async function re(d){const u=d.parts??St(d.tiptapDoc);if(u.length===0||oe.has(t))return;oe.add(t),B(null),F(void 0);const D={tiptapDoc:d.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:T?.image??void 0,name:T?.name??"you"}},U={id:crypto.randomUUID(),role:"user",parts:u,metadata:D};await _e(U)}async function Ne(d,u){if(c)return H(),!1;if(oe.has(t))return ce.info(n("chat.chatContext.stillSendingPreviousMessage")),!1;if(oe.add(t),!await $.cancel(t,d))return oe.delete(t),ce.error(n("chat.chatContext.couldNotRemoveOriginalMessage")),!1;rt(t,d),b.removeLocalMessage(d);const U={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:u}],metadata:{created_at:new Date().toISOString(),user:{avatar:T?.image??void 0,name:T?.name??"you"}}};try{return await _e(U)}catch(y){return ce.error(y instanceof Error?y.message:n("chat.chatContext.failedToSendEditedMessage")),!1}}const Fe=async()=>{b.stop();try{const d=await fetch(`/api/${_.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(d.status===404)return;if(!d.ok){const u=await d.json().catch(()=>({}));throw new Error(u.message??n("chat.chatContext.cancelFailedStatus",{status:d.status}))}}catch(d){const u=d instanceof Error?d.message:n("chat.chatContext.failedToCancel");ce.error(u),console.error("[chat] cancelRun",d)}},Y=d=>d&&typeof d=="object"&&"type"in d?re({tiptapDoc:d}):re(d),he=Be({strict:!1}).autosend===pt;v.useEffect(()=>{if(!he||E.length>0||c)return;const d=Dt(sessionStorage,G,t);d&&re(d.message).then(()=>{$t(sessionStorage,G,t)})},[he,E.length,c,G,t,re]);const Re={messages:E,status:Zn(L),sendMessage:Y,editQueuedMessage:Ne,stop:()=>{if(c){H();return}Fe()},submit:async(d,u)=>{if(c){H();return}await b.submit(d,u)},removeLocalMessage:d=>b.removeLocalMessage(d),isSendInFlight:()=>oe.has(t),error:te,clearError:()=>B(null),finishReason:P,runStatusStage:Q,clearFinishReason:()=>b.finishReason.set(null),isStreaming:Se,isChatEmpty:Ue,isWaitingForApprovals:Le??!1,isRunInProgress:ke,hasMoreOlder:pe,isFetchingOlder:Z,fetchOlderMessages:b.fetchOlderMessages.bind(b)};return Me.jsx(Je.Provider,{value:Re,children:e})}function As(){const t=De(),e=v.useContext(Je);if(!e)throw new Error(t("chat.chatContext.useChatStreamMissingContext"));return e}function Ps(){return v.useContext(Je)}function ts(){const t=De(),e=v.useContext(et);if(!e)throw new Error(t("chat.chatContext.useChatTaskMissingContext"));return e}function ns(){const t=De(),e=v.useContext(tt);if(!e)throw new Error(t("chat.chatContext.useChatPrefsMissingContext"));return e}function _s(){return v.useContext(tt)}function ss(){return v.useContext(et)}export{Cs as A,vt as B,es as C,_s as D,on as E,vn as H,rn as S,bs as V,As as a,ts as b,Is as c,Bn as d,rt as e,Ee as f,Kn as g,Ms as h,Wn as i,Ps as j,ss as k,Ts as l,xs as m,ms as n,St as o,fs as p,xn as q,wn as r,ws as s,ks as t,ns as u,ys as v,gs as w,vs as x,yt as y,Ss as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,m as d,j as c,bE as l,bF as m}from"./index-
|
|
1
|
+
import{c as n,m as d,j as c,bE as l,bF as m}from"./index-B0fkC9lT.js";import{i as b}from"./Check-D0s6wH1X.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-B0fkC9lT.js";import{A as u}from"./auth-split-layout-D3vaJt1T.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|