decocms 4.246.2 → 4.246.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DOZzh9F_.js → AlertCircle-CywLLU7N.js} +1 -1
- package/dist/client/assets/{AreaChart-BEoF41lY.js → AreaChart-D_qhsjcn.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D3IfTAWC.js → ArrowLeft-5kZnTkMw.js} +1 -1
- package/dist/client/assets/{ArrowUp-D1Whwq-K.js → ArrowUp-Drc1UvH8.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CibKwsqg.js → ArrowUpRight-BmVMgmrB.js} +1 -1
- package/dist/client/assets/{Check-CSFy6eOj.js → Check-BMTcpyw9.js} +1 -1
- package/dist/client/assets/{CheckCircle-BCbqPCn-.js → CheckCircle-DUIOLuHc.js} +1 -1
- package/dist/client/assets/{ChevronDown-DiERg-yU.js → ChevronDown-CRZWY5vZ.js} +1 -1
- package/dist/client/assets/{ChevronRight-H-_IIqWd.js → ChevronRight-D-hHdaJE.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Bnz5tSS1.js → ChevronSelectorVertical-DfQTwZbh.js} +1 -1
- package/dist/client/assets/{ChevronUp-CT1Rb5MC.js → ChevronUp-AUp1Qpqu.js} +1 -1
- package/dist/client/assets/{Copy01-CzEeXGsa.js → Copy01-DsL2MX7-.js} +1 -1
- package/dist/client/assets/{CreditCard01-DTIKWUon.js → CreditCard01-DSiwLzu5.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bqf_kSFh.js → DotsVertical-T-qNNFNq.js} +1 -1
- package/dist/client/assets/{Download01-BPvwRxeD.js → Download01-Dx5a-JSz.js} +1 -1
- package/dist/client/assets/{Eye-CDfbu42j.js → Eye-7PQLukgG.js} +1 -1
- package/dist/client/assets/{FilterLines-Dc1F-WNI.js → FilterLines-CrgP-FUu.js} +1 -1
- package/dist/client/assets/{Globe01-CHMths1B.js → Globe01-BIM1CfT5.js} +1 -1
- package/dist/client/assets/{Globe04-CIol-u19.js → Globe04-CFZMqgDC.js} +1 -1
- package/dist/client/assets/{HardDrive-Bs-QsH_i.js → HardDrive-D-plrf3i.js} +1 -1
- package/dist/client/assets/{Key01-WuBVakl2.js → Key01-CKfOfm2w.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BF7bmTAo.js → LayoutLeft-CZkuUfPg.js} +1 -1
- package/dist/client/assets/{LinkExternal01-kQgSYVkJ.js → LinkExternal01-B6Mm4hAd.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-Bvs7cZ-w.js → LockUnlocked01-BjEsmeyw.js} +1 -1
- package/dist/client/assets/{LogOut01-9xKoxZHy.js → LogOut01-C4uDW2hW.js} +1 -1
- package/dist/client/assets/{Monitor01-B5i4MO_v.js → Monitor01-DMCNMsNO.js} +1 -1
- package/dist/client/assets/{Palette-l5b6DG4Q.js → Palette-sGNsebP3.js} +1 -1
- package/dist/client/assets/{Play-AS6vVmkD.js → Play-CvUWjt5q.js} +1 -1
- package/dist/client/assets/{Plus-m61KPSTg.js → Plus-DPKssxLn.js} +1 -1
- package/dist/client/assets/{SearchLg-CDtXrrcW.js → SearchLg-L_JPa3fX.js} +1 -1
- package/dist/client/assets/{SearchMd-CF01LhHu.js → SearchMd-DHbBd3im.js} +1 -1
- package/dist/client/assets/{Settings02-CGZ0Ol25.js → Settings02-DyCd7JtA.js} +1 -1
- package/dist/client/assets/{Share07-Dc2LdheG.js → Share07-OGAtiC_R.js} +1 -1
- package/dist/client/assets/{Shield01-CkA8zl8k.js → Shield01-Ci_NiZAD.js} +1 -1
- package/dist/client/assets/{Stars01-Co5mOLjQ.js → Stars01-OuQBYZge.js} +1 -1
- package/dist/client/assets/{Stars02-CLHJV6ce.js → Stars02-Cp9bSUYT.js} +1 -1
- package/dist/client/assets/{Sun-Cz50Vxl-.js → Sun-B9dfSL2V.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BdWiZHby.js → SwitchHorizontal01-BhNLszpk.js} +1 -1
- package/dist/client/assets/{Tool01-D9lNVxCu.js → Tool01-BPmgbtqw.js} +1 -1
- package/dist/client/assets/{Tool02-DtJ6WkGT.js → Tool02-OPICFuOd.js} +1 -1
- package/dist/client/assets/{Trash01-BcRuo5Fe.js → Trash01-DgXUCXZR.js} +1 -1
- package/dist/client/assets/{TrendUp01-B2aFkzBy.js → TrendUp01-BfvESyFJ.js} +1 -1
- package/dist/client/assets/{Upload01-B1Z9PE0l.js → Upload01--adXJUt3.js} +1 -1
- package/dist/client/assets/{User01-D1UDDnNw.js → User01-Ddl7sykt.js} +1 -1
- package/dist/client/assets/UserSquare-DELWBgQx.js +1 -0
- package/dist/client/assets/{Users01-gv39jXBY.js → Users01-m82_DH1U.js} +1 -1
- package/dist/client/assets/{Users03-DM_1WdDy.js → Users03-D5uVoOJh.js} +1 -1
- package/dist/client/assets/{X-VMfnK-j5.js → X-GHDv2bPa.js} +1 -1
- package/dist/client/assets/{XCircle-D-ab7D3l.js → XCircle-Woz3hXm7.js} +1 -1
- package/dist/client/assets/{XClose-BmVO_SaY.js → XClose-C22JjfI5.js} +1 -1
- package/dist/client/assets/{YAxis-CYtp3V1k.js → YAxis-CTXvwn-w.js} +1 -1
- package/dist/client/assets/{Zap-BrJ2b2V7.js → Zap-DEkoWmnk.js} +1 -1
- package/dist/client/assets/{ZapSquare-BjQDrkMq.js → ZapSquare-Dk0j1NZT.js} +1 -1
- package/dist/client/assets/{access-gate-bmibgRvV.js → access-gate-CUuU4Akn.js} +1 -1
- package/dist/client/assets/agent-icon-BFfHpTj0.js +1 -0
- package/dist/client/assets/agents-list-B10S3S1o.js +1 -0
- package/dist/client/assets/ai-providers-D6M6vnH3.js +6 -0
- package/dist/client/assets/{alert-C6E9q71w.js → alert-CbzuL5U0.js} +1 -1
- package/dist/client/assets/{alert-dialog-DRGp9yFR.js → alert-dialog-B6efvq96.js} +1 -1
- package/dist/client/assets/api-keys-Be49xOHM.js +1 -0
- package/dist/client/assets/app-editor-Btw61HI8.js +1 -0
- package/dist/client/assets/{auth-Dk3-oFE7.js → auth-By9laq1a.js} +1 -1
- package/dist/client/assets/{auth-catchall-BB9-aq9V.js → auth-catchall-Dic0l2zL.js} +1 -1
- package/dist/client/assets/{auth-entry-C_2hGTBt.js → auth-entry-EiDYEymR.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B7n763Vx.js → auth-split-layout-D9kcoAJV.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BwcRtSiC.js → authenticate-and-persist-oauth-CjhkLgGL.js} +1 -1
- package/dist/client/assets/{automation-list-row-BIOSCgKN.js → automation-list-row-ByHEJHr4.js} +1 -1
- package/dist/client/assets/{automation-runs-D-R-Y_E3.js → automation-runs-CuJe3IJj.js} +16 -16
- package/dist/client/assets/automations-DRnBdfkP.js +1 -0
- package/dist/client/assets/{avatar-C448hZt-.js → avatar-XToRCTtg.js} +1 -1
- package/dist/client/assets/{badge-Bc-IWDm5.js → badge-DveTg52E.js} +1 -1
- package/dist/client/assets/{block-document-D__keZl9.js → block-document-CbRdyV4I.js} +1 -1
- package/dist/client/assets/{buckets-Dyp0YIko.js → buckets-HCO-gN-n.js} +1 -1
- package/dist/client/assets/bulk-category-panel-CZgZICpu.js +1 -0
- package/dist/client/assets/{capability-load-error-BPXMIbs3.js → capability-load-error-D9lVxIV_.js} +1 -1
- package/dist/client/assets/{card-CG7VHdDz.js → card-CzcIXv8O.js} +1 -1
- package/dist/client/assets/{cards-DY46VRdr.js → cards-CdIo4vf_.js} +1 -1
- package/dist/client/assets/category-editor-Nb4J4_cD.js +1 -0
- package/dist/client/assets/{chart-DoynaU7M.js → chart-CfPCrkm9.js} +1 -1
- package/dist/client/assets/{chat-context-D20WJCxs.js → chat-context-Dqusww-z.js} +5 -5
- package/dist/client/assets/{checkbox-BsGrD1YR.js → checkbox-BZtl3z8P.js} +1 -1
- package/dist/client/assets/choose-editor-CdvG_dim.js +1 -0
- package/dist/client/assets/{cli-auth-success-BBaOfXHx.js → cli-auth-success-CRHJTFXN.js} +1 -1
- package/dist/client/assets/collection-detail-BzgbN-Qy.js +1 -0
- package/dist/client/assets/{collection-display-button-CvRYqkOn.js → collection-display-button-CsTQ9UtS.js} +1 -1
- package/dist/client/assets/{collection-search-DGOZ00E9.js → collection-search-BAbgWU_h.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Pg9EfyUB.js → collection-table-wrapper-DebkUlwo.js} +1 -1
- package/dist/client/assets/{collection-tabs-DaZaBm6K.js → collection-tabs-BuB0qOUO.js} +1 -1
- package/dist/client/assets/{command-D63NDRD_.js → command-DWt73k63.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DNDoGFKk.js +1 -0
- package/dist/client/assets/{connect-GnxEAvmg.js → connect-Cii_fgku.js} +2 -2
- package/dist/client/assets/connection-card-C6y7PdX8.js +1 -0
- package/dist/client/assets/connection-detail-D7Voz52Y.js +1 -0
- package/dist/client/assets/{connection-form-helpers-ZW-hGCeS.js → connection-form-helpers-CvmIulQM.js} +1 -1
- package/dist/client/assets/{connection-C_INLdxb.js → connection-ybedUfG8.js} +1 -1
- package/dist/client/assets/connections-B-Q5XAol.js +1 -0
- package/dist/client/assets/constants-BSYv1IkQ.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-CeSWLSEV.js → decopilot-sse-pool-Hm5cR6Ox.js} +1 -1
- package/dist/client/assets/{dialog-Ww_zj2g-.js → dialog-DF-CfFZo.js} +1 -1
- package/dist/client/assets/{domain-settings-C1hsjq6B.js → domain-settings-DyFCdtS5.js} +1 -1
- package/dist/client/assets/{drawer-lF-HaYn9.js → drawer-CDoSEnu9.js} +1 -1
- package/dist/client/assets/{dropdown-menu-ByKxU4Y4.js → dropdown-menu-CJxuIExP.js} +1 -1
- package/dist/client/assets/{empty-state-BJ2gnfVT.js → empty-state-CAvGBBF6.js} +1 -1
- package/dist/client/assets/extract-connection-data-DHCZqcQQ.js +1 -0
- package/dist/client/assets/file-explorer-iP4x_Yhy.js +2 -0
- package/dist/client/assets/{file-type-icon-B5W8k3cc.js → file-type-icon-DXPee-3o.js} +1 -1
- package/dist/client/assets/{form-BhElkTfE.js → form-3gPXzjO1.js} +1 -1
- package/dist/client/assets/general-VYZWN_XI.js +1 -0
- package/dist/client/assets/github-repo-picker-CbrjFpAT.js +1 -0
- package/dist/client/assets/{hooks-D72xT78n.js → hooks-2knfRhQG.js} +4 -4
- package/dist/client/assets/{index-DGV2vBko.js → index-BtSjLcb4.js} +1 -1
- package/dist/client/assets/index-C4tNsqrz.js +1 -0
- package/dist/client/assets/{index-CVShUKw1.js → index-CS8hxwi8.js} +1 -1
- package/dist/client/assets/{index-BGQowlvH.js → index-Cd5TgCBJ.js} +2 -2
- package/dist/client/assets/{index-COAHvcVh.js → index-ChP7VzHg.js} +49 -49
- package/dist/client/assets/{index-E8TCV-RN.js → index-CwnG996Y.js} +2 -2
- package/dist/client/assets/{index-CacyxM-B.js → index-DScyN1ng.js} +36 -36
- package/dist/client/assets/{index-GDSYOTBM.js → index-Dj9nFK99.js} +1 -1
- package/dist/client/assets/index-DukI1vFj.js +1 -0
- package/dist/client/assets/{index-redirect-DkpgAZX1.js → index-redirect-hmUlblcp.js} +1 -1
- package/dist/client/assets/{index-CSqLyX3L.js → index-xuoH-ELf.js} +1 -1
- package/dist/client/assets/{infra-billing-YoJpQK-_.js → infra-billing-6qUJ8FpF.js} +1 -1
- package/dist/client/assets/{input-B8ln-0Wl.js → input-B-WAAZ8l.js} +1 -1
- package/dist/client/assets/{integration-icon-CLbqw16t.js → integration-icon-h2cZJQ9Q.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DBZ3baH8.js → invite-member-dialog-DmbzPllG.js} +1 -1
- package/dist/client/assets/{label-CCAJCJOj.js → label-Cg9QkeNq.js} +1 -1
- package/dist/client/assets/{layout-kT_5r6yU.js → layout-DZIITT9R.js} +1 -1
- package/dist/client/assets/{login-CdH7we7T.js → login-DjS6vG5F.js} +1 -1
- package/dist/client/assets/{mcp-oauth-YJCTRoaW.js → mcp-oauth-frjOq5nr.js} +1 -1
- package/dist/client/assets/{members-DkH9jYrb.js → members-DvCHXlKd.js} +1 -1
- package/dist/client/assets/{monaco-editor-q7NTyRwe.js → monaco-editor-B9zykm3x.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DCpIn3aa.js → monitoring-stats-row-DeZ0cyol.js} +1 -1
- package/dist/client/assets/{multi-select-FeXmTrOe.js → multi-select-BeamEHNc.js} +1 -1
- package/dist/client/assets/{oauth-callback-Br4bRi-8.js → oauth-callback-ChRRKa65.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-1lrQ44YW.js → oauth-callback-ai-provider-CAKZaPXP.js} +1 -1
- package/dist/client/assets/{onboarding-CJUbJrTS.js → onboarding-lmgUbBQe.js} +1 -1
- package/dist/client/assets/{org-layout-LRZQllfb.js → org-layout-B2VWo1QW.js} +1 -1
- package/dist/client/assets/{organization-choice-sfwWjhN7.js → organization-choice-BQ9U-Xq-.js} +1 -1
- package/dist/client/assets/{orgs-YJZRuVN_.js → orgs-Cdbe31pX.js} +1 -1
- package/dist/client/assets/{page-seo-form-BtKgt3m_.js → page-seo-form-D6iMCtAU.js} +1 -1
- package/dist/client/assets/{popover-5hCe1k-b.js → popover-Wy89IMWR.js} +1 -1
- package/dist/client/assets/post-editor-8um4AIC8.js +1 -0
- package/dist/client/assets/{primitives-BcUA5QnY.js → primitives-CuvVdjDA.js} +1 -1
- package/dist/client/assets/{profile-DLCbWXln.js → profile-C1mhmQtv.js} +1 -1
- package/dist/client/assets/project-app-view--LLIOxER.js +1 -0
- package/dist/client/assets/record-editor-DYnXx3r9.js +1 -0
- package/dist/client/assets/redirect-editor-B9-qGeUf.js +1 -0
- package/dist/client/assets/registry-CcjhOTSX.js +2 -0
- package/dist/client/assets/{registry-layout-DjY1XBxT.js → registry-layout-BR5urnXm.js} +2 -2
- package/dist/client/assets/{reports-gVOr0Sxi.js → reports-B9btUBiO.js} +1 -1
- package/dist/client/assets/{require-capability-BDCw5l2l.js → require-capability-DfzoRoy3.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C0mQQwr6.js → required-auth-layout-BUpI2CfS.js} +1 -1
- package/dist/client/assets/{reset-password-DyhS2TkQ.js → reset-password-BVcWauyo.js} +1 -1
- package/dist/client/assets/roles-COefXdsU.js +1 -0
- package/dist/client/assets/{search-input-ByYoJKBQ.js → search-input-DGjtP6Rh.js} +1 -1
- package/dist/client/assets/{secrets-BRUyuZE5.js → secrets-BEPk1-eF.js} +1 -1
- package/dist/client/assets/{sections-editor-at21kKiT.js → sections-editor-DT6LvCBZ.js} +2 -2
- package/dist/client/assets/{select-CwAouusu.js → select-7pa4_aUT.js} +1 -1
- package/dist/client/assets/select-model-DQ1eNQu7.js +4 -0
- package/dist/client/assets/self-tool-result-BGGrfBl-.js +1 -0
- package/dist/client/assets/seo-editor-0ctPVCix.js +1 -0
- package/dist/client/assets/settings-layout-B147f-12.js +1 -0
- package/dist/client/assets/{settings-section-Cz2znp8W.js → settings-section-XDvcEzCV.js} +1 -1
- package/dist/client/assets/{settings-subnav-a1a1GCc2.js → settings-subnav-fRspG0-I.js} +1 -1
- package/dist/client/assets/{shell-controls-BPVHXOz1.js → shell-controls-nc8A-U3S.js} +1 -1
- package/dist/client/assets/shell-layout-BkFHuRxc.js +1 -0
- package/dist/client/assets/{sidebar-BDv_n64F.js → sidebar-BI-9XBR_.js} +1 -1
- package/dist/client/assets/{skeleton-DOg01VWn.js → skeleton-CmjcgP6R.js} +1 -1
- package/dist/client/assets/{spinner-D7fl_vK2.js → spinner-Ch7938P6.js} +1 -1
- package/dist/client/assets/{sso-kMJDATrG.js → sso-N3cjPoo1.js} +1 -1
- package/dist/client/assets/store-Dpv1v_pN.js +1 -0
- package/dist/client/assets/store-registry-B4Pzxsjd.js +2 -0
- package/dist/client/assets/{studio-tools-O0czolAT.js → studio-tools-DjBsxbnj.js} +1 -1
- package/dist/client/assets/{switch-B0vh0spM.js → switch-Bz_Ut2Tq.js} +1 -1
- package/dist/client/assets/synced-repos-4hDvRnUi.js +1 -0
- package/dist/client/assets/{tab-id-ZL6F14qy.js → tab-id-DgRfDePR.js} +1 -1
- package/dist/client/assets/{table-Dc0W0B0Q.js → table-BXTkk8zy.js} +1 -1
- package/dist/client/assets/{tabs-BerlyCPW.js → tabs-D_sEPUFk.js} +1 -1
- package/dist/client/assets/tasks-B38CkkW5.js +1 -0
- package/dist/client/assets/{textarea-CD_pYqo3.js → textarea-TMz6gyXu.js} +1 -1
- package/dist/client/assets/{toggle-group-BFyHFJ9G.js → toggle-group-CnQpN6py.js} +1 -1
- package/dist/client/assets/{toolbar-ClzusW5n.js → toolbar-CD4BCM4b.js} +1 -1
- package/dist/client/assets/{tooltip-CwIq9zTG.js → tooltip-BYHYsdou.js} +1 -1
- package/dist/client/assets/{track-Bufvtvpy.js → track-COzY04MD.js} +1 -1
- package/dist/client/assets/{types-D40WAxQO.js → types-CrCH3G_F.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DF6xoNtC.js → use-ai-providers-D8ZxPPNl.js} +1 -1
- package/dist/client/assets/use-api-keys-QabOr7Sy.js +1 -0
- package/dist/client/assets/use-automations-olw2u0pZ.js +1 -0
- package/dist/client/assets/{use-autosave-BvdFNf3e.js → use-autosave-D0LAhUzj.js} +1 -1
- package/dist/client/assets/{use-capability-D8TgIows.js → use-capability-CzBu-J56.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Dht-z9YX.js → use-clock-tick-DOlAeCMC.js} +1 -1
- package/dist/client/assets/use-commerce-diagnostic-BfO1Uz-E.js +1 -0
- package/dist/client/assets/use-connection-BPZswYGL.js +1 -0
- package/dist/client/assets/{use-copy-D87eemcY.js → use-copy-gUNHP8WW.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BqCII4uA.js → use-create-virtual-mcp-CVBBpLVJ.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-fueOpbqS.js → use-debounced-autosave-CYC1_jOJ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DAmoRUxP.js → use-debounced-value-CRrTp2sD.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BIUvCjFX.js → use-decopilot-events-BZrhOh3J.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CmSM7WcU.js → use-delete-connection-Dn80jRMf.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BRR0WTvL.js → use-deployment-admin-CczUz7z9.js} +1 -1
- package/dist/client/assets/{use-file-configs-EhMCIyTI.js → use-file-configs-bzI9NrYv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-ChfJMk5S.js → use-infinite-scroll-qlOO1QTT.js} +1 -1
- package/dist/client/assets/{use-join-requests-DAyU8-6X.js → use-join-requests-Ve5ZEQzI.js} +1 -1
- package/dist/client/assets/use-mcp-client-CpcKk1mC.js +10 -0
- package/dist/client/assets/{use-mcp-tools-CMpvouUr.js → use-mcp-tools-BXCDAH3K.js} +1 -1
- package/dist/client/assets/{use-members-CYQAJOqU.js → use-members-lr2D4-9f.js} +1 -1
- package/dist/client/assets/{use-mobile-c0ak1uw4.js → use-mobile-CLhvlD5U.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-IPGb4TnC.js → use-navigate-to-agent-B9V6njZa.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bjx13kGF.js → use-org-auth-client-BKcaa9No.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CEYhU3FE.js → use-org-repo-syncs-qpXT2wCH.js} +1 -1
- package/dist/client/assets/{use-org-sso-BUVIJh4V.js → use-org-sso-CKd4_qDy.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DZR-ca1L.js → use-organization-roles-dAemVnAv.js} +1 -1
- package/dist/client/assets/use-organization-settings-DqAGAUYM.js +1 -0
- package/dist/client/assets/use-registry-connections-BqF6UAct.js +1 -0
- package/dist/client/assets/{use-secrets-6DO3yZ-p.js → use-secrets-D0HFviXi.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Dc8Axtks.js → use-section-preview-base-BGsB97Xk.js} +1 -1
- package/dist/client/assets/use-settings-tabs-BjnrTXLq.js +1 -0
- package/dist/client/assets/{use-status-sounds-e0Pidqxv.js → use-status-sounds-DXRZEi59.js} +1 -1
- package/dist/client/assets/{use-tags-tOpGCqE_.js → use-tags-uV1Iq0hs.js} +1 -1
- package/dist/client/assets/{use-view-mode-BQejzyHA.js → use-view-mode-DuXFb47r.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-CesHdqwl.js +1 -0
- package/dist/client/assets/useInfiniteQuery-DPD5wRLH.js +1 -0
- package/dist/client/assets/{useRouterState-Dk4tjkCW.js → useRouterState-C7_szwLj.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-kJZnOfaD.js +1 -0
- package/dist/client/assets/{users-Bv8CJJ4l.js → users-UKz0Vh9o.js} +1 -1
- package/dist/client/assets/variant-calendar-Bss6PO3E.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BTBNp3sA.js → view-mode-toggle-BdaCG6S5.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-icon-BDevt-8Z.js +0 -1
- package/dist/client/assets/agents-list-DVOKstH-.js +0 -1
- package/dist/client/assets/ai-providers-qcQefmBS.js +0 -1
- package/dist/client/assets/api-keys-FMNqGQ51.js +0 -1
- package/dist/client/assets/app-editor-JM5Dp20k.js +0 -1
- package/dist/client/assets/automations-B-rlIa9G.js +0 -1
- package/dist/client/assets/billing-Do4qOo4X.js +0 -6
- package/dist/client/assets/bulk-category-panel-C5Gw6crO.js +0 -1
- package/dist/client/assets/category-editor-C2yNqWw9.js +0 -1
- package/dist/client/assets/choose-editor-D_7RLdI1.js +0 -1
- package/dist/client/assets/collection-detail-BcpNCPzg.js +0 -1
- package/dist/client/assets/commerce-onboarding-DptWqvBa.js +0 -1
- package/dist/client/assets/connection-card-BER9PD2I.js +0 -1
- package/dist/client/assets/connection-detail-BztCQFVl.js +0 -1
- package/dist/client/assets/connections-BkovTccm.js +0 -1
- package/dist/client/assets/extract-connection-data-BJ1FOt2x.js +0 -1
- package/dist/client/assets/file-explorer-DCujfpAL.js +0 -2
- package/dist/client/assets/general-DgbsvkYa.js +0 -1
- package/dist/client/assets/github-repo-picker-CcDCsGzG.js +0 -1
- package/dist/client/assets/index-DQv8YUWm.js +0 -1
- package/dist/client/assets/index-DRGw16I_.js +0 -1
- package/dist/client/assets/post-editor-C3I40PTm.js +0 -1
- package/dist/client/assets/project-app-view-TA-FxXgR.js +0 -1
- package/dist/client/assets/record-editor-wtWxgd5F.js +0 -1
- package/dist/client/assets/redirect-editor-BRBlF0cf.js +0 -1
- package/dist/client/assets/registry-D5JAnGyh.js +0 -2
- package/dist/client/assets/roles-BxtW1gkj.js +0 -1
- package/dist/client/assets/select-model-eoIBQakm.js +0 -4
- package/dist/client/assets/self-tool-result-DaPbHreD.js +0 -1
- package/dist/client/assets/seo-editor-DesMlOi9.js +0 -1
- package/dist/client/assets/settings-layout-Bf3LCUkH.js +0 -1
- package/dist/client/assets/shell-layout-VRjP3s0M.js +0 -1
- package/dist/client/assets/store-mWCGhxUC.js +0 -1
- package/dist/client/assets/store-registry-C-F9k1uh.js +0 -2
- package/dist/client/assets/synced-repos-DvIBkVQt.js +0 -1
- package/dist/client/assets/tasks-BhmY_7d9.js +0 -1
- package/dist/client/assets/use-api-keys-DMBDl3ic.js +0 -1
- package/dist/client/assets/use-automations-DQVxqjfN.js +0 -1
- package/dist/client/assets/use-commerce-diagnostic-B_wc4KWh.js +0 -1
- package/dist/client/assets/use-connection-BS7_Pbag.js +0 -1
- package/dist/client/assets/use-mcp-client-DRcy9vk6.js +0 -10
- package/dist/client/assets/use-open-billing-url-nNkK2kBm.js +0 -1
- package/dist/client/assets/use-organization-settings-DJYuvv-k.js +0 -1
- package/dist/client/assets/use-registry-connections-GX-tovow.js +0 -1
- package/dist/client/assets/use-settings-tabs-CkhP712K.js +0 -1
- package/dist/client/assets/use-virtual-mcp-zFcH9fRu.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BxSgA-RD.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CNPxNyM-.js +0 -1
- package/dist/client/assets/variant-calendar-Cvw4xTeP.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as C,d as Y,F as B,b as A,G as It,j as s,B as rt,r as L,E as at,H as Et,x as Tt,K as Rt,e as Ye,p as V,I as ct,m as z,a as ue,J as Ft,v as Lt,t as mt,M as Ut,P as Gt,u as Te,O as Bt,R as Ht}from"./index-CacyxM-B.js";import{u as K,S as Re,a as Fe,b as U,c as E,d as T,e as dt,f as Wt,g as ft,h as Vt,i as Ae,j as Kt,k as Yt,l as Xt}from"./sidebar-BDv_n64F.js";import{u as ut}from"./use-mobile-c0ak1uw4.js";import{a as qt,p as ze,s as Qt,b as Jt,n as Zt}from"./self-tool-result-DaPbHreD.js";import{f as es,b as ts,e as ss,g as ls}from"./dialog-Ww_zj2g-.js";import{f as pt,i as os,a as Xe,D as is}from"./tab-id-ZL6F14qy.js";import{C as xt,W as ht,g as ns,u as rs,S as as,a as cs}from"./use-mcp-client-DRcy9vk6.js";import{i as bt}from"./XCircle-D-ab7D3l.js";import{u as ms,a as Le,b as Ue}from"./use-organization-settings-DJYuvv-k.js";import{C as ds,a as fs,O as ke,A as Ge,u as us,b as ps,c as xs,d as gt,e as jt,T as hs,f as bs,g as gs}from"./use-commerce-diagnostic-B_wc4KWh.js";import{S as W}from"./skeleton-DOg01VWn.js";import{i as Be}from"./LayoutLeft-BF7bmTAo.js";import{T as He,a as me}from"./toolbar-ClzusW5n.js";import{P as js,a as vs,b as Ss}from"./popover-5hCe1k-b.js";import{D as ys,a as _s,b as Ns}from"./drawer-lF-HaYn9.js";import{A as Ie}from"./avatar-C448hZt-.js";import{T as vt,a as St,b as yt,c as _t}from"./tooltip-CwIq9zTG.js";import{a as Cs}from"./Copy01-CzEeXGsa.js";import{n as ws}from"./Download01-BPvwRxeD.js";import{t as ks,i as $s,a as Ds,b as Ms,c as Os,d as Nt,e as qe,f as Ps,g as zs,h as As,A as Is}from"./agent-icon-BDevt-8Z.js";import{i as Es}from"./Globe01-CHMths1B.js";import{n as Ts}from"./LinkExternal01-kQgSYVkJ.js";import{i as Qe}from"./LogOut01-9xKoxZHy.js";import{i as Rs}from"./Monitor01-B5i4MO_v.js";import{n as Fs,a as Ls}from"./Sun-Cz50Vxl-.js";import{a as $e}from"./Settings02-CGZ0Ol25.js";import{i as Us}from"./Shield01-CkA8zl8k.js";import{a as Gs}from"./Users03-DM_1WdDy.js";import{u as Bs}from"./use-deployment-admin-BRR0WTvL.js";import{u as Hs}from"./use-is-desktop-app-BNujXJc_.js";import{a as Ws,n as Vs}from"./ZapSquare-BjQDrkMq.js";import{I as Ct}from"./invite-member-dialog-DBZ3baH8.js";import{S as We,M as Ks}from"./shell-controls-BPVHXOz1.js";import{i as Ys}from"./Share07-Dc2LdheG.js";import{u as Xs}from"./use-virtual-mcp-zFcH9fRu.js";import{a as qs,g as Qs}from"./agent-capabilities-C4tLW0Za.js";import{u as wt,T as Js}from"./hooks-D72xT78n.js";import{u as kt}from"./shell-layout-VRjP3s0M.js";import{f as $t}from"./reusable-new-chat-CouMjkYR.js";import{S as Dt}from"./use-navigate-to-agent-IPGb4TnC.js";import{C as Zs}from"./chat-context-D20WJCxs.js";import"./X-VMfnK-j5.js";import"./alert-dialog-DRGp9yFR.js";import"./form-BhElkTfE.js";import"./label-CCAJCJOj.js";import"./input-B8ln-0Wl.js";import"./spinner-D7fl_vK2.js";import"./integration-icon-CLbqw16t.js";import"./Tool02-DtJ6WkGT.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./CheckCircle-BCbqPCn-.js";import"./Check-CSFy6eOj.js";import"./Eye-CDfbu42j.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./auth-Dk3-oFE7.js";import"./track-Bufvtvpy.js";import"./studio-tools-O0czolAT.js";import"./ChevronRight-H-_IIqWd.js";import"./ChevronDown-DiERg-yU.js";import"./Plus-m61KPSTg.js";import"./SearchMd-CF01LhHu.js";import"./XClose-BmVO_SaY.js";import"./github-repo-picker-CcDCsGzG.js";import"./collection-search-DGOZ00E9.js";import"./use-connection-BS7_Pbag.js";import"./ArrowLeft-D3IfTAWC.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./use-mcp-tools-CMpvouUr.js";import"./connection-card-BER9PD2I.js";import"./use-registry-connections-GX-tovow.js";import"./useInfiniteQuery-BxSgA-RD.js";import"./use-infinite-scroll-ChfJMk5S.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-CG7VHdDz.js";import"./select-CwAouusu.js";import"./ChevronUp-CT1Rb5MC.js";import"./textarea-CD_pYqo3.js";import"./connection-form-helpers-ZW-hGCeS.js";import"./Trash01-BcRuo5Fe.js";import"./collection-tabs-DaZaBm6K.js";import"./badge-Bc-IWDm5.js";import"./useSuspenseInfiniteQuery-CNPxNyM-.js";import"./use-ai-providers-DF6xoNtC.js";import"./FilterLines-Dc1F-WNI.js";import"./toggle-group-BFyHFJ9G.js";import"./command-D63NDRD_.js";import"./index-CSqLyX3L.js";import"./Zap-BrJ2b2V7.js";import"./Stars02-CLHJV6ce.js";import"./use-clock-tick-Dht-z9YX.js";import"./AlertCircle-DOZzh9F_.js";import"./DotsVertical-Bqf_kSFh.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-D1UDDnNw.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./CreditCard01-DTIKWUon.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./SearchLg-CDtXrrcW.js";import"./Stars01-Co5mOLjQ.js";import"./Upload01-B1Z9PE0l.js";import"./Users01-gv39jXBY.js";import"./use-org-auth-client-Bjx13kGF.js";import"./use-organization-roles-DZR-ca1L.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./required-auth-layout-C0mQQwr6.js";import"./use-org-sso-BUVIJh4V.js";import"./use-decopilot-events-BIUvCjFX.js";function el(t){const e=C.c(22),{siteUrl:l}=t,i=Y(),{org:o}=B(),n=A();let a;e[0]!==i||e[1]!==o.id||e[2]!==o.slug?(a=()=>{localStorage.setItem(It.sidebarOpen(),JSON.stringify(!1)),i({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:ns(o.id),main:pt(ht.COMMERCE_DISCOVERY(o.id),xt),sidepanel:0}})},e[0]=i,e[1]=o.id,e[2]=o.slug,e[3]=a):a=e[3];const r=a;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(es,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=f):f=e[4];let c;e[5]!==n?(c=n("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=n,e[6]=c):c=e[6];let d;e[7]!==c?(d=s.jsx(ts,{className:"sr-only",children:c}),e[7]=c,e[8]=d):d=e[8];let m;e[9]!==r||e[10]!==n?(m=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:n("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(rt,{type:"button",size:"xl",className:"w-full",onClick:r,children:[n("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(bt,{size:18})]})]}),e[9]=r,e[10]=n,e[11]=m):m=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(qt,{}),e[12]=p):p=e[12];let u;e[13]!==r||e[14]!==l?(u=s.jsx(L.Suspense,{fallback:p,children:s.jsx(ol,{siteUrlFromUrl:l,onComplete:r})}),e[13]=r,e[14]=l,e[15]=u):u=e[15];let x;e[16]!==m||e[17]!==u?(x=s.jsx(at,{fallback:m,children:u}),e[16]=m,e[17]=u,e[18]=x):x=e[18];let b;return e[19]!==d||e[20]!==x?(b=s.jsx(ss,{open:!0,children:s.jsxs(ls,{children:[f,s.jsxs(Et,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:ll,onPointerDownOutside:sl,onInteractOutside:tl,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[d,x]})]})}),e[19]=d,e[20]=x,e[21]=b):b=e[21],b}function tl(t){return t.preventDefault()}function sl(t){return t.preventDefault()}function ll(t){return t.preventDefault()}function ol({siteUrlFromUrl:t,onComplete:e}){const l=A(),{org:i}=B(),o=ht.COMMERCE_DISCOVERY(i.id),n=rs({connectionId:as,orgId:i.id,orgSlug:i.slug}),r=Tt({queryKey:Rt.commerceDiscoveryConnection(i.id,o),queryFn:async()=>{const j=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return ze(j)},retry:!1}).data.item,f=typeof r?.metadata?.siteUrl=="string"?r.metadata.siteUrl:void 0,c=t||f,d=Qt(c),[m,p]=L.useState(!0),[u,x]=L.useState(null),b=Ye({mutationFn:async j=>ze(await n.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:j}})),retry:!1}),h=Ye({mutationFn:async j=>ze(await n.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:j}})),retry:!1}),g=async()=>{x(null),V("commerce_onboarding_open_report_clicked",{domain:d??void 0,organization_id:i.id});const j=c?Zt(c):null;if(j?.ok)try{let S=await h.mutateAsync(j.value);if(S.triggered||(V("commerce_onboarding_run_reclaim",{domain:d??void 0,organization_id:i.id,reason:S.reason??"not_upgraded"}),await b.mutateAsync(j.value),S=await h.mutateAsync(j.value)),!S.triggered){V("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:S.reason??"not_triggered"}),x(l("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(S){V("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:S instanceof Error?S.message:String(S)}),x(l("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},y=ms("demo_mode"),v=m||y;return s.jsx(ds,{siteHost:d,footer:s.jsxs(s.Fragment,{children:[u?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(fs,{ready:v,pending:h.isPending,label:h.isPending?l("routes.commerceOnboarding.connectModal.openingReport"):l("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{g()},children:s.jsx(bt,{size:18})})}),v?null:s.jsx(rt,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:h.isPending,onClick:()=>{g()},children:l("routes.commerceOnboarding.connectModal.skip")})]})]}),children:s.jsx(Jt,{org:i,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function il(t){const e=C.c(11),{onPointerDown:l,onDoubleClick:i}=t,o=A(),{state:n,isMobile:a}=K();if(a||n==="collapsed")return null;let r;e[0]!==o?(r=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=r):r=e[1];let f;e[2]!==o?(f=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=f):f=e[3];let c,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},d=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=d):(c=e[4],d=e[5]);let m;return e[6]!==i||e[7]!==l||e[8]!==r||e[9]!==f?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":r,title:f,onPointerDown:l,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:d}),e[6]=i,e[7]=l,e[8]=r,e[9]=f,e[10]=m):m=e[10],m}const Ve=240,nl=400,rl="sidebar.width";function fe(t){return Math.max(Ve,Math.min(nl,t))}function al(){const t=C.c(11),[e,l]=ct(rl,cl),i=L.useRef(null);let o;t[0]!==l||t[1]!==e?(o=d=>{d.preventDefault();const m=d.clientX,p=fe(e),u=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=u?Array.from(u.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of x)g.style.transition="none";const b=g=>{const y=fe(p+(g.clientX-m));u?.style.setProperty("--sidebar-width",`${y}px`)},h=g=>{const y=fe(p+(g.clientX-m));l(y);for(const v of x)v.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",h),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",h)},t[0]=l,t[1]=e,t[2]=o):o=t[2];const n=o;let a;t[3]!==l?(a=()=>{l(Ve)},t[3]=l,t[4]=a):a=t[4];const r=a;let f;t[5]!==e?(f=fe(e),t[5]=e,t[6]=f):f=t[6];let c;return t[7]!==n||t[8]!==r||t[9]!==f?(c={width:f,wrapperRef:i,onStartResize:n,resetWidth:r},t[7]=n,t[8]=r,t[9]=f,t[10]=c):c=t[10],c}function cl(t){return typeof t=="number"?fe(t):Ve}function Mt(){return[]}function Ot(t){const e=C.c(3),{children:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=i):i=e[0];let o;return e[1]!==l?(o=s.jsxs(Re,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,s.jsx(Fe,{children:s.jsx(U,{className:"gap-0.5",children:l})})]}),e[1]=l,e[2]=o):o=e[2],o}function Pt(t){const e=C.c(18),{item:l}=t,{isMobile:i,setOpenMobile:o}=K();let n;e[0]!==i||e[1]!==l||e[2]!==o?(n=()=>{V("nav_item_clicked",{nav_key:l.key,nav_label:l.label,is_active:!!l.isActive,is_mobile:i}),l.onClick?.(),i&&o(!1)},e[0]=i,e[1]=l,e[2]=o,e[3]=n):n=e[3];const a=n,r=l.key,f=l.isActive&&"z-10";let c;e[4]!==f?(c=z(f),e[4]=f,e[5]=c):c=e[5];let d;e[6]!==l.label?(d=s.jsx("span",{children:l.label}),e[6]=l.label,e[7]=d):d=e[7];let m;e[8]!==a||e[9]!==l.icon||e[10]!==l.isActive||e[11]!==l.label||e[12]!==d?(m=s.jsxs(E,{onClick:a,isActive:l.isActive,tooltip:l.label,children:[l.icon,d]}),e[8]=a,e[9]=l.icon,e[10]=l.isActive,e[11]=l.label,e[12]=d,e[13]=m):m=e[13];let p;return e[14]!==l.key||e[15]!==c||e[16]!==m?(p=s.jsx(T,{className:c,children:m},r),e[14]=l.key,e[15]=c,e[16]=m,e[17]=p):p=e[17],p}function ml(t){const e=C.c(12),{section:l}=t;switch(l.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(dt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=l.group.label,o=l.group.defaultExpanded;let n;e[2]!==l.group.items?(n=l.group.items.map(fl),e[2]=l.group.items,e[3]=n):n=e[3];let a;return e[4]!==l.group.defaultExpanded||e[5]!==l.group.label||e[6]!==n?(a=s.jsx(Ot,{label:i,defaultExpanded:o,children:n}),e[4]=l.group.defaultExpanded,e[5]=l.group.label,e[6]=n,e[7]=a):a=e[7],a}case"items":{let i;e[8]!==l.items?(i=l.items.map(dl),e[8]=l.items,e[9]=i):i=e[9];let o;return e[10]!==i?(o=s.jsx(Re,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Fe,{children:s.jsx(U,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=o):o=e[11],o}case"custom":return l.content}}function dl(t){return s.jsx(Pt,{item:t},t.key)}function fl(t){return s.jsx(Pt,{item:t},t.key)}function ul(t){const e=C.c(17),{sections:l,footer:i,additionalContent:o,header:n,variant:a,contentClassName:r}=t,f=a===void 0?"sidebar":a;let c;e[0]!==n?(c=n&&s.jsx(Wt,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:n}),e[0]=n,e[1]=c):c=e[1];let d;e[2]!==r?(d=z("flex flex-col flex-1 px-2 pb-2 gap-0.5",r),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=l.map(pl),e[4]=l,e[5]=m):m=e[5];let p;e[6]!==o?(p=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let u;e[8]!==d||e[9]!==m||e[10]!==p?(u=s.jsxs(ft,{className:d,children:[m,p]}),e[8]=d,e[9]=m,e[10]=p,e[11]=u):u=e[11];let x;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==f?(x=s.jsxs(Vt,{variant:f,children:[c,u,i]}),e[12]=i,e[13]=c,e[14]=u,e[15]=f,e[16]=x):x=e[16],x}function pl(t,e){return s.jsx(ml,{section:t},e)}function zt(t){const e=C.c(2);let l;return e[0]!==t?(l=s.jsx(ul,{...t}),e[0]=t,e[1]=l):l=e[1],l}zt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,l)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(W,{className:"h-full bg-sidebar-accent rounded-md"})},l))})};function Je(t){const e=C.c(18),{item:l,onClose:i}=t,o=l.isActive&&"z-10";let n;e[0]!==o?(n=z(o),e[0]=o,e[1]=n):n=e[1];let a;e[2]!==l||e[3]!==i?(a=()=>{l.onClick?.(),i()},e[2]=l,e[3]=i,e[4]=a):a=e[4];let r;e[5]!==l.icon?(r=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:l.icon}),e[5]=l.icon,e[6]=r):r=e[6];let f;e[7]!==l.label?(f=s.jsx("span",{children:l.label}),e[7]=l.label,e[8]=f):f=e[8];let c;e[9]!==l.isActive||e[10]!==l.label||e[11]!==a||e[12]!==r||e[13]!==f?(c=s.jsxs(E,{onClick:a,isActive:l.isActive,tooltip:l.label,className:"h-10! text-sm!",children:[r,f]}),e[9]=l.isActive,e[10]=l.label,e[11]=a,e[12]=r,e[13]=f,e[14]=c):c=e[14];let d;return e[15]!==n||e[16]!==c?(d=s.jsx(T,{className:n,children:c}),e[15]=n,e[16]=c,e[17]=d):d=e[17],d}function xl(t){const e=C.c(18),{section:l,onClose:i}=t;switch(l.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(dt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=l.group.label,n=l.group.defaultExpanded;let a;if(e[2]!==i||e[3]!==l.group.items){let f;e[5]!==i?(f=c=>s.jsx(Je,{item:c,onClose:i},c.key),e[5]=i,e[6]=f):f=e[6],a=l.group.items.map(f),e[2]=i,e[3]=l.group.items,e[4]=a}else a=e[4];let r;return e[7]!==l.group.defaultExpanded||e[8]!==l.group.label||e[9]!==a?(r=s.jsx(Ot,{label:o,defaultExpanded:n,children:a}),e[7]=l.group.defaultExpanded,e[8]=l.group.label,e[9]=a,e[10]=r):r=e[10],r}case"items":{let o;if(e[11]!==i||e[12]!==l.items){let a;e[14]!==i?(a=r=>s.jsx(Je,{item:r,onClose:i},r.key),e[14]=i,e[15]=a):a=e[15],o=l.items.map(a),e[11]=i,e[12]=l.items,e[13]=o}else o=e[13];let n;return e[16]!==o?(n=s.jsx(Re,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Fe,{children:s.jsx(U,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=n):n=e[17],n}case"custom":return l.content}}function hl(t){const e=C.c(27),{sections:l,onClose:i,footer:o,additionalContent:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ke,{}),e[0]=a):a=e[0];let r;e[1]!==i?(r=s.jsx(Ge,{onNavigate:i}),e[1]=i,e[2]=r):r=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"flex-1"}),e[3]=f):f=e[3];const c=A();let d;e[4]!==c?(d=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=d):d=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Be,{size:16}),e[6]=m):m=e[6];let p;e[7]!==i||e[8]!==d?(p=s.jsx(He,{onClick:i,"aria-label":d,children:m}),e[7]=i,e[8]=d,e[9]=p):p=e[9];let u;e[10]!==r||e[11]!==p?(u=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[a,r,f,p]}),e[10]=r,e[11]=p,e[12]=u):u=e[12];let x;if(e[13]!==i||e[14]!==l){let y;e[16]!==i?(y=(v,j)=>s.jsx(xl,{section:v,onClose:i},j),e[16]=i,e[17]=y):y=e[17],x=l.map(y),e[13]=i,e[14]=l,e[15]=x}else x=e[15];let b;e[18]!==n?(b=n&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:n}),e[18]=n,e[19]=b):b=e[19];let h;e[20]!==b||e[21]!==x?(h=s.jsxs(ft,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[x,b]}),e[20]=b,e[21]=x,e[22]=h):h=e[22];let g;return e[23]!==o||e[24]!==h||e[25]!==u?(g=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,h,o]}),e[23]=o,e[24]=h,e[25]=u,e[26]=g):g=e[26],g}function de(t){const e=C.c(26),{item:l,onClose:i}=t;let o;e[0]!==l.className?(o=z("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",l.className),e[0]=l.className,e[1]=o):o=e[1];const n=o;if(l.href){const d=l.external?"_blank":void 0,m=l.external?"noopener noreferrer":void 0;let p;e[2]!==l.icon?(p=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[2]=l.icon,e[3]=p):p=e[3];let u;e[4]!==l.label?(u=s.jsx("span",{className:"flex-1",children:l.label}),e[4]=l.label,e[5]=u):u=e[5];let x;return e[6]!==n||e[7]!==l.href||e[8]!==i||e[9]!==d||e[10]!==m||e[11]!==p||e[12]!==u?(x=s.jsxs("a",{href:l.href,target:d,rel:m,className:n,onClick:i,children:[p,u]}),e[6]=n,e[7]=l.href,e[8]=i,e[9]=d,e[10]=m,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let a;e[14]!==l||e[15]!==i?(a=()=>{l.onClick?.(),i()},e[14]=l,e[15]=i,e[16]=a):a=e[16];let r;e[17]!==l.icon?(r=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[17]=l.icon,e[18]=r):r=e[18];let f;e[19]!==l.label?(f=s.jsx("span",{className:"flex-1",children:l.label}),e[19]=l.label,e[20]=f):f=e[20];let c;return e[21]!==n||e[22]!==a||e[23]!==r||e[24]!==f?(c=s.jsxs("button",{type:"button",onClick:a,className:n,children:[r,f]}),e[21]=n,e[22]=a,e[23]=r,e[24]=f,e[25]=c):c=e[25],c}function bl(){const t=C.c(4),e=A();let l;t[0]!==e?(l=e("common.accountPopover.impersonating"),t[0]=e,t[1]=l):l=t[1];let i;return t[2]!==l?(i=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:l}),t[2]=l,t[3]=i):i=t[3],i}function Ze(t){const e=C.c(38),{user:l,userImage:i,isImpersonating:o,isMobile:n}=t,a=A(),r=n?"py-4 border-b border-border":"py-3 mx-1 mt-1";let f;e[0]!==r?(f=z("flex items-center gap-3 px-4",r),e[0]=r,e[1]=f):f=e[1];const c=l?.name??"U";let d;e[2]!==c||e[3]!==i?(d=s.jsx(Ie,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=d):d=e[4];let m;e[5]!==a||e[6]!==l?.name?(m=l?.name??a("common.accountPopover.defaultUserName"),e[5]=a,e[6]=l?.name,e[7]=m):m=e[7];let p;e[8]!==m?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&s.jsx(bl,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const b=l?.email;let h;e[15]!==b?(h=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=h):h=e[16];let g;e[17]!==h||e[18]!==x?(g=s.jsxs("div",{className:"flex-1 min-w-0",children:[x,h]}),e[17]=h,e[18]=x,e[19]=g):g=e[19];let y;e[20]!==a||e[21]!==l?(y=()=>{l?.id&&navigator.clipboard.writeText(l.id).then(()=>{mt.success(a("common.accountPopover.userIdCopied"))})},e[20]=a,e[21]=l,e[22]=y):y=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Cs,{size:14}),e[23]=v):v=e[23];let j;e[24]!==y?(j=s.jsx(vt,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:y,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[24]=y,e[25]=j):j=e[25];let S;e[26]!==a?(S=a("common.accountPopover.copyUserId"),e[26]=a,e[27]=S):S=e[27];let w;e[28]!==S?(w=s.jsx(St,{side:"right",children:s.jsx("p",{className:"text-xs",children:S})}),e[28]=S,e[29]=w):w=e[29];let _;e[30]!==j||e[31]!==w?(_=s.jsx(yt,{delayDuration:300,children:s.jsxs(_t,{children:[j,w]})}),e[30]=j,e[31]=w,e[32]=_):_=e[32];let N;return e[33]!==g||e[34]!==_||e[35]!==f||e[36]!==d?(N=s.jsxs("div",{className:f,children:[d,g,_]}),e[33]=g,e[34]=_,e[35]=f,e[36]=d,e[37]=N):N=e[37],N}function et(t){const e=C.c(35),{themeOptions:l,preferences:i,setPreferences:o,isMobile:n}=t,a=A(),r=n?"size-8":"size-7",f=n?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==f?(c=z("flex items-center justify-between border-t border-border/50",f),e[0]=f,e[1]=c):c=e[1];let d;if(e[2]!==r||e[3]!==i.theme||e[4]!==o||e[5]!==l){let S;e[7]!==r||e[8]!==i.theme||e[9]!==o?(S=w=>{const{value:_,icon:N,label:k}=w;return s.jsx("button",{type:"button","aria-label":k,onClick:()=>o($=>({...$,theme:_})),className:z(r,"rounded-md flex items-center justify-center transition-colors",i.theme===_?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:N},_)},e[7]=r,e[8]=i.theme,e[9]=o,e[10]=S):S=e[10],d=l.map(S),e[2]=r,e[3]=i.theme,e[4]=o,e[5]=l,e[6]=d}else d=e[6];let m;e[11]!==d?(m=s.jsx("div",{className:"flex items-center gap-0.5",children:d}),e[11]=d,e[12]=m):m=e[12];let p;e[13]!==i.enableSounds||e[14]!==a?(p=i.enableSounds?a("common.accountPopover.disableSounds"):a("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=a,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o(gl),e[16]=o,e[17]=u):u=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let b;e[18]!==r||e[19]!==x?(b=z(r,"rounded-md flex items-center justify-center transition-colors",x),e[18]=r,e[19]=x,e[20]=b):b=e[20];let h;e[21]!==i.enableSounds?(h=i.enableSounds?s.jsx(Ds,{size:14}):s.jsx(Ms,{size:14}),e[21]=i.enableSounds,e[22]=h):h=e[22];let g;e[23]!==p||e[24]!==u||e[25]!==b||e[26]!==h?(g=s.jsx("button",{type:"button","aria-label":p,onClick:u,className:b,children:h}),e[23]=p,e[24]=u,e[25]=b,e[26]=h,e[27]=g):g=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.246.2"]}),e[28]=y):y=e[28];let v;e[29]!==g?(v=s.jsxs("div",{className:"flex items-center gap-2",children:[g,y]}),e[29]=g,e[30]=v):v=e[30];let j;return e[31]!==v||e[32]!==c||e[33]!==m?(j=s.jsxs("div",{className:c,children:[m,v]}),e[31]=v,e[32]=c,e[33]=m,e[34]=j):j=e[34],j}function gl(t){return{...t,enableSounds:!t.enableSounds}}function tt(t){const e=C.c(54),{user:l,userImage:i,menuItems:o,signOutItem:n,stopImpersonatingItem:a,isImpersonating:r,themeOptions:f,preferences:c,setPreferences:d,close:m,isMobile:p}=t;if(p){let j;e[0]!==r||e[1]!==l||e[2]!==i?(j=s.jsx(Ze,{user:l,userImage:i,isImpersonating:r,isMobile:!0}),e[0]=r,e[1]=l,e[2]=i,e[3]=j):j=e[3];let S;if(e[4]!==m||e[5]!==o){let D;e[7]!==m?(D=O=>s.jsx(de,{item:O,onClose:m},O.key),e[7]=m,e[8]=D):D=e[8],S=o.map(D),e[4]=m,e[5]=o,e[6]=S}else S=e[6];let w;e[9]!==m||e[10]!==a?(w=a&&s.jsx(de,{item:a,onClose:m}),e[9]=m,e[10]=a,e[11]=w):w=e[11];let _;e[12]!==m||e[13]!==n?(_=s.jsx(de,{item:n,onClose:m}),e[12]=m,e[13]=n,e[14]=_):_=e[14];let N;e[15]!==S||e[16]!==w||e[17]!==_?(N=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[S,w,_]})}),e[15]=S,e[16]=w,e[17]=_,e[18]=N):N=e[18];let k;e[19]!==c||e[20]!==d||e[21]!==f?(k=s.jsx(et,{themeOptions:f,preferences:c,setPreferences:d,isMobile:!0}),e[19]=c,e[20]=d,e[21]=f,e[22]=k):k=e[22];let $;return e[23]!==j||e[24]!==N||e[25]!==k?($=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[j,N,k]}),e[23]=j,e[24]=N,e[25]=k,e[26]=$):$=e[26],$}let u;e[27]!==r||e[28]!==l||e[29]!==i?(u=s.jsx(Ze,{user:l,userImage:i,isImpersonating:r,isMobile:!1}),e[27]=r,e[28]=l,e[29]=i,e[30]=u):u=e[30];let x;if(e[31]!==m||e[32]!==o){let j;e[34]!==m?(j=S=>s.jsx(de,{item:S,onClose:m},S.key),e[34]=m,e[35]=j):j=e[35],x=o.map(j),e[31]=m,e[32]=o,e[33]=x}else x=e[33];let b;e[36]!==m||e[37]!==a?(b=a&&s.jsx(de,{item:a,onClose:m}),e[36]=m,e[37]=a,e[38]=b):b=e[38];let h;e[39]!==m||e[40]!==n?(h=s.jsx(de,{item:n,onClose:m}),e[39]=m,e[40]=n,e[41]=h):h=e[41];let g;e[42]!==x||e[43]!==b||e[44]!==h?(g=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,b,h]}),e[42]=x,e[43]=b,e[44]=h,e[45]=g):g=e[45];let y;e[46]!==c||e[47]!==d||e[48]!==f?(y=s.jsx(et,{themeOptions:f,preferences:c,setPreferences:d,isMobile:!1}),e[46]=c,e[47]=d,e[48]=f,e[49]=y):y=e[49];let v;return e[50]!==u||e[51]!==g||e[52]!==y?(v=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[u,g,y]})}),e[50]=u,e[51]=g,e[52]=y,e[53]=v):v=e[53],v}function Ee(){const t=C.c(107),e=A(),{data:l}=ue.useSession(),{org:i}=B(),o=Y();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org",shouldThrow:!1},t[0]=n):n=t[0];const r=Ft(n)?.params.org,[f,c]=Lt(),d=ut(),{isAdmin:m}=Bs(),p=Hs(),[u,x]=L.useState(!1),[b,h]=L.useState(!1),g=l?.user,y=g?.image,v=!!l?.session?.impersonatedBy;let j;t[1]===Symbol.for("react.memo_cache_sentinel")?(j=()=>x(!1),t[1]=j):j=t[1];const S=j;let w;t[2]!==e?(w=e("common.accountPopover.preferences"),t[2]=e,t[3]=w):w=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx($e,{size:16}),t[4]=_):_=t[4];let N;t[5]!==o||t[6]!==r?(N=()=>{o({to:"/$org/settings/profile",params:{org:r??""}})},t[5]=o,t[6]=r,t[7]=N):N=t[7];let k;t[8]!==w||t[9]!==N?(k={key:"preferences",label:w,icon:_,onClick:N},t[8]=w,t[9]=N,t[10]=k):k=t[10];let $;t[11]!==i||t[12]!==o?($=i?[{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(Ts,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=$):$=t[13];let D;t[14]!==p||t[15]!==e?(D=(os()||Xe())&&!p?[{key:"install-desktop-app",label:Xe()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:s.jsx(ws,{size:16}),onClick:()=>h(!0)}]:[],t[14]=p,t[15]=e,t[16]=D):D=t[16];let O;t[17]!==e?(O=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=O):O=t[18];let I;t[19]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx($s,{size:16}),t[19]=I):I=t[19];let M;t[20]!==O?(M={key:"terms",label:O,icon:I,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=O,t[21]=M):M=t[21];let P;t[22]!==e?(P=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=P):P=t[23];let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Us,{size:16}),t[24]=G):G=t[24];let R;t[25]!==P?(R={key:"privacy",label:P,icon:G,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=P,t[26]=R):R=t[26];let F;t[27]!==e?(F=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=F):F=t[28];let H;t[29]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Ut,{className:"w-4 h-4"}),t[29]=H):H=t[29];let X;t[30]!==F?(X={key:"github",label:F,icon:H,href:"https://github.com/decocms/studio",external:!0},t[30]=F,t[31]=X):X=t[31];let q;t[32]!==e?(q=e("common.accountPopover.community"),t[32]=e,t[33]=q):q=t[33];let pe;t[34]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(Gs,{size:16}),t[34]=pe):pe=t[34];let Q;t[35]!==q?(Q={key:"community",label:q,icon:pe,href:"https://decocms.com/discord",external:!0},t[35]=q,t[36]=Q):Q=t[36];let J;t[37]!==e?(J=e("common.accountPopover.homepage"),t[37]=e,t[38]=J):J=t[38];let xe;t[39]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(Es,{size:16}),t[39]=xe):xe=t[39];let Z;t[40]!==J?(Z={key:"homepage",label:J,icon:xe,href:"https://decocms.com",external:!0},t[40]=J,t[41]=Z):Z=t[41];let ee;t[42]!==m||t[43]!==o||t[44]!==e?(ee=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(ks,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=ee):ee=t[45];let he;t[46]!==M||t[47]!==R||t[48]!==X||t[49]!==Q||t[50]!==Z||t[51]!==ee||t[52]!==k||t[53]!==$||t[54]!==D?(he=[k,...$,...D,M,R,X,Q,Z,...ee],t[46]=M,t[47]=R,t[48]=X,t[49]=Q,t[50]=Z,t[51]=ee,t[52]=k,t[53]=$,t[54]=D,t[55]=he):he=t[55];const De=he;let te;t[56]!==e?(te=e("common.accountPopover.signOut"),t[56]=e,t[57]=te):te=t[57];let be;t[58]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Qe,{size:16}),t[58]=be):be=t[58];let ge;t[59]!==te?(ge={key:"logout",label:te,icon:be,onClick:vl},t[59]=te,t[60]=ge):ge=t[60];const Me=ge;let je;t[61]!==v||t[62]!==e?(je=v?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(Qe,{size:16}),onClick:async()=>{const{error:Ke}=await ue.admin.stopImpersonating();if(Ke){mt.error(Ke.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=v,t[62]=e,t[63]=je):je=t[63];const Oe=je;let ve;t[64]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(Fs,{size:14}),t[64]=ve):ve=t[64];let se;t[65]!==e?(se=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=se):se=t[66];let le;t[67]!==se?(le={value:"light",icon:ve,label:se},t[67]=se,t[68]=le):le=t[68];let Se;t[69]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(Ls,{size:14}),t[69]=Se):Se=t[69];let oe;t[70]!==e?(oe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=oe):oe=t[71];let ie;t[72]!==oe?(ie={value:"dark",icon:Se,label:oe},t[72]=oe,t[73]=ie):ie=t[73];let ye;t[74]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Rs,{size:14}),t[74]=ye):ye=t[74];let ne;t[75]!==e?(ne=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=ne):ne=t[76];let re;t[77]!==ne?(re={value:"system",icon:ye,label:ne},t[77]=ne,t[78]=re):re=t[78];let _e;t[79]!==le||t[80]!==ie||t[81]!==re?(_e=[le,ie,re],t[79]=le,t[80]=ie,t[81]=re,t[82]=_e):_e=t[82];const Pe=_e;let Ne;t[83]!==v||t[84]!==d||t[85]!==De||t[86]!==f||t[87]!==c||t[88]!==Me||t[89]!==Oe||t[90]!==Pe||t[91]!==g||t[92]!==y?(Ne={user:g,userImage:y,menuItems:De,signOutItem:Me,stopImpersonatingItem:Oe,isImpersonating:v,themeOptions:Pe,preferences:f,setPreferences:c,close:S,isMobile:d},t[83]=v,t[84]=d,t[85]=De,t[86]=f,t[87]=c,t[88]=Me,t[89]=Oe,t[90]=Pe,t[91]=g,t[92]=y,t[93]=Ne):Ne=t[93];const Ce=Ne;let ae;t[94]!==v||t[95]!==d||t[96]!==u||t[97]!==Ce||t[98]!==e||t[99]!==g?.name||t[100]!==y?(ae=d?s.jsxs(ys,{open:u,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:z("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",v&&"border-2 border-dashed border-warning"),children:[s.jsx(Ie,{url:y,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(_s,{className:"h-[80dvh] p-0",children:[s.jsx(Ns,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(tt,{...Ce})]})]}):s.jsxs(js,{open:u,onOpenChange:x,children:[s.jsx(vs,{asChild:!0,children:s.jsxs(E,{tooltip:g?.name??e("common.accountPopover.defaultAccountLabel"),className:z("rounded-md",v&&"border-2 border-dashed border-warning"),children:[s.jsx(Ie,{url:y,fallback:g?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ss,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:jl,children:s.jsx(tt,{...Ce})})]}),t[94]=v,t[95]=d,t[96]=u,t[97]=Ce,t[98]=e,t[99]=g?.name,t[100]=y,t[101]=ae):ae=t[101];let ce;t[102]!==b?(ce=s.jsx(is,{open:b,onOpenChange:h}),t[102]=b,t[103]=ce):ce=t[103];let we;return t[104]!==ae||t[105]!==ce?(we=s.jsxs(s.Fragment,{children:[ae,ce]}),t[104]=ae,t[105]=ce,t[106]=we):we=t[106],we}function jl(t){return t.preventDefault()}function vl(){V("signed_out",{source:"account_popover"}),Gt(),ue.signOut()}class Sl extends L.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,l){}render(){return this.state.hasError?null:this.props.children}}function yl(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function _l(){const t=C.c(17),e=Y(),{org:l}=B(),{hasDecoKey:i,balanceDollars:o}=us();if(!i)return null;let n;t[0]!==o?(n=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=n):n=t[1];let a;t[2]!==o?(a=z(o!=null&&yl(o)),t[2]=o,t[3]=a):a=t[3];let r;t[4]!==e||t[5]!==l.slug?(r=()=>e({to:"/$org/settings/ai-providers",params:{org:l.slug}}),t[4]=e,t[5]=l.slug,t[6]=r):r=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Os,{}),t[7]=f):f=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let d;t[10]!==c?(d=s.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let m;return t[12]!==n||t[13]!==a||t[14]!==r||t[15]!==d?(m=s.jsx(U,{children:s.jsx(T,{children:s.jsxs(E,{tooltip:n,className:a,onClick:r,children:[f,d]})})}),t[12]=n,t[13]=a,t[14]=r,t[15]=d,t[16]=m):m=t[16],m}function st(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Sl,{children:s.jsx(L.Suspense,{fallback:null,children:s.jsx(_l,{})})}),t[0]=e):e=t[0],e}function Nl(){const t=C.c(14),e=A(),l=Y(),{org:i}=B();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==l||t[3]!==i.slug?(n=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=n):n=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx($e,{}),t[5]=a):a=t[5];let r;t[6]!==e?(r=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=r):r=t[7];let f;t[8]!==r?(f=s.jsx("span",{children:r}),t[8]=r,t[9]=f):f=t[9];let c;return t[10]!==o||t[11]!==n||t[12]!==f?(c=s.jsxs(E,{tooltip:o,onClick:n,children:[a,f]}),t[10]=o,t[11]=n,t[12]=f,t[13]=c):c=t[13],c}function Cl(){const t=C.c(9),e=A(),l=Y(),{org:i}=B();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==l||t[3]!==i.slug?(n=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=n):n=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx($e,{size:15}),t[5]=a):a=t[5];let r;return t[6]!==o||t[7]!==n?(r=s.jsx("button",{type:"button","aria-label":o,onClick:n,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:a}),t[6]=o,t[7]=n,t[8]=r):r=t[8],r}function lt(){const t=C.c(29),e=A(),[l,i]=L.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Nt,{}),t[2]=n):n=t[2];let a;t[3]!==e?(a=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=a):a=t[4];let r;t[5]!==a?(r=s.jsx("span",{children:a}),t[5]=a,t[6]=r):r=t[6];let f;t[7]!==o||t[8]!==r?(f=s.jsx(T,{children:s.jsx(Ct,{trigger:s.jsxs(E,{tooltip:o,children:[n,r]})})}),t[7]=o,t[8]=r,t[9]=f):f=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let d,m;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=()=>i(!0),m=s.jsx(Ws,{}),t[12]=d,t[13]=m):(d=t[12],m=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let u;t[16]!==p?(u=s.jsx("span",{children:p}),t[16]=p,t[17]=u):u=t[17];let x;t[18]!==c||t[19]!==u?(x=s.jsx(T,{children:s.jsxs(E,{tooltip:c,onClick:d,children:[m,u]})}),t[18]=c,t[19]=u,t[20]=x):x=t[20];let b;t[21]!==x||t[22]!==f?(b=s.jsxs(U,{className:"gap-0.5",children:[f,x]}),t[21]=x,t[22]=f,t[23]=b):b=t[23];let h;t[24]!==l?(h=s.jsx(ps,{open:l,onOpenChange:i,mode:"browse"}),t[24]=l,t[25]=h):h=t[25];let g;return t[26]!==b||t[27]!==h?(g=s.jsxs(s.Fragment,{children:[b,h]}),t[26]=b,t[27]=h,t[28]=g):g=t[28],g}function ot(){const t=C.c(10),e=A();let l;t[0]!==e?(l=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=l):l=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Nt,{}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let n;t[5]!==o?(n=s.jsx("span",{children:o}),t[5]=o,t[6]=n):n=t[6];let a;return t[7]!==l||t[8]!==n?(a=s.jsx(U,{className:"gap-0.5",children:s.jsx(T,{children:s.jsx(Ct,{trigger:s.jsxs(E,{tooltip:l,children:[i,n]})})})}),t[7]=l,t[8]=n,t[9]=a):a=t[9],a}function wl(){const t=C.c(17),{state:e}=K(),l=e==="collapsed",i=Le(),o=!i;if(l){let c;t[0]!==o?(c=o&&s.jsx(st,{}),t[0]=o,t[1]=c):c=t[1];let d;t[2]!==i?(d=i?s.jsx(ot,{}):s.jsx(lt,{}),t[2]=i,t[3]=d):d=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(T,{children:s.jsx(Nl,{})}),t[4]=m):m=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(U,{children:[m,s.jsx(T,{children:s.jsx(Ee,{})})]}),t[5]=p):p=t[5];let u;return t[6]!==c||t[7]!==d?(u=s.jsxs(Ae,{className:"px-2 pb-3 gap-1",children:[c,d,p]}),t[6]=c,t[7]=d,t[8]=u):u=t[8],u}let n;t[9]!==o?(n=o&&s.jsx(st,{}),t[9]=o,t[10]=n):n=t[10];let a;t[11]!==i?(a=i?s.jsx(ot,{}):s.jsx(lt,{}),t[11]=i,t[12]=a):a=t[12];let r;t[13]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(U,{className:"gap-0.5",children:s.jsx(T,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ee,{})}),s.jsx(Cl,{})]})})}),t[13]=r):r=t[13];let f;return t[14]!==n||t[15]!==a?(f=s.jsxs(Ae,{className:"px-2 pb-3 gap-0.5",children:[n,a,r]}),t[14]=n,t[15]=a,t[16]=f):f=t[16],f}function kl(){const t=C.c(11),e=A(),l=Y(),{org:i}=B(),{setOpenMobile:o}=K();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(U,{children:s.jsx(T,{children:s.jsx(Ee,{})})})}),t[0]=n):n=t[0];let a;t[1]!==e?(a=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=a):a=t[2];let r;t[3]!==l||t[4]!==i.slug||t[5]!==o?(r=()=>{l({to:"/$org/settings",params:{org:i.slug}}),o(!1)},t[3]=l,t[4]=i.slug,t[5]=o,t[6]=r):r=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx($e,{className:"size-4"}),t[7]=f):f=t[7];let c;return t[8]!==a||t[9]!==r?(c=s.jsx(Ae,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[n,s.jsx(He,{"aria-label":a,onClick:r,children:f})]})}),t[8]=a,t[9]=r,t[10]=c):c=t[10],c}function it(t){const e=C.c(15),{className:l,wrapperClassName:i,children:o}=t,[n,a]=L.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=g=>{g&&a(g.scrollHeight>g.clientHeight+1)},e[0]=r):r=e[0];const f=r;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=g=>{const y=g.currentTarget;a(y.scrollHeight-y.scrollTop>y.clientHeight+1)},e[1]=c):c=e[1];const d=c;let m;e[2]!==i?(m=z("relative",i),e[2]=i,e[3]=m):m=e[3];let p;e[4]!==o||e[5]!==l?(p=s.jsx("div",{ref:f,onScroll:d,className:l,children:o}),e[4]=o,e[5]=l,e[6]=p):p=e[6];const u=n?"opacity-100":"opacity-0";let x;e[7]!==u?(x=z("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",u),e[7]=u,e[8]=x):x=e[8];let b;e[9]!==x?(b=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=b):b=e[10];let h;return e[11]!==m||e[12]!==p||e[13]!==b?(h=s.jsxs("div",{className:m,children:[p,b]}),e[11]=m,e[12]=p,e[13]=b,e[14]=h):h=e[14],h}function nt(t){const e=C.c(17),{label:l,onClick:i,active:o,children:n}=t,[a,r]=L.useState(!1);let f,c,d,m;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>r(!0),c=()=>r(!1),d=()=>r(!0),m=()=>r(!1),e[0]=f,e[1]=c,e[2]=d,e[3]=m):(f=e[0],c=e[1],d=e[2],m=e[3]);const p=o&&"bg-sidebar-accent text-foreground";let u;e[4]!==p?(u=z("md:size-[34px] rounded-lg",p),e[4]=p,e[5]=u):u=e[5];let x;e[6]!==n||e[7]!==l||e[8]!==i||e[9]!==u?(x=s.jsx(vt,{asChild:!0,children:s.jsx(He,{"aria-label":l,onClick:i,onPointerEnter:f,onPointerLeave:c,onFocus:d,onBlur:m,className:u,children:n})}),e[6]=n,e[7]=l,e[8]=i,e[9]=u,e[10]=x):x=e[10];let b;e[11]!==l?(b=s.jsx(St,{side:"bottom",children:l}),e[11]=l,e[12]=b):b=e[12];let h;return e[13]!==a||e[14]!==x||e[15]!==b?(h=s.jsxs(_t,{open:a,children:[x,b]}),e[13]=a,e[14]=x,e[15]=b,e[16]=h):h=e[16],h}function $l(t){const e=C.c(61);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,o=A(),{org:n}=B();let a;e[2]!==i?(a={onNavigate:i},e[2]=i,e[3]=a):a=e[3];const r=xs(a),{state:f,isMobile:c,toggleSidebar:d}=K();if(f==="collapsed"&&!c){let v;e[4]!==n?(v=s.jsx(jt,{org:n,size:"sm"}),e[4]=n,e[5]=v):v=e[5];let j;e[6]!==n.name||e[7]!==v?(j=s.jsx(E,{tooltip:n.name,children:v}),e[6]=n.name,e[7]=v,e[8]=j):j=e[8];let S;e[9]!==n.slug||e[10]!==j?(S=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(gt,{orgParam:n.slug,side:"right",align:"start",trigger:j})}),e[9]=n.slug,e[10]=j,e[11]=S):S=e[11];let w;e[12]!==o?(w=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=w):w=e[13];let _;e[14]!==o?(_=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=_):_=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Be,{size:16}),e[16]=N):N=e[16];let k;e[17]!==w||e[18]!==_||e[19]!==d?(k=s.jsx(T,{children:s.jsx(E,{"aria-label":w,tooltip:_,onClick:d,children:N})}),e[17]=w,e[18]=_,e[19]=d,e[20]=k):k=e[20];let $;e[21]!==o?($=o("sidebar.taskGroupsList.searchChats"),e[21]=o,e[22]=$):$=e[22];let D;e[23]!==o?(D=o("sidebar.taskGroupsList.searchChats"),e[23]=o,e[24]=D):D=e[24];let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(qe,{size:16}),e[25]=O):O=e[25];let I;e[26]!==r.openSearch||e[27]!==$||e[28]!==D?(I=s.jsx(T,{children:s.jsx(E,{"aria-label":$,tooltip:D,onClick:r.openSearch,children:O})}),e[26]=r.openSearch,e[27]=$,e[28]=D,e[29]=I):I=e[29];let M;e[30]!==I||e[31]!==k?(M=s.jsxs(U,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[k,I]}),e[30]=I,e[31]=k,e[32]=M):M=e[32];let P;return e[33]!==r.reclaimDialog||e[34]!==r.searchDialog||e[35]!==M||e[36]!==S?(P=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[S,M,r.searchDialog,r.reclaimDialog]}),e[33]=r.reclaimDialog,e[34]=r.searchDialog,e[35]=M,e[36]=S,e[37]=P):P=e[37],P}let p;e[38]!==r||e[39]!==o?(p=v=>s.jsx(yt,{delayDuration:300,children:s.jsxs("div",{className:z("shrink-0 flex items-center justify-between",v?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!v&&s.jsx(We,{className:"md:size-[34px] rounded-lg"}),s.jsx(hs,{panel:r})]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(nt,{label:o("sidebar.taskGroupsList.searchChats"),onClick:r.openSearch,children:s.jsx(qe,{size:16})}),s.jsx(nt,{label:o("sidebar.taskGroupsList.newChat"),onClick:r.newThread,children:s.jsx(Ps,{size:16})})]})]})}),e[38]=r,e[39]=o,e[40]=p):p=e[40];const u=p;let x;e[41]!==r?(x=s.jsx(bs,{panel:r}),e[41]=r,e[42]=x):x=e[42];const b=x;if(c){let v;e[43]!==u?(v=u(!0),e[43]=u,e[44]=v):v=e[44];let j;e[45]!==b?(j=s.jsx(it,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:b}),e[45]=b,e[46]=j):j=e[46];let S;return e[47]!==r.reclaimDialog||e[48]!==r.searchDialog||e[49]!==v||e[50]!==j?(S=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[v,j,r.searchDialog,r.reclaimDialog]}),e[47]=r.reclaimDialog,e[48]=r.searchDialog,e[49]=v,e[50]=j,e[51]=S):S=e[51],S}let h;e[52]!==u?(h=u(!1),e[52]=u,e[53]=h):h=e[53];let g;e[54]!==b?(g=s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(it,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:b})}),e[54]=b,e[55]=g):g=e[55];let y;return e[56]!==r.reclaimDialog||e[57]!==r.searchDialog||e[58]!==h||e[59]!==g?(y=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[h,g,r.searchDialog,r.reclaimDialog]}),e[56]=r.reclaimDialog,e[57]=r.searchDialog,e[58]=h,e[59]=g,e[60]=y):y=e[60],y}const Dl=5,Ml=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function Ol(){const t=C.c(3),{state:e}=K();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:Dl}).map(Al)}),t[0]=o):o=t[0],o}let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(W,{className:"size-6 rounded-md"}),s.jsx(W,{className:"size-6 rounded-md"}),s.jsx(W,{className:"size-6 rounded-md"})]}),s.jsx(W,{className:"h-6 w-20 rounded-md"})]}),t[1]=l):l=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[l,s.jsx("div",{className:"flex flex-col gap-0.5",children:Ml.map(Pl)})]}),t[2]=i):i=t[2],i}function Pl(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(W,{className:"size-5 rounded-full shrink-0"}),s.jsx(W,{className:z("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(zl)})]},e)}function zl(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(W,{className:"h-3 flex-1 rounded-sm"})},e)}function Al(t,e){return s.jsx(W,{className:"size-10 rounded-lg mx-auto"},e)}function Il(){const t=C.c(2),{org:e}=B();let l;return t[0]!==e.id?(l=cs(e.id),t[0]=e.id,t[1]=l):l=t[1],l.id}function El(t){const e=C.c(36);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,o=A(),n=Y();let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[2]=a):a=e[2];const r=Te(a),{diagnostic:f,connectionId:c}=gs(),d=Il(),{threads:m}=wt(),{data:p}=ue.useSession(),{setTaskId:u,createNewTask:x}=kt(),b=!r.virtualmcpid||r.virtualmcpid===d;let h;e[3]!==x||e[4]!==d||e[5]!==n||e[6]!==i||e[7]!==b||e[8]!==p?.user?.id||e[9]!==u||e[10]!==m?(h=_=>{if(V("nav_destination_clicked",{destination:_}),i?.(),b){n({to:".",search:k=>({...k,main:_}),replace:!0});return}const N=$t(m,d,p?.user?.id);N?u(N.id,d,{main:_}):x(d,void 0,{main:_})},e[3]=x,e[4]=d,e[5]=n,e[6]=i,e[7]=b,e[8]=p?.user?.id,e[9]=u,e[10]=m,e[11]=h):h=e[11];const g=h,y=r.main===0||!r.main?b?"overview":null:r.main;let v;e[12]!==y||e[13]!==g?(v=(_,N,k)=>({key:_,label:N,icon:k,isActive:y===_,onSelect:()=>g(_)}),e[12]=y,e[13]=g,e[14]=v):v=e[14];const j=v;let S;if(e[15]!==j||e[16]!==o){let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(zs,{size:16}),e[18]=_):_=e[18],S=j("overview",o("sidebar.navDestinations.home"),_),e[15]=j,e[16]=o,e[17]=S}else S=e[17];let w;if(e[19]!==c||e[20]!==j||e[21]!==f||e[22]!==o||e[23]!==S){if(w=[S],f){let k;if(e[25]!==c||e[26]!==j||e[27]!==o){let $;e[29]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(As,{size:16}),e[29]=$):$=e[29],k=j(pt(c,xt),o("sidebar.navDestinations.reports"),$),e[25]=c,e[26]=j,e[27]=o,e[28]=k}else k=e[28];w.push(k)}let _,N;if(e[30]!==j||e[31]!==o){let k;e[34]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Vs,{size:16}),e[34]=k):k=e[34],_=j("board",o("sidebar.navDestinations.tasks"),k);let $;e[35]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(Ys,{size:16}),e[35]=$):$=e[35],N=j("files",o("sidebar.navDestinations.library"),$),e[30]=j,e[31]=o,e[32]=_,e[33]=N}else _=e[32],N=e[33];w.push(_,N),e[19]=c,e[20]=j,e[21]=f,e[22]=o,e[23]=S,e[24]=w}else w=e[24];return w}function Tl(t){const e=C.c(10);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[2]=o):o=e[2];const n=Te(o),a=Xs()??[],{threads:r}=wt(),{data:f}=ue.useSession(),{setTaskId:c,createNewTask:d}=kt();let m;return e[3]!==d||e[4]!==i||e[5]!==n||e[6]!==f?.user?.id||e[7]!==c||e[8]!==r?(m=p=>{const u=Qs(p);return{key:p.id,label:u?.name||p.title,icon:s.jsx(Is,{icon:p.icon,name:p.title,size:"2xs",className:"shrink-0"}),isActive:n.virtualmcpid===p.id,onSelect:()=>{V("nav_destination_clicked",{destination:"coding_agent"}),i?.();const x=$t(r,p.id,f?.user?.id);x?c(x.id,p.id):d(p.id)}}},e[3]=d,e[4]=i,e[5]=n,e[6]=f?.user?.id,e[7]=c,e[8]=r,e[9]=m):m=e[9],a.filter(Rl).map(m)}function Rl(t){return qs(t.metadata)}function Fl(t){const e=C.c(18),{onNavigate:l}=t;let i;e[0]!==l?(i={onNavigate:l},e[0]=l,e[1]=i):i=e[1];const o=El(i);let n;e[2]!==l?(n={onNavigate:l},e[2]=l,e[3]=n):n=e[3];const a=Tl(n),{state:r,isMobile:f}=K(),c=r==="collapsed"&&!f;let d;e[4]!==c?(d=h=>s.jsx(T,{children:s.jsxs(E,{onClick:h.onSelect,isActive:h.isActive,tooltip:c?h.label:void 0,children:[h.icon,s.jsx("span",{className:"truncate",children:h.label})]})},h.key),e[4]=c,e[5]=d):d=e[5];const m=d;let p;e[6]!==o||e[7]!==m?(p=o.map(m),e[6]=o,e[7]=m,e[8]=p):p=e[8];let u;e[9]!==a.length?(u=a.length>0&&s.jsx("li",{"aria-hidden":!0,className:"h-2"}),e[9]=a.length,e[10]=u):u=e[10];let x;e[11]!==a||e[12]!==m?(x=a.map(m),e[11]=a,e[12]=m,e[13]=x):x=e[13];let b;return e[14]!==p||e[15]!==u||e[16]!==x?(b=s.jsxs(U,{className:"gap-1",children:[p,u,x]}),e[14]=p,e[15]=u,e[16]=x,e[17]=b):b=e[17],b}function Ll(t){const e=C.c(29);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,o=A(),{org:n}=B(),{state:a,isMobile:r,toggleSidebar:f}=K(),c=a==="collapsed"&&!r;let d;e[2]!==i?(d=s.jsx(Fl,{onNavigate:i}),e[2]=i,e[3]=d):d=e[3];const m=d;if(c){let u;e[4]!==n?(u=s.jsx(jt,{org:n,size:"sm"}),e[4]=n,e[5]=u):u=e[5];let x;e[6]!==n.name||e[7]!==u?(x=s.jsx(E,{tooltip:n.name,children:u}),e[6]=n.name,e[7]=u,e[8]=x):x=e[8];let b;e[9]!==n.slug||e[10]!==x?(b=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(gt,{orgParam:n.slug,side:"right",align:"start",trigger:x})}),e[9]=n.slug,e[10]=x,e[11]=b):b=e[11];let h;e[12]!==o?(h=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=h):h=e[13];let g;e[14]!==o?(g=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=g):g=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Be,{size:16}),e[16]=y):y=e[16];let v;e[17]!==h||e[18]!==g||e[19]!==f?(v=s.jsx(U,{className:"mt-2 gap-1.5",children:s.jsx(T,{children:s.jsx(E,{"aria-label":h,tooltip:g,onClick:f,children:y})})}),e[17]=h,e[18]=g,e[19]=f,e[20]=v):v=e[20];let j;e[21]!==m?(j=s.jsx("div",{className:"mt-1.5 min-h-0 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:m}),e[21]=m,e[22]=j):j=e[22];let S;return e[23]!==j||e[24]!==b||e[25]!==v?(S=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[b,v,j]}),e[23]=j,e[24]=b,e[25]=v,e[26]=S):S=e[26],S}let p;return e[27]!==m?(p=s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:m})}),e[27]=m,e[28]=p):p=e[28],p}function Ul(){const t=C.c(3),e=Le();if(Ue()){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(s.Fragment,{children:[s.jsx(ke,{showName:!0}),s.jsx(We,{className:"ml-auto md:size-[34px] rounded-lg"})]}),t[0]=o):o=t[0],o}if(e){let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ke,{showName:!0}),t[1]=o):o=t[1],o}let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(s.Fragment,{children:[s.jsx(ke,{}),s.jsx(Ge,{})]}),t[2]=i):i=t[2],i}function At(t){const e=C.c(4),{onNavigate:l}=t,i=Ue();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ol,{}),e[0]=o):o=e[0];let n;return e[1]!==i||e[2]!==l?(n=s.jsx(at,{children:s.jsx(L.Suspense,{fallback:o,children:i?s.jsx(Ll,{onNavigate:l}):s.jsx($l,{onNavigate:l})})}),e[1]=i,e[2]=l,e[3]=n):n=e[3],n}function Gl(){const t=C.c(5),e=Mt();let l,i,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(wl,{}),i=s.jsx(Ul,{}),o=s.jsx(At,{}),t[0]=l,t[1]=i,t[2]=o):(l=t[0],i=t[1],o=t[2]);let n;return t[3]!==e?(n=s.jsx(Dt,{children:s.jsx(zt,{sections:e,footer:l,header:i,additionalContent:o})}),t[3]=e,t[4]=n):n=t[4],n}function Bl(t){const e=C.c(7),{onClose:l}=t,i=Mt();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(kl,{}),e[0]=o):o=e[0];let n;e[1]!==l?(n=s.jsx(At,{onNavigate:l}),e[1]=l,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==i||e[5]!==n?(a=s.jsx(Dt,{children:s.jsx(hl,{sections:i,onClose:l,footer:o,additionalContent:n})}),e[3]=l,e[4]=i,e[5]=n,e[6]=a):a=e[6],a}const Hl="sidebar.open";function Wl(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ht,{}),t[0]=e):e=t[0],e}function dn(){const t=C.c(37),e=ut(),l=Le(),i=Ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const{connect:n,siteUrl:a}=Te(o),r=n==="1",[f,c]=ct(Hl,!1),{width:d,wrapperRef:m,onStartResize:p,resetWidth:u}=al(),x=e;let b;t[1]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(We,{}),t[1]=b):b=t[1];let h;t[2]!==i||t[3]!==l?(h=!l&&!i&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(Ge,{})}),t[2]=i,t[3]=l,t[4]=h):h=t[4];let g,y,v,j;t[5]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(me.TogglesSlot,{}),y=s.jsx(me.TabsSlot,{className:"shrink-0"}),v=s.jsx(me.CenterSlot,{}),j=s.jsx(me.RightSlot,{}),t[5]=g,t[6]=y,t[7]=v,t[8]=j):(g=t[5],y=t[6],v=t[7],j=t[8]);let S;t[9]!==h?(S=s.jsx(me.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[b,h,g,y,v,j]})}),t[9]=h,t[10]=S):S=t[10];const w=S;let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_={background:"transparent",containerType:"inline-size"},t[11]=_):_=t[11];let N;t[12]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Kt,{className:"flex flex-col min-h-0",style:_,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(L.Suspense,{fallback:s.jsx(Wl,{}),children:s.jsx(Bt,{})})})})}),t[12]=N):N=t[12];const k=N,$=x&&w,D=`${d}px`;let O;t[13]!==D?(O={"--sidebar-width":D,"--sidebar-width-icon":"3.125rem"},t[13]=D,t[14]=O):O=t[14];const I=O;let M;t[15]!==e||t[16]!==p||t[17]!==u?(M=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Gl,{}),s.jsx(il,{onPointerDown:p,onDoubleClick:u})]}),t[15]=e,t[16]=p,t[17]=u,t[18]=M):M=t[18];let P;t[19]!==I||t[20]!==M||t[21]!==m?(P=s.jsxs(Yt,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:I,children:[M,k]}),t[19]=I,t[20]=M,t[21]=m,t[22]=P):P=t[22];let G;t[23]!==e?(G=e&&s.jsx(Ks,{renderSidebar:Vl}),t[23]=e,t[24]=G):G=t[24];let R;t[25]!==a||t[26]!==r?(R=r&&s.jsx(el,{siteUrl:a}),t[25]=a,t[26]=r,t[27]=R):R=t[27];let F;t[28]!==$||t[29]!==P||t[30]!==G||t[31]!==R?(F=s.jsx(Zs,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[$,P,G,R]})}),t[28]=$,t[29]=P,t[30]=G,t[31]=R,t[32]=F):F=t[32];let H;return t[33]!==c||t[34]!==f||t[35]!==F?(H=s.jsx(Js,{children:s.jsx(me.Provider,{children:s.jsx(Xt,{open:f,onOpenChange:c,children:F})})}),t[33]=c,t[34]=f,t[35]=F,t[36]=H):H=t[36],H}function Vl(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Bl,{onClose:e})})})}export{dn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as me,b as de,j as s,B as ve}from"./index-CacyxM-B.js";import{i as Ee}from"./AlertCircle-DOZzh9F_.js";import{n as ye}from"./LinkExternal01-kQgSYVkJ.js";import{b6 as Ce,n as Pe}from"./agent-icon-BDevt-8Z.js";import{I as pe}from"./input-B8ln-0Wl.js";import{L as ee}from"./label-CCAJCJOj.js";import{M as Ne}from"./multi-select-FeXmTrOe.js";import{b as fe,c as ke,T as xe,a as Le}from"./tabs-BerlyCPW.js";import{S as Te}from"./switch-B0vh0spM.js";import{T as ge}from"./textarea-CD_pYqo3.js";import{F as Se,R as Fe,T as we,U as Be,J as Ae,V as Ie,W as Re,X as _e,Y as $e,Z as ue,_ as be}from"./index-COAHvcVh.js";import{c as Me,T as Ve,a as De}from"./tooltip-CwIq9zTG.js";import{b as Ue,a as Ye,B as ze}from"./block-document-D__keZl9.js";import{u as qe}from"./use-autosave-BvdFNf3e.js";import{s as G,E as He,R as Je,A as Ke}from"./primitives-BcUA5QnY.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowLeft-D3IfTAWC.js";import"./Tool02-DtJ6WkGT.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./Check-CSFy6eOj.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronRight-H-_IIqWd.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./ChevronUp-CT1Rb5MC.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LayoutLeft-BF7bmTAo.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./Plus-m61KPSTg.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./X-VMfnK-j5.js";import"./Zap-BrJ2b2V7.js";import"./badge-Bc-IWDm5.js";import"./checkbox-BsGrD1YR.js";import"./command-D63NDRD_.js";import"./index-CSqLyX3L.js";import"./dialog-Ww_zj2g-.js";import"./popover-5hCe1k-b.js";import"./chat-context-D20WJCxs.js";import"./tab-id-ZL6F14qy.js";import"./hooks-D72xT78n.js";import"./use-mcp-client-DRcy9vk6.js";import"./auth-Dk3-oFE7.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-zFcH9fRu.js";import"./use-ai-providers-DF6xoNtC.js";import"./studio-tools-O0czolAT.js";import"./use-decopilot-events-BIUvCjFX.js";import"./use-organization-settings-DJYuvv-k.js";import"./automation-runs-D-R-Y_E3.js";import"./select-CwAouusu.js";import"./useInfiniteQuery-BxSgA-RD.js";import"./use-infinite-scroll-ChfJMk5S.js";import"./use-connection-BS7_Pbag.js";import"./card-CG7VHdDz.js";import"./sidebar-BDv_n64F.js";import"./use-mobile-c0ak1uw4.js";import"./table-Dc0W0B0Q.js";import"./empty-state-BJ2gnfVT.js";import"./use-members-CYQAJOqU.js";import"./use-org-auth-client-Bjx13kGF.js";import"./use-clock-tick-Dht-z9YX.js";import"./use-automations-DQVxqjfN.js";import"./useSuspenseInfiniteQuery-CNPxNyM-.js";import"./avatar-C448hZt-.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D87eemcY.js";import"./monaco-editor-q7NTyRwe.js";import"./spinner-D7fl_vK2.js";import"./types-D40WAxQO.js";import"./shell-layout-VRjP3s0M.js";import"./required-auth-layout-C0mQQwr6.js";import"./use-org-sso-BUVIJh4V.js";import"./integration-icon-CLbqw16t.js";import"./use-navigate-to-agent-IPGb4TnC.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-DoynaU7M.js";import"./index-CVShUKw1.js";import"./form-BhElkTfE.js";import"./file-type-icon-B5W8k3cc.js";import"./drawer-lF-HaYn9.js";import"./collection-search-DGOZ00E9.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./toggle-group-BFyHFJ9G.js";import"./use-commerce-diagnostic-B_wc4KWh.js";import"./self-tool-result-DaPbHreD.js";import"./alert-dialog-DRGp9yFR.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./track-Bufvtvpy.js";import"./toolbar-ClzusW5n.js";import"./skeleton-DOg01VWn.js";import"./github-repo-picker-CcDCsGzG.js";import"./use-mcp-tools-CMpvouUr.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-BER9PD2I.js";import"./use-registry-connections-GX-tovow.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-ZW-hGCeS.js";import"./collection-tabs-DaZaBm6K.js";import"./use-open-billing-url-nNkK2kBm.js";import"./select-model-eoIBQakm.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cz2znp8W.js";import"./cards-DY46VRdr.js";import"./dropdown-menu-ByKxU4Y4.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-e0Pidqxv.js";import"./use-capability-D8TgIows.js";import"./use-file-configs-EhMCIyTI.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-fueOpbqS.js";import"./index-GDSYOTBM.js";import"./search-input-ByYoJKBQ.js";import"./index-DGV2vBko.js";import"./use-secrets-6DO3yZ-p.js";import"./AreaChart-BEoF41lY.js";import"./use-tags-tOpGCqE_.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-BIOSCgKN.js";import"./use-org-repo-syncs-CEYhU3FE.js";function We(H){return Array.isArray(H)?H.map(e=>({key:G(e?.key),value:G(e?.value)})):[]}function Qi(H){const e=me.c(115),{orgSlug:l,virtualMcpId:m,branch:t,blockKey:i,block:a,decofile:c,meta:n,previewBaseUrl:p}=H,o=de();let f;e[0]!==t||e[1]!==l||e[2]!==m?(f={orgSlug:l,virtualMcpId:m,branch:t},e[0]=t,e[1]=l,e[2]=m,e[3]=f):f=e[3];const d=Se(f);let j;e[4]!==t||e[5]!==l||e[6]!==m?(j={orgSlug:l,virtualMcpId:m,branch:t},e[4]=t,e[5]=l,e[6]=m,e[7]=j):j=e[7];const u=Fe(j);let h;e[8]!==a?(h=we(a,"posts"),e[8]=a,e[9]=h):h=e[9];const g=h;let x;e[10]!==i||e[11]!==d?(x=te=>{d.mutate({blockKey:i,data:Ie(i,"posts",Re(te))})},e[10]=i,e[11]=d,e[12]=x):x=e[12];const[r,C]=qe(g,x);let N;e[13]!==r||e[14]!==C?(N=(te,je)=>C({...r,[te]:je}),e[13]=r,e[14]=C,e[15]=N):N=e[15];const v=N;let D;e[16]!==c||e[17]!==u||e[18]!==r||e[19]!==p?(D=Ue({decofile:c,post:r,previewBaseUrl:p,draftPointer:u}),e[16]=c,e[17]=u,e[18]=r,e[19]=p,e[20]=D):D=e[20];const k=D;let b,E,U;e[21]!==r||e[22]!==o?(E=Be(r),b=E.length>0,U=E.length===1?o("sandbox.postEditor.missingFieldSingular",{fields:E.join(", ")}):o("sandbox.postEditor.missingFieldPlural",{fields:E.join(", ")}),e[21]=r,e[22]=o,e[23]=b,e[24]=E,e[25]=U):(b=e[23],E=e[24],U=e[25]);const L=U;let Q;e[26]!==r.title||e[27]!==o?(Q=G(r.title)||o("sandbox.postEditor.untitledPost"),e[26]=r.title,e[27]=o,e[28]=Q):Q=e[28];let T;e[29]!==Q?(T=s.jsx("span",{className:"truncate text-sm font-medium",children:Q}),e[29]=Q,e[30]=T):T=e[30];let S;e[31]!==b||e[32]!==E||e[33]!==L||e[34]!==o?(S=b&&s.jsxs(Me,{children:[s.jsx(Ve,{asChild:!0,children:s.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[s.jsx(Ee,{size:14}),E.length," ",E.length===1?o("sandbox.postEditor.issueSingular"):o("sandbox.postEditor.issuePlural")]})}),s.jsx(De,{side:"bottom",children:L})]}),e[31]=b,e[32]=E,e[33]=L,e[34]=o,e[35]=S):S=e[35];let F;e[36]!==d.isError||e[37]!==d.isPending?(F=s.jsx(Ae,{isPending:d.isPending,isError:d.isError}),e[36]=d.isError,e[37]=d.isPending,e[38]=F):F=e[38];const J=!k||b;let w;e[39]!==b||e[40]!==L||e[41]!==k||e[42]!==o?(w=b?L:o(k?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),e[39]=b,e[40]=L,e[41]=k,e[42]=o,e[43]=w):w=e[43];let B;e[44]!==b||e[45]!==k?(B=()=>{k&&!b&&window.open(k,"_blank","noopener,noreferrer")},e[44]=b,e[45]=k,e[46]=B):B=e[46];let Y;e[47]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(ye,{size:14}),e[47]=Y):Y=e[47];let A;e[48]!==o?(A=o("sandbox.postEditor.seePreview"),e[48]=o,e[49]=A):A=e[49];let I;e[50]!==J||e[51]!==w||e[52]!==B||e[53]!==A?(I=s.jsxs(ve,{type:"button",variant:"outline",size:"sm",disabled:J,title:w,onClick:B,children:[Y,A]}),e[50]=J,e[51]=w,e[52]=B,e[53]=A,e[54]=I):I=e[54];let R;e[55]!==S||e[56]!==F||e[57]!==I?(R=s.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[S,F,I]}),e[55]=S,e[56]=F,e[57]=I,e[58]=R):R=e[58];let _;e[59]!==R||e[60]!==T?(_=s.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[T,R]}),e[59]=R,e[60]=T,e[61]=_):_=e[61];let $;e[62]!==r.title?($=G(r.title),e[62]=r.title,e[63]=$):$=e[63];let K;e[64]!==v?(K=te=>v("title",te),e[64]=v,e[65]=K):K=e[65];let M;e[66]!==o?(M=o("sandbox.postEditor.postTitlePlaceholder"),e[66]=o,e[67]=M):M=e[67];let V;e[68]!==$||e[69]!==K||e[70]!==M?(V=s.jsx(He,{value:$,onChange:K,placeholder:M,className:"py-1 text-4xl font-bold text-foreground"}),e[68]=$,e[69]=K,e[70]=M,e[71]=V):V=e[71];let z;e[72]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Ce,{}),e[72]=z):z=e[72];let q;e[73]!==o?(q=o("sandbox.postEditor.contentTab"),e[73]=o,e[74]=q):q=e[74];let y;e[75]!==q?(y=s.jsxs(fe,{value:"content",children:[z,q]}),e[75]=q,e[76]=y):y=e[76];let W;e[77]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Pe,{}),e[77]=W):W=e[77];let X;e[78]!==o?(X=o("sandbox.postEditor.settingsTab"),e[78]=o,e[79]=X):X=e[79];let Z;e[80]!==X?(Z=s.jsxs(fe,{value:"settings",children:[W,X]}),e[80]=X,e[81]=Z):Z=e[81];let O;e[82]!==y||e[83]!==Z?(O=s.jsxs(ke,{children:[y,Z]}),e[82]=y,e[83]=Z,e[84]=O):O=e[84];let P;e[85]!==r.sections?(P=Ye(r.sections),e[85]=r.sections,e[86]=P):P=e[86];let se;e[87]!==v?(se=te=>v("sections",te),e[87]=v,e[88]=se):se=e[88];let ie;e[89]!==t||e[90]!==l||e[91]!==m?(ie={orgSlug:l,virtualMcpId:m,branch:t},e[89]=t,e[90]=l,e[91]=m,e[92]=ie):ie=e[92];let oe;e[93]!==o?(oe=o("sandbox.postEditor.noContentYet"),e[93]=o,e[94]=oe):oe=e[94];let le;e[95]!==n||e[96]!==P||e[97]!==se||e[98]!==ie||e[99]!==oe?(le=s.jsx(xe,{value:"content",children:s.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:s.jsx(ze,{value:P,onChange:se,meta:n,sandboxRef:ie,emptyMessage:oe})})}),e[95]=n,e[96]=P,e[97]=se,e[98]=ie,e[99]=oe,e[100]=le):le=e[100];let re;e[101]!==c||e[102]!==r||e[103]!==v?(re=s.jsx(xe,{value:"settings",children:s.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:s.jsx(Xe,{post:r,decofile:c,onChange:v})})}),e[101]=c,e[102]=r,e[103]=v,e[104]=re):re=e[104];let ae;e[105]!==O||e[106]!==le||e[107]!==re?(ae=s.jsxs(Le,{defaultValue:"content",className:"mt-6 gap-4",children:[O,le,re]}),e[105]=O,e[106]=le,e[107]=re,e[108]=ae):ae=e[108];let ne;e[109]!==V||e[110]!==ae?(ne=s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[V,ae]})}),e[109]=V,e[110]=ae,e[111]=ne):ne=e[111];let ce;return e[112]!==_||e[113]!==ne?(ce=s.jsxs("div",{className:"flex h-full flex-col",children:[_,ne]}),e[112]=_,e[113]=ne,e[114]=ce):ce=e[114],ce}function Xe(H){const e=me.c(119),{post:l,decofile:m,onChange:t}=H,i=de();let a;e[0]!==i?(a=i("sandbox.postEditor.excerptLabel"),e[0]=i,e[1]=a):a=e[1];let c;e[2]!==a?(c=s.jsx(ee,{htmlFor:"post-excerpt",children:a}),e[2]=a,e[3]=c):c=e[3];let n;e[4]!==l.excerpt?(n=G(l.excerpt),e[4]=l.excerpt,e[5]=n):n=e[5];let p;e[6]!==t?(p=P=>t("excerpt",P.target.value),e[6]=t,e[7]=p):p=e[7];let o;e[8]!==n||e[9]!==p?(o=s.jsx(ge,{id:"post-excerpt",value:n,onChange:p,rows:2}),e[8]=n,e[9]=p,e[10]=o):o=e[10];let f;e[11]!==c||e[12]!==o?(f=s.jsxs("div",{className:"space-y-2",children:[c,o]}),e[11]=c,e[12]=o,e[13]=f):f=e[13];let d;e[14]!==i?(d=i("sandbox.postEditor.slugLabel"),e[14]=i,e[15]=d):d=e[15];let j;e[16]!==d?(j=s.jsx(ee,{htmlFor:"post-slug",children:d}),e[16]=d,e[17]=j):j=e[17];let u;e[18]!==l.slug?(u=G(l.slug),e[18]=l.slug,e[19]=u):u=e[19];let h;e[20]!==t?(h=P=>t("slug",P.target.value),e[20]=t,e[21]=h):h=e[21];let g;e[22]!==i?(g=i("sandbox.postEditor.slugPlaceholder"),e[22]=i,e[23]=g):g=e[23];let x;e[24]!==h||e[25]!==g||e[26]!==u?(x=s.jsx(pe,{id:"post-slug",value:u,onChange:h,placeholder:g,className:"h-10"}),e[24]=h,e[25]=g,e[26]=u,e[27]=x):x=e[27];let r;e[28]!==x||e[29]!==j?(r=s.jsxs("div",{className:"space-y-2",children:[j,x]}),e[28]=x,e[29]=j,e[30]=r):r=e[30];let C;e[31]!==i?(C=i("sandbox.postEditor.dateLabel"),e[31]=i,e[32]=C):C=e[32];let N;e[33]!==C?(N={type:"string",format:"date",title:C},e[33]=C,e[34]=N):N=e[34];let v;e[35]!==l.date?(v=G(l.date),e[35]=l.date,e[36]=v):v=e[36];let D;e[37]!==t?(D=P=>t("date",P),e[37]=t,e[38]=D):D=e[38];let k;e[39]!==i?(k=i("sandbox.postEditor.dateLabel"),e[39]=i,e[40]=k):k=e[40];let b;e[41]!==N||e[42]!==v||e[43]!==D||e[44]!==k?(b=s.jsx(ue,{schema:N,value:v,onChange:D,path:"post-date",label:k}),e[41]=N,e[42]=v,e[43]=D,e[44]=k,e[45]=b):b=e[45];let E;e[46]!==r||e[47]!==b?(E=s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r,b]}),e[46]=r,e[47]=b,e[48]=E):E=e[48];let U;e[49]!==i?(U=i("sandbox.postEditor.coverImageLabel"),e[49]=i,e[50]=U):U=e[50];let L;e[51]!==U?(L={type:"string",format:"image-uri",title:U},e[51]=U,e[52]=L):L=e[52];const Q=l.image;let T;e[53]!==t?(T=P=>t("image",P),e[53]=t,e[54]=T):T=e[54];let S;e[55]!==i?(S=i("sandbox.postEditor.coverImageLabel"),e[55]=i,e[56]=S):S=e[56];let F;e[57]!==l.image||e[58]!==L||e[59]!==T||e[60]!==S?(F=s.jsx(be,{schema:L,value:Q,onChange:T,path:"post-image",label:S}),e[57]=l.image,e[58]=L,e[59]=T,e[60]=S,e[61]=F):F=e[61];let J;e[62]!==i?(J=i("sandbox.postEditor.coverAltLabel"),e[62]=i,e[63]=J):J=e[63];let w;e[64]!==i?(w=i("sandbox.postEditor.coverAltDescription"),e[64]=i,e[65]=w):w=e[65];let B;e[66]!==J||e[67]!==w?(B={type:"string",title:J,description:w},e[66]=J,e[67]=w,e[68]=B):B=e[68];let Y;e[69]!==l.alt?(Y=G(l.alt),e[69]=l.alt,e[70]=Y):Y=e[70];let A;e[71]!==t?(A=P=>t("alt",P),e[71]=t,e[72]=A):A=e[72];let I;e[73]!==i?(I=i("sandbox.postEditor.coverAltLabel"),e[73]=i,e[74]=I):I=e[74];let R;e[75]!==B||e[76]!==Y||e[77]!==A||e[78]!==I?(R=s.jsx(ue,{schema:B,value:Y,onChange:A,path:"post-alt",label:I}),e[75]=B,e[76]=Y,e[77]=A,e[78]=I,e[79]=R):R=e[79];let _;e[80]!==F||e[81]!==R?(_=s.jsxs("div",{className:"space-y-2",children:[F,R]}),e[80]=F,e[81]=R,e[82]=_):_=e[82];let $;e[83]!==i?($=i("sandbox.postEditor.authorsLabel"),e[83]=i,e[84]=$):$=e[84];let K;e[85]!==t?(K=P=>t("authors",P),e[85]=t,e[86]=K):K=e[86];let M;e[87]!==m||e[88]!==l.authors||e[89]!==$||e[90]!==K?(M=s.jsx(he,{label:$,decofile:m,kind:"authors",valueField:"email",toRef:Ge,selected:l.authors,onChange:K}),e[87]=m,e[88]=l.authors,e[89]=$,e[90]=K,e[91]=M):M=e[91];let V;e[92]!==i?(V=i("sandbox.postEditor.categoriesLabel"),e[92]=i,e[93]=V):V=e[93];let z;e[94]!==t?(z=P=>t("categories",P),e[94]=t,e[95]=z):z=e[95];let q;e[96]!==m||e[97]!==l.categories||e[98]!==V||e[99]!==z?(q=s.jsx(he,{label:V,decofile:m,kind:"categories",valueField:"slug",toRef:Ze,selected:l.categories,onChange:z}),e[96]=m,e[97]=l.categories,e[98]=V,e[99]=z,e[100]=q):q=e[100];let y;e[101]!==t?(y=P=>t("extraProps",P),e[101]=t,e[102]=y):y=e[102];let W;e[103]!==l.extraProps||e[104]!==y?(W=s.jsx(Qe,{value:l.extraProps,onChange:y}),e[103]=l.extraProps,e[104]=y,e[105]=W):W=e[105];let X;e[106]!==t?(X=P=>t("seo",P),e[106]=t,e[107]=X):X=e[107];let Z;e[108]!==l.seo||e[109]!==X?(Z=s.jsx(Oe,{value:l.seo,onChange:X}),e[108]=l.seo,e[109]=X,e[110]=Z):Z=e[110];let O;return e[111]!==E||e[112]!==_||e[113]!==M||e[114]!==q||e[115]!==W||e[116]!==Z||e[117]!==f?(O=s.jsxs("div",{className:"space-y-5",children:[f,E,_,M,q,W,Z]}),e[111]=E,e[112]=_,e[113]=M,e[114]=q,e[115]=W,e[116]=Z,e[117]=f,e[118]=O):O=e[118],O}function Ze(H){return{name:G(H.name),slug:G(H.slug)}}function Ge(H){return{...H}}function Oe(H){const e=me.c(93),{value:l,onChange:m}=H,t=de();let i;e[0]!==l?(i=l&&typeof l=="object"&&!Array.isArray(l)?l:{},e[0]=l,e[1]=i):i=e[1];const a=i;let c;e[2]!==m||e[3]!==a?(c=(y,W)=>m({...a,[y]:W}),e[2]=m,e[3]=a,e[4]=c):c=e[4];const n=c;let p;e[5]!==t?(p=t("sandbox.postEditor.seoSectionLabel"),e[5]=t,e[6]=p):p=e[6];let o;e[7]!==p?(o=s.jsx("p",{className:"text-sm font-medium",children:p}),e[7]=p,e[8]=o):o=e[8];let f;e[9]!==t?(f=t("sandbox.postEditor.seoSectionHint"),e[9]=t,e[10]=f):f=e[10];let d;e[11]!==f?(d=s.jsx("p",{className:"text-xs text-muted-foreground",children:f}),e[11]=f,e[12]=d):d=e[12];let j;e[13]!==o||e[14]!==d?(j=s.jsxs("div",{className:"space-y-1",children:[o,d]}),e[13]=o,e[14]=d,e[15]=j):j=e[15];let u;e[16]!==t?(u=t("sandbox.postEditor.seoTitleLabel"),e[16]=t,e[17]=u):u=e[17];let h;e[18]!==u?(h=s.jsx(ee,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=h):h=e[19];let g;e[20]!==a.title?(g=G(a.title),e[20]=a.title,e[21]=g):g=e[21];let x;e[22]!==n?(x=y=>n("title",y.target.value),e[22]=n,e[23]=x):x=e[23];let r;e[24]!==g||e[25]!==x?(r=s.jsx(pe,{id:"post-seo-title",value:g,onChange:x,className:"h-10"}),e[24]=g,e[25]=x,e[26]=r):r=e[26];let C;e[27]!==r||e[28]!==h?(C=s.jsxs("div",{className:"space-y-2",children:[h,r]}),e[27]=r,e[28]=h,e[29]=C):C=e[29];let N;e[30]!==t?(N=t("sandbox.postEditor.seoDescriptionLabel"),e[30]=t,e[31]=N):N=e[31];let v;e[32]!==N?(v=s.jsx(ee,{htmlFor:"post-seo-description",children:N}),e[32]=N,e[33]=v):v=e[33];let D;e[34]!==a.description?(D=G(a.description),e[34]=a.description,e[35]=D):D=e[35];let k;e[36]!==n?(k=y=>n("description",y.target.value),e[36]=n,e[37]=k):k=e[37];let b;e[38]!==D||e[39]!==k?(b=s.jsx(ge,{id:"post-seo-description",value:D,onChange:k,rows:2}),e[38]=D,e[39]=k,e[40]=b):b=e[40];let E;e[41]!==v||e[42]!==b?(E=s.jsxs("div",{className:"space-y-2",children:[v,b]}),e[41]=v,e[42]=b,e[43]=E):E=e[43];let U;e[44]!==t?(U=t("sandbox.postEditor.seoImageLabel"),e[44]=t,e[45]=U):U=e[45];let L;e[46]!==U?(L={type:"string",format:"image-uri",title:U},e[46]=U,e[47]=L):L=e[47];const Q=a.image;let T;e[48]!==n?(T=y=>n("image",y),e[48]=n,e[49]=T):T=e[49];let S;e[50]!==t?(S=t("sandbox.postEditor.seoImageLabel"),e[50]=t,e[51]=S):S=e[51];let F;e[52]!==a.image||e[53]!==L||e[54]!==T||e[55]!==S?(F=s.jsx(be,{schema:L,value:Q,onChange:T,path:"post-seo-image",label:S}),e[52]=a.image,e[53]=L,e[54]=T,e[55]=S,e[56]=F):F=e[56];let J;e[57]!==t?(J=t("sandbox.postEditor.seoCanonicalLabel"),e[57]=t,e[58]=J):J=e[58];let w;e[59]!==J?(w=s.jsx(ee,{htmlFor:"post-seo-canonical",children:J}),e[59]=J,e[60]=w):w=e[60];let B;e[61]!==a.canonical?(B=G(a.canonical),e[61]=a.canonical,e[62]=B):B=e[62];let Y;e[63]!==n?(Y=y=>n("canonical",y.target.value),e[63]=n,e[64]=Y):Y=e[64];let A;e[65]!==t?(A=t("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=t,e[66]=A):A=e[66];let I;e[67]!==B||e[68]!==Y||e[69]!==A?(I=s.jsx(pe,{id:"post-seo-canonical",value:B,onChange:Y,placeholder:A,className:"h-10"}),e[67]=B,e[68]=Y,e[69]=A,e[70]=I):I=e[70];let R;e[71]!==w||e[72]!==I?(R=s.jsxs("div",{className:"space-y-2",children:[w,I]}),e[71]=w,e[72]=I,e[73]=R):R=e[73];let _;e[74]!==t?(_=t("sandbox.postEditor.seoNoIndexingLabel"),e[74]=t,e[75]=_):_=e[75];let $;e[76]!==_?($=s.jsx(ee,{htmlFor:"post-seo-no-indexing",children:_}),e[76]=_,e[77]=$):$=e[77];const K=a.noIndexing===!0;let M;e[78]!==n?(M=y=>n("noIndexing",y),e[78]=n,e[79]=M):M=e[79];let V;e[80]!==K||e[81]!==M?(V=s.jsx(Te,{id:"post-seo-no-indexing",checked:K,onCheckedChange:M}),e[80]=K,e[81]=M,e[82]=V):V=e[82];let z;e[83]!==$||e[84]!==V?(z=s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[$,V]}),e[83]=$,e[84]=V,e[85]=z):z=e[85];let q;return e[86]!==C||e[87]!==E||e[88]!==F||e[89]!==R||e[90]!==z||e[91]!==j?(q=s.jsxs("div",{className:"space-y-5 border-t pt-5",children:[j,C,E,F,R,z]}),e[86]=C,e[87]=E,e[88]=F,e[89]=R,e[90]=z,e[91]=j,e[92]=q):q=e[92],q}function Qe(H){const e=me.c(24),{value:l,onChange:m}=H,t=de();let i,a,c,n;if(e[0]!==m||e[1]!==t||e[2]!==l){i=We(l);const j=(h,g)=>m(i.map((x,r)=>r===h?{...x,...g}:x));a="space-y-2";let u;e[7]!==t?(u=t("sandbox.postEditor.extraPropsLabel"),e[7]=t,e[8]=u):u=e[8],e[9]!==u?(c=s.jsx(ee,{children:u}),e[9]=u,e[10]=c):c=e[10],n=i.length>0&&s.jsx("ul",{className:"space-y-2",children:i.map((h,g)=>s.jsxs("li",{className:"group/item flex items-center gap-2",children:[s.jsx(pe,{value:h.key,onChange:x=>j(g,{key:x.target.value}),placeholder:t("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),s.jsx(pe,{value:h.value,onChange:x=>j(g,{value:x.target.value}),placeholder:t("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),s.jsx(Je,{label:t("sandbox.postEditor.removePropLabel"),onClick:()=>m(i.filter((x,r)=>r!==g))})]},g))}),e[0]=m,e[1]=t,e[2]=l,e[3]=i,e[4]=a,e[5]=c,e[6]=n}else i=e[3],a=e[4],c=e[5],n=e[6];let p;e[11]!==t?(p=t("sandbox.postEditor.addPropLabel"),e[11]=t,e[12]=p):p=e[12];let o;e[13]!==i||e[14]!==m?(o=()=>m([...i,{key:"",value:""}]),e[13]=i,e[14]=m,e[15]=o):o=e[15];let f;e[16]!==p||e[17]!==o?(f=s.jsx(Ke,{label:p,onClick:o}),e[16]=p,e[17]=o,e[18]=f):f=e[18];let d;return e[19]!==a||e[20]!==c||e[21]!==n||e[22]!==f?(d=s.jsxs("div",{className:a,children:[c,n,f]}),e[19]=a,e[20]=c,e[21]=n,e[22]=f,e[23]=d):d=e[23],d}function he(H){const e=me.c(24),{label:l,decofile:m,kind:t,valueField:i,toRef:a,selected:c,onChange:n}=H,p=de();let o;e[0]!==m||e[1]!==t||e[2]!==c||e[3]!==a||e[4]!==i?(o=_e({records:$e(m,t),selected:c,valueField:i,toRef:a}),e[0]=m,e[1]=t,e[2]=c,e[3]=a,e[4]=i,e[5]=o):o=e[5];const{options:f,selectedValues:d,refsForValues:j}=o;let u;e[6]!==t||e[7]!==p?(u=p(t==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=t,e[7]=p,e[8]=u):u=e[8];const h=u;let g;e[9]!==t||e[10]!==p?(g=p(t==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=t,e[10]=p,e[11]=g):g=e[11];const x=g;let r;e[12]!==l?(r=s.jsx(ee,{children:l}),e[12]=l,e[13]=r):r=e[13];let C;e[14]!==h||e[15]!==n||e[16]!==f||e[17]!==j||e[18]!==x||e[19]!==d?(C=f.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:h}):s.jsx(Ne,{options:f,defaultValue:d,onValueChange:v=>n(j(v)),placeholder:x,maxCount:4}),e[14]=h,e[15]=n,e[16]=f,e[17]=j,e[18]=x,e[19]=d,e[20]=C):C=e[20];let N;return e[21]!==r||e[22]!==C?(N=s.jsxs("div",{className:"space-y-2",children:[r,C]}),e[21]=r,e[22]=C,e[23]=N):N=e[23],N}export{Qi as PostEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as U,b as B,j as l,r as L,E as X,F as K,a as Z,B as ee,k as te}from"./index-CacyxM-B.js";import{a as oe,g as q,s as F}from"./automation-runs-D-R-Y_E3.js";import{W as ie,S as re,u as z,v as se}from"./use-mcp-client-DRcy9vk6.js";import{b as ne,c as le}from"./use-mcp-tools-CMpvouUr.js";import{u as me}from"./index-COAHvcVh.js";import{c as ce}from"./monaco-editor-q7NTyRwe.js";import{g as ae,M as pe,a as Y}from"./types-D40WAxQO.js";import{a as de,u as fe}from"./chat-context-D20WJCxs.js";import{u as ue}from"./shell-layout-VRjP3s0M.js";import{O as ge}from"./tab-id-ZL6F14qy.js";import{c as xe,e as he,s as Ce,f as je,P as Se,g as Ie,h as be}from"./self-tool-result-DaPbHreD.js";import{b as G,a as W,d as J,e as Q}from"./dialog-Ww_zj2g-.js";import{I as ve}from"./integration-icon-CLbqw16t.js";import"./select-CwAouusu.js";import"./tooltip-CwIq9zTG.js";import"./Check-CSFy6eOj.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronUp-CT1Rb5MC.js";import"./agent-icon-BDevt-8Z.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowLeft-D3IfTAWC.js";import"./Tool02-DtJ6WkGT.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./ChevronRight-H-_IIqWd.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LayoutLeft-BF7bmTAo.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./Plus-m61KPSTg.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./X-VMfnK-j5.js";import"./Zap-BrJ2b2V7.js";import"./useInfiniteQuery-BxSgA-RD.js";import"./use-infinite-scroll-ChfJMk5S.js";import"./use-connection-BS7_Pbag.js";import"./use-virtual-mcp-zFcH9fRu.js";import"./card-CG7VHdDz.js";import"./sidebar-BDv_n64F.js";import"./use-mobile-c0ak1uw4.js";import"./table-Dc0W0B0Q.js";import"./empty-state-BJ2gnfVT.js";import"./use-members-CYQAJOqU.js";import"./use-org-auth-client-Bjx13kGF.js";import"./use-clock-tick-Dht-z9YX.js";import"./use-automations-DQVxqjfN.js";import"./studio-tools-O0czolAT.js";import"./useSuspenseInfiniteQuery-CNPxNyM-.js";import"./avatar-C448hZt-.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D87eemcY.js";import"./hooks-D72xT78n.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-navigate-to-agent-IPGb4TnC.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-DoynaU7M.js";import"./index-CVShUKw1.js";import"./form-BhElkTfE.js";import"./label-CCAJCJOj.js";import"./input-B8ln-0Wl.js";import"./spinner-D7fl_vK2.js";import"./file-type-icon-B5W8k3cc.js";import"./auth-Dk3-oFE7.js";import"./drawer-lF-HaYn9.js";import"./collection-search-DGOZ00E9.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-BerlyCPW.js";import"./toggle-group-BFyHFJ9G.js";import"./use-commerce-diagnostic-B_wc4KWh.js";import"./popover-5hCe1k-b.js";import"./toolbar-ClzusW5n.js";import"./skeleton-DOg01VWn.js";import"./github-repo-picker-CcDCsGzG.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-BER9PD2I.js";import"./use-registry-connections-GX-tovow.js";import"./use-organization-settings-DJYuvv-k.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CD_pYqo3.js";import"./connection-form-helpers-ZW-hGCeS.js";import"./collection-tabs-DaZaBm6K.js";import"./badge-Bc-IWDm5.js";import"./use-ai-providers-DF6xoNtC.js";import"./command-D63NDRD_.js";import"./index-CSqLyX3L.js";import"./alert-dialog-DRGp9yFR.js";import"./use-open-billing-url-nNkK2kBm.js";import"./select-model-eoIBQakm.js";import"./checkbox-BsGrD1YR.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cz2znp8W.js";import"./use-is-desktop-app-BNujXJc_.js";import"./cards-DY46VRdr.js";import"./dropdown-menu-ByKxU4Y4.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-e0Pidqxv.js";import"./use-decopilot-events-BIUvCjFX.js";import"./use-capability-D8TgIows.js";import"./use-file-configs-EhMCIyTI.js";import"./pt-BR-CLy76QW2.js";import"./switch-B0vh0spM.js";import"./use-debounced-autosave-fueOpbqS.js";import"./index-GDSYOTBM.js";import"./search-input-ByYoJKBQ.js";import"./index-DGV2vBko.js";import"./use-secrets-6DO3yZ-p.js";import"./AreaChart-BEoF41lY.js";import"./use-tags-tOpGCqE_.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-BIOSCgKN.js";import"./use-org-repo-syncs-CEYhU3FE.js";import"./required-auth-layout-C0mQQwr6.js";import"./use-org-sso-BUVIJh4V.js";import"./track-Bufvtvpy.js";const Ne="studio://navigate",De=new Set(["vtex","ga4","gsc","github"]);function Me(b){const[e]=b;if(b.length!==1||e?.type!=="resource_link"||!e.uri.startsWith(Ne))return{isNavigate:!1};let o=null,i=null;try{const r=new URL(e.uri).searchParams;o=r.get("main"),i=r.get("field")}catch{}return{isNavigate:!0,tab:o&&ge.has(o)?o:null,field:i&&De.has(i)?i:null}}function $(b){const e=U.c(12),{onClose:o,children:i}=b,r=B();let t;e[0]!==o?(t=f=>!f&&o(),e[0]=o,e[1]=t):t=e[1];let c;e[2]!==r?(c=r("commerceOnboarding.connectSourceDialog.title"),e[2]=r,e[3]=c):c=e[3];let m;e[4]!==c?(m=l.jsx(W,{children:l.jsx(G,{children:c})}),e[4]=c,e[5]=m):m=e[5];let d;e[6]!==i||e[7]!==m?(d=l.jsxs(J,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[m,i]}),e[6]=i,e[7]=m,e[8]=d):d=e[8];let n;return e[9]!==t||e[10]!==d?(n=l.jsx(Q,{open:!0,onOpenChange:t,children:d}),e[9]=t,e[10]=d,e[11]=n):n=e[11],n}function H(b){const e=U.c(3),{label:o}=b;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(te,{size:16,className:"animate-spin"}),e[0]=i):i=e[0];let r;return e[1]!==o?(r=l.jsxs("div",{className:"flex items-center gap-2 py-2 text-sm text-muted-foreground",children:[i,l.jsx("span",{children:o})]}),e[1]=o,e[2]=r):r=e[2],r}function _e(b){const e=U.c(19),{field:o,onClose:i}=b,r=B();let t;e[0]!==i||e[1]!==r?(t=()=>l.jsx($,{onClose:i,children:l.jsx("p",{className:"text-sm text-muted-foreground",children:r("routes.commerceOnboarding.connectModal.loadError")})}),e[0]=i,e[1]=r,e[2]=t):t=e[2];let c;e[3]!==r?(c=r("commerceOnboarding.connectSourceDialog.loading"),e[3]=r,e[4]=c):c=e[4];let m;e[5]!==c?(m=l.jsx(H,{label:c}),e[5]=c,e[6]=m):m=e[6];let d;e[7]!==i||e[8]!==m?(d=l.jsx($,{onClose:i,children:m}),e[7]=i,e[8]=m,e[9]=d):d=e[9];let n;e[10]!==o||e[11]!==i?(n=l.jsx(ye,{field:o,onClose:i}),e[10]=o,e[11]=i,e[12]=n):n=e[12];let f;e[13]!==d||e[14]!==n?(f=l.jsx(L.Suspense,{fallback:d,children:n}),e[13]=d,e[14]=n,e[15]=f):f=e[15];let g;return e[16]!==t||e[17]!==f?(g=l.jsx(X,{fallback:t,children:f}),e[16]=t,e[17]=f,e[18]=g):g=e[18],g}function ye(b){const e=U.c(75),{field:o,onClose:i}=b,r=B(),{org:t}=K();let c;e[0]!==t.id?(c=ie.COMMERCE_DISCOVERY(t.id),e[0]=t.id,e[1]=c):c=e[1];const m=c;let d;e[2]!==t.id||e[3]!==t.slug?(d={connectionId:re,orgId:t.id,orgSlug:t.slug},e[2]=t.id,e[3]=t.slug,e[4]=d):d=e[4];const n=z(d),{data:f}=Z.useSession(),g=f?.user?.id??"";let h;e[5]!==m||e[6]!==t||e[7]!==n?(h={selfClient:n,org:t,cdConnectionId:m},e[5]=m,e[6]=t,e[7]=n,e[8]=h):h=e[8];const s=xe(h);let S;e[9]!==m||e[10]!==t||e[11]!==n||e[12]!==s?(S={selfClient:n,org:t,cdConnectionId:m,siteUrl:s},e[9]=m,e[10]=t,e[11]=n,e[12]=s,e[13]=S):S=e[13];const{cards:C}=he(S);let I;e[14]!==s?(I=Ce(s)??void 0,e[14]=s,e[15]=I):I=e[15];let v;e[16]!==m||e[17]!==t||e[18]!==n||e[19]!==s||e[20]!==I||e[21]!==g?(v={selfClient:n,org:t,userId:g,cdConnectionId:m,domain:I,siteUrl:s},e[16]=m,e[17]=t,e[18]=n,e[19]=s,e[20]=I,e[21]=g,e[22]=v):v=e[22];const{connect:x,connectingFieldKey:O,error:T}=je(v);let M;if(e[23]!==C||e[24]!==o){let a;e[26]!==o?(a=p=>p.fieldKey===o,e[26]=o,e[27]=a):a=e[27],M=C.find(a),e[23]=C,e[24]=o,e[25]=M}else M=e[25];const u=M;if(!u){let a;e[28]!==r?(a=r("routes.commerceOnboarding.connectModal.loadError"),e[28]=r,e[29]=a):a=e[29];let p;e[30]!==a?(p=l.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[30]=a,e[31]=p):p=e[31];let j;return e[32]!==i||e[33]!==p?(j=l.jsx($,{onClose:i,children:p}),e[32]=i,e[33]=p,e[34]=j):j=e[34],j}const _=Se[u.bindingType];if(_&&u.boundVia!=="oauth"){let a;e[35]!==i?(a=N=>!N&&i(),e[35]=i,e[36]=a):a=e[36];let p;e[37]!==u||e[38]!==x?(p=u.satisfied?void 0:()=>{x(u)},e[37]=u,e[38]=x,e[39]=p):p=e[39];let j;return e[40]!==u||e[41]!==t||e[42]!==_||e[43]!==n||e[44]!==s||e[45]!==a||e[46]!==p?(j=l.jsx(be,{card:u,provider:_,org:t,selfClient:n,siteUrl:s,open:!0,onOpenChange:a,onOAuthInstead:p}),e[40]=u,e[41]=t,e[42]=_,e[43]=n,e[44]=s,e[45]=a,e[46]=p,e[47]=j):j=e[47],j}if(u.satisfied&&u.linkedConnectionId){let a;e[48]!==r?(a=r("commerceOnboarding.connectSourceDialog.loading"),e[48]=r,e[49]=a):a=e[49];let p;e[50]!==a?(p=l.jsx(H,{label:a}),e[50]=a,e[51]=p):p=e[51];let j;e[52]!==i||e[53]!==p?(j=l.jsx($,{onClose:i,children:p}),e[52]=i,e[53]=p,e[54]=j):j=e[54];let N;e[55]!==i?(N=w=>!w&&i(),e[55]=i,e[56]=N):N=e[56];let D;e[57]!==u||e[58]!==t||e[59]!==n||e[60]!==s||e[61]!==N?(D=l.jsx(Ie,{card:u,org:t,selfClient:n,connectionId:u.linkedConnectionId,contextSiteUrl:s,open:!0,onOpenChange:N}),e[57]=u,e[58]=t,e[59]=n,e[60]=s,e[61]=N,e[62]=D):D=e[62];let y;return e[63]!==j||e[64]!==D?(y=l.jsx(L.Suspense,{fallback:j,children:D}),e[63]=j,e[64]=D,e[65]=y):y=e[65],y}const R=O===u.fieldKey;let E;e[66]!==u||e[67]!==x?(E=()=>{x(u)},e[66]=u,e[67]=x,e[68]=E):E=e[68];let P;return e[69]!==u||e[70]!==T||e[71]!==i||e[72]!==R||e[73]!==E?(P=l.jsx(Oe,{card:u,connecting:R,error:T,onConnect:E,onClose:i}),e[69]=u,e[70]=T,e[71]=i,e[72]=R,e[73]=E,e[74]=P):P=e[74],P}function Oe(b){const e=U.c(22),{card:o,connecting:i,error:r,onConnect:t,onClose:c}=b,m=B(),[d,n]=L.useState(!1);d||(n(!0),queueMicrotask(t));let f;e[0]!==i||e[1]!==c?(f=v=>{!v&&i||v||c()},e[0]=i,e[1]=c,e[2]=f):f=e[2];let g;e[3]!==o.icon||e[4]!==o.title?(g=l.jsx(ve,{icon:o.icon,name:o.title,size:"sm",fit:"contain",className:"p-1"}),e[3]=o.icon,e[4]=o.title,e[5]=g):g=e[5];let h;e[6]!==o.title?(h=l.jsx(G,{className:"min-w-0 flex-1",children:o.title}),e[6]=o.title,e[7]=h):h=e[7];let s;e[8]!==g||e[9]!==h?(s=l.jsxs(W,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[g,h]}),e[8]=g,e[9]=h,e[10]=s):s=e[10];let S;e[11]!==o.title||e[12]!==r||e[13]!==t||e[14]!==m?(S=r?l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r}),l.jsx(ee,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:t,children:m("routes.commerceOnboarding.companionSection.retry")})]}):l.jsx(H,{label:m("commerceOnboarding.connectSourceDialog.connecting",{title:o.title})}),e[11]=o.title,e[12]=r,e[13]=t,e[14]=m,e[15]=S):S=e[15];let C;e[16]!==s||e[17]!==S?(C=l.jsxs(J,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[s,S]}),e[16]=s,e[17]=S,e[18]=C):C=e[18];let I;return e[19]!==f||e[20]!==C?(I=l.jsx(Q,{open:!0,onOpenChange:f,children:C}),e[19]=f,e[20]=C,e[21]=I):I=e[21],I}const Ee={};function Pe(b){const e=U.c(43),{client:o,resourceURI:i,tool:r,connectionId:t,orgId:c,args:m}=b,{sendMessage:d}=de(),{setAppContext:n,clearAppContext:f}=fe(),{openSidePanel:g,openTab:h}=ue(),s=`${t}:${r.name}`,[S,C]=L.useState(null);let I;e[0]!==h?(I=A=>A==="inline"?(h("0"),"inline"):"fullscreen",e[0]=h,e[1]=I):I=e[1];const v=I,x=m??Ee;let O;e[2]!==o||e[3]!==r.name||e[4]!==x?(O={client:o,toolName:r.name,toolArguments:x},e[2]=o,e[3]=r.name,e[4]=x,e[5]=O):O=e[5];const{data:T}=le(O);let M;if(e[6]!==r._meta||e[7]!==r.name){const A=q(r._meta);M=F(r.name,A),e[6]=r._meta,e[7]=r.name,e[8]=M}else M=e[8];const u=M;let _;e[9]!==r.inputSchema?(_=r.inputSchema??{type:"object"},e[9]=r.inputSchema,e[10]=_):_=e[10];let R;e[11]!==u||e[12]!==_||e[13]!==r?(R={...r,name:u,inputSchema:_},e[11]=u,e[12]=_,e[13]=r,e[14]=R):R=e[14];const E=R;let P;e[15]!==g||e[16]!==h||e[17]!==d?(P=A=>{const k=Me(A.content);if(k.isNavigate){k.tab==="connect-sources"&&k.field?C(k.field):k.tab&&h(k.tab);return}const V=ce(A.content);V.content.length>0&&(g("chat"),d({tiptapDoc:V}))},e[15]=g,e[16]=h,e[17]=d,e[18]=P):P=e[18];const a=P;let p;e[19]!==E?(p={tool:E},e[19]=E,e[20]=p):p=e[20];let j;e[21]!==n||e[22]!==s?(j=A=>n(s,A),e[21]=n,e[22]=s,e[23]=j):j=e[23];let N;e[24]!==f||e[25]!==s?(N=()=>f(s),e[24]=f,e[25]=s,e[26]=N):N=e[26];let D;e[27]!==o||e[28]!==a||e[29]!==v||e[30]!==c||e[31]!==i||e[32]!==p||e[33]!==j||e[34]!==N||e[35]!==x||e[36]!==T?(D=l.jsx(pe,{resourceURI:i,orgId:c,toolInfo:p,toolInput:x,toolResult:T,displayMode:"fullscreen",minHeight:Y.fullscreen.minHeight,maxHeight:Y.fullscreen.maxHeight,client:o,onMessage:a,onUpdateModelContext:j,onTeardown:N,onRequestDisplayMode:v,className:"h-full"}),e[27]=o,e[28]=a,e[29]=v,e[30]=c,e[31]=i,e[32]=p,e[33]=j,e[34]=N,e[35]=x,e[36]=T,e[37]=D):D=e[37];let y;e[38]!==S?(y=S&&l.jsx(_e,{field:S,onClose:()=>C(null)}),e[38]=S,e[39]=y):y=e[39];let w;return e[40]!==D||e[41]!==y?(w=l.jsxs(l.Fragment,{children:[D,y]}),e[40]=D,e[41]=y,e[42]=w):w=e[42],w}function yi(b){const e=U.c(24),{connectionId:o,toolName:i,args:r}=b,{org:t}=K(),c=me();let m;e[0]!==o||e[1]!==c?(m=se(o)&&c.vmEntry?.sandboxProviderKind==="user-desktop"&&c.previewUrl?`${c.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,e[0]=o,e[1]=c,e[2]=m):m=e[2];const d=m;let n;e[3]!==o||e[4]!==d||e[5]!==t.id||e[6]!==t.slug?(n={connectionId:o,orgId:t.id,orgSlug:t.slug,mcpUrl:d},e[3]=o,e[4]=d,e[5]=t.id,e[6]=t.slug,e[7]=n):n=e[7];const f=z(n);let g;e[8]!==f?(g={client:f},e[8]=f,e[9]=g):g=e[9];const{data:h}=ne(g);let s,S,C;e[10]!==i||e[11]!==h.tools?(s=oe(decodeURIComponent(i)),C=h.tools.find(x=>x.name===s)??h.tools.find(x=>{const O=q(x._meta);if(!O)return!1;if(F(x.name,O)===s)return!0;const M=F(s,O);return M!==s&&x.name===M}),S=C?._meta?ae(C._meta):void 0,e[10]=i,e[11]=h.tools,e[12]=s,e[13]=S,e[14]=C):(s=e[12],S=e[13],C=e[14]);const I=S;if(!C||!I){let x;return e[15]!==s?(x=l.jsx("div",{className:"flex items-center justify-center h-full w-full",children:l.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',s,'" not found or has no UI']})}),e[15]=s,e[16]=x):x=e[16],x}let v;return e[17]!==r||e[18]!==f||e[19]!==o||e[20]!==t.id||e[21]!==I||e[22]!==C?(v=l.jsx(Pe,{client:f,resourceURI:I,tool:C,connectionId:o,orgId:t.id,args:r}),e[17]=r,e[18]=f,e[19]=o,e[20]=t.id,e[21]=I,e[22]=C,e[23]=v):v=e[23],v}export{yi as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,b as L,j as r}from"./index-CacyxM-B.js";import{I as A}from"./input-B8ln-0Wl.js";import{L as P}from"./label-CCAJCJOj.js";import{S as R,a as V,b as z,c as J,d as O}from"./select-CwAouusu.js";import{T as D}from"./textarea-CD_pYqo3.js";import{F as M,T as _,J as $,V as q,_ as G}from"./index-COAHvcVh.js";import{s as F}from"./primitives-BcUA5QnY.js";import{u as H}from"./use-autosave-BvdFNf3e.js";import"./tooltip-CwIq9zTG.js";import"./Check-CSFy6eOj.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronUp-CT1Rb5MC.js";import"./ArrowUp-D1Whwq-K.js";import"./chat-context-D20WJCxs.js";import"./tab-id-ZL6F14qy.js";import"./dialog-Ww_zj2g-.js";import"./X-VMfnK-j5.js";import"./Copy01-CzEeXGsa.js";import"./Download01-BPvwRxeD.js";import"./hooks-D72xT78n.js";import"./use-mcp-client-DRcy9vk6.js";import"./auth-Dk3-oFE7.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-zFcH9fRu.js";import"./use-ai-providers-DF6xoNtC.js";import"./studio-tools-O0czolAT.js";import"./use-decopilot-events-BIUvCjFX.js";import"./use-organization-settings-DJYuvv-k.js";import"./automation-runs-D-R-Y_E3.js";import"./agent-icon-BDevt-8Z.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowLeft-D3IfTAWC.js";import"./Tool02-DtJ6WkGT.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./ChevronRight-H-_IIqWd.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./CreditCard01-DTIKWUon.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LayoutLeft-BF7bmTAo.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./Plus-m61KPSTg.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./Zap-BrJ2b2V7.js";import"./useInfiniteQuery-BxSgA-RD.js";import"./use-infinite-scroll-ChfJMk5S.js";import"./use-connection-BS7_Pbag.js";import"./card-CG7VHdDz.js";import"./sidebar-BDv_n64F.js";import"./use-mobile-c0ak1uw4.js";import"./table-Dc0W0B0Q.js";import"./empty-state-BJ2gnfVT.js";import"./use-members-CYQAJOqU.js";import"./use-org-auth-client-Bjx13kGF.js";import"./use-clock-tick-Dht-z9YX.js";import"./use-automations-DQVxqjfN.js";import"./useSuspenseInfiniteQuery-CNPxNyM-.js";import"./avatar-C448hZt-.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D87eemcY.js";import"./monaco-editor-q7NTyRwe.js";import"./spinner-D7fl_vK2.js";import"./types-D40WAxQO.js";import"./shell-layout-VRjP3s0M.js";import"./required-auth-layout-C0mQQwr6.js";import"./use-org-sso-BUVIJh4V.js";import"./integration-icon-CLbqw16t.js";import"./use-navigate-to-agent-IPGb4TnC.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-DoynaU7M.js";import"./index-CVShUKw1.js";import"./form-BhElkTfE.js";import"./file-type-icon-B5W8k3cc.js";import"./drawer-lF-HaYn9.js";import"./collection-search-DGOZ00E9.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-BerlyCPW.js";import"./toggle-group-BFyHFJ9G.js";import"./use-commerce-diagnostic-B_wc4KWh.js";import"./popover-5hCe1k-b.js";import"./self-tool-result-DaPbHreD.js";import"./alert-dialog-DRGp9yFR.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./track-Bufvtvpy.js";import"./toolbar-ClzusW5n.js";import"./skeleton-DOg01VWn.js";import"./github-repo-picker-CcDCsGzG.js";import"./use-mcp-tools-CMpvouUr.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-BER9PD2I.js";import"./use-registry-connections-GX-tovow.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-ZW-hGCeS.js";import"./collection-tabs-DaZaBm6K.js";import"./badge-Bc-IWDm5.js";import"./command-D63NDRD_.js";import"./index-CSqLyX3L.js";import"./use-open-billing-url-nNkK2kBm.js";import"./select-model-eoIBQakm.js";import"./checkbox-BsGrD1YR.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cz2znp8W.js";import"./cards-DY46VRdr.js";import"./dropdown-menu-ByKxU4Y4.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-e0Pidqxv.js";import"./use-capability-D8TgIows.js";import"./use-file-configs-EhMCIyTI.js";import"./pt-BR-CLy76QW2.js";import"./switch-B0vh0spM.js";import"./use-debounced-autosave-fueOpbqS.js";import"./index-GDSYOTBM.js";import"./search-input-ByYoJKBQ.js";import"./index-DGV2vBko.js";import"./use-secrets-6DO3yZ-p.js";import"./AreaChart-BEoF41lY.js";import"./use-tags-tOpGCqE_.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-BIOSCgKN.js";import"./use-org-repo-syncs-CEYhU3FE.js";const Q={authors:[{key:"name",labelKey:"sandbox.recordEditor.fieldName",widget:"text"},{key:"type",labelKey:"sandbox.recordEditor.fieldType",widget:"select",options:[{value:"Person",labelKey:"sandbox.recordEditor.optionPerson"},{value:"Organization",labelKey:"sandbox.recordEditor.optionOrganization"}]},{key:"email",labelKey:"sandbox.recordEditor.fieldEmail",widget:"text",placeholderKey:"sandbox.recordEditor.placeholderEmail"},{key:"jobTitle",labelKey:"sandbox.recordEditor.fieldJobTitle",widget:"text"},{key:"company",labelKey:"sandbox.recordEditor.fieldCompany",widget:"text"},{key:"avatar",labelKey:"sandbox.recordEditor.fieldAvatar",widget:"image"}]},U={authors:"sandbox.recordEditor.titleAuthor"};function Qr(I){const t=B.c(39),{orgSlug:E,virtualMcpId:K,branch:w,kind:a,blockKey:b,block:f}=I,i=L();let h;t[0]!==w||t[1]!==E||t[2]!==K?(h={orgSlug:E,virtualMcpId:K,branch:w},t[0]=w,t[1]=E,t[2]=K,t[3]=h):h=t[3];const p=M(h);let g;t[4]!==f||t[5]!==a?(g=_(f,a),t[4]=f,t[5]=a,t[6]=g):g=t[6];const C=g;let k;t[7]!==b||t[8]!==a||t[9]!==p?(k=l=>{p.mutate({blockKey:b,data:q(b,a,l)})},t[7]=b,t[8]=a,t[9]=p,t[10]=k):k=t[10];const[e,S]=H(C,k);let v;t[11]!==e||t[12]!==S?(v=(l,o)=>S({...e,[l]:o}),t[11]=e,t[12]=S,t[13]=v):v=t[13];const s=v,T=U[a];let n;t[14]!==i||t[15]!==T?(n=i(T),t[14]=i,t[15]=T,t[16]=n):n=t[16];let c;t[17]!==n?(c=r.jsx("span",{className:"text-sm font-medium",children:n}),t[17]=n,t[18]=c):c=t[18];let d;t[19]!==p.isError||t[20]!==p.isPending?(d=r.jsx($,{isPending:p.isPending,isError:p.isError}),t[19]=p.isError,t[20]=p.isPending,t[21]=d):d=t[21];let y;t[22]!==c||t[23]!==d?(y=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,d]}),t[22]=c,t[23]=d,t[24]=y):y=t[24];const N=Q[a];let x;if(t[25]!==e||t[26]!==s||t[27]!==i||t[28]!==N){let l;t[30]!==e||t[31]!==s||t[32]!==i?(l=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(G,{schema:{type:"string",format:"image-uri",title:i(o.labelKey)},value:e[o.key],onChange:m=>s(o.key,m),path:o.key,label:i(o.labelKey)}):o.widget==="select"?r.jsxs(r.Fragment,{children:[r.jsx(P,{htmlFor:o.key,children:i(o.labelKey)}),r.jsxs(R,{value:F(e[o.key])||o.options?.[0]?.value,onValueChange:m=>s(o.key,m),children:[r.jsx(V,{id:o.key,className:"h-10 w-full",children:r.jsx(z,{placeholder:i(o.labelKey)})}),r.jsx(J,{children:(o.options??[]).map(m=>r.jsx(O,{value:m.value,children:i(m.labelKey)},m.value))})]})]}):r.jsxs(r.Fragment,{children:[r.jsx(P,{htmlFor:o.key,children:i(o.labelKey)}),o.widget==="textarea"?r.jsx(D,{id:o.key,value:F(e[o.key]),onChange:m=>s(o.key,m.target.value),rows:3}):r.jsx(A,{id:o.key,value:F(e[o.key]),placeholder:o.placeholderKey?i(o.placeholderKey):void 0,onChange:m=>s(o.key,m.target.value),className:"h-10"})]})},o.key),t[30]=e,t[31]=s,t[32]=i,t[33]=l):l=t[33],x=N.map(l),t[25]=e,t[26]=s,t[27]=i,t[28]=N,t[29]=x}else x=t[29];let u;t[34]!==x?(u=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:x})}),t[34]=x,t[35]=u):u=t[35];let j;return t[36]!==u||t[37]!==y?(j=r.jsxs("div",{className:"flex h-full flex-col",children:[y,u]}),t[36]=u,t[37]=y,t[38]=j):j=t[38],j}export{Qr as RecordEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as pt,b as at,j as r}from"./index-CacyxM-B.js";import{C as ct}from"./checkbox-BsGrD1YR.js";import{I as rt}from"./input-B8ln-0Wl.js";import{L as et}from"./label-CCAJCJOj.js";import{d as dt,a as nt,b as ft,c as xt,S as ht}from"./select-CwAouusu.js";import{F as ut,by as bt,J as yt,bz as jt,bA as vt}from"./index-COAHvcVh.js";import{u as gt}from"./use-autosave-BvdFNf3e.js";import"./Check-CSFy6eOj.js";import"./tooltip-CwIq9zTG.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronUp-CT1Rb5MC.js";import"./ArrowUp-D1Whwq-K.js";import"./chat-context-D20WJCxs.js";import"./tab-id-ZL6F14qy.js";import"./dialog-Ww_zj2g-.js";import"./X-VMfnK-j5.js";import"./Copy01-CzEeXGsa.js";import"./Download01-BPvwRxeD.js";import"./hooks-D72xT78n.js";import"./use-mcp-client-DRcy9vk6.js";import"./auth-Dk3-oFE7.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-zFcH9fRu.js";import"./use-ai-providers-DF6xoNtC.js";import"./studio-tools-O0czolAT.js";import"./use-decopilot-events-BIUvCjFX.js";import"./use-organization-settings-DJYuvv-k.js";import"./automation-runs-D-R-Y_E3.js";import"./agent-icon-BDevt-8Z.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowLeft-D3IfTAWC.js";import"./Tool02-DtJ6WkGT.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./ChevronRight-H-_IIqWd.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./CreditCard01-DTIKWUon.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LayoutLeft-BF7bmTAo.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./Plus-m61KPSTg.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./Zap-BrJ2b2V7.js";import"./useInfiniteQuery-BxSgA-RD.js";import"./use-infinite-scroll-ChfJMk5S.js";import"./use-connection-BS7_Pbag.js";import"./card-CG7VHdDz.js";import"./sidebar-BDv_n64F.js";import"./use-mobile-c0ak1uw4.js";import"./table-Dc0W0B0Q.js";import"./empty-state-BJ2gnfVT.js";import"./use-members-CYQAJOqU.js";import"./use-org-auth-client-Bjx13kGF.js";import"./use-clock-tick-Dht-z9YX.js";import"./use-automations-DQVxqjfN.js";import"./useSuspenseInfiniteQuery-CNPxNyM-.js";import"./avatar-C448hZt-.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D87eemcY.js";import"./monaco-editor-q7NTyRwe.js";import"./spinner-D7fl_vK2.js";import"./types-D40WAxQO.js";import"./shell-layout-VRjP3s0M.js";import"./required-auth-layout-C0mQQwr6.js";import"./use-org-sso-BUVIJh4V.js";import"./integration-icon-CLbqw16t.js";import"./use-navigate-to-agent-IPGb4TnC.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-DoynaU7M.js";import"./index-CVShUKw1.js";import"./form-BhElkTfE.js";import"./file-type-icon-B5W8k3cc.js";import"./drawer-lF-HaYn9.js";import"./collection-search-DGOZ00E9.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-BerlyCPW.js";import"./toggle-group-BFyHFJ9G.js";import"./use-commerce-diagnostic-B_wc4KWh.js";import"./popover-5hCe1k-b.js";import"./self-tool-result-DaPbHreD.js";import"./alert-dialog-DRGp9yFR.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./track-Bufvtvpy.js";import"./toolbar-ClzusW5n.js";import"./skeleton-DOg01VWn.js";import"./github-repo-picker-CcDCsGzG.js";import"./use-mcp-tools-CMpvouUr.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-BER9PD2I.js";import"./use-registry-connections-GX-tovow.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CD_pYqo3.js";import"./connection-form-helpers-ZW-hGCeS.js";import"./collection-tabs-DaZaBm6K.js";import"./badge-Bc-IWDm5.js";import"./command-D63NDRD_.js";import"./index-CSqLyX3L.js";import"./use-open-billing-url-nNkK2kBm.js";import"./select-model-eoIBQakm.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cz2znp8W.js";import"./cards-DY46VRdr.js";import"./dropdown-menu-ByKxU4Y4.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-e0Pidqxv.js";import"./use-capability-D8TgIows.js";import"./use-file-configs-EhMCIyTI.js";import"./pt-BR-CLy76QW2.js";import"./switch-B0vh0spM.js";import"./use-debounced-autosave-fueOpbqS.js";import"./index-GDSYOTBM.js";import"./search-input-ByYoJKBQ.js";import"./index-DGV2vBko.js";import"./use-secrets-6DO3yZ-p.js";import"./AreaChart-BEoF41lY.js";import"./use-tags-tOpGCqE_.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-BIOSCgKN.js";import"./use-org-repo-syncs-CEYhU3FE.js";const Et=[{value:"temporary",labelKey:"sandbox.redirectEditor.typeTemporary"},{value:"permanent",labelKey:"sandbox.redirectEditor.typePermanent"}];function ji(it){const t=pt.c(106),{orgSlug:G,virtualMcpId:H,branch:W,blockKey:X,block:Z}=it,e=at();let V;t[0]!==W||t[1]!==G||t[2]!==H?(V={orgSlug:G,virtualMcpId:H,branch:W},t[0]=W,t[1]=G,t[2]=H,t[3]=V):V=t[3];const s=ut(V);let z;t[4]!==Z?(z=bt(Z),t[4]=Z,t[5]=z):z=t[5];const ot=z;let J;t[6]!==X||t[7]!==s?(J=i=>{s.mutate({blockKey:X,data:vt(i)})},t[6]=X,t[7]=s,t[8]=J):J=t[8];const[o,tt]=gt(ot,J);let M;t[9]!==o||t[10]!==tt?(M=i=>tt({...o,...i}),t[9]=o,t[10]=tt,t[11]=M):M=t[11];const m=M;let l;t[12]!==e?(l=e("sandbox.redirectEditor.title"),t[12]=e,t[13]=l):l=t[13];let p;t[14]!==l?(p=r.jsx("span",{className:"text-sm font-medium",children:l}),t[14]=l,t[15]=p):p=t[15];let a;t[16]!==s.isError||t[17]!==s.isPending?(a=r.jsx(yt,{isPending:s.isPending,isError:s.isError}),t[16]=s.isError,t[17]=s.isPending,t[18]=a):a=t[18];let c;t[19]!==p||t[20]!==a?(c=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[p,a]}),t[19]=p,t[20]=a,t[21]=c):c=t[21];let d;t[22]!==e?(d=e("sandbox.redirectEditor.fromLabel"),t[22]=e,t[23]=d):d=t[23];let n;t[24]!==d?(n=r.jsx(et,{htmlFor:"redirect-from",children:d}),t[24]=d,t[25]=n):n=t[25];const mt=o.from;let f;t[26]!==e?(f=e("sandbox.redirectEditor.fromPlaceholder"),t[26]=e,t[27]=f):f=t[27];let x;t[28]!==m?(x=i=>m({from:i.target.value}),t[28]=m,t[29]=x):x=t[29];let h;t[30]!==o.from||t[31]!==f||t[32]!==x?(h=r.jsx(rt,{id:"redirect-from",value:mt,placeholder:f,onChange:x,className:"h-10"}),t[30]=o.from,t[31]=f,t[32]=x,t[33]=h):h=t[33];let u;t[34]!==e?(u=e("sandbox.redirectEditor.fromDescription"),t[34]=e,t[35]=u):u=t[35];let b;t[36]!==u?(b=r.jsx("p",{className:"text-xs text-muted-foreground",children:u}),t[36]=u,t[37]=b):b=t[37];let y;t[38]!==n||t[39]!==h||t[40]!==b?(y=r.jsxs("div",{className:"space-y-2",children:[n,h,b]}),t[38]=n,t[39]=h,t[40]=b,t[41]=y):y=t[41];let j;t[42]!==e?(j=e("sandbox.redirectEditor.toLabel"),t[42]=e,t[43]=j):j=t[43];let v;t[44]!==j?(v=r.jsx(et,{htmlFor:"redirect-to",children:j}),t[44]=j,t[45]=v):v=t[45];const st=o.to;let g;t[46]!==e?(g=e("sandbox.redirectEditor.toPlaceholder"),t[46]=e,t[47]=g):g=t[47];let E;t[48]!==m?(E=i=>m({to:i.target.value}),t[48]=m,t[49]=E):E=t[49];let P;t[50]!==o.to||t[51]!==g||t[52]!==E?(P=r.jsx(rt,{id:"redirect-to",value:st,placeholder:g,onChange:E,className:"h-10"}),t[50]=o.to,t[51]=g,t[52]=E,t[53]=P):P=t[53];let N;t[54]!==e?(N=e("sandbox.redirectEditor.toDescription"),t[54]=e,t[55]=N):N=t[55];let S;t[56]!==N?(S=r.jsx("p",{className:"text-xs text-muted-foreground",children:N}),t[56]=N,t[57]=S):S=t[57];let C;t[58]!==v||t[59]!==P||t[60]!==S?(C=r.jsxs("div",{className:"space-y-2",children:[v,P,S]}),t[58]=v,t[59]=P,t[60]=S,t[61]=C):C=t[61];let T;t[62]!==e?(T=e("sandbox.redirectEditor.typeLabel"),t[62]=e,t[63]=T):T=t[63];let k;t[64]!==T?(k=r.jsx(et,{htmlFor:"redirect-type",children:T}),t[64]=T,t[65]=k):k=t[65];const lt=o.type;let w;t[66]!==m?(w=i=>m({type:i}),t[66]=m,t[67]=w):w=t[67];let R;t[68]!==e?(R=e("sandbox.redirectEditor.typePlaceholder"),t[68]=e,t[69]=R):R=t[69];let I;t[70]!==R?(I=r.jsx(nt,{id:"redirect-type",className:"h-10 w-full",children:r.jsx(ft,{placeholder:R})}),t[70]=R,t[71]=I):I=t[71];let _;t[72]!==e?(_=Et.map(i=>r.jsx(dt,{value:i.value,children:e(i.labelKey,{status:jt[i.value]})},i.value)),t[72]=e,t[73]=_):_=t[73];let F;t[74]!==_?(F=r.jsx(xt,{children:_}),t[74]=_,t[75]=F):F=t[75];let L;t[76]!==o.type||t[77]!==w||t[78]!==I||t[79]!==F?(L=r.jsxs(ht,{value:lt,onValueChange:w,children:[I,F]}),t[76]=o.type,t[77]=w,t[78]=I,t[79]=F,t[80]=L):L=t[80];let Y;t[81]===Symbol.for("react.memo_cache_sentinel")?(Y=r.jsx("strong",{children:"Temporary"}),t[81]=Y):Y=t[81];let $;t[82]===Symbol.for("react.memo_cache_sentinel")?($=r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Use ",Y," when the redirect may change;"," ",r.jsx("strong",{children:"Permanent"})," lets browsers cache it."]}),t[82]=$):$=t[82];let Q;t[83]!==k||t[84]!==L?(Q=r.jsxs("div",{className:"space-y-2",children:[k,L,$]}),t[83]=k,t[84]=L,t[85]=Q):Q=t[85];let K;t[86]!==m?(K=i=>m({discardQueryParameters:i===!0}),t[86]=m,t[87]=K):K=t[87];let A;t[88]!==o.discardQueryParameters||t[89]!==K?(A=r.jsx(ct,{checked:o.discardQueryParameters,onCheckedChange:K}),t[88]=o.discardQueryParameters,t[89]=K,t[90]=A):A=t[90];let D;t[91]!==e?(D=e("sandbox.redirectEditor.discardQueryParameters"),t[91]=e,t[92]=D):D=t[92];let B;t[93]!==D?(B=r.jsx("span",{className:"text-sm",children:D}),t[93]=D,t[94]=B):B=t[94];let O;t[95]!==A||t[96]!==B?(O=r.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5",children:[A,B]}),t[95]=A,t[96]=B,t[97]=O):O=t[97];let U;t[98]!==y||t[99]!==C||t[100]!==Q||t[101]!==O?(U=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsxs("div",{className:"mx-auto max-w-xl space-y-6",children:[y,C,Q,O]})}),t[98]=y,t[99]=C,t[100]=Q,t[101]=O,t[102]=U):U=t[102];let q;return t[103]!==U||t[104]!==c?(q=r.jsxs("div",{className:"flex h-full flex-col",children:[c,U]}),t[103]=U,t[104]=c,t[105]=q):q=t[105],q}export{ji as RedirectEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-DjY1XBxT.js","assets/index-CacyxM-B.js","assets/index-B1fXHVYV.css","assets/Tool02-DtJ6WkGT.js","assets/CheckCircle-BCbqPCn-.js","assets/Settings02-CGZ0Ol25.js","assets/use-mcp-client-DRcy9vk6.js","assets/auth-Dk3-oFE7.js","assets/useInfiniteQuery-BxSgA-RD.js","assets/use-infinite-scroll-ChfJMk5S.js","assets/studio-tools-O0czolAT.js","assets/badge-Bc-IWDm5.js","assets/input-B8ln-0Wl.js","assets/dropdown-menu-ByKxU4Y4.js","assets/Check-CSFy6eOj.js","assets/ChevronRight-H-_IIqWd.js","assets/DotsVertical-Bqf_kSFh.js","assets/table-Dc0W0B0Q.js","assets/toggle-group-BFyHFJ9G.js","assets/use-view-mode-BQejzyHA.js","assets/use-mobile-c0ak1uw4.js","assets/FilterLines-Dc1F-WNI.js","assets/Globe01-CHMths1B.js","assets/SearchMd-CF01LhHu.js","assets/dialog-Ww_zj2g-.js","assets/X-VMfnK-j5.js","assets/AlertCircle-DOZzh9F_.js","assets/Download01-BPvwRxeD.js","assets/Upload01-B1Z9PE0l.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-DRGp9yFR.js","assets/card-CG7VHdDz.js","assets/Trash01-BcRuo5Fe.js","assets/label-CCAJCJOj.js","assets/select-CwAouusu.js","assets/tooltip-CwIq9zTG.js","assets/ChevronDown-DiERg-yU.js","assets/ChevronUp-CT1Rb5MC.js","assets/switch-B0vh0spM.js","assets/textarea-CD_pYqo3.js","assets/ArrowLeft-D3IfTAWC.js","assets/XCircle-D-ab7D3l.js","assets/checkbox-BsGrD1YR.js","assets/Eye-CDfbu42j.js","assets/LinkExternal01-kQgSYVkJ.js","assets/use-copy-D87eemcY.js","assets/Copy01-CzEeXGsa.js","assets/Key01-WuBVakl2.js","assets/Plus-m61KPSTg.js","assets/mcp-oauth-YJCTRoaW.js","assets/Play-AS6vVmkD.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as i,j as e,r as s,k as a,aF as o}from"./index-CacyxM-B.js";import{R as m}from"./require-capability-BDCw5l2l.js";import"./use-capability-D8TgIows.js";import"./access-gate-bmibgRvV.js";import"./capability-load-error-BPXMIbs3.js";const n=s.lazy(()=>o(()=>import("./registry-layout-DjY1XBxT.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50])));function f(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as ie,r as F,F as Ue,K as me,n as ze,j as s,m as q,k as Oe,B as ce,c as X,X as Je,Y as ke,Z as re,a1 as We,a2 as Xe,o as it,$ as bt,a0 as Ot,e as rt,t as je,p as Ke,y as at,z as jt,E as Mt,d as Dt,u as vt}from"./index-CacyxM-B.js";import{u as Lt}from"./use-organization-roles-DZR-ca1L.js";import{u as Fe}from"./use-org-auth-client-Bjx13kGF.js";import{g as ct,a as yt}from"./role-color-Dn2tXDDF.js";import{B as Me}from"./badge-Bc-IWDm5.js";import{A as dt,a as mt,c as ut,d as ft,b as gt,f as ht,g as xt,e as pt}from"./alert-dialog-DRGp9yFR.js";import{c as Pt,D as wt,b as Gt,a as kt}from"./dropdown-menu-ByKxU4Y4.js";import{a as Ut}from"./DotsVertical-Bqf_kSFh.js";import{s as Ye}from"./Plus-m61KPSTg.js";import{s as Bt}from"./Trash01-BcRuo5Fe.js";import{C as Vt}from"./collection-table-wrapper-Pg9EfyUB.js";import{P as ae}from"./index-GDSYOTBM.js";import{E as et}from"./empty-state-BJ2gnfVT.js";import{S as $e}from"./search-input-ByYoJKBQ.js";import{P as Tt,D as _t}from"./ai-providers-logos-DD3qZ33J.js";import{I as Qe}from"./integration-icon-CLbqw16t.js";import{u as Yt}from"./use-infinite-scroll-ChfJMk5S.js";import{C as He}from"./checkbox-BsGrD1YR.js";import{i as zt}from"./ArrowLeft-D3IfTAWC.js";import{u as Kt}from"./useSuspenseInfiniteQuery-CNPxNyM-.js";import{u as Ft,S as $t}from"./use-mcp-client-DRcy9vk6.js";import{C as Qt}from"./collection-search-DGOZ00E9.js";import{p as Ht}from"./connection-C_INLdxb.js";import{a as Et}from"./use-members-CYQAJOqU.js";import{g as It}from"./get-initials-D-f_fDFw.js";import{u as Zt}from"./use-connection-BS7_Pbag.js";import{u as qt,g as Jt}from"./use-ai-providers-DF6xoNtC.js";import{A as Rt}from"./avatar-C448hZt-.js";import{S as De}from"./switch-B0vh0spM.js";import{b as ve,c as Le,T as ye,a as Pe}from"./tooltip-CwIq9zTG.js";import{S as tt,a as st,b as lt}from"./settings-section-Cz2znp8W.js";import{t as Wt}from"./ChevronDown-DiERg-yU.js";import{i as Xt}from"./ChevronRight-H-_IIqWd.js";import{i as ot}from"./X-VMfnK-j5.js";import{a as es}from"./use-capability-D8TgIows.js";import{A as ts}from"./access-gate-bmibgRvV.js";import{S as ss}from"./settings-subnav-a1a1GCc2.js";import"./Check-CSFy6eOj.js";import"./table-Dc0W0B0Q.js";import"./ArrowUp-D1Whwq-K.js";import"./sidebar-BDv_n64F.js";import"./LayoutLeft-BF7bmTAo.js";import"./use-mobile-c0ak1uw4.js";import"./SearchMd-CF01LhHu.js";import"./Tool02-DtJ6WkGT.js";import"./agent-icon-BDevt-8Z.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./ChevronUp-CT1Rb5MC.js";import"./Stars02-CLHJV6ce.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./SearchLg-CDtXrrcW.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./Zap-BrJ2b2V7.js";import"./auth-Dk3-oFE7.js";import"./studio-tools-O0czolAT.js";import"./card-CG7VHdDz.js";import"./capability-load-error-BPXMIbs3.js";import"./useRouterState-Dk4tjkCW.js";import"./use-settings-tabs-CkhP712K.js";const Ze="basic-usage",qe=[{id:Ze,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","ORG_REPO_SYNC_LIST","SANDBOX_START","SANDBOX_DELETE","GITHUB_SEARCH_BRANCHES","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE","TASK_BOARD_ITEM_PRS_GET","TASK_BOARD_ITEM_PR_LINK","TASK_BOARD_ITEM_RERUN","TASK_BOARD_REVIEW_DECISION","TASK_BOARD_PROMOTE_TO_PRODUCTION","TASK_BOARD_ACTIVITY_LIST","TASK_BOARD_COMMENT_LIST","TASK_BOARD_COMMENT_CREATE","TASK_BOARD_COMMENT_UPDATE","TASK_BOARD_COMMENT_DELETE","TASK_BOARD_DISMISSED_LIST","TASK_BOARD_DISMISSED_RESTORE"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE","JIRA_INTEGRATION_GET","JIRA_INTEGRATION_UPSERT","JIRA_INTEGRATION_DELETE","JIRA_BOARDS_LIST","JIRA_BOARD_COLUMNS_LIST","JIRA_SYNC_RUN"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_BILLING_CHECKOUT_START","ORGANIZATION_BILLING_PORTAL","ORGANIZATION_TASK_QUOTA_GET","INFRA_BILLING_SITES_LIST","INFRA_BILLING_GET","INFRA_BILLING_PORTAL","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP","COMMERCE_DISCOVERY_RUN","COMMERCE_DISCOVERY_BIND","COMMERCE_DISCOVERY_CONNECTION_STATUS"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_HEATMAP","MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations and synced GitHub repositories",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST","FILE_OBJECT_DELETE","ORG_REPO_SYNC_CREATE","ORG_REPO_SYNC_LIST","ORG_REPO_SYNC_UPDATE","ORG_REPO_SYNC_DELETE","ORG_REPO_SYNC_RUN"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS","CLAUDE_SUBSCRIPTION_CONNECT","CLAUDE_SUBSCRIPTION_STATUS","CLAUDE_SUBSCRIPTION_DISCONNECT"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...qe.find(t=>t.id===Ze)?.tools??[]];const ls=["agents:manage","connections:manage"];new Set(qe.filter(t=>ls.includes(t.id)).flatMap(t=>t.tools));function os(){const t=new Map;for(const e of qe){if(e.id===Ze)continue;const l=t.get(e.section)??[];l.push(e),t.set(e.section,l)}return Array.from(t.entries()).map(([e,l])=>({section:e,capabilities:l}))}function ns(t,e,l){return l?!0:t.tools.every(n=>e.includes(n))}function is(t,e,l){if(l){const i=new Set(e);for(const o of t.tools)i.add(o);return Array.from(i)}const n=new Set(e);for(const i of t.tools)n.delete(i);return Array.from(n)}function rs(t){const e=X.c(21),{connection:l,isSelected:n,hasToolsEnabled:i,activeToolsCount:o,totalToolsCount:c,onSelect:g,onToggle:h}=t,m=n?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==m?(f=q("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",m),e[0]=m,e[1]=f):f=e[1];let a;e[2]!==l.icon||e[3]!==l.title?(a=s.jsx(Qe,{icon:l.icon,name:l.title,size:"xs"}),e[2]=l.icon,e[3]=l.title,e[4]=a):a=e[4];let u;e[5]!==l.title?(u=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),e[5]=l.title,e[6]=u):u=e[6];let x;e[7]!==g||e[8]!==a||e[9]!==u?(x=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:g,children:[a,u]}),e[7]=g,e[8]=a,e[9]=u,e[10]=x):x=e[10];let d;e[11]!==o||e[12]!==l.tools||e[13]!==i||e[14]!==h||e[15]!==c?(d=l.tools&&l.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[o,"/",c]}),s.jsx(He,{checked:i,onCheckedChange:h,onClick:as})]}),e[11]=o,e[12]=l.tools,e[13]=i,e[14]=h,e[15]=c,e[16]=d):d=e[16];let p;return e[17]!==f||e[18]!==x||e[19]!==d?(p=s.jsxs("div",{className:f,children:[x,d]}),e[17]=f,e[18]=x,e[19]=d,e[20]=p):p=e[20],p}function as(t){return t.stopPropagation()}function cs(t){const e=X.c(18),{connectionId:l,tool:n,isSelected:i,onToggle:o}=t,c=`tool-${l}-${n.name}`,g=i?"text-foreground":"text-muted-foreground";let h;e[0]!==g?(h=q("text-sm font-medium",g),e[0]=g,e[1]=h):h=e[1];let m;e[2]!==h||e[3]!==n.name?(m=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:h,children:n.name})}),e[2]=h,e[3]=n.name,e[4]=m):m=e[4];let f;e[5]!==n.description?(f=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:n.description}),e[5]=n.description,e[6]=f):f=e[6];let a;e[7]!==m||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,f]}),e[7]=m,e[8]=f,e[9]=a):a=e[9];const u=`tool-${l}-${n.name}`;let x;e[10]!==i||e[11]!==o||e[12]!==u?(x=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(He,{id:u,checked:i,onCheckedChange:o,onClick:ds})}),e[10]=i,e[11]=o,e[12]=u,e[13]=x):x=e[13];let d;return e[14]!==c||e[15]!==a||e[16]!==x?(d=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:c,children:[a,x]}),e[14]=c,e[15]=a,e[16]=x,e[17]=d):d=e[17],d}function ds(t){return t.stopPropagation()}function ms({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:l,searchQuery:n}){const i=ie(),[o,c]=F.useState(""),g=n!==void 0?n:o,h=F.useDeferredValue(g),[m,f]=F.useState("all"),[a,u]=F.useState(!1),x=F.useRef(new Set(Object.keys(t))),{org:d}=Ue(),p=Ft({connectionId:$t,orgId:d.id,orgSlug:d.slug}),C=100,R=h.trim(),I=R?{operator:"or",conditions:[{field:["title"],operator:"contains",value:R},{field:["description"],operator:"contains",value:R}]}:void 0,b=!!l,N={...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:C,offset:0,...b&&{include_virtual:!0}},M=JSON.stringify(N),{data:S,fetchNextPage:O,hasNextPage:D,isFetchingNextPage:_}=Kt({queryKey:me.collectionListInfinite(p,d.id,"","CONNECTIONS",M),queryFn:async({pageParam:T=0})=>(await p.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:C,offset:T,...b&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(T,w)=>{if(T?.hasMore)return w.reduce((Q,W)=>Q+(W?.items?.length??0),0)},staleTime:3e4}),A=S?.pages.flatMap(T=>T?.items??[])??[],v=Yt(O,D??!1,_),r=l?A.filter(T=>T.connection_type!=="VIRTUAL"?!0:Ht(T.connection_url)!==l):A,E=x.current,k=[...E.values()].map(T=>r.find(w=>w.id===T)).filter(T=>T!==void 0),G=r.filter(T=>!E.has(T.id)),Y=[...k,...G],L=T=>{const w=t[T];return w!==void 0&&w.length>0},z=Y.filter(T=>{if(m==="all")return!0;const w=L(T.id);return m==="selected"?w:m==="unselected"?!w:!0}),[y,K]=F.useState(Y[0]?.id??null),V=y?Y.find(T=>T.id===y)??null:null,{data:U,isFetching:B}=ze({queryKey:me.collectionItem(p,d.id,"","CONNECTIONS",y??""),queryFn:async()=>y?(await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:y}})).structuredContent?.item??null:null,enabled:!!y,staleTime:3e4}),H=U?.tools??[],J=(T,w)=>t[T]?.includes(w)??!1,te=(T,w)=>{const Q=t[T]??[],W=Q.includes(w),se={...t};if(W){const le=Q.filter(ne=>ne!==w);le.length===0?delete se[T]:se[T]=le}else se[T]=[...Q,w];e(se)},oe=T=>{const w=T===y?H:[];if(!w.length)return;const Q=t[T]??[],W=w.map(ne=>ne.name),se=Q.length>0&&W.every(ne=>Q.includes(ne)),le={...t};se?delete le[T]:(le[T]=W,K(T)),e(le)},$=T=>{K(T),u(!0)},Z=()=>{u(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:q("w-full md:w-80 border-r border-border flex flex-col",a&&"hidden md:flex"),children:[n===void 0&&s.jsx(Qt,{value:o,onChange:c,placeholder:i("common.toolSetSelector.searchPlaceholder")}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>f("all"),className:q("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",m==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterAll")}),s.jsx("button",{onClick:()=>f("selected"),className:q("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",m==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterSelected")}),s.jsx("button",{onClick:()=>f("unselected"),className:q("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",m==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterUnselected")})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:z.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:i(g?"common.toolSetSelector.noConnectionsFound":m==="selected"?"common.toolSetSelector.noServersSelected":m==="unselected"?"common.toolSetSelector.noUnselectedServers":"common.toolSetSelector.noConnectionsAvailable")}):s.jsxs("div",{className:"p-2 space-y-1",children:[z.map(T=>{const w=y===T.id,Q=w?H.length:0,W=t[T.id]?.length??0;return s.jsx(rs,{connection:{...T,tools:w?H:T.tools},isSelected:w,hasToolsEnabled:L(T.id),activeToolsCount:W,totalToolsCount:Q,onSelect:()=>$(T.id),onToggle:()=>oe(T.id)},T.id)}),s.jsx("div",{ref:v,className:"h-4"}),_&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(Oe,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:q("flex-1 flex-col",a?"flex":"hidden md:flex"),children:V?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ce,{variant:"ghost",size:"sm",onClick:Z,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(zt,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Qe,{icon:V.icon,name:V.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:V.title}),V.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:V.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:B?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Oe,{size:18,className:"animate-spin text-muted-foreground"})}):H.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:i("common.toolSetSelector.noToolsAvailable")}):s.jsx("div",{className:"space-y-2",children:H.map(T=>s.jsx(cs,{connectionId:V.id,tool:T,isSelected:J(V.id,T.name),onToggle:()=>te(V.id,T.name)},T.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:i("common.toolSetSelector.selectConnection")})})})]})}const us=Je({role:Je({id:re().optional(),slug:re().optional(),label:re()}),allowAllStaticPermissions:Xe(),staticPermissions:ke(re()),toolSet:We(re(),ke(re())),allowAllModels:Xe(),modelSet:We(re(),ke(re())),memberIds:ke(re())});function nt(t,e,l,n){const i=s.jsx(De,{checked:e,disabled:l,onCheckedChange:n});return l?s.jsx(ve,{children:s.jsxs(Le,{children:[s.jsx(ye,{asChild:!0,children:s.jsx("div",{children:i})}),s.jsx(Pe,{children:s.jsx("p",{children:t("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):i}function fs(t){const e=X.c(41),{allowAllStaticPermissions:l,staticPermissions:n,onAllowAllChange:i,onPermissionsChange:o,readOnly:c,searchQuery:g}=t,h=c===void 0?!1:c,m=ie();let f;e[0]!==g?(f=g.trim().toLowerCase(),e[0]=g,e[1]=f):f=e[1];const a=F.useDeferredValue(f);let u;if(e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==o||e[6]!==h||e[7]!==g||e[8]!==n||e[9]!==m){const x=os(),d=(_,A)=>{if(!h){if(l&&A){const v=x.flatMap(xs).flatMap(hs);i(!1),o(v.filter(r=>!_.tools.includes(r)));return}l||o(is(_,n,!A))}};let p;e[11]!==a?(p=_=>{const{section:A,capabilities:v}=_;return{section:A,capabilities:v.filter(r=>!a||r.label.toLowerCase().includes(a)||r.description.toLowerCase().includes(a))}},e[11]=a,e[12]=p):p=e[12];const C=x.map(p).filter(gs);let R;e[13]!==m?(R=m("settings.orgRoleDetail.general"),e[13]=m,e[14]=R):R=e[14];let I;e[15]!==m?(I=m("settings.orgRoleDetail.allOrgPermissions"),e[15]=m,e[16]=I):I=e[16];let b;e[17]!==m?(b=m("settings.orgRoleDetail.grantFullAccessToAllFeaturesBelow"),e[17]=m,e[18]=b):b=e[18];let N;e[19]!==l||e[20]!==i||e[21]!==o?(N=()=>{i(!l),o([])},e[19]=l,e[20]=i,e[21]=o,e[22]=N):N=e[22];let M;e[23]!==l||e[24]!==h||e[25]!==m||e[26]!==N?(M=nt(m,l,h,N),e[23]=l,e[24]=h,e[25]=m,e[26]=N,e[27]=M):M=e[27];let S;e[28]!==l||e[29]!==i||e[30]!==o||e[31]!==h?(S=h?void 0:()=>{i(!l),o([])},e[28]=l,e[29]=i,e[30]=o,e[31]=h,e[32]=S):S=e[32];let O;e[33]!==S||e[34]!==I||e[35]!==b||e[36]!==M?(O=s.jsx(st,{children:s.jsx(lt,{title:I,description:b,action:M,onClick:S})}),e[33]=S,e[34]=I,e[35]=b,e[36]=M,e[37]=O):O=e[37];let D;e[38]!==O||e[39]!==R?(D=s.jsx(tt,{title:R,children:O}),e[38]=O,e[39]=R,e[40]=D):D=e[40],u=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[D,C.length===0&&a?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:m("settings.orgRoleDetail.noPermissionsMatch",{searchQuery:g})}):C.map(_=>{const{section:A,capabilities:v}=_;return s.jsx(tt,{title:A,children:s.jsx(st,{children:v.map(r=>{const E=ns(r,n,l);return s.jsx(lt,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[r.label,r.dangerous&&s.jsx(jt,{size:12,className:"text-warning shrink-0"})]}),description:r.description,action:nt(m,E,h,()=>d(r,E)),onClick:h?void 0:()=>d(r,E)},r.id)})})},A)})]})}),e[2]=l,e[3]=a,e[4]=i,e[5]=o,e[6]=h,e[7]=g,e[8]=n,e[9]=m,e[10]=u}else u=e[10];return u}function gs(t){return t.capabilities.length>0}function hs(t){return t.tools}function xs(t){return t.capabilities}const St={anthropic:"Anthropic",openrouter:"OpenRouter"},ps={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function Ts(t,e){const l=t.indexOf("/"),n=l>0?t.slice(0,l):e;return n.startsWith("~")?n.slice(1):n}function _s(t){return ps[t]??St[t]??t}function Es(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const Nt=30;function Is(t){const e=X.c(40),{connectionId:l,subProviderId:n,subProviderName:i,groupLogo:o,models:c,allConnectionModelIds:g,selectedModels:h,allowAllModels:m,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:u,readOnly:x,defaultExpanded:d}=t,p=ie(),[C,R]=F.useState(d),I=d||C,b=R,[N,M]=F.useState(Nt);let S;e[0]!==f||e[1]!==m||e[2]!==h?(S=_=>m||f||h.includes("*")||h.includes(_),e[0]=f,e[1]=m,e[2]=h,e[3]=S):S=e[3];const O=S;let D;if(e[4]!==g||e[5]!==m||e[6]!==l||e[7]!==I||e[8]!==o||e[9]!==O||e[10]!==c||e[11]!==u||e[12]!==a||e[13]!==x||e[14]!==n||e[15]!==i||e[16]!==p||e[17]!==N){let _;e[19]!==O?(_=B=>O(B.id),e[19]=O,e[20]=_):_=e[20];const A=c.filter(_).length,v=c.slice(0,N),r=c.length>N;let E;e[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>b(As),e[21]=E):E=e[21];const k=o??Tt[n]??_t;let G;e[22]!==i||e[23]!==k?(G=s.jsx(Qe,{icon:k,name:i,size:"sm"}),e[22]=i,e[23]=k,e[24]=G):G=e[24];let Y;e[25]!==i?(Y=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[25]=i,e[26]=Y):Y=e[26];let L;e[27]!==G||e[28]!==Y?(L=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[G,Y]}),e[27]=G,e[28]=Y,e[29]=L):L=e[29];const z=p("settings.orgRoleDetail.enabledCount",{enabledCount:A,total:c.length});let y;e[30]!==z?(y=s.jsx(Me,{variant:"secondary",className:"text-xs text-muted-foreground",children:z}),e[30]=z,e[31]=y):y=e[31];let K;e[32]!==I?(K=I?s.jsx(Wt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Xt,{size:16,className:"text-muted-foreground shrink-0"}),e[32]=I,e[33]=K):K=e[33];let V;e[34]!==y||e[35]!==K?(V=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[y,K]}),e[34]=y,e[35]=K,e[36]=V):V=e[36];let U;e[37]!==V||e[38]!==L?(U=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:E,children:[L,V]}),e[37]=V,e[38]=L,e[39]=U):U=e[39],D=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[U,I&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[v.map(B=>{const H=O(B.id),J=()=>{if(!x){if(m){u(l,g,B.id);return}a(l,B.id)}};return s.jsxs("div",{className:q("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!x&&"hover:bg-muted/50 cursor-pointer"),onClick:J,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:B.title})}),s.jsx("div",{onClick:Ns,children:x?s.jsx(ve,{children:s.jsxs(Le,{children:[s.jsx(ye,{asChild:!0,children:s.jsx("div",{children:s.jsx(De,{checked:H,disabled:!0,onCheckedChange:Ss})})}),s.jsx(Pe,{children:s.jsx("p",{children:p("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(De,{checked:H,onCheckedChange:J})})]},B.id)}),r&&s.jsx("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>M(Rs),children:p("settings.orgRoleDetail.showMore",{remaining:c.length-N})})]})]}),e[4]=g,e[5]=m,e[6]=l,e[7]=I,e[8]=o,e[9]=O,e[10]=c,e[11]=u,e[12]=a,e[13]=x,e[14]=n,e[15]=i,e[16]=p,e[17]=N,e[18]=D}else D=e[18];return D}function Rs(t){return t+Nt}function Ss(){}function Ns(t){return t.stopPropagation()}function As(t){return!t}function Cs(t){const e=X.c(33),{connection:l,selectedModels:n,allowAllModels:i,onToggleModel:o,onExitAllowAll:c,allConnectionModelsSelected:g,searchQuery:h,readOnly:m}=t,f=Jt(l.id);let a,u,x,d,p;if(e[0]!==g||e[1]!==i||e[2]!==l.id||e[3]!==l.label||e[4]!==l.providerId||e[5]!==c||e[6]!==o||e[7]!==f||e[8]!==m||e[9]!==h||e[10]!==n){p=Symbol.for("react.early_return_sentinel");e:{let I;e[16]!==l.label?(I=E=>({...E,id:E.modelId,provider:l.label}),e[16]=l.label,e[17]=I):I=e[17];const b=f.filter(Ms).map(I),N=h.trim().toLowerCase(),M=N?b.filter(E=>E.title.toLowerCase().includes(N)||E.id.toLowerCase().includes(N)||E.provider?.toLowerCase().includes(N)):b;if(M.length===0){p=null;break e}const S=new Map;for(const E of M){const k=Ts(E.id,l.providerId),G=S.get(k)??{models:[],logo:null};G.models.push({id:E.id,title:Es(E.title),logo:E.logo}),!G.logo&&E.logo&&(G.logo=E.logo),S.set(k,G)}const O=Array.from(S.entries()).map(js).sort(Os),D=O.length===1||N.length>0;x="flex flex-col gap-3";const _=Tt[l.providerId]??_t;let A;e[18]!==l.providerId||e[19]!==_?(A=s.jsx("img",{src:_,alt:l.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=l.providerId,e[19]=_,e[20]=A):A=e[20];const v=St[l.providerId]??l.providerId;let r;e[21]!==v?(r=s.jsx("h4",{className:"text-sm font-medium",children:v}),e[21]=v,e[22]=r):r=e[22],e[23]!==r||e[24]!==A?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[A,r]}),e[23]=r,e[24]=A,e[25]=d):d=e[25],a="flex flex-col gap-3",u=O.map(E=>s.jsx(Is,{connectionId:l.id,subProviderId:E.id,subProviderName:E.name,groupLogo:E.logo,models:E.models,allConnectionModelIds:b.map(bs),selectedModels:n,allowAllModels:i,allConnectionModelsSelected:g,onToggleModel:o,onExitAllowAll:c,readOnly:m,defaultExpanded:D},E.id))}e[0]=g,e[1]=i,e[2]=l.id,e[3]=l.label,e[4]=l.providerId,e[5]=c,e[6]=o,e[7]=f,e[8]=m,e[9]=h,e[10]=n,e[11]=a,e[12]=u,e[13]=x,e[14]=d,e[15]=p}else a=e[11],u=e[12],x=e[13],d=e[14],p=e[15];if(p!==Symbol.for("react.early_return_sentinel"))return p;let C;e[26]!==a||e[27]!==u?(C=s.jsx("div",{className:a,children:u}),e[26]=a,e[27]=u,e[28]=C):C=e[28];let R;return e[29]!==x||e[30]!==d||e[31]!==C?(R=s.jsxs("div",{className:x,children:[d,C]}),e[29]=x,e[30]=d,e[31]=C,e[32]=R):R=e[32],R}function bs(t){return t.id}function Os(t,e){return t.name.localeCompare(e.name)}function js(t){const[e,l]=t;return{id:e,name:_s(e),logo:l.logo,models:l.models}}function Ms(t,e,l){return l.findIndex(n=>n.modelId===t.modelId)===e}function Ds(t){const e=X.c(41),{allowAllModels:l,modelSet:n,onAllowAllChange:i,onModelSetChange:o,readOnly:c,searchQuery:g}=t,h=c===void 0?!1:c,m=ie(),f=F.useDeferredValue(g),a=qt();let u;e[0]!==n||e[1]!==o?(u=(_,A)=>{const v=n[_]??[],r={...n};if(v.includes(A)){const E=v.filter(k=>k!==A);E.length===0?delete r[_]:r[_]=E}else r[_]=[...v,A];o(r)},e[0]=n,e[1]=o,e[2]=u):u=e[2];const x=u;let d;e[3]!==n||e[4]!==i||e[5]!==o?(d=(_,A,v)=>{i(!1),o({...n,[_]:A.filter(r=>r!==v)})},e[3]=n,e[4]=i,e[5]=o,e[6]=d):d=e[6];const p=d,C=!h&&"hover:bg-muted/50 cursor-pointer";let R;e[7]!==C?(R=q("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",C),e[7]=C,e[8]=R):R=e[8];let I;e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==h?(I=()=>{if(h)return;const _=!l;i(_),_&&o({})},e[9]=l,e[10]=i,e[11]=o,e[12]=h,e[13]=I):I=e[13];let b;e[14]!==m?(b=m("settings.orgRoleDetail.allModels"),e[14]=m,e[15]=b):b=e[15];let N;e[16]!==b?(N=s.jsx("span",{className:"text-sm font-medium",children:b}),e[16]=b,e[17]=N):N=e[17];let M;e[18]!==l||e[19]!==i||e[20]!==o||e[21]!==h||e[22]!==m?(M=s.jsx("div",{onClick:Ls,children:h?s.jsx(ve,{children:s.jsxs(Le,{children:[s.jsx(ye,{asChild:!0,children:s.jsx("div",{children:s.jsx(De,{checked:l,disabled:!0,onCheckedChange:vs})})}),s.jsx(Pe,{children:s.jsx("p",{children:m("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(De,{checked:l,onCheckedChange:_=>{i(_),_&&o({})}})}),e[18]=l,e[19]=i,e[20]=o,e[21]=h,e[22]=m,e[23]=M):M=e[23];let S;e[24]!==R||e[25]!==I||e[26]!==N||e[27]!==M?(S=s.jsxs("div",{className:R,onClick:I,children:[N,M]}),e[24]=R,e[25]=I,e[26]=N,e[27]=M,e[28]=S):S=e[28];let O;e[29]!==a||e[30]!==l||e[31]!==f||e[32]!==p||e[33]!==n||e[34]!==h||e[35]!==m||e[36]!==x?(O=a.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:m("settings.orgRoleDetail.noLlmConnectionsConfigured")}):a.map(_=>s.jsx(F.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Oe,{className:"size-4 animate-spin"}),m("settings.orgRoleDetail.loadingModels")]}),children:s.jsx(Cs,{connection:_,selectedModels:n[_.id]??[],allowAllModels:l,onToggleModel:x,onExitAllowAll:p,allConnectionModelsSelected:(n[_.id]??[]).includes("*"),searchQuery:f,readOnly:h})},_.id)),e[29]=a,e[30]=l,e[31]=f,e[32]=p,e[33]=n,e[34]=h,e[35]=m,e[36]=x,e[37]=O):O=e[37];let D;return e[38]!==S||e[39]!==O?(D=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[S,O]}),e[38]=S,e[39]=O,e[40]=D):D=e[40],D}function vs(){}function Ls(t){return t.stopPropagation()}function ys(t){const e=X.c(75),{open:l,onOpenChange:n,selectedMemberIds:i,onAddMembers:o}=t,c=ie(),[g,h]=F.useState(""),m=F.useDeferredValue(g);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[0]=f):f=e[0];const[a,u]=F.useState(f),{data:x}=Et();let d,p,C,R,I,b,N,M,S,O,D;if(e[1]!==x?.data?.members||e[2]!==m||e[3]!==o||e[4]!==n||e[5]!==l||e[6]!==a||e[7]!==g||e[8]!==i||e[9]!==c){const y=x?.data?.members??[];let K;e[21]!==m?(K=$=>{const Z=m.toLowerCase();return $.user?.name?.toLowerCase().includes(Z)||$.user?.email?.toLowerCase().includes(Z)},e[21]=m,e[22]=K):K=e[22];const V=y.filter(K);let U;e[23]!==o||e[24]!==n||e[25]!==a?(U=()=>{o(a),u([]),n(!1)},e[23]=o,e[24]=n,e[25]=a,e[26]=U):U=e[26],C=U,p=dt,O=l,D=n,d=mt,M="sm:max-w-md p-0";let B;e[27]!==c?(B=c("settings.orgRoleDetail.addMembersToRole"),e[27]=c,e[28]=B):B=e[28];let H;e[29]!==B?(H=s.jsx(ut,{children:B}),e[29]=B,e[30]=H):H=e[30];let J;e[31]!==c?(J=c("settings.orgRoleDetail.selectMembersToAddToThisRole"),e[31]=c,e[32]=J):J=e[32];let te;e[33]!==J?(te=s.jsx(ft,{children:J}),e[33]=J,e[34]=te):te=e[34],e[35]!==H||e[36]!==te?(S=s.jsxs(gt,{className:"px-6 pt-6",children:[H,te]}),e[35]=H,e[36]=te,e[37]=S):S=e[37],b="flex flex-col h-80";let oe;e[38]!==c?(oe=c("settings.orgRoleDetail.searchMembers"),e[38]=c,e[39]=oe):oe=e[39],e[40]!==g||e[41]!==oe?(N=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx($e,{value:g,onChange:h,placeholder:oe,className:"w-full"})}),e[40]=g,e[41]=oe,e[42]=N):N=e[42],R="flex-1 overflow-auto",I=V.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:c(g?"settings.orgRoleDetail.noMembersFound":"settings.orgRoleDetail.noMembersAvailable")})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:V.map($=>{const Z=$.role!=="owner",T=i.includes($.id),w=a.includes($.id);return s.jsxs("label",{className:q("flex items-center gap-3 p-2 rounded-lg",!Z||T?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(He,{checked:w||T,onCheckedChange:()=>{!Z||T||u(Q=>Q.includes($.id)?Q.filter(W=>W!==$.id):[...Q,$.id])},disabled:!Z||T}),s.jsx(Rt,{url:$.user?.image??void 0,fallback:It($.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:$.user?.name||c("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:$.user?.email})]}),!Z&&s.jsx(Me,{variant:"secondary",className:"shrink-0",children:c("settings.orgRoleDetail.owner")}),T&&Z&&s.jsx(Me,{variant:"outline",className:"shrink-0",children:c("settings.orgRoleDetail.added")})]},$.id)})}),e[1]=x?.data?.members,e[2]=m,e[3]=o,e[4]=n,e[5]=l,e[6]=a,e[7]=g,e[8]=i,e[9]=c,e[10]=d,e[11]=p,e[12]=C,e[13]=R,e[14]=I,e[15]=b,e[16]=N,e[17]=M,e[18]=S,e[19]=O,e[20]=D}else d=e[10],p=e[11],C=e[12],R=e[13],I=e[14],b=e[15],N=e[16],M=e[17],S=e[18],O=e[19],D=e[20];let _;e[43]!==R||e[44]!==I?(_=s.jsx("div",{className:R,children:I}),e[43]=R,e[44]=I,e[45]=_):_=e[45];let A;e[46]!==_||e[47]!==b||e[48]!==N?(A=s.jsxs("div",{className:b,children:[N,_]}),e[46]=_,e[47]=b,e[48]=N,e[49]=A):A=e[49];let v;e[50]!==c?(v=c("settings.orgRoleDetail.cancel"),e[50]=c,e[51]=v):v=e[51];let r;e[52]!==v?(r=s.jsx(ht,{children:v}),e[52]=v,e[53]=r):r=e[53];const E=a.length===0;let k;e[54]!==a.length||e[55]!==c?(k=c("settings.orgRoleDetail.addWithCount",{count:a.length}),e[54]=a.length,e[55]=c,e[56]=k):k=e[56];let G;e[57]!==C||e[58]!==E||e[59]!==k?(G=s.jsx(xt,{onClick:C,disabled:E,children:k}),e[57]=C,e[58]=E,e[59]=k,e[60]=G):G=e[60];let Y;e[61]!==r||e[62]!==G?(Y=s.jsxs(pt,{className:"px-6 pb-6",children:[r,G]}),e[61]=r,e[62]=G,e[63]=Y):Y=e[63];let L;e[64]!==d||e[65]!==A||e[66]!==Y||e[67]!==M||e[68]!==S?(L=s.jsxs(d,{className:M,children:[S,A,Y]}),e[64]=d,e[65]=A,e[66]=Y,e[67]=M,e[68]=S,e[69]=L):L=e[69];let z;return e[70]!==p||e[71]!==L||e[72]!==O||e[73]!==D?(z=s.jsx(p,{open:O,onOpenChange:D,children:L}),e[70]=p,e[71]=L,e[72]=O,e[73]=D,e[74]=z):z=e[74],z}function Ps(t){const e=X.c(33),{memberIds:l,onMemberIdsChange:n,readOnly:i,readOnlyMessage:o,searchQuery:c,addMemberDialogOpen:g,onAddMemberDialogOpenChange:h}=t,m=i===void 0?!1:i,f=o===void 0?void 0:o,a=ie(),u=F.useDeferredValue(c),{data:x}=Et();let d,p,C;if(e[0]!==x?.data?.members||e[1]!==u||e[2]!==l||e[3]!==n||e[4]!==m||e[5]!==f||e[6]!==c||e[7]!==a){const M=x?.data?.members??[];let S;e[11]!==l?(S=r=>l.includes(r.id),e[11]=l,e[12]=S):S=e[12];const O=M.filter(S);let D;e[13]!==u?(D=r=>{const E=u.toLowerCase();return r.user?.name?.toLowerCase().includes(E)||r.user?.email?.toLowerCase().includes(E)},e[13]=u,e[14]=D):D=e[14];const _=O.filter(D);let A;e[15]!==f||e[16]!==a?(A=f??a("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=f,e[16]=a,e[17]=A):A=e[17];const v=A;C="flex flex-col h-full",d="flex-1 overflow-auto",p=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:a("settings.orgRoleDetail.noMembers")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.addMembersToGrantPermissions")})]})}):_.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.noMembersMatch",{searchQuery:c})})}):s.jsx("div",{className:"p-4 space-y-2",children:_.map(r=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(Rt,{url:r.user?.image??void 0,fallback:It(r.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:r.user?.name||a("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r.user?.email})]}),m?s.jsx(ve,{children:s.jsxs(Le,{children:[s.jsx(ye,{asChild:!0,children:s.jsx("div",{children:s.jsx(ce,{variant:"ghost",size:"sm",disabled:!0,"aria-label":a("settings.orgRoleDetail.removeMember",{name:r.user?.name||a("settings.orgRoleDetail.unknown")}),children:s.jsx(ot,{size:16})})})}),s.jsx(Pe,{children:s.jsx("p",{children:v})})]})}):s.jsx(ce,{variant:"ghost",size:"sm","aria-label":a("settings.orgRoleDetail.removeMember",{name:r.user?.name||a("settings.orgRoleDetail.unknown")}),onClick:()=>n(l.filter(E=>E!==r.id)),children:s.jsx(ot,{size:16})})]},r.id))}),e[0]=x?.data?.members,e[1]=u,e[2]=l,e[3]=n,e[4]=m,e[5]=f,e[6]=c,e[7]=a,e[8]=d,e[9]=p,e[10]=C}else d=e[8],p=e[9],C=e[10];let R;e[18]!==d||e[19]!==p?(R=s.jsx("div",{className:d,children:p}),e[18]=d,e[19]=p,e[20]=R):R=e[20];let I;e[21]!==l||e[22]!==n?(I=M=>n([...l,...M]),e[21]=l,e[22]=n,e[23]=I):I=e[23];let b;e[24]!==g||e[25]!==l||e[26]!==h||e[27]!==I?(b=s.jsx(ys,{open:g,onOpenChange:h,selectedMemberIds:l,onAddMembers:I}),e[24]=g,e[25]=l,e[26]=h,e[27]=I,e[28]=b):b=e[28];let N;return e[29]!==C||e[30]!==R||e[31]!==b?(N=s.jsxs("div",{className:C,children:[R,b]}),e[29]=C,e[30]=R,e[31]=b,e[32]=N):N=e[32],N}function ws(t){const e=X.c(3);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=s.jsx(F.Suspense,{fallback:l,children:s.jsx(Ps,{...t})}),e[1]=t,e[2]=n):n=e[2],n}const Gs={owner:[],admin:[],user:[]};function ks(t,e,l,n){const i=t==="owner"||t==="admin";return{role:{id:l?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:Gs[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(o=>o.role===t).map(o=>o.id)}}function Us(t,e,l){const n=t.permission||{},i=n.self||[],o=i.includes("*"),c=o?[]:i.filter(a=>a!=="*"),g={};for(const[a,u]of Object.entries(n))if(!(a==="self"||a==="models"))if(a==="*")for(const x of l)g[x.id]=u.includes("*")?x.tools?.map(d=>d.name)??[]:u;else{const x=l.find(d=>d.id===a);x&&(g[a]=u.includes("*")?x.tools?.map(d=>d.name)??[]:u)}const h=n.models||[],m=h.length===0||h.includes("*:*"),f={};if(!m)for(const a of h){const u=a.indexOf(":");if(u===-1)continue;const x=a.slice(0,u),d=a.slice(u+1);f[x]||(f[x]=[]),f[x].push(d)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:o,staticPermissions:c,toolSet:g,allowAllModels:m,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Bs(t,e){const l={};t.allowAllStaticPermissions?l.self=["*"]:t.staticPermissions.length>0&&(l.self=t.staticPermissions);for(const[n,i]of Object.entries(t.toolSet))if(i.length>0){const c=e.find(g=>g.id===n)?.tools?.map(g=>g.name)??[];l[n]=c.length>0&&c.every(g=>i.includes(g))?["*"]:i}if(t.allowAllModels)l.models=["*:*"];else{const n=[];for(const[i,o]of Object.entries(t.modelSet))for(const c of o)n.push(`${i}:${c}`);n.length>0&&(l.models=n)}return l}function Vs(t,e,l){return t.kind==="builtin"?ks(t.role,e,void 0):t.kind==="custom"?Us(t.role,e,l):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function Ys(t){const e=X.c(19),{readOnly:l,readOnlyMessage:n,onOpen:i}=t,o=n===void 0?void 0:n,c=ie();let g;e[0]!==o||e[1]!==c?(g=o??c("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[0]=o,e[1]=c,e[2]=g):g=e[2];const h=g;if(l){let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ye,{size:16}),e[3]=u):u=e[3];let x;e[4]!==c?(x=c("settings.orgRoleDetail.addMember"),e[4]=c,e[5]=x):x=e[5];let d;e[6]!==x?(d=s.jsx(ye,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ce,{variant:"outline",size:"sm",disabled:!0,children:[u,x]})})}),e[6]=x,e[7]=d):d=e[7];let p;e[8]!==h?(p=s.jsx(Pe,{children:s.jsx("p",{children:h})}),e[8]=h,e[9]=p):p=e[9];let C;return e[10]!==d||e[11]!==p?(C=s.jsx(ve,{children:s.jsxs(Le,{children:[d,p]})}),e[10]=d,e[11]=p,e[12]=C):C=e[12],C}let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ye,{size:16}),e[13]=m):m=e[13];let f;e[14]!==c?(f=c("settings.orgRoleDetail.addMember"),e[14]=c,e[15]=f):f=e[15];let a;return e[16]!==i||e[17]!==f?(a=s.jsxs(ce,{variant:"outline",size:"sm",onClick:i,children:[m,f]}),e[16]=i,e[17]=f,e[18]=a):a=e[18],a}function zs(t){const e=X.c(14),{locator:l}=Ue(),n=Fe(),i=Zt();let o;e[0]!==l?(o=me.members(l),e[0]=l,e[1]=o):o=e[1];let c;e[2]!==n?(c=()=>n.organization.listMembers(),e[2]=n,e[3]=c):c=e[3];let g;e[4]!==o||e[5]!==c?(g={queryKey:o,queryFn:c},e[4]=o,e[5]=c,e[6]=g):g=e[6];const{data:h,isPending:m}=ze(g);if(m||!i){let x;return e[7]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=x):x=e[7],x}let f;e[8]!==h?.data?.members?(f=h?.data?.members??[],e[8]=h?.data?.members,e[9]=f):f=e[9];const a=f;let u;return e[10]!==i||e[11]!==a||e[12]!==t?(u=s.jsx(Ks,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=u):u=e[13],u}function Ks({target:t,onBack:e,onSaved:l,members:n,connections:i}){const o=ie(),{locator:c}=Ue(),g=Fe(),h=it(),m=t.kind==="builtin",f=t.kind==="builtin"&&t.role==="owner",a=t.kind==="new",[u,x]=F.useState(m?"org":"mcp"),d=bt({resolver:Ot(us),defaultValues:Vs(t,n,i)}),p=d.formState.isValid,C=d.formState.isDirty,R=rt({mutationFn:async r=>{const E=Bs(r,i),k=r.role.slug||r.role.label.toLowerCase().replace(/\s+/g,"-"),G=(r.role.slug==="owner"||r.role.slug==="admin"||r.role.slug==="user")&&!r.role.id,Y=async(L,z)=>{const y=n.filter(U=>U.role===(z??L)).map(U=>U.id),K=r.memberIds.filter(U=>!y.includes(U)),V=y.filter(U=>!r.memberIds.includes(U));for(const U of K){const B=await g.organization.updateMemberRole({memberId:U,role:[L]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}for(const U of V){const B=await g.organization.updateMemberRole({memberId:U,role:["user"]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}};if(G)return await Y(r.role.slug),r;if(r.role.id){const L=r.role.label.toLowerCase().replace(/\s+/g,"-"),z=r.role.slug,y=L!==z,K=await g.organization.updateRole({roleId:r.role.id,data:{permission:E,...y?{roleName:L}:{}}});if(K?.error)throw new Error(K.error.message??o("settings.orgRoleDetail.somethingWentWrong"));return await Y(y?L:z,y?z:void 0),y?{...r,role:{...r.role,slug:L}}:r}else{const L=await g.organization.createRole({role:k,permission:E});if(L?.error)throw new Error(L.error.message??o("settings.orgRoleDetail.somethingWentWrong"));for(const z of r.memberIds){const y=await g.organization.updateMemberRole({memberId:z,role:[k]});if(y?.error)throw new Error(y.error.message)}return{...r,role:{...r.role,id:L.data?.roleData?.id,slug:k}}}},onSuccess:(r,E)=>{h.invalidateQueries({queryKey:me.members(c)}),h.invalidateQueries({queryKey:me.organizationRoles(c)});const k=!E.role.id&&!E.role.slug,G=E.role.slug==="owner"&&!E.role.id;Ke(G?"role_members_updated":k?"role_created":"role_updated",{role_slug:E.role.slug??null}),je.success(o(G?"settings.orgRoleDetail.membersUpdatedSuccessfully":k?"settings.orgRoleDetail.roleCreatedSuccessfully":"settings.orgRoleDetail.roleUpdatedSuccessfully")),d.reset(r),l(r.role.id)},onError:r=>{je.error(r instanceof Error?r.message:o("settings.orgRoleDetail.failedToSaveRole"))}}),I=d.handleSubmit(r=>{if(!r.role.label.trim()){je.error(o("settings.orgRoleDetail.roleNameIsRequired")),d.setFocus("role.label");return}R.mutate(r)}),b=!f,N=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",M=[...f?[]:[{id:"mcp",label:o("settings.orgRoleDetail.mcpPermissions")}],{id:"org",label:o("settings.orgRoleDetail.organizationPermissions")},{id:"models",label:o("settings.orgRoleDetail.models")},{id:"members",label:o("settings.orgRoleDetail.members")}],[S,O]=F.useState(""),[D,_]=F.useState(!1),A=r=>{x(r),O("")},v={mcp:o("settings.orgRoleDetail.searchMcpServers"),org:o("settings.orgRoleDetail.searchPermissions"),models:o("settings.orgRoleDetail.searchModels"),members:o("settings.orgRoleDetail.searchMembers")};return s.jsx(ae,{children:s.jsxs(ae.Content,{className:q("flex flex-col",u!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(ae.Title,{actions:b&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{variant:"outline",size:"sm",onClick:e,disabled:R.isPending,children:o("settings.orgRoleDetail.cancel")}),s.jsx(ce,{size:"sm",onClick:I,disabled:R.isPending||!p||!C,children:R.isPending?o("settings.orgRoleDetail.saving"):o(a?"settings.orgRoleDetail.createRole":"settings.orgRoleDetail.saveChanges")})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:q("size-2.5 rounded-full shrink-0",t.kind==="builtin"?ct(t.role,!0):yt(d.watch("role.label")))}),f&&s.jsx(at,{size:16,className:"text-muted-foreground shrink-0"}),a||t.kind==="custom"?s.jsx("input",{...d.register("role.label"),placeholder:o("settings.orgRoleDetail.roleName"),className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:a}):s.jsx("span",{className:"truncate",children:N})]})}),s.jsx("div",{className:"flex items-center gap-2",children:M.map(r=>s.jsx("button",{type:"button",onClick:()=>A(r.id),className:q("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",u===r.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:r.label},r.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx($e,{value:S,onChange:O,placeholder:v[u]??"Search...",className:"w-full md:w-[375px]"}),u==="members"&&s.jsx(Ys,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>_(!0)})]})]})}),s.jsx("div",{className:q("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",u!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:q(u!=="org"&&"h-full overflow-hidden",u!=="models"&&u!=="org"&&"border border-border rounded-xl bg-card"),children:[u==="mcp"&&!f&&s.jsx(ms,{toolSet:d.watch("toolSet"),onToolSetChange:r=>d.setValue("toolSet",r,{shouldDirty:!0}),searchQuery:S}),u==="org"&&s.jsx(fs,{allowAllStaticPermissions:d.watch("allowAllStaticPermissions"),staticPermissions:d.watch("staticPermissions"),onAllowAllChange:r=>d.setValue("allowAllStaticPermissions",r,{shouldDirty:!0}),onPermissionsChange:r=>d.setValue("staticPermissions",r,{shouldDirty:!0}),readOnly:f,searchQuery:S}),u==="models"&&s.jsx(Ds,{allowAllModels:d.watch("allowAllModels"),modelSet:d.watch("modelSet"),onAllowAllChange:r=>d.setValue("allowAllModels",r,{shouldDirty:!0}),onModelSetChange:r=>d.setValue("modelSet",r,{shouldDirty:!0}),readOnly:f,searchQuery:S}),u==="members"&&s.jsx(ws,{memberIds:d.watch("memberIds"),onMemberIdsChange:r=>d.setValue("memberIds",r,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?o("settings.orgRoleDetail.userIsDefaultRoleMessage"):o("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),searchQuery:S,addMemberDialogOpen:D,onAddMemberDialogOpenChange:_})]})})]})})}function Fs(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function $s(t){const e=X.c(6),{area:l,children:n}=t,{isPrivileged:i,loading:o,error:c}=es();let g;return e[0]!==l||e[1]!==n||e[2]!==c||e[3]!==i||e[4]!==o?(g=s.jsx(ts,{granted:i,loading:o,error:c,area:l,children:n}),e[0]=l,e[1]=n,e[2]=c,e[3]=i,e[4]=o,e[5]=g):g=e[5],g}const Qs=[{role:"owner",labelKey:"settings.roles.roleOwner"},{role:"admin",labelKey:"settings.roles.roleAdmin"},{role:"user",labelKey:"settings.roles.roleUser"}];function Hs(){const t=X.c(131),e=ie(),[l,n]=F.useState(""),[i,o]=F.useState(null),c=Dt();let g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g={strict:!1},t[0]=g):g=t[0];const{role:h}=vt(g),{locator:m}=Ue(),f=Fe(),a=it(),{customRoles:u,refetch:x}=Lt();let d;t[1]!==c?(d=j=>c({to:".",search:P=>({...P,role:j})}),t[1]=c,t[2]=d):d=t[2];const p=d;let C;e:{if(!h){C=null;break e}if(h==="new"){C={kind:"new"};break e}if(h.startsWith("builtin-")){C={kind:"builtin",role:h.slice(8)};break e}let j;t[3]!==h?(j=ee=>ee.id===h,t[3]=h,t[4]=j):j=t[4];const P=u.find(j);C=P?{kind:"custom",role:P}:null}const R=C;let I;t[5]!==m?(I=me.members(m),t[5]=m,t[6]=I):I=t[6];let b;t[7]!==f?(b=()=>f.organization.listMembers(),t[7]=f,t[8]=b):b=t[8];let N;t[9]!==I||t[10]!==b?(N={queryKey:I,queryFn:b},t[9]=I,t[10]=b,t[11]=N):N=t[11];const{data:M}=ze(N);let S;t[12]!==M?.data?.members?(S=M?.data?.members??[],t[12]=M?.data?.members,t[13]=S):S=t[13];const O=S;let D;t[14]!==O?(D=j=>O.filter(P=>P.role===j).length,t[14]=O,t[15]=D):D=t[15];const _=D;let A;if(t[16]!==u||t[17]!==_||t[18]!==l||t[19]!==e){let j;t[21]!==_||t[22]!==e?(j=de=>({kind:"builtin",role:{...de,memberCount:_(de.role),label:e(de.labelKey)}}),t[21]=_,t[22]=e,t[23]=j):j=t[23];const P=Qs.map(j);let ee;t[24]!==_?(ee=de=>({kind:"custom",role:{...de,memberCount:_(de.role)}}),t[24]=_,t[25]=ee):ee=t[25];const At=u.map(ee);if(A=[...P,...At],l){const de=l.toLowerCase();A=A.filter(Ct=>Ct.role.label.toLowerCase().includes(de))}t[16]=u,t[17]=_,t[18]=l,t[19]=e,t[20]=A}else A=t[20];let v;t[26]!==f?(v=async j=>{const P=await f.organization.deleteRole({roleId:j});if(P?.error)throw new Error(P.error.message);return P?.data},t[26]=f,t[27]=v):v=t[27];const r=rt({mutationFn:v,onSuccess:(j,P)=>{Ke("role_deleted",{role_id:P}),a.invalidateQueries({queryKey:me.members(m)}),a.invalidateQueries({queryKey:me.organizationRoles(m)}),je.success(e("settings.roles.deletedSuccessfully")),x(),R?.kind==="custom"&&R.role.id===P&&p(void 0)},onError:Xs});let E;t[28]!==e?(E=e("settings.roles.columnRole"),t[28]=e,t[29]=E):E=t[29];let k;t[30]!==E?(k={id:"role",header:E,render:Ws,cellClassName:"flex-1 min-w-0",sortable:!0},t[30]=E,t[31]=k):k=t[31];let G;t[32]!==e?(G=e("settings.roles.columnType"),t[32]=e,t[33]=G):G=t[33];let Y;t[34]!==e?(Y=j=>j.kind==="builtin"?s.jsx(Me,{variant:"secondary",className:"text-xs",children:e("settings.roles.builtIn")}):s.jsx(Me,{variant:"outline",className:"text-xs",children:e("settings.roles.custom")}),t[34]=e,t[35]=Y):Y=t[35];let L;t[36]!==G||t[37]!==Y?(L={id:"type",header:G,render:Y,cellClassName:"w-28 shrink-0"},t[36]=G,t[37]=Y,t[38]=L):L=t[38];let z;t[39]!==e?(z=e("settings.roles.columnPermissions"),t[39]=e,t[40]=z):z=t[40];let y;t[41]!==e?(y=j=>{if(j.kind==="builtin")return j.role.role==="owner"||j.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.fullAccess")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.basicAccess")});const P=j.role,ee=[];return P.allowsAllStaticPermissions?ee.push(e("settings.roles.fullOrgAccess")):P.staticPermissionCount&&P.staticPermissionCount>0&&ee.push(e("settings.roles.orgPermsCount",{count:P.staticPermissionCount})),P.allowsAllConnections?ee.push(e("settings.roles.allConnections")):P.connectionCount&&P.connectionCount>0&&ee.push(e("settings.roles.connectionCount",{count:P.connectionCount})),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:ee.length>0?ee.join(", "):e("settings.roles.noPermissions")})},t[41]=e,t[42]=y):y=t[42];let K;t[43]!==z||t[44]!==y?(K={id:"permissions",header:z,render:y,cellClassName:"flex-1 min-w-0"},t[43]=z,t[44]=y,t[45]=K):K=t[45];let V;t[46]!==e?(V=e("settings.roles.columnMembers"),t[46]=e,t[47]=V):V=t[47];let U;t[48]!==V?(U={id:"members",header:V,render:Js,cellClassName:"w-24 shrink-0"},t[48]=V,t[49]=U):U=t[49];let B;t[50]!==e?(B={id:"actions",header:"",render:j=>j.kind==="builtin"?null:s.jsxs(Pt,{children:[s.jsx(wt,{asChild:!0,children:s.jsx(ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:qs,children:s.jsx(Ut,{size:16})})}),s.jsx(Gt,{align:"end",onClick:Zs,children:s.jsxs(kt,{variant:"destructive",onClick:()=>{const P=j.role;P.id&&o({id:P.id,label:P.label})},children:[s.jsx(Bt,{size:16}),e("settings.roles.delete")]})})]}),cellClassName:"w-12 shrink-0"},t[50]=e,t[51]=B):B=t[51];let H;t[52]!==k||t[53]!==L||t[54]!==K||t[55]!==U||t[56]!==B?(H=[k,L,K,U,B],t[52]=k,t[53]=L,t[54]=K,t[55]=U,t[56]=B,t[57]=H):H=t[57];const J=H;let te;t[58]!==p?(te=j=>{if(j.kind==="builtin")p(`builtin-${j.role.role}`);else{const P=j.role;p(P.id)}},t[58]=p,t[59]=te):te=t[59];const oe=te;if(R){let j;t[60]!==p?(j=()=>p(void 0),t[60]=p,t[61]=j):j=t[61];let P;return t[62]!==x||t[63]!==p?(P=()=>{x(),p(void 0)},t[62]=x,t[63]=p,t[64]=P):P=t[64],s.jsx(zs,{target:R,onBack:j,onSaved:P},Fs(R))}let $;t[65]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(ss,{group:"members"}),t[65]=$):$=t[65];let Z;t[66]!==e?(Z=e("settings.roles.searchPlaceholder"),t[66]=e,t[67]=Z):Z=t[67];let T;t[68]===Symbol.for("react.memo_cache_sentinel")?(T=j=>{j.key==="Escape"&&(n(""),j.target.blur())},t[68]=T):T=t[68];let w;t[69]!==l||t[70]!==Z?(w=s.jsx($e,{value:l,onChange:n,placeholder:Z,className:"w-full md:w-[375px]",onKeyDown:T}),t[69]=l,t[70]=Z,t[71]=w):w=t[71];let Q;t[72]!==p?(Q=()=>p("new"),t[72]=p,t[73]=Q):Q=t[73];let W;t[74]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Ye,{size:16}),t[74]=W):W=t[74];let se;t[75]!==e?(se=e("settings.roles.createRole"),t[75]=e,t[76]=se):se=t[76];let le;t[77]!==Q||t[78]!==se?(le=s.jsxs(ce,{onClick:Q,children:[W,se]}),t[77]=Q,t[78]=se,t[79]=le):le=t[79];let ne;t[80]!==w||t[81]!==le?(ne=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[w,le]}),t[80]=w,t[81]=le,t[82]=ne):ne=t[82];let ue;t[83]!==l||t[84]!==e?(ue=l?s.jsx(et,{title:e("settings.roles.noRolesFound"),description:e("settings.roles.noRolesMatchSearch",{search:l})}):s.jsx(et,{title:e("settings.roles.noRoles"),description:e("settings.roles.createRoleGetStarted")}),t[83]=l,t[84]=e,t[85]=ue):ue=t[85];let fe;t[86]!==A||t[87]!==J||t[88]!==oe||t[89]!==ue?(fe=s.jsx(Vt,{columns:J,data:A,isLoading:!1,onRowClick:oe,emptyState:ue}),t[86]=A,t[87]=J,t[88]=oe,t[89]=ue,t[90]=fe):fe=t[90];let ge;t[91]!==ne||t[92]!==fe?(ge=s.jsx(ae.Content,{children:s.jsx(ae.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[$,ne,fe]})})}),t[91]=ne,t[92]=fe,t[93]=ge):ge=t[93];const Be=i!==null;let we;t[94]===Symbol.for("react.memo_cache_sentinel")?(we=j=>!j&&o(null),t[94]=we):we=t[94];let he;t[95]!==e?(he=e("settings.roles.deleteRoleTitle"),t[95]=e,t[96]=he):he=t[96];let xe;t[97]!==he?(xe=s.jsx(ut,{children:he}),t[97]=he,t[98]=xe):xe=t[98];const Ve=i?.label??"";let pe;t[99]!==e||t[100]!==Ve?(pe=e("settings.roles.deleteRoleConfirm",{role:Ve}),t[99]=e,t[100]=Ve,t[101]=pe):pe=t[101];let Te;t[102]!==pe?(Te=s.jsx(ft,{children:pe}),t[102]=pe,t[103]=Te):Te=t[103];let _e;t[104]!==xe||t[105]!==Te?(_e=s.jsxs(gt,{children:[xe,Te]}),t[104]=xe,t[105]=Te,t[106]=_e):_e=t[106];let Ee;t[107]!==e?(Ee=e("settings.roles.cancel"),t[107]=e,t[108]=Ee):Ee=t[108];let Ie;t[109]!==Ee?(Ie=s.jsx(ht,{children:Ee}),t[109]=Ee,t[110]=Ie):Ie=t[110];let Re;t[111]!==r||t[112]!==i?(Re=()=>{i?.id&&r.mutate(i.id),o(null)},t[111]=r,t[112]=i,t[113]=Re):Re=t[113];let Se;t[114]!==e?(Se=e("settings.roles.delete"),t[114]=e,t[115]=Se):Se=t[115];let Ne;t[116]!==Re||t[117]!==Se?(Ne=s.jsx(xt,{onClick:Re,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Se}),t[116]=Re,t[117]=Se,t[118]=Ne):Ne=t[118];let Ae;t[119]!==Ie||t[120]!==Ne?(Ae=s.jsxs(pt,{children:[Ie,Ne]}),t[119]=Ie,t[120]=Ne,t[121]=Ae):Ae=t[121];let Ce;t[122]!==_e||t[123]!==Ae?(Ce=s.jsxs(mt,{children:[_e,Ae]}),t[122]=_e,t[123]=Ae,t[124]=Ce):Ce=t[124];let be;t[125]!==Be||t[126]!==Ce?(be=s.jsx(dt,{open:Be,onOpenChange:we,children:Ce}),t[125]=Be,t[126]=Ce,t[127]=be):be=t[127];let Ge;return t[128]!==ge||t[129]!==be?(Ge=s.jsxs(ae,{children:[ge,be]}),t[128]=ge,t[129]=be,t[130]=Ge):Ge=t[130],Ge}function Zs(t){return t.stopPropagation()}function qs(t){return t.stopPropagation()}function Js(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Ws(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:q("size-2.5 rounded-full shrink-0",ct(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(at,{size:12,className:"text-muted-foreground shrink-0"})]})}function Xs(t,e){Ke("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),je.error(t instanceof Error?t.message:"Failed to delete role")}function el(){const t=X.c(7),e=ie();let l;t[0]!==e?(l=e("settings.roles.failedToLoad"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n=s.jsx(ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:l})})}),t[2]=l,t[3]=n):n=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(F.Suspense,{fallback:s.jsx(ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Hs,{})}),t[4]=i):i=t[4];let o;return t[5]!==n?(o=s.jsx(Mt,{fallback:n,children:i}),t[5]=n,t[6]=o):o=t[6],o}function ko(){const t=X.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx($s,{area:"roles",children:s.jsx(el,{})}),t[0]=e):e=t[0],e}export{ko as default};
|