decocms 4.345.0 → 4.345.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-piOaFPQJ.js → AlertCircle-D5wzOxIg.js} +1 -1
- package/dist/client/assets/{AreaChart-C754kxxt.js → AreaChart-B7-Obnq_.js} +1 -1
- package/dist/client/assets/{ArrowLeft-EySzpaMt.js → ArrowLeft-Beb7uT2a.js} +1 -1
- package/dist/client/assets/{ArrowRight-CN1prjjJ.js → ArrowRight-Du9XgC-I.js} +1 -1
- package/dist/client/assets/{ArrowUp-39D5k7I2.js → ArrowUp-_u4Yru0Q.js} +1 -1
- package/dist/client/assets/{Check-CmgBwUGv.js → Check-Bqh0edDs.js} +1 -1
- package/dist/client/assets/{CheckCircle-CwJqWx0e.js → CheckCircle-P3KELI_n.js} +1 -1
- package/dist/client/assets/{ChevronRight-Dk9nR_C7.js → ChevronRight-DyhM_Luf.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-X68ci9mX.js → ChevronSelectorVertical-S2WVRFJv.js} +1 -1
- package/dist/client/assets/{ChevronUp-DLLvYK07.js → ChevronUp-CGseLBwf.js} +1 -1
- package/dist/client/assets/{Copy01-DlxhdgMn.js → Copy01-CQ5n9k6R.js} +1 -1
- package/dist/client/assets/{CreditCard01-CGG5tsm6.js → CreditCard01-DQ2UyAUW.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bk31Y8qH.js → DotsVertical-CXA4FBF-.js} +1 -1
- package/dist/client/assets/{Download01-CxTJDArl.js → Download01-EHABWuSq.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DAIYWYhf.js → ErrorBarContext-DtNUqfSS.js} +1 -1
- package/dist/client/assets/{Eye-UEYlbIHb.js → Eye-4ikW46Xl.js} +1 -1
- package/dist/client/assets/{GitBranch01-DRT2X7Dj.js → GitBranch01-rChCKXuD.js} +1 -1
- package/dist/client/assets/{Globe01-Z6BbST4r.js → Globe01-DQGNcxVn.js} +1 -1
- package/dist/client/assets/{HardDrive--vlQvWpi.js → HardDrive-CALvWP4_.js} +1 -1
- package/dist/client/assets/{Image01-rCxXluf6.js → Image01-BrxwhCeX.js} +1 -1
- package/dist/client/assets/{Key01-By90Yq6k.js → Key01-D_IxGQOL.js} +1 -1
- package/dist/client/assets/{Link01-CUe3c6G0.js → Link01-DvvkHs6T.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D2pSy7v4.js → LinkExternal01-B4pNNDj3.js} +1 -1
- package/dist/client/assets/{Monitor01-CY2DbFkD.js → Monitor01-Cb0G367h.js} +1 -1
- package/dist/client/assets/{Package-Bb4KYw9O.js → Package-Bfk8OrRH.js} +1 -1
- package/dist/client/assets/{Palette-o-NEtwsW.js → Palette-B6tq__pc.js} +1 -1
- package/dist/client/assets/{Play-DpmIDjD8.js → Play-BKI4FgKL.js} +1 -1
- package/dist/client/assets/{Plus-CgVmxzR4.js → Plus-BZSUkwsF.js} +1 -1
- package/dist/client/assets/{SearchMd-Cjr4mqh9.js → SearchMd-CC2qYhKq.js} +1 -1
- package/dist/client/assets/{Sector-3UpSGQVE.js → Sector-D-zqGwr9.js} +1 -1
- package/dist/client/assets/{Settings02-Dss_LnvC.js → Settings02-3O7I-4oK.js} +1 -1
- package/dist/client/assets/{Share07-CgTNZ1dk.js → Share07-B043tEsF.js} +1 -1
- package/dist/client/assets/{Shield01-CNbrlPDI.js → Shield01-DSyesTES.js} +1 -1
- package/dist/client/assets/{Stars01-Dno5l14o.js → Stars01-D0DXnyE9.js} +1 -1
- package/dist/client/assets/{Sun-DAVD-A5B.js → Sun-BUQJT4KF.js} +1 -1
- package/dist/client/assets/{Tool01-DdmZi7j_.js → Tool01-CgvePMtM.js} +1 -1
- package/dist/client/assets/{Tool02-KStnzngn.js → Tool02-_HC8oqfU.js} +1 -1
- package/dist/client/assets/{Trash01-BevWobXU.js → Trash01-DCX9ydiU.js} +1 -1
- package/dist/client/assets/{TrendUp01-NTK3Zf_M.js → TrendUp01-DhL5-hJo.js} +1 -1
- package/dist/client/assets/{Upload01-By19QANP.js → Upload01-CNkQbAmi.js} +1 -1
- package/dist/client/assets/{User01-CDRv3_oY.js → User01-cnJUdVWa.js} +1 -1
- package/dist/client/assets/{UserSquare-l4Q5fPEZ.js → UserSquare-CpUQtm07.js} +1 -1
- package/dist/client/assets/{Users01-sAr72jTU.js → Users01-CPNdhBFx.js} +1 -1
- package/dist/client/assets/{Users03-CrZajyAo.js → Users03-BZkJWCNu.js} +1 -1
- package/dist/client/assets/{XCircle-BTj4-tdv.js → XCircle-4con0UUu.js} +1 -1
- package/dist/client/assets/{XClose-C-bbcgCJ.js → XClose-C2dpX0F_.js} +1 -1
- package/dist/client/assets/{Zap-D6-O3NZl.js → Zap-Bsbv5icR.js} +1 -1
- package/dist/client/assets/{ZoomOut-DpAkOD8e.js → ZoomOut-DiztYlpQ.js} +1 -1
- package/dist/client/assets/{access-gate-DQan09qj.js → access-gate-DD56oGJy.js} +1 -1
- package/dist/client/assets/{agent-icon-BrQLA9dC.js → agent-icon-B7AXGQ6P.js} +1 -1
- package/dist/client/assets/{agents-list-BIlHhg8F.js → agents-list-CY8WmhcM.js} +1 -1
- package/dist/client/assets/{ai-providers-D9jubp2s.js → ai-providers-BiO7fRFd.js} +1 -1
- package/dist/client/assets/{alert-DI_JsgmI.js → alert-DtchnFmi.js} +1 -1
- package/dist/client/assets/{alert-dialog-DuVJ7GC7.js → alert-dialog-BxdFiiIi.js} +1 -1
- package/dist/client/assets/{analytics-tab-gxTnWc1L.js → analytics-tab-I9OgZdgL.js} +1 -1
- package/dist/client/assets/api-keys-BBBNaWWJ.js +1 -0
- package/dist/client/assets/{api-keys-BJORgq17.js → api-keys-BrduPH4d.js} +1 -1
- package/dist/client/assets/app-editor-BzjPUgJu.js +1 -0
- package/dist/client/assets/{auth-CRmM4ftp.js → auth-BTVKfAUC.js} +1 -1
- package/dist/client/assets/{auth-catchall-D9f22qVk.js → auth-catchall-BVwWvb_2.js} +1 -1
- package/dist/client/assets/{auth-entry-Z1av5utg.js → auth-entry-BVFYUVVl.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Dhyl4Mok.js → auth-split-layout-Dr2p8hD_.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DEZCdj-t.js → authenticate-and-persist-oauth-BJAzAIhG.js} +1 -1
- package/dist/client/assets/{automation-list-row-CJo0GDE_.js → automation-list-row-CtQKd-53.js} +1 -1
- package/dist/client/assets/{automation-runs-Ge9BW9cQ.js → automation-runs-B71QxQf_.js} +1 -1
- package/dist/client/assets/{automations-AOZDTTBB.js → automations-BoEYJP3m.js} +1 -1
- package/dist/client/assets/{autosend-CI7ToXd3.js → autosend-t6fUCO9u.js} +1 -1
- package/dist/client/assets/{avatar-ncVfbaUx.js → avatar-_tvfLV9T.js} +1 -1
- package/dist/client/assets/{badge-rtLQpibV.js → badge-5xoC1FJQ.js} +1 -1
- package/dist/client/assets/{block-document-WxPy4zHY.js → block-document-CvHof2aO.js} +1 -1
- package/dist/client/assets/{breadcrumb-d7wNqsyt.js → breadcrumb-BjJYdEoK.js} +1 -1
- package/dist/client/assets/{buckets-NBI_IEuj.js → buckets-DC0lhAAM.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-B8uZmKXZ.js → bulk-category-panel-B5ry5wx9.js} +1 -1
- package/dist/client/assets/{capability-load-error-BAq8tXOS.js → capability-load-error-QfuL86LE.js} +1 -1
- package/dist/client/assets/{cards-CgpdHb-U.js → cards-QMwTXs-C.js} +1 -1
- package/dist/client/assets/{category-editor-DrNCa6L7.js → category-editor-eSTt5JDo.js} +1 -1
- package/dist/client/assets/{cdn-tab-BflNT2VL.js → cdn-tab-D1sD7Ph4.js} +1 -1
- package/dist/client/assets/{chart-C7j_btUB.js → chart-9tl6Tp7O.js} +1 -1
- package/dist/client/assets/{chat-context-BcY08VKG.js → chat-context-B3FHPtyp.js} +1 -1
- package/dist/client/assets/{checkbox-D0oTwa58.js → checkbox-DdiWS6j9.js} +1 -1
- package/dist/client/assets/{choose-editor-B2cOrwQv.js → choose-editor-Brv8AsJr.js} +1 -1
- package/dist/client/assets/{cli-auth-success-G8Y4SVGK.js → cli-auth-success-DIIukxGb.js} +1 -1
- package/dist/client/assets/{client-icons-BE3evb-i.js → client-icons-cKM5ZcqP.js} +1 -1
- package/dist/client/assets/{collection-detail-DCICjiwT.js → collection-detail--i0_pJUK.js} +1 -1
- package/dist/client/assets/{collection-display-button-C4HtW9B5.js → collection-display-button-D_wt_RA1.js} +1 -1
- package/dist/client/assets/{collection-search-UW0xDxmi.js → collection-search-DRdf_GYh.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-STLb6VjQ.js → collection-table-wrapper-CnvktR4-.js} +1 -1
- package/dist/client/assets/{collection-tabs-644rp01A.js → collection-tabs-BxV7MP04.js} +1 -1
- package/dist/client/assets/{command-CTH7s7Ya.js → command-BDN-a3rJ.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CxUaxjg3.js → commerce-onboarding-DSY4uJcG.js} +1 -1
- package/dist/client/assets/{connect-DEIsBWg2.js → connect-GYd0QYyw.js} +1 -1
- package/dist/client/assets/{connect-layout-CmuGJ6zd.js → connect-layout-B6hgiK5r.js} +1 -1
- package/dist/client/assets/{connection-CU1s53fy.js → connection-C75DYl44.js} +1 -1
- package/dist/client/assets/{connection-card-B-DQLE2m.js → connection-card-BaEIpCbA.js} +1 -1
- package/dist/client/assets/{connection-detail-C3OYxb5o.js → connection-detail-Cdm23aMI.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B-auMXZc.js → connection-form-helpers-aQ5B6tRy.js} +1 -1
- package/dist/client/assets/{connections-DPnFX966.js → connections-B8QOba3u.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-xnwS5290.js → create-organization-dialog-BST4Ck0w.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CnHcYfZj.js → decopilot-sse-pool-DIVelB7F.js} +1 -1
- package/dist/client/assets/{dialog-DKxWMb0-.js → dialog-wNMMbzXr.js} +1 -1
- package/dist/client/assets/{domain-settings-yEjTU5K7.js → domain-settings-CxJq_pNN.js} +1 -1
- package/dist/client/assets/{drawer-BaA_lu4x.js → drawer-Dl4KbpLj.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CC8IMYtS.js → dropdown-menu-BvPxOnm0.js} +1 -1
- package/dist/client/assets/{e2e-tab-CyxfrSC2.js → e2e-tab-BiwnewGk.js} +1 -1
- package/dist/client/assets/{editor-Cm-sI42p.js → editor-BskznDjo.js} +1 -1
- package/dist/client/assets/{empty-state-DA8cnNqW.js → empty-state-C-SubUW6.js} +1 -1
- package/dist/client/assets/{empty-state-BioEMyZp.js → empty-state-CaNGPrDs.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BdnZZmxw.js → extract-connection-data-C4TyJjoX.js} +1 -1
- package/dist/client/assets/{file-explorer-jXzlywVk.js → file-explorer-B1DsBcfy.js} +1 -1
- package/dist/client/assets/{file-type-icon-ChIQfzaN.js → file-type-icon-DKxC4oSX.js} +1 -1
- package/dist/client/assets/{folder-icon-_4CbErMC.js → folder-icon-f4yD90eP.js} +1 -1
- package/dist/client/assets/{form-CorLMse0.js → form-B76JQCy8.js} +1 -1
- package/dist/client/assets/{general-BCDanvgJ.js → general-BNu9Vb3u.js} +1 -1
- package/dist/client/assets/{github-icon-CeFWgmVz.js → github-icon-CdMLfMj7.js} +1 -1
- package/dist/client/assets/{hooks-BOHEAk9Y.js → hooks-BJtZPSVy.js} +1 -1
- package/dist/client/assets/{hosting-tab-BktIiwOH.js → hosting-tab-BLjuvgys.js} +1 -1
- package/dist/client/assets/{index-ObIlqSDZ.js → index-4snYVWB2.js} +1 -1
- package/dist/client/assets/{index-BrCtIPlH.js → index-CaU5DFED.js} +1 -1
- package/dist/client/assets/{index-B8l7Wp2b.js → index-CwUtSIZT.js} +1 -1
- package/dist/client/assets/{index-fS0pDoNW.js → index-DR-7CxUP.js} +4 -4
- package/dist/client/assets/{index-BlP07NoC.js → index-DU9sTbUZ.js} +6 -6
- package/dist/client/assets/{index-CYWX8R5H.js → index-Dj8tvdMR.js} +1 -1
- package/dist/client/assets/{index-BAPa6G_8.js → index-DlGxosdM.js} +1 -1
- package/dist/client/assets/{index-YZeWKaou.js → index-Jy48DtbD.js} +1 -1
- package/dist/client/assets/{index-w12TFwlK.js → index-RKb_9qNN.js} +1 -1
- package/dist/client/assets/{index-redirect-CfbLeyNL.js → index-redirect-DSZLimlN.js} +1 -1
- package/dist/client/assets/{index-D0wjsDWq.js → index-zyhhgc8D.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-B62setNi.js → infiniteQueryObserver-DMi6D2_K.js} +1 -1
- package/dist/client/assets/{infra-billing-BtMbkXjN.js → infra-billing-92jygPAU.js} +1 -1
- package/dist/client/assets/{input-DaMV0yqT.js → input-By-Luuj6.js} +1 -1
- package/dist/client/assets/{integration-icon-BFx8Gs71.js → integration-icon-CpzKJe80.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-erQjr6Dv.js → invite-member-dialog-QBtFVQK3.js} +1 -1
- package/dist/client/assets/{label-Cznjg7Mb.js → label-CHgW_ahI.js} +1 -1
- package/dist/client/assets/{layout-CwmaRw9Y.js → layout-9YgsD1RL.js} +1 -1
- package/dist/client/assets/{login-DYTFtcpb.js → login-BjHKLMoO.js} +1 -1
- package/dist/client/assets/{markdown-BNMHtGi6.js → markdown-BbkOj7TQ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Df-LUzfK.js → mcp-app-renderer--rnWoHIc.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CDjOqnrq.js → mcp-oauth-Dql553Ej.js} +1 -1
- package/dist/client/assets/{members-s02j5DFH.js → members-D6h-8p_Y.js} +1 -1
- package/dist/client/assets/{monaco-editor-7CBGfDCH.js → monaco-editor-CK-YzUmW.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CO2-hLq6.js → monitoring-stats-row-D_wXsyGn.js} +1 -1
- package/dist/client/assets/{multi-select-D1MP7iDa.js → multi-select-B93qStg3.js} +1 -1
- package/dist/client/assets/{oauth-callback-t2WmO9-v.js → oauth-callback-DmICfNLf.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Ce5MHp3r.js → oauth-callback-ai-provider-BCYGio4s.js} +1 -1
- package/dist/client/assets/{onboarding-Dg8pqQh4.js → onboarding-z3GnNpO5.js} +1 -1
- package/dist/client/assets/{org-layout-dq0fDq-h.js → org-layout-C-eaDwHZ.js} +1 -1
- package/dist/client/assets/{organization-choice-Bnr-wpFe.js → organization-choice-BaFzw0ii.js} +1 -1
- package/dist/client/assets/{orgs-DJfci181.js → orgs-BumlFPGs.js} +1 -1
- package/dist/client/assets/{page-seo-form-B1ADwpo8.js → page-seo-form-DatHE4-0.js} +1 -1
- package/dist/client/assets/{popover-sPMAt4On.js → popover-zAXw_Ex4.js} +1 -1
- package/dist/client/assets/{post-calendar-B4Z9Jz7b.js → post-calendar-BnXyVANq.js} +1 -1
- package/dist/client/assets/{post-editor-CcXinFIi.js → post-editor-DMnPDsdI.js} +1 -1
- package/dist/client/assets/{primitives-CGxQwrae.js → primitives-zj67r-_6.js} +1 -1
- package/dist/client/assets/{profile-C9bBchUu.js → profile-DMvNb5vL.js} +1 -1
- package/dist/client/assets/{project-app-view-DudFJRxH.js → project-app-view-Bn6tqh-s.js} +1 -1
- package/dist/client/assets/{project-icon-DD8-TjG9.js → project-icon-DZuabjud.js} +1 -1
- package/dist/client/assets/{prompts-CAxx1TcH.js → prompts-faWYk3a_.js} +1 -1
- package/dist/client/assets/record-editor-BGEMjZVj.js +1 -0
- package/dist/client/assets/redirect-editor-BlQ9ZBG7.js +1 -0
- package/dist/client/assets/registry-Do5Holmd.js +2 -0
- package/dist/client/assets/{registry-layout-Bcal-jx7.js → registry-layout-BiksbGSO.js} +1 -1
- package/dist/client/assets/{reports-BbDmvyvn.js → reports-o3wZ4DFb.js} +1 -1
- package/dist/client/assets/repositories-4Ag5U4M3.js +1 -0
- package/dist/client/assets/{repository-import-picker-TTmQRKgM.js → repository-import-picker-Crzmlv3v.js} +1 -1
- package/dist/client/assets/{repository-picker-Be7NfZEA.js → repository-picker-Dn5CWMQu.js} +1 -1
- package/dist/client/assets/{require-capability-q7uVdBbT.js → require-capability-ry4-n_XW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CR5eG3sF.js → required-auth-layout-C6sCfFoS.js} +1 -1
- package/dist/client/assets/{reset-password-DnIxE4MM.js → reset-password-BPvYj_d6.js} +1 -1
- package/dist/client/assets/{review-settings-Bit87Ep6.js → review-settings-CFta44Y-.js} +1 -1
- package/dist/client/assets/{roles-CYck8jTX.js → roles-D-D6RtHy.js} +1 -1
- package/dist/client/assets/{schema-CVS6b6X8.js → schema-CzaGiNXr.js} +1 -1
- package/dist/client/assets/{scroll-area-DIJ4XfEc.js → scroll-area-C4NBwqyh.js} +1 -1
- package/dist/client/assets/{search-input-BN_fecvo.js → search-input-jf5-JJb9.js} +1 -1
- package/dist/client/assets/{secrets-Dr0vdQ4d.js → secrets-DNPz1kGQ.js} +1 -1
- package/dist/client/assets/{sections-editor-BsuMEuNO.js → sections-editor-CiB_HyuR.js} +1 -1
- package/dist/client/assets/{select-BJ0Gkkka.js → select-8-nbJ0jG.js} +1 -1
- package/dist/client/assets/{select-model-D8CTPoiO.js → select-model-BN5vxFKu.js} +1 -1
- package/dist/client/assets/{self-tool-result-KOheC4HD.js → self-tool-result-Cei_02H_.js} +1 -1
- package/dist/client/assets/{seo-editor-CSFxllkC.js → seo-editor-BS-_liwN.js} +1 -1
- package/dist/client/assets/settings-layout-BWoejjac.js +1 -0
- package/dist/client/assets/{settings-sidebar-C_Tz8rbX.js → settings-sidebar-C0QwDGxU.js} +1 -1
- package/dist/client/assets/{shell-controls-5f0FnXKd.js → shell-controls-DLLmOm3e.js} +1 -1
- package/dist/client/assets/{shell-layout-D-M6_Jkf.js → shell-layout-UiGWQtHh.js} +1 -1
- package/dist/client/assets/{skill-preview-5YIvamOb.js → skill-preview-OK-E70YW.js} +1 -1
- package/dist/client/assets/{skills-DMmhWXLy.js → skills-REtufkzf.js} +1 -1
- package/dist/client/assets/{sso-nVCDDH4k.js → sso-Bl2RYEhH.js} +1 -1
- package/dist/client/assets/{store-LfRhnjNM.js → store-BUZ3BxYI.js} +1 -1
- package/dist/client/assets/store-registry-DemSgqBf.js +2 -0
- package/dist/client/assets/{switch-C0tiHttS.js → switch-B_09jY5-.js} +1 -1
- package/dist/client/assets/{synced-repos-D5wTALWx.js → synced-repos-BNk3uyi6.js} +1 -1
- package/dist/client/assets/{table-D4dLAB1m.js → table-C9B_yGws.js} +1 -1
- package/dist/client/assets/{tabs-CDFENeRa.js → tabs-yz5p2eqD.js} +1 -1
- package/dist/client/assets/{task-board-B4aUIKJI.js → task-board-DX0mX_sm.js} +1 -1
- package/dist/client/assets/{task-route-BUYfM-Mq.js → task-route-DTA1f0w5.js} +1 -1
- package/dist/client/assets/{tasks-COtpdI-R.js → tasks-CCt0uT1A.js} +1 -1
- package/dist/client/assets/{textarea-DIJRp6Ds.js → textarea-DD_XQc8b.js} +1 -1
- package/dist/client/assets/{thread-intent-DK53ivxy.js → thread-intent-BKZp36M-.js} +1 -1
- package/dist/client/assets/{thread-route-m3qiCJQP.js → thread-route-g3bFZsDA.js} +1 -1
- package/dist/client/assets/{toggle-group-BSxkMDRS.js → toggle-group-OyXGZbFx.js} +1 -1
- package/dist/client/assets/{toolbar-DQ2YVpXF.js → toolbar-BGgBqcbD.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DeXrhkGe.js → toolbar-icon-button-CyWbgFMR.js} +1 -1
- package/dist/client/assets/{track-J__dE1p5.js → track-BmC8g6Tw.js} +1 -1
- package/dist/client/assets/{types-C9oYptqr.js → types-C6WokDyE.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DMdw1ZKm.js → use-ai-providers-CsfPjUM-.js} +1 -1
- package/dist/client/assets/{use-automations-BrJQYtfT.js → use-automations-V8lTd1ft.js} +1 -1
- package/dist/client/assets/{use-autosave-DXppOUIw.js → use-autosave-Bd881RwB.js} +1 -1
- package/dist/client/assets/{use-connection-DueV7Dd9.js → use-connection-BM1ySErK.js} +1 -1
- package/dist/client/assets/{use-copy-DsM8BkMO.js → use-copy-pSJtH4fM.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CXxjUZ5c.js → use-create-virtual-mcp-D0NidtMX.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-I1vziWnN.js → use-date-fns-locale-DgRg5mjL.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Bep9W3RF.js → use-debounced-autosave-EYzF8Olk.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CjFrELYP.js → use-debounced-value-KdzTma4G.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BxzD46W5.js → use-decopilot-events-BXOAX3zK.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BBL_RJLP.js → use-delete-connection-BbNOjW2l.js} +1 -1
- package/dist/client/assets/{use-deployment-admin--_f948uh.js → use-deployment-admin-BASh3KDk.js} +1 -1
- package/dist/client/assets/{use-destination-route-WysfeR7S.js → use-destination-route-DZ6zuyom.js} +1 -1
- package/dist/client/assets/{use-file-configs-BByTBhTa.js → use-file-configs-BRCZqxCS.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-p1RdGJsc.js → use-infinite-scroll-CqmvxgxE.js} +1 -1
- package/dist/client/assets/{use-join-requests-D9qT6ziM.js → use-join-requests-D-siqVP0.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CTnEpyYI.js → use-mcp-auth-status-CkfQLxM4.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DtsRGdvB.js → use-mcp-client-Cjw7oL0k.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CD_IWJeZ.js → use-mcp-prompts-BN9qi7Ix.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BKHgcAxL.js → use-mcp-tools-DMULZKMD.js} +1 -1
- package/dist/client/assets/{use-members-NWhv5vIl.js → use-members-DhvUWOTO.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bnmnhqje.js → use-navigate-to-agent-BtEQtkbQ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CShcDth4.js → use-org-auth-client-5eX91FAP.js} +1 -1
- package/dist/client/assets/{use-org-notice-B64MrAd9.js → use-org-notice-CnZTeX-0.js} +1 -1
- package/dist/client/assets/{use-org-sso-DzsFzLff.js → use-org-sso-CF4YFYU9.js} +1 -1
- package/dist/client/assets/{use-organization-roles-7PFmB_rs.js → use-organization-roles-W-c6xLKD.js} +1 -1
- package/dist/client/assets/{use-organization-settings-nKtEvYQd.js → use-organization-settings-Di523P_b.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BNmxrdjd.js → use-panel-navigate-BA5KTGnu.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bb6pjxJh.js → use-registry-connections-bgQe6Edq.js} +1 -1
- package/dist/client/assets/{use-secrets-CTUki73i.js → use-secrets-DWw60yIy.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BHSNiN-i.js → use-section-preview-base-Dne8hXr_.js} +1 -1
- package/dist/client/assets/{use-status-sounds-k-y4u-Dp.js → use-status-sounds-CZvvi-5S.js} +1 -1
- package/dist/client/assets/{use-tags-BOUHc_F8.js → use-tags-B-RutSus.js} +1 -1
- package/dist/client/assets/{use-view-mode-4DXLgMpz.js → use-view-mode-86puchYT.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C5Zt0ewM.js → use-virtual-mcp-DLU-VkLe.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-7dgy4-tR.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DBrABtQo.js +1 -0
- package/dist/client/assets/{users-DRzgVGBP.js → users-BT256VvZ.js} +1 -1
- package/dist/client/assets/{variant-calendar-TLlf4rAo.js → variant-calendar-DWf9sjyV.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CZECgOYC.js → view-mode-toggle-CB1VuRxL.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +616 -608
- package/dist/server/migrate.js +154 -154
- package/dist/server/server.js +527 -519
- package/package.json +1 -1
- package/dist/client/assets/api-keys-DM-VC8Ks.js +0 -1
- package/dist/client/assets/app-editor-ueQwisxj.js +0 -1
- package/dist/client/assets/record-editor-CQ7QMoAf.js +0 -1
- package/dist/client/assets/redirect-editor-B68PccpU.js +0 -1
- package/dist/client/assets/registry-CWd0I8mg.js +0 -2
- package/dist/client/assets/repositories-DoZh9xWv.js +0 -1
- package/dist/client/assets/settings-layout-DyOsDVbj.js +0 -1
- package/dist/client/assets/store-registry-D-puuJzT.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CU7gRlof.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-rXQ07VfR.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,Z as Re,H as je,l as A,j as a,b as I,r as O,B as me,a as M,t as D,w as Ae,bX as qe,m as Le,K as De,bY as Me,G as de,J as Fe,_ as oe,d as He,s as Ee,a1 as ve,a2 as Se,a4 as ke,o as F,a_ as ye,L as Be,a6 as fe,a5 as le,bZ as Ue,b_ as Ve,z as Ge,b$ as Je,f as Ke,k as We,c0 as Ye,c1 as Ze,c2 as Qe,a0 as Xe}from"./index-fS0pDoNW.js";import{t as es}from"./ChevronUp-DLLvYK07.js";import{i as ss}from"./ChevronRight-Dk9nR_C7.js";import{h as ts}from"./TrendUp01-NTK3Zf_M.js";import{I as as,T as Ne}from"./toolbar-icon-button-DeXrhkGe.js";import{i as Y}from"./Check-CmgBwUGv.js";import{i as ns}from"./ChevronSelectorVertical-X68ci9mX.js";import{s as rs}from"./Plus-CgVmxzR4.js";import{c as he,e as W,d as Z,b as is,C as os,a as ls}from"./command-CTH7s7Ya.js";import{D as cs,d as ds,a as gs,b as us}from"./drawer-BaA_lu4x.js";import{P as ms,a as fs,b as hs}from"./popover-sPMAt4On.js";import{A as ps,n as xs,e as bs,aR as js,aS as vs}from"./agent-icon-BrQLA9dC.js";import{u as $e,L as Q,P as Ce}from"./project-icon-DD8-TjG9.js";import{C as Ss}from"./create-organization-dialog-xnwS5290.js";import{s as ks}from"./XClose-C-bbcgCJ.js";import{u as ys}from"./use-destination-route-WysfeR7S.js";import{e as Ns}from"./use-virtual-mcp-C5Zt0ewM.js";import{i as $s}from"./ArrowLeft-EySzpaMt.js";import{t as Cs,b as pe}from"./Users03-CrZajyAo.js";import{i as ws}from"./CreditCard01-CGG5tsm6.js";import{i as _s}from"./GitBranch01-DRT2X7Dj.js";import{i as zs}from"./HardDrive--vlQvWpi.js";import{i as Os}from"./Key01-By90Yq6k.js";import{n as Ts}from"./LinkExternal01-D2pSy7v4.js";import{t as Is}from"./Stars01-Dno5l14o.js";import{s as Ps}from"./User01-CDRv3_oY.js";import{i as Rs}from"./Zap-D6-O3NZl.js";import{u as As}from"./use-join-requests-D9qT6ziM.js";function qs(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},t[0]=e):e=t[0],!!Re(e)}function ge(){const{state:t,isMobile:e}=je();return t==="collapsed"&&!e}function Ls(t){let e=0;for(let d=0;d<t.length;d++)e=t.charCodeAt(d)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function ue(t){const e=j.c(13),{org:s,size:d}=t,i=d===void 0?"sm":d,n=i==="xs"?"size-5":"size-6",o=i==="xs"?"text-[9px]":"text-xs";let l;e[0]!==n?(l=A(n,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=n,e[1]=l):l=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:Ls(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let r;e[5]!==s.logo||e[6]!==s.name||e[7]!==o?(r=s.logo?a.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):a.jsx("span",{className:A("font-semibold leading-none",o),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=o,e[8]=r):r=e[8];let g;return e[9]!==l||e[10]!==c||e[11]!==r?(g=a.jsx("div",{className:l,style:c,children:r}),e[9]=l,e[10]=c,e[11]=r,e[12]=g):g=e[12],g}function Ds({invitation:t,onChanged:e}){const s=I(),[d,i]=O.useState(!1),n=t.organizationName??s("header.orgSwitcher.unknownOrganization"),o=async()=>{i(!0);try{const r=await M.organization.acceptInvitation({invitationId:t.id});if(r.error){D.error(r.error.message),i(!1);return}}catch{D.error(s("header.orgSwitcher.failedToAcceptInvitation")),i(!1);return}D.success(s("header.orgSwitcher.joined",{name:n})),Ae();let c;try{c=(await M.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{i(!0);try{const c=await M.organization.rejectInvitation({invitationId:t.id});if(c.error){D.error(c.error.message),i(!1);return}D.success(s("header.orgSwitcher.invitationDeclined")),i(!1),e()}catch{D.error(s("header.orgSwitcher.failedToDeclineInvitation")),i(!1)}};return a.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[a.jsx(ue,{org:{name:n},size:"sm"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium",children:n}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[a.jsx(me,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:o,disabled:d,children:s("header.orgSwitcher.accept")}),a.jsx(me,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:d,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:n}),children:a.jsx(ks,{size:14})})]})]})}function we(){const t=O.useContext(qe),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>s?.()}}function Ms(t){const e=j.c(13),s=t.trim(),{data:d}=M.useSession(),i=d?.user?.id??"",n=s.length>0&&!!i,o=De.projectSearch(i,s);let l;e[0]!==s?(l=async k=>{const{signal:v}=k,S=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:v});if(!S.ok)throw new Error(`Project search failed: ${S.status}`);return await S.json()},e[0]=s,e[1]=l):l=e[1];let c;e[2]!==n||e[3]!==o||e[4]!==l?(c={queryKey:o,queryFn:l,enabled:n,placeholderData:Me,staleTime:3e4,retry:!1},e[2]=n,e[3]=o,e[4]=l,e[5]=c):c=e[5];const{data:r,isFetching:g,isPlaceholderData:u,isError:f}=Le(c);let m;e[6]!==r?.items?(m=r?.items??[],e[6]=r?.items,e[7]=m):m=e[7];const h=n&&g,b=n&&u;let p;return e[8]!==f||e[9]!==m||e[10]!==h||e[11]!==b?(p={hits:m,isSearching:h,isStale:b,isError:f},e[8]=f,e[9]=m,e[10]=h,e[11]=b,e[12]=p):p=e[12],p}function xe(t){const e=j.c(15),{id:s,label:d,createLabel:i,onCreate:n}=t;let o;e[0]!==s||e[1]!==d?(o=a.jsx("span",{id:s,className:"truncate",children:d}),e[0]=s,e[1]=d,e[2]=o):o=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(rs,{size:14}),e[3]=l):l=e[3];let c;e[4]!==i||e[5]!==n?(c=a.jsx(ve,{asChild:!0,children:a.jsx("button",{type:"button","aria-label":i,className:"-my-1 shrink-0 cursor-pointer rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",onClick:n,children:l})}),e[4]=i,e[5]=n,e[6]=c):c=e[6];let r;e[7]!==i?(r=a.jsx(Se,{side:"right",children:i}),e[7]=i,e[8]=r):r=e[8];let g;e[9]!==c||e[10]!==r?(g=a.jsxs(ke,{children:[c,r]}),e[9]=c,e[10]=r,e[11]=g):g=e[11];let u;return e[12]!==o||e[13]!==g?(u=a.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[o,g]}),e[12]=o,e[13]=g,e[14]=u):u=e[14],u}const X="min-h-9 items-center",R={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function Fs(t){const e=j.c(11),{active:s,rows:d}=t,i=I();let n,o,l,c;if(e[0]!==s||e[1]!==d||e[2]!==i){c=Symbol.for("react.early_return_sentinel");e:{const g=d.get(s);if(g?.kind!=="travel"){c=null;break e}n="border-t border-border px-3 py-2 text-xs text-warning",o=i("sidebar.picker.verbTravel",{name:g.label}),l=g.leaves&&a.jsxs("span",{className:"text-muted-foreground",children:[" ",i("sidebar.picker.verbLeaves",{name:g.leaves})]})}e[0]=s,e[1]=d,e[2]=i,e[3]=n,e[4]=o,e[5]=l,e[6]=c}else n=e[3],o=e[4],l=e[5],c=e[6];if(c!==Symbol.for("react.early_return_sentinel"))return c;let r;return e[7]!==n||e[8]!==o||e[9]!==l?(r=a.jsxs("div",{className:n,children:[o,l]}),e[7]=n,e[8]=o,e[9]=l,e[10]=r):r=e[10],r}function Hs(t){const e=j.c(27),{onClose:s,onCreateOrg:d,className:i}=t,n=I(),o=O.useId(),l=O.useId(),c=He(),{org:r}=de(),{scopeId:g,projects:u,setScope:f}=$e(),{hasMore:m}=Ns(),[h,b]=O.useState(""),[p,k]=O.useState(R.allProjects),v=O.useDeferredValue(h);let S;e[0]!==v?(S=v.trim(),e[0]=v,e[1]=S):S=e[1];const y=S,$=y.length>0,{data:w}=Ee(),{invitations:C,refetch:_}=we();let N;e[2]!==r.slug?(N=(x,z)=>x.slug===r.slug?-1:z.slug===r.slug?1:0,e[2]=r.slug,e[3]=N):N=e[3];const T=(w??[]).slice().sort(N),{hits:P,isSearching:H,isStale:Te,isError:ee}=Ms($?y:""),se=$?T.filter(x=>{const z=y.toLowerCase();return x.name.toLowerCase().includes(z)||x.slug.toLowerCase().includes(z)}):[],te=ys();let E;e[4]!==te?(E=te.startsWith("/$org/settings"),e[4]=te,e[5]=E):E=e[5];const B=E,q=new Map;let U;e[6]!==B||e[7]!==c||e[8]!==s||e[9]!==r.slug||e[10]!==f?(U=x=>{F("scope_set",{scoped:x!==null,fromSettings:B}),B?c({to:"/$org",params:{org:r.slug},search:{virtualmcpid:x??void 0}}):f(x),s()},e[6]=B,e[7]=c,e[8]=s,e[9]=r.slug,e[10]=f,e[11]=U):U=e[11];const ae=U;let V;e[12]!==c||e[13]!==s?(V=(x,z)=>{F("org_project_travel",{scoped:!!z}),c({to:"/$org",params:{org:x},search:z?{virtualmcpid:z}:{}}),s()},e[12]=c,e[13]=s,e[14]=V):V=e[14];const ne=V;let G;e[15]!==c||e[16]!==s||e[17]!==r.slug?(G=()=>{F("picker_new_project"),c({to:"/$org/agents/{-$panel}",params:{org:r.slug,panel:void 0},search:{virtualmcpid:void 0}}),s()},e[15]=c,e[16]=s,e[17]=r.slug,e[18]=G):G=e[18];const Ie=G;q.set(R.allProjects,{kind:"scope",label:n("sidebar.scope.allProjects")});let L;e[19]!==n?(L=n("sidebar.picker.searchPlaceholder"),e[19]=n,e[20]=L):L=e[20];let J;e[21]!==h||e[22]!==L?(J=a.jsx(ls,{value:h,onValueChange:b,placeholder:L}),e[21]=h,e[22]=L,e[23]=J):J=e[23];const re=is,Pe="max-h-none min-h-0 flex-1",ie=$?a.jsxs(a.Fragment,{children:[ee&&a.jsx(he,{children:n("sidebar.picker.searchFailed")}),!ee&&!H&&P.length===0&&se.length===0&&a.jsx(he,{children:n("sidebar.picker.noMatches",{query:y})}),!ee&&P.length>0&&a.jsx(W,{heading:n("sidebar.picker.projectsHeading"),className:A(Te&&"opacity-50"),children:P.map(x=>a.jsx(Es,{hit:x,currentOrgSlug:r.slug,currentOrgName:r.name,scopeId:g,rows:q,onScope:ae,onTravel:ne},`${x.orgSlug}:${x.id}`))}),se.length>0&&a.jsx(W,{heading:n("sidebar.picker.orgsHeading"),children:se.map(x=>a.jsx(be,{candidate:x,currentOrgSlug:r.slug,currentOrgName:r.name,rows:q,onTravel:ne,onClose:s},x.id))})]}):a.jsxs(a.Fragment,{children:[a.jsx(xe,{id:o,label:n("sidebar.picker.projectsHeading"),createLabel:n("sidebar.picker.newProject"),onCreate:Ie}),a.jsxs(W,{"aria-labelledby":o,children:[a.jsxs(Z,{value:R.allProjects,className:X,onSelect:()=>ae(null),children:[a.jsx("span",{className:"min-w-0 flex-1 truncate",children:n("sidebar.scope.allProjects")}),g===null&&a.jsx(Y,{size:14})]}),u.map(x=>{const z=R.project(x.id);return q.set(z,{kind:"scope",label:x.title}),a.jsxs(Z,{value:z,className:X,onSelect:()=>ae(x.id),children:[a.jsx(Ce,{icon:x.icon,name:x.title}),a.jsx("span",{className:"min-w-0 flex-1 truncate",children:x.title}),g===x.id&&a.jsx(Y,{size:14})]},x.id)}),m&&a.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:n("sidebar.picker.moreExist")})]}),a.jsx(xe,{id:l,label:n("sidebar.picker.orgsHeading"),createLabel:n("sidebar.picker.newOrganization"),onCreate:d}),a.jsxs(W,{"aria-labelledby":l,children:[C.map(x=>a.jsx(Ds,{invitation:x,onChanged:_},x.id)),T.map(x=>a.jsx(be,{candidate:x,currentOrgSlug:r.slug,currentOrgName:r.name,rows:q,onTravel:ne,onClose:s},x.id))]})]});let K;return e[24]!==re||e[25]!==ie?(K=a.jsx(re,{className:Pe,children:ie}),e[24]=re,e[25]=ie,e[26]=K):K=e[26],a.jsxs(os,{shouldFilter:!1,value:p,onValueChange:k,className:i,children:[J,K,a.jsx(Fs,{active:p,rows:q})]})}function be(t){const e=j.c(23),{candidate:s,currentOrgSlug:d,currentOrgName:i,rows:n,onTravel:o,onClose:l}=t,c=s.slug===d;let r;e[0]!==s.name||e[1]!==s.slug||e[2]!==i||e[3]!==c||e[4]!==n?(r=R.org(s.slug),n.set(r,{kind:c?"scope":"travel",label:s.name,...c?{}:{leaves:i}}),e[0]=s.name,e[1]=s.slug,e[2]=i,e[3]=c,e[4]=n,e[5]=r):r=e[5];let g;e[6]!==s.slug||e[7]!==c||e[8]!==l||e[9]!==o?(g=()=>c?l():o(s.slug),e[6]=s.slug,e[7]=c,e[8]=l,e[9]=o,e[10]=g):g=e[10];let u;e[11]!==s?(u=a.jsx(ue,{org:s,size:"xs"}),e[11]=s,e[12]=u):u=e[12];let f;e[13]!==s.name?(f=a.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[13]=s.name,e[14]=f):f=e[14];let m;e[15]!==c?(m=c&&a.jsx(Y,{size:14}),e[15]=c,e[16]=m):m=e[16];let h;return e[17]!==g||e[18]!==u||e[19]!==f||e[20]!==m||e[21]!==r?(h=a.jsxs(Z,{value:r,className:X,onSelect:g,children:[u,f,m]}),e[17]=g,e[18]=u,e[19]=f,e[20]=m,e[21]=r,e[22]=h):h=e[22],h}function Es(t){const e=j.c(31),{hit:s,currentOrgSlug:d,currentOrgName:i,scopeId:n,rows:o,onScope:l,onTravel:c}=t,r=s.orgSlug===d;let g;e[0]!==i||e[1]!==s.id||e[2]!==s.orgSlug||e[3]!==s.title||e[4]!==r||e[5]!==o?(g=r?R.project(s.id):R.foreignProject(s.orgSlug,s.id),o.set(g,{kind:r?"scope":"travel",label:s.title,leaves:r?void 0:i}),e[0]=i,e[1]=s.id,e[2]=s.orgSlug,e[3]=s.title,e[4]=r,e[5]=o,e[6]=g):g=e[6];let u;e[7]!==s.id||e[8]!==s.orgSlug||e[9]!==r||e[10]!==l||e[11]!==c?(u=()=>r?l(s.id):c(s.orgSlug,s.id),e[7]=s.id,e[8]=s.orgSlug,e[9]=r,e[10]=l,e[11]=c,e[12]=u):u=e[12];let f;e[13]!==s.icon||e[14]!==s.title?(f=a.jsx(Ce,{icon:s.icon,name:s.title}),e[13]=s.icon,e[14]=s.title,e[15]=f):f=e[15];let m;e[16]!==s.title?(m=a.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[16]=s.title,e[17]=m):m=e[17];let h;e[18]!==s.orgName?(h=a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[18]=s.orgName,e[19]=h):h=e[19];let b;e[20]!==s.id||e[21]!==r||e[22]!==n?(b=r&&n===s.id&&a.jsx(Y,{size:14}),e[20]=s.id,e[21]=r,e[22]=n,e[23]=b):b=e[23];let p;return e[24]!==u||e[25]!==f||e[26]!==m||e[27]!==h||e[28]!==b||e[29]!==g?(p=a.jsxs(Z,{value:g,className:X,onSelect:u,children:[f,m,h,b]}),e[24]=u,e[25]=f,e[26]=m,e[27]=h,e[28]=b,e[29]=g,e[30]=p):p=e[30],p}function _e(t){const e=j.c(32),{collapsed:s,onNavigate:d}=t,i=s===void 0?!1:s,n=I(),{org:o}=de(),{project:l}=$e(),{invitations:c}=we(),[r,g]=O.useState(!1),[u,f]=O.useState(!1),m=Fe();let h;if(e[0]!==i||e[1]!==c.length||e[2]!==o||e[3]!==l||e[4]!==n){const _=l?n("sidebar.picker.projectInOrg",{project:l.title,org:o.name}):o.name;let N;e[6]!==o||e[7]!==l?(N=l?a.jsx(ps,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):a.jsx(ue,{org:o,size:"sm"}),e[6]=o,e[7]=l,e[8]=N):N=e[8];let T;e[9]!==c.length?(T=c.length>0&&a.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=c.length,e[10]=T):T=e[10];let P;e[11]!==N||e[12]!==T?(P=a.jsxs("div",{className:"relative inline-flex shrink-0",children:[N,T]}),e[11]=N,e[12]=T,e[13]=P):P=e[13];const H=P;h=i?a.jsx(oe,{tooltip:_,"data-tour":Q.switcher,children:H}):a.jsxs("button",{type:"button","data-tour":Q.switcher,"aria-label":n("sidebar.picker.ariaLabel",{name:_}),className:A("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",as),children:[H,a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:o.name}),a.jsx(ns,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=i,e[1]=c.length,e[2]=o,e[3]=l,e[4]=n,e[5]=h}else h=e[5];const b=h,p=m?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let k;e[14]!==d?(k=()=>{g(!1),d?.()},e[14]=d,e[15]=k):k=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{g(!1),f(!0)},e[16]=v):v=e[16];let S;e[17]!==p||e[18]!==k?(S=a.jsx(Hs,{onClose:k,onCreateOrg:v,className:p}),e[17]=p,e[18]=k,e[19]=S):S=e[19];const y=S;let $;e[20]!==i||e[21]!==y||e[22]!==m||e[23]!==r||e[24]!==n||e[25]!==b?($=m?a.jsxs(cs,{open:r,onOpenChange:g,direction:"bottom",children:[a.jsx(ds,{asChild:!0,children:b}),a.jsxs(gs,{className:"flex max-h-[85dvh] flex-col p-0",children:[a.jsx(us,{className:"sr-only",children:n("sidebar.picker.title")}),y]})]}):a.jsxs(ms,{open:r,onOpenChange:g,children:[a.jsx(fs,{asChild:!0,children:b}),a.jsx(hs,{side:i?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:y})]}),e[20]=i,e[21]=y,e[22]=m,e[23]=r,e[24]=n,e[25]=b,e[26]=$):$=e[26];let w;e[27]!==u?(w=a.jsx(Ss,{open:u,onOpenChange:f}),e[27]=u,e[28]=w):w=e[28];let C;return e[29]!==$||e[30]!==w?(C=a.jsxs(a.Fragment,{children:[$,w]}),e[29]=$,e[30]=w,e[31]=C):C=e[31],C}const ze=16;function It(){const t=j.c(7),e=ge(),s=qs();let d;t[0]!==e?(d=a.jsx(_e,{collapsed:e}),t[0]=e,t[1]=d):d=t[1];let i;t[2]!==s?(i=!s&&a.jsx(Us,{}),t[2]=s,t[3]=i):i=t[3];let n;return t[4]!==d||t[5]!==i?(n=a.jsxs(a.Fragment,{children:[d,i]}),t[4]=d,t[5]=i,t[6]=n):n=t[6],n}function Bs(t){const e=j.c(12),{onClose:s}=t,d=I();let i;e[0]!==s?(i=a.jsx(_e,{onNavigate:s}),e[0]=s,e[1]=i):i=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx("div",{className:"flex-1"}),e[2]=n):n=e[2];let o;e[3]!==d?(o=d("sidebar.header.closeSidebar"),e[3]=d,e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(ye,{size:ze}),e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==o?(c=a.jsx(Ne,{onClick:s,"aria-label":o,children:l}),e[6]=s,e[7]=o,e[8]=c):c=e[8];let r;return e[9]!==i||e[10]!==c?(r=a.jsxs(a.Fragment,{children:[i,n,c]}),e[9]=i,e[10]=c,e[11]=r):r=e[11],r}function Us(){const t=j.c(12),e=I(),s=ge(),{toggleSidebar:d}=je();let i;t[0]!==e?(i=e("sidebar.header.toggleSidebar"),t[0]=e,t[1]=i):i=t[1];const n=i;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(ye,{size:ze}),t[2]=o):o=t[2];let l;t[3]!==n||t[4]!==d?(l=a.jsx(ve,{asChild:!0,children:a.jsx(Ne,{"aria-label":n,onClick:d,className:"shrink-0 rounded-lg md:size-[34px] group-data-[state=collapsed]/sidebar:mx-auto",children:o})}),t[3]=n,t[4]=d,t[5]=l):l=t[5];const c=!s;let r;t[6]!==n||t[7]!==c?(r=a.jsx(Se,{side:"right",hidden:c,children:n}),t[6]=n,t[7]=c,t[8]=r):r=t[8];let g;return t[9]!==l||t[10]!==r?(g=a.jsxs(ke,{children:[l,r]}),t[9]=l,t[10]=r,t[11]=g):g=t[11],g}function ce(t){const e=j.c(30),{icon:s,label:d,isActive:i,link:n,onSelect:o,ariaLabel:l,className:c,dataTour:r,children:g}=t,u=i===void 0?!1:i,f=ge(),m=l??d,h=f?m:void 0;let b;e[0]!==c||e[1]!==r||e[2]!==u||e[3]!==h?(b={isActive:u,tooltip:h,className:c,"data-tour":r},e[0]=c,e[1]=r,e[2]=u,e[3]=h,e[4]=b):b=e[4];const p=b;let k;e[5]!==d?(k=a.jsx("span",{className:"truncate",children:d}),e[5]=d,e[6]=k):k=e[6];let v;e[7]!==s||e[8]!==k?(v=a.jsxs(a.Fragment,{children:[s,k]}),e[7]=s,e[8]=k,e[9]=v):v=e[9];const S=v;if(n){const w=u?"page":void 0;let C;e[10]!==S||e[11]!==n||e[12]!==m||e[13]!==o||e[14]!==w?(C=a.jsx(Be,{...n,"aria-label":m,"aria-current":w,onClick:o,children:S}),e[10]=S,e[11]=n,e[12]=m,e[13]=o,e[14]=w,e[15]=C):C=e[15];let _;e[16]!==p||e[17]!==C?(_=a.jsx(oe,{asChild:!0,...p,children:C}),e[16]=p,e[17]=C,e[18]=_):_=e[18];let N;return e[19]!==g||e[20]!==_?(N=a.jsxs(fe,{children:[_,g]}),e[19]=g,e[20]=_,e[21]=N):N=e[21],N}let y;e[22]!==S||e[23]!==m||e[24]!==o||e[25]!==p?(y=a.jsx(oe,{...p,"aria-label":m,onClick:o,children:S}),e[22]=S,e[23]=m,e[24]=o,e[25]=p,e[26]=y):y=e[26];let $;return e[27]!==g||e[28]!==y?($=a.jsxs(fe,{children:[y,g]}),e[27]=g,e[28]=y,e[29]=$):$=e[29],$}function Vs(t){const e=j.c(5),{label:s,link:d,onSelect:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx($s,{size:16}),e[0]=n):n=e[0];let o;return e[1]!==s||e[2]!==d||e[3]!==i?(o=a.jsx("div",{className:"-mx-2 border-b border-sidebar-border px-2 py-2",children:a.jsx(le,{className:"shrink-0",children:a.jsx(ce,{icon:n,label:s,className:"text-sidebar-foreground/70",link:d,onSelect:i})})}),e[1]=s,e[2]=d,e[3]=i,e[4]=o):o=e[4],o}function Gs(){const t=j.c(8),e=I(),{capabilities:s,isPrivileged:d,loading:i,error:n}=Ue(),o=As().length,l=Ve();let c;return t[0]!==s||t[1]!==n||t[2]!==d||t[3]!==o||t[4]!==i||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:a.jsx(Ps,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:a.jsx(Cs,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:a.jsx(ws,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:a.jsx(Ts,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:a.jsx(xs,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"repositories",label:e("settings.nav.repositories"),icon:a.jsx(_s,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:a.jsx(bs,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:a.jsx(pe,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:a.jsx(Rs,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:a.jsx(Is,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:a.jsx(js,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:a.jsx(pe,{size:14}),to:"/$org/settings/members",group:"members",badge:o}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:a.jsx(Os,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:a.jsx(zs,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:e("settings.nav.store"),icon:a.jsx(vs,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:e("settings.nav.security"),icon:a.jsx(Ge,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(g=>({...g,items:g.items.flatMap(u=>{if(u.group){const[f]=l[u.group];return f?[{...u,to:f.to}]:Je(u.group)?[]:[u]}return i||n?[u]:u.privilegedOnly?d?[u]:[]:u.requires?d||s[u.requires]?[u]:[]:[u]})})).filter(Js),t[0]=s,t[1]=n,t[2]=d,t[3]=o,t[4]=i,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function Js(t){return t.items.length>0}function Oe(){const t=j.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=Ke(e);let d;t[1]===Symbol.for("react.memo_cache_sentinel")?(d={select:Ks},t[1]=d):d=t[1];const i=We(d);let n;if(t[2]!==s||t[3]!==i){const c=r=>{const g=r.replace("$org",s);return i===g||i.startsWith(`${g}/`)};n=r=>[r.to,...r.group?Ye(r.group):[]].some(c),t[2]=s,t[3]=i,t[4]=n}else n=t[4];const o=n;let l;return t[5]!==o||t[6]!==s?(l={org:s,isActive:o},t[5]=o,t[6]=s,t[7]=l):l=t[7],l}function Ks(t){return t.location.pathname}const Ws="pt-1.5";function Ys(t){const e=j.c(15),{header:s,back:d,body:i,footer:n,sheet:o}=t;let l;e[0]!==s?(l=s&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex h-12 shrink-0 flex-row items-center gap-2 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:py-2",children:s}),a.jsx("div",{className:"mt-1.5 h-px shrink-0 bg-sidebar-border"})]}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==d?(c=d&&a.jsx("div",{className:"shrink-0 px-2",children:d}),e[2]=d,e[3]=c):c=e[3];let r;e[4]!==i?(r=a.jsx(Ze,{className:"gap-0 overflow-y-auto px-2 pt-2 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:i}),e[4]=i,e[5]=r):r=e[5];let g;e[6]!==n||e[7]!==l||e[8]!==c||e[9]!==r?(g=a.jsxs(a.Fragment,{children:[l,c,r,n]}),e[6]=n,e[7]=l,e[8]=c,e[9]=r,e[10]=g):g=e[10];const u=g;if(o){let m;return e[11]!==u?(m=a.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":Q.nav,children:u}),e[11]=u,e[12]=m):m=e[12],m}let f;return e[13]!==u?(f=a.jsx(Qe,{className:Ws,"data-tour":Q.nav,children:u}),e[13]=u,e[14]=f):f=e[14],f}function Zs(){const t=j.c(9),{isActive:e}=Oe();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[d,i]=O.useState(s);let n;t[1]!==e||t[2]!==d?(n=g=>d[g.key]??(!g.collapsible||g.items.some(e)),t[1]=e,t[2]=d,t[3]=n):n=t[3];const o=n;let l;t[4]!==o?(l=g=>i(u=>({...u,[g.key]:!o(g)})),t[4]=o,t[5]=l):l=t[5];const c=l;let r;return t[6]!==o||t[7]!==c?(r={isOpen:o,toggle:c},t[6]=o,t[7]=c,t[8]=r):r=t[8],r}function Qs(t){const e=j.c(21),{group:s,open:d,onToggle:i,className:n}=t;let o,l,c,r,g;if(e[0]!==n||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==i||e[4]!==d){g=Symbol.for("react.early_return_sentinel");e:{const h=A("text-xs font-medium text-muted-foreground/60 truncate",n);if(!s.collapsible){g=a.jsx("p",{className:h,children:s.label});break e}o="button",l=i,c=d,r=A("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",h)}e[0]=n,e[1]=s.collapsible,e[2]=s.label,e[3]=i,e[4]=d,e[5]=o,e[6]=l,e[7]=c,e[8]=r,e[9]=g}else o=e[5],l=e[6],c=e[7],r=e[8],g=e[9];if(g!==Symbol.for("react.early_return_sentinel"))return g;let u;e[10]!==d?(u=d?a.jsx(es,{size:12}):a.jsx(ss,{size:12}),e[10]=d,e[11]=u):u=e[11];let f;e[12]!==s.label?(f=a.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let m;return e[14]!==o||e[15]!==l||e[16]!==c||e[17]!==r||e[18]!==u||e[19]!==f?(m=a.jsxs("button",{type:o,onClick:l,"aria-expanded":c,className:r,children:[u,f]}),e[14]=o,e[15]=l,e[16]=c,e[17]=r,e[18]=u,e[19]=f,e[20]=m):m=e[20],m}function Xs(t){const e=j.c(5),{icon:s,badge:d}=t;let i;e[0]!==d?(i=d?a.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=d,e[1]=i):i=e[1];let n;return e[2]!==s||e[3]!==i?(n=a.jsxs("span",{className:"relative shrink-0",children:[s,i]}),e[2]=s,e[3]=i,e[4]=n):n=e[4],n}function et(t){const e=j.c(22),{onNavigate:s}=t,d=I(),i=Gs(),{org:n,isActive:o}=Oe(),{isOpen:l,toggle:c}=Zs();let r;if(e[0]!==i||e[1]!==o||e[2]!==l||e[3]!==s||e[4]!==n||e[5]!==c){let b;e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==n||e[11]!==c?(b=(p,k)=>a.jsxs("div",{className:"flex flex-col",children:[p.label&&a.jsx(Qs,{group:p,open:l(p),onToggle:()=>c(p),className:A("px-2 pt-1.5 pb-0.5",k>0&&"mt-3")}),l(p)&&a.jsx(le,{className:"gap-0.5",children:p.items.map(v=>a.jsx(ce,{icon:a.jsx(Xs,{icon:v.icon,badge:v.badge}),label:v.label,isActive:o(v),link:{to:v.to,params:{org:n}},className:"gap-2.5",onSelect:()=>{F("settings_nav_clicked",{section_key:v.key,group_key:p.key}),s?.()}},v.key))})]},p.key),e[7]=o,e[8]=l,e[9]=s,e[10]=n,e[11]=c,e[12]=b):b=e[12],r=i.map(b),e[0]=i,e[1]=o,e[2]=l,e[3]=s,e[4]=n,e[5]=c,e[6]=r}else r=e[6];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[13]=g):g=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx("span",{className:"shrink-0",children:a.jsx(ts,{size:14})}),e[14]=u):u=e[14];let f;e[15]!==d?(f=d("settings.nav.signOut"),e[15]=d,e[16]=f):f=e[16];let m;e[17]!==f?(m=a.jsxs("div",{className:"mt-auto flex flex-col",children:[g,a.jsx(le,{className:"gap-0.5",children:a.jsx(ce,{icon:u,label:f,className:"gap-2.5",onSelect:st})})]}),e[17]=f,e[18]=m):m=e[18];let h;return e[19]!==r||e[20]!==m?(h=a.jsxs(a.Fragment,{children:[r,m]}),e[19]=r,e[20]=m,e[21]=h):h=e[21],h}function st(){F("signed_out",{source:"settings_sidebar"}),Xe(),M.signOut()}function tt(t){const e=j.c(8),{onNavigate:s}=t,d=I(),{org:i}=de();let n;e[0]!==d?(n=d("settings.nav.backToHome"),e[0]=d,e[1]=n):n=e[1];let o;e[2]!==i.slug?(o={to:"/$org/home",params:{org:i.slug}},e[2]=i.slug,e[3]=o):o=e[3];let l;return e[4]!==s||e[5]!==n||e[6]!==o?(l=a.jsx(Vs,{label:n,link:o,onSelect:s}),e[4]=s,e[5]=n,e[6]=o,e[7]=l):l=e[7],l}function at(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"px-4 pb-1",children:a.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.345.0"]})}),t[0]=e):e=t[0],e}function Pt(t){const e=j.c(9),{onClose:s}=t;let d,i,n;e[0]!==s?(d=a.jsx(Bs,{onClose:s}),i=a.jsx(tt,{onNavigate:s}),n=a.jsx(et,{onNavigate:s}),e[0]=s,e[1]=d,e[2]=i,e[3]=n):(d=e[1],i=e[2],n=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(at,{}),e[4]=o):o=e[4];let l;return e[5]!==d||e[6]!==i||e[7]!==n?(l=a.jsx(Ys,{sheet:!0,header:d,back:i,body:n,footer:o}),e[5]=d,e[6]=i,e[7]=n,e[8]=l):l=e[8],l}export{ce as S,qs as a,It as b,Ys as c,at as d,et as e,tt as f,Bs as g,Vs as h,Pt as i,ge as u};
|
|
1
|
+
import{c as j,Z as Re,H as je,l as A,j as a,b as I,r as O,B as me,a as M,t as D,w as Ae,bX as qe,m as Le,K as De,bY as Me,G as de,J as Fe,_ as oe,d as He,s as Ee,a1 as ve,a2 as Se,a4 as ke,o as F,a_ as ye,L as Be,a6 as fe,a5 as le,bZ as Ue,b_ as Ve,z as Ge,b$ as Je,f as Ke,k as We,c0 as Ye,c1 as Ze,c2 as Qe,a0 as Xe}from"./index-DR-7CxUP.js";import{t as es}from"./ChevronUp-CGseLBwf.js";import{i as ss}from"./ChevronRight-DyhM_Luf.js";import{h as ts}from"./TrendUp01-DhL5-hJo.js";import{I as as,T as Ne}from"./toolbar-icon-button-CyWbgFMR.js";import{i as Y}from"./Check-Bqh0edDs.js";import{i as ns}from"./ChevronSelectorVertical-S2WVRFJv.js";import{s as rs}from"./Plus-BZSUkwsF.js";import{c as he,e as W,d as Z,b as is,C as os,a as ls}from"./command-BDN-a3rJ.js";import{D as cs,d as ds,a as gs,b as us}from"./drawer-Dl4KbpLj.js";import{P as ms,a as fs,b as hs}from"./popover-zAXw_Ex4.js";import{A as ps,n as xs,e as bs,aR as js,aS as vs}from"./agent-icon-B7AXGQ6P.js";import{u as $e,L as Q,P as Ce}from"./project-icon-DZuabjud.js";import{C as Ss}from"./create-organization-dialog-BST4Ck0w.js";import{s as ks}from"./XClose-C2dpX0F_.js";import{u as ys}from"./use-destination-route-DZ6zuyom.js";import{e as Ns}from"./use-virtual-mcp-DLU-VkLe.js";import{i as $s}from"./ArrowLeft-Beb7uT2a.js";import{t as Cs,b as pe}from"./Users03-BZkJWCNu.js";import{i as ws}from"./CreditCard01-DQ2UyAUW.js";import{i as _s}from"./GitBranch01-rChCKXuD.js";import{i as zs}from"./HardDrive-CALvWP4_.js";import{i as Os}from"./Key01-D_IxGQOL.js";import{n as Ts}from"./LinkExternal01-B4pNNDj3.js";import{t as Is}from"./Stars01-D0DXnyE9.js";import{s as Ps}from"./User01-cnJUdVWa.js";import{i as Rs}from"./Zap-Bsbv5icR.js";import{u as As}from"./use-join-requests-D-siqVP0.js";function qs(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},t[0]=e):e=t[0],!!Re(e)}function ge(){const{state:t,isMobile:e}=je();return t==="collapsed"&&!e}function Ls(t){let e=0;for(let d=0;d<t.length;d++)e=t.charCodeAt(d)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function ue(t){const e=j.c(13),{org:s,size:d}=t,i=d===void 0?"sm":d,n=i==="xs"?"size-5":"size-6",o=i==="xs"?"text-[9px]":"text-xs";let l;e[0]!==n?(l=A(n,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=n,e[1]=l):l=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:Ls(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let r;e[5]!==s.logo||e[6]!==s.name||e[7]!==o?(r=s.logo?a.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):a.jsx("span",{className:A("font-semibold leading-none",o),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=o,e[8]=r):r=e[8];let g;return e[9]!==l||e[10]!==c||e[11]!==r?(g=a.jsx("div",{className:l,style:c,children:r}),e[9]=l,e[10]=c,e[11]=r,e[12]=g):g=e[12],g}function Ds({invitation:t,onChanged:e}){const s=I(),[d,i]=O.useState(!1),n=t.organizationName??s("header.orgSwitcher.unknownOrganization"),o=async()=>{i(!0);try{const r=await M.organization.acceptInvitation({invitationId:t.id});if(r.error){D.error(r.error.message),i(!1);return}}catch{D.error(s("header.orgSwitcher.failedToAcceptInvitation")),i(!1);return}D.success(s("header.orgSwitcher.joined",{name:n})),Ae();let c;try{c=(await M.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{i(!0);try{const c=await M.organization.rejectInvitation({invitationId:t.id});if(c.error){D.error(c.error.message),i(!1);return}D.success(s("header.orgSwitcher.invitationDeclined")),i(!1),e()}catch{D.error(s("header.orgSwitcher.failedToDeclineInvitation")),i(!1)}};return a.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[a.jsx(ue,{org:{name:n},size:"sm"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium",children:n}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[a.jsx(me,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:o,disabled:d,children:s("header.orgSwitcher.accept")}),a.jsx(me,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:d,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:n}),children:a.jsx(ks,{size:14})})]})]})}function we(){const t=O.useContext(qe),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>s?.()}}function Ms(t){const e=j.c(13),s=t.trim(),{data:d}=M.useSession(),i=d?.user?.id??"",n=s.length>0&&!!i,o=De.projectSearch(i,s);let l;e[0]!==s?(l=async k=>{const{signal:v}=k,S=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:v});if(!S.ok)throw new Error(`Project search failed: ${S.status}`);return await S.json()},e[0]=s,e[1]=l):l=e[1];let c;e[2]!==n||e[3]!==o||e[4]!==l?(c={queryKey:o,queryFn:l,enabled:n,placeholderData:Me,staleTime:3e4,retry:!1},e[2]=n,e[3]=o,e[4]=l,e[5]=c):c=e[5];const{data:r,isFetching:g,isPlaceholderData:u,isError:f}=Le(c);let m;e[6]!==r?.items?(m=r?.items??[],e[6]=r?.items,e[7]=m):m=e[7];const h=n&&g,b=n&&u;let p;return e[8]!==f||e[9]!==m||e[10]!==h||e[11]!==b?(p={hits:m,isSearching:h,isStale:b,isError:f},e[8]=f,e[9]=m,e[10]=h,e[11]=b,e[12]=p):p=e[12],p}function xe(t){const e=j.c(15),{id:s,label:d,createLabel:i,onCreate:n}=t;let o;e[0]!==s||e[1]!==d?(o=a.jsx("span",{id:s,className:"truncate",children:d}),e[0]=s,e[1]=d,e[2]=o):o=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(rs,{size:14}),e[3]=l):l=e[3];let c;e[4]!==i||e[5]!==n?(c=a.jsx(ve,{asChild:!0,children:a.jsx("button",{type:"button","aria-label":i,className:"-my-1 shrink-0 cursor-pointer rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",onClick:n,children:l})}),e[4]=i,e[5]=n,e[6]=c):c=e[6];let r;e[7]!==i?(r=a.jsx(Se,{side:"right",children:i}),e[7]=i,e[8]=r):r=e[8];let g;e[9]!==c||e[10]!==r?(g=a.jsxs(ke,{children:[c,r]}),e[9]=c,e[10]=r,e[11]=g):g=e[11];let u;return e[12]!==o||e[13]!==g?(u=a.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[o,g]}),e[12]=o,e[13]=g,e[14]=u):u=e[14],u}const X="min-h-9 items-center",R={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function Fs(t){const e=j.c(11),{active:s,rows:d}=t,i=I();let n,o,l,c;if(e[0]!==s||e[1]!==d||e[2]!==i){c=Symbol.for("react.early_return_sentinel");e:{const g=d.get(s);if(g?.kind!=="travel"){c=null;break e}n="border-t border-border px-3 py-2 text-xs text-warning",o=i("sidebar.picker.verbTravel",{name:g.label}),l=g.leaves&&a.jsxs("span",{className:"text-muted-foreground",children:[" ",i("sidebar.picker.verbLeaves",{name:g.leaves})]})}e[0]=s,e[1]=d,e[2]=i,e[3]=n,e[4]=o,e[5]=l,e[6]=c}else n=e[3],o=e[4],l=e[5],c=e[6];if(c!==Symbol.for("react.early_return_sentinel"))return c;let r;return e[7]!==n||e[8]!==o||e[9]!==l?(r=a.jsxs("div",{className:n,children:[o,l]}),e[7]=n,e[8]=o,e[9]=l,e[10]=r):r=e[10],r}function Hs(t){const e=j.c(27),{onClose:s,onCreateOrg:d,className:i}=t,n=I(),o=O.useId(),l=O.useId(),c=He(),{org:r}=de(),{scopeId:g,projects:u,setScope:f}=$e(),{hasMore:m}=Ns(),[h,b]=O.useState(""),[p,k]=O.useState(R.allProjects),v=O.useDeferredValue(h);let S;e[0]!==v?(S=v.trim(),e[0]=v,e[1]=S):S=e[1];const y=S,$=y.length>0,{data:w}=Ee(),{invitations:C,refetch:_}=we();let N;e[2]!==r.slug?(N=(x,z)=>x.slug===r.slug?-1:z.slug===r.slug?1:0,e[2]=r.slug,e[3]=N):N=e[3];const T=(w??[]).slice().sort(N),{hits:P,isSearching:H,isStale:Te,isError:ee}=Ms($?y:""),se=$?T.filter(x=>{const z=y.toLowerCase();return x.name.toLowerCase().includes(z)||x.slug.toLowerCase().includes(z)}):[],te=ys();let E;e[4]!==te?(E=te.startsWith("/$org/settings"),e[4]=te,e[5]=E):E=e[5];const B=E,q=new Map;let U;e[6]!==B||e[7]!==c||e[8]!==s||e[9]!==r.slug||e[10]!==f?(U=x=>{F("scope_set",{scoped:x!==null,fromSettings:B}),B?c({to:"/$org",params:{org:r.slug},search:{virtualmcpid:x??void 0}}):f(x),s()},e[6]=B,e[7]=c,e[8]=s,e[9]=r.slug,e[10]=f,e[11]=U):U=e[11];const ae=U;let V;e[12]!==c||e[13]!==s?(V=(x,z)=>{F("org_project_travel",{scoped:!!z}),c({to:"/$org",params:{org:x},search:z?{virtualmcpid:z}:{}}),s()},e[12]=c,e[13]=s,e[14]=V):V=e[14];const ne=V;let G;e[15]!==c||e[16]!==s||e[17]!==r.slug?(G=()=>{F("picker_new_project"),c({to:"/$org/agents/{-$panel}",params:{org:r.slug,panel:void 0},search:{virtualmcpid:void 0}}),s()},e[15]=c,e[16]=s,e[17]=r.slug,e[18]=G):G=e[18];const Ie=G;q.set(R.allProjects,{kind:"scope",label:n("sidebar.scope.allProjects")});let L;e[19]!==n?(L=n("sidebar.picker.searchPlaceholder"),e[19]=n,e[20]=L):L=e[20];let J;e[21]!==h||e[22]!==L?(J=a.jsx(ls,{value:h,onValueChange:b,placeholder:L}),e[21]=h,e[22]=L,e[23]=J):J=e[23];const re=is,Pe="max-h-none min-h-0 flex-1",ie=$?a.jsxs(a.Fragment,{children:[ee&&a.jsx(he,{children:n("sidebar.picker.searchFailed")}),!ee&&!H&&P.length===0&&se.length===0&&a.jsx(he,{children:n("sidebar.picker.noMatches",{query:y})}),!ee&&P.length>0&&a.jsx(W,{heading:n("sidebar.picker.projectsHeading"),className:A(Te&&"opacity-50"),children:P.map(x=>a.jsx(Es,{hit:x,currentOrgSlug:r.slug,currentOrgName:r.name,scopeId:g,rows:q,onScope:ae,onTravel:ne},`${x.orgSlug}:${x.id}`))}),se.length>0&&a.jsx(W,{heading:n("sidebar.picker.orgsHeading"),children:se.map(x=>a.jsx(be,{candidate:x,currentOrgSlug:r.slug,currentOrgName:r.name,rows:q,onTravel:ne,onClose:s},x.id))})]}):a.jsxs(a.Fragment,{children:[a.jsx(xe,{id:o,label:n("sidebar.picker.projectsHeading"),createLabel:n("sidebar.picker.newProject"),onCreate:Ie}),a.jsxs(W,{"aria-labelledby":o,children:[a.jsxs(Z,{value:R.allProjects,className:X,onSelect:()=>ae(null),children:[a.jsx("span",{className:"min-w-0 flex-1 truncate",children:n("sidebar.scope.allProjects")}),g===null&&a.jsx(Y,{size:14})]}),u.map(x=>{const z=R.project(x.id);return q.set(z,{kind:"scope",label:x.title}),a.jsxs(Z,{value:z,className:X,onSelect:()=>ae(x.id),children:[a.jsx(Ce,{icon:x.icon,name:x.title}),a.jsx("span",{className:"min-w-0 flex-1 truncate",children:x.title}),g===x.id&&a.jsx(Y,{size:14})]},x.id)}),m&&a.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:n("sidebar.picker.moreExist")})]}),a.jsx(xe,{id:l,label:n("sidebar.picker.orgsHeading"),createLabel:n("sidebar.picker.newOrganization"),onCreate:d}),a.jsxs(W,{"aria-labelledby":l,children:[C.map(x=>a.jsx(Ds,{invitation:x,onChanged:_},x.id)),T.map(x=>a.jsx(be,{candidate:x,currentOrgSlug:r.slug,currentOrgName:r.name,rows:q,onTravel:ne,onClose:s},x.id))]})]});let K;return e[24]!==re||e[25]!==ie?(K=a.jsx(re,{className:Pe,children:ie}),e[24]=re,e[25]=ie,e[26]=K):K=e[26],a.jsxs(os,{shouldFilter:!1,value:p,onValueChange:k,className:i,children:[J,K,a.jsx(Fs,{active:p,rows:q})]})}function be(t){const e=j.c(23),{candidate:s,currentOrgSlug:d,currentOrgName:i,rows:n,onTravel:o,onClose:l}=t,c=s.slug===d;let r;e[0]!==s.name||e[1]!==s.slug||e[2]!==i||e[3]!==c||e[4]!==n?(r=R.org(s.slug),n.set(r,{kind:c?"scope":"travel",label:s.name,...c?{}:{leaves:i}}),e[0]=s.name,e[1]=s.slug,e[2]=i,e[3]=c,e[4]=n,e[5]=r):r=e[5];let g;e[6]!==s.slug||e[7]!==c||e[8]!==l||e[9]!==o?(g=()=>c?l():o(s.slug),e[6]=s.slug,e[7]=c,e[8]=l,e[9]=o,e[10]=g):g=e[10];let u;e[11]!==s?(u=a.jsx(ue,{org:s,size:"xs"}),e[11]=s,e[12]=u):u=e[12];let f;e[13]!==s.name?(f=a.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[13]=s.name,e[14]=f):f=e[14];let m;e[15]!==c?(m=c&&a.jsx(Y,{size:14}),e[15]=c,e[16]=m):m=e[16];let h;return e[17]!==g||e[18]!==u||e[19]!==f||e[20]!==m||e[21]!==r?(h=a.jsxs(Z,{value:r,className:X,onSelect:g,children:[u,f,m]}),e[17]=g,e[18]=u,e[19]=f,e[20]=m,e[21]=r,e[22]=h):h=e[22],h}function Es(t){const e=j.c(31),{hit:s,currentOrgSlug:d,currentOrgName:i,scopeId:n,rows:o,onScope:l,onTravel:c}=t,r=s.orgSlug===d;let g;e[0]!==i||e[1]!==s.id||e[2]!==s.orgSlug||e[3]!==s.title||e[4]!==r||e[5]!==o?(g=r?R.project(s.id):R.foreignProject(s.orgSlug,s.id),o.set(g,{kind:r?"scope":"travel",label:s.title,leaves:r?void 0:i}),e[0]=i,e[1]=s.id,e[2]=s.orgSlug,e[3]=s.title,e[4]=r,e[5]=o,e[6]=g):g=e[6];let u;e[7]!==s.id||e[8]!==s.orgSlug||e[9]!==r||e[10]!==l||e[11]!==c?(u=()=>r?l(s.id):c(s.orgSlug,s.id),e[7]=s.id,e[8]=s.orgSlug,e[9]=r,e[10]=l,e[11]=c,e[12]=u):u=e[12];let f;e[13]!==s.icon||e[14]!==s.title?(f=a.jsx(Ce,{icon:s.icon,name:s.title}),e[13]=s.icon,e[14]=s.title,e[15]=f):f=e[15];let m;e[16]!==s.title?(m=a.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[16]=s.title,e[17]=m):m=e[17];let h;e[18]!==s.orgName?(h=a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[18]=s.orgName,e[19]=h):h=e[19];let b;e[20]!==s.id||e[21]!==r||e[22]!==n?(b=r&&n===s.id&&a.jsx(Y,{size:14}),e[20]=s.id,e[21]=r,e[22]=n,e[23]=b):b=e[23];let p;return e[24]!==u||e[25]!==f||e[26]!==m||e[27]!==h||e[28]!==b||e[29]!==g?(p=a.jsxs(Z,{value:g,className:X,onSelect:u,children:[f,m,h,b]}),e[24]=u,e[25]=f,e[26]=m,e[27]=h,e[28]=b,e[29]=g,e[30]=p):p=e[30],p}function _e(t){const e=j.c(32),{collapsed:s,onNavigate:d}=t,i=s===void 0?!1:s,n=I(),{org:o}=de(),{project:l}=$e(),{invitations:c}=we(),[r,g]=O.useState(!1),[u,f]=O.useState(!1),m=Fe();let h;if(e[0]!==i||e[1]!==c.length||e[2]!==o||e[3]!==l||e[4]!==n){const _=l?n("sidebar.picker.projectInOrg",{project:l.title,org:o.name}):o.name;let N;e[6]!==o||e[7]!==l?(N=l?a.jsx(ps,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):a.jsx(ue,{org:o,size:"sm"}),e[6]=o,e[7]=l,e[8]=N):N=e[8];let T;e[9]!==c.length?(T=c.length>0&&a.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=c.length,e[10]=T):T=e[10];let P;e[11]!==N||e[12]!==T?(P=a.jsxs("div",{className:"relative inline-flex shrink-0",children:[N,T]}),e[11]=N,e[12]=T,e[13]=P):P=e[13];const H=P;h=i?a.jsx(oe,{tooltip:_,"data-tour":Q.switcher,children:H}):a.jsxs("button",{type:"button","data-tour":Q.switcher,"aria-label":n("sidebar.picker.ariaLabel",{name:_}),className:A("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",as),children:[H,a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:o.name}),a.jsx(ns,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=i,e[1]=c.length,e[2]=o,e[3]=l,e[4]=n,e[5]=h}else h=e[5];const b=h,p=m?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let k;e[14]!==d?(k=()=>{g(!1),d?.()},e[14]=d,e[15]=k):k=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{g(!1),f(!0)},e[16]=v):v=e[16];let S;e[17]!==p||e[18]!==k?(S=a.jsx(Hs,{onClose:k,onCreateOrg:v,className:p}),e[17]=p,e[18]=k,e[19]=S):S=e[19];const y=S;let $;e[20]!==i||e[21]!==y||e[22]!==m||e[23]!==r||e[24]!==n||e[25]!==b?($=m?a.jsxs(cs,{open:r,onOpenChange:g,direction:"bottom",children:[a.jsx(ds,{asChild:!0,children:b}),a.jsxs(gs,{className:"flex max-h-[85dvh] flex-col p-0",children:[a.jsx(us,{className:"sr-only",children:n("sidebar.picker.title")}),y]})]}):a.jsxs(ms,{open:r,onOpenChange:g,children:[a.jsx(fs,{asChild:!0,children:b}),a.jsx(hs,{side:i?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:y})]}),e[20]=i,e[21]=y,e[22]=m,e[23]=r,e[24]=n,e[25]=b,e[26]=$):$=e[26];let w;e[27]!==u?(w=a.jsx(Ss,{open:u,onOpenChange:f}),e[27]=u,e[28]=w):w=e[28];let C;return e[29]!==$||e[30]!==w?(C=a.jsxs(a.Fragment,{children:[$,w]}),e[29]=$,e[30]=w,e[31]=C):C=e[31],C}const ze=16;function It(){const t=j.c(7),e=ge(),s=qs();let d;t[0]!==e?(d=a.jsx(_e,{collapsed:e}),t[0]=e,t[1]=d):d=t[1];let i;t[2]!==s?(i=!s&&a.jsx(Us,{}),t[2]=s,t[3]=i):i=t[3];let n;return t[4]!==d||t[5]!==i?(n=a.jsxs(a.Fragment,{children:[d,i]}),t[4]=d,t[5]=i,t[6]=n):n=t[6],n}function Bs(t){const e=j.c(12),{onClose:s}=t,d=I();let i;e[0]!==s?(i=a.jsx(_e,{onNavigate:s}),e[0]=s,e[1]=i):i=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx("div",{className:"flex-1"}),e[2]=n):n=e[2];let o;e[3]!==d?(o=d("sidebar.header.closeSidebar"),e[3]=d,e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(ye,{size:ze}),e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==o?(c=a.jsx(Ne,{onClick:s,"aria-label":o,children:l}),e[6]=s,e[7]=o,e[8]=c):c=e[8];let r;return e[9]!==i||e[10]!==c?(r=a.jsxs(a.Fragment,{children:[i,n,c]}),e[9]=i,e[10]=c,e[11]=r):r=e[11],r}function Us(){const t=j.c(12),e=I(),s=ge(),{toggleSidebar:d}=je();let i;t[0]!==e?(i=e("sidebar.header.toggleSidebar"),t[0]=e,t[1]=i):i=t[1];const n=i;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(ye,{size:ze}),t[2]=o):o=t[2];let l;t[3]!==n||t[4]!==d?(l=a.jsx(ve,{asChild:!0,children:a.jsx(Ne,{"aria-label":n,onClick:d,className:"shrink-0 rounded-lg md:size-[34px] group-data-[state=collapsed]/sidebar:mx-auto",children:o})}),t[3]=n,t[4]=d,t[5]=l):l=t[5];const c=!s;let r;t[6]!==n||t[7]!==c?(r=a.jsx(Se,{side:"right",hidden:c,children:n}),t[6]=n,t[7]=c,t[8]=r):r=t[8];let g;return t[9]!==l||t[10]!==r?(g=a.jsxs(ke,{children:[l,r]}),t[9]=l,t[10]=r,t[11]=g):g=t[11],g}function ce(t){const e=j.c(30),{icon:s,label:d,isActive:i,link:n,onSelect:o,ariaLabel:l,className:c,dataTour:r,children:g}=t,u=i===void 0?!1:i,f=ge(),m=l??d,h=f?m:void 0;let b;e[0]!==c||e[1]!==r||e[2]!==u||e[3]!==h?(b={isActive:u,tooltip:h,className:c,"data-tour":r},e[0]=c,e[1]=r,e[2]=u,e[3]=h,e[4]=b):b=e[4];const p=b;let k;e[5]!==d?(k=a.jsx("span",{className:"truncate",children:d}),e[5]=d,e[6]=k):k=e[6];let v;e[7]!==s||e[8]!==k?(v=a.jsxs(a.Fragment,{children:[s,k]}),e[7]=s,e[8]=k,e[9]=v):v=e[9];const S=v;if(n){const w=u?"page":void 0;let C;e[10]!==S||e[11]!==n||e[12]!==m||e[13]!==o||e[14]!==w?(C=a.jsx(Be,{...n,"aria-label":m,"aria-current":w,onClick:o,children:S}),e[10]=S,e[11]=n,e[12]=m,e[13]=o,e[14]=w,e[15]=C):C=e[15];let _;e[16]!==p||e[17]!==C?(_=a.jsx(oe,{asChild:!0,...p,children:C}),e[16]=p,e[17]=C,e[18]=_):_=e[18];let N;return e[19]!==g||e[20]!==_?(N=a.jsxs(fe,{children:[_,g]}),e[19]=g,e[20]=_,e[21]=N):N=e[21],N}let y;e[22]!==S||e[23]!==m||e[24]!==o||e[25]!==p?(y=a.jsx(oe,{...p,"aria-label":m,onClick:o,children:S}),e[22]=S,e[23]=m,e[24]=o,e[25]=p,e[26]=y):y=e[26];let $;return e[27]!==g||e[28]!==y?($=a.jsxs(fe,{children:[y,g]}),e[27]=g,e[28]=y,e[29]=$):$=e[29],$}function Vs(t){const e=j.c(5),{label:s,link:d,onSelect:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx($s,{size:16}),e[0]=n):n=e[0];let o;return e[1]!==s||e[2]!==d||e[3]!==i?(o=a.jsx("div",{className:"-mx-2 border-b border-sidebar-border px-2 py-2",children:a.jsx(le,{className:"shrink-0",children:a.jsx(ce,{icon:n,label:s,className:"text-sidebar-foreground/70",link:d,onSelect:i})})}),e[1]=s,e[2]=d,e[3]=i,e[4]=o):o=e[4],o}function Gs(){const t=j.c(8),e=I(),{capabilities:s,isPrivileged:d,loading:i,error:n}=Ue(),o=As().length,l=Ve();let c;return t[0]!==s||t[1]!==n||t[2]!==d||t[3]!==o||t[4]!==i||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:a.jsx(Ps,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:a.jsx(Cs,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:a.jsx(ws,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:a.jsx(Ts,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:a.jsx(xs,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"repositories",label:e("settings.nav.repositories"),icon:a.jsx(_s,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:a.jsx(bs,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:a.jsx(pe,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:a.jsx(Rs,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:a.jsx(Is,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:a.jsx(js,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:a.jsx(pe,{size:14}),to:"/$org/settings/members",group:"members",badge:o}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:a.jsx(Os,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:a.jsx(zs,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:e("settings.nav.store"),icon:a.jsx(vs,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:e("settings.nav.security"),icon:a.jsx(Ge,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(g=>({...g,items:g.items.flatMap(u=>{if(u.group){const[f]=l[u.group];return f?[{...u,to:f.to}]:Je(u.group)?[]:[u]}return i||n?[u]:u.privilegedOnly?d?[u]:[]:u.requires?d||s[u.requires]?[u]:[]:[u]})})).filter(Js),t[0]=s,t[1]=n,t[2]=d,t[3]=o,t[4]=i,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function Js(t){return t.items.length>0}function Oe(){const t=j.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=Ke(e);let d;t[1]===Symbol.for("react.memo_cache_sentinel")?(d={select:Ks},t[1]=d):d=t[1];const i=We(d);let n;if(t[2]!==s||t[3]!==i){const c=r=>{const g=r.replace("$org",s);return i===g||i.startsWith(`${g}/`)};n=r=>[r.to,...r.group?Ye(r.group):[]].some(c),t[2]=s,t[3]=i,t[4]=n}else n=t[4];const o=n;let l;return t[5]!==o||t[6]!==s?(l={org:s,isActive:o},t[5]=o,t[6]=s,t[7]=l):l=t[7],l}function Ks(t){return t.location.pathname}const Ws="pt-1.5";function Ys(t){const e=j.c(15),{header:s,back:d,body:i,footer:n,sheet:o}=t;let l;e[0]!==s?(l=s&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex h-12 shrink-0 flex-row items-center gap-2 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:py-2",children:s}),a.jsx("div",{className:"mt-1.5 h-px shrink-0 bg-sidebar-border"})]}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==d?(c=d&&a.jsx("div",{className:"shrink-0 px-2",children:d}),e[2]=d,e[3]=c):c=e[3];let r;e[4]!==i?(r=a.jsx(Ze,{className:"gap-0 overflow-y-auto px-2 pt-2 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:i}),e[4]=i,e[5]=r):r=e[5];let g;e[6]!==n||e[7]!==l||e[8]!==c||e[9]!==r?(g=a.jsxs(a.Fragment,{children:[l,c,r,n]}),e[6]=n,e[7]=l,e[8]=c,e[9]=r,e[10]=g):g=e[10];const u=g;if(o){let m;return e[11]!==u?(m=a.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":Q.nav,children:u}),e[11]=u,e[12]=m):m=e[12],m}let f;return e[13]!==u?(f=a.jsx(Qe,{className:Ws,"data-tour":Q.nav,children:u}),e[13]=u,e[14]=f):f=e[14],f}function Zs(){const t=j.c(9),{isActive:e}=Oe();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[d,i]=O.useState(s);let n;t[1]!==e||t[2]!==d?(n=g=>d[g.key]??(!g.collapsible||g.items.some(e)),t[1]=e,t[2]=d,t[3]=n):n=t[3];const o=n;let l;t[4]!==o?(l=g=>i(u=>({...u,[g.key]:!o(g)})),t[4]=o,t[5]=l):l=t[5];const c=l;let r;return t[6]!==o||t[7]!==c?(r={isOpen:o,toggle:c},t[6]=o,t[7]=c,t[8]=r):r=t[8],r}function Qs(t){const e=j.c(21),{group:s,open:d,onToggle:i,className:n}=t;let o,l,c,r,g;if(e[0]!==n||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==i||e[4]!==d){g=Symbol.for("react.early_return_sentinel");e:{const h=A("text-xs font-medium text-muted-foreground/60 truncate",n);if(!s.collapsible){g=a.jsx("p",{className:h,children:s.label});break e}o="button",l=i,c=d,r=A("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",h)}e[0]=n,e[1]=s.collapsible,e[2]=s.label,e[3]=i,e[4]=d,e[5]=o,e[6]=l,e[7]=c,e[8]=r,e[9]=g}else o=e[5],l=e[6],c=e[7],r=e[8],g=e[9];if(g!==Symbol.for("react.early_return_sentinel"))return g;let u;e[10]!==d?(u=d?a.jsx(es,{size:12}):a.jsx(ss,{size:12}),e[10]=d,e[11]=u):u=e[11];let f;e[12]!==s.label?(f=a.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let m;return e[14]!==o||e[15]!==l||e[16]!==c||e[17]!==r||e[18]!==u||e[19]!==f?(m=a.jsxs("button",{type:o,onClick:l,"aria-expanded":c,className:r,children:[u,f]}),e[14]=o,e[15]=l,e[16]=c,e[17]=r,e[18]=u,e[19]=f,e[20]=m):m=e[20],m}function Xs(t){const e=j.c(5),{icon:s,badge:d}=t;let i;e[0]!==d?(i=d?a.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=d,e[1]=i):i=e[1];let n;return e[2]!==s||e[3]!==i?(n=a.jsxs("span",{className:"relative shrink-0",children:[s,i]}),e[2]=s,e[3]=i,e[4]=n):n=e[4],n}function et(t){const e=j.c(22),{onNavigate:s}=t,d=I(),i=Gs(),{org:n,isActive:o}=Oe(),{isOpen:l,toggle:c}=Zs();let r;if(e[0]!==i||e[1]!==o||e[2]!==l||e[3]!==s||e[4]!==n||e[5]!==c){let b;e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==n||e[11]!==c?(b=(p,k)=>a.jsxs("div",{className:"flex flex-col",children:[p.label&&a.jsx(Qs,{group:p,open:l(p),onToggle:()=>c(p),className:A("px-2 pt-1.5 pb-0.5",k>0&&"mt-3")}),l(p)&&a.jsx(le,{className:"gap-0.5",children:p.items.map(v=>a.jsx(ce,{icon:a.jsx(Xs,{icon:v.icon,badge:v.badge}),label:v.label,isActive:o(v),link:{to:v.to,params:{org:n}},className:"gap-2.5",onSelect:()=>{F("settings_nav_clicked",{section_key:v.key,group_key:p.key}),s?.()}},v.key))})]},p.key),e[7]=o,e[8]=l,e[9]=s,e[10]=n,e[11]=c,e[12]=b):b=e[12],r=i.map(b),e[0]=i,e[1]=o,e[2]=l,e[3]=s,e[4]=n,e[5]=c,e[6]=r}else r=e[6];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[13]=g):g=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx("span",{className:"shrink-0",children:a.jsx(ts,{size:14})}),e[14]=u):u=e[14];let f;e[15]!==d?(f=d("settings.nav.signOut"),e[15]=d,e[16]=f):f=e[16];let m;e[17]!==f?(m=a.jsxs("div",{className:"mt-auto flex flex-col",children:[g,a.jsx(le,{className:"gap-0.5",children:a.jsx(ce,{icon:u,label:f,className:"gap-2.5",onSelect:st})})]}),e[17]=f,e[18]=m):m=e[18];let h;return e[19]!==r||e[20]!==m?(h=a.jsxs(a.Fragment,{children:[r,m]}),e[19]=r,e[20]=m,e[21]=h):h=e[21],h}function st(){F("signed_out",{source:"settings_sidebar"}),Xe(),M.signOut()}function tt(t){const e=j.c(8),{onNavigate:s}=t,d=I(),{org:i}=de();let n;e[0]!==d?(n=d("settings.nav.backToHome"),e[0]=d,e[1]=n):n=e[1];let o;e[2]!==i.slug?(o={to:"/$org/home",params:{org:i.slug}},e[2]=i.slug,e[3]=o):o=e[3];let l;return e[4]!==s||e[5]!==n||e[6]!==o?(l=a.jsx(Vs,{label:n,link:o,onSelect:s}),e[4]=s,e[5]=n,e[6]=o,e[7]=l):l=e[7],l}function at(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"px-4 pb-1",children:a.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.345.1"]})}),t[0]=e):e=t[0],e}function Pt(t){const e=j.c(9),{onClose:s}=t;let d,i,n;e[0]!==s?(d=a.jsx(Bs,{onClose:s}),i=a.jsx(tt,{onNavigate:s}),n=a.jsx(et,{onNavigate:s}),e[0]=s,e[1]=d,e[2]=i,e[3]=n):(d=e[1],i=e[2],n=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(at,{}),e[4]=o):o=e[4];let l;return e[5]!==d||e[6]!==i||e[7]!==n?(l=a.jsx(Ys,{sheet:!0,header:d,back:i,body:n,footer:o}),e[5]=d,e[6]=i,e[7]=n,e[8]=l):l=e[8],l}export{ce as S,qs as a,It as b,Ys as c,at as d,et as e,tt as f,Bs as g,Vs as h,Pt as i,ge as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,b as u,H as d,j as b,a_ as S,bh as p,bi as x,bj as g}from"./index-
|
|
1
|
+
import{c as m,b as u,H as d,j as b,a_ as S,bh as p,bi as x,bj as g}from"./index-DR-7CxUP.js";import{T as j}from"./toolbar-icon-button-CyWbgFMR.js";function y(h){const e=m.c(7),{className:o}=h,n=u(),{toggleSidebar:i}=d();let t;e[0]!==n?(t=n("layouts.shellControls.toggleSidebar"),e[0]=n,e[1]=t):t=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=b.jsx(S,{size:16}),e[2]=s):s=e[2];let l;return e[3]!==o||e[4]!==t||e[5]!==i?(l=b.jsx(j,{onClick:i,"aria-label":t,className:o,children:s}),e[3]=o,e[4]=t,e[5]=i,e[6]=l):l=e[6],l}function M(h){const e=m.c(16),{renderSidebar:o}=h,n=u(),{openMobile:i,setOpenMobile:t}=d();let s;e[0]!==n?(s=n("layouts.shellControls.navigationTitle"),e[0]=n,e[1]=s):s=e[1];let l;e[2]!==s?(l=b.jsx(p,{className:"sr-only",children:s}),e[2]=s,e[3]=l):l=e[3];let a;e[4]!==t?(a=()=>t(!1),e[4]=t,e[5]=a):a=e[5];let r;e[6]!==o||e[7]!==a?(r=o({onClose:a}),e[6]=o,e[7]=a,e[8]=r):r=e[8];let c;e[9]!==l||e[10]!==r?(c=b.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[l,r]}),e[9]=l,e[10]=r,e[11]=c):c=e[11];let f;return e[12]!==i||e[13]!==t||e[14]!==c?(f=b.jsx(g,{open:i,onOpenChange:t,children:c}),e[12]=i,e[13]=t,e[14]=c,e[15]=f):f=e[15],f}export{M,y as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,b as W,e as qe,j as n,B as M,t as Fe,cO as me,z as pt,a as Re,w as Mt,x as yt,K as Ke,cP as Ft,cQ as zt,M as $e,l as et,bl as qt,r as V,d as bt,G as ot,m as Be,o as tt,b7 as at,v as Bt,cR as Kt,cS as Ht,cT as Ut,cU as Gt,cV as Jt,C as Vt,u as Wt,Z as Yt,c9 as Qt,cW as Xt,k as xt,cX as Xe,cY as Zt,cZ as en,O as tn,c_ as nn}from"./index-fS0pDoNW.js";import{A as Qe}from"./avatar-ncVfbaUx.js";import{t as St,b as rt}from"./Users03-CrZajyAo.js";import{d as sn}from"./TrendUp01-NTK3Zf_M.js";import{b6 as on,az as an,b3 as te,b7 as rn,aG as ln,b8 as cn,n as lt,g as dn,f as un,b9 as mn,d as fn}from"./agent-icon-BrQLA9dC.js";import{s as gn}from"./XClose-C-bbcgCJ.js";import{D as hn,u as pn,c as yn,d as bn,b as xn}from"./thread-route-m3qiCJQP.js";import{l as wt,a as Sn,u as wn,P as vn}from"./project-icon-DD8-TjG9.js";import{u as jn,D as ne}from"./use-destination-route-WysfeR7S.js";import{i as kn}from"./source-system-tabs-CnEGUb4r.js";import{u as vt,a as Tn}from"./use-panel-navigate-BNmxrdjd.js";import{i as ie}from"./CheckCircle-CwJqWx0e.js";import{i as ct}from"./Tool02-KStnzngn.js";import{i as Ze}from"./Monitor01-CY2DbFkD.js";import{i as ae}from"./Zap-D6-O3NZl.js";import{c as jt,d as kt,b as Tt,D as Nt,h as Nn,e as _n}from"./dialog-DKxWMb0-.js";import{i as An}from"./Share07-CgTNZ1dk.js";import{s as dt}from"./Plus-CgVmxzR4.js";import{a as Pn}from"./Settings02-Dss_LnvC.js";import{d as ce,e as We,a as Cn,c as En,b as On,f as In}from"./command-CTH7s7Ya.js";import{e as Ln,m as Dn}from"./use-mcp-client-DtsRGdvB.js";import{S as _t,a as $n}from"./constants-Daqiz8AS.js";import{S as Rn,a as Mn}from"./hooks-BOHEAk9Y.js";import{u as Fn}from"./use-is-desktop-app-BNujXJc_.js";import{R as zn}from"./required-auth-layout-CR5eG3sF.js";import{A as qn}from"./autosend-CI7ToXd3.js";import{f as Bn}from"./use-organization-settings-nKtEvYQd.js";import{u as Kn}from"./use-org-sso-DzsFzLff.js";import{u as Hn}from"./use-org-notice-B64MrAd9.js";function Un(t){const e=$.c(49),{orgName:s,orgSlug:r,orgLogo:o,domain:a}=t,i=W();let u;e[0]!==r||e[1]!==i?(u=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),A=await k.json();if(!k.ok||!A.success)throw new Error(A.error??i("common.autoDomainJoinScreen.joinError"));return A},e[0]=r,e[1]=i,e[2]=u):u=e[2];let m;e[3]!==r?(m=k=>{window.location.href=`/${k.slug??r}`},e[3]=r,e[4]=m):m=e[4];let y;e[5]!==i?(y=k=>{Fe.error(k instanceof Error?k.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=y):y=e[6];let v;e[7]!==u||e[8]!==m||e[9]!==y?(v={mutationFn:u,onSuccess:m,onError:y},e[7]=u,e[8]=m,e[9]=y,e[10]=v):v=e[10];const c=qe(v),x=Gn;let p;e[11]!==o||e[12]!==s?(p=o?n.jsx(Qe,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(St,{className:"h-6 w-6 text-primary"})}),e[11]=o,e[12]=s,e[13]=p):p=e[13];let l;e[14]!==s||e[15]!==i?(l=i("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=i,e[16]=l):l=e[16];let f;e[17]!==l?(f=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[17]=l,e[18]=f):f=e[18];let d;e[19]!==a||e[20]!==i?(d=i("common.autoDomainJoinScreen.joinDescription",{domain:a}),e[19]=a,e[20]=i,e[21]=d):d=e[21];let S;e[22]!==d?(S=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[22]=d,e[23]=S):S=e[23];let w;e[24]!==f||e[25]!==S?(w=n.jsxs("div",{className:"space-y-2",children:[f,S]}),e[24]=f,e[25]=S,e[26]=w):w=e[26];let b;e[27]!==c?(b=()=>c.mutate(),e[27]=c,e[28]=b):b=e[28];let g;e[29]!==c.isPending||e[30]!==s||e[31]!==i?(g=c.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=c.isPending,e[30]=s,e[31]=i,e[32]=g):g=e[32];let _;e[33]!==c.isPending||e[34]!==b||e[35]!==g?(_=n.jsx(M,{onClick:b,disabled:c.isPending,children:g}),e[33]=c.isPending,e[34]=b,e[35]=g,e[36]=_):_=e[36];const P=c.isPending;let T;e[37]!==i?(T=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=T):T=e[38];let j;e[39]!==c.isPending||e[40]!==T?(j=n.jsx(M,{variant:"ghost",onClick:x,disabled:P,children:T}),e[39]=c.isPending,e[40]=T,e[41]=j):j=e[41];let h;e[42]!==_||e[43]!==j?(h=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,j]}),e[42]=_,e[43]=j,e[44]=h):h=e[44];let N;return e[45]!==w||e[46]!==h||e[47]!==p?(N=n.jsxs(me,{children:[p,w,h]}),e[45]=w,e[46]=h,e[47]=p,e[48]=N):N=e[48],N}function Gn(){window.location.href="/"}function ut(t){const e=$.c(25),{orgSlug:s,orgName:r,reason:o}=t,a=W(),i=Jn,u=o==="not-found",m=u?sn:pt;let y;e[0]!==u||e[1]!==a?(y=a(u?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=u,e[1]=a,e[2]=y):y=e[2];const v=y;let c;e[3]!==u||e[4]!==r||e[5]!==s||e[6]!==a?(c=u?n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:r??s}),".",n.jsx("br",{}),a("common.noAccessScreen.askAdminToInvite")]}),e[3]=u,e[4]=r,e[5]=s,e[6]=a,e[7]=c):c=e[7];const x=c;let p;e[8]!==m?(p=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(m,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=m,e[9]=p):p=e[9];let l;e[10]!==v?(l=n.jsx("h3",{className:"text-lg font-medium",children:v}),e[10]=v,e[11]=l):l=e[11];let f;e[12]!==x?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[12]=x,e[13]=f):f=e[13];let d;e[14]!==l||e[15]!==f?(d=n.jsxs("div",{className:"space-y-2",children:[l,f]}),e[14]=l,e[15]=f,e[16]=d):d=e[16];let S;e[17]!==a?(S=a("common.noAccessScreen.goToHome"),e[17]=a,e[18]=S):S=e[18];let w;e[19]!==S?(w=n.jsx(M,{onClick:i,children:S}),e[19]=S,e[20]=w):w=e[20];let b;return e[21]!==p||e[22]!==d||e[23]!==w?(b=n.jsxs(me,{children:[p,d,w]}),e[21]=p,e[22]=d,e[23]=w,e[24]=b):b=e[24],b}function Jn(){window.location.href="/"}function Vn(t){const e=$.c(59),{invitationId:s,orgName:r,orgSlug:o,orgLogo:a}=t,i=W();let u;e[0]!==s?(u=async()=>{const L=await Re.organization.acceptInvitation({invitationId:s});if(L.error)throw new Error(L.error.message);return L.data},e[0]=s,e[1]=u):u=e[1];let m;e[2]!==o?(m=()=>{Mt(),window.location.href=`/${o}`},e[2]=o,e[3]=m):m=e[3];let y;e[4]!==i?(y=L=>{Fe.error(L instanceof Error?L.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=y):y=e[5];let v;e[6]!==u||e[7]!==m||e[8]!==y?(v={mutationFn:u,onSuccess:m,onError:y},e[6]=u,e[7]=m,e[8]=y,e[9]=v):v=e[9];const c=qe(v);let x;e[10]!==s?(x=async()=>{const L=await Re.organization.rejectInvitation({invitationId:s});if(L.error)throw new Error(L.error.message);return L.data},e[10]=s,e[11]=x):x=e[11];let p,l;e[12]!==i?(p=()=>{Fe.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},l=L=>{Fe.error(L instanceof Error?L.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=p,e[14]=l):(p=e[13],l=e[14]);let f;e[15]!==x||e[16]!==p||e[17]!==l?(f={mutationFn:x,onSuccess:p,onError:l},e[15]=x,e[16]=p,e[17]=l,e[18]=f):f=e[18];const d=qe(f),S=c.isPending||d.isPending;let w;e[19]!==a||e[20]!==r?(w=a?n.jsx(Qe,{url:a,fallback:r.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(on,{className:"h-6 w-6 text-primary"})}),e[19]=a,e[20]=r,e[21]=w):w=e[21];let b;e[22]!==r||e[23]!==i?(b=i("common.pendingInviteScreen.invitedTo",{orgName:r}),e[22]=r,e[23]=i,e[24]=b):b=e[24];let g;e[25]!==b?(g=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[25]=b,e[26]=g):g=e[26];let _;e[27]!==i?(_=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=_):_=e[28];let P;e[29]!==_?(P=n.jsx("p",{className:"text-sm text-muted-foreground",children:_}),e[29]=_,e[30]=P):P=e[30];let T;e[31]!==g||e[32]!==P?(T=n.jsxs("div",{className:"space-y-2",children:[g,P]}),e[31]=g,e[32]=P,e[33]=T):T=e[33];let j;e[34]!==c?(j=()=>c.mutate(),e[34]=c,e[35]=j):j=e[35];let h;e[36]!==c.isPending||e[37]!==i?(h=c.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=i,e[38]=h):h=e[38];let N;e[39]!==S||e[40]!==j||e[41]!==h?(N=n.jsx(M,{onClick:j,disabled:S,children:h}),e[39]=S,e[40]=j,e[41]=h,e[42]=N):N=e[42];let k;e[43]!==d?(k=()=>d.mutate(),e[43]=d,e[44]=k):k=e[44];let A;e[45]!==d.isPending||e[46]!==i?(A=d.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=d.isPending,e[46]=i,e[47]=A):A=e[47];let E;e[48]!==S||e[49]!==k||e[50]!==A?(E=n.jsx(M,{variant:"ghost",onClick:k,disabled:S,children:A}),e[48]=S,e[49]=k,e[50]=A,e[51]=E):E=e[51];let C;e[52]!==N||e[53]!==E?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,E]}),e[52]=N,e[53]=E,e[54]=C):C=e[54];let O;return e[55]!==T||e[56]!==C||e[57]!==w?(O=n.jsxs(me,{children:[w,T,C]}),e[55]=T,e[56]=C,e[57]=w,e[58]=O):O=e[58],O}function Wn(t){const e=$.c(23),{orgName:s,orgLogo:r}=t,o=W();let a;e[0]!==r||e[1]!==s?(a=r?n.jsx(Qe,{url:r,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(an,{className:"h-6 w-6 text-primary"})}),e[0]=r,e[1]=s,e[2]=a):a=e[2];let i;e[3]!==o?(i=o("common.requestPendingScreen.title"),e[3]=o,e[4]=i):i=e[4];let u;e[5]!==i?(u=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=u):u=e[6];let m;e[7]!==s||e[8]!==o?(m=o("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=o,e[9]=m):m=e[9];let y;e[10]!==m?(y=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[10]=m,e[11]=y):y=e[11];let v;e[12]!==u||e[13]!==y?(v=n.jsxs("div",{className:"space-y-2",children:[u,y]}),e[12]=u,e[13]=y,e[14]=v):v=e[14];let c;e[15]!==o?(c=o("common.requestPendingScreen.goHome"),e[15]=o,e[16]=c):c=e[16];let x;e[17]!==c?(x=n.jsx(M,{variant:"ghost",onClick:Yn,children:c}),e[17]=c,e[18]=x):x=e[18];let p;return e[19]!==a||e[20]!==v||e[21]!==x?(p=n.jsxs(me,{children:[a,v,x]}),e[19]=a,e[20]=v,e[21]=x,e[22]=p):p=e[22],p}function Yn(){window.location.href="/"}function Qn(t){const e=$.c(45),{orgName:s,orgSlug:r,orgLogo:o,domain:a}=t,i=W();let u;e[0]!==r?(u=async()=>{const N=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),k=await N.json();if(!N.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=r,e[1]=u):u=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=Zn,e[2]=m):m=e[2];let y;e[3]!==i?(y=N=>{Fe.error(N instanceof Error?N.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=y):y=e[4];let v;e[5]!==u||e[6]!==y?(v={mutationFn:u,onSuccess:m,onError:y},e[5]=u,e[6]=y,e[7]=v):v=e[7];const c=qe(v);let x;e[8]!==o||e[9]!==s?(x=o?n.jsx(Qe,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(St,{className:"h-6 w-6 text-primary"})}),e[8]=o,e[9]=s,e[10]=x):x=e[10];let p;e[11]!==s||e[12]!==i?(p=i("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=i,e[13]=p):p=e[13];let l;e[14]!==p?(l=n.jsx("h3",{className:"text-lg font-medium",children:p}),e[14]=p,e[15]=l):l=e[15];let f;e[16]!==a||e[17]!==i?(f=i("common.requestToJoinScreen.description",{domain:a}),e[16]=a,e[17]=i,e[18]=f):f=e[18];let d;e[19]!==f?(d=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[19]=f,e[20]=d):d=e[20];let S;e[21]!==l||e[22]!==d?(S=n.jsxs("div",{className:"space-y-2",children:[l,d]}),e[21]=l,e[22]=d,e[23]=S):S=e[23];let w;e[24]!==c?(w=()=>c.mutate(),e[24]=c,e[25]=w):w=e[25];let b;e[26]!==c.isPending||e[27]!==i?(b=c.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=i,e[28]=b):b=e[28];let g;e[29]!==c.isPending||e[30]!==w||e[31]!==b?(g=n.jsx(M,{onClick:w,disabled:c.isPending,children:b}),e[29]=c.isPending,e[30]=w,e[31]=b,e[32]=g):g=e[32];const _=c.isPending;let P;e[33]!==i?(P=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=P):P=e[34];let T;e[35]!==c.isPending||e[36]!==P?(T=n.jsx(M,{variant:"ghost",onClick:Xn,disabled:_,children:P}),e[35]=c.isPending,e[36]=P,e[37]=T):T=e[37];let j;e[38]!==g||e[39]!==T?(j=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,T]}),e[38]=g,e[39]=T,e[40]=j):j=e[40];let h;return e[41]!==S||e[42]!==j||e[43]!==x?(h=n.jsxs(me,{children:[x,S,j]}),e[41]=S,e[42]=j,e[43]=x,e[44]=h):h=e[44],h}function Xn(){window.location.href="/"}function Zn(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function es(t){const e=$.c(7);let s;e[0]!==t?(s=Ke.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==t?(r=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=r):r=e[3];let o;return e[4]!==s||e[5]!==r?(o={queryKey:s,queryFn:r,refetchOnWindowFocus:!1},e[4]=s,e[5]=r,e[6]=o):o=e[6],yt(o)}function ts({orgSlug:t}){const{data:e}=es(t);if(e.status!=="member"){Ft()?.org===t&&zt();const s=localStorage.getItem($e.lastOrgSlug())===t;if(s&&localStorage.removeItem($e.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(ut,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(Vn,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(Un,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Qn,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(Wn,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(ut,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function At(t){const e=$.c(42),{ariaLabel:s,dismissLabel:r,eyebrow:o,title:a,description:i,icon:u,children:m,footerLeading:y,actions:v,onDismiss:c,tone:x}=t,p=x===void 0?"neutral":x,l=y||v;let f;e[0]!==p?(f=p==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=p,e[1]=f):f=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(gn,{size:14}),e[2]=d):d=e[2];let S;e[3]!==r||e[4]!==c?(S=n.jsx(M,{size:"icon-sm",variant:"ghost","aria-label":r,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:d}),e[3]=r,e[4]=c,e[5]=S):S=e[5];const w=u&&"flex items-start gap-3",b=m&&"pb-3";let g;e[6]!==w||e[7]!==b?(g=et("p-4 pr-11",w,b),e[6]=w,e[7]=b,e[8]=g):g=e[8];let _;e[9]!==u?(_=u&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:u}),e[9]=u,e[10]=_):_=e[10];let P;e[11]!==o?(P=o&&n.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[11]=o,e[12]=P):P=e[12];let T;e[13]!==a?(T=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:a}),e[13]=a,e[14]=T):T=e[14];let j;e[15]!==i?(j=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=j):j=e[16];let h;e[17]!==T||e[18]!==j||e[19]!==P?(h=n.jsxs("div",{children:[P,T,j]}),e[17]=T,e[18]=j,e[19]=P,e[20]=h):h=e[20];let N;e[21]!==m?(N=m&&n.jsx("div",{className:"mt-3",children:m}),e[21]=m,e[22]=N):N=e[22];let k;e[23]!==h||e[24]!==N?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[h,N]}),e[23]=h,e[24]=N,e[25]=k):k=e[25];let A;e[26]!==k||e[27]!==g||e[28]!==_?(A=n.jsxs("div",{className:g,children:[_,k]}),e[26]=k,e[27]=g,e[28]=_,e[29]=A):A=e[29];let E;e[30]!==v||e[31]!==y||e[32]!==l||e[33]!==p?(E=l&&n.jsxs("div",{className:et("flex items-center justify-between gap-3 px-4 py-2.5",p==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:y}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:v})]}),e[30]=v,e[31]=y,e[32]=l,e[33]=p,e[34]=E):E=e[34];let C;return e[35]!==s||e[36]!==A||e[37]!==E||e[38]!==f||e[39]!==S||e[40]!==p?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":p,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[f,S,A,E]}),e[35]=s,e[36]=A,e[37]=E,e[38]=f,e[39]=S,e[40]=p,e[41]=C):C=e[41],C}const ns=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function ss(t){return ns.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function os(t,e){return ss(e).map(s=>({element:wt(s.anchor),popover:{title:t(s.titleKey),description:t(s.descKey),side:s.side,align:"center"}}))}const is=wt("switcher"),as=30;function Pt(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function rs(t,e){return os(t,e).filter(s=>typeof s.element=="string"&&Pt(s.element))}function ls(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(s,{driver:r})=>{if(s.footerButtons.querySelector(".layout-tour-skip"))return;const o=document.createElement("button");o.type="button",o.className="driver-popover-footer-btn layout-tour-skip",o.textContent=t("layoutTour.skip"),o.addEventListener("click",()=>r.destroy()),s.footerButtons.insertBefore(o,s.footerButtons.firstChild)},onDestroyed:()=>{Me=!1},steps:e}}let Me=!1;async function cs(){return(await qt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function ds(t,e){if(Me)return;Me=!0;let s=0;const r=()=>{if(!Pt(is)&&s++<as){requestAnimationFrame(r);return}const o=rs(t,e);if(o.length===0){Me=!1;return}cs().then(a=>{a(ls(t,o)).drive()}).catch(()=>{Me=!1})};r()}const us=[{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:rt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:te,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:Ze,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:Ze,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:ie,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:ae,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:ae,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:te,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:rn,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:Ze,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:te,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:ie,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:ae,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:te,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:ie,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:ae,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:ie,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:te,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:ae,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:te,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:ie,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:ae,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:te,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:ie,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:ae,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:te,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ct,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:ie,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:rt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:ae,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:ie,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:te,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ct,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:te,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:ln,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Ct=us,Ye="studio.release-feed.v1",nt=new Set;let de="",ue={},st=!1;function ms(){if(st)return de||"{}";try{return localStorage.getItem(Ye)??"{}"}catch{return de||"{}"}}function Et(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function mt(){const t=ms();return t!==de&&(de=t,ue=Et(t)),ue}function fs(t){nt.add(t);const e=s=>{if(!(s.key!==Ye&&s.key!==null)){try{const r=localStorage.getItem(Ye)??"{}",a={...Et(r),...ue};ue=a,de=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{nt.delete(t),window.removeEventListener("storage",e)}}function gs(t){ue=t,de=JSON.stringify(t);try{localStorage.setItem(Ye,de),st=!1}catch{st=!0}nt.forEach(e=>e())}function hs(){const t=$.c(7),e=V.useSyncExternalStore(fs,mt,mt);let s;t[0]!==e?(s=m=>!!e[m],t[0]=e,t[1]=s):s=t[1];const r=s,o=ps;let a;t[2]!==e?(a=Ct.reduce((m,y)=>e[y.id]?m:m+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let u;return t[4]!==r||t[5]!==i?(u={isSeen:r,markSeen:o,unseenCount:i},t[4]=r,t[5]=i,t[6]=u):u=t[6],u}function ps(t){ue[t]||gs({...ue,[t]:{seenAt:new Date().toISOString()}})}const ys=720*60*60*1e3,bs=10080*60*1e3;function xs(t){const[e,s,r]=t.split("-").map(Number);return!e||!s||!r?new Date(t).getTime():new Date(e,s-1,r).getTime()}function Ss(t){const e=Ct[0];if(!e)return null;const s=xs(e.date),r=t-s;return r<0||r>ys?null:e}function ws(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function vs(t,e){const s=ws(t);return s===null?!1:e-s>=bs}function js(){const t=$.c(52),e=W(),s=Sn(),r=jn(),o=vt(),a=!!s,i=r===ne.home&&!s;let u;t[0]!==o||t[1]!==a?(u=a&&!!o&&kn(o),t[0]=o,t[1]=a,t[2]=u):u=t[2];const m=u,{data:y}=Re.useSession(),{isSeen:v,markSeen:c}=hs(),[x,p]=V.useState(!1);let l,f,d;if(t[3]!==v||t[4]!==y?.user?.createdAt){d=Symbol.for("react.early_return_sentinel");e:{const O=Date.now();if(l=Ss(O),!l){d=null;break e}if(!vs(y?.user?.createdAt,O)){d=null;break e}f=v(l.id)}t[3]=v,t[4]=y?.user?.createdAt,t[5]=l,t[6]=f,t[7]=d}else l=t[5],f=t[6],d=t[7];if(d!==Symbol.for("react.early_return_sentinel"))return d;if(f)return null;let S;t[8]!==l.id||t[9]!==a||t[10]!==c||t[11]!==i||t[12]!==m||t[13]!==e?(S=()=>{c(l.id),ds(e,{onOrgHome:i,inProject:a,onSiteEditor:m})},t[8]=l.id,t[9]=a,t[10]=c,t[11]=i,t[12]=m,t[13]=e,t[14]=S):S=t[14];const w=S;let b;t[15]!==e?(b=e("announcements.release.ariaLabel"),t[15]=e,t[16]=b):b=t[16];let g;t[17]!==e?(g=e("announcements.release.dismiss"),t[17]=e,t[18]=g):g=t[18];const _=l.eyebrow,P=l.title;let T;t[19]!==l.id||t[20]!==c?(T=()=>c(l.id),t[19]=l.id,t[20]=c,t[21]=T):T=t[21];let j;t[22]!==l.id||t[23]!==l.learnMoreHref||t[24]!==c||t[25]!==e?(j=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>c(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[22]=l.id,t[23]=l.learnMoreHref,t[24]=c,t[25]=e,t[26]=j):j=t[26];let h;t[27]!==l.cta||t[28]!==l.id||t[29]!==c||t[30]!==w?(h=l.cta?"href"in l.cta?n.jsx(M,{asChild:!0,size:"sm",onClick:()=>c(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):l.cta.action==="start-tour"?n.jsx(M,{size:"sm",onClick:w,children:l.cta.label}):n.jsx(M,{size:"sm",onClick:()=>p(!0),children:l.cta.label}):null,t[27]=l.cta,t[28]=l.id,t[29]=c,t[30]=w,t[31]=h):h=t[31];let N;t[32]!==l.bullets?(N=l.bullets.map(ks),t[32]=l.bullets,t[33]=N):N=t[33];let k;t[34]!==N?(k=n.jsx("ul",{className:"flex flex-col gap-3",children:N}),t[34]=N,t[35]=k):k=t[35];let A;t[36]!==l.id||t[37]!==c?(A=O=>{p(O),O||c(l.id)},t[36]=l.id,t[37]=c,t[38]=A):A=t[38];let E;t[39]!==x||t[40]!==A?(E=n.jsx(hn,{open:x,onOpenChange:A}),t[39]=x,t[40]=A,t[41]=E):E=t[41];let C;return t[42]!==l.eyebrow||t[43]!==l.title||t[44]!==h||t[45]!==k||t[46]!==E||t[47]!==b||t[48]!==g||t[49]!==T||t[50]!==j?(C=n.jsxs(At,{ariaLabel:b,dismissLabel:g,eyebrow:_,title:P,onDismiss:T,footerLeading:j,actions:h,children:[k,E]}),t[42]=l.eyebrow,t[43]=l.title,t[44]=h,t[45]=k,t[46]=E,t[47]=b,t[48]=g,t[49]=T,t[50]=j,t[51]=C):C=t[51],C}function ks(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const Ot=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),re=Ot?"⌘":"Ctrl",J={commandPalette:{keys:[re,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[re,"["],description:"Back to previous"},focusChatInput:{keys:[re,"L"],description:"Focus chat input"},saveAndFormat:{keys:[re,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[re,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[re,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",re,"S"],description:"New task"},toggleDaemon:{keys:[re,"D"],description:"Toggle daemon logs"}},Ts=[{label:"General",shortcuts:[J.commandPalette,J.keyboardShortcuts,J.back,J.newTask,J.toggleDaemon]},{label:"Editor",shortcuts:[J.saveAndFormat]},{label:"Chat",shortcuts:[J.focusChatInput,J.togglePlanMode,J.sendMessage,J.newLine]},{label:"Questions",shortcuts:[J.selectOption]},{label:"Monitoring",shortcuts:[J.applyFilter]}];function ft(t){return Ot?t.metaKey:t.ctrlKey}function Ns(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function _s(t){const e=$.c(11),{open:s,onOpenChange:r}=t,o=W();let a;e[0]!==o?(a=o("common.keyboardShortcutsDialog.title"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==a?(i=n.jsx(jt,{children:n.jsx(kt,{children:a})}),e[2]=a,e[3]=i):i=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex flex-col gap-4",children:Ts.map(As)}),e[4]=u):u=e[4];let m;e[5]!==i?(m=n.jsxs(Tt,{className:"sm:max-w-md",children:[i,u]}),e[5]=i,e[6]=m):m=e[6];let y;return e[7]!==r||e[8]!==s||e[9]!==m?(y=n.jsx(Nt,{open:s,onOpenChange:r,children:m}),e[7]=r,e[8]=s,e[9]=m,e[10]=y):y=e[10],y}function As(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Ps)})]},t.label)}function Ps(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Cs)})]},t.description)}function Cs(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const gt=8;function Es(t){const{org:e}=ot(),s=Ln({connectionId:_t,orgId:e.id,orgSlug:e.slug}),{data:r}=Be({queryKey:Ke.globalSearch(e.id,t,gt),enabled:!!s&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!s)return[];try{return(await s.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:gt}})).structuredContent?.items??[]}catch{return[]}}});return r??[]}function Os(t){const e=$.c(165),{open:s,onOpenChange:r}=t,o=W(),a=bt(),{org:i}=ot(),{projects:u,hasProjects:m}=wn(),[y,v]=V.useState(""),c=V.useDeferredValue(y),x=Es(c);let p;e[0]!==r?(p=()=>{r(!1),v("")},e[0]=r,e[1]=p):p=e[1];const l=p;let f;e[2]!==l?(f=(D,Rt)=>{tt("command_palette_used",{kind:Rt}),D(),l()},e[2]=l,e[3]=f):f=e[3];const d=f;let S;e[4]!==a||e[5]!==i.slug?(S=D=>{if(D.type==="task"){a({to:ne.tasks,params:{org:i.slug,taskKey:D.key??void 0}});return}a({to:ne.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:D.virtual_mcp_id??void 0,thread:D.id}})},e[4]=a,e[5]=i.slug,e[6]=S):S=e[6];const w=S;let b;e[7]!==i.slug?(b={org:i.slug},e[7]=i.slug,e[8]=b):b=e[8];const g=b;let _;e[9]!==o?(_=o("sidebar.navDestinations.home"),e[9]=o,e[10]=_):_=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(dn,{}),e[11]=P):P=e[11];let T;e[12]!==g||e[13]!==_?(T={key:"home",label:_,icon:P,to:ne.home,params:g},e[12]=g,e[13]=_,e[14]=T):T=e[14];let j;e[15]!==o?(j=o("sidebar.navDestinations.reports"),e[15]=o,e[16]=j):j=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(un,{}),e[17]=h):h=e[17];let N;e[18]!==g||e[19]!==j?(N={key:"reports",label:j,icon:h,to:ne.reports,params:g},e[18]=g,e[19]=j,e[20]=N):N=e[20];let k;e[21]!==o?(k=o("sidebar.navDestinations.tasks"),e[21]=o,e[22]=k):k=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(lt,{}),e[23]=A):A=e[23];let E;e[24]!==i.slug?(E={org:i.slug,taskKey:void 0},e[24]=i.slug,e[25]=E):E=e[25];let C;e[26]!==k||e[27]!==E?(C={key:"tasks",label:k,icon:A,to:ne.tasks,params:E},e[26]=k,e[27]=E,e[28]=C):C=e[28];let O;e[29]!==o?(O=o("sidebar.navDestinations.library"),e[29]=o,e[30]=O):O=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(An,{}),e[31]=L):L=e[31];let R;e[32]!==g||e[33]!==O?(R={key:"library",label:O,icon:L,to:ne.library,params:g},e[32]=g,e[33]=O,e[34]=R):R=e[34];let z;e[35]!==o?(z=o("sidebar.navDestinations.discover"),e[35]=o,e[36]=z):z=e[36];let G;e[37]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(mn,{}),e[37]=G):G=e[37];let q;e[38]!==g||e[39]!==z?(q={key:"discover",label:z,icon:G,to:ne.discover,params:g},e[38]=g,e[39]=z,e[40]=q):q=e[40];let se;e[41]!==N||e[42]!==C||e[43]!==R||e[44]!==q||e[45]!==T?(se=[T,N,C,R,q],e[41]=N,e[42]=C,e[43]=R,e[44]=q,e[45]=T,e[46]=se):se=e[46];const oe=se;let le;e[47]!==l||e[48]!==r?(le=D=>D?r(!0):l(),e[47]=l,e[48]=r,e[49]=le):le=e[49];let ee;e[50]!==o?(ee=o("commandPalette.title"),e[50]=o,e[51]=ee):ee=e[51];let B;e[52]!==o?(B=o("commandPalette.description"),e[52]=o,e[53]=B):B=e[53];let K;e[54]!==o?(K=o("commandPalette.placeholder"),e[54]=o,e[55]=K):K=e[55];let Y;e[56]!==K||e[57]!==y?(Y=n.jsx(Cn,{placeholder:K,value:y,onValueChange:v}),e[56]=K,e[57]=y,e[58]=Y):Y=e[58];let Q;e[59]!==o?(Q=o("commandPalette.empty"),e[59]=o,e[60]=Q):Q=e[60];let H;e[61]!==Q?(H=n.jsx(En,{children:Q}),e[61]=Q,e[62]=H):H=e[62];let U;e[63]!==o?(U=o("commandPalette.goTo"),e[63]=o,e[64]=U):U=e[64];let X;e[65]!==oe||e[66]!==d||e[67]!==a?(X=oe.map(D=>n.jsxs(ce,{onSelect:()=>d(()=>a({to:D.to,params:D.params}),"destination"),children:[D.icon,n.jsx("span",{children:D.label})]},D.key)),e[65]=oe,e[66]=d,e[67]=a,e[68]=X):X=e[68];let Z;e[69]!==U||e[70]!==X?(Z=n.jsx(We,{heading:U,children:X}),e[69]=U,e[70]=X,e[71]=Z):Z=e[71];let I;e[72]!==d||e[73]!==m||e[74]!==a||e[75]!==i.slug||e[76]!==u||e[77]!==o?(I=m&&n.jsx(We,{heading:o("commandPalette.projects"),children:u.map(D=>n.jsxs(ce,{value:`project ${D.title}`,onSelect:()=>d(()=>a({to:ne.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:D.id}}),"project"),children:[n.jsx(vn,{icon:D.icon,name:D.title}),n.jsx("span",{children:D.title})]},D.id))}),e[72]=d,e[73]=m,e[74]=a,e[75]=i.slug,e[76]=u,e[77]=o,e[78]=I):I=e[78];let F;e[79]!==o?(F=o("commandPalette.actions"),e[79]=o,e[80]=F):F=e[80];let fe;e[81]!==o?(fe=o("commandPalette.newProject"),e[81]=o,e[82]=fe):fe=e[82];let ge;e[83]!==d||e[84]!==a||e[85]!==i.slug?(ge=()=>d(()=>a({to:ne.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:void 0}}),"new_project"),e[83]=d,e[84]=a,e[85]=i.slug,e[86]=ge):ge=e[86];let He;e[87]===Symbol.for("react.memo_cache_sentinel")?(He=n.jsx(dt,{}),e[87]=He):He=e[87];let he;e[88]!==o?(he=o("commandPalette.newProject"),e[88]=o,e[89]=he):he=e[89];let pe;e[90]!==he?(pe=n.jsx("span",{children:he}),e[90]=he,e[91]=pe):pe=e[91];let ye;e[92]!==fe||e[93]!==ge||e[94]!==pe?(ye=n.jsxs(ce,{value:fe,onSelect:ge,children:[He,pe]}),e[92]=fe,e[93]=ge,e[94]=pe,e[95]=ye):ye=e[95];let be;e[96]!==o?(be=o("commandPalette.inviteTeammate"),e[96]=o,e[97]=be):be=e[97];let xe;e[98]!==d||e[99]!==a||e[100]!==g?(xe=()=>d(()=>a({to:"/$org/settings/members",params:g}),"invite"),e[98]=d,e[99]=a,e[100]=g,e[101]=xe):xe=e[101];let Ue;e[102]===Symbol.for("react.memo_cache_sentinel")?(Ue=n.jsx(fn,{}),e[102]=Ue):Ue=e[102];let Se;e[103]!==o?(Se=o("commandPalette.inviteTeammate"),e[103]=o,e[104]=Se):Se=e[104];let we;e[105]!==Se?(we=n.jsx("span",{children:Se}),e[105]=Se,e[106]=we):we=e[106];let ve;e[107]!==be||e[108]!==xe||e[109]!==we?(ve=n.jsxs(ce,{value:be,onSelect:xe,children:[Ue,we]}),e[107]=be,e[108]=xe,e[109]=we,e[110]=ve):ve=e[110];let je;e[111]!==o?(je=o("commandPalette.addConnection"),e[111]=o,e[112]=je):je=e[112];let ke;e[113]!==d||e[114]!==a||e[115]!==g?(ke=()=>d(()=>a({to:"/$org/settings/connections",params:g,search:{tab:"all"}}),"add_connection"),e[113]=d,e[114]=a,e[115]=g,e[116]=ke):ke=e[116];let Ge;e[117]===Symbol.for("react.memo_cache_sentinel")?(Ge=n.jsx(dt,{}),e[117]=Ge):Ge=e[117];let Te;e[118]!==o?(Te=o("commandPalette.addConnection"),e[118]=o,e[119]=Te):Te=e[119];let Ne;e[120]!==Te?(Ne=n.jsx("span",{children:Te}),e[120]=Te,e[121]=Ne):Ne=e[121];let _e;e[122]!==je||e[123]!==ke||e[124]!==Ne?(_e=n.jsxs(ce,{value:je,onSelect:ke,children:[Ge,Ne]}),e[122]=je,e[123]=ke,e[124]=Ne,e[125]=_e):_e=e[125];let Ae;e[126]!==o?(Ae=o("commandPalette.settings"),e[126]=o,e[127]=Ae):Ae=e[127];let Pe;e[128]!==d||e[129]!==a||e[130]!==g?(Pe=()=>d(()=>a({to:"/$org/settings/general",params:g}),"settings"),e[128]=d,e[129]=a,e[130]=g,e[131]=Pe):Pe=e[131];let Je;e[132]===Symbol.for("react.memo_cache_sentinel")?(Je=n.jsx(Pn,{}),e[132]=Je):Je=e[132];let Ce;e[133]!==o?(Ce=o("commandPalette.settings"),e[133]=o,e[134]=Ce):Ce=e[134];let Ee;e[135]!==Ce?(Ee=n.jsx("span",{children:Ce}),e[135]=Ce,e[136]=Ee):Ee=e[136];let Oe;e[137]!==Ae||e[138]!==Pe||e[139]!==Ee?(Oe=n.jsxs(ce,{value:Ae,onSelect:Pe,children:[Je,Ee]}),e[137]=Ae,e[138]=Pe,e[139]=Ee,e[140]=Oe):Oe=e[140];let Ie;e[141]!==F||e[142]!==ye||e[143]!==ve||e[144]!==_e||e[145]!==Oe?(Ie=n.jsxs(We,{heading:F,children:[ye,ve,_e,Oe]}),e[141]=F,e[142]=ye,e[143]=ve,e[144]=_e,e[145]=Oe,e[146]=Ie):Ie=e[146];let Le;e[147]!==d||e[148]!==x||e[149]!==w||e[150]!==o?(Le=x.length>0&&n.jsx(We,{heading:o("commandPalette.results"),children:x.map(D=>n.jsxs(ce,{value:`${D.title} ${D.id}`,onSelect:()=>d(()=>w(D),D.type),children:[D.type==="thread"?n.jsx(cn,{}):n.jsx(lt,{}),n.jsx("span",{className:"truncate",children:D.title}),D.type==="task"&&D.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:D.key})]},`${D.type}:${D.id}`))}),e[147]=d,e[148]=x,e[149]=w,e[150]=o,e[151]=Le):Le=e[151];let De;e[152]!==H||e[153]!==Z||e[154]!==I||e[155]!==Ie||e[156]!==Le?(De=n.jsxs(On,{children:[H,Z,I,Ie,Le]}),e[152]=H,e[153]=Z,e[154]=I,e[155]=Ie,e[156]=Le,e[157]=De):De=e[157];let Ve;return e[158]!==s||e[159]!==le||e[160]!==ee||e[161]!==B||e[162]!==Y||e[163]!==De?(Ve=n.jsxs(In,{open:s,onOpenChange:le,title:ee,description:B,shouldFilter:!1,children:[Y,De]}),e[158]=s,e[159]=le,e[160]=ee,e[161]=B,e[162]=Y,e[163]=De,e[164]=Ve):Ve=e[164],Ve}const ze=new Rn(!1);function Is(){ze.set(!0)}function Ls(){ze.set(!1)}function Ds(){const t=$.c(2),e=V.useSyncExternalStore(ze.subscribe,ze.get);let s;return t[0]!==e?(s=[e,ze.set],t[0]=e,t[1]=s):s=t[1],s}const $s=300*1e3,Rs=2;function Ms(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Fs(t,e){return t.count>=Rs&&t.version!==null&&t.version!==e}function zs(){const t=$.c(43),e=W(),s=Fn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={mutationFn:Bs},t[0]=r):r=t[0];const o=qe(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:Ke.appVersionCheck(),queryFn:qs,refetchInterval:$s,refetchIntervalInBackground:!0,staleTime:0},t[1]=a):a=t[1];const{data:i,dataUpdatedAt:u}=Be(a),[m,y]=V.useState(0);let v;t[2]===Symbol.for("react.memo_cache_sentinel")?(v={version:null,count:0},t[2]=v):v=t[2];const[c,x]=V.useState(v);u!==m&&(y(u),x(z=>Ms(z,i,"4.345.0")));const[p,l]=V.useState(null),f=s;let d;t[3]!==s||t[4]!==o?(d=()=>window.location.reload(),t[3]=s,t[4]=o,t[5]=d):d=t[5];const S=d,w="announcements.version.refresh";if(!Fs(c,p))return null;let b;t[6]!==e?(b=e("announcements.version.ariaLabel"),t[6]=e,t[7]=b):b=t[7];let g;t[8]!==e?(g=e("announcements.version.dismiss"),t[8]=e,t[9]=g):g=t[9];let _;t[10]!==e?(_=e("announcements.version.eyebrow"),t[10]=e,t[11]=_):_=t[11];let P;t[12]!==e?(P=e("announcements.version.title"),t[12]=e,t[13]=P):P=t[13];const T="announcements.version.description";let j;t[14]!==e||t[15]!==T?(j=e(T),t[14]=e,t[15]=T,t[16]=j):j=t[16];let h;t[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(at,{size:16}),t[17]=h):h=t[17];let N;t[18]!==c.version?(N=()=>l(c.version),t[18]=c.version,t[19]=N):N=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.345.0"}),t[20]=e,t[21]=k):k=t[21];let A;t[22]!==w||t[23]!==e?(A=e(w),t[22]=w,t[23]=e,t[24]=A):A=t[24];const E=f;let C;t[25]!==E?(C=et(E),t[25]=E,t[26]=C):C=t[26];let O;t[27]!==C?(O=n.jsx(at,{size:14,className:C}),t[27]=C,t[28]=O):O=t[28];let L;t[29]!==S||t[30]!==f||t[31]!==A||t[32]!==O?(L=n.jsxs(M,{size:"sm",disabled:f,onClick:S,children:[A,O]}),t[29]=S,t[30]=f,t[31]=A,t[32]=O,t[33]=L):L=t[33];let R;return t[34]!==N||t[35]!==k||t[36]!==L||t[37]!==b||t[38]!==g||t[39]!==_||t[40]!==P||t[41]!==j?(R=n.jsx(At,{ariaLabel:b,dismissLabel:g,eyebrow:_,title:P,description:j,icon:h,tone:"system",onDismiss:N,footerLeading:k,actions:L}),t[34]=N,t[35]=k,t[36]=L,t[37]=b,t[38]=g,t[39]=_,t[40]=P,t[41]=j,t[42]=R):R=t[42],R}async function qs(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function Bs(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function Ks(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const Hs=Date.parse("2026-07-21T00:00:00Z"),ht=t=>Ks($e.ptBrAnnouncementSeen(t));function Us(){const t=$.c(35),e=W(),[s,r]=Bt(),{data:o,isPending:a}=Re.useSession(),i=o?.user,u=i?.id,m=i?.createdAt,y=m!=null&&new Date(m).getTime()<Hs,v=Kt()==="pt-BR",c=!a&&!!u&&y&&v&&s.language==="en"&&!ht(u).has(),[x,p]=V.useState(!1),[l,f]=V.useState(!1);!x&&!a&&(p(!0),c&&u&&(ht(u).mark(),r(Js),f(!0),tt("pt_br_auto_switch_shown")));let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=G=>{tt("pt_br_auto_switch_closed",{action:G}),f(!1)},t[0]=d):d=t[0];const S=d;let w;t[1]!==r?(w=()=>{r(Gs),S("switch-back")},t[1]=r,t[2]=w):w=t[2];const b=w;let g;t[3]===Symbol.for("react.memo_cache_sentinel")?(g=G=>!G&&S("dismiss"),t[3]=g):g=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=_):_=t[4];let P;t[5]!==e?(P=e("announcements.ptBr.title"),t[5]=e,t[6]=P):P=t[6];let T;t[7]!==P?(T=n.jsx(kt,{children:P}),t[7]=P,t[8]=T):T=t[8];let j;t[9]!==e?(j=e("announcements.ptBr.description"),t[9]=e,t[10]=j):j=t[10];let h;t[11]!==j?(h=n.jsx(Nn,{children:j}),t[11]=j,t[12]=h):h=t[12];let N;t[13]!==T||t[14]!==h?(N=n.jsxs(jt,{children:[T,h]}),t[13]=T,t[14]=h,t[15]=N):N=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let A;t[18]!==b||t[19]!==k?(A=n.jsx(M,{variant:"outline",onClick:b,children:k}),t[18]=b,t[19]=k,t[20]=A):A=t[20];let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>S("ok"),t[21]=E):E=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let O;t[24]!==C?(O=n.jsx(M,{onClick:E,children:C}),t[24]=C,t[25]=O):O=t[25];let L;t[26]!==A||t[27]!==O?(L=n.jsxs(_n,{children:[A,O]}),t[26]=A,t[27]=O,t[28]=L):L=t[28];let R;t[29]!==L||t[30]!==N?(R=n.jsxs(Tt,{className:"sm:max-w-md",children:[_,N,L]}),t[29]=L,t[30]=N,t[31]=R):R=t[31];let z;return t[32]!==l||t[33]!==R?(z=n.jsx(Nt,{open:l,onOpenChange:g,children:R}),t[32]=l,t[33]=R,t[34]=z):z=t[34],z}function Gs(t){return{...t,language:"en"}}function Js(t){return{...t,language:"pt-BR"}}function Vs(t){const e=Ht(t);return typeof e=="string"?e:void 0}function Ws(){return Vs("experiment-pipeline-check"),null}function Ys(t){const e=$.c(1),{activeOrg:s}=t;if(!s)return null;Ut(s.id,{name:s.name??void 0,slug:s.slug??void 0}),Gt();let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ws,{}),e[0]=r):r=e[0],r}function Qs(t){const{prev:e,virtualMcpId:s,decopilotId:r,savedLayout:o,opts:a,autosendValue:i}=t,u={mainpanel:void 0};s?u.virtualmcpid=s:e.virtualmcpid&&(u.virtualmcpid=e.virtualmcpid);const m=typeof e.virtualmcpid=="string"?e.virtualmcpid:r,v=(s??m)!==m;let c,x;return a?.panel?x=a.panel:o?(x=o.tab,o.sidepanel!==void 0&&(c=o.sidepanel),o.mainpanel!==void 0&&(u.mainpanel=o.mainpanel)):!v&&e.tabId&&!Jt(e.tabId)&&(x=e.tabId),c!==void 0&&(u.sidepanel=c),a?.autosend&&(u.autosend=i),{tabId:x,search:u}}const It="studio:thread-layout:v3",Xs=50;function Lt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function Zs(t,e,s,r=Xs){const o=t.filter(([a])=>a!==e);for(o.push([e,Lt(s)]);o.length>r;)o.shift();return o}function it(){try{const t=sessionStorage.getItem(It);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function Dt(t){try{sessionStorage.setItem(It,JSON.stringify(t))}catch{}}function eo(t,e){t&&Dt(Zs(it(),t,e))}function to(t){if(!t)return null;const e=it().find(([s])=>s===t);return e?Lt(e[1]):null}function Go(t){if(!t)return;const e=it(),s=e.filter(([r])=>r!==t);s.length!==e.length&&Dt(s)}function $t(t){return{queryKey:Ke.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Jo(t){const e=$.c(10);let s;e[0]!==t?(s=$t(t),e[0]=t,e[1]=s):s=e[1];const r=Be(s);let o;e[2]!==r.data?.prompts?(o=r.data?.prompts??[],e[2]=r.data?.prompts,e[3]=o):o=e[3];let a;e[4]!==r.data?.tiles?(a=r.data?.tiles??[],e[4]=r.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==r.isLoading||e[7]!==o||e[8]!==a?(i={isLoading:r.isLoading,prompts:o,tiles:a},e[6]=r.isLoading,e[7]=o,e[8]=a,e[9]=i):i=e[9],i}function no(t){const e=$.c(31),{orgSlug:s,orgName:r,domain:o}=t,a=W();let i;e[0]!==s?(i=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=i):i=e[1];const u=i,m=so;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(pt,{className:"h-6 w-6 text-primary"})}),e[2]=y):y=e[2];let v;e[3]!==a?(v=a("common.ssoRequiredScreen.title"),e[3]=a,e[4]=v):v=e[4];let c;e[5]!==v?(c=n.jsx("h3",{className:"text-lg font-medium",children:v}),e[5]=v,e[6]=c):c=e[6];let x;e[7]!==o||e[8]!==r||e[9]!==a?(x=r?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:r})," ",a("common.ssoRequiredScreen.requiresSsoAuth"),o?` ${a("common.ssoRequiredScreen.via",{domain:o})}`:"","."]}):a("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=o,e[8]=r,e[9]=a,e[10]=x):x=e[10];let p;e[11]!==x?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[11]=x,e[12]=p):p=e[12];let l;e[13]!==c||e[14]!==p?(l=n.jsxs("div",{className:"space-y-2",children:[c,p]}),e[13]=c,e[14]=p,e[15]=l):l=e[15];let f;e[16]!==a?(f=a("common.ssoRequiredScreen.signInWithSso"),e[16]=a,e[17]=f):f=e[17];let d;e[18]!==u||e[19]!==f?(d=n.jsx(M,{onClick:u,children:f}),e[18]=u,e[19]=f,e[20]=d):d=e[20];let S;e[21]!==a?(S=a("common.ssoRequiredScreen.goBack"),e[21]=a,e[22]=S):S=e[22];let w;e[23]!==S?(w=n.jsx(M,{variant:"ghost",onClick:m,children:S}),e[23]=S,e[24]=w):w=e[24];let b;e[25]!==w||e[26]!==d?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[d,w]}),e[25]=w,e[26]=d,e[27]=b):b=e[27];let g;return e[28]!==b||e[29]!==l?(g=n.jsxs(me,{children:[y,l,b]}),e[28]=b,e[29]=l,e[30]=g):g=e[30],g}function so(){window.location.href="/"}function oo(t){const e=$.c(27),{notice:s,orgSlug:r}=t,o=W();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(Vt,{className:"h-6 w-6 text-destructive"})}),e[0]=a):a=e[0];let i;e[1]!==s.title?(i=n.jsx("h3",{className:"text-lg font-medium",children:s.title}),e[1]=s.title,e[2]=i):i=e[2];let u;e[3]!==s.message?(u=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:s.message}),e[3]=s.message,e[4]=u):u=e[4];let m;e[5]!==i||e[6]!==u?(m=n.jsxs("div",{className:"space-y-2",children:[i,u]}),e[5]=i,e[6]=u,e[7]=m):m=e[7];let y;e[8]!==s.ctaLabel||e[9]!==s.ctaUrl?(y=s.ctaUrl&&s.ctaLabel?n.jsx(M,{asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,e[8]=s.ctaLabel,e[9]=s.ctaUrl,e[10]=y):y=e[10];const v=`/${encodeURIComponent(r)}/settings/infra-billing`;let c;e[11]!==o?(c=o("common.blockedOrgScreen.goToBilling"),e[11]=o,e[12]=c):c=e[12];let x;e[13]!==v||e[14]!==c?(x=n.jsx(M,{variant:"outline",asChild:!0,children:n.jsx("a",{href:v,children:c})}),e[13]=v,e[14]=c,e[15]=x):x=e[15];let p;e[16]!==o?(p=o("common.blockedOrgScreen.switchOrg"),e[16]=o,e[17]=p):p=e[17];let l;e[18]!==p?(l=n.jsx(M,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:p})}),e[18]=p,e[19]=l):l=e[19];let f;e[20]!==l||e[21]!==y||e[22]!==x?(f=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[y,x,l]}),e[20]=l,e[21]=y,e[22]=x,e[23]=f):f=e[23];let d;return e[24]!==f||e[25]!==m?(d=n.jsxs(me,{children:[a,m,f]}),e[24]=f,e[25]=m,e[26]=d):d=e[26],d}const io="/settings/infra-billing";function ao(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(io)}function ro(t){const e=$.c(8),{org:s,children:r}=t,a=Bn(s.id,s.slug)?.enabled_plugins??null;let i;e[0]!==s.id||e[1]!==s.name||e[2]!==a?(i={id:s.id,organizationId:s.id,slug:"_org",name:s.name,enabledPlugins:a,ui:null},e[0]=s.id,e[1]=s.name,e[2]=a,e[3]=i):i=e[3];const u=i;let m;return e[4]!==r||e[5]!==s||e[6]!==u?(m=n.jsx(nn,{org:s,project:u,children:r}),e[4]=r,e[5]=s,e[6]=u,e[7]=m):m=e[7],m}function lo(){const t=bt(),e=Mn(),{org:s}=ot(),r=Wt({strict:!1}),o=vt(),{openPanel:a,closePanel:i}=Tn(),u=pn(),m=yn(),y=bn(),v=xn(),c=(f,d=!0)=>t({to:".",search:f,replace:d}),x=()=>c(f=>({...f,sidepanel:!0})),p=(f,d,S)=>{const w=!!m&&m===f;m&&!w&&eo(m,{tab:o,mainpanel:r.mainpanel,sidepanel:r.sidepanel});const b=w?null:to(f),g=$n(s.id).id,_=Qs({prev:{virtualmcpid:u,tabId:o},virtualMcpId:d,decopilotId:g,savedLayout:b,opts:S,autosendValue:qn});return v(f,()=>_.search,{virtualMcpId:d,view:{tabId:_.tabId}})};return{openSidePanel:x,setTaskId:p,createNewTask:async(f,d,S)=>{const w=crypto.randomUUID(),b=f??y;try{await e?.create({id:w,virtual_mcp_id:b,...d?{branch:d}:{}})}catch{}p(w,b,S)},openTab:a,closeTab:i}}const co=new Set(["/$org/","/$org/home"]);function uo(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:mo},t[0]=e):e=t[0],xt(e)}function mo(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&co.has(e)}function fo(){const t=$.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const r=Yt(e)?.params.org,[o,a]=V.useState(!1),[i,u]=Ds(),m=Qt(),y=uo(),v=r??"";let c;t[1]!==v?(c=$t(v),t[1]=v,t[2]=c):c=t[2];const x=!!r&&y;let p;t[3]!==c||t[4]!==x?(p={...c,enabled:x},t[3]=c,t[4]=x,t[5]=p):p=t[5],Be(p);const{data:l}=Re.useSession(),f=l?.user?.id;let d;t[6]!==r||t[7]!==f?(d=r&&f?Xt(f,r):null,t[6]=r,t[7]=f,t[8]=d):d=t[8];const S=d;let w,b;t[9]!==m?(w=()=>{const I=F=>{if(ft(F)&&F.code==="KeyK"){F.preventDefault(),Is();return}if(F.key==="?"&&!Ns(F.target)){F.preventDefault(),a(!0);return}ft(F)&&F.code==="BracketLeft"&&m.history.canGoBack()&&(F.preventDefault(),m.history.back())};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},b=[m],t[9]=m,t[10]=w,t[11]=b):(w=t[10],b=t[11]),V.useEffect(w,b);let g;t[12]!==r?(g=Ke.activeOrganization(r),t[12]=r,t[13]=g):g=t[13];let _;t[14]!==r||t[15]!==f?(_=async()=>{if(!r)return null;performance.mark("mesh:active-org-fetch:start");const{data:I}=await Re.organization.getFullOrganization({query:{organizationSlug:r}}).finally(ho),F=Xe(I);return I&&!F&&localStorage.setItem($e.lastOrgSlug(),r),f&&I&&en(f,r,I),I},t[14]=r,t[15]=f,t[16]=_):_=t[16];const P=S?S.data:void 0,T=S?.updatedAt;let j;t[17]!==P||t[18]!==T||t[19]!==g||t[20]!==_?(j={queryKey:g,queryFn:_,initialData:P,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=P,t[18]=T,t[19]=g,t[20]=_,t[21]=j):j=t[21];const{data:h}=yt(j),N=h?.id,k=h?.slug,{data:A}=Kn(N,k),E=!!A?.ssoRequired&&!A.authenticated,{data:C}=Hn(k);let O;t[22]===Symbol.for("react.memo_cache_sentinel")?(O={select:go},t[22]=O):O=t[22];const L=xt(O),R=C?.severity==="block"&&!ao(L),z=N??"",G=k??"";let q;t[23]!==z||t[24]!==G?(q=Dn({connectionId:_t,orgId:z,orgSlug:G}),t[23]=z,t[24]=G,t[25]=q):q=t[25];const se=!!N&&!!k;let oe;if(t[26]!==q||t[27]!==se?(oe={...q,enabled:se},t[26]=q,t[27]=se,t[28]=oe):oe=t[28],Be(oe),(!h||Xe(h)||E||R)&&Ls(),!h){let I;return t[29]!==r?(I=n.jsx(ts,{orgSlug:r}),t[29]=r,t[30]=I):I=t[30],I}if(Xe(h)){localStorage.getItem($e.lastOrgSlug())===r&&localStorage.removeItem($e.lastOrgSlug());let I;return t[31]!==h.name?(I=n.jsx(Zt,{orgName:h.name}),t[31]=h.name,t[32]=I):I=t[32],I}if(R&&C){let I;return t[33]!==h.slug||t[34]!==C?(I=n.jsx(oo,{notice:C,orgSlug:h.slug}),t[33]=h.slug,t[34]=C,t[35]=I):I=t[35],I}if(E){let I;return t[36]!==h.id||t[37]!==h.name||t[38]!==h.slug||t[39]!==A.domain?(I=n.jsx(no,{orgId:h.id,orgSlug:h.slug,orgName:h.name,domain:A.domain}),t[36]=h.id,t[37]=h.name,t[38]=h.slug,t[39]=A.domain,t[40]=I):I=t[40],I}const ee=h.logo??null;let B;t[41]!==h||t[42]!==ee?(B={...h,logo:ee},t[41]=h,t[42]=ee,t[43]=B):B=t[43];let K;t[44]!==h?(K=n.jsx(Ys,{activeOrg:h}),t[44]=h,t[45]=K):K=t[45];let Y;t[46]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(tn,{}),t[46]=Y):Y=t[46];let Q;t[47]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(js,{}),n.jsx(zs,{})]}),t[47]=Q):Q=t[47];let H;t[48]!==i||t[49]!==u?(H=i&&n.jsx(Os,{open:i,onOpenChange:u}),t[48]=i,t[49]=u,t[50]=H):H=t[50];let U;t[51]!==o?(U=n.jsx(_s,{open:o,onOpenChange:a}),t[51]=o,t[52]=U):U=t[52];let X;t[53]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Us,{}),t[53]=X):X=t[53];let Z;return t[54]!==B||t[55]!==K||t[56]!==H||t[57]!==U?(Z=n.jsxs(ro,{org:B,children:[K,Y,Q,H,U,X]}),t[54]=B,t[55]=K,t[56]=H,t[57]=U,t[58]=Z):Z=t[58],Z}function go(t){return t.location.pathname}function ho(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function po(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(zn,{children:n.jsx(fo,{})}),t[0]=e):e=t[0],e}const Vo=Object.freeze(Object.defineProperty({__proto__:null,default:po,usePanelActions:lo},Symbol.toStringTag,{value:"Module"}));export{J as K,Jo as a,Go as f,ft as i,Is as o,Vo as s,lo as u};
|
|
1
|
+
import{c as $,b as W,e as qe,j as n,B as M,t as Fe,cO as me,z as pt,a as Re,w as Mt,x as yt,K as Ke,cP as Ft,cQ as zt,M as $e,l as et,bl as qt,r as V,d as bt,G as ot,m as Be,o as tt,b7 as at,v as Bt,cR as Kt,cS as Ht,cT as Ut,cU as Gt,cV as Jt,C as Vt,u as Wt,Z as Yt,c9 as Qt,cW as Xt,k as xt,cX as Xe,cY as Zt,cZ as en,O as tn,c_ as nn}from"./index-DR-7CxUP.js";import{A as Qe}from"./avatar-_tvfLV9T.js";import{t as St,b as rt}from"./Users03-BZkJWCNu.js";import{d as sn}from"./TrendUp01-DhL5-hJo.js";import{b6 as on,az as an,b3 as te,b7 as rn,aG as ln,b8 as cn,n as lt,g as dn,f as un,b9 as mn,d as fn}from"./agent-icon-B7AXGQ6P.js";import{s as gn}from"./XClose-C2dpX0F_.js";import{D as hn,u as pn,c as yn,d as bn,b as xn}from"./thread-route-g3bFZsDA.js";import{l as wt,a as Sn,u as wn,P as vn}from"./project-icon-DZuabjud.js";import{u as jn,D as ne}from"./use-destination-route-DZ6zuyom.js";import{i as kn}from"./source-system-tabs-CnEGUb4r.js";import{u as vt,a as Tn}from"./use-panel-navigate-BA5KTGnu.js";import{i as ie}from"./CheckCircle-P3KELI_n.js";import{i as ct}from"./Tool02-_HC8oqfU.js";import{i as Ze}from"./Monitor01-Cb0G367h.js";import{i as ae}from"./Zap-Bsbv5icR.js";import{c as jt,d as kt,b as Tt,D as Nt,h as Nn,e as _n}from"./dialog-wNMMbzXr.js";import{i as An}from"./Share07-B043tEsF.js";import{s as dt}from"./Plus-BZSUkwsF.js";import{a as Pn}from"./Settings02-3O7I-4oK.js";import{d as ce,e as We,a as Cn,c as En,b as On,f as In}from"./command-BDN-a3rJ.js";import{e as Ln,m as Dn}from"./use-mcp-client-Cjw7oL0k.js";import{S as _t,a as $n}from"./constants-Daqiz8AS.js";import{S as Rn,a as Mn}from"./hooks-BJtZPSVy.js";import{u as Fn}from"./use-is-desktop-app-BNujXJc_.js";import{R as zn}from"./required-auth-layout-C6sCfFoS.js";import{A as qn}from"./autosend-t6fUCO9u.js";import{f as Bn}from"./use-organization-settings-Di523P_b.js";import{u as Kn}from"./use-org-sso-CF4YFYU9.js";import{u as Hn}from"./use-org-notice-CnZTeX-0.js";function Un(t){const e=$.c(49),{orgName:s,orgSlug:r,orgLogo:o,domain:a}=t,i=W();let u;e[0]!==r||e[1]!==i?(u=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),A=await k.json();if(!k.ok||!A.success)throw new Error(A.error??i("common.autoDomainJoinScreen.joinError"));return A},e[0]=r,e[1]=i,e[2]=u):u=e[2];let m;e[3]!==r?(m=k=>{window.location.href=`/${k.slug??r}`},e[3]=r,e[4]=m):m=e[4];let y;e[5]!==i?(y=k=>{Fe.error(k instanceof Error?k.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=y):y=e[6];let v;e[7]!==u||e[8]!==m||e[9]!==y?(v={mutationFn:u,onSuccess:m,onError:y},e[7]=u,e[8]=m,e[9]=y,e[10]=v):v=e[10];const c=qe(v),x=Gn;let p;e[11]!==o||e[12]!==s?(p=o?n.jsx(Qe,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(St,{className:"h-6 w-6 text-primary"})}),e[11]=o,e[12]=s,e[13]=p):p=e[13];let l;e[14]!==s||e[15]!==i?(l=i("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=i,e[16]=l):l=e[16];let f;e[17]!==l?(f=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[17]=l,e[18]=f):f=e[18];let d;e[19]!==a||e[20]!==i?(d=i("common.autoDomainJoinScreen.joinDescription",{domain:a}),e[19]=a,e[20]=i,e[21]=d):d=e[21];let S;e[22]!==d?(S=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[22]=d,e[23]=S):S=e[23];let w;e[24]!==f||e[25]!==S?(w=n.jsxs("div",{className:"space-y-2",children:[f,S]}),e[24]=f,e[25]=S,e[26]=w):w=e[26];let b;e[27]!==c?(b=()=>c.mutate(),e[27]=c,e[28]=b):b=e[28];let g;e[29]!==c.isPending||e[30]!==s||e[31]!==i?(g=c.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=c.isPending,e[30]=s,e[31]=i,e[32]=g):g=e[32];let _;e[33]!==c.isPending||e[34]!==b||e[35]!==g?(_=n.jsx(M,{onClick:b,disabled:c.isPending,children:g}),e[33]=c.isPending,e[34]=b,e[35]=g,e[36]=_):_=e[36];const P=c.isPending;let T;e[37]!==i?(T=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=T):T=e[38];let j;e[39]!==c.isPending||e[40]!==T?(j=n.jsx(M,{variant:"ghost",onClick:x,disabled:P,children:T}),e[39]=c.isPending,e[40]=T,e[41]=j):j=e[41];let h;e[42]!==_||e[43]!==j?(h=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,j]}),e[42]=_,e[43]=j,e[44]=h):h=e[44];let N;return e[45]!==w||e[46]!==h||e[47]!==p?(N=n.jsxs(me,{children:[p,w,h]}),e[45]=w,e[46]=h,e[47]=p,e[48]=N):N=e[48],N}function Gn(){window.location.href="/"}function ut(t){const e=$.c(25),{orgSlug:s,orgName:r,reason:o}=t,a=W(),i=Jn,u=o==="not-found",m=u?sn:pt;let y;e[0]!==u||e[1]!==a?(y=a(u?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=u,e[1]=a,e[2]=y):y=e[2];const v=y;let c;e[3]!==u||e[4]!==r||e[5]!==s||e[6]!==a?(c=u?n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:r??s}),".",n.jsx("br",{}),a("common.noAccessScreen.askAdminToInvite")]}),e[3]=u,e[4]=r,e[5]=s,e[6]=a,e[7]=c):c=e[7];const x=c;let p;e[8]!==m?(p=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(m,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=m,e[9]=p):p=e[9];let l;e[10]!==v?(l=n.jsx("h3",{className:"text-lg font-medium",children:v}),e[10]=v,e[11]=l):l=e[11];let f;e[12]!==x?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[12]=x,e[13]=f):f=e[13];let d;e[14]!==l||e[15]!==f?(d=n.jsxs("div",{className:"space-y-2",children:[l,f]}),e[14]=l,e[15]=f,e[16]=d):d=e[16];let S;e[17]!==a?(S=a("common.noAccessScreen.goToHome"),e[17]=a,e[18]=S):S=e[18];let w;e[19]!==S?(w=n.jsx(M,{onClick:i,children:S}),e[19]=S,e[20]=w):w=e[20];let b;return e[21]!==p||e[22]!==d||e[23]!==w?(b=n.jsxs(me,{children:[p,d,w]}),e[21]=p,e[22]=d,e[23]=w,e[24]=b):b=e[24],b}function Jn(){window.location.href="/"}function Vn(t){const e=$.c(59),{invitationId:s,orgName:r,orgSlug:o,orgLogo:a}=t,i=W();let u;e[0]!==s?(u=async()=>{const L=await Re.organization.acceptInvitation({invitationId:s});if(L.error)throw new Error(L.error.message);return L.data},e[0]=s,e[1]=u):u=e[1];let m;e[2]!==o?(m=()=>{Mt(),window.location.href=`/${o}`},e[2]=o,e[3]=m):m=e[3];let y;e[4]!==i?(y=L=>{Fe.error(L instanceof Error?L.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=y):y=e[5];let v;e[6]!==u||e[7]!==m||e[8]!==y?(v={mutationFn:u,onSuccess:m,onError:y},e[6]=u,e[7]=m,e[8]=y,e[9]=v):v=e[9];const c=qe(v);let x;e[10]!==s?(x=async()=>{const L=await Re.organization.rejectInvitation({invitationId:s});if(L.error)throw new Error(L.error.message);return L.data},e[10]=s,e[11]=x):x=e[11];let p,l;e[12]!==i?(p=()=>{Fe.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},l=L=>{Fe.error(L instanceof Error?L.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=p,e[14]=l):(p=e[13],l=e[14]);let f;e[15]!==x||e[16]!==p||e[17]!==l?(f={mutationFn:x,onSuccess:p,onError:l},e[15]=x,e[16]=p,e[17]=l,e[18]=f):f=e[18];const d=qe(f),S=c.isPending||d.isPending;let w;e[19]!==a||e[20]!==r?(w=a?n.jsx(Qe,{url:a,fallback:r.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(on,{className:"h-6 w-6 text-primary"})}),e[19]=a,e[20]=r,e[21]=w):w=e[21];let b;e[22]!==r||e[23]!==i?(b=i("common.pendingInviteScreen.invitedTo",{orgName:r}),e[22]=r,e[23]=i,e[24]=b):b=e[24];let g;e[25]!==b?(g=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[25]=b,e[26]=g):g=e[26];let _;e[27]!==i?(_=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=_):_=e[28];let P;e[29]!==_?(P=n.jsx("p",{className:"text-sm text-muted-foreground",children:_}),e[29]=_,e[30]=P):P=e[30];let T;e[31]!==g||e[32]!==P?(T=n.jsxs("div",{className:"space-y-2",children:[g,P]}),e[31]=g,e[32]=P,e[33]=T):T=e[33];let j;e[34]!==c?(j=()=>c.mutate(),e[34]=c,e[35]=j):j=e[35];let h;e[36]!==c.isPending||e[37]!==i?(h=c.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=i,e[38]=h):h=e[38];let N;e[39]!==S||e[40]!==j||e[41]!==h?(N=n.jsx(M,{onClick:j,disabled:S,children:h}),e[39]=S,e[40]=j,e[41]=h,e[42]=N):N=e[42];let k;e[43]!==d?(k=()=>d.mutate(),e[43]=d,e[44]=k):k=e[44];let A;e[45]!==d.isPending||e[46]!==i?(A=d.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=d.isPending,e[46]=i,e[47]=A):A=e[47];let E;e[48]!==S||e[49]!==k||e[50]!==A?(E=n.jsx(M,{variant:"ghost",onClick:k,disabled:S,children:A}),e[48]=S,e[49]=k,e[50]=A,e[51]=E):E=e[51];let C;e[52]!==N||e[53]!==E?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,E]}),e[52]=N,e[53]=E,e[54]=C):C=e[54];let O;return e[55]!==T||e[56]!==C||e[57]!==w?(O=n.jsxs(me,{children:[w,T,C]}),e[55]=T,e[56]=C,e[57]=w,e[58]=O):O=e[58],O}function Wn(t){const e=$.c(23),{orgName:s,orgLogo:r}=t,o=W();let a;e[0]!==r||e[1]!==s?(a=r?n.jsx(Qe,{url:r,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(an,{className:"h-6 w-6 text-primary"})}),e[0]=r,e[1]=s,e[2]=a):a=e[2];let i;e[3]!==o?(i=o("common.requestPendingScreen.title"),e[3]=o,e[4]=i):i=e[4];let u;e[5]!==i?(u=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=u):u=e[6];let m;e[7]!==s||e[8]!==o?(m=o("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=o,e[9]=m):m=e[9];let y;e[10]!==m?(y=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[10]=m,e[11]=y):y=e[11];let v;e[12]!==u||e[13]!==y?(v=n.jsxs("div",{className:"space-y-2",children:[u,y]}),e[12]=u,e[13]=y,e[14]=v):v=e[14];let c;e[15]!==o?(c=o("common.requestPendingScreen.goHome"),e[15]=o,e[16]=c):c=e[16];let x;e[17]!==c?(x=n.jsx(M,{variant:"ghost",onClick:Yn,children:c}),e[17]=c,e[18]=x):x=e[18];let p;return e[19]!==a||e[20]!==v||e[21]!==x?(p=n.jsxs(me,{children:[a,v,x]}),e[19]=a,e[20]=v,e[21]=x,e[22]=p):p=e[22],p}function Yn(){window.location.href="/"}function Qn(t){const e=$.c(45),{orgName:s,orgSlug:r,orgLogo:o,domain:a}=t,i=W();let u;e[0]!==r?(u=async()=>{const N=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),k=await N.json();if(!N.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=r,e[1]=u):u=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=Zn,e[2]=m):m=e[2];let y;e[3]!==i?(y=N=>{Fe.error(N instanceof Error?N.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=y):y=e[4];let v;e[5]!==u||e[6]!==y?(v={mutationFn:u,onSuccess:m,onError:y},e[5]=u,e[6]=y,e[7]=v):v=e[7];const c=qe(v);let x;e[8]!==o||e[9]!==s?(x=o?n.jsx(Qe,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(St,{className:"h-6 w-6 text-primary"})}),e[8]=o,e[9]=s,e[10]=x):x=e[10];let p;e[11]!==s||e[12]!==i?(p=i("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=i,e[13]=p):p=e[13];let l;e[14]!==p?(l=n.jsx("h3",{className:"text-lg font-medium",children:p}),e[14]=p,e[15]=l):l=e[15];let f;e[16]!==a||e[17]!==i?(f=i("common.requestToJoinScreen.description",{domain:a}),e[16]=a,e[17]=i,e[18]=f):f=e[18];let d;e[19]!==f?(d=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[19]=f,e[20]=d):d=e[20];let S;e[21]!==l||e[22]!==d?(S=n.jsxs("div",{className:"space-y-2",children:[l,d]}),e[21]=l,e[22]=d,e[23]=S):S=e[23];let w;e[24]!==c?(w=()=>c.mutate(),e[24]=c,e[25]=w):w=e[25];let b;e[26]!==c.isPending||e[27]!==i?(b=c.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=i,e[28]=b):b=e[28];let g;e[29]!==c.isPending||e[30]!==w||e[31]!==b?(g=n.jsx(M,{onClick:w,disabled:c.isPending,children:b}),e[29]=c.isPending,e[30]=w,e[31]=b,e[32]=g):g=e[32];const _=c.isPending;let P;e[33]!==i?(P=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=P):P=e[34];let T;e[35]!==c.isPending||e[36]!==P?(T=n.jsx(M,{variant:"ghost",onClick:Xn,disabled:_,children:P}),e[35]=c.isPending,e[36]=P,e[37]=T):T=e[37];let j;e[38]!==g||e[39]!==T?(j=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,T]}),e[38]=g,e[39]=T,e[40]=j):j=e[40];let h;return e[41]!==S||e[42]!==j||e[43]!==x?(h=n.jsxs(me,{children:[x,S,j]}),e[41]=S,e[42]=j,e[43]=x,e[44]=h):h=e[44],h}function Xn(){window.location.href="/"}function Zn(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function es(t){const e=$.c(7);let s;e[0]!==t?(s=Ke.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==t?(r=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=r):r=e[3];let o;return e[4]!==s||e[5]!==r?(o={queryKey:s,queryFn:r,refetchOnWindowFocus:!1},e[4]=s,e[5]=r,e[6]=o):o=e[6],yt(o)}function ts({orgSlug:t}){const{data:e}=es(t);if(e.status!=="member"){Ft()?.org===t&&zt();const s=localStorage.getItem($e.lastOrgSlug())===t;if(s&&localStorage.removeItem($e.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(ut,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(Vn,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(Un,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Qn,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(Wn,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(ut,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function At(t){const e=$.c(42),{ariaLabel:s,dismissLabel:r,eyebrow:o,title:a,description:i,icon:u,children:m,footerLeading:y,actions:v,onDismiss:c,tone:x}=t,p=x===void 0?"neutral":x,l=y||v;let f;e[0]!==p?(f=p==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=p,e[1]=f):f=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(gn,{size:14}),e[2]=d):d=e[2];let S;e[3]!==r||e[4]!==c?(S=n.jsx(M,{size:"icon-sm",variant:"ghost","aria-label":r,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:d}),e[3]=r,e[4]=c,e[5]=S):S=e[5];const w=u&&"flex items-start gap-3",b=m&&"pb-3";let g;e[6]!==w||e[7]!==b?(g=et("p-4 pr-11",w,b),e[6]=w,e[7]=b,e[8]=g):g=e[8];let _;e[9]!==u?(_=u&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:u}),e[9]=u,e[10]=_):_=e[10];let P;e[11]!==o?(P=o&&n.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[11]=o,e[12]=P):P=e[12];let T;e[13]!==a?(T=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:a}),e[13]=a,e[14]=T):T=e[14];let j;e[15]!==i?(j=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=j):j=e[16];let h;e[17]!==T||e[18]!==j||e[19]!==P?(h=n.jsxs("div",{children:[P,T,j]}),e[17]=T,e[18]=j,e[19]=P,e[20]=h):h=e[20];let N;e[21]!==m?(N=m&&n.jsx("div",{className:"mt-3",children:m}),e[21]=m,e[22]=N):N=e[22];let k;e[23]!==h||e[24]!==N?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[h,N]}),e[23]=h,e[24]=N,e[25]=k):k=e[25];let A;e[26]!==k||e[27]!==g||e[28]!==_?(A=n.jsxs("div",{className:g,children:[_,k]}),e[26]=k,e[27]=g,e[28]=_,e[29]=A):A=e[29];let E;e[30]!==v||e[31]!==y||e[32]!==l||e[33]!==p?(E=l&&n.jsxs("div",{className:et("flex items-center justify-between gap-3 px-4 py-2.5",p==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:y}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:v})]}),e[30]=v,e[31]=y,e[32]=l,e[33]=p,e[34]=E):E=e[34];let C;return e[35]!==s||e[36]!==A||e[37]!==E||e[38]!==f||e[39]!==S||e[40]!==p?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":p,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[f,S,A,E]}),e[35]=s,e[36]=A,e[37]=E,e[38]=f,e[39]=S,e[40]=p,e[41]=C):C=e[41],C}const ns=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function ss(t){return ns.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function os(t,e){return ss(e).map(s=>({element:wt(s.anchor),popover:{title:t(s.titleKey),description:t(s.descKey),side:s.side,align:"center"}}))}const is=wt("switcher"),as=30;function Pt(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function rs(t,e){return os(t,e).filter(s=>typeof s.element=="string"&&Pt(s.element))}function ls(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(s,{driver:r})=>{if(s.footerButtons.querySelector(".layout-tour-skip"))return;const o=document.createElement("button");o.type="button",o.className="driver-popover-footer-btn layout-tour-skip",o.textContent=t("layoutTour.skip"),o.addEventListener("click",()=>r.destroy()),s.footerButtons.insertBefore(o,s.footerButtons.firstChild)},onDestroyed:()=>{Me=!1},steps:e}}let Me=!1;async function cs(){return(await qt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function ds(t,e){if(Me)return;Me=!0;let s=0;const r=()=>{if(!Pt(is)&&s++<as){requestAnimationFrame(r);return}const o=rs(t,e);if(o.length===0){Me=!1;return}cs().then(a=>{a(ls(t,o)).drive()}).catch(()=>{Me=!1})};r()}const us=[{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:rt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:te,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:Ze,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:Ze,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:ie,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:ae,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:ae,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:te,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:rn,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:Ze,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:te,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:ie,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:ae,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:te,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:ie,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:ae,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:ie,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:te,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:ae,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:te,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:ie,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:ae,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:te,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:ie,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:ae,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:te,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ct,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:ie,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:rt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:ae,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:ie,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:te,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ct,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:te,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:ln,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Ct=us,Ye="studio.release-feed.v1",nt=new Set;let de="",ue={},st=!1;function ms(){if(st)return de||"{}";try{return localStorage.getItem(Ye)??"{}"}catch{return de||"{}"}}function Et(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function mt(){const t=ms();return t!==de&&(de=t,ue=Et(t)),ue}function fs(t){nt.add(t);const e=s=>{if(!(s.key!==Ye&&s.key!==null)){try{const r=localStorage.getItem(Ye)??"{}",a={...Et(r),...ue};ue=a,de=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{nt.delete(t),window.removeEventListener("storage",e)}}function gs(t){ue=t,de=JSON.stringify(t);try{localStorage.setItem(Ye,de),st=!1}catch{st=!0}nt.forEach(e=>e())}function hs(){const t=$.c(7),e=V.useSyncExternalStore(fs,mt,mt);let s;t[0]!==e?(s=m=>!!e[m],t[0]=e,t[1]=s):s=t[1];const r=s,o=ps;let a;t[2]!==e?(a=Ct.reduce((m,y)=>e[y.id]?m:m+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let u;return t[4]!==r||t[5]!==i?(u={isSeen:r,markSeen:o,unseenCount:i},t[4]=r,t[5]=i,t[6]=u):u=t[6],u}function ps(t){ue[t]||gs({...ue,[t]:{seenAt:new Date().toISOString()}})}const ys=720*60*60*1e3,bs=10080*60*1e3;function xs(t){const[e,s,r]=t.split("-").map(Number);return!e||!s||!r?new Date(t).getTime():new Date(e,s-1,r).getTime()}function Ss(t){const e=Ct[0];if(!e)return null;const s=xs(e.date),r=t-s;return r<0||r>ys?null:e}function ws(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function vs(t,e){const s=ws(t);return s===null?!1:e-s>=bs}function js(){const t=$.c(52),e=W(),s=Sn(),r=jn(),o=vt(),a=!!s,i=r===ne.home&&!s;let u;t[0]!==o||t[1]!==a?(u=a&&!!o&&kn(o),t[0]=o,t[1]=a,t[2]=u):u=t[2];const m=u,{data:y}=Re.useSession(),{isSeen:v,markSeen:c}=hs(),[x,p]=V.useState(!1);let l,f,d;if(t[3]!==v||t[4]!==y?.user?.createdAt){d=Symbol.for("react.early_return_sentinel");e:{const O=Date.now();if(l=Ss(O),!l){d=null;break e}if(!vs(y?.user?.createdAt,O)){d=null;break e}f=v(l.id)}t[3]=v,t[4]=y?.user?.createdAt,t[5]=l,t[6]=f,t[7]=d}else l=t[5],f=t[6],d=t[7];if(d!==Symbol.for("react.early_return_sentinel"))return d;if(f)return null;let S;t[8]!==l.id||t[9]!==a||t[10]!==c||t[11]!==i||t[12]!==m||t[13]!==e?(S=()=>{c(l.id),ds(e,{onOrgHome:i,inProject:a,onSiteEditor:m})},t[8]=l.id,t[9]=a,t[10]=c,t[11]=i,t[12]=m,t[13]=e,t[14]=S):S=t[14];const w=S;let b;t[15]!==e?(b=e("announcements.release.ariaLabel"),t[15]=e,t[16]=b):b=t[16];let g;t[17]!==e?(g=e("announcements.release.dismiss"),t[17]=e,t[18]=g):g=t[18];const _=l.eyebrow,P=l.title;let T;t[19]!==l.id||t[20]!==c?(T=()=>c(l.id),t[19]=l.id,t[20]=c,t[21]=T):T=t[21];let j;t[22]!==l.id||t[23]!==l.learnMoreHref||t[24]!==c||t[25]!==e?(j=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>c(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[22]=l.id,t[23]=l.learnMoreHref,t[24]=c,t[25]=e,t[26]=j):j=t[26];let h;t[27]!==l.cta||t[28]!==l.id||t[29]!==c||t[30]!==w?(h=l.cta?"href"in l.cta?n.jsx(M,{asChild:!0,size:"sm",onClick:()=>c(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):l.cta.action==="start-tour"?n.jsx(M,{size:"sm",onClick:w,children:l.cta.label}):n.jsx(M,{size:"sm",onClick:()=>p(!0),children:l.cta.label}):null,t[27]=l.cta,t[28]=l.id,t[29]=c,t[30]=w,t[31]=h):h=t[31];let N;t[32]!==l.bullets?(N=l.bullets.map(ks),t[32]=l.bullets,t[33]=N):N=t[33];let k;t[34]!==N?(k=n.jsx("ul",{className:"flex flex-col gap-3",children:N}),t[34]=N,t[35]=k):k=t[35];let A;t[36]!==l.id||t[37]!==c?(A=O=>{p(O),O||c(l.id)},t[36]=l.id,t[37]=c,t[38]=A):A=t[38];let E;t[39]!==x||t[40]!==A?(E=n.jsx(hn,{open:x,onOpenChange:A}),t[39]=x,t[40]=A,t[41]=E):E=t[41];let C;return t[42]!==l.eyebrow||t[43]!==l.title||t[44]!==h||t[45]!==k||t[46]!==E||t[47]!==b||t[48]!==g||t[49]!==T||t[50]!==j?(C=n.jsxs(At,{ariaLabel:b,dismissLabel:g,eyebrow:_,title:P,onDismiss:T,footerLeading:j,actions:h,children:[k,E]}),t[42]=l.eyebrow,t[43]=l.title,t[44]=h,t[45]=k,t[46]=E,t[47]=b,t[48]=g,t[49]=T,t[50]=j,t[51]=C):C=t[51],C}function ks(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const Ot=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),re=Ot?"⌘":"Ctrl",J={commandPalette:{keys:[re,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[re,"["],description:"Back to previous"},focusChatInput:{keys:[re,"L"],description:"Focus chat input"},saveAndFormat:{keys:[re,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[re,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[re,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",re,"S"],description:"New task"},toggleDaemon:{keys:[re,"D"],description:"Toggle daemon logs"}},Ts=[{label:"General",shortcuts:[J.commandPalette,J.keyboardShortcuts,J.back,J.newTask,J.toggleDaemon]},{label:"Editor",shortcuts:[J.saveAndFormat]},{label:"Chat",shortcuts:[J.focusChatInput,J.togglePlanMode,J.sendMessage,J.newLine]},{label:"Questions",shortcuts:[J.selectOption]},{label:"Monitoring",shortcuts:[J.applyFilter]}];function ft(t){return Ot?t.metaKey:t.ctrlKey}function Ns(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function _s(t){const e=$.c(11),{open:s,onOpenChange:r}=t,o=W();let a;e[0]!==o?(a=o("common.keyboardShortcutsDialog.title"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==a?(i=n.jsx(jt,{children:n.jsx(kt,{children:a})}),e[2]=a,e[3]=i):i=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex flex-col gap-4",children:Ts.map(As)}),e[4]=u):u=e[4];let m;e[5]!==i?(m=n.jsxs(Tt,{className:"sm:max-w-md",children:[i,u]}),e[5]=i,e[6]=m):m=e[6];let y;return e[7]!==r||e[8]!==s||e[9]!==m?(y=n.jsx(Nt,{open:s,onOpenChange:r,children:m}),e[7]=r,e[8]=s,e[9]=m,e[10]=y):y=e[10],y}function As(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Ps)})]},t.label)}function Ps(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Cs)})]},t.description)}function Cs(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const gt=8;function Es(t){const{org:e}=ot(),s=Ln({connectionId:_t,orgId:e.id,orgSlug:e.slug}),{data:r}=Be({queryKey:Ke.globalSearch(e.id,t,gt),enabled:!!s&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!s)return[];try{return(await s.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:gt}})).structuredContent?.items??[]}catch{return[]}}});return r??[]}function Os(t){const e=$.c(165),{open:s,onOpenChange:r}=t,o=W(),a=bt(),{org:i}=ot(),{projects:u,hasProjects:m}=wn(),[y,v]=V.useState(""),c=V.useDeferredValue(y),x=Es(c);let p;e[0]!==r?(p=()=>{r(!1),v("")},e[0]=r,e[1]=p):p=e[1];const l=p;let f;e[2]!==l?(f=(D,Rt)=>{tt("command_palette_used",{kind:Rt}),D(),l()},e[2]=l,e[3]=f):f=e[3];const d=f;let S;e[4]!==a||e[5]!==i.slug?(S=D=>{if(D.type==="task"){a({to:ne.tasks,params:{org:i.slug,taskKey:D.key??void 0}});return}a({to:ne.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:D.virtual_mcp_id??void 0,thread:D.id}})},e[4]=a,e[5]=i.slug,e[6]=S):S=e[6];const w=S;let b;e[7]!==i.slug?(b={org:i.slug},e[7]=i.slug,e[8]=b):b=e[8];const g=b;let _;e[9]!==o?(_=o("sidebar.navDestinations.home"),e[9]=o,e[10]=_):_=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(dn,{}),e[11]=P):P=e[11];let T;e[12]!==g||e[13]!==_?(T={key:"home",label:_,icon:P,to:ne.home,params:g},e[12]=g,e[13]=_,e[14]=T):T=e[14];let j;e[15]!==o?(j=o("sidebar.navDestinations.reports"),e[15]=o,e[16]=j):j=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(un,{}),e[17]=h):h=e[17];let N;e[18]!==g||e[19]!==j?(N={key:"reports",label:j,icon:h,to:ne.reports,params:g},e[18]=g,e[19]=j,e[20]=N):N=e[20];let k;e[21]!==o?(k=o("sidebar.navDestinations.tasks"),e[21]=o,e[22]=k):k=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(lt,{}),e[23]=A):A=e[23];let E;e[24]!==i.slug?(E={org:i.slug,taskKey:void 0},e[24]=i.slug,e[25]=E):E=e[25];let C;e[26]!==k||e[27]!==E?(C={key:"tasks",label:k,icon:A,to:ne.tasks,params:E},e[26]=k,e[27]=E,e[28]=C):C=e[28];let O;e[29]!==o?(O=o("sidebar.navDestinations.library"),e[29]=o,e[30]=O):O=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(An,{}),e[31]=L):L=e[31];let R;e[32]!==g||e[33]!==O?(R={key:"library",label:O,icon:L,to:ne.library,params:g},e[32]=g,e[33]=O,e[34]=R):R=e[34];let z;e[35]!==o?(z=o("sidebar.navDestinations.discover"),e[35]=o,e[36]=z):z=e[36];let G;e[37]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(mn,{}),e[37]=G):G=e[37];let q;e[38]!==g||e[39]!==z?(q={key:"discover",label:z,icon:G,to:ne.discover,params:g},e[38]=g,e[39]=z,e[40]=q):q=e[40];let se;e[41]!==N||e[42]!==C||e[43]!==R||e[44]!==q||e[45]!==T?(se=[T,N,C,R,q],e[41]=N,e[42]=C,e[43]=R,e[44]=q,e[45]=T,e[46]=se):se=e[46];const oe=se;let le;e[47]!==l||e[48]!==r?(le=D=>D?r(!0):l(),e[47]=l,e[48]=r,e[49]=le):le=e[49];let ee;e[50]!==o?(ee=o("commandPalette.title"),e[50]=o,e[51]=ee):ee=e[51];let B;e[52]!==o?(B=o("commandPalette.description"),e[52]=o,e[53]=B):B=e[53];let K;e[54]!==o?(K=o("commandPalette.placeholder"),e[54]=o,e[55]=K):K=e[55];let Y;e[56]!==K||e[57]!==y?(Y=n.jsx(Cn,{placeholder:K,value:y,onValueChange:v}),e[56]=K,e[57]=y,e[58]=Y):Y=e[58];let Q;e[59]!==o?(Q=o("commandPalette.empty"),e[59]=o,e[60]=Q):Q=e[60];let H;e[61]!==Q?(H=n.jsx(En,{children:Q}),e[61]=Q,e[62]=H):H=e[62];let U;e[63]!==o?(U=o("commandPalette.goTo"),e[63]=o,e[64]=U):U=e[64];let X;e[65]!==oe||e[66]!==d||e[67]!==a?(X=oe.map(D=>n.jsxs(ce,{onSelect:()=>d(()=>a({to:D.to,params:D.params}),"destination"),children:[D.icon,n.jsx("span",{children:D.label})]},D.key)),e[65]=oe,e[66]=d,e[67]=a,e[68]=X):X=e[68];let Z;e[69]!==U||e[70]!==X?(Z=n.jsx(We,{heading:U,children:X}),e[69]=U,e[70]=X,e[71]=Z):Z=e[71];let I;e[72]!==d||e[73]!==m||e[74]!==a||e[75]!==i.slug||e[76]!==u||e[77]!==o?(I=m&&n.jsx(We,{heading:o("commandPalette.projects"),children:u.map(D=>n.jsxs(ce,{value:`project ${D.title}`,onSelect:()=>d(()=>a({to:ne.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:D.id}}),"project"),children:[n.jsx(vn,{icon:D.icon,name:D.title}),n.jsx("span",{children:D.title})]},D.id))}),e[72]=d,e[73]=m,e[74]=a,e[75]=i.slug,e[76]=u,e[77]=o,e[78]=I):I=e[78];let F;e[79]!==o?(F=o("commandPalette.actions"),e[79]=o,e[80]=F):F=e[80];let fe;e[81]!==o?(fe=o("commandPalette.newProject"),e[81]=o,e[82]=fe):fe=e[82];let ge;e[83]!==d||e[84]!==a||e[85]!==i.slug?(ge=()=>d(()=>a({to:ne.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:void 0}}),"new_project"),e[83]=d,e[84]=a,e[85]=i.slug,e[86]=ge):ge=e[86];let He;e[87]===Symbol.for("react.memo_cache_sentinel")?(He=n.jsx(dt,{}),e[87]=He):He=e[87];let he;e[88]!==o?(he=o("commandPalette.newProject"),e[88]=o,e[89]=he):he=e[89];let pe;e[90]!==he?(pe=n.jsx("span",{children:he}),e[90]=he,e[91]=pe):pe=e[91];let ye;e[92]!==fe||e[93]!==ge||e[94]!==pe?(ye=n.jsxs(ce,{value:fe,onSelect:ge,children:[He,pe]}),e[92]=fe,e[93]=ge,e[94]=pe,e[95]=ye):ye=e[95];let be;e[96]!==o?(be=o("commandPalette.inviteTeammate"),e[96]=o,e[97]=be):be=e[97];let xe;e[98]!==d||e[99]!==a||e[100]!==g?(xe=()=>d(()=>a({to:"/$org/settings/members",params:g}),"invite"),e[98]=d,e[99]=a,e[100]=g,e[101]=xe):xe=e[101];let Ue;e[102]===Symbol.for("react.memo_cache_sentinel")?(Ue=n.jsx(fn,{}),e[102]=Ue):Ue=e[102];let Se;e[103]!==o?(Se=o("commandPalette.inviteTeammate"),e[103]=o,e[104]=Se):Se=e[104];let we;e[105]!==Se?(we=n.jsx("span",{children:Se}),e[105]=Se,e[106]=we):we=e[106];let ve;e[107]!==be||e[108]!==xe||e[109]!==we?(ve=n.jsxs(ce,{value:be,onSelect:xe,children:[Ue,we]}),e[107]=be,e[108]=xe,e[109]=we,e[110]=ve):ve=e[110];let je;e[111]!==o?(je=o("commandPalette.addConnection"),e[111]=o,e[112]=je):je=e[112];let ke;e[113]!==d||e[114]!==a||e[115]!==g?(ke=()=>d(()=>a({to:"/$org/settings/connections",params:g,search:{tab:"all"}}),"add_connection"),e[113]=d,e[114]=a,e[115]=g,e[116]=ke):ke=e[116];let Ge;e[117]===Symbol.for("react.memo_cache_sentinel")?(Ge=n.jsx(dt,{}),e[117]=Ge):Ge=e[117];let Te;e[118]!==o?(Te=o("commandPalette.addConnection"),e[118]=o,e[119]=Te):Te=e[119];let Ne;e[120]!==Te?(Ne=n.jsx("span",{children:Te}),e[120]=Te,e[121]=Ne):Ne=e[121];let _e;e[122]!==je||e[123]!==ke||e[124]!==Ne?(_e=n.jsxs(ce,{value:je,onSelect:ke,children:[Ge,Ne]}),e[122]=je,e[123]=ke,e[124]=Ne,e[125]=_e):_e=e[125];let Ae;e[126]!==o?(Ae=o("commandPalette.settings"),e[126]=o,e[127]=Ae):Ae=e[127];let Pe;e[128]!==d||e[129]!==a||e[130]!==g?(Pe=()=>d(()=>a({to:"/$org/settings/general",params:g}),"settings"),e[128]=d,e[129]=a,e[130]=g,e[131]=Pe):Pe=e[131];let Je;e[132]===Symbol.for("react.memo_cache_sentinel")?(Je=n.jsx(Pn,{}),e[132]=Je):Je=e[132];let Ce;e[133]!==o?(Ce=o("commandPalette.settings"),e[133]=o,e[134]=Ce):Ce=e[134];let Ee;e[135]!==Ce?(Ee=n.jsx("span",{children:Ce}),e[135]=Ce,e[136]=Ee):Ee=e[136];let Oe;e[137]!==Ae||e[138]!==Pe||e[139]!==Ee?(Oe=n.jsxs(ce,{value:Ae,onSelect:Pe,children:[Je,Ee]}),e[137]=Ae,e[138]=Pe,e[139]=Ee,e[140]=Oe):Oe=e[140];let Ie;e[141]!==F||e[142]!==ye||e[143]!==ve||e[144]!==_e||e[145]!==Oe?(Ie=n.jsxs(We,{heading:F,children:[ye,ve,_e,Oe]}),e[141]=F,e[142]=ye,e[143]=ve,e[144]=_e,e[145]=Oe,e[146]=Ie):Ie=e[146];let Le;e[147]!==d||e[148]!==x||e[149]!==w||e[150]!==o?(Le=x.length>0&&n.jsx(We,{heading:o("commandPalette.results"),children:x.map(D=>n.jsxs(ce,{value:`${D.title} ${D.id}`,onSelect:()=>d(()=>w(D),D.type),children:[D.type==="thread"?n.jsx(cn,{}):n.jsx(lt,{}),n.jsx("span",{className:"truncate",children:D.title}),D.type==="task"&&D.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:D.key})]},`${D.type}:${D.id}`))}),e[147]=d,e[148]=x,e[149]=w,e[150]=o,e[151]=Le):Le=e[151];let De;e[152]!==H||e[153]!==Z||e[154]!==I||e[155]!==Ie||e[156]!==Le?(De=n.jsxs(On,{children:[H,Z,I,Ie,Le]}),e[152]=H,e[153]=Z,e[154]=I,e[155]=Ie,e[156]=Le,e[157]=De):De=e[157];let Ve;return e[158]!==s||e[159]!==le||e[160]!==ee||e[161]!==B||e[162]!==Y||e[163]!==De?(Ve=n.jsxs(In,{open:s,onOpenChange:le,title:ee,description:B,shouldFilter:!1,children:[Y,De]}),e[158]=s,e[159]=le,e[160]=ee,e[161]=B,e[162]=Y,e[163]=De,e[164]=Ve):Ve=e[164],Ve}const ze=new Rn(!1);function Is(){ze.set(!0)}function Ls(){ze.set(!1)}function Ds(){const t=$.c(2),e=V.useSyncExternalStore(ze.subscribe,ze.get);let s;return t[0]!==e?(s=[e,ze.set],t[0]=e,t[1]=s):s=t[1],s}const $s=300*1e3,Rs=2;function Ms(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Fs(t,e){return t.count>=Rs&&t.version!==null&&t.version!==e}function zs(){const t=$.c(43),e=W(),s=Fn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={mutationFn:Bs},t[0]=r):r=t[0];const o=qe(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:Ke.appVersionCheck(),queryFn:qs,refetchInterval:$s,refetchIntervalInBackground:!0,staleTime:0},t[1]=a):a=t[1];const{data:i,dataUpdatedAt:u}=Be(a),[m,y]=V.useState(0);let v;t[2]===Symbol.for("react.memo_cache_sentinel")?(v={version:null,count:0},t[2]=v):v=t[2];const[c,x]=V.useState(v);u!==m&&(y(u),x(z=>Ms(z,i,"4.345.1")));const[p,l]=V.useState(null),f=s;let d;t[3]!==s||t[4]!==o?(d=()=>window.location.reload(),t[3]=s,t[4]=o,t[5]=d):d=t[5];const S=d,w="announcements.version.refresh";if(!Fs(c,p))return null;let b;t[6]!==e?(b=e("announcements.version.ariaLabel"),t[6]=e,t[7]=b):b=t[7];let g;t[8]!==e?(g=e("announcements.version.dismiss"),t[8]=e,t[9]=g):g=t[9];let _;t[10]!==e?(_=e("announcements.version.eyebrow"),t[10]=e,t[11]=_):_=t[11];let P;t[12]!==e?(P=e("announcements.version.title"),t[12]=e,t[13]=P):P=t[13];const T="announcements.version.description";let j;t[14]!==e||t[15]!==T?(j=e(T),t[14]=e,t[15]=T,t[16]=j):j=t[16];let h;t[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(at,{size:16}),t[17]=h):h=t[17];let N;t[18]!==c.version?(N=()=>l(c.version),t[18]=c.version,t[19]=N):N=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.345.1"}),t[20]=e,t[21]=k):k=t[21];let A;t[22]!==w||t[23]!==e?(A=e(w),t[22]=w,t[23]=e,t[24]=A):A=t[24];const E=f;let C;t[25]!==E?(C=et(E),t[25]=E,t[26]=C):C=t[26];let O;t[27]!==C?(O=n.jsx(at,{size:14,className:C}),t[27]=C,t[28]=O):O=t[28];let L;t[29]!==S||t[30]!==f||t[31]!==A||t[32]!==O?(L=n.jsxs(M,{size:"sm",disabled:f,onClick:S,children:[A,O]}),t[29]=S,t[30]=f,t[31]=A,t[32]=O,t[33]=L):L=t[33];let R;return t[34]!==N||t[35]!==k||t[36]!==L||t[37]!==b||t[38]!==g||t[39]!==_||t[40]!==P||t[41]!==j?(R=n.jsx(At,{ariaLabel:b,dismissLabel:g,eyebrow:_,title:P,description:j,icon:h,tone:"system",onDismiss:N,footerLeading:k,actions:L}),t[34]=N,t[35]=k,t[36]=L,t[37]=b,t[38]=g,t[39]=_,t[40]=P,t[41]=j,t[42]=R):R=t[42],R}async function qs(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function Bs(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function Ks(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const Hs=Date.parse("2026-07-21T00:00:00Z"),ht=t=>Ks($e.ptBrAnnouncementSeen(t));function Us(){const t=$.c(35),e=W(),[s,r]=Bt(),{data:o,isPending:a}=Re.useSession(),i=o?.user,u=i?.id,m=i?.createdAt,y=m!=null&&new Date(m).getTime()<Hs,v=Kt()==="pt-BR",c=!a&&!!u&&y&&v&&s.language==="en"&&!ht(u).has(),[x,p]=V.useState(!1),[l,f]=V.useState(!1);!x&&!a&&(p(!0),c&&u&&(ht(u).mark(),r(Js),f(!0),tt("pt_br_auto_switch_shown")));let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=G=>{tt("pt_br_auto_switch_closed",{action:G}),f(!1)},t[0]=d):d=t[0];const S=d;let w;t[1]!==r?(w=()=>{r(Gs),S("switch-back")},t[1]=r,t[2]=w):w=t[2];const b=w;let g;t[3]===Symbol.for("react.memo_cache_sentinel")?(g=G=>!G&&S("dismiss"),t[3]=g):g=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=_):_=t[4];let P;t[5]!==e?(P=e("announcements.ptBr.title"),t[5]=e,t[6]=P):P=t[6];let T;t[7]!==P?(T=n.jsx(kt,{children:P}),t[7]=P,t[8]=T):T=t[8];let j;t[9]!==e?(j=e("announcements.ptBr.description"),t[9]=e,t[10]=j):j=t[10];let h;t[11]!==j?(h=n.jsx(Nn,{children:j}),t[11]=j,t[12]=h):h=t[12];let N;t[13]!==T||t[14]!==h?(N=n.jsxs(jt,{children:[T,h]}),t[13]=T,t[14]=h,t[15]=N):N=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let A;t[18]!==b||t[19]!==k?(A=n.jsx(M,{variant:"outline",onClick:b,children:k}),t[18]=b,t[19]=k,t[20]=A):A=t[20];let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>S("ok"),t[21]=E):E=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let O;t[24]!==C?(O=n.jsx(M,{onClick:E,children:C}),t[24]=C,t[25]=O):O=t[25];let L;t[26]!==A||t[27]!==O?(L=n.jsxs(_n,{children:[A,O]}),t[26]=A,t[27]=O,t[28]=L):L=t[28];let R;t[29]!==L||t[30]!==N?(R=n.jsxs(Tt,{className:"sm:max-w-md",children:[_,N,L]}),t[29]=L,t[30]=N,t[31]=R):R=t[31];let z;return t[32]!==l||t[33]!==R?(z=n.jsx(Nt,{open:l,onOpenChange:g,children:R}),t[32]=l,t[33]=R,t[34]=z):z=t[34],z}function Gs(t){return{...t,language:"en"}}function Js(t){return{...t,language:"pt-BR"}}function Vs(t){const e=Ht(t);return typeof e=="string"?e:void 0}function Ws(){return Vs("experiment-pipeline-check"),null}function Ys(t){const e=$.c(1),{activeOrg:s}=t;if(!s)return null;Ut(s.id,{name:s.name??void 0,slug:s.slug??void 0}),Gt();let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ws,{}),e[0]=r):r=e[0],r}function Qs(t){const{prev:e,virtualMcpId:s,decopilotId:r,savedLayout:o,opts:a,autosendValue:i}=t,u={mainpanel:void 0};s?u.virtualmcpid=s:e.virtualmcpid&&(u.virtualmcpid=e.virtualmcpid);const m=typeof e.virtualmcpid=="string"?e.virtualmcpid:r,v=(s??m)!==m;let c,x;return a?.panel?x=a.panel:o?(x=o.tab,o.sidepanel!==void 0&&(c=o.sidepanel),o.mainpanel!==void 0&&(u.mainpanel=o.mainpanel)):!v&&e.tabId&&!Jt(e.tabId)&&(x=e.tabId),c!==void 0&&(u.sidepanel=c),a?.autosend&&(u.autosend=i),{tabId:x,search:u}}const It="studio:thread-layout:v3",Xs=50;function Lt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function Zs(t,e,s,r=Xs){const o=t.filter(([a])=>a!==e);for(o.push([e,Lt(s)]);o.length>r;)o.shift();return o}function it(){try{const t=sessionStorage.getItem(It);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function Dt(t){try{sessionStorage.setItem(It,JSON.stringify(t))}catch{}}function eo(t,e){t&&Dt(Zs(it(),t,e))}function to(t){if(!t)return null;const e=it().find(([s])=>s===t);return e?Lt(e[1]):null}function Go(t){if(!t)return;const e=it(),s=e.filter(([r])=>r!==t);s.length!==e.length&&Dt(s)}function $t(t){return{queryKey:Ke.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Jo(t){const e=$.c(10);let s;e[0]!==t?(s=$t(t),e[0]=t,e[1]=s):s=e[1];const r=Be(s);let o;e[2]!==r.data?.prompts?(o=r.data?.prompts??[],e[2]=r.data?.prompts,e[3]=o):o=e[3];let a;e[4]!==r.data?.tiles?(a=r.data?.tiles??[],e[4]=r.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==r.isLoading||e[7]!==o||e[8]!==a?(i={isLoading:r.isLoading,prompts:o,tiles:a},e[6]=r.isLoading,e[7]=o,e[8]=a,e[9]=i):i=e[9],i}function no(t){const e=$.c(31),{orgSlug:s,orgName:r,domain:o}=t,a=W();let i;e[0]!==s?(i=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=i):i=e[1];const u=i,m=so;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(pt,{className:"h-6 w-6 text-primary"})}),e[2]=y):y=e[2];let v;e[3]!==a?(v=a("common.ssoRequiredScreen.title"),e[3]=a,e[4]=v):v=e[4];let c;e[5]!==v?(c=n.jsx("h3",{className:"text-lg font-medium",children:v}),e[5]=v,e[6]=c):c=e[6];let x;e[7]!==o||e[8]!==r||e[9]!==a?(x=r?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:r})," ",a("common.ssoRequiredScreen.requiresSsoAuth"),o?` ${a("common.ssoRequiredScreen.via",{domain:o})}`:"","."]}):a("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=o,e[8]=r,e[9]=a,e[10]=x):x=e[10];let p;e[11]!==x?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[11]=x,e[12]=p):p=e[12];let l;e[13]!==c||e[14]!==p?(l=n.jsxs("div",{className:"space-y-2",children:[c,p]}),e[13]=c,e[14]=p,e[15]=l):l=e[15];let f;e[16]!==a?(f=a("common.ssoRequiredScreen.signInWithSso"),e[16]=a,e[17]=f):f=e[17];let d;e[18]!==u||e[19]!==f?(d=n.jsx(M,{onClick:u,children:f}),e[18]=u,e[19]=f,e[20]=d):d=e[20];let S;e[21]!==a?(S=a("common.ssoRequiredScreen.goBack"),e[21]=a,e[22]=S):S=e[22];let w;e[23]!==S?(w=n.jsx(M,{variant:"ghost",onClick:m,children:S}),e[23]=S,e[24]=w):w=e[24];let b;e[25]!==w||e[26]!==d?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[d,w]}),e[25]=w,e[26]=d,e[27]=b):b=e[27];let g;return e[28]!==b||e[29]!==l?(g=n.jsxs(me,{children:[y,l,b]}),e[28]=b,e[29]=l,e[30]=g):g=e[30],g}function so(){window.location.href="/"}function oo(t){const e=$.c(27),{notice:s,orgSlug:r}=t,o=W();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(Vt,{className:"h-6 w-6 text-destructive"})}),e[0]=a):a=e[0];let i;e[1]!==s.title?(i=n.jsx("h3",{className:"text-lg font-medium",children:s.title}),e[1]=s.title,e[2]=i):i=e[2];let u;e[3]!==s.message?(u=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:s.message}),e[3]=s.message,e[4]=u):u=e[4];let m;e[5]!==i||e[6]!==u?(m=n.jsxs("div",{className:"space-y-2",children:[i,u]}),e[5]=i,e[6]=u,e[7]=m):m=e[7];let y;e[8]!==s.ctaLabel||e[9]!==s.ctaUrl?(y=s.ctaUrl&&s.ctaLabel?n.jsx(M,{asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,e[8]=s.ctaLabel,e[9]=s.ctaUrl,e[10]=y):y=e[10];const v=`/${encodeURIComponent(r)}/settings/infra-billing`;let c;e[11]!==o?(c=o("common.blockedOrgScreen.goToBilling"),e[11]=o,e[12]=c):c=e[12];let x;e[13]!==v||e[14]!==c?(x=n.jsx(M,{variant:"outline",asChild:!0,children:n.jsx("a",{href:v,children:c})}),e[13]=v,e[14]=c,e[15]=x):x=e[15];let p;e[16]!==o?(p=o("common.blockedOrgScreen.switchOrg"),e[16]=o,e[17]=p):p=e[17];let l;e[18]!==p?(l=n.jsx(M,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:p})}),e[18]=p,e[19]=l):l=e[19];let f;e[20]!==l||e[21]!==y||e[22]!==x?(f=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[y,x,l]}),e[20]=l,e[21]=y,e[22]=x,e[23]=f):f=e[23];let d;return e[24]!==f||e[25]!==m?(d=n.jsxs(me,{children:[a,m,f]}),e[24]=f,e[25]=m,e[26]=d):d=e[26],d}const io="/settings/infra-billing";function ao(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(io)}function ro(t){const e=$.c(8),{org:s,children:r}=t,a=Bn(s.id,s.slug)?.enabled_plugins??null;let i;e[0]!==s.id||e[1]!==s.name||e[2]!==a?(i={id:s.id,organizationId:s.id,slug:"_org",name:s.name,enabledPlugins:a,ui:null},e[0]=s.id,e[1]=s.name,e[2]=a,e[3]=i):i=e[3];const u=i;let m;return e[4]!==r||e[5]!==s||e[6]!==u?(m=n.jsx(nn,{org:s,project:u,children:r}),e[4]=r,e[5]=s,e[6]=u,e[7]=m):m=e[7],m}function lo(){const t=bt(),e=Mn(),{org:s}=ot(),r=Wt({strict:!1}),o=vt(),{openPanel:a,closePanel:i}=Tn(),u=pn(),m=yn(),y=bn(),v=xn(),c=(f,d=!0)=>t({to:".",search:f,replace:d}),x=()=>c(f=>({...f,sidepanel:!0})),p=(f,d,S)=>{const w=!!m&&m===f;m&&!w&&eo(m,{tab:o,mainpanel:r.mainpanel,sidepanel:r.sidepanel});const b=w?null:to(f),g=$n(s.id).id,_=Qs({prev:{virtualmcpid:u,tabId:o},virtualMcpId:d,decopilotId:g,savedLayout:b,opts:S,autosendValue:qn});return v(f,()=>_.search,{virtualMcpId:d,view:{tabId:_.tabId}})};return{openSidePanel:x,setTaskId:p,createNewTask:async(f,d,S)=>{const w=crypto.randomUUID(),b=f??y;try{await e?.create({id:w,virtual_mcp_id:b,...d?{branch:d}:{}})}catch{}p(w,b,S)},openTab:a,closeTab:i}}const co=new Set(["/$org/","/$org/home"]);function uo(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:mo},t[0]=e):e=t[0],xt(e)}function mo(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&co.has(e)}function fo(){const t=$.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const r=Yt(e)?.params.org,[o,a]=V.useState(!1),[i,u]=Ds(),m=Qt(),y=uo(),v=r??"";let c;t[1]!==v?(c=$t(v),t[1]=v,t[2]=c):c=t[2];const x=!!r&&y;let p;t[3]!==c||t[4]!==x?(p={...c,enabled:x},t[3]=c,t[4]=x,t[5]=p):p=t[5],Be(p);const{data:l}=Re.useSession(),f=l?.user?.id;let d;t[6]!==r||t[7]!==f?(d=r&&f?Xt(f,r):null,t[6]=r,t[7]=f,t[8]=d):d=t[8];const S=d;let w,b;t[9]!==m?(w=()=>{const I=F=>{if(ft(F)&&F.code==="KeyK"){F.preventDefault(),Is();return}if(F.key==="?"&&!Ns(F.target)){F.preventDefault(),a(!0);return}ft(F)&&F.code==="BracketLeft"&&m.history.canGoBack()&&(F.preventDefault(),m.history.back())};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},b=[m],t[9]=m,t[10]=w,t[11]=b):(w=t[10],b=t[11]),V.useEffect(w,b);let g;t[12]!==r?(g=Ke.activeOrganization(r),t[12]=r,t[13]=g):g=t[13];let _;t[14]!==r||t[15]!==f?(_=async()=>{if(!r)return null;performance.mark("mesh:active-org-fetch:start");const{data:I}=await Re.organization.getFullOrganization({query:{organizationSlug:r}}).finally(ho),F=Xe(I);return I&&!F&&localStorage.setItem($e.lastOrgSlug(),r),f&&I&&en(f,r,I),I},t[14]=r,t[15]=f,t[16]=_):_=t[16];const P=S?S.data:void 0,T=S?.updatedAt;let j;t[17]!==P||t[18]!==T||t[19]!==g||t[20]!==_?(j={queryKey:g,queryFn:_,initialData:P,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=P,t[18]=T,t[19]=g,t[20]=_,t[21]=j):j=t[21];const{data:h}=yt(j),N=h?.id,k=h?.slug,{data:A}=Kn(N,k),E=!!A?.ssoRequired&&!A.authenticated,{data:C}=Hn(k);let O;t[22]===Symbol.for("react.memo_cache_sentinel")?(O={select:go},t[22]=O):O=t[22];const L=xt(O),R=C?.severity==="block"&&!ao(L),z=N??"",G=k??"";let q;t[23]!==z||t[24]!==G?(q=Dn({connectionId:_t,orgId:z,orgSlug:G}),t[23]=z,t[24]=G,t[25]=q):q=t[25];const se=!!N&&!!k;let oe;if(t[26]!==q||t[27]!==se?(oe={...q,enabled:se},t[26]=q,t[27]=se,t[28]=oe):oe=t[28],Be(oe),(!h||Xe(h)||E||R)&&Ls(),!h){let I;return t[29]!==r?(I=n.jsx(ts,{orgSlug:r}),t[29]=r,t[30]=I):I=t[30],I}if(Xe(h)){localStorage.getItem($e.lastOrgSlug())===r&&localStorage.removeItem($e.lastOrgSlug());let I;return t[31]!==h.name?(I=n.jsx(Zt,{orgName:h.name}),t[31]=h.name,t[32]=I):I=t[32],I}if(R&&C){let I;return t[33]!==h.slug||t[34]!==C?(I=n.jsx(oo,{notice:C,orgSlug:h.slug}),t[33]=h.slug,t[34]=C,t[35]=I):I=t[35],I}if(E){let I;return t[36]!==h.id||t[37]!==h.name||t[38]!==h.slug||t[39]!==A.domain?(I=n.jsx(no,{orgId:h.id,orgSlug:h.slug,orgName:h.name,domain:A.domain}),t[36]=h.id,t[37]=h.name,t[38]=h.slug,t[39]=A.domain,t[40]=I):I=t[40],I}const ee=h.logo??null;let B;t[41]!==h||t[42]!==ee?(B={...h,logo:ee},t[41]=h,t[42]=ee,t[43]=B):B=t[43];let K;t[44]!==h?(K=n.jsx(Ys,{activeOrg:h}),t[44]=h,t[45]=K):K=t[45];let Y;t[46]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(tn,{}),t[46]=Y):Y=t[46];let Q;t[47]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(js,{}),n.jsx(zs,{})]}),t[47]=Q):Q=t[47];let H;t[48]!==i||t[49]!==u?(H=i&&n.jsx(Os,{open:i,onOpenChange:u}),t[48]=i,t[49]=u,t[50]=H):H=t[50];let U;t[51]!==o?(U=n.jsx(_s,{open:o,onOpenChange:a}),t[51]=o,t[52]=U):U=t[52];let X;t[53]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Us,{}),t[53]=X):X=t[53];let Z;return t[54]!==B||t[55]!==K||t[56]!==H||t[57]!==U?(Z=n.jsxs(ro,{org:B,children:[K,Y,Q,H,U,X]}),t[54]=B,t[55]=K,t[56]=H,t[57]=U,t[58]=Z):Z=t[58],Z}function go(t){return t.location.pathname}function ho(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function po(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(zn,{children:n.jsx(fo,{})}),t[0]=e):e=t[0],e}const Vo=Object.freeze(Object.defineProperty({__proto__:null,default:po,usePanelActions:lo},Symbol.toStringTag,{value:"Module"}));export{J as K,Jo as a,Go as f,ft as i,Is as o,Vo as s,lo as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as b,v as Q,j as r,h as Z,B as U,b4 as g,r as ee,l as M,ap as O}from"./index-
|
|
1
|
+
import{c as b,v as Q,j as r,h as Z,B as U,b4 as g,r as ee,l as M,ap as O}from"./index-DR-7CxUP.js";import{b as te,D as se,d as ne,i as re}from"./dialog-wNMMbzXr.js";import{i as ie}from"./Zap-Bsbv5icR.js";import{M as H}from"./markdown-BbkOj7TQ.js";import{n as le}from"./Download01-EHABWuSq.js";import{k as K,b as oe,l as ae,p as ce}from"./folder-icon-f4yD90eP.js";import{a as $,s as fe,i as R}from"./ZoomOut-DiztYlpQ.js";import{a as de}from"./Image01-BrxwhCeX.js";import{F as me}from"./editor-BskznDjo.js";import{F as q}from"./file-type-icon-DKxC4oSX.js";import{p as ue,b as j}from"./location-oTTXFrSF.js";function he(s){if(!s||s.includes("\\")||s.includes("..")||s.includes("\0"))return!0;try{const e=decodeURIComponent(s);return!!(e.includes("\\")||e.includes("..")||e.includes("\0"))}catch{return!0}}function pe(s){if(he(s))throw new Error(`Invalid block key: ${s||"(empty)"}`)}function xe(s){try{return decodeURIComponent(s)}catch{return s}}function ge(s){return pe(s),encodeURIComponent(s)}function Ae(s){return`.deco/blocks/${ge(s)}.json`}const He=1e4,we=3;function B(s){return s.trim()?(s.startsWith("/")?s:`/${s}`).replace(/\/+/g,"/"):"/"}function _(s){return s.startsWith("/")?s.slice(1):s}function Ke(s){const e=_(s);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}function W(s){return s.trim()?s.startsWith("/")?s:`/${s}`:"/"}function je(s){const e=W(s);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function qe(s,e){const t=e.replace(/^\/+|\/+$/g,"");return W(t?`${s==="/"?"":s}/${t}`:s)}function Ve(s,e){return e==="directory"?s:je(s)}function Ye(s){const e=s.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function be(s){const e=_(s);return e?e.split("/").filter(Boolean).length:0}function Je(s,e,t,i=!1){return{files:[...new Set([...s,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:i||!!t.truncated}}function Qe(s,e){return be(s)>=we&&!e.has(s)}function Ze(s,e,t=[]){const i=_(s);if(e.includes(i)||t.includes(i))return!0;if(!i)return!1;const n=`${i}/`;return e.some(o=>o.startsWith(n))||t.some(o=>o.startsWith(n))}function et(s){const e=_(s),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const i=e.slice(t.length,-5);return xe(i)}function ve(s){if(!s)return"plaintext";const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}const ye="#94a3b8";function tt(s){const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:$,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:$,color:"#d9a441"}:e.endsWith(".json")?{Icon:fe,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:$,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:$,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:de,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:R,color:"#64748b"}:{Icon:R,color:ye}}function st(s){const e=B(s).split("/").filter(Boolean),t=["/"];let i="";for(const n of e.slice(0,-1))i+=`/${n}`,t.push(i);return t}function nt(s,e=[]){const t={path:"/",children:[]},i=new Map,n=c=>{let l=i.get(c.path);return l||(l=new Map,i.set(c.path,l)),l},o=c=>{const f=B(c).split("/").filter(Boolean);let d=t,u="";for(const m of f){u+=`/${m}`;const v=n(d);let h=v.get(m);h?h.kind==="file"&&(h.kind="directory"):(h={name:m,path:u,kind:"directory",children:[]},d.children.push(h),v.set(m,h)),d=h}};for(const c of s){const f=B(c).split("/").filter(Boolean);let d=t,u="";f.forEach((m,v)=>{u+=`/${m}`;const h=v===f.length-1,w=n(d);let x=w.get(m);x||(x={name:m,path:u,kind:h?"file":"directory",children:[]},d.children.push(x),w.set(m,x)),d=x})}for(const c of e)o(W(c));const a=c=>{c.sort((l,f)=>l.kind!==f.kind?l.kind==="directory"?-1:1:l.name.localeCompare(f.name));for(const l of c)l.children.length>0&&a(l.children)};return a(t.children),t.children}function ke(s,e,t=0){const i=[];for(const n of s)if(n.name!==".gitkeep"&&(i.push({node:n,depth:t}),n.kind==="directory"&&n.children.length>0&&e.has(n.path)))for(const o of ke(n.children,e,t+1))i.push(o);return i}function rt(s){const e=[];for(const t of s.split(`
|
|
2
2
|
`)){if(!t)continue;const i=t.indexOf(":");if(i<0)continue;const n=t.indexOf(":",i+1);if(n<0)continue;const o=Number.parseInt(t.slice(i+1,n),10);Number.isFinite(o)&&e.push({path:W(t.slice(0,i)),line:o,text:t.slice(n+1)})}return e}function it(s,e,t){const i=e.trim().toLowerCase();if(!i)return[];const n=[];for(const o of s)if((o.split("/").pop()??o).toLowerCase().includes(i)&&(n.push(W(o)),n.length>=t))break;return n}const G=24;function lt(s,e){const t=s.replace(/^\s+/,""),i=e.trim().toLowerCase();if(!i)return{leadingEllipsis:!1,segments:[{text:t,match:!1}]};const n=t.toLowerCase().indexOf(i);if(n<0)return{leadingEllipsis:!1,segments:[{text:t,match:!1}]};const o=n>G,a=o?t.slice(n-G):t,c=a.toLowerCase(),l=[];let f=0;for(;;){const d=c.indexOf(i,f);if(d<0){f<a.length&&l.push({text:a.slice(f),match:!1});break}d>f&&l.push({text:a.slice(f,d),match:!1}),l.push({text:a.slice(d,d+i.length),match:!0}),f=d+i.length}return{leadingEllipsis:o,segments:l}}function ot(s){const e=[],t=new Map;for(const i of s){let n=t.get(i.path);n||(n={path:i.path,matches:[]},t.set(i.path,n),e.push(n)),n.matches.push(i)}return e}function at(s){return s.split(`
|
|
3
3
|
`).map(e=>e.replace(/^\d+\t/,"")).join(`
|
|
4
4
|
`)}function Ne(s){const e=b.c(11),{value:t,filename:i}=s,[n]=Q(),o=n.theme==="dark"||n.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let a;e[0]!==i?(a=ve(i),e[0]=i,e[1]=a):a=e[1];const c=o?"vs-dark":"light";let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsx(Z,{className:"size-5 text-muted-foreground"})}),e[2]=l):l=e[2];let f,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(f={enabled:!1},d={top:12,bottom:12},e[3]=f,e[4]=d):(f=e[3],d=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:f,padding:d,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let m;return e[6]!==i||e[7]!==a||e[8]!==c||e[9]!==t?(m=r.jsx(me,{path:i,language:a,value:t,theme:c,loading:l,options:u},i),e[6]=i,e[7]=a,e[8]=c,e[9]=t,e[10]=m):m=e[10],m}function We(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}const Se=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Ce=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),X=2*1024*1024;function Ee(s,e){const t=s.split(".").pop()?.toLowerCase()??"";return Se.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=X?"markdown":"download":Ce.has(t)&&e<=X?"text":"download"}function Pe(){const s=b.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(g,{className:"h-6 w-2/3"}),s[0]=e):e=s[0];let t;return s[1]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx(g,{className:"h-3 w-full"}),r.jsx(g,{className:"h-3 w-5/6"}),r.jsx(g,{className:"h-3 w-2/3"})]})]})}),s[1]=t):t=s[1],t}function V(s){const e=b.c(20),{file:t,note:i}=s;let n;e[0]!==t.filename?(n=r.jsx(q,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=n):n=e[1];let o;e[2]!==t.filename?(o=r.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=o):o=e[3];let a;e[4]!==t.size?(a=We(t.size),e[4]=t.size,e[5]=a):a=e[5];const c=i?` · ${i}`:"";let l;e[6]!==a||e[7]!==c?(l=r.jsxs("span",{className:"text-xs text-muted-foreground",children:[a,c]}),e[6]=a,e[7]=c,e[8]=l):l=e[8];let f;e[9]!==o||e[10]!==l?(f=r.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[o,l]}),e[9]=o,e[10]=l,e[11]=f):f=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(le,{size:14}),e[12]=d):d=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=r.jsx(U,{asChild:!0,variant:"outline",size:"sm",children:r.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[d,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let m;return e[16]!==n||e[17]!==f||e[18]!==u?(m=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[n,f,u]})}),e[16]=n,e[17]=f,e[18]=u,e[19]=m):m=e[19],m}function A(s){const e=b.c(9),{file:t,markdown:i}=s,{data:n,isPending:o,isError:a}=K(t.downloadUrl);if(o){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(Pe,{}),e[0]=l):l=e[0],l}if(a||!n){let l;return e[1]!==t?(l=r.jsx(V,{file:t,note:"preview unavailable"}),e[1]=t,e[2]=l):l=e[2],l}if(i){const l=`file-preview-${t.key}`;let f;return e[3]!==n||e[4]!==l?(f=r.jsx("div",{className:"h-full overflow-y-auto",children:r.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:r.jsx(H,{id:l,text:n})})}),e[3]=n,e[4]=l,e[5]=f):f=e[5],f}let c;return e[6]!==n||e[7]!==t.filename?(c=r.jsx(Ne,{value:n,filename:t.filename}),e[6]=n,e[7]=t.filename,e[8]=c):c=e[8],c}function ze(s){const e=b.c(15),{file:t}=s;switch(Ee(t.filename,t.size)){case"image":{let n;return e[0]!==t.downloadUrl||e[1]!==t.filename?(n=r.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:r.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=n):n=e[2],n}case"pdf":{let n;return e[3]!==t.downloadUrl||e[4]!==t.filename?(n=r.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=n):n=e[5],n}case"html":{let n;return e[6]!==t.downloadUrl||e[7]!==t.filename?(n=r.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts allow-downloads",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=n):n=e[8],n}case"markdown":{let n;return e[9]!==t?(n=r.jsx(A,{file:t,markdown:!0}),e[9]=t,e[10]=n):n=e[10],n}case"text":{let n;return e[11]!==t?(n=r.jsx(A,{file:t,markdown:!1}),e[11]=t,e[12]=n):n=e[12],n}default:{let n;return e[13]!==t?(n=r.jsx(V,{file:t}),e[13]=t,e[14]=n):n=e[14],n}}}function Fe(s){const e=b.c(18),{skillPath:t,onClose:i,variant:n}=s,o=ue(t),{volume:a,dirPath:c}=o,l=oe(),f=l(a??"",`${c}/SKILL.md`),d=K(f),u=ae(a??"",c);let m;e[0]!==c?(m=j(c),e[0]=c,e[1]=m):m=e[1];const v=m;let h;e[2]!==d.data?(h=d.data?ce(d.data):null,e[2]=d.data,e[3]=h):h=e[3];const w=h,x=$e;let C;e[4]===Symbol.for("react.memo_cache_sentinel")?(C=(p,S)=>x(p.path)?-1:x(S.path)?1:j(p.path).localeCompare(j(S.path)),e[4]=C):C=e[4];const D=(u.data??[]).filter(Le).sort(C),[I,Y]=ee.useState(null),y=I===null?null:D.find(p=>p.path===I)??null,E=w?.name??v;let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:r.jsx(ie,{size:18})}),e[5]=P):P=e[5];let k;e[6]!==E||e[7]!==n?(k=n==="dialog"?r.jsx(ne,{className:"flex-1 truncate text-base font-medium text-foreground",children:E}):r.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:E}),e[6]=E,e[7]=n,e[8]=k):k=e[8];let N;e[9]!==i||e[10]!==n?(N=n==="dialog"?r.jsx(re,{asChild:!0,children:r.jsx(U,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:r.jsx(O,{size:16})})}):r.jsx(U,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:i,children:r.jsx(O,{size:16})}),e[9]=i,e[10]=n,e[11]=N):N=e[11];let z;e[12]!==k||e[13]!==N?(z=r.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[P,k,N]}),e[12]=k,e[13]=N,e[14]=z):z=e[14];let F;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[15]=F):F=e[15];const J="relative flex min-w-0 flex-1 flex-col overflow-y-auto",T=y?r.jsx(ze,{file:{key:y.path,filename:j(y.path),size:y.size,downloadUrl:l(a??"",y.path)}}):d.isPending?r.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[r.jsx(g,{className:"h-4 w-1/3"}),r.jsx(g,{className:"h-3 w-full"}),r.jsx(g,{className:"h-3 w-5/6"}),r.jsx(g,{className:"h-3 w-2/3"})]}):d.isError||!w?r.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[r.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),r.jsx("p",{className:"text-base text-muted-foreground",children:w.description??"Claude Code skill"})]}),r.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:r.jsx(H,{id:`skill-preview-${t}`,text:w.body})})]});let L;return e[16]!==T?(L=r.jsx("div",{className:J,children:T}),e[16]=T,e[17]=L):L=e[17],r.jsxs(r.Fragment,{children:[z,r.jsxs("div",{className:"flex min-h-0 flex-1",children:[r.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[F,u.isPending?r.jsx(g,{className:"mx-2 h-4 w-24"}):D.map(p=>{const S=x(p.path)?y===null:I===p.path;return r.jsxs("button",{type:"button",onClick:()=>Y(x(p.path)?null:p.path),className:M("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",S?"bg-background shadow-sm":"hover:bg-muted/60"),children:[r.jsx(q,{filename:j(p.path),className:"h-6 w-5 shrink-0"}),r.jsx("span",{className:M("truncate text-sm",S?"text-foreground":"text-muted-foreground"),children:j(p.path)})]},p.path)})]}),L]})]})}function Le(s){return s.kind==="file"}function $e(s){return j(s)==="SKILL.md"}function ct(s){const e=b.c(8),{skillPath:t,onClose:i}=s;let n;e[0]!==i?(n=c=>{c||i()},e[0]=i,e[1]=n):n=e[1];let o;e[2]!==i||e[3]!==t?(o=r.jsx(te,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:r.jsx(Fe,{skillPath:t,onClose:i,variant:"dialog"})}),e[2]=i,e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==n||e[6]!==o?(a=r.jsx(se,{open:!0,onOpenChange:n,children:o}),e[5]=n,e[6]=o,e[7]=a):a=e[7],a}export{Je as A,we as E,Pe as F,ct as S,pe as a,ze as b,xe as c,Ae as d,He as e,We as f,ve as g,nt as h,Ke as i,ke as j,ot as k,Ve as l,W as m,tt as n,je as o,st as p,lt as q,Qe as r,at as s,_ as t,qe as u,Ye as v,Ze as w,it as x,rt as y,et as z};
|