decocms 4.514.5 → 4.515.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/ActiveShapeUtils-B2LFrfRE.js +1 -0
- package/dist/client/assets/{AlertCircle-xI8XX-bi.js → AlertCircle-BEMVsPah.js} +1 -1
- package/dist/client/assets/AreaChart-D7ncnKTv.js +1 -0
- package/dist/client/assets/{ArrowLeft-BKYzlDQY.js → ArrowLeft-BeJK1krP.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cq3iZIwL.js → ArrowUp-CDPrL6Uz.js} +1 -1
- package/dist/client/assets/BarChart-D63RTQYz.js +1 -0
- package/dist/client/assets/{Building02-C9KWPxlH.js → Building02-BFpUButr.js} +1 -1
- package/dist/client/assets/CartesianChart-Cm278fbS.js +1 -0
- package/dist/client/assets/{CategoricalChart-DkwWvFDx.js → CategoricalChart-CNYNt0vK.js} +2 -2
- package/dist/client/assets/{CheckCircle-D30wPP6A.js → CheckCircle-Iq3Q6LLh.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CknWVrzo.js → ChevronSelectorVertical-02lw_CbG.js} +1 -1
- package/dist/client/assets/{ChevronUp-CFN68hLk.js → ChevronUp-DeTPLyaf.js} +1 -1
- package/dist/client/assets/{Copy01-C73PJJxr.js → Copy01-DQtv3upd.js} +1 -1
- package/dist/client/assets/{CreditCard01-C8DlQ7Ge.js → CreditCard01-4SHg1t_a.js} +1 -1
- package/dist/client/assets/{DotsVertical-BvyfZIer.js → DotsVertical-Drns5Frs.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Bhpq3Y0r.js → ErrorBarContext-BkdZvkoD.js} +1 -1
- package/dist/client/assets/{Globe04-CVLAzwjm.js → Globe04-BXpRk-hX.js} +1 -1
- package/dist/client/assets/{Image01-DowwsvYG.js → Image01-1LQuy0wG.js} +1 -1
- package/dist/client/assets/{Key01-rbnGMz2E.js → Key01-CoFqvDTW.js} +1 -1
- package/dist/client/assets/{Link01-DRsKyIm5.js → Link01-DU3-3Ipb.js} +1 -1
- package/dist/client/assets/{LinkBroken01-ZRquEJUl.js → LinkBroken01-h_HqMIlK.js} +1 -1
- package/dist/client/assets/{Minus-DPDq6KAA.js → Minus-DpXFgo6a.js} +1 -1
- package/dist/client/assets/{Monitor01-DMME8GIo.js → Monitor01-BbCpGNqh.js} +1 -1
- package/dist/client/assets/{Play-c6bc1b3-.js → Play-C8EB0NeI.js} +1 -1
- package/dist/client/assets/{Plus-xabrshQG.js → Plus-DPS97GtY.js} +1 -1
- package/dist/client/assets/ReferenceLine-zJMNrbMl.js +1 -0
- package/dist/client/assets/{SearchMd-BODiv7c9.js → SearchMd-5E3M_LtW.js} +1 -1
- package/dist/client/assets/Sector-Chcdibol.js +28 -0
- package/dist/client/assets/{ShoppingBag01-DAjyOiiw.js → ShoppingBag01-BlUZ1Giu.js} +1 -1
- package/dist/client/assets/{Sun-BqmeoxcG.js → Sun-Bt6BixS7.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CESO3nxl.js → SwitchHorizontal01-BLJAU7vB.js} +1 -1
- package/dist/client/assets/{Tool01-BGL2Qt57.js → Tool01-DhUw9Xii.js} +1 -1
- package/dist/client/assets/{Trash01-Cf6bGuCZ.js → Trash01-y0tx6OKR.js} +1 -1
- package/dist/client/assets/{Upload01-ZLE7vfB9.js → Upload01-BT7hKOY8.js} +1 -1
- package/dist/client/assets/{User01-Cfg0yVvz.js → User01-Dtm_f3tA.js} +1 -1
- package/dist/client/assets/{UserSquare-DJngEPjS.js → UserSquare-DWYhjY7l.js} +1 -1
- package/dist/client/assets/{Users01-vn3EOu8A.js → Users01-DE8h5H5p.js} +1 -1
- package/dist/client/assets/{XClose-CdzjyNb0.js → XClose-sbj0sr-y.js} +1 -1
- package/dist/client/assets/{ZoomOut-B55seUHX.js → ZoomOut-Ult5yHk2.js} +1 -1
- package/dist/client/assets/{access-gate-CgSSvGG3.js → access-gate-C5s_nhLu.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-O4xCe9BP.js → add-connection-dialog-BbC6Awnv.js} +1 -1
- package/dist/client/assets/agent-analytics-DkajWLZM.js +2 -0
- package/dist/client/assets/agent-app-3J3u6Y8o.js +1 -0
- package/dist/client/assets/agent-assets-arexmZYy.js +1 -0
- package/dist/client/assets/{agent-automation-DBMflQw2.js → agent-automation-CJwaiyVY.js} +1 -1
- package/dist/client/assets/agent-automations-Cgl9-uX7.js +1 -0
- package/dist/client/assets/agent-calendar-CcJ-9tHm.js +1 -0
- package/dist/client/assets/{agent-connect-sources-CX6V3W-l.js → agent-connect-sources-BSWyCv4T.js} +1 -1
- package/dist/client/assets/agent-deck-D77BlzDi.js +1 -0
- package/dist/client/assets/agent-e2e-BZnv0041.js +1 -0
- package/dist/client/assets/agent-experiments-DU-xnevM.js +1 -0
- package/dist/client/assets/agent-file-CEbVOehe.js +1 -0
- package/dist/client/assets/agent-hosting-CLRf1egV.js +1 -0
- package/dist/client/assets/{agent-icon-c0hRUHIU.js → agent-icon-BLy2WH4s.js} +1 -1
- package/dist/client/assets/agent-library-CHysr2dn.js +1 -0
- package/dist/client/assets/agent-library-file-DCoIJ_Vl.js +1 -0
- package/dist/client/assets/agent-monitor-D4SI9Y1m.js +1 -0
- package/dist/client/assets/{agent-overview-C0WObUrB.js → agent-overview-DeQq_tHv.js} +1 -1
- package/dist/client/assets/agent-releases-Cp26QvMd.js +2 -0
- package/dist/client/assets/agent-settings-Bd8cfGLd.js +1 -0
- package/dist/client/assets/agent-site-editor-code-CGFxlenC.js +2 -0
- package/dist/client/assets/agent-site-editor-content-O4R-vecW.js +1 -0
- package/dist/client/assets/agent-site-editor-pMTgGoBo.js +16 -0
- package/dist/client/assets/agent-site-editor-preview-CCdH77a2.js +1 -0
- package/dist/client/assets/agent-view-COR3ZSfj.js +1 -0
- package/dist/client/assets/{agent-view-guard-CY0RZ3mz.js → agent-view-guard-26j3Evt5.js} +1 -1
- package/dist/client/assets/{agents-list-lrkIUH1p.js → agents-list-Dcd5sOX1.js} +1 -1
- package/dist/client/assets/{ai-providers-BJRpwnf3.js → ai-providers-C2RBL7tG.js} +2 -2
- package/dist/client/assets/alert-BV79ffMP.js +1 -0
- package/dist/client/assets/{alert-dialog-M8Y0zqSA.js → alert-dialog-BILupwtl.js} +3 -3
- package/dist/client/assets/analytics-sections-Wnoh3PYg.js +1 -0
- package/dist/client/assets/api-keys-BO3F5W2N.js +1 -0
- package/dist/client/assets/{api-keys-BuJhmHVr.js → api-keys-Drifqas3.js} +1 -1
- package/dist/client/assets/app-editor-DkKkzh3V.js +1 -0
- package/dist/client/assets/{asset-utils-D4ZYWTsd.js → asset-utils-CV_m_T7Z.js} +1 -1
- package/dist/client/assets/{auth-CJCUdDnK.js → auth-B7U7Hff4.js} +1 -1
- package/dist/client/assets/{auth-catchall-PMDrOrh4.js → auth-catchall-BM3zBwm1.js} +1 -1
- package/dist/client/assets/{auth-entry-D45yK4lP.js → auth-entry-BdihVcdH.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BeoAmW98.js → auth-split-layout-CPsRiXhM.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D7W1mkzH.js → authenticate-and-persist-oauth-UvzpQNLL.js} +1 -1
- package/dist/client/assets/automation-list-row-CmreC44g.js +1 -0
- package/dist/client/assets/{automation-runs-7CDwsw1m.js → automation-runs-Ubm7wrw7.js} +1 -1
- package/dist/client/assets/{automations-DpOWGNx_.js → automations-ZAC4-o9b.js} +1 -1
- package/dist/client/assets/{autosend-BiXCzDoT.js → autosend-DEKkS89d.js} +1 -1
- package/dist/client/assets/{avatar-CVrfZDpI.js → avatar-BaUatl4r.js} +1 -1
- package/dist/client/assets/badge-BDrcnhS0.js +1 -0
- package/dist/client/assets/{block-document-EFEgqy7V.js → block-document-DWpcrKxc.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-FfAtB7Mh.js → blocks-preview-workspace-context-CNobOsoP.js} +1 -1
- package/dist/client/assets/blocks-tab-states-5KLuOsbu.js +1 -0
- package/dist/client/assets/blog-schema-BKkPmh2I.js +1 -0
- package/dist/client/assets/{buckets-EuucCx-Z.js → buckets-CfPMmliP.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-0HVt3TgE.js → build-improve-prompt-doc-DJbnBElj.js} +1 -1
- package/dist/client/assets/{calendar-B3WUDV6V.js → calendar-CCVXvCMs.js} +1 -1
- package/dist/client/assets/campaigns-view-CacWid3q.js +1 -0
- package/dist/client/assets/{capability-load-error-CaA022rx.js → capability-load-error-C-qrhNhU.js} +1 -1
- package/dist/client/assets/category-editor-CcRf7L2l.js +1 -0
- package/dist/client/assets/{chart-B6d33H1D.js → chart-gMXBaCie.js} +1 -1
- package/dist/client/assets/{chat-context-BnuwMOfj.js → chat-context-NcP7iS0u.js} +6 -6
- package/dist/client/assets/{chat-draft-D3EwPWFD.js → chat-draft-MYleVoub.js} +1 -1
- package/dist/client/assets/{checkbox-Dla8kRWj.js → checkbox-TbFNti2k.js} +1 -1
- package/dist/client/assets/{choose-editor-CFsJlwqs.js → choose-editor-CDZ08K_i.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DADJ0ld_.js → cli-auth-success-DMlxLLEu.js} +1 -1
- package/dist/client/assets/{client-icons-M2KssD4J.js → client-icons-DolqWn8Q.js} +1 -1
- package/dist/client/assets/cms-settings-editor-D03L9L4-.js +1 -0
- package/dist/client/assets/{collapsible-BWjY8cOG.js → collapsible-DvAZmEoh.js} +1 -1
- package/dist/client/assets/collection-detail-CQ4bhfmW.js +1 -0
- package/dist/client/assets/{collection-display-button-DcSGVqBT.js → collection-display-button-DTfH30As.js} +1 -1
- package/dist/client/assets/{collection-search-C0nHL4Zi.js → collection-search-C00LN-O5.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BqLbzGMr.js → collection-table-wrapper-DOUS3XlF.js} +1 -1
- package/dist/client/assets/{collection-tabs-DJst1PBn.js → collection-tabs-BjFLrDhl.js} +1 -1
- package/dist/client/assets/{column-rules-C6rmmvcZ.js → column-rules-13kfrugr.js} +1 -1
- package/dist/client/assets/{combobox-DJtWtG8e.js → combobox-CaB-y5Ze.js} +1 -1
- package/dist/client/assets/{coming-soon-page-CycWyIEs.js → coming-soon-page-Cyxpb_RU.js} +1 -1
- package/dist/client/assets/{command-DQxPvzO0.js → command-DF9CyXTP.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BaIOrb8k.js → companion-mcps-section-D4tO5Rpb.js} +1 -1
- package/dist/client/assets/{config-0dQr8OOs.js → config-BpbgNSKK.js} +1 -1
- package/dist/client/assets/{connect-AQ7wxQDD.js → connect-R8YgYoXN.js} +3 -3
- package/dist/client/assets/{connect-layout-CsBnyYo4.js → connect-layout-DCuq7jhf.js} +1 -1
- package/dist/client/assets/{connection-B5x-rxzp.js → connection-CynHS3Ve.js} +1 -1
- package/dist/client/assets/{connection-card-CFqu0_G8.js → connection-card-DWCHVdl-.js} +1 -1
- package/dist/client/assets/{connection-detail-B_xaSLIN.js → connection-detail-BvRd_OKE.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CouK82td.js → connection-form-helpers-Dta5jpsZ.js} +1 -1
- package/dist/client/assets/{connections-CrdtyJFL.js → connections-DhBzJz3R.js} +1 -1
- package/dist/client/assets/content-tab-COTFxvxm.js +22 -0
- package/dist/client/assets/context-DDY4mKfD.js +1 -0
- package/dist/client/assets/{context-menu-CI-AryjZ.js → context-menu-CUU-6Ui3.js} +1 -1
- package/dist/client/assets/{context-shell-BsFUt-ob.js → context-shell-CPsWfJ_3.js} +3 -3
- package/dist/client/assets/{core.esm-DOdwJCI5.js → core.esm-C0uaMHhK.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CDMsJ1wq.js → create-organization-dialog-DaLRO9Sp.js} +1 -1
- package/dist/client/assets/{daily-pulse-A6lEoniM.js → daily-pulse-DKIjgibs.js} +1 -1
- package/dist/client/assets/date-utils-CrvIKg-s.js +1 -0
- package/dist/client/assets/{discover-JQgSyvWz.js → discover-INKGTCGz.js} +1 -1
- package/dist/client/assets/{domain-settings-CNG0968P.js → domain-settings-DL4imbgg.js} +1 -1
- package/dist/client/assets/{drawer-CEiS53oX.js → drawer-CER6tItd.js} +1 -1
- package/dist/client/assets/{editor-DWhRi1_f.js → editor-DiFOLDbd.js} +1 -1
- package/dist/client/assets/{editor-classes-CZOMDDcn.js → editor-classes-BxczJlTk.js} +1 -1
- package/dist/client/assets/{empty-state-B1xpK558.js → empty-state-CEkcxXyE.js} +1 -1
- package/dist/client/assets/{empty-state-BoFIIv2e.js → empty-state-Cfwlgj7K.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-CdB5dK1A.js +1 -0
- package/dist/client/assets/{extract-connection-data-CUvLfXNU.js → extract-connection-data-CnU07SX8.js} +1 -1
- package/dist/client/assets/{feature-gate-B9a4dBc0.js → feature-gate-Dnbny2HW.js} +1 -1
- package/dist/client/assets/{feature-paywall-DINMFUUx.js → feature-paywall-DruRkOvJ.js} +1 -1
- package/dist/client/assets/{file-explorer-2Z0Qhvp_.js → file-explorer-CsrTcKv1.js} +1 -1
- package/dist/client/assets/{file-preview-BFXgyqHl.js → file-preview-CUN1OHJ7.js} +1 -1
- package/dist/client/assets/{file-share-button-BIOHr9Xv.js → file-share-button-CEf0dwMj.js} +2 -2
- package/dist/client/assets/{file-type-icon-Ez8-DRHg.js → file-type-icon-etYEFstF.js} +1 -1
- package/dist/client/assets/{folder-icon-JgTmBbpC.js → folder-icon-8MGsFr-_.js} +2 -2
- package/dist/client/assets/{form-Bdh0vUeg.js → form-xTDgq-Tg.js} +1 -1
- package/dist/client/assets/{general-Dvy5SU0P.js → general-DKLM5WXB.js} +1 -1
- package/dist/client/assets/{home-UtAOwZ_a.js → home-iGYybPDR.js} +1 -1
- package/dist/client/assets/hosted-publish-api-BTYW-kmo.js +1 -0
- package/dist/client/assets/hosted-publish-feedback-DYVOaPsn.js +1 -0
- package/dist/client/assets/{icon-button-Dg2jSe-y.js → icon-button-Ht6P9npC.js} +1 -1
- package/dist/client/assets/{index-CrgWXxvo.js → index-1zZevs0I.js} +1 -1
- package/dist/client/assets/{index-1XeDvVO_.js → index-9equ5l6t.js} +1 -1
- package/dist/client/assets/{index-DxbCP5B6.js → index-B3yMIi0G.js} +1 -1
- package/dist/client/assets/index-BFqmRsAP.js +4 -0
- package/dist/client/assets/{index-DYLyKNcw.js → index-BbK9DXkK.js} +1 -1
- package/dist/client/assets/{index-DincrG3Y.js → index-Br0aaVqT.js} +3 -3
- package/dist/client/assets/{index-ILRCn1qM.js → index-CLvpgcGt.js} +6 -6
- package/dist/client/assets/{index-CXeJCI0G.js → index-CNohvsnC.js} +1 -1
- package/dist/client/assets/{index-_y92DzgS.js → index-D32uzOTA.js} +1 -1
- package/dist/client/assets/{index-7svLQYvL.js → index-DFJe-l7D.js} +1 -1
- package/dist/client/assets/{index-DKOhwHAG.js → index-DKwDh9fC.js} +1 -1
- package/dist/client/assets/{index-DcU2uHG-.js → index-DQaJBLJ-.js} +54 -54
- package/dist/client/assets/index-EoMx4WDO.css +1 -0
- package/dist/client/assets/{index-WjQsIrkp.js → index-IRwT0rOS.js} +1 -1
- package/dist/client/assets/{index-6B342dVL.js → index-TESbMzS4.js} +1 -1
- package/dist/client/assets/{index-De44zW_k.js → index-hUmTzopE.js} +1 -1
- package/dist/client/assets/{index-redirect-BHJ13xlS.js → index-redirect-WdHUcKlN.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-P7ZNg4ZF.js → infiniteQueryObserver-Bia8aY1D.js} +1 -1
- package/dist/client/assets/infra-billing-CANL7vGd.js +1 -0
- package/dist/client/assets/{input-pg_Munw1.js → input-DQpuKkGH.js} +7 -7
- package/dist/client/assets/{input-HXHaYrka.js → input-rj9iyl8c.js} +1 -1
- package/dist/client/assets/{integration-icon-aeIvRSnw.js → integration-icon-BADY30E3.js} +1 -1
- package/dist/client/assets/{jira-icon-CZLCmGol.js → jira-icon-Bg6wm7Rh.js} +1 -1
- package/dist/client/assets/{label-DDPD5LQh.js → label-DwAqZKXh.js} +1 -1
- package/dist/client/assets/{layout-DGYUOV2D.js → layout-BS48rV-R.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-B3GKD6WQ.js → legacy-agents-deep-BsgIlRpK.js} +1 -1
- package/dist/client/assets/legacy-main-redirect-CpUMHeOI.js +1 -0
- package/dist/client/assets/library-D-XIUCN0.js +1 -0
- package/dist/client/assets/{login-syjpZA32.js → login-Bx_Dj1KX.js} +1 -1
- package/dist/client/assets/{markdown-1PeXOKNt.js → markdown-DCFmpcRh.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DTPlWHGT.js → mcp-app-renderer-DlDykQO4.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DP6VNnFQ.js → mcp-oauth-BV1FnXP9.js} +1 -1
- package/dist/client/assets/{mcp-oauth-xBzZujQ_.js → mcp-oauth-DHudAstl.js} +1 -1
- package/dist/client/assets/{members-uR8n9Rms.js → members-lS9QzMri.js} +1 -1
- package/dist/client/assets/{memory-BYqDBVHV.js → memory-Dt2VdoJi.js} +2 -2
- package/dist/client/assets/{mini-report-page-D7tpDtif.js → mini-report-page-SkCZ-B7b.js} +1 -1
- package/dist/client/assets/{mock-board-BOSDq94-.js → mock-board-b5JcXuBT.js} +3 -3
- package/dist/client/assets/{monaco-editor-e80GuCNv.js → monaco-editor-B77kgSL6.js} +2 -2
- package/dist/client/assets/monitoring-CN_CCaIK.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-94Mta4Nq.js → monitoring-stats-row-DfhuiMFd.js} +1 -1
- package/dist/client/assets/{multi-select-CmbGOwtN.js → multi-select-BcTcaQtg.js} +1 -1
- package/dist/client/assets/mustache-B1PzKbLg.js +4 -0
- package/dist/client/assets/named-rule-uses-l2kNdc58.js +1 -0
- package/dist/client/assets/named-rule-view-VDvju2NZ.js +1 -0
- package/dist/client/assets/{new-project-dialog-ShudNZIG.js → new-project-dialog-C1yGAeBD.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DQtTsT-Q.js → oauth-callback-ai-provider-CSn2MVuO.js} +1 -1
- package/dist/client/assets/{oauth-callback-CuZCWVkp.js → oauth-callback-d5bTE61x.js} +1 -1
- package/dist/client/assets/{onboarding-BYvWDC_s.js → onboarding-DMAd7boI.js} +1 -1
- package/dist/client/assets/{openai-conversation-DgaJVito.js → openai-conversation-DVrrnMH9.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-CKzSSiC-.js → optimistic-project-sidebar-views-NiW-ZsA6.js} +1 -1
- package/dist/client/assets/order-monitor-day-D1J-iu59.js +1 -0
- package/dist/client/assets/{organization-choice-D_5aYbIz.js → organization-choice-DtzDl4nE.js} +1 -1
- package/dist/client/assets/{orgs-CN3Yh6bp.js → orgs-CvRk7OxE.js} +1 -1
- package/dist/client/assets/page-seo-form-YDVeWiAp.js +1 -0
- package/dist/client/assets/{pair-Cn70Tm81.js → pair-u6RslQ29.js} +7 -7
- package/dist/client/assets/parse-sections-CBNQNauq.js +1 -0
- package/dist/client/assets/plan-Cs9I3MbI.js +1 -0
- package/dist/client/assets/{plan-ladder-D5aCNSRy.js → plan-ladder-DF2W1fWC.js} +1 -1
- package/dist/client/assets/{popover-CVCbWisj.js → popover-BOhP5vgB.js} +1 -1
- package/dist/client/assets/post-calendar-T4dPJKYM.js +1 -0
- package/dist/client/assets/post-editor-D7KyvZ7t.js +2 -0
- package/dist/client/assets/{preview-content-Bin2hNFJ.js → preview-content-DVXm4Z8s.js} +1 -1
- package/dist/client/assets/{preview-dialog-Fls4giAH.js → preview-dialog-WEx44iRd.js} +1 -1
- package/dist/client/assets/{preview-panel-BPPH_1cI.js → preview-panel-D0nsWsZH.js} +1 -1
- package/dist/client/assets/preview-tab-Dl6aDnQL.js +551 -0
- package/dist/client/assets/product-picker-dialog-BhbqLRJa.js +1 -0
- package/dist/client/assets/{profile-BZA6I0p4.js → profile-DlCjy7UA.js} +1 -1
- package/dist/client/assets/{project-app-view-B2uzp3zO.js → project-app-view-D5kv8H-C.js} +1 -1
- package/dist/client/assets/project-apps-BkYCf7yh.js +1 -0
- package/dist/client/assets/{project-feed-CxXgvjMu.js → project-feed-CnSoTeWf.js} +1 -1
- package/dist/client/assets/{project-icon-Dy5ndHVf.js → project-icon-DeQ6esGK.js} +1 -1
- package/dist/client/assets/project-reports-DQYEQVTh.js +1 -0
- package/dist/client/assets/project-tasks-CyVxacvN.js +1 -0
- package/dist/client/assets/{projects-6tFWscR3.js → projects-B8yQNAzt.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B25sfM8y.js → projects-empty-state-BeIkadaG.js} +1 -1
- package/dist/client/assets/{prompts-C8y9cYvX.js → prompts-GMn4cz1Q.js} +1 -1
- package/dist/client/assets/record-editor-CI7K6OM1.js +1 -0
- package/dist/client/assets/redirect-editor-B5L_G5_H.js +1 -0
- package/dist/client/assets/releases-api-r2wwTMcb.js +1 -0
- package/dist/client/assets/{reports-DZf5GwgJ.js → reports-BSyJkGbx.js} +1 -1
- package/dist/client/assets/reports-DceQf3hD.js +1 -0
- package/dist/client/assets/{reports-onboarding-Ba6c9nYx.js → reports-onboarding-DTyYEPnh.js} +1 -1
- package/dist/client/assets/reports-tab-DhZyGBNJ.js +2 -0
- package/dist/client/assets/repositories-1ckAW2Cr.js +1 -0
- package/dist/client/assets/{repositories-D_HBag21.js → repositories-DTzcHO2P.js} +1 -1
- package/dist/client/assets/{repository-binding-B-JblZ3B.js → repository-binding-WIxmR2C2.js} +1 -1
- package/dist/client/assets/{repository-import-picker-Aq7ItYog.js → repository-import-picker-Bwaz_IkW.js} +1 -1
- package/dist/client/assets/{repository-picker-CigkRPj6.js → repository-picker-C_FPAS2a.js} +1 -1
- package/dist/client/assets/{require-capability-fF33BjRE.js → require-capability-zDRexzvJ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-n4GqwjUS.js → required-auth-layout-C9RNRyLG.js} +1 -1
- package/dist/client/assets/{reset-password-FYcr_EOZ.js → reset-password-D5Z9Z_ZV.js} +1 -1
- package/dist/client/assets/{resizable-B1jyEV0m.js → resizable-rv6DYDSR.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-CDRcFoik.js +1 -0
- package/dist/client/assets/{review-settings-w0gSi3zN.js → review-settings-BOEOAp5O.js} +1 -1
- package/dist/client/assets/{roles-CD7KBus5.js → roles-CvRMacB_.js} +1 -1
- package/dist/client/assets/route-BrdNU9FL.js +1 -0
- package/dist/client/assets/route-CYnJcvFb.js +1 -0
- package/dist/client/assets/route-HQBi1e9d.js +1 -0
- package/dist/client/assets/runnable-block-editor-B9jSPnPq.js +20 -0
- package/dist/client/assets/{sandbox-git-api-CRxdlhrN.js → sandbox-git-api-CH_-QFpD.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Cyz-VR-q.js → sandbox-lifecycle-context-aKdVFwPA.js} +1 -1
- package/dist/client/assets/{schema-DTqdooJM.js → schema-C0M6s76A.js} +1 -1
- package/dist/client/assets/{schema-Jt-SHSRj.js → schema-CtKRQiER.js} +1 -1
- package/dist/client/assets/{scroll-area-DowOzl5a.js → scroll-area-L8VlxVDv.js} +1 -1
- package/dist/client/assets/{search-input-C77c23a_.js → search-input-BCaqzpfC.js} +1 -1
- package/dist/client/assets/{search-toggle-BqUvwbnO.js → search-toggle-BAKgZCht.js} +1 -1
- package/dist/client/assets/{secret-picker-D6q2PbZG.js → secret-picker-Ciz2Oc6M.js} +1 -1
- package/dist/client/assets/{secrets-C6FiSzJz.js → secrets-DWM0UMVi.js} +1 -1
- package/dist/client/assets/{sections-uFSvOb1s.js → sections-DM2-ez5A.js} +1 -1
- package/dist/client/assets/sections-editor-Cs3VV_t6.js +4 -0
- package/dist/client/assets/{select-B47VUguS.js → select-3Bvf55R2.js} +1 -1
- package/dist/client/assets/{select-model-B0eE99E3.js → select-model-BrppT0xN.js} +1 -1
- package/dist/client/assets/seo-editor-qr_EWKDI.js +1 -0
- package/dist/client/assets/{separator-tMi_6w_o.js → separator-BARWlQZQ.js} +1 -1
- package/dist/client/assets/settings-tab-BX9Vfre3.js +1 -0
- package/dist/client/assets/{sheet-R9Pr50Sb.js → sheet-BKZqYlDG.js} +1 -1
- package/dist/client/assets/shell-layout-iu5E7VAW.js +1 -0
- package/dist/client/assets/site-draft-actions-01MQ6c7Q.js +12 -0
- package/dist/client/assets/site-draft-view-D-xycIA0.js +2 -0
- package/dist/client/assets/site-editor-CF4F4ijZ.js +1 -0
- package/dist/client/assets/{skills-DTPuV4HK.js → skills-B3sr04ZB.js} +1 -1
- package/dist/client/assets/slider-f1cHo-xI.js +1 -0
- package/dist/client/assets/{sortable.esm-7lfZBBX2.js → sortable.esm-B_g_IXou.js} +1 -1
- package/dist/client/assets/{sso-lvoln_ad.js → sso-8XgQMaoN.js} +1 -1
- package/dist/client/assets/{suggestion-D_Z3LuMt.js → suggestion-B-6wzPND.js} +2 -2
- package/dist/client/assets/{switch-BQFbXMA-.js → switch-CZd0EYW9.js} +1 -1
- package/dist/client/assets/{symbol-CIh5AfyD.js → symbol-BY53tx69.js} +1 -1
- package/dist/client/assets/{synced-repos-DQxi8k5O.js → synced-repos-CWNIOZxK.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-B2rDBqdy.js → tab-icon-glyph-40t6GZmc.js} +1 -1
- package/dist/client/assets/{table-DuCeyVXY.js → table-DDQzGcYG.js} +1 -1
- package/dist/client/assets/{tabs-CJ70csAp.js → tabs-BOwO3aPj.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-vyXzgPAK.js → task-assignee-avatar-mmHhkk0_.js} +1 -1
- package/dist/client/assets/{task-board-CSpxMIw7.js → task-board-S0qduW2n.js} +1 -1
- package/dist/client/assets/{task-route-CeJ19bNy.js → task-route-BCl-VxJy.js} +1 -1
- package/dist/client/assets/{task-status-CFz3dyVR.js → task-status-CNAd19KA.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CfseXo9_.js → taskboard-analytics-BNfa4eCu.js} +1 -1
- package/dist/client/assets/tasks-CtYqrb00.js +1 -0
- package/dist/client/assets/{tasks-C3liOhO2.js → tasks-Cz1AP9M-.js} +3 -3
- package/dist/client/assets/{textarea-BDWvYouR.js → textarea-CGkc_NoY.js} +1 -1
- package/dist/client/assets/{thread-analytics-Bp5Zz9ej.js → thread-analytics-CHcQ4J9G.js} +1 -1
- package/dist/client/assets/{thread-intent-DlbBEzNn.js → thread-intent-D02hOLlA.js} +4 -4
- package/dist/client/assets/{thread-route-DsRsjMOv.js → thread-route-BG5FYdPA.js} +1 -1
- package/dist/client/assets/{thread-route-glK7AgQo.js → thread-route-D5TPqP61.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BW8H1wdb.js → thread-sheet-body-B1Y2cEvJ.js} +1 -1
- package/dist/client/assets/time-range-picker-B8MLDnPR.js +1 -0
- package/dist/client/assets/toggle-group-5-dW1fE5.js +1 -0
- package/dist/client/assets/{tool-namespace-FeAXQzXg.js → tool-namespace-_uAlvwp8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CTGjpqPD.js → toolbar-icon-button-BQvi-WW6.js} +1 -1
- package/dist/client/assets/{tooltip-BqHx2R4U.js → tooltip-CT8p-4e_.js} +1 -1
- package/dist/client/assets/tooltipContext-BqyDyVHC.js +1 -0
- package/dist/client/assets/{track-vnmuUrPF.js → track-wHia_J2E.js} +1 -1
- package/dist/client/assets/{types-Cj3BjtjJ.js → types-CKfFy-n_.js} +6 -6
- package/dist/client/assets/{url-slug-DfovzTSP.js → url-slug-BMSyCRIK.js} +1 -1
- package/dist/client/assets/{usage-stats-DcyLnEOC.js → usage-stats-tSDvCF_c.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DugUJNG4.js → use-ai-providers-D5-3qHgJ.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-BuleRH2R.js +1 -0
- package/dist/client/assets/{use-automations-Dhy5bAQi.js → use-automations-DL7E2sXy.js} +1 -1
- package/dist/client/assets/{use-autosave-BKifxWxQ.js → use-autosave-Bga6Lczj.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CqPKeLYn.js → use-chat-layout-state-CrK3t-li.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CbuQEbGd.js → use-clock-tick-Dt0Rxdj9.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BBUs22Yl.js → use-connect-companion-BQ6P9NqQ.js} +1 -1
- package/dist/client/assets/{use-connection-Dj54skEw.js → use-connection-DEU6cL_M.js} +1 -1
- package/dist/client/assets/use-content-sync-78T7URzs.js +1 -0
- package/dist/client/assets/{use-copy-K9rQ1PJH.js → use-copy-Lp25RdQW.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-B5688LVi.js +1 -0
- package/dist/client/assets/{use-date-fns-locale-CEVf4Ifn.js → use-date-fns-locale-DzYqNQVc.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D0TGgFvB.js → use-debounced-autosave-B-FheggT.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CDunmz6Z.js → use-debounced-value-DnWAg7xS.js} +1 -1
- package/dist/client/assets/{use-deco-credits-orVqTX6I.js → use-deco-credits-Dcf7REFq.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-TumByBkr.js → use-decopilot-events-HymesIOH.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BllZSjRL.js → use-delete-connection-GE6V1LSr.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BBVz6SL_.js → use-deployment-admin-BMcEtHAq.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-CCAgHiPb.js +1 -0
- package/dist/client/assets/{use-file-configs-BFq_wpSt.js → use-file-configs-C3GELqZ9.js} +1 -1
- package/dist/client/assets/{use-inbox-feed--WBiu__i.js → use-inbox-feed-60_eEWEx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-7dT9x3fg.js → use-infinite-scroll-CktyBb0n.js} +1 -1
- package/dist/client/assets/{use-join-requests-ilYuD6XT.js → use-join-requests-Daf7hgc3.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-zwxUbRsW.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-2A9iou5g.js → use-mcp-auth-status-Ckh_s_m-.js} +1 -1
- package/dist/client/assets/use-mcp-client-BjCYOtMv.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-JJb6q8dH.js → use-mcp-prompts-D4ntfVw2.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BwuN38Gh.js → use-mcp-tools-BQ-vDoB-.js} +1 -1
- package/dist/client/assets/{use-members-CzSQTDAS.js → use-members-BKwSn6l-.js} +1 -1
- package/dist/client/assets/{use-mobile-BfmJV4wy.js → use-mobile-exvgjs5E.js} +1 -1
- package/dist/client/assets/use-move-blocks-jGxZ60KS.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-D05JNc-L.js → use-navigate-to-agent-CoDY7b67.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-pmLoKOyH.js → use-open-billing-url-gwWm2_gZ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-fPRUht_a.js → use-org-auth-client-D2nGERnL.js} +1 -1
- package/dist/client/assets/{use-org-fs-D82Vx4hB.js → use-org-fs-DsXUzUGl.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CD8TZnkH.js → use-org-repo-syncs-DTcvfXwj.js} +1 -1
- package/dist/client/assets/{use-org-sso-ClJ8vn5f.js → use-org-sso-BmpgR8iH.js} +1 -1
- package/dist/client/assets/{use-organization-roles-iaQivkLI.js → use-organization-roles-C9fRnsAm.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DFkNTsS0.js → use-organization-settings-B5bwnmIE.js} +1 -1
- package/dist/client/assets/use-panel-navigate-D1HcWbMf.js +1 -0
- package/dist/client/assets/use-project-native-view-presence-WBIVN5MA.js +1 -0
- package/dist/client/assets/{use-project-scope-CGMALc0e.js → use-project-scope-0viRZIAS.js} +1 -1
- package/dist/client/assets/{use-recent-apps-C1945uiL.js → use-recent-apps-letFJ0RI.js} +1 -1
- package/dist/client/assets/{use-releases-D15mHXXN.js → use-releases-BzfYz1da.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BdbGTuns.js → use-reports-diagnostic-D4yF4iuL.js} +1 -1
- package/dist/client/assets/{use-secrets-DbkATagb.js → use-secrets-DS9zWxiz.js} +1 -1
- package/dist/client/assets/use-section-preview-base-H9VNpzGF.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-BqLmDXCH.js → use-sidebar-collapsed-hUfsznLr.js} +1 -1
- package/dist/client/assets/{use-tags-Cn5U7HDa.js → use-tags-CVvzIGGr.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CftsNPjL.js → use-task-board-analytics-BgxWC82w.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BDk-u9KA.js → use-task-board-events-DBz1fm-T.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CNMGpOwt.js → use-task-board-item-prs-D2PBN926.js} +1 -1
- package/dist/client/assets/{use-task-metadata-0ueqwOxI.js → use-task-metadata-1k4pU8z_.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CgQGRl3S.js → use-thread-analytics-D40j8ndA.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DLitie4Q.js → use-thread-outputs-2XKKA9Gw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-v90E8EIL.js +1 -0
- package/dist/client/assets/{useQueries-BfkCTicr.js → useQueries-DT3VE95i.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BoCx0vyL.js +1 -0
- package/dist/client/assets/{users-BIkPJzOg.js → users-GpxLvhWl.js} +1 -1
- package/dist/client/assets/{utils-Bp3fKbm9.js → utils-CkO9KdKe.js} +2 -2
- package/dist/client/assets/variant-calendar-CrETYYc9.js +1 -0
- package/dist/client/assets/variant-draft-pointer-jrxTxtyS.js +1 -0
- package/dist/client/assets/virtual-mcp-DHPQGUgu.js +1 -0
- package/dist/client/assets/{watch-sse-pool-CrLAsZHh.js → watch-sse-pool-Dc_r60nv.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +684 -684
- package/package.json +1 -1
- package/dist/client/assets/ActiveShapeUtils-CDpScllU.js +0 -1
- package/dist/client/assets/AreaChart-Du66qHXY.js +0 -1
- package/dist/client/assets/BarChart-BXz-bUtC.js +0 -1
- package/dist/client/assets/CartesianChart-BZmgsxge.js +0 -1
- package/dist/client/assets/ReferenceLine-BPq2MnBR.js +0 -1
- package/dist/client/assets/Sector-BraX9V6h.js +0 -28
- package/dist/client/assets/agent-analytics-Biob4Jvo.js +0 -2
- package/dist/client/assets/agent-app-DTwyyqho.js +0 -1
- package/dist/client/assets/agent-assets-DpuZ7qUq.js +0 -1
- package/dist/client/assets/agent-automations-CHJpber1.js +0 -1
- package/dist/client/assets/agent-deck-DRCJIHES.js +0 -1
- package/dist/client/assets/agent-e2e-rlzvrptO.js +0 -1
- package/dist/client/assets/agent-experiments-BzSUejrS.js +0 -1
- package/dist/client/assets/agent-file-pM3fkLSV.js +0 -1
- package/dist/client/assets/agent-hosting-CIblOaW0.js +0 -1
- package/dist/client/assets/agent-library-BF5T38g7.js +0 -1
- package/dist/client/assets/agent-library-file-BTDXrKvZ.js +0 -1
- package/dist/client/assets/agent-monitor-CMU4bHqc.js +0 -1
- package/dist/client/assets/agent-releases-CEAPMdCY.js +0 -2
- package/dist/client/assets/agent-settings-9voN143W.js +0 -1
- package/dist/client/assets/agent-site-editor-WHTbnkdB.js +0 -27
- package/dist/client/assets/agent-site-editor-code-DxTJ31bR.js +0 -2
- package/dist/client/assets/agent-site-editor-content-B8OXp1G1.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Bu7A4U4r.js +0 -1
- package/dist/client/assets/agent-view-DW3bjKRU.js +0 -1
- package/dist/client/assets/alert-J8Wo4iMe.js +0 -1
- package/dist/client/assets/analytics-sections-Crtm-SOa.js +0 -1
- package/dist/client/assets/api-keys-DPclIgvr.js +0 -1
- package/dist/client/assets/app-editor-CWO6RLKf.js +0 -1
- package/dist/client/assets/automation-list-row-CO-7cr0O.js +0 -1
- package/dist/client/assets/badge-ByzdbptS.js +0 -1
- package/dist/client/assets/blocks-tab-states-diUqUrAK.js +0 -20
- package/dist/client/assets/blog-schema-pXyj_uKN.js +0 -1
- package/dist/client/assets/category-editor-16fFMZmU.js +0 -1
- package/dist/client/assets/cms-settings-editor-Cowvog2q.js +0 -1
- package/dist/client/assets/collection-detail-BVMX_w00.js +0 -1
- package/dist/client/assets/content-tab-CTbbT9Kp.js +0 -22
- package/dist/client/assets/context-DwXA-O6V.js +0 -1
- package/dist/client/assets/hosted-publish-feedback-NabikYNC.js +0 -1
- package/dist/client/assets/index-BqS2UmN9.css +0 -1
- package/dist/client/assets/index-CxtzBp5_.js +0 -4
- package/dist/client/assets/infra-billing-kRHrP-RL.js +0 -1
- package/dist/client/assets/legacy-main-redirect-BdnJuiDi.js +0 -1
- package/dist/client/assets/library-DYD_N6_K.js +0 -1
- package/dist/client/assets/monitoring-CgqK6OeU.js +0 -1
- package/dist/client/assets/mustache-Aw4qvxEW.js +0 -4
- package/dist/client/assets/order-monitor-day-CIHUt3pK.js +0 -1
- package/dist/client/assets/page-seo-form-CnjlIIXj.js +0 -1
- package/dist/client/assets/plan-ByMMI8KU.js +0 -1
- package/dist/client/assets/post-calendar-Dq_uFQwi.js +0 -1
- package/dist/client/assets/post-editor-DPLEIDHY.js +0 -2
- package/dist/client/assets/preview-tab-BHT_7Qja.js +0 -551
- package/dist/client/assets/product-picker-dialog-p0Ic9l9I.js +0 -1
- package/dist/client/assets/project-apps-v-sauknl.js +0 -1
- package/dist/client/assets/project-reports-CZJuTnYB.js +0 -1
- package/dist/client/assets/project-tasks-CGicoIeY.js +0 -1
- package/dist/client/assets/record-editor-Bh04Pm0_.js +0 -1
- package/dist/client/assets/redirect-editor-DQhKbdsA.js +0 -1
- package/dist/client/assets/reports-BupQ5Xhd.js +0 -1
- package/dist/client/assets/reports-tab-aEhqa7te.js +0 -2
- package/dist/client/assets/repositories-CEC-SgTJ.js +0 -1
- package/dist/client/assets/resolve-tab-icon-DtNff2Yq.js +0 -1
- package/dist/client/assets/route-Co7AkL50.js +0 -1
- package/dist/client/assets/route-D9eWdPea.js +0 -1
- package/dist/client/assets/route-P4X0mipC.js +0 -1
- package/dist/client/assets/secret-ciphertext-CI3Fu2ro.js +0 -1
- package/dist/client/assets/sections-editor-BgMrH8fq.js +0 -4
- package/dist/client/assets/seo-editor-C-YMij5b.js +0 -1
- package/dist/client/assets/settings-tab-Cp5pryb2.js +0 -1
- package/dist/client/assets/shell-layout-DNfiem0_.js +0 -1
- package/dist/client/assets/site-editor-Dsm_SPF7.js +0 -1
- package/dist/client/assets/site-editor-toast-L4A-Cxh7.js +0 -1
- package/dist/client/assets/slider-B9iKqweT.js +0 -1
- package/dist/client/assets/tasks-DrfrXIxf.js +0 -1
- package/dist/client/assets/time-range-picker-Dm5YljWh.js +0 -1
- package/dist/client/assets/toggle-group-CtPF-F41.js +0 -1
- package/dist/client/assets/tooltipContext-DFq6ns9J.js +0 -1
- package/dist/client/assets/use-content-sync-D4PHTEJr.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-C4gtrY2f.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-6p2QJIdt.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-kHysLFoZ.js +0 -1
- package/dist/client/assets/use-main-schema-v8-Dcb6Yskn.js +0 -1
- package/dist/client/assets/use-mcp-client-ZokR8_74.js +0 -10
- package/dist/client/assets/use-panel-navigate-K8ACrPML.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-DJiBua9F.js +0 -1
- package/dist/client/assets/use-section-preview-base-De54Y3vh.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B7za82zu.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B0JY_wMj.js +0 -1
- package/dist/client/assets/variant-calendar-BIblXEHb.js +0 -1
- package/dist/client/assets/variant-draft-pointer-fs9iIwvq.js +0 -1
- package/dist/client/assets/virtual-mcp-CeCtCq_o.js +0 -1
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{c as q,b as Z,r as Q,j as t,B as te,h as it,l as ve,X as vs,T as bs,V as js,U as He,at as Ut,ar as Yt,as as Bt,t as oe,a2 as Fe,D as Xe,q as Je,s as lt,v as at,H as Ye,a3 as ys,fE as an,w as Vt,L as ws,I as ke,ak as rn,z as on,et as tt,av as Wt,aj as cn,es as ze,er as Be,an as Tt,m as Ss,K as Dt,fF as dn,fG as un,fH as mn,ba as be,fI as je,n as Ue,P as fn,d as Pt,u as pn,af as rt,o as Ns,e as hn,aM as Cs,y as _e,b2 as xn,a as gn,fJ as ks,fK as vn,aX as bn,ad as jn,aE as yn,aD as wn,a5 as Sn,fL as Nn,aL as Cn}from"./index-DcU2uHG-.js";import{g as kn}from"./extract-connection-data-CUvLfXNU.js";import{b as Mn}from"./chat-context-BnuwMOfj.js";import{U as _n,b as Vn}from"./build-improve-prompt-doc-0HVt3TgE.js";import{E as Tn}from"./empty-state-B1xpK558.js";import{a as Dn}from"./shell-layout-DNfiem0_.js";import{g as ft,n as Pn,a as Kt,e as On,u as In,f as An}from"./use-date-fns-locale-CEVf4Ifn.js";import{a as $n}from"./mcp-oauth-xBzZujQ_.js";import{f as Fn,e as En,b as zn,A as Rn,a as Ln,d as Un,c as Yn,g as Bn}from"./alert-dialog-M8Y0zqSA.js";import{T as ut}from"./textarea-BDWvYouR.js";import{c as Se,T as Ne,a as Ce}from"./tooltip-BqHx2R4U.js";import{a as Ot,b as Ms,u as Wn}from"./use-connection-Dj54skEw.js";import{b as Kn,a as _s,g as Vs,f as Gn,k as qn}from"./repository-binding-B-JblZ3B.js";import{i as Gt}from"./mcp-oauth-DP6VNnFQ.js";import{bg as Hn,k as Qn,bh as Xn,bi as Jn,aN as Zn,aH as ei,aK as ti,bj as si,bk as Ts,bl as Ds,bm as ni,as as ii,bn as li,bo as jt,bp as qt,A as Ht,M as ai,bq as ri,br as oi,g as Ps,p as Qt,n as ci,w as di,v as ui,u as mi,f as Os,D as Xt,aL as fi,ag as pi,ay as hi}from"./agent-icon-c0hRUHIU.js";import{s as Pe}from"./Plus-xabrshQG.js";import{t as dt,a as xi}from"./Tool01-BGL2Qt57.js";import{s as It}from"./Trash01-Cf6bGuCZ.js";import{u as Jt}from"./use-debounced-autosave-D0TGgFvB.js";import{A as gi}from"./add-connection-dialog-O4xCe9BP.js";import{i as Ct}from"./SearchMd-BODiv7c9.js";import{F as Zt}from"./file-type-icon-Ez8-DRHg.js";import{i as vi,j as bi,k as ji,l as yi}from"./use-org-fs-D82Vx4hB.js";import{I as Ze}from"./integration-icon-aeIvRSnw.js";import{C as Is}from"./checkbox-Dla8kRWj.js";import{S as wi}from"./search-input-C77c23a_.js";import{b as Oe,a as Ie,c as we,d as Ae,S as $e}from"./select-B47VUguS.js";import{s as At}from"./XClose-CdzjyNb0.js";import{C as Si}from"./collection-tabs-DJst1PBn.js";import{T as As,u as $s}from"./use-mcp-auth-status-2A9iou5g.js";import{u as pt}from"./use-mcp-client-ZokR8_74.js";import{a as Fs}from"./use-mcp-tools-BwuN38Gh.js";import{u as Ni}from"./use-mcp-prompts-JJb6q8dH.js";import{g as Ci}from"./connection-slug-CITJ0kGN.js";import{t as kt}from"./utils-CVEq3hMx.js";import{S as ht}from"./switch-BQFbXMA-.js";import{a as Es,b as zs,P as Rs}from"./popover-CVCbWisj.js";import{S as ki}from"./scroll-area-DowOzl5a.js";import{i as Mi}from"./Upload01-ZLE7vfB9.js";import{i as _i}from"./DotsVertical-BvyfZIer.js";import{a as Vi}from"./Image01-DowwsvYG.js";import{i as Ti}from"./Monitor01-DMME8GIo.js";import{g as Di}from"./types-Cj3BjtjJ.js";import{a as Ls,d as Pi,u as Oi}from"./use-main-schema-v8-Dcb6Yskn.js";import{a as Ii}from"./use-panel-navigate-K8ACrPML.js";import{u as Ai,e as Mt,r as _t,p as $i,g as Fi,s as Ei,t as zi,h as Ri,a as Li}from"./use-project-native-view-presence-DJiBua9F.js";import{a as Us,u as Ui,i as Yi,o as Bi,r as es,p as Wi,w as Ki,b as ts}from"./optimistic-project-sidebar-views-CKzSSiC-.js";import{P as Gi,a as qi,i as Hi}from"./sections-uFSvOb1s.js";import{i as $t}from"./Key01-rbnGMz2E.js";import{a as Qi}from"./format-time-Cq80KKvY.js";import{a as xt}from"./Copy01-C73PJJxr.js";import{u as Xi}from"./use-copy-K9rQ1PJH.js";import{L as ye}from"./label-DDPD5LQh.js";import{s as Ys,p as Ji,f as Zi}from"./thread-intent-DlbBEzNn.js";import{V as el,E as gt,r as Bs,C as tl,w as sl}from"./virtual-mcp-CeCtCq_o.js";import{s as Ws}from"./slugify-CEUa2lfQ.js";import{b as nl,a as il,D as ll}from"./drawer-CEiS53oX.js";import{u as al}from"./use-mobile-BfmJV4wy.js";import{d as vt}from"./delay-CnY5UFtP.js";import{b as rl}from"./sandbox-url-D3mC8qhT.js";import{S as ol,a as cl,b as dl}from"./secret-picker-D6q2PbZG.js";import{u as ul,a as ml}from"./use-secrets-DbkATagb.js";import{o as ss}from"./omit-sandbox-map-jj4lCB2U.js";import{G as fl}from"./repository-picker-CigkRPj6.js";import{r as pl}from"./serial-task-queue-CGOeQgpr.js";import{t as De,c as Qe,m as hl,a as Ks}from"./differenceInSeconds-C3x8sHUj.js";function nt(l,e){const s=ft(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,i=De(l,e?.in),a=i.getDay(),c=(a<n?7:0)+a-n;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function mt(l,e){return nt(l,{...e,weekStartsOn:1})}function Gs(l,e){const s=De(l,e?.in),n=s.getFullYear(),i=Qe(s,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=mt(i),c=Qe(s,0);c.setFullYear(n,0,4),c.setHours(0,0,0,0);const r=mt(c);return s.getTime()>=a.getTime()?n+1:s.getTime()>=r.getTime()?n:n-1}function ns(l,e){const s=De(l,e?.in);return s.setHours(0,0,0,0),s}function xl(l,e,s){const[n,i]=Pn(s?.in,l,e),a=ns(n),c=ns(i),r=+a-Kt(a),p=+c-Kt(c);return Math.round((r-p)/hl)}function gl(l,e){const s=Gs(l,e),n=Qe(l,0);return n.setFullYear(s,0,4),n.setHours(0,0,0,0),mt(n)}function vl(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function bl(l){return!(!vl(l)&&typeof l!="number"||isNaN(+De(l)))}function jl(l,e){const s=De(l,e?.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}function yl(l,e){const s=De(l,e?.in);return xl(s,jl(s))+1}function wl(l,e){const s=De(l,e?.in),n=+mt(s)-+gl(s);return Math.round(n/Ks)+1}function qs(l,e){const s=De(l,e?.in),n=s.getFullYear(),i=ft(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,c=Qe(e?.in||l,0);c.setFullYear(n+1,0,a),c.setHours(0,0,0,0);const r=nt(c,e),p=Qe(e?.in||l,0);p.setFullYear(n,0,a),p.setHours(0,0,0,0);const o=nt(p,e);return+s>=+r?n+1:+s>=+o?n:n-1}function Sl(l,e){const s=ft(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,i=qs(l,e),a=Qe(e?.in||l,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),nt(a,e)}function Nl(l,e){const s=De(l,e?.in),n=+nt(s,e)-+Sl(s,e);return Math.round(n/Ks)+1}function re(l,e){const s=l<0?"-":"",n=Math.abs(l).toString().padStart(e,"0");return s+n}const Ee={y(l,e){const s=l.getFullYear(),n=s>0?s:1-s;return re(e==="yy"?n%100:n,e.length)},M(l,e){const s=l.getMonth();return e==="M"?String(s+1):re(s+1,2)},d(l,e){return re(l.getDate(),e.length)},a(l,e){const s=l.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];default:return s==="am"?"a.m.":"p.m."}},h(l,e){return re(l.getHours()%12||12,e.length)},H(l,e){return re(l.getHours(),e.length)},m(l,e){return re(l.getMinutes(),e.length)},s(l,e){return re(l.getSeconds(),e.length)},S(l,e){const s=e.length,n=l.getMilliseconds(),i=Math.trunc(n*Math.pow(10,s-3));return re(i,e.length)}},qe={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},is={G:function(l,e,s){const n=l.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return s.era(n,{width:"abbreviated"});case"GGGGG":return s.era(n,{width:"narrow"});default:return s.era(n,{width:"wide"})}},y:function(l,e,s){if(e==="yo"){const n=l.getFullYear(),i=n>0?n:1-n;return s.ordinalNumber(i,{unit:"year"})}return Ee.y(l,e)},Y:function(l,e,s,n){const i=qs(l,n),a=i>0?i:1-i;if(e==="YY"){const c=a%100;return re(c,2)}return e==="Yo"?s.ordinalNumber(a,{unit:"year"}):re(a,e.length)},R:function(l,e){const s=Gs(l);return re(s,e.length)},u:function(l,e){const s=l.getFullYear();return re(s,e.length)},Q:function(l,e,s){const n=Math.ceil((l.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return re(n,2);case"Qo":return s.ordinalNumber(n,{unit:"quarter"});case"QQQ":return s.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(n,{width:"narrow",context:"formatting"});default:return s.quarter(n,{width:"wide",context:"formatting"})}},q:function(l,e,s){const n=Math.ceil((l.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return re(n,2);case"qo":return s.ordinalNumber(n,{unit:"quarter"});case"qqq":return s.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(n,{width:"narrow",context:"standalone"});default:return s.quarter(n,{width:"wide",context:"standalone"})}},M:function(l,e,s){const n=l.getMonth();switch(e){case"M":case"MM":return Ee.M(l,e);case"Mo":return s.ordinalNumber(n+1,{unit:"month"});case"MMM":return s.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(n,{width:"narrow",context:"formatting"});default:return s.month(n,{width:"wide",context:"formatting"})}},L:function(l,e,s){const n=l.getMonth();switch(e){case"L":return String(n+1);case"LL":return re(n+1,2);case"Lo":return s.ordinalNumber(n+1,{unit:"month"});case"LLL":return s.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(n,{width:"narrow",context:"standalone"});default:return s.month(n,{width:"wide",context:"standalone"})}},w:function(l,e,s,n){const i=Nl(l,n);return e==="wo"?s.ordinalNumber(i,{unit:"week"}):re(i,e.length)},I:function(l,e,s){const n=wl(l);return e==="Io"?s.ordinalNumber(n,{unit:"week"}):re(n,e.length)},d:function(l,e,s){return e==="do"?s.ordinalNumber(l.getDate(),{unit:"date"}):Ee.d(l,e)},D:function(l,e,s){const n=yl(l);return e==="Do"?s.ordinalNumber(n,{unit:"dayOfYear"}):re(n,e.length)},E:function(l,e,s){const n=l.getDay();switch(e){case"E":case"EE":case"EEE":return s.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(n,{width:"short",context:"formatting"});default:return s.day(n,{width:"wide",context:"formatting"})}},e:function(l,e,s,n){const i=l.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return re(a,2);case"eo":return s.ordinalNumber(a,{unit:"day"});case"eee":return s.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},c:function(l,e,s,n){const i=l.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return re(a,e.length);case"co":return s.ordinalNumber(a,{unit:"day"});case"ccc":return s.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(i,{width:"narrow",context:"standalone"});case"cccccc":return s.day(i,{width:"short",context:"standalone"});default:return s.day(i,{width:"wide",context:"standalone"})}},i:function(l,e,s){const n=l.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return re(i,e.length);case"io":return s.ordinalNumber(i,{unit:"day"});case"iii":return s.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(n,{width:"short",context:"formatting"});default:return s.day(n,{width:"wide",context:"formatting"})}},a:function(l,e,s){const i=l.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(l,e,s){const n=l.getHours();let i;switch(n===12?i=qe.noon:n===0?i=qe.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(l,e,s){const n=l.getHours();let i;switch(n>=17?i=qe.evening:n>=12?i=qe.afternoon:n>=4?i=qe.morning:i=qe.night,e){case"B":case"BB":case"BBB":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(l,e,s){if(e==="ho"){let n=l.getHours()%12;return n===0&&(n=12),s.ordinalNumber(n,{unit:"hour"})}return Ee.h(l,e)},H:function(l,e,s){return e==="Ho"?s.ordinalNumber(l.getHours(),{unit:"hour"}):Ee.H(l,e)},K:function(l,e,s){const n=l.getHours()%12;return e==="Ko"?s.ordinalNumber(n,{unit:"hour"}):re(n,e.length)},k:function(l,e,s){let n=l.getHours();return n===0&&(n=24),e==="ko"?s.ordinalNumber(n,{unit:"hour"}):re(n,e.length)},m:function(l,e,s){return e==="mo"?s.ordinalNumber(l.getMinutes(),{unit:"minute"}):Ee.m(l,e)},s:function(l,e,s){return e==="so"?s.ordinalNumber(l.getSeconds(),{unit:"second"}):Ee.s(l,e)},S:function(l,e){return Ee.S(l,e)},X:function(l,e,s){const n=l.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return as(n);case"XXXX":case"XX":return Le(n);default:return Le(n,":")}},x:function(l,e,s){const n=l.getTimezoneOffset();switch(e){case"x":return as(n);case"xxxx":case"xx":return Le(n);default:return Le(n,":")}},O:function(l,e,s){const n=l.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ls(n,":");default:return"GMT"+Le(n,":")}},z:function(l,e,s){const n=l.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ls(n,":");default:return"GMT"+Le(n,":")}},t:function(l,e,s){const n=Math.trunc(+l/1e3);return re(n,e.length)},T:function(l,e,s){return re(+l,e.length)}};function ls(l,e=""){const s=l>0?"-":"+",n=Math.abs(l),i=Math.trunc(n/60),a=n%60;return a===0?s+String(i):s+String(i)+e+re(a,2)}function as(l,e){return l%60===0?(l>0?"-":"+")+re(Math.abs(l)/60,2):Le(l,e)}function Le(l,e=""){const s=l>0?"-":"+",n=Math.abs(l),i=re(Math.trunc(n/60),2),a=re(n%60,2);return s+i+e+a}const rs=(l,e)=>{switch(l){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Hs=(l,e)=>{switch(l){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Cl=(l,e)=>{const s=l.match(/(P+)(p+)?/)||[],n=s[1],i=s[2];if(!i)return rs(l,e);let a;switch(n){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;default:a=e.dateTime({width:"full"});break}return a.replace("{{date}}",rs(n,e)).replace("{{time}}",Hs(i,e))},kl={p:Hs,P:Cl},Ml=/^D+$/,_l=/^Y+$/,Vl=["D","DD","YY","YYYY"];function Tl(l){return Ml.test(l)}function Dl(l){return _l.test(l)}function Pl(l,e,s){const n=Ol(l,e,s);if(console.warn(n),Vl.includes(l))throw new RangeError(n)}function Ol(l,e,s){const n=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${e}\`) for formatting ${n} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Il=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Al=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$l=/^'([^]*?)'?$/,Fl=/''/g,El=/[a-zA-Z]/;function zl(l,e,s){const n=ft(),i=s?.locale??n.locale??On,a=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,c=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=De(l,s?.in);if(!bl(r))throw new RangeError("Invalid time value");let p=e.match(Al).map(f=>{const m=f[0];if(m==="p"||m==="P"){const u=kl[m];return u(f,i.formatLong)}return f}).join("").match(Il).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const m=f[0];if(m==="'")return{isToken:!1,value:Rl(f)};if(is[m])return{isToken:!0,value:f};if(m.match(El))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:f}});i.localize.preprocessor&&(p=i.localize.preprocessor(r,p));const o={firstWeekContainsDate:a,weekStartsOn:c,locale:i};return p.map(f=>{if(!f.isToken)return f.value;const m=f.value;(!s?.useAdditionalWeekYearTokens&&Dl(m)||!s?.useAdditionalDayOfYearTokens&&Tl(m))&&Pl(m,e,String(l));const u=is[m[0]];return u(r,m,i.localize,o)}).join("")}function Rl(l){const e=l.match($l);return e?e[1].replace(Fl,"'"):l}const Qs=25*1024*1024,yt="home",wt="knowledge";function os(l){return l==null?"":l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(0)} KB`:`${(l/(1024*1024)).toFixed(1)} MB`}function Re(l){return l.split("/").pop()??l}function Ll(l){const e=q.c(64),{form:s}=l,n=Z(),{upload:i}=vi(yt),a=bi(),c=Q.useRef(null),[r,p]=Q.useState(!1),[o,f]=Q.useState(""),[m,u]=Q.useState(!1);let h;e[0]!==r?(h={enabled:r},e[0]=r,e[1]=h):h=e[1];const{data:d}=ji(60,h),x=d===void 0?[]:d;let g;e[2]!==r?(g={enabled:r},e[2]=r,e[3]=g):g=e[3];const{data:v}=yi(g),y=v===void 0?[]:v;let j;e[4]!==s?(j=()=>s.getValues("metadata.knowledge")??[],e[4]=s,e[5]=j):j=e[5];const[b,S]=Q.useState(j);let N;e[6]!==s?(N=I=>{S(I),s.setValue("metadata.knowledge",I,{shouldDirty:!0})},e[6]=s,e[7]=N):N=e[7];const k=N;let w;e[8]!==a||e[9]!==b||e[10]!==k||e[11]!==n||e[12]!==i?(w=async I=>{if(!I||I.length===0)return;const ne=Array.from(I),L=ne.filter(ql),ee=ne.filter(Gl);if(ee.length>0&&oe.warning(n("virtualMcp.filesSection.fileTooLargeTitle"),{description:n("virtualMcp.filesSection.fileTooLargeDescription",{names:ee.map(Kl).join(", ")})}),L.length!==0){try{await i.mutateAsync({dir:wt,files:L})}catch(J){const pe=J;oe.error(pe instanceof Error?pe.message:n("virtualMcp.filesSection.failedUploadFile"));return}k([...b,...L.map(J=>({id:crypto.randomUUID(),name:J.name,volume:yt,path:`${wt}/${J.name}`,url:a(yt,`${wt}/${J.name}`),contentType:J.type||null,size:J.size,addedAt:new Date().toISOString()}))])}},e[8]=a,e[9]=b,e[10]=k,e[11]=n,e[12]=i,e[13]=w):w=e[13];const C=w;let _;e[14]!==a||e[15]!==b||e[16]!==k?(_=I=>{b.some(ne=>ne.volume===I.volume&&ne.path===I.path)||(k([...b,{id:crypto.randomUUID(),name:Re(I.path),volume:I.volume,path:I.path,url:a(I.volume,I.path),contentType:null,size:I.size??null,addedAt:new Date().toISOString()}]),p(!1))},e[14]=a,e[15]=b,e[16]=k,e[17]=_):_=e[17];const T=_;let V;e[18]!==a||e[19]!==b||e[20]!==k?(V=I=>{b.some(ne=>ne.volume===I.volume&&ne.path===I.path)||(k([...b,{id:crypto.randomUUID(),name:Re(I.path),kind:"skill",volume:I.volume,path:I.path,url:a(I.volume,I.path),contentType:null,size:null,addedAt:new Date().toISOString()}]),p(!1))},e[18]=a,e[19]=b,e[20]=k,e[21]=V):V=e[21];const $=V;let D;e[22]!==b||e[23]!==k?(D=I=>{k(b.filter(ne=>ne.id!==I))},e[22]=b,e[23]=k,e[24]=D):D=e[24];const A=D;let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=I=>{p(I),I&&f("")},e[25]=P):P=e[25];const E=P;let U;e[26]!==b?(U=new Set(b.map(Wl)),e[26]=b,e[27]=U):U=e[27];const K=U,Y=o.toLowerCase();let B;e[28]!==K?(B=I=>!K.has(`${I.volume}/${I.path}`),e[28]=K,e[29]=B):B=e[29];const z=x.filter(Bl).filter(B).filter(I=>Re(I.path).toLowerCase().includes(Y)).slice(0,5);let M;e[30]!==K?(M=I=>!K.has(`${I.volume}/${I.path}`),e[30]=K,e[31]=M):M=e[31];const O=y.filter(M).filter(I=>Re(I.path).toLowerCase().includes(Y)).slice(0,5),G=I=>t.jsxs(vs,{open:r,onOpenChange:E,children:[t.jsx(bs,{asChild:!0,children:I}),t.jsxs(js,{align:"end",className:"w-56",children:[t.jsxs(He,{onSelect:()=>{c.current?.click()},children:[t.jsx(Hn,{size:16}),n("virtualMcp.filesSection.uploadFile")]}),t.jsxs(Ut,{children:[t.jsxs(Yt,{className:"gap-2 [&_svg:not([class*='text-'])]:text-muted-foreground",children:[t.jsx(Qn,{size:16}),n("virtualMcp.filesSection.selectFileOrFolder")]}),t.jsxs(Bt,{className:"w-72 p-0",children:[t.jsxs("div",{className:"flex items-center gap-2 border-b px-3",children:[t.jsx(Ct,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("input",{value:o,onChange:ne=>f(ne.target.value),onKeyDown:Yl,placeholder:n("virtualMcp.filesSection.searchFilesPlaceholder"),className:"h-10 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),t.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:z.length===0?t.jsx("p",{className:"px-2 py-3 text-center text-sm text-muted-foreground",children:n("virtualMcp.filesSection.noFilesFound")}):z.map(ne=>t.jsxs(He,{onSelect:()=>T(ne),children:[t.jsx(Zt,{filename:Re(ne.path),className:"h-5 w-4 shrink-0"}),t.jsx("span",{className:"flex-1 truncate",children:Re(ne.path)}),ne.size!=null&&t.jsx("span",{className:"text-xs text-muted-foreground",children:os(ne.size)})]},`${ne.volume}/${ne.path}`))})]})]}),t.jsxs(Ut,{children:[t.jsxs(Yt,{className:"gap-2 [&_svg:not([class*='text-'])]:text-muted-foreground",children:[t.jsx(dt,{size:16}),n("virtualMcp.filesSection.selectSkill")]}),t.jsxs(Bt,{className:"w-72 p-0",children:[t.jsxs("div",{className:"flex items-center gap-2 border-b px-3",children:[t.jsx(Ct,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("input",{value:o,onChange:ne=>f(ne.target.value),onKeyDown:Ul,placeholder:n("virtualMcp.filesSection.searchSkillsPlaceholder"),className:"h-10 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),t.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:O.length===0?t.jsx("p",{className:"px-2 py-3 text-center text-sm text-muted-foreground",children:n("virtualMcp.filesSection.noSkillsFound")}):O.map(ne=>t.jsxs(He,{onSelect:()=>$(ne),children:[t.jsx(dt,{size:16,className:"shrink-0"}),t.jsx("span",{className:"flex-1 truncate",children:Re(ne.path)})]},`${ne.volume}/${ne.path}`))})]})]})]})]}),R="flex flex-col gap-3";let F;e[32]!==n?(F=n("virtualMcp.filesSection.filesAndSkills"),e[32]=n,e[33]=F):F=e[33];let W;e[34]!==F?(W=t.jsx("h2",{className:"text-sm font-medium text-foreground",children:F}),e[34]=F,e[35]=W):W=e[35];let H;e[36]!==n?(H=n("virtualMcp.filesSection.description"),e[36]=n,e[37]=H):H=e[37];let se;e[38]!==H?(se=t.jsx("p",{className:"text-sm text-muted-foreground",children:H}),e[38]=H,e[39]=se):se=e[39];let le;e[40]!==W||e[41]!==se?(le=t.jsxs("div",{className:"flex flex-col gap-1",children:[W,se]}),e[40]=W,e[41]=se,e[42]=le):le=e[42];const ce=b.length>0&&G(t.jsxs(te,{variant:"outline",size:"sm",disabled:i.isPending,children:[i.isPending?t.jsx(it,{size:"xs"}):t.jsx(Pe,{size:14}),n("virtualMcp.filesSection.add")]}));let ae;e[43]!==le||e[44]!==ce?(ae=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[le,ce]}),e[43]=le,e[44]=ce,e[45]=ae):ae=e[45];let ie;e[46]!==C?(ie=t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:I=>{C(I.target.files),I.target.value=""}}),e[46]=C,e[47]=ie):ie=e[47];let X,de;e[48]===Symbol.for("react.memo_cache_sentinel")?(X=I=>{I.preventDefault(),u(!0)},de=()=>u(!1),e[48]=X,e[49]=de):(X=e[48],de=e[49]);let ue;e[50]!==C?(ue=I=>{I.preventDefault(),I.stopPropagation(),u(!1),C(I.dataTransfer.files)},e[50]=C,e[51]=ue):ue=e[51];const he=m&&"outline outline-2 outline-dashed outline-primary";let me;e[52]!==he?(me=ve("flex flex-col gap-2 rounded-lg",he),e[52]=he,e[53]=me):me=e[53];const xe=b.length===0?G(t.jsxs("button",{type:"button",className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-dashed border-border hover:bg-accent transition-colors w-full text-left cursor-pointer",children:[t.jsx("div",{className:"flex items-center justify-center size-8 rounded-md text-muted-foreground/75 border border-dashed border-border shrink-0",children:t.jsx(Pe,{size:16})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1",children:n("virtualMcp.filesSection.noFilesOrSkillsYet")})]})):b.map(I=>t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 surface",children:[I.kind==="skill"?t.jsx("div",{className:"flex items-center justify-center h-8 w-6.5 shrink-0 rounded-md bg-muted text-muted-foreground",children:t.jsx(dt,{size:16})}):t.jsx(Zt,{filename:I.name,className:"h-8 w-6.5 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:I.name}),t.jsx("p",{className:"text-xs text-muted-foreground",children:I.kind==="skill"?n("virtualMcp.filesSection.kindSkill"):I.size!=null?os(I.size):n("virtualMcp.filesSection.kindFile")})]}),t.jsx(te,{variant:"ghost",size:"icon",onClick:()=>A(I.id),"aria-label":n("virtualMcp.filesSection.removeAriaLabel",{name:I.name}),children:t.jsx(It,{size:16})})]},I.id));let ge;e[54]!==X||e[55]!==de||e[56]!==ue||e[57]!==me||e[58]!==xe?(ge=t.jsx("div",{onDragOver:X,onDragLeave:de,onDrop:ue,className:me,children:xe}),e[54]=X,e[55]=de,e[56]=ue,e[57]=me,e[58]=xe,e[59]=ge):ge=e[59];let fe;return e[60]!==ae||e[61]!==ie||e[62]!==ge?(fe=t.jsxs("section",{className:R,children:[ae,ie,ge]}),e[60]=ae,e[61]=ie,e[62]=ge,e[63]=fe):fe=e[63],fe}function Ul(l){return l.stopPropagation()}function Yl(l){return l.stopPropagation()}function Bl(l){return l.kind!=="dir"}function Wl(l){return`${l.volume}/${l.path}`}function Kl(l){return l.name}function Gl(l){return l.size>Qs}function ql(l){return l.size<=Qs}function Hl(l){return l==null?"all":l.length===0?"self":"selected"}function Ql(l){const e=q.c(88),{form:s,currentAgentId:n}=l,i=Z(),{org:a}=Fe(),c=Kn(),[r,p]=Q.useState(!1);let o;e[0]!==s?(o=s.getValues("metadata.subAgents")??null,e[0]=s,e[1]=o):o=e[1];const f=o;let m;e[2]!==f?(m=()=>Hl(f),e[2]=f,e[3]=m):m=e[3];const[u,h]=Q.useState(m);let d;e[4]!==f?(d=f??[],e[4]=f,e[5]=d):d=e[5];const[x,g]=Q.useState(d);let v,y,j,b,S,N;if(e[6]!==c||e[7]!==n||e[8]!==s||e[9]!==u||e[10]!==a||e[11]!==x||e[12]!==i){let _;e[19]!==n||e[20]!==a?(_=X=>X.id!==n&&X.id!==a.id&&X.status==="active",e[19]=n,e[20]=a,e[21]=_):_=e[21],v=c.filter(_);let T;e[22]!==x?(T=X=>x.includes(X.id),e[22]=x,e[23]=T):T=e[23];const V=v.filter(T);let $;e[24]!==s?($=(X,de)=>s.setValue("metadata.subAgents",X==="all"?null:X==="self"?[]:de,{shouldDirty:!0}),e[24]=s,e[25]=$):$=e[25];const D=$;let A;e[26]!==D||e[27]!==x?(A=X=>{h(X),D(X,x)},e[26]=D,e[27]=x,e[28]=A):A=e[28];const P=A;let E;e[29]!==D||e[30]!==x?(E=X=>{const de=x.includes(X)?x.filter(ue=>ue!==X):[...x,X];g(de),D("selected",de)},e[29]=D,e[30]=x,e[31]=E):E=e[31],y=E,S="flex flex-col gap-3";let U;e[32]!==i?(U=i("virtualMcp.subAgentsSection.title"),e[32]=i,e[33]=U):U=e[33];let K;e[34]!==U?(K=t.jsx("h2",{className:"text-sm font-medium text-foreground",children:U}),e[34]=U,e[35]=K):K=e[35];let Y;e[36]!==u||e[37]!==i?(Y=u==="all"&&t.jsx("p",{className:"text-sm text-muted-foreground",children:i("virtualMcp.subAgentsSection.canDelegateToAnyAgent")}),e[36]=u,e[37]=i,e[38]=Y):Y=e[38];let B;e[39]!==u||e[40]!==i?(B=u==="self"&&t.jsx("p",{className:"text-sm text-muted-foreground",children:i("virtualMcp.subAgentsSection.canOnlyDelegateToItself")}),e[39]=u,e[40]=i,e[41]=B):B=e[41];let z;e[42]!==K||e[43]!==Y||e[44]!==B?(z=t.jsxs("div",{className:"flex flex-col gap-1",children:[K,Y,B]}),e[42]=K,e[43]=Y,e[44]=B,e[45]=z):z=e[45];const M=u==="selected"&&V.length>0&&t.jsxs(te,{variant:"outline",size:"sm",onClick:()=>p(!0),children:[t.jsx(Pe,{size:14}),i("virtualMcp.subAgentsSection.addSubAgent")]});let O;e[46]!==P?(O=X=>P(X),e[46]=P,e[47]=O):O=e[47];let G;e[48]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(Oe,{size:"sm",className:"w-auto",children:t.jsx(Ie,{})}),e[48]=G):G=e[48];let R;e[49]!==i?(R=i("virtualMcp.subAgentsSection.anyAgent"),e[49]=i,e[50]=R):R=e[50];let F;e[51]!==R?(F=t.jsx(we,{value:"all",children:R}),e[51]=R,e[52]=F):F=e[52];let W;e[53]!==i?(W=i("virtualMcp.subAgentsSection.specificAgents"),e[53]=i,e[54]=W):W=e[54];let H;e[55]!==W?(H=t.jsx(we,{value:"selected",children:W}),e[55]=W,e[56]=H):H=e[56];let se;e[57]!==i?(se=i("virtualMcp.subAgentsSection.onlyItself"),e[57]=i,e[58]=se):se=e[58];let le;e[59]!==se?(le=t.jsx(we,{value:"self",children:se}),e[59]=se,e[60]=le):le=e[60];let ce;e[61]!==F||e[62]!==H||e[63]!==le?(ce=t.jsxs(Ae,{align:"end",children:[F,H,le]}),e[61]=F,e[62]=H,e[63]=le,e[64]=ce):ce=e[64];let ae;e[65]!==u||e[66]!==O||e[67]!==ce?(ae=t.jsxs($e,{value:u,onValueChange:O,children:[G,ce]}),e[65]=u,e[66]=O,e[67]=ce,e[68]=ae):ae=e[68];let ie;e[69]!==M||e[70]!==ae?(ie=t.jsxs("div",{className:"flex items-center gap-2",children:[M,ae]}),e[69]=M,e[70]=ae,e[71]=ie):ie=e[71],e[72]!==z||e[73]!==ie?(N=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[z,ie]}),e[72]=z,e[73]=ie,e[74]=N):N=e[74],j="flex flex-col gap-2",b=u==="selected"&&(V.length>0?V.map(X=>t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 surface",children:[t.jsx(Ze,{icon:X.icon,name:X.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:X.title}),X.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:X.description})]}),t.jsx(te,{variant:"ghost",size:"icon",onClick:()=>y(X.id),children:t.jsx(At,{size:16})})]},X.id)):t.jsxs("button",{type:"button",onClick:()=>p(!0),className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-dashed border-border hover:bg-accent transition-colors w-full text-left cursor-pointer",children:[t.jsx("div",{className:"flex items-center justify-center size-8 rounded-md text-muted-foreground/75 border border-dashed border-border shrink-0",children:t.jsx(Pe,{size:16})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:i("virtualMcp.subAgentsSection.emptyStateMessage")})]})),e[6]=c,e[7]=n,e[8]=s,e[9]=u,e[10]=a,e[11]=x,e[12]=i,e[13]=v,e[14]=y,e[15]=j,e[16]=b,e[17]=S,e[18]=N}else v=e[13],y=e[14],j=e[15],b=e[16],S=e[17],N=e[18];let k;e[75]!==j||e[76]!==b?(k=t.jsx("div",{className:j,children:b}),e[75]=j,e[76]=b,e[77]=k):k=e[77];let w;e[78]!==v||e[79]!==y||e[80]!==r||e[81]!==x?(w=t.jsx(Xl,{open:r,onOpenChange:p,candidates:v,selectedIds:x,onToggle:y}),e[78]=v,e[79]=y,e[80]=r,e[81]=x,e[82]=w):w=e[82];let C;return e[83]!==S||e[84]!==N||e[85]!==k||e[86]!==w?(C=t.jsxs("section",{className:S,children:[N,k,w]}),e[83]=S,e[84]=N,e[85]=k,e[86]=w,e[87]=C):C=e[87],C}function Xl(l){const e=q.c(39),{open:s,onOpenChange:n,candidates:i,selectedIds:a,onToggle:c}=l,r=Z(),[p,o]=Q.useState("");let f,m,u,h,d,x,g,v,y;if(e[0]!==i||e[1]!==n||e[2]!==c||e[3]!==s||e[4]!==p||e[5]!==a||e[6]!==r){const N=p.toLowerCase(),k=i.filter(_=>_.title.toLowerCase().includes(N)||_.description?.toLowerCase().includes(N));m=Xe,v=s,y=n,f=Je,d="max-w-md";let w;e[16]!==r?(w=r("virtualMcp.subAgentsSection.title"),e[16]=r,e[17]=w):w=e[17],e[18]!==w?(x=t.jsx(lt,{children:t.jsx(at,{children:w})}),e[18]=w,e[19]=x):x=e[19];let C;e[20]!==r?(C=r("virtualMcp.subAgentsSection.searchPlaceholder"),e[20]=r,e[21]=C):C=e[21],e[22]!==p||e[23]!==C?(g=t.jsx(wi,{value:p,onChange:o,placeholder:C,className:"w-full"}),e[22]=p,e[23]=C,e[24]=g):g=e[24],u="flex flex-col gap-1 max-h-80 overflow-y-auto",h=k.length===0?t.jsx("p",{className:"text-sm text-muted-foreground px-1 py-4 text-center",children:r("virtualMcp.subAgentsSection.noAgentsFound")}):k.map(_=>t.jsxs("button",{type:"button",onClick:()=>c(_.id),className:"flex items-center gap-3 px-2 py-2 rounded-lg hover:bg-accent transition-colors cursor-pointer w-full text-left",children:[t.jsx(Is,{checked:a.includes(_.id),className:"pointer-events-none",tabIndex:-1}),t.jsx(Ze,{icon:_.icon,name:_.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:_.title}),_.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:_.description})]})]},_.id)),e[0]=i,e[1]=n,e[2]=c,e[3]=s,e[4]=p,e[5]=a,e[6]=r,e[7]=f,e[8]=m,e[9]=u,e[10]=h,e[11]=d,e[12]=x,e[13]=g,e[14]=v,e[15]=y}else f=e[7],m=e[8],u=e[9],h=e[10],d=e[11],x=e[12],g=e[13],v=e[14],y=e[15];let j;e[25]!==u||e[26]!==h?(j=t.jsx("div",{className:u,children:h}),e[25]=u,e[26]=h,e[27]=j):j=e[27];let b;e[28]!==f||e[29]!==d||e[30]!==x||e[31]!==g||e[32]!==j?(b=t.jsxs(f,{className:d,children:[x,g,j]}),e[28]=f,e[29]=d,e[30]=x,e[31]=g,e[32]=j,e[33]=b):b=e[33];let S;return e[34]!==m||e[35]!==v||e[36]!==y||e[37]!==b?(S=t.jsx(m,{open:v,onOpenChange:y,children:b}),e[34]=m,e[35]=v,e[36]=y,e[37]=b,e[38]=S):S=e[38],S}function st(){const l=q.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(it,{className:"size-6 text-muted-foreground"})}),l[0]=e):e=l[0],e}function ct(l,e){return({error:s})=>s?.message?.includes("Method not found")||s?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:l})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ys,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:e("virtualMcp.dependencySelectionDialog.somethingWentWrong")}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:s?.message?s.message.length>200?`${s.message.slice(0,200)}...`:s.message:e("virtualMcp.dependencySelectionDialog.unexpectedError")})]})]})}function Xs(l){const e=q.c(23),{item:s,isSelected:n,onToggle:i,disabled:a}=l,c=a?"cursor-not-allowed opacity-50":"cursor-pointer",r=n?"bg-accent/25":"hover:bg-accent";let p;e[0]!==c||e[1]!==r?(p=ve("flex items-start gap-3 p-4 rounded-lg transition-colors",c,r),e[0]=c,e[1]=r,e[2]=p):p=e[2];let o;e[3]!==s.name?(o=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=o):o=e[4];let f;e[5]!==s.tags?(f=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=f):f=e[6];let m;e[7]!==o||e[8]!==f?(m=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o,f]}),e[7]=o,e[8]=f,e[9]=m):m=e[9];let u;e[10]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=u):u=e[11];let h;e[12]!==m||e[13]!==u?(h=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[m,u]}),e[12]=m,e[13]=u,e[14]=h):h=e[14];let d;e[15]!==a||e[16]!==n||e[17]!==i?(d=t.jsx(Is,{checked:n,onCheckedChange:i,disabled:a,className:"mt-0.5"}),e[15]=a,e[16]=n,e[17]=i,e[18]=d):d=e[18];let x;return e[19]!==p||e[20]!==h||e[21]!==d?(x=t.jsxs("label",{className:p,children:[h,d]}),e[19]=p,e[20]=h,e[21]=d,e[22]=x):x=e[22],x}function Jl(l){const e=q.c(35),{activeTab:s,onTabChange:n,showSelectAll:i,isAllSelected:a,handleSelectAll:c}=l,r=Z();let p;e[0]!==r?(p=r("virtualMcp.dependencySelectionDialog.tabTools"),e[0]=r,e[1]=p):p=e[1];let o;e[2]!==p?(o={id:"tools",label:p},e[2]=p,e[3]=o):o=e[3];let f;e[4]!==r?(f=r("virtualMcp.dependencySelectionDialog.tabActive"),e[4]=r,e[5]=f):f=e[5];let m;e[6]!==f?(m={id:"active",label:f},e[6]=f,e[7]=m):m=e[7];let u;e[8]!==r?(u=r("virtualMcp.dependencySelectionDialog.tabResources"),e[8]=r,e[9]=u):u=e[9];let h;e[10]!==u?(h={id:"resources",label:u},e[10]=u,e[11]=h):h=e[11];let d;e[12]!==r?(d=r("virtualMcp.dependencySelectionDialog.tabPrompts"),e[12]=r,e[13]=d):d=e[13];let x;e[14]!==d?(x={id:"prompts",label:d},e[14]=d,e[15]=x):x=e[15];let g;e[16]!==o||e[17]!==m||e[18]!==h||e[19]!==x?(g=[o,m,h,x],e[16]=o,e[17]=m,e[18]=h,e[19]=x,e[20]=g):g=e[20];let v;e[21]!==n?(v=S=>n(S),e[21]=n,e[22]=v):v=e[22];let y;e[23]!==s||e[24]!==v||e[25]!==g?(y=t.jsx(Si,{tabs:g,activeTab:s,onTabChange:v}),e[23]=s,e[24]=v,e[25]=g,e[26]=y):y=e[26];let j;e[27]!==c||e[28]!==a||e[29]!==i||e[30]!==r?(j=i&&t.jsx("button",{type:"button",onClick:c,className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r(a?"virtualMcp.dependencySelectionDialog.deselectAll":"virtualMcp.dependencySelectionDialog.selectAll")}),e[27]=c,e[28]=a,e[29]=i,e[30]=r,e[31]=j):j=e[31];let b;return e[32]!==y||e[33]!==j?(b=t.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-t border-border shrink-0",children:[y,j]}),e[32]=y,e[33]=j,e[34]=b):b=e[34],b}function Ft(l){const e=q.c(13),{items:s,selections:n,onToggle:i,emptyMessage:a,disabled:c}=l;let r,p,o;if(e[0]!==c||e[1]!==a||e[2]!==s||e[3]!==i||e[4]!==n){o=Symbol.for("react.early_return_sentinel");e:{const m=s.map(Zl);if(s.length===0){let u;e[8]!==a?(u=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:a})}),e[8]=a,e[9]=u):u=e[9],o=u;break e}r="flex-1 overflow-auto px-4 py-3 space-y-1",p=s.map(u=>t.jsx(Xs,{item:u,isSelected:n===null||n?.includes(u.id),onToggle:()=>i(u.id,m),disabled:c},u.id))}e[0]=c,e[1]=a,e[2]=s,e[3]=i,e[4]=n,e[5]=r,e[6]=p,e[7]=o}else r=e[5],p=e[6],o=e[7];if(o!==Symbol.for("react.early_return_sentinel"))return o;let f;return e[10]!==r||e[11]!==p?(f=t.jsx("div",{className:r,children:p}),e[10]=r,e[11]=p,e[12]=f):f=e[12],f}function Zl(l){return l.id}function ea(l){const e=q.c(22),{connectionId:s,toolSelections:n,onToggleTool:i}=l,a=Z(),{org:c}=Fe();let r;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(r={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=r):r=e[3];const p=pt(r);let o;e[4]!==p?(o={client:p},e[4]=p,e[5]=o):o=e[5];const{data:f}=Fs(o),m=f.tools;let u,h,d;if(e[6]!==f.tools||e[7]!==i||e[8]!==a||e[9]!==n){d=Symbol.for("react.early_return_sentinel");e:{const g=m.map(sa);let v;e[13]!==n?(v=b=>n===null||n.includes(b.name),e[13]=n,e[14]=v):v=e[14];const j=f.tools.filter(v).map(ta);if(j.length===0){let b;e[15]!==a?(b=a("virtualMcp.dependencySelectionDialog.noActiveToolsSelected"),e[15]=a,e[16]=b):b=e[16];let S;e[17]!==b?(S=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:b})}),e[17]=b,e[18]=S):S=e[18],d=S;break e}u="flex-1 overflow-auto px-4 py-3 space-y-1",h=j.map(b=>t.jsx(Xs,{item:b,isSelected:!0,onToggle:()=>i(b.id,g)},b.id))}e[6]=f.tools,e[7]=i,e[8]=a,e[9]=n,e[10]=u,e[11]=h,e[12]=d}else u=e[10],h=e[11],d=e[12];if(d!==Symbol.for("react.early_return_sentinel"))return d;let x;return e[19]!==u||e[20]!==h?(x=t.jsx("div",{className:u,children:h}),e[19]=u,e[20]=h,e[21]=x):x=e[21],x}function ta(l){return{id:l.name,name:l.name,description:l.description,tags:t.jsx(As,{annotations:l.annotations,_meta:l._meta})}}function sa(l){return l.name}function na(l){const e=q.c(16),{connectionId:s,selections:n,onToggle:i,disabled:a}=l,{org:c}=Fe();let r;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(r={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=r):r=e[3];const p=pt(r);let o;e[4]!==p?(o={client:p},e[4]=p,e[5]=o):o=e[5];const{data:f}=Fs(o);let m;e[6]!==f.tools?(m=f.tools.map(ia),e[6]=f.tools,e[7]=m):m=e[7];const u=m,h=Z();let d;e[8]!==h?(d=h("virtualMcp.dependencySelectionDialog.noToolsAvailable"),e[8]=h,e[9]=d):d=e[9];let x;return e[10]!==a||e[11]!==u||e[12]!==i||e[13]!==n||e[14]!==d?(x=t.jsx(Ft,{items:u,selections:n,onToggle:i,emptyMessage:d,disabled:a}),e[10]=a,e[11]=u,e[12]=i,e[13]=n,e[14]=d,e[15]=x):x=e[15],x}function ia(l){return{id:l.name,name:l.name,description:l.description,tags:t.jsx(As,{annotations:l.annotations,_meta:l._meta})}}function la(l){const e=q.c(16),{connectionId:s,selections:n,onToggle:i,disabled:a}=l,{org:c}=Fe();let r;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(r={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=r):r=e[3];const p=pt(r);let o;e[4]!==p?(o={client:p},e[4]=p,e[5]=o):o=e[5];const{data:f}=an(o);let m;e[6]!==f.resources?(m=f.resources.map(aa),e[6]=f.resources,e[7]=m):m=e[7];const u=m,h=Z();let d;e[8]!==h?(d=h("virtualMcp.dependencySelectionDialog.noResourcesAvailable"),e[8]=h,e[9]=d):d=e[9];let x;return e[10]!==a||e[11]!==u||e[12]!==i||e[13]!==n||e[14]!==d?(x=t.jsx(Ft,{items:u,selections:n,onToggle:i,emptyMessage:d,disabled:a}),e[10]=a,e[11]=u,e[12]=i,e[13]=n,e[14]=d,e[15]=x):x=e[15],x}function aa(l){return{id:l.name||l.uri,name:l.name||l.uri,description:l.description}}function ra(l){const e=q.c(16),{connectionId:s,selections:n,onToggle:i,disabled:a}=l,{org:c}=Fe();let r;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(r={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=r):r=e[3];const p=pt(r);let o;e[4]!==p?(o={client:p},e[4]=p,e[5]=o):o=e[5];const{data:f}=Ni(o);let m;e[6]!==f.prompts?(m=f.prompts.map(oa),e[6]=f.prompts,e[7]=m):m=e[7];const u=m,h=Z();let d;e[8]!==h?(d=h("virtualMcp.dependencySelectionDialog.noPromptsAvailable"),e[8]=h,e[9]=d):d=e[9];let x;return e[10]!==a||e[11]!==u||e[12]!==i||e[13]!==n||e[14]!==d?(x=t.jsx(Ft,{items:u,selections:n,onToggle:i,emptyMessage:d,disabled:a}),e[10]=a,e[11]=u,e[12]=i,e[13]=n,e[14]=d,e[15]=x):x=e[15],x}function oa(l){return{id:l.name,name:l.name,description:l.description}}function ca(l){const e=q.c(58),{currentConnection:s,activeTab:n,selectedId:i,formData:a,toggleTool:c,toggleResource:r,togglePrompt:p,toggleAllTools:o,toggleAllResources:f,toggleAllPrompts:m,onTabChange:u}=l,h=Z(),d=a[i],x=n==="tools"?d?.tools===null:n==="resources"?d?.resources===null:n==="prompts"?d?.prompts===null:!1,g=n!=="active";let v;e[0]!==n||e[1]!==i||e[2]!==m||e[3]!==f||e[4]!==o?(v=()=>{n==="tools"?o(i):n==="resources"?f(i):n==="prompts"&&m(i)},e[0]=n,e[1]=i,e[2]=m,e[3]=f,e[4]=o,e[5]=v):v=e[5];const y=v;let j;e[6]!==s.icon||e[7]!==s.title?(j=t.jsx(Ze,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0"}),e[6]=s.icon,e[7]=s.title,e[8]=j):j=e[8];let b;e[9]!==s.title?(b=t.jsx("h2",{className:"text-base font-semibold truncate",children:s.title}),e[9]=s.title,e[10]=b):b=e[10];let S;e[11]!==s.description?(S=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[11]=s.description,e[12]=S):S=e[12];let N;e[13]!==b||e[14]!==S?(N=t.jsxs("div",{className:"flex-1 min-w-0",children:[b,S]}),e[13]=b,e[14]=S,e[15]=N):N=e[15];let k;e[16]!==j||e[17]!==N?(k=t.jsx("div",{className:"px-6 pt-5 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[j,N]})}),e[16]=j,e[17]=N,e[18]=k):k=e[18];let w;e[19]!==n||e[20]!==y||e[21]!==x||e[22]!==u||e[23]!==g?(w=t.jsx(Jl,{activeTab:n,onTabChange:u,showSelectAll:g,isAllSelected:x,handleSelectAll:y}),e[19]=n,e[20]=y,e[21]=x,e[22]=u,e[23]=g,e[24]=w):w=e[24];let C;e[25]!==n||e[26]!==a||e[27]!==i||e[28]!==h||e[29]!==c?(C=n==="active"&&t.jsx(Ye,{fallback:ct(h("virtualMcp.dependencySelectionDialog.toolsNotSupported"),h),children:t.jsx(Q.Suspense,{fallback:t.jsx(st,{}),children:t.jsx(ea,{connectionId:i,toolSelections:a[i]?a[i].tools:[],onToggleTool:(A,P)=>c(i,A,P)})})}),e[25]=n,e[26]=a,e[27]=i,e[28]=h,e[29]=c,e[30]=C):C=e[30];let _;e[31]!==n||e[32]!==a||e[33]!==i||e[34]!==h||e[35]!==c?(_=n==="tools"&&t.jsx(Ye,{fallback:ct(h("virtualMcp.dependencySelectionDialog.toolsNotSupported"),h),children:t.jsx(Q.Suspense,{fallback:t.jsx(st,{}),children:t.jsx(na,{connectionId:i,selections:a[i]?a[i].tools:[],onToggle:(A,P)=>c(i,A,P)})})}),e[31]=n,e[32]=a,e[33]=i,e[34]=h,e[35]=c,e[36]=_):_=e[36];let T;e[37]!==n||e[38]!==a||e[39]!==i||e[40]!==h||e[41]!==r?(T=n==="resources"&&t.jsx(Ye,{fallback:ct(h("virtualMcp.dependencySelectionDialog.resourcesNotSupported"),h),children:t.jsx(Q.Suspense,{fallback:t.jsx(st,{}),children:t.jsx(la,{connectionId:i,selections:a[i]?a[i].resources:[],onToggle:(A,P)=>r(i,A,P)})})}),e[37]=n,e[38]=a,e[39]=i,e[40]=h,e[41]=r,e[42]=T):T=e[42];let V;e[43]!==n||e[44]!==a||e[45]!==i||e[46]!==h||e[47]!==p?(V=n==="prompts"&&t.jsx(Ye,{fallback:ct(h("virtualMcp.dependencySelectionDialog.promptsNotSupported"),h),children:t.jsx(Q.Suspense,{fallback:t.jsx(st,{}),children:t.jsx(ra,{connectionId:i,selections:a[i]?a[i].prompts:[],onToggle:(A,P)=>p(i,A,P)})})}),e[43]=n,e[44]=a,e[45]=i,e[46]=h,e[47]=p,e[48]=V):V=e[48];let $;e[49]!==T||e[50]!==V||e[51]!==C||e[52]!==_?($=t.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[C,_,T,V]}),e[49]=T,e[50]=V,e[51]=C,e[52]=_,e[53]=$):$=e[53];let D;return e[54]!==$||e[55]!==k||e[56]!==w?(D=t.jsxs(t.Fragment,{children:[k,w,$]}),e[54]=$,e[55]=k,e[56]=w,e[57]=D):D=e[57],D}function da(l){const e=q.c(7),{onClose:s}=l,n=Z();let i;e[0]!==s?(i=()=>s(!1),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==n?(a=n("virtualMcp.dependencySelectionDialog.done"),e[2]=n,e[3]=a):a=e[3];let c;return e[4]!==i||e[5]!==a?(c=t.jsx(Vt,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(te,{variant:"outline",onClick:i,children:a})}),e[4]=i,e[5]=a,e[6]=c):c=e[6],c}function ua(l){const e=q.c(23),{connectionId:s,onAuthenticate:n,children:i}=l,a=Z();let c;e[0]!==s?(c={connectionId:s},e[0]=s,e[1]=c):c=e[1];const r=$s(c);if(r.supportsOAuth&&!r.isAuthenticated){let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex items-center justify-center size-12 rounded-full bg-muted",children:t.jsx(Xn,{size:22,className:"text-muted-foreground"})}),e[2]=f):f=e[2];let m;e[3]!==a?(m=a("virtualMcp.dependencySelectionDialog.authorizationRequired"),e[3]=a,e[4]=m):m=e[4];let u;e[5]!==m?(u=t.jsx("p",{className:"text-sm font-medium",children:m}),e[5]=m,e[6]=u):u=e[6];let h;e[7]!==a?(h=a("virtualMcp.dependencySelectionDialog.authorizationDescription"),e[7]=a,e[8]=h):h=e[8];let d;e[9]!==h?(d=t.jsx("p",{className:"text-xs text-muted-foreground max-w-xs",children:h}),e[9]=h,e[10]=d):d=e[10];let x;e[11]!==u||e[12]!==d?(x=t.jsxs("div",{className:"space-y-1",children:[u,d]}),e[11]=u,e[12]=d,e[13]=x):x=e[13];let g;e[14]!==s||e[15]!==n||e[16]!==a?(g=n&&t.jsx(te,{variant:"outline",size:"sm",onClick:()=>n(s),children:a("virtualMcp.dependencySelectionDialog.authorize")}),e[14]=s,e[15]=n,e[16]=a,e[17]=g):g=e[17];let v;return e[18]!==x||e[19]!==g?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 p-8 text-center",children:[f,x,g]}),e[18]=x,e[19]=g,e[20]=v):v=e[20],v}let o;return e[21]!==i?(o=t.jsx(t.Fragment,{children:i}),e[21]=i,e[22]=o):o=e[22],o}function ma(l){const e={};for(const s of l)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function cs(l){return Object.entries(l).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function ds(l,e,s,n){const i=l[e]??{tools:null,resources:null,prompts:null};return{...l,[e]:{...i,[s]:n}}}function fa(l,e){return e.type==="SET_ACTIVE_TAB"?{...l,activeTab:e.payload}:l}function pa(l){const e=q.c(49),{open:s,onOpenChange:n,selectedId:i,form:a,connections:c,onAuthenticate:r}=l;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={activeTab:"tools"},e[0]=p):p=e[0];const[o,f]=Q.useReducer(fa,p),m=Ot(i??"");let u;e[1]!==c?(u=c??[],e[1]=c,e[2]=u):u=e[2];let h;e[3]!==u?(h=ma(u),e[3]=u,e[4]=h):h=e[4];const d=h;let x;e[5]!==a||e[6]!==d?(x=(z,M,O,G)=>{const R=d[z]?.[M];let F;R===null?F=G.filter(W=>W!==O):R?.includes(O)?F=R.filter(W=>W!==O):(F=[...R??[],O],F.length===G.length&&(F=null)),a.setValue("connections",cs(ds(d,z,M,F)),{shouldDirty:!0,shouldTouch:!0})},e[5]=a,e[6]=d,e[7]=x):x=e[7];const g=x;let v;e[8]!==a||e[9]!==d?(v=(z,M)=>{const G=d[z]?.[M]===null?[]:null;a.setValue("connections",cs(ds(d,z,M,G)),{shouldDirty:!0,shouldTouch:!0})},e[8]=a,e[9]=d,e[10]=v):v=e[10];const y=v;let j;e[11]!==g?(j=(z,M,O)=>g(z,"tools",M,O),e[11]=g,e[12]=j):j=e[12];const b=j;let S;e[13]!==g?(S=(z,M,O)=>g(z,"resources",M,O),e[13]=g,e[14]=S):S=e[14];const N=S;let k;e[15]!==g?(k=(z,M,O)=>g(z,"prompts",M,O),e[15]=g,e[16]=k):k=e[16];const w=k;let C;e[17]!==y?(C=z=>y(z,"tools"),e[17]=y,e[18]=C):C=e[18];const _=C;let T;e[19]!==y?(T=z=>y(z,"resources"),e[19]=y,e[20]=T):T=e[20];const V=T;let $;e[21]!==y?($=z=>y(z,"prompts"),e[21]=y,e[22]=$):$=e[22];const D=$;if(!i||!m)return null;let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(st,{}),e[23]=A):A=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=z=>f({type:"SET_ACTIVE_TAB",payload:z}),e[24]=P):P=e[24];let E;e[25]!==m||e[26]!==o.activeTab||e[27]!==d||e[28]!==i||e[29]!==D||e[30]!==V||e[31]!==_||e[32]!==w||e[33]!==N||e[34]!==b?(E=t.jsx(ca,{currentConnection:m,activeTab:o.activeTab,selectedId:i,formData:d,toggleTool:b,toggleResource:N,togglePrompt:w,toggleAllTools:_,toggleAllResources:V,toggleAllPrompts:D,onTabChange:P},i),e[25]=m,e[26]=o.activeTab,e[27]=d,e[28]=i,e[29]=D,e[30]=V,e[31]=_,e[32]=w,e[33]=N,e[34]=b,e[35]=E):E=e[35];let U;e[36]!==r||e[37]!==i||e[38]!==E?(U=t.jsx(Q.Suspense,{fallback:A,children:t.jsx(ua,{connectionId:i,onAuthenticate:r,children:E})}),e[36]=r,e[37]=i,e[38]=E,e[39]=U):U=e[39];let K;e[40]!==n?(K=t.jsx(da,{onClose:n}),e[40]=n,e[41]=K):K=e[41];let Y;e[42]!==U||e[43]!==K?(Y=t.jsxs(Je,{className:"sm:max-w-2xl h-[75vh] max-h-[75vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[U,K]}),e[42]=U,e[43]=K,e[44]=Y):Y=e[44];let B;return e[45]!==n||e[46]!==s||e[47]!==Y?(B=t.jsx(Xe,{open:s,onOpenChange:n,children:Y}),e[45]=n,e[46]=s,e[47]=Y,e[48]=B):B=e[48],B}const us="__new_instance__";function ha(l){const e=q.c(25),{connection_id:s,usedConnectionIds:n,onOpenSettings:i,onRemove:a,onAuthenticate:c,onSwitchInstance:r,onNewInstance:p}=l,o=Ot(s),{org:f}=Fe();if(!o){let g;return e[0]!==a?(g=t.jsx(ba,{onRemove:a}),e[0]=a,e[1]=g):g=e[1],g}let m;e[2]!==o?(m=Ci(o),e[2]=o,e[3]=m):m=e[3];const u=m;let h;e[4]!==s?(h=t.jsx(va,{connection_id:s}),e[4]=s,e[5]=h):h=e[5];let d;e[6]!==o.app_name||e[7]!==o.connection_type||e[8]!==o.description||e[9]!==o.icon||e[10]!==o.status||e[11]!==o.title||e[12]!==s||e[13]!==c||e[14]!==p||e[15]!==i||e[16]!==a||e[17]!==r||e[18]!==f.slug||e[19]!==u||e[20]!==n?(d=t.jsx(ga,{connection_id:s,connectionTitle:o.title,connectionDescription:o.description,connectionIcon:o.icon,connectionType:o.connection_type,connectionStatus:o.status,slug:u,orgSlug:f.slug,appName:o.app_name,usedConnectionIds:n,onOpenSettings:i,onRemove:a,onAuthenticate:c,onSwitchInstance:r,onNewInstance:p}),e[6]=o.app_name,e[7]=o.connection_type,e[8]=o.description,e[9]=o.icon,e[10]=o.status,e[11]=o.title,e[12]=s,e[13]=c,e[14]=p,e[15]=i,e[16]=a,e[17]=r,e[18]=f.slug,e[19]=u,e[20]=n,e[21]=d):d=e[21];let x;return e[22]!==h||e[23]!==d?(x=t.jsx(Q.Suspense,{fallback:h,children:d}),e[22]=h,e[23]=d,e[24]=x):x=e[24],x}function xa(l){const e=q.c(24),{appName:s,connectionId:n,usedConnectionIds:i,onSwitchInstance:a,onNewInstance:c}=l,r=Z();let p;e[0]!==s?(p={filters:[{column:"app_name",value:s}]},e[0]=s,e[1]=p):p=e[1];const o=Wn(p);if(o.length<=1&&!c)return null;let f;e[2]!==n||e[3]!==c||e[4]!==a?(f=g=>{g===us?c?.():a(n,g)},e[2]=n,e[3]=c,e[4]=a,e[5]=f):f=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Oe,{size:"xs",className:"w-auto gap-1 shadow-none",children:t.jsx(Ie,{})}),e[6]=m):m=e[6];let u;if(e[7]!==n||e[8]!==o||e[9]!==i){let g;e[11]!==n||e[12]!==i?(g=v=>t.jsx(we,{value:v.id,className:"text-xs",disabled:v.id!==n&&i.has(v.id),children:v.title},v.id),e[11]=n,e[12]=i,e[13]=g):g=e[13],u=o.map(g),e[7]=n,e[8]=o,e[9]=i,e[10]=u}else u=e[10];let h;e[14]!==c||e[15]!==r?(h=c&&t.jsxs(we,{value:us,className:"text-xs text-muted-foreground",children:["+ ",r("virtualMcp.connectionItem.newInstance")]}),e[14]=c,e[15]=r,e[16]=h):h=e[16];let d;e[17]!==u||e[18]!==h?(d=t.jsxs(Ae,{children:[u,h]}),e[17]=u,e[18]=h,e[19]=d):d=e[19];let x;return e[20]!==n||e[21]!==f||e[22]!==d?(x=t.jsxs($e,{value:n,onValueChange:f,children:[m,d]}),e[20]=n,e[21]=f,e[22]=d,e[23]=x):x=e[23],x}function ga({connection_id:l,connectionTitle:e,connectionDescription:s,connectionIcon:n,connectionType:i,connectionStatus:a,slug:c,orgSlug:r,appName:p,usedConnectionIds:o,onOpenSettings:f,onRemove:m,onAuthenticate:u,onSwitchInstance:h,onNewInstance:d}){const x=$s({connectionId:l}),g=Ms(),y=!(i==="VIRTUAL")&&x.supportsOAuth&&!x.isAuthenticated,j=a!=="active",b=Z(),S=async N=>{try{await g.update.mutateAsync({id:l,data:{status:N}}),oe.success(b(N==="active"?"virtualMcp.connectionItem.connectionEnabled":"virtualMcp.connectionItem.connectionDisabled"))}catch{oe.error(b("virtualMcp.connectionItem.failedToUpdateConnection"))}};return t.jsxs("div",{className:ve("surface overflow-hidden transition-colors",(y||j)&&"shadow-edge-destructive bg-destructive/5"),children:[t.jsxs(ws,{to:"/$org/settings/connections/$appSlug",params:{org:r,appSlug:c},className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-accent transition-colors",children:[t.jsx(Ze,{icon:n,name:e,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:e}),y?t.jsx("span",{className:"text-xs text-destructive font-medium",children:b("virtualMcp.connectionItem.needsAuthorization")}):j?t.jsx("span",{className:"text-xs text-destructive font-medium",children:b(a==="error"?"virtualMcp.connectionItem.disabledError":"virtualMcp.connectionItem.disabled")}):s&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s})]}),y?t.jsx(te,{variant:"outline",size:"sm",className:"shrink-0",onClick:N=>{N.preventDefault(),N.stopPropagation(),u(l)},children:b("virtualMcp.connectionItem.authorize")}):j?t.jsxs(te,{variant:"outline",size:"sm",className:"gap-1.5 shrink-0",onClick:N=>{N.preventDefault(),N.stopPropagation(),S("active")},children:[t.jsx(Jn,{size:13}),b("virtualMcp.connectionItem.enable")]}):t.jsxs(Se,{delayDuration:0,children:[t.jsx(Ne,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center rounded-md h-7 w-7 hover:bg-accent text-muted-foreground shrink-0 transition-colors",children:t.jsx(xi,{size:16})})}),t.jsx(Ce,{side:"bottom",children:b("virtualMcp.connectionItem.connectionSettings")})]})]}),t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-t border-border bg-muted/25",children:[p&&t.jsx(xa,{appName:p,connectionId:l,usedConnectionIds:o,onSwitchInstance:h,onNewInstance:d}),t.jsxs("div",{className:"flex items-center gap-0.5 ml-auto",children:[t.jsxs(Se,{delayDuration:0,children:[t.jsx(Ne,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon-sm",onClick:f,"aria-label":b("virtualMcp.connectionItem.configureResources"),children:t.jsx(Zn,{size:13})})}),t.jsx(Ce,{side:"bottom",children:b("virtualMcp.connectionItem.configureResources")})]}),!j&&t.jsxs(Se,{delayDuration:0,children:[t.jsx(Ne,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground",onClick:()=>S("inactive"),"aria-label":b("virtualMcp.connectionItem.disableConnection"),children:t.jsx(ei,{size:13})})}),t.jsx(Ce,{side:"bottom",children:b("virtualMcp.connectionItem.disable")})]}),t.jsxs(Se,{delayDuration:0,children:[t.jsx(Ne,{asChild:!0,children:t.jsx(te,{variant:"ghost-destructive",size:"icon-sm",onClick:m,"aria-label":b("virtualMcp.connectionItem.removeConnection"),children:t.jsx(At,{size:13})})}),t.jsx(Ce,{side:"bottom",children:b("virtualMcp.connectionItem.remove")})]})]})]})]})}function va(l){const e=q.c(17),{connection_id:s}=l,n=Ot(s);if(!n){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Js,{}),e[0]=m):m=e[0],m}let i;e[1]!==n.icon||e[2]!==n.title?(i=t.jsx(Ze,{icon:n.icon,name:n.title,size:"sm",className:"shrink-0"}),e[1]=n.icon,e[2]=n.title,e[3]=i):i=e[3];let a;e[4]!==n.title?(a=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[4]=n.title,e[5]=a):a=e[5];let c;e[6]!==n.description?(c=n.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[6]=n.description,e[7]=c):c=e[7];let r;e[8]!==a||e[9]!==c?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[a,c]}),e[8]=a,e[9]=c,e[10]=r):r=e[10];let p;e[11]!==i||e[12]!==r?(p=t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[i,r]}),e[11]=i,e[12]=r,e[13]=p):p=e[13];let o;e[14]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex items-center px-4 py-2 border-t border-border bg-muted/25",children:t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"})}),e[14]=o):o=e[14];let f;return e[15]!==p?(f=t.jsxs("div",{className:"surface overflow-hidden",children:[p,o]}),e[15]=p,e[16]=f):f=e[16],f}function ba(l){const e=q.c(20),{onRemove:s}=l,n=Z();let i;e[0]!==n?(i=n("virtualMcp.connectionItem.connectionNotFound"),e[0]=n,e[1]=i):i=e[1];let a;e[2]!==i?(a=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm text-destructive font-medium truncate",children:i})}),e[2]=i,e[3]=a):a=e[3];let c;e[4]!==n?(c=n("virtualMcp.connectionItem.removeConnection"),e[4]=n,e[5]=c):c=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(At,{size:13}),e[6]=r):r=e[6];let p;e[7]!==s||e[8]!==c?(p=t.jsx(Ne,{asChild:!0,children:t.jsx(te,{variant:"ghost-destructive",size:"icon-sm",className:"shrink-0",onClick:s,"aria-label":c,children:r})}),e[7]=s,e[8]=c,e[9]=p):p=e[9];let o;e[10]!==n?(o=n("virtualMcp.connectionItem.remove"),e[10]=n,e[11]=o):o=e[11];let f;e[12]!==o?(f=t.jsx(Ce,{side:"bottom",children:o}),e[12]=o,e[13]=f):f=e[13];let m;e[14]!==p||e[15]!==f?(m=t.jsxs(Se,{delayDuration:0,children:[p,f]}),e[14]=p,e[15]=f,e[16]=m):m=e[16];let u;return e[17]!==a||e[18]!==m?(u=t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 rounded-xl border border-destructive/50 bg-destructive/5",children:[a,m]}),e[17]=a,e[18]=m,e[19]=u):u=e[19],u}function Js(){const l=q.c(3);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"size-8 rounded-md bg-muted animate-pulse shrink-0"}),l[0]=e):e=l[0];let s;l[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[e,t.jsxs("div",{className:"flex-1 space-y-1.5",children:[t.jsx("div",{className:"h-4 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-48 rounded bg-muted animate-pulse"})]})]}),l[1]=s):s=l[1];let n;return l[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"surface overflow-hidden",children:[s,t.jsx("div",{className:"flex items-center px-4 py-2 border-t border-border bg-muted/25",children:t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"})})]}),l[2]=n):n=l[2],n}function Zs(l){const e=q.c(85),{value:s,onChange:n,onColorChange:i,name:a,size:c,className:r,avatarClassName:p,showHoverOverlay:o,disabled:f}=l,m=c===void 0?"lg":c,u=o===void 0?!0:o,h=f===void 0?!1:f,d=Z(),[x,g]=Q.useState(!1),[v,y]=Q.useState("icons"),[j,b]=Q.useState(""),[S,N]=Q.useState("blue");let k;e[0]!==s?(k=ti(s),e[0]=s,e[1]=k):k=e[1];const w=k,C=w.type==="icon"||w.type==="url"&&w.color?w.color:S;let _;e[2]!==n||e[3]!==C?(_=ee=>{n(jt(ee,C))},e[2]=n,e[3]=C,e[4]=_):_=e[4];const T=_;let V;e[5]!==n||e[6]!==i||e[7]!==w.name||e[8]!==w.type||e[9]!==w.url?(V=ee=>{N(ee),i?.(ee),w.type==="icon"?n(jt(w.name,ee)):w.type==="url"&&n(qt(w.url,ee))},e[5]=n,e[6]=i,e[7]=w.name,e[8]=w.type,e[9]=w.url,e[10]=V):V=e[10];const $=V;let D;e[11]!==n||e[12]!==C?(D=ee=>{n(qt(ee,C)),g(!1)},e[11]=n,e[12]=C,e[13]=D):D=e[13];const A=D;let P;e[14]!==n||e[15]!==C?(P=()=>{const ee=Ts(),J=ee[Math.floor(Math.random()*ee.length)];n(jt(J,C))},e[14]=n,e[15]=C,e[16]=P):P=e[16];const E=P,U=h?!1:x;let K;e[17]!==d?(K=d("common.iconPicker.changeIcon"),e[17]=d,e[18]=K):K=e[18];const Y=h?"cursor-default opacity-50":"cursor-pointer";let B;e[19]!==r||e[20]!==m||e[21]!==Y?(B=ve("relative group overflow-hidden",Y,si(m),r),e[19]=r,e[20]=m,e[21]=Y,e[22]=B):B=e[22];let z;e[23]!==p||e[24]!==a||e[25]!==m||e[26]!==s?(z=t.jsx(Ht,{icon:s,name:a,size:m,className:p}),e[23]=p,e[24]=a,e[25]=m,e[26]=s,e[27]=z):z=e[27];let M;e[28]!==h||e[29]!==u?(M=u&&!h&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ai,{size:16,className:"text-white"})}),e[28]=h,e[29]=u,e[30]=M):M=e[30];let O;e[31]!==h||e[32]!==K||e[33]!==B||e[34]!==z||e[35]!==M?(O=t.jsx(Es,{asChild:!0,children:t.jsxs("button",{type:"button","data-testid":"icon-picker-trigger","aria-label":K,disabled:h,className:B,children:[z,M]})}),e[31]=h,e[32]=K,e[33]=B,e[34]=z,e[35]=M,e[36]=O):O=e[36];let G;e[37]!==a||e[38]!==s?(G=t.jsx("div",{className:"flex items-center justify-center py-4",children:t.jsx(Ht,{icon:s,name:a,size:"xl"})}),e[37]=a,e[38]=s,e[39]=G):G=e[39];let R;e[40]!==v?(R=ee=>{if(ee.key!=="ArrowLeft"&&ee.key!=="ArrowRight")return;ee.preventDefault();const J=v==="icons"?"upload":"icons";y(J),document.getElementById(`icon-picker-tab-${J}`)?.focus()},e[40]=v,e[41]=R):R=e[41];const F=v==="icons",W=v==="icons"?0:-1;let H;e[42]===Symbol.for("react.memo_cache_sentinel")?(H=()=>y("icons"),e[42]=H):H=e[42];const se=v==="icons"?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground";let le;e[43]!==se?(le=ve("px-3 py-2 text-sm font-medium border-b-2 -mb-px transition-colors",se),e[43]=se,e[44]=le):le=e[44];let ce;e[45]!==d?(ce=d("common.iconPicker.iconsTab"),e[45]=d,e[46]=ce):ce=e[46];let ae;e[47]!==F||e[48]!==W||e[49]!==le||e[50]!==ce?(ae=t.jsx("button",{id:"icon-picker-tab-icons",type:"button",role:"tab","aria-selected":F,"aria-controls":"icon-picker-panel-icons",tabIndex:W,onClick:H,className:le,children:ce}),e[47]=F,e[48]=W,e[49]=le,e[50]=ce,e[51]=ae):ae=e[51];const ie=v==="upload",X=v==="upload"?0:-1;let de;e[52]===Symbol.for("react.memo_cache_sentinel")?(de=()=>y("upload"),e[52]=de):de=e[52];const ue=v==="upload"?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground";let he;e[53]!==ue?(he=ve("px-3 py-2 text-sm font-medium border-b-2 -mb-px transition-colors",ue),e[53]=ue,e[54]=he):he=e[54];let me;e[55]!==d?(me=d("common.iconPicker.uploadTab"),e[55]=d,e[56]=me):me=e[56];let xe;e[57]!==ie||e[58]!==X||e[59]!==he||e[60]!==me?(xe=t.jsx("button",{id:"icon-picker-tab-upload",type:"button",role:"tab","aria-selected":ie,"aria-controls":"icon-picker-panel-upload",tabIndex:X,onClick:de,className:he,children:me}),e[57]=ie,e[58]=X,e[59]=he,e[60]=me,e[61]=xe):xe=e[61];let ge;e[62]===Symbol.for("react.memo_cache_sentinel")?(ge=t.jsx("div",{className:"flex-1"}),e[62]=ge):ge=e[62];let fe;e[63]!==R||e[64]!==ae||e[65]!==xe?(fe=t.jsxs("div",{role:"tablist","aria-label":"Icon source",className:"flex items-center border-b border-border px-3",onKeyDown:R,children:[ae,xe,ge]}),e[63]=R,e[64]=ae,e[65]=xe,e[66]=fe):fe=e[66];let I;e[67]!==$||e[68]!==E||e[69]!==T||e[70]!==A||e[71]!==w.name||e[72]!==w.type||e[73]!==j||e[74]!==C||e[75]!==v?(I=v==="icons"?t.jsx("div",{id:"icon-picker-panel-icons",role:"tabpanel","aria-labelledby":"icon-picker-tab-icons",children:t.jsx(Sa,{search:j,onSearchChange:b,selectedColor:C,onColorChange:$,onSelectIcon:T,onRandom:E,currentIconName:w.type==="icon"?w.name:null})}):t.jsx("div",{id:"icon-picker-panel-upload",role:"tabpanel","aria-labelledby":"icon-picker-tab-upload",children:t.jsx(Na,{onUpload:A})}),e[67]=$,e[68]=E,e[69]=T,e[70]=A,e[71]=w.name,e[72]=w.type,e[73]=j,e[74]=C,e[75]=v,e[76]=I):I=e[76];let ne;e[77]!==G||e[78]!==fe||e[79]!==I?(ne=t.jsx(zs,{align:"start",className:"w-80 p-0",onOpenAutoFocus:ja,children:t.jsxs("div",{className:"flex flex-col",children:[G,fe,I]})}),e[77]=G,e[78]=fe,e[79]=I,e[80]=ne):ne=e[80];let L;return e[81]!==O||e[82]!==ne||e[83]!==U?(L=t.jsxs(Rs,{open:U,onOpenChange:g,children:[O,ne]}),e[81]=O,e[82]=ne,e[83]=U,e[84]=L):L=e[84],L}function ja(l){return l.preventDefault()}function ya(l){const e=q.c(33),{selectedColor:s,onColorChange:n}=l,i=Z(),[a,c]=Q.useState(!1);let r,p,o,f,m,u,h;if(e[0]!==a||e[1]!==s){const S=Ds(s);p=Rs,u=a,h=c,r=Es,m=!0,o="button",f=ve("h-6 w-6 rounded-full shrink-0 ring-2 ring-offset-2 ring-offset-background transition-all cursor-pointer hover:scale-110",S.dot,"ring-foreground/20"),e[0]=a,e[1]=s,e[2]=r,e[3]=p,e[4]=o,e[5]=f,e[6]=m,e[7]=u,e[8]=h}else r=e[2],p=e[3],o=e[4],f=e[5],m=e[6],u=e[7],h=e[8];let d;e[9]!==i?(d=i("common.iconPicker.changeColor"),e[9]=i,e[10]=d):d=e[10];let x;e[11]!==i?(x=i("common.iconPicker.changeColor"),e[11]=i,e[12]=x):x=e[12];let g;e[13]!==o||e[14]!==f||e[15]!==d||e[16]!==x?(g=t.jsx("button",{type:o,className:f,title:d,"aria-label":x}),e[13]=o,e[14]=f,e[15]=d,e[16]=x,e[17]=g):g=e[17];let v;e[18]!==r||e[19]!==m||e[20]!==g?(v=t.jsx(r,{asChild:m,children:g}),e[18]=r,e[19]=m,e[20]=g,e[21]=v):v=e[21];let y;e[22]!==n||e[23]!==s?(y=oi.map(S=>t.jsx("button",{type:"button",onClick:()=>{n(S.name),c(!1)},className:ve("h-5 w-5 rounded-full transition-all shrink-0 cursor-pointer",S.dot,s===S.name?"ring-2 ring-offset-1 ring-offset-background ring-foreground/30 scale-110":"hover:scale-110"),title:S.name,"aria-label":S.name},S.name)),e[22]=n,e[23]=s,e[24]=y):y=e[24];let j;e[25]!==y?(j=t.jsx(zs,{align:"start",side:"right",sideOffset:8,className:"w-auto p-2",onOpenAutoFocus:wa,children:t.jsx("div",{className:"grid grid-cols-4 gap-1",children:y})}),e[25]=y,e[26]=j):j=e[26];let b;return e[27]!==p||e[28]!==j||e[29]!==u||e[30]!==h||e[31]!==v?(b=t.jsxs(p,{open:u,onOpenChange:h,children:[v,j]}),e[27]=p,e[28]=j,e[29]=u,e[30]=h,e[31]=v,e[32]=b):b=e[32],b}function wa(l){return l.preventDefault()}function Sa(l){const e=q.c(55),{search:s,onSearchChange:n,selectedColor:i,onColorChange:a,onSelectIcon:c,onRandom:r,currentIconName:p}=l,o=Z();let f,m,u,h,d,x,g;if(e[0]!==p||e[1]!==a||e[2]!==r||e[3]!==n||e[4]!==c||e[5]!==s||e[6]!==i||e[7]!==o){const S=Ts(),N=Ds(i);m=ni(S,s),x="flex flex-col";let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Ct,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),e[15]=k):k=e[15];let w;e[16]!==n?(w=P=>n(P.target.value),e[16]=n,e[17]=w):w=e[17];let C;e[18]!==o?(C=o("common.iconPicker.filterPlaceholder"),e[18]=o,e[19]=C):C=e[19];let _;e[20]!==s||e[21]!==w||e[22]!==C?(_=t.jsxs("div",{className:"relative flex-1",children:[k,t.jsx(ke,{value:s,onChange:w,placeholder:C,size:"sm",className:"text-xs pl-7"})]}),e[20]=s,e[21]=w,e[22]=C,e[23]=_):_=e[23];let T;e[24]!==o?(T=o("common.iconPicker.randomIcon"),e[24]=o,e[25]=T):T=e[25];let V;e[26]!==o?(V=o("common.iconPicker.randomIcon"),e[26]=o,e[27]=V):V=e[27];let $;e[28]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ri,{className:"size-3.5 text-muted-foreground"}),e[28]=$):$=e[28];let D;e[29]!==r||e[30]!==T||e[31]!==V?(D=t.jsx(te,{type:"button",variant:"outline",size:"icon",onClick:r,className:"shrink-0",title:T,"aria-label":V,children:$}),e[29]=r,e[30]=T,e[31]=V,e[32]=D):D=e[32];let A;e[33]!==a||e[34]!==i?(A=t.jsx(ya,{selectedColor:i,onColorChange:a}),e[33]=a,e[34]=i,e[35]=A):A=e[35],e[36]!==D||e[37]!==A||e[38]!==_?(g=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[_,D,A]}),e[36]=D,e[37]=A,e[38]=_,e[39]=g):g=e[39],f=ki,d="h-56",u="grid grid-cols-9 gap-0.5 px-2 pb-2",h=m.map(P=>{const E=ii(P);return E?t.jsx("button",{type:"button",onClick:()=>c(P),className:ve("h-8 w-8 flex items-center justify-center rounded-lg transition-colors cursor-pointer",p===P?ve(N.bg,N.text):ve(N.text,"hover:bg-accent")),title:P,"aria-label":li(P),children:t.jsx(E,{size:18})},P):null}),e[0]=p,e[1]=a,e[2]=r,e[3]=n,e[4]=c,e[5]=s,e[6]=i,e[7]=o,e[8]=f,e[9]=m,e[10]=u,e[11]=h,e[12]=d,e[13]=x,e[14]=g}else f=e[8],m=e[9],u=e[10],h=e[11],d=e[12],x=e[13],g=e[14];let v;e[40]!==u||e[41]!==h?(v=t.jsx("div",{className:u,children:h}),e[40]=u,e[41]=h,e[42]=v):v=e[42];let y;e[43]!==m.length||e[44]!==o?(y=m.length===0&&t.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:o("common.iconPicker.noIconsFound")}),e[43]=m.length,e[44]=o,e[45]=y):y=e[45];let j;e[46]!==f||e[47]!==d||e[48]!==v||e[49]!==y?(j=t.jsxs(f,{className:d,children:[v,y]}),e[46]=f,e[47]=d,e[48]=v,e[49]=y,e[50]=j):j=e[50];let b;return e[51]!==x||e[52]!==g||e[53]!==j?(b=t.jsxs("div",{className:x,children:[g,j]}),e[51]=x,e[52]=g,e[53]=j,e[54]=b):b=e[54],b}function Na(l){const e=q.c(46),{onUpload:s}=l,n=Z(),i=Q.useRef(null);let a;e[0]!==s||e[1]!==n?(a=D=>{const A=D.target.files?.[0];if(!A)return;if(A.size>2097152){oe.error(n("common.iconPicker.imageTooLarge")),D.target.value="";return}const P=new FileReader;P.onerror=()=>{oe.error(n("common.iconPicker.failedToReadImage")),i.current&&(i.current.value="")},P.onloadend=()=>{P.readyState===FileReader.DONE&&P.result&&s(P.result),i.current&&(i.current.value="")},P.readAsDataURL(A)},e[0]=s,e[1]=n,e[2]=a):a=e[2];const c=a,[r,p]=Q.useState("");let o;e[3]!==s||e[4]!==r?(o=()=>{const D=r.trim();D&&(s(D),p(""))},e[3]=s,e[4]=r,e[5]=o):o=e[5];const f=o;let m;e[6]!==c?(m=t.jsx("input",{type:"file",ref:i,className:"hidden",accept:"image/*",onChange:c}),e[6]=c,e[7]=m):m=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=()=>i.current?.click(),e[8]=u):u=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Mi,{size:20}),e[9]=h):h=e[9];let d;e[10]!==n?(d=n("common.iconPicker.uploadHint"),e[10]=n,e[11]=d):d=e[11];let x;e[12]!==d?(x=t.jsxs("button",{type:"button",onClick:u,className:"h-24 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent transition-colors flex flex-col items-center justify-center gap-2 text-muted-foreground hover:text-foreground",children:[h,t.jsx("span",{className:"text-xs",children:d})]}),e[12]=d,e[13]=x):x=e[13];let g;e[14]!==n?(g=n("common.iconPicker.or"),e[14]=n,e[15]=g):g=e[15];let v;e[16]!==g?(v=t.jsx("span",{className:"text-xs text-muted-foreground",children:g}),e[16]=g,e[17]=v):v=e[17];let y;e[18]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{className:"flex-1 h-px bg-border"}),e[18]=y):y=e[18];let j;e[19]!==v?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[v,y]}),e[19]=v,e[20]=j):j=e[20];let b;e[21]===Symbol.for("react.memo_cache_sentinel")?(b=D=>p(D.target.value),e[21]=b):b=e[21];let S;e[22]!==n?(S=n("common.iconPicker.pasteUrlPlaceholder"),e[22]=n,e[23]=S):S=e[23];let N;e[24]!==f?(N=D=>{D.key==="Enter"&&(D.preventDefault(),f())},e[24]=f,e[25]=N):N=e[25];let k;e[26]!==r||e[27]!==S||e[28]!==N?(k=t.jsx(ke,{value:r,onChange:b,placeholder:S,className:"h-8 text-xs flex-1",onKeyDown:N}),e[26]=r,e[27]=S,e[28]=N,e[29]=k):k=e[29];let w;e[30]!==r?(w=r.trim(),e[30]=r,e[31]=w):w=e[31];const C=!w;let _;e[32]!==n?(_=n("common.iconPicker.apply"),e[32]=n,e[33]=_):_=e[33];let T;e[34]!==f||e[35]!==C||e[36]!==_?(T=t.jsx(te,{variant:"outline",className:"shrink-0",onClick:f,disabled:C,children:_}),e[34]=f,e[35]=C,e[36]=_,e[37]=T):T=e[37];let V;e[38]!==k||e[39]!==T?(V=t.jsxs("div",{className:"flex items-center gap-1.5",children:[k,T]}),e[38]=k,e[39]=T,e[40]=V):V=e[40];let $;return e[41]!==j||e[42]!==V||e[43]!==m||e[44]!==x?($=t.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[m,x,j,V]}),e[41]=j,e[42]=V,e[43]=m,e[44]=x,e[45]=$):$=e[45],$}function Ca(l){const e=q.c(11),{viewId:s}=l;if(s==="overview"){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ps,{size:16}),e[0]=i):i=e[0],i}if(s==="reports"){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{size:16}),e[1]=i):i=e[1],i}if(s==="board"){let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(ci,{size:16}),e[2]=i):i=e[2],i}if(s==="site-editor"){let i;return e[3]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ti,{size:16}),e[3]=i):i=e[3],i}if(s==="assets"){let i;return e[4]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Vi,{size:16}),e[4]=i):i=e[4],i}if(s==="releases"){let i;return e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(di,{size:16}),e[5]=i):i=e[5],i}if(s==="hosting"){let i;return e[6]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(rn,{size:16}),e[6]=i):i=e[6],i}if(s==="e2e"){let i;return e[7]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(ui,{size:16}),e[7]=i):i=e[7],i}if(s==="analytics"){let i;return e[8]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{size:16}),e[8]=i):i=e[8],i}if(s==="cdn"){let i;return e[9]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(mi,{size:16}),e[9]=i):i=e[9],i}let n;return e[10]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Os,{size:16}),e[10]=n):n=e[10],n}function ms(l){const e=q.c(51),{pinned:s,canSetMainView:n,onOpen:i,onTogglePin:a,onSetMainView:c}=l,r=Z(),p=s?"text-foreground":"text-muted-foreground/40";let o;e[0]!==p?(o=ve("size-7",p),e[0]=p,e[1]=o):o=e[1];let f;e[2]!==s||e[3]!==r?(f=r(s?"virtualMcp.settings.views.unpin":"virtualMcp.settings.views.pin"),e[2]=s,e[3]=r,e[4]=f):f=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Xt,{size:16}),e[5]=m):m=e[5];let u;e[6]!==a||e[7]!==s||e[8]!==o||e[9]!==f?(u=t.jsx(Ne,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon",className:o,"aria-label":f,"aria-pressed":s,onClick:a,children:m})}),e[6]=a,e[7]=s,e[8]=o,e[9]=f,e[10]=u):u=e[10];let h;e[11]!==s||e[12]!==r?(h=r(s?"virtualMcp.settings.views.unpin":"virtualMcp.settings.views.pin"),e[11]=s,e[12]=r,e[13]=h):h=e[13];let d;e[14]!==h?(d=t.jsx(Ce,{side:"top",children:h}),e[14]=h,e[15]=d):d=e[15];let x;e[16]!==u||e[17]!==d?(x=t.jsxs(Se,{delayDuration:0,children:[u,d]}),e[16]=u,e[17]=d,e[18]=x):x=e[18];let g;e[19]!==r?(g=r("virtualMcp.settings.views.rowActions"),e[19]=r,e[20]=g):g=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(_i,{size:16}),e[21]=v):v=e[21];let y;e[22]!==g?(y=t.jsx(bs,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":g,children:v})}),e[22]=g,e[23]=y):y=e[23];let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(on,{size:14}),e[24]=j):j=e[24];let b;e[25]!==r?(b=r("virtualMcp.settings.views.open"),e[25]=r,e[26]=b):b=e[26];let S;e[27]!==i||e[28]!==b?(S=t.jsxs(He,{onClick:i,children:[j,b]}),e[27]=i,e[28]=b,e[29]=S):S=e[29];let N;e[30]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(Xt,{size:14}),e[30]=N):N=e[30];let k;e[31]!==s||e[32]!==r?(k=r(s?"virtualMcp.settings.views.unpin":"virtualMcp.settings.views.pin"),e[31]=s,e[32]=r,e[33]=k):k=e[33];let w;e[34]!==a||e[35]!==k?(w=t.jsxs(He,{onClick:a,children:[N,k]}),e[34]=a,e[35]=k,e[36]=w):w=e[36];let C;e[37]!==n||e[38]!==c||e[39]!==r?(C=n&&t.jsxs(He,{onClick:c,children:[t.jsx(Ps,{size:14}),r("virtualMcp.settings.views.setMainView")]}),e[37]=n,e[38]=c,e[39]=r,e[40]=C):C=e[40];let _;e[41]!==S||e[42]!==w||e[43]!==C?(_=t.jsxs(js,{align:"end",children:[S,w,C]}),e[41]=S,e[42]=w,e[43]=C,e[44]=_):_=e[44];let T;e[45]!==y||e[46]!==_?(T=t.jsxs(vs,{children:[y,_]}),e[45]=y,e[46]=_,e[47]=T):T=e[47];let V;return e[48]!==T||e[49]!==x?(V=t.jsxs("div",{className:"flex items-center gap-1",children:[x,T]}),e[48]=T,e[49]=x,e[50]=V):V=e[50],V}const fs=l=>l.stopPropagation();function ka(l){const e=q.c(8),{icon:s,title:n}=l;let i;e[0]!==s||e[1]!==n?(i=t.jsx(Ze,{icon:s,name:n,size:"xs",className:"shrink-0"}),e[0]=s,e[1]=n,e[2]=i):i=e[2];let a;e[3]!==n?(a=t.jsx("span",{className:"text-xs text-muted-foreground",children:n}),e[3]=n,e[4]=a):a=e[4];let c;return e[5]!==i||e[6]!==a?(c=t.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 bg-muted/30",children:[i,a]}),e[5]=i,e[6]=a,e[7]=c):c=e[7],c}function Ma(l){const e=q.c(70),{views:s}=l,n=Z();let i;e[0]!==n?(i=n("virtualMcp.settings.views.defaults"),e[0]=n,e[1]=i):i=e[1];let a;e[2]!==n?(a=n("virtualMcp.layoutTabContent.mainView"),e[2]=n,e[3]=a):a=e[3];let c;e[4]!==n?(c=n("virtualMcp.layoutTabContent.mainViewDescription"),e[4]=n,e[5]=c):c=e[5];const r=s.defaultMainView,p=s.setMainView;let o;e[6]!==n?(o=n("virtualMcp.layoutTabContent.mainView"),e[6]=n,e[7]=o):o=e[7];let f;e[8]!==n?(f=n("virtualMcp.layoutTabContent.noMainView"),e[8]=n,e[9]=f):f=e[9];let m;e[10]!==f?(m=t.jsx(Ie,{placeholder:f}),e[10]=f,e[11]=m):m=e[11];let u;e[12]!==o||e[13]!==m?(u=t.jsx(Oe,{"aria-label":o,size:"sm",className:"w-36 shrink-0 @min-xl/project-settings:w-44",children:m}),e[12]=o,e[13]=m,e[14]=u):u=e[14];let h;e[15]!==s.defaultMainOptions?(h=s.defaultMainOptions.map(_a),e[15]=s.defaultMainOptions,e[16]=h):h=e[16];let d;e[17]!==h?(d=t.jsx(Ae,{children:h}),e[17]=h,e[18]=d):d=e[18];let x;e[19]!==d||e[20]!==u||e[21]!==s.defaultMainView||e[22]!==s.setMainView?(x=t.jsxs($e,{value:r,onValueChange:p,children:[u,d]}),e[19]=d,e[20]=u,e[21]=s.defaultMainView,e[22]=s.setMainView,e[23]=x):x=e[23];let g;e[24]!==x||e[25]!==a||e[26]!==c?(g=t.jsx(tt,{title:a,description:c,action:x}),e[24]=x,e[25]=a,e[26]=c,e[27]=g):g=e[27];let v;e[28]!==n?(v=n("virtualMcp.layoutTabContent.showChat"),e[28]=n,e[29]=v):v=e[29];let y;e[30]!==n?(y=n("virtualMcp.layoutTabContent.showChatDescription"),e[30]=n,e[31]=y):y=e[31];let j;e[32]!==n?(j=n("virtualMcp.layoutTabContent.showChat"),e[32]=n,e[33]=j):j=e[33];const b=s.noMainView?!0:s.chatDefaultOpen;let S;e[34]!==j||e[35]!==b||e[36]!==s.noMainView||e[37]!==s.setChatDefaultOpen?(S=t.jsx(Ne,{asChild:!0,children:t.jsx("span",{className:"shrink-0",children:t.jsx(ht,{"aria-label":j,checked:b,disabled:s.noMainView,onCheckedChange:s.setChatDefaultOpen})})}),e[34]=j,e[35]=b,e[36]=s.noMainView,e[37]=s.setChatDefaultOpen,e[38]=S):S=e[38];let N;e[39]!==n||e[40]!==s.noMainView?(N=s.noMainView&&t.jsx(Ce,{side:"top",children:n("virtualMcp.layoutTabContent.chatAlwaysShown")}),e[39]=n,e[40]=s.noMainView,e[41]=N):N=e[41];let k;e[42]!==S||e[43]!==N?(k=t.jsxs(Se,{delayDuration:0,children:[S,N]}),e[42]=S,e[43]=N,e[44]=k):k=e[44];let w;e[45]!==v||e[46]!==y||e[47]!==k?(w=t.jsx(tt,{title:v,description:y,action:k}),e[45]=v,e[46]=y,e[47]=k,e[48]=w):w=e[48];let C;e[49]!==g||e[50]!==w?(C=t.jsxs(ze,{children:[g,w]}),e[49]=g,e[50]=w,e[51]=C):C=e[51];let _;e[52]!==i||e[53]!==C?(_=t.jsx(Be,{title:i,children:C}),e[52]=i,e[53]=C,e[54]=_):_=e[54];let T;e[55]!==n?(T=n("virtualMcp.settings.views.sidebar"),e[55]=n,e[56]=T):T=e[56];let V;e[57]!==s?(V=s.projectViews.map(E=>{const U=s.pinned(E);return t.jsx(tt,{icon:t.jsx(Ca,{viewId:E}),title:s.labels[E],onClick:()=>s.openView(E),action:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(ms,{pinned:U,canSetMainView:U&&!s.isMainView(E),onOpen:()=>s.openView(E),onTogglePin:()=>s.togglePin(E,!U),onSetMainView:()=>s.setMainView(E)}),t.jsx("span",{onClick:()=>s.openView(E),className:"flex cursor-pointer items-center text-muted-foreground",children:t.jsx(Wt,{size:16})})]})},E)}),e[57]=s,e[58]=V):V=e[58];let $;e[59]!==s?($=s.connectionsData.flatMap(E=>[t.jsx(ka,{icon:E.icon,title:E.title},`${E.id}:header`),...E.uiTools.map(U=>{const K=s.pinnedAppViews.find(M=>M.connectionId===E.id&&M.toolName===U.name),Y=!!K,B=cn(E.id,U.name),z=`ext-apps:${E.id}:${U.name}`;return t.jsx(tt,{onClick:()=>s.openView(B),icon:Y?t.jsx("span",{onClick:fs,children:t.jsx(Zs,{value:K.icon??null,name:K.label||U.name,size:"xs",showHoverOverlay:!1,onChange:M=>s.setAppViewIcon(E.id,U.name,M)})}):t.jsx(Os,{size:16}),title:Y?t.jsx("span",{onClick:fs,children:t.jsx(ke,{value:K.label,onChange:M=>s.setAppViewLabel(E.id,U.name,M.target.value),onBlur:s.commitAppViewLabel,"aria-label":U.title??kt(U.name),className:"h-7 w-full max-w-52 text-sm"})}):U.title??kt(U.name),action:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(ms,{pinned:Y,canSetMainView:Y&&!s.isMainView(z),onOpen:()=>s.openView(B),onTogglePin:()=>s.toggleAppViewPin(E.id,U.name),onSetMainView:()=>s.setMainView(z)}),t.jsx("span",{onClick:()=>s.openView(B),className:"flex cursor-pointer items-center text-muted-foreground",children:t.jsx(Wt,{size:16})})]})},`${E.id}:${U.name}`)})]),e[59]=s,e[60]=$):$=e[60];let D;e[61]!==V||e[62]!==$?(D=t.jsxs(ze,{children:[V,$]}),e[61]=V,e[62]=$,e[63]=D):D=e[63];let A;e[64]!==T||e[65]!==D?(A=t.jsx(Be,{title:T,children:D}),e[64]=T,e[65]=D,e[66]=A):A=e[66];let P;return e[67]!==_||e[68]!==A?(P=t.jsxs(t.Fragment,{children:[_,A]}),e[67]=_,e[68]=A,e[69]=P):P=e[69],P}function _a(l){return t.jsx(we,{value:l.value,children:l.label},l.value)}const en="site-editor",Va=new Set([en,"content"]);function Ta({virtualMcpId:l,form:e,flushAndSave:s}){const n=Z(),i=Tt(),{openPanel:a}=Ii(),c=_s(l),r=Ai(c),p=Us(l),o=Ui(l),f=(c?.connections??[]).map(M=>M.connection_id).sort(),{data:m}=Ss({queryKey:Dt.projectConnectionDetails(l,f),enabled:f.length>0,queryFn:async()=>await Promise.all(f.map(async O=>{try{const{item:G}=await i.call("COLLECTION_CONNECTIONS_GET",{id:O}),R=(G?.tools??[]).flatMap(F=>{const W=Di(F._meta);return W?[{name:F.name,title:F.title,description:F.description,resourceUri:W}]:[]});return{fetchOk:!0,id:O,title:G?.title??O,icon:G?.icon??null,uiTools:R}}catch{return{fetchOk:!1,id:O,title:O,icon:null,uiTools:[]}}}))}),u=(m??[]).filter(M=>M.uiTools.length>0),h=new Set([...dn,...un]),d=e.watch("metadata.ui.pinnedViews")??[],x=e.watch("metadata.ui.layout")??null,g=x?.defaultMainView??null,v=x?.chatDefaultOpen??!1,y=Mt(_t({sidebarViews:e.watch("metadata.sidebarViews"),ui:{layout:x}}),e.watch("metadata.sidebarViewsVersion")),j=o??(c?Mt(_t(c.metadata),c.metadata.sidebarViewsVersion):y),b=(()=>{if(!g||g.type==="chat")return"";const M=mn(g.type);return M==="instructions"||M==="connections"||M==="layout"?"settings":Va.has(M)?en:h.has(M)?M:`${M}:${g.id??""}:${g.toolName??""}`})(),S=b==="",N=M=>{const[O,G,R]=M.split(":");return O?h.has(O)?{type:O}:O==="ext-apps"&&G?{type:"ext-apps",id:G,toolName:R||void 0}:null:null},k=M=>{e.setValue("metadata.ui.pinnedViews",M,{shouldDirty:!0})},w=M=>{e.setValue("metadata.ui.layout",{...x,...M},{shouldDirty:!0})},C=Q.useRef(!1);if(m&&m.length>0&&!C.current){C.current=!0;const M=new Set((m??[]).filter(F=>F.fetchOk).map(F=>F.id)),O=new Set(u.flatMap(F=>F.uiTools.map(W=>`${F.id}:${W.name}`))),G=new Set(f),R=d.filter(F=>G.has(F.connectionId)&&(!M.has(F.connectionId)||O.has(`${F.connectionId}:${F.toolName}`)));R.length!==d.length&&(k(R),g?.type==="ext-apps"&&!R.some(F=>F.connectionId===g.id&&F.toolName===g.toolName)&&w({defaultMainView:{type:"settings"}}))}const _=(M,O)=>{if(d.some(R=>R.connectionId===M&&R.toolName===O)){const R=d.filter(W=>!(W.connectionId===M&&W.toolName===O));k(R);const F=`ext-apps:${M}:${O}`;b===F&&w({defaultMainView:{type:"settings"}})}else{const R=u.find(F=>F.id===M)?.uiTools.find(F=>F.name===O)?.title;k([...d,{connectionId:M,toolName:O,label:R??kt(O),icon:null}])}s()},T=(M,O,G)=>{k(d.map(R=>R.connectionId===M&&R.toolName===O?{...R,label:G}:R))},V=()=>{s()},$=(M,O,G)=>{k(d.map(R=>R.connectionId===M&&R.toolName===O?{...R,icon:G}:R)),s()},D=M=>{w({defaultMainView:N(M)}),s()},A=(M,O)=>{const G=zi(j,M,O,1);e.setValue("metadata.sidebarViews",G,{shouldDirty:!0}),e.setValue("metadata.sidebarViewsVersion",1,{shouldDirty:!0}),p.stage(G,j);const R=Ri(g,M,O);R!==g&&w({defaultMainView:R})},P=Ls(c?.metadata),E=$i(P,r.presence),U=Fi(E),K=Ei(j,E,1),Y={overview:n("sidebar.navDestinations.home"),reports:n("sidebar.navDestinations.reports"),board:n("sidebar.navDestinations.tasks"),"site-editor":n("virtualMcp.layoutTabContent.siteEditor"),assets:n("common.mainPanelTabs.assets"),releases:n("common.mainPanelTabs.releases"),hosting:n("common.mainPanelTabs.hosting"),e2e:n("common.mainPanelTabs.e2e"),analytics:n("common.mainPanelTabs.analytics"),cdn:n("common.mainPanelTabs.cdn"),automations:n("virtualMcp.layoutTabContent.automations"),experiments:n("experiments.title")},B=[];for(const M of K)M!=="automations"&&B.push({value:M,label:Y[M]});for(const M of d)B.push({value:`ext-apps:${M.connectionId}:${M.toolName}`,label:M.label||M.toolName});return K.includes("automations")&&B.push({value:"automations",label:Y.automations}),B.push({value:"settings",label:n("virtualMcp.layoutTabContent.settings")}),{projectViews:U,labels:Y,pinned:M=>j.includes(M),isMainView:M=>b===M,defaultMainView:b,defaultMainOptions:B,noMainView:S,chatDefaultOpen:v,connectionsData:u,pinnedAppViews:d,openView:M=>a(M,{virtualmcpid:l}),togglePin:(M,O)=>A(M,O),setMainView:D,setChatDefaultOpen:M=>{w({chatDefaultOpen:M}),s()},toggleAppViewPin:_,setAppViewIcon:$,setAppViewLabel:T,commitAppViewLabel:V}}function Da(l){const e=q.c(55),{form:s,onCommit:n}=l,i=Z(),a=Q.useId();let c;e[0]!==i?(c=i("virtualMcp.settings.identity.icon"),e[0]=i,e[1]=c):c=e[1];let r;e[2]!==c?(r=t.jsx("p",{className:"text-sm font-medium",children:c}),e[2]=c,e[3]=r):r=e[3];let p;e[4]!==i?(p=i("virtualMcp.settings.identity.iconDescription"),e[4]=i,e[5]=p):p=e[5];let o;e[6]!==p?(o=t.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:p}),e[6]=p,e[7]=o):o=e[7];let f;e[8]!==r||e[9]!==o?(f=t.jsxs("div",{children:[r,o]}),e[8]=r,e[9]=o,e[10]=f):f=e[10];let m;e[11]!==s||e[12]!==n||e[13]!==i?(m=T=>{const{field:V}=T;return t.jsx("div",{className:"justify-self-start",children:t.jsx(Zs,{value:V.value??null,onChange:$=>{V.onChange($),n()},onColorChange:$=>{s.setValue("metadata.ui.themeColor",$,{shouldDirty:!0}),n()},name:s.watch("title")||i("virtualMcp.virtualMcp.agentNameFallback"),size:"md",avatarClassName:"[&_svg]:w-1/2 [&_svg]:h-1/2"})})},e[11]=s,e[12]=n,e[13]=i,e[14]=m):m=e[14];let u;e[15]!==s.control||e[16]!==m?(u=t.jsx(be,{name:"icon",control:s.control,render:m}),e[15]=s.control,e[16]=m,e[17]=u):u=e[17];let h;e[18]!==f||e[19]!==u?(h=t.jsxs(je,{className:"grid gap-3 @min-xl/project-settings:grid-cols-[180px_minmax(0,1fr)] @min-xl/project-settings:gap-8",children:[f,u]}),e[18]=f,e[19]=u,e[20]=h):h=e[20];const d=`${a}-name`;let x;e[21]!==i?(x=i("virtualMcp.settings.identity.name"),e[21]=i,e[22]=x):x=e[22];let g;e[23]!==x||e[24]!==d?(g=t.jsx("label",{htmlFor:d,className:"text-sm font-medium",children:x}),e[23]=x,e[24]=d,e[25]=g):g=e[25];let v;e[26]!==a||e[27]!==n||e[28]!==i?(v=T=>{const{field:V}=T;return t.jsx(ke,{...V,id:`${a}-name`,value:V.value??"",onBlur:()=>{V.onBlur(),n()},placeholder:i("virtualMcp.virtualMcp.agentNamePlaceholder")})},e[26]=a,e[27]=n,e[28]=i,e[29]=v):v=e[29];let y;e[30]!==s.control||e[31]!==v?(y=t.jsx(be,{name:"title",control:s.control,render:v}),e[30]=s.control,e[31]=v,e[32]=y):y=e[32];let j;e[33]!==g||e[34]!==y?(j=t.jsxs(je,{className:"grid gap-3 @min-xl/project-settings:grid-cols-[180px_minmax(0,1fr)] @min-xl/project-settings:gap-8",children:[g,y]}),e[33]=g,e[34]=y,e[35]=j):j=e[35];const b=`${a}-description`;let S;e[36]!==i?(S=i("virtualMcp.settings.identity.description"),e[36]=i,e[37]=S):S=e[37];let N;e[38]!==b||e[39]!==S?(N=t.jsx("label",{htmlFor:b,className:"text-sm font-medium",children:S}),e[38]=b,e[39]=S,e[40]=N):N=e[40];let k;e[41]!==a||e[42]!==n||e[43]!==i?(k=T=>{const{field:V}=T;return t.jsx(ut,{...V,id:`${a}-description`,value:V.value??"",onBlur:()=>{V.onBlur(),n()},placeholder:i("virtualMcp.virtualMcp.descriptionPlaceholder"),className:"min-h-24 resize-y"})},e[41]=a,e[42]=n,e[43]=i,e[44]=k):k=e[44];let w;e[45]!==s.control||e[46]!==k?(w=t.jsx(be,{name:"description",control:s.control,render:k}),e[45]=s.control,e[46]=k,e[47]=w):w=e[47];let C;e[48]!==N||e[49]!==w?(C=t.jsxs(je,{className:"grid gap-3 @min-xl/project-settings:grid-cols-[180px_minmax(0,1fr)] @min-xl/project-settings:gap-8",children:[N,w]}),e[48]=N,e[49]=w,e[50]=C):C=e[50];let _;return e[51]!==j||e[52]!==C||e[53]!==h?(_=t.jsxs(ze,{children:[h,j,C]}),e[51]=j,e[52]=C,e[53]=h,e[54]=_):_=e[54],_}function Pa(l){const e=q.c(8),{section:s}=l,n=Z();let i;e[0]!==n?(i=n("virtualMcp.settings.navigation"),e[0]=n,e[1]=i):i=e[1];let a;e[2]!==s||e[3]!==n?(a=Gi.map(r=>{const{titleKey:p}=qi[r];return t.jsx(Ue.Tab,{active:s===r,asChild:!0,children:t.jsx(ws,{to:".",activeOptions:{exact:!0,explicitUndefined:!0},search:o=>({...o,section:r==="general"?void 0:r}),children:n(p)})},r)}),e[2]=s,e[3]=n,e[4]=a):a=e[4];let c;if(e[5]!==i||e[6]!==a){const r=t.jsx(Ue.Tabs,{"aria-label":i,children:a});c=t.jsx(fn.Toolbar.Left.Portal,{fallback:r,children:r}),e[5]=i,e[6]=a,e[7]=c}else c=e[7];return c}function Oa(){const l=q.c(8),e=Pt();let s;l[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},l[0]=s):s=l[0];const{section:n}=pn(s);let i;l[1]!==n?(i=Hi(n)?n:"general",l[1]=n,l[2]=i):i=l[2];let a;l[3]!==e?(a=r=>e({to:".",search:p=>({...p,section:r??void 0})}),l[3]=e,l[4]=a):a=l[4];let c;return l[5]!==i||l[6]!==a?(c={section:i,openSection:a},l[5]=i,l[6]=a,l[7]=c):c=l[7],c}function tn(l){const e=q.c(20),{value:s,label:n,copiedLabel:i,variant:a,size:c,className:r,copiedClassName:p}=l,o=a===void 0?"ghost":a,f=c===void 0?"icon-sm":c,{handleCopy:m,copied:u}=Xi();let h;e[0]!==m||e[1]!==s?(h=()=>{m(s).catch(Ia)},e[0]=m,e[1]=s,e[2]=h):h=e[2];const d=u&&p;let x;e[3]!==r||e[4]!==d?(x=ve(r,d),e[3]=r,e[4]=d,e[5]=x):x=e[5];let g;e[6]!==u?(g=u?t.jsx(rt,{className:"text-success"}):t.jsx(xt,{}),e[6]=u,e[7]=g):g=e[7];let v;e[8]!==n||e[9]!==f||e[10]!==h||e[11]!==x||e[12]!==g||e[13]!==o?(v=t.jsx(te,{type:"button",variant:o,size:f,"aria-label":n,onClick:h,className:x,children:g}),e[8]=n,e[9]=f,e[10]=h,e[11]=x,e[12]=g,e[13]=o,e[14]=v):v=e[14];const y=u?i:"";let j;e[15]!==y?(j=t.jsx("span",{className:"sr-only","aria-live":"polite",children:y}),e[15]=y,e[16]=j):j=e[16];let b;return e[17]!==v||e[18]!==j?(b=t.jsxs(t.Fragment,{children:[v,j]}),e[17]=v,e[18]=j,e[19]=b):b=e[19],b}function Ia(){}function Aa(l){const e=q.c(14),{id:s,value:n,copyLabel:i,copiedLabel:a,className:c}=l;let r;e[0]!==c?(r=ve("relative h-fit",c),e[0]=c,e[1]=r):r=e[1];let p;e[2]!==s||e[3]!==n?(p=t.jsx(ke,{id:s,value:n,readOnly:!0,disabled:!0,className:"pr-10 font-mono"}),e[2]=s,e[3]=n,e[4]=p):p=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=ve("absolute top-1/2 right-1 -translate-y-1/2 transition-opacity","opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 pointer-coarse:opacity-100"),e[5]=o):o=e[5];let f;e[6]!==a||e[7]!==i||e[8]!==n?(f=t.jsx(tn,{value:n,label:i,copiedLabel:a,className:o,copiedClassName:"opacity-100"}),e[6]=a,e[7]=i,e[8]=n,e[9]=f):f=e[9];let m;return e[10]!==r||e[11]!==p||e[12]!==f?(m=t.jsxs("div",{className:r,children:[p,f]}),e[10]=r,e[11]=p,e[12]=f,e[13]=m):m=e[13],m}async function ps(l){const e=await l.json().catch(()=>({}));if(!l.ok)throw new Error(e.error??`HTTP ${l.status}`);return e}function $a(l){const e=q.c(106),{orgSlug:s,virtualMcpId:n}=l,i=Z(),a=Ns(),c=`/api/${s}/hosted/${encodeURIComponent(n)}/site-tokens`;let r;e[0]!==s||e[1]!==n?(r=Dt.hostedSiteTokens(s,n),e[0]=s,e[1]=n,e[2]=r):r=e[2];const p=r,[o,f]=Q.useState(null),m=Q.useId();let u;e[3]!==c?(u=async()=>ps(await fetch(c)),e[3]=c,e[4]=u):u=e[4];let h;e[5]!==p||e[6]!==u?(h={queryKey:p,queryFn:u},e[5]=p,e[6]=u,e[7]=h):h=e[7];const d=Ss(h);let x;e[8]!==c?(x=async()=>ps(await fetch(c,{method:"POST"})),e[8]=c,e[9]=x):x=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=fe=>{const{token:I}=fe;return f(I)},e[10]=g):g=e[10];let v;e[11]!==p||e[12]!==a?(v=()=>a.invalidateQueries({queryKey:p}),e[11]=p,e[12]=a,e[13]=v):v=e[13];let y;e[14]!==x||e[15]!==v?(y={mutationFn:x,onSuccess:g,onError:Fa,onSettled:v},e[14]=x,e[15]=v,e[16]=y):y=e[16];const j=hn(y);let b;e[17]!==d.data?.tokens?(b=d.data?.tokens??[],e[17]=d.data?.tokens,e[18]=b):b=e[18];const S=b,N=d.data?.site;let k;e[19]!==i?(k=i("siteTokens.title"),e[19]=i,e[20]=k):k=e[20];let w;e[21]!==i?(w=i("siteTokens.description"),e[21]=i,e[22]=w):w=e[22];let C;e[23]!==i?(C=i("siteTokens.siteId"),e[23]=i,e[24]=C):C=e[24];let _;e[25]!==m||e[26]!==C?(_=t.jsx("label",{htmlFor:m,className:"text-sm font-medium",children:C}),e[25]=m,e[26]=C,e[27]=_):_=e[27];let T;e[28]!==i?(T=i("siteTokens.siteIdDescription"),e[28]=i,e[29]=T):T=e[29];let V;e[30]!==T?(V=t.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:T}),e[30]=T,e[31]=V):V=e[31];let $;e[32]!==N||e[33]!==m||e[34]!==i?($=N?t.jsx(Aa,{id:m,value:N,copyLabel:i("siteTokens.copySiteId"),copiedLabel:i("siteTokens.siteIdCopied"),className:"min-w-0 flex-1"}):t.jsx("p",{className:"min-w-0 flex-1 font-mono text-xs text-muted-foreground",children:"—"}),e[32]=N,e[33]=m,e[34]=i,e[35]=$):$=e[35];const D=!d.data||j.isPending;let A;e[36]!==j?(A=()=>j.mutate(),e[36]=j,e[37]=A):A=e[37];let P;e[38]!==j.isPending?(P=j.isPending?t.jsx(it,{className:"size-3.5"}):t.jsx(Pe,{size:14}),e[38]=j.isPending,e[39]=P):P=e[39];let E;e[40]!==i?(E=i("siteTokens.issue"),e[40]=i,e[41]=E):E=e[41];let U;e[42]!==D||e[43]!==A||e[44]!==P||e[45]!==E?(U=t.jsxs(te,{type:"button",size:"sm",className:"shrink-0",disabled:D,onClick:A,children:[P,E]}),e[42]=D,e[43]=A,e[44]=P,e[45]=E,e[46]=U):U=e[46];let K;e[47]!==$||e[48]!==U?(K=t.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[$,U]}),e[47]=$,e[48]=U,e[49]=K):K=e[49];let Y;e[50]!==_||e[51]!==V||e[52]!==K?(Y=t.jsxs(je,{className:"group",children:[_,V,K]}),e[50]=_,e[51]=V,e[52]=K,e[53]=Y):Y=e[53];let B;e[54]!==d.error||e[55]!==d.isError?(B=d.isError?t.jsx(je,{children:t.jsx("p",{className:"text-xs text-destructive",children:d.error.message})}):null,e[54]=d.error,e[55]=d.isError,e[56]=B):B=e[56];let z;if(e[57]!==i||e[58]!==S){let fe;e[60]!==i?(fe=I=>t.jsx(je,{children:t.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[t.jsx($t,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"truncate font-mono text-xs",children:I.kid}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("siteTokens.issuedAgo",{when:Qi(new Date(I.iat*1e3))})})]})]})},I.kid),e[60]=i,e[61]=fe):fe=e[61],z=S.map(fe),e[57]=i,e[58]=S,e[59]=z}else z=e[59];let M;e[62]!==Y||e[63]!==B||e[64]!==z?(M=t.jsxs(ze,{children:[Y,B,z]}),e[62]=Y,e[63]=B,e[64]=z,e[65]=M):M=e[65];const O=o!==null;let G;e[66]===Symbol.for("react.memo_cache_sentinel")?(G=fe=>!fe&&f(null),e[66]=G):G=e[66];let R;e[67]!==i?(R=i("siteTokens.createdTitle"),e[67]=i,e[68]=R):R=e[68];let F;e[69]!==R?(F=t.jsx(at,{children:R}),e[69]=R,e[70]=F):F=e[70];let W;e[71]!==i?(W=i("siteTokens.createdDescription"),e[71]=i,e[72]=W):W=e[72];let H;e[73]!==W?(H=t.jsx(Cs,{children:W}),e[73]=W,e[74]=H):H=e[74];let se;e[75]!==F||e[76]!==H?(se=t.jsxs(lt,{children:[F,H]}),e[75]=F,e[76]=H,e[77]=se):se=e[77];let le;e[78]!==i?(le=i("siteTokens.createdTitle"),e[78]=i,e[79]=le):le=e[79];const ce=o??"";let ae;e[80]!==le||e[81]!==ce?(ae=t.jsx(ke,{readOnly:!0,"aria-label":le,value:ce,className:"font-mono text-xs"}),e[80]=le,e[81]=ce,e[82]=ae):ae=e[82];let ie;e[83]!==o||e[84]!==i?(ie=o?t.jsx(tn,{value:o,label:i("siteTokens.copy"),copiedLabel:i("siteTokens.copied"),variant:"outline",size:"icon",className:"shrink-0"}):null,e[83]=o,e[84]=i,e[85]=ie):ie=e[85];let X;e[86]!==ae||e[87]!==ie?(X=t.jsxs("div",{className:"flex items-center gap-2",children:[ae,ie]}),e[86]=ae,e[87]=ie,e[88]=X):X=e[88];let de;e[89]===Symbol.for("react.memo_cache_sentinel")?(de=()=>f(null),e[89]=de):de=e[89];let ue;e[90]!==i?(ue=i("siteTokens.done"),e[90]=i,e[91]=ue):ue=e[91];let he;e[92]!==ue?(he=t.jsx(Vt,{children:t.jsx(te,{onClick:de,children:ue})}),e[92]=ue,e[93]=he):he=e[93];let me;e[94]!==se||e[95]!==X||e[96]!==he?(me=t.jsxs(Je,{className:"sm:max-w-lg",children:[se,X,he]}),e[94]=se,e[95]=X,e[96]=he,e[97]=me):me=e[97];let xe;e[98]!==O||e[99]!==me?(xe=t.jsx(Xe,{open:O,onOpenChange:G,children:me}),e[98]=O,e[99]=me,e[100]=xe):xe=e[100];let ge;return e[101]!==w||e[102]!==M||e[103]!==xe||e[104]!==k?(ge=t.jsxs(Be,{title:k,description:w,children:[M,xe]}),e[101]=w,e[102]=M,e[103]=xe,e[104]=k,e[105]=ge):ge=e[105],ge}function Fa(l){return oe.error(l.message)}function Ea(l){const e=q.c(8),{control:s,previewServerUrl:n}=l,i=Z();let a;e[0]!==n?(a=Ys(n),e[0]=n,e[1]=a):a=e[1];const c=!!a;let r;e[2]!==c||e[3]!==i?(r=o=>{const{field:f}=o;return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(ye,{htmlFor:"fast-preview",className:"font-normal text-foreground",children:i("sandbox.cmsSettings.fastPreview.label")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i(c?"sandbox.cmsSettings.fastPreview.description":"sandbox.cmsSettings.fastPreview.needsPreviewServerUrl")})]}),t.jsx(ht,{id:"fast-preview",className:"shrink-0",checked:!!f.value&&c,disabled:!c,onCheckedChange:m=>f.onChange(m)})]})},e[2]=c,e[3]=i,e[4]=r):r=e[4];let p;return e[5]!==s||e[6]!==r?(p=t.jsx(be,{control:s,name:"metadata.fastPreview",render:r}),e[5]=s,e[6]=r,e[7]=p):p=e[7],p}function za(l){const e=q.c(5),{control:s,fastPreview:n}=l,i=Z();if(!n)return null;let a;e[0]!==i?(a=r=>{const{field:p}=r;return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(ye,{htmlFor:"fast-preview-in-place",className:"font-normal text-foreground",children:i("sandbox.cmsSettings.fastPreviewInPlace.label")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.cmsSettings.fastPreviewInPlace.description")})]}),t.jsx(ht,{id:"fast-preview-in-place",className:"shrink-0",checked:!!p.value,onCheckedChange:o=>p.onChange(o)})]})},e[0]=i,e[1]=a):a=e[1];let c;return e[2]!==s||e[3]!==a?(c=t.jsx(be,{control:s,name:"metadata.fastPreviewInPlace",render:a}),e[2]=s,e[3]=a,e[4]=c):c=e[4],c}function Ra(l){const e=q.c(18),{control:s,isBlocksV8:n}=l,i=n===void 0?!1:n,a=Z();let c;e[0]!==a?(c=a("sandbox.previewServerUrlField.label"),e[0]=a,e[1]=c):c=e[1];let r;e[2]!==c?(r=t.jsx(ye,{htmlFor:"preview-server-url",children:c}),e[2]=c,e[3]=r):r=e[3];let p;e[4]!==a?(p=d=>{const{field:x}=d,g=x.value??"";return t.jsx(ke,{id:"preview-server-url",type:"url",inputMode:"url",placeholder:a("sandbox.previewServerUrlField.placeholder"),value:g,onChange:v=>x.onChange(v.target.value===""?null:v.target.value),onBlur:()=>{x.onChange(Ji(g)),x.onBlur()}})},e[4]=a,e[5]=p):p=e[5];let o;e[6]!==s||e[7]!==p?(o=t.jsx(be,{control:s,name:"metadata.previewServerUrl",render:p}),e[6]=s,e[7]=p,e[8]=o):o=e[8];const f=i?"sandbox.previewServerUrlField.descriptionBlocksV8":"sandbox.previewServerUrlField.description";let m;e[9]!==a||e[10]!==f?(m=a(f),e[9]=a,e[10]=f,e[11]=m):m=e[11];let u;e[12]!==m?(u=t.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e[12]=m,e[13]=u):u=e[13];let h;return e[14]!==r||e[15]!==o||e[16]!==u?(h=t.jsxs("div",{className:"space-y-2",children:[r,o,u]}),e[14]=r,e[15]=o,e[16]=u,e[17]=h):h=e[17],h}function La(l){const e=q.c(15),{control:s,isBlocksV8:n,previewServerUrl:i,fastPreview:a}=l,c=Z(),r=n||!!a;let p;e[0]!==s||e[1]!==n?(p=t.jsx(je,{children:t.jsx(Ra,{control:s,isBlocksV8:n})}),e[0]=s,e[1]=n,e[2]=p):p=e[2];let o;e[3]!==s||e[4]!==n||e[5]!==i||e[6]!==c?(o=n?!Ys(i)&&t.jsx(je,{children:t.jsx("p",{className:"text-xs text-muted-foreground",children:c("sandbox.cmsSettings.blocksV8.needsPreviewServerUrl")})}):t.jsx(je,{children:t.jsx(Ea,{control:s,previewServerUrl:i})}),e[3]=s,e[4]=n,e[5]=i,e[6]=c,e[7]=o):o=e[7];let f;e[8]!==s||e[9]!==r?(f=r&&t.jsx(je,{children:t.jsx(za,{control:s,fastPreview:r})}),e[8]=s,e[9]=r,e[10]=f):f=e[10];let m;return e[11]!==p||e[12]!==o||e[13]!==f?(m=t.jsxs(t.Fragment,{children:[p,o,f]}),e[11]=p,e[12]=o,e[13]=f,e[14]=m):m=e[14],m}const St={tools:null,resources:null,prompts:null},Ua=el.pick({status:!0,title:!0,description:!0,icon:!0,metadata:!0,connections:!0});function Ya(l){const s=new TextEncoder().encode(l),n=Array.from(s,i=>String.fromCharCode(i)).join("");return btoa(n)}function sn(l){return{"x-studio-client":l,"x-mesh-client":l}}function Ba(l){const e=q.c(15),{url:s,agentId:n}=l,i=Z(),[a,c]=Q.useState(!1);let r;e[0]!==n||e[1]!==i||e[2]!==s?(r=async()=>{_e("agent_connect_action",{agent_id:n,action:"copy_url"}),await navigator.clipboard.writeText(s),c(!0),oe.success(i("virtualMcp.virtualMcpShareModal.agentUrlCopied")),await vt(2e3),c(!1)},e[0]=n,e[1]=i,e[2]=s,e[3]=r):r=e[3];const p=r;let o;e[4]!==a?(o=a?t.jsx(rt,{size:20,className:"text-success"}):t.jsx(xt,{size:20}),e[4]=a,e[5]=o):o=e[5];let f;e[6]!==a||e[7]!==i?(f=i(a?"virtualMcp.virtualMcpShareModal.copied":"virtualMcp.virtualMcpShareModal.copyUrl"),e[6]=a,e[7]=i,e[8]=f):f=e[8];let m;e[9]!==f?(m=t.jsx("span",{className:"text-xs font-medium",children:f}),e[9]=f,e[10]=m):m=e[10];let u;return e[11]!==p||e[12]!==o||e[13]!==m?(u=t.jsxs(te,{type:"button",variant:"outline",onClick:p,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[o,m]}),e[11]=p,e[12]=o,e[13]=m,e[14]=u):u=e[14],u}function Wa(l){const e=q.c(13),{url:s,serverName:n,agentId:i}=l,a=Z();let c;e[0]!==i||e[1]!==n||e[2]!==a||e[3]!==s?(c=()=>{_e("agent_connect_action",{agent_id:i,action:"install_cursor"});const u=Ws(n),h={type:"http",url:s,headers:sn("Cursor")},d=Ya(JSON.stringify(h,null,2)),x=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(u)}&config=${encodeURIComponent(d)}`;window.open(x,"_blank"),oe.success(a("virtualMcp.virtualMcpShareModal.openingCursor"))},e[0]=i,e[1]=n,e[2]=a,e[3]=s,e[4]=c):c=e[4];const r=c;let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),e[5]=p):p=e[5];let o;e[6]!==a?(o=a("virtualMcp.virtualMcpShareModal.installOnCursor"),e[6]=a,e[7]=o):o=e[7];let f;e[8]!==o?(f=t.jsx("span",{className:"text-xs font-medium",children:o}),e[8]=o,e[9]=f):f=e[9];let m;return e[10]!==r||e[11]!==f?(m=t.jsxs(te,{type:"button",variant:"outline",onClick:r,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[p,f]}),e[10]=r,e[11]=f,e[12]=m):m=e[12],m}function Ka(l){const e=q.c(16),{url:s,serverName:n,agentId:i}=l,a=Z(),[c,r]=Q.useState(!1);let p;e[0]!==i||e[1]!==n||e[2]!==a||e[3]!==s?(p=async()=>{_e("agent_connect_action",{agent_id:i,action:"install_claude_code"});const d=Ws(n),x={type:"http",url:s,headers:sn("Claude Code")},g=JSON.stringify(x,null,2),v=`claude mcp add-json "${d}" '${g.replace(/'/g,"'\\''")}' --scope user`;await navigator.clipboard.writeText(v),r(!0),oe.success(a("virtualMcp.virtualMcpShareModal.claudeCodeCommandCopied")),await vt(2e3),r(!1)},e[0]=i,e[1]=n,e[2]=a,e[3]=s,e[4]=p):p=e[4];const o=p;let f;e[5]!==c?(f=c?t.jsx(rt,{size:20,className:"text-success"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[5]=c,e[6]=f):f=e[6];let m;e[7]!==c||e[8]!==a?(m=a(c?"virtualMcp.virtualMcpShareModal.copied":"virtualMcp.virtualMcpShareModal.installOnClaudeCode"),e[7]=c,e[8]=a,e[9]=m):m=e[9];let u;e[10]!==m?(u=t.jsx("span",{className:"text-xs font-medium",children:m}),e[10]=m,e[11]=u):u=e[11];let h;return e[12]!==o||e[13]!==f||e[14]!==u?(h=t.jsxs(te,{type:"button",variant:"outline",onClick:o,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[f,u]}),e[12]=o,e[13]=f,e[14]=u,e[15]=h):h=e[15],h}const Ga=720*60*60;function qa({virtualMcp:l}){const e=Z(),s=Tt(),[n,i]=Q.useState(null),[a,c]=Q.useState(!1),[r,p]=Q.useState(!1),o=l.id,f=l.title||`agent-${o.slice(0,8)}`,m=n?`bunx @decocms/typegen@latest --mcp ${o} --key ${n} --output client.ts`:`bunx @decocms/typegen@latest --mcp ${o} --key <api-key> --output client.ts`,u=async()=>{c(!0);try{const{key:d}=await s.call("API_KEY_CREATE",{name:`typegen-${f}`,permissions:{[o]:["*"]},expiresIn:Ga});if(!d)throw new Error("No key in response");i(d),_e("agent_typegen_key_generated",{agent_id:o})}catch{_e("agent_typegen_key_failed",{agent_id:o}),oe.error(e("virtualMcp.virtualMcpShareModal.failedGenerateApiKey"))}finally{c(!1)}},h=async()=>{_e("agent_connect_action",{agent_id:o,action:"typegen_copy_command",has_api_key:!!n}),await navigator.clipboard.writeText(m),p(!0),oe.success(e("virtualMcp.virtualMcpShareModal.commandCopied")),await vt(2e3),p(!1)};return t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h4",{className:"text-sm font-medium text-foreground",children:e("virtualMcp.virtualMcpShareModal.generateTypedClient")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:e("virtualMcp.virtualMcpShareModal.generateTypedClientDescription")})]}),!n&&t.jsxs(te,{type:"button",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:u,disabled:a,children:[a?t.jsx(it,{className:"size-3.5"}):t.jsx($t,{size:14}),t.jsx("span",{children:e(a?"virtualMcp.virtualMcpShareModal.generating":"virtualMcp.virtualMcpShareModal.generateApiKey")})]})]}),n&&t.jsx("p",{className:"rounded-md border border-warning/20 bg-warning/10 px-3 py-2 text-xs text-warning",children:e("virtualMcp.virtualMcpShareModal.storeKeySecurely")}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:e("virtualMcp.virtualMcpShareModal.generateClientLabel")}),t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-xs text-muted-foreground",children:m}),t.jsx(te,{type:"button",variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:h,children:r?t.jsx(rt,{size:12,className:"text-success"}):t.jsx(xt,{size:12})})]})}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:e("virtualMcp.virtualMcpShareModal.runtimeVariables")}),t.jsx(Ha,{apiKey:n,agentId:o})]})}function Ha(l){const e=q.c(21),{apiKey:s,agentId:n}=l,[i,a]=Q.useState(!1),c=window.location.origin,r=s?`STUDIO_API_KEY=${s}`:"STUDIO_API_KEY=<api-key>",p=`STUDIO_BASE_URL=${c}`,o=`${r}
|
|
2
|
-
${p}`;let f;e[0]!==n||e[1]!==s||e[2]!==o?(f=async()=>{_e("agent_connect_action",{agent_id:n,action:"typegen_copy_env",has_api_key:!!s}),await navigator.clipboard.writeText(o),a(!0),await vt(2e3),a(!1)},e[0]=n,e[1]=s,e[2]=o,e[3]=f):f=e[3];const m=f,u=!s;let h;e[4]!==u?(h=ve({"opacity-50":u}),e[4]=u,e[5]=h):h=e[5];let d;e[6]!==r||e[7]!==h?(d=t.jsx("span",{className:h,children:r}),e[6]=r,e[7]=h,e[8]=d):d=e[8];let x,g;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("br",{}),g=t.jsx("span",{children:p}),e[9]=x,e[10]=g):(x=e[9],g=e[10]);let v;e[11]!==d?(v=t.jsxs("code",{className:"min-w-0 flex-1 font-mono text-xs text-muted-foreground",children:[d,x,g]}),e[11]=d,e[12]=v):v=e[12];let y;e[13]!==i?(y=i?t.jsx(rt,{size:12,className:"text-success"}):t.jsx(xt,{size:12}),e[13]=i,e[14]=y):y=e[14];let j;e[15]!==m||e[16]!==y?(j=t.jsx(te,{type:"button",variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:m,children:y}),e[15]=m,e[16]=y,e[17]=j):j=e[17];let b;return e[18]!==v||e[19]!==j?(b=t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[v,j]})}),e[18]=v,e[19]=j,e[20]=b):b=e[20],b}function Qa(l){const e=q.c(3),{virtualMcp:s}=l;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"h-20 animate-pulse rounded-md bg-muted"}),e[0]=n):n=e[0];let i;return e[1]!==s?(i=t.jsx(Q.Suspense,{fallback:n,children:t.jsx(qa,{virtualMcp:s})}),e[1]=s,e[2]=i):i=e[2],i}function Xa(l){const e=q.c(45),{open:s,onOpenChange:n,virtualMcp:i}=l,a=Z(),{org:c}=Fe(),r=`/api/${c.slug}/mcp/virtual-mcp/${i.id}`;let p;e[0]!==r?(p=new URL(r,window.location.origin),e[0]=r,e[1]=p):p=e[1];const o=p;let f;e[2]!==i.id||e[3]!==i.title?(f=i.title||`agent-${i.id?.slice(0,8)??"default"}`,e[2]=i.id,e[3]=i.title,e[4]=f):f=e[4];const m=f,u=al();let h;e[5]!==i.id||e[6]!==o.href?(h=t.jsx(Ba,{url:o.href,agentId:i.id}),e[5]=i.id,e[6]=o.href,e[7]=h):h=e[7];let d,x;e[8]!==m||e[9]!==i.id||e[10]!==o.href?(d=t.jsx(Wa,{url:o.href,serverName:m,agentId:i.id}),x=t.jsx(Ka,{url:o.href,serverName:m,agentId:i.id}),e[8]=m,e[9]=i.id,e[10]=o.href,e[11]=d,e[12]=x):(d=e[11],x=e[12]);let g;e[13]!==h||e[14]!==d||e[15]!==x?(g=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[h,d,x]})}),e[13]=h,e[14]=d,e[15]=x,e[16]=g):g=e[16];let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"border-t border-border"}),e[17]=v):v=e[17];let y;e[18]!==i?(y=t.jsx(Qa,{virtualMcp:i}),e[18]=i,e[19]=y):y=e[19];let j;e[20]!==g||e[21]!==y?(j=t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v,y]}),e[20]=g,e[21]=y,e[22]=j):j=e[22];const b=j;if(u){let C;e[23]!==a?(C=a("virtualMcp.virtualMcpShareModal.connect"),e[23]=a,e[24]=C):C=e[24];let _;e[25]!==C?(_=t.jsx(nl,{className:"mt-4 mb-4 text-base font-semibold",children:C}),e[25]=C,e[26]=_):_=e[26];let T;e[27]!==b||e[28]!==_?(T=t.jsx(il,{children:t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 pb-6 [touch-action:pan-y]",children:[_,b]})}),e[27]=b,e[28]=_,e[29]=T):T=e[29];let V;return e[30]!==n||e[31]!==s||e[32]!==T?(V=t.jsx(ll,{open:s,onOpenChange:n,children:T}),e[30]=n,e[31]=s,e[32]=T,e[33]=V):V=e[33],V}let S;e[34]!==a?(S=a("virtualMcp.virtualMcpShareModal.connect"),e[34]=a,e[35]=S):S=e[35];let N;e[36]!==S?(N=t.jsx(lt,{children:t.jsx(at,{children:S})}),e[36]=S,e[37]=N):N=e[37];let k;e[38]!==b||e[39]!==N?(k=t.jsxs(Je,{className:"max-h-[80vh] overflow-y-auto sm:max-w-2xl",children:[N,b]}),e[38]=b,e[39]=N,e[40]=k):k=e[40];let w;return e[41]!==n||e[42]!==s||e[43]!==k?(w=t.jsx(Xe,{open:s,onOpenChange:n,children:k}),e[41]=n,e[42]=s,e[43]=k,e[44]=w):w=e[44],w}const Ja=/^[A-Za-z_][A-Za-z0-9_]*$/;function Za(l){const e={},s=l.split(/\r?\n/);for(let n=0;n<s.length;n++){let i=(s[n]??"").trim();if(!i||i.startsWith("#"))continue;i.startsWith("export ")&&(i=i.slice(7).trim());const a=i.indexOf("=");if(a<0)throw new Error(`Line ${n+1}: missing '='`);const c=i.slice(0,a).trim();if(!Ja.test(c))throw new Error(`Line ${n+1}: invalid key "${c}"`);let r=i.slice(a+1).trim();r.length>=2&&(r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'"))&&(r=r.slice(1,-1)),e[c]=r}return e}function er(l){const e=q.c(28),{control:s,form:n,virtualMcpId:i,orgSlug:a,sandboxMap:c}=l,r=Z();let p;e[0]!==r?(p=r("sandbox.envVarsField.title"),e[0]=r,e[1]=p):p=e[1];let o;e[2]!==p?(o=t.jsx("div",{className:"flex items-baseline justify-between gap-2",children:t.jsx(ye,{className:"font-normal text-foreground",children:p})}),e[2]=p,e[3]=o):o=e[3];let f;e[4]!==r?(f=r("sandbox.envVarsField.description"),e[4]=r,e[5]=f):f=e[5];let m;e[6]!==f?(m=t.jsx("p",{className:"text-xs text-muted-foreground",children:f}),e[6]=f,e[7]=m):m=e[7];let u;e[8]!==s||e[9]!==n||e[10]!==a||e[11]!==c||e[12]!==i?(u=t.jsx(tr,{control:s,form:n,virtualMcpId:i,orgSlug:a,sandboxMap:c}),e[8]=s,e[9]=n,e[10]=a,e[11]=c,e[12]=i,e[13]=u):u=e[13];let h;e[14]!==r?(h=y=>{const{error:j}=y;return t.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:j?.message??r("sandbox.envVarsField.failedToLoadSecrets")})},e[14]=r,e[15]=h):h=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(xn,{className:"h-9 w-full"}),e[16]=d):d=e[16];let x;e[17]!==s||e[18]!==n?(x=t.jsx(Q.Suspense,{fallback:d,children:t.jsx(nr,{control:s,form:n})}),e[17]=s,e[18]=n,e[19]=x):x=e[19];let g;e[20]!==h||e[21]!==x?(g=t.jsx(Ye,{fallback:h,children:x}),e[20]=h,e[21]=x,e[22]=g):g=e[22];let v;return e[23]!==o||e[24]!==m||e[25]!==u||e[26]!==g?(v=t.jsxs("div",{className:"space-y-2",children:[o,m,u,g]}),e[23]=o,e[24]=m,e[25]=u,e[26]=g,e[27]=v):v=e[27],v}function tr(l){const e=q.c(33),{control:s,form:n,virtualMcpId:i,orgSlug:a,sandboxMap:c}=l,r=Z(),o=gn.useSession().data?.user?.id,f="metadata.runtime.env";let m;e[0]!==n?(m=()=>JSON.stringify(hs(n.getValues(f))),e[0]=n,e[1]=m):m=e[1];const[u,h]=Q.useState(m);let d;e[2]!==s?(d={control:s,name:f},e[2]=s,e[3]=d):d=e[3];const x=ks(d);let g;e[4]!==x?(g=JSON.stringify(hs(x)),e[4]=x,e[5]=g):g=e[5];const v=g,y=v!==u;let j;e[6]!==c||e[7]!==o?(j=o?Object.keys(c?.[o]??{}):[],e[6]=c,e[7]=o,e[8]=j):j=e[8];const b=j,S=b.length>0,[N,k]=Q.useState(!1);if(!y||!S)return null;let w;e[9]!==v||e[10]!==a||e[11]!==r||e[12]!==b||e[13]!==i?(w=async()=>{k(!0);const E=await Promise.allSettled(b.map(async K=>{const Y=rl({orgSlug:a,virtualMcpId:i,branch:K,threadId:null},"setup/start"),B=await fetch(Y,{method:"POST"});if(!B.ok){const z=await B.text().catch(()=>B.statusText);throw new Error(z||B.statusText)}}));k(!1);const U=E.filter(sr).length;U===0?(h(v),oe.success(b.length===1?r("sandbox.envVarsField.restartedSingle"):r("sandbox.envVarsField.restartedMultiple",{count:b.length}))):oe.error(r("sandbox.envVarsField.restartFailed",{failed:U,total:b.length}))},e[9]=v,e[10]=a,e[11]=r,e[12]=b,e[13]=i,e[14]=w):w=e[14];const C=w;let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(ys,{className:"size-3.5 shrink-0"}),e[15]=_):_=e[15];let T;e[16]!==r?(T=r("sandbox.envVarsField.sandboxRunningNotice"),e[16]=r,e[17]=T):T=e[17];let V;e[18]!==T?(V=t.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-warning",children:[_,t.jsx("span",{className:"truncate",children:T})]}),e[18]=T,e[19]=V):V=e[19];let $;e[20]!==N?($=N?t.jsx(it,{className:"size-3.5"}):t.jsx(bn,{className:"size-3.5"}),e[20]=N,e[21]=$):$=e[21];let D;e[22]!==N||e[23]!==r?(D=r(N?"sandbox.envVarsField.restarting":"sandbox.envVarsField.restartDev"),e[22]=N,e[23]=r,e[24]=D):D=e[24];let A;e[25]!==C||e[26]!==N||e[27]!==D||e[28]!==$?(A=t.jsxs(te,{type:"button",variant:"outline",size:"sm",onClick:C,disabled:N,className:"shrink-0",children:[$,D]}),e[25]=C,e[26]=N,e[27]=D,e[28]=$,e[29]=A):A=e[29];let P;return e[30]!==A||e[31]!==V?(P=t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-warning/20 bg-warning/10 px-3 py-2 text-xs",children:[V,A]}),e[30]=A,e[31]=V,e[32]=P):P=e[32],P}function sr(l){return l.status==="rejected"}function nr(l){const e=q.c(62),{control:s,form:n}=l,i=Z(),a="metadata.runtime.env";let c;e[0]!==s?(c={control:s,name:a},e[0]=s,e[1]=c):c=e[1];const r=vn(c),{fields:p,append:o,remove:f}=r;let m;e[2]!==n?(m=(Y,B)=>{n.setValue(`${a}.${Y}`,B,{shouldDirty:!0,shouldTouch:!0})},e[2]=n,e[3]=m):m=e[3];const u=m,h=ul();let d;if(e[4]!==h){d=new Map;for(const Y of h)d.set(Y.id,Y);e[4]=h,e[5]=d}else d=e[5];const[x,g]=Q.useState(null);let v;e[6]!==o?(v=()=>{o({key:"",kind:"literal",value:""})},e[6]=o,e[7]=v):v=e[7];const y=v;let j;e[8]!==o||e[9]!==n||e[10]!==i?(j=async()=>{let Y;try{Y=await navigator.clipboard.readText()}catch{oe.error(i("sandbox.envVarsField.clipboardReadFailed"));return}if(!Y.trim()){oe.error(i("sandbox.envVarsField.clipboardEmpty"));return}let B;try{B=Za(Y)}catch(F){const W=F;oe.error(W.message);return}const z=Object.entries(B);if(z.length===0){oe.error(i("sandbox.envVarsField.nothingToAdd"));return}const M=n.getValues(a)??[],O=new Set;for(const F of M){const W=(F.key??"").trim();W&&O.add(W)}let G=0,R=0;for(const[F,W]of z){if(O.has(F)){R++;continue}o({key:F,kind:"literal",value:W}),O.add(F),G++}G===0&&R>0?oe.message(i("sandbox.envVarsField.allKeysExist",{count:R})):oe.success(R>0?i("sandbox.envVarsField.addedWithSkipped",{added:G,skipped:R}):i("sandbox.envVarsField.added",{added:G}))},e[8]=o,e[9]=n,e[10]=i,e[11]=j):j=e[11];const b=j;let S;if(e[12]!==s||e[13]!==p||e[14]!==n||e[15]!==f||e[16]!==d||e[17]!==h||e[18]!==u){let Y;e[20]!==s||e[21]!==n||e[22]!==f||e[23]!==d||e[24]!==h||e[25]!==u?(Y=(B,z)=>t.jsx("li",{className:"rounded-md border border-border bg-background",children:t.jsx(ir,{index:z,control:s,form:n,onUpdateEntry:u,fieldPath:a,secrets:h,secretById:d,onSaveAsSecret:(M,O)=>g({kind:"save-literal",index:z,presetKey:M,presetValue:O}),onCreateNewSecret:M=>g({kind:"create-new",index:z,presetKey:M}),onRemove:()=>f(z)})},B.id),e[20]=s,e[21]=n,e[22]=f,e[23]=d,e[24]=h,e[25]=u,e[26]=Y):Y=e[26],S=p.map(Y),e[12]=s,e[13]=p,e[14]=n,e[15]=f,e[16]=d,e[17]=h,e[18]=u,e[19]=S}else S=e[19];let N;e[27]!==S?(N=t.jsx("ul",{className:"space-y-2",children:S}),e[27]=S,e[28]=N):N=e[28];let k;e[29]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Pe,{className:"size-3.5"}),e[29]=k):k=e[29];let w;e[30]!==i?(w=i("sandbox.envVarsField.addEnvVar"),e[30]=i,e[31]=w):w=e[31];let C;e[32]!==y||e[33]!==w?(C=t.jsxs(te,{type:"button",variant:"outline",size:"sm",onClick:y,className:"flex-1",children:[k,w]}),e[32]=y,e[33]=w,e[34]=C):C=e[34];let _;e[35]!==i?(_=i("sandbox.envVarsField.pasteDotenvAriaLabel"),e[35]=i,e[36]=_):_=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(fi,{className:"size-3.5"}),e[37]=T):T=e[37];let V;e[38]!==i?(V=i("sandbox.envVarsField.pasteDotenv"),e[38]=i,e[39]=V):V=e[39];let $;e[40]!==b||e[41]!==_||e[42]!==V?($=t.jsx(Ne,{asChild:!0,children:t.jsxs(te,{type:"button",variant:"outline",size:"sm",onClick:b,"aria-label":_,children:[T,V]})}),e[40]=b,e[41]=_,e[42]=V,e[43]=$):$=e[43];let D;e[44]!==i?(D=i("sandbox.envVarsField.pasteDotenvTooltip"),e[44]=i,e[45]=D):D=e[45];let A;e[46]!==D?(A=t.jsx(Ce,{children:D}),e[46]=D,e[47]=A):A=e[47];let P;e[48]!==$||e[49]!==A?(P=t.jsxs(Se,{children:[$,A]}),e[48]=$,e[49]=A,e[50]=P):P=e[50];let E;e[51]!==P||e[52]!==C?(E=t.jsxs("div",{className:"flex items-center gap-2",children:[C,P]}),e[51]=P,e[52]=C,e[53]=E):E=e[53];let U;e[54]!==x||e[55]!==n||e[56]!==u?(U=x!==null?t.jsx(ar,{mode:x,onClose:()=>g(null),onSaved:Y=>{const B=n.getValues(`${a}.${x.index}.key`)?.trim()??"";u(x.index,{key:B,kind:"secret",secretId:Y}),g(null)}}):null,e[54]=x,e[55]=n,e[56]=u,e[57]=U):U=e[57];let K;return e[58]!==E||e[59]!==U||e[60]!==N?(K=t.jsxs("div",{className:"space-y-2",children:[N,E,U]}),e[58]=E,e[59]=U,e[60]=N,e[61]=K):K=e[61],K}function ir(l){const e=q.c(77),{index:s,control:n,form:i,onUpdateEntry:a,fieldPath:c,secrets:r,secretById:p,onSaveAsSecret:o,onCreateNewSecret:f,onRemove:m}=l,u=Z(),h=`${c}.${s}.key`,d=`${c}.${s}.value`,x=`${c}.${s}.secretId`,g=`${c}.${s}.kind`;let v;e[0]!==n||e[1]!==g?(v={control:n,name:g},e[0]=n,e[1]=g,e[2]=v):v=e[2];const j=ks(v)==="secret"?"secret":"literal";let b;e[3]!==i||e[4]!==s||e[5]!==h||e[6]!==o||e[7]!==a||e[8]!==d?(b=W=>{const H=i.getValues(h)?.trim()??"";if(W==="literal"){a(s,{key:H,kind:"literal",value:""});return}const se=i.getValues(d)??"";if(se.length>0){o(H,se);return}a(s,{key:H,kind:"secret",secretId:""})},e[3]=i,e[4]=s,e[5]=h,e[6]=o,e[7]=a,e[8]=d,e[9]=b):b=e[9];const S=b;let N;e[10]!==s||e[11]!==u?(N=W=>{const{field:H}=W,se=(H.value??"").trim(),le=se.length>0&&!gt.test(se);return t.jsxs("div",{className:"space-y-1",children:[t.jsx(ke,{...H,value:H.value??"",placeholder:u("sandbox.envVarsField.keyPlaceholder"),spellCheck:!1,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",className:ve("font-mono",le&&"border-destructive focus-visible:ring-destructive"),"aria-invalid":le,"aria-label":u("sandbox.envVarsField.envVarKeyLabel",{index:s+1}),onBlur:ce=>{const ae=ce.target.value.trim();H.onChange(ae),H.onBlur()}}),le?t.jsx("p",{className:"text-2xs text-destructive",children:u("sandbox.envVarsField.invalidKeyMessage")}):null]})},e[10]=s,e[11]=u,e[12]=N):N=e[12];let k;e[13]!==n||e[14]!==h||e[15]!==N?(k=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx(be,{control:n,name:h,render:N})}),e[13]=n,e[14]=h,e[15]=N,e[16]=k):k=e[16];let w;e[17]!==S?(w=W=>S(W),e[17]=S,e[18]=w):w=e[18];let C;e[19]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Oe,{className:"h-9 w-[110px]",children:t.jsx(Ie,{})}),e[19]=C):C=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx($t,{className:"size-3.5"}),e[20]=_):_=e[20];let T;e[21]!==u?(T=u("sandbox.envVarsField.literal"),e[21]=u,e[22]=T):T=e[22];let V;e[23]!==T?(V=t.jsx(we,{value:"literal",children:t.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_,T]})}),e[23]=T,e[24]=V):V=e[24];let $;e[25]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(jn,{className:"size-3.5"}),e[25]=$):$=e[25];let D;e[26]!==u?(D=u("sandbox.envVarsField.secret"),e[26]=u,e[27]=D):D=e[27];let A;e[28]!==D?(A=t.jsx(we,{value:"secret",children:t.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[$,D]})}),e[28]=D,e[29]=A):A=e[29];let P;e[30]!==A||e[31]!==V?(P=t.jsxs(Ae,{children:[V,A]}),e[30]=A,e[31]=V,e[32]=P):P=e[32];let E;e[33]!==j||e[34]!==P||e[35]!==w?(E=t.jsx("div",{className:"shrink-0",children:t.jsxs($e,{value:j,onValueChange:w,children:[C,P]})}),e[33]=j,e[34]=P,e[35]=w,e[36]=E):E=e[36];let U;e[37]!==n||e[38]!==i||e[39]!==s||e[40]!==h||e[41]!==j||e[42]!==f||e[43]!==p||e[44]!==x||e[45]!==r||e[46]!==u||e[47]!==d?(U=t.jsx("div",{className:"flex flex-[2] min-w-0 items-center gap-1",children:j==="literal"?t.jsx(be,{control:n,name:d,render:W=>{const{field:H}=W;return t.jsx(ke,{...H,value:H.value??"",type:"password",placeholder:u("sandbox.envVarsField.valuePlaceholder"),spellCheck:!1,autoComplete:"off",className:"font-mono","aria-label":u("sandbox.envVarsField.envVarValueLabel",{index:s+1}),onBlur:se=>{H.onChange(se.target.value),H.onBlur()}})}}):t.jsxs(t.Fragment,{children:[t.jsx(be,{control:n,name:x,render:W=>{const{field:H}=W;return t.jsxs($e,{value:H.value||"",onValueChange:se=>H.onChange(se),children:[t.jsx(Oe,{className:ve("h-9 w-full",!H.value&&"text-muted-foreground"),"aria-label":u("sandbox.envVarsField.secretAriaLabel",{index:s+1}),children:t.jsx(Ie,{placeholder:u("sandbox.envVarsField.pickSecretPlaceholder"),children:t.jsx(ol,{field:H,secretById:p})})}),t.jsx(Ae,{children:r.length===0?t.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:u("sandbox.envVarsField.noSecretsYet")}):r.map(lr)})]})}}),t.jsxs(Se,{children:[t.jsx(Ne,{asChild:!0,children:t.jsx(te,{type:"button",variant:"ghost",size:"icon","aria-label":u("sandbox.envVarsField.createNewSecretAriaLabel"),onClick:()=>{const W=i.getValues(h)?.trim()??"";f(W)},children:t.jsx(Pe,{className:"size-3.5"})})}),t.jsx(Ce,{children:u("sandbox.envVarsField.createNewSecret")})]})]})}),e[37]=n,e[38]=i,e[39]=s,e[40]=h,e[41]=j,e[42]=f,e[43]=p,e[44]=x,e[45]=r,e[46]=u,e[47]=d,e[48]=U):U=e[48];let K;e[49]!==i||e[50]!==h||e[51]!==j||e[52]!==o||e[53]!==u||e[54]!==d?(K=j==="literal"?t.jsxs(Se,{children:[t.jsx(Ne,{asChild:!0,children:t.jsx(te,{type:"button",variant:"ghost",size:"icon","aria-label":u("sandbox.envVarsField.saveAsSecretAriaLabel"),onClick:()=>{const W=i.getValues(h)?.trim()??"",H=i.getValues(d)??"";o(W,H)},children:t.jsx(pi,{className:"size-3.5"})})}),t.jsx(Ce,{children:u("sandbox.envVarsField.saveAsSecret")})]}):null,e[49]=i,e[50]=h,e[51]=j,e[52]=o,e[53]=u,e[54]=d,e[55]=K):K=e[55];let Y;e[56]!==u?(Y=u("sandbox.envVarsField.removeEnvVarAriaLabel"),e[56]=u,e[57]=Y):Y=e[57];let B;e[58]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(It,{className:"size-3.5"}),e[58]=B):B=e[58];let z;e[59]!==m||e[60]!==Y?(z=t.jsx(Ne,{asChild:!0,children:t.jsx(te,{type:"button",variant:"ghost",size:"icon","aria-label":Y,onClick:m,children:B})}),e[59]=m,e[60]=Y,e[61]=z):z=e[61];let M;e[62]!==u?(M=u("sandbox.envVarsField.remove"),e[62]=u,e[63]=M):M=e[63];let O;e[64]!==M?(O=t.jsx(Ce,{children:M}),e[64]=M,e[65]=O):O=e[65];let G;e[66]!==z||e[67]!==O?(G=t.jsxs(Se,{children:[z,O]}),e[66]=z,e[67]=O,e[68]=G):G=e[68];let R;e[69]!==K||e[70]!==G?(R=t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[K,G]}),e[69]=K,e[70]=G,e[71]=R):R=e[71];let F;return e[72]!==E||e[73]!==U||e[74]!==R||e[75]!==k?(F=t.jsxs("div",{className:"flex flex-col gap-2 p-2 sm:flex-row sm:items-center",children:[k,E,U,R]}),e[72]=E,e[73]=U,e[74]=R,e[75]=k,e[76]=F):F=e[76],F}function lr(l){return t.jsx(we,{value:l.id,children:t.jsxs("span",{className:"inline-flex items-center gap-2",children:[t.jsx(dl,{scope:l.scope}),t.jsx("span",{className:"font-mono",children:l.name})]})},l.id)}function ar({mode:l,onClose:e,onSaved:s}){const n=Z(),i=l.kind==="save-literal"?l.presetValue:"",a=l.presetKey,[c,r]=Q.useState(()=>rr(a)),[p,o]=Q.useState("organization"),[f,m]=Q.useState(i),[u,h]=Q.useState(""),d=ml(),x=c.trim(),g=f.length>0&&x.length>0&&cl.test(x),v=async b=>{if(b.preventDefault(),!!g)try{const S=await d.mutateAsync({scope:p,name:x,value:f,description:u.trim()||void 0});oe.success(n("sandbox.envVarsField.secretSaved",{name:S.name})),s(S.id)}catch(S){oe.error(S instanceof Error?S.message:n("sandbox.envVarsField.failedToSaveSecret"))}},y=l.kind==="save-literal"?n("sandbox.envVarsField.saveValueAsSecretTitle"):n("sandbox.envVarsField.createNewSecretTitle"),j=l.kind==="save-literal"?n("sandbox.envVarsField.saveValueAsSecretDescription"):n("sandbox.envVarsField.createNewSecretDescription");return t.jsx(Xe,{open:!0,onOpenChange:b=>{b||e()},children:t.jsxs(Je,{className:"sm:max-w-md",children:[t.jsxs(lt,{children:[t.jsx(at,{children:y}),t.jsx(Cs,{children:j})]}),t.jsxs("form",{onSubmit:v,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(ye,{htmlFor:"save-secret-scope",children:n("sandbox.envVarsField.scopeLabel")}),t.jsxs($e,{value:p,onValueChange:b=>o(b),children:[t.jsx(Oe,{id:"save-secret-scope",children:t.jsx(Ie,{})}),t.jsxs(Ae,{children:[t.jsx(we,{value:"organization",children:n("sandbox.envVarsField.scopeOrganization")}),t.jsx(we,{value:"user",children:n("sandbox.envVarsField.scopePrivate")})]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(ye,{htmlFor:"save-secret-name",children:n("sandbox.envVarsField.nameLabel")}),t.jsx(ke,{id:"save-secret-name",value:c,onChange:b=>r(b.target.value),placeholder:n("sandbox.envVarsField.namePlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.envVarsField.nameHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(ye,{htmlFor:"save-secret-value",children:n("sandbox.envVarsField.valueLabel")}),t.jsx(ke,{id:"save-secret-value",type:"password",value:f,onChange:b=>m(b.target.value),placeholder:n("sandbox.envVarsField.secretValuePlaceholder"),autoComplete:"new-password",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(ye,{htmlFor:"save-secret-description",children:n("sandbox.envVarsField.descriptionLabel")}),t.jsx(ut,{id:"save-secret-description",value:u,onChange:b=>h(b.target.value),rows:2,placeholder:n("sandbox.envVarsField.descriptionPlaceholder")})]}),t.jsxs(Vt,{children:[t.jsx(te,{type:"button",variant:"outline",onClick:e,disabled:d.isPending,children:n("sandbox.envVarsField.cancel")}),t.jsx(te,{type:"submit",disabled:!g||d.isPending,children:d.isPending?n("sandbox.envVarsField.saving"):n("sandbox.envVarsField.saveSecret")})]})]})]})})}function hs(l){if(!Array.isArray(l))return[];const e=[];for(const s of l){if(!s||typeof s!="object")continue;const n=s,i=(n.key??"").trim();if(!(!i||!gt.test(i))){if(n.kind==="literal"){e.push({key:i,kind:"literal",value:n.value??""});continue}n.kind==="secret"&&n.secretId&&e.push({key:i,kind:"secret",secretId:n.secretId})}}return e}function rr(l){const e=l.trim();return e&>.test(e)?e:""}function or(l){const e=q.c(21),{repo:s,className:n}=l,i=Z();let a;e[0]!==n?(a=ve("space-y-2",n),e[0]=n,e[1]=a):a=e[1];let c;e[2]!==i?(c=i("sandbox.repoRow.label"),e[2]=i,e[3]=c):c=e[3];let r;e[4]!==c?(r=t.jsx(ye,{children:c}),e[4]=c,e[5]=r):r=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(fl,{size:20,className:"shrink-0 text-foreground/60"}),e[6]=p):p=e[6];let o;e[7]!==s||e[8]!==i?(o=t.jsx(Ne,{asChild:!0,children:t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-background px-4 py-3",tabIndex:0,children:[p,t.jsx("div",{className:"min-w-0 flex-1",children:s?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"truncate text-sm font-medium",children:[s.owner,"/",s.name]}),t.jsx("div",{className:"truncate text-xs text-muted-foreground",children:s.url})]}):t.jsx("div",{className:"text-sm text-muted-foreground",children:i("sandbox.repoRow.noRepositoryConnected")})})]})}),e[7]=s,e[8]=i,e[9]=o):o=e[9];let f;e[10]!==i?(f=i("sandbox.repoRow.tooltipContent"),e[10]=i,e[11]=f):f=e[11];let m;e[12]!==f?(m=t.jsx(Ce,{children:f}),e[12]=f,e[13]=m):m=e[13];let u;e[14]!==o||e[15]!==m?(u=t.jsxs(Se,{children:[o,m]}),e[14]=o,e[15]=m,e[16]=u):u=e[16];let h;return e[17]!==a||e[18]!==r||e[19]!==u?(h=t.jsxs("div",{className:a,children:[r,u]}),e[17]=a,e[18]=r,e[19]=u,e[20]=h):h=e[20],h}const cr={npm:{install:"npm install",run:l=>`npm run ${l}`,runtime:"node"},pnpm:{install:"pnpm install",run:l=>`pnpm run ${l}`,runtime:"node"},yarn:{install:"yarn install",run:l=>`yarn run ${l}`,runtime:"node"},bun:{install:"bun install",run:l=>`bun run ${l}`,runtime:"bun"},deno:{install:"deno install",run:l=>`deno task ${l}`,runtime:"deno"}};function dr(l){const e=l.trim();if(e==="")return{ok:!0,value:null};if(!/^\d+$/.test(e))return{ok:!1};const s=Number(e);return s<1||s>65535?{ok:!1}:{ok:!0,value:String(s)}}const ur=Object.keys(cr),Nt="__none__";function mr(l){const e=q.c(47),{control:s}=l,n=Z(),i=Q.useRef(null);let a;e[0]!==n?(a=n("sandbox.runtimeFields.packageManager"),e[0]=n,e[1]=a):a=e[1];let c;e[2]!==a?(c=t.jsx(ye,{htmlFor:"runtime-pm",children:a}),e[2]=a,e[3]=c):c=e[3];let r;e[4]!==n?(r=w=>{const{field:C}=w;return t.jsxs($e,{value:C.value??Nt,onValueChange:_=>C.onChange(_===Nt?null:_),children:[t.jsx(Oe,{id:"runtime-pm",children:t.jsx(Ie,{placeholder:n("sandbox.runtimeFields.autoDetect")})}),t.jsxs(Ae,{children:[t.jsx(we,{value:Nt,children:n("sandbox.runtimeFields.autoDetect")}),ur.map(pr)]})]})},e[4]=n,e[5]=r):r=e[5];let p;e[6]!==s||e[7]!==r?(p=t.jsx(be,{control:s,name:"metadata.runtime.selected",render:r}),e[6]=s,e[7]=r,e[8]=p):p=e[8];let o;e[9]!==c||e[10]!==p?(o=t.jsxs("div",{className:"space-y-2",children:[c,p]}),e[9]=c,e[10]=p,e[11]=o):o=e[11];let f;e[12]!==n?(f=n("sandbox.runtimeFields.packagePath"),e[12]=n,e[13]=f):f=e[13];let m;e[14]!==f?(m=t.jsx(ye,{htmlFor:"runtime-path",children:f}),e[14]=f,e[15]=m):m=e[15];let u;e[16]!==s?(u=t.jsx(be,{control:s,name:"metadata.runtime.path",render:fr}),e[16]=s,e[17]=u):u=e[17];let h;e[18]!==n?(h=n("sandbox.runtimeFields.packagePathDescription"),e[18]=n,e[19]=h):h=e[19];let d;e[20]!==h?(d=t.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[20]=h,e[21]=d):d=e[21];let x;e[22]!==d||e[23]!==m||e[24]!==u?(x=t.jsxs("div",{className:"space-y-2",children:[m,u,d]}),e[22]=d,e[23]=m,e[24]=u,e[25]=x):x=e[25];let g;e[26]!==n?(g=n("sandbox.runtimeFields.devServerPort"),e[26]=n,e[27]=g):g=e[27];let v;e[28]!==g?(v=t.jsx(ye,{htmlFor:"runtime-port",children:g}),e[28]=g,e[29]=v):v=e[29];let y;e[30]!==n?(y=w=>{const{field:C}=w;return t.jsx(ke,{ref:i,id:"runtime-port",inputMode:"numeric",placeholder:n("sandbox.runtimeFields.auto"),defaultValue:C.value??"",onBlur:_=>{const T=dr(_.target.value);T.ok?C.onChange(T.value):i.current&&(i.current.value=C.value??"")}})},e[30]=n,e[31]=y):y=e[31];let j;e[32]!==s||e[33]!==y?(j=t.jsx(be,{control:s,name:"metadata.runtime.port",render:y}),e[32]=s,e[33]=y,e[34]=j):j=e[34];let b;e[35]!==n?(b=n("sandbox.runtimeFields.devServerPortDescription"),e[35]=n,e[36]=b):b=e[36];let S;e[37]!==b?(S=t.jsx("p",{className:"text-xs text-muted-foreground",children:b}),e[37]=b,e[38]=S):S=e[38];let N;e[39]!==v||e[40]!==j||e[41]!==S?(N=t.jsxs("div",{className:"space-y-2",children:[v,j,S]}),e[39]=v,e[40]=j,e[41]=S,e[42]=N):N=e[42];let k;return e[43]!==x||e[44]!==N||e[45]!==o?(k=t.jsxs("div",{className:"space-y-5",children:[o,x,N]}),e[43]=x,e[44]=N,e[45]=o,e[46]=k):k=e[46],k}function fr(l){const{field:e}=l;return t.jsx(ke,{id:"runtime-path",placeholder:".",defaultValue:e.value??"",onBlur:s=>{const n=s.target.value.trim();e.onChange(n===""?null:n)}})}function pr(l){return t.jsx(we,{value:l,children:l},l)}function hr(l){const e=q.c(5),{control:s}=l,n=Z();let i;e[0]!==n?(i=c=>{const{field:r}=c;return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(ye,{htmlFor:"field-description-tooltips",className:"font-normal text-foreground",children:n("sandbox.fieldDescriptionTooltipsField.label")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.fieldDescriptionTooltipsField.description")})]}),t.jsx(ht,{id:"field-description-tooltips",className:"shrink-0",checked:r.value??!1,onCheckedChange:p=>r.onChange(p)})]})},e[0]=n,e[1]=i):i=e[1];let a;return e[2]!==s||e[3]!==i?(a=t.jsx(be,{control:s,name:"metadata.fieldDescriptionTooltips",render:i}),e[2]=s,e[3]=i,e[4]=a):a=e[4],a}function xr(l){const e=q.c(32),{control:s,onCommit:n}=l,i=Z();let a;e[0]!==i?(a=i("virtualMcp.virtualMcp.publishPolicySmart"),e[0]=i,e[1]=a):a=e[1];let c;e[2]!==i?(c=i("virtualMcp.virtualMcp.publishPolicySmartDescription"),e[2]=i,e[3]=c):c=e[3];let r;e[4]!==a||e[5]!==c?(r={value:"smart",label:a,description:c},e[4]=a,e[5]=c,e[6]=r):r=e[6];let p;e[7]!==i?(p=i("virtualMcp.virtualMcp.publishPolicyCodeReview"),e[7]=i,e[8]=p):p=e[8];let o;e[9]!==i?(o=i("virtualMcp.virtualMcp.publishPolicyCodeReviewDescription"),e[9]=i,e[10]=o):o=e[10];let f;e[11]!==p||e[12]!==o?(f={value:"code-review",label:p,description:o},e[11]=p,e[12]=o,e[13]=f):f=e[13];let m;e[14]!==i?(m=i("virtualMcp.virtualMcp.publishPolicyOpen"),e[14]=i,e[15]=m):m=e[15];let u;e[16]!==i?(u=i("virtualMcp.virtualMcp.publishPolicyOpenDescription"),e[16]=i,e[17]=u):u=e[17];let h;e[18]!==m||e[19]!==u?(h={value:"open",label:m,description:u},e[18]=m,e[19]=u,e[20]=h):h=e[20];let d;e[21]!==r||e[22]!==f||e[23]!==h?(d=[r,f,h],e[21]=r,e[22]=f,e[23]=h,e[24]=d):d=e[24];const x=d;let g;e[25]!==n||e[26]!==x||e[27]!==i?(g=y=>{const{field:j}=y,b=j.value??"smart";return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(ye,{htmlFor:"publish-policy",className:"font-normal text-foreground",children:i("virtualMcp.virtualMcp.publishing")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("virtualMcp.virtualMcp.publishingDescription")})]}),t.jsxs($e,{value:b,onValueChange:S=>{j.onChange(S),n()},children:[t.jsx(Oe,{id:"publish-policy",className:"w-44 shrink-0",children:t.jsx(Ie,{})}),t.jsx(Ae,{className:"max-w-80",children:x.map(gr)})]})]})},e[25]=n,e[26]=x,e[27]=i,e[28]=g):g=e[28];let v;return e[29]!==s||e[30]!==g?(v=t.jsx(be,{name:"metadata.publishPolicy",control:s,render:g}),e[29]=s,e[30]=g,e[31]=v):v=e[31],v}function gr(l){return t.jsx(we,{value:l.value,description:l.description,children:l.label},l.value)}function vr(l){const e=q.c(24),{control:s,onCommit:n}=l,i=Z();let a;e[0]!==i?(a=i("sandbox.cmsSettings.contentEditing.off"),e[0]=i,e[1]=a):a=e[1];let c;e[2]!==i?(c=i("sandbox.cmsSettings.contentEditing.offDescription"),e[2]=i,e[3]=c):c=e[3];let r;e[4]!==a||e[5]!==c?(r={value:"off",label:a,description:c},e[4]=a,e[5]=c,e[6]=r):r=e[6];let p;e[7]!==i?(p=i("sandbox.cmsSettings.contentEditing.on"),e[7]=i,e[8]=p):p=e[8];let o;e[9]!==i?(o=i("sandbox.cmsSettings.contentEditing.onDescription"),e[9]=i,e[10]=o):o=e[10];let f;e[11]!==p||e[12]!==o?(f={value:"on",label:p,description:o},e[11]=p,e[12]=o,e[13]=f):f=e[13];let m;e[14]!==r||e[15]!==f?(m=[r,f],e[14]=r,e[15]=f,e[16]=m):m=e[16];const u=m;let h;e[17]!==n||e[18]!==u||e[19]!==i?(h=x=>{const{field:g}=x,v=g.value??null,y=Bs(v);return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(ye,{htmlFor:"content-editing-mode",className:"font-normal text-foreground",children:i("sandbox.cmsSettings.contentEditing.title")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.cmsSettings.contentEditing.description")})]}),t.jsxs($e,{value:y,onValueChange:j=>{const b=tl.safeParse(j);b.success&&(g.onChange(sl(v,b.data)),n())},children:[t.jsx(Oe,{id:"content-editing-mode",className:"w-44 shrink-0",children:t.jsx(Ie,{})}),t.jsx(Ae,{className:"max-w-80",children:u.map(br)})]})]})},e[17]=n,e[18]=u,e[19]=i,e[20]=h):h=e[20];let d;return e[21]!==s||e[22]!==h?(d=t.jsx(be,{name:"metadata.ui.layout",control:s,render:h}),e[21]=s,e[22]=h,e[23]=d):d=e[23],d}function br(l){return t.jsx(we,{value:l.value,description:l.description,children:l.label},l.value)}function xs(l){const e=l.metadata?.sidebarViews,s=l.metadata?.sidebarViewsVersion;return{effectiveViews:[...Mt(_t(l.metadata),s)],rawViews:e===null?null:e?[...e]:void 0,version:s}}function jr(l,e){return l===e?!0:!l||!e||l.length!==e.length?!1:l.every((s,n)=>s===e[n])}function yr(l,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...l,shareDialogOpen:e.payload};case"SET_ADD_DIALOG_OPEN":return{...l,addDialogOpen:e.payload};case"OPEN_SETTINGS":return{...l,settingsDialogOpen:!0,settingsConnectionId:e.payload};case"CLOSE_SETTINGS":return{...l,settingsDialogOpen:!1,settingsConnectionId:null};default:return l}}function wr(l,e){switch(e.type){case"accumulate":{const s=l??{start:e.now,fields:new Set,saveCount:0,instructionsLength:null},n=new Set(s.fields);for(const i of e.fields)n.add(i);return{...s,fields:n,saveCount:s.saveCount+1,instructionsLength:e.instructionsLength??s.instructionsLength}}case"reset":return null}}function Sr(l){const e=l.metadata?.runtime?.env;if(!e||e.length===0)return l;const s=e.filter(n=>{if(!n||typeof n!="object")return!1;const i=(n.key??"").trim();return!i||!gt.test(i)?!1:n.kind==="literal"?!0:n.kind==="secret"?!!n.secretId:!1});return s.length===e.length?l:{...l,metadata:{...l.metadata,runtime:{...l.metadata?.runtime??{},env:s}}}}async function Nr(l,e){const s=l?.idToken??null;if(s){const i=gs(s);if(i)return i}const n=l?.userinfoEndpoint??null;if(n)try{const i=await fetch(n,{headers:{Authorization:`Bearer ${e}`}});if(i.ok){const a=await i.json(),c=typeof a.email=="string"?a.email:typeof a.upn=="string"?a.upn:typeof a.preferred_username=="string"?a.preferred_username:null;if(c)return c}}catch{}return gs(e)}function gs(l){try{const e=l.split(".");if(e.length===3&&e[1]){const s=JSON.parse(atob(e[1].replace(/-/g,"+").replace(/_/g,"/")));if(typeof s.email=="string")return s.email;if(typeof s.upn=="string")return s.upn;if(typeof s.preferred_username=="string")return s.preferred_username}}catch{}return null}function Cr({virtualMcp:l,contextSection:e}){const s=Z(),n=In(),{org:i}=Fe(),a=Gn(),{data:c}=qn([l.id]),r=c?.get(l.id)?.last_used_at,p=Ms(),o=Ns(),f=Tt(),m=Us(l.id),u=JSON.stringify([i.id,l.id]),h=Yi(l.metadata,m.snapshot()),d=yn({resolver:wn(Ua),defaultValues:{...l,metadata:{...ss(l.metadata),previewServerUrl:Zi(l.metadata),...h}}}),x=d.watch("connections"),g=Pi(l),v=Ls(l?.metadata),y=v&&Bs(d.watch("metadata.ui.layout"))==="off",j=Vs(l),b=j?{owner:j.owner,name:j.name,url:j.url}:null,[S,N]=Q.useReducer(yr,{shareDialogOpen:!1,addDialogOpen:!1,settingsDialogOpen:!1,settingsConnectionId:null}),[k,w]=Q.useState(!1),[C,_]=Q.useState(!1),{openSidePanel:T}=Dn(),{sendMessage:V}=Mn(),$=async()=>{if(C)return;const L=d.getValues("metadata.instructions");if(L?.trim()){_(!0);try{U(),_e("agent_instructions_improve_clicked",{agent_id:l.id,instructions_length:L.length}),T();const ee=Cn(i.id);await V({tiptapDoc:Vn({managerAgentId:ee.id,managerName:ee.title,kind:"agent",id:l.id,instructions:L})})}finally{_(!1)}}},[D,A]=Q.useReducer(wr,null),P=()=>{D!==null&&(_e("agent_updated",{agent_id:l.id,fields:Array.from(D.fields),instructions_length:D.instructionsLength,save_count:D.saveCount,edit_duration_ms:Date.now()-D.start}),A({type:"reset"}))},{schedule:E,flush:U}=Jt({delayMs:3e4,save:async()=>P()}),K=async()=>{const L=m.snapshot(),ee={predicate:Ve=>ts(Ve.queryKey,i.id)},J=async()=>(await o.invalidateQueries({predicate:Ve=>ts(Ve.queryKey,i.id),refetchType:"all"}),es(o,i.id,l.id)),pe=(Ve,Ge)=>{if(Ve){jr(d.getValues("metadata.sidebarViews"),Ve.rawViews)||d.setValue("metadata.sidebarViews",Ve.rawViews,{shouldDirty:!1}),d.getValues("metadata.sidebarViewsVersion")!==Ve.version&&d.setValue("metadata.sidebarViewsVersion",Ve.version,{shouldDirty:!1});return}Ge!==null&&(d.setValue("metadata.sidebarViews",[...Ge],{shouldDirty:!1}),d.setValue("metadata.sidebarViewsVersion",Li,{shouldDirty:!1}))},Me=Bi(L),Te=Object.keys(d.control._formState.dirtyFields);if(Te.length===0&&!Me){await m.settle({snapshot:L,saved:!0,authoritativeViews:L?.persistedViews});return}const We=Te.length>0?Te:["metadata"],ot=We.includes("metadata"),Ke=d.getValues();d.reset(Ke,{keepValues:!0});const et=Sr(Ke),nn=es(o,i.id,l.id),ln=Wi({sidebarViews:et.metadata?.sidebarViews,sidebarViewsVersion:et.metadata?.sidebarViewsVersion},L,nn?.metadata);et.metadata={...ss(et.metadata),...ln};let bt;try{bt=await a.update.mutateAsync({id:l.id,data:et})}catch(Ve){let Ge=null;try{Ge=await J()}catch{}const Rt=Ge?xs(Ge):null,Lt=await m.settle({snapshot:L,saved:!1,authoritativeViews:Rt?.effectiveViews});throw Lt.settledLatest&&pe(Rt,Lt.reconciledViews),Ve}await o.cancelQueries(ee),Ki(o,i.id,bt);const Et=xs(bt),zt=await m.settle({snapshot:L,saved:!0,authoritativeViews:Et.effectiveViews});zt.settledLatest&&pe(Et,zt.reconciledViews),A({type:"accumulate",now:Date.now(),fields:We,instructionsLength:ot?Ke.metadata?.instructions?.length??0:null}),E()},Y=()=>pl(u,K),{schedule:B,flush:z}=Jt({save:Y});Q.useEffect(()=>{const L=d.watch(()=>B());return()=>L.unsubscribe()},[]);const M=()=>{_e("connections_dialog_opened",{source:"agent_settings",mode:"add"}),N({type:"SET_ADD_DIALOG_OPEN",payload:!0})},O=async L=>{const ee=d.getValues("connections");if(ee.some(Me=>Me.connection_id===L))return;d.setValue("connections",[...ee,{connection_id:L,selected_tools:St.tools,selected_resources:St.resources,selected_prompts:St.prompts}],{shouldDirty:!0}),N({type:"SET_ADD_DIALOG_OPEN",payload:!1});const J=new URL(`/api/${i.slug}/mcp/${L}`,window.location.origin),pe=await Gt({url:J.href,token:null,orgId:i.id});pe.supportsOAuth&&!pe.isAuthenticated&&await H(L)},G=L=>{const J=d.getValues("connections").filter(pe=>pe.connection_id!==L);d.setValue("connections",J,{shouldDirty:!0})},R=(L,ee)=>{const J=d.getValues("connections");if(J.some(pe=>pe.connection_id===ee)){oe.error(s("virtualMcp.virtualMcp.instanceAlreadyAdded"));return}d.setValue("connections",J.map(pe=>pe.connection_id===L?{...pe,connection_id:ee}:pe),{shouldDirty:!0})},F=async L=>{if(d.getValues("connections").find(J=>J.connection_id===L))try{const{item:J}=await f.call("COLLECTION_CONNECTIONS_GET",{id:L});if(!J)return;const pe=J.title.replace(/\s*\(.*?\)\s*$/,""),Me=kn("conn"),Te=`${pe} (${Date.now().toString(36).slice(-4)})`;await p.create.mutateAsync({id:Me,title:Te,description:J.description??null,connection_type:J.connection_type,connection_url:J.connection_url??null,connection_token:null,icon:J.icon??null,app_name:J.app_name??null,app_id:J.app_id??null,connection_headers:J.connection_headers??null});const We=new URL(`/api/${i.slug}/mcp/${Me}`,window.location.origin),ot=await Gt({url:We.href,token:null,orgId:i.id});if(ot.supportsOAuth&&!ot.isAuthenticated){const Ke=await H(Me);if(!Ke){await p.delete.mutateAsync(Me);return}await p.update.mutateAsync({id:Me,data:{title:`${pe} (${Ke})`}})}R(L,Me),oe.success(s("virtualMcp.virtualMcp.newInstanceCreated"))}catch(J){console.error("Failed to create instance:",J),oe.error(s("virtualMcp.virtualMcp.failedToCreateInstance"))}},W=L=>{N({type:"OPEN_SETTINGS",payload:L})},H=async L=>{const{token:ee,tokenInfo:J,error:pe}=await $n({connectionId:L,orgSlug:i.slug,scope:"offline_access"});if(pe||!ee)return oe.error(s("virtualMcp.virtualMcp.authenticationFailed",{error:pe??""})),null;if(J)try{const Te=await fetch(`/api/${i.slug}/connections/${L}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:J.accessToken,refreshToken:J.refreshToken,expiresIn:J.expiresIn,scope:J.scope,clientId:J.clientId,clientSecret:J.clientSecret,tokenEndpoint:J.tokenEndpoint})});if(!Te.ok)console.error("Failed to save OAuth token:",await Te.text()),await p.update.mutateAsync({id:L,data:{connection_token:ee}});else try{await p.update.mutateAsync({id:L,data:{}})}catch(We){console.warn("Failed to refresh connection tools after OAuth:",We)}}catch(Te){console.error("Error saving OAuth token:",Te),await p.update.mutateAsync({id:L,data:{connection_token:ee}})}else await p.update.mutateAsync({id:L,data:{connection_token:ee}});const Me=new URL(`/api/${i.slug}/mcp/${L}`,window.location.origin);return await o.invalidateQueries({queryKey:Dt.isMCPAuthenticated(Me.href,null)}),oe.success(s("virtualMcp.virtualMcp.authenticationSuccessful")),Nr(J,ee)},se=()=>{const L=d.getValues("metadata.instructions")??"",ee=s("virtualMcp.virtualMcp.promptTemplateContent"),J=L.trim()?`${L}
|
|
3
|
-
|
|
4
|
-
${ee}`:ee;d.setValue("metadata.instructions",J,{shouldDirty:!0})},le=new Set(x.map(L=>L.connection_id)),{section:ce}=Oa(),ae=e!==null,ie=e==="instructions"?null:e??ce,X=ie==="general",de=ae?e==="instructions":X,ue=Oi(l.id)==="v8",he=Ta({virtualMcpId:l.id,form:d,flushAndSave:z}),me=Pt(),[xe,ge]=Q.useState(!1),fe=async()=>{U();try{await a.delete.mutateAsync(l.id),_e("agent_deleted",{agent_id:l.id,source:"agent_detail"}),oe.success(s("virtualMcp.virtualMcp.agentDeleted",{title:l.title})),me({to:"/$org",params:{org:i.slug}})}catch{}},I=t.jsxs(te,{variant:"outline",size:"sm",onClick:()=>{_e("agent_connect_modal_opened",{agent_id:l.id}),N({type:"SET_SHARE_DIALOG_OPEN",payload:!0})},children:[t.jsx(Sn,{size:14}),s("virtualMcp.virtualMcp.connect")]}),ne=t.jsxs("div",{className:"flex items-center gap-2",children:[!d.watch("metadata.instructions")?.trim()&&t.jsx(te,{variant:"outline",size:"sm",onClick:se,children:s("virtualMcp.virtualMcp.promptTemplate")}),t.jsxs(te,{variant:"outline",size:"sm",disabled:C||!d.watch("metadata.instructions")?.trim(),onClick:$,children:[t.jsx(dt,{size:13}),s("virtualMcp.virtualMcp.improve")]})]});return t.jsxs(Ue,{children:[t.jsxs(t.Fragment,{children:[!ae&&t.jsxs(t.Fragment,{children:[t.jsx(Ue.Title,{children:s("virtualMcp.settings.title")}),t.jsx(Pa,{section:ie??"general"})]}),t.jsx(Ue.Actions,{secondary:ie==="connections"?I:void 0,children:ie==="connections"?t.jsxs(te,{size:"sm",onClick:M,children:[t.jsx(Pe,{size:14}),s("virtualMcp.virtualMcp.addConnection")]}):I}),t.jsx(Ue.Content,{children:t.jsx(Ue.Container,{width:"standard",className:"@container/project-settings",children:t.jsxs(Nn,{children:[X&&t.jsx(Ma,{views:he}),X&&t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(Da,{form:d,onCommit:z}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 text-xs text-muted-foreground",children:[t.jsx(_n,{id:l.created_by,size:"2xs",className:"text-sm text-muted-foreground"}),t.jsx("span",{className:"text-muted-foreground/50",children:"·"}),t.jsxs("span",{children:[s("virtualMcp.virtualMcp.created")," ",zl(new Date(l.created_at),"PP",{locale:n})]}),t.jsx("span",{className:"text-muted-foreground/50",children:"·"}),t.jsx("span",{children:r?s("virtualMcp.virtualMcp.lastUsed",{time:An(new Date(r),{addSuffix:!0,locale:n})}):s("virtualMcp.virtualMcp.neverUsed")})]})]}),ie==="connections"&&t.jsx("section",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:x.length===0?t.jsxs("button",{type:"button",onClick:M,className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-dashed border-border hover:bg-accent transition-colors w-full text-left cursor-pointer",children:[t.jsx("div",{className:"flex items-center justify-center size-8 rounded-md text-muted-foreground/75 border border-dashed border-border shrink-0",children:t.jsx(Pe,{size:16})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:s("virtualMcp.virtualMcp.noConnectionsYet")})]}):x.map(L=>t.jsx(Ye,{fallback:()=>null,children:t.jsx(Q.Suspense,{fallback:t.jsx(Js,{}),children:t.jsx(ha,{connection_id:L.connection_id,usedConnectionIds:le,onOpenSettings:()=>W(L.connection_id),onRemove:()=>G(L.connection_id),onAuthenticate:H,onSwitchInstance:R,onNewInstance:()=>F(L.connection_id)})})},L.connection_id))})}),de&&t.jsxs("section",{className:"flex flex-col gap-3",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground",children:s("virtualMcp.virtualMcp.instructions")}),ne]}),t.jsx(be,{name:"metadata.instructions",control:d.control,render:({field:L})=>t.jsxs("div",{className:"relative rounded-xl shadow-edge bg-card focus-within-ring",children:[t.jsx(ut,{...L,value:L.value??"",onChange:ee=>{L.onChange(ee)},onBlur:()=>{L.onBlur(),z()},placeholder:s("virtualMcp.virtualMcp.instructionsPlaceholder"),className:"min-h-[200px] max-h-[360px] overflow-auto resize-none text-base text-muted-foreground placeholder:text-muted-foreground/40 leading-relaxed border-0 shadow-none px-4 py-3 pr-11 focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent",style:{boxShadow:"none"}}),t.jsxs(Se,{delayDuration:0,children:[t.jsx(Ne,{asChild:!0,children:t.jsx(te,{type:"button",variant:"ghost",size:"icon-sm",className:"absolute top-2 right-2 text-muted-foreground",onClick:()=>w(!0),"aria-label":s("virtualMcp.virtualMcp.openFullscreenEditor"),children:t.jsx(hi,{size:14})})}),t.jsx(Ce,{side:"left",children:s("virtualMcp.virtualMcp.fullscreen")})]})]})})]}),de&&t.jsx(Ll,{form:d}),X&&t.jsx(Ye,{fallback:()=>null,children:t.jsx(Q.Suspense,{fallback:t.jsxs("section",{className:"flex flex-col gap-3",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground",children:s("virtualMcp.virtualMcp.subAgents")}),t.jsx("div",{className:"h-16 rounded-lg border border-dashed border-border animate-pulse"})]}),children:t.jsx(Ql,{form:d,currentAgentId:l.id})})}),ie==="site"&&v&&t.jsx(Be,{title:s("sandbox.cmsSettings.title"),children:t.jsxs(ze,{children:[t.jsx(je,{children:t.jsx(vr,{control:d.control,onCommit:z})}),!y&&t.jsx(je,{children:t.jsx(hr,{control:d.control})}),!y&&g&&t.jsx(je,{children:t.jsx(xr,{control:d.control,onCommit:z})})]})}),ie==="site"&&!y&&t.jsx(Be,{title:s("sandbox.cmsSettings.preview.title"),description:s("sandbox.cmsSettings.preview.description"),children:t.jsx(ze,{children:t.jsx(La,{control:d.control,isBlocksV8:ue,previewServerUrl:d.watch("metadata.previewServerUrl"),fastPreview:d.watch("metadata.fastPreview")})})}),ie==="site"&&ue&&g&&t.jsx($a,{orgSlug:i.slug,virtualMcpId:l.id}),ie==="site"&&t.jsx(Be,{title:s("virtualMcp.virtualMcp.sandbox"),children:t.jsxs(ze,{children:[t.jsx(je,{children:t.jsx(or,{repo:b})}),t.jsx(je,{children:t.jsx(mr,{control:d.control})}),t.jsx(je,{children:t.jsx(er,{control:d.control,form:d,virtualMcpId:l.id,orgSlug:i.slug,sandboxMap:l.metadata.sandboxMap})})]})}),X&&t.jsx(Be,{title:s("virtualMcp.settings.groups.advanced"),children:t.jsx(ze,{children:t.jsx(tt,{title:s("virtualMcp.virtualMcp.deleteAgent"),description:s("virtualMcp.virtualMcp.deleteAgentDescription"),action:t.jsxs(te,{variant:"outline",size:"sm",className:"text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:()=>ge(!0),children:[t.jsx(It,{size:14}),s("virtualMcp.virtualMcp.deleteAgent")]})})})})]})})},e??ie)]}),t.jsx(Fn,{open:xe,onOpenChange:ge,children:t.jsxs(En,{children:[t.jsxs(zn,{children:[t.jsx(Rn,{children:s("virtualMcp.virtualMcp.deleteAgentConfirm")}),t.jsx(Ln,{children:s("virtualMcp.virtualMcp.deleteAgentConfirmDescription",{title:l.title})})]}),t.jsxs(Un,{children:[t.jsx(Yn,{children:s("virtualMcp.virtualMcp.cancel")}),t.jsx(Bn,{onClick:fe,variant:"destructive",children:s("virtualMcp.virtualMcp.delete")})]})]})}),t.jsx(gi,{open:S.addDialogOpen,onOpenChange:L=>N({type:"SET_ADD_DIALOG_OPEN",payload:L}),agentId:l.id,addedConnectionIds:le,onAdd:O}),t.jsx(pa,{open:S.settingsDialogOpen,onOpenChange:L=>{L||N({type:"CLOSE_SETTINGS"})},selectedId:S.settingsConnectionId,form:d,connections:x,onAuthenticate:H}),t.jsx(Xa,{open:S.shareDialogOpen,onOpenChange:L=>N({type:"SET_SHARE_DIALOG_OPEN",payload:L}),virtualMcp:l}),t.jsx(Xe,{open:k,onOpenChange:w,children:t.jsxs(Je,{className:"w-[90vw] sm:max-w-6xl h-[85vh] flex flex-col p-0 gap-0",children:[t.jsx(lt,{className:"px-6 pt-6 pb-3 border-b border-border shrink-0",children:t.jsx(at,{children:s("virtualMcp.virtualMcp.instructions")})}),t.jsx("div",{className:"flex-1 min-h-0 p-6",children:t.jsx(be,{name:"metadata.instructions",control:d.control,render:({field:L})=>t.jsx(ut,{...L,value:L.value??"",onChange:ee=>{L.onChange(ee)},onBlur:()=>{L.onBlur(),z()},placeholder:s("virtualMcp.virtualMcp.instructionsPlaceholder"),className:"w-full h-full resize-none text-base text-muted-foreground placeholder:text-muted-foreground/40 leading-relaxed rounded-xl shadow-edge px-4 py-3 focus-ring bg-card border-0",style:{boxShadow:"none"}})})})]})})]})}function zo(l){const e=q.c(22),{virtualMcpId:s,contextSection:n}=l,i=n===void 0?null:n,a=Z(),c=Pt(),{org:r}=Fe(),p=_s(s);if(!p){let u;e[0]!==a?(u=a("virtualMcp.virtualMcp.spaceNotFound"),e[0]=a,e[1]=u):u=e[1];let h;e[2]!==a?(h=a("virtualMcp.virtualMcp.spaceNotFoundDescription"),e[2]=a,e[3]=h):h=e[3];let d;e[4]!==c||e[5]!==r.slug?(d=()=>c({to:"/$org",params:{org:r.slug}}),e[4]=c,e[5]=r.slug,e[6]=d):d=e[6];let x;e[7]!==a?(x=a("virtualMcp.virtualMcp.backToSpaces"),e[7]=a,e[8]=x):x=e[8];let g;e[9]!==d||e[10]!==x?(g=t.jsx(te,{variant:"outline",onClick:d,children:x}),e[9]=d,e[10]=x,e[11]=g):g=e[11];let v;return e[12]!==u||e[13]!==h||e[14]!==g?(v=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Tn,{title:u,description:h,actions:g})}),e[12]=u,e[13]=h,e[14]=g,e[15]=v):v=e[15],v}let o;e[16]!==p?(o=Vs(p)?.connectionId??"",e[16]=p,e[17]=o):o=e[17];const f=`${p.id}:${o}`;let m;return e[18]!==i||e[19]!==f||e[20]!==p?(m=t.jsx(Cr,{virtualMcp:p,contextSection:i},f),e[18]=i,e[19]=f,e[20]=p,e[21]=m):m=e[21],m}export{zo as V};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{eG as He,cz as Ht,r as S,fq as ie,b5 as $t,c as Z,j as s,g3 as Jt,b as de,g5 as Qt,g6 as Ct,g7 as _t,eZ as L,er as ge,B as Ze,b2 as ae,a5 as er}from"./index-DcU2uHG-.js";import{i as tr}from"./CreditCard01-C8DlQ7Ge.js";import{B as C}from"./badge-ByzdbptS.js";import{M as rr}from"./multi-select-CmbGOwtN.js";import{S as nr,d as ir,c as ar,a as sr,b as or}from"./select-B47VUguS.js";import{T as ee,a as lr,b as $e,c as te,d as cr,e as ur}from"./table-DuCeyVXY.js";import{C as fr,X as dr,Y as gr}from"./CartesianChart-BZmgsxge.js";import{bH as mr,bI as kt,bJ as yr,bK as pr,bL as br,bM as hr,bN as vr,bO as jr,ai as xr,l as ue,bP as Sr,m as D,bQ as wr,i as Or,b0 as fe,bR as Ut,e as X,bS as Pr,bT as Br,ar as Je,bU as Ar,F as Tr,aF as Dr,ba as Nr,t as Er,Z as qr,D as se,a_ as Mr,r as Ir,u as Rr,bV as Lr,h as _r,bW as kr,bX as Ur,bY as Fr,bZ as Wr,b_ as Kr,b$ as zr,c0 as Vr,c1 as Zr,c2 as Gr}from"./CategoricalChart-DkwWvFDx.js";import{R as Yr,S as Xr}from"./Sector-BraX9V6h.js";import{A as Hr,a as $r}from"./AreaChart-Du66qHXY.js";import{R as Jr}from"./require-capability-fF33BjRE.js";import"./checkbox-Dla8kRWj.js";import"./Minus-DPDq6KAA.js";import"./ChevronUp-CFN68hLk.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./SearchMd-BODiv7c9.js";import"./popover-CVCbWisj.js";import"./index-BdQq_4o_.js";import"./index-WjQsIrkp.js";import"./index-7svLQYvL.js";import"./access-gate-CgSSvGG3.js";import"./capability-load-error-CaA022rx.js";var me={},ye={},Qe;function Qr(){return Qe||(Qe=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n){const a=new Map;for(let l=0;l<r.length;l++){const o=r[l],u=n(o,l,r);a.has(u)||a.set(u,o)}return Array.from(a.values())}t.uniqBy=e})(ye)),ye}var pe={},Ce;function Cr(){return Ce||(Ce=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n){return function(...a){return r.apply(this,a.slice(0,n))}}t.ary=e})(pe)),pe}var be={},et;function Ft(){return et||(et=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r}t.identity=e})(be)),be}var he={},ve={},tt;function en(){return tt||(tt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="object"&&r!==null}t.isObjectLike=e})(ve)),ve}var rt;function tn(){return rt||(rt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=mr(),r=en();function n(a){return r.isObjectLike(a)&&e.isArrayLike(a)}t.isArrayLikeObject=n})(he)),he}var je={},xe={},nt;function rn(){return nt||(nt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=kt();function r(n){return function(a){return e.get(a,n)}}t.property=r})(xe)),xe}var Se={},we={},Oe={},Pe={},it;function Wt(){return it||(it=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==null||typeof r!="object"&&typeof r!="function"}t.isPrimitive=e})(Pe)),Pe}var at;function nn(){return at||(at=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=yr(),r=Wt(),n=pr();function a(f,i,d){return typeof d!="function"?a(f,i,()=>{}):l(f,i,function b(g,p,v,c,h,j){const O=d(g,p,v,c,h,j);return O!==void 0?!!O:l(g,p,b,j)},new Map)}function l(f,i,d,b){if(i===f)return!0;switch(typeof i){case"object":return o(f,i,d,b);case"function":return Object.keys(i).length>0?l(f,{...i},d,b):n.isEqualsSameValueZero(f,i);default:return e.isObject(f)?typeof i=="string"?i==="":!0:n.isEqualsSameValueZero(f,i)}}function o(f,i,d,b){if(i==null)return!0;if(Array.isArray(i))return m(f,i,d,b);if(i instanceof Map)return u(f,i,d,b);if(i instanceof Set)return y(f,i,d,b);const g=Object.keys(i);if(f==null||r.isPrimitive(f))return g.length===0;if(g.length===0)return!0;if(b?.has(i))return b.get(i)===f;b?.set(i,f);try{for(let p=0;p<g.length;p++){const v=g[p];if(!r.isPrimitive(f)&&!(v in f)||i[v]===void 0&&f[v]!==void 0||i[v]===null&&f[v]!==null||!d(f[v],i[v],v,f,i,b))return!1}return!0}finally{b?.delete(i)}}function u(f,i,d,b){if(i.size===0)return!0;if(!(f instanceof Map))return!1;for(const[g,p]of i.entries()){const v=f.get(g);if(d(v,p,g,f,i,b)===!1)return!1}return!0}function m(f,i,d,b){if(i.length===0)return!0;if(!Array.isArray(f))return!1;const g=new Set;for(let p=0;p<i.length;p++){const v=i[p];let c=!1;for(let h=0;h<f.length;h++){if(g.has(h))continue;const j=f[h];let O=!1;if(d(j,v,p,f,i,b)&&(O=!0),O){g.add(h),c=!0;break}}if(!c)return!1}return!0}function y(f,i,d,b){return i.size===0?!0:f instanceof Set?m([...f],[...i],d,b):!1}t.isMatchWith=a,t.isSetMatch=y})(Oe)),Oe}var st;function Kt(){return st||(st=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=nn();function r(n,a){return e.isMatchWith(n,a,()=>{})}t.isMatch=r})(we)),we}var Be={},Ae={},Te={},ot;function an(){return ot||(ot=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}t.getSymbols=e})(Te)),Te}var De={},lt;function Ge(){return lt||(lt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}t.getTag=e})(De)),De}var Ne={},ct;function zt(){return ct||(ct=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e="[object RegExp]",r="[object String]",n="[object Number]",a="[object Boolean]",l="[object Arguments]",o="[object Symbol]",u="[object Date]",m="[object Map]",y="[object Set]",f="[object Array]",i="[object Function]",d="[object ArrayBuffer]",b="[object Object]",g="[object Error]",p="[object DataView]",v="[object Uint8Array]",c="[object Uint8ClampedArray]",h="[object Uint16Array]",j="[object Uint32Array]",O="[object BigUint64Array]",x="[object Int8Array]",P="[object Int16Array]",A="[object Int32Array]",B="[object BigInt64Array]",T="[object Float32Array]",E="[object Float64Array]";t.argumentsTag=l,t.arrayBufferTag=d,t.arrayTag=f,t.bigInt64ArrayTag=B,t.bigUint64ArrayTag=O,t.booleanTag=a,t.dataViewTag=p,t.dateTag=u,t.errorTag=g,t.float32ArrayTag=T,t.float64ArrayTag=E,t.functionTag=i,t.int16ArrayTag=P,t.int32ArrayTag=A,t.int8ArrayTag=x,t.mapTag=m,t.numberTag=n,t.objectTag=b,t.regexpTag=e,t.setTag=y,t.stringTag=r,t.symbolTag=o,t.uint16ArrayTag=h,t.uint32ArrayTag=j,t.uint8ArrayTag=v,t.uint8ClampedArrayTag=c})(Ne)),Ne}var Ee={},qe={},ut;function sn(){return ut||(ut=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof He=="object"&&He||(function(){return this})()||Function("return this")();t.globalThis=e})(qe)),qe}var ft;function on(){return ft||(ft=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=sn();function r(n){return typeof e.globalThis.Buffer<"u"&&e.globalThis.Buffer.isBuffer(n)}t.isBuffer=r})(Ee)),Ee}var Me={},dt;function ln(){return dt||(dt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}t.isTypedArray=e})(Me)),Me}var gt;function Vt(){return gt||(gt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=an(),r=Ge(),n=zt(),a=on(),l=Wt(),o=ln();function u(i,d){return m(i,void 0,i,new Map,d)}function m(i,d,b,g=new Map,p=void 0){const v=p?.(i,d,b,g);if(v!==void 0)return v;if(l.isPrimitive(i))return i;if(g.has(i))return g.get(i);if(Array.isArray(i)){const c=new Array(i.length);g.set(i,c);for(let h=0;h<i.length;h++)c[h]=m(i[h],h,b,g,p);return Object.hasOwn(i,"index")&&(c.index=i.index),Object.hasOwn(i,"input")&&(c.input=i.input),c}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const c=new RegExp(i.source,i.flags);return c.lastIndex=i.lastIndex,c}if(i instanceof Map){const c=new Map;g.set(i,c);for(const[h,j]of i)c.set(h,m(j,h,b,g,p));return c}if(i instanceof Set){const c=new Set;g.set(i,c);for(const h of i)c.add(m(h,void 0,b,g,p));return c}if(a.isBuffer(i))return i.subarray();if(o.isTypedArray(i)){const c=new(Object.getPrototypeOf(i)).constructor(i.length);g.set(i,c);for(let h=0;h<i.length;h++)c[h]=m(i[h],h,b,g,p);return c}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const c=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return g.set(i,c),y(c,i,b,g,p),c}if(typeof File<"u"&&i instanceof File){const c=new File([i],i.name,{type:i.type});return g.set(i,c),y(c,i,b,g,p),c}if(typeof Blob<"u"&&i instanceof Blob){const c=new Blob([i],{type:i.type});return g.set(i,c),y(c,i,b,g,p),c}if(i instanceof Error){const c=structuredClone(i);return g.set(i,c),c.message=i.message,c.name=i.name,c.stack=i.stack,c.cause=i.cause,c.constructor=i.constructor,y(c,i,b,g,p),c}if(i instanceof Boolean){const c=new Boolean(i.valueOf());return g.set(i,c),y(c,i,b,g,p),c}if(i instanceof Number){const c=new Number(i.valueOf());return g.set(i,c),y(c,i,b,g,p),c}if(i instanceof String){const c=new String(i.valueOf());return g.set(i,c),y(c,i,b,g,p),c}if(typeof i=="object"&&f(i)){const c=Object.create(Object.getPrototypeOf(i));return g.set(i,c),y(c,i,b,g,p),c}return i}function y(i,d,b=i,g,p){const v=[...Object.keys(d),...e.getSymbols(d)];for(let c=0;c<v.length;c++){const h=v[c],j=Object.getOwnPropertyDescriptor(i,h);(j==null||j.writable)&&(i[h]=m(d[h],h,b,g,p))}}function f(i){switch(r.getTag(i)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}t.cloneDeepWith=u,t.cloneDeepWithImpl=m,t.copyProperties=y})(Ae)),Ae}var mt;function cn(){return mt||(mt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Vt();function r(n){return e.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}t.cloneDeep=r})(Be)),Be}var yt;function un(){return yt||(yt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Kt(),r=cn();function n(a){return a=r.cloneDeep(a),l=>e.isMatch(l,a)}t.matches=n})(Se)),Se}var Ie={},Re={},Le={},pt;function fn(){return pt||(pt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Vt(),r=Ge(),n=zt();function a(l,o){return e.cloneDeepWith(l,(u,m,y,f)=>{const i=o?.(u,m,y,f);if(i!==void 0)return i;if(typeof l=="object"){if(r.getTag(l)===n.objectTag&&typeof l.constructor!="function"){const d={};return f.set(l,d),e.copyProperties(d,l,y,f),d}switch(Object.prototype.toString.call(l)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new l.constructor(l?.valueOf());return e.copyProperties(d,l),d}case n.argumentsTag:{const d={};return e.copyProperties(d,l),d.length=l.length,d[Symbol.iterator]=l[Symbol.iterator],d}default:return}}})}t.cloneDeepWith=a})(Le)),Le}var bt;function dn(){return bt||(bt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=fn();function r(n){return e.cloneDeepWith(n)}t.cloneDeep=r})(Re)),Re}var _e={},ke={},ht;function gn(){return ht||(ht=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ge();function r(n){return n!==null&&typeof n=="object"&&e.getTag(n)==="[object Arguments]"}t.isArguments=r})(ke)),ke}var vt;function mn(){return vt||(vt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=br(),r=vr(),n=gn(),a=hr();function l(o,u){let m;if(Array.isArray(u)?m=u:typeof u=="string"&&e.isDeepKey(u)&&o?.[u]==null?m=a.toPath(u):m=[u],m.length===0)return!1;let y=o;for(let f=0;f<m.length;f++){const i=m[f];if((y==null||!Object.hasOwn(y,i))&&!((Array.isArray(y)||n.isArguments(y))&&r.isIndex(i)&&i<y.length))return!1;y=y[i]}return!0}t.has=l})(_e)),_e}var jt;function yn(){return jt||(jt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Kt(),r=jr(),n=dn(),a=kt(),l=mn();function o(u,m){switch(typeof u){case"object":{Object.is(u?.valueOf(),-0)&&(u="-0");break}case"number":{u=r.toKey(u);break}}return m=n.cloneDeep(m),function(y){const f=a.get(y,u);return f===void 0?l.has(y,u):m===void 0?f===void 0:e.isMatch(f,m)}}t.matchesProperty=o})(Ie)),Ie}var xt;function pn(){return xt||(xt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ft(),r=rn(),n=un(),a=yn();function l(o){if(o==null)return e.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?a.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}t.iteratee=l})(je)),je}var St;function bn(){return St||(St=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Qr(),r=Cr(),n=Ft(),a=tn(),l=pn();function o(u,m=n.identity){return a.isArrayLikeObject(u)?e.uniqBy(Array.from(u),r.ary(l.iteratee(m),1)):[]}t.uniqBy=o})(me)),me}var Ue,wt;function hn(){return wt||(wt=1,Ue=bn().uniqBy),Ue}var vn=hn();const Ot=Ht(vn);function jn(t,e,r){return e===!0?Ot(t,r):typeof e=="function"?Ot(t,e):t}var oe=1;function xn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[e,r]=S.useState({height:0,left:0,top:0,width:0}),n=S.useCallback(a=>{if(a!=null){var l=a.getBoundingClientRect(),o={height:l.height,left:l.left,top:l.top,width:l.width};(Math.abs(o.height-e.height)>oe||Math.abs(o.left-e.left)>oe||Math.abs(o.top-e.top)>oe||Math.abs(o.width-e.width)>oe)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[e.width,e.height,e.top,e.left,...t]);return[e,n]}function Ke(){return Ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ke.apply(null,arguments)}function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function re(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pt(Object(r),!0).forEach(function(n){Sn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Sn(t,e,r){return(e=wn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wn(t){var e=On(t,"string");return typeof e=="symbol"?e:e+""}function On(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pn(t){return Array.isArray(t)&&ue(t[0])&&ue(t[1])?t.join(" ~ "):t}var J={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function Bn(t,e){return e==null?t:Sr(t,e)}var An=t=>{var{separator:e=J.separator,contentStyle:r,itemStyle:n,labelStyle:a=J.labelStyle,payload:l,formatter:o,itemSorter:u,wrapperClassName:m,labelClassName:y,label:f,labelFormatter:i,accessibilityLayer:d=J.accessibilityLayer}=t,b=()=>{if(l&&l.length){var x={padding:0,margin:0},P=Bn(l,u),A=P.map((B,T)=>{if(!B||B.type==="none")return null;var E=B.formatter||o||Pn,{value:N,name:_}=B,F=N,W=_;if(E){var M=E(N,_,B,T,l);if(Array.isArray(M))[F,W]=M;else if(M!=null)F=M;else return null}var K=re(re({},J.itemStyle),{},{color:B.color||J.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(T),style:K},ue(W)?S.createElement("span",{className:"recharts-tooltip-item-name"},W):null,ue(W)?S.createElement("span",{className:"recharts-tooltip-item-separator"},e):null,S.createElement("span",{className:"recharts-tooltip-item-value"},F),S.createElement("span",{className:"recharts-tooltip-item-unit"},B.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:x},A)}return null},g=re(re({},J.contentStyle),r),p=re({margin:0},a),v=!xr(f),c=v?f:"",h=ie("recharts-default-tooltip",m),j=ie("recharts-tooltip-label",y);v&&i&&l!==void 0&&l!==null&&(c=i(f,l));var O=d?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",Ke({className:h,style:g},O),S.createElement("p",{className:j,style:p},S.isValidElement(c)?c:"".concat(c)),b())},ne="recharts-tooltip-wrapper",Tn={visibility:"hidden"};function Dn(t){var{coordinate:e,translateX:r,translateY:n}=t;return ie(ne,{["".concat(ne,"-right")]:D(r)&&e&&D(e.x)&&r>=e.x,["".concat(ne,"-left")]:D(r)&&e&&D(e.x)&&r<e.x,["".concat(ne,"-bottom")]:D(n)&&e&&D(e.y)&&n>=e.y,["".concat(ne,"-top")]:D(n)&&e&&D(e.y)&&n<e.y})}function Bt(t){var{allowEscapeViewBox:e,coordinate:r,key:n,offset:a,position:l,reverseDirection:o,tooltipDimension:u,viewBox:m,viewBoxDimension:y}=t;if(l&&D(l[n]))return l[n];var f=r[n]-u-(a>0?a:0),i=r[n]+a;if(e[n])return o[n]?f:i;var d=m[n];if(d==null)return 0;if(o[n]){var b=f,g=d;return b<g?Math.max(i,d):Math.max(f,d)}if(y==null)return 0;var p=i+u,v=d+y;return p>v?Math.max(f,d):Math.max(i,d)}function Nn(t){var{translateX:e,translateY:r,useTranslate3d:n}=t;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function En(t){var{allowEscapeViewBox:e,coordinate:r,offsetTop:n,offsetLeft:a,position:l,reverseDirection:o,tooltipBox:u,useTranslate3d:m,viewBox:y}=t,f,i,d;return u.height>0&&u.width>0&&r?(i=Bt({allowEscapeViewBox:e,coordinate:r,key:"x",offset:a,position:l,reverseDirection:o,tooltipDimension:u.width,viewBox:y,viewBoxDimension:y.width}),d=Bt({allowEscapeViewBox:e,coordinate:r,key:"y",offset:n,position:l,reverseDirection:o,tooltipDimension:u.height,viewBox:y,viewBoxDimension:y.height}),f=Nn({translateX:i,translateY:d,useTranslate3d:m})):f=Tn,{cssProperties:f,cssClasses:Dn({translateX:i,translateY:d,coordinate:r})}}function At(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Q(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?At(Object(r),!0).forEach(function(n){qn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qn(t,e,r){return(e=Mn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mn(t){var e=In(t,"string");return typeof e=="symbol"?e:e+""}function In(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rn(t){if(!(t.prefersReducedMotion&&t.isAnimationActive==="auto")&&t.isAnimationActive&&t.active)return"transform ".concat(t.animationDuration,"ms ").concat(t.animationEasing)}function Ln(t){var e,r,n,a,l,o,u=wr(),[m,y]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var g=p=>{if(p.key==="Escape"){var v,c,h,j;y({dismissed:!0,dismissedAtCoordinate:{x:(v=(c=t.coordinate)===null||c===void 0?void 0:c.x)!==null&&v!==void 0?v:0,y:(h=(j=t.coordinate)===null||j===void 0?void 0:j.y)!==null&&h!==void 0?h:0}})}};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[(e=t.coordinate)===null||e===void 0?void 0:e.x,(r=t.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(a=t.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((l=(o=t.coordinate)===null||o===void 0?void 0:o.y)!==null&&l!==void 0?l:0)!==m.dismissedAtCoordinate.y)&&y(Q(Q({},m),{},{dismissed:!1}));var{cssClasses:f,cssProperties:i}=En({allowEscapeViewBox:t.allowEscapeViewBox,coordinate:t.coordinate,offsetLeft:typeof t.offset=="number"?t.offset:t.offset.x,offsetTop:typeof t.offset=="number"?t.offset:t.offset.y,position:t.position,reverseDirection:t.reverseDirection,tooltipBox:{height:t.lastBoundingBox.height,width:t.lastBoundingBox.width},useTranslate3d:t.useTranslate3d,viewBox:t.viewBox}),d=t.hasPortalFromProps?{}:Q(Q({transition:Rn({prefersReducedMotion:u,isAnimationActive:t.isAnimationActive,active:t.active,animationDuration:t.animationDuration,animationEasing:t.animationEasing})},i),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),b=Q(Q({},d),{},{visibility:!m.dismissed&&t.active&&t.hasPayload?"visible":"hidden"},t.wrapperStyle);return S.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:f,style:b,ref:t.innerRef},t.children)}var _n=S.memo(Ln),kn=["x","y","top","left","width","height","className"];function ze(){return ze=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ze.apply(null,arguments)}function Tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Un(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tt(Object(r),!0).forEach(function(n){Fn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Fn(t,e,r){return(e=Wn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wn(t){var e=Kn(t,"string");return typeof e=="symbol"?e:e+""}function Kn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zn(t,e){if(t==null)return{};var r,n,a=Vn(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n<l.length;n++)r=l[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Vn(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var Zn=(t,e,r,n,a,l)=>"M".concat(t,",").concat(a,"v").concat(n,"M").concat(l,",").concat(e,"h").concat(r),Gn=t=>{var{x:e=0,y:r=0,top:n=0,left:a=0,width:l=0,height:o=0,className:u}=t,m=zn(t,kn),y=Un({x:e,y:r,top:n,left:a,width:l,height:o},m);return!D(e)||!D(r)||!D(l)||!D(o)||!D(n)||!D(a)?null:S.createElement("path",ze({},Or(y),{className:ie("recharts-cross",u),d:Zn(e,r,l,o,n,a)}))};function Yn(t,e,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-a:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-a,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function Zt(t){var{cx:e,cy:r,radius:n,startAngle:a,endAngle:l}=t,o=fe(e,r,n,a),u=fe(e,r,n,l);return{points:[o,u],cx:e,cy:r,radius:n,startAngle:a,endAngle:l}}function Xn(t,e,r){if(t==="horizontal")return[{x:e.x,y:r.top},{x:e.x,y:r.top+r.height}];if(t==="vertical")return[{x:r.left,y:e.y},{x:r.left+r.width,y:e.y}];if(Ut(e)){if(t==="centric"){var{cx:n,cy:a,innerRadius:l,outerRadius:o,angle:u}=e,m=fe(n,a,l,u),y=fe(n,a,o,u);return[{x:m.x,y:m.y},{x:y.x,y:y.y}]}return Zt(e)}}function Dt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(r),!0).forEach(function(n){Hn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hn(t,e,r){return(e=$n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $n(t){var e=Jn(t,"string");return typeof e=="symbol"?e:e+""}function Jn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Qn=()=>X(Ar),Cn=()=>{var t=Qn(),e=X(Pr),r=X(Br);return!t||!r?Je(void 0,e):Je(Nt(Nt({},t),{},{scale:r}),e)};function Ve(){return Ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ve.apply(null,arguments)}function Et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function le(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Et(Object(r),!0).forEach(function(n){ei(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Et(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ei(t,e,r){return(e=ti(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ti(t){var e=ri(t,"string");return typeof e=="symbol"?e:e+""}function ri(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ni(t){var{cursor:e,cursorComp:r,cursorProps:n}=t;return S.isValidElement(e)?S.cloneElement(e,n):S.createElement(r,n)}function ii(t){var e,{coordinate:r,payload:n,index:a,offset:l,tooltipAxisBandSize:o,layout:u,cursor:m,tooltipEventType:y,chartName:f}=t,i=r,d=n,b=a;if(!m||!i||f!=="ScatterChart"&&y!=="axis")return null;var g,p,v;if(f==="ScatterChart")g=i,p=Gn,v=se.cursorLine;else if(f==="BarChart")g=Yn(u,i,l,o),p=Yr,v=se.cursorRectangle;else if(u==="radial"&&Ut(i)){var{cx:c,cy:h,radius:j,startAngle:O,endAngle:x}=Zt(i);g={cx:c,cy:h,startAngle:O,endAngle:x,innerRadius:j,outerRadius:j},p=Xr,v=se.cursorLine}else g={points:Xn(u,i,l)},p=Mr,v=se.cursorLine;var P=typeof m=="object"&&"className"in m?m.className:void 0,A=le(le(le(le({stroke:"#ccc",pointerEvents:"none"},l),g),Er(m)),{},{payload:d,payloadIndex:b,className:ie("recharts-tooltip-cursor",P)});return S.createElement(qr,{zIndex:(e=t.zIndex)!==null&&e!==void 0?e:v},S.createElement(ni,{cursor:m,cursorComp:p,cursorProps:A}))}function ai(t){var e=Cn(),r=Tr(),n=Dr(),a=Nr();return e==null||r==null||n==null||a==null?null:S.createElement(ii,Ve({},t,{offset:r,layout:n,tooltipAxisBandSize:e,chartName:a}))}function qt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qt(Object(r),!0).forEach(function(n){si(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function si(t,e,r){return(e=oi(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oi(t){var e=li(t,"string");return typeof e=="symbol"?e:e+""}function li(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ci(t){return t.dataKey}function ui(t,e){return S.isValidElement(t)?S.cloneElement(t,e):typeof t=="function"?S.createElement(t,e):S.createElement(An,e)}var It=[],fi={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function di(t){var e,r,n=Ir(t,fi),{active:a,allowEscapeViewBox:l,animationDuration:o,animationEasing:u,content:m,filterNull:y,isAnimationActive:f,offset:i,payloadUniqBy:d,position:b,reverseDirection:g,useTranslate3d:p,wrapperStyle:v,cursor:c,shared:h,trigger:j,defaultIndex:O,portal:x,axisId:P}=n,A=Rr(),B=typeof O=="number"?String(O):O;S.useEffect(()=>{A(Lr({shared:h,trigger:j,axisId:P,active:a,defaultIndex:B}))},[A,h,j,P,a,B]);var T=_r(),E=kr(),N=Ur(h),{activeIndex:_,isActive:F}=(e=X(U=>Fr(U,N,j,B)))!==null&&e!==void 0?e:{},W=X(U=>Wr(U,N,j,B)),M=X(U=>Kr(U,N,j,B)),K=X(U=>zr(U,N,j,B)),I=W,z=Vr(),R=(r=a??F)!==null&&r!==void 0?r:!1,[V,H]=xn([I,R]),G=N==="axis"?M:void 0;Zr(N,j,K,G,_,R);var Y=x??z;if(Y==null||T==null||N==null)return null;var q=I??It;R||(q=It),y&&q.length&&(q=jn(q.filter(U=>U.value!=null&&(U.hide!==!0||n.includeHidden)),d,ci));var $=q.length>0,w=Mt(Mt({},n),{},{payload:q,label:G,active:R,activeIndex:_,coordinate:K,accessibilityLayer:E}),k=S.createElement(_n,{allowEscapeViewBox:l,animationDuration:o,animationEasing:u,isAnimationActive:f,active:R,coordinate:K,hasPayload:$,offset:i,position:b,reverseDirection:g,useTranslate3d:p,viewBox:T,wrapperStyle:v,lastBoundingBox:V,innerRef:H,hasPortalFromProps:!!x},ui(m,w));return S.createElement(S.Fragment,null,$t.createPortal(k,Y),R&&S.createElement(ai,{cursor:c,tooltipEventType:N,coordinate:K,payload:q,index:_}))}const Ye=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),Rt=["B","KB","MB","GB","TB","PB"];function Gt(t){if(t<=0)return"0 B";const e=Math.min(Rt.length-1,Math.floor(Math.log(t)/Math.log(1024))),r=t/1024**e;return`${r.toFixed(r>=100||e===0?0:1)} ${Rt[e]}`}const Fe=50,gi="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",mi=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function Yt(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function Xe(t){return Yt(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function yi(){const t=new Date;return Array.from({length:12},(e,r)=>{const n=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-r,1));return{value:n.toISOString().slice(0,10),label:n.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function pi(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function Lt(t){const e=Z.c(30),{usage:r,metric:n,colorNum:a,formatValue:l,height:o}=t,u=`var(--chart-${a})`,m=`infra-billing-${n}`;let y;e[0]!==r?(y=r.map(bi),e[0]=r,e[1]=y):y=e[1];const f=y;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i={left:0,right:4,top:8,bottom:0},e[2]=i):i=e[2];let d,b;e[3]!==u?(d=s.jsx("stop",{offset:"0%",stopColor:u,stopOpacity:.25}),b=s.jsx("stop",{offset:"100%",stopColor:u,stopOpacity:0}),e[3]=u,e[4]=d,e[5]=b):(d=e[4],b=e[5]);let g;e[6]!==m||e[7]!==d||e[8]!==b?(g=s.jsx("defs",{children:s.jsxs("linearGradient",{id:m,x1:"0",y1:"0",x2:"0",y2:"1",children:[d,b]})}),e[6]=m,e[7]=d,e[8]=b,e[9]=g):g=e[9];let p;e[10]!==l||e[11]!==o?(p=o>100&&s.jsxs(s.Fragment,{children:[s.jsx(fr,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(dr,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(gr,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:l,width:68})]}),e[10]=l,e[11]=o,e[12]=p):p=e[12];let v,c;e[13]===Symbol.for("react.memo_cache_sentinel")?(v={stroke:"var(--border)",strokeDasharray:"4 4"},c={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=v,e[14]=c):(v=e[13],c=e[14]);let h;e[15]!==l?(h=s.jsx(di,{cursor:v,contentStyle:c,formatter:A=>l(Number(A)||0)}),e[15]=l,e[16]=h):h=e[16];const j=`url(#${m})`;let O;e[17]!==u||e[18]!==n||e[19]!==j?(O=s.jsx(Hr,{type:"linear",dataKey:n,stroke:u,strokeWidth:2,fill:j,dot:!1}),e[17]=u,e[18]=n,e[19]=j,e[20]=O):O=e[20];let x;e[21]!==f||e[22]!==O||e[23]!==g||e[24]!==p||e[25]!==h?(x=s.jsxs($r,{data:f,margin:i,children:[g,p,h,O]}),e[21]=f,e[22]=O,e[23]=g,e[24]=p,e[25]=h,e[26]=x):x=e[26];let P;return e[27]!==o||e[28]!==x?(P=s.jsx(Gr,{width:"100%",height:o,children:x}),e[27]=o,e[28]=x,e[29]=P):P=e[29],P}function bi(t){return{...t,label:pi(t.date)}}function ce(t,e){return t.reduce((r,n)=>r+n[e],0)}function hi(){const t=Z.c(39),e=de(),{sites:r,isLoading:n}=Qt(),[a,l]=S.useState(null),o=yi(),[u,m]=S.useState(o[0].value);let y;t[0]!==a||t[1]!==r?(y=a??r.slice(0,Fe),t[0]=a,t[1]=r,t[2]=y):y=t[2];const f=y,i=!a&&r.length>Fe,{data:d,isLoading:b}=Ct(f,u),g=_t();if(n){let w;return t[3]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ae,{className:"h-64 w-full"}),t[3]=w):w=t[3],w}if(r.length===0){let w;t[4]!==e?(w=e("settings.infraBilling.noSites"),t[4]=e,t[5]=w):w=t[5];let k;return t[6]!==w?(k=s.jsx(L,{className:"p-6 text-sm text-muted-foreground",children:w}),t[6]=w,t[7]=k):k=t[7],k}const p=d?.usage??[],v=d?.pageviewsAvailable??!1,c=!!d&&!d.usageUnavailable,h=(w,k)=>c?k(ce(p,w)):"—",j=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:v&&c?Ye.format(ce(p,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:h("requests",wi)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:h("dataTransferBytes",Gt)}],O=xi;let x;t[8]!==d?.teams?(x=d?.teams??[],t[8]=d?.teams,t[9]=x):x=t[9];const P=x;let A;t[10]!==d?.siteSlugsWithoutTeam?(A=d?.siteSlugsWithoutTeam??[],t[10]=d?.siteSlugsWithoutTeam,t[11]=A):A=t[11];const B=A,T=P.length===1?P[0]:void 0,E=T?.billing??null,N=P.length+(B.length>0?1:0)>1,_=ce(p,"pageviews"),F=_>0?ce(p,"requests")/_:0,W=v&&c&&_>0?F.toFixed(F<10?1:0):"—";let M;t[12]!==d?.billingUnavailable||t[13]!==T||t[14]!==e||t[15]!==P.length?(M=d?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):P.length>1?e("settings.infraBilling.multipleTeams",{count:String(P.length)}):T?Xt(T,e):e("settings.infraBilling.noTeam"),t[12]=d?.billingUnavailable,t[13]=T,t[14]=e,t[15]=P.length,t[16]=M):M=t[16];const K=M;let I;t[17]!==r?(I=r.map(ji),t[17]=r,t[18]=I):I=t[18];let z;t[19]!==e?(z=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=z):z=t[20];let R;t[21]!==f||t[22]!==I||t[23]!==z?(R=s.jsx(rr,{className:"w-auto min-w-56 max-w-full",options:I,defaultValue:f,maxCount:2,placeholder:z,onValueChange:l}),t[21]=f,t[22]=I,t[23]=z,t[24]=R):R=t[24];let V;t[25]!==e?(V=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=V):V=t[26];let H;t[27]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(sr,{}),t[27]=H):H=t[27];let G;t[28]!==V?(G=s.jsx(or,{className:"w-48","aria-label":V,children:H}),t[28]=V,t[29]=G):G=t[29];let Y;t[30]!==f.length||t[31]!==e?(Y=f.length===0&&s.jsx(L,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=f.length,t[31]=e,t[32]=Y):Y=t[32];let q;t[33]!==e||t[34]!==i?(q=i&&s.jsx(L,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(Fe)})}),t[33]=e,t[34]=i,t[35]=q):q=t[35];let $;return t[36]!==d?.usageUnavailable||t[37]!==e?($=d?.usageUnavailable&&s.jsx(L,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=d?.usageUnavailable,t[37]=e,t[38]=$):$=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[R,s.jsxs(nr,{value:u,onValueChange:m,children:[G,s.jsx(ir,{children:o.map(vi)})]})]}),Y,q,$,f.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(ge,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(L,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(tr,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),T&&E?.canManageSubscription&&s.jsx(Ze,{variant:"outline",size:"sm",disabled:g.isPending,onClick:()=>g.mutate(T.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[E?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),b?s.jsx(ae,{className:"h-5 w-16"}):s.jsx(C,{variant:E.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${E.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:E.nextBillingDate?Xe(E.nextBillingDate):"—"})]})]}):!b&&s.jsx("p",{className:"text-xs text-muted-foreground",children:K}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:W})]})]})]}),j.map(w=>s.jsxs(L,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:w.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:o.find(k=>k.value===u)?.label})]}),b?s.jsx(ae,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:w.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(Lt,{usage:p,metric:w.key,colorNum:w.colorNum,formatValue:O(w.key),height:64})})]},w.key))]})}),s.jsx(ge,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:j.map(w=>s.jsxs(L,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:w.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:w.description})]}),s.jsx(Lt,{usage:p,metric:w.key,colorNum:w.colorNum,formatValue:O(w.key),height:220})]},w.key))})}),s.jsx(ge,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:d?d.billingUnavailable?s.jsx(L,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[P.map(w=>s.jsx(Oi,{team:w,showSites:N},w.siteSlugs.join(","))),B.length>0&&s.jsxs(L,{className:"flex flex-col gap-1 p-4",children:[N&&s.jsx("span",{className:"text-sm font-medium",children:B.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(L,{size:"flush",children:s.jsx(ae,{className:"m-4 h-24"})})})})]})]})}function vi(t){return s.jsx(ar,{value:t.value,children:t.label},t.value)}function ji(t){return{label:t,value:t}}function xi(t){return t==="dataTransferBytes"?Gt:Si}function Si(t){return Ye.format(t)}function wi(t){return Ye.format(t)}function Xt(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Oi(t){const e=Z.c(13),{team:r,showSites:n}=t,a=de(),l=_t(),o=r.billing;let u;e[0]!==o||e[1]!==l||e[2]!==n||e[3]!==a||e[4]!==r.siteSlugs?(u=n&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:r.siteSlugs.join(", ")}),o&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(C,{variant:o.planType==="free"?"secondary":"success",children:a(`settings.infraBilling.plan.${o.planType}`)}),o.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:a("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:Xe(o.nextBillingDate)})]}),o.canManageSubscription&&s.jsx(Ze,{variant:"outline",size:"sm",disabled:l.isPending,onClick:()=>l.mutate(r.siteSlugs),children:a("settings.infraBilling.manageButton")})]})]}),e[0]=o,e[1]=l,e[2]=n,e[3]=a,e[4]=r.siteSlugs,e[5]=u):u=e[5];let m;e[6]!==o||e[7]!==a||e[8]!==r?(m=o?o.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:a("settings.infraBilling.noInvoices")}):s.jsx(Pi,{invoices:o.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:Xt(r,a)}),e[6]=o,e[7]=a,e[8]=r,e[9]=m):m=e[9];let y;return e[10]!==u||e[11]!==m?(y=s.jsxs(L,{size:"flush",className:"gap-0 overflow-x-auto",children:[u,m]}),e[10]=u,e[11]=m,e[12]=y):y=e[12],y}function Pi(t){const e=Z.c(40),{invoices:r}=t,n=de();let a;e[0]!==r?(a=r.some(Bi),e[0]=r,e[1]=a):a=e[1];const l=a;let o;e[2]!==n?(o=n("settings.infraBilling.invoiceReference"),e[2]=n,e[3]=o):o=e[3];let u;e[4]!==o?(u=s.jsx(ee,{children:o}),e[4]=o,e[5]=u):u=e[5];let m;e[6]!==n?(m=n("settings.infraBilling.invoiceDue"),e[6]=n,e[7]=m):m=e[7];let y;e[8]!==m?(y=s.jsx(ee,{children:m}),e[8]=m,e[9]=y):y=e[9];let f;e[10]!==n?(f=n("settings.infraBilling.invoiceAmount"),e[10]=n,e[11]=f):f=e[11];let i;e[12]!==f?(i=s.jsx(ee,{children:f}),e[12]=f,e[13]=i):i=e[13];let d;e[14]!==n?(d=n("settings.infraBilling.invoiceStatus"),e[14]=n,e[15]=d):d=e[15];let b;e[16]!==d?(b=s.jsx(ee,{children:d}),e[16]=d,e[17]=b):b=e[17];let g;e[18]!==n?(g=n("settings.infraBilling.invoiceDocuments"),e[18]=n,e[19]=g):g=e[19];let p;e[20]!==g?(p=s.jsx(ee,{children:g}),e[20]=g,e[21]=p):p=e[21];let v;e[22]!==p||e[23]!==u||e[24]!==y||e[25]!==i||e[26]!==b?(v=s.jsx(lr,{children:s.jsxs($e,{children:[u,y,i,b,p]})}),e[22]=p,e[23]=u,e[24]=y,e[25]=i,e[26]=b,e[27]=v):v=e[27];let c;if(e[28]!==r||e[29]!==n||e[30]!==l){let O;e[32]!==n||e[33]!==l?(O=x=>s.jsxs($e,{children:[s.jsx(te,{children:x.referenceMonth?Yt(x.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(te,{children:x.dueDate?Xe(x.dueDate):"—"}),s.jsx(te,{className:"tabular-nums",children:mi.format(x.value)}),s.jsx(te,{children:s.jsx(Ai,{status:x.status})}),s.jsxs(te,{className:"flex gap-2",children:[x.nfUrl&&s.jsx(We,{href:x.nfUrl,label:n("settings.infraBilling.invoiceNf")}),x.bankSlipUrl&&s.jsx(We,{href:x.bankSlipUrl,label:n("settings.infraBilling.invoiceBankSlip")}),!x.bankSlipUrl&&!l&&x.nfUrl&&s.jsx(We,{href:gi,label:n("settings.infraBilling.invoiceBankTransfer")}),!x.nfUrl&&!x.bankSlipUrl&&"—"]})]},x.id),e[32]=n,e[33]=l,e[34]=O):O=e[34],c=r.map(O),e[28]=r,e[29]=n,e[30]=l,e[31]=c}else c=e[31];let h;e[35]!==c?(h=s.jsx(cr,{children:c}),e[35]=c,e[36]=h):h=e[36];let j;return e[37]!==v||e[38]!==h?(j=s.jsxs(ur,{children:[v,h]}),e[37]=v,e[38]=h,e[39]=j):j=e[39],j}function Bi(t){return!!t.bankSlipUrl}function We(t){const e=Z.c(4),{href:r,label:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(er,{size:14}),e[0]=a):a=e[0];let l;return e[1]!==r||e[2]!==n?(l=s.jsx(Ze,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",children:[a,n]})}),e[1]=r,e[2]=n,e[3]=l):l=e[3],l}function Ai(t){const e=Z.c(14),{status:r}=t,n=de(),a=r.toLowerCase();if(a==="paid"){let o;e[0]!==n?(o=n("settings.infraBilling.statusPaid"),e[0]=n,e[1]=o):o=e[1];let u;return e[2]!==o?(u=s.jsx(C,{variant:"success",children:o}),e[2]=o,e[3]=u):u=e[3],u}if(a==="overdue"){let o;e[4]!==n?(o=n("settings.infraBilling.statusOverdue"),e[4]=n,e[5]=o):o=e[5];let u;return e[6]!==o?(u=s.jsx(C,{variant:"destructive",children:o}),e[6]=o,e[7]=u):u=e[7],u}if(a==="registered"){let o;e[8]!==n?(o=n("settings.infraBilling.statusPending"),e[8]=n,e[9]=o):o=e[9];let u;return e[10]!==o?(u=s.jsx(C,{variant:"warning",children:o}),e[10]=o,e[11]=u):u=e[11],u}let l;return e[12]!==r?(l=s.jsx(C,{variant:"secondary",children:r}),e[12]=r,e[13]=l):l=e[13],l}function Ti(){const t=Z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Jt,{group:"billing",children:s.jsx(hi,{})}),t[0]=e):e=t[0],e}function Qi(){const t=Z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Jr,{capability:"members:manage",area:"billing",children:s.jsx(Ti,{})}),t[0]=e):e=t[0],e}export{Qi as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as v,Y as t,j as p,N as m,ac as c,f as y,u as I,ab as E,fe as k,ff as b,fg as R,fh as S}from"./index-DcU2uHG-.js";import{b as L}from"./thread-route-DsRsjMOv.js";function P(d){const a=v.c(81),{target:h}=d,{route:s,search:r}=h;switch(s.to){case c.home:{let e;return a[0]!==s.params||a[1]!==r?(e=p.jsx(m,{to:c.home,params:s.params,search:r,hash:!0,replace:!0}),a[0]=s.params,a[1]=r,a[2]=e):e=a[2],e}case c.tasks:{let e;return a[3]!==s.params||a[4]!==r?(e=p.jsx(m,{to:c.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[3]=s.params,a[4]=r,a[5]=e):e=a[5],e}case c.reports:{let e;return a[6]!==s.params||a[7]!==r?(e=p.jsx(m,{to:c.reports,params:s.params,search:r,hash:!0,replace:!0}),a[6]=s.params,a[7]=r,a[8]=e):e=a[8],e}case c.discover:{let e;return a[9]!==s.params||a[10]!==r?(e=p.jsx(m,{to:c.discover,params:s.params,search:r,hash:!0,replace:!0}),a[9]=s.params,a[10]=r,a[11]=e):e=a[11],e}case c.library:{let e;return a[12]!==s.params||a[13]!==r?(e=p.jsx(m,{to:c.library,params:s.params,search:r,hash:!0,replace:!0}),a[12]=s.params,a[13]=r,a[14]=e):e=a[14],e}case t.root:{let e;return a[15]!==s.params||a[16]!==r?(e=p.jsx(m,{to:t.root,params:s.params,search:r,hash:!0,replace:!0}),a[15]=s.params,a[16]=r,a[17]=e):e=a[17],e}case t.tasks:{let e;return a[18]!==s.params||a[19]!==r?(e=p.jsx(m,{to:t.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[18]=s.params,a[19]=r,a[20]=e):e=a[20],e}case t.reports:{let e;return a[21]!==s.params||a[22]!==r?(e=p.jsx(m,{to:t.reports,params:s.params,search:r,hash:!0,replace:!0}),a[21]=s.params,a[22]=r,a[23]=e):e=a[23],e}case t.siteEditor:{let e;return a[24]!==s.params||a[25]!==r?(e=p.jsx(m,{to:t.siteEditor,params:s.params,search:r,hash:!0,replace:!0}),a[24]=s.params,a[25]=r,a[26]=e):e=a[26],e}case t.siteEditorContent:{let e;return a[27]!==s.params||a[28]!==r?(e=p.jsx(m,{to:t.siteEditorContent,params:s.params,search:r,hash:!0,replace:!0}),a[27]=s.params,a[28]=r,a[29]=e):e=a[29],e}case t.siteEditorCode:{let e;return a[30]!==s.params||a[31]!==r?(e=p.jsx(m,{to:t.siteEditorCode,params:s.params,search:r,hash:!0,replace:!0}),a[30]=s.params,a[31]=r,a[32]=e):e=a[32],e}case t.settings:{let e;return a[33]!==s.params||a[34]!==r?(e=p.jsx(m,{to:t.settings,params:s.params,search:r,hash:!0,replace:!0}),a[33]=s.params,a[34]=r,a[35]=e):e=a[35],e}case t.assets:{let e;return a[36]!==s.params||a[37]!==r?(e=p.jsx(m,{to:t.assets,params:s.params,search:r,hash:!0,replace:!0}),a[36]=s.params,a[37]=r,a[38]=e):e=a[38],e}case t.releases:{let e;return a[39]!==s.params||a[40]!==r?(e=p.jsx(m,{to:t.releases,params:s.params,search:r,hash:!0,replace:!0}),a[39]=s.params,a[40]=r,a[41]=e):e=a[41],e}case t.hosting:{let e;return a[42]!==s.params||a[43]!==r?(e=p.jsx(m,{to:t.hosting,params:s.params,search:r,hash:!0,replace:!0}),a[42]=s.params,a[43]=r,a[44]=e):e=a[44],e}case t.e2e:{let e;return a[45]!==s.params||a[46]!==r?(e=p.jsx(m,{to:t.e2e,params:s.params,search:r,hash:!0,replace:!0}),a[45]=s.params,a[46]=r,a[47]=e):e=a[47],e}case t.analytics:{let e;return a[48]!==s.params||a[49]!==r?(e=p.jsx(m,{to:t.analytics,params:s.params,search:r,hash:!0,replace:!0}),a[48]=s.params,a[49]=r,a[50]=e):e=a[50],e}case t.experiments:{let e;return a[51]!==s.params||a[52]!==r?(e=p.jsx(m,{to:t.experiments,params:s.params,search:r,hash:!0,replace:!0}),a[51]=s.params,a[52]=r,a[53]=e):e=a[53],e}case t.monitor:{let e;return a[54]!==s.params||a[55]!==r?(e=p.jsx(m,{to:t.monitor,params:s.params,search:r,hash:!0,replace:!0}),a[54]=s.params,a[55]=r,a[56]=e):e=a[56],e}case t.automations:{let e;return a[57]!==s.params||a[58]!==r?(e=p.jsx(m,{to:t.automations,params:s.params,search:r,hash:!0,replace:!0}),a[57]=s.params,a[58]=r,a[59]=e):e=a[59],e}case t.automation:{let e;return a[60]!==s.params||a[61]!==r?(e=p.jsx(m,{to:t.automation,params:s.params,search:r,hash:!0,replace:!0}),a[60]=s.params,a[61]=r,a[62]=e):e=a[62],e}case t.app:{let e;return a[63]!==s.params||a[64]!==r?(e=p.jsx(m,{to:t.app,params:s.params,search:r,hash:!0,replace:!0}),a[63]=s.params,a[64]=r,a[65]=e):e=a[65],e}case t.view:{let e;return a[66]!==s.params||a[67]!==r?(e=p.jsx(m,{to:t.view,params:s.params,search:r,hash:!0,replace:!0}),a[66]=s.params,a[67]=r,a[68]=e):e=a[68],e}case t.outputFile:{let e;return a[69]!==s.params||a[70]!==r?(e=p.jsx(m,{to:t.outputFile,params:s.params,search:r,hash:!0,replace:!0}),a[69]=s.params,a[70]=r,a[71]=e):e=a[71],e}case t.outputDeck:{let e;return a[72]!==s.params||a[73]!==r?(e=p.jsx(m,{to:t.outputDeck,params:s.params,search:r,hash:!0,replace:!0}),a[72]=s.params,a[73]=r,a[74]=e):e=a[74],e}case t.libraryFile:{let e;return a[75]!==s.params||a[76]!==r?(e=p.jsx(m,{to:t.libraryFile,params:s.params,search:r,hash:!0,replace:!0}),a[75]=s.params,a[76]=r,a[77]=e):e=a[77],e}case t.connectSources:{let e;return a[78]!==s.params||a[79]!==r?(e=p.jsx(m,{to:t.connectSources,params:s.params,search:r,hash:!0,replace:!0}),a[78]=s.params,a[79]=r,a[80]=e):e=a[80],e}}}function A(d){const a=v.c(17),{children:h}=d;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const r=y(s);let e;a[1]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},a[1]=e):e=a[1];const u=I(e),j=L(),g=E(),i=r.org;if(!i||r.taskId!==void 0||r._splat!==void 0)return h??null;let n,f;a[2]!==j||a[3]!==g||a[4]!==i||a[5]!==r.agentId||a[6]!==u?(n=k({agentIdParam:r.agentId,virtualMcpIdSearch:u.virtualmcpid,fallbackAgentId:j}),f=(u.main!==void 0?b({org:i,agentId:n,main:u.main,search:u}):null)??R({org:i,routePath:g,search:u}),a[2]=j,a[3]=g,a[4]=i,a[5]=r.agentId,a[6]=u,a[7]=n,a[8]=f):(n=a[7],f=a[8]);const o=f;if(o?.kind==="same-route"){let l;return a[9]!==o.search?(l=p.jsx(m,{to:".",search:o.search,hash:!0,replace:!0}),a[9]=o.search,a[10]=l):l=a[10],l}if(o?.kind==="canonical"){let l;return a[11]!==o?(l=p.jsx(P,{target:o}),a[11]=o,a[12]=l):l=a[12],l}if(r.agentId!==void 0&&r.agentId===n&&u.virtualmcpid!==void 0){let l;a[13]!==u?(l=S(u),a[13]=u,a[14]=l):l=a[14];let x;return a[15]!==l?(x=p.jsx(m,{to:".",search:l,hash:!0,replace:!0}),a[15]=l,a[16]=x):x=a[16],x}return h??null}export{P as L,A as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as A,d as U,u as q,aa as z,j as m,n as D}from"./index-DcU2uHG-.js";import{l as G,b as J,H as K}from"./location-V0VwTJTt.js";import{u as Q}from"./use-mobile-BfmJV4wy.js";import{u as V,C as B}from"./index-CXeJCI0G.js";import{C as E,o as W,a as X,L as H}from"./context-shell-BsFUt-ob.js";import{L as R}from"./preview-panel-BPPH_1cI.js";import"./use-sidebar-collapsed-BqLmDXCH.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./thread-route-DsRsjMOv.js";import"./use-panel-navigate-K8ACrPML.js";import"./use-project-scope-CGMALc0e.js";import"./repository-binding-B-JblZ3B.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./thread-intent-DlbBEzNn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-c0hRUHIU.js";import"./AlertCircle-xI8XX-bi.js";import"./Tool01-BGL2Qt57.js";import"./ArrowUp-Cq3iZIwL.js";import"./ArrowLeft-BKYzlDQY.js";import"./LinkBroken01-ZRquEJUl.js";import"./ShoppingBag01-DAjyOiiw.js";import"./ZoomOut-B55seUHX.js";import"./Building02-C9KWPxlH.js";import"./CheckCircle-D30wPP6A.js";import"./ChevronUp-CFN68hLk.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./UserSquare-DJngEPjS.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Image01-DowwsvYG.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Monitor01-DMME8GIo.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Plus-xabrshQG.js";import"./SearchMd-BODiv7c9.js";import"./Trash01-Cf6bGuCZ.js";import"./Upload01-ZLE7vfB9.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./XClose-CdzjyNb0.js";import"./tooltip-BqHx2R4U.js";import"./index-WjQsIrkp.js";import"./toolbar-icon-button-CTGjpqPD.js";import"./shell-layout-DNfiem0_.js";import"./avatar-CVrfZDpI.js";import"./use-clock-tick-CbuQEbGd.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./integration-icon-aeIvRSnw.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./label-DDPD5LQh.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./use-debounced-value-CDunmz6Z.js";import"./use-organization-settings-DFkNTsS0.js";import"./required-auth-layout-n4GqwjUS.js";import"./autosend-BiXCzDoT.js";import"./use-org-sso-ClJ8vn5f.js";import"./sheet-R9Pr50Sb.js";import"./resizable-B1jyEV0m.js";import"./icon-button-Dg2jSe-y.js";import"./search-input-C77c23a_.js";import"./search-toggle-BqUvwbnO.js";import"./alert-dialog-M8Y0zqSA.js";import"./chat-context-BnuwMOfj.js";import"./use-decopilot-events-TumByBkr.js";import"./use-ai-providers-DugUJNG4.js";import"./use-org-fs-D82Vx4hB.js";import"./use-org-repo-syncs-CD8TZnkH.js";import"./textarea-BDWvYouR.js";import"./markdown-1PeXOKNt.js";import"./use-copy-K9rQ1PJH.js";import"./file-share-button-BIOHr9Xv.js";import"./popover-CVCbWisj.js";import"./preview-dialog-Fls4giAH.js";import"./preview-content-Bin2hNFJ.js";import"./file-preview-BFXgyqHl.js";import"./utils-Bp3fKbm9.js";import"./editor-DWhRi1_f.js";import"./file-type-icon-Ez8-DRHg.js";import"./folder-icon-JgTmBbpC.js";import"./empty-state-BoFIIv2e.js";import"./toggle-group-CtPF-F41.js";import"./active-indicator-CCMhAsc_.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./table-DuCeyVXY.js";import"./use-members-CzSQTDAS.js";import"./use-org-auth-client-fPRUht_a.js";import"./require-capability-fF33BjRE.js";import"./access-gate-CgSSvGG3.js";import"./capability-load-error-CaA022rx.js";import"./sections-uFSvOb1s.js";import"./empty-state-B1xpK558.js";function ee(){const t=A.c(58),N=U();let v;t[0]===Symbol.for("react.memo_cache_sentinel")?(v={strict:!1},t[0]=v):v=t[0];const{preview:i,expanded:k,section:O}=q(v),b=z();let C;t[1]!==O?(C=W(O),t[1]=O,t[2]=C):C=t[2];const l=C;let y;t[3]!==N?(y=e=>N({to:".",search:r=>({...r,...e.path!==void 0&&{path:e.path},preview:e.preview,expanded:e.expanded})}),t[3]=N,t[4]=y):y=t[4];const o=y;let g;t[5]!==o?(g=()=>o({}),t[5]=o,t[6]=g):g=t[6];const p=g,F=Q(),w=V().threadOpen&&!F;if(b&&l!=="files"){let e;t[7]!==l?(e=m.jsx(X,{section:l}),t[7]=l,t[8]=e):e=t[8];let r;return t[9]!==l||t[10]!==e?(r=m.jsx(B.Content,{children:m.jsx(E,{section:l,children:e})}),t[9]=l,t[10]=e,t[11]=r):r=t[11],r}if(i&&(k||w)){let e,r,f,s,c;if(t[12]!==p||t[13]!==i||t[14]!==o){let T;t[20]!==i?(T=i.lastIndexOf("/"),t[20]=i,t[21]=T):T=t[21];const I=i.slice(0,Math.max(T,0));r=B.Content,e=D.Breadcrumbs,f="page",t[22]!==p?(s={onSelect:p},t[22]=p,t[23]=s):s=t[23];let L;t[24]!==o?(L=_=>({key:`folder:${_.path}`,label:_.label,onSelect:()=>o({path:_.path})}),t[24]=o,t[25]=L):L=t[25];const $=G(I,K).map(L);let j;t[26]!==i?(j=J(i),t[26]=i,t[27]=j):j=t[27];let M;t[28]!==j?(M={key:"file",label:j},t[28]=j,t[29]=M):M=t[29],c=[...$,M],t[12]=p,t[13]=i,t[14]=o,t[15]=e,t[16]=r,t[17]=f,t[18]=s,t[19]=c}else e=t[15],r=t[16],f=t[17],s=t[18],c=t[19];let d;t[30]!==e||t[31]!==f||t[32]!==s||t[33]!==c?(d=m.jsx(e,{after:f,parent:s,items:c}),t[30]=e,t[31]=f,t[32]=s,t[33]=c,t[34]=d):d=t[34];let x;t[35]!==w||t[36]!==i||t[37]!==o?(x=w?void 0:()=>o({preview:i}),t[35]=w,t[36]=i,t[37]=o,t[38]=x):x=t[38];let h;t[39]!==x?(h={expanded:!0,onToggle:x},t[39]=x,t[40]=h):h=t[40];let u;t[41]!==p||t[42]!==i||t[43]!==h?(u=m.jsx(R,{previewPath:i,onClose:p,expand:h},i),t[41]=p,t[42]=i,t[43]=h,t[44]=u):u=t[44];let S;return t[45]!==r||t[46]!==u||t[47]!==d?(S=m.jsxs(r,{children:[d,u]}),t[45]=r,t[46]=u,t[47]=d,t[48]=S):S=t[48],S}let a;t[49]!==p||t[50]!==i||t[51]!==o?(a=i&&m.jsx(R,{variant:"aside",previewPath:i,onClose:p,expand:{expanded:!1,onToggle:()=>o({preview:i,expanded:!0})}},i),t[49]=p,t[50]=i,t[51]=o,t[52]=a):a=t[52];let n;t[53]!==b?(n=b?m.jsx(E,{section:"files",children:m.jsx(H,{filePreview:"side",context:!0})}):m.jsx(H,{filePreview:"side"}),t[53]=b,t[54]=n):n=t[54];let P;return t[55]!==a||t[56]!==n?(P=m.jsx(B.Content,{aside:a,children:n}),t[55]=a,t[56]=n,t[57]=P):P=t[57],P}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as i,j as r}from"./index-DcU2uHG-.js";import{C as m}from"./index-CXeJCI0G.js";import{C as p}from"./coming-soon-page-CycWyIEs.js";import"./use-mobile-BfmJV4wy.js";import"./use-sidebar-collapsed-BqLmDXCH.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./thread-route-DsRsjMOv.js";import"./use-panel-navigate-K8ACrPML.js";import"./use-project-scope-CGMALc0e.js";import"./repository-binding-B-JblZ3B.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./thread-intent-DlbBEzNn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-c0hRUHIU.js";import"./AlertCircle-xI8XX-bi.js";import"./Tool01-BGL2Qt57.js";import"./ArrowUp-Cq3iZIwL.js";import"./ArrowLeft-BKYzlDQY.js";import"./LinkBroken01-ZRquEJUl.js";import"./ShoppingBag01-DAjyOiiw.js";import"./ZoomOut-B55seUHX.js";import"./Building02-C9KWPxlH.js";import"./CheckCircle-D30wPP6A.js";import"./ChevronUp-CFN68hLk.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./UserSquare-DJngEPjS.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Image01-DowwsvYG.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Monitor01-DMME8GIo.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Plus-xabrshQG.js";import"./SearchMd-BODiv7c9.js";import"./Trash01-Cf6bGuCZ.js";import"./Upload01-ZLE7vfB9.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./XClose-CdzjyNb0.js";import"./tooltip-BqHx2R4U.js";import"./index-WjQsIrkp.js";import"./toolbar-icon-button-CTGjpqPD.js";import"./shell-layout-DNfiem0_.js";import"./avatar-CVrfZDpI.js";import"./use-clock-tick-CbuQEbGd.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./integration-icon-aeIvRSnw.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./label-DDPD5LQh.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./use-debounced-value-CDunmz6Z.js";import"./use-organization-settings-DFkNTsS0.js";import"./required-auth-layout-n4GqwjUS.js";import"./autosend-BiXCzDoT.js";import"./use-org-sso-ClJ8vn5f.js";import"./sheet-R9Pr50Sb.js";import"./resizable-B1jyEV0m.js";import"./badge-ByzdbptS.js";function $o(){const t=i.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(m.Content,{children:r.jsx(p,{kind:"monitor"})}),t[0]=o):o=t[0],o}export{$o as default};
|