decocms 4.99.7 → 4.99.8
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-DHJMAy0z.js → AlertCircle-CE7GxjMO.js} +1 -1
- package/dist/client/assets/{AreaChart-BP3LRAVY.js → AreaChart-Czn9zcW2.js} +1 -1
- package/dist/client/assets/{ArrowRight-ZH8AfOrt.js → ArrowRight-AiWOWM1Z.js} +1 -1
- package/dist/client/assets/{ArrowUp-BEvOvB39.js → ArrowUp-BsjWGQQe.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CB2lmsga.js → ArrowUpRight-B2LSEvMX.js} +1 -1
- package/dist/client/assets/{Check-8S_h-pNf.js → Check-BWvX1ZXX.js} +1 -1
- package/dist/client/assets/{CheckCircle-8lNaIJZX.js → CheckCircle-Cf21Bb8a.js} +1 -1
- package/dist/client/assets/{ChevronDown-D19e4E2W.js → ChevronDown-CjhsyPt5.js} +1 -1
- package/dist/client/assets/{ChevronRight-DMiFqEFB.js → ChevronRight-C0U1fSzL.js} +1 -1
- package/dist/client/assets/{ChevronUp-CDr-5amA.js → ChevronUp-CJR37gbq.js} +1 -1
- package/dist/client/assets/{Copy01-CVgcePVg.js → Copy01-B8tpQC9Q.js} +1 -1
- package/dist/client/assets/{DotsVertical-Ddcp5zYy.js → DotsVertical-DXSJrP0z.js} +1 -1
- package/dist/client/assets/{Eye-DjxTeGvc.js → Eye-CximEfBL.js} +1 -1
- package/dist/client/assets/{FilterLines-sMM8U03Q.js → FilterLines-CQAFehUr.js} +1 -1
- package/dist/client/assets/{Globe01-ByEypwqT.js → Globe01-BHWZq2K5.js} +1 -1
- package/dist/client/assets/{Globe04-CLktRX73.js → Globe04-Dw5Bsm8V.js} +1 -1
- package/dist/client/assets/{HardDrive-LZLUcrQT.js → HardDrive-CwNWMpvl.js} +1 -1
- package/dist/client/assets/{Image01-BC4H1plu.js → Image01-BorH67fS.js} +1 -1
- package/dist/client/assets/{Key01-BJ5pxmk5.js → Key01-Bjj-aLS5.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BY0vokwF.js → LayoutLeft-CxMDbMdN.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BE6iPh6Z.js → LinkExternal01-DzfAn4aY.js} +1 -1
- package/dist/client/assets/{Monitor01-D5bQ7ld2.js → Monitor01-B11z__w7.js} +1 -1
- package/dist/client/assets/{Package-Dgaviqf5.js → Package-BkoPZ3tG.js} +1 -1
- package/dist/client/assets/{Palette-BLetgCYz.js → Palette-RNOi-9O1.js} +1 -1
- package/dist/client/assets/{Play-D4uEf4_3.js → Play-CL_a6mE6.js} +1 -1
- package/dist/client/assets/{Plus-B99BOqFt.js → Plus-BiNu4BNf.js} +1 -1
- package/dist/client/assets/{SearchLg-0vJ_NGT1.js → SearchLg-D8wz7WQH.js} +1 -1
- package/dist/client/assets/{SearchMd--QTHPVfW.js → SearchMd-JyzroHdN.js} +1 -1
- package/dist/client/assets/{Settings02-Dg48gy-m.js → Settings02-htWR982a.js} +1 -1
- package/dist/client/assets/{Shield01-XjAbmrcl.js → Shield01-BVyqSeQM.js} +1 -1
- package/dist/client/assets/{Star01-DBzet7vh.js → Star01-Dh17NHJI.js} +1 -1
- package/dist/client/assets/{Stars01-DBeF8eO9.js → Stars01-BMXw5BeL.js} +1 -1
- package/dist/client/assets/{Stars02-DF0mhAvh.js → Stars02-CxJPie3_.js} +1 -1
- package/dist/client/assets/{Sun-DWQi7hi9.js → Sun-DaIRBGtL.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-g8c5_DAA.js → SwitchHorizontal01-BwNckjDk.js} +1 -1
- package/dist/client/assets/{Tool01-BsH7bOGE.js → Tool01-D_3zbU3k.js} +1 -1
- package/dist/client/assets/{Tool02-CpEmuwVJ.js → Tool02-DiUu9qs_.js} +1 -1
- package/dist/client/assets/{Trash01-sz1B1ubO.js → Trash01-WLvc7qEr.js} +1 -1
- package/dist/client/assets/{TrendUp01-DFaJzXrF.js → TrendUp01-DPzDlutQ.js} +1 -1
- package/dist/client/assets/{Upload01-DZkj6_Us.js → Upload01-Bx5CpiF6.js} +1 -1
- package/dist/client/assets/{User01-Cy4n4fwd.js → User01-CWpJwa6r.js} +1 -1
- package/dist/client/assets/{Users01-CiJE_Dg-.js → Users01-ChKK2Tx6.js} +1 -1
- package/dist/client/assets/{Users03-Dqh1PO2N.js → Users03-BWpBf_La.js} +1 -1
- package/dist/client/assets/{X-BFNxuShY.js → X-CfAlZN0E.js} +1 -1
- package/dist/client/assets/{XCircle-Cv1eNWoM.js → XCircle-D6dsYD0i.js} +1 -1
- package/dist/client/assets/{XClose-Ckol2oql.js → XClose-EYXyD43I.js} +1 -1
- package/dist/client/assets/{Zap-DTU6QUr-.js → Zap-CieQ7Tpq.js} +1 -1
- package/dist/client/assets/{ZapSquare-CdnVBk-J.js → ZapSquare-z-XJEPEB.js} +1 -1
- package/dist/client/assets/{ZoomOut-IrGAWsFW.js → ZoomOut-_xCY1UeS.js} +1 -1
- package/dist/client/assets/{access-gate-DAiHI_Ya.js → access-gate-Cv1dfvoj.js} +1 -1
- package/dist/client/assets/{add-section-modal-PTtjM0qv.js → add-section-modal-CZdPL24J.js} +1 -1
- package/dist/client/assets/{agent-icon-DJ-fLRqx.js → agent-icon-DclSthKR.js} +1 -1
- package/dist/client/assets/{agents-list-Ddn36hvr.js → agents-list-DBnt6dLl.js} +1 -1
- package/dist/client/assets/{ai-providers-4RQyfXJ9.js → ai-providers-DzcfIs3g.js} +1 -1
- package/dist/client/assets/{alert-D564TwSW.js → alert-BPcaPAJj.js} +1 -1
- package/dist/client/assets/{alert-dialog-S-vKrHdP.js → alert-dialog-C9TCdYEA.js} +1 -1
- package/dist/client/assets/{app-editor-BnYQVlSC.js → app-editor-DdcFzHO2.js} +1 -1
- package/dist/client/assets/{auth-LsRMSxpZ.js → auth-D0JrqMBg.js} +1 -1
- package/dist/client/assets/{auth-catchall-CdzEQEu6.js → auth-catchall-E5XvJd8y.js} +1 -1
- package/dist/client/assets/{auth-entry-DcFUSq-U.js → auth-entry-D9yXCnjT.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CTdOwwE2.js → auth-split-layout-AjVuDFuV.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ccpCvQUL.js → authenticate-and-persist-oauth-DxQCI97g.js} +1 -1
- package/dist/client/assets/{automation-list-row-B36cFYnc.js → automation-list-row-BRNOh7Fh.js} +1 -1
- package/dist/client/assets/{automation-runs-C5OD2vNu.js → automation-runs-DYLrph2F.js} +1 -1
- package/dist/client/assets/{automations-_IDwlRt9.js → automations-nNRSctV2.js} +1 -1
- package/dist/client/assets/{autosend-DwCcNXOp.js → autosend-CdL93bdf.js} +1 -1
- package/dist/client/assets/{avatar-CDCXeyeq.js → avatar-STUuRBeL.js} +1 -1
- package/dist/client/assets/{badge-CLbg8brP.js → badge-BHUFjOp2.js} +1 -1
- package/dist/client/assets/block-document-CVBR247r.js +3 -0
- package/dist/client/assets/{brand-context-CLwWQD4a.js → brand-context-CSCxzNyY.js} +1 -1
- package/dist/client/assets/{buckets-C6jFjZP6.js → buckets-pkSe0l2x.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BJgqFyPw.js → bulk-category-panel-Dc2Scx8I.js} +1 -1
- package/dist/client/assets/{calendar-CIg2EEBJ.js → calendar-BitQQvMp.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dx6CWw4N.js → capability-load-error-B3GGAYV9.js} +1 -1
- package/dist/client/assets/{card-CGoHKQKX.js → card-eu6g3Ufc.js} +1 -1
- package/dist/client/assets/{category-editor-CxVEA7RL.js → category-editor-x8totkcH.js} +1 -1
- package/dist/client/assets/{chat-context-BpdINg7c.js → chat-context-DseDiNEh.js} +1 -1
- package/dist/client/assets/{checkbox-DiEGmfR1.js → checkbox-BhnQvAdW.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BGVZ5nYN.js → cli-auth-success-D-YHRBZl.js} +1 -1
- package/dist/client/assets/collection-detail-CkwYR8Wb.js +1 -0
- package/dist/client/assets/{collection-display-button-Dn4BN1AT.js → collection-display-button-BiPabE6D.js} +1 -1
- package/dist/client/assets/{collection-search-DT4BSCdW.js → collection-search-BfgDlrmR.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CXhf1hUH.js → collection-table-wrapper-BEMGyRyQ.js} +1 -1
- package/dist/client/assets/{collection-tabs-CG0FZsKM.js → collection-tabs-CC2gd3e0.js} +1 -1
- package/dist/client/assets/{command-KNTOL3kj.js → command-q6wXbz-P.js} +1 -1
- package/dist/client/assets/commerce-onboarding-2US92_s_.js +1 -0
- package/dist/client/assets/{companions-core-FTf4qGMY.js → companions-core-COK3zE1T.js} +1 -1
- package/dist/client/assets/{connect-BE9doFql.js → connect-C_2JUaG9.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BoS5Hu9R.js → connect-desktop-dialog-DhAWxkv7.js} +1 -1
- package/dist/client/assets/{connection-card-Dbj_E-0a.js → connection-card-3KsArvFb.js} +1 -1
- package/dist/client/assets/{connection-detail-V6mFx9e6.js → connection-detail-DnlGu2cE.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D0VhJo5T.js → connection-form-helpers-CkWktsxW.js} +1 -1
- package/dist/client/assets/{connections-fj3C3XzM.js → connections-CEGqW20q.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DlsoDrW9.js → decopilot-sse-pool-CHSNG2R3.js} +1 -1
- package/dist/client/assets/{dialog-CwEHiSMU.js → dialog-DflEsAVp.js} +1 -1
- package/dist/client/assets/{domain-settings-lLJfdhn2.js → domain-settings-CmBXs5S4.js} +1 -1
- package/dist/client/assets/{drawer-NqC3cUty.js → drawer-g5OBTlHu.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dui6084c.js → dropdown-menu-Bn43QpEP.js} +1 -1
- package/dist/client/assets/{empty-state--30EXuZG.js → empty-state-DWA8aJpv.js} +1 -1
- package/dist/client/assets/{extract-connection-data-5mcb4Mog.js → extract-connection-data-BADrHucW.js} +1 -1
- package/dist/client/assets/{file-explorer-CgOnjl_S.js → file-explorer-D_NLzAhM.js} +1 -1
- package/dist/client/assets/{file-type-icon-P_pN9_xH.js → file-type-icon-CcQDNpN1.js} +8 -8
- package/dist/client/assets/{files-BLAFPbYz.js → files-BXFQeaBN.js} +1 -1
- package/dist/client/assets/{form-5ox058mH.js → form-C6P3tBSr.js} +1 -1
- package/dist/client/assets/{general-6JhynIjZ.js → general-DA8dkTDQ.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BqET8_zQ.js → github-repo-picker-BamRwZo6.js} +1 -1
- package/dist/client/assets/{hooks-Dcj3etNr.js → hooks-D2X3VJWD.js} +1 -1
- package/dist/client/assets/{index-C6ytuOGZ.js → index-BxyxSts9.js} +1 -1
- package/dist/client/assets/{index-C5X0kiyr.js → index-C1uYRrdq.js} +1 -1
- package/dist/client/assets/{index-CyNeJz90.js → index-C5XDTn-4.js} +1 -1
- package/dist/client/assets/{index-C9qzt0Jn.js → index-C7FdAm9g.js} +3 -3
- package/dist/client/assets/{index-Cr82fBda.js → index-CIUn1nKq.js} +1 -1
- package/dist/client/assets/{index-BELfS11E.js → index-CQUm4N48.js} +1 -1
- package/dist/client/assets/{index-qob9QDNh.js → index-CWHoQpVq.js} +1 -1
- package/dist/client/assets/{index-DZ0C-1Pb.js → index-C_hhWkSy.js} +1 -1
- package/dist/client/assets/{index-BGTjziYz.js → index-CjUOg-D4.js} +1 -1
- package/dist/client/assets/{index-BaeEjqV7.js → index-CpcKMJHf.js} +6 -6
- package/dist/client/assets/{index-BbdMwuvN.js → index-Crv29523.js} +1 -1
- package/dist/client/assets/{index-BhPaswkE.js → index-DA0GYA6l.js} +23 -23
- package/dist/client/assets/{index-BNV2EeGI.js → index-DqnBl-rD.js} +1 -1
- package/dist/client/assets/{index-CRmtvsLd.js → index-ZXqsiuwe.js} +1 -1
- package/dist/client/assets/{index-redirect-sMiFiL_K.js → index-redirect-DHk4L7GR.js} +1 -1
- package/dist/client/assets/{input-PlhR5OQl.js → input-CfMu9dzk.js} +1 -1
- package/dist/client/assets/{integration-icon-DmDjDu1T.js → integration-icon-C4RBZhRU.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-D79xzFG6.js → invite-member-dialog-CrOemxN3.js} +1 -1
- package/dist/client/assets/{label-Dgx54R9B.js → label-CrpJWAf1.js} +1 -1
- package/dist/client/assets/{layout-kKX1t2sP.js → layout-Duo3u3mT.js} +1 -1
- package/dist/client/assets/{login-wAm8iucL.js → login-D91aPwsO.js} +1 -1
- package/dist/client/assets/{mcp-oauth-uiWOIXGl.js → mcp-oauth-CklKADlW.js} +1 -1
- package/dist/client/assets/{members-Df7bjsef.js → members-Dog4a2Mg.js} +1 -1
- package/dist/client/assets/{monaco-editor-BkhNLbLQ.js → monaco-editor-B4H9BgjG.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-C_chKCRP.js → monitoring-stats-row-CUhp2cAb.js} +1 -1
- package/dist/client/assets/{multi-select-Ds_o80Ow.js → multi-select-CveplexG.js} +1 -1
- package/dist/client/assets/{oauth-callback-DDD-Q2b4.js → oauth-callback-DVLa8LUd.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B5_IzB1y.js → oauth-callback-ai-provider-BqwL9u1C.js} +1 -1
- package/dist/client/assets/{onboarding-B1v12Kxf.js → onboarding-L9R9v_1w.js} +1 -1
- package/dist/client/assets/{org-install-ix32v6HG.js → org-install-DKPiUyNe.js} +1 -1
- package/dist/client/assets/{org-layout-D3jsdku6.js → org-layout-DKf6bmhG.js} +1 -1
- package/dist/client/assets/{organization-choice-DG8veEJJ.js → organization-choice-BppWpWvM.js} +1 -1
- package/dist/client/assets/{orgs-DwwYSo1F.js → orgs-C1piZc3b.js} +1 -1
- package/dist/client/assets/{page-seo-form-B6-Tjapj.js → page-seo-form-BJXEusVN.js} +1 -1
- package/dist/client/assets/page-seo-sheet-qJlKNSEX.js +1 -0
- package/dist/client/assets/{popover-Cc-bUxo9.js → popover-CrleXxNp.js} +1 -1
- package/dist/client/assets/{post-editor-C4wur674.js → post-editor-BT8GSLUo.js} +1 -1
- package/dist/client/assets/{primitives-DzhLuT4o.js → primitives-2H2Ul_eR.js} +1 -1
- package/dist/client/assets/{profile-MRaW8Iku.js → profile-BSzkb3dI.js} +1 -1
- package/dist/client/assets/project-app-view-BDYuE_G5.js +1 -0
- package/dist/client/assets/record-editor-BBeFwRxk.js +1 -0
- package/dist/client/assets/{redirect-editor-LLRc4D2K.js → redirect-editor-SSQ67xNP.js} +1 -1
- package/dist/client/assets/registry-DoJG5JcB.js +2 -0
- package/dist/client/assets/{registry-layout-DkldcL5a.js → registry-layout-BEG9DDsM.js} +1 -1
- package/dist/client/assets/{reports-B-PUwpKU.js → reports-CCU-aTs3.js} +1 -1
- package/dist/client/assets/{require-capability-DLiPnWvZ.js → require-capability-DWm6CNy-.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BZ6DGJsb.js → required-auth-layout-sdkajhxL.js} +1 -1
- package/dist/client/assets/{reset-password-C9volMkn.js → reset-password-C3tyeh9A.js} +1 -1
- package/dist/client/assets/roles-OHoOXwCk.js +1 -0
- package/dist/client/assets/{search-input-CXhpX-Xz.js → search-input-DVmbIwSm.js} +1 -1
- package/dist/client/assets/{secrets-C5-PbNw_.js → secrets-BpxYvB8T.js} +1 -1
- package/dist/client/assets/{sections-editor-BYYH09fn.js → sections-editor-zn9qN-zI.js} +1 -1
- package/dist/client/assets/{select-BHlpCdw9.js → select-Du6tz3kh.js} +1 -1
- package/dist/client/assets/{select-model-DiTMTOsS.js → select-model-CQmu7p41.js} +1 -1
- package/dist/client/assets/{self-tool-result-BYT5inCm.js → self-tool-result-ytgEtrIl.js} +1 -1
- package/dist/client/assets/{seo-editor-BMESJKUG.js → seo-editor-Bje7uBK2.js} +1 -1
- package/dist/client/assets/{settings-layout-BEVTWuIu.js → settings-layout-fbqX-MG3.js} +1 -1
- package/dist/client/assets/{settings-section-DYCGsxoQ.js → settings-section-CJRUKep2.js} +1 -1
- package/dist/client/assets/{shell-controls-CyEjGQVX.js → shell-controls-KusyRLWm.js} +1 -1
- package/dist/client/assets/{shell-layout-DlEDxOSH.js → shell-layout-CKYTXHCu.js} +1 -1
- package/dist/client/assets/{sidebar-BT5oq5Py.js → sidebar-BmhMU5lV.js} +1 -1
- package/dist/client/assets/{skeleton-DR0dV7Rx.js → skeleton-DTqxvLBu.js} +1 -1
- package/dist/client/assets/{sso-CSnQvRdb.js → sso-B1JjQ4Kh.js} +1 -1
- package/dist/client/assets/{store-DCbdRWaM.js → store-BDHKoNfM.js} +1 -1
- package/dist/client/assets/store-registry-DZaeK6xH.js +2 -0
- package/dist/client/assets/{studio-tools-BSpHTnkI.js → studio-tools-D5s2iCWq.js} +1 -1
- package/dist/client/assets/{switch-DNcfs8uV.js → switch-CdtDoLmP.js} +1 -1
- package/dist/client/assets/{table-BO7AXCJj.js → table-D6cnU27A.js} +1 -1
- package/dist/client/assets/{tabs-BOn-uUO8.js → tabs-DPZhfEpX.js} +1 -1
- package/dist/client/assets/{textarea-2FS82hTt.js → textarea-Xd9JewQa.js} +1 -1
- package/dist/client/assets/{toggle-group-Bp5y9M5o.js → toggle-group-C4W2MbVL.js} +1 -1
- package/dist/client/assets/{toolbar-lB-S2vpV.js → toolbar-CihMw0LK.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BX6tvqZL.js → toolbar-icon-button-C5qmOl3U.js} +1 -1
- package/dist/client/assets/{tooltip-D9NGFdPV.js → tooltip-D8I4xgP8.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BQWD6Fbv.js → use-ai-providers-Cmmx4PkW.js} +1 -1
- package/dist/client/assets/{use-api-keys-B9APB1Uz.js → use-api-keys-XSVvKZHS.js} +1 -1
- package/dist/client/assets/{use-automations-Vb2lhz9-.js → use-automations-DacHE3Xy.js} +1 -1
- package/dist/client/assets/{use-autosave-0f1y6oqV.js → use-autosave-CAKCkNau.js} +1 -1
- package/dist/client/assets/{use-capability-COYHR3-p.js → use-capability-CPTz8Ujk.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BRgf5NQf.js → use-clock-tick-155i4HwF.js} +1 -1
- package/dist/client/assets/{use-connection-DpuO4fNw.js → use-connection-DbaNggp4.js} +1 -1
- package/dist/client/assets/{use-copy-BeT4l9EL.js → use-copy-BqB7SD7Y.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-41F9ENXu.js → use-create-virtual-mcp-Btn3qRQf.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CRjEG81o.js → use-debounced-autosave-BZRkS_eh.js} +1 -1
- package/dist/client/assets/{use-debounced-value-NzmZPT1j.js → use-debounced-value-8smeSlAm.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BICXIEvI.js → use-deco-credits-CWim1XTX.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-B2udrR1E.js → use-decopilot-events-CA5qoH7E.js} +1 -1
- package/dist/client/assets/{use-delete-connection-I4CFeUrd.js → use-delete-connection-C9fvQqfZ.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D5UxXiFy.js → use-deployment-admin-Boe_Ihmh.js} +1 -1
- package/dist/client/assets/{use-file-configs-BxxfQuJb.js → use-file-configs-Y1J31dyQ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Czt7JOf8.js → use-infinite-scroll-vHSG7AxL.js} +1 -1
- package/dist/client/assets/{use-join-requests-BAcrUcz7.js → use-join-requests-D9SB3yeo.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CnFSrLEj.js → use-mcp-auth-status-BqXsT5WV.js} +1 -1
- package/dist/client/assets/{use-mcp-client-tcmKmN21.js → use-mcp-client-DDmvok5R.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DIqHvolA.js → use-mcp-tools-B71sSTr4.js} +1 -1
- package/dist/client/assets/{use-members-atWSP-WF.js → use-members-WvOf4_vR.js} +1 -1
- package/dist/client/assets/{use-mobile-2yLfYt8o.js → use-mobile-BlZOnSdH.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BAhIUAJc.js → use-navigate-to-agent-BJfnV5Hb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CF9Xv674.js → use-org-auth-client-DOe1-YEw.js} +1 -1
- package/dist/client/assets/{use-org-sso-D55i4f0_.js → use-org-sso-CLusgGXY.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CTaZXibc.js → use-organization-roles-BQ1sH-WS.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Coxn0MdD.js → use-organization-settings-C2Rlhb_g.js} +1 -1
- package/dist/client/assets/{use-registry-app-hSt4mgU8.js → use-registry-app-BkNbCzQ_.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Mt2VCkjn.js → use-registry-connections-1FFiww3l.js} +1 -1
- package/dist/client/assets/{use-secrets-CgXohDMi.js → use-secrets-B8shAzNP.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BADjzMyd.js → use-status-sounds-BSx0lVm6.js} +1 -1
- package/dist/client/assets/{use-view-mode-h6gpir15.js → use-view-mode-DYRrwd_4.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-MeqW96-1.js → use-virtual-mcp-D4AVSx6g.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DTsg_ujq.js +1 -0
- package/dist/client/assets/{useRouterState-N0q5mOQR.js → useRouterState-BY0JMcAQ.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BBxTPEk3.js +1 -0
- package/dist/client/assets/{users-CJv38_2t.js → users-CllKdANz.js} +1 -1
- package/dist/client/assets/{variant-calendar-erhHGjtK.js → variant-calendar-CouSe9-U.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Wr5FnjMg.js → view-mode-toggle-DI97LcTH.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/block-document-pbbZw2CP.js +0 -3
- package/dist/client/assets/collection-detail-DZbpwovT.js +0 -1
- package/dist/client/assets/commerce-onboarding-BMEY1DKe.js +0 -1
- package/dist/client/assets/page-seo-sheet-CPcGy_lc.js +0 -1
- package/dist/client/assets/project-app-view-Dp8aqKn9.js +0 -1
- package/dist/client/assets/record-editor-DNp_YJwU.js +0 -1
- package/dist/client/assets/registry-bT72xUUs.js +0 -2
- package/dist/client/assets/roles-CiGDH8Hn.js +0 -1
- package/dist/client/assets/store-registry-C2gPY7Xh.js +0 -2
- package/dist/client/assets/useInfiniteQuery-C6O0Jfl2.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DrfctcYn.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as oe,b as ae,F as re,o as de,r as ce,K as ie,n as me,e as X,q as ge,t as N,j as s,B as te}from"./index-
|
|
1
|
+
import{c as oe,b as ae,F as re,o as de,r as ce,K as ie,n as me,e as X,q as ge,t as N,j as s,B as te}from"./index-CpcKMJHf.js";import{u as ue}from"./studio-tools-D5s2iCWq.js";import{b as fe,a as xe,S as Se}from"./settings-section-CJRUKep2.js";import{B as ne}from"./badge-BHUFjOp2.js";import{I as je}from"./input-CfMu9dzk.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-Du6tz3kh.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function Re(){const e=oe.c(101),t=ae(),{org:o}=re(),p=de(),i=ue(),[r,v]=ce.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=me(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ge("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const d=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let b;e[27]!==t?(b=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=b):b=e[28];let U;e[29]!==b||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:b},e[29]=b,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let O;e[33]!==i?(O=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=O):O=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==O||e[41]!==y||e[42]!==E?(Y={mutationFn:O,onSuccess:y,onError:E},e[40]=O,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let q;e[59]!==t?(q=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=q):q=e[60];let F;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],F=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=F}else F=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let k;e[73]!==t?(k=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=k):k=e[74];let z;e[75]!==r||e[76]!==k?(z=s.jsx(je,{value:r,onChange:J,placeholder:k,className:"max-w-xs"}),e[75]=r,e[76]=k,e[77]=z):z=e[77];let w;e[78]!==d||e[79]!==r?(w=()=>d.mutate(r.trim()),e[78]=d,e[79]=r,e[80]=w):w=e[80];let G;e[81]!==d.isPending||e[82]!==r?(G=!r.trim()||d.isPending,e[81]=d.isPending,e[82]=r,e[83]=G):G=e[83];let Z;e[84]!==d.isPending||e[85]!==t?(Z=d.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=d.isPending,e[85]=t,e[86]=Z):Z=e[86];let B;e[87]!==w||e[88]!==G||e[89]!==Z?(B=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:Z}),e[87]=w,e[88]=G,e[89]=Z,e[90]=B):B=e[90];let H;e[91]!==z||e[92]!==B?(H=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[z,B]}),e[91]=z,e[92]=B,e[93]=H):H=e[93];let K;e[94]!==F||e[95]!==H?(K=s.jsxs(xe,{children:[F,H]}),e[94]=F,e[95]=H,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==q||e[99]!==K?(W=s.jsx(Se,{title:V,description:q,children:K}),e[97]=V,e[98]=q,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let r;t[0]!==i?(r=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=r):r=t[1];const v=r;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let d;return t[31]!==j||t[32]!==m?(d=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=d):d=t[33],d}export{Re as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,j as s,cu as i,m as c}from"./index-
|
|
1
|
+
import{c as d,j as s,cu as i,m as c}from"./index-CpcKMJHf.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(w,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(m,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,j as i,dG as f,dH as m,m as u,dI as g,dJ as x,dK as v,dL as b,dM as h,dN as w,dO as j,dP as N,dQ as z,dR as _,dS as y,dT as p}from"./index-
|
|
1
|
+
import{c,j as i,dG as f,dH as m,m as u,dI as g,dJ as x,dK as v,dL as b,dM as h,dN as w,dO as j,dP as N,dQ as z,dR as _,dS as y,dT as p}from"./index-CpcKMJHf.js";import{i as $}from"./Check-BWvX1ZXX.js";import{i as D}from"./ChevronRight-C0U1fSzL.js";import{a as M}from"./DotsVertical-DXSJrP0z.js";function C(a){const e=c.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=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.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=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function G(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function L(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function O(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function E(a){const e=c.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=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function H(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function J(a){const e=c.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 o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function K(a){const e=c.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=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function Q(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function q(a){const e=c.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 o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{T as D,L as a,G as b,C as c,H as d,K as e,Q as f,q as g,E as h,P as i,J as j,O as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,m as N,j as t}from"./index-
|
|
1
|
+
import{c as v,m as N,j as t}from"./index-CpcKMJHf.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-center text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-CpcKMJHf.js";import{W as T,j as O}from"./use-mcp-client-DDmvok5R.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function q(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function B(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function J(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function Q(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let j="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",G=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=j[n[t]&63];return e};function $(t){return`${t}_${G()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function X(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:$("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,Q as c,J as d,X as e,B as f,$ as g,q as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as se,b as $e,r as u,j as r,k as fe,B as Me,e4 as Yt,aP as Jt,aV as xe,e5 as Zt,e6 as en,e7 as tn,e8 as nn,bK as rn,e9 as on,ea as lt,aR as sn,eb as an,ec as ln,ed as cn,ee as dn,ef as un,eg as fn,eh as pn,ei as mn,ej as xn,m as le,o as hn,t as ne,K as Ze}from"./index-BaeEjqV7.js";import{F as gn,l as bn}from"./index-CyNeJz90.js";import{h as yn,aM as vn,aN as Cn}from"./agent-icon-DJ-fLRqx.js";import{s as wn}from"./XClose-Ckol2oql.js";import{m as Nn}from"./automation-runs-C5OD2vNu.js";import{b as et,T as tt,a as nt}from"./tooltip-D9NGFdPV.js";import{b as jn}from"./chat-context-BpdINg7c.js";import{u as En}from"./shell-layout-DlEDxOSH.js";import{s as we,a as rt,f as Sn}from"./index-BhPaswkE.js";import{b as Mn,h as Dn,a as Rn,c as Tn,d as Pn,e as kn}from"./dialog-CwEHiSMU.js";import{I as ot}from"./input-PlhR5OQl.js";import{A as Fn,a as An,b as On,c as Ln,g as In,d as Kn,e as $n,f as zn}from"./alert-dialog-S-vKrHdP.js";import{t as _n}from"./ChevronDown-D19e4E2W.js";import{i as Gn}from"./ChevronRight-DMiFqEFB.js";import{a as Bn}from"./ZoomOut-IrGAWsFW.js";import{w as Vn,E as Un,x as Fe,y as Ae,z as Hn,A as Wn,C as qn,D as Qn,G as re,I as Ne,J as Oe,K as je,g as Le,M as Ie,N as Xn,s as Yn,O as Jn,P as Ee,Q as Ke,U as Zn,V as er,W as tr,X as nr}from"./index-BGTjziYz.js";import"./AlertCircle-DHJMAy0z.js";import"./Tool01-BsH7bOGE.js";import"./ArrowUp-BEvOvB39.js";import"./Settings02-Dg48gy-m.js";import"./Tool02-CpEmuwVJ.js";import"./ArrowRight-ZH8AfOrt.js";import"./ArrowUpRight-CB2lmsga.js";import"./TrendUp01-DFaJzXrF.js";import"./ZapSquare-CdnVBk-J.js";import"./Users03-Dqh1PO2N.js";import"./CheckCircle-8lNaIJZX.js";import"./Check-8S_h-pNf.js";import"./ChevronUp-CDr-5amA.js";import"./DotsVertical-Ddcp5zYy.js";import"./Stars02-DF0mhAvh.js";import"./Copy01-CVgcePVg.js";import"./Globe01-ByEypwqT.js";import"./Eye-DjxTeGvc.js";import"./FilterLines-sMM8U03Q.js";import"./Star01-DBzet7vh.js";import"./Globe04-CLktRX73.js";import"./SwitchHorizontal01-g8c5_DAA.js";import"./HardDrive-LZLUcrQT.js";import"./Image01-BC4H1plu.js";import"./Key01-BJ5pxmk5.js";import"./LayoutLeft-BY0vokwF.js";import"./XCircle-Cv1eNWoM.js";import"./LinkExternal01-BE6iPh6Z.js";import"./Monitor01-D5bQ7ld2.js";import"./Sun-DWQi7hi9.js";import"./Package-Dgaviqf5.js";import"./Palette-BLetgCYz.js";import"./Play-D4uEf4_3.js";import"./Plus-B99BOqFt.js";import"./SearchLg-0vJ_NGT1.js";import"./SearchMd--QTHPVfW.js";import"./Shield01-XjAbmrcl.js";import"./Stars01-DBeF8eO9.js";import"./Trash01-sz1B1ubO.js";import"./Upload01-DZkj6_Us.js";import"./User01-Cy4n4fwd.js";import"./Users01-CiJE_Dg-.js";import"./X-BFNxuShY.js";import"./Zap-DTU6QUr-.js";import"./select-BHlpCdw9.js";import"./useInfiniteQuery-C6O0Jfl2.js";import"./use-infinite-scroll-Czt7JOf8.js";import"./use-connection-DpuO4fNw.js";import"./use-mcp-client-tcmKmN21.js";import"./auth-LsRMSxpZ.js";import"./use-virtual-mcp-MeqW96-1.js";import"./card-CGoHKQKX.js";import"./sidebar-BT5oq5Py.js";import"./use-mobile-2yLfYt8o.js";import"./table-BO7AXCJj.js";import"./empty-state--30EXuZG.js";import"./use-members-atWSP-WF.js";import"./use-org-auth-client-CF9Xv674.js";import"./use-clock-tick-BRgf5NQf.js";import"./use-automations-Vb2lhz9-.js";import"./studio-tools-BSpHTnkI.js";import"./useSuspenseInfiniteQuery-DrfctcYn.js";import"./avatar-CDCXeyeq.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BeT4l9EL.js";import"./file-type-icon-P_pN9_xH.js";import"./tab-id-BijBBRwE.js";import"./hooks-Dcj3etNr.js";import"./decopilot-sse-pool-DlsoDrW9.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-BkhNLbLQ.js";import"./index-BELfS11E.js";import"./calendar-CIg2EEBJ.js";import"./integration-icon-DmDjDu1T.js";import"./use-navigate-to-agent-BAhIUAJc.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BP3LRAVY.js";import"./form-5ox058mH.js";import"./label-Dgx54R9B.js";import"./autosend-DwCcNXOp.js";import"./use-ai-providers-BQWD6Fbv.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-B2udrR1E.js";import"./use-organization-settings-Coxn0MdD.js";import"./required-auth-layout-BZ6DGJsb.js";import"./use-org-sso-D55i4f0_.js";import"./drawer-NqC3cUty.js";import"./collection-search-DT4BSCdW.js";import"./index-C9qzt0Jn.js";import"./get-initials-D-f_fDFw.js";import"./popover-Cc-bUxo9.js";import"./use-registry-app-hSt4mgU8.js";import"./use-mcp-tools-DIqHvolA.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-ccpCvQUL.js";import"./mcp-oauth-uiWOIXGl.js";import"./extract-connection-data-5mcb4Mog.js";import"./dropdown-menu-Dui6084c.js";import"./command-KNTOL3kj.js";import"./index-Cr82fBda.js";import"./companions-core-FTf4qGMY.js";import"./tabs-BOn-uUO8.js";import"./toggle-group-Bp5y9M5o.js";import"./use-deco-credits-BICXIEvI.js";import"./connection-card-Dbj_E-0a.js";import"./use-registry-connections-Mt2VCkjn.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-2FS82hTt.js";import"./connection-form-helpers-D0VhJo5T.js";import"./collection-tabs-CG0FZsKM.js";import"./badge-CLbg8brP.js";import"./connect-desktop-dialog-BoS5Hu9R.js";import"./select-model-DiTMTOsS.js";import"./checkbox-DiEGmfR1.js";import"./skeleton-DR0dV7Rx.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DYCGsxoQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BADjzMyd.js";import"./toolbar-lB-S2vpV.js";import"./use-capability-COYHR3-p.js";import"./toolbar-icon-button-BX6tvqZL.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-CRjEG81o.js";import"./index-C6ytuOGZ.js";import"./search-input-CXhpX-Xz.js";import"./use-mcp-auth-status-CnFSrLEj.js";import"./switch-DNcfs8uV.js";import"./github-repo-picker-BqET8_zQ.js";import"./use-debounced-value-NzmZPT1j.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-CgXohDMi.js";import"./use-file-configs-BxxfQuJb.js";import"./automation-list-row-B36cFYnc.js";const rr={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function or(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:p,isPending:h,onSubmit:x,onOpenChange:C}=i,w=l===void 0?"":l,d=h===void 0?!1:h,m=$e(),[g,S]=u.useState(w),[I,U]=u.useState(s),b=rr[a];s!==I&&(U(s),s&&S(w));let y;e[0]!==d||e[1]!==C?(y=L=>{!L&&!d&&C(!1)},e[0]=d,e[1]=C,e[2]=y):y=e[2];const M=y;let D;e[3]!==d||e[4]!==g||e[5]!==x?(D=async L=>{L.preventDefault();const ee=g.trim();!ee||d||await x(ee)},e[3]=d,e[4]=g,e[5]=x,e[6]=D):D=e[6];const P=D;let j;e[7]!==b.titleKey||e[8]!==m?(j=m(b.titleKey),e[7]=b.titleKey,e[8]=m,e[9]=j):j=e[9];let E;e[10]!==j?(E=r.jsx(Mn,{children:j}),e[10]=j,e[11]=E):E=e[11];let K;e[12]!==b.descriptionKey||e[13]!==m?(K=m(b.descriptionKey),e[12]=b.descriptionKey,e[13]=m,e[14]=K):K=e[14];let q;e[15]!==K?(q=r.jsx(Dn,{children:K}),e[15]=K,e[16]=q):q=e[16];let k;e[17]!==E||e[18]!==q?(k=r.jsxs(Rn,{children:[E,q]}),e[17]=E,e[18]=q,e[19]=k):k=e[19];let Q;e[20]!==p||e[21]!==m?(Q=p&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:p,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=p,e[21]=m,e[22]=Q):Q=e[22];let H;e[23]!==m?(H=m("sandbox.fileExplorerNameDialog.name"),e[23]=m,e[24]=H):H=e[24];let $;e[25]!==H?($=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:H}),e[25]=H,e[26]=$):$=e[26];let te;e[27]===Symbol.for("react.memo_cache_sentinel")?(te=L=>S(L.target.value),e[27]=te):te=e[27];let X;e[28]!==b.placeholderKey||e[29]!==m?(X=m(b.placeholderKey),e[28]=b.placeholderKey,e[29]=m,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:te,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let z;e[35]!==$||e[36]!==Y?(z=r.jsxs("div",{className:"space-y-1.5",children:[$,Y]}),e[35]=$,e[36]=Y,e[37]=z):z=e[37];let F;e[38]!==Q||e[39]!==z?(F=r.jsxs("div",{className:"space-y-4 py-4",children:[Q,z]}),e[38]=Q,e[39]=z,e[40]=F):F=e[40];let W;e[41]!==C?(W=()=>C(!1),e[41]=C,e[42]=W):W=e[42];let A;e[43]!==m?(A=m("sandbox.fileExplorerNameDialog.cancel"),e[43]=m,e[44]=A):A=e[44];let O;e[45]!==d||e[46]!==W||e[47]!==A?(O=r.jsx(Me,{type:"button",variant:"outline",onClick:W,disabled:d,children:A}),e[45]=d,e[46]=W,e[47]=A,e[48]=O):O=e[48];let _;e[49]!==d||e[50]!==g?(_=!g.trim()||d,e[49]=d,e[50]=g,e[51]=_):_=e[51];let R;e[52]!==b.submitKey||e[53]!==d||e[54]!==m?(R=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),m("sandbox.fileExplorerNameDialog.saving")]}):m(b.submitKey),e[52]=b.submitKey,e[53]=d,e[54]=m,e[55]=R):R=e[55];let G;e[56]!==_||e[57]!==R?(G=r.jsx(Me,{type:"submit",disabled:_,children:R}),e[56]=_,e[57]=R,e[58]=G):G=e[58];let T;e[59]!==O||e[60]!==G?(T=r.jsxs(Tn,{children:[O,G]}),e[59]=O,e[60]=G,e[61]=T):T=e[61];let B;e[62]!==P||e[63]!==F||e[64]!==T||e[65]!==k?(B=r.jsx(Pn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:P,children:[k,F,T]})}),e[62]=P,e[63]=F,e[64]=T,e[65]=k,e[66]=B):B=e[66];let Z;return e[67]!==M||e[68]!==s||e[69]!==B?(Z=r.jsx(kn,{open:s,onOpenChange:M,children:B}),e[67]=M,e[68]=s,e[69]=B,e[70]=Z):Z=e[70],Z}function sr(i){const e=se.c(31),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:p,onConfirm:h}=i,x=s!==null,C=s?.kind==="directory"?"folder":"file";let w;e[0]!==C?(w=r.jsxs(Fn,{children:["Delete ",C,"?"]}),e[0]=C,e[1]=w):w=e[1];const d=s?.name;let m;e[2]!==d?(m=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=m):m=e[3];const g=s?.kind==="directory"?" and everything inside it.":".";let S;e[4]!==a.length?(S=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=S):S=e[5];let I;e[6]!==m||e[7]!==g||e[8]!==S?(I=r.jsxs(An,{children:["This will permanently delete"," ",m,g,S]}),e[6]=m,e[7]=g,e[8]=S,e[9]=I):I=e[9];let U;e[10]!==w||e[11]!==I?(U=r.jsxs(On,{children:[w,I]}),e[10]=w,e[11]=I,e[12]=U):U=e[12];let b;e[13]!==l?(b=r.jsx(Ln,{disabled:l,children:"Cancel"}),e[13]=l,e[14]=b):b=e[14];const y=l||!s;let M;e[15]!==s||e[16]!==h?(M=K=>{K.preventDefault(),s&&h(s)},e[15]=s,e[16]=h,e[17]=M):M=e[17];let D;e[18]!==y||e[19]!==M?(D=r.jsx(In,{disabled:y,onClick:M,children:"Delete"}),e[18]=y,e[19]=M,e[20]=D):D=e[20];let P;e[21]!==b||e[22]!==D?(P=r.jsxs(Kn,{children:[b,D]}),e[21]=b,e[22]=D,e[23]=P):P=e[23];let j;e[24]!==P||e[25]!==U?(j=r.jsxs($n,{children:[U,P]}),e[24]=P,e[25]=U,e[26]=j):j=e[26];let E;return e[27]!==p||e[28]!==x||e[29]!==j?(E=r.jsx(zn,{open:x,onOpenChange:p,children:j}),e[27]=p,e[28]=x,e[29]=j,e[30]=E):E=e[30],E}var ze="ContextMenu",[ar]=sn(ze,[lt]),J=lt(),[ir,ct]=ar(ze),dt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:p=!0}=i,[h,x]=u.useState(!1),C=J(e),w=rn(a),d=u.useCallback(m=>{x(m),w(m)},[w]);return r.jsx(ir,{scope:e,open:h,onOpenChange:d,modal:p,children:r.jsx(on,{...C,dir:l,open:h,onOpenChange:d,modal:p,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,p=ct(ut,s),h=J(s),x=u.useRef({x:0,y:0}),C=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...x.current})}),w=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(w.current),[]),m=g=>{x.current={x:g.clientX,y:g.clientY},p.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Yt,{...h,virtualRef:C}),r.jsx(Jt.span,{"data-state":p.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:xe(i.onContextMenu,g=>{d(),m(g),g.preventDefault()}),onPointerDown:a?i.onPointerDown:xe(i.onPointerDown,Se(g=>{d(),w.current=window.setTimeout(()=>m(g),700)})),onPointerMove:a?i.onPointerMove:xe(i.onPointerMove,Se(d)),onPointerCancel:a?i.onPointerCancel:xe(i.onPointerCancel,Se(d)),onPointerUp:a?i.onPointerUp:xe(i.onPointerUp,Se(d))})]})});ft.displayName=ut;var lr="ContextMenuPortal",pt=i=>{const{__scopeContextMenu:e,...s}=i,a=J(e);return r.jsx(tn,{...a,...s})};pt.displayName=lr;var mt="ContextMenuContent",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ct(mt,s),p=J(s),h=u.useRef(!1);return r.jsx(nn,{...p,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:x=>{i.onCloseAutoFocus?.(x),!x.defaultPrevented&&h.current&&x.preventDefault(),h.current=!1},onInteractOutside:x=>{i.onInteractOutside?.(x),!x.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xt.displayName=mt;var cr="ContextMenuGroup",dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(an,{...l,...a,ref:e})});dr.displayName=cr;var ur="ContextMenuLabel",fr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(ln,{...l,...a,ref:e})});fr.displayName=ur;var pr="ContextMenuItem",ht=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(Zt,{...l,...a,ref:e})});ht.displayName=pr;var mr="ContextMenuCheckboxItem",xr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(cn,{...l,...a,ref:e})});xr.displayName=mr;var hr="ContextMenuRadioGroup",gr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(dn,{...l,...a,ref:e})});gr.displayName=hr;var br="ContextMenuRadioItem",yr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(un,{...l,...a,ref:e})});yr.displayName=br;var vr="ContextMenuItemIndicator",Cr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(fn,{...l,...a,ref:e})});Cr.displayName=vr;var wr="ContextMenuSeparator",gt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(en,{...l,...a,ref:e})});gt.displayName=wr;var Nr="ContextMenuArrow",jr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(pn,{...l,...a,ref:e})});jr.displayName=Nr;var Er="ContextMenuSubTrigger",Sr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(mn,{...l,...a,ref:e})});Sr.displayName=Er;var Mr="ContextMenuSubContent",Dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(xn,{...l,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dr.displayName=Mr;function Se(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Rr=dt,Tr=ft,Pr=pt,kr=xt,Fr=ht,Ar=gt;function Or(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Rr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Lr(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Tr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ir(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let p;return e[5]!==a||e[6]!==l?(p=r.jsx(Pr,{children:r.jsx(kr,{"data-slot":"context-menu-content",className:l,...a})}),e[5]=a,e[6]=l,e[7]=p):p=e[7],p}function ue(i){const e=se.c(12);let s,a,l,p;e[0]!==i?({className:s,inset:a,variant:p,...l}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=p):(s=e[1],a=e[2],l=e[3],p=e[4]);const h=p===void 0?"default":p;let x;e[5]!==s?(x=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=x):x=e[6];let C;return e[7]!==a||e[8]!==l||e[9]!==x||e[10]!==h?(C=r.jsx(Fr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:x,...l}),e[7]=a,e[8]=l,e[9]=x,e[10]=h,e[11]=C):C=e[11],C}function st(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let p;return e[5]!==a||e[6]!==l?(p=r.jsx(Ar,{"data-slot":"context-menu-separator",className:l,...a}),e[5]=a,e[6]=l,e[7]=p):p=e[7],p}const Kr="#d9a441";function $r(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:p,isLoading:h,fileVisual:x,onOpen:C,onSelect:w,onNewFile:d,onNewFolder:m,onCopyPath:g,onCopyRelativePath:S,onRename:I,onDelete:U}=i,b=h===void 0?!1:h,y=$e(),M=s.kind==="directory",{Icon:D,color:P}=x,j=p&&"bg-accent";let E;e[0]!==j?(E=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",j),e[0]=j,e[1]=E):E=e[1];const K=`${a*14+8}px`;let q;e[2]!==K?(q={paddingLeft:K},e[2]=K,e[3]=q):q=e[3];let k;e[4]!==C||e[5]!==w?(k=()=>{w(),C()},e[4]=C,e[5]=w,e[6]=k):k=e[6];let Q;e[7]!==D||e[8]!==P||e[9]!==M||e[10]!==l||e[11]!==b?(Q=M?r.jsxs(r.Fragment,{children:[b?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(_n,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(Gn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Bn,{size:16,className:"shrink-0",style:{color:Kr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(D,{size:16,className:"shrink-0",style:{color:P}})]}),e[7]=D,e[8]=P,e[9]=M,e[10]=l,e[11]=b,e[12]=Q):Q=e[12];let H;e[13]!==s.name?(H=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=H):H=e[14];let $;e[15]!==E||e[16]!==q||e[17]!==k||e[18]!==Q||e[19]!==H?($=r.jsx(Lr,{asChild:!0,children:r.jsxs("button",{type:"button",className:E,style:q,onClick:k,children:[Q,H]})}),e[15]=E,e[16]=q,e[17]=k,e[18]=Q,e[19]=H,e[20]=$):$=e[20];let te;e[21]!==y?(te=y("sandbox.fileTreeRow.newFile"),e[21]=y,e[22]=te):te=e[22];let X;e[23]!==d||e[24]!==te?(X=r.jsx(ue,{onSelect:d,children:te}),e[23]=d,e[24]=te,e[25]=X):X=e[25];let Y;e[26]!==y?(Y=y("sandbox.fileTreeRow.newFolder"),e[26]=y,e[27]=Y):Y=e[27];let z;e[28]!==m||e[29]!==Y?(z=r.jsx(ue,{onSelect:m,children:Y}),e[28]=m,e[29]=Y,e[30]=z):z=e[30];let F;e[31]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(st,{}),e[31]=F):F=e[31];let W;e[32]!==y?(W=y("sandbox.fileTreeRow.copyPath"),e[32]=y,e[33]=W):W=e[33];let A;e[34]!==g||e[35]!==W?(A=r.jsx(ue,{onSelect:g,children:W}),e[34]=g,e[35]=W,e[36]=A):A=e[36];let O;e[37]!==y?(O=y("sandbox.fileTreeRow.copyRelativePath"),e[37]=y,e[38]=O):O=e[38];let _;e[39]!==S||e[40]!==O?(_=r.jsx(ue,{onSelect:S,children:O}),e[39]=S,e[40]=O,e[41]=_):_=e[41];let R;e[42]===Symbol.for("react.memo_cache_sentinel")?(R=r.jsx(st,{}),e[42]=R):R=e[42];let G;e[43]!==y?(G=y("sandbox.fileTreeRow.rename"),e[43]=y,e[44]=G):G=e[44];let T;e[45]!==I||e[46]!==G?(T=r.jsx(ue,{onSelect:I,children:G}),e[45]=I,e[46]=G,e[47]=T):T=e[47];let B;e[48]!==y?(B=y("sandbox.fileTreeRow.delete"),e[48]=y,e[49]=B):B=e[49];let Z;e[50]!==U||e[51]!==B?(Z=r.jsx(ue,{variant:"destructive",onSelect:U,children:B}),e[50]=U,e[51]=B,e[52]=Z):Z=e[52];let L;e[53]!==X||e[54]!==z||e[55]!==A||e[56]!==_||e[57]!==T||e[58]!==Z?(L=r.jsxs(Ir,{className:"w-52",children:[X,z,F,A,_,R,T,Z]}),e[53]=X,e[54]=z,e[55]=A,e[56]=_,e[57]=T,e[58]=Z,e[59]=L):L=e[59];let ee;return e[60]!==L||e[61]!==$?(ee=r.jsxs(Or,{children:[$,L]}),e[60]=L,e[61]=$,e[62]=ee):ee=e[62],ee}bn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const at=200,zr=2,_r=250,it=200;function Gr(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Br(i){const e=se.c(9),{text:s,query:a}=i;let l,p,h;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:C,segments:w}=Xn(s,a);l="truncate font-mono text-muted-foreground",p=C&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=w.map(Vr),e[0]=a,e[1]=s,e[2]=l,e[3]=p,e[4]=h}else l=e[2],p=e[3],h=e[4];let x;return e[5]!==l||e[6]!==p||e[7]!==h?(x=r.jsxs("span",{className:l,children:[p,h]}),e[5]=l,e[6]=p,e[7]=h,e[8]=x):x=e[8],x}function Vr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function Ia({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[l,p]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:x}=l,[C,w]=u.useState(new Set),[d,m]=u.useState(null),[g,S]=u.useState(null),[I,U]=u.useState([]),[b,y]=u.useState(""),[M,D]=u.useState(null),[P,j]=u.useState(null),[E,K]=u.useState(!1),[q,k]=u.useState(!1),[Q,H]=u.useState(!1),[$,te]=u.useState(!1),[,X]=u.useState(new Set),[Y,z]=u.useState(new Set),F=u.useRef(0),W=u.useRef(null),A=u.useRef(new Set),O=u.useRef(new Map),_=u.useRef(null),R=u.useRef(0),G=u.useRef(null),T=u.useRef(null),B=u.useRef(null);function Z(t){X(n=>{const o=typeof t=="function"?t(n):t;return A.current=o,o})}const[L,ee]=u.useState(new Map),De=u.useRef(null),[ae,he]=u.useState(null),{sendMessage:bt}=jn(),{openSidePanel:yt}=En(),ge=hn(),[V,oe]=u.useState(null),[Re,Te]=u.useState(null),[be,ye]=u.useState(!1);async function ie(t,n){const o=await fetch(Gr(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function ve(){ge.invalidateQueries({queryKey:rt(i,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function vt(t){const n=tr(t);if(!n)return;const o=`${i}/${e}/${s}`;ge.setQueryData(Ze.decofile(o),c=>{if(!c)return c;const{[n]:f,...v}=c;return v}),ge.invalidateQueries({queryKey:Ze.liveMeta(i,e,s)})}function Ct(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ne(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function wt(t){const n=Ne(t);return I.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=L.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){U(n=>n.map(o=>t(o)).filter(o=>o!==null)),m(n=>n&&t(n)),ee(n=>{const o=new Map;for(const[c,f]of n){const v=t(c);v&&o.set(v,f)}return o}),S(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Nt(t){const n=Ne(t);S(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!V)return;const o=Ee(V.parentDir,n);if(Ke(o,h,x))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await pe(),await ve(),oe(null),me(o)}async function Et(t,n){if(!V)return;const o=Ee(V.parentDir,n);if(Ke(o,h,x))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),p(f=>({...f,directories:f.directories.includes(c)?f.directories:[...f.directories,c]})),await pe(),await ve(),oe(null),w(f=>{const v=new Set(f);for(const ce of Ae(o))v.add(ce);return v.add(o),v}),S({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!V)return;const o=V.node.path,c=je(o),f=Ee(c,n);if(f===o){oe(null);return}if(Ke(f,h,x))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(f)}),Ge(v=>v===o?f:v.startsWith(`${o}/`)?Ee(f,v.slice(o.length+1)):v),await pe(),await ve(),oe(null)}async function Mt(t,n){ye(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Ct(n),Nt(n.path),await pe(),await ve(),Te(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Dt(t,n){const o=Jn(n);if(o){ne.error(o);return}ye(!0);try{V?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):V?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):V?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,W.current=pe());const[Rt,Tt]=u.useState(null),N=$e();if(a&&a!==Rt){Tt(a);const t=a;queueMicrotask(()=>{Vn(t)&&me(t).catch(n=>{ne.error(n instanceof Error?n.message:N("sandbox.fileExplorer.failedToOpenFile"))})})}async function Pe(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,o){if(o!==F.current)return!1;let c=!1;return p(f=>{const v=n?nr(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!v.truncated,{files:v.files,directories:v.directories,truncated:c}}),c&&ne.warning(N("sandbox.fileExplorer.fileListTruncated")),c}async function Pt(t){const n=O.current.get(t);if(n)return n;const o=F.current,c=(async()=>{const f=await Pe({pattern:"**/*",path:re(t),limit:Fe}),v=Ve(f,!0,o);return!v&&o===F.current&&Z(ce=>{const Ce=new Set(ce);return Ce.add(t),Ce}),v})();O.current.set(t,c);try{return await c}finally{O.current.delete(t)}}async function Ue(t){if(!Ie(t,A.current))return!1;z(n=>new Set(n).add(t));try{return await Pt(t)}finally{z(n=>{const o=new Set(n);return o.delete(t),o})}}async function kt(t,n){const o=new Set(A.current);for(const c of Ae(n)){if(!Ie(c,o))continue;if(await Ue(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++F.current;G.current=null,T.current=null,O.current.clear(),H(!0),Z(new Set),w(new Set),z(new Set);try{const n=await Pe({pattern:"**/*",limit:Fe,maxDepth:Un});Ve(n,!1,t),te(!0)}catch{$&&ne.error(N("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function He(t){if(!L.get(t)?.loaded){ee(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=Yn(o.content??"");ee(f=>{const v=new Map(f);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Ft(){R.current++,D(null),j(null),K(!1),k(!1)}async function At(){const t=F.current,n=G.current;if(n&&n.generation===t)return n.files;const o=T.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const f=await Pe({pattern:"**/*",limit:Fe});return F.current===t&&(G.current={generation:t,files:f.files}),f.files})();T.current={generation:t,promise:c};try{return await c}finally{T.current?.generation===t&&(T.current=null)}}async function Ot(t,n){try{const o=await At();if(n!==R.current)return;D(Zn(o,t,it))}catch{if(n!==R.current)return;D([])}}async function Lt(t,n){K(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:at});if(n!==R.current)return;j(er(o.results??"")),k((o.matchCount??0)>=at)}catch{if(n!==R.current)return;j([]),k(!1)}finally{n===R.current&&K(!1)}}function It(t){const n=t.trim(),o=++R.current;Ot(n,o),n.length<zr?(j(null),K(!1),k(!1)):Lt(n,o)}function Kt(t){if(y(t),_.current&&clearTimeout(_.current),!t.trim()){Ft();return}_.current=setTimeout(()=>{It(t)},_r)}function We(t){const n=B.current;if(!n||n.path!==d)return;B.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function $t(t){B.current={path:t.path,line:t.line};const n=d===t.path&&L.get(t.path)?.loaded;me(t.path),n&&De.current&&We(De.current)}async function zt(t,n){try{await ie("write",{path:re(t),content:n}),we("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(i,e,s)});try{const o=await Sn(i,e,s);we("git status after save",o)}catch(o){we("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}ee(o=>{const c=new Map(o),f=c.get(t);return f&&c.set(t,{...f,savedContent:n}),c})}catch(o){we("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){m(t),S({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),I.includes(t)||U(n=>[...n,t]),He(t)}function Gt(t){U(n=>{const o=n.filter(c=>c!==t);return d===t&&m(o[o.length-1]??null),o}),ee(n=>{const o=new Map(n);return o.delete(t),o})}function qe(t){w(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if(Ie(t,A.current))try{if(await Ue(t))return}catch(n){ne.error(n instanceof Error?n.message:N("sandbox.fileExplorer.failedToLoadFolder"));return}qe(t)}async function Vt(t,n){if(n){qe(t);return}await Bt(t)}async function me(t){await W.current,await kt(N,t);const n=Ae(t);w(o=>{const c=new Set(o);for(const f of n)c.add(f);return c}),_t(t)}function Ut(){return g?.kind==="directory"?g.path:g?.kind==="file"?je(g.path):d?je(d):"/"}function Qe(t){const n=Ut();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Ht=Hn(h,x),Xe=Wn(Ht,C),ke=M?.length??0,Ye=qn(P??[]),Je=P?.length??0,de=d?L.get(d):null,Wt=de?.loaded&&de.editorValue!==de.savedContent,qt=Re?wt(Re.path):[],Qt=(t,n)=>{De.current=t,We(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const f=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function Xt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Le(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
|
|
1
|
+
import{c as se,b as $e,r as u,j as r,k as fe,B as Me,e4 as Yt,aP as Jt,aV as xe,e5 as Zt,e6 as en,e7 as tn,e8 as nn,bK as rn,e9 as on,ea as lt,aR as sn,eb as an,ec as ln,ed as cn,ee as dn,ef as un,eg as fn,eh as pn,ei as mn,ej as xn,m as le,o as hn,t as ne,K as Ze}from"./index-CpcKMJHf.js";import{F as gn,l as bn}from"./index-C5XDTn-4.js";import{h as yn,aM as vn,aN as Cn}from"./agent-icon-DclSthKR.js";import{s as wn}from"./XClose-EYXyD43I.js";import{m as Nn}from"./automation-runs-DYLrph2F.js";import{b as et,T as tt,a as nt}from"./tooltip-D8I4xgP8.js";import{b as jn}from"./chat-context-DseDiNEh.js";import{u as En}from"./shell-layout-CKYTXHCu.js";import{s as we,a as rt,f as Sn}from"./index-DA0GYA6l.js";import{b as Mn,h as Dn,a as Rn,c as Tn,d as Pn,e as kn}from"./dialog-DflEsAVp.js";import{I as ot}from"./input-CfMu9dzk.js";import{A as Fn,a as An,b as On,c as Ln,g as In,d as Kn,e as $n,f as zn}from"./alert-dialog-C9TCdYEA.js";import{t as _n}from"./ChevronDown-CjhsyPt5.js";import{i as Gn}from"./ChevronRight-C0U1fSzL.js";import{a as Bn}from"./ZoomOut-_xCY1UeS.js";import{w as Vn,E as Un,x as Fe,y as Ae,z as Hn,A as Wn,C as qn,D as Qn,G as re,I as Ne,J as Oe,K as je,g as Le,M as Ie,N as Xn,s as Yn,O as Jn,P as Ee,Q as Ke,U as Zn,V as er,W as tr,X as nr}from"./index-CjUOg-D4.js";import"./AlertCircle-CE7GxjMO.js";import"./Tool01-D_3zbU3k.js";import"./ArrowUp-BsjWGQQe.js";import"./Settings02-htWR982a.js";import"./Tool02-DiUu9qs_.js";import"./ArrowRight-AiWOWM1Z.js";import"./ArrowUpRight-B2LSEvMX.js";import"./TrendUp01-DPzDlutQ.js";import"./ZapSquare-z-XJEPEB.js";import"./Users03-BWpBf_La.js";import"./CheckCircle-Cf21Bb8a.js";import"./Check-BWvX1ZXX.js";import"./ChevronUp-CJR37gbq.js";import"./DotsVertical-DXSJrP0z.js";import"./Stars02-CxJPie3_.js";import"./Copy01-B8tpQC9Q.js";import"./Globe01-BHWZq2K5.js";import"./Eye-CximEfBL.js";import"./FilterLines-CQAFehUr.js";import"./Star01-Dh17NHJI.js";import"./Globe04-Dw5Bsm8V.js";import"./SwitchHorizontal01-BwNckjDk.js";import"./HardDrive-CwNWMpvl.js";import"./Image01-BorH67fS.js";import"./Key01-Bjj-aLS5.js";import"./LayoutLeft-CxMDbMdN.js";import"./XCircle-D6dsYD0i.js";import"./LinkExternal01-DzfAn4aY.js";import"./Monitor01-B11z__w7.js";import"./Sun-DaIRBGtL.js";import"./Package-BkoPZ3tG.js";import"./Palette-RNOi-9O1.js";import"./Play-CL_a6mE6.js";import"./Plus-BiNu4BNf.js";import"./SearchLg-D8wz7WQH.js";import"./SearchMd-JyzroHdN.js";import"./Shield01-BVyqSeQM.js";import"./Stars01-BMXw5BeL.js";import"./Trash01-WLvc7qEr.js";import"./Upload01-Bx5CpiF6.js";import"./User01-CWpJwa6r.js";import"./Users01-ChKK2Tx6.js";import"./X-CfAlZN0E.js";import"./Zap-CieQ7Tpq.js";import"./select-Du6tz3kh.js";import"./useInfiniteQuery-DTsg_ujq.js";import"./use-infinite-scroll-vHSG7AxL.js";import"./use-connection-DbaNggp4.js";import"./use-mcp-client-DDmvok5R.js";import"./auth-D0JrqMBg.js";import"./use-virtual-mcp-D4AVSx6g.js";import"./card-eu6g3Ufc.js";import"./sidebar-BmhMU5lV.js";import"./use-mobile-BlZOnSdH.js";import"./table-D6cnU27A.js";import"./empty-state-DWA8aJpv.js";import"./use-members-WvOf4_vR.js";import"./use-org-auth-client-DOe1-YEw.js";import"./use-clock-tick-155i4HwF.js";import"./use-automations-DacHE3Xy.js";import"./studio-tools-D5s2iCWq.js";import"./useSuspenseInfiniteQuery-BBxTPEk3.js";import"./avatar-STUuRBeL.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BqB7SD7Y.js";import"./file-type-icon-CcQDNpN1.js";import"./tab-id-BijBBRwE.js";import"./hooks-D2X3VJWD.js";import"./decopilot-sse-pool-CHSNG2R3.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-B4H9BgjG.js";import"./index-CQUm4N48.js";import"./calendar-BitQQvMp.js";import"./integration-icon-C4RBZhRU.js";import"./use-navigate-to-agent-BJfnV5Hb.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-Czn9zcW2.js";import"./form-C6P3tBSr.js";import"./label-CrpJWAf1.js";import"./autosend-CdL93bdf.js";import"./use-ai-providers-Cmmx4PkW.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-CA5qoH7E.js";import"./use-organization-settings-C2Rlhb_g.js";import"./required-auth-layout-sdkajhxL.js";import"./use-org-sso-CLusgGXY.js";import"./drawer-g5OBTlHu.js";import"./collection-search-BfgDlrmR.js";import"./index-C7FdAm9g.js";import"./get-initials-D-f_fDFw.js";import"./popover-CrleXxNp.js";import"./use-registry-app-BkNbCzQ_.js";import"./use-mcp-tools-B71sSTr4.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-DxQCI97g.js";import"./mcp-oauth-CklKADlW.js";import"./extract-connection-data-BADrHucW.js";import"./dropdown-menu-Bn43QpEP.js";import"./command-q6wXbz-P.js";import"./index-CIUn1nKq.js";import"./companions-core-COK3zE1T.js";import"./tabs-DPZhfEpX.js";import"./toggle-group-C4W2MbVL.js";import"./use-deco-credits-CWim1XTX.js";import"./connection-card-3KsArvFb.js";import"./use-registry-connections-1FFiww3l.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-Xd9JewQa.js";import"./connection-form-helpers-CkWktsxW.js";import"./collection-tabs-CC2gd3e0.js";import"./badge-BHUFjOp2.js";import"./connect-desktop-dialog-DhAWxkv7.js";import"./select-model-CQmu7p41.js";import"./checkbox-BhnQvAdW.js";import"./skeleton-DTqxvLBu.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CJRUKep2.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BSx0lVm6.js";import"./toolbar-CihMw0LK.js";import"./use-capability-CPTz8Ujk.js";import"./toolbar-icon-button-C5qmOl3U.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-BZRkS_eh.js";import"./index-BxyxSts9.js";import"./search-input-DVmbIwSm.js";import"./use-mcp-auth-status-BqXsT5WV.js";import"./switch-CdtDoLmP.js";import"./github-repo-picker-BamRwZo6.js";import"./use-debounced-value-8smeSlAm.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-B8shAzNP.js";import"./use-file-configs-Y1J31dyQ.js";import"./automation-list-row-BRNOh7Fh.js";const rr={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function or(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:p,isPending:h,onSubmit:x,onOpenChange:C}=i,w=l===void 0?"":l,d=h===void 0?!1:h,m=$e(),[g,S]=u.useState(w),[I,U]=u.useState(s),b=rr[a];s!==I&&(U(s),s&&S(w));let y;e[0]!==d||e[1]!==C?(y=L=>{!L&&!d&&C(!1)},e[0]=d,e[1]=C,e[2]=y):y=e[2];const M=y;let D;e[3]!==d||e[4]!==g||e[5]!==x?(D=async L=>{L.preventDefault();const ee=g.trim();!ee||d||await x(ee)},e[3]=d,e[4]=g,e[5]=x,e[6]=D):D=e[6];const P=D;let j;e[7]!==b.titleKey||e[8]!==m?(j=m(b.titleKey),e[7]=b.titleKey,e[8]=m,e[9]=j):j=e[9];let E;e[10]!==j?(E=r.jsx(Mn,{children:j}),e[10]=j,e[11]=E):E=e[11];let K;e[12]!==b.descriptionKey||e[13]!==m?(K=m(b.descriptionKey),e[12]=b.descriptionKey,e[13]=m,e[14]=K):K=e[14];let q;e[15]!==K?(q=r.jsx(Dn,{children:K}),e[15]=K,e[16]=q):q=e[16];let k;e[17]!==E||e[18]!==q?(k=r.jsxs(Rn,{children:[E,q]}),e[17]=E,e[18]=q,e[19]=k):k=e[19];let Q;e[20]!==p||e[21]!==m?(Q=p&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:p,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=p,e[21]=m,e[22]=Q):Q=e[22];let H;e[23]!==m?(H=m("sandbox.fileExplorerNameDialog.name"),e[23]=m,e[24]=H):H=e[24];let $;e[25]!==H?($=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:H}),e[25]=H,e[26]=$):$=e[26];let te;e[27]===Symbol.for("react.memo_cache_sentinel")?(te=L=>S(L.target.value),e[27]=te):te=e[27];let X;e[28]!==b.placeholderKey||e[29]!==m?(X=m(b.placeholderKey),e[28]=b.placeholderKey,e[29]=m,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:te,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let z;e[35]!==$||e[36]!==Y?(z=r.jsxs("div",{className:"space-y-1.5",children:[$,Y]}),e[35]=$,e[36]=Y,e[37]=z):z=e[37];let F;e[38]!==Q||e[39]!==z?(F=r.jsxs("div",{className:"space-y-4 py-4",children:[Q,z]}),e[38]=Q,e[39]=z,e[40]=F):F=e[40];let W;e[41]!==C?(W=()=>C(!1),e[41]=C,e[42]=W):W=e[42];let A;e[43]!==m?(A=m("sandbox.fileExplorerNameDialog.cancel"),e[43]=m,e[44]=A):A=e[44];let O;e[45]!==d||e[46]!==W||e[47]!==A?(O=r.jsx(Me,{type:"button",variant:"outline",onClick:W,disabled:d,children:A}),e[45]=d,e[46]=W,e[47]=A,e[48]=O):O=e[48];let _;e[49]!==d||e[50]!==g?(_=!g.trim()||d,e[49]=d,e[50]=g,e[51]=_):_=e[51];let R;e[52]!==b.submitKey||e[53]!==d||e[54]!==m?(R=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),m("sandbox.fileExplorerNameDialog.saving")]}):m(b.submitKey),e[52]=b.submitKey,e[53]=d,e[54]=m,e[55]=R):R=e[55];let G;e[56]!==_||e[57]!==R?(G=r.jsx(Me,{type:"submit",disabled:_,children:R}),e[56]=_,e[57]=R,e[58]=G):G=e[58];let T;e[59]!==O||e[60]!==G?(T=r.jsxs(Tn,{children:[O,G]}),e[59]=O,e[60]=G,e[61]=T):T=e[61];let B;e[62]!==P||e[63]!==F||e[64]!==T||e[65]!==k?(B=r.jsx(Pn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:P,children:[k,F,T]})}),e[62]=P,e[63]=F,e[64]=T,e[65]=k,e[66]=B):B=e[66];let Z;return e[67]!==M||e[68]!==s||e[69]!==B?(Z=r.jsx(kn,{open:s,onOpenChange:M,children:B}),e[67]=M,e[68]=s,e[69]=B,e[70]=Z):Z=e[70],Z}function sr(i){const e=se.c(31),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:p,onConfirm:h}=i,x=s!==null,C=s?.kind==="directory"?"folder":"file";let w;e[0]!==C?(w=r.jsxs(Fn,{children:["Delete ",C,"?"]}),e[0]=C,e[1]=w):w=e[1];const d=s?.name;let m;e[2]!==d?(m=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=m):m=e[3];const g=s?.kind==="directory"?" and everything inside it.":".";let S;e[4]!==a.length?(S=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=S):S=e[5];let I;e[6]!==m||e[7]!==g||e[8]!==S?(I=r.jsxs(An,{children:["This will permanently delete"," ",m,g,S]}),e[6]=m,e[7]=g,e[8]=S,e[9]=I):I=e[9];let U;e[10]!==w||e[11]!==I?(U=r.jsxs(On,{children:[w,I]}),e[10]=w,e[11]=I,e[12]=U):U=e[12];let b;e[13]!==l?(b=r.jsx(Ln,{disabled:l,children:"Cancel"}),e[13]=l,e[14]=b):b=e[14];const y=l||!s;let M;e[15]!==s||e[16]!==h?(M=K=>{K.preventDefault(),s&&h(s)},e[15]=s,e[16]=h,e[17]=M):M=e[17];let D;e[18]!==y||e[19]!==M?(D=r.jsx(In,{disabled:y,onClick:M,children:"Delete"}),e[18]=y,e[19]=M,e[20]=D):D=e[20];let P;e[21]!==b||e[22]!==D?(P=r.jsxs(Kn,{children:[b,D]}),e[21]=b,e[22]=D,e[23]=P):P=e[23];let j;e[24]!==P||e[25]!==U?(j=r.jsxs($n,{children:[U,P]}),e[24]=P,e[25]=U,e[26]=j):j=e[26];let E;return e[27]!==p||e[28]!==x||e[29]!==j?(E=r.jsx(zn,{open:x,onOpenChange:p,children:j}),e[27]=p,e[28]=x,e[29]=j,e[30]=E):E=e[30],E}var ze="ContextMenu",[ar]=sn(ze,[lt]),J=lt(),[ir,ct]=ar(ze),dt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:p=!0}=i,[h,x]=u.useState(!1),C=J(e),w=rn(a),d=u.useCallback(m=>{x(m),w(m)},[w]);return r.jsx(ir,{scope:e,open:h,onOpenChange:d,modal:p,children:r.jsx(on,{...C,dir:l,open:h,onOpenChange:d,modal:p,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,p=ct(ut,s),h=J(s),x=u.useRef({x:0,y:0}),C=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...x.current})}),w=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(w.current),[]),m=g=>{x.current={x:g.clientX,y:g.clientY},p.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Yt,{...h,virtualRef:C}),r.jsx(Jt.span,{"data-state":p.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:xe(i.onContextMenu,g=>{d(),m(g),g.preventDefault()}),onPointerDown:a?i.onPointerDown:xe(i.onPointerDown,Se(g=>{d(),w.current=window.setTimeout(()=>m(g),700)})),onPointerMove:a?i.onPointerMove:xe(i.onPointerMove,Se(d)),onPointerCancel:a?i.onPointerCancel:xe(i.onPointerCancel,Se(d)),onPointerUp:a?i.onPointerUp:xe(i.onPointerUp,Se(d))})]})});ft.displayName=ut;var lr="ContextMenuPortal",pt=i=>{const{__scopeContextMenu:e,...s}=i,a=J(e);return r.jsx(tn,{...a,...s})};pt.displayName=lr;var mt="ContextMenuContent",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ct(mt,s),p=J(s),h=u.useRef(!1);return r.jsx(nn,{...p,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:x=>{i.onCloseAutoFocus?.(x),!x.defaultPrevented&&h.current&&x.preventDefault(),h.current=!1},onInteractOutside:x=>{i.onInteractOutside?.(x),!x.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xt.displayName=mt;var cr="ContextMenuGroup",dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(an,{...l,...a,ref:e})});dr.displayName=cr;var ur="ContextMenuLabel",fr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(ln,{...l,...a,ref:e})});fr.displayName=ur;var pr="ContextMenuItem",ht=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(Zt,{...l,...a,ref:e})});ht.displayName=pr;var mr="ContextMenuCheckboxItem",xr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(cn,{...l,...a,ref:e})});xr.displayName=mr;var hr="ContextMenuRadioGroup",gr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(dn,{...l,...a,ref:e})});gr.displayName=hr;var br="ContextMenuRadioItem",yr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(un,{...l,...a,ref:e})});yr.displayName=br;var vr="ContextMenuItemIndicator",Cr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(fn,{...l,...a,ref:e})});Cr.displayName=vr;var wr="ContextMenuSeparator",gt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(en,{...l,...a,ref:e})});gt.displayName=wr;var Nr="ContextMenuArrow",jr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(pn,{...l,...a,ref:e})});jr.displayName=Nr;var Er="ContextMenuSubTrigger",Sr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(mn,{...l,...a,ref:e})});Sr.displayName=Er;var Mr="ContextMenuSubContent",Dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(xn,{...l,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dr.displayName=Mr;function Se(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Rr=dt,Tr=ft,Pr=pt,kr=xt,Fr=ht,Ar=gt;function Or(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Rr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Lr(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Tr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ir(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let p;return e[5]!==a||e[6]!==l?(p=r.jsx(Pr,{children:r.jsx(kr,{"data-slot":"context-menu-content",className:l,...a})}),e[5]=a,e[6]=l,e[7]=p):p=e[7],p}function ue(i){const e=se.c(12);let s,a,l,p;e[0]!==i?({className:s,inset:a,variant:p,...l}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=p):(s=e[1],a=e[2],l=e[3],p=e[4]);const h=p===void 0?"default":p;let x;e[5]!==s?(x=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=x):x=e[6];let C;return e[7]!==a||e[8]!==l||e[9]!==x||e[10]!==h?(C=r.jsx(Fr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:x,...l}),e[7]=a,e[8]=l,e[9]=x,e[10]=h,e[11]=C):C=e[11],C}function st(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let p;return e[5]!==a||e[6]!==l?(p=r.jsx(Ar,{"data-slot":"context-menu-separator",className:l,...a}),e[5]=a,e[6]=l,e[7]=p):p=e[7],p}const Kr="#d9a441";function $r(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:p,isLoading:h,fileVisual:x,onOpen:C,onSelect:w,onNewFile:d,onNewFolder:m,onCopyPath:g,onCopyRelativePath:S,onRename:I,onDelete:U}=i,b=h===void 0?!1:h,y=$e(),M=s.kind==="directory",{Icon:D,color:P}=x,j=p&&"bg-accent";let E;e[0]!==j?(E=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",j),e[0]=j,e[1]=E):E=e[1];const K=`${a*14+8}px`;let q;e[2]!==K?(q={paddingLeft:K},e[2]=K,e[3]=q):q=e[3];let k;e[4]!==C||e[5]!==w?(k=()=>{w(),C()},e[4]=C,e[5]=w,e[6]=k):k=e[6];let Q;e[7]!==D||e[8]!==P||e[9]!==M||e[10]!==l||e[11]!==b?(Q=M?r.jsxs(r.Fragment,{children:[b?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(_n,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(Gn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Bn,{size:16,className:"shrink-0",style:{color:Kr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(D,{size:16,className:"shrink-0",style:{color:P}})]}),e[7]=D,e[8]=P,e[9]=M,e[10]=l,e[11]=b,e[12]=Q):Q=e[12];let H;e[13]!==s.name?(H=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=H):H=e[14];let $;e[15]!==E||e[16]!==q||e[17]!==k||e[18]!==Q||e[19]!==H?($=r.jsx(Lr,{asChild:!0,children:r.jsxs("button",{type:"button",className:E,style:q,onClick:k,children:[Q,H]})}),e[15]=E,e[16]=q,e[17]=k,e[18]=Q,e[19]=H,e[20]=$):$=e[20];let te;e[21]!==y?(te=y("sandbox.fileTreeRow.newFile"),e[21]=y,e[22]=te):te=e[22];let X;e[23]!==d||e[24]!==te?(X=r.jsx(ue,{onSelect:d,children:te}),e[23]=d,e[24]=te,e[25]=X):X=e[25];let Y;e[26]!==y?(Y=y("sandbox.fileTreeRow.newFolder"),e[26]=y,e[27]=Y):Y=e[27];let z;e[28]!==m||e[29]!==Y?(z=r.jsx(ue,{onSelect:m,children:Y}),e[28]=m,e[29]=Y,e[30]=z):z=e[30];let F;e[31]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(st,{}),e[31]=F):F=e[31];let W;e[32]!==y?(W=y("sandbox.fileTreeRow.copyPath"),e[32]=y,e[33]=W):W=e[33];let A;e[34]!==g||e[35]!==W?(A=r.jsx(ue,{onSelect:g,children:W}),e[34]=g,e[35]=W,e[36]=A):A=e[36];let O;e[37]!==y?(O=y("sandbox.fileTreeRow.copyRelativePath"),e[37]=y,e[38]=O):O=e[38];let _;e[39]!==S||e[40]!==O?(_=r.jsx(ue,{onSelect:S,children:O}),e[39]=S,e[40]=O,e[41]=_):_=e[41];let R;e[42]===Symbol.for("react.memo_cache_sentinel")?(R=r.jsx(st,{}),e[42]=R):R=e[42];let G;e[43]!==y?(G=y("sandbox.fileTreeRow.rename"),e[43]=y,e[44]=G):G=e[44];let T;e[45]!==I||e[46]!==G?(T=r.jsx(ue,{onSelect:I,children:G}),e[45]=I,e[46]=G,e[47]=T):T=e[47];let B;e[48]!==y?(B=y("sandbox.fileTreeRow.delete"),e[48]=y,e[49]=B):B=e[49];let Z;e[50]!==U||e[51]!==B?(Z=r.jsx(ue,{variant:"destructive",onSelect:U,children:B}),e[50]=U,e[51]=B,e[52]=Z):Z=e[52];let L;e[53]!==X||e[54]!==z||e[55]!==A||e[56]!==_||e[57]!==T||e[58]!==Z?(L=r.jsxs(Ir,{className:"w-52",children:[X,z,F,A,_,R,T,Z]}),e[53]=X,e[54]=z,e[55]=A,e[56]=_,e[57]=T,e[58]=Z,e[59]=L):L=e[59];let ee;return e[60]!==L||e[61]!==$?(ee=r.jsxs(Or,{children:[$,L]}),e[60]=L,e[61]=$,e[62]=ee):ee=e[62],ee}bn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const at=200,zr=2,_r=250,it=200;function Gr(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Br(i){const e=se.c(9),{text:s,query:a}=i;let l,p,h;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:C,segments:w}=Xn(s,a);l="truncate font-mono text-muted-foreground",p=C&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=w.map(Vr),e[0]=a,e[1]=s,e[2]=l,e[3]=p,e[4]=h}else l=e[2],p=e[3],h=e[4];let x;return e[5]!==l||e[6]!==p||e[7]!==h?(x=r.jsxs("span",{className:l,children:[p,h]}),e[5]=l,e[6]=p,e[7]=h,e[8]=x):x=e[8],x}function Vr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function Ia({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[l,p]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:x}=l,[C,w]=u.useState(new Set),[d,m]=u.useState(null),[g,S]=u.useState(null),[I,U]=u.useState([]),[b,y]=u.useState(""),[M,D]=u.useState(null),[P,j]=u.useState(null),[E,K]=u.useState(!1),[q,k]=u.useState(!1),[Q,H]=u.useState(!1),[$,te]=u.useState(!1),[,X]=u.useState(new Set),[Y,z]=u.useState(new Set),F=u.useRef(0),W=u.useRef(null),A=u.useRef(new Set),O=u.useRef(new Map),_=u.useRef(null),R=u.useRef(0),G=u.useRef(null),T=u.useRef(null),B=u.useRef(null);function Z(t){X(n=>{const o=typeof t=="function"?t(n):t;return A.current=o,o})}const[L,ee]=u.useState(new Map),De=u.useRef(null),[ae,he]=u.useState(null),{sendMessage:bt}=jn(),{openSidePanel:yt}=En(),ge=hn(),[V,oe]=u.useState(null),[Re,Te]=u.useState(null),[be,ye]=u.useState(!1);async function ie(t,n){const o=await fetch(Gr(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function ve(){ge.invalidateQueries({queryKey:rt(i,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function vt(t){const n=tr(t);if(!n)return;const o=`${i}/${e}/${s}`;ge.setQueryData(Ze.decofile(o),c=>{if(!c)return c;const{[n]:f,...v}=c;return v}),ge.invalidateQueries({queryKey:Ze.liveMeta(i,e,s)})}function Ct(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ne(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function wt(t){const n=Ne(t);return I.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=L.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){U(n=>n.map(o=>t(o)).filter(o=>o!==null)),m(n=>n&&t(n)),ee(n=>{const o=new Map;for(const[c,f]of n){const v=t(c);v&&o.set(v,f)}return o}),S(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Nt(t){const n=Ne(t);S(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!V)return;const o=Ee(V.parentDir,n);if(Ke(o,h,x))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await pe(),await ve(),oe(null),me(o)}async function Et(t,n){if(!V)return;const o=Ee(V.parentDir,n);if(Ke(o,h,x))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),p(f=>({...f,directories:f.directories.includes(c)?f.directories:[...f.directories,c]})),await pe(),await ve(),oe(null),w(f=>{const v=new Set(f);for(const ce of Ae(o))v.add(ce);return v.add(o),v}),S({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!V)return;const o=V.node.path,c=je(o),f=Ee(c,n);if(f===o){oe(null);return}if(Ke(f,h,x))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(f)}),Ge(v=>v===o?f:v.startsWith(`${o}/`)?Ee(f,v.slice(o.length+1)):v),await pe(),await ve(),oe(null)}async function Mt(t,n){ye(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Ct(n),Nt(n.path),await pe(),await ve(),Te(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Dt(t,n){const o=Jn(n);if(o){ne.error(o);return}ye(!0);try{V?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):V?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):V?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,W.current=pe());const[Rt,Tt]=u.useState(null),N=$e();if(a&&a!==Rt){Tt(a);const t=a;queueMicrotask(()=>{Vn(t)&&me(t).catch(n=>{ne.error(n instanceof Error?n.message:N("sandbox.fileExplorer.failedToOpenFile"))})})}async function Pe(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,o){if(o!==F.current)return!1;let c=!1;return p(f=>{const v=n?nr(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!v.truncated,{files:v.files,directories:v.directories,truncated:c}}),c&&ne.warning(N("sandbox.fileExplorer.fileListTruncated")),c}async function Pt(t){const n=O.current.get(t);if(n)return n;const o=F.current,c=(async()=>{const f=await Pe({pattern:"**/*",path:re(t),limit:Fe}),v=Ve(f,!0,o);return!v&&o===F.current&&Z(ce=>{const Ce=new Set(ce);return Ce.add(t),Ce}),v})();O.current.set(t,c);try{return await c}finally{O.current.delete(t)}}async function Ue(t){if(!Ie(t,A.current))return!1;z(n=>new Set(n).add(t));try{return await Pt(t)}finally{z(n=>{const o=new Set(n);return o.delete(t),o})}}async function kt(t,n){const o=new Set(A.current);for(const c of Ae(n)){if(!Ie(c,o))continue;if(await Ue(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++F.current;G.current=null,T.current=null,O.current.clear(),H(!0),Z(new Set),w(new Set),z(new Set);try{const n=await Pe({pattern:"**/*",limit:Fe,maxDepth:Un});Ve(n,!1,t),te(!0)}catch{$&&ne.error(N("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function He(t){if(!L.get(t)?.loaded){ee(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=Yn(o.content??"");ee(f=>{const v=new Map(f);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Ft(){R.current++,D(null),j(null),K(!1),k(!1)}async function At(){const t=F.current,n=G.current;if(n&&n.generation===t)return n.files;const o=T.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const f=await Pe({pattern:"**/*",limit:Fe});return F.current===t&&(G.current={generation:t,files:f.files}),f.files})();T.current={generation:t,promise:c};try{return await c}finally{T.current?.generation===t&&(T.current=null)}}async function Ot(t,n){try{const o=await At();if(n!==R.current)return;D(Zn(o,t,it))}catch{if(n!==R.current)return;D([])}}async function Lt(t,n){K(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:at});if(n!==R.current)return;j(er(o.results??"")),k((o.matchCount??0)>=at)}catch{if(n!==R.current)return;j([]),k(!1)}finally{n===R.current&&K(!1)}}function It(t){const n=t.trim(),o=++R.current;Ot(n,o),n.length<zr?(j(null),K(!1),k(!1)):Lt(n,o)}function Kt(t){if(y(t),_.current&&clearTimeout(_.current),!t.trim()){Ft();return}_.current=setTimeout(()=>{It(t)},_r)}function We(t){const n=B.current;if(!n||n.path!==d)return;B.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function $t(t){B.current={path:t.path,line:t.line};const n=d===t.path&&L.get(t.path)?.loaded;me(t.path),n&&De.current&&We(De.current)}async function zt(t,n){try{await ie("write",{path:re(t),content:n}),we("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(i,e,s)});try{const o=await Sn(i,e,s);we("git status after save",o)}catch(o){we("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}ee(o=>{const c=new Map(o),f=c.get(t);return f&&c.set(t,{...f,savedContent:n}),c})}catch(o){we("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){m(t),S({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),I.includes(t)||U(n=>[...n,t]),He(t)}function Gt(t){U(n=>{const o=n.filter(c=>c!==t);return d===t&&m(o[o.length-1]??null),o}),ee(n=>{const o=new Map(n);return o.delete(t),o})}function qe(t){w(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if(Ie(t,A.current))try{if(await Ue(t))return}catch(n){ne.error(n instanceof Error?n.message:N("sandbox.fileExplorer.failedToLoadFolder"));return}qe(t)}async function Vt(t,n){if(n){qe(t);return}await Bt(t)}async function me(t){await W.current,await kt(N,t);const n=Ae(t);w(o=>{const c=new Set(o);for(const f of n)c.add(f);return c}),_t(t)}function Ut(){return g?.kind==="directory"?g.path:g?.kind==="file"?je(g.path):d?je(d):"/"}function Qe(t){const n=Ut();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Ht=Hn(h,x),Xe=Wn(Ht,C),ke=M?.length??0,Ye=qn(P??[]),Je=P?.length??0,de=d?L.get(d):null,Wt=de?.loaded&&de.editorValue!==de.savedContent,qt=Re?wt(Re.path):[],Qt=(t,n)=>{De.current=t,We(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const f=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function Xt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Le(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
|
|
2
2
|
`)}]}),he(null)}return Q&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(yn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:b,onChange:t=>Kt(t.target.value),placeholder:N("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":N("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(Me,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":N("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:r.jsx(vn,{size:14})})}),r.jsx(nt,{side:"bottom",children:N("sandbox.fileExplorer.newFile")})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(Me,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":N("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:r.jsx(Cn,{size:14})})}),r.jsx(nt,{side:"bottom",children:N("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(Nn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!b&&Xe.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",f=C.has(n.path),v=g?.path===n.path,ce=Qn(n.path,n.kind),Ce=c&&Y.has(n.path);return r.jsx($r,{node:n,depth:o,isExpanded:f,isSelected:v,isLoading:Ce,fileVisual:Oe(n.name),onSelect:()=>S(n),onOpen:()=>{c?Vt(n.path,f):me(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>_e(N,"Path",Ne(n.path)),onCopyRelativePath:()=>_e(N,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Te(n)},n.path)}),!b&&$&&Xe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:N("sandbox.fileExplorer.noFilesFound")}),b&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:N("sandbox.fileExplorer.files")}),ke>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[ke,ke>=it?"+":""]})]}),M!==null&&M.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:N("sandbox.fileExplorer.noFileNamesMatch")}),M?.map(t=>{const n=t.split("/").pop()??t,o=je(t),{Icon:c,color:f}=Oe(n),v=d===t;return r.jsxs("button",{type:"button",onClick:()=>{me(t)},title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",v&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",f)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),b&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:N("sandbox.fileExplorer.inFiles")}),Je>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Je,q?"+":""]}),E&&r.jsx(fe,{size:10,className:"animate-spin"})]}),!E&&P!==null&&Ye.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:N("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Oe(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(f=>r.jsxs("button",{type:"button",onClick:()=>$t(f),title:`${t.path}:${f.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:f.line}),r.jsx(Br,{text:f.text,query:b})]},`${t.path}:${f.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[I.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:I.map(t=>{const n=L.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{m(t),He(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:v=>{v.stopPropagation(),Gt(t)},children:r.jsx(wn,{size:12})})]},t)})}),ae&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Xt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:N("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&he(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:N("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:N("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&de?.loaded?r.jsx(gn,{language:Le(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:de.editorValue,path:d,onChange:t=>{const n=d;n&&ee(o=>{const c=new Map(o),f=c.get(n);return f&&c.set(n,{...f,editorValue:t??""}),c})},onMount:Qt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!de?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:N("sandbox.fileExplorer.selectFileToEdit")})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[N(Wt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Le(d)]})]})]}),r.jsx(or,{open:V!==null,mode:V?.mode??"new-file",initialName:V?.mode==="rename"?V.node.name:"",parentLabel:V&&V.mode!=="rename"?V.parentDir==="/"?"/":re(V.parentDir):void 0,isPending:be,onSubmit:t=>Dt(N,t),onOpenChange:t=>{!t&&!be&&oe(null)}}),r.jsx(sr,{deleteTarget:Re,deleteDirtyPaths:qt,fsActionPending:be,onOpenChange:t=>{!t&&!be&&Te(null)},onConfirm:t=>{Mt(N,t)}})]})}export{Ia as FileExplorer};
|