decocms 4.88.0 → 4.89.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-TjPHcEnP.js → AlertCircle-r81KDCkg.js} +1 -1
- package/dist/client/assets/{AreaChart-Cn-bvgNR.js → AreaChart-24Arw-iU.js} +1 -1
- package/dist/client/assets/{ArrowUp-D620niSP.js → ArrowUp-as8SHvC8.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BH4m-RJh.js → ArrowUpRight-Dnnbc3sc.js} +1 -1
- package/dist/client/assets/{CheckCircle-wgdag1z7.js → CheckCircle-C_M62nkl.js} +1 -1
- package/dist/client/assets/{ChevronDown-C3MkOcZJ.js → ChevronDown-B75aPsCE.js} +1 -1
- package/dist/client/assets/{ChevronRight-D7I_d6Rs.js → ChevronRight-PDwav88t.js} +1 -1
- package/dist/client/assets/{ChevronUp-BcAa4Ljr.js → ChevronUp-RnOoN8Gm.js} +1 -1
- package/dist/client/assets/{Copy01-ybfnME4F.js → Copy01-3TK575sB.js} +1 -1
- package/dist/client/assets/{DotsVertical-BkJg419g.js → DotsVertical-0aRvko9I.js} +1 -1
- package/dist/client/assets/{Eye-CeD9rgkI.js → Eye-BU5M66-B.js} +1 -1
- package/dist/client/assets/{FilterLines-DTDvdHSv.js → FilterLines-C0aYck1r.js} +1 -1
- package/dist/client/assets/{Globe01-e5qIDEbr.js → Globe01-Cx4waOlW.js} +1 -1
- package/dist/client/assets/{Globe04-Bxmic94-.js → Globe04-BuRGemFB.js} +1 -1
- package/dist/client/assets/{HardDrive-Bo4OGyrd.js → HardDrive-DxAvi6ek.js} +1 -1
- package/dist/client/assets/{Image01-Cm0pa05N.js → Image01-ocYmq6gl.js} +1 -1
- package/dist/client/assets/{Key01-Dz6Z8ZMZ.js → Key01-ClqtFARw.js} +1 -1
- package/dist/client/assets/{LayoutLeft--D_GxkO2.js → LayoutLeft-hYkAnieh.js} +1 -1
- package/dist/client/assets/{LinkExternal01-eA6vVQM3.js → LinkExternal01-BBN1EF_2.js} +1 -1
- package/dist/client/assets/{Monitor01-CbDoyDRV.js → Monitor01-BCZRvrq1.js} +1 -1
- package/dist/client/assets/{Package-BRrJc9sL.js → Package-Cjzokjh9.js} +1 -1
- package/dist/client/assets/{Palette-D12yKiV2.js → Palette-iejUcrr_.js} +1 -1
- package/dist/client/assets/{Play-CQU4qZuG.js → Play-BFZ9mFZ3.js} +1 -1
- package/dist/client/assets/{Plus-CaVUuJOD.js → Plus-D7Q_fBsD.js} +1 -1
- package/dist/client/assets/{SearchLg-CIPUU7M2.js → SearchLg-oN9DiuUL.js} +1 -1
- package/dist/client/assets/{SearchMd-7xF40qNR.js → SearchMd-ywrBhyjb.js} +1 -1
- package/dist/client/assets/{Settings02-BNJ32xSl.js → Settings02-U-q0qmT6.js} +1 -1
- package/dist/client/assets/{Shield01-CfES6vR4.js → Shield01-pBaED0kN.js} +1 -1
- package/dist/client/assets/{Star01-5GqPaTBh.js → Star01-fuKCqcEY.js} +1 -1
- package/dist/client/assets/{Stars01-DrN-Oz3U.js → Stars01-Cisad8Qn.js} +1 -1
- package/dist/client/assets/{Stars02-7EGkcn1l.js → Stars02-DtAXhSux.js} +1 -1
- package/dist/client/assets/{Sun-C4Fwh1Vu.js → Sun-BhjGBR7J.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CWRzX-Fm.js → SwitchHorizontal01-DJ_n1gld.js} +1 -1
- package/dist/client/assets/{Tool01-DTY-fPyM.js → Tool01-sRr0otc1.js} +1 -1
- package/dist/client/assets/{Tool02-C5wUTAFe.js → Tool02-Dot3PlzY.js} +1 -1
- package/dist/client/assets/{Trash01-D4xE6JK2.js → Trash01-Bc1zlKju.js} +1 -1
- package/dist/client/assets/{TrendUp01--_jCdLU4.js → TrendUp01-DV1ovCKN.js} +1 -1
- package/dist/client/assets/{Upload01-Baccrojk.js → Upload01-DMecuRvr.js} +1 -1
- package/dist/client/assets/{User01-B_wV9DLb.js → User01-CEmcmsWO.js} +1 -1
- package/dist/client/assets/{Users01--ZODDl59.js → Users01-CZRWCPzK.js} +1 -1
- package/dist/client/assets/{Users03-Bk7hrtUP.js → Users03-BjalM9H6.js} +1 -1
- package/dist/client/assets/{X-Dg7rsVai.js → X-BDaWTSie.js} +1 -1
- package/dist/client/assets/{XCircle-Di7Lb4ZU.js → XCircle-C9M3iiTQ.js} +1 -1
- package/dist/client/assets/{XClose-BWc8duIO.js → XClose-B0ZRZoQ5.js} +1 -1
- package/dist/client/assets/{Zap-BS9GJrhH.js → Zap-B9eAPyIn.js} +1 -1
- package/dist/client/assets/{ZapSquare-CqcwFWlA.js → ZapSquare-DQnlvdJ_.js} +1 -1
- package/dist/client/assets/{ZoomOut-C_Zu7-Q5.js → ZoomOut-DOT5_qVW.js} +1 -1
- package/dist/client/assets/{access-gate-BPnO_2yT.js → access-gate-C1nwArQr.js} +1 -1
- package/dist/client/assets/{add-section-modal-Pogj97RR.js → add-section-modal-D0JUeFXk.js} +1 -1
- package/dist/client/assets/agent-icon-DNPAcO5x.js +1 -0
- package/dist/client/assets/{agents-list-Dla05byu.js → agents-list-DDM98Nyx.js} +1 -1
- package/dist/client/assets/ai-providers-Vjwqil3e.js +1 -0
- package/dist/client/assets/{alert-dialog-CRKyaNBx.js → alert-dialog-DgWT8z1K.js} +1 -1
- package/dist/client/assets/{alert-DE6IRFu8.js → alert-zcdx8kGP.js} +1 -1
- package/dist/client/assets/app-editor-CJuIOSnO.js +1 -0
- package/dist/client/assets/{auth-DgHUqP65.js → auth--oMr7vHq.js} +1 -1
- package/dist/client/assets/{auth-catchall-SZ57eR91.js → auth-catchall-Dtde_QiI.js} +1 -1
- package/dist/client/assets/{auth-entry-CUg_odDe.js → auth-entry-dh-xtV19.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CyOQ3TVW.js → auth-split-layout-D4NasHtD.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ClWKGwOW.js → authenticate-and-persist-oauth-B3cA_kpS.js} +1 -1
- package/dist/client/assets/{automation-list-row-aKON7NTD.js → automation-list-row-DO0_r5kd.js} +1 -1
- package/dist/client/assets/{automation-runs-IA98DU4N.js → automation-runs-BzjUDXYk.js} +1 -1
- package/dist/client/assets/automations-cekW9qpk.js +1 -0
- package/dist/client/assets/{autosend-TZVzvR_1.js → autosend-9JdqkLoP.js} +1 -1
- package/dist/client/assets/{avatar-Cg58Qi4s.js → avatar-D971ZDsG.js} +1 -1
- package/dist/client/assets/{badge-D2XsHW2Y.js → badge-CV81FXza.js} +1 -1
- package/dist/client/assets/{block-document-DqdDdm8l.js → block-document-YIs2gzFe.js} +1 -1
- package/dist/client/assets/brand-context-BkJp5YSZ.js +1 -0
- package/dist/client/assets/buckets-BEZsry37.js +1 -0
- package/dist/client/assets/{bulk-category-panel-CYYYEfij.js → bulk-category-panel-NOjxtfw2.js} +1 -1
- package/dist/client/assets/{calendar-DxMjhXOp.js → calendar-DAn0kDG7.js} +1 -1
- package/dist/client/assets/{capability-load-error-96MaJwmz.js → capability-load-error-CgU5Osnl.js} +1 -1
- package/dist/client/assets/{card-CPTg8fDY.js → card-1eLvKqkr.js} +1 -1
- package/dist/client/assets/category-editor-COElea-U.js +1 -0
- package/dist/client/assets/{chat-context-BAovwxgU.js → chat-context-zxnotAFI.js} +1 -1
- package/dist/client/assets/{checkbox-BdHs-X49.js → checkbox-DxsqLSdM.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B9Wv_KIW.js → cli-auth-success-CBCxPxk6.js} +1 -1
- package/dist/client/assets/{collection-detail-CU8cSNyP.js → collection-detail-CmaGlLFi.js} +1 -1
- package/dist/client/assets/{collection-display-button-cV3Ifql1.js → collection-display-button-x2H6ZkW0.js} +1 -1
- package/dist/client/assets/{collection-search-Btrf8Diq.js → collection-search-Dt9WnUiF.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BSrBvNF0.js → collection-table-wrapper-BNqjKtQs.js} +1 -1
- package/dist/client/assets/{collection-tabs-kwELhDMx.js → collection-tabs-xily9TbN.js} +1 -1
- package/dist/client/assets/{command-0HaDsh2Q.js → command-BRhEt2mB.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DFEZmF5u.js → commerce-onboarding-mjAySeIT.js} +1 -1
- package/dist/client/assets/{companions-core-DJ2SKsFs.js → companions-core-DTZjodsk.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CkUcaE26.js → connect-desktop-dialog-2mqj4v9U.js} +1 -1
- package/dist/client/assets/{connection-card-DwBQfP1R.js → connection-card-DM2aBX12.js} +1 -1
- package/dist/client/assets/{connection-detail-DT13KT-v.js → connection-detail-DSbsz45h.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-7cL_OUk8.js → connection-form-helpers-ltSs9w6R.js} +1 -1
- package/dist/client/assets/{connections-DlBTCw9k.js → connections-Bfwqd9Qb.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-C_pTq61C.js → decopilot-sse-pool-BM0BzocA.js} +1 -1
- package/dist/client/assets/{dialog-DT5S2RMB.js → dialog-DXVKHwUI.js} +1 -1
- package/dist/client/assets/domain-settings-B1_19eYE.js +1 -0
- package/dist/client/assets/{drawer-XzD4hvpg.js → drawer-DGXKP3qx.js} +1 -1
- package/dist/client/assets/{dropdown-menu-EMizUbgW.js → dropdown-menu-BktGVlNL.js} +1 -1
- package/dist/client/assets/{empty-state-D9Dn1Lnz.js → empty-state-D9rkwJcX.js} +1 -1
- package/dist/client/assets/{extract-connection-data-nMVGabj3.js → extract-connection-data-CJOU7Xr1.js} +1 -1
- package/dist/client/assets/file-explorer-CiWaG3-n.js +2 -0
- package/dist/client/assets/{file-type-icon-XKnElsdT.js → file-type-icon-DC3EtIF-.js} +1 -1
- package/dist/client/assets/{files-Das55Z1g.js → files-BB_KssK5.js} +1 -1
- package/dist/client/assets/{form-CFqk5lJy.js → form-0J7Chu5U.js} +1 -1
- package/dist/client/assets/general-B6aLzs6U.js +1 -0
- package/dist/client/assets/{github-repo-picker-DpzVLTnS.js → github-repo-picker-tl9VdVLZ.js} +1 -1
- package/dist/client/assets/{hooks-CKtulQ0t.js → hooks-Df-FarZV.js} +1 -1
- package/dist/client/assets/{index-o1hGdX20.js → index-68ky2YtL.js} +1 -1
- package/dist/client/assets/{index-B5m8CMLz.js → index-BRPCFhNw.js} +1 -1
- package/dist/client/assets/{index-MzuqcCtH.js → index-BbXpAsRZ.js} +1 -1
- package/dist/client/assets/{index-DoiBq52a.js → index-BbuFSBoX.js} +1 -1
- package/dist/client/assets/{index-DyWjSb5y.js → index-CA-ztSZz.js} +1 -1
- package/dist/client/assets/{index-D-9E1u1o.js → index-CmzQtMA6.js} +1 -1
- package/dist/client/assets/{index-zUbtwv_f.js → index-Cz1_LYvq.js} +1 -1
- package/dist/client/assets/{index-gfVsktdz.js → index-DIKxS-GD.js} +1 -1
- package/dist/client/assets/{index-Dq2GzmIa.js → index-DLtaZicx.js} +3 -3
- package/dist/client/assets/{index-BojbkbvA.js → index-DlvOwv1G.js} +1 -1
- package/dist/client/assets/{index-DpAoOgpk.js → index-FYxXdz5k.js} +5 -5
- package/dist/client/assets/{index-B0JPF-6M.js → index-ZKLmMqC_.js} +2 -2
- package/dist/client/assets/{index-D1cQ6lKh.js → index-ZvRKWpVk.js} +1 -1
- package/dist/client/assets/{index-DkcdY0vj.js → index-hvILk34b.js} +1 -1
- package/dist/client/assets/{index-redirect-BbVVWqBd.js → index-redirect-O8SrnbUe.js} +1 -1
- package/dist/client/assets/{input-_HbUXqOS.js → input-D4SXILkS.js} +1 -1
- package/dist/client/assets/{integration-icon-CGshMm4e.js → integration-icon-OvniHnox.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DdKcrFqE.js → invite-member-dialog-COhsBo3c.js} +1 -1
- package/dist/client/assets/{label-BtGdlmhk.js → label-ZYeR1Zgi.js} +1 -1
- package/dist/client/assets/{layout-D95FKywt.js → layout-BZNRmuiQ.js} +1 -1
- package/dist/client/assets/{login-zud_aQzP.js → login-DM2Sx9VK.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D4aGhRIx.js → mcp-oauth-1wFcqSXg.js} +1 -1
- package/dist/client/assets/members-HGQdD7oZ.js +1 -0
- package/dist/client/assets/{monaco-editor-Bq9EBE_u.js → monaco-editor-CfnP-PZQ.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DmVQG9w3.js → monitoring-stats-row-FEieeE07.js} +1 -1
- package/dist/client/assets/{multi-select-3t05WJXi.js → multi-select-CHumoKUU.js} +1 -1
- package/dist/client/assets/{oauth-callback-DdheS-J2.js → oauth-callback-BVIA4l-j.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DdfUZcx9.js → oauth-callback-ai-provider-hF2jSQfu.js} +1 -1
- package/dist/client/assets/{onboarding-BqdIolPn.js → onboarding-CqpP6t4u.js} +1 -1
- package/dist/client/assets/{org-install-CByiJjw4.js → org-install-snwR0Z1A.js} +1 -1
- package/dist/client/assets/{org-layout-DxOz3rME.js → org-layout-CPanXGjO.js} +1 -1
- package/dist/client/assets/{organization-choice-D1TpPmhr.js → organization-choice-CC5Ypqcv.js} +1 -1
- package/dist/client/assets/{orgs-CnUPKV1B.js → orgs-CgexNN1j.js} +1 -1
- package/dist/client/assets/{page-seo-form-ByR9Z__k.js → page-seo-form-BHu5rgfM.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BoZDUfHh.js +1 -0
- package/dist/client/assets/{popover-DuDwu8ZY.js → popover-B7sciFe_.js} +1 -1
- package/dist/client/assets/post-editor-Bpfe0b-9.js +1 -0
- package/dist/client/assets/{primitives-DIHB4xXI.js → primitives-BL3Xfwnn.js} +1 -1
- package/dist/client/assets/{profile-Blhh0cSR.js → profile-0s0admj0.js} +1 -1
- package/dist/client/assets/project-app-view-BYei90Jg.js +1 -0
- package/dist/client/assets/record-editor-D7xSjDi1.js +1 -0
- package/dist/client/assets/redirect-editor-kTDjL9Hv.js +1 -0
- package/dist/client/assets/registry-6gudiXxO.js +2 -0
- package/dist/client/assets/registry-layout-DjF5lv4n.js +27 -0
- package/dist/client/assets/{reports-Brd8qQ2b.js → reports-ByrA0cXI.js} +1 -1
- package/dist/client/assets/{require-capability-DXSues5j.js → require-capability-EioOfE-2.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DLhyslwf.js → required-auth-layout-pHt0OsLo.js} +1 -1
- package/dist/client/assets/{reset-password-CQOlKwx7.js → reset-password-B6Gpr9Kp.js} +1 -1
- package/dist/client/assets/roles-D6KlmsKQ.js +1 -0
- package/dist/client/assets/{search-input-CuP775da.js → search-input-vbWEGrI6.js} +1 -1
- package/dist/client/assets/secrets-6rzeG5FO.js +1 -0
- package/dist/client/assets/{sections-editor-TvxP5dFH.js → sections-editor-DQ1SXQ_8.js} +2 -2
- package/dist/client/assets/{select-CrSxwLpY.js → select-CzLxLtJh.js} +1 -1
- package/dist/client/assets/select-model-BNaFvry_.js +4 -0
- package/dist/client/assets/{self-tool-result-DPbzkBXp.js → self-tool-result-C4O6aZvM.js} +1 -1
- package/dist/client/assets/seo-editor-FgUtxr74.js +1 -0
- package/dist/client/assets/{settings-layout-DgOodmsx.js → settings-layout-DGMNN-Xz.js} +1 -1
- package/dist/client/assets/{settings-section-DpMc0HVT.js → settings-section-CCsiHGh0.js} +1 -1
- package/dist/client/assets/{shell-controls-9Iq5Z7Tb.js → shell-controls-DYfeNUt3.js} +1 -1
- package/dist/client/assets/{shell-layout-DQaGi35E.js → shell-layout-CCvA5kmY.js} +1 -1
- package/dist/client/assets/{sidebar-C5_XfNYh.js → sidebar-Bnisj3jU.js} +1 -1
- package/dist/client/assets/{skeleton-CFwDF8gK.js → skeleton-o2YDszzm.js} +1 -1
- package/dist/client/assets/sso-BZjdPxdz.js +1 -0
- package/dist/client/assets/store-WmvVplo5.js +1 -0
- package/dist/client/assets/store-registry-D6JFzLfK.js +2 -0
- package/dist/client/assets/{studio-tools-DT3M_Vdz.js → studio-tools-CU40YCgH.js} +1 -1
- package/dist/client/assets/{switch-BlPs3ERk.js → switch-Cp0ens4B.js} +1 -1
- package/dist/client/assets/{table-CjtfrukD.js → table-BcmEbJS2.js} +1 -1
- package/dist/client/assets/{tabs-Ca1nnDrk.js → tabs-BnbuyDOQ.js} +1 -1
- package/dist/client/assets/{textarea-BHzi6Dhm.js → textarea-BInhN2wa.js} +1 -1
- package/dist/client/assets/{toggle-group-a5DM2sSK.js → toggle-group-C8JF82Zm.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BAMgsY3V.js → toolbar-icon-button-DHVQqruZ.js} +1 -1
- package/dist/client/assets/{toolbar-BptqFiOS.js → toolbar-jQNk4aBF.js} +1 -1
- package/dist/client/assets/{tooltip-BI-udduQ.js → tooltip-CbqyhFNU.js} +1 -1
- package/dist/client/assets/{use-ai-providers-w9d34g0F.js → use-ai-providers-Ce-mBe80.js} +1 -1
- package/dist/client/assets/{use-automations-CqRQFXK6.js → use-automations-fHbcdoWF.js} +1 -1
- package/dist/client/assets/{use-autosave-k2g5KpMJ.js → use-autosave-PnEHmRFm.js} +1 -1
- package/dist/client/assets/{use-capability-DMFGKIH5.js → use-capability-7FhSHK1j.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DOOmIKzq.js → use-clock-tick-BSzPHVV9.js} +1 -1
- package/dist/client/assets/{use-collections-BakROzwv.js → use-collections-DymFqXTj.js} +1 -1
- package/dist/client/assets/{use-connection-BYUOXcTZ.js → use-connection-nHpSOixh.js} +1 -1
- package/dist/client/assets/{use-copy-X1Kg3Hp6.js → use-copy-CVRfmVcr.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-ScupYh0A.js → use-create-virtual-mcp-CYdsmSu7.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C2vhIJrv.js → use-debounced-autosave-DzZy5CMV.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BcV326dl.js → use-debounced-value-DDXj5yG7.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DGCPQWxL.js → use-deco-credits-qPcUG_H1.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DDc7EwGs.js → use-decopilot-events-CwfGNClb.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B_tvesBX.js → use-delete-connection-UW6-mwvP.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-NaQfMW3G.js → use-deployment-admin-BZhJT9d8.js} +1 -1
- package/dist/client/assets/{use-file-configs-dAie7zDN.js → use-file-configs-mo5v3z-L.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C_M049Oj.js → use-infinite-scroll-DKI6Jm_Z.js} +1 -1
- package/dist/client/assets/{use-join-requests-C982hQhS.js → use-join-requests-B8SSn-6X.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-ClCJfdlL.js → use-mcp-auth-status-BoxBiUjh.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BET4cVQ2.js → use-mcp-client-BDjzJl1W.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-z0J_EOSL.js → use-mcp-tools-D3DsU015.js} +1 -1
- package/dist/client/assets/{use-members-Dmwu4pSZ.js → use-members-BURpqXiY.js} +1 -1
- package/dist/client/assets/{use-mobile-BjsEeYVy.js → use-mobile-mEwfb7Wb.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C4BCBCv3.js → use-navigate-to-agent-Cs7YA5M3.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BZS4V2Lt.js → use-org-auth-client-CfFt4dzT.js} +1 -1
- package/dist/client/assets/{use-org-sso-DIQMNs43.js → use-org-sso-Cu8oZrtw.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C3RoqVvc.js → use-organization-roles-CwjU6Mn1.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C0IXRiP_.js → use-organization-settings-ClKWg8Ku.js} +1 -1
- package/dist/client/assets/{use-registry-app-COi_RGkf.js → use-registry-app-Bvi7D6KG.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BThC_Q4I.js → use-registry-connections-Z27WGDwm.js} +1 -1
- package/dist/client/assets/{use-secrets-C4jt5KwT.js → use-secrets-DH9dvdls.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D8lhFnWZ.js → use-status-sounds-B_cMuOqc.js} +1 -1
- package/dist/client/assets/use-t-CKsegaGu.js +1 -0
- package/dist/client/assets/{use-view-mode-B_UKRIZ6.js → use-view-mode-I-DdpMfg.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B1v9ZXLU.js → use-virtual-mcp-DfgOuy17.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DeEG7MZZ.js +1 -0
- package/dist/client/assets/{useRouterState-DUO8mZul.js → useRouterState-DQn2fBkZ.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BLlnoP7W.js +1 -0
- package/dist/client/assets/{users-N2quvYT2.js → users-Dmdb2Gdp.js} +1 -1
- package/dist/client/assets/{variant-calendar-CInZZr41.js → variant-calendar-ZVMFoRqO.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-52AzCdiS.js → view-mode-toggle-BEfnqPkj.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +175 -175
- package/dist/server/server.js +96 -96
- package/package.json +1 -1
- package/dist/client/assets/agent-icon-cR-VXBAA.js +0 -1
- package/dist/client/assets/ai-providers-Fm3Yt85-.js +0 -1
- package/dist/client/assets/app-editor-CwhqVCG1.js +0 -1
- package/dist/client/assets/automations-XfRoHwch.js +0 -1
- package/dist/client/assets/brand-context-DHR7TQrR.js +0 -1
- package/dist/client/assets/buckets-CmEZAuoA.js +0 -1
- package/dist/client/assets/category-editor-D7J7rN3F.js +0 -1
- package/dist/client/assets/domain-settings-B5aXl5-3.js +0 -1
- package/dist/client/assets/file-explorer-BUzI6LY3.js +0 -2
- package/dist/client/assets/general-CQPIeQa7.js +0 -1
- package/dist/client/assets/members-BG3nsJki.js +0 -1
- package/dist/client/assets/page-seo-sheet-DqhnQQyz.js +0 -1
- package/dist/client/assets/post-editor-DQXQRD8M.js +0 -1
- package/dist/client/assets/project-app-view-BM4iHZMp.js +0 -1
- package/dist/client/assets/record-editor-TBLNbsuJ.js +0 -1
- package/dist/client/assets/redirect-editor-C47yCFL3.js +0 -1
- package/dist/client/assets/registry-Br5lgFoU.js +0 -2
- package/dist/client/assets/registry-layout-BfglNjIQ.js +0 -27
- package/dist/client/assets/roles-CA9bRsRk.js +0 -1
- package/dist/client/assets/secrets-CxXZO-8x.js +0 -1
- package/dist/client/assets/select-model-CPc7lxVf.js +0 -4
- package/dist/client/assets/seo-editor-BDKx3e-e.js +0 -1
- package/dist/client/assets/sso-C-6YVyZZ.js +0 -1
- package/dist/client/assets/store-BUr1OKTO.js +0 -1
- package/dist/client/assets/store-registry-BURcb76O.js +0 -2
- package/dist/client/assets/use-t-CguyLWE3.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CErl8eUD.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CqYcpPIQ.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as V,I as N,ad as ae,af as le,ag as he,ae as xe,b3 as me,c as U,J as ge,M as be,r as M,j as s,ah as Ee,t as G,aL as ye,C as re,n as oe,d as J,K as Q,m as ve,l as ue,B as L,p as je,E as $e}from"./index-Dq2GzmIa.js";import{i as Fe}from"./AlertCircle-TjPHcEnP.js";import{P as te}from"./index-DoiBq52a.js";import{S as ne}from"./skeleton-CFwDF8gK.js";import{b as _e,a as ce,S as de,c as Re}from"./settings-section-DpMc0HVT.js";import{u as X,a as se,b as Se}from"./use-ai-providers-w9d34g0F.js";import{i as Me}from"./CheckCircle-wgdag1z7.js";import{n as Oe,o as Te,q as Ue,S as ze}from"./chat-context-BAovwxgU.js";import{e as qe,f as Le}from"./use-organization-settings-C0IXRiP_.js";import{M as Ve,b as ke,P as Qe,C as pe}from"./select-model-CPc7lxVf.js";import{u as Be}from"./use-debounced-autosave-C2vhIJrv.js";import{I as ie}from"./input-_HbUXqOS.js";import{T as fe,a as Ge}from"./toggle-group-a5DM2sSK.js";import{b as Ie,c as Ce,d as Ne,A as we,a as Pe,e as De,g as Ae,f as Ke}from"./alert-dialog-CRKyaNBx.js";import{u as W}from"./studio-tools-DT3M_Vdz.js";import{s as Ye}from"./Plus-CaVUuJOD.js";import{b as He}from"./Tool01-DTY-fPyM.js";import{s as We}from"./Trash01-D4xE6JK2.js";import{A as Je}from"./avatar-Cg58Qi4s.js";import{i as Xe}from"./Settings02-BNJ32xSl.js";import{s as Ze}from"./Eye-CeD9rgkI.js";import{c as et,D as tt,a as st,d as it,e as rt}from"./dialog-DT5S2RMB.js";import{f as ot}from"./formatDistanceToNow-Cb2QZZJn.js";import{R as lt}from"./require-capability-DXSues5j.js";import"./sidebar-C5_XfNYh.js";import"./LayoutLeft--D_GxkO2.js";import"./use-mobile-BjsEeYVy.js";import"./X-Dg7rsVai.js";import"./tooltip-BI-udduQ.js";import"./card-CPTg8fDY.js";import"./ArrowUpRight-BH4m-RJh.js";import"./autosend-TZVzvR_1.js";import"./hooks-CKtulQ0t.js";import"./use-mcp-client-BET4cVQ2.js";import"./auth-DgHUqP65.js";import"./decopilot-sse-pool-C_pTq61C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-B1v9ZXLU.js";import"./use-collections-BakROzwv.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-DDc7EwGs.js";import"./drawer-XzD4hvpg.js";import"./checkbox-BdHs-X49.js";import"./ChevronUp-BcAa4Ljr.js";import"./select-CrSxwLpY.js";import"./ChevronDown-C3MkOcZJ.js";import"./Key01-Dz6Z8ZMZ.js";import"./SearchMd-7xF40qNR.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-CbDoyDRV.js";import"./ChevronRight-D7I_d6Rs.js";import"./connect-desktop-dialog-CkUcaE26.js";import"./Copy01-ybfnME4F.js";import"./Image01-Cm0pa05N.js";import"./Stars01-DrN-Oz3U.js";import"./User01-B_wV9DLb.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-capability-DMFGKIH5.js";import"./access-gate-BPnO_2yT.js";import"./capability-load-error-96MaJwmz.js";V({title:N(),url:N(),icon:N()});V({registries:le(N(),V({enabled:he()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:ae(N()).describe("List of MCP app_name or app_id values to hide from the store.")});const H=V({keyId:N(),modelId:N(),title:N().optional()}).nullable();xe(["fast","smart","thinking","image","web_search","deep_research"]);xe(["fast","smart","thinking"]);const at=V({tiers:V({fast:H,smart:H,thinking:H,image:H,web_search:H,deep_research:H})});V({ids:ae(N()).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});V({id:N().describe("Brand context ID"),name:N().describe("Company name"),domain:N().describe("Company domain (e.g. example.com)"),overview:N().describe("Company overview / description"),logo:N().nullable().optional().describe("Logo URL"),favicon:N().nullable().optional().describe("Favicon URL"),ogImage:N().nullable().optional().describe("OG image URL"),fonts:V({heading:N().optional().describe("Font family for headings"),body:N().optional().describe("Font family for body text"),code:N().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:V({primary:N().optional().describe("Primary brand color (hex)"),secondary:N().optional().describe("Secondary brand color (hex)"),accent:N().optional().describe("Accent / highlight color (hex)"),background:N().optional().describe("Background color (hex)"),foreground:N().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:ae(le(N(),me())).nullable().optional().describe("Brand images"),metadata:le(N(),me()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:N().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:he().optional().describe("Whether this is the default brand for the organization")});const nt=e=>e.capabilities?.includes("image")===!0,ct=e=>Oe(e),dt=e=>Te(e),mt=[{key:"fast",label:"Fast",description:"Fastest responses, best for quick tasks",filter:void 0},{key:"smart",label:"Smart",description:"Balanced speed and capability",filter:void 0},{key:"thinking",label:"Thinking",description:"Most capable, best for complex tasks",filter:void 0},{key:"image",label:"Image",description:"Image generation",filter:nt},{key:"web_search",label:"Web search",description:"Quick, up-to-date answers from the web",filter:ct},{key:"deep_research",label:"Deep research",description:"In-depth, multi-source research reports",filter:dt}];function ut(e){const t=U.c(20),{slot:i,onSlotChange:a,filterModels:r,defaultKeyId:l}=e,o=X(),[x,S]=M.useState(i?.keyId??l);let b;t[0]!==i?(b=()=>{i?.keyId&&S(i.keyId)},t[0]=i,t[1]=b):b=t[1];const d=i?.keyId;let n;t[2]!==d?(n=[d],t[2]=d,t[3]=n):n=t[3],M.useEffect(b,n);const m=x??l;let c;t[4]!==m||t[5]!==o?(c=m?o.find(y=>y.id===m):null,t[4]=m,t[5]=o,t[6]=c):c=t[6];const u=c,{models:g,isLoading:j}=se(r?m??void 0:void 0),_=r?j||g.some(r):!0;let p;t[7]!==i||t[8]!==u?.providerId?(p=i?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:u?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[7]=i,t[8]=u?.providerId,t[9]=p):p=t[9];const k=p;if(r&&!_){let y;return t[10]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Not available with current provider"}),t[10]=y):y=t[10],y}let I;t[11]===Symbol.for("react.memo_cache_sentinel")?(I=y=>S(y),t[11]=I):I=t[11];let h;t[12]!==m||t[13]!==a?(h=y=>{const F=y.keyId??m??"";S(F),a({keyId:F,modelId:y.modelId,title:y.title})},t[12]=m,t[13]=a,t[14]=h):h=t[14];let f;return t[15]!==m||t[16]!==r||t[17]!==k||t[18]!==h?(f=s.jsx(Ve,{variant:"bordered",placeholder:"Pick model",model:k,credentialId:m,filterModels:r,onCredentialChange:I,onModelChange:h}),t[15]=m,t[16]=r,t[17]=k,t[18]=h,t[19]=f):f=t[19],f}function pt(e){const t=U.c(2),{isPending:i,showSaved:a}=e;if(i){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(ye,{size:12,className:"animate-spin"}),"Saving…"]}),t[0]=r):r=t[0],r}if(a){let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Me,{size:12}),"Saved"]}),t[1]=r):r=t[1],r}return null}function ft(){const e=U.c(42),t=X(),i=qe(),a=t.length>0;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=ge(at),e[0]=r):r=e[0];let l;e[1]!==i?(l={resolver:r,values:i,mode:"onChange"},e[1]=i,e[2]=l):l=e[2];const o=be(l),{mutate:x,isPending:S,isSuccess:b}=Le(),d=o.formState.isDirty;let n;e[3]!==o||e[4]!==i||e[5]!==x?(n={delayMs:250,save:async()=>{const v=o.getValues();x(v,{onSuccess:()=>o.reset(v,{keepValues:!0}),onError:P=>{o.reset(i),G.error(`Failed to save: ${P.message}`)}})}},e[3]=o,e[4]=i,e[5]=x,e[6]=n):n=e[6];const{schedule:m}=Be(n),c=t[0],u=t[1],g=t[2],{models:j}=se(c?.id),{models:_}=se(u?.id),{models:p}=se(g?.id);let k,I;e[7]!==o||e[8]!==a?(k=()=>{a||o.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}})},I=[a,o],e[7]=o,e[8]=a,e[9]=k,e[10]=I):(k=e[9],I=e[10]),M.useEffect(k,I);let h;e[11]!==t||e[12]!==o||e[13]!==c||e[14]!==u||e[15]!==g||e[16]!==j||e[17]!==_||e[18]!==p?(h=()=>{const v=o.getValues(),P=new Set(t.map(ht)),$={};c?.id&&($[c.id]=j),u?.id&&($[u.id]=_),g?.id&&($[g.id]=p);const w=Y=>Y!=null&&!P.has(Y.keyId),C={fast:w(v.tiers.fast)?null:v.tiers.fast,smart:w(v.tiers.smart)?null:v.tiers.smart,thinking:w(v.tiers.thinking)?null:v.tiers.thinking,image:w(v.tiers.image)?null:v.tiers.image,web_search:w(v.tiers.web_search)?null:v.tiers.web_search,deep_research:w(v.tiers.deep_research)?null:v.tiers.deep_research},B=!C.fast||!C.smart||!C.thinking||!C.image||!C.web_search||!C.deep_research,z=C.fast===v.tiers.fast&&C.smart===v.tiers.smart&&C.thinking===v.tiers.thinking&&C.image===v.tiers.image&&C.web_search===v.tiers.web_search&&C.deep_research===v.tiers.deep_research;if(!B&&z)return;const q=Ue(t,$);o.reset({tiers:{fast:C.fast??q.chat.fast,smart:C.smart??q.chat.smart,thinking:C.thinking??q.chat.thinking,image:C.image??q.image,web_search:C.web_search??q.webSearch,deep_research:C.deep_research??q.deepResearch}},{keepDirty:!0})},e[11]=t,e[12]=o,e[13]=c,e[14]=u,e[15]=g,e[16]=j,e[17]=_,e[18]=p,e[19]=h):h=e[19];const f=c?.id,y=u?.id,F=g?.id;let O;e[20]!==t||e[21]!==o||e[22]!==j||e[23]!==_||e[24]!==p||e[25]!==f||e[26]!==y||e[27]!==F?(O=[o,t,j,_,p,f,y,F],e[20]=t,e[21]=o,e[22]=j,e[23]=_,e[24]=p,e[25]=f,e[26]=y,e[27]=F,e[28]=O):O=e[28],M.useEffect(h,O);let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("p",{className:"text-sm text-muted-foreground",children:"These models power chat, automations, and tools across your organization."}),e[29]=T):T=e[29];const R=b&&!d;let D;e[30]!==S||e[31]!==R?(D=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[T,s.jsx(pt,{isPending:S,showSaved:R})]}),e[30]=S,e[31]=R,e[32]=D):D=e[32];let A;e[33]!==t[0]?.id||e[34]!==o.control||e[35]!==m?(A=mt.map(v=>s.jsx(Ee,{control:o.control,name:`tiers.${v.key}`,render:P=>{const{field:$}=P;return s.jsx(_e,{title:v.label,description:v.description,action:s.jsx(ut,{slot:$.value,defaultKeyId:t[0]?.id??null,filterModels:v.filter,onSlotChange:w=>{$.onChange(w),m()}})})}},v.key)),e[33]=t[0]?.id,e[34]=o.control,e[35]=m,e[36]=A):A=e[36];let K;e[37]!==A?(K=s.jsx(ce,{children:A}),e[37]=A,e[38]=K):K=e[38];let E;return e[39]!==D||e[40]!==K?(E=s.jsxs(de,{title:"Default models",headerClassName:"pl-0",children:[D,K]}),e[39]=D,e[40]=K,e[41]=E):E=e[41],E}function ht(e){return e.id}const xt={usd:[10,20,100],brl:[50,100,500]};function gt(){const e=U.c(26),t=W(),[i,a]=M.useState(!1),{mutate:r,isPending:l}=J({mutationFn:async h=>{const{url:f}=await t.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:h,currency:d});return f},onSuccess:yt,onError:bt}),[o,x]=M.useState(""),[S,b]=M.useState("usd"),d=S,n=parseFloat(o),m=!isNaN(n)&&n>=1,c=d==="brl"?"R$":"$";let u;e[0]!==b?(u=h=>{h&&b(h)},e[0]=b,e[1]=u):u=e[1];let g,j;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(fe,{value:"usd",className:"px-3.5 text-sm",children:"USD"}),j=s.jsx(fe,{value:"brl",className:"px-3.5 text-sm",children:"BRL"}),e[2]=g,e[3]=j):(g=e[2],j=e[3]);let _;e[4]!==d||e[5]!==u?(_=s.jsxs(Ge,{type:"single",variant:"outline",size:"default",value:d,onValueChange:u,children:[g,j]}),e[4]=d,e[5]=u,e[6]=_):_=e[6];let p;e[7]!==d||e[8]!==c||e[9]!==i||e[10]!==l||e[11]!==r?(p=!i&&s.jsxs(s.Fragment,{children:[xt[d].map(h=>s.jsxs(L,{variant:"outline",className:"h-10 px-4 text-sm font-medium tabular-nums",disabled:l,onClick:()=>r(h*100),children:[c,h]},h)),s.jsx(L,{variant:"ghost",className:"h-10 px-4 text-sm text-muted-foreground",onClick:()=>a(!0),disabled:l,children:"Custom"})]}),e[7]=d,e[8]=c,e[9]=i,e[10]=l,e[11]=r,e[12]=p):p=e[12];let k;e[13]!==c||e[14]!==o||e[15]!==n||e[16]!==i||e[17]!==m||e[18]!==l||e[19]!==x||e[20]!==r?(k=i&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:c}),s.jsx(ie,{type:"number",min:"1",step:"1",placeholder:"50",value:o,onChange:h=>x(h.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),s.jsx(L,{className:"h-10",disabled:!m||l,onClick:()=>r(Math.round(n*100)),children:l?"...":"Add"}),s.jsx(L,{variant:"ghost",className:"h-10 text-sm text-muted-foreground",onClick:()=>{a(!1),x("")},children:"Cancel"})]}),e[13]=c,e[14]=o,e[15]=n,e[16]=i,e[17]=m,e[18]=l,e[19]=x,e[20]=r,e[21]=k):k=e[21];let I;return e[22]!==_||e[23]!==p||e[24]!==k?(I=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_,p,k]})}),e[22]=_,e[23]=p,e[24]=k,e[25]=I):I=e[25],I}function bt(e){G.error(`Top-up failed: ${e.message}`)}function yt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function vt(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function jt(){const e=U.c(58),{org:t}=re(),i=W(),a=oe(),r=X();let l;e[0]!==r?(l=r.find(St),e[0]=r,e[1]=l):l=e[1];const o=l,[x,S]=M.useState(!1);let b;e[2]!==o||e[3]!==i?(b=async()=>{o&&await i.call("AI_PROVIDER_KEY_DELETE",{keyId:o.id})},e[2]=o,e[3]=i,e[4]=b):b=e[4];let d;e[5]!==t.id||e[6]!==a?(d=()=>{a.invalidateQueries({queryKey:Q.aiProviderKeys(t.id)}),a.invalidateQueries({queryKey:Q.aiProviders(t.id)}),G.success("Deco AI Gateway disconnected"),S(!1)},e[5]=t.id,e[6]=a,e[7]=d):d=e[7];let n;e[8]!==b||e[9]!==d?(n={mutationFn:b,onSuccess:d,onError:_t},e[8]=b,e[9]=d,e[10]=n):n=e[10];const{mutate:m,isPending:c}=J(n);let u;e[11]!==t.id?(u=Q.aiProviderCredits(t.id,"deco"),e[11]=t.id,e[12]=u):u=e[12];const g=!!o;let j;e[13]!==i?(j=async()=>{try{return await i.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},e[13]=i,e[14]=j):j=e[14];let _;e[15]!==u||e[16]!==g||e[17]!==j?(_={queryKey:u,enabled:g,staleTime:6e4,queryFn:j},e[15]=u,e[16]=g,e[17]=j,e[18]=_):_=e[18];const{data:p,isLoading:k,refetch:I,isFetching:h}=ve(_);if(!o)return null;const f=p?.balanceCents!=null?p.balanceCents/100:null;let y;e[19]!==f?(y=f!=null?`$${f.toFixed(2)}`:"—",e[19]=f,e[20]=y):y=e[20];const F=y;let O;e[21]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),s.jsx("div",{children:s.jsx("p",{className:"text-xs text-muted-foreground",children:"Access to 100+ models"})})]}),e[21]=O):O=e[21];let T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=()=>S(!0),e[22]=T):T=e[22];let R;e[23]!==c?(R=s.jsxs("div",{className:"flex items-center justify-between",children:[O,s.jsx(L,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:T,disabled:c,children:"Disconnect"})]}),e[23]=c,e[24]=R):R=e[24];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsxs(Ie,{children:[s.jsx(Ce,{children:"Disconnect Deco AI Gateway"}),s.jsx(Ne,{children:"This will remove the Deco AI Gateway from this workspace. Your credit balance is preserved and will be available if you reconnect."})]}),e[25]=D):D=e[25];let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(we,{children:"Cancel"}),e[26]=A):A=e[26];let K;e[27]!==m?(K=s.jsxs(Pe,{children:[D,s.jsxs(De,{children:[A,s.jsx(Ae,{onClick:()=>m(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Disconnect"})]})]}),e[27]=m,e[28]=K):K=e[28];let E;e[29]!==x||e[30]!==K?(E=s.jsx(Ke,{open:x,onOpenChange:S,children:K}),e[29]=x,e[30]=K,e[31]=E):E=e[31];let v;e[32]!==f||e[33]!==F||e[34]!==h||e[35]!==k?(v=k||h?s.jsx(ne,{className:"h-9 w-24"}):s.jsx("span",{className:ue("text-3xl font-semibold tabular-nums tracking-tight",f!=null&&vt(f)),children:F}),e[32]=f,e[33]=F,e[34]=h,e[35]=k,e[36]=v):v=e[36];let P;e[37]!==I?(P=()=>I(),e[37]=I,e[38]=P):P=e[38];const $=h&&"animate-spin";let w;e[39]!==$?(w=ue($),e[39]=$,e[40]=w):w=e[40];let C;e[41]!==w?(C=s.jsx(ye,{size:14,className:w}),e[41]=w,e[42]=C):C=e[42];let B;e[43]!==h||e[44]!==P||e[45]!==C?(B=s.jsx("button",{type:"button",onClick:P,disabled:h,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":"Refresh balance",children:C}),e[43]=h,e[44]=P,e[45]=C,e[46]=B):B=e[46];let z;e[47]!==v||e[48]!==B?(z=s.jsxs("div",{className:"flex items-baseline gap-2",children:[v,B]}),e[47]=v,e[48]=B,e[49]=z):z=e[49];let q;e[50]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Available credit balance"}),e[50]=q):q=e[50];let Y;e[51]!==z?(Y=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[z,q]}),e[51]=z,e[52]=Y):Y=e[52];let Z;e[53]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:"Add credits"}),s.jsx(gt,{})]}),e[53]=Z):Z=e[53];let ee;return e[54]!==R||e[55]!==E||e[56]!==Y?(ee=s.jsx(de,{title:"Deco AI Gateway",children:s.jsx(ce,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[R,E,Y,Z]})})}),e[54]=R,e[55]=E,e[56]=Y,e[57]=ee):ee=e[57],ee}function _t(e){G.error(`Failed to disconnect: ${e.message}`)}function St(e){return e.providerId==="deco"}function kt(){const e=U.c(8),{org:t}=re(),i=W(),a=oe();let r;e[0]!==i?(r=async()=>{await i.call("AI_PROVIDER_PROVISION_KEY",{providerId:"deco"})},e[0]=i,e[1]=r):r=e[1];let l;e[2]!==t||e[3]!==a?(l=()=>{je("ai_provider_provision_succeeded",{provider_id:"deco"}),a.invalidateQueries({queryKey:Q.aiProviderKeys(t.id)}),a.invalidateQueries({queryKey:Q.aiProviders(t.id)}),G.success("Deco AI Gateway connected successfully")},e[2]=t,e[3]=a,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o={mutationFn:r,onSuccess:l,onError:It},e[5]=r,e[6]=l,e[7]=o):o=e[7],J(o)}function It(e){je("ai_provider_provision_failed",{provider_id:"deco",error:e.message}),G.error(`Failed to connect Deco AI Gateway: ${e.message}`)}function Ct(){const e=U.c(10),{mutate:t,isPending:i}=kt();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=["radial-gradient(ellipse 50% 150% at -15% 50%, rgba(165,149,255,0.14) 0%, transparent 60%)","radial-gradient(ellipse 50% 150% at 115% 50%, rgba(208,236,26,0.11) 0%, transparent 60%)"],e[0]=a):a=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:a.join(", ")}}),e[1]=r):r=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-12 shrink-0 rounded-xl object-contain dark:bg-white dark:p-1"}),e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("p",{className:"text-base font-semibold",children:"Deco AI Gateway"}),s.jsx("span",{className:"rounded-full border border-border/60 bg-background/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Recommended"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"100+ models, one connection — pay as you go, no API keys to juggle."})]}),e[3]=o):o=e[3];let x;e[4]!==t?(x=()=>t(),e[4]=t,e[5]=x):x=e[5];const S=i?"Connecting…":"Connect Deco";let b;return e[6]!==i||e[7]!==x||e[8]!==S?(b=s.jsxs("div",{className:"relative rounded-xl border border-border overflow-hidden",children:[r,s.jsxs("div",{className:"relative flex items-center gap-5 px-6 py-5",children:[l,o,s.jsx(L,{variant:"outline",disabled:i,onClick:x,children:S})]})]}),e[6]=i,e[7]=x,e[8]=S,e[9]=b):b=e[9],b}const Nt=V({label:N().min(1,"Label is required").max(100),apiKey:N().optional(),baseUrl:N().optional()});function wt({providerKey:e,provider:t,preset:i,maskedKey:a,currentLabel:r,currentBaseUrl:l,onCancel:o,onSuccess:x}){const{org:S}=re(),b=W(),d=oe(),[n,m]=M.useState(!1),c=t.id==="openai-compatible",u=t.supportedMethods.includes("api-key"),{register:g,handleSubmit:j,watch:_,formState:{errors:p}}=be({resolver:ge(Nt),defaultValues:{label:r,apiKey:"",baseUrl:l??""}}),k=_("apiKey")??"",{mutate:I,isPending:h}=J({mutationFn:async f=>{let y;f.apiKey?c?y=JSON.stringify({baseUrl:f.baseUrl||l||"",apiKey:f.apiKey}):y=f.apiKey:c&&f.baseUrl&&f.baseUrl!==l&&(y=JSON.stringify({baseUrl:f.baseUrl,apiKey:""})),await b.call("AI_PROVIDER_KEY_UPDATE",{keyId:e.id,label:f.label,...y!==void 0?{apiKey:y}:{}})},onSuccess:()=>{d.invalidateQueries({queryKey:Q.aiProviderKeys(S.id)}),d.invalidateQueries({queryKey:Q.aiProviders(S.id)}),G.success("Provider updated"),x()},onError:f=>G.error(`Failed to update: ${f.message}`)});return s.jsxs("form",{onSubmit:j(f=>I(f)),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),s.jsx(ie,{placeholder:"e.g. Personal key",...g("label"),className:"h-8 text-sm"}),p.label&&s.jsx("p",{className:"text-xs text-destructive",children:p.label.message})]}),c&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Base URL"}),s.jsx(ie,{type:"url",placeholder:i?.baseUrlPlaceholder??"http://localhost:4000/v1",...g("baseUrl"),className:"h-8 text-sm"})]}),u&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["API key"," ",s.jsx("span",{className:"text-muted-foreground/60",children:"(leave blank to keep current)"})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ie,{type:n&&k?"text":"password",placeholder:a,...g("apiKey"),className:"ph-no-capture h-8 text-sm pr-8"}),k&&s.jsx("button",{type:"button",onClick:()=>m(!n),"aria-label":n?"Hide API key":"Show API key",className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:n?s.jsx(Xe,{size:14}):s.jsx(Ze,{size:14})})]})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(et,{children:[s.jsx(L,{type:"button",variant:"ghost",size:"sm",onClick:o,disabled:h,children:"Cancel"}),s.jsx(L,{type:"submit",size:"sm",disabled:h,children:h?"Saving...":"Save"})]})]})}function Pt(e){const t=U.c(28),{providerKey:i,provider:a,open:r,onOpenChange:l}=e,o=W();let x;t[0]!==a.id||t[1]!==i.presetId?(x=a.id==="openai-compatible"&&i.presetId?ke(i.presetId):void 0,t[0]=a.id,t[1]=i.presetId,t[2]=x):x=t[2];const S=x,b=S?.name??a.name;let d;t[3]!==i.id?(d=Q.aiProviderKeyPreview(i.id),t[3]=i.id,t[4]=d):d=t[4];let n;t[5]!==i.id||t[6]!==o?(n=()=>o.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),t[5]=i.id,t[6]=o,t[7]=n):n=t[7];let m;t[8]!==r||t[9]!==d||t[10]!==n?(m={queryKey:d,queryFn:n,enabled:r,staleTime:0},t[8]=r,t[9]=d,t[10]=n,t[11]=m):m=t[11];const{data:c,isLoading:u}=ve(m);let g;t[12]!==b?(g=s.jsx(tt,{children:s.jsxs(st,{children:["Edit ",b]})}),t[12]=b,t[13]=g):g=t[13];let j;t[14]!==u||t[15]!==l||t[16]!==S||t[17]!==c||t[18]!==a||t[19]!==i?(j=u||!c?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(ze,{})}):s.jsx(wt,{providerKey:i,provider:a,preset:S,maskedKey:c.maskedKey,currentLabel:c.label,currentBaseUrl:c.baseUrl,onCancel:()=>l(!1),onSuccess:()=>l(!1)}),t[14]=u,t[15]=l,t[16]=S,t[17]=c,t[18]=a,t[19]=i,t[20]=j):j=t[20];let _;t[21]!==g||t[22]!==j?(_=s.jsxs(it,{className:"sm:max-w-md",children:[g,j]}),t[21]=g,t[22]=j,t[23]=_):_=t[23];let p;return t[24]!==l||t[25]!==r||t[26]!==_?(p=s.jsx(rt,{open:r,onOpenChange:l,children:_}),t[24]=l,t[25]=r,t[26]=_,t[27]=p):p=t[27],p}function Dt(e){const t=U.c(48),{providerKey:i,provider:a}=e,{org:r}=re(),l=W(),o=oe(),[x,S]=M.useState(!1),[b,d]=M.useState(!1),n=a.id==="openai-compatible";let m;t[0]!==n||t[1]!==i.presetId?(m=n&&i.presetId?ke(i.presetId):void 0,t[0]=n,t[1]=i.presetId,t[2]=m):m=t[2];const c=m,u=c?c.name:n?"Custom OpenAI-compatible":a.name,g=c?.logo??a.logo;let j;e:{if(n){j=i.label;break e}const B=i.label;let z;t[3]!==i.createdAt?(z=ot(new Date(i.createdAt)),t[3]=i.createdAt,t[4]=z):z=t[4],j=`${B} · added ${z} ago`}const _=j;let p;t[5]!==i.id||t[6]!==l?(p=async()=>{await l.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},t[5]=i.id,t[6]=l,t[7]=p):p=t[7];let k;t[8]!==r||t[9]!==i.id||t[10]!==o?(k=()=>{o.invalidateQueries({queryKey:Q.aiProviderKeys(r.id)}),o.invalidateQueries({queryKey:Q.aiProviders(r.id)}),o.invalidateQueries({queryKey:Q.aiProviderModels(r.id,i.id)}),G.success("Key deleted"),S(!1)},t[8]=r,t[9]=i.id,t[10]=o,t[11]=k):k=t[11];let I;t[12]!==p||t[13]!==k?(I={mutationFn:p,onSuccess:k,onError:At},t[12]=p,t[13]=k,t[14]=I):I=t[14];const{mutate:h,isPending:f}=J(I);let y;t[15]!==u||t[16]!==g?(y=g?s.jsx("img",{src:g,alt:u,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(Je,{fallback:u.charAt(0),className:"size-8 bg-primary/10 text-primary"}),t[15]=u,t[16]=g,t[17]=y):y=t[17];let F;t[18]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(L,{variant:"ghost",size:"icon","aria-label":"Edit provider key",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:()=>d(!0),children:s.jsx(He,{size:14})}),t[18]=F):F=t[18];let O,T;t[19]===Symbol.for("react.memo_cache_sentinel")?(O=()=>S(!0),T=s.jsx(We,{size:14}),t[19]=O,t[20]=T):(O=t[19],T=t[20]);let R;t[21]!==f?(R=s.jsxs("div",{className:"flex items-center gap-0.5",children:[F,s.jsx(L,{variant:"ghost",size:"icon","aria-label":"Delete provider key",className:"h-7 w-7 text-muted-foreground hover:text-destructive",disabled:f,onClick:O,children:T})]}),t[21]=f,t[22]=R):R=t[22];let D;t[23]!==_||t[24]!==u||t[25]!==R||t[26]!==y?(D=s.jsx(_e,{icon:y,title:u,description:_,action:R}),t[23]=_,t[24]=u,t[25]=R,t[26]=y,t[27]=D):D=t[27];let A;t[28]!==b||t[29]!==a||t[30]!==i?(A=s.jsx(Pt,{providerKey:i,provider:a,open:b,onOpenChange:d}),t[28]=b,t[29]=a,t[30]=i,t[31]=A):A=t[31];let K;t[32]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Ce,{children:"Delete API key"}),t[32]=K):K=t[32];let E;t[33]!==i.label?(E=s.jsxs(Ie,{children:[K,s.jsxs(Ne,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]})]}),t[33]=i.label,t[34]=E):E=t[34];let v;t[35]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(we,{children:"Cancel"}),t[35]=v):v=t[35];let P;t[36]!==h?(P=s.jsxs(De,{children:[v,s.jsx(Ae,{onClick:()=>h(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[36]=h,t[37]=P):P=t[37];let $;t[38]!==E||t[39]!==P?($=s.jsxs(Pe,{children:[E,P]}),t[38]=E,t[39]=P,t[40]=$):$=t[40];let w;t[41]!==x||t[42]!==$?(w=s.jsx(Ke,{open:x,onOpenChange:S,children:$}),t[41]=x,t[42]=$,t[43]=w):w=t[43];let C;return t[44]!==D||t[45]!==A||t[46]!==w?(C=s.jsxs(s.Fragment,{children:[D,A,w]}),t[44]=D,t[45]=A,t[46]=w,t[47]=C):C=t[47],C}function At(e){return G.error(`Failed to delete key: ${e.message}`)}function Kt(e){const t=U.c(11),{onConnectClick:i}=e,a=X(),r=Se();let l;t[0]!==r?.providers?(l=r?.providers??[],t[0]=r?.providers,t[1]=l):l=t[1];const o=l;let x;if(t[2]!==a||t[3]!==i||t[4]!==o){let S;t[6]!==o?(S=m=>({key:m,provider:o.find(c=>c.id===m.providerId)}),t[6]=o,t[7]=S):S=t[7];const b=a.filter(Ft).map(S).filter($t);let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ye,{size:14}),t[8]=d):d=t[8];let n;t[9]!==i?(n=s.jsxs(L,{size:"sm",onClick:i,children:[d,"Connect provider"]}),t[9]=i,t[10]=n):n=t[10],x=s.jsx(de,{title:"Connected providers",headerClassName:"px-0",actions:n,children:b.length===0?s.jsx("p",{className:"text-sm text-muted-foreground px-1",children:"Bring your own keys to use specific models alongside Deco's gateway."}):s.jsx(ce,{children:b.map(Et)})}),t[2]=a,t[3]=i,t[4]=o,t[5]=x}else x=t[5];return x}function Et(e){const{key:t,provider:i}=e;return s.jsx(Dt,{providerKey:t,provider:i},t.id)}function $t(e){return e.provider!==void 0}function Ft(e){return e.providerId!=="deco"}function Rt(e){const t=U.c(3),{error:i}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Fe,{size:16}),t[0]=a):a=t[0];let r;return t[1]!==i.message?(r=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[a,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",i.message]})]}),t[1]=i.message,t[2]=r):r=t[2],r}function Mt(){const e=U.c(23),t=X();let i;e[0]!==t?(i=t.some(Ot),e[0]=t,e[1]=i):i=e[1];const a=i,r=t.length>0,[l,o]=M.useState(!1),[x,S]=M.useState(null),b=Se();let d;e[2]!==b?.providers?(d=b?.providers??[],e[2]=b?.providers,e[3]=d):d=e[3];const n=d;if(!r){let _;e[4]===Symbol.for("react.memo_cache_sentinel")?(_=()=>o(!0),e[4]=_):_=e[4];let p;e[5]!==n?(p=s.jsx(Qe,{providers:n,onSelect:S,onShowAll:_}),e[5]=n,e[6]=p):p=e[6];const k=x!==null||l;let I;e[7]===Symbol.for("react.memo_cache_sentinel")?(I=F=>{F||(S(null),o(!1))},e[7]=I):I=e[7];const h=x??void 0;let f;e[8]!==k||e[9]!==h?(f=s.jsx(pe,{open:k,onOpenChange:I,initialProvider:h}),e[8]=k,e[9]=h,e[10]=f):f=e[10];let y;return e[11]!==p||e[12]!==f?(y=s.jsxs(s.Fragment,{children:[p,f]}),e[11]=p,e[12]=f,e[13]=y):y=e[13],y}let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(M.Suspense,{fallback:s.jsx(ne,{className:"h-16 w-full"}),children:s.jsx(ft,{})}),e[14]=m):m=e[14];let c;e[15]!==a?(c=a?s.jsx(jt,{}):s.jsx(Ct,{}),e[15]=a,e[16]=c):c=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Kt,{onConnectClick:()=>o(!0)}),e[17]=u):u=e[17];let g;e[18]!==l?(g=s.jsx(pe,{open:l,onOpenChange:o}),e[18]=l,e[19]=g):g=e[19];let j;return e[20]!==c||e[21]!==g?(j=s.jsxs(s.Fragment,{children:[m,c,u,g]}),e[20]=c,e[21]=g,e[22]=j):j=e[22],j}function Ot(e){return e.providerId==="deco"}function Tt(){const e=U.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(te.Title,{children:"AI Providers"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(te,{children:s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs(Re,{children:[t,s.jsx($e,{fallback:Ut,children:s.jsx(M.Suspense,{fallback:s.jsx(ne,{className:"h-64 w-full"}),children:s.jsx(Mt,{})})})]})})})}),e[1]=i):i=e[1],i}function Ut(e){const{error:t}=e;return s.jsx(Rt,{error:t??new Error("Failed to load AI providers")})}function Hs(){const e=U.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(lt,{capability:"ai-providers:manage",area:"AI providers",children:s.jsx(Tt,{})}),e[0]=t):t=e[0],t}export{Hs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as gt,r as w,j as o,l as yt,t as ut,i as St}from"./index-Dq2GzmIa.js";import{i as jt}from"./ChevronRight-D7I_d6Rs.js";import{m as kt}from"./automation-runs-IA98DU4N.js";import{A as _t}from"./add-section-modal-Pogj97RR.js";import{n as Bt,h as wt,j as At,e as Nt,k as Rt,l as Ct,m as Et,o as Kt,S as Tt}from"./index-DpAoOgpk.js";import"./select-CrSxwLpY.js";import"./tooltip-BI-udduQ.js";import"./ChevronUp-BcAa4Ljr.js";import"./ChevronDown-C3MkOcZJ.js";import"./useInfiniteQuery-CErl8eUD.js";import"./use-infinite-scroll-C_M049Oj.js";import"./use-connection-BYUOXcTZ.js";import"./use-collections-BakROzwv.js";import"./use-mcp-client-BET4cVQ2.js";import"./auth-DgHUqP65.js";import"./use-virtual-mcp-B1v9ZXLU.js";import"./card-CPTg8fDY.js";import"./sidebar-C5_XfNYh.js";import"./LayoutLeft--D_GxkO2.js";import"./use-mobile-BjsEeYVy.js";import"./X-Dg7rsVai.js";import"./table-CjtfrukD.js";import"./empty-state-D9Dn1Lnz.js";import"./use-members-Dmwu4pSZ.js";import"./use-org-auth-client-BZS4V2Lt.js";import"./use-clock-tick-DOOmIKzq.js";import"./AlertCircle-TjPHcEnP.js";import"./CheckCircle-wgdag1z7.js";import"./DotsVertical-BkJg419g.js";import"./agent-icon-cR-VXBAA.js";import"./Tool01-DTY-fPyM.js";import"./ArrowUp-D620niSP.js";import"./Settings02-BNJ32xSl.js";import"./Tool02-C5wUTAFe.js";import"./XCircle-Di7Lb4ZU.js";import"./ArrowUpRight-BH4m-RJh.js";import"./TrendUp01--_jCdLU4.js";import"./ZapSquare-CqcwFWlA.js";import"./ZoomOut-C_Zu7-Q5.js";import"./Users03-Bk7hrtUP.js";import"./Stars02-7EGkcn1l.js";import"./Copy01-ybfnME4F.js";import"./Globe01-e5qIDEbr.js";import"./Eye-CeD9rgkI.js";import"./FilterLines-DTDvdHSv.js";import"./Star01-5GqPaTBh.js";import"./Globe04-Bxmic94-.js";import"./SwitchHorizontal01-CWRzX-Fm.js";import"./HardDrive-Bo4OGyrd.js";import"./Image01-Cm0pa05N.js";import"./Key01-Dz6Z8ZMZ.js";import"./LinkExternal01-eA6vVQM3.js";import"./Monitor01-CbDoyDRV.js";import"./Sun-C4Fwh1Vu.js";import"./Package-BRrJc9sL.js";import"./Palette-D12yKiV2.js";import"./Play-CQU4qZuG.js";import"./Plus-CaVUuJOD.js";import"./SearchLg-CIPUU7M2.js";import"./SearchMd-7xF40qNR.js";import"./Shield01-CfES6vR4.js";import"./Stars01-DrN-Oz3U.js";import"./Trash01-D4xE6JK2.js";import"./Upload01-Baccrojk.js";import"./User01-B_wV9DLb.js";import"./Users01--ZODDl59.js";import"./XClose-BWc8duIO.js";import"./Zap-BS9GJrhH.js";import"./use-automations-CqRQFXK6.js";import"./studio-tools-DT3M_Vdz.js";import"./useSuspenseInfiniteQuery-CqYcpPIQ.js";import"./avatar-Cg58Qi4s.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-X1Kg3Hp6.js";import"./file-type-icon-XKnElsdT.js";import"./dialog-DT5S2RMB.js";import"./tab-id-BijBBRwE.js";import"./hooks-CKtulQ0t.js";import"./decopilot-sse-pool-C_pTq61C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-BAovwxgU.js";import"./autosend-TZVzvR_1.js";import"./use-ai-providers-w9d34g0F.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-DDc7EwGs.js";import"./use-organization-settings-C0IXRiP_.js";import"./monaco-editor-Bq9EBE_u.js";import"./index-D1cQ6lKh.js";import"./index-DyWjSb5y.js";import"./calendar-DxMjhXOp.js";import"./shell-layout-DQaGi35E.js";import"./required-auth-layout-DLhyslwf.js";import"./use-org-sso-DIQMNs43.js";import"./integration-icon-CGshMm4e.js";import"./use-navigate-to-agent-C4BCBCv3.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-Cn-bvgNR.js";import"./form-CFqk5lJy.js";import"./label-BtGdlmhk.js";import"./input-_HbUXqOS.js";import"./drawer-XzD4hvpg.js";import"./collection-search-Btrf8Diq.js";import"./index-B0JPF-6M.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-COi_RGkf.js";import"./use-mcp-tools-z0J_EOSL.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-ClWKGwOW.js";import"./mcp-oauth-D4aGhRIx.js";import"./extract-connection-data-nMVGabj3.js";import"./dropdown-menu-EMizUbgW.js";import"./popover-DuDwu8ZY.js";import"./command-0HaDsh2Q.js";import"./index-BojbkbvA.js";import"./companions-core-DJ2SKsFs.js";import"./tabs-Ca1nnDrk.js";import"./toggle-group-a5DM2sSK.js";import"./use-deco-credits-DGCPQWxL.js";import"./connection-card-DwBQfP1R.js";import"./use-registry-connections-BThC_Q4I.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BHzi6Dhm.js";import"./connection-form-helpers-7cL_OUk8.js";import"./collection-tabs-kwELhDMx.js";import"./badge-D2XsHW2Y.js";import"./connect-desktop-dialog-CkUcaE26.js";import"./select-model-CPc7lxVf.js";import"./checkbox-BdHs-X49.js";import"./skeleton-CFwDF8gK.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DpMc0HVT.js";import"./index-MzuqcCtH.js";import"./alert-dialog-CRKyaNBx.js";import"./toolbar-BptqFiOS.js";import"./use-debounced-value-BcV326dl.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D8lhFnWZ.js";import"./use-capability-DMFGKIH5.js";import"./toolbar-icon-button-BAMgsY3V.js";import"./use-debounced-autosave-C2vhIJrv.js";import"./index-DoiBq52a.js";import"./search-input-CuP775da.js";import"./use-mcp-auth-status-ClCJfdlL.js";import"./switch-BlPs3ERk.js";import"./github-repo-picker-DpzVLTnS.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-C4jt5KwT.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-dAie7zDN.js";import"./automation-list-row-aKON7NTD.js";function $t(l,t){const s=(l.title||l.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),f=/^[A-Za-z]/.test(s)&&s.length>0?s:"Section",n=Bt(t,f);return{blockKey:n,data:{__resolveType:l.resolveType,name:n}}}function Rr(l){const t=gt.c(77),{orgSlug:s,virtualMcpId:f,branch:n,blockKey:i,block:a,meta:m,decofile:c,title:D,excludeFields:H,schemaPending:nt,previewBaseUrl:at}=l,G=nt===void 0?!1:nt,u=at===void 0?null:at,x=typeof a?.__resolveType=="string"?a.__resolveType:"";let R;t[0]!==H||t[1]!==m||t[2]!==x?(R=wt(x,m,H),t[0]=H,t[1]=m,t[2]=x,t[3]=R):R=t[3];const h=R;let C;t[4]!==h?(C=!!h&&Object.keys(h.properties??{}).length>0,t[4]=h,t[5]=C):C=t[5];const J=C;let E;t[6]!==a||t[7]!==i||t[8]!==m||t[9]!==D?(E=D??(a?At(i,a,m):i),t[6]=a,t[7]=i,t[8]=m,t[9]=D,t[10]=E):E=t[10];const v=E;let K;t[11]!==n||t[12]!==s||t[13]!==f?(K={orgSlug:s,virtualMcpId:f,branch:n},t[11]=n,t[12]=s,t[13]=f,t[14]=K):K=t[14];const{save:b,flush:Q,isPending:W}=Nt(K);let T;t[15]!==n||t[16]!==s||t[17]!==f?(T={orgSlug:s,virtualMcpId:f,branch:n},t[15]=n,t[16]=s,t[17]=f,t[18]=T):T=t[18];const X=Rt(T);let $;t[19]!==b?($=Et((e,r)=>b(e,r)),t[19]=b,t[20]=$):$=t[20];const Y=$,[ht,xt]=w.useState(i),[tt,ct]=w.useState(null),[et,dt]=w.useState(0);let F;t[21]===Symbol.for("react.memo_cache_sentinel")?(F=[],t[21]=F):F=t[21];const[p,ft]=w.useState(F),[ot,rt]=w.useState(!1),P=w.useRef(null);ht!==i&&(xt(i),ct(null),dt(Pt),ft([]));let O;t[22]!==a?(O=a??{},t[22]=a,t[23]=O):O=t[23];const it=O;let g;t[24]!==tt?(g=tt??{},t[24]=tt,t[25]=g):g=t[25];let z;t[26]!==it||t[27]!==g?(z={...it,...g},t[26]=it,t[27]=g,t[28]=z):z=t[28];const mt=z;let L;t[29]!==i||t[30]!==x||t[31]!==b?(L=e=>{const r=e;ct(r),b(i,{...r,__resolveType:x})},t[29]=i,t[30]=x,t[31]=b,t[32]=L):L=t[32];const st=L;let V;t[33]===Symbol.for("react.memo_cache_sentinel")?(V=e=>{ft(e)},t[33]=V):V=t[33];const pt=V;let q;t[34]!==c||t[35]!==Q||t[36]!==X?(q=async(e,r)=>{try{const{blockKey:d,data:N}=$t(e,c);await X.mutateAsync({blockKey:d,data:N}),ut.success(`Created section "${d}"`),r({__resolveType:d}),Q()}catch(d){const N=d,bt=N instanceof Error?N.message:"Could not add section";throw ut.error(bt),N}},t[34]=c,t[35]=Q,t[36]=X,t[37]=q):q=t[37];const y=q;let I;t[38]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{P.current=e.append,rt(!0)},t[38]=I):I=t[38];const vt=I;let U;t[39]!==y?(U=async e=>{const r=P.current;if(r)try{await y(e,d=>{r(d),rt(!1),P.current=null})}catch{}},t[39]=y,t[40]=U):U=t[40];const lt=U;let M;t[41]!==p||t[42]!==v?(M=p.length>0?[v,...p]:[],t[41]=p,t[42]=v,t[43]=M):M=t[43];const A=M;let S;t[44]!==p||t[45]!==A||t[46]!==v?(S=A.length>0?o.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:A.map((e,r)=>{const d=r===A.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(jt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{pt(r===0?[]:Ct(p,r)),dt(Ft)},title:e,className:yt("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",d?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:e})]},`${e}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:v}),t[44]=p,t[45]=A,t[46]=v,t[47]=S):S=t[47];let j;t[48]!==W?(j=o.jsx(Kt,{isPending:W,isError:!1}),t[48]=W,t[49]=j):j=t[49];let k;t[50]!==S||t[51]!==j?(k=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[S,j]}),t[50]=S,t[51]=j,t[52]=k):k=t[52];let _;t[53]!==i||t[54]!==p||t[55]!==c||t[56]!==mt||t[57]!==et||t[58]!==y||t[59]!==st||t[60]!==J||t[61]!==m||t[62]!==u||t[63]!==Y||t[64]!==h||t[65]!==G?(_=o.jsx(kt,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:J?o.jsx(Tt,{schema:h,value:mt,onChange:st,basePath:"",breadcrumbPath:p,onBreadcrumbChange:pt,decofile:c,meta:m,onSaveReferencedBlock:Y,previewBaseUrl:u,onAddSectionItem:y,onRequestAddSection:vt},`${i}:${et}`):G?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(St,{size:16,className:"animate-spin"}),"Loading app schema…"]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No editable schema found for this app."})})})}),t[53]=i,t[54]=p,t[55]=c,t[56]=mt,t[57]=et,t[58]=y,t[59]=st,t[60]=J,t[61]=m,t[62]=u,t[63]=Y,t[64]=h,t[65]=G,t[66]=_):_=t[66];let B;t[67]!==ot||t[68]!==c||t[69]!==lt||t[70]!==m||t[71]!==u?(B=u&&o.jsx(_t,{open:ot,onOpenChange:e=>{rt(e),e||(P.current=null)},meta:m,decofile:c,previewBaseUrl:u,onSelect:e=>{lt(e)}}),t[67]=ot,t[68]=c,t[69]=lt,t[70]=m,t[71]=u,t[72]=B):B=t[72];let Z;return t[73]!==k||t[74]!==_||t[75]!==B?(Z=o.jsxs("div",{className:"flex h-full flex-col",children:[k,_,B]}),t[73]=k,t[74]=_,t[75]=B,t[76]=Z):Z=t[76],Z}function Ft(l){return l+1}function Pt(l){return l+1}export{Rr as AppEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as o,C as L,b as T,r as $,B as M,p as N}from"./index-Dq2GzmIa.js";import{s as q}from"./Plus-CaVUuJOD.js";import{i as S}from"./Zap-BS9GJrhH.js";import{S as D}from"./search-input-CuP775da.js";import{P as l}from"./index-DoiBq52a.js";import{E as b}from"./empty-state-D9Dn1Lnz.js";import{c as O}from"./use-automations-CqRQFXK6.js";import{c as V}from"./use-navigate-to-agent-C4BCBCv3.js";import{A as F}from"./automation-list-row-aKON7NTD.js";import{q as G}from"./use-mcp-client-BET4cVQ2.js";import{u as H}from"./use-virtual-mcp-B1v9ZXLU.js";import{R as J}from"./require-capability-DXSues5j.js";import"./SearchMd-7xF40qNR.js";import"./sidebar-C5_XfNYh.js";import"./LayoutLeft--D_GxkO2.js";import"./use-mobile-BjsEeYVy.js";import"./X-Dg7rsVai.js";import"./tooltip-BI-udduQ.js";import"./studio-tools-DT3M_Vdz.js";import"./hooks-CKtulQ0t.js";import"./decopilot-sse-pool-C_pTq61C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-CRKyaNBx.js";import"./dropdown-menu-EMizUbgW.js";import"./ChevronUp-BcAa4Ljr.js";import"./ChevronRight-D7I_d6Rs.js";import"./DotsVertical-BkJg419g.js";import"./Stars02-7EGkcn1l.js";import"./Trash01-D4xE6JK2.js";import"./agent-icon-cR-VXBAA.js";import"./AlertCircle-TjPHcEnP.js";import"./Tool01-DTY-fPyM.js";import"./ArrowUp-D620niSP.js";import"./Settings02-BNJ32xSl.js";import"./Tool02-C5wUTAFe.js";import"./XCircle-Di7Lb4ZU.js";import"./ArrowUpRight-BH4m-RJh.js";import"./TrendUp01--_jCdLU4.js";import"./ZapSquare-CqcwFWlA.js";import"./ZoomOut-C_Zu7-Q5.js";import"./Users03-Bk7hrtUP.js";import"./CheckCircle-wgdag1z7.js";import"./ChevronDown-C3MkOcZJ.js";import"./Copy01-ybfnME4F.js";import"./Globe01-e5qIDEbr.js";import"./Eye-CeD9rgkI.js";import"./FilterLines-DTDvdHSv.js";import"./Star01-5GqPaTBh.js";import"./Globe04-Bxmic94-.js";import"./SwitchHorizontal01-CWRzX-Fm.js";import"./HardDrive-Bo4OGyrd.js";import"./Image01-Cm0pa05N.js";import"./Key01-Dz6Z8ZMZ.js";import"./LinkExternal01-eA6vVQM3.js";import"./Monitor01-CbDoyDRV.js";import"./Sun-C4Fwh1Vu.js";import"./Package-BRrJc9sL.js";import"./Palette-D12yKiV2.js";import"./Play-CQU4qZuG.js";import"./SearchLg-CIPUU7M2.js";import"./Shield01-CfES6vR4.js";import"./Stars01-DrN-Oz3U.js";import"./Upload01-Baccrojk.js";import"./User01-B_wV9DLb.js";import"./Users01--ZODDl59.js";import"./XClose-BWc8duIO.js";import"./auth-DgHUqP65.js";import"./use-collections-BakROzwv.js";import"./use-capability-DMFGKIH5.js";import"./access-gate-BPnO_2yT.js";import"./capability-load-error-96MaJwmz.js";function K(){const t=B.c(16),{org:i}=L(),{data:w}=O(void 0),u=w===void 0?[]:w,R=H(),k=V(),d=T(),[f,E]=$.useState(""),g=f.toLowerCase(),y=new Map(R.map(Q)),C=u.filter(e=>{if(!g||e.name.toLowerCase().includes(g))return!0;if(e.virtual_mcp_id){const a=y.get(e.virtual_mcp_id);if(a&&a.title.toLowerCase().includes(g))return!0}return!1}),P=(e,a)=>{const A=a&&y.has(a)?a:G(i.id);N("automations_list_row_clicked",{automation_id:e,agent_id:A,source:"settings_automations"}),k(A,{search:{main:"automation:"+e}})};let n;t[0]!==d||t[1]!==i.slug?(n=()=>{N("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:i.slug}})},t[0]=d,t[1]=i.slug,t[2]=n):n=t[2];const z=n,x=l,h=l,j=l;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(l.Title,{children:"Automations"}),t[3]=p):p=t[3];const _=u.length>0&&o.jsx(D,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let r;t[4]!==_?(r=o.jsxs("div",{className:"flex flex-col gap-6",children:[p,_]}),t[4]=_,t[5]=r):r=t[5];const v=u.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:o.jsxs(M,{size:"sm",onClick:z,children:[o.jsx(q,{size:14}),"Browse agents"]})})}):C.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:C.map(e=>o.jsx(F,{automation:e,showAgent:!0,onClick:()=>P(e.id,e.virtual_mcp_id)},e.id))});let s;t[6]!==j.Body||t[7]!==r||t[8]!==v?(s=o.jsxs(j.Body,{children:[r,v]}),t[6]=j.Body,t[7]=r,t[8]=v,t[9]=s):s=t[9];let m;t[10]!==h.Content||t[11]!==s?(m=o.jsx(h.Content,{children:s}),t[10]=h.Content,t[11]=s,t[12]=m):m=t[12];let c;return t[13]!==x||t[14]!==m?(c=o.jsx(x,{children:m}),t[13]=x,t[14]=m,t[15]=c):c=t[15],c}function Q(t){return[t.id,t]}function fo(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(J,{capability:"automations:manage",area:"automations",children:o.jsx(K,{})}),t[0]=i):i=t[0],i}export{fo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as K,r as Ae,j as n,B as Te,ah as fe,l as _e,am as ze,C as Ie,n as Le,K as Oe,m as Ke,d as ge,p as H,t as L,M as Ue}from"./index-Dq2GzmIa.js";import{t as Xe}from"./ChevronDown-C3MkOcZJ.js";import{i as He}from"./ChevronRight-D7I_d6Rs.js";import{s as Re}from"./Plus-CaVUuJOD.js";import{s as qe,t as Me}from"./Star01-5GqPaTBh.js";import{s as Ve}from"./Trash01-D4xE6JK2.js";import{c as Qe,b as Ge,d as Ye,A as Je,g as We,e as Ze,a as et,f as tt}from"./alert-dialog-CRKyaNBx.js";import{P as Ne}from"./index-DoiBq52a.js";import{u as $e}from"./studio-tools-DT3M_Vdz.js";import{u as st}from"./use-debounced-autosave-C2vhIJrv.js";import{n as nt}from"./LinkExternal01-eA6vVQM3.js";import{i as lt}from"./Zap-BS9GJrhH.js";import{I as ue}from"./input-_HbUXqOS.js";import{T as ot}from"./textarea-BHzi6Dhm.js";import{R as rt}from"./require-capability-DXSues5j.js";import"./sidebar-C5_XfNYh.js";import"./LayoutLeft--D_GxkO2.js";import"./use-mobile-BjsEeYVy.js";import"./X-Dg7rsVai.js";import"./tooltip-BI-udduQ.js";import"./use-capability-DMFGKIH5.js";import"./access-gate-BPnO_2yT.js";import"./capability-load-error-96MaJwmz.js";function we(t){const e=K.c(8),{title:s,children:o,className:l}=t;let r;e[0]!==l?(r=_e("rounded-2xl border border-border/60 bg-background p-5",l),e[0]=l,e[1]=r):r=e[1];let c;e[2]!==s?(c=n.jsx("div",{className:"mb-4",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s})}),e[2]=s,e[3]=c):c=e[3];let f;return e[4]!==o||e[5]!==r||e[6]!==c?(f=n.jsxs("div",{className:r,children:[c,o]}),e[4]=o,e[5]=r,e[6]=c,e[7]=f):f=e[7],f}function at(t){const e=K.c(25),{onExtract:s,isExtracting:o}=t,[l,r]=Ae.useState("");let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(lt,{size:18,className:"text-primary"})}),e[0]=c):c=e[0];let f,g;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),g=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=f,e[2]=g):(f=e[1],g=e[2]);let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=m=>r(m.target.value),e[3]=b):b=e[3];let p;e[4]!==l||e[5]!==o||e[6]!==s?(p=m=>{m.key==="Enter"&&l.trim()&&!o&&s(l.trim())},e[4]=l,e[5]=o,e[6]=s,e[7]=p):p=e[7];let d;e[8]!==l||e[9]!==p?(d=n.jsx(ue,{placeholder:"acme.com",value:l,onChange:b,className:"max-w-xs",onKeyDown:p}),e[8]=l,e[9]=p,e[10]=d):d=e[10];let a;e[11]!==l||e[12]!==o?(a=!l.trim()||o,e[11]=l,e[12]=o,e[13]=a):a=e[13];let i;e[14]!==l||e[15]!==s?(i=()=>s(l.trim()),e[14]=l,e[15]=s,e[16]=i):i=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(qe,{size:14}),e[17]=u):u=e[17];const h=o?"Extracting...":"Extract";let x;e[18]!==h||e[19]!==a||e[20]!==i?(x=n.jsxs(Te,{variant:"outline",disabled:a,onClick:i,children:[u,h]}),e[18]=h,e[19]=a,e[20]=i,e[21]=x):x=e[21];let v;return e[22]!==x||e[23]!==d?(v=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[c,n.jsxs("div",{className:"flex-1",children:[f,g,n.jsxs("div",{className:"mt-3 flex gap-2",children:[d,x]})]})]})}),e[22]=x,e[23]=d,e[24]=v):v=e[24],v}function it(t){const e=K.c(36),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s?(r=s.watch("domain"),e[0]=s,e[1]=r):r=e[1];const c=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),e[2]=f):f=e[2];let g;e[3]!==o||e[4]!==l?(g=D=>{const{field:y}=D;return n.jsx(ue,{...y,onChange:_=>{y.onChange(_),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"Acme Corp"})},e[3]=o,e[4]=l,e[5]=g):g=e[5];let b;e[6]!==s.control||e[7]!==g?(b=n.jsxs("div",{children:[f,n.jsx(fe,{control:s.control,name:"name",render:g})]}),e[6]=s.control,e[7]=g,e[8]=b):b=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("span",{children:"Domain"}),e[9]=p):p=e[9];let d;e[10]!==c?(d=c&&n.jsxs("a",{href:`https://${c}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 transition-colors hover:text-foreground",children:[n.jsx(nt,{size:10}),"open"]}),e[10]=c,e[11]=d):d=e[11];let a;e[12]!==d?(a=n.jsxs("label",{className:"mb-1 flex items-center justify-between text-xs text-muted-foreground",children:[p,d]}),e[12]=d,e[13]=a):a=e[13];let i;e[14]!==o||e[15]!==l?(i=D=>{const{field:y}=D;return n.jsx(ue,{...y,onChange:_=>{y.onChange(_),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"acme.com"})},e[14]=o,e[15]=l,e[16]=i):i=e[16];let u;e[17]!==s.control||e[18]!==i?(u=n.jsx(fe,{control:s.control,name:"domain",render:i}),e[17]=s.control,e[18]=i,e[19]=u):u=e[19];let h;e[20]!==a||e[21]!==u?(h=n.jsxs("div",{children:[a,u]}),e[20]=a,e[21]=u,e[22]=h):h=e[22];let x;e[23]!==h||e[24]!==b?(x=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b,h]}),e[23]=h,e[24]=b,e[25]=x):x=e[25];let v;e[26]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),e[26]=v):v=e[26];let m;e[27]!==o||e[28]!==l?(m=D=>{const{field:y}=D;return n.jsx(ot,{...y,onChange:_=>{y.onChange(_),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"Brief description of what the company does...",rows:3})},e[27]=o,e[28]=l,e[29]=m):m=e[29];let C;e[30]!==s.control||e[31]!==m?(C=n.jsxs("div",{children:[v,n.jsx(fe,{control:s.control,name:"overview",render:m})]}),e[30]=s.control,e[31]=m,e[32]=C):C=e[32];let k;return e[33]!==x||e[34]!==C?(k=n.jsx(we,{title:"Company Overview",children:n.jsxs("div",{className:"space-y-3",children:[x,C]})}),e[33]=x,e[34]=C,e[35]=k):k=e[35],k}const ct={backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"};function Se(t){const e=K.c(22),{form:s,name:o,label:l,imgClassName:r,onFieldChange:c,onFieldCommit:f}=t,g=r===void 0?"h-full w-full object-contain p-3":r;let b;e[0]!==s||e[1]!==o?(b=s.watch(o),e[0]=s,e[1]=o,e[2]=b):b=e[2];const p=b;let d;e[3]!==g||e[4]!==l||e[5]!==p?(d=n.jsx("div",{className:"flex aspect-video w-28 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:ct,children:p?n.jsx("img",{src:p,alt:l,className:g,loading:"lazy"}):n.jsxs("span",{className:"text-[10px] text-muted-foreground/70",children:["No ",l.toLowerCase()]})}),e[3]=g,e[4]=l,e[5]=p,e[6]=d):d=e[6];let a;e[7]!==l?(a=n.jsxs("label",{className:"mb-1 block text-xs text-muted-foreground",children:[l," URL"]}),e[7]=l,e[8]=a):a=e[8];let i;e[9]!==c||e[10]!==f?(i=v=>{const{field:m}=v;return n.jsx(ue,{...m,onChange:C=>{m.onChange(C),c()},onBlur:()=>{m.onBlur(),f()},placeholder:"https://..."})},e[9]=c,e[10]=f,e[11]=i):i=e[11];let u;e[12]!==s.control||e[13]!==o||e[14]!==i?(u=n.jsx(fe,{control:s.control,name:o,render:i}),e[12]=s.control,e[13]=o,e[14]=i,e[15]=u):u=e[15];let h;e[16]!==a||e[17]!==u?(h=n.jsxs("div",{className:"flex-1",children:[a,u]}),e[16]=a,e[17]=u,e[18]=h):h=e[18];let x;return e[19]!==d||e[20]!==h?(x=n.jsxs("div",{className:"flex items-start gap-3",children:[d,h]}),e[19]=d,e[20]=h,e[21]=x):x=e[21],x}function dt(t){const e=K.c(4),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;return e[0]!==s||e[1]!==o||e[2]!==l?(r=n.jsx(we,{title:"Logos & Images",children:n.jsxs("div",{className:"space-y-3",children:[n.jsx(Se,{form:s,name:"logo",label:"Logo",onFieldChange:o,onFieldCommit:l}),n.jsx(Se,{form:s,name:"favicon",label:"Favicon",imgClassName:"h-12 w-12 object-contain",onFieldChange:o,onFieldCommit:l}),n.jsx(Se,{form:s,name:"ogImage",label:"SEO / OG image",imgClassName:"h-full w-full object-contain",onFieldChange:o,onFieldCommit:l})]})}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3],r}const mt=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function ft(t){const e=K.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=mt.map(f=>{const{key:g,label:b}=f,p=`fonts.${g}`,d=s.watch(p);return n.jsxs("div",{children:[n.jsxs("label",{className:"mb-1 flex items-center gap-3 text-xs text-muted-foreground",children:[n.jsx("span",{className:"w-7 text-base font-medium leading-none text-foreground",children:"Aa"}),n.jsx("span",{children:b}),d&&n.jsx("span",{className:"ml-auto truncate text-foreground",style:{fontFamily:d},children:d})]}),n.jsx(fe,{control:s.control,name:p,render:a=>{const{field:i}=a;return n.jsx(ue,{...i,value:i.value??"",onChange:u=>{i.onChange(u),o()},onBlur:()=>{i.onBlur(),l()},placeholder:`Font family for ${b.toLowerCase()}`})}})]},g)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let c;return e[4]!==r?(c=n.jsx(we,{title:"Fonts",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=c):c=e[5],c}const ut=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function xt(t){const e=K.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=ut.map(f=>{const{key:g,label:b}=f,p=`colors.${g}`;return n.jsx(fe,{control:s.control,name:p,render:d=>{const{field:a}=d;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:a.value??"#000000",onChange:i=>{a.onChange(i.target.value),o()},onBlur:()=>{a.onBlur(),l()},className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(ue,{value:a.value??"",onChange:i=>{a.onChange(i.target.value),o()},onBlur:()=>{a.onBlur(),l()},placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:b})]})}},g)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let c;return e[4]!==r?(c=n.jsx(we,{title:"Colors",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=c):c=e[5],c}function gt(t){const e=K.c(127),{brand:s,onChanged:o}=t,l=$e(),[r,c]=Ae.useState(s.isDefault??!1),[f,g]=Ae.useState(!1),b=s.name??"",p=s.domain??"",d=s.overview??"",a=s.logo??"",i=s.favicon??"",u=s.ogImage??"";let h;e[0]!==s.fonts?(h=s.fonts??{},e[0]=s.fonts,e[1]=h):h=e[1];let x;e[2]!==s.colors?(x=s.colors??{},e[2]=s.colors,e[3]=x):x=e[3];let v;e[4]!==b||e[5]!==p||e[6]!==d||e[7]!==a||e[8]!==i||e[9]!==u||e[10]!==h||e[11]!==x?(v={values:{name:b,domain:p,overview:d,logo:a,favicon:i,ogImage:u,fonts:h,colors:x}},e[4]=b,e[5]=p,e[6]=d,e[7]=a,e[8]=i,e[9]=u,e[10]=h,e[11]=x,e[12]=v):v=e[12];const m=Ue(v);let C;e[13]!==s.id||e[14]!==l?(C={mutationFn:async j=>{const ve=Object.values(j.fonts).some(wt),Ce=Object.values(j.colors).some(_t);await l.call("BRAND_CONTEXT_UPDATE",{id:s.id,name:j.name,domain:j.domain,overview:j.overview,logo:j.logo||null,favicon:j.favicon||null,ogImage:j.ogImage||null,fonts:ve?j.fonts:null,colors:Ce?j.colors:null})},onError:Nt},e[13]=s.id,e[14]=l,e[15]=C):C=e[15];const k=ge(C);let D;e[16]!==s.id||e[17]!==m||e[18]!==o||e[19]!==k?(D={delayMs:500,save:async()=>{const j=m.control._formState.dirtyFields,ve=Object.keys(j);if(ve.length===0)return;const Ce=m.getValues(),Pe=m.control._defaultValues;m.reset(Ce,{keepValues:!0});try{await k.mutateAsync(Ce),H("brand_updated",{brand_id:s.id,fields:ve}),L.success("Brand context updated successfully"),o()}catch{m.reset(Pe,{keepValues:!0})}}},e[16]=s.id,e[17]=m,e[18]=o,e[19]=k,e[20]=D):D=e[20];const{schedule:y,flush:_}=st(D);let $;e[21]!==s.id||e[22]!==l?($=async()=>{await l.call("BRAND_CONTEXT_DELETE",{id:s.id})},e[21]=s.id,e[22]=l,e[23]=$):$=e[23];let P;e[24]!==s.id||e[25]!==o?(P=()=>{H("brand_deleted",{brand_id:s.id}),g(!1),o(),L.success("Brand deleted")},e[24]=s.id,e[25]=o,e[26]=P):P=e[26];let q;e[27]!==$||e[28]!==P?(q={mutationFn:$,onSuccess:P,onError:Ct},e[27]=$,e[28]=P,e[29]=q):q=e[29];const{mutate:U,isPending:N}=ge(q);let A;e[30]!==s.id||e[31]!==s.isDefault||e[32]!==l?(A=async()=>{await l.call("BRAND_CONTEXT_UPDATE",{id:s.id,isDefault:!s.isDefault})},e[30]=s.id,e[31]=s.isDefault,e[32]=l,e[33]=A):A=e[33];let B;e[34]!==s.id||e[35]!==s.isDefault||e[36]!==o?(B=()=>{H(s.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:s.id}),o(),L.success(s.isDefault?"Removed as default brand":"Set as default brand")},e[34]=s.id,e[35]=s.isDefault,e[36]=o,e[37]=B):B=e[37];let T;e[38]!==A||e[39]!==B?(T={mutationFn:A,onSuccess:B,onError:vt},e[38]=A,e[39]=B,e[40]=T):T=e[40];const{mutate:X}=ge(T),xe=s.isDefault?"border-primary/30":"border-border/60";let O;e[41]!==xe?(O=_e("rounded-2xl border bg-background",xe),e[41]=xe,e[42]=O):O=e[42];let z;e[43]!==r?(z=()=>c(!r),e[43]=r,e[44]=z):z=e[44];let E;e[45]!==r?(E=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:r?n.jsx(Xe,{size:14}):n.jsx(He,{size:14})}),e[45]=r,e[46]=E):E=e[46];let F;e[47]!==s.logo||e[48]!==s.name?(F=s.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:s.logo,alt:"",className:"h-full w-full object-contain p-1",onError:yt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s.name?.charAt(0)?.toUpperCase()||"?"})}),e[47]=s.logo,e[48]=s.name,e[49]=F):F=e[49];const I=s.name||"Untitled Brand";let S;e[50]!==I?(S=n.jsx("span",{className:"text-sm font-medium text-foreground",children:I}),e[50]=I,e[51]=S):S=e[51];let R;e[52]!==s.domain?(R=s.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s.domain}),e[52]=s.domain,e[53]=R):R=e[53];let w;e[54]!==S||e[55]!==R?(w=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[S,R]}),e[54]=S,e[55]=R,e[56]=w):w=e[56];let M;e[57]!==s.colors||e[58]!==r?(M=!r&&s.colors&&Object.values(s.colors).some(jt)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(s.colors).filter(bt).map(pt)}),e[57]=s.colors,e[58]=r,e[59]=M):M=e[59];let V;e[60]!==s.fonts||e[61]!==r?(V=!r&&s.fonts&&Object.values(s.fonts).some(ht)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(s.fonts).filter(Boolean).join(", ")}),e[60]=s.fonts,e[61]=r,e[62]=V):V=e[62];const De=s.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let Q;e[63]!==De?(Q=_e("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",De),e[63]=De,e[64]=Q):Q=e[64];let G,Y;e[65]!==X?(G=j=>{j.stopPropagation(),X()},Y=j=>{j.key==="Enter"&&(j.stopPropagation(),X())},e[65]=X,e[66]=G,e[67]=Y):(G=e[66],Y=e[67]);const ke=s.isDefault?"Unset as default":"Set as default",Be=s.isDefault?"text-primary fill-primary":"text-muted-foreground";let J;e[68]!==Be?(J=_e(Be),e[68]=Be,e[69]=J):J=e[69];let W;e[70]!==J?(W=n.jsx(Me,{size:13,className:J}),e[70]=J,e[71]=W):W=e[71];let Z;e[72]!==Q||e[73]!==G||e[74]!==Y||e[75]!==ke||e[76]!==W?(Z=n.jsx("span",{role:"button",tabIndex:0,className:Q,onClick:G,onKeyDown:Y,title:ke,children:W}),e[72]=Q,e[73]=G,e[74]=Y,e[75]=ke,e[76]=W,e[77]=Z):Z=e[77];let he,pe;e[78]===Symbol.for("react.memo_cache_sentinel")?(he=j=>{j.stopPropagation(),g(!0)},pe=j=>{j.key==="Enter"&&(j.stopPropagation(),g(!0))},e[78]=he,e[79]=pe):(he=e[78],pe=e[79]);let be;e[80]===Symbol.for("react.memo_cache_sentinel")?(be=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:he,onKeyDown:pe,title:"Delete brand",children:n.jsx(Ve,{size:13,className:"text-muted-foreground"})}),e[80]=be):be=e[80];let ee;e[81]!==z||e[82]!==E||e[83]!==F||e[84]!==w||e[85]!==M||e[86]!==V||e[87]!==Z?(ee=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:z,children:[E,F,w,M,V,Z,be]}),e[81]=z,e[82]=E,e[83]=F,e[84]=w,e[85]=M,e[86]=V,e[87]=Z,e[88]=ee):ee=e[88];let te;e[89]!==r||e[90]!==_||e[91]!==m||e[92]!==y?(te=r&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(it,{form:m,onFieldChange:y,onFieldCommit:_}),n.jsx(dt,{form:m,onFieldChange:y,onFieldCommit:_}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(xt,{form:m,onFieldChange:y,onFieldCommit:_}),n.jsx(ft,{form:m,onFieldChange:y,onFieldCommit:_})]})]}),e[89]=r,e[90]=_,e[91]=m,e[92]=y,e[93]=te):te=e[93];let se;e[94]!==N?(se=j=>{!j&&!N&&g(!1)},e[94]=N,e[95]=se):se=e[95];let je;e[96]===Symbol.for("react.memo_cache_sentinel")?(je=n.jsx(Qe,{children:"Delete brand?"}),e[96]=je):je=e[96];const Ee=s.name||"this brand";let ne;e[97]!==Ee?(ne=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:Ee}),". This action cannot be undone."]}),e[97]=Ee,e[98]=ne):ne=e[98];let le;e[99]!==s.isDefault?(le=s.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[99]=s.isDefault,e[100]=le):le=e[100];let oe;e[101]!==ne||e[102]!==le?(oe=n.jsxs(Ge,{children:[je,n.jsx(Ye,{asChild:!0,children:n.jsxs("div",{children:[ne,le]})})]}),e[101]=ne,e[102]=le,e[103]=oe):oe=e[103];let re;e[104]!==N?(re=n.jsx(Je,{disabled:N,children:"Cancel"}),e[104]=N,e[105]=re):re=e[105];let ae;e[106]!==U?(ae=j=>{j.preventDefault(),U()},e[106]=U,e[107]=ae):ae=e[107];const Fe=N?"Deleting...":"Delete";let ie;e[108]!==N||e[109]!==ae||e[110]!==Fe?(ie=n.jsx(We,{onClick:ae,disabled:N,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Fe}),e[108]=N,e[109]=ae,e[110]=Fe,e[111]=ie):ie=e[111];let ce;e[112]!==re||e[113]!==ie?(ce=n.jsxs(Ze,{children:[re,ie]}),e[112]=re,e[113]=ie,e[114]=ce):ce=e[114];let de;e[115]!==oe||e[116]!==ce?(de=n.jsxs(et,{children:[oe,ce]}),e[115]=oe,e[116]=ce,e[117]=de):de=e[117];let me;e[118]!==f||e[119]!==se||e[120]!==de?(me=n.jsx(tt,{open:f,onOpenChange:se,children:de}),e[118]=f,e[119]=se,e[120]=de,e[121]=me):me=e[121];let ye;return e[122]!==O||e[123]!==ee||e[124]!==te||e[125]!==me?(ye=n.jsxs("div",{className:O,children:[ee,te,me]}),e[122]=O,e[123]=ee,e[124]=te,e[125]=me,e[126]=ye):ye=e[126],ye}function ht(t){return t}function pt(t){const[e,s]=t;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:s},title:`${e}: ${s}`},e)}function bt(t){const[,e]=t;return e}function jt(t){return t}function yt(t){t.target.style.display="none"}function vt(){return L.error("Failed to update default brand")}function Ct(){return L.error("Failed to delete brand")}function Nt(){return L.error("Failed to save brand context")}function _t(t){return t?.trim()}function wt(t){return t?.trim()}function Dt(){const t=K.c(53),{brandExtractEnabled:e}=ze(),{org:s}=Ie(),o=$e(),l=Le();let r;t[0]!==s.id?(r=Oe.brandContext(s.id),t[0]=s.id,t[1]=r):r=t[1];let c;t[2]!==o?(c=async()=>{const{items:w}=await o.call("BRAND_CONTEXT_LIST",{includeArchived:!1});return w},t[2]=o,t[3]=c):c=t[3];let f;t[4]!==r||t[5]!==c?(f={queryKey:r,queryFn:c},t[4]=r,t[5]=c,t[6]=f):f=t[6];const{data:g}=Ke(f),p=(g===void 0?[]:g).filter(Et);let d;t[7]!==s.id||t[8]!==l?(d=()=>l.invalidateQueries({queryKey:Oe.brandContext(s.id),refetchType:"all"}),t[7]=s.id,t[8]=l,t[9]=d):d=t[9];const a=d;let i;t[10]!==o?(i=async()=>{await o.call("BRAND_CONTEXT_CREATE",{name:"New Brand",domain:"example.com",overview:""})},t[10]=o,t[11]=i):i=t[11];let u;t[12]!==a?(u=()=>{H("brand_created"),a(),L.success("Brand created")},t[12]=a,t[13]=u):u=t[13];let h;t[14]!==i||t[15]!==u?(h={mutationFn:i,onSuccess:u,onError:Bt},t[14]=i,t[15]=u,t[16]=h):h=t[16];const{mutate:x,isPending:v}=ge(h);let m;t[17]!==o?(m=async w=>{H("brand_extract_started",{domain:w}),await o.call("BRAND_CONTEXT_EXTRACT",{domain:w})},t[17]=o,t[18]=m):m=t[18];let C;t[19]!==a?(C=()=>{H("brand_extract_succeeded"),a(),L.success("Brand extracted successfully")},t[19]=a,t[20]=C):C=t[20];let k;t[21]!==m||t[22]!==C?(k={mutationFn:m,onSuccess:C,onError:kt},t[21]=m,t[22]=C,t[23]=k):k=t[23];const{mutate:D,isPending:y}=ge(k),_=Ne,$=Ne,P=Ne,q="flex flex-col gap-6";let U;t[24]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsxs("div",{children:[n.jsx(Ne.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),t[24]=U):U=t[24];let N;t[25]!==x?(N=()=>x(),t[25]=x,t[26]=N):N=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(Re,{size:14}),t[27]=A):A=t[27];let B;t[28]!==v||t[29]!==N?(B=n.jsxs("div",{className:"flex items-center justify-between",children:[U,n.jsxs(Te,{variant:"outline",onClick:N,disabled:v,children:[A,"Add Brand"]})]}),t[28]=v,t[29]=N,t[30]=B):B=t[30];let T;t[31]!==e||t[32]!==D||t[33]!==y?(T=e&&n.jsx(at,{onExtract:w=>D(w),isExtracting:y}),t[31]=e,t[32]=D,t[33]=y,t[34]=T):T=t[34];const X=p.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(Te,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>x(),disabled:v,children:[n.jsx(Re,{size:14}),"Add your first brand"]})]}),xe="group space-y-3";let O;t[35]!==a?(O=w=>n.jsx(gt,{brand:w,onChanged:a},w.id),t[35]=a,t[36]=O):O=t[36];const z=p.map(O);let E;t[37]!==z?(E=n.jsx("div",{className:xe,children:z}),t[37]=z,t[38]=E):E=t[38];let F;t[39]!==B||t[40]!==T||t[41]!==X||t[42]!==E?(F=n.jsxs("div",{className:q,children:[B,T,X,E]}),t[39]=B,t[40]=T,t[41]=X,t[42]=E,t[43]=F):F=t[43];let I;t[44]!==P.Body||t[45]!==F?(I=n.jsx(P.Body,{children:F}),t[44]=P.Body,t[45]=F,t[46]=I):I=t[46];let S;t[47]!==$.Content||t[48]!==I?(S=n.jsx($.Content,{children:I}),t[47]=$.Content,t[48]=I,t[49]=S):S=t[49];let R;return t[50]!==_||t[51]!==S?(R=n.jsx(_,{children:S}),t[50]=_,t[51]=S,t[52]=R):R=t[52],R}function kt(t){H("brand_extract_failed",{error:t instanceof Error?t.message:"unknown"}),L.error(t instanceof Error?t.message:"Failed to extract brand")}function Bt(){return L.error("Failed to create brand")}function Et(t){return!t.archivedAt}function Zt(){const t=K.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(rt,{capability:"org:manage",area:"brand context",children:n.jsx(Dt,{})}),t[0]=e):e=t[0],e}export{Zt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as D,j as t,E as V,r as v,B as F,t as _}from"./index-Dq2GzmIa.js";import{i as J}from"./AlertCircle-TjPHcEnP.js";import{i as O}from"./HardDrive-Bo4OGyrd.js";import{s as L}from"./Plus-CaVUuJOD.js";import{s as Q}from"./Trash01-D4xE6JK2.js";import{A as X,g as Y,c as Z,b as ee,d as te,e as se,a as ie,f as re}from"./alert-dialog-CRKyaNBx.js";import{e as ne,d as le,D as ae,a as oe,h as ce,c as de}from"./dialog-DT5S2RMB.js";import{I as N}from"./input-_HbUXqOS.js";import{L as C}from"./label-BtGdlmhk.js";import{S as me,a as ue,b as fe,c as pe,d as q}from"./select-CrSxwLpY.js";import{S as xe}from"./switch-BlPs3ERk.js";import{S as he}from"./skeleton-CFwDF8gK.js";import{T as ge}from"./textarea-BHzi6Dhm.js";import{P}from"./index-DoiBq52a.js";import{c as je}from"./settings-section-DpMc0HVT.js";import{u as ye,b as be,c as ve}from"./use-file-configs-dAie7zDN.js";import{R as Se}from"./require-capability-DXSues5j.js";import"./X-Dg7rsVai.js";import"./tooltip-BI-udduQ.js";import"./ChevronUp-BcAa4Ljr.js";import"./ChevronDown-C3MkOcZJ.js";import"./sidebar-C5_XfNYh.js";import"./LayoutLeft--D_GxkO2.js";import"./use-mobile-BjsEeYVy.js";import"./card-CPTg8fDY.js";import"./ArrowUpRight-BH4m-RJh.js";import"./studio-tools-DT3M_Vdz.js";import"./use-capability-DMFGKIH5.js";import"./access-gate-BPnO_2yT.js";import"./capability-load-error-96MaJwmz.js";function Ce(s,e){if(!(s instanceof Error))return e;const i=s.message.match(/\[\s*\{[\s\S]*\}\s*\]/);if(i)try{const r=JSON.parse(i[0])[0];if(r?.message){const l=r.path?.join(".");return l?`${l}: ${r.message}`:r.message}}catch{}return s.message||e}function ke(s){const e=D.c(3),{error:i}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(J,{size:16}),e[0]=n):n=e[0];let r;return e[1]!==i.message?(r=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,t.jsxs("span",{className:"text-sm font-medium",children:["Failed to load file configurations: ",i.message]})]}),e[1]=i.message,e[2]=r):r=e[2],r}function Ne(s){const e=D.c(44),{config:i,onDelete:n}=s;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(O,{size:16,className:"text-muted-foreground"})}),e[0]=r):r=e[0];let l;e[1]!==i.name?(l=t.jsx("span",{className:"font-medium text-sm truncate",children:i.name}),e[1]=i.name,e[2]=l):l=e[2];let o;e[3]!==i.credentialType?(o=i.credentialType==="sts-session"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:"STS"}):i.credentialType==="managed"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:"Managed"}):null,e[3]=i.credentialType,e[4]=o):o=e[4];let g;e[5]!==i.bucket||e[6]!==i.region?(g=t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:[i.bucket," · ",i.region]}),e[5]=i.bucket,e[6]=i.region,e[7]=g):g=e[7];let c;e[8]!==l||e[9]!==o||e[10]!==g?(c=t.jsxs("div",{className:"flex items-center gap-2",children:[l,o,g]}),e[8]=l,e[9]=o,e[10]=g,e[11]=c):c=e[11];let b;e[12]!==i.description?(b=i.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:i.description}):null,e[12]=i.description,e[13]=b):b=e[13];let j;e[14]!==i.endpoint||e[15]!==i.forcePathStyle?(j=i.endpoint?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:[i.endpoint,i.forcePathStyle?" (path-style)":""]}):null,e[14]=i.endpoint,e[15]=i.forcePathStyle,e[16]=j):j=e[16];let d;e[17]!==i.prefix?(d=i.prefix?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:["prefix: ",i.prefix]}):null,e[17]=i.prefix,e[18]=d):d=e[18];let m;e[19]!==i.publicUrlBase?(m=i.publicUrlBase?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:["public: ",i.publicUrlBase]}):null,e[19]=i.publicUrlBase,e[20]=m):m=e[20];let y;e[21]!==c||e[22]!==b||e[23]!==j||e[24]!==d||e[25]!==m?(y=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[r,t.jsxs("div",{className:"min-w-0",children:[c,b,j,d,m]})]}),e[21]=c,e[22]=b,e[23]=j,e[24]=d,e[25]=m,e[26]=y):y=e[26];let f;e[27]!==i.createdAt?(f=new Date(i.createdAt).toLocaleDateString(),e[27]=i.createdAt,e[28]=f):f=e[28];let u;e[29]!==f?(u=t.jsx("span",{className:"text-xs text-muted-foreground",children:f}),e[29]=f,e[30]=u):u=e[30];let p;e[31]!==i||e[32]!==n?(p=()=>n(i),e[31]=i,e[32]=n,e[33]=p):p=e[33];const x=`Delete ${i.name}`;let h;e[34]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Q,{size:14}),e[34]=h):h=e[34];let k;e[35]!==p||e[36]!==x?(k=t.jsx(F,{variant:"ghost",size:"sm",onClick:p,"aria-label":x,children:h}),e[35]=p,e[36]=x,e[37]=k):k=e[37];let S;e[38]!==u||e[39]!==k?(S=t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u,k]}),e[38]=u,e[39]=k,e[40]=S):S=e[40];let A;return e[41]!==y||e[42]!==S?(A=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[y,S]}),e[41]=y,e[42]=S,e[43]=A):A=e[43],A}function Ae(s){const e=D.c(5),{onCreate:i}=s;let n,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(O,{size:20,className:"text-muted-foreground"})}),r=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No buckets configured"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Add an S3-compatible bucket (AWS S3, Cloudflare R2, Google Cloud Storage, MinIO). Access keys are encrypted at rest and never returned over the API."})]}),e[0]=n,e[1]=r):(n=e[0],r=e[1]);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(L,{size:14}),e[2]=l):l=e[2];let o;return e[3]!==i?(o=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[n,r,t.jsxs(F,{onClick:i,size:"sm",className:"mt-2",children:[l,"Add bucket"]})]}),e[3]=i,e[4]=o):o=e[4],o}function K({open:s,onOpenChange:e}){const[i,n]=v.useState(""),[r,l]=v.useState(""),[o,g]=v.useState(""),[c,b]=v.useState(""),[j,d]=v.useState(""),[m,y]=v.useState(!1),[f,u]=v.useState(""),[p,x]=v.useState(""),[h,k]=v.useState("static"),[S,A]=v.useState(""),[R,I]=v.useState(""),[T,U]=v.useState(""),[B,E]=v.useState(""),w=be();function $(){n(""),l(""),g(""),b(""),d(""),y(!1),u(""),x(""),k("static"),A(""),I(""),U(""),E("")}const z=h==="sts-session"?!!(T.trim()&&B.trim()):!!(S&&R);async function M(a){if(a.preventDefault(),!i.trim()||!o.trim()||!c.trim()||!z)return;const W=h==="sts-session"?{credentialType:"sts-session",refreshUrl:T.trim(),apiKey:B.trim()}:{credentialType:"static",accessKeyId:S,secretAccessKey:R};try{await w.mutateAsync({name:i.trim(),description:r.trim()||void 0,bucket:o.trim(),region:c.trim(),endpoint:j.trim()||void 0,forcePathStyle:m,prefix:f.trim()||void 0,publicUrlBase:p.trim()||void 0,...W}),_.success(`Bucket "${i.trim()}" added`),$(),e(!1)}catch(H){_.error(Ce(H,"Failed to add bucket"))}}const G=w.isPending||!i.trim()||!o.trim()||!c.trim()||!z;return t.jsx(ne,{open:s,onOpenChange:e,children:t.jsxs(le,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto",children:[t.jsxs(ae,{children:[t.jsx(oe,{children:"Add S3 bucket"}),t.jsx(ce,{children:"Credentials are encrypted at rest and never returned over the API. For Cloudflare R2, Google Cloud Storage, or MinIO, set a custom endpoint."})]}),t.jsxs("form",{onSubmit:M,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-name",children:"Name"}),t.jsx(N,{id:"file-config-name",value:i,onChange:a=>n(a.target.value),placeholder:"production-uploads",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Letters, digits, underscore, dot, hyphen. Unique within the organization."})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-bucket",children:"Bucket"}),t.jsx(N,{id:"file-config-bucket",value:o,onChange:a=>g(a.target.value),placeholder:"my-bucket",autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-region",children:"Region"}),t.jsx(N,{id:"file-config-region",value:c,onChange:a=>b(a.target.value),placeholder:"us-east-1",autoComplete:"off",required:!0})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-endpoint",children:"Endpoint (optional)"}),t.jsx(N,{id:"file-config-endpoint",type:"url",value:j,onChange:a=>d(a.target.value),placeholder:"https://<account>.r2.cloudflarestorage.com",autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Required for non-AWS providers (R2, GCS, MinIO)."})]}),t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border/60 p-3",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx(C,{htmlFor:"file-config-path-style",className:"text-sm",children:"Force path-style URLs"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Required for Google Cloud Storage and most MinIO setups."})]}),t.jsx(xe,{id:"file-config-path-style",checked:m,onCheckedChange:y})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-prefix",children:"Key prefix (optional)"}),t.jsx(N,{id:"file-config-prefix",value:f,onChange:a=>u(a.target.value),placeholder:"tenants/acme/",autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"All object keys are written under this prefix. Useful for multi-tenant buckets or credentials scoped to a sub-path. A trailing slash is added automatically."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-public-url-base",children:"Public URL base (optional)"}),t.jsx(N,{id:"file-config-public-url-base",type:"url",value:p,onChange:a=>x(a.target.value),placeholder:"https://pub-xxxx.r2.dev or https://cdn.example.com",autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Host used to build public URLs returned by the picker (R2 dev domain, CDN, custom host). Leave blank to use the bucket's S3 host (AWS default)."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-credential-type",children:"Credentials"}),t.jsxs(me,{value:h,onValueChange:a=>k(a),children:[t.jsx(ue,{id:"file-config-credential-type",className:"w-full",children:t.jsx(fe,{})}),t.jsxs(pe,{children:[t.jsx(q,{value:"static",children:"Static key pair (long-lived)"}),t.jsx(q,{value:"sts-session",children:"Temporary session (STS, auto-refreshed)"})]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:h==="sts-session"?"Stores only a refresh endpoint + API key; short-lived credentials are fetched on demand and refreshed automatically.":"A long-lived access key ID and secret, used as-is."})]}),h==="static"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-access-key",children:"Access key ID"}),t.jsx(N,{id:"file-config-access-key",value:S,onChange:a=>A(a.target.value),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-secret-key",children:"Secret access key"}),t.jsx(N,{id:"file-config-secret-key",type:"password",value:R,onChange:a=>I(a.target.value),autoComplete:"new-password",required:!0})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-refresh-url",children:"Refresh URL"}),t.jsx(N,{id:"file-config-refresh-url",type:"url",value:T,onChange:a=>U(a.target.value),placeholder:"https://admin.example.com/api/acme/s3-credentials",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Endpoint POSTed (with the API key below) to vend temporary credentials. Must return accessKeyId, secretAccessKey, sessionToken, and expiration."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-api-key",children:"API key"}),t.jsx(N,{id:"file-config-api-key",type:"password",value:B,onChange:a=>E(a.target.value),autoComplete:"new-password",required:!0}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Sent as the ",t.jsx("code",{children:"x-api-key"})," header on each refresh call."]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-description",children:"Description (optional)"}),t.jsx(ge,{id:"file-config-description",value:r,onChange:a=>l(a.target.value),rows:2,placeholder:"What is this bucket used for?"})]}),t.jsxs(de,{children:[t.jsx(F,{type:"button",variant:"outline",onClick:()=>{$(),e(!1)},disabled:w.isPending,children:"Cancel"}),t.jsx(F,{type:"submit",disabled:G,children:w.isPending?"Adding…":"Add bucket"})]})]})]})})}function De(s){const e=D.c(25),{config:i,onClose:n}=s,r=ve();let l;e[0]!==i||e[1]!==r||e[2]!==n?(l=async function(){if(i)try{await r.mutateAsync(i.id),_.success(`Bucket "${i.name}" removed`),n()}catch(k){const S=k;_.error(S instanceof Error?S.message:"Failed to remove bucket")}},e[0]=i,e[1]=r,e[2]=n,e[3]=l):l=e[3];const o=l,g=i!==null;let c;e[4]!==n?(c=h=>!h&&n(),e[4]=n,e[5]=c):c=e[5];let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Z,{children:"Remove bucket configuration?"}),e[6]=b):b=e[6];const j=i?.name;let d;e[7]!==j?(d=t.jsxs(ee,{children:[b,t.jsxs(te,{children:["This deletes the encrypted credentials for"," ",t.jsx("span",{className:"font-medium",children:j}),". The bucket itself is not affected. This cannot be undone."]})]}),e[7]=j,e[8]=d):d=e[8];let m;e[9]!==r.isPending?(m=t.jsx(X,{disabled:r.isPending,children:"Cancel"}),e[9]=r.isPending,e[10]=m):m=e[10];const y=r.isPending?"Removing…":"Remove";let f;e[11]!==r.isPending||e[12]!==o||e[13]!==y?(f=t.jsx(Y,{onClick:o,disabled:r.isPending,children:y}),e[11]=r.isPending,e[12]=o,e[13]=y,e[14]=f):f=e[14];let u;e[15]!==m||e[16]!==f?(u=t.jsxs(se,{children:[m,f]}),e[15]=m,e[16]=f,e[17]=u):u=e[17];let p;e[18]!==u||e[19]!==d?(p=t.jsxs(ie,{children:[d,u]}),e[18]=u,e[19]=d,e[20]=p):p=e[20];let x;return e[21]!==p||e[22]!==g||e[23]!==c?(x=t.jsx(re,{open:g,onOpenChange:c,children:p}),e[21]=p,e[22]=g,e[23]=c,e[24]=x):x=e[24],x}function Fe(){const s=D.c(25),e=ye(),[i,n]=v.useState(!1),[r,l]=v.useState(null);if(e.length===0){let x;s[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Ae,{onCreate:()=>n(!0)}),s[0]=x):x=s[0];let h;return s[1]!==i?(h=t.jsxs(t.Fragment,{children:[x,t.jsx(K,{open:i,onOpenChange:n})]}),s[1]=i,s[2]=h):h=s[2],h}const o=e.length===1?"":"s";let g;s[3]!==e.length||s[4]!==o?(g=t.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," bucket",o," configured"]}),s[3]=e.length,s[4]=o,s[5]=g):g=s[5];let c;s[6]===Symbol.for("react.memo_cache_sentinel")?(c=()=>n(!0),s[6]=c):c=s[6];let b;s[7]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsxs(F,{onClick:c,size:"sm",children:[t.jsx(L,{size:14}),"Add bucket"]}),s[7]=b):b=s[7];let j;s[8]!==g?(j=t.jsxs("div",{className:"flex items-center justify-between",children:[g,b]}),s[8]=g,s[9]=j):j=s[9];let d;if(s[10]!==e){let x;s[12]===Symbol.for("react.memo_cache_sentinel")?(x=h=>t.jsx(Ne,{config:h,onDelete:l},h.id),s[12]=x):x=s[12],d=e.map(x),s[10]=e,s[11]=d}else d=s[11];let m;s[13]!==d?(m=t.jsx("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:t.jsx("div",{children:d})}),s[13]=d,s[14]=m):m=s[14];let y;s[15]!==i?(y=t.jsx(K,{open:i,onOpenChange:n}),s[15]=i,s[16]=y):y=s[16];let f;s[17]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(null),s[17]=f):f=s[17];let u;s[18]!==r?(u=t.jsx(De,{config:r,onClose:f}),s[18]=r,s[19]=u):u=s[19];let p;return s[20]!==j||s[21]!==m||s[22]!==y||s[23]!==u?(p=t.jsxs(t.Fragment,{children:[j,m,y,u]}),s[20]=j,s[21]=m,s[22]=y,s[23]=u,s[24]=p):p=s[24],p}function we(){const s=D.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(P.Title,{children:"Buckets"}),s[0]=e):e=s[0];let i;return s[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(P,{children:t.jsx(P.Content,{children:t.jsx(P.Body,{children:t.jsxs(je,{children:[e,t.jsx(V,{fallback:Pe,children:t.jsx(v.Suspense,{fallback:t.jsx(he,{className:"h-32 w-full"}),children:t.jsx(Fe,{})})})]})})})}),s[1]=i):i=s[1],i}function Pe(s){const{error:e}=s;return t.jsx(ke,{error:e??new Error("Failed to load file configs")})}function at(){const s=D.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Se,{capability:"file-configs:manage",area:"files",children:t.jsx(we,{})}),s[0]=e):e=s[0],e}export{at as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as J,r as k,l as Q,j as t,B as U,i as V,t as T}from"./index-Dq2GzmIa.js";import{i as X}from"./XCircle-Di7Lb4ZU.js";import{c as I}from"./ZoomOut-C_Zu7-Q5.js";import{n as Y}from"./LinkExternal01-eA6vVQM3.js";import{aL as Z}from"./agent-icon-cR-VXBAA.js";import{f as _,a as K,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-CRKyaNBx.js";import{I as L}from"./input-_HbUXqOS.js";import{L as M}from"./label-BtGdlmhk.js";import{v as at,w as mt,_ as nt,o as lt,y as R,B as pt,$ as ct,z as dt}from"./index-DpAoOgpk.js";import{c as ut,B as gt,a as xt}from"./block-document-DqdDdm8l.js";import{u as ft}from"./use-autosave-k2g5KpMJ.js";import{t as ht}from"./ChevronDown-C3MkOcZJ.js";import{p as yt,q as jt,o as vt}from"./automation-runs-IA98DU4N.js";import{s as v,E as bt}from"./primitives-DIHB4xXI.js";import"./AlertCircle-TjPHcEnP.js";import"./Tool01-DTY-fPyM.js";import"./ArrowUp-D620niSP.js";import"./Settings02-BNJ32xSl.js";import"./Tool02-C5wUTAFe.js";import"./ArrowUpRight-BH4m-RJh.js";import"./TrendUp01--_jCdLU4.js";import"./ZapSquare-CqcwFWlA.js";import"./Users03-Bk7hrtUP.js";import"./CheckCircle-wgdag1z7.js";import"./ChevronUp-BcAa4Ljr.js";import"./ChevronRight-D7I_d6Rs.js";import"./DotsVertical-BkJg419g.js";import"./Stars02-7EGkcn1l.js";import"./Copy01-ybfnME4F.js";import"./Globe01-e5qIDEbr.js";import"./Eye-CeD9rgkI.js";import"./FilterLines-DTDvdHSv.js";import"./Star01-5GqPaTBh.js";import"./Globe04-Bxmic94-.js";import"./SwitchHorizontal01-CWRzX-Fm.js";import"./HardDrive-Bo4OGyrd.js";import"./Image01-Cm0pa05N.js";import"./Key01-Dz6Z8ZMZ.js";import"./LayoutLeft--D_GxkO2.js";import"./Monitor01-CbDoyDRV.js";import"./Sun-C4Fwh1Vu.js";import"./Package-BRrJc9sL.js";import"./Palette-D12yKiV2.js";import"./Play-CQU4qZuG.js";import"./Plus-CaVUuJOD.js";import"./SearchLg-CIPUU7M2.js";import"./SearchMd-7xF40qNR.js";import"./Shield01-CfES6vR4.js";import"./Stars01-DrN-Oz3U.js";import"./Trash01-D4xE6JK2.js";import"./Upload01-Baccrojk.js";import"./User01-B_wV9DLb.js";import"./Users01--ZODDl59.js";import"./XClose-BWc8duIO.js";import"./X-Dg7rsVai.js";import"./Zap-BS9GJrhH.js";import"./chat-context-BAovwxgU.js";import"./autosend-TZVzvR_1.js";import"./hooks-CKtulQ0t.js";import"./use-mcp-client-BET4cVQ2.js";import"./auth-DgHUqP65.js";import"./decopilot-sse-pool-C_pTq61C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-DT3M_Vdz.js";import"./use-virtual-mcp-B1v9ZXLU.js";import"./use-collections-BakROzwv.js";import"./use-ai-providers-w9d34g0F.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-DDc7EwGs.js";import"./use-organization-settings-C0IXRiP_.js";import"./tooltip-BI-udduQ.js";import"./dialog-DT5S2RMB.js";import"./drawer-XzD4hvpg.js";import"./collection-search-Btrf8Diq.js";import"./use-mobile-BjsEeYVy.js";import"./AreaChart-Cn-bvgNR.js";import"./index-DyWjSb5y.js";import"./calendar-DxMjhXOp.js";import"./shell-layout-DQaGi35E.js";import"./avatar-Cg58Qi4s.js";import"./required-auth-layout-DLhyslwf.js";import"./use-org-sso-DIQMNs43.js";import"./index-B0JPF-6M.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-COi_RGkf.js";import"./use-mcp-tools-z0J_EOSL.js";import"./use-connection-BYUOXcTZ.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-ClWKGwOW.js";import"./mcp-oauth-D4aGhRIx.js";import"./extract-connection-data-nMVGabj3.js";import"./use-members-Dmwu4pSZ.js";import"./use-org-auth-client-BZS4V2Lt.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-EMizUbgW.js";import"./popover-DuDwu8ZY.js";import"./command-0HaDsh2Q.js";import"./index-BojbkbvA.js";import"./use-copy-X1Kg3Hp6.js";import"./companions-core-DJ2SKsFs.js";import"./form-CFqk5lJy.js";import"./select-CrSxwLpY.js";import"./tabs-Ca1nnDrk.js";import"./toggle-group-a5DM2sSK.js";import"./use-deco-credits-DGCPQWxL.js";import"./connection-card-DwBQfP1R.js";import"./use-registry-connections-BThC_Q4I.js";import"./useInfiniteQuery-CErl8eUD.js";import"./use-infinite-scroll-C_M049Oj.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CPTg8fDY.js";import"./integration-icon-CGshMm4e.js";import"./textarea-BHzi6Dhm.js";import"./connection-form-helpers-7cL_OUk8.js";import"./collection-tabs-kwELhDMx.js";import"./badge-D2XsHW2Y.js";import"./useSuspenseInfiniteQuery-CqYcpPIQ.js";import"./connect-desktop-dialog-CkUcaE26.js";import"./select-model-CPc7lxVf.js";import"./checkbox-BdHs-X49.js";import"./skeleton-CFwDF8gK.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DpMc0HVT.js";import"./index-MzuqcCtH.js";import"./file-type-icon-XKnElsdT.js";import"./toolbar-BptqFiOS.js";import"./use-debounced-value-BcV326dl.js";import"./index-D1cQ6lKh.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D8lhFnWZ.js";import"./empty-state-D9Dn1Lnz.js";import"./use-capability-DMFGKIH5.js";import"./toolbar-icon-button-BAMgsY3V.js";import"./use-debounced-autosave-C2vhIJrv.js";import"./index-DoiBq52a.js";import"./sidebar-C5_XfNYh.js";import"./search-input-CuP775da.js";import"./use-mcp-auth-status-ClCJfdlL.js";import"./switch-BlPs3ERk.js";import"./github-repo-picker-DpzVLTnS.js";import"./use-navigate-to-agent-C4BCBCv3.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-C4jt5KwT.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./monaco-editor-Bq9EBE_u.js";import"./use-file-configs-dAie7zDN.js";import"./use-automations-CqRQFXK6.js";import"./automation-list-row-aKON7NTD.js";import"./table-CjtfrukD.js";import"./use-clock-tick-DOOmIKzq.js";function Ct(b){const e=J.c(18),{icon:x,title:n,defaultOpen:C,children:d}=b,D=C===void 0?!1:C,[f,A]=k.useState(D);let l;e[0]!==x?(l=t.jsx(x,{size:15}),e[0]=x,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=f&&"rotate-180";let r;e[4]!==h?(r=Q("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==f||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:f,onOpenChange:A,className:"mt-4",children:[c,s]}),e[14]=f,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function hr({orgSlug:b,virtualMcpId:e,branch:x,blockKey:n,block:C,decofile:d,meta:D,onManagePosts:f,onOpenPost:A,previewBaseUrl:l}){const i=at({orgSlug:b,virtualMcpId:e,branch:x}),h=mt(C,"categories"),[r,p,c]=ft(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,S)=>p({...r,[o]:S}),u=ut({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[B,y]=k.useState(a),[m,N]=k.useState(null),[w,$]=k.useState(!1),z=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],j=z.length,q=o=>s("slug",o),H=async(o,S)=>{const G=v(r.name);$(!0);try{let g=0;for(const{key:E,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:G,slug:S});F!==O&&(await i.mutateAsync({blockKey:E,data:R(E,"posts",dt(F))}),g+=1)}const P={...r,slug:S};await i.mutateAsync({blockKey:n,data:R(n,"categories",P)}),c(P),T.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),N(null)}catch(g){y(o),N(null),T.error(g instanceof Error?g.message:"Rename failed")}finally{$(!1)}},W=()=>{const o=B.trim();if(o===a){B!==o&&y(o);return}if(!o){y(a);return}if(j===0){q(o);return}N({oldSlug:a,newSlug:o,count:j})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(U,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Y,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(bt,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(M,{htmlFor:"category-slug",children:"Slug"}),t.jsx(L,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:W,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(M,{htmlFor:"category-description",children:"Description"}),t.jsx(L,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(Ct,{icon:Z,title:"Content",defaultOpen:!0,children:t.jsx(gt,{value:xt(r.sections),onChange:o=>s("sections",o),meta:D,sandboxRef:{orgSlug:b,virtualMcpId:e,branch:x},emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(I,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(U,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>f(a),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>A(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(I,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(_,{open:!!m,onOpenChange:o=>{o||w||(y(a),N(null))},children:t.jsxs(K,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:w,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&H(m.oldSlug,m.newSlug)},disabled:w,children:w?t.jsxs(t.Fragment,{children:[t.jsx(V,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{hr as CategoryEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as X,C as H,n as U,r as W,K as J,m as ee,d as Z,p as te,t as p,j as i,B as $}from"./index-Dq2GzmIa.js";import{u as ie}from"./studio-tools-DT3M_Vdz.js";import{b as se,S as ne,a as oe}from"./settings-section-DpMc0HVT.js";import{B as Q}from"./badge-D2XsHW2Y.js";import{I as ae}from"./input-_HbUXqOS.js";import{S as re,a as le,b as ce,c as de,d as me}from"./select-CrSxwLpY.js";const ue={off:"Off",auto:"Auto-join",request:"Require approval"};function fe(e,t){switch(e){case"auto":return`Anyone with a verified @${t} email joins automatically.`;case"request":return`People with a verified @${t} email can request to join; an admin approves.`;default:return"Not discoverable — no one can find or join through this domain."}}function be(){const e=X.c(69),{org:t}=H(),u=U(),s=ie(),[l,x]=W.useState("");let r;e[0]!==t.id?(r=J.organizationDomains(t.id),e[0]=t.id,e[1]=r):r=e[1];let c;e[2]!==s?(c=()=>s.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==r||e[5]!==c?(d={queryKey:r,queryFn:c},e[4]=r,e[5]=c,e[6]=d):d=e[6];const{data:f,isPending:j}=ee(d);let m;e[7]!==t.id||e[8]!==u?(m=()=>u.invalidateQueries({queryKey:J.organizationDomains(t.id)}),e[7]=t.id,e[8]=u,e[9]=m):m=e[9];const n=m;let N;e[10]!==s?(N=o=>s.call("ORGANIZATION_DOMAIN_ADD",{domain:o}),e[10]=s,e[11]=N):N=e[11];let v;e[12]!==n||e[13]!==t.id?(v=()=>{te("organization_domain_added",{organization_id:t.id}),x(""),n(),p.success("Domain added")},e[12]=n,e[13]=t.id,e[14]=v):v=e[14];let R;e[15]!==N||e[16]!==v?(R={mutationFn:N,onSuccess:v,onError:je},e[15]=N,e[16]=v,e[17]=R):R=e[17];const h=Z(R);let S;e[18]!==s?(S=o=>{const{id:a,joinMode:g}=o;return s.call("ORGANIZATION_DOMAIN_UPDATE",{id:a,joinMode:g})},e[18]=s,e[19]=S):S=e[19];let y;e[20]!==n?(y=()=>{n(),p.success("Join mode updated")},e[20]=n,e[21]=y):y=e[21];let V;e[22]!==S||e[23]!==y?(V={mutationFn:S,onSuccess:y,onError:ge},e[22]=S,e[23]=y,e[24]=V):V=e[24];const P=Z(V);let _;e[25]!==s?(_=o=>s.call("ORGANIZATION_DOMAIN_VERIFY",{id:o}),e[25]=s,e[26]=_):_=e[26];let A;e[27]!==n?(A=o=>{n(),o.verified?p.success("Domain verified"):p.error("TXT record not found yet — DNS can take a few minutes.")},e[27]=n,e[28]=A):A=e[28];let k;e[29]!==_||e[30]!==A?(k={mutationFn:_,onSuccess:A,onError:he},e[29]=_,e[30]=A,e[31]=k):k=e[31];const D=Z(k);let I;e[32]!==s?(I=o=>s.call("ORGANIZATION_DOMAIN_REMOVE",{id:o}),e[32]=s,e[33]=I):I=e[33];let b;e[34]!==n?(b=()=>{n(),p.success("Domain removed")},e[34]=n,e[35]=b):b=e[35];let q;e[36]!==I||e[37]!==b?(q={mutationFn:I,onSuccess:b,onError:xe},e[36]=I,e[37]=b,e[38]=q):q=e[38];const E=Z(q);if(j)return null;let z;e[39]!==f?.domains?(z=f?.domains??[],e[39]=f?.domains,e[40]=z):z=e[40];const K=z;let O;if(e[41]!==K||e[42]!==E||e[43]!==P||e[44]!==D){let o;e[46]!==E||e[47]!==P||e[48]!==D?(o=a=>{const g=a.verificationStatus==="verified";return i.jsx(se,{title:i.jsxs("span",{className:"flex items-center gap-2",children:[a.domain,g?i.jsx(Q,{variant:"secondary",children:"Verified"}):i.jsx(Q,{variant:"outline",children:"Pending"})]}),description:g?fe(a.joinMode,a.domain):"Add the DNS record below, then verify.",action:i.jsxs("div",{className:"flex items-center gap-2",children:[g&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-xs text-muted-foreground",children:"Join mode"}),i.jsxs(re,{value:a.joinMode,onValueChange:Y=>P.mutate({id:a.id,joinMode:Y}),children:[i.jsx(le,{className:"w-44",size:"sm",children:i.jsx(ce,{})}),i.jsx(de,{children:["off","auto","request"].map(pe)})]})]}),!g&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>D.mutate(a.id),disabled:D.isPending,children:"Verify"}),i.jsx($,{size:"sm",variant:"ghost",onClick:()=>E.mutate(a.id),disabled:E.isPending,children:"Remove"})]}),children:!g&&a.recordName&&a.recordValue&&i.jsx(Ne,{recordName:a.recordName,recordValue:a.recordValue})},a.id)},e[46]=E,e[47]=P,e[48]=D,e[49]=o):o=e[49],O=K.map(o),e[41]=K,e[42]=E,e[43]=P,e[44]=D,e[45]=O}else O=e[45];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=o=>x(o.target.value),e[50]=B):B=e[50];let M;e[51]!==l?(M=i.jsx(ae,{value:l,onChange:B,placeholder:"acme.com",className:"max-w-xs"}),e[51]=l,e[52]=M):M=e[52];let T;e[53]!==h||e[54]!==l?(T=()=>h.mutate(l.trim()),e[53]=h,e[54]=l,e[55]=T):T=e[55];let C;e[56]!==h.isPending||e[57]!==l?(C=!l.trim()||h.isPending,e[56]=h.isPending,e[57]=l,e[58]=C):C=e[58];const L=h.isPending?"Adding…":"Add domain";let w;e[59]!==T||e[60]!==C||e[61]!==L?(w=i.jsx($,{size:"sm",onClick:T,disabled:C,children:L}),e[59]=T,e[60]=C,e[61]=L,e[62]=w):w=e[62];let F;e[63]!==M||e[64]!==w?(F=i.jsxs("div",{className:"flex items-center gap-2 p-4",children:[M,w]}),e[63]=M,e[64]=w,e[65]=F):F=e[65];let G;return e[66]!==O||e[67]!==F?(G=i.jsx(ne,{title:"Email domains",description:"Let people with a matching email domain discover and join this organization.",children:i.jsxs(oe,{children:[O,F]})}),e[66]=O,e[67]=F,e[68]=G):G=e[68],G}function pe(e){return i.jsx(me,{value:e,children:ue[e]},e)}function xe(e){return p.error(e instanceof Error?e.message:"Failed to remove")}function he(e){return p.error(e instanceof Error?e.message:"Failed to verify")}function ge(e){return p.error(e instanceof Error?e.message:"Failed to update")}function je(e){return p.error(e instanceof Error?e.message:"Failed to add domain")}function Ne(e){const t=X.c(16),{recordName:u,recordValue:s}=e,l=ve;let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx("p",{className:"text-muted-foreground",children:"Add this TXT record at your DNS provider, then click Verify:"}),t[0]=x):x=t[0];let r;t[1]!==u?(r=()=>l(u),t[1]=u,t[2]=r):r=t[2];let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("span",{className:"text-muted-foreground",children:"TXT "}),t[3]=c):c=t[3];let d;t[4]!==u||t[5]!==r?(d=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:r,children:[c,u]}),t[4]=u,t[5]=r,t[6]=d):d=t[6];let f;t[7]!==s?(f=()=>l(s),t[7]=s,t[8]=f):f=t[8];let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsx("span",{className:"text-muted-foreground",children:"value "}),t[9]=j):j=t[9];let m;t[10]!==s||t[11]!==f?(m=i.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:f,children:[j,s]}),t[10]=s,t[11]=f,t[12]=m):m=t[12];let n;return t[13]!==d||t[14]!==m?(n=i.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[x,i.jsxs("div",{className:"grid gap-1",children:[d,m]})]}),t[13]=d,t[14]=m,t[15]=n):n=t[15],n}function ve(e){navigator.clipboard?.writeText(e),p.success("Copied")}export{be as D};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as J,r as u,j as r,i as se,B as Ne,d$ as Qt,aO as Xt,aU as ue,e0 as Jt,e1 as Yt,e2 as Zt,e3 as en,bL as tn,e4 as nn,e5 as at,aQ as rn,e6 as on,e7 as sn,e8 as an,e9 as ln,ea as cn,eb as dn,ec as un,ed as fn,ee as mn,l as ee,n as pn,t as W,K as Je}from"./index-Dq2GzmIa.js";import{F as xn,l as hn}from"./index-D1cQ6lKh.js";import{e as gn,aJ as vn,aK as yn}from"./agent-icon-cR-VXBAA.js";import{s as Cn}from"./XClose-BWc8duIO.js";import{m as wn}from"./automation-runs-IA98DU4N.js";import{b as Ye,T as Ze,a as et}from"./tooltip-BI-udduQ.js";import{b as jn}from"./chat-context-BAovwxgU.js";import{u as Nn}from"./shell-layout-DQaGi35E.js";import{s as ve,a as tt,f as bn}from"./index-DpAoOgpk.js";import{a as Sn,h as Mn,D as Rn,c as Dn,d as Pn,e as En}from"./dialog-DT5S2RMB.js";import{I as nt}from"./input-_HbUXqOS.js";import{c as kn,d as Tn,b as An,A as On,g as Fn,e as In,a as Ln,f as $n}from"./alert-dialog-CRKyaNBx.js";import{t as _n}from"./ChevronDown-C3MkOcZJ.js";import{i as zn}from"./ChevronRight-D7I_d6Rs.js";import{a as Gn}from"./ZoomOut-C_Zu7-Q5.js";import{v as Kn,E as Bn,w as ke,x as Te,y as Un,z as Vn,A as Hn,C as Wn,D as Q,G as ye,I as Ae,J as Ce,g as Oe,K as Fe,M as qn,N as Qn,O as Xn,P as we,Q as Ie,U as Jn,V as Yn,W as Zn,X as er}from"./index-MzuqcCtH.js";import"./AlertCircle-TjPHcEnP.js";import"./Tool01-DTY-fPyM.js";import"./ArrowUp-D620niSP.js";import"./Settings02-BNJ32xSl.js";import"./Tool02-C5wUTAFe.js";import"./XCircle-Di7Lb4ZU.js";import"./ArrowUpRight-BH4m-RJh.js";import"./TrendUp01--_jCdLU4.js";import"./ZapSquare-CqcwFWlA.js";import"./Users03-Bk7hrtUP.js";import"./CheckCircle-wgdag1z7.js";import"./ChevronUp-BcAa4Ljr.js";import"./DotsVertical-BkJg419g.js";import"./Stars02-7EGkcn1l.js";import"./Copy01-ybfnME4F.js";import"./Globe01-e5qIDEbr.js";import"./Eye-CeD9rgkI.js";import"./FilterLines-DTDvdHSv.js";import"./Star01-5GqPaTBh.js";import"./Globe04-Bxmic94-.js";import"./SwitchHorizontal01-CWRzX-Fm.js";import"./HardDrive-Bo4OGyrd.js";import"./Image01-Cm0pa05N.js";import"./Key01-Dz6Z8ZMZ.js";import"./LayoutLeft--D_GxkO2.js";import"./LinkExternal01-eA6vVQM3.js";import"./Monitor01-CbDoyDRV.js";import"./Sun-C4Fwh1Vu.js";import"./Package-BRrJc9sL.js";import"./Palette-D12yKiV2.js";import"./Play-CQU4qZuG.js";import"./Plus-CaVUuJOD.js";import"./SearchLg-CIPUU7M2.js";import"./SearchMd-7xF40qNR.js";import"./Shield01-CfES6vR4.js";import"./Stars01-DrN-Oz3U.js";import"./Trash01-D4xE6JK2.js";import"./Upload01-Baccrojk.js";import"./User01-B_wV9DLb.js";import"./Users01--ZODDl59.js";import"./X-Dg7rsVai.js";import"./Zap-BS9GJrhH.js";import"./select-CrSxwLpY.js";import"./useInfiniteQuery-CErl8eUD.js";import"./use-infinite-scroll-C_M049Oj.js";import"./use-connection-BYUOXcTZ.js";import"./use-collections-BakROzwv.js";import"./use-mcp-client-BET4cVQ2.js";import"./auth-DgHUqP65.js";import"./use-virtual-mcp-B1v9ZXLU.js";import"./card-CPTg8fDY.js";import"./sidebar-C5_XfNYh.js";import"./use-mobile-BjsEeYVy.js";import"./table-CjtfrukD.js";import"./empty-state-D9Dn1Lnz.js";import"./use-members-Dmwu4pSZ.js";import"./use-org-auth-client-BZS4V2Lt.js";import"./use-clock-tick-DOOmIKzq.js";import"./use-automations-CqRQFXK6.js";import"./studio-tools-DT3M_Vdz.js";import"./useSuspenseInfiniteQuery-CqYcpPIQ.js";import"./avatar-Cg58Qi4s.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-X1Kg3Hp6.js";import"./file-type-icon-XKnElsdT.js";import"./tab-id-BijBBRwE.js";import"./hooks-CKtulQ0t.js";import"./decopilot-sse-pool-C_pTq61C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-Bq9EBE_u.js";import"./index-DyWjSb5y.js";import"./calendar-DxMjhXOp.js";import"./integration-icon-CGshMm4e.js";import"./use-navigate-to-agent-C4BCBCv3.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-Cn-bvgNR.js";import"./form-CFqk5lJy.js";import"./label-BtGdlmhk.js";import"./autosend-TZVzvR_1.js";import"./use-ai-providers-w9d34g0F.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-DDc7EwGs.js";import"./use-organization-settings-C0IXRiP_.js";import"./required-auth-layout-DLhyslwf.js";import"./use-org-sso-DIQMNs43.js";import"./drawer-XzD4hvpg.js";import"./collection-search-Btrf8Diq.js";import"./index-B0JPF-6M.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-COi_RGkf.js";import"./use-mcp-tools-z0J_EOSL.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-ClWKGwOW.js";import"./mcp-oauth-D4aGhRIx.js";import"./extract-connection-data-nMVGabj3.js";import"./dropdown-menu-EMizUbgW.js";import"./popover-DuDwu8ZY.js";import"./command-0HaDsh2Q.js";import"./index-BojbkbvA.js";import"./companions-core-DJ2SKsFs.js";import"./tabs-Ca1nnDrk.js";import"./toggle-group-a5DM2sSK.js";import"./use-deco-credits-DGCPQWxL.js";import"./connection-card-DwBQfP1R.js";import"./use-registry-connections-BThC_Q4I.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BHzi6Dhm.js";import"./connection-form-helpers-7cL_OUk8.js";import"./collection-tabs-kwELhDMx.js";import"./badge-D2XsHW2Y.js";import"./connect-desktop-dialog-CkUcaE26.js";import"./select-model-CPc7lxVf.js";import"./checkbox-BdHs-X49.js";import"./skeleton-CFwDF8gK.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DpMc0HVT.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D8lhFnWZ.js";import"./toolbar-BptqFiOS.js";import"./use-capability-DMFGKIH5.js";import"./toolbar-icon-button-BAMgsY3V.js";import"./use-debounced-autosave-C2vhIJrv.js";import"./index-DoiBq52a.js";import"./search-input-CuP775da.js";import"./use-mcp-auth-status-ClCJfdlL.js";import"./switch-BlPs3ERk.js";import"./github-repo-picker-DpzVLTnS.js";import"./use-debounced-value-BcV326dl.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-C4jt5KwT.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-dAie7zDN.js";import"./automation-list-row-aKON7NTD.js";const tr={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function nr(i){const e=J.c(51),{open:s,mode:a,initialName:c,parentLabel:m,isPending:x,onSubmit:p,onOpenChange:g}=i,y=c===void 0?"":c,d=x===void 0?!1:x,[h,w]=u.useState(y),[R,k]=u.useState(s),v=tr[a];s!==R&&(k(s),s&&w(y));let j;e[0]!==d||e[1]!==g?(j=O=>{!O&&!d&&g(!1)},e[0]=d,e[1]=g,e[2]=j):j=e[2];const U=j;let S;e[3]!==d||e[4]!==h||e[5]!==p?(S=async O=>{O.preventDefault();const q=h.trim();!q||d||await p(q)},e[3]=d,e[4]=h,e[5]=p,e[6]=S):S=e[6];const D=S;let b;e[7]!==v.title?(b=r.jsx(Sn,{children:v.title}),e[7]=v.title,e[8]=b):b=e[8];let C;e[9]!==v.description?(C=r.jsx(Mn,{children:v.description}),e[9]=v.description,e[10]=C):C=e[10];let P;e[11]!==b||e[12]!==C?(P=r.jsxs(Rn,{children:[b,C]}),e[11]=b,e[12]=C,e[13]=P):P=e[13];let M;e[14]!==m?(M=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(nt,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=m,e[15]=M):M=e[15];let V;e[16]===Symbol.for("react.memo_cache_sentinel")?(V=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=V):V=e[16];let I;e[17]===Symbol.for("react.memo_cache_sentinel")?(I=O=>w(O.target.value),e[17]=I):I=e[17];let z;e[18]!==v.placeholder||e[19]!==d||e[20]!==h?(z=r.jsxs("div",{className:"space-y-1.5",children:[V,r.jsx(nt,{id:"file-explorer-name",value:h,onChange:I,placeholder:v.placeholder,autoFocus:!0,disabled:d})]}),e[18]=v.placeholder,e[19]=d,e[20]=h,e[21]=z):z=e[21];let L;e[22]!==z||e[23]!==M?(L=r.jsxs("div",{className:"space-y-4 py-4",children:[M,z]}),e[22]=z,e[23]=M,e[24]=L):L=e[24];let T;e[25]!==g?(T=()=>g(!1),e[25]=g,e[26]=T):T=e[26];let G;e[27]!==d||e[28]!==T?(G=r.jsx(Ne,{type:"button",variant:"outline",onClick:T,disabled:d,children:"Cancel"}),e[27]=d,e[28]=T,e[29]=G):G=e[29];let H;e[30]!==d||e[31]!==h?(H=!h.trim()||d,e[30]=d,e[31]=h,e[32]=H):H=e[32];let K;e[33]!==v.submit||e[34]!==d?(K=d?r.jsxs(r.Fragment,{children:[r.jsx(se,{size:14,className:"animate-spin"}),"Saving…"]}):v.submit,e[33]=v.submit,e[34]=d,e[35]=K):K=e[35];let A;e[36]!==H||e[37]!==K?(A=r.jsx(Ne,{type:"submit",disabled:H,children:K}),e[36]=H,e[37]=K,e[38]=A):A=e[38];let E;e[39]!==G||e[40]!==A?(E=r.jsxs(Dn,{children:[G,A]}),e[39]=G,e[40]=A,e[41]=E):E=e[41];let $;e[42]!==D||e[43]!==L||e[44]!==E||e[45]!==P?($=r.jsx(Pn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:D,children:[P,L,E]})}),e[42]=D,e[43]=L,e[44]=E,e[45]=P,e[46]=$):$=e[46];let _;return e[47]!==U||e[48]!==s||e[49]!==$?(_=r.jsx(En,{open:s,onOpenChange:U,children:$}),e[47]=U,e[48]=s,e[49]=$,e[50]=_):_=e[50],_}function rr(i){const e=J.c(31),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:c,onOpenChange:m,onConfirm:x}=i,p=s!==null,g=s?.kind==="directory"?"folder":"file";let y;e[0]!==g?(y=r.jsxs(kn,{children:["Delete ",g,"?"]}),e[0]=g,e[1]=y):y=e[1];const d=s?.name;let h;e[2]!==d?(h=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=h):h=e[3];const w=s?.kind==="directory"?" and everything inside it.":".";let R;e[4]!==a.length?(R=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=R):R=e[5];let k;e[6]!==h||e[7]!==w||e[8]!==R?(k=r.jsxs(Tn,{children:["This will permanently delete"," ",h,w,R]}),e[6]=h,e[7]=w,e[8]=R,e[9]=k):k=e[9];let v;e[10]!==y||e[11]!==k?(v=r.jsxs(An,{children:[y,k]}),e[10]=y,e[11]=k,e[12]=v):v=e[12];let j;e[13]!==c?(j=r.jsx(On,{disabled:c,children:"Cancel"}),e[13]=c,e[14]=j):j=e[14];const U=c||!s;let S;e[15]!==s||e[16]!==x?(S=M=>{M.preventDefault(),s&&x(s)},e[15]=s,e[16]=x,e[17]=S):S=e[17];let D;e[18]!==U||e[19]!==S?(D=r.jsx(Fn,{disabled:U,onClick:S,children:"Delete"}),e[18]=U,e[19]=S,e[20]=D):D=e[20];let b;e[21]!==j||e[22]!==D?(b=r.jsxs(In,{children:[j,D]}),e[21]=j,e[22]=D,e[23]=b):b=e[23];let C;e[24]!==b||e[25]!==v?(C=r.jsxs(Ln,{children:[v,b]}),e[24]=b,e[25]=v,e[26]=C):C=e[26];let P;return e[27]!==m||e[28]!==p||e[29]!==C?(P=r.jsx($n,{open:p,onOpenChange:m,children:C}),e[27]=m,e[28]=p,e[29]=C,e[30]=P):P=e[30],P}var Le="ContextMenu",[or]=rn(Le,[at]),B=at(),[sr,it]=or(Le),lt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:c,modal:m=!0}=i,[x,p]=u.useState(!1),g=B(e),y=tn(a),d=u.useCallback(h=>{p(h),y(h)},[y]);return r.jsx(sr,{scope:e,open:x,onOpenChange:d,modal:m,children:r.jsx(nn,{...g,dir:c,open:x,onOpenChange:d,modal:m,children:s})})};lt.displayName=Le;var ct="ContextMenuTrigger",dt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...c}=i,m=it(ct,s),x=B(s),p=u.useRef({x:0,y:0}),g=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),y=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(y.current),[]),h=w=>{p.current={x:w.clientX,y:w.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Qt,{...x,virtualRef:g}),r.jsx(Xt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:ue(i.onContextMenu,w=>{d(),h(w),w.preventDefault()}),onPointerDown:a?i.onPointerDown:ue(i.onPointerDown,je(w=>{d(),y.current=window.setTimeout(()=>h(w),700)})),onPointerMove:a?i.onPointerMove:ue(i.onPointerMove,je(d)),onPointerCancel:a?i.onPointerCancel:ue(i.onPointerCancel,je(d)),onPointerUp:a?i.onPointerUp:ue(i.onPointerUp,je(d))})]})});dt.displayName=ct;var ar="ContextMenuPortal",ut=i=>{const{__scopeContextMenu:e,...s}=i,a=B(e);return r.jsx(Zt,{...a,...s})};ut.displayName=ar;var ft="ContextMenuContent",mt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=it(ft,s),m=B(s),x=u.useRef(!1);return r.jsx(en,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{i.onCloseAutoFocus?.(p),!p.defaultPrevented&&x.current&&p.preventDefault(),x.current=!1},onInteractOutside:p=>{i.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(x.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mt.displayName=ft;var ir="ContextMenuGroup",lr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(on,{...c,...a,ref:e})});lr.displayName=ir;var cr="ContextMenuLabel",dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(sn,{...c,...a,ref:e})});dr.displayName=cr;var ur="ContextMenuItem",pt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(Jt,{...c,...a,ref:e})});pt.displayName=ur;var fr="ContextMenuCheckboxItem",mr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(an,{...c,...a,ref:e})});mr.displayName=fr;var pr="ContextMenuRadioGroup",xr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(ln,{...c,...a,ref:e})});xr.displayName=pr;var hr="ContextMenuRadioItem",gr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(cn,{...c,...a,ref:e})});gr.displayName=hr;var vr="ContextMenuItemIndicator",yr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(dn,{...c,...a,ref:e})});yr.displayName=vr;var Cr="ContextMenuSeparator",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(Yt,{...c,...a,ref:e})});xt.displayName=Cr;var wr="ContextMenuArrow",jr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(un,{...c,...a,ref:e})});jr.displayName=wr;var Nr="ContextMenuSubTrigger",br=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(fn,{...c,...a,ref:e})});br.displayName=Nr;var Sr="ContextMenuSubContent",Mr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,c=B(s);return r.jsx(mn,{...c,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Mr.displayName=Sr;function je(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Rr=lt,Dr=dt,Pr=ut,Er=mt,kr=pt,Tr=xt;function Ar(i){const e=J.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Rr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Or(i){const e=J.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Dr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Fr(i){const e=J.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let c;e[3]!==s?(c=ee("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(Pr,{children:r.jsx(Er,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function oe(i){const e=J.c(12);let s,a,c,m;e[0]!==i?({className:s,inset:a,variant:m,...c}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=c,e[4]=m):(s=e[1],a=e[2],c=e[3],m=e[4]);const x=m===void 0?"default":m;let p;e[5]!==s?(p=ee("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=p):p=e[6];let g;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==x?(g=r.jsx(kr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":x,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=x,e[11]=g):g=e[11],g}function rt(i){const e=J.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let c;e[3]!==s?(c=ee("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(Tr,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}const Ir="#d9a441";function Lr(i){const e=J.c(45),{node:s,depth:a,isExpanded:c,isSelected:m,isLoading:x,fileVisual:p,onOpen:g,onSelect:y,onNewFile:d,onNewFolder:h,onCopyPath:w,onCopyRelativePath:R,onRename:k,onDelete:v}=i,j=x===void 0?!1:x,U=s.kind==="directory",{Icon:S,color:D}=p,b=m&&"bg-accent";let C;e[0]!==b?(C=ee("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",b),e[0]=b,e[1]=C):C=e[1];const P=`${a*14+8}px`;let M;e[2]!==P?(M={paddingLeft:P},e[2]=P,e[3]=M):M=e[3];let V;e[4]!==g||e[5]!==y?(V=()=>{y(),g()},e[4]=g,e[5]=y,e[6]=V):V=e[6];let I;e[7]!==S||e[8]!==D||e[9]!==U||e[10]!==c||e[11]!==j?(I=U?r.jsxs(r.Fragment,{children:[j?r.jsx(se,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(_n,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(zn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Gn,{size:16,className:"shrink-0",style:{color:Ir}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(S,{size:16,className:"shrink-0",style:{color:D}})]}),e[7]=S,e[8]=D,e[9]=U,e[10]=c,e[11]=j,e[12]=I):I=e[12];let z;e[13]!==s.name?(z=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=z):z=e[14];let L;e[15]!==C||e[16]!==M||e[17]!==V||e[18]!==I||e[19]!==z?(L=r.jsx(Or,{asChild:!0,children:r.jsxs("button",{type:"button",className:C,style:M,onClick:V,children:[I,z]})}),e[15]=C,e[16]=M,e[17]=V,e[18]=I,e[19]=z,e[20]=L):L=e[20];let T;e[21]!==d?(T=r.jsx(oe,{onSelect:d,children:"New File"}),e[21]=d,e[22]=T):T=e[22];let G;e[23]!==h?(G=r.jsx(oe,{onSelect:h,children:"New Folder"}),e[23]=h,e[24]=G):G=e[24];let H;e[25]===Symbol.for("react.memo_cache_sentinel")?(H=r.jsx(rt,{}),e[25]=H):H=e[25];let K;e[26]!==w?(K=r.jsx(oe,{onSelect:w,children:"Copy Path"}),e[26]=w,e[27]=K):K=e[27];let A;e[28]!==R?(A=r.jsx(oe,{onSelect:R,children:"Copy Relative Path"}),e[28]=R,e[29]=A):A=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=r.jsx(rt,{}),e[30]=E):E=e[30];let $;e[31]!==k?($=r.jsx(oe,{onSelect:k,children:"Rename"}),e[31]=k,e[32]=$):$=e[32];let _;e[33]!==v?(_=r.jsx(oe,{variant:"destructive",onSelect:v,children:"Delete"}),e[33]=v,e[34]=_):_=e[34];let O;e[35]!==T||e[36]!==G||e[37]!==K||e[38]!==A||e[39]!==$||e[40]!==_?(O=r.jsxs(Fr,{className:"w-52",children:[T,G,H,K,A,E,$,_]}),e[35]=T,e[36]=G,e[37]=K,e[38]=A,e[39]=$,e[40]=_,e[41]=O):O=e[41];let q;return e[42]!==O||e[43]!==L?(q=r.jsxs(Ar,{children:[L,O]}),e[42]=O,e[43]=L,e[44]=q):q=e[44],q}hn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const ot=200,$r=2,_r=250,st=200;function zr(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Gr(i){const e=J.c(9),{text:s,query:a}=i;let c,m,x;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:g,segments:y}=qn(s,a);c="truncate font-mono text-muted-foreground",m=g&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),x=y.map(Kr),e[0]=a,e[1]=s,e[2]=c,e[3]=m,e[4]=x}else c=e[2],m=e[3],x=e[4];let p;return e[5]!==c||e[6]!==m||e[7]!==x?(p=r.jsxs("span",{className:c,children:[m,x]}),e[5]=c,e[6]=m,e[7]=x,e[8]=p):p=e[8],p}function Kr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function Oa({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[c,m]=u.useState({files:[],directories:[],truncated:!1}),{files:x,directories:p}=c,[g,y]=u.useState(new Set),[d,h]=u.useState(null),[w,R]=u.useState(null),[k,v]=u.useState([]),[j,U]=u.useState(""),[S,D]=u.useState(null),[b,C]=u.useState(null),[P,M]=u.useState(!1),[V,I]=u.useState(!1),[z,L]=u.useState(!1),[T,G]=u.useState(!1),[,H]=u.useState(new Set),[K,A]=u.useState(new Set),E=u.useRef(0),$=u.useRef(null),_=u.useRef(new Set),O=u.useRef(new Map),q=u.useRef(null),te=u.useRef(0),be=u.useRef(null),ae=u.useRef(null),Se=u.useRef(null);function $e(t){H(n=>{const o=typeof t=="function"?t(n):t;return _.current=o,o})}const[ie,ne]=u.useState(new Map),Me=u.useRef(null),[Y,fe]=u.useState(null),{sendMessage:ht}=jn(),{openSidePanel:gt}=Nn(),me=pn(),[F,X]=u.useState(null),[Re,De]=u.useState(null),[pe,xe]=u.useState(!1);async function Z(t,n){const o=await fetch(zr(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function he(){me.invalidateQueries({queryKey:tt(i,e,s)})}function _e(t,n){navigator.clipboard.writeText(n).then(()=>W.success(`${t} copied`),()=>W.error(`Failed to copy ${t.toLowerCase()}`))}function vt(t){const n=Zn(t);if(!n)return;const o=`${i}/${e}/${s}`;me.setQueryData(Je.decofile(o),l=>{if(!l)return l;const{[n]:f,...N}=l;return N}),me.invalidateQueries({queryKey:Je.liveMeta(i,e,s)})}function yt(t){const n=t.kind==="file"?[t.path]:x.filter(o=>o.startsWith(".deco/blocks/")).map(o=>ye(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function Ct(t){const n=ye(t);return k.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=ie.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function ze(t){v(n=>n.map(o=>t(o)).filter(o=>o!==null)),h(n=>n&&t(n)),ne(n=>{const o=new Map;for(const[l,f]of n){const N=t(l);N&&o.set(N,f)}return o}),R(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function wt(t){const n=ye(t);R(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),ze(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t){if(!F)return;const n=we(F.parentDir,t);if(Ie(n,x,p))throw new Error(`"${t}" already exists`);await Z("write",{path:Q(n),content:""}),await le(),await he(),X(null),ce(n)}async function Nt(t){if(!F)return;const n=we(F.parentDir,t);if(Ie(n,x,p))throw new Error(`"${t}" already exists`);const o=Q(n);await Z("mkdir",{path:o}),m(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await le(),await he(),X(null),y(l=>{const f=new Set(l);for(const N of Te(n))f.add(N);return f.add(n),f}),R({name:t,path:n,kind:"directory",children:[]})}async function bt(t){if(!F)return;const n=F.node.path,o=Ce(n),l=we(o,t);if(l===n){X(null);return}if(Ie(l,x,p))throw new Error(`"${t}" already exists`);await Z("rename",{from:Q(n),to:Q(l)}),ze(f=>f===n?l:f.startsWith(`${n}/`)?we(l,f.slice(n.length+1)):f),await le(),await he(),X(null)}async function St(t){xe(!0);try{await Z("unlink",{path:Q(t.path),recursive:t.kind==="directory"}),yt(t),wt(t.path),await le(),await he(),De(null),W.success(`Deleted "${t.name}"`)}catch(n){W.error(n instanceof Error?n.message:"Delete failed")}finally{xe(!1)}}async function Mt(t){const n=Xn(t);if(n){W.error(n);return}xe(!0);try{F?.mode==="new-file"?(await jt(t),W.success(`Created "${t}"`)):F?.mode==="new-folder"?(await Nt(t),W.success(`Created folder "${t}"`)):F?.mode==="rename"&&(await bt(t),W.success(`Renamed to "${t}"`))}catch(o){W.error(o instanceof Error?o.message:"Operation failed")}finally{xe(!1)}}const Ge=u.useRef(!1);Ge.current||(Ge.current=!0,$.current=le());const[Rt,Dt]=u.useState(null);if(a&&a!==Rt){Dt(a);const t=a;queueMicrotask(()=>{Kn(t)&&ce(t).catch(n=>{W.error(n instanceof Error?n.message:"Failed to open file")})})}async function Pe(t){const n=await Z("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ke(t,n,o){if(o!==E.current)return!1;let l=!1;return m(f=>{const N=n?er(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!N.truncated,{files:N.files,directories:N.directories,truncated:l}}),l&&W.warning("File list truncated — some files may be hidden"),l}async function Pt(t){const n=O.current.get(t);if(n)return n;const o=E.current,l=(async()=>{const f=await Pe({pattern:"**/*",path:Q(t),limit:ke}),N=Ke(f,!0,o);return!N&&o===E.current&&$e(de=>{const ge=new Set(de);return ge.add(t),ge}),N})();O.current.set(t,l);try{return await l}finally{O.current.delete(t)}}async function Be(t){if(!Fe(t,_.current))return!1;A(n=>new Set(n).add(t));try{return await Pt(t)}finally{A(n=>{const o=new Set(n);return o.delete(t),o})}}async function Et(t){const n=new Set(_.current);for(const o of Te(t)){if(!Fe(o,n))continue;if(await Be(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function le(){const t=++E.current;be.current=null,ae.current=null,O.current.clear(),L(!0),$e(new Set),y(new Set),A(new Set);try{const n=await Pe({pattern:"**/*",limit:ke,maxDepth:Bn});Ke(n,!1,t),G(!0)}catch{T&&W.error("Failed to refresh file tree")}finally{L(!1)}}async function Ue(t){if(!ie.get(t)?.loaded){ne(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await Z("read",{path:Q(t),full:!0}),l=Qn(o.content??"");ne(f=>{const N=new Map(f);return N.set(t,{savedContent:l,editorValue:l,loaded:!0}),N})}catch{}}}function kt(){te.current++,D(null),C(null),M(!1),I(!1)}async function Tt(){const t=E.current,n=be.current;if(n&&n.generation===t)return n.files;const o=ae.current;if(o&&o.generation===t)return o.promise;const l=(async()=>{const f=await Pe({pattern:"**/*",limit:ke});return E.current===t&&(be.current={generation:t,files:f.files}),f.files})();ae.current={generation:t,promise:l};try{return await l}finally{ae.current?.generation===t&&(ae.current=null)}}async function At(t,n){try{const o=await Tt();if(n!==te.current)return;D(Jn(o,t,st))}catch{if(n!==te.current)return;D([])}}async function Ot(t,n){M(!0);try{const o=await Z("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:ot});if(n!==te.current)return;C(Yn(o.results??"")),I((o.matchCount??0)>=ot)}catch{if(n!==te.current)return;C([]),I(!1)}finally{n===te.current&&M(!1)}}function Ft(t){const n=t.trim(),o=++te.current;At(n,o),n.length<$r?(C(null),M(!1),I(!1)):Ot(n,o)}function It(t){if(U(t),q.current&&clearTimeout(q.current),!t.trim()){kt();return}q.current=setTimeout(()=>{Ft(t)},_r)}function Ve(t){const n=Se.current;if(!n||n.path!==d)return;Se.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function Lt(t){Se.current={path:t.path,line:t.line};const n=d===t.path&&ie.get(t.path)?.loaded;ce(t.path),n&&Me.current&&Ve(Me.current)}async function $t(t,n){try{await Z("write",{path:Q(t),content:n}),ve("file saved via sandbox /write",{path:t}),me.invalidateQueries({queryKey:tt(i,e,s)});try{const o=await bn(i,e,s);ve("git status after save",o)}catch(o){ve("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}ne(o=>{const l=new Map(o),f=l.get(t);return f&&l.set(t,{...f,savedContent:n}),l})}catch(o){ve("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){h(t),R({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),fe(null),k.includes(t)||v(n=>[...n,t]),Ue(t)}function zt(t){v(n=>{const o=n.filter(l=>l!==t);return d===t&&h(o[o.length-1]??null),o}),ne(n=>{const o=new Map(n);return o.delete(t),o})}function He(t){y(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Gt(t){if(Fe(t,_.current))try{if(await Be(t))return}catch(n){W.error(n instanceof Error?n.message:"Failed to load folder");return}He(t)}async function Kt(t,n){if(n){He(t);return}await Gt(t)}async function ce(t){await $.current,await Et(t);const n=Te(t);y(o=>{const l=new Set(o);for(const f of n)l.add(f);return l}),_t(t)}function Bt(){return w?.kind==="directory"?w.path:w?.kind==="file"?Ce(w.path):d?Ce(d):"/"}function We(t){const n=Bt();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Ut=Un(x,p),qe=Vn(Ut,g),Ee=S?.length??0,Qe=Hn(b??[]),Xe=b?.length??0,re=d?ie.get(d):null,Vt=re?.loaded&&re.editorValue!==re.savedContent,Ht=Re?Ct(Re.path):[],Wt=(t,n)=>{Me.current=t,Ve(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await $t(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const f=l.getValueInRange(o);fe({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function qt(t){if(!Y)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${Y.filePath}\``,`**Lines:** ${Y.lineStart}–${Y.lineEnd}`];if(Y.selectedCode){const o=Oe(Y.filePath),l=Y.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),gt("chat"),ht({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),fe(null)}return z&&!T?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(gn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:j,onChange:t=>It(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(Ye,{children:[r.jsx(Ze,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>We("new-file"),children:r.jsx(vn,{size:14})})}),r.jsx(et,{side:"bottom",children:"New file"})]}),r.jsxs(Ye,{children:[r.jsx(Ze,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>We("new-folder"),children:r.jsx(yn,{size:14})})}),r.jsx(et,{side:"bottom",children:"New folder"})]})]}),r.jsx(wn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!j&&qe.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",f=g.has(n.path),N=w?.path===n.path,de=Wn(n.path,n.kind),ge=l&&K.has(n.path);return r.jsx(Lr,{node:n,depth:o,isExpanded:f,isSelected:N,isLoading:ge,fileVisual:Ae(n.name),onSelect:()=>R(n),onOpen:()=>{l?Kt(n.path,f):ce(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:de}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:de}),onCopyPath:()=>_e("Path",ye(n.path)),onCopyRelativePath:()=>_e("Relative path",Q(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:de}),onDelete:()=>De(n)},n.path)}),!j&&T&&qe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No files found"}),j&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:"Files"}),Ee>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Ee,Ee>=st?"+":""]})]}),S!==null&&S.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"No file names match"}),S?.map(t=>{const n=t.split("/").pop()??t,o=Ce(t),{Icon:l,color:f}=Ae(n),N=d===t;return r.jsxs("button",{type:"button",onClick:()=>{ce(t)},title:t,className:ee("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",N&&"bg-accent"),children:[r.jsx(l,{size:14,className:ee("shrink-0",f)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),j&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:"In files"}),Xe>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Xe,V?"+":""]}),P&&r.jsx(se,{size:10,className:"animate-spin"})]}),!P&&b!==null&&Qe.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"No matches in file contents"}),Qe.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:l}=Ae(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:ee("shrink-0",l)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(f=>r.jsxs("button",{type:"button",onClick:()=>Lt(f),title:`${t.path}:${f.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:f.line}),r.jsx(Gr,{text:f.text,query:j})]},`${t.path}:${f.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[k.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:k.map(t=>{const n=ie.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:ee("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{h(t),Ue(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:N=>{N.stopPropagation(),zt(t)},children:r.jsx(Cn,{size:12})})]},t)})}),Y&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&qt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&fe(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&re?.loaded?r.jsx(xn,{language:Oe(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:re.editorValue,path:d,onChange:t=>{const n=d;n&&ne(o=>{const l=new Map(o),f=l.get(n);return f&&l.set(n,{...f,editorValue:t??""}),l})},onMount:Wt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!re?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[Vt?"Modified":"Saved"," ·"," ",Oe(d)]})]})]}),r.jsx(nr,{open:F!==null,mode:F?.mode??"new-file",initialName:F?.mode==="rename"?F.node.name:"",parentLabel:F&&F.mode!=="rename"?F.parentDir==="/"?"/":Q(F.parentDir):void 0,isPending:pe,onSubmit:Mt,onOpenChange:t=>{!t&&!pe&&X(null)}}),r.jsx(rr,{deleteTarget:Re,deleteDirtyPaths:Ht,fsActionPending:pe,onOpenChange:t=>{!t&&!pe&&De(null)},onConfirm:t=>{St(t)}})]})}export{Oa as FileExplorer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as K,C as B,n as M,M as Q,J as Z,d as V,p as T,t as w,K as L,j as n,ah as P,H,I as k,c as E,r as I,B as Y,D as q,s as J}from"./index-Dq2GzmIa.js";import{P as N}from"./index-DoiBq52a.js";import{u as W}from"./use-org-auth-client-BZS4V2Lt.js";import{u as X}from"./use-debounced-autosave-C2vhIJrv.js";import{A as ee}from"./avatar-Cg58Qi4s.js";import{I as $}from"./input-_HbUXqOS.js";import{S as G,a as U,b as A,c as te}from"./settings-section-DpMc0HVT.js";import{D as ne}from"./domain-settings-B5aXl5-3.js";import{u as ae}from"./studio-tools-DT3M_Vdz.js";import{c as oe,b as se,d as ie,A as re,e as le,g as ce,a as ue,f as de}from"./alert-dialog-CRKyaNBx.js";import{R as me}from"./require-capability-DXSues5j.js";import"./sidebar-C5_XfNYh.js";import"./LayoutLeft--D_GxkO2.js";import"./use-mobile-BjsEeYVy.js";import"./X-Dg7rsVai.js";import"./tooltip-BI-udduQ.js";import"./User01-B_wV9DLb.js";import"./card-CPTg8fDY.js";import"./ArrowUpRight-BH4m-RJh.js";import"./badge-D2XsHW2Y.js";import"./select-CrSxwLpY.js";import"./ChevronUp-BcAa4Ljr.js";import"./ChevronDown-C3MkOcZJ.js";import"./use-capability-DMFGKIH5.js";import"./access-gate-BPnO_2yT.js";import"./capability-load-error-96MaJwmz.js";const ge=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function fe(e){return typeof e=="string"&&ge.has(e.trim().toLowerCase())}const pe=H({name:k().min(1,"Name is required").max(255,"Name is too long"),slug:k().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!fe(e),"This organization URL is reserved by Studio"),logo:k().optional()});function he(e){const t=E.c(13),{value:v,onChange:h,name:s,disabled:d}=e,m=I.useRef(null);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>m.current?.click(),t[0]=l):l=t[0];const r=l;let c;t[1]!==h?(c=x=>{const j=x.target.files?.[0];if(!j)return;if(j.size>2097152){w.error("Image must be smaller than 2MB");return}const u=new FileReader;u.onerror=xe,u.onloadend=()=>{u.result&&h(u.result),m.current&&(m.current.value="")},u.readAsDataURL(j)},t[1]=h,t[2]=c):c=t[2];const a=c;let o;t[3]!==d||t[4]!==a?(o=n.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:d}),t[3]=d,t[4]=a,t[5]=o):o=t[5];const i=v||void 0,p=s??"?";let g;t[6]!==i||t[7]!==p?(g=n.jsx(ee,{url:i,fallback:p,shape:"square",size:"base"}),t[6]=i,t[7]=p,t[8]=g):g=t[8];let f;return t[9]!==d||t[10]!==o||t[11]!==g?(f=n.jsxs("button",{type:"button",onClick:r,disabled:d,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[o,g]}),t[9]=d,t[10]=o,t[11]=g,t[12]=f):f=t[12],f}function xe(){return w.error("Failed to read image")}function je(){const e=K(),{org:t}=B(),v=W(),h=M(),s=Q({resolver:Z(pe),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),d=V({mutationFn:async a=>{const o={name:a.name,slug:a.slug};a.logo&&(o.logo=a.logo);const i=await v.organization.update({data:o});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,o)=>{T("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),h.invalidateQueries({queryKey:L.organizations()}),h.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,o)=>{T("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:m,flush:l}=X({save:async()=>{const a=s.control._formState.dirtyFields;if(Object.keys(a).length===0||!await s.trigger())return;const i=s.getValues(),p=s.control._defaultValues;s.reset(i,{keepValues:!0});try{await d.mutateAsync(i)}catch{s.reset(p,{keepValues:!0})}}}),r=s.formState.errors,c=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(G,{children:n.jsxs(U,{children:[n.jsx(A,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(he,{value:s.watch("logo"),onChange:a=>{s.setValue("logo",a??"",{shouldDirty:!0}),l()},name:s.watch("name")})}),n.jsx(A,{title:"Name",action:n.jsx(P,{control:s.control,name:"name",render:({field:a})=>n.jsx($,{id:"org-name",...a,onChange:o=>{a.onChange(o),m()},onBlur:()=>{a.onBlur(),l()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(A,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[c&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:c}),n.jsx(P,{control:s.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const i=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");s.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),m()},onBlur:()=>{a.onBlur(),l()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function ve(){const e=E.c(42),{org:t}=B(),[v,h]=I.useState(!1),[s,d]=I.useState(""),m=ae();let l;e[0]!==t.id||e[1]!==m?(l=async()=>{await m.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=m,e[2]=l):l=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{T("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let c;e[6]!==l||e[7]!==r?(c={mutationFn:l,onSuccess:r,onError:be},e[6]=l,e[7]=r,e[8]=c):c=e[8];const a=V(c);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>h(!0),e[9]=o):o=e[9];let i;e[10]!==a.isPending?(i=n.jsx(G,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(U,{className:"border-destructive/40",children:n.jsx(A,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Y,{variant:"destructive",size:"sm",onClick:o,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=O=>{h(O),O||d("")},e[12]=p):p=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(oe,{children:"Delete Organization?"}),e[13]=g):g=e[13];let f;e[14]!==t.name?(f=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=f):f=e[15];let x;e[16]!==t.name?(x=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=x):x=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=O=>d(O.target.value),e[18]=j):j=e[18];let u;e[19]!==s||e[20]!==t.name?(u=n.jsx($,{value:s,onChange:j,placeholder:t.name,autoFocus:!0}),e[19]=s,e[20]=t.name,e[21]=u):u=e[21];let b;e[22]!==u||e[23]!==f||e[24]!==x?(b=n.jsxs(se,{children:[g,n.jsx(ie,{asChild:!0,children:n.jsxs("div",{children:[f,x,u]})})]}),e[22]=u,e[23]=f,e[24]=x,e[25]=b):b=e[25];let _;e[26]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(re,{children:"Cancel"}),e[26]=_):_=e[26];let y;e[27]!==a?(y=()=>a.mutate(),e[27]=a,e[28]=y):y=e[28];const R=s!==t.name||a.isPending,F=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==y||e[30]!==R||e[31]!==F?(S=n.jsxs(le,{children:[_,n.jsx(ce,{onClick:y,disabled:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:F})]}),e[29]=y,e[30]=R,e[31]=F,e[32]=S):S=e[32];let z;e[33]!==b||e[34]!==S?(z=n.jsxs(ue,{children:[b,S]}),e[33]=b,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==v||e[37]!==z?(C=n.jsx(de,{open:v,onOpenChange:p,children:z}),e[36]=v,e[37]=z,e[38]=C):C=e[38];let D;return e[39]!==C||e[40]!==i?(D=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=D):D=e[41],D}function be(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function ye(){const e=E.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(N,{children:n.jsx(N.Content,{children:n.jsx(N.Body,{children:n.jsxs(te,{children:[n.jsx(N.Title,{children:"Organization"}),n.jsx(je,{}),n.jsx(ne,{}),n.jsx(ve,{})]})})})}),e[0]=t):t=e[0],t}function Ze(){const e=E.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(me,{capability:"org:manage",area:"general settings",children:n.jsx(ye,{})}),e[0]=t):t=e[0],t}export{Ze as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as U,j as s,B as ze,C as pe,v as At,n as Qe,d as Me,K as ce,t as oe,m as vt,r as re,l as ke,i as Xe,E as Mt,p as Re}from"./index-Dq2GzmIa.js";import{C as Rt}from"./collection-display-button-cV3Ifql1.js";import{S as zt}from"./search-input-CuP775da.js";import{P as Ae}from"./index-DoiBq52a.js";import{C as Pt}from"./collection-table-wrapper-BSrBvNF0.js";import{E as We}from"./empty-state-D9Dn1Lnz.js";import{I as Et}from"./invite-member-dialog-DdKcrFqE.js";import{b as kt,S as Dt,a as $t}from"./settings-section-DpMc0HVT.js";import{u as qt,a as Ot}from"./use-join-requests-C982hQhS.js";import{A as De}from"./avatar-Cg58Qi4s.js";import{f as Ft}from"./format-time-BnbuEtat.js";import{g as Ve}from"./get-initials-D-f_fDFw.js";import{u as Lt}from"./use-members-Dmwu4pSZ.js";import{u as $e}from"./studio-tools-DT3M_Vdz.js";import{u as Ct}from"./use-org-auth-client-BZS4V2Lt.js";import{u as Bt}from"./use-organization-roles-C3RoqVvc.js";import{g as Kt,a as Vt}from"./role-color-Dn2tXDDF.js";import{T as Qt,a as Gt,c as Ut,b as Jt}from"./tooltip-BI-udduQ.js";import{a as st,e as nt,g as it,b as at,c as lt,d as ot,A as rt,f as ct}from"./alert-dialog-CRKyaNBx.js";import{B as Ge}from"./badge-D2XsHW2Y.js";import{C as mt}from"./card-CPTg8fDY.js";import{D as yt,a as St,c as Nt,e as Ht,f as Wt,g as Yt,d as et,j as Zt}from"./dropdown-menu-EMizUbgW.js";import{i as wt}from"./DotsVertical-BkJg419g.js";import{i as Xt}from"./Key01-Dz6Z8ZMZ.js";import{i as es}from"./Shield01-CfES6vR4.js";import{b as ts}from"./SwitchHorizontal01-CWRzX-Fm.js";import{s as ss}from"./Trash01-D4xE6JK2.js";import{s as _t}from"./XClose-BWc8duIO.js";import{b as dt,a as ut,d as ft,c as pt,S as ht}from"./select-CrSxwLpY.js";import{C as xt}from"./checkbox-BdHs-X49.js";import{e as Ye,a as Ze,f as gt,C as ns,c as is,d as as,b as ls}from"./command-0HaDsh2Q.js";import{a as os,b as rs,P as cs}from"./popover-DuDwu8ZY.js";import{t as ms}from"./ChevronDown-C3MkOcZJ.js";import{s as ds}from"./Plus-CaVUuJOD.js";import{R as us}from"./require-capability-DXSues5j.js";import"./ArrowUp-D620niSP.js";import"./ChevronUp-BcAa4Ljr.js";import"./view-mode-toggle-52AzCdiS.js";import"./SearchMd-7xF40qNR.js";import"./sidebar-C5_XfNYh.js";import"./LayoutLeft--D_GxkO2.js";import"./use-mobile-BjsEeYVy.js";import"./X-Dg7rsVai.js";import"./table-CjtfrukD.js";import"./dialog-DT5S2RMB.js";import"./form-CFqk5lJy.js";import"./label-BtGdlmhk.js";import"./textarea-BHzi6Dhm.js";import"./ArrowUpRight-BH4m-RJh.js";import"./use-capability-DMFGKIH5.js";import"./User01-B_wV9DLb.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ChevronRight-D7I_d6Rs.js";import"./index-BojbkbvA.js";import"./access-gate-BPnO_2yT.js";import"./capability-load-error-96MaJwmz.js";function fs(){const t=U.c(9),e=qt(),{approve:n,deny:l}=Ot();if(e.length===0)return null;let i;if(t[0]!==n||t[1]!==l||t[2]!==e){let o;t[4]!==n||t[5]!==l?(o=r=>s.jsx(kt,{icon:s.jsx(De,{url:r.user?.image??void 0,fallback:(r.user?.name??r.user?.email??"?").charAt(0).toUpperCase(),shape:"circle",size:"sm"}),title:r.user?.name??r.user?.email??r.userId,description:r.user?.email,action:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ze,{size:"sm",variant:"outline",onClick:()=>l.mutate(r.id),disabled:l.isPending||n.isPending,children:"Deny"}),s.jsx(ze,{size:"sm",onClick:()=>n.mutate(r.id),disabled:n.isPending||l.isPending,children:"Approve"})]})},r.id),t[4]=n,t[5]=l,t[6]=o):o=t[6],i=e.map(o),t[0]=n,t[1]=l,t[2]=e,t[3]=i}else i=t[3];let a;return t[7]!==i?(a=s.jsx(Dt,{title:"Join requests",description:"People who requested to join via a domain in approval mode.",children:s.jsx($t,{children:i})}),t[7]=i,t[8]=a):a=t[8],a}function ps(){const t=U.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.invitations(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>(await n.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i},t[4]=l,t[5]=i,t[6]=a):a=t[6],At(a)}function hs(){const t=U.c(10),{locator:e}=pe(),n=Ct(),l=Qe();let i;t[0]!==n?(i=async f=>{const x=await n.organization.cancelInvitation({invitationId:f});if(x?.error)throw new Error(x.error.message);return x.data},t[0]=n,t[1]=i):i=t[1];let a;t[2]!==e||t[3]!==l?(a=()=>{l.invalidateQueries({queryKey:ce.invitations(e)}),oe.success("Invitation cancelled")},t[2]=e,t[3]=l,t[4]=a):a=t[4];let o;t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:xs},t[5]=i,t[6]=a,t[7]=o):o=t[7];const r=Me(o);let u;return t[8]!==r?(u={cancel:r},t[8]=r,t[9]=u):u=t[9],u}function xs(t){oe.error(t instanceof Error?t.message:"Failed to cancel invitation")}function gs(){const t=U.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.tags(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>{const{tags:o}=await n.call("TAGS_LIST",{});return o},t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i,staleTime:3e4},t[4]=l,t[5]=i,t[6]=a):a=t[6],vt(a)}function js(){const t=U.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{tag:u}=await l.call("TAGS_CREATE",{name:r});return u},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=()=>{e.invalidateQueries({queryKey:ce.tags(n)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:bs},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function bs(t){oe.error(t instanceof Error?t.message:"Failed to create tag")}function vs(t){const e=U.c(10),{locator:n}=pe(),l=$e();let i;e[0]!==n||e[1]!==t?(i=ce.memberTags(n,t),e[0]=n,e[1]=t,e[2]=i):i=e[2];let a;e[3]!==t||e[4]!==l?(a=async()=>{const{tags:u}=await l.call("MEMBER_TAGS_GET",{memberId:t});return u},e[3]=t,e[4]=l,e[5]=a):a=e[5];const o=!!t;let r;return e[6]!==i||e[7]!==a||e[8]!==o?(r={queryKey:i,queryFn:a,staleTime:3e4,enabled:o},e[6]=i,e[7]=a,e[8]=o,e[9]=r):r=e[9],vt(r)}function Cs(){const t=U.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{memberId:u,tagIds:f}=r;return await l.call("MEMBER_TAGS_SET",{memberId:u,tagIds:f})},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=(r,u)=>{e.invalidateQueries({queryKey:ce.memberTags(n,u.memberId)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:ys},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function ys(t){oe.error(t instanceof Error?t.message:"Failed to update member tags")}function Tt(t){const e=U.c(44),{memberId:n,className:l,disabled:i,placeholder:a,maxDisplay:o}=t,r=i===void 0?!1:i,u=a===void 0?"Add tags...":a,f=o===void 0?2:o,[x,j]=re.useState(!1),[p,I]=re.useState(""),{data:M,isLoading:b}=gs(),D=M===void 0?[]:M,{data:v,isLoading:$}=vs(n),C=v===void 0?[]:v,E=js(),N=Cs(),R=b||$,S=C.map(Ns);let z;e[0]!==p?(z=g=>g.name.toLowerCase().includes(p.toLowerCase()),e[0]=p,e[1]=z):z=e[1];const A=D.filter(z);let y;e[2]!==p?(y=g=>g.name.toLowerCase()===p.toLowerCase(),e[2]=p,e[3]=y):y=e[3];const K=D.find(y),w=p.trim()&&!K,k=async g=>{const fe=S.includes(g.id)?S.filter(ge=>ge!==g.id):[...S,g.id];await N.mutateAsync({memberId:n,tagIds:fe})},_=async()=>{if(!p.trim())return;const g=await E.mutateAsync(p.trim());await N.mutateAsync({memberId:n,tagIds:[...S,g.id]}),I("")},c=async g=>{const se=S.filter(fe=>fe!==g);await N.mutateAsync({memberId:n,tagIds:se})},h=E.isPending||N.isPending,F=rs;let P;e[4]!==x?(P=()=>j(!x),e[4]=x,e[5]=P):P=e[5];let q;e[6]!==l?(q=ke("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=q):q=e[7];const V=r||R,O=R?s.jsx(Xe,{size:14,className:"animate-spin text-muted-foreground"}):C.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[C.slice(0,f).map(Ss),C.length>f&&s.jsxs(Ge,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",C.length-f]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:u});let Q;e[8]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(ms,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let L;e[9]!==V||e[10]!==O||e[11]!==P||e[12]!==q?(L=s.jsx(cs,{asChild:!0,children:s.jsxs(ze,{variant:"ghost",size:"sm",onClick:P,className:q,disabled:V,children:[O,Q]})}),e[9]=V,e[10]=O,e[11]=P,e[12]=q,e[13]=L):L=e[13];const G=os,J="w-56 p-0",H="start";let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>j(!1),e[14]=W):W=e[14];const ne=as,he=!1;let Y;e[15]!==p?(Y=s.jsx(ls,{placeholder:"Search or create...",value:p,onValueChange:I,className:"h-9"}),e[15]=p,e[16]=Y):Y=e[16];const ie=is,me=C.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{heading:"Selected",children:C.map(g=>s.jsx(Ze,{onSelect:()=>k(g),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xt,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:g.name})]}),s.jsx("button",{onClick:se=>{se.stopPropagation(),c(g.id)},className:"opacity-50 hover:opacity-100",disabled:h,children:s.jsx(_t,{size:14})})]})},g.id))}),s.jsx(gt,{})]}),Pe=Ye,xe="Available",Ee=A.length===0&&!w&&s.jsx(ns,{children:"No tags found."}),ue=A.filter(g=>!S.includes(g.id)).map(g=>s.jsx(Ze,{onSelect:()=>k(g),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xt,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:g.name})]})},g.id));let ae;e[17]!==Pe||e[18]!==Ee||e[19]!==ue?(ae=s.jsxs(Pe,{heading:xe,children:[Ee,ue]}),e[17]=Pe,e[18]=Ee,e[19]=ue,e[20]=ae):ae=e[20];let le;e[21]!==_||e[22]!==h||e[23]!==p||e[24]!==w?(le=w&&s.jsxs(s.Fragment,{children:[s.jsx(gt,{}),s.jsx(Ye,{children:s.jsx(Ze,{onSelect:_,className:"cursor-pointer",disabled:h,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[h?s.jsx(Xe,{size:14,className:"animate-spin"}):s.jsx(ds,{size:14}),s.jsxs("span",{children:['Create "',p.trim(),'"']})]})})})]}),e[21]=_,e[22]=h,e[23]=p,e[24]=w,e[25]=le):le=e[25];let Z;e[26]!==ie||e[27]!==me||e[28]!==ae||e[29]!==le?(Z=s.jsxs(ie,{children:[me,ae,le]}),e[26]=ie,e[27]=me,e[28]=ae,e[29]=le,e[30]=Z):Z=e[30];let X;e[31]!==ne||e[32]!==Y||e[33]!==Z?(X=s.jsxs(ne,{shouldFilter:he,children:[Y,Z]}),e[31]=ne,e[32]=Y,e[33]=Z,e[34]=X):X=e[34];let ee;e[35]!==G||e[36]!==W||e[37]!==X?(ee=s.jsx(G,{className:J,align:H,onEscapeKeyDown:W,children:X}),e[35]=G,e[36]=W,e[37]=X,e[38]=ee):ee=e[38];let te;return e[39]!==F||e[40]!==x||e[41]!==L||e[42]!==ee?(te=s.jsxs(F,{open:x,onOpenChange:j,children:[L,ee]}),e[39]=F,e[40]=x,e[41]=L,e[42]=ee,e[43]=te):te=e[43],te}function Ss(t){return s.jsx(Ge,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Ns(t){return t.id}const ws=["owner","admin","user"];function _s(t){const e=new Map;for(const n of ws)e.set(n,Kt(n,!0));for(const n of t)n&&!e.has(n.role)&&e.set(n.role,Vt(n.role));return e}function Ke(t){const e=U.c(79),{role:n,memberId:l,isOwner:i,roleColorMap:a,selectableRoles:o,onRoleChange:r,size:u,className:f}=t,x=u===void 0?"xs":u;let j,p,I,M,b,D,v,$,C,E,N;if(e[0]!==f||e[1]!==i||e[2]!==l||e[3]!==r||e[4]!==n||e[5]!==a||e[6]!==o||e[7]!==x){N=Symbol.for("react.early_return_sentinel");e:{const _=a.get(n)??"bg-muted-foreground";if(i){let c;e[19]!==l||e[20]!==r?(c=J=>r(l,J),e[19]=l,e[20]=r,e[21]=c):c=e[21];let h;e[22]!==n?(h=s.jsx("span",{className:"capitalize truncate",children:n}),e[22]=n,e[23]=h):h=e[23];const F=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:ke("size-2 rounded-full shrink-0",_)}),h]});let P;e[24]!==F?(P=s.jsx(dt,{children:F}),e[24]=F,e[25]=P):P=e[25];let q;e[26]!==f||e[27]!==x||e[28]!==P?(q=s.jsx(ut,{size:x,className:f,children:P}),e[26]=f,e[27]=x,e[28]=P,e[29]=q):q=e[29];let V;if(e[30]!==a||e[31]!==o){let J;e[33]!==a?(J=H=>{const W=a.get(H.role)??"bg-muted-foreground";return s.jsx(ft,{value:H.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",W)}),s.jsx("span",{className:"capitalize",children:H.label})]})},H.role)},e[33]=a,e[34]=J):J=e[34],V=o.map(J),e[30]=a,e[31]=o,e[32]=V}else V=e[32];let O;e[35]!==V?(O=s.jsx(pt,{children:V}),e[35]=V,e[36]=O):O=e[36];let Q;e[37]!==i||e[38]!==n||e[39]!==c||e[40]!==q||e[41]!==O?(Q=s.jsx(Qt,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(ht,{value:n,onValueChange:c,disabled:i,children:[q,O]})})}),e[37]=i,e[38]=n,e[39]=c,e[40]=q,e[41]=O,e[42]=Q):Q=e[42];let L;e[43]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Gt,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=L):L=e[43];let G;e[44]!==Q?(G=s.jsx(Ut,{children:s.jsxs(Jt,{children:[Q,L]})}),e[44]=Q,e[45]=G):G=e[45],N=G;break e}I=ht,$=n,e[46]!==l||e[47]!==r?(C=c=>r(l,c),e[46]=l,e[47]=r,e[48]=C):C=e[48],E=i,p=ut,D=x,v=f,j=dt,b="flex items-center gap-2 min-w-0",M=ke("size-2 rounded-full shrink-0",_)}e[0]=f,e[1]=i,e[2]=l,e[3]=r,e[4]=n,e[5]=a,e[6]=o,e[7]=x,e[8]=j,e[9]=p,e[10]=I,e[11]=M,e[12]=b,e[13]=D,e[14]=v,e[15]=$,e[16]=C,e[17]=E,e[18]=N}else j=e[8],p=e[9],I=e[10],M=e[11],b=e[12],D=e[13],v=e[14],$=e[15],C=e[16],E=e[17],N=e[18];if(N!==Symbol.for("react.early_return_sentinel"))return N;let R;e[49]!==M?(R=s.jsx("div",{className:M}),e[49]=M,e[50]=R):R=e[50];let S;e[51]!==n?(S=s.jsx("span",{className:"capitalize truncate",children:n}),e[51]=n,e[52]=S):S=e[52];let z;e[53]!==R||e[54]!==S||e[55]!==b?(z=s.jsxs("div",{className:b,children:[R,S]}),e[53]=R,e[54]=S,e[55]=b,e[56]=z):z=e[56];let A;e[57]!==j||e[58]!==z?(A=s.jsx(j,{children:z}),e[57]=j,e[58]=z,e[59]=A):A=e[59];let y;e[60]!==p||e[61]!==A||e[62]!==D||e[63]!==v?(y=s.jsx(p,{size:D,className:v,children:A}),e[60]=p,e[61]=A,e[62]=D,e[63]=v,e[64]=y):y=e[64];let K;if(e[65]!==a||e[66]!==o){let _;e[68]!==a?(_=c=>{const h=a.get(c.role)??"bg-muted-foreground";return s.jsx(ft,{value:c.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",h)}),s.jsx("span",{className:"capitalize",children:c.label})]})},c.role)},e[68]=a,e[69]=_):_=e[69],K=o.map(_),e[65]=a,e[66]=o,e[67]=K}else K=e[67];let w;e[70]!==K?(w=s.jsx(pt,{children:K}),e[70]=K,e[71]=w):w=e[71];let k;return e[72]!==I||e[73]!==y||e[74]!==w||e[75]!==$||e[76]!==C||e[77]!==E?(k=s.jsxs(I,{value:$,onValueChange:C,disabled:E,children:[y,w]}),e[72]=I,e[73]=y,e[74]=w,e[75]=$,e[76]=C,e[77]=E,e[78]=k):k=e[78],k}function jt(t){const e=U.c(51),{member:n,roles:l,onChangeRole:i,onRemove:a,isUpdating:o}=t,r=o===void 0?!1:o,u=n.role==="owner";let f,x,j,p,I,M,b,D,v;if(e[0]!==u||e[1]!==r||e[2]!==n.id||e[3]!==n.role||e[4]!==i||e[5]!==l){let y;e[15]!==n.role?(y=c=>c.role!==n.role&&c.role!=="owner",e[15]=n.role,e[16]=y):y=e[16];const K=l.filter(y);p=yt;let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(wt,{size:20}),e[17]=w):w=e[17],e[18]!==u?(v=s.jsx(St,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:u,onClick:Is,children:w})}),e[18]=u,e[19]=v):v=e[19],j=Nt,b="end",D=Ts,x=Ht;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(ts,{size:16}),e[20]=k):k=e[20],e[21]!==r?(M=s.jsxs(Wt,{disabled:r,children:[k,"Change Role"]}),e[21]=r,e[22]=M):M=e[22],f=Yt;let _;e[23]!==r||e[24]!==n.id||e[25]!==i?(_=c=>{const h=[];return c.isBuiltin||(c.allowsAllStaticPermissions?h.push("Full org access"):c.staticPermissionCount&&c.staticPermissionCount>0&&h.push(`${c.staticPermissionCount} org perm${c.staticPermissionCount!==1?"s":""}`),c.allowsAllConnections?h.push("All connections"):c.connectionCount&&c.connectionCount>0&&h.push(`${c.connectionCount} connection${c.connectionCount!==1?"s":""}`),(c.connectionCount!==0||c.allowsAllConnections)&&(c.allowsAllTools?h.push("all tools"):c.toolCount&&c.toolCount>0&&h.push(`${c.toolCount} tool${c.toolCount!==1?"s":""}`))),s.jsxs(et,{onClick:F=>{F.stopPropagation(),i(n.id,c.role)},disabled:r,children:[c.isBuiltin?s.jsx(es,{size:16}):s.jsx(Xt,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:c.label}),!c.isBuiltin&&h.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:h.join(", ")})]})]},c.role)},e[23]=r,e[24]=n.id,e[25]=i,e[26]=_):_=e[26],I=K.map(_),e[0]=u,e[1]=r,e[2]=n.id,e[3]=n.role,e[4]=i,e[5]=l,e[6]=f,e[7]=x,e[8]=j,e[9]=p,e[10]=I,e[11]=M,e[12]=b,e[13]=D,e[14]=v}else f=e[6],x=e[7],j=e[8],p=e[9],I=e[10],M=e[11],b=e[12],D=e[13],v=e[14];let $;e[27]!==f||e[28]!==I?($=s.jsx(f,{children:I}),e[27]=f,e[28]=I,e[29]=$):$=e[29];let C;e[30]!==x||e[31]!==M||e[32]!==$?(C=s.jsxs(x,{children:[M,$]}),e[30]=x,e[31]=M,e[32]=$,e[33]=C):C=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Zt,{}),e[34]=E):E=e[34];let N;e[35]!==n.id||e[36]!==a?(N=y=>{y.stopPropagation(),a(n.id)},e[35]=n.id,e[36]=a,e[37]=N):N=e[37];let R;e[38]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(ss,{size:16}),e[38]=R):R=e[38];let S;e[39]!==N?(S=s.jsxs(et,{variant:"destructive",onClick:N,children:[R,"Remove Member"]}),e[39]=N,e[40]=S):S=e[40];let z;e[41]!==j||e[42]!==S||e[43]!==b||e[44]!==D||e[45]!==C?(z=s.jsxs(j,{align:b,onClick:D,children:[C,E,S]}),e[41]=j,e[42]=S,e[43]=b,e[44]=D,e[45]=C,e[46]=z):z=e[46];let A;return e[47]!==p||e[48]!==z||e[49]!==v?(A=s.jsxs(p,{children:[v,z]}),e[47]=p,e[48]=z,e[49]=v,e[50]=A):A=e[50],A}function Ts(t){return t.stopPropagation()}function Is(t){return t.stopPropagation()}function bt(t){const e=U.c(8),{invitationId:n,onCancel:l,isCancelling:i}=t,a=i===void 0?!1:i;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(St,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ms,children:s.jsx(wt,{size:20})})}),e[0]=o):o=e[0];let r;e[1]!==n||e[2]!==l?(r=x=>{x.stopPropagation(),l(n)},e[1]=n,e[2]=l,e[3]=r):r=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(_t,{size:16}),e[4]=u):u=e[4];let f;return e[5]!==a||e[6]!==r?(f=s.jsxs(yt,{children:[o,s.jsx(Nt,{align:"end",onClick:As,children:s.jsxs(et,{variant:"destructive",onClick:r,disabled:a,children:[u,"Cancel Invitation"]})})]}),e[5]=a,e[6]=r,e[7]=f):f=e[7],f}function As(t){return t.stopPropagation()}function Ms(t){return t.stopPropagation()}function Rs(){const t=U.c(103),{data:e}=Lt(),{data:n}=ps(),l=hs(),i=Qe(),{locator:a}=pe(),o=Ct(),[r,u]=re.useState(null),[f,x]=re.useState(null),[j,p]=re.useState(""),[I,M]=re.useState("table"),[b,D]=re.useState("member"),[v,$]=re.useState("asc"),C=e?.data?.members;let E;t[0]!==b?(E=m=>{b===m?$(Bs):(D(m),$("asc"))},t[0]=b,t[1]=E):E=t[1];const N=E;let R=C??[],S=n??[];if(j){const m=j.toLowerCase();R=R.filter(d=>d.user?.name?.toLowerCase().includes(m)||d.user?.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m)),S=S.filter(d=>d.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m))}if(b&&v){let m;t[2]!==v||t[3]!==b?(m=(d,T)=>{let B,de;e:switch(b){case"member":{B=d.user?.name||"",de=T.user?.name||"";break e}case"role":{B=d.role||"",de=T.role||"";break e}case"joined":{B=d.createdAt?typeof d.createdAt=="string"?d.createdAt:d.createdAt.toISOString():"",de=T.createdAt?typeof T.createdAt=="string"?T.createdAt:T.createdAt.toISOString():"";break e}default:return 0}return v==="asc"?B.localeCompare(de):de.localeCompare(B)},t[2]=v,t[3]=b,t[4]=m):m=t[4],R=[...R].sort(m)}const z=R;let A;t[5]!==o?(A=async m=>{const d=await o.organization.removeMember({memberIdOrEmail:m});if(d?.error)throw new Error(d.error.message)},t[5]=o,t[6]=A):A=t[6];let y;t[7]!==a||t[8]!==i?(y=()=>{Re("member_removed"),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member has been removed from the organization"),u(null)},t[7]=a,t[8]=i,t[9]=y):y=t[9];let K;t[10]!==A||t[11]!==y?(K={mutationFn:A,onSuccess:y,onError:Ls},t[10]=A,t[11]=y,t[12]=K):K=t[12];const w=Me(K);let k;t[13]!==o?(k=async m=>{const{memberId:d,role:T}=m,B=await o.organization.updateMemberRole({memberId:d,role:[T]});if(B?.error)throw new Error(B.error.message)},t[13]=o,t[14]=k):k=t[14];let _;t[15]!==a||t[16]!==i?(_=(m,d)=>{Re("member_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member's role has been updated")},t[15]=a,t[16]=i,t[17]=_):_=t[17];let c;t[18]!==k||t[19]!==_?(c={mutationFn:k,onSuccess:_,onError:Fs},t[18]=k,t[19]=_,t[20]=c):c=t[20];const h=Me(c);let F;t[21]!==o?(F=async m=>{const{invitationId:d,role:T,email:B}=m,de=await o.organization.cancelInvitation({invitationId:d});if(de?.error)throw new Error(de.error.message);const tt=await o.organization.inviteMember({email:B,role:T});if(tt?.error)throw new Error(tt.error.message)},t[21]=o,t[22]=F):F=t[22];let P;t[23]!==a||t[24]!==i?(P=(m,d)=>{Re("invitation_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.invitations(a)}),oe.success("Invitation role has been updated")},t[23]=a,t[24]=i,t[25]=P):P=t[25];let q;t[26]!==F||t[27]!==P?(q={mutationFn:F,onSuccess:P,onError:Os},t[26]=F,t[27]=P,t[28]=q):q=t[28];const V=Me(q),{roles:O,customRoles:Q}=Bt();let L;t[29]!==Q?(L=_s(Q),t[29]=Q,t[30]=L):L=t[30];const G=L;let J;t[31]!==O?(J=O.filter(qs),t[31]=O,t[32]=J):J=t[32];const H=J;let W;t[33]===Symbol.for("react.memo_cache_sentinel")?(W={id:"member",header:"Member",render:$s,cellClassName:"flex-1 min-w-0",sortable:!0},t[33]=W):W=t[33];let ne;t[34]!==G||t[35]!==H||t[36]!==V||t[37]!==h?(ne={id:"role",header:"Role",render:m=>m.type==="member"?s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:m.data.role==="owner",roleColorMap:G,selectableRoles:H,onRoleChange:(d,T)=>h.mutate({memberId:d,role:T}),className:"w-36"}):s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:G,selectableRoles:H,onRoleChange:(d,T)=>V.mutate({invitationId:d,role:T,email:m.data.email}),className:"w-36"}),cellClassName:"w-36 shrink-0",sortable:!0},t[34]=G,t[35]=H,t[36]=V,t[37]=h,t[38]=ne):ne=t[38];let he,Y;t[39]===Symbol.for("react.memo_cache_sentinel")?(he={id:"tags",header:"Tags",render:Ds,cellClassName:"w-40 shrink-0"},Y={id:"joined",header:"Joined",render:ks,cellClassName:"w-48 shrink-0",sortable:!0},t[39]=he,t[40]=Y):(he=t[39],Y=t[40]);let ie;t[41]!==l.cancel.isPending||t[42]!==O||t[43]!==h?(ie={id:"actions",header:"",render:m=>m.type==="member"?s.jsx(jt,{member:m.data,roles:O,onChangeRole:(d,T)=>h.mutate({memberId:d,role:T}),onRemove:u,isUpdating:h.isPending}):s.jsx(bt,{invitationId:m.data.id,onCancel:x,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=O,t[43]=h,t[44]=ie):ie=t[44];let me;t[45]!==ne||t[46]!==ie?(me=[W,ne,he,Y,ie],t[45]=ne,t[46]=ie,t[47]=me):me=t[47];const Pe=me;let xe;t[48]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Et,{trigger:s.jsx(ze,{children:"Invite Member"})})}),t[48]=xe):xe=t[48];const Ee=xe,ue=[...z.map(Es),...S.filter(Ps).map(zs)],ae=Ae,le=!!f;let Z;t[49]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>x(null),t[49]=Z):Z=t[49];let X;t[50]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsxs(at,{children:[s.jsx(lt,{children:"Cancel Invitation"}),s.jsx(ot,{children:"Are you sure you want to cancel this invitation? The invitee will no longer be able to join the organization with this invitation."})]}),t[50]=X):X=t[50];let ee;t[51]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(rt,{children:"Keep Invitation"}),t[51]=ee):ee=t[51];let te;t[52]!==l.cancel||t[53]!==f?(te=()=>{f&&(l.cancel.mutate(f),x(null))},t[52]=l.cancel,t[53]=f,t[54]=te):te=t[54];let g;t[55]!==l.cancel.isPending||t[56]!==te?(g=s.jsxs(st,{children:[X,s.jsxs(nt,{children:[ee,s.jsx(it,{onClick:te,disabled:l.cancel.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Cancel Invitation"})]})]}),t[55]=l.cancel.isPending,t[56]=te,t[57]=g):g=t[57];let se;t[58]!==le||t[59]!==g?(se=s.jsx(ct,{open:le,onOpenChange:Z,children:g}),t[58]=le,t[59]=g,t[60]=se):se=t[60];const fe=!!r;let ge;t[61]===Symbol.for("react.memo_cache_sentinel")?(ge=()=>u(null),t[61]=ge):ge=t[61];let qe;t[62]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsxs(at,{children:[s.jsx(lt,{children:"Remove Member"}),s.jsx(ot,{children:"Are you sure you want to remove this member from the organization? This action cannot be undone."})]}),t[62]=qe):qe=t[62];let Oe;t[63]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(rt,{children:"Cancel"}),t[63]=Oe):Oe=t[63];let je;t[64]!==r||t[65]!==w?(je=()=>r&&w.mutate(r),t[64]=r,t[65]=w,t[66]=je):je=t[66];let be;t[67]!==w.isPending||t[68]!==je?(be=s.jsxs(st,{children:[qe,s.jsxs(nt,{children:[Oe,s.jsx(it,{onClick:je,disabled:w.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=w.isPending,t[68]=je,t[69]=be):be=t[69];let ve;t[70]!==fe||t[71]!==be?(ve=s.jsx(ct,{open:fe,onOpenChange:ge,children:be}),t[70]=fe,t[71]=be,t[72]=ve):ve=t[72];const Ue=Ae,Je=Ae,It="flex flex-col gap-6";let Ce,ye;t[73]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(fs,{}),ye=s.jsx(Ae.Title,{children:"Members"}),t[73]=Ce,t[74]=ye):(Ce=t[73],ye=t[74]);let Fe;t[75]===Symbol.for("react.memo_cache_sentinel")?(Fe=m=>{m.key==="Escape"&&(p(""),m.target.blur())},t[75]=Fe):Fe=t[75];let Se;t[76]!==j?(Se=s.jsx(zt,{value:j,onChange:p,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:Fe}),t[76]=j,t[77]=Se):Se=t[77];let Le;t[78]===Symbol.for("react.memo_cache_sentinel")?(Le=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[78]=Le):Le=t[78];let Ne;t[79]!==N||t[80]!==v||t[81]!==b||t[82]!==I?(Ne=s.jsx(Rt,{viewMode:I,onViewModeChange:M,sortKey:b,sortDirection:v,onSort:N,sortOptions:Le}),t[79]=N,t[80]=v,t[81]=b,t[82]=I,t[83]=Ne):Ne=t[83];let we;t[84]!==Se||t[85]!==Ne?(we=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[Se,Ne]}),Ee]}),t[84]=Se,t[85]=Ne,t[86]=we):we=t[86];const He=I==="cards"?s.jsx("div",{children:ue.length===0?s.jsx(We,{title:"No members found",description:j?`No members match "${j}"`:"Invite members to get started."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:ue.map(m=>{if(m.type==="invitation")return s.jsxs(mt,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(bt,{invitationId:m.data.id,onCancel:x,isCancelling:l.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{fallback:Ve(m.data.email),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:m.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Ge,{variant:"outline",className:"w-fit text-warning border-warning/40",children:"Pending"})}),s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:G,selectableRoles:H,onRoleChange:(T,B)=>V.mutate({invitationId:T,role:B,email:m.data.email}),className:"w-fit"})]})]})]},`inv-${m.data.id}`);const d=m.data;return s.jsxs(mt,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(jt,{member:d,roles:O,onChangeRole:(T,B)=>h.mutate({memberId:T,role:B}),onRemove:u,isUpdating:h.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{url:d.user?.image??void 0,fallback:Ve(d.user?.name),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:d.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:d.user?.email}),s.jsx(Ke,{role:d.role,memberId:d.id,isOwner:d.role==="owner",roleColorMap:G,selectableRoles:H,onRoleChange:(T,B)=>h.mutate({memberId:T,role:B}),className:"w-fit"}),s.jsx(Tt,{memberId:d.id,maxDisplay:3})]})]})]},d.id)})})}):s.jsx(Pt,{columns:Pe,data:ue,isLoading:!1,sortKey:b,sortDirection:v,onSort:N,emptyState:j?s.jsx(We,{title:"No members found",description:`No members match "${j}"`}):s.jsx(We,{title:"No members found",description:"Invite members to get started."})});let _e;t[87]!==Ce||t[88]!==ye||t[89]!==we||t[90]!==He?(_e=s.jsxs("div",{className:It,children:[Ce,ye,we,He]}),t[87]=Ce,t[88]=ye,t[89]=we,t[90]=He,t[91]=_e):_e=t[91];let Te;t[92]!==Je.Body||t[93]!==_e?(Te=s.jsx(Je.Body,{children:_e}),t[92]=Je.Body,t[93]=_e,t[94]=Te):Te=t[94];let Ie;t[95]!==Ue.Content||t[96]!==Te?(Ie=s.jsx(Ue.Content,{children:Te}),t[95]=Ue.Content,t[96]=Te,t[97]=Ie):Ie=t[97];let Be;return t[98]!==ae||t[99]!==se||t[100]!==ve||t[101]!==Ie?(Be=s.jsxs(ae,{children:[se,ve,Ie]}),t[98]=ae,t[99]=se,t[100]=ve,t[101]=Ie,t[102]=Be):Be=t[102],Be}function zs(t){return{type:"invitation",data:t}}function Ps(t){return t.status==="pending"}function Es(t){return{type:"member",data:t}}function ks(t){return t.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:t.data.createdAt?Ft(t.data.createdAt):"N/A"}):s.jsx(Ge,{variant:"outline",children:"Pending"})}function Ds(t){return t.type==="member"?s.jsx(Tt,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function $s(t){return t.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{url:t.data.user?.image??void 0,fallback:Ve(t.data.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.user?.name||"Unknown"}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.data.user?.email})]})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{fallback:Ve(t.data.email),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.email}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:"Invitation sent"})]})]})}function qs(t){return t.role!=="owner"}function Os(t,e){Re("invitation_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update invitation role")}function Fs(t,e){Re("member_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update role")}function Ls(t){Re("member_remove_failed",{error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to remove member")}function Bs(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Ks(){const t=U.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load members"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Mt,{fallback:e,children:s.jsx(re.Suspense,{fallback:s.jsx(Ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Xe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Rs,{})})}),t[1]=n):n=t[1],n}function Un(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(us,{capability:"members:manage",area:"members",children:s.jsx(Ks,{})}),t[0]=e):e=t[0],e}export{Un as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as it,r as E,j as e,i as rt}from"./index-Dq2GzmIa.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-C5_XfNYh.js";import{m as nt}from"./automation-runs-IA98DU4N.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-ByR9Z__k.js";import{r as xt}from"./index-DpAoOgpk.js";import"./LayoutLeft--D_GxkO2.js";import"./use-mobile-BjsEeYVy.js";import"./X-Dg7rsVai.js";import"./tooltip-BI-udduQ.js";import"./select-CrSxwLpY.js";import"./ChevronUp-BcAa4Ljr.js";import"./ChevronDown-C3MkOcZJ.js";import"./useInfiniteQuery-CErl8eUD.js";import"./use-infinite-scroll-C_M049Oj.js";import"./use-connection-BYUOXcTZ.js";import"./use-collections-BakROzwv.js";import"./use-mcp-client-BET4cVQ2.js";import"./auth-DgHUqP65.js";import"./use-virtual-mcp-B1v9ZXLU.js";import"./card-CPTg8fDY.js";import"./table-CjtfrukD.js";import"./empty-state-D9Dn1Lnz.js";import"./use-members-Dmwu4pSZ.js";import"./use-org-auth-client-BZS4V2Lt.js";import"./use-clock-tick-DOOmIKzq.js";import"./AlertCircle-TjPHcEnP.js";import"./CheckCircle-wgdag1z7.js";import"./DotsVertical-BkJg419g.js";import"./agent-icon-cR-VXBAA.js";import"./Tool01-DTY-fPyM.js";import"./ArrowUp-D620niSP.js";import"./Settings02-BNJ32xSl.js";import"./Tool02-C5wUTAFe.js";import"./XCircle-Di7Lb4ZU.js";import"./ArrowUpRight-BH4m-RJh.js";import"./TrendUp01--_jCdLU4.js";import"./ZapSquare-CqcwFWlA.js";import"./ZoomOut-C_Zu7-Q5.js";import"./Users03-Bk7hrtUP.js";import"./ChevronRight-D7I_d6Rs.js";import"./Stars02-7EGkcn1l.js";import"./Copy01-ybfnME4F.js";import"./Globe01-e5qIDEbr.js";import"./Eye-CeD9rgkI.js";import"./FilterLines-DTDvdHSv.js";import"./Star01-5GqPaTBh.js";import"./Globe04-Bxmic94-.js";import"./SwitchHorizontal01-CWRzX-Fm.js";import"./HardDrive-Bo4OGyrd.js";import"./Image01-Cm0pa05N.js";import"./Key01-Dz6Z8ZMZ.js";import"./LinkExternal01-eA6vVQM3.js";import"./Monitor01-CbDoyDRV.js";import"./Sun-C4Fwh1Vu.js";import"./Package-BRrJc9sL.js";import"./Palette-D12yKiV2.js";import"./Play-CQU4qZuG.js";import"./Plus-CaVUuJOD.js";import"./SearchLg-CIPUU7M2.js";import"./SearchMd-7xF40qNR.js";import"./Shield01-CfES6vR4.js";import"./Stars01-DrN-Oz3U.js";import"./Trash01-D4xE6JK2.js";import"./Upload01-Baccrojk.js";import"./User01-B_wV9DLb.js";import"./Users01--ZODDl59.js";import"./XClose-BWc8duIO.js";import"./Zap-BS9GJrhH.js";import"./use-automations-CqRQFXK6.js";import"./studio-tools-DT3M_Vdz.js";import"./useSuspenseInfiniteQuery-CqYcpPIQ.js";import"./avatar-Cg58Qi4s.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-X1Kg3Hp6.js";import"./file-type-icon-XKnElsdT.js";import"./dialog-DT5S2RMB.js";import"./tab-id-BijBBRwE.js";import"./hooks-CKtulQ0t.js";import"./decopilot-sse-pool-C_pTq61C.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-BAovwxgU.js";import"./autosend-TZVzvR_1.js";import"./use-ai-providers-w9d34g0F.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-DDc7EwGs.js";import"./use-organization-settings-C0IXRiP_.js";import"./monaco-editor-Bq9EBE_u.js";import"./index-D1cQ6lKh.js";import"./index-DyWjSb5y.js";import"./calendar-DxMjhXOp.js";import"./shell-layout-DQaGi35E.js";import"./required-auth-layout-DLhyslwf.js";import"./use-org-sso-DIQMNs43.js";import"./integration-icon-CGshMm4e.js";import"./use-navigate-to-agent-C4BCBCv3.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-Cn-bvgNR.js";import"./form-CFqk5lJy.js";import"./label-BtGdlmhk.js";import"./input-_HbUXqOS.js";import"./switch-BlPs3ERk.js";import"./drawer-XzD4hvpg.js";import"./collection-search-Btrf8Diq.js";import"./index-B0JPF-6M.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-COi_RGkf.js";import"./use-mcp-tools-z0J_EOSL.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-ClWKGwOW.js";import"./mcp-oauth-D4aGhRIx.js";import"./extract-connection-data-nMVGabj3.js";import"./dropdown-menu-EMizUbgW.js";import"./popover-DuDwu8ZY.js";import"./command-0HaDsh2Q.js";import"./index-BojbkbvA.js";import"./companions-core-DJ2SKsFs.js";import"./tabs-Ca1nnDrk.js";import"./toggle-group-a5DM2sSK.js";import"./use-deco-credits-DGCPQWxL.js";import"./connection-card-DwBQfP1R.js";import"./use-registry-connections-BThC_Q4I.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BHzi6Dhm.js";import"./connection-form-helpers-7cL_OUk8.js";import"./collection-tabs-kwELhDMx.js";import"./badge-D2XsHW2Y.js";import"./connect-desktop-dialog-CkUcaE26.js";import"./select-model-CPc7lxVf.js";import"./checkbox-BdHs-X49.js";import"./skeleton-CFwDF8gK.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DpMc0HVT.js";import"./index-MzuqcCtH.js";import"./alert-dialog-CRKyaNBx.js";import"./toolbar-BptqFiOS.js";import"./use-debounced-value-BcV326dl.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D8lhFnWZ.js";import"./use-capability-DMFGKIH5.js";import"./toolbar-icon-button-BAMgsY3V.js";import"./use-debounced-autosave-C2vhIJrv.js";import"./index-DoiBq52a.js";import"./search-input-CuP775da.js";import"./use-mcp-auth-status-ClCJfdlL.js";import"./github-repo-picker-DpzVLTnS.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-C4jt5KwT.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-dAie7zDN.js";import"./automation-list-row-aKON7NTD.js";function fi(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const q=F,z=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,A=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==z?(l=e.jsx(mt,{className:"text-sm font-semibold",children:z}),t[13]=z,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==A||t[37]!==_?(S=!o||!T&&!A?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=M,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=A,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==q||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:q,children:f}),t[42]=q,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{fi as SeoSheet};
|