decocms 4.149.6 → 4.150.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Dq3WjiEJ.js → AlertCircle-IJmjpKVT.js} +1 -1
- package/dist/client/assets/{AreaChart-B-nTjrAx.js → AreaChart-CsSt3Ffl.js} +1 -1
- package/dist/client/assets/{ArrowUp-5hFEweXq.js → ArrowUp-C2tlTO3l.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-joowW-C5.js → ArrowUpRight-4F57Lk7S.js} +1 -1
- package/dist/client/assets/{Check-qxVfMARc.js → Check-BvYNH1rl.js} +1 -1
- package/dist/client/assets/{CheckCircle-asKx-P0w.js → CheckCircle-DMffaHyd.js} +1 -1
- package/dist/client/assets/{ChevronDown-e1-U-GuJ.js → ChevronDown-qlGComot.js} +1 -1
- package/dist/client/assets/{ChevronRight-BBTu-8S3.js → ChevronRight-DFM2dJFG.js} +1 -1
- package/dist/client/assets/{ChevronUp-sCAKY-xq.js → ChevronUp-CLwm_TLQ.js} +1 -1
- package/dist/client/assets/{Copy01-D5KM45B8.js → Copy01-DZ6JXTl3.js} +1 -1
- package/dist/client/assets/CpuChip01-DezS9pWz.js +1 -0
- package/dist/client/assets/{DotsVertical-D9Tqe4NW.js → DotsVertical-B99-HyA3.js} +1 -1
- package/dist/client/assets/{Eye-Dp-Mi9OG.js → Eye-DzO88CAI.js} +1 -1
- package/dist/client/assets/{FilterLines-FFxKsijU.js → FilterLines-C5jd3C8i.js} +1 -1
- package/dist/client/assets/{HardDrive-BdTCtFl3.js → HardDrive-CjW5bDcH.js} +1 -1
- package/dist/client/assets/{Key01-D8-RvxFO.js → Key01--Nnm1a4t.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Bx_rpAKD.js → LayoutLeft-2P5XT851.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cnx8YByp.js → LinkExternal01-B8kvSrxF.js} +1 -1
- package/dist/client/assets/{LogOut01-CFjw7N9j.js → LogOut01-BuSJaVb9.js} +1 -1
- package/dist/client/assets/{Monitor01-BVloJrIj.js → Monitor01-COOylDtp.js} +1 -1
- package/dist/client/assets/{Palette-CBZCTOFO.js → Palette-CKcNQUAm.js} +1 -1
- package/dist/client/assets/{Play-DmT_WIMA.js → Play-DzA2qR5q.js} +1 -1
- package/dist/client/assets/{Plus-ZpX9WmDD.js → Plus-pZvnki_c.js} +1 -1
- package/dist/client/assets/{SearchLg-C4sVe0kR.js → SearchLg-BgGVJVIw.js} +1 -1
- package/dist/client/assets/{SearchMd-95D3LDtT.js → SearchMd-DZaMM6v7.js} +1 -1
- package/dist/client/assets/{Settings02-Vn36Nz-O.js → Settings02-1roscMFV.js} +1 -1
- package/dist/client/assets/{Shield01-CgDNV0PO.js → Shield01-DWRuqL6C.js} +1 -1
- package/dist/client/assets/{Star01-B6iNea3E.js → Star01--BsTp32C.js} +1 -1
- package/dist/client/assets/{Stars01-Dhu1azXB.js → Stars01-DW0rK_bk.js} +1 -1
- package/dist/client/assets/{Stars02-RfkiFS-R.js → Stars02-BYv7I-Em.js} +1 -1
- package/dist/client/assets/{Sun-Bplz7qPS.js → Sun-Dbyfqrsc.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-qIK6-vj3.js → SwitchHorizontal01-DAuSzq57.js} +1 -1
- package/dist/client/assets/{Tool01-CSu_r-q6.js → Tool01-Cfs3CtoQ.js} +1 -1
- package/dist/client/assets/{Tool02-C7v0SFCB.js → Tool02-D4dbkOxz.js} +1 -1
- package/dist/client/assets/{Trash01-g8BP4GVQ.js → Trash01-C0mGcOc6.js} +1 -1
- package/dist/client/assets/{TrendUp01-eR8W-77t.js → TrendUp01-B7tcZJAc.js} +1 -1
- package/dist/client/assets/{Upload01-DnrfGhvH.js → Upload01-DiEaVC1q.js} +1 -1
- package/dist/client/assets/{User01-BpaY3mYf.js → User01-B_lGNwZm.js} +1 -1
- package/dist/client/assets/{Users01-BJlhJb2g.js → Users01-OgXJArc7.js} +1 -1
- package/dist/client/assets/{Users03-l3anhVFn.js → Users03-CMtEgESH.js} +1 -1
- package/dist/client/assets/{X-9WQSG5hH.js → X-DT1P6K8G.js} +1 -1
- package/dist/client/assets/{XCircle-C0NcnpbU.js → XCircle-CqnlguBB.js} +1 -1
- package/dist/client/assets/{XClose-Dl7-u4Iu.js → XClose-BFQ6zhKu.js} +1 -1
- package/dist/client/assets/{Zap-BbdbOIdc.js → Zap-wTRz_nAE.js} +1 -1
- package/dist/client/assets/ZapSquare-NqdMOl-w.js +1 -0
- package/dist/client/assets/{access-gate-By-4JO-o.js → access-gate-Dzi2NJQu.js} +1 -1
- package/dist/client/assets/{add-section-modal-BN30Bar9.js → add-section-modal-CyVehn3B.js} +1 -1
- package/dist/client/assets/agent-icon-D3T9rpC1.js +1 -0
- package/dist/client/assets/agents-list-CdQxzeTS.js +1 -0
- package/dist/client/assets/{ai-providers-Cm0dXDPE.js → ai-providers-wTN6TcAE.js} +1 -1
- package/dist/client/assets/{alert-YLQI9fN7.js → alert-_6S_59CD.js} +1 -1
- package/dist/client/assets/{alert-dialog-lWVONnNL.js → alert-dialog-ugMudVnl.js} +1 -1
- package/dist/client/assets/app-editor-jJxkS7aa.js +1 -0
- package/dist/client/assets/{auth-BKg8KB4Q.js → auth-FjztTWAP.js} +1 -1
- package/dist/client/assets/{auth-catchall-DR66W1mO.js → auth-catchall-DgHvN0fY.js} +1 -1
- package/dist/client/assets/{auth-entry-CNhTCeZL.js → auth-entry-D1j8rpGa.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BoYLdXts.js → auth-split-layout-CPvpm6Ej.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B1Tlj1JC.js → authenticate-and-persist-oauth-C0ltJe6h.js} +1 -1
- package/dist/client/assets/{automation-list-row-BOCKdejq.js → automation-list-row-uDknS-o2.js} +1 -1
- package/dist/client/assets/{automation-runs-BbHHbX_e.js → automation-runs-Vw3nDjb-.js} +1 -1
- package/dist/client/assets/automations-C0ywD7_n.js +1 -0
- package/dist/client/assets/{avatar-Cqm3Lq4j.js → avatar-D4pBRF5y.js} +1 -1
- package/dist/client/assets/{badge-Dn-iMFnd.js → badge-DzMHjA7x.js} +1 -1
- package/dist/client/assets/{block-document-dvTSh6dF.js → block-document-B5JyPVwr.js} +1 -1
- package/dist/client/assets/{brand-context-OQ4qiW_D.js → brand-context-LOQPKZV1.js} +1 -1
- package/dist/client/assets/{buckets-CF8VmWZX.js → buckets-DBiVluA4.js} +1 -1
- package/dist/client/assets/bulk-category-panel-BWAY4aOe.js +1 -0
- package/dist/client/assets/{calendar-Dw4fmCzc.js → calendar-CAMhxb40.js} +1 -1
- package/dist/client/assets/{capability-load-error-B7Gug_ai.js → capability-load-error-BPqtHAhC.js} +1 -1
- package/dist/client/assets/{card-B4X8T5VG.js → card-D_BNOlMb.js} +1 -1
- package/dist/client/assets/category-editor-CtAOXjhJ.js +1 -0
- package/dist/client/assets/{chat-context-DyvKnksd.js → chat-context-B_jEtsVj.js} +1 -1
- package/dist/client/assets/{checkbox-CcdD9hyv.js → checkbox-CyiTEyiu.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DMY2fPhY.js → cli-auth-success-BfZob_-M.js} +1 -1
- package/dist/client/assets/collection-detail-togasrWh.js +1 -0
- package/dist/client/assets/{collection-display-button-Sp3ecRXl.js → collection-display-button-CGEHzdUV.js} +1 -1
- package/dist/client/assets/{collection-search-kogdFX9E.js → collection-search-DRGWd4Mi.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-NjFiGSWD.js → collection-table-wrapper-Dca1sw0E.js} +1 -1
- package/dist/client/assets/{collection-tabs-SfyxjJ1V.js → collection-tabs-m-TP2bfj.js} +1 -1
- package/dist/client/assets/{command-YBlMu_ai.js → command-CegXcN5G.js} +1 -1
- package/dist/client/assets/commerce-onboarding-CaqTzfJM.js +1 -0
- package/dist/client/assets/{companions-core-BLY1ba6m.js → companions-core-2s0PH1mz.js} +1 -1
- package/dist/client/assets/{connect-Be1bOrCG.js → connect-CYe_R6HT.js} +1 -1
- package/dist/client/assets/{connection-DzWf3enH.js → connection-Dln54rP7.js} +1 -1
- package/dist/client/assets/{connection-card-CM5pZnY-.js → connection-card-Dy7bApk_.js} +1 -1
- package/dist/client/assets/connection-detail-D0as2qYd.js +1 -0
- package/dist/client/assets/{connection-form-helpers-B3UhdWRQ.js → connection-form-helpers-DCUptRCJ.js} +1 -1
- package/dist/client/assets/connections-BSeAR-ag.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-CgnyrQVH.js → decopilot-sse-pool-COoSoz3Z.js} +1 -1
- package/dist/client/assets/{dialog-S6zU-X1o.js → dialog-CMly2TKR.js} +1 -1
- package/dist/client/assets/{domain-settings-B3oIP9FI.js → domain-settings-BvUfESFo.js} +1 -1
- package/dist/client/assets/{drawer-CQnxFo4h.js → drawer-S8vK89en.js} +1 -1
- package/dist/client/assets/{dropdown-menu-6Z0gFMED.js → dropdown-menu-BRwiBzwP.js} +1 -1
- package/dist/client/assets/{empty-state-COuzTPqh.js → empty-state-O9HiA35s.js} +1 -1
- package/dist/client/assets/{extract-connection-data-cNElALED.js → extract-connection-data-Uh0N40Dd.js} +1 -1
- package/dist/client/assets/file-explorer-WuV7Vsc6.js +2 -0
- package/dist/client/assets/{form-CIpF7vgQ.js → form-DMlMwvcn.js} +1 -1
- package/dist/client/assets/general-CdUrc8bR.js +1 -0
- package/dist/client/assets/{github-repo-picker-TiUDTq3i.js → github-repo-picker-BYvURFXz.js} +1 -1
- package/dist/client/assets/{hooks-DHZH9aGB.js → hooks-CIvOYtKw.js} +1 -1
- package/dist/client/assets/{index-CgcZ4SGk.js → index-Bv9TjgJl.js} +1 -1
- package/dist/client/assets/{index-Cg2H39JI.js → index-BzEobEdn.js} +1 -1
- package/dist/client/assets/{index-DvqSQIGZ.js → index-CRmpo5gY.js} +3 -3
- package/dist/client/assets/index-CSDLUMnM.js +1 -0
- package/dist/client/assets/{index--X-_IuJt.js → index-CcfIvrhR.js} +1 -1
- package/dist/client/assets/{index-C18CjY9m.js → index-CjjQTWDU.js} +2 -2
- package/dist/client/assets/{index-E1eNQIog.js → index-D6PKy4-S.js} +1 -1
- package/dist/client/assets/{index-nTAcDhrG.js → index-DZXNvhiV.js} +1 -1
- package/dist/client/assets/{index-CXWWJmED.js → index-JWloVd9r.js} +18 -18
- package/dist/client/assets/{index-gOR0IO0m.js → index-dY_DzNOt.js} +1 -1
- package/dist/client/assets/{index-DuveA0RN.js → index-kHaMfliM.js} +36 -36
- package/dist/client/assets/{index-redirect-CKCQOv9k.js → index-redirect-BDUqkpk0.js} +1 -1
- package/dist/client/assets/{input-boqiKbt5.js → input-DaFby44N.js} +1 -1
- package/dist/client/assets/{integration-icon-CIE0aLCY.js → integration-icon-C05NWkmM.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DnZikhEH.js → invite-member-dialog-D9OIX42m.js} +1 -1
- package/dist/client/assets/{label-DfOap5yU.js → label-CKvyq8oN.js} +1 -1
- package/dist/client/assets/{layout-BI6y6iNU.js → layout-FohHt1Bq.js} +1 -1
- package/dist/client/assets/{login-Bxz1oEzH.js → login-CYastMG-.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CKM-_P-X.js → mcp-oauth-C1OfyYd0.js} +1 -1
- package/dist/client/assets/{members-C5y1dFR4.js → members-I391ImS6.js} +1 -1
- package/dist/client/assets/{monaco-editor-BRq76hge.js → monaco-editor-DMTpR_1L.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BLHDtrTQ.js → monitoring-stats-row-CWrT93pn.js} +1 -1
- package/dist/client/assets/{multi-select-RZvwXwrz.js → multi-select-BMh9Hri8.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Bw98D_pD.js → oauth-callback-ai-provider-kuzfrnMG.js} +1 -1
- package/dist/client/assets/{oauth-callback-ByicHq3C.js → oauth-callback-tMKjfOlV.js} +1 -1
- package/dist/client/assets/{onboarding-spuHZ0NH.js → onboarding-JW17pxMv.js} +1 -1
- package/dist/client/assets/{org-install-BGrmsO9g.js → org-install-C17L1X42.js} +1 -1
- package/dist/client/assets/{org-layout-DcwVQlX4.js → org-layout-D_bufhMe.js} +1 -1
- package/dist/client/assets/{organization-choice-C2JAi_ED.js → organization-choice-C_JRYa-j.js} +1 -1
- package/dist/client/assets/{orgs--jYXD7u1.js → orgs-C3Y88dD2.js} +1 -1
- package/dist/client/assets/{page-seo-form-pKdIo57G.js → page-seo-form-qqJ9n201.js} +1 -1
- package/dist/client/assets/{popover-BtPGwDNE.js → popover-CZLjKDPC.js} +1 -1
- package/dist/client/assets/post-editor-BOX_ISsd.js +1 -0
- package/dist/client/assets/{primitives-DdoQa3QE.js → primitives-gT2wx7zA.js} +1 -1
- package/dist/client/assets/{profile-fiZ91Xp9.js → profile-C1Zcf6T8.js} +1 -1
- package/dist/client/assets/project-app-view-9Hw-SsCB.js +1 -0
- package/dist/client/assets/record-editor-C8jMTyiJ.js +1 -0
- package/dist/client/assets/redirect-editor-Bfdn40ZF.js +1 -0
- package/dist/client/assets/registry-CFGSOKut.js +2 -0
- package/dist/client/assets/{registry-layout-DaOGMHqm.js → registry-layout-wp12NR_f.js} +1 -1
- package/dist/client/assets/{reports-DHNztBYl.js → reports-BRorJDuK.js} +1 -1
- package/dist/client/assets/{require-capability-Co5c18xf.js → require-capability-6G5-qWg-.js} +1 -1
- package/dist/client/assets/{required-auth-layout-lByVfD5H.js → required-auth-layout-8QEtE2mn.js} +1 -1
- package/dist/client/assets/{reset-password-DADQiRrh.js → reset-password-DwcVKSUM.js} +1 -1
- package/dist/client/assets/roles-KWNtYOHg.js +1 -0
- package/dist/client/assets/{search-input-BDo6-Pt1.js → search-input-CPKxngm8.js} +1 -1
- package/dist/client/assets/{secrets-C-C_o8Bt.js → secrets-DuQnZa47.js} +1 -1
- package/dist/client/assets/{sections-editor-YetzsJwI.js → sections-editor-C2Ym19PB.js} +2 -2
- package/dist/client/assets/{select-BzIcrZmY.js → select-DE4pNdd0.js} +1 -1
- package/dist/client/assets/select-model-DvakKq4v.js +4 -0
- package/dist/client/assets/{self-tool-result-Bv9KK_AD.js → self-tool-result-Dg7qWgBS.js} +1 -1
- package/dist/client/assets/seo-editor-CjgCoccg.js +1 -0
- package/dist/client/assets/settings-layout-DQ_EGK-E.js +1 -0
- package/dist/client/assets/{settings-section-kinXnNNm.js → settings-section-mlnTDqDn.js} +1 -1
- package/dist/client/assets/{shell-controls-BMudmoTG.js → shell-controls-BN5hGZD_.js} +1 -1
- package/dist/client/assets/shell-layout-DtY7bfra.js +1 -0
- package/dist/client/assets/{sidebar-D1q5weH4.js → sidebar-DXWcBNj-.js} +1 -1
- package/dist/client/assets/{skeleton-DfWmK_Y8.js → skeleton-BdXZaY9b.js} +1 -1
- package/dist/client/assets/{sso-Dma7NHaa.js → sso-nzl68L86.js} +1 -1
- package/dist/client/assets/{store-D8fbZLHn.js → store-DwEnoqSm.js} +1 -1
- package/dist/client/assets/store-registry-D_UnQuCQ.js +2 -0
- package/dist/client/assets/{studio-tools-CTvMzhHZ.js → studio-tools-ya-TDG1i.js} +1 -1
- package/dist/client/assets/{switch-Ck7aTeHo.js → switch-iBKk4OED.js} +1 -1
- package/dist/client/assets/tab-id-DSxQzIlX.js +1 -0
- package/dist/client/assets/{table-Dr5WgajV.js → table-DHNHRYF8.js} +1 -1
- package/dist/client/assets/{tabs-Bp95nj86.js → tabs-BMZHPf22.js} +1 -1
- package/dist/client/assets/{textarea-B0wrekwX.js → textarea-CtxSm0ZO.js} +1 -1
- package/dist/client/assets/{toggle-group-AX7GMgVr.js → toggle-group-XGw8bKDe.js} +1 -1
- package/dist/client/assets/{toolbar-C0vQI8SC.js → toolbar-BhosHOk4.js} +1 -1
- package/dist/client/assets/{tooltip-gZsEQkQ4.js → tooltip-B6xsI3hT.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C8J33FgM.js → use-ai-providers-9mn0wXSc.js} +1 -1
- package/dist/client/assets/{use-automations-FgqBXimw.js → use-automations-CoeOp3-Q.js} +1 -1
- package/dist/client/assets/{use-autosave-D5qpnRyv.js → use-autosave-T_9Jyt7O.js} +1 -1
- package/dist/client/assets/{use-capability-DSXju304.js → use-capability-CmNhj0C_.js} +1 -1
- package/dist/client/assets/{use-clock-tick-D7wjISi9.js → use-clock-tick-DGzO9FOq.js} +1 -1
- package/dist/client/assets/{use-connection-5V9ysZDz.js → use-connection-GdHGbOB6.js} +1 -1
- package/dist/client/assets/{use-copy-DwMjsVFX.js → use-copy-DsqwagsI.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D-HE681o.js → use-create-virtual-mcp-DHW9cNR5.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-yMskey-B.js → use-debounced-autosave-iT9tbZa2.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Do7XX3ss.js → use-debounced-value-BUwT2CIg.js} +1 -1
- package/dist/client/assets/{use-deco-credits-gC1IJXsk.js → use-deco-credits-DVz1NktE.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CeCOBA6F.js → use-decopilot-events-D28C0E4R.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B_3WZuBR.js → use-delete-connection-CAyFUB5z.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-pptP7LNT.js → use-deployment-admin-D2oy4S9_.js} +1 -1
- package/dist/client/assets/{use-file-configs-BV4ALFV5.js → use-file-configs-BFRO__jv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BQjvXdPz.js → use-infinite-scroll-DqXxBHuE.js} +1 -1
- package/dist/client/assets/{use-join-requests-CzxtXa1_.js → use-join-requests-DsGcMujv.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Df8Z4xSe.js → use-mcp-auth-status-BKkv61mn.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C66yIlAd.js → use-mcp-client-BbBKVR-1.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B0oPBVvy.js → use-mcp-tools-Bn-ozYzu.js} +1 -1
- package/dist/client/assets/{use-members-yG-yZAF7.js → use-members-DWJr0krY.js} +1 -1
- package/dist/client/assets/{use-mobile-5SOdKrGk.js → use-mobile-DOGpTW1b.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Cp0ofdA2.js → use-navigate-to-agent-CmvKo-ti.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-_My7JqZY.js → use-org-auth-client-Bsr9EOH6.js} +1 -1
- package/dist/client/assets/{use-org-sso-DpN_CP64.js → use-org-sso-C1NAv7BA.js} +1 -1
- package/dist/client/assets/{use-organization-roles-qiwXKsX5.js → use-organization-roles-CRU5ztEk.js} +1 -1
- package/dist/client/assets/{use-organization-settings-0GX_RgcP.js → use-organization-settings-ClBp_Put.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DRFd-vEw.js → use-registry-connections-DzrjC3Cx.js} +1 -1
- package/dist/client/assets/{use-secrets-Crn3uZRK.js → use-secrets-BIOTjG67.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DvGgswK8.js → use-status-sounds-Dolt2rLt.js} +1 -1
- package/dist/client/assets/{use-tags-dvoKIzN1.js → use-tags-9CTiyzj3.js} +1 -1
- package/dist/client/assets/{use-view-mode-Cj5GH6Ff.js → use-view-mode-DqtPHFrP.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-zisjRgmS.js → use-virtual-mcp-Dl_2IGTJ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CJ7C2y45.js +1 -0
- package/dist/client/assets/{useQueries-DgSNUKr1.js → useQueries-CAO2nTn4.js} +1 -1
- package/dist/client/assets/{useRouterState-C6ZTwoUL.js → useRouterState-DirH3Gg7.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C80SXcbY.js +1 -0
- package/dist/client/assets/{users-fvoOrysV.js → users-Cf4IoVFm.js} +1 -1
- package/dist/client/assets/variant-calendar-BctHVLZ5.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BQG_J_5h.js → view-mode-toggle-C9WdpCq6.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/ZapSquare-BqtHYgtB.js +0 -1
- package/dist/client/assets/agent-icon-Cm6sZdRT.js +0 -1
- package/dist/client/assets/agents-list-BUgr1hav.js +0 -1
- package/dist/client/assets/app-editor-ljQPDR3G.js +0 -1
- package/dist/client/assets/automations-CkfZzB79.js +0 -1
- package/dist/client/assets/bulk-category-panel-CZisl2ea.js +0 -1
- package/dist/client/assets/category-editor-DkhV5mKx.js +0 -1
- package/dist/client/assets/collection-detail-Ci_4bXR8.js +0 -1
- package/dist/client/assets/commerce-onboarding-vJjbRJ6-.js +0 -1
- package/dist/client/assets/connection-detail-CeURNEnm.js +0 -1
- package/dist/client/assets/connections-BqK2NucS.js +0 -1
- package/dist/client/assets/file-explorer-g9e5GYsb.js +0 -2
- package/dist/client/assets/general-CBQd18e0.js +0 -1
- package/dist/client/assets/index-BygPN3qk.js +0 -1
- package/dist/client/assets/post-editor-DPXxoCoz.js +0 -1
- package/dist/client/assets/project-app-view-CoYAIu-F.js +0 -1
- package/dist/client/assets/record-editor-nkfMWlpb.js +0 -1
- package/dist/client/assets/redirect-editor-BIuFC300.js +0 -1
- package/dist/client/assets/registry-Ckii7P7G.js +0 -2
- package/dist/client/assets/roles-D2MwEeXZ.js +0 -1
- package/dist/client/assets/select-model-B7suGfbk.js +0 -4
- package/dist/client/assets/seo-editor-2qChhEJP.js +0 -1
- package/dist/client/assets/settings-layout-CpRZ7TSL.js +0 -1
- package/dist/client/assets/shell-layout-iBF19CF5.js +0 -1
- package/dist/client/assets/store-registry-COaoSZXt.js +0 -2
- package/dist/client/assets/tab-id-m51PiwPd.js +0 -1
- package/dist/client/assets/useInfiniteQuery-C3YlsjqB.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DGBuv3Vr.js +0 -1
- package/dist/client/assets/variant-calendar-hDYLzpME.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,b as A,j as r}from"./index-CXWWJmED.js";import{I as O}from"./input-boqiKbt5.js";import{L as F}from"./label-DfOap5yU.js";import{S as R,a as z,b as V,c as D,d as J}from"./select-BzIcrZmY.js";import{T as M}from"./textarea-B0wrekwX.js";import{O as Q,P as Y,Q as $,I as q,T as G,Y as H}from"./index-DuveA0RN.js";import{s as I}from"./primitives-DdoQa3QE.js";import{u as U}from"./use-autosave-D5qpnRyv.js";import"./tooltip-gZsEQkQ4.js";import"./Check-qxVfMARc.js";import"./ChevronDown-e1-U-GuJ.js";import"./ChevronUp-sCAKY-xq.js";import"./ArrowUp-5hFEweXq.js";import"./chat-context-DyvKnksd.js";import"./tab-id-m51PiwPd.js";import"./hooks-DHZH9aGB.js";import"./use-mcp-client-C66yIlAd.js";import"./auth-BKg8KB4Q.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CgnyrQVH.js";import"./studio-tools-CTvMzhHZ.js";import"./use-virtual-mcp-zisjRgmS.js";import"./use-ai-providers-C8J33FgM.js";import"./use-decopilot-events-CeCOBA6F.js";import"./use-organization-settings-0GX_RgcP.js";import"./automation-runs-BbHHbX_e.js";import"./useInfiniteQuery-C3YlsjqB.js";import"./use-infinite-scroll-BQjvXdPz.js";import"./use-connection-5V9ysZDz.js";import"./card-B4X8T5VG.js";import"./sidebar-D1q5weH4.js";import"./LayoutLeft-Bx_rpAKD.js";import"./use-mobile-5SOdKrGk.js";import"./X-9WQSG5hH.js";import"./table-Dr5WgajV.js";import"./empty-state-COuzTPqh.js";import"./use-members-yG-yZAF7.js";import"./use-org-auth-client-_My7JqZY.js";import"./use-clock-tick-D7wjISi9.js";import"./AlertCircle-Dq3WjiEJ.js";import"./CheckCircle-asKx-P0w.js";import"./DotsVertical-D9Tqe4NW.js";import"./agent-icon-Cm6sZdRT.js";import"./Tool01-CSu_r-q6.js";import"./Settings02-Vn36Nz-O.js";import"./Tool02-C7v0SFCB.js";import"./XCircle-C0NcnpbU.js";import"./ArrowUpRight-joowW-C5.js";import"./TrendUp01-eR8W-77t.js";import"./ZapSquare-BqtHYgtB.js";import"./Users03-l3anhVFn.js";import"./ChevronRight-BBTu-8S3.js";import"./Stars02-RfkiFS-R.js";import"./Copy01-D5KM45B8.js";import"./Eye-Dp-Mi9OG.js";import"./FilterLines-FFxKsijU.js";import"./Star01-B6iNea3E.js";import"./Palette-CBZCTOFO.js";import"./SwitchHorizontal01-qIK6-vj3.js";import"./HardDrive-BdTCtFl3.js";import"./Key01-D8-RvxFO.js";import"./LinkExternal01-Cnx8YByp.js";import"./LogOut01-CFjw7N9j.js";import"./Monitor01-BVloJrIj.js";import"./Sun-Bplz7qPS.js";import"./Play-DmT_WIMA.js";import"./Plus-ZpX9WmDD.js";import"./SearchLg-C4sVe0kR.js";import"./SearchMd-95D3LDtT.js";import"./Shield01-CgDNV0PO.js";import"./Stars01-Dhu1azXB.js";import"./Trash01-g8BP4GVQ.js";import"./Upload01-DnrfGhvH.js";import"./User01-BpaY3mYf.js";import"./Users01-BJlhJb2g.js";import"./XClose-Dl7-u4Iu.js";import"./Zap-BbdbOIdc.js";import"./use-automations-FgqBXimw.js";import"./useSuspenseInfiniteQuery-DGBuv3Vr.js";import"./avatar-Cqm3Lq4j.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DwMjsVFX.js";import"./dialog-S6zU-X1o.js";import"./monaco-editor-BRq76hge.js";import"./index-gOR0IO0m.js";import"./calendar-Dw4fmCzc.js";import"./shell-layout-iBF19CF5.js";import"./required-auth-layout-lByVfD5H.js";import"./use-org-sso-DpN_CP64.js";import"./integration-icon-CIE0aLCY.js";import"./use-navigate-to-agent-Cp0ofdA2.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-B-nTjrAx.js";import"./form-CIpF7vgQ.js";import"./drawer-CQnxFo4h.js";import"./collection-search-kogdFX9E.js";import"./index-DvqSQIGZ.js";import"./get-initials-D-f_fDFw.js";import"./popover-BtPGwDNE.js";import"./dropdown-menu-6Z0gFMED.js";import"./github-repo-picker-TiUDTq3i.js";import"./use-debounced-value-Do7XX3ss.js";import"./authenticate-and-persist-oauth-B1Tlj1JC.js";import"./mcp-oauth-CKM-_P-X.js";import"./use-mcp-tools-B0oPBVvy.js";import"./extract-connection-data-cNElALED.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-DWINBxtd.js";import"./use-tags-dvoKIzN1.js";import"./command-YBlMu_ai.js";import"./index-CgcZ4SGk.js";import"./companions-core-BLY1ba6m.js";import"./tabs-Bp95nj86.js";import"./toggle-group-AX7GMgVr.js";import"./use-deco-credits-gC1IJXsk.js";import"./alert-dialog-lWVONnNL.js";import"./toolbar-C0vQI8SC.js";import"./skeleton-DfWmK_Y8.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-CM5pZnY-.js";import"./use-registry-connections-DRFd-vEw.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-B3UhdWRQ.js";import"./collection-tabs-SfyxjJ1V.js";import"./badge-Dn-iMFnd.js";import"./select-model-B7suGfbk.js";import"./checkbox-CcdD9hyv.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-kinXnNNm.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DvGgswK8.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-DSXju304.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-Df8Z4xSe.js";import"./use-debounced-autosave-yMskey-B.js";import"./index-Cg2H39JI.js";import"./search-input-BDo6-Pt1.js";import"./switch-Ck7aTeHo.js";import"./use-secrets-Crn3uZRK.js";import"./useQueries-DgSNUKr1.js";import"./use-file-configs-BV4ALFV5.js";import"./automation-list-row-BOCKdejq.js";const W={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"}]},X={authors:"sandbox.recordEditor.titleAuthor"};function Rr(C){const t=L.c(40),{orgSlug:K,virtualMcpId:h,branch:w,kind:a,blockKey:g,block:P}=C,e=A(),f=Q(h);let b;t[0]!==w||t[1]!==K||t[2]!==f||t[3]!==h?(b={orgSlug:K,virtualMcpId:h,branch:w,packagePath:f},t[0]=w,t[1]=K,t[2]=f,t[3]=h,t[4]=b):b=t[4];const p=Y(b);let k;t[5]!==P||t[6]!==a?(k=$(P,a),t[5]=P,t[6]=a,t[7]=k):k=t[7];const B=k;let v;t[8]!==g||t[9]!==a||t[10]!==p?(v=l=>{p.mutate({blockKey:g,data:G(g,a,l)})},t[8]=g,t[9]=a,t[10]=p,t[11]=v):v=t[11];const[i,S]=U(B,v);let j;t[12]!==i||t[13]!==S?(j=(l,o)=>S({...i,[l]:o}),t[12]=i,t[13]=S,t[14]=j):j=t[14];const s=j,T=X[a];let n;t[15]!==e||t[16]!==T?(n=e(T),t[15]=e,t[16]=T,t[17]=n):n=t[17];let c;t[18]!==n?(c=r.jsx("span",{className:"text-sm font-medium",children:n}),t[18]=n,t[19]=c):c=t[19];let d;t[20]!==p.isError||t[21]!==p.isPending?(d=r.jsx(q,{isPending:p.isPending,isError:p.isError}),t[20]=p.isError,t[21]=p.isPending,t[22]=d):d=t[22];let y;t[23]!==c||t[24]!==d?(y=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,d]}),t[23]=c,t[24]=d,t[25]=y):y=t[25];const N=W[a];let x;if(t[26]!==i||t[27]!==s||t[28]!==e||t[29]!==N){let l;t[31]!==i||t[32]!==s||t[33]!==e?(l=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(H,{schema:{type:"string",format:"image-uri",title:e(o.labelKey)},value:i[o.key],onChange:m=>s(o.key,m),path:o.key,label:e(o.labelKey)}):o.widget==="select"?r.jsxs(r.Fragment,{children:[r.jsx(F,{htmlFor:o.key,children:e(o.labelKey)}),r.jsxs(R,{value:I(i[o.key])||o.options?.[0]?.value,onValueChange:m=>s(o.key,m),children:[r.jsx(z,{id:o.key,className:"h-10 w-full",children:r.jsx(V,{placeholder:e(o.labelKey)})}),r.jsx(D,{children:(o.options??[]).map(m=>r.jsx(J,{value:m.value,children:e(m.labelKey)},m.value))})]})]}):r.jsxs(r.Fragment,{children:[r.jsx(F,{htmlFor:o.key,children:e(o.labelKey)}),o.widget==="textarea"?r.jsx(M,{id:o.key,value:I(i[o.key]),onChange:m=>s(o.key,m.target.value),rows:3}):r.jsx(O,{id:o.key,value:I(i[o.key]),placeholder:o.placeholderKey?e(o.placeholderKey):void 0,onChange:m=>s(o.key,m.target.value),className:"h-10"})]})},o.key),t[31]=i,t[32]=s,t[33]=e,t[34]=l):l=t[34],x=N.map(l),t[26]=i,t[27]=s,t[28]=e,t[29]=N,t[30]=x}else x=t[30];let u;t[35]!==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[35]=x,t[36]=u):u=t[36];let E;return t[37]!==y||t[38]!==u?(E=r.jsxs("div",{className:"flex h-full flex-col",children:[y,u]}),t[37]=y,t[38]=u,t[39]=E):E=t[39],E}export{Rr as RecordEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as pt,b as at,j as r}from"./index-CXWWJmED.js";import{C as ct}from"./checkbox-CcdD9hyv.js";import{I as rt}from"./input-boqiKbt5.js";import{L as et}from"./label-DfOap5yU.js";import{d as dt,a as nt,b as ft,c as xt,S as ht}from"./select-BzIcrZmY.js";import{F as ut,br as bt,I as yt,bs as jt,bt as vt}from"./index-DuveA0RN.js";import{u as gt}from"./use-autosave-D5qpnRyv.js";import"./Check-qxVfMARc.js";import"./tooltip-gZsEQkQ4.js";import"./ChevronDown-e1-U-GuJ.js";import"./ChevronUp-sCAKY-xq.js";import"./ArrowUp-5hFEweXq.js";import"./chat-context-DyvKnksd.js";import"./tab-id-m51PiwPd.js";import"./hooks-DHZH9aGB.js";import"./use-mcp-client-C66yIlAd.js";import"./auth-BKg8KB4Q.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CgnyrQVH.js";import"./studio-tools-CTvMzhHZ.js";import"./use-virtual-mcp-zisjRgmS.js";import"./use-ai-providers-C8J33FgM.js";import"./use-decopilot-events-CeCOBA6F.js";import"./use-organization-settings-0GX_RgcP.js";import"./automation-runs-BbHHbX_e.js";import"./useInfiniteQuery-C3YlsjqB.js";import"./use-infinite-scroll-BQjvXdPz.js";import"./use-connection-5V9ysZDz.js";import"./card-B4X8T5VG.js";import"./sidebar-D1q5weH4.js";import"./LayoutLeft-Bx_rpAKD.js";import"./use-mobile-5SOdKrGk.js";import"./X-9WQSG5hH.js";import"./table-Dr5WgajV.js";import"./empty-state-COuzTPqh.js";import"./use-members-yG-yZAF7.js";import"./use-org-auth-client-_My7JqZY.js";import"./use-clock-tick-D7wjISi9.js";import"./AlertCircle-Dq3WjiEJ.js";import"./CheckCircle-asKx-P0w.js";import"./DotsVertical-D9Tqe4NW.js";import"./agent-icon-Cm6sZdRT.js";import"./Tool01-CSu_r-q6.js";import"./Settings02-Vn36Nz-O.js";import"./Tool02-C7v0SFCB.js";import"./XCircle-C0NcnpbU.js";import"./ArrowUpRight-joowW-C5.js";import"./TrendUp01-eR8W-77t.js";import"./ZapSquare-BqtHYgtB.js";import"./Users03-l3anhVFn.js";import"./ChevronRight-BBTu-8S3.js";import"./Stars02-RfkiFS-R.js";import"./Copy01-D5KM45B8.js";import"./Eye-Dp-Mi9OG.js";import"./FilterLines-FFxKsijU.js";import"./Star01-B6iNea3E.js";import"./Palette-CBZCTOFO.js";import"./SwitchHorizontal01-qIK6-vj3.js";import"./HardDrive-BdTCtFl3.js";import"./Key01-D8-RvxFO.js";import"./LinkExternal01-Cnx8YByp.js";import"./LogOut01-CFjw7N9j.js";import"./Monitor01-BVloJrIj.js";import"./Sun-Bplz7qPS.js";import"./Play-DmT_WIMA.js";import"./Plus-ZpX9WmDD.js";import"./SearchLg-C4sVe0kR.js";import"./SearchMd-95D3LDtT.js";import"./Shield01-CgDNV0PO.js";import"./Stars01-Dhu1azXB.js";import"./Trash01-g8BP4GVQ.js";import"./Upload01-DnrfGhvH.js";import"./User01-BpaY3mYf.js";import"./Users01-BJlhJb2g.js";import"./XClose-Dl7-u4Iu.js";import"./Zap-BbdbOIdc.js";import"./use-automations-FgqBXimw.js";import"./useSuspenseInfiniteQuery-DGBuv3Vr.js";import"./avatar-Cqm3Lq4j.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DwMjsVFX.js";import"./dialog-S6zU-X1o.js";import"./monaco-editor-BRq76hge.js";import"./index-gOR0IO0m.js";import"./calendar-Dw4fmCzc.js";import"./shell-layout-iBF19CF5.js";import"./required-auth-layout-lByVfD5H.js";import"./use-org-sso-DpN_CP64.js";import"./integration-icon-CIE0aLCY.js";import"./use-navigate-to-agent-Cp0ofdA2.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-B-nTjrAx.js";import"./form-CIpF7vgQ.js";import"./drawer-CQnxFo4h.js";import"./collection-search-kogdFX9E.js";import"./index-DvqSQIGZ.js";import"./get-initials-D-f_fDFw.js";import"./popover-BtPGwDNE.js";import"./dropdown-menu-6Z0gFMED.js";import"./github-repo-picker-TiUDTq3i.js";import"./use-debounced-value-Do7XX3ss.js";import"./authenticate-and-persist-oauth-B1Tlj1JC.js";import"./mcp-oauth-CKM-_P-X.js";import"./use-mcp-tools-B0oPBVvy.js";import"./extract-connection-data-cNElALED.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-DWINBxtd.js";import"./use-tags-dvoKIzN1.js";import"./command-YBlMu_ai.js";import"./index-CgcZ4SGk.js";import"./companions-core-BLY1ba6m.js";import"./tabs-Bp95nj86.js";import"./toggle-group-AX7GMgVr.js";import"./use-deco-credits-gC1IJXsk.js";import"./alert-dialog-lWVONnNL.js";import"./toolbar-C0vQI8SC.js";import"./skeleton-DfWmK_Y8.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-CM5pZnY-.js";import"./use-registry-connections-DRFd-vEw.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-B0wrekwX.js";import"./connection-form-helpers-B3UhdWRQ.js";import"./collection-tabs-SfyxjJ1V.js";import"./badge-Dn-iMFnd.js";import"./select-model-B7suGfbk.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-kinXnNNm.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DvGgswK8.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-DSXju304.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-Df8Z4xSe.js";import"./use-debounced-autosave-yMskey-B.js";import"./index-Cg2H39JI.js";import"./search-input-BDo6-Pt1.js";import"./switch-Ck7aTeHo.js";import"./use-secrets-Crn3uZRK.js";import"./useQueries-DgSNUKr1.js";import"./use-file-configs-BV4ALFV5.js";import"./automation-list-row-BOCKdejq.js";const Et=[{value:"temporary",labelKey:"sandbox.redirectEditor.typeTemporary"},{value:"permanent",labelKey:"sandbox.redirectEditor.typePermanent"}];function si(it){const t=pt.c(106),{orgSlug:H,virtualMcpId:J,branch:W,blockKey:X,block:Z}=it,e=at();let V;t[0]!==W||t[1]!==H||t[2]!==J?(V={orgSlug:H,virtualMcpId:J,branch:W},t[0]=W,t[1]=H,t[2]=J,t[3]=V):V=t[3];const s=ut(V);let M;t[4]!==Z?(M=bt(Z),t[4]=Z,t[5]=M):M=t[5];const ot=M;let Y;t[6]!==X||t[7]!==s?(Y=i=>{s.mutate({blockKey:X,data:vt(i)})},t[6]=X,t[7]=s,t[8]=Y):Y=t[8];const[o,tt]=gt(ot,Y);let $;t[9]!==o||t[10]!==tt?($=i=>tt({...o,...i}),t[9]=o,t[10]=tt,t[11]=$):$=t[11];const 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 I;t[68]!==e?(I=e("sandbox.redirectEditor.typePlaceholder"),t[68]=e,t[69]=I):I=t[69];let R;t[70]!==I?(R=r.jsx(nt,{id:"redirect-type",className:"h-10 w-full",children:r.jsx(ft,{placeholder:I})}),t[70]=I,t[71]=R):R=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]!==R||t[79]!==F?(L=r.jsxs(ht,{value:lt,onValueChange:w,children:[R,F]}),t[76]=o.type,t[77]=w,t[78]=R,t[79]=F,t[80]=L):L=t[80];let q;t[81]===Symbol.for("react.memo_cache_sentinel")?(q=r.jsx("strong",{children:"Temporary"}),t[81]=q):q=t[81];let z;t[82]===Symbol.for("react.memo_cache_sentinel")?(z=r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Use ",q," when the redirect may change;"," ",r.jsx("strong",{children:"Permanent"})," lets browsers cache it."]}),t[82]=z):z=t[82];let Q;t[83]!==k||t[84]!==L?(Q=r.jsxs("div",{className:"space-y-2",children:[k,L,z]}),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 D;t[88]!==o.discardQueryParameters||t[89]!==K?(D=r.jsx(ct,{checked:o.discardQueryParameters,onCheckedChange:K}),t[88]=o.discardQueryParameters,t[89]=K,t[90]=D):D=t[90];let A;t[91]!==e?(A=e("sandbox.redirectEditor.discardQueryParameters"),t[91]=e,t[92]=A):A=t[92];let B;t[93]!==A?(B=r.jsx("span",{className:"text-sm",children:A}),t[93]=A,t[94]=B):B=t[94];let O;t[95]!==D||t[96]!==B?(O=r.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5",children:[D,B]}),t[95]=D,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 G;return t[103]!==U||t[104]!==c?(G=r.jsxs("div",{className:"flex h-full flex-col",children:[c,U]}),t[103]=U,t[104]=c,t[105]=G):G=t[105],G}export{si as RedirectEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-DaOGMHqm.js","assets/index-CXWWJmED.js","assets/index-DolLSrq-.css","assets/Tool02-C7v0SFCB.js","assets/CheckCircle-asKx-P0w.js","assets/Settings02-Vn36Nz-O.js","assets/use-mcp-client-C66yIlAd.js","assets/auth-BKg8KB4Q.js","assets/useInfiniteQuery-C3YlsjqB.js","assets/use-infinite-scroll-BQjvXdPz.js","assets/studio-tools-CTvMzhHZ.js","assets/badge-Dn-iMFnd.js","assets/input-boqiKbt5.js","assets/dropdown-menu-6Z0gFMED.js","assets/Check-qxVfMARc.js","assets/ChevronRight-BBTu-8S3.js","assets/DotsVertical-D9Tqe4NW.js","assets/table-Dr5WgajV.js","assets/toggle-group-AX7GMgVr.js","assets/use-view-mode-Cj5GH6Ff.js","assets/use-mobile-5SOdKrGk.js","assets/FilterLines-FFxKsijU.js","assets/SearchMd-95D3LDtT.js","assets/dialog-S6zU-X1o.js","assets/X-9WQSG5hH.js","assets/AlertCircle-Dq3WjiEJ.js","assets/Upload01-DnrfGhvH.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-lWVONnNL.js","assets/card-B4X8T5VG.js","assets/Trash01-g8BP4GVQ.js","assets/label-DfOap5yU.js","assets/select-BzIcrZmY.js","assets/tooltip-gZsEQkQ4.js","assets/ChevronDown-e1-U-GuJ.js","assets/ChevronUp-sCAKY-xq.js","assets/switch-Ck7aTeHo.js","assets/textarea-B0wrekwX.js","assets/XCircle-C0NcnpbU.js","assets/checkbox-CcdD9hyv.js","assets/Eye-Dp-Mi9OG.js","assets/LinkExternal01-Cnx8YByp.js","assets/use-copy-DwMjsVFX.js","assets/Copy01-D5KM45B8.js","assets/Key01-D8-RvxFO.js","assets/Plus-ZpX9WmDD.js","assets/mcp-oauth-CKM-_P-X.js","assets/Play-DmT_WIMA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as i,j as e,r as s,k as a,aG as o}from"./index-CXWWJmED.js";import{R as m}from"./require-capability-Co5c18xf.js";import"./use-capability-DSXju304.js";import"./access-gate-By-4JO-o.js";import"./capability-load-error-B7Gug_ai.js";const n=s.lazy(()=>o(()=>import("./registry-layout-DaOGMHqm.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])));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 re,r as $,F as Be,K as me,n as Fe,j as s,m as W,k as je,B as ce,c as J,X as Xe,a2 as Ue,Y as ae,a4 as Je,a5 as et,o as rt,_ as Ot,Z as jt,e as at,t as ve,p as Ke,y as ct,z as vt,E as Mt,d as Dt,u as yt}from"./index-CXWWJmED.js";import{u as Pt}from"./use-organization-roles-qiwXKsX5.js";import{u as $e}from"./use-org-auth-client-_My7JqZY.js";import{g as dt,a as Lt}from"./role-color-Dn2tXDDF.js";import{B as Me}from"./badge-Dn-iMFnd.js";import{A as mt,a as ut,c as ft,d as gt,b as ht,f as xt,g as pt,e as Tt}from"./alert-dialog-lWVONnNL.js";import{c as wt,D as Gt,b as kt,a as Ut}from"./dropdown-menu-6Z0gFMED.js";import{a as Bt}from"./DotsVertical-D9Tqe4NW.js";import{s as ze}from"./Plus-ZpX9WmDD.js";import{s as Vt}from"./Trash01-g8BP4GVQ.js";import{C as Yt}from"./collection-table-wrapper-NjFiGSWD.js";import{P as ie}from"./index-Cg2H39JI.js";import{E as tt}from"./empty-state-COuzTPqh.js";import{S as Qe}from"./search-input-BDo6-Pt1.js";import{P as Et,D as It}from"./ai-providers-logos-DD3qZ33J.js";import{I as Ze}from"./integration-icon-CIE0aLCY.js";import{u as zt}from"./use-infinite-scroll-BQjvXdPz.js";import{C as He}from"./checkbox-CcdD9hyv.js";import{b as Ft}from"./Settings02-Vn36Nz-O.js";import{u as Kt}from"./useSuspenseInfiniteQuery-DGBuv3Vr.js";import{u as $t,S as Qt}from"./use-mcp-client-C66yIlAd.js";import{C as Zt}from"./collection-search-kogdFX9E.js";import{p as Ht}from"./connection-DzWf3enH.js";import{u as _t}from"./use-members-yG-yZAF7.js";import{g as Rt}from"./get-initials-D-f_fDFw.js";import{u as qt}from"./use-connection-5V9ysZDz.js";import{u as Wt,e as Xt}from"./use-ai-providers-C8J33FgM.js";import{A as St}from"./avatar-Cqm3Lq4j.js";import{S as De}from"./switch-Ck7aTeHo.js";import{b as ye,c as Pe,T as Le,a as we}from"./tooltip-gZsEQkQ4.js";import{S as st,a as lt,b as ot}from"./settings-section-kinXnNNm.js";import{t as Jt}from"./ChevronDown-e1-U-GuJ.js";import{i as es}from"./ChevronRight-BBTu-8S3.js";import{i as nt}from"./X-9WQSG5hH.js";import{a as ts}from"./use-capability-DSXju304.js";import{A as ss}from"./access-gate-By-4JO-o.js";import"./Check-qxVfMARc.js";import"./table-Dr5WgajV.js";import"./ArrowUp-5hFEweXq.js";import"./sidebar-D1q5weH4.js";import"./LayoutLeft-Bx_rpAKD.js";import"./use-mobile-5SOdKrGk.js";import"./SearchMd-95D3LDtT.js";import"./Tool02-C7v0SFCB.js";import"./agent-icon-Cm6sZdRT.js";import"./AlertCircle-Dq3WjiEJ.js";import"./Tool01-CSu_r-q6.js";import"./XCircle-C0NcnpbU.js";import"./ArrowUpRight-joowW-C5.js";import"./TrendUp01-eR8W-77t.js";import"./ZapSquare-BqtHYgtB.js";import"./Users03-l3anhVFn.js";import"./CheckCircle-asKx-P0w.js";import"./ChevronUp-sCAKY-xq.js";import"./Stars02-RfkiFS-R.js";import"./Copy01-D5KM45B8.js";import"./Eye-Dp-Mi9OG.js";import"./FilterLines-FFxKsijU.js";import"./Star01-B6iNea3E.js";import"./Palette-CBZCTOFO.js";import"./SwitchHorizontal01-qIK6-vj3.js";import"./HardDrive-BdTCtFl3.js";import"./Key01-D8-RvxFO.js";import"./LinkExternal01-Cnx8YByp.js";import"./LogOut01-CFjw7N9j.js";import"./Monitor01-BVloJrIj.js";import"./Sun-Bplz7qPS.js";import"./Play-DmT_WIMA.js";import"./SearchLg-C4sVe0kR.js";import"./Shield01-CgDNV0PO.js";import"./Stars01-Dhu1azXB.js";import"./Upload01-DnrfGhvH.js";import"./User01-BpaY3mYf.js";import"./Users01-BJlhJb2g.js";import"./XClose-Dl7-u4Iu.js";import"./Zap-BbdbOIdc.js";import"./auth-BKg8KB4Q.js";import"./studio-tools-CTvMzhHZ.js";import"./card-B4X8T5VG.js";import"./capability-load-error-B7Gug_ai.js";const qe="basic-usage",We=[{id:qe,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","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","LINK_CURRENT_GET","LINK_DISCONNECT","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","THREAD_BACKGROUND_TOOL_START","THREAD_SUBTASK_DELIVER","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE","TASK_BOARD_ITEM_PRS_GET","TASK_BOARD_ACTIVITY_LIST"]},{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"]},{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_SEATS_GET","ORGANIZATION_SEATS_SET","ORGANIZATION_BILLING_CHECKOUT_START","ORGANIZATION_SEATS_PREVIEW","ORGANIZATION_BILLING_PORTAL","ORGANIZATION_INCLUDED_REPORT_SET","ORGANIZATION_REPORT_RUN_PAID","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_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",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST"]},{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"]},{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}];[...We.find(t=>t.id===qe)?.tools??[]];const ls=["agents:manage","connections:manage"];new Set(We.filter(t=>ls.includes(t.id)).flatMap(t=>t.tools));function os(){const t=new Map;for(const e of We){if(e.id===qe)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=J.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=W("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(Ze,{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=J.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=W("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=re(),[o,c]=$.useState(""),g=n!==void 0?n:o,h=$.useDeferredValue(g),[m,f]=$.useState("all"),[a,u]=$.useState(!1),x=$.useRef(new Set(Object.keys(t))),{org:d}=Be(),p=$t({connectionId:Qt,orgId:d.id,orgSlug:d.slug}),C=100,R=h.trim(),_=R?{operator:"or",conditions:[{field:["title"],operator:"contains",value:R},{field:["description"],operator:"contains",value:R}]}:void 0,A=!!l,N={..._&&{where:_},orderBy:[{field:["updated_at"],direction:"asc"}],limit:C,offset:0,...A&&{include_virtual:!0}},v=JSON.stringify(N),{data:S,fetchNextPage:O,hasNextPage:M,isFetchingNextPage:E}=Kt({queryKey:me.collectionListInfinite(p,d.id,"","CONNECTIONS",v),queryFn:async({pageParam:T=0})=>(await p.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{..._&&{where:_},orderBy:[{field:["updated_at"],direction:"asc"}],limit:C,offset:T,...A&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(T,G)=>{if(T?.hasMore)return G.reduce((Q,q)=>Q+(q?.items?.length??0),0)},staleTime:3e4}),b=S?.pages.flatMap(T=>T?.items??[])??[],D=zt(O,M??!1,E),r=l?b.filter(T=>T.connection_type!=="VIRTUAL"?!0:Ht(T.connection_url)!==l):b,I=x.current,k=[...I.values()].map(T=>r.find(G=>G.id===T)).filter(T=>T!==void 0),w=r.filter(T=>!I.has(T.id)),Y=[...k,...w],y=T=>{const G=t[T];return G!==void 0&&G.length>0},z=Y.filter(T=>{if(m==="all")return!0;const G=y(T.id);return m==="selected"?G:m==="unselected"?!G:!0}),[P,F]=$.useState(Y[0]?.id??null),V=P?Y.find(T=>T.id===P)??null:null,{data:U,isFetching:B}=Fe({queryKey:me.collectionItem(p,d.id,"","CONNECTIONS",P??""),queryFn:async()=>P?(await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:P}})).structuredContent?.item??null:null,enabled:!!P,staleTime:3e4}),Z=U?.tools??[],X=(T,G)=>t[T]?.includes(G)??!1,te=(T,G)=>{const Q=t[T]??[],q=Q.includes(G),ne={...t};if(q){const se=Q.filter(oe=>oe!==G);se.length===0?delete ne[T]:ne[T]=se}else ne[T]=[...Q,G];e(ne)},le=T=>{const G=T===P?Z:[];if(!G.length)return;const Q=t[T]??[],q=G.map(oe=>oe.name),ne=Q.length>0&&q.every(oe=>Q.includes(oe)),se={...t};ne?delete se[T]:(se[T]=q,F(T)),e(se)},K=T=>{F(T),u(!0)},H=()=>{u(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:W("w-full md:w-80 border-r border-border flex flex-col",a&&"hidden md:flex"),children:[n===void 0&&s.jsx(Zt,{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:W("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:W("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:W("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 G=P===T.id,Q=G?Z.length:0,q=t[T.id]?.length??0;return s.jsx(rs,{connection:{...T,tools:G?Z:T.tools},isSelected:G,hasToolsEnabled:y(T.id),activeToolsCount:q,totalToolsCount:Q,onSelect:()=>K(T.id),onToggle:()=>le(T.id)},T.id)}),s.jsx("div",{ref:D,className:"h-4"}),E&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(je,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:W("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:H,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(Ft,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Ze,{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(je,{size:18,className:"animate-spin text-muted-foreground"})}):Z.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:Z.map(T=>s.jsx(cs,{connectionId:V.id,tool:T,isSelected:X(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=Xe({role:Xe({id:ae().optional(),slug:ae().optional(),label:ae()}),allowAllStaticPermissions:et(),staticPermissions:Ue(ae()),toolSet:Je(ae(),Ue(ae())),allowAllModels:et(),modelSet:Je(ae(),Ue(ae())),memberIds:Ue(ae())});function it(t,e,l,n){const i=s.jsx(De,{checked:e,disabled:l,onCheckedChange:n});return l?s.jsx(ye,{children:s.jsxs(Pe,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:i})}),s.jsx(we,{children:s.jsx("p",{children:t("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):i}function fs(t){const e=J.c(41),{allowAllStaticPermissions:l,staticPermissions:n,onAllowAllChange:i,onPermissionsChange:o,readOnly:c,searchQuery:g}=t,h=c===void 0?!1:c,m=re();let f;e[0]!==g?(f=g.trim().toLowerCase(),e[0]=g,e[1]=f):f=e[1];const a=$.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=(E,b)=>{if(!h){if(l&&b){const D=x.flatMap(xs).flatMap(hs);i(!1),o(D.filter(r=>!E.tools.includes(r)));return}l||o(is(E,n,!b))}};let p;e[11]!==a?(p=E=>{const{section:b,capabilities:D}=E;return{section:b,capabilities:D.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 _;e[15]!==m?(_=m("settings.orgRoleDetail.allOrgPermissions"),e[15]=m,e[16]=_):_=e[16];let A;e[17]!==m?(A=m("settings.orgRoleDetail.grantFullAccessToAllFeaturesBelow"),e[17]=m,e[18]=A):A=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 v;e[23]!==l||e[24]!==h||e[25]!==m||e[26]!==N?(v=it(m,l,h,N),e[23]=l,e[24]=h,e[25]=m,e[26]=N,e[27]=v):v=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]!==_||e[35]!==A||e[36]!==v?(O=s.jsx(lt,{children:s.jsx(ot,{title:_,description:A,action:v,onClick:S})}),e[33]=S,e[34]=_,e[35]=A,e[36]=v,e[37]=O):O=e[37];let M;e[38]!==O||e[39]!==R?(M=s.jsx(st,{title:R,children:O}),e[38]=O,e[39]=R,e[40]=M):M=e[40],u=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[M,C.length===0&&a?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:m("settings.orgRoleDetail.noPermissionsMatch",{searchQuery:g})}):C.map(E=>{const{section:b,capabilities:D}=E;return s.jsx(st,{title:b,children:s.jsx(lt,{children:D.map(r=>{const I=ns(r,n,l);return s.jsx(ot,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[r.label,r.dangerous&&s.jsx(vt,{size:12,className:"text-warning shrink-0"})]}),description:r.description,action:it(m,I,h,()=>d(r,I)),onClick:h?void 0:()=>d(r,I)},r.id)})})},b)})]})}),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 Nt={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 Es(t){return ps[t]??Nt[t]??t}function Is(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const bt=30;function _s(t){const e=J.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=re(),[C,R]=$.useState(d),_=d||C,A=R,[N,v]=$.useState(bt);let S;e[0]!==f||e[1]!==m||e[2]!==h?(S=E=>m||f||h.includes("*")||h.includes(E),e[0]=f,e[1]=m,e[2]=h,e[3]=S):S=e[3];const O=S;let M;if(e[4]!==g||e[5]!==m||e[6]!==l||e[7]!==_||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;e[19]!==O?(E=B=>O(B.id),e[19]=O,e[20]=E):E=e[20];const b=c.filter(E).length,D=c.slice(0,N),r=c.length>N;let I;e[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>A(bs),e[21]=I):I=e[21];const k=o??Et[n]??It;let w;e[22]!==i||e[23]!==k?(w=s.jsx(Ze,{icon:k,name:i,size:"sm"}),e[22]=i,e[23]=k,e[24]=w):w=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 y;e[27]!==w||e[28]!==Y?(y=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[w,Y]}),e[27]=w,e[28]=Y,e[29]=y):y=e[29];const z=p("settings.orgRoleDetail.enabledCount",{enabledCount:b,total:c.length});let P;e[30]!==z?(P=s.jsx(Me,{variant:"secondary",className:"text-xs text-muted-foreground",children:z}),e[30]=z,e[31]=P):P=e[31];let F;e[32]!==_?(F=_?s.jsx(Jt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(es,{size:16,className:"text-muted-foreground shrink-0"}),e[32]=_,e[33]=F):F=e[33];let V;e[34]!==P||e[35]!==F?(V=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[P,F]}),e[34]=P,e[35]=F,e[36]=V):V=e[36];let U;e[37]!==V||e[38]!==y?(U=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:I,children:[y,V]}),e[37]=V,e[38]=y,e[39]=U):U=e[39],M=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[U,_&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[D.map(B=>{const Z=O(B.id),X=()=>{if(!x){if(m){u(l,g,B.id);return}a(l,B.id)}};return s.jsxs("div",{className:W("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:X,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(ye,{children:s.jsxs(Pe,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsx(De,{checked:Z,disabled:!0,onCheckedChange:Ss})})}),s.jsx(we,{children:s.jsx("p",{children:p("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(De,{checked:Z,onCheckedChange:X})})]},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:()=>v(Rs),children:p("settings.orgRoleDetail.showMore",{remaining:c.length-N})})]})]}),e[4]=g,e[5]=m,e[6]=l,e[7]=_,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]=M}else M=e[18];return M}function Rs(t){return t+bt}function Ss(){}function Ns(t){return t.stopPropagation()}function bs(t){return!t}function Cs(t){const e=J.c(33),{connection:l,selectedModels:n,allowAllModels:i,onToggleModel:o,onExitAllowAll:c,allConnectionModelsSelected:g,searchQuery:h,readOnly:m}=t,f=Xt(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 _;e[16]!==l.label?(_=I=>({...I,id:I.modelId,provider:l.label}),e[16]=l.label,e[17]=_):_=e[17];const A=f.filter(vs).map(_),N=h.trim().toLowerCase(),v=N?A.filter(I=>I.title.toLowerCase().includes(N)||I.id.toLowerCase().includes(N)||I.provider?.toLowerCase().includes(N)):A;if(v.length===0){p=null;break e}const S=new Map;for(const I of v){const k=Ts(I.id,l.providerId),w=S.get(k)??{models:[],logo:null};w.models.push({id:I.id,title:Is(I.title),logo:I.logo}),!w.logo&&I.logo&&(w.logo=I.logo),S.set(k,w)}const O=Array.from(S.entries()).map(js).sort(Os),M=O.length===1||N.length>0;x="flex flex-col gap-3";const E=Et[l.providerId]??It;let b;e[18]!==l.providerId||e[19]!==E?(b=s.jsx("img",{src:E,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,e[20]=b):b=e[20];const D=Nt[l.providerId]??l.providerId;let r;e[21]!==D?(r=s.jsx("h4",{className:"text-sm font-medium",children:D}),e[21]=D,e[22]=r):r=e[22],e[23]!==r||e[24]!==b?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[b,r]}),e[23]=r,e[24]=b,e[25]=d):d=e[25],a="flex flex-col gap-3",u=O.map(I=>s.jsx(_s,{connectionId:l.id,subProviderId:I.id,subProviderName:I.name,groupLogo:I.logo,models:I.models,allConnectionModelIds:A.map(As),selectedModels:n,allowAllModels:i,allConnectionModelsSelected:g,onToggleModel:o,onExitAllowAll:c,readOnly:m,defaultExpanded:M},I.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 As(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:Es(e),logo:l.logo,models:l.models}}function vs(t,e,l){return l.findIndex(n=>n.modelId===t.modelId)===e}function Ms(t){const e=J.c(41),{allowAllModels:l,modelSet:n,onAllowAllChange:i,onModelSetChange:o,readOnly:c,searchQuery:g}=t,h=c===void 0?!1:c,m=re(),f=$.useDeferredValue(g),a=Wt();let u;e[0]!==n||e[1]!==o?(u=(E,b)=>{const D=n[E]??[],r={...n};if(D.includes(b)){const I=D.filter(k=>k!==b);I.length===0?delete r[E]:r[E]=I}else r[E]=[...D,b];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=(E,b,D)=>{i(!1),o({...n,[E]:b.filter(r=>r!==D)})},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=W("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 _;e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==h?(_=()=>{if(h)return;const E=!l;i(E),E&&o({})},e[9]=l,e[10]=i,e[11]=o,e[12]=h,e[13]=_):_=e[13];let A;e[14]!==m?(A=m("settings.orgRoleDetail.allModels"),e[14]=m,e[15]=A):A=e[15];let N;e[16]!==A?(N=s.jsx("span",{className:"text-sm font-medium",children:A}),e[16]=A,e[17]=N):N=e[17];let v;e[18]!==l||e[19]!==i||e[20]!==o||e[21]!==h||e[22]!==m?(v=s.jsx("div",{onClick:ys,children:h?s.jsx(ye,{children:s.jsxs(Pe,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsx(De,{checked:l,disabled:!0,onCheckedChange:Ds})})}),s.jsx(we,{children:s.jsx("p",{children:m("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(De,{checked:l,onCheckedChange:E=>{i(E),E&&o({})}})}),e[18]=l,e[19]=i,e[20]=o,e[21]=h,e[22]=m,e[23]=v):v=e[23];let S;e[24]!==R||e[25]!==_||e[26]!==N||e[27]!==v?(S=s.jsxs("div",{className:R,onClick:_,children:[N,v]}),e[24]=R,e[25]=_,e[26]=N,e[27]=v,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(E=>s.jsx($.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 animate-spin"}),m("settings.orgRoleDetail.loadingModels")]}),children:s.jsx(Cs,{connection:E,selectedModels:n[E.id]??[],allowAllModels:l,onToggleModel:x,onExitAllowAll:p,allConnectionModelsSelected:(n[E.id]??[]).includes("*"),searchQuery:f,readOnly:h})},E.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 M;return e[38]!==S||e[39]!==O?(M=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]=M):M=e[40],M}function Ds(){}function ys(t){return t.stopPropagation()}function Ps(t){const e=J.c(75),{open:l,onOpenChange:n,selectedMemberIds:i,onAddMembers:o}=t,c=re(),[g,h]=$.useState(""),m=$.useDeferredValue(g);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[0]=f):f=e[0];const[a,u]=$.useState(f),{data:x}=_t();let d,p,C,R,_,A,N,v,S,O,M;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 P=x?.data?.members??[];let F;e[21]!==m?(F=K=>{const H=m.toLowerCase();return K.user?.name?.toLowerCase().includes(H)||K.user?.email?.toLowerCase().includes(H)},e[21]=m,e[22]=F):F=e[22];const V=P.filter(F);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=mt,O=l,M=n,d=ut,v="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 Z;e[29]!==B?(Z=s.jsx(ft,{children:B}),e[29]=B,e[30]=Z):Z=e[30];let X;e[31]!==c?(X=c("settings.orgRoleDetail.selectMembersToAddToThisRole"),e[31]=c,e[32]=X):X=e[32];let te;e[33]!==X?(te=s.jsx(gt,{children:X}),e[33]=X,e[34]=te):te=e[34],e[35]!==Z||e[36]!==te?(S=s.jsxs(ht,{className:"px-6 pt-6",children:[Z,te]}),e[35]=Z,e[36]=te,e[37]=S):S=e[37],A="flex flex-col h-80";let le;e[38]!==c?(le=c("settings.orgRoleDetail.searchMembers"),e[38]=c,e[39]=le):le=e[39],e[40]!==g||e[41]!==le?(N=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(Qe,{value:g,onChange:h,placeholder:le,className:"w-full"})}),e[40]=g,e[41]=le,e[42]=N):N=e[42],R="flex-1 overflow-auto",_=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(K=>{const H=K.role!=="owner",T=i.includes(K.id),G=a.includes(K.id);return s.jsxs("label",{className:W("flex items-center gap-3 p-2 rounded-lg",!H||T?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(He,{checked:G||T,onCheckedChange:()=>{!H||T||u(Q=>Q.includes(K.id)?Q.filter(q=>q!==K.id):[...Q,K.id])},disabled:!H||T}),s.jsx(St,{url:K.user?.image??void 0,fallback:Rt(K.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:K.user?.name||c("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:K.user?.email})]}),!H&&s.jsx(Me,{variant:"secondary",className:"shrink-0",children:c("settings.orgRoleDetail.owner")}),T&&H&&s.jsx(Me,{variant:"outline",className:"shrink-0",children:c("settings.orgRoleDetail.added")})]},K.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]=_,e[15]=A,e[16]=N,e[17]=v,e[18]=S,e[19]=O,e[20]=M}else d=e[10],p=e[11],C=e[12],R=e[13],_=e[14],A=e[15],N=e[16],v=e[17],S=e[18],O=e[19],M=e[20];let E;e[43]!==R||e[44]!==_?(E=s.jsx("div",{className:R,children:_}),e[43]=R,e[44]=_,e[45]=E):E=e[45];let b;e[46]!==E||e[47]!==A||e[48]!==N?(b=s.jsxs("div",{className:A,children:[N,E]}),e[46]=E,e[47]=A,e[48]=N,e[49]=b):b=e[49];let D;e[50]!==c?(D=c("settings.orgRoleDetail.cancel"),e[50]=c,e[51]=D):D=e[51];let r;e[52]!==D?(r=s.jsx(xt,{children:D}),e[52]=D,e[53]=r):r=e[53];const I=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 w;e[57]!==C||e[58]!==I||e[59]!==k?(w=s.jsx(pt,{onClick:C,disabled:I,children:k}),e[57]=C,e[58]=I,e[59]=k,e[60]=w):w=e[60];let Y;e[61]!==r||e[62]!==w?(Y=s.jsxs(Tt,{className:"px-6 pb-6",children:[r,w]}),e[61]=r,e[62]=w,e[63]=Y):Y=e[63];let y;e[64]!==d||e[65]!==b||e[66]!==Y||e[67]!==v||e[68]!==S?(y=s.jsxs(d,{className:v,children:[S,b,Y]}),e[64]=d,e[65]=b,e[66]=Y,e[67]=v,e[68]=S,e[69]=y):y=e[69];let z;return e[70]!==p||e[71]!==y||e[72]!==O||e[73]!==M?(z=s.jsx(p,{open:O,onOpenChange:M,children:y}),e[70]=p,e[71]=y,e[72]=O,e[73]=M,e[74]=z):z=e[74],z}function Ls(t){const e=J.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=re(),u=$.useDeferredValue(c),{data:x}=_t();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 v=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=v.filter(S);let M;e[13]!==u?(M=r=>{const I=u.toLowerCase();return r.user?.name?.toLowerCase().includes(I)||r.user?.email?.toLowerCase().includes(I)},e[13]=u,e[14]=M):M=e[14];const E=O.filter(M);let b;e[15]!==f||e[16]!==a?(b=f??a("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=f,e[16]=a,e[17]=b):b=e[17];const D=b;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")})]})}):E.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:E.map(r=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(St,{url:r.user?.image??void 0,fallback:Rt(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(ye,{children:s.jsxs(Pe,{children:[s.jsx(Le,{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(nt,{size:16})})})}),s.jsx(we,{children:s.jsx("p",{children:D})})]})}):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(I=>I!==r.id)),children:s.jsx(nt,{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 _;e[21]!==l||e[22]!==n?(_=v=>n([...l,...v]),e[21]=l,e[22]=n,e[23]=_):_=e[23];let A;e[24]!==g||e[25]!==l||e[26]!==h||e[27]!==_?(A=s.jsx(Ps,{open:g,onOpenChange:h,selectedMemberIds:l,onAddMembers:_}),e[24]=g,e[25]=l,e[26]=h,e[27]=_,e[28]=A):A=e[28];let N;return e[29]!==C||e[30]!==R||e[31]!==A?(N=s.jsxs("div",{className:C,children:[R,A]}),e[29]=C,e[30]=R,e[31]=A,e[32]=N):N=e[32],N}function ws(t){const e=J.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(je,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=s.jsx($.Suspense,{fallback:l,children:s.jsx(Ls,{...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=J.c(19),{readOnly:l,readOnlyMessage:n,onOpen:i}=t,o=n===void 0?void 0:n,c=re();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(ze,{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(Le,{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(we,{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(ye,{children:s.jsxs(Pe,{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(ze,{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=J.c(14),{locator:l}=Be(),n=$e(),i=qt();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}=Fe(g);if(m||!i){let x;return e[7]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ie,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(je,{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(Fs,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=u):u=e[13],u}function Fs({target:t,onBack:e,onSaved:l,members:n,connections:i}){const o=re(),{locator:c}=Be(),g=$e(),h=rt(),m=t.kind==="builtin",f=t.kind==="builtin"&&t.role==="owner",a=t.kind==="new",[u,x]=$.useState(m?"org":"mcp"),d=Ot({resolver:jt(us),defaultValues:Vs(t,n,i)}),p=d.formState.isValid,C=d.formState.isDirty,R=at({mutationFn:async r=>{const I=Bs(r,i),k=r.role.slug||r.role.label.toLowerCase().replace(/\s+/g,"-"),w=(r.role.slug==="owner"||r.role.slug==="admin"||r.role.slug==="user")&&!r.role.id,Y=async(y,z)=>{const P=n.filter(U=>U.role===(z??y)).map(U=>U.id),F=r.memberIds.filter(U=>!P.includes(U)),V=P.filter(U=>!r.memberIds.includes(U));for(const U of F){const B=await g.organization.updateMemberRole({memberId:U,role:[y]});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(w)return await Y(r.role.slug),r;if(r.role.id){const y=r.role.label.toLowerCase().replace(/\s+/g,"-"),z=r.role.slug,P=y!==z,F=await g.organization.updateRole({roleId:r.role.id,data:{permission:I,...P?{roleName:y}:{}}});if(F?.error)throw new Error(F.error.message??o("settings.orgRoleDetail.somethingWentWrong"));return await Y(P?y:z,P?z:void 0),P?{...r,role:{...r.role,slug:y}}:r}else{const y=await g.organization.createRole({role:k,permission:I});if(y?.error)throw new Error(y.error.message??o("settings.orgRoleDetail.somethingWentWrong"));for(const z of r.memberIds){const P=await g.organization.updateMemberRole({memberId:z,role:[k]});if(P?.error)throw new Error(P.error.message)}return{...r,role:{...r.role,id:y.data?.roleData?.id,slug:k}}}},onSuccess:(r,I)=>{h.invalidateQueries({queryKey:me.members(c)}),h.invalidateQueries({queryKey:me.organizationRoles(c)});const k=!I.role.id&&!I.role.slug,w=I.role.slug==="owner"&&!I.role.id;Ke(w?"role_members_updated":k?"role_created":"role_updated",{role_slug:I.role.slug??null}),ve.success(o(w?"settings.orgRoleDetail.membersUpdatedSuccessfully":k?"settings.orgRoleDetail.roleCreatedSuccessfully":"settings.orgRoleDetail.roleUpdatedSuccessfully")),d.reset(r),l(r.role.id)},onError:r=>{ve.error(r instanceof Error?r.message:o("settings.orgRoleDetail.failedToSaveRole"))}}),_=d.handleSubmit(r=>{if(!r.role.label.trim()){ve.error(o("settings.orgRoleDetail.roleNameIsRequired")),d.setFocus("role.label");return}R.mutate(r)}),A=!f,N=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",v=[...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]=$.useState(""),[M,E]=$.useState(!1),b=r=>{x(r),O("")},D={mcp:o("settings.orgRoleDetail.searchMcpServers"),org:o("settings.orgRoleDetail.searchPermissions"),models:o("settings.orgRoleDetail.searchModels"),members:o("settings.orgRoleDetail.searchMembers")};return s.jsx(ie,{children:s.jsxs(ie.Content,{className:W("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(ie.Title,{actions:A&&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:_,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:W("size-2.5 rounded-full shrink-0",t.kind==="builtin"?dt(t.role,!0):Lt(d.watch("role.label")))}),f&&s.jsx(ct,{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:v.map(r=>s.jsx("button",{type:"button",onClick:()=>b(r.id),className:W("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(Qe,{value:S,onChange:O,placeholder:D[u]??"Search...",className:"w-full md:w-[375px]"}),u==="members"&&s.jsx(Ys,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>E(!0)})]})]})}),s.jsx("div",{className:W("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:W(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(Ms,{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:M,onAddMemberDialogOpenChange:E})]})})]})})}function Ks(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function $s(t){const e=J.c(6),{area:l,children:n}=t,{isPrivileged:i,loading:o,error:c}=ts();let g;return e[0]!==l||e[1]!==n||e[2]!==c||e[3]!==i||e[4]!==o?(g=s.jsx(ss,{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 Zs(){const t=J.c(135),e=re(),[l,n]=$.useState(""),[i,o]=$.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}=yt(g),{locator:m}=Be(),f=$e(),a=rt(),{customRoles:u,refetch:x}=Pt();let d;t[1]!==c?(d=j=>c({to:".",search:L=>({...L,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 L=u.find(j);C=L?{kind:"custom",role:L}:null}const R=C;let _;t[5]!==m?(_=me.members(m),t[5]=m,t[6]=_):_=t[6];let A;t[7]!==f?(A=()=>f.organization.listMembers(),t[7]=f,t[8]=A):A=t[8];let N;t[9]!==_||t[10]!==A?(N={queryKey:_,queryFn:A},t[9]=_,t[10]=A,t[11]=N):N=t[11];const{data:v}=Fe(N);let S;t[12]!==v?.data?.members?(S=v?.data?.members??[],t[12]=v?.data?.members,t[13]=S):S=t[13];const O=S;let M;t[14]!==O?(M=j=>O.filter(L=>L.role===j).length,t[14]=O,t[15]=M):M=t[15];const E=M;let b;if(t[16]!==u||t[17]!==E||t[18]!==l||t[19]!==e){let j;t[21]!==E||t[22]!==e?(j=de=>({kind:"builtin",role:{...de,memberCount:E(de.role),label:e(de.labelKey)}}),t[21]=E,t[22]=e,t[23]=j):j=t[23];const L=Qs.map(j);let ee;t[24]!==E?(ee=de=>({kind:"custom",role:{...de,memberCount:E(de.role)}}),t[24]=E,t[25]=ee):ee=t[25];const Ct=u.map(ee);if(b=[...L,...Ct],l){const de=l.toLowerCase();b=b.filter(At=>At.role.label.toLowerCase().includes(de))}t[16]=u,t[17]=E,t[18]=l,t[19]=e,t[20]=b}else b=t[20];let D;t[26]!==f?(D=async j=>{const L=await f.organization.deleteRole({roleId:j});if(L?.error)throw new Error(L.error.message);return L?.data},t[26]=f,t[27]=D):D=t[27];const r=at({mutationFn:D,onSuccess:(j,L)=>{Ke("role_deleted",{role_id:L}),a.invalidateQueries({queryKey:me.members(m)}),a.invalidateQueries({queryKey:me.organizationRoles(m)}),ve.success(e("settings.roles.deletedSuccessfully")),x(),R?.kind==="custom"&&R.role.id===L&&p(void 0)},onError:Js});let I;t[28]!==e?(I=e("settings.roles.columnRole"),t[28]=e,t[29]=I):I=t[29];let k;t[30]!==I?(k={id:"role",header:I,render:Xs,cellClassName:"flex-1 min-w-0",sortable:!0},t[30]=I,t[31]=k):k=t[31];let w;t[32]!==e?(w=e("settings.roles.columnType"),t[32]=e,t[33]=w):w=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 y;t[36]!==w||t[37]!==Y?(y={id:"type",header:w,render:Y,cellClassName:"w-28 shrink-0"},t[36]=w,t[37]=Y,t[38]=y):y=t[38];let z;t[39]!==e?(z=e("settings.roles.columnPermissions"),t[39]=e,t[40]=z):z=t[40];let P;t[41]!==e?(P=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 L=j.role,ee=[];return L.allowsAllStaticPermissions?ee.push(e("settings.roles.fullOrgAccess")):L.staticPermissionCount&&L.staticPermissionCount>0&&ee.push(e("settings.roles.orgPermsCount",{count:L.staticPermissionCount})),L.allowsAllConnections?ee.push(e("settings.roles.allConnections")):L.connectionCount&&L.connectionCount>0&&ee.push(e("settings.roles.connectionCount",{count:L.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]=P):P=t[42];let F;t[43]!==z||t[44]!==P?(F={id:"permissions",header:z,render:P,cellClassName:"flex-1 min-w-0"},t[43]=z,t[44]=P,t[45]=F):F=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:Ws,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(wt,{children:[s.jsx(Gt,{asChild:!0,children:s.jsx(ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:qs,children:s.jsx(Bt,{size:16})})}),s.jsx(kt,{align:"end",onClick:Hs,children:s.jsxs(Ut,{variant:"destructive",onClick:()=>{const L=j.role;L.id&&o({id:L.id,label:L.label})},children:[s.jsx(Vt,{size:16}),e("settings.roles.delete")]})})]}),cellClassName:"w-12 shrink-0"},t[50]=e,t[51]=B):B=t[51];let Z;t[52]!==k||t[53]!==y||t[54]!==F||t[55]!==U||t[56]!==B?(Z=[k,y,F,U,B],t[52]=k,t[53]=y,t[54]=F,t[55]=U,t[56]=B,t[57]=Z):Z=t[57];const X=Z;let te;t[58]!==p?(te=j=>{if(j.kind==="builtin")p(`builtin-${j.role.role}`);else{const L=j.role;p(L.id)}},t[58]=p,t[59]=te):te=t[59];const le=te;if(R){let j;t[60]!==p?(j=()=>p(void 0),t[60]=p,t[61]=j):j=t[61];let L;return t[62]!==x||t[63]!==p?(L=()=>{x(),p(void 0)},t[62]=x,t[63]=p,t[64]=L):L=t[64],s.jsx(zs,{target:R,onBack:j,onSaved:L},Ks(R))}let K;t[65]!==e?(K=e("settings.roles.pageTitle"),t[65]=e,t[66]=K):K=t[66];let H;t[67]!==K?(H=s.jsx(ie.Title,{children:K}),t[67]=K,t[68]=H):H=t[68];let T;t[69]!==e?(T=e("settings.roles.searchPlaceholder"),t[69]=e,t[70]=T):T=t[70];let G;t[71]===Symbol.for("react.memo_cache_sentinel")?(G=j=>{j.key==="Escape"&&(n(""),j.target.blur())},t[71]=G):G=t[71];let Q;t[72]!==l||t[73]!==T?(Q=s.jsx(Qe,{value:l,onChange:n,placeholder:T,className:"w-full md:w-[375px]",onKeyDown:G}),t[72]=l,t[73]=T,t[74]=Q):Q=t[74];let q;t[75]!==p?(q=()=>p("new"),t[75]=p,t[76]=q):q=t[76];let ne;t[77]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(ze,{size:16}),t[77]=ne):ne=t[77];let se;t[78]!==e?(se=e("settings.roles.createRole"),t[78]=e,t[79]=se):se=t[79];let oe;t[80]!==q||t[81]!==se?(oe=s.jsxs(ce,{onClick:q,children:[ne,se]}),t[80]=q,t[81]=se,t[82]=oe):oe=t[82];let ue;t[83]!==Q||t[84]!==oe?(ue=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[Q,oe]}),t[83]=Q,t[84]=oe,t[85]=ue):ue=t[85];let fe;t[86]!==l||t[87]!==e?(fe=l?s.jsx(tt,{title:e("settings.roles.noRolesFound"),description:e("settings.roles.noRolesMatchSearch",{search:l})}):s.jsx(tt,{title:e("settings.roles.noRoles"),description:e("settings.roles.createRoleGetStarted")}),t[86]=l,t[87]=e,t[88]=fe):fe=t[88];let ge;t[89]!==b||t[90]!==X||t[91]!==le||t[92]!==fe?(ge=s.jsx(Yt,{columns:X,data:b,isLoading:!1,onRowClick:le,emptyState:fe}),t[89]=b,t[90]=X,t[91]=le,t[92]=fe,t[93]=ge):ge=t[93];let he;t[94]!==H||t[95]!==ue||t[96]!==ge?(he=s.jsx(ie.Content,{children:s.jsx(ie.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[H,ue,ge]})})}),t[94]=H,t[95]=ue,t[96]=ge,t[97]=he):he=t[97];const Ve=i!==null;let Ge;t[98]===Symbol.for("react.memo_cache_sentinel")?(Ge=j=>!j&&o(null),t[98]=Ge):Ge=t[98];let xe;t[99]!==e?(xe=e("settings.roles.deleteRoleTitle"),t[99]=e,t[100]=xe):xe=t[100];let pe;t[101]!==xe?(pe=s.jsx(ft,{children:xe}),t[101]=xe,t[102]=pe):pe=t[102];const Ye=i?.label??"";let Te;t[103]!==e||t[104]!==Ye?(Te=e("settings.roles.deleteRoleConfirm",{role:Ye}),t[103]=e,t[104]=Ye,t[105]=Te):Te=t[105];let Ee;t[106]!==Te?(Ee=s.jsx(gt,{children:Te}),t[106]=Te,t[107]=Ee):Ee=t[107];let Ie;t[108]!==pe||t[109]!==Ee?(Ie=s.jsxs(ht,{children:[pe,Ee]}),t[108]=pe,t[109]=Ee,t[110]=Ie):Ie=t[110];let _e;t[111]!==e?(_e=e("settings.roles.cancel"),t[111]=e,t[112]=_e):_e=t[112];let Re;t[113]!==_e?(Re=s.jsx(xt,{children:_e}),t[113]=_e,t[114]=Re):Re=t[114];let Se;t[115]!==r||t[116]!==i?(Se=()=>{i?.id&&r.mutate(i.id),o(null)},t[115]=r,t[116]=i,t[117]=Se):Se=t[117];let Ne;t[118]!==e?(Ne=e("settings.roles.delete"),t[118]=e,t[119]=Ne):Ne=t[119];let be;t[120]!==Se||t[121]!==Ne?(be=s.jsx(pt,{onClick:Se,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Ne}),t[120]=Se,t[121]=Ne,t[122]=be):be=t[122];let Ce;t[123]!==Re||t[124]!==be?(Ce=s.jsxs(Tt,{children:[Re,be]}),t[123]=Re,t[124]=be,t[125]=Ce):Ce=t[125];let Ae;t[126]!==Ie||t[127]!==Ce?(Ae=s.jsxs(ut,{children:[Ie,Ce]}),t[126]=Ie,t[127]=Ce,t[128]=Ae):Ae=t[128];let Oe;t[129]!==Ve||t[130]!==Ae?(Oe=s.jsx(mt,{open:Ve,onOpenChange:Ge,children:Ae}),t[129]=Ve,t[130]=Ae,t[131]=Oe):Oe=t[131];let ke;return t[132]!==he||t[133]!==Oe?(ke=s.jsxs(ie,{children:[he,Oe]}),t[132]=he,t[133]=Oe,t[134]=ke):ke=t[134],ke}function Hs(t){return t.stopPropagation()}function qs(t){return t.stopPropagation()}function Ws(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Xs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:W("size-2.5 rounded-full shrink-0",dt(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(ct,{size:12,className:"text-muted-foreground shrink-0"})]})}function Js(t,e){Ke("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),ve.error(t instanceof Error?t.message:"Failed to delete role")}function el(){const t=J.c(7),e=re();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(ie,{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($.Suspense,{fallback:s.jsx(ie,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(je,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Zs,{})}),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 Oo(){const t=J.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{Oo as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{c as H,j as s,b as se,r as V,B as le,m as ie,af as yt,X as Ye,Y as ye,F as ve,o as _e,Z as Qe,_ as Je,e as ke,K as ce,t as oe,p as ne,D as jt,n as St,d as Nt,E as kt,z as Ct}from"./index-CXWWJmED.js";import{e as Me,d as Ee,a as Ze,b as Oe,h as et,c as tt,D as wt}from"./dialog-S6zU-X1o.js";import{d as It,b as _t,a as Mt,D as Et}from"./drawer-CQnxFo4h.js";import{u as Ot}from"./use-mobile-5SOdKrGk.js";import{c as st,S as Ie,F as Lt,u as Le}from"./chat-context-DyvKnksd.js";import{C as Tt}from"./checkbox-CcdD9hyv.js";import{I as pe}from"./input-boqiKbt5.js";import{S as At,a as Pt,b as zt,c as Dt,d as Rt}from"./select-BzIcrZmY.js";import{S as te}from"./skeleton-DfWmK_Y8.js";import{i as it,b as lt,c as Ft,a as Kt,s as $t}from"./Settings02-Vn36Nz-O.js";import{d as Ut,a as Bt,b as Wt,i as Vt}from"./Tool01-CSu_r-q6.js";import{i as Ht}from"./Key01-D8-RvxFO.js";import{i as nt}from"./SearchMd-95D3LDtT.js";import{d as Te,u as qt,b as Gt}from"./use-ai-providers-C8J33FgM.js";import{g as Ae}from"./ai-providers-logos-DD3qZ33J.js";import{i as Xt}from"./Monitor01-BVloJrIj.js";import{i as Yt}from"./AlertCircle-Dq3WjiEJ.js";import{u as we}from"./studio-tools-CTvMzhHZ.js";import{i as Qt}from"./ChevronRight-BBTu-8S3.js";import{A as Jt}from"./avatar-Cqm3Lq4j.js";import{S as De,a as Re,b as ot}from"./settings-section-kinXnNNm.js";import{s as rt}from"./Eye-Dp-Mi9OG.js";import{i as Zt}from"./Check-qxVfMARc.js";import{a as es}from"./Copy01-D5KM45B8.js";import{t as Fe}from"./ChevronDown-e1-U-GuJ.js";import{t as ts}from"./Stars01-Dhu1azXB.js";function xe(l){const e=H.c(3),{size:t}=l,i=t===void 0?16:t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=n):n=e[0];let o;return e[1]!==i?(o=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:i,height:i,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),e[1]=i,e[2]=o):o=e[2],o}function ge(l){const e=H.c(3),{size:t}=l,i=t===void 0?16:t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=n):n=e[0];let o;return e[1]!==i?(o=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:i,height:i,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:n}),e[1]=i,e[2]=o):o=e[2],o}const ss={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:xe},codex:{labelKey:"chat.agentIcons.codex",Icon:ge}};function Zi(l){return(l&&ss[l])??null}const Ke="bunx decocms@latest link",is=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:s.jsx(xe,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:s.jsx(ge,{size:18})}];function ls(l){const e=H.c(46),{open:t,onOpenChange:i}=l,n=se();let o;e[0]!==t?(o={fast:t},e[0]=t,e[1]=o):o=e[1];const r=st(o),[c,u]=V.useState(!1);let d,a,h,p,m,f,v,N;if(e[2]!==r.hostname||e[3]!==r.machineId||e[4]!==r.online||e[5]!==i||e[6]!==t||e[7]!==n){const C=r.hostname??r.machineId??n("chat.connectDesktopDialog.yourDesktop");p=Me,v=t,N=i,h=Ee,f="sm:max-w-md",a=Ze,d=Oe,m=r.online?n("chat.connectDesktopDialog.connectedTo",{desktopName:C}):n("chat.connectDesktopDialog.connectYourDesktop"),e[2]=r.hostname,e[3]=r.machineId,e[4]=r.online,e[5]=i,e[6]=t,e[7]=n,e[8]=d,e[9]=a,e[10]=h,e[11]=p,e[12]=m,e[13]=f,e[14]=v,e[15]=N}else d=e[8],a=e[9],h=e[10],p=e[11],m=e[12],f=e[13],v=e[14],N=e[15];let b;e[16]!==d||e[17]!==m?(b=s.jsx(d,{children:m}),e[16]=d,e[17]=m,e[18]=b):b=e[18];let j;e[19]!==r.online||e[20]!==n?(j=r.online?n("chat.connectDesktopDialog.machineAgentsDescription"):n("chat.connectDesktopDialog.runCommandDescription"),e[19]=r.online,e[20]=n,e[21]=j):j=e[21];let w;e[22]!==j?(w=s.jsx(et,{children:j}),e[22]=j,e[23]=w):w=e[23];let O;e[24]!==a||e[25]!==b||e[26]!==w?(O=s.jsxs(a,{children:[b,w]}),e[24]=a,e[25]=b,e[26]=w,e[27]=O):O=e[27];let _;e[28]!==c||e[29]!==r.online?(_=!r.online&&s.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:Ke}),s.jsx(le,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(Ke).then(()=>{u(!0),setTimeout(()=>u(!1),1500)})},children:c?s.jsx(Zt,{size:14}):s.jsx(es,{size:14})})]}),e[28]=c,e[29]=r.online,e[30]=_):_=e[30];let I;e[31]!==r.capabilities||e[32]!==r.online||e[33]!==n?(I=r.online?s.jsx("div",{className:"flex flex-col gap-3 text-sm",children:s.jsx("div",{className:"flex flex-col gap-2",children:is.map(C=>{const M=r.capabilities.includes(C.capability);return s.jsxs("div",{className:ie("flex items-center gap-3 rounded-md border px-3 py-2",M?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[s.jsx("div",{className:ie("flex size-6 items-center justify-center",M?"text-foreground":"text-muted-foreground"),children:C.icon}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium",children:n(C.labelKey)}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n(M?C.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),s.jsx("span",{className:ie("size-2 rounded-full",M?"bg-success":"bg-muted-foreground/30")})]},C.capability)})})}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Ie,{size:"sm"}),n("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=r.capabilities,e[32]=r.online,e[33]=n,e[34]=I):I=e[34];let x;e[35]!==h||e[36]!==_||e[37]!==I||e[38]!==f||e[39]!==O?(x=s.jsxs(h,{className:f,children:[O,_,I]}),e[35]=h,e[36]=_,e[37]=I,e[38]=f,e[39]=O,e[40]=x):x=e[40];let k;return e[41]!==p||e[42]!==x||e[43]!==v||e[44]!==N?(k=s.jsx(p,{open:v,onOpenChange:N,children:x}),e[41]=p,e[42]=x,e[43]=v,e[44]=N,e[45]=k):k=e[45],k}function fe(l,e,t){let i=t.initialDeps??[],n,o=!0;function r(){var c,u,d;let a;t.key&&((c=t.debug)!=null&&c.call(t))&&(a=Date.now());const h=l();if(!(h.length!==i.length||h.some((f,v)=>i[v]!==f)))return n;i=h;let m;if(t.key&&((u=t.debug)!=null&&u.call(t))&&(m=Date.now()),n=e(...h),t.key&&((d=t.debug)!=null&&d.call(t))){const f=Math.round((Date.now()-a)*100)/100,v=Math.round((Date.now()-m)*100)/100,N=v/16,b=(j,w)=>{for(j=String(j);j.length<w;)j=" "+j;return j};console.info(`%c⏱ ${b(v,5)} /${b(f,5)} ms`,`
|
|
2
|
-
font-size: .6rem;
|
|
3
|
-
font-weight: bold;
|
|
4
|
-
color: hsl(${Math.max(0,Math.min(120-120*N,120))}deg 100% 31%);`,t?.key)}return t?.onChange&&!(o&&t.skipInitialOnChange)&&t.onChange(n),o=!1,n}return r.updateDeps=c=>{i=c},r}function $e(l,e){if(l===void 0)throw new Error("Unexpected undefined");return l}const ns=(l,e)=>Math.abs(l-e)<1.01,os=(l,e,t)=>{let i;return function(...n){l.clearTimeout(i),i=l.setTimeout(()=>e.apply(this,n),t)}},Ue=l=>{const{offsetWidth:e,offsetHeight:t}=l;return{width:e,height:t}},rs=l=>l,as=l=>{const e=Math.max(l.startIndex-l.overscan,0),t=Math.min(l.endIndex+l.overscan,l.count-1),i=[];for(let n=e;n<=t;n++)i.push(n);return i},cs=(l,e)=>{const t=l.scrollElement;if(!t)return;const i=l.targetWindow;if(!i)return;const n=r=>{const{width:c,height:u}=r;e({width:Math.round(c),height:Math.round(u)})};if(n(Ue(t)),!i.ResizeObserver)return()=>{};const o=new i.ResizeObserver(r=>{const c=()=>{const u=r[0];if(u?.borderBoxSize){const d=u.borderBoxSize[0];if(d){n({width:d.inlineSize,height:d.blockSize});return}}n(Ue(t))};l.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return o.observe(t,{box:"border-box"}),()=>{o.unobserve(t)}},Be={passive:!0},We=typeof window>"u"?!0:"onscrollend"in window,ds=(l,e)=>{const t=l.scrollElement;if(!t)return;const i=l.targetWindow;if(!i)return;let n=0;const o=l.options.useScrollendEvent&&We?()=>{}:os(i,()=>{e(n,!1)},l.options.isScrollingResetDelay),r=a=>()=>{const{horizontal:h,isRtl:p}=l.options;n=h?t.scrollLeft*(p&&-1||1):t.scrollTop,o(),e(n,a)},c=r(!0),u=r(!1);t.addEventListener("scroll",c,Be);const d=l.options.useScrollendEvent&&We;return d&&t.addEventListener("scrollend",u,Be),()=>{t.removeEventListener("scroll",c),d&&t.removeEventListener("scrollend",u)}},us=(l,e,t)=>{if(e?.borderBoxSize){const i=e.borderBoxSize[0];if(i)return Math.round(i[t.options.horizontal?"inlineSize":"blockSize"])}return l[t.options.horizontal?"offsetWidth":"offsetHeight"]},ms=(l,{adjustments:e=0,behavior:t},i)=>{var n,o;const r=l+e;(o=(n=i.scrollElement)==null?void 0:n.scrollTo)==null||o.call(n,{[i.options.horizontal?"left":"top"]:r,behavior:t})};class hs{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var t,i,n;return((n=(i=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:i.now)==null?void 0:n.call(i))??Date.now()},this.observer=(()=>{let t=null;const i=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(n=>{n.forEach(o=>{const r=()=>{const c=o.target,u=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(u)&&this.resizeItem(u,this.options.measureElement(c,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var n;(n=i())==null||n.disconnect(),t=null},observe:n=>{var o;return(o=i())==null?void 0:o.observe(n,{box:"border-box"})},unobserve:n=>{var o;return(o=i())==null?void 0:o.unobserve(n)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([i,n])=>{typeof n>"u"&&delete t[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rs,rangeExtractor:as,onChange:()=>{},measureElement:us,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...t}},this.notify=t=>{var i,n;(n=(i=this.options).onChange)==null||n.call(i,this,t)},this.maybeNotify=fe(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,i)=>{const n=new Map,o=new Map;for(let r=i-1;r>=0;r--){const c=t[r];if(n.has(c.lane))continue;const u=o.get(c.lane);if(u==null||c.end>u.end?o.set(c.lane,c):c.end<u.end&&n.set(c.lane,!0),n.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,c)=>r.end===c.end?r.index-c.index:r.end-c.end)[0]:void 0},this.getMeasurementOptions=fe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(t,i,n,o,r,c,u)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:i,scrollMargin:n,getItemKey:o,enabled:r,lanes:c,laneAssignmentMode:u}),{key:!1}),this.getMeasurements=fe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:i,scrollMargin:n,getItemKey:o,enabled:r,lanes:c,laneAssignmentMode:u},d)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const m of this.laneAssignments.keys())m>=t&&this.laneAssignments.delete(m);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const a=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,a),p=new Array(c).fill(void 0);for(let m=0;m<a;m++){const f=h[m];f&&(p[f.lane]=m)}for(let m=a;m<t;m++){const f=o(m),v=this.laneAssignments.get(m);let N,b;const j=u==="estimate"||d.has(f);if(v!==void 0&&this.options.lanes>1){N=v;const I=p[N],x=I!==void 0?h[I]:void 0;b=x?x.end+this.options.gap:i+n}else{const I=this.options.lanes===1?h[m-1]:this.getFurthestMeasurement(h,m);b=I?I.end+this.options.gap:i+n,N=I?I.lane:m%this.options.lanes,this.options.lanes>1&&j&&this.laneAssignments.set(m,N)}const w=d.get(f),O=typeof w=="number"?w:this.options.estimateSize(m),_=b+O;h[m]={index:m,start:b,size:O,end:_,key:f,lane:N},p[N]=m}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=fe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,i,n,o)=>this.range=t.length>0&&i>0?fs({measurements:t,outerSize:i,scrollOffset:n,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=fe(()=>{let t=null,i=null;const n=this.calculateRange();return n&&(t=n.startIndex,i=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,i]},(t,i,n,o,r)=>o===null||r===null?[]:t({startIndex:o,endIndex:r,overscan:i,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const i=this.options.indexAttribute,n=t.getAttribute(i);return n?parseInt(n,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var i;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const n=this.scrollState.index??((i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:i.index);if(n!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,n-o),c=Math.min(this.options.count-1,n+o);return t>=r&&t<=c}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((r,c)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(c))});return}const i=this.indexFromElement(t),n=this.options.getItemKey(i),o=this.elementsCache.get(n);o!==t&&(o&&this.observer.unobserve(o),this.observer.observe(t),this.elementsCache.set(n,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,i)=>{var n;const o=this.measurementsCache[t];if(!o)return;const r=this.itemSizeCache.get(o.key)??o.size,c=i-r;c!==0&&(((n=this.scrollState)==null?void 0:n.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,c,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,i)),this.notify(!1))},this.getVirtualItems=fe(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,i)=>{const n=[];for(let o=0,r=t.length;o<r;o++){const c=t[o],u=i[c];n.push(u)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const i=this.getMeasurements();if(i.length!==0)return $e(i[at(0,i.length-1,n=>$e(i[n]).start,t)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(t,i,n=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),r=this.getScrollOffset();i==="auto"&&(i=t>=r+o?"end":"start"),i==="center"?t+=(n-o)/2:i==="end"&&(t-=o);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,t),0)},this.getOffsetForIndex=(t,i="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const n=this.getSize(),o=this.getScrollOffset(),r=this.measurementsCache[t];if(!r)return;if(i==="auto")if(r.end>=o+n-this.options.scrollPaddingEnd)i="end";else if(r.start<=o+this.options.scrollPaddingStart)i="start";else return[o,i];if(i==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),i];const c=i==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,i,r.size),i]},this.scrollToOffset=(t,{align:i="start",behavior:n="auto"}={})=>{const o=this.getOffsetForAlignment(t,i),r=this.now();this.scrollState={index:null,align:i,behavior:n,startedAt:r,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:i="auto",behavior:n="auto"}={})=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getOffsetForIndex(t,i);if(!o)return;const[r,c]=o,u=this.now();this.scrollState={index:t,align:c,behavior:n,startedAt:u,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:i="auto"}={})=>{const n=this.getScrollOffset()+t,o=this.now();this.scrollState={index:null,align:"start",behavior:i,startedAt:o,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var t;const i=this.getMeasurements();let n;if(i.length===0)n=this.options.paddingStart;else if(this.options.lanes===1)n=((t=i[i.length-1])==null?void 0:t.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=i.length-1;for(;r>=0&&o.some(c=>c===null);){const c=i[r];o[c.lane]===null&&(o[c.lane]=c.end),r--}n=Math.max(...o.filter(c=>c!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:i,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const i=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,n=i?i[0]:this.scrollState.lastTargetOffset,o=1,r=n!==this.scrollState.lastTargetOffset;if(!r&&ns(n,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,r&&(this.scrollState.lastTargetOffset=n,this.scrollState.behavior="auto",this._scrollToOffset(n,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const at=(l,e,t,i)=>{for(;l<=e;){const n=(l+e)/2|0,o=t(n);if(o<i)l=n+1;else if(o>i)e=n-1;else return n}return l>0?l-1:0};function fs({measurements:l,outerSize:e,scrollOffset:t,lanes:i}){const n=l.length-1,o=u=>l[u].start;if(l.length<=i)return{startIndex:0,endIndex:n};let r=at(0,n,o,t),c=r;if(i===1)for(;c<n&&l[c].end<t+e;)c++;else if(i>1){const u=Array(i).fill(0);for(;c<n&&u.some(a=>a<t+e);){const a=l[c];u[a.lane]=a.end,c++}const d=Array(i).fill(t+e);for(;r>=0&&d.some(a=>a>=t);){const a=l[r];d[a.lane]=a.start,r--}r=Math.max(0,r-r%i),c=Math.min(n,c+(i-1-c%i))}return{startIndex:r,endIndex:c}}const Ve=typeof document<"u"?V.useLayoutEffect:V.useEffect;function ps({useFlushSync:l=!0,...e}){const t=V.useReducer(()=>({}),{})[1],i={...e,onChange:(o,r)=>{var c;l&&r?yt.flushSync(t):t(),(c=e.onChange)==null||c.call(e,o,r)}},[n]=V.useState(()=>new hs(i));return n.setOptions(i),Ve(()=>n._didMount(),[]),Ve(()=>n._willUpdate()),n}function xs(l){return ps({observeElementRect:cs,observeElementOffset:ds,scrollToFn:ms,...l})}const ct=[{id:"openai",name:"OpenAI",description:"GPT-4, GPT-5, and other OpenAI models",logo:"https://decoims.com/decocms/b51001ef-ae58-4db4-8a75-9e6d2df2dd8e/openai.png",baseUrlPlaceholder:"https://api.openai.com/v1",defaultBaseUrl:"https://api.openai.com/v1",apiKeyRecommended:!0,helpText:"Use your OpenAI API key (starts with sk-)."},{id:"litellm",name:"LiteLLM",description:"Connect to a LiteLLM gateway your team manages",logo:"https://decoims.com/decocms/e974ae05-ad64-4b4a-8444-d9705f019b85/litellm.png",baseUrlPlaceholder:"http://localhost:4000",apiKeyRecommended:!0,helpText:"Point at your LiteLLM proxy. The base URL should be the root of the proxy (we'll append /v1)."},{id:"ollama",name:"Ollama",description:"Run open-source models on your own computer",logo:"https://decoims.com/decocms/2bb2f822-5288-4b7c-a541-dcbef76525a0/ollama.png",baseUrlPlaceholder:"http://localhost:11434",apiKeyRecommended:!1,helpText:"Ollama exposes /v1 by default — no API key required for local use."},{id:"lm-studio",name:"LM Studio",description:"Open models running through LM Studio",logo:"https://decoims.com/decocms/9f0ab1a9-d2d5-4f3e-9de0-aadd4926428d/lmstudio.webp",baseUrlPlaceholder:"http://localhost:1234",apiKeyRecommended:!1,helpText:"Start the local server in LM Studio, then paste its base URL here."},{id:"vllm",name:"vLLM",description:"Connect to your team's self-hosted vLLM server",logo:"https://decoims.com/decocms/b6c60e4f-a4aa-443c-981f-ad0f31640e22/vllm.png",baseUrlPlaceholder:"http://localhost:8000",apiKeyRecommended:!1}];function je(l){if(l)return ct.find(e=>e.id===l)}const He=4;function be(l){const e=H.c(8),{logo:t,name:i,description:n,onClick:o}=l;let r;e[0]!==t||e[1]!==i?(r=t?s.jsx("img",{src:t,alt:i,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(Jt,{fallback:i.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[0]=t,e[1]=i,e[2]=r):r=e[2];let c;return e[3]!==n||e[4]!==i||e[5]!==o||e[6]!==r?(c=s.jsx(ot,{onClick:o,icon:r,title:i,description:n}),e[3]=n,e[4]=i,e[5]=o,e[6]=r,e[7]=c):c=e[7],c}function dt(l){const e=H.c(38),{providers:t,onSelect:i,onShowAll:n}=l,o=se();let r;e[0]!==t?(r=t.find(ys),e[0]=t,e[1]=r):r=e[1];const c=r;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u={openrouter:0,llmapi:1,anthropic:2,google:3},e[2]=u):u=e[2];const d=u;let a;if(e[3]!==i||e[4]!==t||e[5]!==o){let O;e[7]===Symbol.for("react.memo_cache_sentinel")?(O=(S,E)=>{const P=d[S.id]??Number.MAX_SAFE_INTEGER,A=d[E.id]??Number.MAX_SAFE_INTEGER;return P-A},e[7]=O):O=e[7];const _=t.filter(bs).sort(O);let I;e[8]!==t?(I=t.find(vs),e[8]=t,e[9]=I):I=e[9];const x=I;let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=je("openai"),e[10]=k):k=e[10];const C=k;let M;e[11]!==i?(M=S=>s.jsx(be,{logo:S.logo,name:S.name,description:S.description,onClick:()=>i({kind:"provider",provider:S})},S.id),e[11]=i,e[12]=M):M=e[12];let y;e[13]!==i||e[14]!==x?(y=x&&C?[s.jsx(be,{logo:C.logo,name:C.name,description:C.description,onClick:()=>i({kind:"openai-compatible",provider:x,preset:C})},C.id)]:[],e[13]=i,e[14]=x,e[15]=y):y=e[15];let g;e[16]!==i||e[17]!==x||e[18]!==o?(g=x?[...ct.filter(gs).map(S=>s.jsx(be,{logo:S.logo,name:S.name,description:S.description,onClick:()=>i({kind:"openai-compatible",provider:x,preset:S})},S.id)),s.jsx(be,{logo:x.logo,name:o("settings.aiProviders.customOpenAiCompatible"),description:o("settings.aiProviders.customOpenAiDescription"),onClick:()=>i({kind:"openai-compatible",provider:x,preset:null})},"custom")]:[],e[16]=i,e[17]=x,e[18]=o,e[19]=g):g=e[19],a=[..._.map(M),...y,...g],e[3]=i,e[4]=t,e[5]=o,e[6]=a}else a=e[6];const h=a,p=h.length-He,m=!!n&&p>0;let f;e[20]!==h||e[21]!==m?(f=m?h.slice(0,He):h,e[20]=h,e[21]=m,e[22]=f):f=e[22];const v=f;let N;e[23]!==c||e[24]!==i||e[25]!==o?(N=c&&s.jsx(De,{children:s.jsxs("div",{className:"relative rounded-xl border border-violet-400/30 bg-gradient-to-br from-violet-50/50 via-transparent to-lime-50/30 dark:from-violet-950/20 dark:to-lime-950/10 p-1.5",children:[s.jsx("div",{className:"absolute inset-0 rounded-xl bg-gradient-to-br from-violet-400/5 to-lime-400/5 pointer-events-none"}),s.jsx("p",{className:"text-xs font-medium text-violet-700 dark:text-violet-400 mb-1.5 px-2 pt-2 relative",children:o("settings.aiProviders.recommended")}),s.jsx(Re,{className:"relative",children:s.jsx(be,{logo:c.logo,name:c.name,description:c.description,onClick:()=>i({kind:"provider",provider:c})})})]})}),e[23]=c,e[24]=i,e[25]=o,e[26]=N):N=e[26];let b;e[27]!==p||e[28]!==n||e[29]!==m||e[30]!==o?(b=m&&s.jsx(ot,{onClick:n,title:o("settings.aiProviders.moreProviders",{count:p,plural:p===1?"":"s"}),action:s.jsx(Qt,{size:16,className:"text-muted-foreground"})}),e[27]=p,e[28]=n,e[29]=m,e[30]=o,e[31]=b):b=e[31];let j;e[32]!==b||e[33]!==v?(j=s.jsx(De,{children:s.jsxs(Re,{children:[v,b]})}),e[32]=b,e[33]=v,e[34]=j):j=e[34];let w;return e[35]!==N||e[36]!==j?(w=s.jsxs("div",{className:"flex flex-col gap-6",children:[N,j]}),e[35]=N,e[36]=j,e[37]=w):w=e[37],w}function gs(l){return l.id!=="openai"}function vs(l){return l.id==="openai-compatible"}function bs(l){return l.id!=="deco"&&l.id!=="openai-compatible"}function ys(l){return l.id==="deco"}const js=Ye({label:ye().optional(),apiKey:ye().min(1,"API key is required")});function Ss(l){const e=H.c(87),{providerId:t,onCancel:i,onSuccess:n}=l,{org:o}=ve(),r=we(),c=_e(),[u,d]=V.useState(!1),a=se();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={resolver:Qe(js),defaultValues:{label:"",apiKey:""}},e[0]=h):h=e[0];const{register:p,handleSubmit:m,formState:f}=Je(h),{errors:v}=f;let N;e[1]!==t||e[2]!==r||e[3]!==a?(N=async U=>{await r.call("AI_PROVIDER_KEY_CREATE",{providerId:t,label:U.label||a("settings.connectForms.defaultKeyLabel"),apiKey:U.apiKey})},e[1]=t,e[2]=r,e[3]=a,e[4]=N):N=e[4];let b;e[5]!==n||e[6]!==o||e[7]!==c||e[8]!==a?(b=()=>{c.invalidateQueries({queryKey:ce.aiProviderKeys(o.id)}),c.invalidateQueries({queryKey:ce.aiProviders(o.id)}),oe.success(a("settings.connectForms.keySavedSuccess")),n()},e[5]=n,e[6]=o,e[7]=c,e[8]=a,e[9]=b):b=e[9];let j;e[10]!==a?(j=U=>{oe.error(a("settings.connectForms.failedSaveKey",{error:U.message}))},e[10]=a,e[11]=j):j=e[11];let w;e[12]!==N||e[13]!==b||e[14]!==j?(w={mutationFn:N,onSuccess:b,onError:j},e[12]=N,e[13]=b,e[14]=j,e[15]=w):w=e[15];const{mutate:O,isPending:_,error:I}=ke(w);let x;e[16]!==O?(x=U=>O(U),e[16]=O,e[17]=x):x=e[17];let k;e[18]!==m||e[19]!==x?(k=m(x),e[18]=m,e[19]=x,e[20]=k):k=e[20];let C;e[21]!==a?(C=a("settings.connectForms.labelField"),e[21]=a,e[22]=C):C=e[22];let M;e[23]!==C?(M=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:C}),e[23]=C,e[24]=M):M=e[24];let y;e[25]!==a?(y=a("settings.connectForms.labelPlaceholder"),e[25]=a,e[26]=y):y=e[26];let g;e[27]!==p?(g=p("label"),e[27]=p,e[28]=g):g=e[28];let S;e[29]!==y||e[30]!==g?(S=s.jsx(pe,{placeholder:y,...g,className:"h-8 text-sm"}),e[29]=y,e[30]=g,e[31]=S):S=e[31];let E;e[32]!==M||e[33]!==S?(E=s.jsxs("div",{className:"space-y-1",children:[M,S]}),e[32]=M,e[33]=S,e[34]=E):E=e[34];let P;e[35]!==a?(P=a("settings.connectForms.apiKeyField"),e[35]=a,e[36]=P):P=e[36];let A;e[37]!==P?(A=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:P}),e[37]=P,e[38]=A):A=e[38];const L=u?"text":"password";let z;e[39]!==p?(z=p("apiKey"),e[39]=p,e[40]=z):z=e[40];let R;e[41]!==L||e[42]!==z?(R=s.jsx(pe,{type:L,placeholder:"sk-...",...z,className:"ph-no-capture h-8 text-sm pr-8"}),e[41]=L,e[42]=z,e[43]=R):R=e[43];let K;e[44]!==u?(K=()=>d(!u),e[44]=u,e[45]=K):K=e[45];let D;e[46]!==u||e[47]!==a?(D=a(u?"settings.connectForms.hideApiKey":"settings.connectForms.showApiKey"),e[46]=u,e[47]=a,e[48]=D):D=e[48];let W;e[49]!==u?(W=u?s.jsx(it,{size:14}):s.jsx(rt,{size:14}),e[49]=u,e[50]=W):W=e[50];let Q;e[51]!==K||e[52]!==D||e[53]!==W?(Q=s.jsx("button",{type:"button",onClick:K,"aria-label":D,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:W}),e[51]=K,e[52]=D,e[53]=W,e[54]=Q):Q=e[54];let J;e[55]!==R||e[56]!==Q?(J=s.jsxs("div",{className:"relative",children:[R,Q]}),e[55]=R,e[56]=Q,e[57]=J):J=e[57];let Z;e[58]!==v.apiKey?(Z=v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message}),e[58]=v.apiKey,e[59]=Z):Z=e[59];let X;e[60]!==A||e[61]!==J||e[62]!==Z?(X=s.jsxs("div",{className:"space-y-1",children:[A,J,Z]}),e[60]=A,e[61]=J,e[62]=Z,e[63]=X):X=e[63];let ee;e[64]!==I?(ee=I&&s.jsx("p",{className:"text-xs text-destructive",children:I.message}),e[64]=I,e[65]=ee):ee=e[65];let q;e[66]!==a?(q=a("settings.connectForms.cancel"),e[66]=a,e[67]=q):q=e[67];let G;e[68]!==_||e[69]!==i||e[70]!==q?(G=s.jsx(le,{type:"button",variant:"ghost",size:"sm",onClick:i,disabled:_,children:q}),e[68]=_,e[69]=i,e[70]=q,e[71]=G):G=e[71];let Y;e[72]!==_||e[73]!==a?(Y=a(_?"settings.connectForms.saving":"settings.connectForms.saveKey"),e[72]=_,e[73]=a,e[74]=Y):Y=e[74];let T;e[75]!==_||e[76]!==Y?(T=s.jsx(le,{type:"submit",size:"sm",disabled:_,children:Y}),e[75]=_,e[76]=Y,e[77]=T):T=e[77];let F;e[78]!==G||e[79]!==T?(F=s.jsxs(tt,{children:[G,T]}),e[78]=G,e[79]=T,e[80]=F):F=e[80];let $;return e[81]!==E||e[82]!==X||e[83]!==ee||e[84]!==F||e[85]!==k?($=s.jsxs("form",{onSubmit:k,className:"space-y-3",children:[E,X,ee,F]}),e[81]=E,e[82]=X,e[83]=ee,e[84]=F,e[85]=k,e[86]=$):$=e[86],$}const Ns=Ye({label:ye().optional(),baseUrl:ye().min(1,"Base URL is required"),apiKey:ye().optional()});function ks(l){const e=H.c(105),{preset:t,onCancel:i,onSuccess:n}=l,{org:o}=ve(),r=we(),c=_e(),[u,d]=V.useState(!1),a=se();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=Qe(Ns),e[0]=h):h=e[0];const p=t?.defaultBaseUrl??"";let m;e[1]!==p?(m={resolver:h,defaultValues:{label:"",baseUrl:p,apiKey:""}},e[1]=p,e[2]=m):m=e[2];const{register:f,handleSubmit:v,formState:N}=Je(m),{errors:b}=N;let j;e[3]!==t||e[4]!==r?(j=async ae=>{const bt=JSON.stringify({baseUrl:ae.baseUrl,apiKey:ae.apiKey||""});await r.call("AI_PROVIDER_KEY_CREATE",{providerId:"openai-compatible",label:ae.label||t?.name||ae.baseUrl,apiKey:bt,...t?{presetId:t.id}:{}})},e[3]=t,e[4]=r,e[5]=j):j=e[5];let w;e[6]!==n||e[7]!==o||e[8]!==c||e[9]!==a?(w=()=>{c.invalidateQueries({queryKey:ce.aiProviderKeys(o.id)}),c.invalidateQueries({queryKey:ce.aiProviders(o.id)}),oe.success(a("settings.connectForms.connectionSavedSuccess")),n()},e[6]=n,e[7]=o,e[8]=c,e[9]=a,e[10]=w):w=e[10];let O;e[11]!==a?(O=ae=>{oe.error(a("settings.connectForms.failedSaveConnection",{error:ae.message}))},e[11]=a,e[12]=O):O=e[12];let _;e[13]!==j||e[14]!==w||e[15]!==O?(_={mutationFn:j,onSuccess:w,onError:O},e[13]=j,e[14]=w,e[15]=O,e[16]=_):_=e[16];const{mutate:I,isPending:x,error:k}=ke(_);let C;e[17]!==t||e[18]!==a?(C=t?a("settings.connectForms.labelPlaceholderPreset",{name:t.name}):a("settings.connectForms.labelPlaceholderOpenAiCompatible"),e[17]=t,e[18]=a,e[19]=C):C=e[19];const M=C;let y;e[20]!==t?.baseUrlPlaceholder||e[21]!==a?(y=t?.baseUrlPlaceholder??a("settings.connectForms.baseUrlPlaceholder"),e[20]=t?.baseUrlPlaceholder,e[21]=a,e[22]=y):y=e[22];const g=y;let S;e[23]!==I?(S=ae=>I(ae),e[23]=I,e[24]=S):S=e[24];let E;e[25]!==v||e[26]!==S?(E=v(S),e[25]=v,e[26]=S,e[27]=E):E=e[27];let P;e[28]!==a?(P=a("settings.connectForms.labelField"),e[28]=a,e[29]=P):P=e[29];let A;e[30]!==P?(A=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:P}),e[30]=P,e[31]=A):A=e[31];let L;e[32]!==f?(L=f("label"),e[32]=f,e[33]=L):L=e[33];let z;e[34]!==M||e[35]!==L?(z=s.jsx(pe,{placeholder:M,...L,className:"h-8 text-sm"}),e[34]=M,e[35]=L,e[36]=z):z=e[36];let R;e[37]!==A||e[38]!==z?(R=s.jsxs("div",{className:"space-y-1",children:[A,z]}),e[37]=A,e[38]=z,e[39]=R):R=e[39];let K;e[40]!==g||e[41]!==b||e[42]!==t?.defaultBaseUrl||e[43]!==f||e[44]!==a?(K=t?.defaultBaseUrl?s.jsx("input",{type:"hidden",...f("baseUrl")}):s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:a("settings.connectForms.baseUrlField")}),s.jsx(pe,{type:"url",placeholder:g,...f("baseUrl"),className:"h-8 text-sm"}),b.baseUrl&&s.jsx("p",{className:"text-xs text-destructive",children:b.baseUrl.message})]}),e[40]=g,e[41]=b,e[42]=t?.defaultBaseUrl,e[43]=f,e[44]=a,e[45]=K):K=e[45];let D;e[46]!==a?(D=a("settings.connectForms.apiKeyField"),e[46]=a,e[47]=D):D=e[47];let W;e[48]!==t?.apiKeyRecommended||e[49]!==a?(W=t?.apiKeyRecommended?a("settings.connectForms.recommended"):a("settings.connectForms.optional"),e[48]=t?.apiKeyRecommended,e[49]=a,e[50]=W):W=e[50];let Q;e[51]!==W?(Q=s.jsxs("span",{className:"text-muted-foreground/60",children:["(",W,")"]}),e[51]=W,e[52]=Q):Q=e[52];let J;e[53]!==D||e[54]!==Q?(J=s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[D," ",Q]}),e[53]=D,e[54]=Q,e[55]=J):J=e[55];const Z=u?"text":"password";let X;e[56]!==f?(X=f("apiKey"),e[56]=f,e[57]=X):X=e[57];let ee;e[58]!==Z||e[59]!==X?(ee=s.jsx(pe,{type:Z,placeholder:"sk-...",...X,className:"ph-no-capture h-8 text-sm pr-8"}),e[58]=Z,e[59]=X,e[60]=ee):ee=e[60];let q;e[61]!==u?(q=()=>d(!u),e[61]=u,e[62]=q):q=e[62];let G;e[63]!==u||e[64]!==a?(G=a(u?"settings.connectForms.hideApiKey":"settings.connectForms.showApiKey"),e[63]=u,e[64]=a,e[65]=G):G=e[65];let Y;e[66]!==u?(Y=u?s.jsx(it,{size:14}):s.jsx(rt,{size:14}),e[66]=u,e[67]=Y):Y=e[67];let T;e[68]!==q||e[69]!==G||e[70]!==Y?(T=s.jsx("button",{type:"button",onClick:q,"aria-label":G,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:Y}),e[68]=q,e[69]=G,e[70]=Y,e[71]=T):T=e[71];let F;e[72]!==ee||e[73]!==T?(F=s.jsxs("div",{className:"relative",children:[ee,T]}),e[72]=ee,e[73]=T,e[74]=F):F=e[74];let $;e[75]!==J||e[76]!==F?($=s.jsxs("div",{className:"space-y-1",children:[J,F]}),e[75]=J,e[76]=F,e[77]=$):$=e[77];let U;e[78]!==t?(U=t?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:t.helpText}),e[78]=t,e[79]=U):U=e[79];let B;e[80]!==k?(B=k&&s.jsx("p",{className:"text-xs text-destructive",children:k.message}),e[80]=k,e[81]=B):B=e[81];let re;e[82]!==a?(re=a("settings.connectForms.cancel"),e[82]=a,e[83]=re):re=e[83];let de;e[84]!==x||e[85]!==i||e[86]!==re?(de=s.jsx(le,{type:"button",variant:"ghost",size:"sm",onClick:i,disabled:x,children:re}),e[84]=x,e[85]=i,e[86]=re,e[87]=de):de=e[87];let ue;e[88]!==x||e[89]!==a?(ue=a(x?"settings.connectForms.saving":"settings.connectForms.saveConnection"),e[88]=x,e[89]=a,e[90]=ue):ue=e[90];let me;e[91]!==x||e[92]!==ue?(me=s.jsx(le,{type:"submit",size:"sm",disabled:x,children:ue}),e[91]=x,e[92]=ue,e[93]=me):me=e[93];let he;e[94]!==de||e[95]!==me?(he=s.jsxs(tt,{children:[de,me]}),e[94]=de,e[95]=me,e[96]=he):he=e[96];let Se;return e[97]!==E||e[98]!==R||e[99]!==K||e[100]!==$||e[101]!==U||e[102]!==B||e[103]!==he?(Se=s.jsxs("form",{onSubmit:E,className:"space-y-3",children:[R,K,$,U,B,he]}),e[97]=E,e[98]=R,e[99]=K,e[100]=$,e[101]=U,e[102]=B,e[103]=he,e[104]=Se):Se=e[104],Se}const Cs={kind:"closed"};function ws(l,e){switch(e.type){case"open":return l.kind==="closed"?{kind:"grid"}:l;case"close":return{kind:"closed"};case"back":switch(l.kind){case"form":case"oauth-pending":case"provision-pending":case"provision-error":return{kind:"grid"};default:return l}case"select-form":return l.kind!=="grid"?l:{kind:"form",providerId:e.providerId,presetId:e.presetId};case"select-oauth":return l.kind!=="grid"?l:{kind:"oauth-pending",providerId:e.providerId,stateToken:e.stateToken};case"oauth-failed":return l.kind==="oauth-pending"?{kind:"grid"}:l;case"select-provision":return l.kind!=="grid"?l:{kind:"provision-pending",providerId:e.providerId};case"provision-error":return l.kind!=="provision-pending"?l:{kind:"provision-error",providerId:l.providerId,error:e.error};case"retry-provision":return l.kind!=="provision-error"?l:{kind:"provision-pending",providerId:l.providerId}}}function Is(l){switch(l.kind){case"form":case"oauth-pending":case"provision-pending":case"provision-error":return l.providerId;default:return null}}function _s({open:l,onOpenChange:e,initialProvider:t}){const i=se(),o=Te()?.providers??[],{org:r}=ve(),c=we(),u=_e(),[d,a]=V.useReducer(ws,Cs),h=V.useRef(!1);V.useEffect(()=>{l&&d.kind==="closed"?a({type:"open"}):!l&&d.kind!=="closed"&&a({type:"close"})},[l,d.kind]);const p=()=>{h.current=!1,a({type:"close"}),e(!1)},m=()=>{u.invalidateQueries({queryKey:ce.aiProviderKeys(r.id)}),u.invalidateQueries({queryKey:ce.aiProviders(r.id)})},{mutate:f}=ke({mutationFn:async({providerId:y,code:g,stateToken:S,label:E})=>(await c.call("AI_PROVIDER_OAUTH_EXCHANGE",{providerId:y,code:g,stateToken:S,label:E}),y),onSuccess:y=>{ne("ai_provider_oauth_succeeded",{provider_id:y}),m();const g=o.find(S=>S.id===y);oe.success(i("settings.connectProviderDialog.oauthSuccessMessage",{provider:g?.name??i("settings.connectProviderDialog.defaultProviderName")})),p()},onError:(y,g)=>{ne("ai_provider_oauth_failed",{provider_id:g.providerId,error:y.message}),oe.error(i("settings.connectProviderDialog.oauthFailedMessage",{error:y.message})),a({type:"oauth-failed"})}}),{mutate:v}=ke({mutationFn:async y=>(await c.call("AI_PROVIDER_PROVISION_KEY",{providerId:y}),y),onSuccess:y=>{ne("ai_provider_provision_succeeded",{provider_id:y}),m();const g=o.find(S=>S.id===y);oe.success(i("settings.connectProviderDialog.provisionSuccessMessage",{provider:g?.name??i("settings.connectProviderDialog.defaultProviderName")})),p()},onError:(y,g)=>{ne("ai_provider_provision_failed",{provider_id:g,error:y.message}),a({type:"provision-error",error:y.message})}}),N=async y=>{const{provider:g}=y,S=y.kind==="openai-compatible"?y.preset?.id??null:null,E=g.supportedMethods.includes("oauth-pkce"),P=g.supportedMethods.includes("api-key");if(g.supportsProvision===!0){ne("ai_provider_connect_clicked",{provider_id:g.id,method:"provision"}),a({type:"select-provision",providerId:g.id}),v(g.id);return}if(E){ne("ai_provider_connect_clicked",{provider_id:g.id,method:"oauth-pkce"});try{const L=await c.call("AI_PROVIDER_OAUTH_URL",{providerId:g.id,callbackUrl:`${window.location.origin}/oauth/callback/ai-provider`});if(!L?.url)throw new Error("Invalid response from AI_PROVIDER_OAUTH_URL");a({type:"select-oauth",providerId:g.id,stateToken:L.stateToken}),window.open(L.url,"AiProviderOAuth","width=600,height=700")}catch(L){oe.error(i("settings.connectProviderDialog.startOAuthFailedMessage",{error:L instanceof Error?L.message:String(L)}))}return}P&&(ne("ai_provider_connect_clicked",{provider_id:g.id,...S!==null?{preset_id:S}:{},method:"api-key"}),a({type:"select-form",providerId:g.id,presetId:S}))},b=V.useRef(N);b.current=N;const j=V.useRef(t);j.current=t,V.useEffect(()=>{!j.current||d.kind!=="grid"||h.current||(h.current=!0,b.current(j.current))},[d.kind]);const w=d.kind==="oauth-pending"?d.stateToken:null,O=d.kind==="oauth-pending"?d.providerId:null;V.useEffect(()=>{if(d.kind!=="oauth-pending")return;let y=!1;const g=d.stateToken,S=d.providerId,E=A=>{if(A.origin!==window.location.origin||A.data?.type!=="AI_PROVIDER_OAUTH_CALLBACK")return;const{code:L,stateToken:z}=A.data;if(z!==g){oe.error(i("settings.connectProviderDialog.securityCheckFailedMessage")),a({type:"oauth-failed"});return}y=!0;const R=o.find(K=>K.id===S);f({providerId:S,code:L,stateToken:g,label:R?.name??S})};window.addEventListener("message",E);const P=setTimeout(()=>{y||(ne("ai_provider_oauth_timeout",{provider_id:S}),a({type:"oauth-failed"}),oe.error(i("settings.connectProviderDialog.connectionTimedOutMessage")))},12e4);return()=>{window.removeEventListener("message",E),clearTimeout(P)}},[d.kind,w,O,f]);const _=Is(d),I=_?o.find(y=>y.id===_):null,k=(d.kind==="form"&&d.presetId?je(d.presetId):null)?.name??I?.name??i("settings.connectProviderDialog.defaultTitle"),C=d.kind!=="grid"&&d.kind!=="closed",M=()=>{t?p():a({type:"back"})};return s.jsx(Me,{open:d.kind!=="closed",onOpenChange:y=>!y&&p(),children:s.jsxs(Ee,{className:"sm:max-w-md max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ze,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[C&&s.jsx(le,{variant:"ghost",size:"icon","aria-label":i("settings.connectProviderDialog.backButtonLabel"),className:"h-7 w-7",onClick:M,children:s.jsx(lt,{size:16})}),s.jsx(Oe,{children:k})]}),d.kind==="grid"&&!t&&s.jsx(et,{children:i("settings.connectProviderDialog.gridDescription")})]}),d.kind==="grid"&&!t&&s.jsx(dt,{providers:o,onSelect:N}),d.kind==="form"&&(d.providerId==="openai-compatible"?s.jsx(ks,{preset:d.presetId?je(d.presetId):void 0,onCancel:()=>a({type:"back"}),onSuccess:()=>{m(),p()}}):s.jsx(Ss,{providerId:d.providerId,onCancel:()=>a({type:"back"}),onSuccess:()=>{m(),p()}})),d.kind==="oauth-pending"&&s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsx(Ie,{size:"lg"}),s.jsx("p",{className:"text-sm text-muted-foreground text-center",children:i("settings.connectProviderDialog.oauthPendingMessage")})]}),d.kind==="provision-pending"&&s.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[s.jsx(Ie,{size:"lg"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:i("settings.connectProviderDialog.provisionPendingMessage")})]}),d.kind==="provision-error"&&s.jsxs("div",{className:"flex flex-col items-center gap-4 py-6",children:[s.jsx(Yt,{size:28,className:"text-destructive"}),s.jsx("p",{className:"text-sm text-foreground text-center",children:d.error}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(le,{variant:"outline",size:"sm",onClick:()=>a({type:"back"}),children:i("settings.connectProviderDialog.backButton")}),s.jsx(le,{size:"sm",onClick:()=>{a({type:"retry-provision"}),v(d.providerId)},children:i("settings.connectProviderDialog.retryButton")})]})]})]})})}function Ms(){const l=H.c(7),{org:e}=ve(),t=we();let i;l[0]!==e.id?(i=ce.defaultBrand(e.id),l[0]=e.id,l[1]=i):i=l[1];let n;l[2]!==t?(n=async()=>{const{items:c}=await t.call("BRAND_CONTEXT_LIST",{});return(Array.isArray(c)?c:[]).find(Es)??null},l[2]=t,l[3]=n):n=l[3];let o;l[4]!==i||l[5]!==n?(o={queryKey:i,queryFn:n},l[4]=i,l[5]=n,l[6]=o):o=l[6];const{data:r}=St(o);return r??null}function Es(l){return l.isDefault&&!l.archivedAt}function Os(l){const e=l.colors;if(!e)return null;if(Array.isArray(e)){const t=e.find(n=>typeof n=="object"&&n!==null&&"label"in n&&/primary|brand|main/i.test(n.label)),i=t?t.value:e[0]?.value;return typeof i=="string"?i:null}if(typeof e=="object"){const t=e;return t.primary??Object.values(t)[0]??null}return null}function Ls(l){const e=H.c(66);let t;e[0]!==l?(t=l===void 0?{}:l,e[0]=l,e[1]=t):t=e[1];const{title:i,description:n,onLocalRuntimePicked:o}=t,r=se(),{org:c}=ve(),{localMode:u}=jt(),d=Ms(),a=st(),h=Lt(),[p,m]=V.useState(null),[f,v]=V.useState(!1),[N,b]=V.useState(!1),j=Te();let w;e[2]!==j?.providers?(w=j?.providers??[],e[2]=j?.providers,e[3]=w):w=e[3];const O=w;let _,I,x;if(e[4]!==d||e[5]!==h||e[6]!==n||e[7]!==a.capabilities||e[8]!==a.online||e[9]!==u||e[10]!==o||e[11]!==c.name||e[12]!==r||e[13]!==i){const L=[];if(a.online){if(a.capabilities.includes("claude-code")){let B;e[17]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(xe,{size:16}),e[17]=B):B=e[17],L.push({option:"claude-code-desktop",label:"Claude Code",icon:B})}if(a.capabilities.includes("codex")){let B;e[18]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ge,{size:16}),e[18]=B):B=e[18],L.push({option:"codex-desktop",label:"Codex",icon:B})}}const z=L.length>0&&h!==null,R=c.name;let K;e[19]!==d?(K=d?Os(d):null,e[19]=d,e[20]=K):K=e[20];const D=K,W=d?.favicon??d?.logo??null;let Q;e[21]!==R||e[22]!==r||e[23]!==i?(Q=i??(R?r("chat.noAiProviderEmptyState.headingWithOrg",{org:R}):r("chat.noAiProviderEmptyState.headingDefault")),e[21]=R,e[22]=r,e[23]=i,e[24]=Q):Q=e[24];const J=Q;let Z;e[25]!==n||e[26]!==z||e[27]!==u||e[28]!==r?(Z=n??r(z?"chat.noAiProviderEmptyState.subtitleWithDesktop":u?"chat.noAiProviderEmptyState.subtitleLocalMode":"chat.noAiProviderEmptyState.subtitleDefault"),e[25]=n,e[26]=z,e[27]=u,e[28]=r,e[29]=Z):Z=e[29];const X=Z,ee=!!(W||D);let q;e[30]!==D?(q=D?{backgroundColor:`${D}18`,borderColor:`${D}30`}:void 0,e[30]=D,e[31]=q):q=e[31];const G=q,Y=ee?"flex items-center justify-center size-14 rounded-2xl border":"flex items-center justify-center size-14 rounded-2xl bg-muted border border-border";_="flex flex-col items-center gap-8 w-full max-w-3xl px-4";let T;e[32]!==Y||e[33]!==G||e[34]!==W||e[35]!==a.online||e[36]!==D||e[37]!==r?(T=W?s.jsx("div",{className:Y,style:G,children:s.jsx("img",{src:W,alt:"",className:"size-7 rounded object-contain"})}):s.jsx("button",{type:"button",onClick:()=>b(!0),"aria-label":a.online?r("chat.noAiProviderEmptyState.desktopLinkedLabel"):r("chat.noAiProviderEmptyState.connectDesktopLabel"),className:ie(Y,"cursor-pointer transition-colors hover:bg-accent"),style:G,children:s.jsxs("span",{className:"relative inline-flex items-center justify-center",children:[s.jsx(Xt,{size:24,style:D?{color:D}:void 0,className:ie(!D&&"text-muted-foreground")}),a.online&&s.jsx("span",{className:"absolute -top-0.5 -right-0.5 size-2.5 rounded-full bg-success ring-2 ring-background animate-pulse"})]})}),e[32]=Y,e[33]=G,e[34]=W,e[35]=a.online,e[36]=D,e[37]=r,e[38]=T):T=e[38];let F;e[39]!==J?(F=s.jsx("p",{className:"text-xl font-semibold text-foreground tracking-tight",children:J}),e[39]=J,e[40]=F):F=e[40];let $;e[41]!==X?($=s.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:X}),e[41]=X,e[42]=$):$=e[42];let U;e[43]!==F||e[44]!==$?(U=s.jsxs("div",{className:"space-y-2",children:[F,$]}),e[43]=F,e[44]=$,e[45]=U):U=e[45],e[46]!==T||e[47]!==U?(I=s.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[T,U]}),e[46]=T,e[47]=U,e[48]=I):I=e[48],x=z&&s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full",children:[s.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:L.map(B=>s.jsxs(le,{variant:"default",className:"gap-2",onClick:()=>{h?.setPendingAgentOption(B.option),o?.(B.option)},children:[B.icon,r("chat.noAiProviderEmptyState.useLabel",{label:B.label})]},B.option))}),s.jsxs("div",{className:"flex items-center gap-3 w-full max-w-xs text-xs text-muted-foreground",children:[s.jsx("span",{className:"h-px flex-1 bg-border"}),r("chat.noAiProviderEmptyState.orConnectProvider"),s.jsx("span",{className:"h-px flex-1 bg-border"})]})]}),e[4]=d,e[5]=h,e[6]=n,e[7]=a.capabilities,e[8]=a.online,e[9]=u,e[10]=o,e[11]=c.name,e[12]=r,e[13]=i,e[14]=_,e[15]=I,e[16]=x}else _=e[14],I=e[15],x=e[16];let k,C;e[49]===Symbol.for("react.memo_cache_sentinel")?(k=L=>m(L),C=()=>v(!0),e[49]=k,e[50]=C):(k=e[49],C=e[50]);let M;e[51]!==O?(M=s.jsx("div",{className:"w-full",children:s.jsx(dt,{providers:O,onSelect:k,onShowAll:C})}),e[51]=O,e[52]=M):M=e[52];const y=p!==null||f;let g;e[53]===Symbol.for("react.memo_cache_sentinel")?(g=L=>{L||(m(null),v(!1))},e[53]=g):g=e[53];const S=p??void 0;let E;e[54]!==S||e[55]!==y?(E=s.jsx(_s,{open:y,onOpenChange:g,initialProvider:S}),e[54]=S,e[55]=y,e[56]=E):E=e[56];let P;e[57]!==N?(P=s.jsx(ls,{open:N,onOpenChange:b}),e[57]=N,e[58]=P):P=e[58];let A;return e[59]!==E||e[60]!==P||e[61]!==_||e[62]!==I||e[63]!==x||e[64]!==M?(A=s.jsxs("div",{className:_,children:[I,x,M,E,P]}),e[59]=E,e[60]=P,e[61]=_,e[62]=I,e[63]=x,e[64]=M,e[65]=A):A=e[65],A}function Pe(l){const e=l.title.includes(": ");return{provider:e?l.title.split(": ")[0]??"":l.modelId.split("/")[0]??"",displayName:e?l.title.split(": ").slice(1).join(": "):l.title}}function Ts(l){return l<32e3?{level:1,labelKey:"chat.shared.contextLevelSmall",descriptionKey:"chat.shared.contextLevelSmallDesc"}:l<2e5?{level:2,labelKey:"chat.shared.contextLevelMedium",descriptionKey:"chat.shared.contextLevelMediumDesc"}:l<5e5?{level:3,labelKey:"chat.shared.contextLevelLarge",descriptionKey:"chat.shared.contextLevelLargeDesc"}:{level:4,labelKey:"chat.shared.contextLevelVeryLarge",descriptionKey:"chat.shared.contextLevelVeryLargeDesc"}}const As=["bg-destructive","bg-warning","bg-success","bg-success"],Ps=["text-success","text-warning","text-warning","text-destructive"];function zs(l,e){const t=Math.round(l*.75/1e3),i=t>=1?`${t}K`:`${Math.round(l*.75)}`;return e("chat.shared.approxWords",{wordCount:i})}function Ds(l){return l<1?{level:1,labelKey:"chat.shared.costLevelCheap"}:l<5?{level:2,labelKey:"chat.shared.costLevelModerate"}:l<15?{level:3,labelKey:"chat.shared.costLevelHigh"}:{level:4,labelKey:"chat.shared.costLevelExpensive"}}const Rs={text:{icon:s.jsx(Wt,{className:"size-3.5"}),labelKey:"chat.shared.capabilityText"},vision:{icon:s.jsx(Bt,{className:"size-3.5"}),labelKey:"chat.shared.capabilityVision"},image:{icon:s.jsx(Ft,{className:"size-3.5"}),labelKey:"chat.shared.capabilityImage"},tools:{icon:s.jsx(Ut,{className:"size-3.5"}),labelKey:"chat.shared.capabilityTools"},reasoning:{icon:s.jsx(ts,{className:"size-3.5"}),labelKey:"chat.shared.capabilityReasoning"},"web-search":{icon:s.jsx(nt,{className:"size-3.5"}),labelKey:"chat.shared.capabilityWebSearch"}};function Fs(l){const e=H.c(10),{capability:t}=l,i=se(),n=Rs[t];if(n){const u=n.icon;let d;e[0]!==n.labelKey||e[1]!==i?(d=i(n.labelKey),e[0]=n.labelKey,e[1]=i,e[2]=d):d=e[2];let a;return e[3]!==n.icon||e[4]!==d?(a=s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground border border-border rounded px-2 py-0.5",children:[u,d]}),e[3]=n.icon,e[4]=d,e[5]=a):a=e[5],a}let o;e[6]!==t?(o=t.charAt(0).toUpperCase(),e[6]=t,e[7]=o):o=e[7];const r=o+t.slice(1);let c;return e[8]!==r?(c=s.jsx("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground border border-border rounded px-2 py-0.5",children:r}),e[8]=r,e[9]=c):c=e[9],c}function Ks(l){const e=H.c(59),{model:t,compact:i}=l,n=i===void 0?!1:i,o=se();if(!t){let x;e[0]!==o?(x=o("chat.shared.hoverToPreview"),e[0]=o,e[1]=x):x=e[1];let k;return e[2]!==x?(k=s.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:x}),e[2]=x,e[3]=k):k=e[3],k}const r=t.costs?.input!=null?t.costs.input*1e6:null,c=t.costs?.output!=null?t.costs.output*1e6:null;let u;e[4]!==t?(u=Pe(t),e[4]=t,e[5]=u):u=e[5];const{provider:d,displayName:a}=u;if(n){let x;e[6]!==t.limits||e[7]!==o?(x=t.limits?.contextWindow&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:o("chat.shared.context")}),s.jsxs("span",{className:"text-foreground font-medium",children:[t.limits.contextWindow.toLocaleString()," ",o("chat.shared.tokens")]})]}),e[6]=t.limits,e[7]=o,e[8]=x):x=e[8];let k;e[9]!==r||e[10]!==o?(k=r!=null&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:o("chat.shared.input")}),s.jsxs("span",{className:"text-foreground font-medium",children:["$",r.toFixed(2)," / 1M"]})]}),e[9]=r,e[10]=o,e[11]=k):k=e[11];let C;e[12]!==c||e[13]!==o?(C=c!=null&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:o("chat.shared.output")}),s.jsxs("span",{className:"text-foreground font-medium",children:["$",c.toFixed(2)," / 1M"]})]}),e[12]=c,e[13]=o,e[14]=C):C=e[14];let M;e[15]!==t.limits||e[16]!==o?(M=t.limits?.maxOutputTokens&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:o("chat.shared.outputLimit")}),s.jsxs("span",{className:"text-foreground font-medium",children:[t.limits.maxOutputTokens.toLocaleString()," ",o("chat.shared.tokens")]})]}),e[15]=t.limits,e[16]=o,e[17]=M):M=e[17];let y;return e[18]!==x||e[19]!==k||e[20]!==C||e[21]!==M?(y=s.jsxs("div",{className:"flex flex-col gap-2 pt-3 pb-3 px-3 text-xs",children:[x,k,C,M]}),e[18]=x,e[19]=k,e[20]=C,e[21]=M,e[22]=y):y=e[22],y}let h;e[23]!==d?(h=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:d}),e[23]=d,e[24]=h):h=e[24];let p;e[25]!==t.logo||e[26]!==t.title?(p=t.logo&&s.jsx("img",{src:t.logo,className:"size-6 shrink-0 rounded-md dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[25]=t.logo,e[26]=t.title,e[27]=p):p=e[27];let m;e[28]!==a?(m=s.jsx("p",{className:"text-lg font-semibold leading-snug tracking-tight",children:a}),e[28]=a,e[29]=m):m=e[29];let f;e[30]!==p||e[31]!==m?(f=s.jsxs("div",{className:"flex items-center gap-2.5",children:[p,m]}),e[30]=p,e[31]=m,e[32]=f):f=e[32];let v;e[33]!==t.modelId?(v=s.jsx("p",{className:"text-xs text-muted-foreground/50 font-mono",children:t.modelId}),e[33]=t.modelId,e[34]=v):v=e[34];let N;e[35]!==h||e[36]!==f||e[37]!==v?(N=s.jsxs("div",{className:"flex flex-col gap-1 pt-1 pr-6",children:[h,f,v]}),e[35]=h,e[36]=f,e[37]=v,e[38]=N):N=e[38];let b;e[39]!==t.capabilities?(b=t.capabilities&&t.capabilities.length>0&&s.jsx("div",{className:"flex flex-wrap items-center gap-1.5 pb-4 border-b border-border",children:[...new Set(t.capabilities)].map($s)}),e[39]=t.capabilities,e[40]=b):b=e[40];let j;e[41]!==t.limits||e[42]!==o?(j=t.limits?.contextWindow&&(()=>{const{level:x,labelKey:k,descriptionKey:C}=Ts(t.limits.contextWindow);return s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:o("chat.shared.contextWindow")}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex items-center gap-0.5",children:[1,2,3,4].map(M=>s.jsx("div",{className:ie("w-2 h-2 rounded-full",M<=x?As[x-1]:"bg-muted")},M))}),s.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:o(k)}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["— ",o(C)]})]}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[t.limits.contextWindow.toLocaleString()," ",o("chat.shared.tokens")]})]})})(),e[41]=t.limits,e[42]=o,e[43]=j):j=e[43];let w;e[44]!==t.limits||e[45]!==o?(w=t.limits?.maxOutputTokens&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:o("chat.shared.outputLimit")}),s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsxs("span",{className:"text-sm text-foreground",children:[t.limits.maxOutputTokens.toLocaleString()," ",o("chat.shared.tokens")]}),s.jsx("span",{className:"text-sm text-muted-foreground",children:zs(t.limits.maxOutputTokens,o)})]})]}),e[44]=t.limits,e[45]=o,e[46]=w):w=e[46];let O;e[47]!==r||e[48]!==c||e[49]!==o?(O=(r!=null||c!=null)&&(()=>{const{level:x,labelKey:k}=r!=null?Ds(r):{level:0,labelKey:null};return s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:o("chat.shared.pricing")}),r!=null&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex items-center",children:[1,2,3,4].map(C=>s.jsx("span",{className:ie("text-sm font-bold leading-none",C<=x?Ps[x-1]:"text-muted-foreground/20"),children:"$"},C))}),s.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:k?o(k):""})]}),s.jsxs("div",{className:"flex flex-col gap-1",children:[r!=null&&s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:o("chat.shared.input")}),s.jsxs("span",{className:"text-xs text-foreground",children:["$",r.toFixed(2)," / 1M"," ",o("chat.shared.tokens")]})]}),c!=null&&s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:o("chat.shared.output")}),s.jsxs("span",{className:"text-xs text-foreground",children:["$",c.toFixed(2)," / 1M"," ",o("chat.shared.tokens")]})]})]})]})})(),e[47]=r,e[48]=c,e[49]=o,e[50]=O):O=e[50];let _;e[51]!==j||e[52]!==w||e[53]!==O?(_=s.jsxs("div",{className:"flex flex-col gap-6",children:[j,w,O]}),e[51]=j,e[52]=w,e[53]=O,e[54]=_):_=e[54];let I;return e[55]!==_||e[56]!==N||e[57]!==b?(I=s.jsxs("div",{className:"flex flex-col gap-5 py-1 px-1.5",children:[N,b,_]}),e[55]=_,e[56]=N,e[57]=b,e[58]=I):I=e[58],I}function $s(l){return s.jsx(Fs,{capability:l},l)}function ut(l){const e=H.c(22),{model:t,placeholder:i,isLoading:n}=l,o=n===void 0?!1:n,r=se();let c;e[0]!==i||e[1]!==r?(c=i??r("chat.shared.selectModel"),e[0]=i,e[1]=r,e[2]=c):c=e[2];const u=c;if(o){let b;return e[3]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(te,{className:"w-5 h-5 rounded-sm shrink-0"}),s.jsx(te,{className:"w-16 h-3 hidden md:block"})]}),e[3]=b):b=e[3],b}if(!t){let b;e[4]!==u?(b=s.jsx("span",{className:"text-sm text-muted-foreground",children:u}),e[4]=u,e[5]=b):b=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Fe,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[6]=j):j=e[6];let w;return e[7]!==b?(w=s.jsxs("div",{className:"flex items-center gap-1.5",children:[b,j]}),e[7]=b,e[8]=w):w=e[8],w}let d;e[9]!==t?(d=Pe(t),e[9]=t,e[10]=d):d=e[10];const{displayName:a}=d;let h;e[11]!==t?(h=Ae(t),e[11]=t,e[12]=h):h=e[12];const p=h;let m;e[13]!==t.title||e[14]!==p?(m=s.jsx("img",{src:p,className:"w-3.5 h-3.5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[13]=t.title,e[14]=p,e[15]=m):m=e[15];let f;e[16]!==a?(f=s.jsx("span",{className:"text-sm truncate whitespace-nowrap text-muted-foreground max-w-[100px] sm:max-w-none",children:a}),e[16]=a,e[17]=f):f=e[17];let v;e[18]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Fe,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[18]=v):v=e[18];let N;return e[19]!==m||e[20]!==f?(N=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 overflow-hidden",children:[m,f,v]}),e[19]=m,e[20]=f,e[21]=N):N=e[21],N}const Us=["vision","image","file","audio","video"],mt=["image/png","image/jpeg","image/gif","image/webp"],ht=["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"];function ze(l){const e=l?.capabilities;return e?Us.some(t=>e.includes(t)):!1}function el(l,e){if(!l)return!1;if(l.startsWith("text/"))return!0;const t=e?.capabilities??[],i=t.includes("vision")||t.includes("image"),n=t.includes("file"),o=t.includes("audio"),r=t.includes("video");return!!(i&&mt.includes(l)||n&&l==="application/pdf"||o&&l.startsWith("audio/")||r&&l.startsWith("video/")||ze(e)&&ht.includes(l))}function tl(l){const e=l?.capabilities??[],t=["text/*"];return(e.includes("vision")||e.includes("image"))&&t.push(...mt),e.includes("file")&&t.push("application/pdf"),e.includes("audio")&&t.push("audio/*"),e.includes("video")&&t.push("video/*"),ze(l)&&t.push(...ht),t.join(",")}function sl(l){const e=l?.capabilities??[],t=[];return(e.includes("vision")||e.includes("image"))&&t.push("chat.shared.fileTypeImages"),e.includes("file")&&t.push("chat.shared.fileTypePdfs"),e.includes("audio")&&t.push("chat.shared.fileTypeAudio"),e.includes("video")&&t.push("chat.shared.fileTypeVideo"),ze(l)&&t.push("chat.shared.fileTypeOffice"),{parts:t,count:t.length}}const ft=["smarter","faster","cheaper"],Bs={smarter:"chat.decopilot.tierSmarter",faster:"chat.decopilot.tierFaster",cheaper:"chat.decopilot.tierCheaper"},Ws=[{tier:"smarter",prefixes:["anthropic/claude-opus-4.8","anthropic/claude-sonnet-4.6","anthropic/claude-4.6-sonnet","openai/gpt-5.3-codex","google/gemini-3-pro","google/gemini-2.5-pro","cohere/command-r-plus","cohere/command-a"]},{tier:"faster",prefixes:["anthropic/claude-haiku-4.5","anthropic/claude-4.5-haiku","google/gemini-3-flash","openai/gpt-5.1-codex-mini","x-ai/grok-code-fast","x-ai/grok-3","mistralai/mistral-large","mistralai/codestral","mistralai/mistral-medium","minimax/minimax-m1"]},{tier:"cheaper",prefixes:["google/gemini-2.5-flash-lite","google/gemini-2.5-flash","google/gemini-2.0-flash","deepseek/deepseek-v3","openai/gpt-oss-120b","mistralai/mistral-small","mistralai/pixtral","cohere/command-r"]}],Vs=Ws.flatMap(({tier:l,prefixes:e})=>e.map(t=>({tier:l,prefix:t}))).sort((l,e)=>e.prefix.length-l.prefix.length),Hs="google/gemini-2.5-pro",qe=new Map;function qs(l){const e=qe.get(l);if(e!==void 0)return e;let t=null;if(l.endsWith(":free"))t="cheaper";else for(const{tier:i,prefix:n}of Vs)if(l.startsWith(n)){if(n===Hs&&l.length>n.length&&l[n.length]==="-"){const r=l[n.length+1];if(!r||!/\d/.test(r))continue}t=i;break}return qe.set(l,t),t}function Ge(l){const e={smarter:[],faster:[],cheaper:[],other:[]};for(const t of l){const i=qs(t.modelId);e[i??"other"].push(t)}for(const t of Object.keys(e))e[t].sort((i,n)=>i.title.localeCompare(n.title));return e}const pt="studio:model-shortlist:",Gs=new Set(["anthropic/claude-opus-4.8","anthropic/claude-sonnet-4.6","anthropic/claude-4.6-sonnet","anthropic/claude-sonnet-4.6:extended","openai/gpt-5.3-codex","google/gemini-3-pro-preview","google/gemini-2.5-pro","anthropic/claude-haiku-4.5","anthropic/claude-haiku-4.5-20251001","anthropic/claude-4.5-haiku","google/gemini-3-flash-preview","openai/gpt-5.1-codex-mini","x-ai/grok-code-fast-1","google/gemini-2.5-flash","deepseek/deepseek-v3.2","google/gemini-2.5-flash-lite","openai/gpt-oss-120b:free"]);function Xs(l){try{const e=localStorage.getItem(pt+l);return e?new Set(JSON.parse(e)):null}catch{return null}}function Ys(l,e){localStorage.setItem(pt+l,JSON.stringify([...e]))}function Qs(l){const e=H.c(21),{model:t,onHover:i}=l;let n;e[0]!==t?(n=Pe(t),e[0]=t,e[1]=n):n=e[1];const{displayName:o,provider:r}=n;let c;e[2]!==t?(c=Ae(t),e[2]=t,e[3]=c):c=e[3];const u=c;let d;e[4]!==t||e[5]!==i?(d=()=>i(t),e[4]=t,e[5]=i,e[6]=d):d=e[6];let a;e[7]!==t.title||e[8]!==u?(a=s.jsx("img",{src:u,className:"w-4 h-4 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[7]=t.title,e[8]=u,e[9]=a):a=e[9];let h;e[10]!==o?(h=s.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:o}),e[10]=o,e[11]=h):h=e[11];let p;e[12]!==r?(p=s.jsx("span",{className:"text-xs text-muted-foreground/60 leading-tight",children:r}),e[12]=r,e[13]=p):p=e[13];let m;e[14]!==h||e[15]!==p?(m=s.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[h,p]}),e[14]=h,e[15]=p,e[16]=m):m=e[16];let f;return e[17]!==d||e[18]!==a||e[19]!==m?(f=s.jsxs("div",{className:"flex items-center gap-2.5 py-2 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:d,children:[a,m]}),e[17]=d,e[18]=a,e[19]=m,e[20]=f):f=e[20],f}function Js(l){const e=H.c(16),{error:t,onRetry:i}=l,n=se();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-2 rounded-full",children:s.jsx(Ct,{className:"size-5 text-destructive"})}),e[0]=o):o=e[0];const r=n("chat.decopilot.failedToLoadModels");let c;e[1]!==r?(c=s.jsx("p",{className:"text-sm font-medium text-foreground",children:r}),e[1]=r,e[2]=c):c=e[2];const u=t?.message||n("chat.decopilot.couldNotFetchModels"),d=" "+n("chat.decopilot.tryAnotherProviderOrRetry");let a;e[3]!==u||e[4]!==d?(a=s.jsxs("p",{className:"text-xs text-muted-foreground max-w-[260px]",children:[u,d]}),e[3]=u,e[4]=d,e[5]=a):a=e[5];let h;e[6]!==c||e[7]!==a?(h=s.jsxs("div",{className:"flex flex-col gap-1",children:[c,a]}),e[6]=c,e[7]=a,e[8]=h):h=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx($t,{className:"size-3.5"}),e[9]=p):p=e[9];const m=n("chat.decopilot.retry");let f;e[10]!==i||e[11]!==m?(f=s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs(le,{variant:"outline",size:"sm",onClick:i,className:"gap-1.5",children:[p,m]})}),e[10]=i,e[11]=m,e[12]=f):f=e[12];let v;return e[13]!==f||e[14]!==h?(v=s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-4 py-8 text-center",children:[o,h,f]}),e[13]=f,e[14]=h,e[15]=v):v=e[15],v}function Zs(){const l=H.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:Array.from({length:6}).map(ei)}),l[0]=e):e=l[0],e}function ei(l,e){return s.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[s.jsx(te,{className:"size-5 shrink-0 rounded-sm"}),s.jsx(te,{className:"flex-1 h-4"}),s.jsx(te,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function Xe(l){const e=H.c(12),{label:t,models:i,onSelect:n,onHover:o}=l;if(i.length===0)return null;let r;e[0]!==t?(r=s.jsx("div",{className:"text-xs font-medium text-muted-foreground px-3 pt-3 pb-1",children:t}),e[0]=t,e[1]=r):r=e[1];let c;if(e[2]!==i||e[3]!==o||e[4]!==n){let d;e[6]!==o||e[7]!==n?(d=a=>s.jsx("div",{onClick:()=>n(a),className:"cursor-pointer",children:s.jsx(Qs,{model:a,onHover:o})},a.modelId),e[6]=o,e[7]=n,e[8]=d):d=e[8],c=i.map(d),e[2]=i,e[3]=o,e[4]=n,e[5]=c}else c=e[5];let u;return e[9]!==r||e[10]!==c?(u=s.jsxs("div",{children:[r,c]}),e[9]=r,e[10]=c,e[11]=u):u=e[11],u}function Ce(l,e){return e(l==="other"?"chat.decopilot.tierOther":Bs[l])}function ti(l){const e=H.c(21),{model:t,isChecked:i,onToggle:n,onHover:o}=l,[r,c]=V.useState(i);r!==i&&c(i);let u;e[0]!==t?(u=Ae(t),e[0]=t,e[1]=u):u=e[1];const d=u;let a;e[2]!==t||e[3]!==o?(a=()=>o(t),e[2]=t,e[3]=o,e[4]=a):a=e[4];let h;e[5]!==t.modelId||e[6]!==n?(h=()=>{c(si),n(t.modelId)},e[5]=t.modelId,e[6]=n,e[7]=h):h=e[7];let p;e[8]!==r||e[9]!==h?(p=s.jsx(Tt,{checked:r,onCheckedChange:h}),e[8]=r,e[9]=h,e[10]=p):p=e[10];let m;e[11]!==d||e[12]!==t.title?(m=s.jsx("img",{src:d,className:"w-5 h-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[11]=d,e[12]=t.title,e[13]=m):m=e[13];let f;e[14]!==t.title?(f=s.jsx("span",{className:"text-sm text-foreground flex-1 min-w-0 line-clamp-1",children:t.title}),e[14]=t.title,e[15]=f):f=e[15];let v;return e[16]!==a||e[17]!==p||e[18]!==m||e[19]!==f?(v=s.jsxs("label",{className:"flex items-center gap-3 min-h-8 py-2.5 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:a,children:[p,m,f]}),e[16]=a,e[17]=p,e[18]=m,e[19]=f,e[20]=v):v=e[20],v}function si(l){return!l}function ii(l,e){const t=[];for(const i of ft)if(l[i].length>0){t.push({type:"header",label:Ce(i,e)});for(const n of l[i])t.push({type:"model",model:n})}if(l.other.length>0){t.push({type:"header",label:Ce("other",e)});for(const i of l.other)t.push({type:"model",model:i})}return t}function li({items:l,shortlistSet:e,onToggle:t,onHover:i}){const n=V.useRef(null),o=xs({count:l.length,getScrollElement:()=>n.current,estimateSize:r=>l[r]?.type==="header"?36:44,overscan:6});return s.jsx("div",{ref:n,className:"flex-1 overflow-y-auto",children:s.jsx("div",{className:"relative",style:{height:o.getTotalSize()},children:o.getVirtualItems().map(r=>{const c=l[r.index];return c?s.jsx("div",{"data-index":r.index,ref:o.measureElement,className:"absolute left-0 right-0 top-0 px-0.5",style:{transform:`translateY(${r.start}px)`},children:c.type==="header"?s.jsx("div",{className:"text-xs font-medium text-muted-foreground px-3 pt-3 pb-1",children:c.label}):s.jsx(ti,{model:c.model,isChecked:e.has(c.model.modelId),onToggle:t,onHover:i})},r.key):null})})})}function ni(l){const e=H.c(30),{keyId:t,searchTerm:i,onHover:n,onModelSelect:o,managing:r,onToggleManage:c,filterModels:u}=l,d=se(),{models:a}=Gt(t),h=u?a.filter(u):a.filter(oi);let p;e[0]!==t?(p=()=>(t?Xs(t):null)??Gs,e[0]=t,e[1]=p):p=e[1];const[m,f]=V.useState(p),[,v]=V.useTransition();let N;e[2]!==t||e[3]!==v?(N=g=>{t&&v(()=>{f(S=>{const E=new Set(S);return E.has(g)?E.delete(g):E.add(g),Ys(t,E),E})})},e[2]=t,e[3]=v,e[4]=N):N=e[4];const b=N,j=i.toLowerCase().trim(),w=g=>j?g.filter(S=>S.title.toLowerCase().includes(j)||S.modelId.toLowerCase().includes(j)):g;if(r){const g=Ge(w(h)),S=ii(g,d);let E;e[5]!==m?(E=R=>m.has(R.modelId),e[5]=m,e[6]=E):E=e[6];const P=h.filter(E).length;let A;e[7]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(lt,{size:14}),e[7]=A):A=e[7];let L;e[8]!==d?(L=d("chat.decopilot.back"),e[8]=d,e[9]=L):L=e[9];let z;return e[10]!==c||e[11]!==L?(z=s.jsxs("button",{type:"button",onClick:c,className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground cursor-pointer",children:[A,L]}),e[10]=c,e[11]=L,e[12]=z):z=e[12],s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[z,s.jsx("span",{className:"text-xs text-muted-foreground",children:d("chat.decopilot.selectedCount",{count:P})})]}),s.jsx(li,{items:S,shortlistSet:m,onToggle:b,onHover:n})]})}let O;e[13]!==m?(O=g=>m.has(g.modelId),e[13]=m,e[14]=O):O=e[14];const _=h.filter(O),I=_.length>0?_:h,x=Ge(w(I));let k;e[15]!==x||e[16]!==n||e[17]!==o||e[18]!==d?(k=ft.map(g=>s.jsx(Xe,{label:Ce(g,d),models:x[g],onSelect:o,onHover:n},g)),e[15]=x,e[16]=n,e[17]=o,e[18]=d,e[19]=k):k=e[19];let C;e[20]!==d?(C=Ce("other",d),e[20]=d,e[21]=C):C=e[21];let M;e[22]!==x.other||e[23]!==n||e[24]!==o||e[25]!==C?(M=s.jsx(Xe,{label:C,models:x.other,onSelect:o,onHover:n}),e[22]=x.other,e[23]=n,e[24]=o,e[25]=C,e[26]=M):M=e[26];let y;return e[27]!==k||e[28]!==M?(y=s.jsxs("div",{className:"flex-1 overflow-y-auto px-0.5 pt-1 [touch-action:pan-y]",children:[k,M]}),e[27]=k,e[28]=M,e[29]=y):y=e[29],y}function oi(l){return l.asyncResearch!==!0}function ri(){const l=H.c(6);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:s.jsxs("div",{className:"flex items-center gap-2.5 h-12 px-4",children:[s.jsx(te,{className:"size-4 shrink-0"}),s.jsx(te,{className:"flex-1 h-6"}),s.jsx(te,{className:"w-[140px] h-8 shrink-0"})]})}),l[0]=e):e=l[0];let t;l[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex-1 flex flex-col md:border-r md:w-[420px] md:min-w-[420px] min-h-0 overflow-hidden",children:[e,s.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:Array.from({length:8}).map(ai)})]}),l[1]=t):t=l[1];let i;l[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx(te,{className:"size-6 shrink-0"}),s.jsx(te,{className:"h-6 w-32"})]}),l[2]=i):i=l[2];let n;l[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[i,s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(te,{className:"h-6 w-20 rounded-md"}),s.jsx(te,{className:"h-6 w-24 rounded-md"})]})]}),l[3]=n):n=l[3];let o;l[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(te,{className:"h-4 w-24"}),s.jsx(te,{className:"h-4 w-32"})]}),l[4]=o):o=l[4];let r;return l[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col md:flex-row h-full sm:h-[460px] min-h-0",children:[t,s.jsx("div",{className:"hidden md:block md:w-[320px] md:shrink-0 p-3",children:s.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[n,s.jsxs("div",{className:"flex flex-col gap-4",children:[o,s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(te,{className:"h-4 w-16"}),s.jsx(te,{className:"h-4 w-40"})]})]})]})})]}),l[5]=r):r=l[5],r}function ai(l,e){return s.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[s.jsx(te,{className:"size-5 shrink-0 rounded-sm"}),s.jsx(te,{className:"flex-1 h-4"}),s.jsx(te,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function xt(l){const e=H.c(66),{onClose:t,credentialId:i,onCredentialChange:n,selectedModel:o,onModelChange:r,filterModels:c,compact:u}=l,d=se(),[a,h]=V.useState(null),[p,m]=V.useState(""),[f,v]=V.useState(!1),N=V.useRef(null),b=Te(),j=qt();let w;e[0]!==b?.providers?(w=Object.fromEntries((b?.providers??[]).map(ui)),e[0]=b?.providers,e[1]=w):w=e[1];const O=w,_=Nt(),{org:I}=ve();let x;e[2]!==n?(x=T=>{n(T),h(null)},e[2]=n,e[3]=x):x=e[3];const k=x;let C;e[4]!==i||e[5]!==t||e[6]!==r?(C=T=>{i&&(r(T),m(""),t())},e[4]=i,e[5]=t,e[6]=r,e[7]=C):C=e[7];const M=C;if(j.length===0){const T=!u&&"sm:w-[740px]";let F;e[8]!==T?(F=ie("flex items-center justify-center p-8 w-full",T),e[8]=T,e[9]=F):F=e[9];let $;e[10]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(Ls,{}),e[10]=$):$=e[10];let U;return e[11]!==F?(U=s.jsx("div",{className:F,children:$}),e[11]=F,e[12]=U):U=e[12],U}const y=u?"sm:h-[420px]":"sm:h-[460px]";let g;e[13]!==y?(g=ie("flex flex-col md:flex-row h-full min-h-0",y),e[13]=y,e[14]=g):g=e[14];const S=u?"w-full":"md:border-r md:w-[420px] md:min-w-[420px]";let E;e[15]!==S?(E=ie("flex-1 flex flex-col min-h-0 overflow-hidden",S),e[15]=S,e[16]=E):E=e[16];let P;e[17]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(nt,{size:16,className:"text-muted-foreground shrink-0"}),e[17]=P):P=e[17];let A;e[18]!==f||e[19]!==d?(A=d(f?"chat.decopilot.searchAllModels":"chat.decopilot.searchForModel"),e[18]=f,e[19]=d,e[20]=A):A=e[20];let L;e[21]===Symbol.for("react.memo_cache_sentinel")?(L=T=>m(T.target.value),e[21]=L):L=e[21];let z;e[22]!==p||e[23]!==A?(z=s.jsx(pe,{ref:N,type:"text",placeholder:A,value:p,onChange:L,className:"flex-1 min-w-0 border-0 !shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[22]=p,e[23]=A,e[24]=z):z=e[24];let R;e[25]!==i||e[26]!==k||e[27]!==j||e[28]!==O||e[29]!==d?(R=j.length>0&&s.jsxs(At,{value:i??"",onValueChange:k,children:[s.jsxs(Pt,{size:"sm",className:"w-auto max-w-[140px] h-8 shrink-0 gap-1.5 px-2 [&>svg:last-child]:hidden",onClick:di,children:[s.jsx(zt,{placeholder:d("chat.decopilot.key"),children:(()=>{const T=j.find(re=>re.id===i),F=T?O[T.providerId]:void 0,$=je(T?.presetId),U=$?.logo??F?.logo,B=$?.name??F?.name??T?.providerId??"Key";return s.jsxs("span",{className:"flex items-center gap-1.5 min-w-0",children:[U?s.jsx("img",{src:U,alt:B,className:"w-4 h-4 rounded shrink-0 dark:bg-white dark:rounded-sm dark:p-px"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:B.slice(0,1).toUpperCase()}),s.jsx("span",{className:"text-xs truncate",children:B})]})})()}),s.jsx(Vt,{className:"size-4 opacity-50 shrink-0 pointer-events-none"})]}),s.jsx(Dt,{children:j.map(T=>{const F=O[T.providerId],$=je(T.presetId),U=$?.logo??F?.logo,B=$?.name??F?.name??T.providerId;return s.jsx(Rt,{value:T.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[U?s.jsx("img",{src:U,alt:B,className:"w-4 h-4 rounded dark:bg-white dark:rounded-sm dark:p-px"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:B.slice(0,1).toUpperCase()}),s.jsxs("span",{children:[B," — ",T.label]})]})},T.id)})})]}),e[25]=i,e[26]=k,e[27]=j,e[28]=O,e[29]=d,e[30]=R):R=e[30];let K;e[31]!==z||e[32]!==R?(K=s.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 pr-12 md:pr-4 cursor-text",children:[P,z,R]})}),e[31]=z,e[32]=R,e[33]=K):K=e[33];let D;e[34]!==i?(D=T=>{const{error:F,resetError:$}=T;return s.jsx(Js,{error:F,onRetry:$,credentialId:i??void 0})},e[34]=i,e[35]=D):D=e[35];let W;e[36]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Zs,{}),e[36]=W):W=e[36];const Q=i??void 0;let J;e[37]===Symbol.for("react.memo_cache_sentinel")?(J=()=>v(ci),e[37]=J):J=e[37];let Z;e[38]!==c||e[39]!==M||e[40]!==f||e[41]!==p||e[42]!==Q?(Z=s.jsx(V.Suspense,{fallback:W,children:s.jsx(ni,{keyId:Q,searchTerm:p,onHover:h,onModelSelect:M,managing:f,onToggleManage:J,filterModels:c})}),e[38]=c,e[39]=M,e[40]=f,e[41]=p,e[42]=Q,e[43]=Z):Z=e[43];let X;e[44]!==i||e[45]!==D||e[46]!==Z?(X=s.jsx(kt,{fallback:D,children:Z},i),e[44]=i,e[45]=D,e[46]=Z,e[47]=X):X=e[47];let ee;e[48]!==f||e[49]!==_||e[50]!==I||e[51]!==d?(ee=!f&&s.jsxs("div",{className:"border-t border-border flex",children:[s.jsxs("button",{type:"button",onClick:()=>V.startTransition(()=>v(!0)),className:"flex items-center gap-2 flex-1 px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer",children:[s.jsx(Kt,{className:"size-3.5 shrink-0"}),d("chat.decopilot.manageModels")]}),s.jsx("div",{className:"w-px bg-border shrink-0"}),s.jsxs("button",{type:"button",onClick:()=>_({to:"/$org/settings/ai-providers",params:{org:I.slug}}),className:"flex items-center gap-2 flex-1 px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer",children:[s.jsx(Ht,{className:"size-3.5 shrink-0"}),d("chat.decopilot.manageApiKeys")]})]}),e[48]=f,e[49]=_,e[50]=I,e[51]=d,e[52]=ee):ee=e[52];let q;e[53]!==K||e[54]!==X||e[55]!==ee||e[56]!==E?(q=s.jsxs("div",{className:E,children:[K,X,ee]}),e[53]=K,e[54]=X,e[55]=ee,e[56]=E,e[57]=q):q=e[57];let G;e[58]!==u||e[59]!==a||e[60]!==o?(G=!u&&s.jsx("div",{className:"hidden md:flex md:flex-col md:w-[320px] md:shrink-0 p-3",children:s.jsx(Ks,{model:a??o??null})}),e[58]=u,e[59]=a,e[60]=o,e[61]=G):G=e[61];let Y;return e[62]!==q||e[63]!==G||e[64]!==g?(Y=s.jsxs("div",{className:g,children:[q,G]}),e[62]=q,e[63]=G,e[64]=g,e[65]=Y):Y=e[65],Y}function ci(l){return!l}function di(l){return l.stopPropagation()}function ui(l){return[l.id,l]}function mi(l){const e=H.c(12),{onClose:t}=l,{credentialId:i,setCredentialId:n,selectedModel:o,setModel:r}=Le();let c;e[0]!==n?(c=a=>{ne("chat_credential_changed",{credential_id:a}),n(a)},e[0]=n,e[1]=c):c=e[1];let u;e[2]!==i||e[3]!==o?.modelId||e[4]!==r?(u=a=>{i&&(ne("chat_model_changed",{from_model_id:o?.modelId??null,to_model_id:a.modelId,to_model_provider:a.providerId??null,credential_id:i}),r({...a,keyId:i}))},e[2]=i,e[3]=o?.modelId,e[4]=r,e[5]=u):u=e[5];let d;return e[6]!==i||e[7]!==t||e[8]!==o||e[9]!==c||e[10]!==u?(d=s.jsx(xt,{onClose:t,credentialId:i,onCredentialChange:c,selectedModel:o,onModelChange:u}),e[6]=i,e[7]=t,e[8]=o,e[9]=c,e[10]=u,e[11]=d):d=e[11],d}function hi(l){const e=H.c(2),{onClose:t}=l;let i;return e[0]!==t?(i=s.jsx(mi,{onClose:t}),e[0]=t,e[1]=i):i=e[1],i}function fi(l){const e=H.c(2);let t;return e[0]!==l?(t=s.jsx(xt,{...l}),e[0]=l,e[1]=t):t=e[1],t}const pi=[{tier:"fast",labelKey:"chat.desktopCli.tierFastDescription"},{tier:"smart",labelKey:"chat.desktopCli.tierSmartDescription"},{tier:"thinking",labelKey:"chat.desktopCli.tierThinkingDescription"}];function gt(l){const e=H.c(11),{modelSet:t,selectedModelId:i,onSelect:n}=l,o=se();let r,c;if(e[0]!==t.logo||e[1]!==t.models||e[2]!==t.tiers||e[3]!==n||e[4]!==i||e[5]!==o){const d=Object.fromEntries(t.models.map(xi));r="flex flex-col p-2 w-[320px]",c=pi.map(a=>{const{tier:h,labelKey:p}=a,m=t.tiers[h];if(!m.modelId)return null;const f=d[m.modelId];if(!f)return null;const v=i===m.modelId;return s.jsxs("button",{type:"button",onClick:()=>n(f),className:ie("flex items-center gap-3 px-3 py-2.5 rounded-lg text-left hover:bg-accent",v&&"bg-accent/50"),children:[s.jsx("img",{src:t.logo,alt:m.label,className:"size-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),s.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:m.label}),s.jsx("span",{className:"text-xs text-muted-foreground leading-tight",children:o(p)})]})]},h)}),e[0]=t.logo,e[1]=t.models,e[2]=t.tiers,e[3]=n,e[4]=i,e[5]=o,e[6]=r,e[7]=c}else r=e[6],c=e[7];let u;return e[8]!==r||e[9]!==c?(u=s.jsx("div",{className:r,children:c}),e[8]=r,e[9]=c,e[10]=u):u=e[10],u}function xi(l){return[l.modelId,l]}const gi=[{providerId:"claude-code",modelId:"claude-code:haiku",title:"Claude Code Haiku",description:"Fast and lightweight",capabilities:["text"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:sonnet",title:"Claude Code Sonnet 5",description:"Balanced performance",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus",title:"Claude Code Opus",description:"Most capable",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus-1m",title:"Claude Code Opus 5 1M",description:"Most capable, 1M context window",capabilities:["text","reasoning"],limits:{contextWindow:1e6,maxOutputTokens:null},costs:null}],Ne="https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png",vi=[{providerId:"codex",modelId:"codex:gpt-5.6-sol",title:"GPT-5.6 Sol",description:"Frontier Codex model for deep reasoning, complex coding, and real-world work",capabilities:["text","reasoning"],logo:Ne,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.6-terra",title:"GPT-5.6 Terra",description:"Balanced Codex model for everyday coding and agent work",capabilities:["text","reasoning"],logo:Ne,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.6-luna",title:"GPT-5.6 Luna",description:"Fast Codex model for lightweight coding tasks and titles",capabilities:["text","reasoning"],logo:Ne,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.3-codex-spark",title:"GPT-5.3 Codex Spark",description:"Ultra-fast coding model",capabilities:["text","reasoning"],logo:Ne,limits:null,costs:null}],bi="https://decoims.com/decocms/93e4059c-e598-412b-87eb-54d72a946ec8/claude-stroke-rounded.svg",yi="https://decoims.com/decocms/9170ffd4-b9cc-4661-ad8f-ae2eea019e00/codex.svg";function ji(l){return{fast:{modelId:"claude-code:haiku",label:l("chat.agentModels.haikuLabel"),description:l("chat.agentModels.quickerResponses"),iconNode:s.jsx(xe,{size:16})},smart:{modelId:"claude-code:sonnet",label:l("chat.agentModels.sonnetLabel"),description:l("chat.agentModels.balancedQuality"),iconNode:s.jsx(xe,{size:16})},thinking:{modelId:"claude-code:opus-1m",label:l("chat.agentModels.opusLabel"),description:l("chat.agentModels.deeperReasoning"),iconNode:s.jsx(xe,{size:16})}}}function Si(l){return{fast:{modelId:"codex:gpt-5.6-luna",label:l("chat.agentModels.gptLunaLabel"),description:l("chat.agentModels.quickerResponses"),iconNode:s.jsx(ge,{size:16})},smart:{modelId:"codex:gpt-5.6-terra",label:l("chat.agentModels.gptTerraLabel"),description:l("chat.agentModels.balancedQuality"),iconNode:s.jsx(ge,{size:16})},thinking:{modelId:"codex:gpt-5.6-sol",label:l("chat.agentModels.gptSolLabel"),description:l("chat.agentModels.deeperReasoning"),iconNode:s.jsx(ge,{size:16})}}}function vt(l,e){return l==="claude-code"?{logo:bi,tiers:ji(e),models:gi}:l==="codex"?{logo:yi,tiers:Si(e),models:vi}:null}function Ni(l){const e=H.c(12),{onClose:t,agent:i}=l,n=se(),o=Le(),r=i??o.pendingHarnessId??"decopilot";let c;e[0]!==r||e[1]!==n?(c=vt(r,n),e[0]=r,e[1]=n,e[2]=c):c=e[2];const u=c;if(!u){let p;return e[3]!==t?(p=s.jsx(hi,{onClose:t}),e[3]=t,e[4]=p):p=e[4],p}const d=o.selectedModel?.modelId??u.tiers[o.simpleModeTier].modelId;let a;e[5]!==t||e[6]!==o?(a=p=>{o.setModel({...p,keyId:void 0}),t()},e[5]=t,e[6]=o,e[7]=a):a=e[7];let h;return e[8]!==u||e[9]!==d||e[10]!==a?(h=s.jsx(gt,{modelSet:u,selectedModelId:d,onSelect:a}),e[8]=u,e[9]=d,e[10]=a,e[11]=h):h=e[11],h}function ki(l){const e=H.c(14);let t,i;e[0]!==l?({agent:t,...i}=l,e[0]=l,e[1]=t,e[2]=i):(t=e[1],i=e[2]);const n=se();let o;e[3]!==t||e[4]!==n?(o=t?vt(t,n):null,e[3]=t,e[4]=n,e[5]=o):o=e[5];const r=o;if(!r){let a;return e[6]!==i?(a=s.jsx(fi,{...i}),e[6]=i,e[7]=a):a=e[7],a}const c=i.selectedModel?.modelId??r.tiers.smart.modelId;let u;e[8]!==i?(u=a=>{i.onModelChange(a),i.onClose()},e[8]=i,e[9]=u):u=e[9];let d;return e[10]!==r||e[11]!==c||e[12]!==u?(d=s.jsx(gt,{modelSet:r,selectedModelId:c,onSelect:u}),e[10]=r,e[11]=c,e[12]=u,e[13]=d):d=e[13],d}function il(l){const e=H.c(49),{variant:t,className:i,placeholder:n,model:o,isLoading:r,credentialId:c,onCredentialChange:u,onModelChange:d,filterModels:a,agent:h}=l,p=t===void 0?"borderless":t,m=n===void 0?"Select model":n,f=se(),[v,N]=V.useState(!1),b=d!==void 0,j=Ot(),w=p==="borderless"?"ghost":"outline",O=p==="borderless"&&"md:border-none";let _;e[0]!==i||e[1]!==O?(_=ie("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",O,i),e[0]=i,e[1]=O,e[2]=_):_=e[2];let I;e[3]!==r||e[4]!==o||e[5]!==m||e[6]!==b?(I=b?s.jsx(ut,{model:o??null,placeholder:m,isLoading:r}):s.jsx(wi,{placeholder:m}),e[3]=r,e[4]=o,e[5]=m,e[6]=b,e[7]=I):I=e[7];let x;e[8]!==w||e[9]!==_||e[10]!==I?(x=s.jsx(le,{variant:w,size:"sm",className:_,children:I}),e[8]=w,e[9]=_,e[10]=I,e[11]=x):x=e[11];const k=x;let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ri,{}),e[12]=C):C=e[12];let M;e[13]!==h||e[14]!==c||e[15]!==a||e[16]!==o||e[17]!==u||e[18]!==d||e[19]!==b?(M=s.jsx(V.Suspense,{fallback:C,children:b?s.jsx(ki,{onClose:()=>N(!1),agent:h,credentialId:c??null,onCredentialChange:u??Ci,selectedModel:o??null,onModelChange:d,filterModels:a}):s.jsx(Ni,{onClose:()=>N(!1),agent:h})}),e[13]=h,e[14]=c,e[15]=a,e[16]=o,e[17]=u,e[18]=d,e[19]=b,e[20]=M):M=e[20];const y=M;if(j){let L;e[21]!==k?(L=s.jsx(It,{asChild:!0,children:k}),e[21]=k,e[22]=L):L=e[22];let z;e[23]!==f?(z=f("chat.selectModel.selectModel"),e[23]=f,e[24]=z):z=e[24];let R;e[25]!==z?(R=s.jsx(_t,{className:"sr-only",children:z}),e[25]=z,e[26]=R):R=e[26];let K;e[27]!==y?(K=s.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:y}),e[27]=y,e[28]=K):K=e[28];let D;e[29]!==R||e[30]!==K?(D=s.jsxs(Mt,{className:"p-0 flex flex-col max-h-[95vh]",children:[R,K]}),e[29]=R,e[30]=K,e[31]=D):D=e[31];let W;return e[32]!==v||e[33]!==L||e[34]!==D?(W=s.jsxs(Et,{open:v,onOpenChange:N,children:[L,D]}),e[32]=v,e[33]=L,e[34]=D,e[35]=W):W=e[35],W}let g;e[36]!==k?(g=s.jsx(wt,{asChild:!0,children:k}),e[36]=k,e[37]=g):g=e[37];let S;e[38]!==f?(S=f("chat.selectModel.selectModel"),e[38]=f,e[39]=S):S=e[39];let E;e[40]!==S?(E=s.jsx(Oe,{className:"sr-only",children:S}),e[40]=S,e[41]=E):E=e[41];let P;e[42]!==y||e[43]!==E?(P=s.jsxs(Ee,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[E,y]}),e[42]=y,e[43]=E,e[44]=P):P=e[44];let A;return e[45]!==v||e[46]!==g||e[47]!==P?(A=s.jsxs(Me,{open:v,onOpenChange:N,children:[g,P]}),e[45]=v,e[46]=g,e[47]=P,e[48]=A):A=e[48],A}function Ci(){}function wi(l){const e=H.c(4),{placeholder:t}=l,{selectedModel:i,isModelsLoading:n}=Le();let o;return e[0]!==n||e[1]!==i||e[2]!==t?(o=s.jsx(ut,{model:i,placeholder:t,isLoading:n}),e[0]=n,e[1]=i,e[2]=t,e[3]=o):o=e[3],o}export{ls as C,ri as M,Ls as N,dt as P,ki as a,xe as b,ge as c,tl as d,il as e,je as f,sl as g,_s as h,el as i,Zi as l,ze as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,b as ve,j as o,r as ee,B as je,k as Se}from"./index-CXWWJmED.js";import{i as ke}from"./ChevronRight-BBTu-8S3.js";import{a6 as fe}from"./agent-icon-Cm6sZdRT.js";import{n as xe}from"./automation-runs-BbHHbX_e.js";import{r as Ne,c as we,u as _e,a as Ee,i as Pe,d as Te,f as Fe,P as Re,S as Ce}from"./page-seo-form-pKdIo57G.js";import{ao as ue,af as Ke}from"./index-DuveA0RN.js";import{a as ye}from"./Tool01-CSu_r-q6.js";import"./AlertCircle-Dq3WjiEJ.js";import"./ArrowUp-5hFEweXq.js";import"./Settings02-Vn36Nz-O.js";import"./Tool02-C7v0SFCB.js";import"./XCircle-C0NcnpbU.js";import"./ArrowUpRight-joowW-C5.js";import"./TrendUp01-eR8W-77t.js";import"./ZapSquare-BqtHYgtB.js";import"./Users03-l3anhVFn.js";import"./CheckCircle-asKx-P0w.js";import"./Check-qxVfMARc.js";import"./ChevronDown-e1-U-GuJ.js";import"./ChevronUp-sCAKY-xq.js";import"./DotsVertical-D9Tqe4NW.js";import"./Stars02-RfkiFS-R.js";import"./Copy01-D5KM45B8.js";import"./Eye-Dp-Mi9OG.js";import"./FilterLines-FFxKsijU.js";import"./Star01-B6iNea3E.js";import"./Palette-CBZCTOFO.js";import"./SwitchHorizontal01-qIK6-vj3.js";import"./HardDrive-BdTCtFl3.js";import"./Key01-D8-RvxFO.js";import"./LayoutLeft-Bx_rpAKD.js";import"./LinkExternal01-Cnx8YByp.js";import"./LogOut01-CFjw7N9j.js";import"./Monitor01-BVloJrIj.js";import"./Sun-Bplz7qPS.js";import"./Play-DmT_WIMA.js";import"./Plus-ZpX9WmDD.js";import"./SearchLg-C4sVe0kR.js";import"./SearchMd-95D3LDtT.js";import"./Shield01-CgDNV0PO.js";import"./Stars01-Dhu1azXB.js";import"./Trash01-g8BP4GVQ.js";import"./Upload01-DnrfGhvH.js";import"./User01-BpaY3mYf.js";import"./Users01-BJlhJb2g.js";import"./XClose-Dl7-u4Iu.js";import"./X-9WQSG5hH.js";import"./Zap-BbdbOIdc.js";import"./select-BzIcrZmY.js";import"./tooltip-gZsEQkQ4.js";import"./useInfiniteQuery-C3YlsjqB.js";import"./use-infinite-scroll-BQjvXdPz.js";import"./use-connection-5V9ysZDz.js";import"./use-mcp-client-C66yIlAd.js";import"./auth-BKg8KB4Q.js";import"./use-virtual-mcp-zisjRgmS.js";import"./card-B4X8T5VG.js";import"./sidebar-D1q5weH4.js";import"./use-mobile-5SOdKrGk.js";import"./table-Dr5WgajV.js";import"./empty-state-COuzTPqh.js";import"./use-members-yG-yZAF7.js";import"./use-org-auth-client-_My7JqZY.js";import"./use-clock-tick-D7wjISi9.js";import"./use-automations-FgqBXimw.js";import"./studio-tools-CTvMzhHZ.js";import"./useSuspenseInfiniteQuery-DGBuv3Vr.js";import"./avatar-Cqm3Lq4j.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DwMjsVFX.js";import"./dialog-S6zU-X1o.js";import"./tab-id-m51PiwPd.js";import"./hooks-DHZH9aGB.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CgnyrQVH.js";import"./chat-context-DyvKnksd.js";import"./use-ai-providers-C8J33FgM.js";import"./use-decopilot-events-CeCOBA6F.js";import"./use-organization-settings-0GX_RgcP.js";import"./monaco-editor-BRq76hge.js";import"./index-gOR0IO0m.js";import"./calendar-Dw4fmCzc.js";import"./shell-layout-iBF19CF5.js";import"./required-auth-layout-lByVfD5H.js";import"./use-org-sso-DpN_CP64.js";import"./integration-icon-CIE0aLCY.js";import"./use-navigate-to-agent-Cp0ofdA2.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-B-nTjrAx.js";import"./form-CIpF7vgQ.js";import"./label-DfOap5yU.js";import"./input-boqiKbt5.js";import"./switch-Ck7aTeHo.js";import"./drawer-CQnxFo4h.js";import"./collection-search-kogdFX9E.js";import"./index-DvqSQIGZ.js";import"./get-initials-D-f_fDFw.js";import"./popover-BtPGwDNE.js";import"./dropdown-menu-6Z0gFMED.js";import"./github-repo-picker-TiUDTq3i.js";import"./use-debounced-value-Do7XX3ss.js";import"./authenticate-and-persist-oauth-B1Tlj1JC.js";import"./mcp-oauth-CKM-_P-X.js";import"./use-mcp-tools-B0oPBVvy.js";import"./extract-connection-data-cNElALED.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-DWINBxtd.js";import"./use-tags-dvoKIzN1.js";import"./command-YBlMu_ai.js";import"./index-CgcZ4SGk.js";import"./companions-core-BLY1ba6m.js";import"./tabs-Bp95nj86.js";import"./toggle-group-AX7GMgVr.js";import"./use-deco-credits-gC1IJXsk.js";import"./alert-dialog-lWVONnNL.js";import"./toolbar-C0vQI8SC.js";import"./skeleton-DfWmK_Y8.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-CM5pZnY-.js";import"./use-registry-connections-DRFd-vEw.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-B0wrekwX.js";import"./connection-form-helpers-B3UhdWRQ.js";import"./collection-tabs-SfyxjJ1V.js";import"./badge-Dn-iMFnd.js";import"./select-model-B7suGfbk.js";import"./checkbox-CcdD9hyv.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-kinXnNNm.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DvGgswK8.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-DSXju304.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-Df8Z4xSe.js";import"./use-debounced-autosave-yMskey-B.js";import"./index-Cg2H39JI.js";import"./search-input-BDo6-Pt1.js";import"./use-secrets-Crn3uZRK.js";import"./useQueries-DgSNUKr1.js";import"./use-file-configs-BV4ALFV5.js";import"./automation-list-row-BOCKdejq.js";function A(d){return typeof d=="string"&&d.trim()?d:void 0}function he(d,e){if(d){if(e)try{const t=new URL(d,e).href;return ue(t)}catch{return}return ue(d)}}function ze(d){if(!d)return{};const e=A(d.title),t=A(d.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:A(d.description),image:A(d.image),favicon:A(d.favicon)}}function De(d){if(!d)return"example.com";try{return new URL(d).host}catch{return"example.com"}}const $e=[{id:"google",labelKey:"sectionsEditor.seoPreview.platformGoogle",color:"#4285F4",layout:"search"},{id:"facebook",labelKey:"sectionsEditor.seoPreview.platformFacebook",color:"#1877F2",layout:"card"},{id:"twitter",labelKey:"sectionsEditor.seoPreview.platformTwitter",color:"#0f1419",layout:"card"},{id:"linkedin",labelKey:"sectionsEditor.seoPreview.platformLinkedin",color:"#0A66C2",layout:"card"},{id:"whatsapp",labelKey:"sectionsEditor.seoPreview.platformWhatsapp",color:"#25D366",layout:"chat"},{id:"telegram",labelKey:"sectionsEditor.seoPreview.platformTelegram",color:"#229ED9",layout:"chat"},{id:"slack",labelKey:"sectionsEditor.seoPreview.platformSlack",color:"#611f69",layout:"attachment"},{id:"discord",labelKey:"sectionsEditor.seoPreview.platformDiscord",color:"#5865F2",layout:"attachment"}];function de(d){const e=T.c(10),{src:t,className:n,iconSize:v}=d,r=v===void 0?20:v;if(t){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==n||e[2]!==t?(p=o.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:n,style:m}),e[1]=n,e[2]=t,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let i;e[5]!==r?(i=o.jsx(ye,{size:r}),e[5]=r,e[6]=i):i=e[6];let a;return e[7]!==n||e[8]!==i?(a=o.jsx("div",{className:n,style:s,children:i}),e[7]=n,e[8]=i,e[9]=a):a=e[9],a}function Ie(d){const e=T.c(33),{seo:t,host:n,path:v,t:r}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#fff",border:"1px solid #dadce0"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={background:"#f1f3f4"},e[1]=i):i=e[1];let a;e[2]!==t.favicon?(a=o.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:i,children:t.favicon?o.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):o.jsx(ye,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=a):a=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#202124"},e[4]=m):m=e[4];let p;e[5]!==n?(p=o.jsx("div",{className:"truncate text-[13px] leading-tight",style:m,children:n}),e[5]=n,e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#4d5156"},e[7]=f):f=e[7];let l;e[8]!==n||e[9]!==v?(l=o.jsxs("div",{className:"truncate text-[12px] leading-tight",style:f,children:[n,v]}),e[8]=n,e[9]=v,e[10]=l):l=e[10];let c;e[11]!==p||e[12]!==l?(c=o.jsxs("div",{className:"min-w-0",children:[p,l]}),e[11]=p,e[12]=l,e[13]=c):c=e[13];let h;e[14]!==a||e[15]!==c?(h=o.jsxs("div",{className:"flex items-center gap-2",children:[a,c]}),e[14]=a,e[15]=c,e[16]=h):h=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x={color:"#1a0dab"},e[17]=x):x=e[17];let y;e[18]!==t.title||e[19]!==r?(y=t.title??r("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=r,e[20]=y):y=e[20];let u;e[21]!==y?(u=o.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:x,children:y}),e[21]=y,e[22]=u):u=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S={color:"#4d5156"},e[23]=S):S=e[23];let g;e[24]!==t.description||e[25]!==r?(g=t.description??r("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=r,e[26]=g):g=e[26];let b;e[27]!==g?(b=o.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:S,children:g}),e[27]=g,e[28]=b):b=e[28];let j;return e[29]!==u||e[30]!==b||e[31]!==h?(j=o.jsxs("div",{className:"rounded-lg p-3 text-left",style:s,children:[h,u,b]}),e[29]=u,e[30]=b,e[31]=h,e[32]=j):j=e[32],j}function Le(d){const e=T.c(26),{seo:t,host:n,t:v}=d;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"#fff",border:"1px solid #e2e8f0"},e[0]=r):r=e[0];let s;e[1]!==t.image?(s=o.jsx(de,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={borderTop:"1px solid #e2e8f0"},e[3]=i):i=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a={color:"#8a9099"},e[4]=a):a=e[4];let m;e[5]!==n?(m=o.jsx("div",{className:"truncate text-[11px]",style:a,children:n}),e[5]=n,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[7]=p):p=e[7];let f;e[8]!==t.title||e[9]!==v?(f=t.title??v("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=v,e[10]=f):f=e[10];let l;e[11]!==f?(l=o.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:p,children:f}),e[11]=f,e[12]=l):l=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[13]=c):c=e[13];let h;e[14]!==t.description||e[15]!==v?(h=t.description??v("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=v,e[16]=h):h=e[16];let x;e[17]!==h?(x=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:h}),e[17]=h,e[18]=x):x=e[18];let y;e[19]!==x||e[20]!==m||e[21]!==l?(y=o.jsxs("div",{className:"px-3 py-2",style:i,children:[m,l,x]}),e[19]=x,e[20]=m,e[21]=l,e[22]=y):y=e[22];let u;return e[23]!==y||e[24]!==s?(u=o.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:r,children:[s,y]}),e[23]=y,e[24]=s,e[25]=u):u=e[25],u}function Be(d){const e=T.c(36),{seo:t,host:n,accent:v,t:r}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f0f2f5"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#3b4045"},e[1]=i):i=e[1];let a;e[2]!==r?(a=r("sectionsEditor.seoPreview.chatCardHint"),e[2]=r,e[3]=a):a=e[3];let m;e[4]!==a?(m=o.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:i,children:a}),e[4]=a,e[5]=m):m=e[5];const p=`3px solid ${v}`;let f;e[6]!==p?(f={background:"#fff",borderLeft:p},e[6]=p,e[7]=f):f=e[7];let l;e[8]!==t.image?(l=o.jsx(de,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=l):l=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#1c2024"},e[10]=c):c=e[10];let h;e[11]!==t.title||e[12]!==r?(h=t.title??r("sectionsEditor.seoPreview.fallbackTitle"),e[11]=t.title,e[12]=r,e[13]=h):h=e[13];let x;e[14]!==h?(x=o.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:c,children:h}),e[14]=h,e[15]=x):x=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y={color:"#60666c"},e[16]=y):y=e[16];let u;e[17]!==t.description||e[18]!==r?(u=t.description??r("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=r,e[19]=u):u=e[19];let S;e[20]!==u?(S=o.jsx("div",{className:"line-clamp-2 text-[11px]",style:y,children:u}),e[20]=u,e[21]=S):S=e[21];let g;e[22]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#8a9099"},e[22]=g):g=e[22];let b;e[23]!==n?(b=o.jsx("div",{className:"mt-0.5 text-[10px]",style:g,children:n}),e[23]=n,e[24]=b):b=e[24];let j;e[25]!==x||e[26]!==S||e[27]!==b?(j=o.jsxs("div",{className:"px-2.5 py-1.5",children:[x,S,b]}),e[25]=x,e[26]=S,e[27]=b,e[28]=j):j=e[28];let k;e[29]!==j||e[30]!==f||e[31]!==l?(k=o.jsxs("div",{className:"overflow-hidden rounded-md",style:f,children:[l,j]}),e[29]=j,e[30]=f,e[31]=l,e[32]=k):k=e[32];let N;return e[33]!==k||e[34]!==m?(N=o.jsxs("div",{className:"rounded-lg p-2 text-left",style:s,children:[m,k]}),e[33]=k,e[34]=m,e[35]=N):N=e[35],N}function Oe(d){const e=T.c(39),{seo:t,host:n,accent:v,dark:r,t:s}=d,i=r?"#2b2d31":"#fff",a=r?"#00a8fc":"#1264a3",m=r?"#dbdee1":"#3b4045",p=r?"#949ba4":"#8a9099",f=r?"none":"1px solid #e2e8f0";let l;e[0]!==i||e[1]!==f?(l={background:i,border:f},e[0]=i,e[1]=f,e[2]=l):l=e[2];const c=`3px solid ${v}`;let h;e[3]!==c?(h={borderLeft:c,borderRadius:2},e[3]=c,e[4]=h):h=e[4];let x;e[5]!==p?(x={color:p},e[5]=p,e[6]=x):x=e[6];let y;e[7]!==n||e[8]!==x?(y=o.jsx("div",{className:"text-[10px]",style:x,children:n}),e[7]=n,e[8]=x,e[9]=y):y=e[9];let u;e[10]!==a?(u={color:a},e[10]=a,e[11]=u):u=e[11];let S;e[12]!==t.title||e[13]!==s?(S=t.title??s("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=s,e[14]=S):S=e[14];let g;e[15]!==u||e[16]!==S?(g=o.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:S}),e[15]=u,e[16]=S,e[17]=g):g=e[17];let b;e[18]!==m?(b={color:m},e[18]=m,e[19]=b):b=e[19];let j;e[20]!==t.description||e[21]!==s?(j=t.description??s("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=s,e[22]=j):j=e[22];let k;e[23]!==b||e[24]!==j?(k=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:b,children:j}),e[23]=b,e[24]=j,e[25]=k):k=e[25];let N;e[26]!==k||e[27]!==y||e[28]!==g?(N=o.jsxs("div",{className:"min-w-0 flex-1",children:[y,g,k]}),e[26]=k,e[27]=y,e[28]=g,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=o.jsx(de,{src:t.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[30]=t.image,e[31]=w):w=e[31];let _;e[32]!==N||e[33]!==w||e[34]!==h?(_=o.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:h,children:[N,w]}),e[32]=N,e[33]=w,e[34]=h,e[35]=_):_=e[35];let P;return e[36]!==_||e[37]!==l?(P=o.jsx("div",{className:"rounded-lg p-2.5 text-left",style:l,children:_}),e[36]=_,e[37]=l,e[38]=P):P=e[38],P}function Ue(d){const e=T.c(21),{platform:t,seo:n,host:v,path:r,t:s}=d;let i;e[0]!==v||e[1]!==r||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==n||e[6]!==s?(i=t.layout==="search"?o.jsx(Ie,{seo:n,host:v,path:r,t:s}):t.layout==="card"?o.jsx(Le,{seo:n,host:v,path:r,t:s}):t.layout==="chat"?o.jsx(Be,{seo:n,host:v,path:r,accent:t.color,t:s}):o.jsx(Oe,{seo:n,host:v,path:r,accent:t.color,dark:t.id==="discord",t:s}),e[0]=v,e[1]=r,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=n,e[6]=s,e[7]=i):i=e[7];const a=i;let m;e[8]!==t.color?(m=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=m):m=e[9];let p;e[10]!==t.labelKey||e[11]!==s?(p=s(t.labelKey),e[10]=t.labelKey,e[11]=s,e[12]=p):p=e[12];let f;e[13]!==p?(f=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p}),e[13]=p,e[14]=f):f=e[14];let l;e[15]!==m||e[16]!==f?(l=o.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[m,f]}),e[15]=m,e[16]=f,e[17]=l):l=e[17];let c;return e[18]!==a||e[19]!==l?(c=o.jsxs("div",{children:[l,a]}),e[18]=a,e[19]=l,e[20]=c):c=e[20],c}function Ae(d){const e=T.c(18),{seo:t,url:n,path:v}=d,r=v===void 0?"/":v,s=ve();let i,a,m;if(e[0]!==t||e[1]!==n){const u=ze(t);i=u,a=he(u.image,n),m=he(u.favicon,n),e[0]=t,e[1]=n,e[2]=i,e[3]=a,e[4]=m}else i=e[2],a=e[3],m=e[4];let p;e[5]!==i||e[6]!==a||e[7]!==m?(p={...i,image:a,favicon:m},e[5]=i,e[6]=a,e[7]=m,e[8]=p):p=e[8];const f=p;let l;e[9]!==n?(l=De(n),e[9]=n,e[10]=l):l=e[10];const c=l,h=r==="/"?"":r;let x;e[11]!==h||e[12]!==c||e[13]!==s||e[14]!==f?(x=$e.map(u=>o.jsx(Ue,{platform:u,seo:f,host:c,path:h,t:s},u.id)),e[11]=h,e[12]=c,e[13]=s,e[14]=f,e[15]=x):x=e[15];let y;return e[16]!==x?(y=o.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:x}),e[16]=x,e[17]=y):y=e[17],y}function Ri(d){const e=T.c(70),{orgSlug:t,virtualMcpId:n,branch:v,decofile:r,meta:s,target:i,previewBaseUrl:a,onSaved:m,onEditDefaultSeo:p,onBack:f}=d,l=ve(),c=Ne(r,i,s),h=c?.seoData,x=i.kind==="site"?"site":i.pageKey,[y,u]=ee.useState(x),[S,g]=ee.useState(null),[b,j]=ee.useState(0),[k,N]=ee.useState(void 0);y!==x&&(u(x),g(null),N(void 0),j(Ge));const{persistSeo:w,persistRawSeo:_,flush:P,isPending:te}=we({orgSlug:t,virtualMcpId:n,branch:v,target:i,resolved:c,onSaved:m}),M=i.kind==="page",ge=M?c?.rawSeoData:void 0,U=k!==void 0?k:ge,be=M?_e(U)??void 0:void 0,E=S??be??h??{},F=c?Ee(E,c):null,K=F&&(!M||Pe(U))?Ke(F,s):null;let G;e[0]!==s?(G=Te(s),e[0]=s,e[1]=G):G=e[1];const oe=G;let R,H;e[2]!==r||e[3]!==E||e[4]!==s||e[5]!==i.kind?(R=i.kind==="page"?Fe(r,s)?.seoData??{}:{},H=i.kind==="page"?Ve(R,E):E,e[2]=r,e[3]=E,e[4]=s,e[5]=i.kind,e[6]=R,e[7]=H):(R=e[6],H=e[7]);const ie=H;let V;e[8]!==w||e[9]!==c||e[10]!==g?(V=C=>{if(!c)return;const pe=C;g(pe),w(pe)},e[8]=w,e[9]=c,e[10]=g,e[11]=V):V=e[11];const se=V;let W;e[12]!==g?(W=()=>g(null),e[12]=g,e[13]=W):W=e[13];const le=W;let q;e[14]!==j?(q=()=>j(Me),e[14]=j,e[15]=q):q=e[15];const re=q;let J;e[16]!==P||e[17]!==f?(J=()=>{P(),f?.()},e[16]=P,e[17]=f,e[18]=J):J=e[18];const ce=J,z=i.kind==="page"?i.path:"/";let Q;e[19]!==z||e[20]!==a||e[21]!==i.kind?(Q=i.kind==="page"&&a?He(z,a):a??null,e[19]=z,e[20]=a,e[21]=i.kind,e[22]=Q):Q=e[22];const ne=Q;let X;e[23]!==c||e[24]!==l||e[25]!==i.kind?(X=i.kind==="site"?l("sectionsEditor.seoEditor.noSiteSeoBlock"):l(c?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[23]=c,e[24]=l,e[25]=i.kind,e[26]=X):X=e[26];const ae=X,Y=M&&c,me=i.kind==="site"&&c&&K;let D;e[27]!==ce||e[28]!==l||e[29]!==i.kind||e[30]!==i.pageName?(D=i.kind==="page"?o.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[o.jsx("button",{type:"button",onClick:ce,title:i.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:i.pageName}),o.jsx(ke,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:l("sectionsEditor.seoEditor.defaultSeoLabel")}),o.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",l("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[27]=ce,e[28]=l,e[29]=i.kind,e[30]=i.pageName,e[31]=D):D=e[31];let $;e[32]!==te?($=te&&o.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[32]=te,e[33]=$):$=e[33];let I;e[34]!==p||e[35]!==l||e[36]!==i.kind?(I=i.kind==="page"&&p&&o.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[o.jsx(fe,{size:14}),l("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[34]=p,e[35]=l,e[36]=i.kind,e[37]=I):I=e[37];let L;e[38]!==$||e[39]!==I?(L=o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[$,I]}),e[38]=$,e[39]=I,e[40]=L):L=e[40];let B;e[41]!==L||e[42]!==D?(B=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[D,L]}),e[41]=L,e[42]=D,e[43]=B):B=e[43];let O;e[44]!==F||e[45]!==re||e[46]!==le||e[47]!==oe||e[48]!==U||e[49]!==E||e[50]!==ae||e[51]!==b||e[52]!==se||e[53]!==z||e[54]!==_||e[55]!==w||e[56]!==ie||e[57]!==ne||e[58]!==c||e[59]!==K||e[60]!==g||e[61]!==N||e[62]!==Y||e[63]!==me||e[64]!==R||e[65]!==l?(O=!c||!Y&&!me?o.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ae}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(xe,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-5 py-4",children:Y?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:l("sectionsEditor.seoEditor.emptyFieldsHint")}),o.jsx(Re,{rawSeo:U,innerSeo:E,defaultResolveType:oe,seoSchema:K,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:b,siteDefaultSeo:R,onPersistRaw:C=>{N(C),_(C)},onInnerChange:C=>{g(C),w(C)},onClearForm:le,onBumpFormKey:re})]}):K&&F&&o.jsx(Ce,{schema:K,resolveType:F,value:E,formResetKey:b,onChange:se})})}),o.jsx(xe,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"@container px-5 py-4",children:o.jsx(Ae,{seo:ie,url:ne,path:z})})})]}),e[44]=F,e[45]=re,e[46]=le,e[47]=oe,e[48]=U,e[49]=E,e[50]=ae,e[51]=b,e[52]=se,e[53]=z,e[54]=_,e[55]=w,e[56]=ie,e[57]=ne,e[58]=c,e[59]=K,e[60]=g,e[61]=N,e[62]=Y,e[63]=me,e[64]=R,e[65]=l,e[66]=O):O=e[66];let Z;return e[67]!==B||e[68]!==O?(Z=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[B,O]}),e[67]=B,e[68]=O,e[69]=Z):Z=e[69],Z}function Me(d){return d+1}function Ge(d){return d+1}function He(d,e){try{return new URL(d,e).href}catch{return e}}function Ve(d,e){const t=e.__resolveType,n=d.__resolveType;if(typeof t=="string"&&typeof n=="string"&&t!==n)return{...e};const v={...d};for(const[r,s]of Object.entries(e))r!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(v[r]=s));return v}export{Ri as SeoEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as j,b as q,j as t,f as D,F as K,m as z,y as U,L as T,p as E,P as G,a as B,k as V,r as X,O as Y}from"./index-CXWWJmED.js";import{u as Z}from"./useRouterState-C6ZTwoUL.js";import{j as ee,k as se,l as te,S as M,a as O,b as L,d as I,c as R,g as ie,h as ne}from"./sidebar-D1q5weH4.js";import{a as le}from"./index-Cg2H39JI.js";import{n as re,i as oe,a as ae,c as ce,b as me}from"./ZapSquare-BqtHYgtB.js";import{t as fe,a as A}from"./Users03-l3anhVFn.js";import{i as de}from"./HardDrive-BdTCtFl3.js";import{i as xe}from"./Key01-D8-RvxFO.js";import{n as be}from"./LinkExternal01-Cnx8YByp.js";import{i as F}from"./LogOut01-CFjw7N9j.js";import{i as ue}from"./Shield01-CgDNV0PO.js";import{s as ge}from"./User01-BpaY3mYf.js";import{i as he}from"./Zap-BbdbOIdc.js";import{a as pe}from"./use-capability-DSXju304.js";import{u as je}from"./use-join-requests-CzxtXa1_.js";import{u as H}from"./use-mobile-5SOdKrGk.js";import{u as ye}from"./use-status-sounds-DvGgswK8.js";import{a as _}from"./toolbar-C0vQI8SC.js";import{S as _e,M as ve}from"./shell-controls-BMudmoTG.js";import"./LayoutLeft-Bx_rpAKD.js";import"./X-9WQSG5hH.js";import"./tooltip-gZsEQkQ4.js";import"./studio-tools-CTvMzhHZ.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-CeCOBA6F.js";import"./decopilot-sse-pool-CgnyrQVH.js";import"./backoff-CrEUbyZT.js";function J(){const e=j.c(23),s=q(),{capabilities:o,isPrivileged:n,loading:i,error:l}=pe(),a=je().length;let r,c;if(e[0]!==o||e[1]!==l||e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==s){c=Symbol.for("react.early_return_sentinel");e:{let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(fe,{size:14}),e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(be,{size:14}),e[9]=f):f=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(re,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(oe,{size:14}),e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(xe,{size:14}),e[12]=b):b=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(de,{size:14}),e[13]=g):g=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(ae,{size:14}),e[14]=h):h=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(A,{size:14}),e[15]=u):u=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(he,{size:14}),e[16]=y):y=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ce,{size:14}),e[17]=p):p=e[17];let v;e[18]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(me,{size:14}),e[18]=v):v=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(A,{size:14}),e[19]=S):S=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(ue,{size:14}),e[20]=k):k=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(U,{size:14}),e[21]=N):N=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ge,{size:14}),e[22]=$):$=e[22];const w=[{key:"organization",label:s("settings.nav.organization"),items:[{key:"general",label:s("settings.nav.general"),icon:m,to:"/$org/settings/general",requires:"org:manage"},{key:"connect",label:"Connect to clients",icon:f,to:"/$org/settings/connect"},{key:"brand-context",label:s("settings.nav.brandContext"),icon:d,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:s("settings.nav.aiProviders"),icon:x,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:s("settings.nav.secrets"),icon:b,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:s("settings.nav.buckets"),icon:g,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{key:"build",label:s("settings.nav.build"),items:[{key:"connections",label:s("settings.nav.connections"),icon:h,to:"/$org/settings/connections"},{key:"agents",label:s("settings.nav.agents"),icon:u,to:"/$org/settings/agents"},{key:"automations",label:s("settings.nav.automations"),icon:y,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:s("settings.nav.store"),icon:p,to:"/$org/settings/store",requires:"registry:manage"}]},{key:"manage",label:s("settings.nav.manage"),items:[{key:"monitor",label:s("settings.nav.monitor"),icon:v,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:s("settings.nav.members"),icon:S,to:"/$org/settings/members",requires:"members:manage",badge:a},{key:"roles",label:s("settings.nav.roles"),icon:k,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:s("settings.nav.security"),icon:N,to:"/$org/settings/sso",requires:"org:manage"}]},{key:"account",label:s("settings.nav.account"),items:[{key:"profile",label:s("settings.nav.profile"),icon:$,to:"/$org/settings/profile"}]}];if(i||l){c=w;break e}r=w.map(P=>({...P,items:P.items.filter(C=>C.privilegedOnly?n:C.requires?n||o[C.requires]:!0)})).filter(Se)}e[0]=o,e[1]=l,e[2]=n,e[3]=a,e[4]=i,e[5]=s,e[6]=r,e[7]=c}else r=e[6],c=e[7];return c!==Symbol.for("react.early_return_sentinel")?c:r}function Se(e){return e.items.length>0}function Q(e){const s=j.c(5),{icon:o,badge:n}=e;let i;s[0]!==n?(i=n?t.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,s[0]=n,s[1]=i):i=s[1];let l;return s[2]!==o||s[3]!==i?(l=t.jsxs("span",{className:"relative shrink-0",children:[o,i]}),s[2]=o,s[3]=i,s[4]=l):l=s[4],l}function W(){const e=j.c(8);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=D(s);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={select:ke},e[1]=n):n=e[1];const i=Z(n);let l;e[2]!==o||e[3]!==i?(l=c=>{const m=c.replace("$org",o);return i.startsWith(m)},e[2]=o,e[3]=i,e[4]=l):l=e[4];const a=l;let r;return e[5]!==a||e[6]!==o?(r={org:o,isActive:a},e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ke(e){return e.location.pathname}function Ne(){const e=j.c(19),s=q(),o=J(),{org:n,isActive:i}=W();let l;if(e[0]!==o||e[1]!==i||e[2]!==n){let b;e[4]!==i||e[5]!==n?(b=(g,h)=>t.jsxs(M,{className:"pt-0 pr-0 pb-0 pl-0",children:[g.label&&t.jsx("p",{className:z("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",h>0&&"mt-3"),children:g.label}),t.jsx(O,{children:t.jsx(L,{className:"gap-0.5",children:g.items.map(u=>t.jsx(I,{children:t.jsx(R,{asChild:!0,isActive:i(u.to),children:t.jsxs(T,{to:u.to,params:{org:n},onClick:()=>E("settings_nav_clicked",{section_key:u.key,group_key:g.key}),className:"flex items-center gap-2.5 text-sm",children:[t.jsx(Q,{icon:u.icon,badge:u.badge}),t.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},g.key),e[4]=i,e[5]=n,e[6]=b):b=e[6],l=o.map(b),e[0]=o,e[1]=i,e[2]=n,e[3]=l}else l=e[3];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[7]=a):a=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("span",{className:"shrink-0",children:t.jsx(F,{size:14})}),e[8]=r):r=e[8];let c;e[9]!==s?(c=s("settings.nav.signOut"),e[9]=s,e[10]=c):c=e[10];let m;e[11]!==c?(m=t.jsxs(M,{className:"pt-0 pr-0 pb-0 pl-0",children:[a,t.jsx(O,{children:t.jsx(L,{className:"gap-0.5",children:t.jsx(I,{children:t.jsxs(R,{onClick:$e,className:"flex items-center gap-2.5 text-sm",children:[r,t.jsx("span",{className:"truncate",children:c})]})})})})]}),e[11]=c,e[12]=m):m=e[12];let f;e[13]!==l||e[14]!==m?(f=t.jsxs(ie,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[l,m]}),e[13]=l,e[14]=m,e[15]=f):f=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"mt-auto px-4 pb-1",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.149.6"]})}),e[16]=d):d=e[16];let x;return e[17]!==f?(x=t.jsxs(ne,{variant:"sidebar",children:[f,d]}),e[17]=f,e[18]=x):x=e[18],x}function $e(){E("signed_out",{source:"settings_sidebar"}),G(),B.signOut()}function ze(e){const s=j.c(21),{onClose:o}=e,n=q(),i=J(),{org:l,isActive:a}=W();let r;if(s[0]!==i||s[1]!==a||s[2]!==o||s[3]!==l){let h;s[5]!==a||s[6]!==o||s[7]!==l?(h=(u,y)=>t.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&t.jsx("p",{className:z("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",y>0&&"mt-3"),children:u.label}),u.items.map(p=>t.jsxs(T,{to:p.to,params:{org:l},onClick:o,className:z("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",a(p.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[t.jsx(Q,{icon:p.icon,badge:p.badge}),t.jsx("span",{className:"truncate",children:p.label})]},p.key))]},u.key),s[5]=a,s[6]=o,s[7]=l,s[8]=h):h=s[8],r=i.map(h),s[0]=i,s[1]=a,s[2]=o,s[3]=l,s[4]=r}else r=s[4];let c;s[9]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"h-px bg-border/50 my-2"}),s[9]=c):c=s[9];let m;s[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"shrink-0",children:t.jsx(F,{size:14})}),s[10]=m):m=s[10];let f;s[11]!==n?(f=n("settings.nav.signOut"),s[11]=n,s[12]=f):f=s[12];let d;s[13]!==f?(d=t.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,t.jsxs("button",{type:"button",onClick:Ce,className:"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",children:[m,t.jsx("span",{className:"truncate",children:f})]})]}),s[13]=f,s[14]=d):d=s[14];let x;s[15]!==r||s[16]!==d?(x=t.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[r,d]}),s[15]=r,s[16]=d,s[17]=x):x=s[17];let b;s[18]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.149.6"]})}),s[18]=b):b=s[18];let g;return s[19]!==x?(g=t.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[x,b]}),s[19]=x,s[20]=g):g=s[20],g}function Ce(){G(),B.signOut()}function qe(){const e=j.c(4),s=H(),{org:o}=K();ye(o.slug);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(V,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(X.Suspense,{fallback:n,children:t.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:t.jsx(le,{value:"p-0",children:t.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:t.jsx(Y,{})})})})}),e[1]=i):i=e[1];const l=i;if(s){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:l}),e[2]=r):r=e[2],r}let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 min-h-0 p-1",children:t.jsx("div",{className:z("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:l})}),e[3]=a):a=e[3],a}function ns(){const e=j.c(21),s=H();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(_.LogoLink,{}),e[0]=o):o=e[0];let n;e[1]!==s?(n=s&&t.jsx(_e,{}),e[1]=s,e[2]=n):n=e[2];let i;e[3]!==n?(i=t.jsxs(_.LeftColumn,{children:[o,n]}),e[3]=n,e[4]=i):i=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(_.CenterSlot,{}),e[5]=l):l=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(_.RightColumn,{children:t.jsx("span",{})}),e[6]=a):a=e[6];let r;e[7]!==i?(r=t.jsxs(_.Header,{children:[i,l,a]}),e[7]=i,e[8]=r):r=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c={"--sidebar-width-icon":"3.125rem"},e[9]=c):c=e[9];let m;e[10]!==s?(m=!s&&t.jsx(Ne,{}),e[10]=s,e[11]=m):m=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ee,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:t.jsx(qe,{})}),e[12]=f):f=e[12];let d;e[13]!==m?(d=t.jsxs(se,{className:"flex-1 bg-sidebar min-h-0",style:c,children:[m,f]}),e[13]=m,e[14]=d):d=e[14];let x;e[15]!==s?(x=s&&t.jsx(ve,{renderSidebar:we}),e[15]=s,e[16]=x):x=e[16];let b;return e[17]!==x||e[18]!==r||e[19]!==d?(b=t.jsx(_.Provider,{children:t.jsx(te,{defaultOpen:!0,children:t.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[r,d,x]})})}),e[17]=x,e[18]=r,e[19]=d,e[20]=b):b=e[20],b}function we(e){const{onClose:s}=e;return t.jsx(ze,{onClose:s})}export{Ne as SettingsSidebar,ze as SettingsSidebarMobile,ns as default};
|