decocms 4.28.1 → 4.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Ix48cuhr.js → AlertCircle-D90xu5-8.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CXbhOFnS.js → ArrowUpRight-B1XPsNPZ.js} +1 -1
- package/dist/client/assets/{Check-KOuUgZpl.js → Check-BqH5cjqe.js} +1 -1
- package/dist/client/assets/{CheckCircle-D-y1jrnz.js → CheckCircle-CebfgxLq.js} +1 -1
- package/dist/client/assets/{ChevronDown-C-LFsTot.js → ChevronDown-DhzhS3K5.js} +1 -1
- package/dist/client/assets/{ChevronRight-CMRG2Mrw.js → ChevronRight-DntNgeBz.js} +1 -1
- package/dist/client/assets/{ChevronUp-Do62lvyJ.js → ChevronUp-DPJfOoQR.js} +1 -1
- package/dist/client/assets/{Circle-DvpNcVfO.js → Circle-umqkxNwx.js} +1 -1
- package/dist/client/assets/{Copy01-BUiSHYCq.js → Copy01-YBIj7O7M.js} +1 -1
- package/dist/client/assets/{DotsVertical-Dt_Mft5K.js → DotsVertical-DoxN78H8.js} +1 -1
- package/dist/client/assets/{Eye-jR9Zg5z5.js → Eye-o8ajkfvt.js} +1 -1
- package/dist/client/assets/{FilterLines-BwYarGOr.js → FilterLines-CEBhmChB.js} +1 -1
- package/dist/client/assets/{Globe01-CLEqh0jN.js → Globe01-D3NrpjPq.js} +1 -1
- package/dist/client/assets/{Globe04-BbxCUGSa.js → Globe04-6xG6GU2e.js} +1 -1
- package/dist/client/assets/{HardDrive-C2xD3Bmj.js → HardDrive-CDBenwE2.js} +1 -1
- package/dist/client/assets/{Key01-D4W6oMPT.js → Key01-CwgjH_um.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DHIL03--.js → LayoutLeft-CKcHwaHf.js} +1 -1
- package/dist/client/assets/{LinkExternal01-92HTSmz9.js → LinkExternal01-DBFEHO3t.js} +1 -1
- package/dist/client/assets/{List-Dl4LEOwl.js → List-s8AZWxpk.js} +1 -1
- package/dist/client/assets/Loading02-DaLVACu2.js +1 -0
- package/dist/client/assets/{Monitor01-BWtutl7x.js → Monitor01-lxPxQ2fk.js} +1 -1
- package/dist/client/assets/{Palette-BGy6oXoM.js → Palette-DHyTdFqR.js} +1 -1
- package/dist/client/assets/{Play-BblOVQrg.js → Play-TOCBGzP9.js} +1 -1
- package/dist/client/assets/{Plus-DfCkUDAU.js → Plus-DkGwhdIW.js} +1 -1
- package/dist/client/assets/{SearchLg-DNeOVX02.js → SearchLg-C9MBYrXH.js} +1 -1
- package/dist/client/assets/{SearchMd-DcUy3tZG.js → SearchMd-Dhz0UROc.js} +1 -1
- package/dist/client/assets/{Settings02-Do4Jg01P.js → Settings02-COfrOHpp.js} +1 -1
- package/dist/client/assets/{Shield01-C6KAwjuJ.js → Shield01-BrK-9cDf.js} +1 -1
- package/dist/client/assets/{Star01-vopgIfvF.js → Star01-twQgP5oO.js} +1 -1
- package/dist/client/assets/{Stars01-5YrKBfZE.js → Stars01-C27kMlCK.js} +1 -1
- package/dist/client/assets/{Stars02-XQxaeqbQ.js → Stars02-sR281nUk.js} +1 -1
- package/dist/client/assets/{Sun-B7ftuIIX.js → Sun-DTFx5jn8.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-cutLTNbW.js → SwitchHorizontal01-Bu9ipsE_.js} +1 -1
- package/dist/client/assets/{Tool01-BvpZAFbv.js → Tool01-DJgxsN47.js} +1 -1
- package/dist/client/assets/{Trash01-CMKdBCcn.js → Trash01-myAGgKHr.js} +1 -1
- package/dist/client/assets/{Upload01-qruYHtRZ.js → Upload01-m0ny4YmQ.js} +1 -1
- package/dist/client/assets/{User01-BQzTGoKV.js → User01-DuGAbO5F.js} +1 -1
- package/dist/client/assets/{Users01-BGJnrzuD.js → Users01-e9Wb8IJU.js} +1 -1
- package/dist/client/assets/{Users03-DdN_R_96.js → Users03-JTfAuK6m.js} +1 -1
- package/dist/client/assets/{X-5_6S4cTa.js → X-DRR7RtBP.js} +1 -1
- package/dist/client/assets/{XCircle-B0LLGt09.js → XCircle-Cz7czjsw.js} +1 -1
- package/dist/client/assets/{XClose-Kd3JhRs6.js → XClose-eEYHZsPT.js} +1 -1
- package/dist/client/assets/{Zap-WWmt76Cj.js → Zap-CMZ9cCJz.js} +1 -1
- package/dist/client/assets/{ZapSquare-B8w8Kigu.js → ZapSquare-Ch518nCD.js} +1 -1
- package/dist/client/assets/{ZoomOut-BN8enLeN.js → ZoomOut-Chl8lvun.js} +1 -1
- package/dist/client/assets/{access-gate-DZCZwHRE.js → access-gate-Cf-kJrg7.js} +1 -1
- package/dist/client/assets/{add-section-modal-D_44tUGm.js → add-section-modal-COVSQJFG.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CbZdf8yp.js → agent-capabilities-Cpju5Yfe.js} +1 -1
- package/dist/client/assets/agent-icon-BvZm1osM.js +1 -0
- package/dist/client/assets/{agents-list-CU3r02dc.js → agents-list-BzkaDxFg.js} +1 -1
- package/dist/client/assets/{ai-providers-DoEqBz5H.js → ai-providers-DadR3aQt.js} +1 -1
- package/dist/client/assets/{alert-Dih2SIkz.js → alert-C-n1SZ0O.js} +1 -1
- package/dist/client/assets/{alert-dialog-B0Bw-oIS.js → alert-dialog-wgrcUQ0O.js} +1 -1
- package/dist/client/assets/app-editor-CAH73t0u.js +1 -0
- package/dist/client/assets/{auth-DN4c5q1R.js → auth-B8jeHTDK.js} +1 -1
- package/dist/client/assets/{auth-catchall-D_9FbiWb.js → auth-catchall-f5qF8zoS.js} +1 -1
- package/dist/client/assets/{auth-entry-B-ZF-ciz.js → auth-entry-BwlcwCMz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Cr6444lH.js → auth-split-layout-DiG8voFB.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DdKvrQEr.js → authenticate-and-persist-oauth-ezeRyKPp.js} +1 -1
- package/dist/client/assets/{automation-list-row-BOIXVMIT.js → automation-list-row-CeLhtWjA.js} +1 -1
- package/dist/client/assets/automation-runs-CmgFzJTt.js +1 -0
- package/dist/client/assets/{automations-CGElgBM7.js → automations-D21tUX_h.js} +1 -1
- package/dist/client/assets/{avatar-HaXLmirn.js → avatar-BrhzNA4d.js} +1 -1
- package/dist/client/assets/{badge-CqRObYKH.js → badge-B5li3mFX.js} +1 -1
- package/dist/client/assets/{block-document-DyjzyU2F.js → block-document-BKVlkRQG.js} +2 -2
- package/dist/client/assets/{brand-context-8UKMAI4i.js → brand-context-DHuctVxS.js} +1 -1
- package/dist/client/assets/{breadcrumb-B5OQr9WC.js → breadcrumb-BPYlrjmj.js} +1 -1
- package/dist/client/assets/{buckets-CcKs25bx.js → buckets-CZdkIll2.js} +1 -1
- package/dist/client/assets/bulk-category-panel-DBxbY94B.js +1 -0
- package/dist/client/assets/calendar-C0u4vRHU.js +1 -0
- package/dist/client/assets/{capability-load-error-DwMuZztu.js → capability-load-error-D7uMbvO0.js} +1 -1
- package/dist/client/assets/{card-5aKPBj7H.js → card-CCFrbS6S.js} +1 -1
- package/dist/client/assets/category-editor-DJYxfrMo.js +1 -0
- package/dist/client/assets/{chat-context-D7GP06Zt.js → chat-context-XoGdeFE9.js} +1 -1
- package/dist/client/assets/{checkbox-DEYwFl8k.js → checkbox-D2NBps_s.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CLScdiWU.js → cli-auth-success-DG3-YXKw.js} +1 -1
- package/dist/client/assets/{collection-detail-CxIElSHV.js → collection-detail-uY6XXgWz.js} +1 -1
- package/dist/client/assets/{collection-display-button-DyPvL1w_.js → collection-display-button-Bvtt9j_H.js} +1 -1
- package/dist/client/assets/{collection-search-CzAS7CiD.js → collection-search-BHb176G9.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D-ssgOn8.js → collection-table-wrapper-BBBMMDK4.js} +1 -1
- package/dist/client/assets/{collection-tabs-bZbxe_7m.js → collection-tabs-CCdUJRcj.js} +1 -1
- package/dist/client/assets/{command-Dkfm4s2k.js → command-CGbsZOaN.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DtUMhwdU.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-DKL_vE45.js → connect-desktop-dialog-CRhRTOUc.js} +1 -1
- package/dist/client/assets/{connection-card-BmXpylIP.js → connection-card-DGNqtPoP.js} +1 -1
- package/dist/client/assets/{connection-detail-DNd1ZQGj.js → connection-detail-DlI7-vLh.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-i8kc8g_h.js → connection-form-helpers-Bs8LNNlp.js} +1 -1
- package/dist/client/assets/{connections-DwE0OmTn.js → connections-Ci34jtNe.js} +1 -1
- package/dist/client/assets/{decopilot-DVVdoab1.js → decopilot--vqccpDb.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-C9B6d0V3.js → decopilot-sse-pool-B7Qe588m.js} +1 -1
- package/dist/client/assets/{dialog-BK7FdLgQ.js → dialog-C2MVTIBt.js} +1 -1
- package/dist/client/assets/{domain-settings-KIfFg8Uv.js → domain-settings-Dk68eaoE.js} +1 -1
- package/dist/client/assets/{drawer-BOKmZjhb.js → drawer-BGO4iAk0.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BXvp7Poa.js → dropdown-menu-BPps0Iqr.js} +1 -1
- package/dist/client/assets/{empty-state-BWk4kN3I.js → empty-state-BUKBmmAV.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BTJ9Fhn2.js → extract-connection-data-Dq7vx8cX.js} +1 -1
- package/dist/client/assets/file-explorer-BGhwIot0.js +2 -0
- package/dist/client/assets/{file-type-icon-DIDUV08q.js → file-type-icon-DIgcp2MN.js} +1 -1
- package/dist/client/assets/{files-l2i7bDIR.js → files-CIXCBIkO.js} +1 -1
- package/dist/client/assets/{form-BOG3rRkz.js → form-TSiFK-dI.js} +1 -1
- package/dist/client/assets/{general-Be0ufkZZ.js → general-D5as9e6z.js} +1 -1
- package/dist/client/assets/get-initials-D-f_fDFw.js +1 -0
- package/dist/client/assets/{github-repo-picker-H6UyRgqq.js → github-repo-picker-B3tomRAJ.js} +1 -1
- package/dist/client/assets/{hooks-DqvpUbqo.js → hooks-BKW8thdS.js} +1 -1
- package/dist/client/assets/index-5uzKO7q6.css +1 -0
- package/dist/client/assets/{index-DhnegOZA.js → index-9kwnfSCp.js} +1 -1
- package/dist/client/assets/index-B09DUV7c.js +1 -0
- package/dist/client/assets/{index-mmZ00Fht.js → index-BZQALusN.js} +1 -1
- package/dist/client/assets/{index-t4CdgAvZ.js → index-BibhmEoM.js} +1 -1
- package/dist/client/assets/{index-BHw_x3xk.js → index-BlJ4j0DM.js} +1 -1
- package/dist/client/assets/{index-B_-q_4P-.js → index-Bsex2T4n.js} +3 -3
- package/dist/client/assets/{index-l6GBFngc.js → index-Btxmdruq.js} +1 -1
- package/dist/client/assets/{index-wSalJ4yv.js → index-C7DWYqRh.js} +1 -1
- package/dist/client/assets/{index-4pivgrAI.js → index-CEE6U8OI.js} +1 -1
- package/dist/client/assets/{index-DjZqnBm_.js → index-CIZOVv5V.js} +1 -1
- package/dist/client/assets/{index-BBkrDtkj.js → index-CKKQLGcV.js} +1 -1
- package/dist/client/assets/{index-xVNEye3o.js → index-DNvozpHG.js} +1 -1
- package/dist/client/assets/{index-YdFZmyaZ.js → index-ELtqDe0g.js} +14 -14
- package/dist/client/assets/{index-CRsyoh0P.js → index-d52A49fX.js} +3 -3
- package/dist/client/assets/{index-redirect-fs7Qf7zZ.js → index-redirect-BsNOVzi9.js} +1 -1
- package/dist/client/assets/{input-CnXP5aMo.js → input-B_5YyJ8y.js} +1 -1
- package/dist/client/assets/{integration-icon-CUX4W9Hv.js → integration-icon-DXGEOTjP.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-cpX923sH.js → invite-member-dialog-YIBgjb89.js} +1 -1
- package/dist/client/assets/{label-DhJnRZgA.js → label-CWqrShVu.js} +1 -1
- package/dist/client/assets/{library-tab-CvVa-OqV.js → library-tab-BBr_dx-g.js} +1 -1
- package/dist/client/assets/{login-Bs3s6Rkf.js → login-Da99hiOC.js} +1 -1
- package/dist/client/assets/{mcp-oauth-nWdzDozN.js → mcp-oauth-CSUfdVCn.js} +1 -1
- package/dist/client/assets/members-BboKmC5r.js +1 -0
- package/dist/client/assets/{monaco-editor-BpQyL38Q.js → monaco-editor-xlUuBDU4.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Ccix4lOH.js → monitoring-stats-row-DixOHH_R.js} +1 -1
- package/dist/client/assets/{oauth-callback-CO68L6oV.js → oauth-callback-BaDQ-n27.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B0TtqeXM.js → oauth-callback-ai-provider-I3h8vdSk.js} +1 -1
- package/dist/client/assets/{onboarding-QhVNhFdk.js → onboarding-B1EOLElh.js} +1 -1
- package/dist/client/assets/{org-install-ErmVLHvW.js → org-install-CDUCFQCm.js} +1 -1
- package/dist/client/assets/{org-layout-D38ef99_.js → org-layout-NnaVwU9k.js} +1 -1
- package/dist/client/assets/{organization-choice-Tf5NJHeh.js → organization-choice-C-TyyEjY.js} +1 -1
- package/dist/client/assets/{page-seo-form-CTcVALHG.js → page-seo-form-Cfv9ng9q.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CIF4tqJJ.js +1 -0
- package/dist/client/assets/{popover-CfzedSO-.js → popover-DlszYF1R.js} +1 -1
- package/dist/client/assets/post-editor-BiHws1oe.js +1 -0
- package/dist/client/assets/{primitives-CXb4fn8s.js → primitives-0HgpGbC7.js} +1 -1
- package/dist/client/assets/{profile-BaF8zbuW.js → profile-ZMZrPNFW.js} +1 -1
- package/dist/client/assets/project-app-view-O-o90Cxo.js +1 -0
- package/dist/client/assets/record-editor-BZ3V6i3V.js +1 -0
- package/dist/client/assets/registry-DzfT-ESq.js +2 -0
- package/dist/client/assets/{registry-layout-CSGY5xYu.js → registry-layout-zFAhrTof.js} +1 -1
- package/dist/client/assets/{require-capability-eWa58zjU.js → require-capability-C135EIMf.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D9x1NXiE.js → required-auth-layout-CEAeU4UY.js} +1 -1
- package/dist/client/assets/{reset-password-GNJpFe_P.js → reset-password-D_zECCKz.js} +1 -1
- package/dist/client/assets/roles-DYzEztRG.js +1 -0
- package/dist/client/assets/{scroll-area-CYqq0nPW.js → scroll-area-Bsik7Uif.js} +1 -1
- package/dist/client/assets/{search-input-r5iP5iuB.js → search-input-DccF25qw.js} +1 -1
- package/dist/client/assets/{secrets-Bu6Z8OBg.js → secrets-DJrAzRmE.js} +1 -1
- package/dist/client/assets/{sections-editor-B2SxZ1cU.js → sections-editor-i5xgzCTq.js} +2 -2
- package/dist/client/assets/{select-izZ6sucn.js → select-DdHVdWXn.js} +1 -1
- package/dist/client/assets/{select-model-DX9C2tgo.js → select-model-C49KT9p5.js} +1 -1
- package/dist/client/assets/seo-editor-C38OT2eM.js +1 -0
- package/dist/client/assets/{settings-layout-g3sRccmN.js → settings-layout-DePsodvD.js} +1 -1
- package/dist/client/assets/{settings-section-BMwcZuRK.js → settings-section-eWkjB3kv.js} +1 -1
- package/dist/client/assets/{sheet-DiKbGOCj.js → sheet-DSSfro03.js} +1 -1
- package/dist/client/assets/{shell-controls-C9tCTQdE.js → shell-controls-DMbQmeKU.js} +1 -1
- package/dist/client/assets/{shell-layout-CEHTO6uu.js → shell-layout-DdmjIlR4.js} +1 -1
- package/dist/client/assets/{sidebar-CV5tOntB.js → sidebar-BJwboMe2.js} +1 -1
- package/dist/client/assets/{skeleton-Iq-zR2Ew.js → skeleton-Bl9k4gft.js} +1 -1
- package/dist/client/assets/{sso-h3VWd7Vh.js → sso-xj4rMylh.js} +1 -1
- package/dist/client/assets/{store-C6fQuWSN.js → store-DlhSxr4k.js} +1 -1
- package/dist/client/assets/store-registry-BayPiGW-.js +2 -0
- package/dist/client/assets/{studio-tools-0oP05Vmo.js → studio-tools-nA7ZTnFV.js} +1 -1
- package/dist/client/assets/{switch-CHXTZ9dZ.js → switch-CuT_exNr.js} +1 -1
- package/dist/client/assets/{table-Ded64YC3.js → table-CWyE2zgw.js} +1 -1
- package/dist/client/assets/{tabs-CXI9rQJI.js → tabs-DRqPX6Mz.js} +1 -1
- package/dist/client/assets/{task-row-CCSwtZau.js → task-row-DzSs63v5.js} +1 -1
- package/dist/client/assets/{task-status-BcVBGHoc.js → task-status-CNEAWeje.js} +1 -1
- package/dist/client/assets/{textarea-CjEBrlku.js → textarea-B3Rf9sP3.js} +1 -1
- package/dist/client/assets/{toggle-group-ChDolbV_.js → toggle-group-BuLxG5r3.js} +1 -1
- package/dist/client/assets/{toolbar-COQJG38H.js → toolbar-CVjg3TEd.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BoklVZLA.js → toolbar-icon-button-CwCDO4L5.js} +1 -1
- package/dist/client/assets/{tools-list-CRIV7Qot.js → tools-list-Dzc5vr-A.js} +1 -1
- package/dist/client/assets/{tooltip-UK4TH3io.js → tooltip-Bzas0fb8.js} +1 -1
- package/dist/client/assets/{types-DKCRVv18.js → types-B2Xs3OM7.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CaRQPTIl.js → use-ai-providers-CW0jtnuO.js} +1 -1
- package/dist/client/assets/{use-automations-CSpNEw7t.js → use-automations-CuWiOTtv.js} +1 -1
- package/dist/client/assets/{use-capability-DhsEVexh.js → use-capability-C9whYnsG.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CVEnk_fR.js → use-clock-tick-B6ygxook.js} +1 -1
- package/dist/client/assets/{use-collections-DK_l6F0N.js → use-collections-BP4R8sI-.js} +1 -1
- package/dist/client/assets/{use-connection-B7bWiRqI.js → use-connection-BLVjIktc.js} +1 -1
- package/dist/client/assets/{use-copy-v85ZDhBk.js → use-copy-_bA4U2MU.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B9P7c8fS.js → use-create-virtual-mcp-DAOEgAsA.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BRe10INx.js → use-debounced-autosave-D34fr9f_.js} +1 -1
- package/dist/client/assets/{use-debounced-value--LReIEFy.js → use-debounced-value-DxBLMeqg.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-OQXlP2AG.js → use-decopilot-events-Dk3_PQZu.js} +1 -1
- package/dist/client/assets/{use-delete-connection-D4TpwuJR.js → use-delete-connection-CkaRxWAn.js} +1 -1
- package/dist/client/assets/{use-file-configs-EVrNclQN.js → use-file-configs-Td4k8wTj.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CGcVMh5N.js → use-infinite-scroll-1VhU5Q3H.js} +1 -1
- package/dist/client/assets/{use-join-requests-DLjSpEvk.js → use-join-requests-DoInaUWb.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Cw-KQdjY.js → use-mcp-client-QTh-uqf4.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DEcLTxCu.js → use-mcp-prompts-5W77PpYc.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BWeF-o2W.js → use-mcp-tools-BTYjbm6L.js} +1 -1
- package/dist/client/assets/{use-members-B8OfJnCF.js → use-members-Cc48Xacn.js} +1 -1
- package/dist/client/assets/{use-mobile-4NErBPoD.js → use-mobile-Cqur1PpI.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-k1osJofZ.js → use-navigate-to-agent-CaUSC1CF.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CKi9OpAo.js → use-org-auth-client-C5lRdd5o.js} +1 -1
- package/dist/client/assets/{use-org-sso-2304w9oC.js → use-org-sso-DGL7haeQ.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CARycmhE.js → use-organization-roles-UeKRVQhu.js} +1 -1
- package/dist/client/assets/{use-organization-settings-5ui-nRxh.js → use-organization-settings-CnPdR5CP.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bxjl5Lj_.js → use-registry-connections-HQM1hA3o.js} +1 -1
- package/dist/client/assets/{use-secrets-8J07E3fR.js → use-secrets-D-GN3cJh.js} +1 -1
- package/dist/client/assets/{use-status-sounds-iNOj7q7H.js → use-status-sounds-DEhedUWx.js} +1 -1
- package/dist/client/assets/{use-view-mode-B4Vk6db7.js → use-view-mode-BMlb6QOX.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B-AR1TD8.js → use-virtual-mcp-n0IfHFn6.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DEG0qlSd.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DzP8_asj.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-uvbGhRAk.js → useSuspenseQueries-CI8oYgcQ.js} +1 -1
- package/dist/client/assets/variant-calendar-CIBbpgAR.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BNwnnQw6.js → view-mode-toggle-D0e_xb-Q.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +456 -442
- package/dist/server/migrate.js +90 -90
- package/dist/server/server.js +170 -170
- package/package.json +1 -1
- package/dist/client/assets/Loading02-a6STvmGU.js +0 -1
- package/dist/client/assets/agent-icon-BcBxeMvp.js +0 -1
- package/dist/client/assets/app-editor-Dh7i3tDU.js +0 -1
- package/dist/client/assets/automation-runs-BodMFbin.js +0 -1
- package/dist/client/assets/bulk-category-panel-D7iwURo4.js +0 -1
- package/dist/client/assets/category-editor-Bj0CTMYS.js +0 -1
- package/dist/client/assets/commerce-onboarding-Cao_L-Ng.js +0 -1
- package/dist/client/assets/file-explorer-DSO0lPQW.js +0 -2
- package/dist/client/assets/index-CQjAk6qZ.js +0 -1
- package/dist/client/assets/index-DHIsTpg5.css +0 -1
- package/dist/client/assets/members-DD1QFtZt.js +0 -1
- package/dist/client/assets/page-seo-sheet-CwjWwa1t.js +0 -1
- package/dist/client/assets/post-editor-JbLYx6RR.js +0 -1
- package/dist/client/assets/project-app-view-Bj0jS6e7.js +0 -1
- package/dist/client/assets/record-editor-pQn6L-Pz.js +0 -1
- package/dist/client/assets/registry-WN0IM34L.js +0 -2
- package/dist/client/assets/roles-CqFcCBV9.js +0 -1
- package/dist/client/assets/seo-editor-xIQkOSof.js +0 -1
- package/dist/client/assets/store-registry-BS3Rr6_C.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Bt6QE1yD.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dds483du.js +0 -1
- package/dist/client/assets/variant-calendar-B0s-BmZ7.js +0 -1
package/dist/client/assets/{organization-choice-Tf5NJHeh.js → organization-choice-C-TyyEjY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as L,r as B,d as O,j as t,B as M,i as F}from"./index-
|
|
1
|
+
import{c as L,r as B,d as O,j as t,B as M,i as F}from"./index-d52A49fX.js";import{A as U}from"./avatar-BrhzNA4d.js";function I(r){const e=L.c(41),{organizations:i,domain:l,requestedSlugs:v,onRequestedSlug:y,onSelected:p,onJoined:c,onRequestCompleted:k,selectLabel:E}=r,x=E===void 0?"Select":E;let q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q=new Set,e[0]=q):q=e[0];const[_,P]=B.useState(q);let b;e[1]!==y?(b=o=>{P(s=>new Set(s).add(o)),y?.(o)},e[1]=y,e[2]=b):b=e[2];const C=b;let w;e[3]!==c?(w={mutationFn:D,onSuccess:o=>{const{organization:s,slug:f}=o;c?.(s,f)}},e[3]=c,e[4]=w):w=e[4];const n=O(w);let z;e[5]!==C||e[6]!==c||e[7]!==k?(z={mutationFn:$,onSuccess:o=>{const{organization:s,slug:f,alreadyMember:J}=o;if(J&&f){c?.(s,f);return}C(s.slug),k?.(s)}},e[5]=C,e[6]=c,e[7]=k,e[8]=z):z=e[8];const a=O(z);let u;e[9]!==v?(u=v??[],e[9]=v,e[10]=u):u=e[10];let N;e[11]!==_||e[12]!==u?(N=new Set([...u,..._]),e[11]=_,e[12]=u,e[13]=N):N=e[13];const h=N,j=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==l||e[15]!==h||e[16]!==n||e[17]!==p||e[18]!==i||e[19]!==j||e[20]!==S||e[21]!==a||e[22]!==x){let o;e[24]!==l||e[25]!==h||e[26]!==n||e[27]!==p||e[28]!==j||e[29]!==S||e[30]!==a||e[31]!==x?(o=s=>{const f=n.isPending&&j===s.slug,J=a.isPending&&S===s.slug,T=h.has(s.slug),A=s.logo??(l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(U,{url:A??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),l&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",l]})]}),s.joinMode==="auto"?t.jsx(M,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:f?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(F,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?T?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(M,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:J?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(F,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(M,{size:"default",onClick:()=>p?.(s),children:x})]},s.id)},e[24]=l,e[25]=h,e[26]=n,e[27]=p,e[28]=j,e[29]=S,e[30]=a,e[31]=x,e[32]=o):o=e[32],d=i.map(o),e[14]=l,e[15]=h,e[16]=n,e[17]=p,e[18]=i,e[19]=j,e[20]=S,e[21]=a,e[22]=x,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let R;return e[37]!==g||e[38]!==d||e[39]!==m?(R=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=R):R=e[40],R}async function $(r){const e=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r.slug})}),i=await e.json();if(!e.ok||!i.success)throw new Error(i.error||"Failed to request access");return{organization:r,slug:i.slug,alreadyMember:i.alreadyMember}}async function D(r){const e=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r.slug})}),i=await e.json();if(!e.ok||!i.success)throw new Error(i.error||"Failed to join organization");return{organization:r,slug:i.slug??r.slug}}export{I as O};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as L,m as te,K as U,j as a,r as M,l as ne}from"./index-CRsyoh0P.js";import{i as oe,v as z,ai as se,aj as re,ak as ie,m as le,al as ce,af as ae}from"./index-YdFZmyaZ.js";import{L as Y}from"./label-DhJnRZgA.js";import{S as $}from"./switch-CHXTZ9dZ.js";import{c as ue,S as fe,a as pe,b as de,d as ye}from"./select-izZ6sucn.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function je(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function Ee(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(je(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=Ee(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=j=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,j)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=j=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:j}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const E={...o};if(T)delete E[u];else{const D=r?.[u];E[u]=D??(u==="type"?"website":"")}s(E)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const j=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const E=p&&d.includes(u),D=E&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),E&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>j(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const E=me(s);p(E),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const E=Se(T,n);p(E)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let j;e[8]!==h||e[9]!==f?(j=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=j):j=e[10];const P=j;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,qe as a,Ce as b,He as c,Z as d,Ee as f,k as i,Ze as r,w as u};
|
|
1
|
+
import{c as L,m as te,K as U,j as a,r as M,l as ne}from"./index-d52A49fX.js";import{i as oe,v as z,ai as se,aj as re,ak as ie,m as le,al as ce,af as ae}from"./index-ELtqDe0g.js";import{L as Y}from"./label-CWqrShVu.js";import{S as $}from"./switch-CuT_exNr.js";import{c as ue,S as fe,a as pe,b as de,d as ye}from"./select-DdHVdWXn.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function je(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function Ee(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(je(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=Ee(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=j=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,j)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=j=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:j}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const E={...o};if(T)delete E[u];else{const D=r?.[u];E[u]=D??(u==="type"?"website":"")}s(E)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const j=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const E=p&&d.includes(u),D=E&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),E&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>j(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const E=me(s);p(E),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const E=Se(T,n);p(E)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let j;e[8]!==h||e[9]!==f?(j=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=j):j=e[10];const P=j;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,qe as a,Ce as b,He as c,Z as d,Ee as f,k as i,Ze as r,w as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as it,r as E,j as e,i as rt}from"./index-d52A49fX.js";import{S as mt,b as pt,c as st,d as at}from"./sheet-DSSfro03.js";import{S as nt}from"./scroll-area-Bsik7Uif.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-Cfv9ng9q.js";import{v as xt}from"./index-ELtqDe0g.js";import"./X-DRR7RtBP.js";import"./agent-icon-BvZm1osM.js";import"./AlertCircle-D90xu5-8.js";import"./Tool01-DJgxsN47.js";import"./SwitchHorizontal01-Bu9ipsE_.js";import"./Settings02-COfrOHpp.js";import"./XCircle-Cz7czjsw.js";import"./ArrowUpRight-B1XPsNPZ.js";import"./ZapSquare-Ch518nCD.js";import"./Users03-JTfAuK6m.js";import"./Loading02-DaLVACu2.js";import"./CheckCircle-CebfgxLq.js";import"./Check-BqH5cjqe.js";import"./ChevronDown-DhzhS3K5.js";import"./ChevronRight-DntNgeBz.js";import"./ChevronUp-DPJfOoQR.js";import"./Circle-umqkxNwx.js";import"./Stars02-sR281nUk.js";import"./Copy01-YBIj7O7M.js";import"./ZoomOut-Chl8lvun.js";import"./DotsVertical-DoxN78H8.js";import"./Globe01-D3NrpjPq.js";import"./Eye-o8ajkfvt.js";import"./FilterLines-CEBhmChB.js";import"./Star01-twQgP5oO.js";import"./Globe04-6xG6GU2e.js";import"./HardDrive-CDBenwE2.js";import"./Key01-CwgjH_um.js";import"./LayoutLeft-CKcHwaHf.js";import"./LinkExternal01-DBFEHO3t.js";import"./List-s8AZWxpk.js";import"./Monitor01-lxPxQ2fk.js";import"./Sun-DTFx5jn8.js";import"./Palette-DHyTdFqR.js";import"./Play-TOCBGzP9.js";import"./Plus-DkGwhdIW.js";import"./SearchLg-C9MBYrXH.js";import"./SearchMd-Dhz0UROc.js";import"./Shield01-BrK-9cDf.js";import"./Stars01-C27kMlCK.js";import"./Trash01-myAGgKHr.js";import"./Upload01-m0ny4YmQ.js";import"./User01-DuGAbO5F.js";import"./Users01-e9Wb8IJU.js";import"./XClose-eEYHZsPT.js";import"./Zap-CMZ9cCJz.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-_bA4U2MU.js";import"./tooltip-Bzas0fb8.js";import"./file-type-icon-DIgcp2MN.js";import"./dialog-C2MVTIBt.js";import"./use-mobile-Cqur1PpI.js";import"./tab-id-Bgchl1bv.js";import"./content-blocks-o63cs2vh.js";import"./types-B2Xs3OM7.js";import"./use-mcp-client-QTh-uqf4.js";import"./constants-nH3qQ_1f.js";import"./auth-B8jeHTDK.js";import"./chat-context-XoGdeFE9.js";import"./hooks-BKW8thdS.js";import"./decopilot-sse-pool-B7Qe588m.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-n0IfHFn6.js";import"./use-collections-BP4R8sI-.js";import"./use-ai-providers-CW0jtnuO.js";import"./studio-tools-nA7ZTnFV.js";import"./use-decopilot-events-Dk3_PQZu.js";import"./use-organization-settings-CnPdR5CP.js";import"./use-clock-tick-B6ygxook.js";import"./shell-layout-DdmjIlR4.js";import"./avatar-BrhzNA4d.js";import"./alert-dialog-wgrcUQ0O.js";import"./required-auth-layout-CEAeU4UY.js";import"./use-org-sso-DGL7haeQ.js";import"./integration-icon-DXGEOTjP.js";import"./use-navigate-to-agent-CaUSC1CF.js";import"./use-connection-BLVjIktc.js";import"./use-mcp-prompts-5W77PpYc.js";import"./form-TSiFK-dI.js";import"./label-CWqrShVu.js";import"./input-B_5YyJ8y.js";import"./select-DdHVdWXn.js";import"./switch-CuT_exNr.js";import"./library-tab-BBr_dx-g.js";import"./drawer-BGO4iAk0.js";import"./collection-search-BHb176G9.js";import"./tabs-DRqPX6Mz.js";import"./toggle-group-BuLxG5r3.js";import"./agent-capabilities-Cpju5Yfe.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DGNqtPoP.js";import"./use-registry-connections-HQM1hA3o.js";import"./useInfiniteQuery-DEG0qlSd.js";import"./use-infinite-scroll-1VhU5Q3H.js";import"./extract-connection-data-Dq7vx8cX.js";import"./card-CCFrbS6S.js";import"./collection-tabs-CCdUJRcj.js";import"./badge-B5li3mFX.js";import"./textarea-B3Rf9sP3.js";import"./connection-form-helpers-Bs8LNNlp.js";import"./authenticate-and-persist-oauth-ezeRyKPp.js";import"./mcp-oauth-CSUfdVCn.js";import"./useSuspenseInfiniteQuery-DzP8_asj.js";import"./connect-desktop-dialog-CRhRTOUc.js";import"./decopilot--vqccpDb.js";import"./checkbox-D2NBps_s.js";import"./skeleton-Bl9k4gft.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-eWkjB3kv.js";import"./popover-DlszYF1R.js";import"./command-CGbsZOaN.js";import"./index-BlJ4j0DM.js";import"./index-Btxmdruq.js";import"./toolbar-CVjg3TEd.js";import"./use-debounced-value-DxBLMeqg.js";import"./dropdown-menu-BPps0Iqr.js";import"./index-9kwnfSCp.js";import"./question-004-sINsf4GQ.js";import"./task-row-DzSs63v5.js";import"./task-status-CNEAWeje.js";import"./use-status-sounds-DEhedUWx.js";import"./empty-state-BUKBmmAV.js";import"./use-mcp-tools-BTYjbm6L.js";import"./use-capability-C9whYnsG.js";import"./tools-list-Dzc5vr-A.js";import"./use-debounced-autosave-D34fr9f_.js";import"./index-BZQALusN.js";import"./sidebar-BJwboMe2.js";import"./search-input-DccF25qw.js";import"./github-repo-picker-B3tomRAJ.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-D-GN3cJh.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-CwCDO4L5.js";import"./calendar-C0u4vRHU.js";import"./use-file-configs-Td4k8wTj.js";import"./monaco-editor-xlUuBDU4.js";import"./select-model-C49KT9p5.js";import"./use-automations-CuWiOTtv.js";import"./automation-runs-CmgFzJTt.js";import"./table-CWyE2zgw.js";import"./use-members-Cc48Xacn.js";import"./use-org-auth-client-C5lRdd5o.js";import"./automation-list-row-CeLhtWjA.js";function di(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 z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,B=m.kind==="site"&&o&&n,H=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 $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,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]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||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]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):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:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,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]=B,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]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,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{di as SeoSheet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,a7 as $,j as c,dv as z,ab as G,a8 as O,a4 as _,aa as g,dw as w,b6 as E,dx as L,dy as b,dC as H,dD as K,a6 as B,dE as U,dF as V,dG as W,dz as Z,dA as q,dB as J,c as R,l as Q}from"./index-
|
|
1
|
+
import{r as i,a7 as $,j as c,dv as z,ab as G,a8 as O,a4 as _,aa as g,dw as w,b6 as E,dx as L,dy as b,dC as H,dD as K,a6 as B,dE as U,dF as V,dG as W,dz as Z,dA as q,dB as J,c as R,l as Q}from"./index-d52A49fX.js";var C="Popover",[j]=B(C,[b]),P=b(),[X,u]=j(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(z,{...p,children:c.jsx(X,{scope:e,contentId:G(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(w,{...s,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(w,{asChild:!0,...s,children:p})});S.displayName=y;var A="PopoverPortal",[ee,oe]=j(A,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(A,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(E,{present:o||s.open,children:c.jsx(L,{asChild:!0,container:n,children:r})})})};D.displayName=A;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(E,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("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 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as H,j as t,B as Z}from"./index-d52A49fX.js";import{n as ee}from"./LinkExternal01-DBFEHO3t.js";import{aE as te,t as oe}from"./agent-icon-BvZm1osM.js";import{I as J}from"./input-B_5YyJ8y.js";import{L as G}from"./label-CWqrShVu.js";import{M as ie}from"./automation-runs-CmgFzJTt.js";import{T as Q,a as se,b as W,c as le}from"./tabs-DRqPX6Mz.js";import{T as re}from"./textarea-B3Rf9sP3.js";import{au as ae,av as me,at as pe,aw as ne,ax as ce,ay as de,az as fe}from"./index-ELtqDe0g.js";import{b as ue,a as xe,B as he}from"./block-document-BKVlkRQG.js";import{u as ge,s as F,E as ve,R as ye,A as je}from"./primitives-0HgpGbC7.js";import"./AlertCircle-D90xu5-8.js";import"./Tool01-DJgxsN47.js";import"./SwitchHorizontal01-Bu9ipsE_.js";import"./Settings02-COfrOHpp.js";import"./XCircle-Cz7czjsw.js";import"./ArrowUpRight-B1XPsNPZ.js";import"./ZapSquare-Ch518nCD.js";import"./Users03-JTfAuK6m.js";import"./Loading02-DaLVACu2.js";import"./CheckCircle-CebfgxLq.js";import"./Check-BqH5cjqe.js";import"./ChevronDown-DhzhS3K5.js";import"./ChevronRight-DntNgeBz.js";import"./ChevronUp-DPJfOoQR.js";import"./Circle-umqkxNwx.js";import"./Stars02-sR281nUk.js";import"./Copy01-YBIj7O7M.js";import"./ZoomOut-Chl8lvun.js";import"./DotsVertical-DoxN78H8.js";import"./Globe01-D3NrpjPq.js";import"./Eye-o8ajkfvt.js";import"./FilterLines-CEBhmChB.js";import"./Star01-twQgP5oO.js";import"./Globe04-6xG6GU2e.js";import"./HardDrive-CDBenwE2.js";import"./Key01-CwgjH_um.js";import"./LayoutLeft-CKcHwaHf.js";import"./List-s8AZWxpk.js";import"./Monitor01-lxPxQ2fk.js";import"./Sun-DTFx5jn8.js";import"./Palette-DHyTdFqR.js";import"./Play-TOCBGzP9.js";import"./Plus-DkGwhdIW.js";import"./SearchLg-C9MBYrXH.js";import"./SearchMd-Dhz0UROc.js";import"./Shield01-BrK-9cDf.js";import"./Stars01-C27kMlCK.js";import"./Trash01-myAGgKHr.js";import"./Upload01-m0ny4YmQ.js";import"./User01-DuGAbO5F.js";import"./Users01-e9Wb8IJU.js";import"./XClose-eEYHZsPT.js";import"./X-DRR7RtBP.js";import"./Zap-CMZ9cCJz.js";import"./useInfiniteQuery-DEG0qlSd.js";import"./use-infinite-scroll-1VhU5Q3H.js";import"./use-connection-BLVjIktc.js";import"./use-collections-BP4R8sI-.js";import"./use-mcp-client-QTh-uqf4.js";import"./constants-nH3qQ_1f.js";import"./auth-B8jeHTDK.js";import"./use-virtual-mcp-n0IfHFn6.js";import"./card-CCFrbS6S.js";import"./sheet-DSSfro03.js";import"./table-CWyE2zgw.js";import"./empty-state-BUKBmmAV.js";import"./use-members-Cc48Xacn.js";import"./use-org-auth-client-C5lRdd5o.js";import"./task-status-CNEAWeje.js";import"./use-automations-CuWiOTtv.js";import"./studio-tools-nA7ZTnFV.js";import"./useSuspenseInfiniteQuery-DzP8_asj.js";import"./badge-B5li3mFX.js";import"./select-DdHVdWXn.js";import"./tooltip-Bzas0fb8.js";import"./checkbox-D2NBps_s.js";import"./command-CGbsZOaN.js";import"./index-BlJ4j0DM.js";import"./dialog-C2MVTIBt.js";import"./popover-DlszYF1R.js";import"./avatar-BrhzNA4d.js";import"./scroll-area-Bsik7Uif.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-_bA4U2MU.js";import"./file-type-icon-DIgcp2MN.js";import"./use-mobile-Cqur1PpI.js";import"./tab-id-Bgchl1bv.js";import"./content-blocks-o63cs2vh.js";import"./types-B2Xs3OM7.js";import"./chat-context-XoGdeFE9.js";import"./hooks-BKW8thdS.js";import"./decopilot-sse-pool-B7Qe588m.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-CW0jtnuO.js";import"./use-decopilot-events-Dk3_PQZu.js";import"./use-organization-settings-CnPdR5CP.js";import"./use-clock-tick-B6ygxook.js";import"./shell-layout-DdmjIlR4.js";import"./alert-dialog-wgrcUQ0O.js";import"./required-auth-layout-CEAeU4UY.js";import"./use-org-sso-DGL7haeQ.js";import"./integration-icon-DXGEOTjP.js";import"./use-navigate-to-agent-CaUSC1CF.js";import"./use-mcp-prompts-5W77PpYc.js";import"./form-TSiFK-dI.js";import"./library-tab-BBr_dx-g.js";import"./drawer-BGO4iAk0.js";import"./collection-search-BHb176G9.js";import"./toggle-group-BuLxG5r3.js";import"./agent-capabilities-Cpju5Yfe.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DGNqtPoP.js";import"./use-registry-connections-HQM1hA3o.js";import"./extract-connection-data-Dq7vx8cX.js";import"./collection-tabs-CCdUJRcj.js";import"./connection-form-helpers-Bs8LNNlp.js";import"./authenticate-and-persist-oauth-ezeRyKPp.js";import"./mcp-oauth-CSUfdVCn.js";import"./connect-desktop-dialog-CRhRTOUc.js";import"./decopilot--vqccpDb.js";import"./skeleton-Bl9k4gft.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-eWkjB3kv.js";import"./index-Btxmdruq.js";import"./toolbar-CVjg3TEd.js";import"./use-debounced-value-DxBLMeqg.js";import"./dropdown-menu-BPps0Iqr.js";import"./index-9kwnfSCp.js";import"./question-004-sINsf4GQ.js";import"./task-row-DzSs63v5.js";import"./use-status-sounds-DEhedUWx.js";import"./use-mcp-tools-BTYjbm6L.js";import"./use-capability-C9whYnsG.js";import"./tools-list-Dzc5vr-A.js";import"./switch-CuT_exNr.js";import"./use-debounced-autosave-D34fr9f_.js";import"./index-BZQALusN.js";import"./sidebar-BJwboMe2.js";import"./search-input-DccF25qw.js";import"./github-repo-picker-B3tomRAJ.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-D-GN3cJh.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-CwCDO4L5.js";import"./calendar-C0u4vRHU.js";import"./use-file-configs-Td4k8wTj.js";import"./monaco-editor-xlUuBDU4.js";import"./select-model-C49KT9p5.js";import"./automation-list-row-CeLhtWjA.js";function be(A){return Array.isArray(A)?A.map(e=>({key:F(e?.key),value:F(e?.value)})):[]}function xi(A){const e=H.c(66),{orgSlug:i,virtualMcpId:d,branch:o,blockKey:l,block:p,decofile:m,meta:u,previewBaseUrl:x}=A;let y;e[0]!==o||e[1]!==i||e[2]!==d?(y={orgSlug:i,virtualMcpId:d,branch:o},e[0]=o,e[1]=i,e[2]=d,e[3]=y):y=e[3];const s=ae(y);let n;e[4]!==p?(n=me(p,"posts"),e[4]=p,e[5]=n):n=e[5];const j=n;let b;e[6]!==l||e[7]!==s?(b=T=>{s.mutate({blockKey:l,data:ne(l,"posts",T)})},e[6]=l,e[7]=s,e[8]=b):b=e[8];const[r,_]=ge(j,b);let C;e[9]!==r||e[10]!==_?(C=(T,Y)=>_({...r,[T]:Y}),e[9]=r,e[10]=_,e[11]=C):C=e[11];const h=C;let S;e[12]!==m||e[13]!==r||e[14]!==x?(S=ue({decofile:m,post:r,previewBaseUrl:x}),e[12]=m,e[13]=r,e[14]=x,e[15]=S):S=e[15];const f=S;let a;e[16]!==r.title?(a=F(r.title)||"Untitled post",e[16]=r.title,e[17]=a):a=e[17];let c;e[18]!==a?(c=t.jsx("span",{className:"truncate text-sm font-medium",children:a}),e[18]=a,e[19]=c):c=e[19];let g;e[20]!==s.isError||e[21]!==s.isPending?(g=t.jsx(pe,{isPending:s.isPending,isError:s.isError}),e[20]=s.isError,e[21]=s.isPending,e[22]=g):g=e[22];const k=!f,P=f?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let N;e[23]!==f?(N=()=>{f&&window.open(f,"_blank","noopener,noreferrer")},e[23]=f,e[24]=N):N=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let w;e[26]!==P||e[27]!==N||e[28]!==k?(w=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:k,title:P,onClick:N,children:[B,"See preview"]}),e[26]=P,e[27]=N,e[28]=k,e[29]=w):w=e[29];let E;e[30]!==w||e[31]!==g?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[g,w]}),e[30]=w,e[31]=g,e[32]=E):E=e[32];let v;e[33]!==E||e[34]!==c?(v=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,E]}),e[33]=E,e[34]=c,e[35]=v):v=e[35];let L;e[36]!==r.title?(L=F(r.title),e[36]=r.title,e[37]=L):L=e[37];let R;e[38]!==h?(R=T=>h("title",T),e[38]=h,e[39]=R):R=e[39];let U;e[40]!==L||e[41]!==R?(U=t.jsx(ve,{value:L,onChange:R,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=L,e[41]=R,e[42]=U):U=e[42];let O;e[43]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=O):O=e[43];let K;e[44]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(se,{children:[O,t.jsxs(Q,{value:"settings",children:[t.jsx(oe,{}),"Settings"]})]}),e[44]=K):K=e[44];let $;e[45]!==r.sections?($=xe(r.sections),e[45]=r.sections,e[46]=$):$=e[46];let I;e[47]!==h?(I=T=>h("sections",T),e[47]=h,e[48]=I):I=e[48];let M;e[49]!==u||e[50]!==$||e[51]!==I?(M=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(he,{value:$,onChange:I,meta:u,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=u,e[50]=$,e[51]=I,e[52]=M):M=e[52];let z;e[53]!==m||e[54]!==r||e[55]!==h?(z=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ce,{post:r,decofile:m,onChange:h})})}),e[53]=m,e[54]=r,e[55]=h,e[56]=z):z=e[56];let D;e[57]!==M||e[58]!==z?(D=t.jsxs(le,{defaultValue:"content",className:"mt-6 gap-4",children:[K,M,z]}),e[57]=M,e[58]=z,e[59]=D):D=e[59];let V;e[60]!==U||e[61]!==D?(V=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:[U,D]})}),e[60]=U,e[61]=D,e[62]=V):V=e[62];let q;return e[63]!==v||e[64]!==V?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[v,V]}),e[63]=v,e[64]=V,e[65]=q):q=e[65],q}function Ce(A){const e=H.c(59),{post:i,decofile:d,onChange:o}=A;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=l):l=e[0];let p;e[1]!==i.excerpt?(p=F(i.excerpt),e[1]=i.excerpt,e[2]=p):p=e[2];let m;e[3]!==o?(m=v=>o("excerpt",v.target.value),e[3]=o,e[4]=m):m=e[4];let u;e[5]!==p||e[6]!==m?(u=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx(re,{id:"post-excerpt",value:p,onChange:m,rows:2})]}),e[5]=p,e[6]=m,e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=x):x=e[8];let y;e[9]!==i.slug?(y=F(i.slug),e[9]=i.slug,e[10]=y):y=e[10];let s;e[11]!==o?(s=v=>o("slug",v.target.value),e[11]=o,e[12]=s):s=e[12];let n;e[13]!==y||e[14]!==s?(n=t.jsxs("div",{className:"space-y-2",children:[x,t.jsx(J,{id:"post-slug",value:y,onChange:s,placeholder:"my-post",className:"h-10"})]}),e[13]=y,e[14]=s,e[15]=n):n=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j={type:"string",format:"date",title:"Date"},e[16]=j):j=e[16];let b;e[17]!==i.date?(b=F(i.date),e[17]=i.date,e[18]=b):b=e[18];let r;e[19]!==o?(r=v=>o("date",v),e[19]=o,e[20]=r):r=e[20];let _;e[21]!==b||e[22]!==r?(_=t.jsx(fe,{schema:j,value:b,onChange:r,path:"post-date",label:"Date"}),e[21]=b,e[22]=r,e[23]=_):_=e[23];let C;e[24]!==_||e[25]!==n?(C=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n,_]}),e[24]=_,e[25]=n,e[26]=C):C=e[26];let h;e[27]===Symbol.for("react.memo_cache_sentinel")?(h={type:"string",format:"image-uri",title:"Cover image"},e[27]=h):h=e[27];let S;e[28]!==o?(S=v=>o("image",v),e[28]=o,e[29]=S):S=e[29];let f;e[30]!==i.image||e[31]!==S?(f=t.jsx(ce,{schema:h,value:i.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=i.image,e[31]=S,e[32]=f):f=e[32];let a;e[33]===Symbol.for("react.memo_cache_sentinel")?(a=["email"],e[33]=a):a=e[33];let c;e[34]!==o?(c=v=>o("authors",v),e[34]=o,e[35]=c):c=e[35];let g;e[36]!==d||e[37]!==i.authors||e[38]!==c?(g=t.jsx(X,{label:"Authors",decofile:d,kind:"authors",valueField:"email",extraFields:a,selected:i.authors,onChange:c}),e[36]=d,e[37]=i.authors,e[38]=c,e[39]=g):g=e[39];let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=["slug"],e[40]=k):k=e[40];let P;e[41]!==o?(P=v=>o("categories",v),e[41]=o,e[42]=P):P=e[42];let N;e[43]!==d||e[44]!==i.categories||e[45]!==P?(N=t.jsx(X,{label:"Categories",decofile:d,kind:"categories",valueField:"slug",extraFields:k,selected:i.categories,onChange:P}),e[43]=d,e[44]=i.categories,e[45]=P,e[46]=N):N=e[46];let B;e[47]!==o?(B=v=>o("extraProps",v),e[47]=o,e[48]=B):B=e[48];let w;e[49]!==i.extraProps||e[50]!==B?(w=t.jsx(ke,{value:i.extraProps,onChange:B}),e[49]=i.extraProps,e[50]=B,e[51]=w):w=e[51];let E;return e[52]!==C||e[53]!==f||e[54]!==g||e[55]!==N||e[56]!==w||e[57]!==u?(E=t.jsxs("div",{className:"space-y-5",children:[u,C,f,g,N,w]}),e[52]=C,e[53]=f,e[54]=g,e[55]=N,e[56]=w,e[57]=u,e[58]=E):E=e[58],E}function ke(A){const e=H.c(15),{value:i,onChange:d}=A;let o,l,p,m;if(e[0]!==d||e[1]!==i){o=be(i);const y=(s,n)=>d(o.map((j,b)=>b===s?{...j,...n}:j));l="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(G,{children:"Extra props"}),e[6]=p):p=e[6],m=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((s,n)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:s.key,onChange:j=>y(n,{key:j.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:s.value,onChange:j=>y(n,{value:j.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>d(o.filter((j,b)=>b!==n))})]},n))}),e[0]=d,e[1]=i,e[2]=o,e[3]=l,e[4]=p,e[5]=m}else o=e[2],l=e[3],p=e[4],m=e[5];let u;e[7]!==o||e[8]!==d?(u=t.jsx(je,{label:"Add prop",onClick:()=>d([...o,{key:"",value:""}])}),e[7]=o,e[8]=d,e[9]=u):u=e[9];let x;return e[10]!==l||e[11]!==p||e[12]!==m||e[13]!==u?(x=t.jsxs("div",{className:l,children:[p,m,u]}),e[10]=l,e[11]=p,e[12]=m,e[13]=u,e[14]=x):x=e[14],x}function X(A){const e=H.c(31),{label:i,decofile:d,kind:o,valueField:l,extraFields:p,selected:m,onChange:u}=A;let x,y,s;if(e[0]!==d||e[1]!==o||e[2]!==l){x=de(d,o);let f;e[6]!==l?(f=(c,g)=>F(c[l])||g,e[6]=l,e[7]=f):f=e[7],s=f;let a;e[8]!==s?(a=c=>{const{key:g,payload:k}=c;return{value:s(k,g),label:F(k.name)||s(k,g)}},e[8]=s,e[9]=a):a=e[9],y=x.map(a),e[0]=d,e[1]=o,e[2]=l,e[3]=x,e[4]=y,e[5]=s}else x=e[3],y=e[4],s=e[5];const n=y;let j;if(e[10]!==m||e[11]!==l){const f=Array.isArray(m)?m:[];let a;e[13]!==l?(a=c=>F(c[l]),e[13]=l,e[14]=a):a=e[14],j=f.map(a).filter(Boolean),e[10]=m,e[11]=l,e[12]=j}else j=e[12];const b=j;let r;e[15]!==p||e[16]!==u||e[17]!==x||e[18]!==l||e[19]!==s?(r=f=>{u(f.map(a=>{const c=x.find(k=>{const{key:P,payload:N}=k;return s(N,P)===a});if(!c)return{name:a,[l]:a};const g={name:F(c.payload.name)};for(const k of p)g[k]=c.payload[k]??a;return g}))},e[15]=p,e[16]=u,e[17]=x,e[18]=l,e[19]=s,e[20]=r):r=e[20];const _=r;let C;e[21]!==i?(C=t.jsx(G,{children:i}),e[21]=i,e[22]=C):C=e[22];let h;e[23]!==b||e[24]!==_||e[25]!==i||e[26]!==n?(h=n.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",i.toLowerCase()," yet — create some in the"," ",i.toLowerCase()," collection."]}):t.jsx(ie,{options:n,defaultValue:b,onValueChange:_,placeholder:`Select ${i.toLowerCase()}`,maxCount:4}),e[23]=b,e[24]=_,e[25]=i,e[26]=n,e[27]=h):h=e[27];let S;return e[28]!==C||e[29]!==h?(S=t.jsxs("div",{className:"space-y-2",children:[C,h]}),e[28]=C,e[29]=h,e[30]=S):S=e[30],S}export{xi as PostEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as h,r as y,l as j,j as f}from"./index-
|
|
1
|
+
import{c as h,r as y,l as j,j as f}from"./index-d52A49fX.js";import{a8 as A}from"./agent-icon-BvZm1osM.js";import{s as N}from"./Plus-DkGwhdIW.js";import{s as _}from"./Trash01-myAGgKHr.js";const S=700;function R(r,e,o){const t=h.c(7),s=S,[n,c]=y.useState(r),[l,u]=y.useState(r),[x,p]=y.useState(!1),i=y.useRef(null);r!==l&&(u(r),x||c(r));let a;t[0]!==s||t[1]!==e?(a=g=>{c(g),p(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,p(!1),e(g)},s)},t[0]=s,t[1]=e,t[2]=a):a=t[2];const d=a;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=g=>{c(g),i.current&&clearTimeout(i.current),i.current=null,p(!1)},t[3]=m):m=t[3];const v=m;let b;return t[4]!==n||t[5]!==d?(b=[n,d,v],t[4]=n,t[5]=d,t[6]=b):b=t[6],b}function T(r){const e=h.c(14),{value:o,onChange:t,placeholder:s,className:n,onFocus:c,onBlur:l,onKeyDown:u,spellCheck:x,inputRef:p}=r,i=x===void 0?!0:x;let a;e[0]!==t?(a=v=>t(v.target.value),e[0]=t,e[1]=a):a=e[1];let d;e[2]!==n?(d=j("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==c||e[7]!==u||e[8]!==s||e[9]!==i||e[10]!==a||e[11]!==d||e[12]!==o?(m=f.jsx("textarea",{ref:p,value:o,onChange:a,onInput:w,onFocus:c,onBlur:l,onKeyDown:u,placeholder:s,spellCheck:i,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=c,e[7]=u,e[8]=s,e[9]=i,e[10]=a,e[11]=d,e[12]=o,e[13]=m):m=e[13],m}function w(r){const e=r.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function D(r){return typeof r=="string"?r:""}function B(r){const e=h.c(11);let o,t;e[0]!==r?({className:o,...t}=r,e[0]=r,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=j(o,"pr-9"),e[3]=o,e[4]=s):s=e[4];let n;e[5]!==t||e[6]!==s?(n=f.jsx(T,{...t,className:s}),e[5]=t,e[6]=s,e[7]=n):n=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=f.jsx(A,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=c):c=e[8];let l;return e[9]!==n?(l=f.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,c]}),e[9]=n,e[10]=l):l=e[10],l}function F(r){const e=h.c(5),{label:o,onClick:t,disabled:s}=r;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=f.jsx(N,{size:13}),e[0]=n):n=e[0];let c;return e[1]!==s||e[2]!==o||e[3]!==t?(c=f.jsxs("button",{type:"button",onClick:t,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,o]}),e[1]=s,e[2]=o,e[3]=t,e[4]=c):c=e[4],c}function I(r){const e=h.c(4),{label:o,onClick:t}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=f.jsx(_,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==o||e[2]!==t?(n=f.jsx("button",{type:"button","aria-label":o,onClick:t,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=o,e[2]=t,e[3]=n):n=e[3],n}function J(r){const e=h.c(2),{children:o}=r;let t;return e[0]!==o?(t=f.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:o}),e[0]=o,e[1]=t):t=e[1],t}function O(r){const e=h.c(8),{active:o,label:t,onClick:s,children:n}=r,c=o?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==c?(l=j("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",c),e[0]=c,e[1]=l):l=e[1];let u;return e[2]!==o||e[3]!==n||e[4]!==t||e[5]!==s||e[6]!==l?(u=f.jsx("button",{type:"button","aria-label":t,"aria-pressed":o,onMouseDown:$,onClick:s,className:l,children:n}),e[2]=o,e[3]=n,e[4]=t,e[5]=s,e[6]=l,e[7]=u):u=e[7],u}function $(r){return r.preventDefault()}function H(r){if(Array.isArray(r))return r;if(typeof r!="string"||r.trim()==="")return[];try{const e=JSON.parse(r);return Array.isArray(e)?e:[]}catch{return[]}}export{F as A,B as E,J as F,T as I,I as R,O as T,H as p,D as s,R as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V,j as t,a as T,p as R,a1 as q,I as B,v as N,t as I}from"./index-
|
|
1
|
+
import{c as V,j as t,a as T,p as R,a1 as q,I as B,v as N,t as I}from"./index-d52A49fX.js";import{P as L}from"./index-BZQALusN.js";import{A as U}from"./avatar-BrhzNA4d.js";import{S as D}from"./switch-CuT_exNr.js";import{d as G,S as Y,c as $,b as K}from"./select-DdHVdWXn.js";import{a as O,T as z}from"./toggle-group-BuLxG5r3.js";import{I as H}from"./input-B_5YyJ8y.js";import{i as J}from"./Monitor01-lxPxQ2fk.js";import{n as M,a as Q}from"./Sun-DTFx5jn8.js";import{i as W}from"./Play-TOCBGzP9.js";import{u as X}from"./use-debounced-autosave-D34fr9f_.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-DNvozpHG.js";import{c as te,b as A,S as E,a as F}from"./settings-section-eWkjB3kv.js";import"./sidebar-BJwboMe2.js";import"./LayoutLeft-CKcHwaHf.js";import"./use-mobile-Cqur1PpI.js";import"./sheet-DSSfro03.js";import"./X-DRR7RtBP.js";import"./tooltip-Bzas0fb8.js";import"./User01-DuGAbO5F.js";import"./Check-BqH5cjqe.js";import"./ChevronDown-DhzhS3K5.js";import"./ChevronUp-DPJfOoQR.js";import"./card-CCFrbS6S.js";import"./ArrowUpRight-B1XPsNPZ.js";function se(){const e=V.c(19),{data:s,isPending:o}=T.useSession(),g=s?.user,p=g?.image,h=g?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const v=n.control._formState.dirtyFields;if(Object.keys(v).length===0)return;const a=n.getValues(),f=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await T.updateUser({name:a.name}),N("profile_updated",{fields:["name"]}),I.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),I.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=g?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(U,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==m||e[8]!==x?(l=v=>{const{field:a}=v;return t.jsx(H,{id:"display-name",...a,onChange:f=>{a.onChange(f),x()},onBlur:()=>{a.onBlur(),m()},onKeyDown:f=>{f.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})},e[7]=m,e[8]=x,e[9]=l):l=e[9];let d;e[10]!==n.control||e[11]!==l?(d=t.jsx(A,{title:"Display name",action:t.jsx(q,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=g?.email;let r;e[13]!==b?(r=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=r):r=e[14];let u;return e[15]!==i||e[16]!==d||e[17]!==r?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,d,r]})}),e[15]=i,e[16]=d,e[17]=r,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=B();let g;e[0]!==o?(g=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),I.error("Notifications denied. Please enable them in your browser settings."),o(re);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=g):g=e[1];const p=g;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(J,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(O,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let m;e[10]!==p||e[11]!==s.enableNotifications?(m=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=m):m=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(D,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==m||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:m,action:j}),e[16]=m,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let d;e[22]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=d):d=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let r;e[25]!==s.enableSounds||e[26]!==b?(r=t.jsxs("div",{className:"flex items-center gap-2",children:[d,t.jsx(D,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=r):r=e[27];let u;e[28]!==r||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:r}),e[28]=r,e[29]=l,e[30]=u):u=e[30];let v;e[31]!==o?(v=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=v):v=e[32];let a;e[33]!==s.toolApprovalLevel?(a={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=a):a=e[34];let f;e[35]!==a?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:a})}),e[35]=a,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==v||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:v,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=v,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function re(e){return{...e,enableNotifications:!1}}function ae(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function De(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(ae,{}),e[0]=s):s=e[0],s}export{De as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as $,D as H,j as A}from"./index-d52A49fX.js";import{m as L,g as E,s as y}from"./scroll-area-Bsik7Uif.js";import{u as O}from"./use-mcp-client-QTh-uqf4.js";import{p as k}from"./constants-nH3qQ_1f.js";import{b as q,c as B}from"./use-mcp-tools-BTYjbm6L.js";import{u as Y}from"./index-ELtqDe0g.js";import{c as G}from"./content-blocks-o63cs2vh.js";import{g as K,M as V,a as w}from"./types-B2Xs3OM7.js";import{u as z,b as F}from"./chat-context-XoGdeFE9.js";import{b as J}from"./shell-layout-DdmjIlR4.js";import"./agent-icon-BvZm1osM.js";import"./AlertCircle-D90xu5-8.js";import"./Tool01-DJgxsN47.js";import"./SwitchHorizontal01-Bu9ipsE_.js";import"./Settings02-COfrOHpp.js";import"./XCircle-Cz7czjsw.js";import"./ArrowUpRight-B1XPsNPZ.js";import"./ZapSquare-Ch518nCD.js";import"./Users03-JTfAuK6m.js";import"./Loading02-DaLVACu2.js";import"./CheckCircle-CebfgxLq.js";import"./Check-BqH5cjqe.js";import"./ChevronDown-DhzhS3K5.js";import"./ChevronRight-DntNgeBz.js";import"./ChevronUp-DPJfOoQR.js";import"./Circle-umqkxNwx.js";import"./Stars02-sR281nUk.js";import"./Copy01-YBIj7O7M.js";import"./ZoomOut-Chl8lvun.js";import"./DotsVertical-DoxN78H8.js";import"./Globe01-D3NrpjPq.js";import"./Eye-o8ajkfvt.js";import"./FilterLines-CEBhmChB.js";import"./Star01-twQgP5oO.js";import"./Globe04-6xG6GU2e.js";import"./HardDrive-CDBenwE2.js";import"./Key01-CwgjH_um.js";import"./LayoutLeft-CKcHwaHf.js";import"./LinkExternal01-DBFEHO3t.js";import"./List-s8AZWxpk.js";import"./Monitor01-lxPxQ2fk.js";import"./Sun-DTFx5jn8.js";import"./Palette-DHyTdFqR.js";import"./Play-TOCBGzP9.js";import"./Plus-DkGwhdIW.js";import"./SearchLg-C9MBYrXH.js";import"./SearchMd-Dhz0UROc.js";import"./Shield01-BrK-9cDf.js";import"./Stars01-C27kMlCK.js";import"./Trash01-myAGgKHr.js";import"./Upload01-m0ny4YmQ.js";import"./User01-DuGAbO5F.js";import"./Users01-e9Wb8IJU.js";import"./XClose-eEYHZsPT.js";import"./X-DRR7RtBP.js";import"./Zap-CMZ9cCJz.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-_bA4U2MU.js";import"./tooltip-Bzas0fb8.js";import"./file-type-icon-DIgcp2MN.js";import"./dialog-C2MVTIBt.js";import"./use-mobile-Cqur1PpI.js";import"./tab-id-Bgchl1bv.js";import"./hooks-BKW8thdS.js";import"./decopilot-sse-pool-B7Qe588m.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-nA7ZTnFV.js";import"./use-clock-tick-B6ygxook.js";import"./sheet-DSSfro03.js";import"./integration-icon-DXGEOTjP.js";import"./use-virtual-mcp-n0IfHFn6.js";import"./use-collections-BP4R8sI-.js";import"./use-navigate-to-agent-CaUSC1CF.js";import"./use-connection-BLVjIktc.js";import"./use-mcp-prompts-5W77PpYc.js";import"./form-TSiFK-dI.js";import"./label-CWqrShVu.js";import"./input-B_5YyJ8y.js";import"./select-DdHVdWXn.js";import"./auth-B8jeHTDK.js";import"./library-tab-BBr_dx-g.js";import"./drawer-BGO4iAk0.js";import"./collection-search-BHb176G9.js";import"./tabs-DRqPX6Mz.js";import"./toggle-group-BuLxG5r3.js";import"./agent-capabilities-Cpju5Yfe.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DGNqtPoP.js";import"./use-registry-connections-HQM1hA3o.js";import"./use-organization-settings-CnPdR5CP.js";import"./useInfiniteQuery-DEG0qlSd.js";import"./use-infinite-scroll-1VhU5Q3H.js";import"./extract-connection-data-Dq7vx8cX.js";import"./card-CCFrbS6S.js";import"./collection-tabs-CCdUJRcj.js";import"./badge-B5li3mFX.js";import"./textarea-B3Rf9sP3.js";import"./connection-form-helpers-Bs8LNNlp.js";import"./authenticate-and-persist-oauth-ezeRyKPp.js";import"./mcp-oauth-CSUfdVCn.js";import"./useSuspenseInfiniteQuery-DzP8_asj.js";import"./use-ai-providers-CW0jtnuO.js";import"./connect-desktop-dialog-CRhRTOUc.js";import"./decopilot--vqccpDb.js";import"./checkbox-D2NBps_s.js";import"./skeleton-Bl9k4gft.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-BrhzNA4d.js";import"./settings-section-eWkjB3kv.js";import"./popover-DlszYF1R.js";import"./command-CGbsZOaN.js";import"./index-BlJ4j0DM.js";import"./index-Btxmdruq.js";import"./alert-dialog-wgrcUQ0O.js";import"./toolbar-CVjg3TEd.js";import"./use-debounced-value-DxBLMeqg.js";import"./dropdown-menu-BPps0Iqr.js";import"./index-9kwnfSCp.js";import"./question-004-sINsf4GQ.js";import"./task-row-DzSs63v5.js";import"./task-status-CNEAWeje.js";import"./use-status-sounds-DEhedUWx.js";import"./use-decopilot-events-Dk3_PQZu.js";import"./empty-state-BUKBmmAV.js";import"./use-capability-C9whYnsG.js";import"./tools-list-Dzc5vr-A.js";import"./switch-CuT_exNr.js";import"./use-debounced-autosave-D34fr9f_.js";import"./index-BZQALusN.js";import"./sidebar-BJwboMe2.js";import"./search-input-DccF25qw.js";import"./github-repo-picker-B3tomRAJ.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-D-GN3cJh.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-CwCDO4L5.js";import"./calendar-C0u4vRHU.js";import"./use-file-configs-Td4k8wTj.js";import"./monaco-editor-xlUuBDU4.js";import"./select-model-C49KT9p5.js";import"./use-automations-CuWiOTtv.js";import"./automation-runs-CmgFzJTt.js";import"./table-CWyE2zgw.js";import"./use-members-Cc48Xacn.js";import"./use-org-auth-client-C5lRdd5o.js";import"./automation-list-row-CeLhtWjA.js";import"./required-auth-layout-CEAeU4UY.js";import"./use-org-sso-DGL7haeQ.js";const Q={};function W(S){const t=$.c(37),{client:i,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),r=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==i||t[3]!==o.name||t[4]!==s?(c={client:i,toolName:o.name,toolArguments:s},t[2]=i,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:e}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=y(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const b=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=G(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const j=_;let P;t[18]!==b?(P={tool:b},t[18]=b,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==r?(T=C=>u(r,C),t[20]=u,t[21]=r,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==r?(R=()=>n(r),t[23]=n,t[24]=r,t[25]=R):R=t[25];let v;return t[26]!==i||t[27]!==j||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==e?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:e,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:i,onMessage:j,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=i,t[27]=j,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=e,t[36]=v):v=t[36],v}function qr(S){const t=$.c(24),{connectionId:i,toolName:h,args:o}=S,{org:p}=H(),l=Y();let M;t[0]!==i||t[1]!==l?(M=k(i)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=i,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==i||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:i,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=i,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=O(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let r,a,m;t[10]!==h||t[11]!==g.tools?(r=L(decodeURIComponent(h)),m=g.tools.find(e=>e.name===r)??g.tools.find(e=>{const x=E(e._meta);if(!x)return!1;if(y(e.name,x)===r)return!0;const d=y(r,x);return d!==r&&e.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=r,t[13]=a,t[14]=m):(r=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let e;return t[15]!==r?(e=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=e):e=t[16],e}let c;return t[17]!==o||t[18]!==n||t[19]!==i||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:i,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=i,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{qr as AppViewContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as S,j as r}from"./index-d52A49fX.js";import{I as T}from"./input-B_5YyJ8y.js";import{L as C}from"./label-CWqrShVu.js";import{T as L}from"./textarea-B3Rf9sP3.js";import{au as A,av as R,at as D,aw as J,ax as K}from"./index-ELtqDe0g.js";import{u as M,s as P}from"./primitives-0HgpGbC7.js";import"./library-tab-BBr_dx-g.js";import"./SwitchHorizontal01-Bu9ipsE_.js";import"./chat-context-XoGdeFE9.js";import"./hooks-BKW8thdS.js";import"./use-mcp-client-QTh-uqf4.js";import"./constants-nH3qQ_1f.js";import"./auth-B8jeHTDK.js";import"./decopilot-sse-pool-B7Qe588m.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-n0IfHFn6.js";import"./use-collections-BP4R8sI-.js";import"./use-ai-providers-CW0jtnuO.js";import"./studio-tools-nA7ZTnFV.js";import"./use-decopilot-events-Dk3_PQZu.js";import"./tab-id-Bgchl1bv.js";import"./use-organization-settings-CnPdR5CP.js";import"./scroll-area-Bsik7Uif.js";import"./agent-icon-BvZm1osM.js";import"./AlertCircle-D90xu5-8.js";import"./Tool01-DJgxsN47.js";import"./Settings02-COfrOHpp.js";import"./XCircle-Cz7czjsw.js";import"./ArrowUpRight-B1XPsNPZ.js";import"./ZapSquare-Ch518nCD.js";import"./Users03-JTfAuK6m.js";import"./Loading02-DaLVACu2.js";import"./CheckCircle-CebfgxLq.js";import"./Check-BqH5cjqe.js";import"./ChevronDown-DhzhS3K5.js";import"./ChevronRight-DntNgeBz.js";import"./ChevronUp-DPJfOoQR.js";import"./Circle-umqkxNwx.js";import"./Stars02-sR281nUk.js";import"./Copy01-YBIj7O7M.js";import"./ZoomOut-Chl8lvun.js";import"./DotsVertical-DoxN78H8.js";import"./Globe01-D3NrpjPq.js";import"./Eye-o8ajkfvt.js";import"./FilterLines-CEBhmChB.js";import"./Star01-twQgP5oO.js";import"./Globe04-6xG6GU2e.js";import"./HardDrive-CDBenwE2.js";import"./Key01-CwgjH_um.js";import"./LayoutLeft-CKcHwaHf.js";import"./LinkExternal01-DBFEHO3t.js";import"./List-s8AZWxpk.js";import"./Monitor01-lxPxQ2fk.js";import"./Sun-DTFx5jn8.js";import"./Palette-DHyTdFqR.js";import"./Play-TOCBGzP9.js";import"./Plus-DkGwhdIW.js";import"./SearchLg-C9MBYrXH.js";import"./SearchMd-Dhz0UROc.js";import"./Shield01-BrK-9cDf.js";import"./Stars01-C27kMlCK.js";import"./Trash01-myAGgKHr.js";import"./Upload01-m0ny4YmQ.js";import"./User01-DuGAbO5F.js";import"./Users01-e9Wb8IJU.js";import"./XClose-eEYHZsPT.js";import"./X-DRR7RtBP.js";import"./Zap-CMZ9cCJz.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-_bA4U2MU.js";import"./tooltip-Bzas0fb8.js";import"./file-type-icon-DIgcp2MN.js";import"./dialog-C2MVTIBt.js";import"./use-mobile-Cqur1PpI.js";import"./content-blocks-o63cs2vh.js";import"./types-B2Xs3OM7.js";import"./use-clock-tick-B6ygxook.js";import"./shell-layout-DdmjIlR4.js";import"./avatar-BrhzNA4d.js";import"./alert-dialog-wgrcUQ0O.js";import"./required-auth-layout-CEAeU4UY.js";import"./use-org-sso-DGL7haeQ.js";import"./sheet-DSSfro03.js";import"./integration-icon-DXGEOTjP.js";import"./use-navigate-to-agent-CaUSC1CF.js";import"./use-connection-BLVjIktc.js";import"./use-mcp-prompts-5W77PpYc.js";import"./form-TSiFK-dI.js";import"./select-DdHVdWXn.js";import"./drawer-BGO4iAk0.js";import"./collection-search-BHb176G9.js";import"./tabs-DRqPX6Mz.js";import"./toggle-group-BuLxG5r3.js";import"./agent-capabilities-Cpju5Yfe.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DGNqtPoP.js";import"./use-registry-connections-HQM1hA3o.js";import"./useInfiniteQuery-DEG0qlSd.js";import"./use-infinite-scroll-1VhU5Q3H.js";import"./extract-connection-data-Dq7vx8cX.js";import"./card-CCFrbS6S.js";import"./collection-tabs-CCdUJRcj.js";import"./badge-B5li3mFX.js";import"./connection-form-helpers-Bs8LNNlp.js";import"./authenticate-and-persist-oauth-ezeRyKPp.js";import"./mcp-oauth-CSUfdVCn.js";import"./useSuspenseInfiniteQuery-DzP8_asj.js";import"./connect-desktop-dialog-CRhRTOUc.js";import"./decopilot--vqccpDb.js";import"./checkbox-D2NBps_s.js";import"./skeleton-Bl9k4gft.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-eWkjB3kv.js";import"./popover-DlszYF1R.js";import"./command-CGbsZOaN.js";import"./index-BlJ4j0DM.js";import"./index-Btxmdruq.js";import"./toolbar-CVjg3TEd.js";import"./use-debounced-value-DxBLMeqg.js";import"./dropdown-menu-BPps0Iqr.js";import"./index-9kwnfSCp.js";import"./question-004-sINsf4GQ.js";import"./task-row-DzSs63v5.js";import"./task-status-CNEAWeje.js";import"./use-status-sounds-DEhedUWx.js";import"./empty-state-BUKBmmAV.js";import"./use-mcp-tools-BTYjbm6L.js";import"./use-capability-C9whYnsG.js";import"./tools-list-Dzc5vr-A.js";import"./switch-CuT_exNr.js";import"./use-debounced-autosave-D34fr9f_.js";import"./index-BZQALusN.js";import"./sidebar-BJwboMe2.js";import"./search-input-DccF25qw.js";import"./github-repo-picker-B3tomRAJ.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-D-GN3cJh.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-CwCDO4L5.js";import"./calendar-C0u4vRHU.js";import"./use-file-configs-Td4k8wTj.js";import"./monaco-editor-xlUuBDU4.js";import"./select-model-C49KT9p5.js";import"./use-automations-CuWiOTtv.js";import"./automation-runs-CmgFzJTt.js";import"./table-CWyE2zgw.js";import"./use-members-Cc48Xacn.js";import"./use-org-auth-client-C5lRdd5o.js";import"./automation-list-row-CeLhtWjA.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function Cr(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(D,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Cr as RecordEditor};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-zFAhrTof.js","assets/index-d52A49fX.js","assets/index-5uzKO7q6.css","assets/XCircle-Cz7czjsw.js","assets/CheckCircle-CebfgxLq.js","assets/Settings02-COfrOHpp.js","assets/use-mcp-client-QTh-uqf4.js","assets/constants-nH3qQ_1f.js","assets/auth-B8jeHTDK.js","assets/useInfiniteQuery-DEG0qlSd.js","assets/use-infinite-scroll-1VhU5Q3H.js","assets/studio-tools-nA7ZTnFV.js","assets/badge-B5li3mFX.js","assets/input-B_5YyJ8y.js","assets/dropdown-menu-BPps0Iqr.js","assets/Check-BqH5cjqe.js","assets/ChevronRight-DntNgeBz.js","assets/Circle-umqkxNwx.js","assets/table-CWyE2zgw.js","assets/toggle-group-BuLxG5r3.js","assets/use-view-mode-BMlb6QOX.js","assets/use-mobile-Cqur1PpI.js","assets/DotsVertical-DoxN78H8.js","assets/FilterLines-CEBhmChB.js","assets/Globe01-D3NrpjPq.js","assets/SearchMd-Dhz0UROc.js","assets/dialog-C2MVTIBt.js","assets/X-DRR7RtBP.js","assets/AlertCircle-D90xu5-8.js","assets/Upload01-m0ny4YmQ.js","assets/alert-dialog-wgrcUQ0O.js","assets/card-CCFrbS6S.js","assets/Trash01-myAGgKHr.js","assets/label-CWqrShVu.js","assets/select-DdHVdWXn.js","assets/tooltip-Bzas0fb8.js","assets/ChevronDown-DhzhS3K5.js","assets/ChevronUp-DPJfOoQR.js","assets/switch-CuT_exNr.js","assets/textarea-B3Rf9sP3.js","assets/checkbox-D2NBps_s.js","assets/Eye-o8ajkfvt.js","assets/LinkExternal01-DBFEHO3t.js","assets/use-copy-_bA4U2MU.js","assets/Copy01-YBIj7O7M.js","assets/Key01-CwgjH_um.js","assets/Plus-DkGwhdIW.js","assets/mcp-oauth-CSUfdVCn.js","assets/Play-TOCBGzP9.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as s,j as e,r as i,i as a,ad as o}from"./index-d52A49fX.js";import{R as m}from"./require-capability-C135EIMf.js";import"./use-capability-C9whYnsG.js";import"./access-gate-Cf-kJrg7.js";import"./capability-load-error-D7uMbvO0.js";const n=i.lazy(()=>o(()=>import("./registry-layout-zFAhrTof.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as W,D as fe,k as Re,m as Te,d as be,t as Q,r as T,j as t,B as V,i as Fe,l as Z,b7 as qs,b8 as Bs}from"./index-
|
|
1
|
+
import{c as W,D as fe,k as Re,m as Te,d as be,t as Q,r as T,j as t,B as V,i as Fe,l as Z,b7 as qs,b8 as Bs}from"./index-d52A49fX.js";import{c as Jt,b as Qs,d as ds,i as Vs,a as Gs,t as Ks,f as Ys,n as Hs,e as Ws}from"./XCircle-Cz7czjsw.js";import{i as qe}from"./CheckCircle-CebfgxLq.js";import{s as Mt,c as Js,b as Zs,i as Xs,a as er}from"./Settings02-COfrOHpp.js";import{u as Ie}from"./use-mcp-client-QTh-uqf4.js";import{S as Me,W as tr}from"./constants-nH3qQ_1f.js";import{u as us}from"./useInfiniteQuery-DEG0qlSd.js";import{u as _e}from"./studio-tools-nA7ZTnFV.js";import{B as F}from"./badge-B5li3mFX.js";import{I as ue}from"./input-B_5YyJ8y.js";import{b as dt,c as Ne,a as ut,D as mt,h as Zt,k as Xt,d as sr}from"./dropdown-menu-BPps0Iqr.js";import{c as Et,d as Dt,a as Be,e as ae,b as At,T as oe}from"./table-CWyE2zgw.js";import{a as rr,T as es}from"./toggle-group-BuLxG5r3.js";import{u as nr}from"./use-view-mode-BMlb6QOX.js";import{i as $t}from"./DotsVertical-DoxN78H8.js";import{i as ir}from"./FilterLines-CEBhmChB.js";import{n as lr,i as ms}from"./Globe01-D3NrpjPq.js";import{i as ar}from"./SearchMd-Dhz0UROc.js";import{c as xt,a as pt,b as ht,D as ft,d as gt,e as jt}from"./dialog-C2MVTIBt.js";import{i as Ye}from"./AlertCircle-D90xu5-8.js";import{i as ts}from"./Upload01-m0ny4YmQ.js";import{c as He,b as We,d as Je,A as Ze,g as Xe,e as et,a as tt,f as st}from"./alert-dialog-wgrcUQ0O.js";import{C as ne}from"./card-CCFrbS6S.js";import{s as rt}from"./Trash01-myAGgKHr.js";import{L as te}from"./label-CWqrShVu.js";import{d as or,S as cr,a as dr,b as ur,c as St}from"./select-DdHVdWXn.js";import{S as ze}from"./switch-CuT_exNr.js";import{T as vt}from"./textarea-B3Rf9sP3.js";import{i as mr}from"./X-DRR7RtBP.js";import{t as xr}from"./ChevronDown-DhzhS3K5.js";import{n as pr}from"./ChevronUp-DPJfOoQR.js";import{C as ss}from"./checkbox-D2NBps_s.js";import{s as xs}from"./Eye-o8ajkfvt.js";import{n as hr}from"./LinkExternal01-DBFEHO3t.js";import{u as fr}from"./use-infinite-scroll-1VhU5Q3H.js";import{u as Rt}from"./use-copy-_bA4U2MU.js";import{i as Tt}from"./Check-BqH5cjqe.js";import{a as It}from"./Copy01-YBIj7O7M.js";import{i as gr}from"./Key01-CwgjH_um.js";import{s as jr}from"./Plus-DkGwhdIW.js";import{a as vr,b as br,T as yr}from"./tooltip-Bzas0fb8.js";import{i as Nr,a as wr}from"./mcp-oauth-CSUfdVCn.js";import{i as _r}from"./Play-TOCBGzP9.js";import"./auth-B8jeHTDK.js";import"./ChevronRight-DntNgeBz.js";import"./Circle-umqkxNwx.js";import"./use-mobile-Cqur1PpI.js";const Ue="private-registry",Cr=`
|
|
2
2
|
You are an MCP tool tester running automated integration checks.
|
|
3
3
|
|
|
4
4
|
Goal:
|
package/dist/client/assets/{require-capability-eWa58zjU.js → require-capability-C135EIMf.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,j as m}from"./index-
|
|
1
|
+
import{c as p,j as m}from"./index-d52A49fX.js";import{u as l}from"./use-capability-C9whYnsG.js";import{A as u}from"./access-gate-Cf-kJrg7.js";function b(c){const t=p.c(6),{capability:n,area:e,children:i}=c,{granted:a,loading:o,error:s}=l(n);let r;return t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==o?(r=m.jsx(u,{granted:a,loading:o,error:s,area:e,children:i}),t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
|
package/dist/client/assets/{required-auth-layout-D9x1NXiE.js → required-auth-layout-CEAeU4UY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,j as s,A as a,S as m,f as h,h as u,N as f}from"./index-
|
|
1
|
+
import{c as l,j as s,A as a,S as m,f as h,h as u,N as f}from"./index-d52A49fX.js";function x(){const o=l.c(1),e=window.location.pathname+window.location.search;let t;if(o[0]===Symbol.for("react.memo_cache_sentinel")){const n=e==="/login"||e.startsWith("/login?")?{}:{next:e};t=s.jsx(f,{to:"/login",search:n,replace:!0}),o[0]=t}else t=o[0];return t}function g(o){const e=l.c(6),{children:t}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(a,{children:s.jsx(m,{})}),e[0]=i):i=e[0];let n;e[1]!==t?(n=s.jsx(h,{children:t}),e[1]=t,e[2]=n):n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(u,{children:s.jsx(x,{})}),e[3]=r):r=e[3];let c;return e[4]!==n?(c=s.jsxs(s.Fragment,{children:[i,n,r]}),e[4]=n,e[5]=c):c=e[5],c}export{g as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as q,u as Y,b as A,r as B,d as G,j as s,B as z,a as K}from"./index-
|
|
1
|
+
import{c as q,u as Y,b as A,r as B,d as G,j as s,B as z,a as K}from"./index-d52A49fX.js";import{I as L}from"./input-B_5YyJ8y.js";function H(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=G(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let g;e[22]!==a||e[23]!==t?(g=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=g):g=e[24];let f;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(f=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=f):f=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==g||e[42]!==f||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,g,f,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=g,e[42]=f,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await K.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{H as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as $,D as Se,K as re,b0 as dt,k as Oe,j as s,l as K,i as fe,B as ne,c as q,o as Pe,aw as Ie,s as se,ay as De,az as ke,m as $e,p as mt,n as ut,d as Fe,t as he,v as Re,a2 as Ke,W as ft,E as ht,b as gt,u as xt}from"./index-d52A49fX.js";import{u as pt}from"./use-organization-roles-UeKRVQhu.js";import{u as je}from"./use-org-auth-client-C5lRdd5o.js";import{B as ge}from"./badge-B5li3mFX.js";import{f as Qe,a as qe,b as He,c as Ze,d as Xe,A as Je,e as We,g as et}from"./alert-dialog-wgrcUQ0O.js";import{a as bt,b as Et,D as Tt,c as _t}from"./dropdown-menu-BPps0Iqr.js";import{i as It}from"./DotsVertical-DoxN78H8.js";import{s as Ae}from"./Plus-DkGwhdIW.js";import{s as St}from"./Trash01-myAGgKHr.js";import{C as Nt}from"./collection-table-wrapper-BBBMMDK4.js";import{P as te}from"./index-BZQALusN.js";import{E as Ge}from"./empty-state-BUKBmmAV.js";import{S as ve}from"./search-input-DccF25qw.js";import{P as tt,D as st}from"./ai-providers-logos-DD3qZ33J.js";import{I as ye}from"./integration-icon-DXGEOTjP.js";import{u as Ct}from"./use-infinite-scroll-1VhU5Q3H.js";import{C as Me}from"./checkbox-D2NBps_s.js";import{b as At}from"./Settings02-COfrOHpp.js";import{u as Ot}from"./useSuspenseInfiniteQuery-DzP8_asj.js";import{u as Rt}from"./use-mcp-client-QTh-uqf4.js";import{S as jt}from"./constants-nH3qQ_1f.js";import{C as vt}from"./collection-search-BHb176G9.js";import{u as nt}from"./use-members-Cc48Xacn.js";import{g as lt}from"./get-initials-D-f_fDFw.js";import{u as yt}from"./use-connection-BLVjIktc.js";import{u as Mt,d as wt}from"./use-ai-providers-CW0jtnuO.js";import{A as ot}from"./avatar-BrhzNA4d.js";import{S as xe}from"./switch-CuT_exNr.js";import{c as pe,T as be,a as Ee,b as Te}from"./tooltip-Bzas0fb8.js";import{S as Ue,a as Be,b as Ve}from"./settings-section-eWkjB3kv.js";import{t as Lt}from"./ChevronDown-DhzhS3K5.js";import{i as Pt}from"./ChevronRight-DntNgeBz.js";import{i as ze}from"./X-DRR7RtBP.js";import{a as Dt}from"./use-capability-C9whYnsG.js";import{A as kt}from"./access-gate-Cf-kJrg7.js";import"./Check-BqH5cjqe.js";import"./Circle-umqkxNwx.js";import"./table-CWyE2zgw.js";import"./SwitchHorizontal01-Bu9ipsE_.js";import"./sidebar-BJwboMe2.js";import"./LayoutLeft-CKcHwaHf.js";import"./use-mobile-Cqur1PpI.js";import"./sheet-DSSfro03.js";import"./SearchMd-Dhz0UROc.js";import"./XCircle-Cz7czjsw.js";import"./agent-icon-BvZm1osM.js";import"./AlertCircle-D90xu5-8.js";import"./Tool01-DJgxsN47.js";import"./ArrowUpRight-B1XPsNPZ.js";import"./ZapSquare-Ch518nCD.js";import"./Users03-JTfAuK6m.js";import"./Loading02-DaLVACu2.js";import"./CheckCircle-CebfgxLq.js";import"./ChevronUp-DPJfOoQR.js";import"./Stars02-sR281nUk.js";import"./Copy01-YBIj7O7M.js";import"./ZoomOut-Chl8lvun.js";import"./Globe01-D3NrpjPq.js";import"./Eye-o8ajkfvt.js";import"./FilterLines-CEBhmChB.js";import"./Star01-twQgP5oO.js";import"./Globe04-6xG6GU2e.js";import"./HardDrive-CDBenwE2.js";import"./Key01-CwgjH_um.js";import"./LinkExternal01-DBFEHO3t.js";import"./List-s8AZWxpk.js";import"./Monitor01-lxPxQ2fk.js";import"./Sun-DTFx5jn8.js";import"./Palette-DHyTdFqR.js";import"./Play-TOCBGzP9.js";import"./SearchLg-C9MBYrXH.js";import"./Shield01-BrK-9cDf.js";import"./Stars01-C27kMlCK.js";import"./Upload01-m0ny4YmQ.js";import"./User01-DuGAbO5F.js";import"./Users01-e9Wb8IJU.js";import"./XClose-eEYHZsPT.js";import"./Zap-CMZ9cCJz.js";import"./auth-B8jeHTDK.js";import"./use-collections-BP4R8sI-.js";import"./studio-tools-nA7ZTnFV.js";import"./card-CCFrbS6S.js";import"./capability-load-error-D7uMbvO0.js";const we="basic-usage",Le=[{id:we,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","LINK_CURRENT_GET","LINK_DISCONNECT","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","THREAD_BACKGROUND_TOOL_START","THREAD_SUBTASK_DELIVER","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP","COMMERCE_DISCOVERY_RUN","COMMERCE_DISCOVERY_BIND","COMMERCE_DISCOVERY_CONNECTION_STATUS"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...Le.find(t=>t.id===we)?.tools??[]];const Gt=["agents:manage","connections:manage"];new Set(Le.filter(t=>Gt.includes(t.id)).flatMap(t=>t.tools));function Ut(){const t=new Map;for(const e of Le){if(e.id===we)continue;const n=t.get(e.section)??[];n.push(e),t.set(e.section,n)}return Array.from(t.entries()).map(([e,n])=>({section:e,capabilities:n}))}function Bt(t,e,n){return n?!0:t.tools.every(l=>e.includes(l))}function Vt(t,e,n){if(n){const i=new Set(e);for(const r of t.tools)i.add(r);return Array.from(i)}const l=new Set(e);for(const i of t.tools)l.delete(i);return Array.from(l)}function zt(t){const e=q.c(21),{connection:n,isSelected:l,hasToolsEnabled:i,activeToolsCount:r,totalToolsCount:d,onSelect:h,onToggle:c}=t,g=l?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==g?(f=K("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",g),e[0]=g,e[1]=f):f=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let x;e[5]!==n.title?(x=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),e[5]=n.title,e[6]=x):x=e[6];let o;e[7]!==h||e[8]!==a||e[9]!==x?(o=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:h,children:[a,x]}),e[7]=h,e[8]=a,e[9]=x,e[10]=o):o=e[10];let m;e[11]!==r||e[12]!==n.tools||e[13]!==i||e[14]!==c||e[15]!==d?(m=n.tools&&n.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[r,"/",d]}),s.jsx(Me,{checked:i,onCheckedChange:c,onClick:Yt})]}),e[11]=r,e[12]=n.tools,e[13]=i,e[14]=c,e[15]=d,e[16]=m):m=e[16];let S;return e[17]!==f||e[18]!==o||e[19]!==m?(S=s.jsxs("div",{className:f,children:[o,m]}),e[17]=f,e[18]=o,e[19]=m,e[20]=S):S=e[20],S}function Yt(t){return t.stopPropagation()}function $t(t){const e=q.c(18),{connectionId:n,tool:l,isSelected:i,onToggle:r}=t,d=`tool-${n}-${l.name}`,h=i?"text-foreground":"text-muted-foreground";let c;e[0]!==h?(c=K("text-sm font-medium",h),e[0]=h,e[1]=c):c=e[1];let g;e[2]!==c||e[3]!==l.name?(g=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:c,children:l.name})}),e[2]=c,e[3]=l.name,e[4]=g):g=e[4];let f;e[5]!==l.description?(f=l.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description}),e[5]=l.description,e[6]=f):f=e[6];let a;e[7]!==g||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,f]}),e[7]=g,e[8]=f,e[9]=a):a=e[9];const x=`tool-${n}-${l.name}`;let o;e[10]!==i||e[11]!==r||e[12]!==x?(o=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(Me,{id:x,checked:i,onCheckedChange:r,onClick:Ft})}),e[10]=i,e[11]=r,e[12]=x,e[13]=o):o=e[13];let m;return e[14]!==d||e[15]!==a||e[16]!==o?(m=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:d,children:[a,o]}),e[14]=d,e[15]=a,e[16]=o,e[17]=m):m=e[17],m}function Ft(t){return t.stopPropagation()}function Kt({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:n,searchQuery:l}){const[i,r]=$.useState(""),d=l!==void 0?l:i,h=$.useDeferredValue(d),[c,g]=$.useState("all"),[f,a]=$.useState(!1),x=$.useRef(new Set(Object.keys(t))),{org:o}=Se(),m=Rt({connectionId:jt,orgId:o.id,orgSlug:o.slug}),S=100,T=h.trim(),E=T?{operator:"or",conditions:[{field:["title"],operator:"contains",value:T},{field:["description"],operator:"contains",value:T}]}:void 0,N=!!n,C={...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:S,offset:0,...N&&{include_virtual:!0}},v=JSON.stringify(C),{data:_,fetchNextPage:O,hasNextPage:p,isFetchingNextPage:R}=Ot({queryKey:re.collectionListInfinite(m,o.id,"","CONNECTIONS",v),queryFn:async({pageParam:b=0})=>(await m.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:S,offset:b,...N&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(b,D)=>{if(b?.hasMore)return D.reduce((Q,H)=>Q+(H?.items?.length??0),0)},staleTime:3e4}),I=_?.pages.flatMap(b=>b?.items??[])??[],j=Ct(O,p??!1,R),u=n?I.filter(b=>b.connection_type!=="VIRTUAL"?!0:dt(b.connection_url)!==n):I,M=x.current,A=[...M.values()].map(b=>u.find(D=>D.id===b)).filter(b=>b!==void 0),k=u.filter(b=>!M.has(b.id)),G=[...A,...k],U=b=>{const D=t[b];return D!==void 0&&D.length>0},B=G.filter(b=>{if(c==="all")return!0;const D=U(b.id);return c==="selected"?D:c==="unselected"?!D:!0}),[w,z]=$.useState(G[0]?.id??null),y=w?G.find(b=>b.id===w)??null:null,{data:L,isFetching:Y}=Oe({queryKey:re.collectionItem(m,o.id,"","CONNECTIONS",w??""),queryFn:async()=>w?(await m.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:w}})).structuredContent?.item??null:null,enabled:!!w,staleTime:3e4}),F=L?.tools??[],X=(b,D)=>t[b]?.includes(D)??!1,J=(b,D)=>{const Q=t[b]??[],H=Q.includes(D),W={...t};if(H){const Z=Q.filter(ee=>ee!==D);Z.length===0?delete W[b]:W[b]=Z}else W[b]=[...Q,D];e(W)},le=b=>{const D=b===w?F:[];if(!D.length)return;const Q=t[b]??[],H=D.map(ee=>ee.name),W=Q.length>0&&H.every(ee=>Q.includes(ee)),Z={...t};W?delete Z[b]:(Z[b]=H,z(b)),e(Z)},oe=b=>{z(b),a(!0)},ie=()=>{a(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:K("w-full md:w-80 border-r border-border flex flex-col",f&&"hidden md:flex"),children:[l===void 0&&s.jsx(vt,{value:i,onChange:r,placeholder:"Search MCP Servers..."}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>g("all"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),s.jsx("button",{onClick:()=>g("selected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),s.jsx("button",{onClick:()=>g("unselected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:B.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:d?"No connections found":c==="selected"?"No servers selected":c==="unselected"?"No unselected servers":"No connections available"}):s.jsxs("div",{className:"p-2 space-y-1",children:[B.map(b=>{const D=w===b.id,Q=D?F.length:0,H=t[b.id]?.length??0;return s.jsx(zt,{connection:{...b,tools:D?F:b.tools},isSelected:D,hasToolsEnabled:U(b.id),activeToolsCount:H,totalToolsCount:Q,onSelect:()=>oe(b.id),onToggle:()=>le(b.id)},b.id)}),s.jsx("div",{ref:j,className:"h-4"}),R&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:K("flex-1 flex-col",f?"flex":"hidden md:flex"),children:y?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ne,{variant:"ghost",size:"sm",onClick:ie,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(At,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(ye,{icon:y.icon,name:y.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:y.title}),y.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:y.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:Y?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})}):F.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):s.jsx("div",{className:"space-y-2",children:F.map(b=>s.jsx($t,{connectionId:y.id,tool:b,isSelected:X(y.id,b.name),onToggle:()=>J(y.id,b.name)},b.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}const Ne=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],Qt={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function qt(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Ne.length;return Ne[n]??Ne[0]}function Ht(t,e){return Qt[t]??"bg-neutral-400"}const Zt=Pe({role:Pe({id:se().optional(),slug:se().optional(),label:se()}),allowAllStaticPermissions:ke(),staticPermissions:Ie(se()),toolSet:De(se(),Ie(se())),allowAllModels:ke(),modelSet:De(se(),Ie(se())),memberIds:Ie(se())});function Ye(t,e,n){const l=s.jsx(xe,{checked:t,disabled:e,onCheckedChange:n});return e?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:l})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):l}function Xt(t){const e=q.c(28),{allowAllStaticPermissions:n,staticPermissions:l,onAllowAllChange:i,onPermissionsChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d;let g;e[0]!==h?(g=h.trim().toLowerCase(),e[0]=h,e[1]=g):g=e[1];const f=$.useDeferredValue(g);let a;if(e[2]!==n||e[3]!==f||e[4]!==i||e[5]!==r||e[6]!==c||e[7]!==h||e[8]!==l){const x=Ut(),o=(v,_)=>{if(!c){if(n&&_){const O=x.flatMap(es).flatMap(Wt);i(!1),r(O.filter(p=>!v.tools.includes(p)));return}n||r(Vt(v,l,!_))}};let m;e[10]!==f?(m=v=>{const{section:_,capabilities:O}=v;return{section:_,capabilities:O.filter(p=>!f||p.label.toLowerCase().includes(f)||p.description.toLowerCase().includes(f))}},e[10]=f,e[11]=m):m=e[11];const S=x.map(m).filter(Jt);let T;e[12]!==n||e[13]!==i||e[14]!==r?(T=()=>{i(!n),r([])},e[12]=n,e[13]=i,e[14]=r,e[15]=T):T=e[15];let E;e[16]!==n||e[17]!==c||e[18]!==T?(E=Ye(n,c,T),e[16]=n,e[17]=c,e[18]=T,e[19]=E):E=e[19];let N;e[20]!==n||e[21]!==i||e[22]!==r||e[23]!==c?(N=c?void 0:()=>{i(!n),r([])},e[20]=n,e[21]=i,e[22]=r,e[23]=c,e[24]=N):N=e[24];let C;e[25]!==E||e[26]!==N?(C=s.jsx(Ue,{title:"General",children:s.jsx(Be,{children:s.jsx(Ve,{title:"All organization permissions",description:"Grant full access to all features below",action:E,onClick:N})})}),e[25]=E,e[26]=N,e[27]=C):C=e[27],a=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[C,S.length===0&&f?s.jsxs("p",{className:"text-sm text-muted-foreground py-4",children:["No permissions match “",h,"”"]}):S.map(v=>{const{section:_,capabilities:O}=v;return s.jsx(Ue,{title:_,children:s.jsx(Be,{children:O.map(p=>{const R=Bt(p,l,n);return s.jsx(Ve,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[p.label,p.dangerous&&s.jsx(ft,{size:12,className:"text-amber-500 shrink-0"})]}),description:p.description,action:Ye(R,c,()=>o(p,R)),onClick:c?void 0:()=>o(p,R)},p.id)})})},_)})]})}),e[2]=n,e[3]=f,e[4]=i,e[5]=r,e[6]=c,e[7]=h,e[8]=l,e[9]=a}else a=e[9];return a}function Jt(t){return t.capabilities.length>0}function Wt(t){return t.tools}function es(t){return t.capabilities}const it={anthropic:"Anthropic",openrouter:"OpenRouter"},ts={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function ss(t,e){const n=t.indexOf("/"),l=n>0?t.slice(0,n):e;return l.startsWith("~")?l.slice(1):l}function ns(t){return ts[t]??it[t]??t}function ls(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const rt=30;function os(t){const e=q.c(44),{connectionId:n,subProviderId:l,subProviderName:i,groupLogo:r,models:d,allConnectionModelIds:h,selectedModels:c,allowAllModels:g,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:x,readOnly:o,defaultExpanded:m}=t,[S,T]=$.useState(m),E=m||S,N=T,[C,v]=$.useState(rt);let _;e[0]!==f||e[1]!==g||e[2]!==c?(_=j=>g||f||c.includes("*")||c.includes(j),e[0]=f,e[1]=g,e[2]=c,e[3]=_):_=e[3];const O=_;let p;if(e[4]!==O||e[5]!==d){let j;e[7]!==O?(j=u=>O(u.id),e[7]=O,e[8]=j):j=e[8],p=d.filter(j),e[4]=O,e[5]=d,e[6]=p}else p=e[6];const R=p.length;let I;if(e[9]!==h||e[10]!==g||e[11]!==n||e[12]!==R||e[13]!==E||e[14]!==r||e[15]!==O||e[16]!==d||e[17]!==x||e[18]!==a||e[19]!==o||e[20]!==l||e[21]!==i||e[22]!==C){const j=d.slice(0,C),u=d.length>C;let M;e[24]===Symbol.for("react.memo_cache_sentinel")?(M=()=>N(cs),e[24]=M):M=e[24];const A=r??tt[l]??st;let k;e[25]!==i||e[26]!==A?(k=s.jsx(ye,{icon:A,name:i,size:"sm"}),e[25]=i,e[26]=A,e[27]=k):k=e[27];let G;e[28]!==i?(G=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[28]=i,e[29]=G):G=e[29];let U;e[30]!==k||e[31]!==G?(U=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[k,G]}),e[30]=k,e[31]=G,e[32]=U):U=e[32];let B;e[33]!==R||e[34]!==d.length?(B=s.jsxs(ge,{variant:"secondary",className:"text-xs text-muted-foreground",children:[R,"/",d.length," enabled"]}),e[33]=R,e[34]=d.length,e[35]=B):B=e[35];let w;e[36]!==E?(w=E?s.jsx(Lt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Pt,{size:16,className:"text-muted-foreground shrink-0"}),e[36]=E,e[37]=w):w=e[37];let z;e[38]!==w||e[39]!==B?(z=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[B,w]}),e[38]=w,e[39]=B,e[40]=z):z=e[40];let y;e[41]!==z||e[42]!==U?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:M,children:[U,z]}),e[41]=z,e[42]=U,e[43]=y):y=e[43],I=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[y,E&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[j.map(L=>{const Y=O(L.id),F=()=>{if(!o){if(g){x(n,h,L.id);return}a(n,L.id)}};return s.jsxs("div",{className:K("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!o&&"hover:bg-muted/50 cursor-pointer"),onClick:F,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:L.title})}),s.jsx("div",{onClick:as,children:o?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:Y,disabled:!0,onCheckedChange:rs})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:Y,onCheckedChange:F})})]},L.id)}),u&&s.jsxs("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>v(is),children:["Show more (",d.length-C," remaining)"]})]})]}),e[9]=h,e[10]=g,e[11]=n,e[12]=R,e[13]=E,e[14]=r,e[15]=O,e[16]=d,e[17]=x,e[18]=a,e[19]=o,e[20]=l,e[21]=i,e[22]=C,e[23]=I}else I=e[23];return I}function is(t){return t+rt}function rs(){}function as(t){return t.stopPropagation()}function cs(t){return!t}function ds(t){const e=q.c(33),{connection:n,selectedModels:l,allowAllModels:i,onToggleModel:r,onExitAllowAll:d,allConnectionModelsSelected:h,searchQuery:c,readOnly:g}=t,f=wt(n.id);let a,x,o,m,S;if(e[0]!==h||e[1]!==i||e[2]!==n.id||e[3]!==n.label||e[4]!==n.providerId||e[5]!==d||e[6]!==r||e[7]!==f||e[8]!==g||e[9]!==c||e[10]!==l){S=Symbol.for("react.early_return_sentinel");e:{let N;e[16]!==n.label?(N=A=>({...A,id:A.modelId,provider:n.label}),e[16]=n.label,e[17]=N):N=e[17];const C=f.filter(hs).map(N),v=c.trim().toLowerCase(),_=v?C.filter(A=>A.title.toLowerCase().includes(v)||A.id.toLowerCase().includes(v)||A.provider?.toLowerCase().includes(v)):C;if(_.length===0){S=null;break e}const O=new Map;for(const A of _){const k=ss(A.id,n.providerId),G=O.get(k)??{models:[],logo:null};G.models.push({id:A.id,title:ls(A.title),logo:A.logo}),!G.logo&&A.logo&&(G.logo=A.logo),O.set(k,G)}const p=Array.from(O.entries()).map(fs).sort(us),R=p.length===1||v.length>0;o="flex flex-col gap-3";const I=tt[n.providerId]??st;let j;e[18]!==n.providerId||e[19]!==I?(j=s.jsx("img",{src:I,alt:n.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=n.providerId,e[19]=I,e[20]=j):j=e[20];const u=it[n.providerId]??n.providerId;let M;e[21]!==u?(M=s.jsx("h4",{className:"text-sm font-medium",children:u}),e[21]=u,e[22]=M):M=e[22],e[23]!==M||e[24]!==j?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[j,M]}),e[23]=M,e[24]=j,e[25]=m):m=e[25],a="flex flex-col gap-3",x=p.map(A=>s.jsx(os,{connectionId:n.id,subProviderId:A.id,subProviderName:A.name,groupLogo:A.logo,models:A.models,allConnectionModelIds:C.map(ms),selectedModels:l,allowAllModels:i,allConnectionModelsSelected:h,onToggleModel:r,onExitAllowAll:d,readOnly:g,defaultExpanded:R},A.id))}e[0]=h,e[1]=i,e[2]=n.id,e[3]=n.label,e[4]=n.providerId,e[5]=d,e[6]=r,e[7]=f,e[8]=g,e[9]=c,e[10]=l,e[11]=a,e[12]=x,e[13]=o,e[14]=m,e[15]=S}else a=e[11],x=e[12],o=e[13],m=e[14],S=e[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let T;e[26]!==a||e[27]!==x?(T=s.jsx("div",{className:a,children:x}),e[26]=a,e[27]=x,e[28]=T):T=e[28];let E;return e[29]!==o||e[30]!==m||e[31]!==T?(E=s.jsxs("div",{className:o,children:[m,T]}),e[29]=o,e[30]=m,e[31]=T,e[32]=E):E=e[32],E}function ms(t){return t.id}function us(t,e){return t.name.localeCompare(e.name)}function fs(t){const[e,n]=t;return{id:e,name:ns(e),logo:n.logo,models:n.models}}function hs(t,e,n){return n.findIndex(l=>l.modelId===t.modelId)===e}function gs(t){const e=q.c(35),{allowAllModels:n,modelSet:l,onAllowAllChange:i,onModelSetChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d,g=$.useDeferredValue(h),f=Mt();let a;e[0]!==l||e[1]!==r?(a=(p,R)=>{const I=l[p]??[],j={...l};if(I.includes(R)){const u=I.filter(M=>M!==R);u.length===0?delete j[p]:j[p]=u}else j[p]=[...I,R];r(j)},e[0]=l,e[1]=r,e[2]=a):a=e[2];const x=a;let o;e[3]!==l||e[4]!==i||e[5]!==r?(o=(p,R,I)=>{i(!1),r({...l,[p]:R.filter(j=>j!==I)})},e[3]=l,e[4]=i,e[5]=r,e[6]=o):o=e[6];const m=o,S=!c&&"hover:bg-muted/50 cursor-pointer";let T;e[7]!==S?(T=K("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",S),e[7]=S,e[8]=T):T=e[8];let E;e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==c?(E=()=>{if(c)return;const p=!n;i(p),p&&r({})},e[9]=n,e[10]=i,e[11]=r,e[12]=c,e[13]=E):E=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("span",{className:"text-sm font-medium",children:"All models"}),e[14]=N):N=e[14];let C;e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==c?(C=s.jsx("div",{onClick:ps,children:c?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:n,disabled:!0,onCheckedChange:xs})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:n,onCheckedChange:p=>{i(p),p&&r({})}})}),e[15]=n,e[16]=i,e[17]=r,e[18]=c,e[19]=C):C=e[19];let v;e[20]!==T||e[21]!==E||e[22]!==C?(v=s.jsxs("div",{className:T,onClick:E,children:[N,C]}),e[20]=T,e[21]=E,e[22]=C,e[23]=v):v=e[23];let _;e[24]!==f||e[25]!==n||e[26]!==g||e[27]!==m||e[28]!==l||e[29]!==c||e[30]!==x?(_=f.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No LLM connections configured"}):f.map(p=>s.jsx($.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(fe,{className:"size-4 animate-spin"}),"Loading models..."]}),children:s.jsx(ds,{connection:p,selectedModels:l[p.id]??[],allowAllModels:n,onToggleModel:x,onExitAllowAll:m,allConnectionModelsSelected:(l[p.id]??[]).includes("*"),searchQuery:g,readOnly:c})},p.id)),e[24]=f,e[25]=n,e[26]=g,e[27]=m,e[28]=l,e[29]=c,e[30]=x,e[31]=_):_=e[31];let O;return e[32]!==_||e[33]!==v?(O=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[v,_]}),e[32]=_,e[33]=v,e[34]=O):O=e[34],O}function xs(){}function ps(t){return t.stopPropagation()}function bs(t){const e=q.c(52),{open:n,onOpenChange:l,selectedMemberIds:i,onAddMembers:r}=t,[d,h]=$.useState(""),c=$.useDeferredValue(d);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[f,a]=$.useState(g),{data:x}=nt();let o,m,S,T,E,N,C,v,_,O,p;if(e[1]!==x?.data?.members||e[2]!==c||e[3]!==r||e[4]!==l||e[5]!==n||e[6]!==f||e[7]!==d||e[8]!==i){const U=x?.data?.members??[];let B;e[20]!==c?(B=y=>{const L=c.toLowerCase();return y.user?.name?.toLowerCase().includes(L)||y.user?.email?.toLowerCase().includes(L)},e[20]=c,e[21]=B):B=e[21];const w=U.filter(B);let z;e[22]!==r||e[23]!==l||e[24]!==f?(z=()=>{r(f),a([]),l(!1)},e[22]=r,e[23]=l,e[24]=f,e[25]=z):z=e[25],S=z,m=Qe,O=n,p=l,o=qe,v="sm:max-w-md p-0",e[26]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(He,{className:"px-6 pt-6",children:[s.jsx(Ze,{children:"Add Members to Role"}),s.jsx(Xe,{children:"Select members to add to this role."})]}),e[26]=_):_=e[26],N="flex flex-col h-80",e[27]!==d?(C=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(ve,{value:d,onChange:h,placeholder:"Search members...",className:"w-full"})}),e[27]=d,e[28]=C):C=e[28],T="flex-1 overflow-auto",E=w.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:d?"No members found":"No members available"})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:w.map(y=>{const L=y.role!=="owner",Y=i.includes(y.id),F=f.includes(y.id);return s.jsxs("label",{className:K("flex items-center gap-3 p-2 rounded-lg",!L||Y?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(Me,{checked:F||Y,onCheckedChange:()=>{!L||Y||a(X=>X.includes(y.id)?X.filter(J=>J!==y.id):[...X,y.id])},disabled:!L||Y}),s.jsx(ot,{url:y.user?.image??void 0,fallback:lt(y.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:y.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y.user?.email})]}),!L&&s.jsx(ge,{variant:"secondary",className:"shrink-0",children:"Owner"}),Y&&L&&s.jsx(ge,{variant:"outline",className:"shrink-0",children:"Added"})]},y.id)})}),e[1]=x?.data?.members,e[2]=c,e[3]=r,e[4]=l,e[5]=n,e[6]=f,e[7]=d,e[8]=i,e[9]=o,e[10]=m,e[11]=S,e[12]=T,e[13]=E,e[14]=N,e[15]=C,e[16]=v,e[17]=_,e[18]=O,e[19]=p}else o=e[9],m=e[10],S=e[11],T=e[12],E=e[13],N=e[14],C=e[15],v=e[16],_=e[17],O=e[18],p=e[19];let R;e[29]!==T||e[30]!==E?(R=s.jsx("div",{className:T,children:E}),e[29]=T,e[30]=E,e[31]=R):R=e[31];let I;e[32]!==R||e[33]!==N||e[34]!==C?(I=s.jsxs("div",{className:N,children:[C,R]}),e[32]=R,e[33]=N,e[34]=C,e[35]=I):I=e[35];let j;e[36]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Je,{children:"Cancel"}),e[36]=j):j=e[36];const u=f.length===0,M=f.length>0&&`(${f.length})`;let A;e[37]!==S||e[38]!==u||e[39]!==M?(A=s.jsxs(We,{className:"px-6 pb-6",children:[j,s.jsxs(et,{onClick:S,disabled:u,children:["Add ",M]})]}),e[37]=S,e[38]=u,e[39]=M,e[40]=A):A=e[40];let k;e[41]!==o||e[42]!==I||e[43]!==A||e[44]!==v||e[45]!==_?(k=s.jsxs(o,{className:v,children:[_,I,A]}),e[41]=o,e[42]=I,e[43]=A,e[44]=v,e[45]=_,e[46]=k):k=e[46];let G;return e[47]!==m||e[48]!==k||e[49]!==O||e[50]!==p?(G=s.jsx(m,{open:O,onOpenChange:p,children:k}),e[47]=m,e[48]=k,e[49]=O,e[50]=p,e[51]=G):G=e[51],G}function Es(t){const e=q.c(29),{memberIds:n,onMemberIdsChange:l,readOnly:i,readOnlyMessage:r,searchQuery:d,addMemberDialogOpen:h,onAddMemberDialogOpenChange:c}=t,g=i===void 0?!1:i,f=r===void 0?"Owner membership cannot be changed":r,a=$.useDeferredValue(d),{data:x}=nt();let o,m,S;if(e[0]!==x?.data?.members||e[1]!==a||e[2]!==n||e[3]!==l||e[4]!==g||e[5]!==f||e[6]!==d){const v=x?.data?.members??[];let _;e[10]!==n?(_=I=>n.includes(I.id),e[10]=n,e[11]=_):_=e[11];const O=v.filter(_);let p;e[12]!==a?(p=I=>{const j=a.toLowerCase();return I.user?.name?.toLowerCase().includes(j)||I.user?.email?.toLowerCase().includes(j)},e[12]=a,e[13]=p):p=e[13];const R=O.filter(p);S="flex flex-col h-full",o="flex-1 overflow-auto",m=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:"No members"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add members to grant them the configured permissions."})]})}):R.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:['No members match "',d,'"']})}):s.jsx("div",{className:"p-4 space-y-2",children:R.map(I=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(ot,{url:I.user?.image??void 0,fallback:lt(I.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:I.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.user?.email})]}),g?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(ne,{variant:"ghost",size:"sm",disabled:!0,children:s.jsx(ze,{size:16})})})}),s.jsx(Te,{children:s.jsx("p",{children:f})})]})}):s.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>l(n.filter(j=>j!==I.id)),children:s.jsx(ze,{size:16})})]},I.id))}),e[0]=x?.data?.members,e[1]=a,e[2]=n,e[3]=l,e[4]=g,e[5]=f,e[6]=d,e[7]=o,e[8]=m,e[9]=S}else o=e[7],m=e[8],S=e[9];let T;e[14]!==o||e[15]!==m?(T=s.jsx("div",{className:o,children:m}),e[14]=o,e[15]=m,e[16]=T):T=e[16];let E;e[17]!==n||e[18]!==l?(E=v=>l([...n,...v]),e[17]=n,e[18]=l,e[19]=E):E=e[19];let N;e[20]!==h||e[21]!==n||e[22]!==c||e[23]!==E?(N=s.jsx(bs,{open:h,onOpenChange:c,selectedMemberIds:n,onAddMembers:E}),e[20]=h,e[21]=n,e[22]=c,e[23]=E,e[24]=N):N=e[24];let C;return e[25]!==S||e[26]!==T||e[27]!==N?(C=s.jsxs("div",{className:S,children:[T,N]}),e[25]=S,e[26]=T,e[27]=N,e[28]=C):C=e[28],C}function Ts(t){const e=q.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=s.jsx($.Suspense,{fallback:n,children:s.jsx(Es,{...t})}),e[1]=t,e[2]=l):l=e[2],l}const _s={owner:[],admin:[],user:[]};function Is(t,e,n,l){const i=t==="owner"||t==="admin";return{role:{id:n?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:_s[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(r=>r.role===t).map(r=>r.id)}}function Ss(t,e,n){const l=t.permission||{},i=l.self||[],r=i.includes("*"),d=r?[]:i.filter(a=>a!=="*"),h={};for(const[a,x]of Object.entries(l))if(!(a==="self"||a==="models"))if(a==="*")for(const o of n)h[o.id]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x;else{const o=n.find(m=>m.id===a);o&&(h[a]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x)}const c=l.models||[],g=c.length===0||c.includes("*:*"),f={};if(!g)for(const a of c){const x=a.indexOf(":");if(x===-1)continue;const o=a.slice(0,x),m=a.slice(x+1);f[o]||(f[o]=[]),f[o].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:r,staticPermissions:d,toolSet:h,allowAllModels:g,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Ns(t,e){const n={};t.allowAllStaticPermissions?n.self=["*"]:t.staticPermissions.length>0&&(n.self=t.staticPermissions);for(const[l,i]of Object.entries(t.toolSet))if(i.length>0){const d=e.find(h=>h.id===l)?.tools?.map(h=>h.name)??[];n[l]=d.length>0&&d.every(h=>i.includes(h))?["*"]:i}if(t.allowAllModels)n.models=["*:*"];else{const l=[];for(const[i,r]of Object.entries(t.modelSet))for(const d of r)l.push(`${i}:${d}`);l.length>0&&(n.models=l)}return n}function Cs(t,e,n){return t.kind==="builtin"?Is(t.role,e,void 0):t.kind==="custom"?Ss(t.role,e,n):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function As(t){const e=q.c(6),{readOnly:n,readOnlyMessage:l,onOpen:i}=t,r=l===void 0?"Owner membership cannot be changed":l;if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ne,{variant:"outline",size:"sm",disabled:!0,children:[s.jsx(Ae,{size:16}),"Add Member"]})})}),e[0]=c):c=e[0];let g;return e[1]!==r?(g=s.jsx(pe,{children:s.jsxs(be,{children:[c,s.jsx(Te,{children:s.jsx("p",{children:r})})]})}),e[1]=r,e[2]=g):g=e[2],g}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ae,{size:16}),e[3]=d):d=e[3];let h;return e[4]!==i?(h=s.jsxs(ne,{variant:"outline",size:"sm",onClick:i,children:[d,"Add Member"]}),e[4]=i,e[5]=h):h=e[5],h}function Os(t){const e=q.c(14),{locator:n}=Se(),l=je(),i=yt();let r;e[0]!==n?(r=re.members(n),e[0]=n,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>l.organization.listMembers(),e[2]=l,e[3]=d):d=e[3];let h;e[4]!==r||e[5]!==d?(h={queryKey:r,queryFn:d},e[4]=r,e[5]=d,e[6]=h):h=e[6];const{data:c,isPending:g}=Oe(h);if(g||!i){let o;return e[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=o):o=e[7],o}let f;e[8]!==c?.data?.members?(f=c?.data?.members??[],e[8]=c?.data?.members,e[9]=f):f=e[9];const a=f;let x;return e[10]!==i||e[11]!==a||e[12]!==t?(x=s.jsx(Rs,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=x):x=e[13],x}function Rs({target:t,onBack:e,onSaved:n,members:l,connections:i}){const{locator:r}=Se(),d=je(),h=$e(),c=t.kind==="builtin",g=t.kind==="builtin"&&t.role==="owner",f=t.kind==="new",[a,x]=$.useState(c?"org":"mcp"),o=mt({resolver:ut(Zt),defaultValues:Cs(t,l,i)}),m=o.formState.isValid,S=o.formState.isDirty,T=Fe({mutationFn:async u=>{const M=Ns(u,i),A=u.role.slug||u.role.label.toLowerCase().replace(/\s+/g,"-"),k=(u.role.slug==="owner"||u.role.slug==="admin"||u.role.slug==="user")&&!u.role.id,G=async(U,B)=>{const w=l.filter(L=>L.role===(B??U)).map(L=>L.id),z=u.memberIds.filter(L=>!w.includes(L)),y=w.filter(L=>!u.memberIds.includes(L));for(const L of z){const Y=await d.organization.updateMemberRole({memberId:L,role:[U]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}for(const L of y){const Y=await d.organization.updateMemberRole({memberId:L,role:["user"]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}};if(k)return await G(u.role.slug),u;if(u.role.id){const U=u.role.label.toLowerCase().replace(/\s+/g,"-"),B=u.role.slug,w=U!==B,z=await d.organization.updateRole({roleId:u.role.id,data:{permission:M,...w?{roleName:U}:{}}});if(z?.error)throw new Error(z.error.message??"Something went wrong");return await G(w?U:B,w?B:void 0),w?{...u,role:{...u.role,slug:U}}:u}else{const U=await d.organization.createRole({role:A,permission:M});if(U?.error)throw new Error(U.error.message??"Something went wrong");for(const B of u.memberIds){const w=await d.organization.updateMemberRole({memberId:B,role:[A]});if(w?.error)throw new Error(w.error.message)}return{...u,role:{...u.role,id:U.data?.roleData?.id,slug:A}}}},onSuccess:(u,M)=>{h.invalidateQueries({queryKey:re.members(r)}),h.invalidateQueries({queryKey:re.organizationRoles(r)});const A=!M.role.id&&!M.role.slug,k=M.role.slug==="owner"&&!M.role.id;Re(k?"role_members_updated":A?"role_created":"role_updated",{role_slug:M.role.slug??null}),he.success(k?"Members updated successfully!":A?"Role created successfully!":"Role updated successfully!"),o.reset(u),n(u.role.id)},onError:u=>{he.error(u instanceof Error?u.message:"Failed to save role")}}),E=o.handleSubmit(u=>{if(!u.role.label.trim()){he.error("Role name is required"),o.setFocus("role.label");return}T.mutate(u)}),N=!g,C=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",v=[...g?[]:[{id:"mcp",label:"MCP Permissions"}],{id:"org",label:"Organization Permissions"},{id:"models",label:"Models"},{id:"members",label:"Members"}],[_,O]=$.useState(""),[p,R]=$.useState(!1),I=u=>{x(u),O("")},j={mcp:"Search MCP servers...",org:"Search permissions...",models:"Search models...",members:"Search members..."};return s.jsx(te,{children:s.jsxs(te.Content,{className:K("flex flex-col",a!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(te.Title,{actions:N&&s.jsxs(s.Fragment,{children:[s.jsx(ne,{variant:"outline",size:"sm",onClick:e,disabled:T.isPending,children:"Cancel"}),s.jsx(ne,{size:"sm",onClick:E,disabled:T.isPending||!m||!S,children:T.isPending?"Saving...":f?"Create Role":"Save Changes"})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",t.kind==="builtin"?Ht(t.role):qt(o.watch("role.label")))}),g&&s.jsx(Ke,{size:16,className:"text-muted-foreground shrink-0"}),f||t.kind==="custom"?s.jsx("input",{...o.register("role.label"),placeholder:"Role name",className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:f}):s.jsx("span",{className:"truncate",children:C})]})}),s.jsx("div",{className:"flex items-center gap-2",children:v.map(u=>s.jsx("button",{type:"button",onClick:()=>I(u.id),className:K("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",a===u.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:u.label},u.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(ve,{value:_,onChange:O,placeholder:j[a]??"Search...",className:"w-full md:w-[375px]"}),a==="members"&&s.jsx(As,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>R(!0)})]})]})}),s.jsx("div",{className:K("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",a!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:K(a!=="org"&&"h-full overflow-hidden",a!=="models"&&a!=="org"&&"border border-border rounded-xl bg-card"),children:[a==="mcp"&&!g&&s.jsx(Kt,{toolSet:o.watch("toolSet"),onToolSetChange:u=>o.setValue("toolSet",u,{shouldDirty:!0}),searchQuery:_}),a==="org"&&s.jsx(Xt,{allowAllStaticPermissions:o.watch("allowAllStaticPermissions"),staticPermissions:o.watch("staticPermissions"),onAllowAllChange:u=>o.setValue("allowAllStaticPermissions",u,{shouldDirty:!0}),onPermissionsChange:u=>o.setValue("staticPermissions",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="models"&&s.jsx(gs,{allowAllModels:o.watch("allowAllModels"),modelSet:o.watch("modelSet"),onAllowAllChange:u=>o.setValue("allowAllModels",u,{shouldDirty:!0}),onModelSetChange:u=>o.setValue("modelSet",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="members"&&s.jsx(Ts,{memberIds:o.watch("memberIds"),onMemberIdsChange:u=>o.setValue("memberIds",u,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?"User is the default role — members can't be removed from it; assign another role to change their access":"Owner membership cannot be changed",searchQuery:_,addMemberDialogOpen:p,onAddMemberDialogOpenChange:R})]})})]})})}function js(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function vs(t){const e=q.c(6),{area:n,children:l}=t,{isPrivileged:i,loading:r,error:d}=Dt();let h;return e[0]!==n||e[1]!==l||e[2]!==d||e[3]!==i||e[4]!==r?(h=s.jsx(kt,{granted:i,loading:r,error:d,area:n,children:l}),e[0]=n,e[1]=l,e[2]=d,e[3]=i,e[4]=r,e[5]=h):h=e[5],h}const ys=[{role:"owner",label:"Owner",color:"bg-red-500"},{role:"admin",label:"Admin",color:"bg-blue-500"},{role:"user",label:"User",color:"bg-green-500"}],Ce=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"];function Ms(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Ce.length;return Ce[n]??Ce[0]}const ws={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ls(t,e){return e?ws[t]??"bg-neutral-400":Ms(t)}function Ps(){const t=q.c(77),[e,n]=$.useState(""),[l,i]=$.useState(null),r=gt();let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[0]=d):d=t[0];const{role:h}=xt(d),{locator:c}=Se(),g=je(),f=$e(),{customRoles:a,refetch:x}=pt();let o;t[1]!==r?(o=P=>r({to:".",search:V=>({...V,role:P})}),t[1]=r,t[2]=o):o=t[2];const m=o;let S;e:{if(!h){S=null;break e}if(h==="new"){S={kind:"new"};break e}if(h.startsWith("builtin-")){S={kind:"builtin",role:h.slice(8)};break e}let P;t[3]!==h?(P=ae=>ae.id===h,t[3]=h,t[4]=P):P=t[4];const V=a.find(P);S=V?{kind:"custom",role:V}:null}const T=S;let E;t[5]!==c?(E=re.members(c),t[5]=c,t[6]=E):E=t[6];let N;t[7]!==g?(N=()=>g.organization.listMembers(),t[7]=g,t[8]=N):N=t[8];let C;t[9]!==E||t[10]!==N?(C={queryKey:E,queryFn:N},t[9]=E,t[10]=N,t[11]=C):C=t[11];const{data:v}=Oe(C);let _;t[12]!==v?.data?.members?(_=v?.data?.members??[],t[12]=v?.data?.members,t[13]=_):_=t[13];const O=_;let p;t[14]!==O?(p=P=>O.filter(V=>V.role===P).length,t[14]=O,t[15]=p):p=t[15];const R=p;let I;if(t[16]!==a||t[17]!==R||t[18]!==e){let P;t[20]!==R?(P=ce=>({kind:"builtin",role:{...ce,memberCount:R(ce.role)}}),t[20]=R,t[21]=P):P=t[21];const V=ys.map(P);let ae;t[22]!==R?(ae=ce=>({kind:"custom",role:{...ce,memberCount:R(ce.role)}}),t[22]=R,t[23]=ae):ae=t[23];const at=a.map(ae);if(I=[...V,...at],e){const ce=e.toLowerCase();I=I.filter(ct=>ct.role.label.toLowerCase().includes(ce))}t[16]=a,t[17]=R,t[18]=e,t[19]=I}else I=t[19];let j;t[24]!==g?(j=async P=>{const V=await g.organization.deleteRole({roleId:P});if(V?.error)throw new Error(V.error.message);return V?.data},t[24]=g,t[25]=j):j=t[25];const u=Fe({mutationFn:j,onSuccess:(P,V)=>{Re("role_deleted",{role_id:V}),f.invalidateQueries({queryKey:re.members(c)}),f.invalidateQueries({queryKey:re.organizationRoles(c)}),he.success("Role deleted successfully!"),x(),T?.kind==="custom"&&T.role.id===V&&m(void 0)},onError:zs});let M,A,k,G;t[26]===Symbol.for("react.memo_cache_sentinel")?(G={id:"role",header:"Role",render:Vs,cellClassName:"flex-1 min-w-0",sortable:!0},M={id:"type",header:"Type",render:Bs,cellClassName:"w-28 shrink-0"},A={id:"permissions",header:"Permissions",render:Us,cellClassName:"flex-1 min-w-0"},k={id:"members",header:"Members",render:Gs,cellClassName:"w-24 shrink-0"},t[26]=M,t[27]=A,t[28]=k,t[29]=G):(M=t[26],A=t[27],k=t[28],G=t[29]);let U;t[30]===Symbol.for("react.memo_cache_sentinel")?(U=[G,M,A,k,{id:"actions",header:"",render:P=>P.kind==="builtin"?null:s.jsxs(bt,{children:[s.jsx(Et,{asChild:!0,children:s.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ks,children:s.jsx(It,{size:16})})}),s.jsx(Tt,{align:"end",onClick:Ds,children:s.jsxs(_t,{variant:"destructive",onClick:()=>{const V=P.role;V.id&&i({id:V.id,label:V.label})},children:[s.jsx(St,{size:16}),"Delete"]})})]}),cellClassName:"w-12 shrink-0"}],t[30]=U):U=t[30];const B=U;let w;t[31]!==m?(w=P=>{if(P.kind==="builtin")m(`builtin-${P.role.role}`);else{const V=P.role;m(V.id)}},t[31]=m,t[32]=w):w=t[32];const z=w;if(T){let P;t[33]!==m?(P=()=>m(void 0),t[33]=m,t[34]=P):P=t[34];let V;return t[35]!==x||t[36]!==m?(V=()=>{x(),m(void 0)},t[35]=x,t[36]=m,t[37]=V):V=t[37],s.jsx(Os,{target:T,onBack:P,onSaved:V},js(T))}let y;t[38]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(te.Title,{children:"Roles"}),t[38]=y):y=t[38];let L;t[39]===Symbol.for("react.memo_cache_sentinel")?(L=P=>{P.key==="Escape"&&(n(""),P.target.blur())},t[39]=L):L=t[39];let Y;t[40]!==e?(Y=s.jsx(ve,{value:e,onChange:n,placeholder:"Search roles...",className:"w-full md:w-[375px]",onKeyDown:L}),t[40]=e,t[41]=Y):Y=t[41];let F;t[42]!==m?(F=()=>m("new"),t[42]=m,t[43]=F):F=t[43];let X;t[44]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(Ae,{size:16}),t[44]=X):X=t[44];let J;t[45]!==F?(J=s.jsxs(ne,{onClick:F,children:[X,"Create Role"]}),t[45]=F,t[46]=J):J=t[46];let le;t[47]!==Y||t[48]!==J?(le=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[Y,J]}),t[47]=Y,t[48]=J,t[49]=le):le=t[49];let oe;t[50]!==e?(oe=e?s.jsx(Ge,{title:"No roles found",description:`No roles match "${e}"`}):s.jsx(Ge,{title:"No roles",description:"Create a role to get started."}),t[50]=e,t[51]=oe):oe=t[51];let ie;t[52]!==I||t[53]!==B||t[54]!==z||t[55]!==oe?(ie=s.jsx(Nt,{columns:B,data:I,isLoading:!1,onRowClick:z,emptyState:oe}),t[52]=I,t[53]=B,t[54]=z,t[55]=oe,t[56]=ie):ie=t[56];let b;t[57]!==le||t[58]!==ie?(b=s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[y,le,ie]})})}),t[57]=le,t[58]=ie,t[59]=b):b=t[59];const D=l!==null;let Q;t[60]===Symbol.for("react.memo_cache_sentinel")?(Q=P=>!P&&i(null),t[60]=Q):Q=t[60];let H;t[61]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Ze,{children:"Delete Role"}),t[61]=H):H=t[61];const W=l?.label;let Z;t[62]!==W?(Z=s.jsxs(He,{children:[H,s.jsxs(Xe,{children:['Are you sure you want to delete the "',W,'" role? This action cannot be undone.']})]}),t[62]=W,t[63]=Z):Z=t[63];let ee;t[64]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Je,{children:"Cancel"}),t[64]=ee):ee=t[64];let de;t[65]!==u||t[66]!==l?(de=s.jsxs(We,{children:[ee,s.jsx(et,{onClick:()=>{l?.id&&u.mutate(l.id),i(null)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[65]=u,t[66]=l,t[67]=de):de=t[67];let me;t[68]!==Z||t[69]!==de?(me=s.jsxs(qe,{children:[Z,de]}),t[68]=Z,t[69]=de,t[70]=me):me=t[70];let ue;t[71]!==D||t[72]!==me?(ue=s.jsx(Qe,{open:D,onOpenChange:Q,children:me}),t[71]=D,t[72]=me,t[73]=ue):ue=t[73];let _e;return t[74]!==b||t[75]!==ue?(_e=s.jsxs(te,{children:[b,ue]}),t[74]=b,t[75]=ue,t[76]=_e):_e=t[76],_e}function Ds(t){return t.stopPropagation()}function ks(t){return t.stopPropagation()}function Gs(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Us(t){if(t.kind==="builtin")return t.role.role==="owner"||t.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:"Full access"}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"Basic access"});const e=t.role,n=[];return e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:n.length>0?n.join(", "):"No permissions"})}function Bs(t){return t.kind==="builtin"?s.jsx(ge,{variant:"secondary",className:"text-xs",children:"Built-in"}):s.jsx(ge,{variant:"outline",className:"text-xs",children:"Custom"})}function Vs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",Ls(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(Ke,{size:12,className:"text-muted-foreground shrink-0"})]})}function zs(t,e){Re("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),he.error(t instanceof Error?t.message:"Failed to delete role")}function Ys(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{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 roles"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ht,{fallback:e,children:s.jsx($.Suspense,{fallback:s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ps,{})})}),t[1]=n):n=t[1],n}function Tl(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vs,{area:"roles",children:s.jsx(Ys,{})}),t[0]=e):e=t[0],e}export{Tl as default};
|