decocms 4.29.1 → 4.30.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-D90xu5-8.js → AlertCircle-DQZIoZK3.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-B1XPsNPZ.js → ArrowUpRight-BXPXISIu.js} +1 -1
- package/dist/client/assets/{Check-BqH5cjqe.js → Check-s3en6K6a.js} +1 -1
- package/dist/client/assets/{CheckCircle-CebfgxLq.js → CheckCircle-6oFE8RZY.js} +1 -1
- package/dist/client/assets/{ChevronDown-DhzhS3K5.js → ChevronDown-DfbvlHGm.js} +1 -1
- package/dist/client/assets/{ChevronRight-DntNgeBz.js → ChevronRight-BbMxA_we.js} +1 -1
- package/dist/client/assets/{ChevronUp-DPJfOoQR.js → ChevronUp-CSojtzH5.js} +1 -1
- package/dist/client/assets/{Circle-umqkxNwx.js → Circle-4U8mdxgJ.js} +1 -1
- package/dist/client/assets/{Copy01-YBIj7O7M.js → Copy01-CIuFqZaz.js} +1 -1
- package/dist/client/assets/{DotsVertical-DoxN78H8.js → DotsVertical-CcXsbxkI.js} +1 -1
- package/dist/client/assets/{Eye-o8ajkfvt.js → Eye-C-Ii0MmZ.js} +1 -1
- package/dist/client/assets/{FilterLines-CEBhmChB.js → FilterLines-CRqtZMw9.js} +1 -1
- package/dist/client/assets/{Globe01-D3NrpjPq.js → Globe01-CdJefkBr.js} +1 -1
- package/dist/client/assets/{Globe04-6xG6GU2e.js → Globe04-BrDmMJuA.js} +1 -1
- package/dist/client/assets/{HardDrive-CDBenwE2.js → HardDrive-C1TfsRRw.js} +1 -1
- package/dist/client/assets/{Key01-CwgjH_um.js → Key01-BuAYoLgF.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CKcHwaHf.js → LayoutLeft-BuFW-ud0.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DBFEHO3t.js → LinkExternal01-DMcxPOk0.js} +1 -1
- package/dist/client/assets/{List-s8AZWxpk.js → List-Dg43Ye3O.js} +1 -1
- package/dist/client/assets/{Loading02-DaLVACu2.js → Loading02-CLjf_mWB.js} +1 -1
- package/dist/client/assets/{Monitor01-lxPxQ2fk.js → Monitor01-DP1X3LaS.js} +1 -1
- package/dist/client/assets/{Palette-DHyTdFqR.js → Palette-6OTpcgOT.js} +1 -1
- package/dist/client/assets/{Play-TOCBGzP9.js → Play-C-6p0BcA.js} +1 -1
- package/dist/client/assets/{Plus-DkGwhdIW.js → Plus-DI8G3hjD.js} +1 -1
- package/dist/client/assets/{SearchLg-C9MBYrXH.js → SearchLg-CeBJHSxD.js} +1 -1
- package/dist/client/assets/{SearchMd-Dhz0UROc.js → SearchMd-BK3G07RD.js} +1 -1
- package/dist/client/assets/{Settings02-COfrOHpp.js → Settings02-Cc5NwEaN.js} +1 -1
- package/dist/client/assets/{Shield01-BrK-9cDf.js → Shield01-CSmFJ1RP.js} +1 -1
- package/dist/client/assets/{Star01-twQgP5oO.js → Star01-CWyyx_CI.js} +1 -1
- package/dist/client/assets/{Stars01-C27kMlCK.js → Stars01-CNNiBNAJ.js} +1 -1
- package/dist/client/assets/{Stars02-sR281nUk.js → Stars02-zuQltjIB.js} +1 -1
- package/dist/client/assets/{Sun-DTFx5jn8.js → Sun-Cm9IedwX.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bu9ipsE_.js → SwitchHorizontal01-Cw76bjm8.js} +1 -1
- package/dist/client/assets/{Tool01-DJgxsN47.js → Tool01-CTeGQUqF.js} +1 -1
- package/dist/client/assets/{Trash01-myAGgKHr.js → Trash01-CeLlU9Hr.js} +1 -1
- package/dist/client/assets/{Upload01-m0ny4YmQ.js → Upload01-DeL5atjC.js} +1 -1
- package/dist/client/assets/{User01-DuGAbO5F.js → User01-CVy-WVkE.js} +1 -1
- package/dist/client/assets/{Users01-e9Wb8IJU.js → Users01-gmVxoI-k.js} +1 -1
- package/dist/client/assets/{Users03-JTfAuK6m.js → Users03-Ba1rCL5_.js} +1 -1
- package/dist/client/assets/{X-DRR7RtBP.js → X-B4fK1PSH.js} +1 -1
- package/dist/client/assets/{XCircle-Cz7czjsw.js → XCircle-D680rHaa.js} +1 -1
- package/dist/client/assets/{XClose-eEYHZsPT.js → XClose-DZ-fbd9x.js} +1 -1
- package/dist/client/assets/{Zap-CMZ9cCJz.js → Zap-CHM8jc7i.js} +1 -1
- package/dist/client/assets/{ZapSquare-Ch518nCD.js → ZapSquare-BjByOqyA.js} +1 -1
- package/dist/client/assets/{ZoomOut-Chl8lvun.js → ZoomOut-Dt1IXaRq.js} +1 -1
- package/dist/client/assets/{access-gate-Cf-kJrg7.js → access-gate-w4EKvoEv.js} +1 -1
- package/dist/client/assets/{add-section-modal-COVSQJFG.js → add-section-modal-DogHlV9_.js} +1 -1
- package/dist/client/assets/agent-capabilities-giK3bRW-.js +1 -0
- package/dist/client/assets/agent-icon-N5U1HeY1.js +1 -0
- package/dist/client/assets/agents-list-CqlyAaPn.js +1 -0
- package/dist/client/assets/ai-providers--EA2lMFo.js +1 -0
- package/dist/client/assets/{alert-C-n1SZ0O.js → alert-Bdmkn5IA.js} +1 -1
- package/dist/client/assets/{alert-dialog-wgrcUQ0O.js → alert-dialog-DQf3rZVT.js} +3 -3
- package/dist/client/assets/app-editor-k0YPL4X-.js +1 -0
- package/dist/client/assets/{auth-B8jeHTDK.js → auth-DLezYwI7.js} +1 -1
- package/dist/client/assets/{auth-catchall-f5qF8zoS.js → auth-catchall-v82GytbP.js} +1 -1
- package/dist/client/assets/{auth-entry-BwlcwCMz.js → auth-entry-verdsuvy.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DiG8voFB.js → auth-split-layout-D3EcXAD7.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ezeRyKPp.js → authenticate-and-persist-oauth-B89lyITx.js} +1 -1
- package/dist/client/assets/{automation-list-row-CeLhtWjA.js → automation-list-row-o2_pLOr4.js} +1 -1
- package/dist/client/assets/automation-runs-Dmwa3j9k.js +188 -0
- package/dist/client/assets/automations-3TEWqXty.js +1 -0
- package/dist/client/assets/autosend-e3cesngm.js +1 -0
- package/dist/client/assets/{avatar-BrhzNA4d.js → avatar-0pAXOhlp.js} +1 -1
- package/dist/client/assets/{badge-B5li3mFX.js → badge-DdUP-taI.js} +1 -1
- package/dist/client/assets/{block-document-BKVlkRQG.js → block-document-B5oKLw65.js} +3 -3
- package/dist/client/assets/brand-context-DYt7cXJ_.js +1 -0
- package/dist/client/assets/{breadcrumb-BPYlrjmj.js → breadcrumb-Dx2G4VO9.js} +1 -1
- package/dist/client/assets/buckets-BDVtaRLE.js +1 -0
- package/dist/client/assets/bulk-category-panel-DJTbN1Qa.js +1 -0
- package/dist/client/assets/{calendar-C0u4vRHU.js → calendar-CcJoOwrC.js} +1 -1
- package/dist/client/assets/capability-load-error-kAN6hK8J.js +1 -0
- package/dist/client/assets/{card-CCFrbS6S.js → card-CLNI5vTb.js} +1 -1
- package/dist/client/assets/category-editor-C-c4TOvs.js +1 -0
- package/dist/client/assets/{chat-context-XoGdeFE9.js → chat-context-CDLyvKdU.js} +5 -5
- package/dist/client/assets/{checkbox-D2NBps_s.js → checkbox-BCSDUgIe.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DG3-YXKw.js → cli-auth-success-BMRSWJHK.js} +1 -1
- package/dist/client/assets/collection-detail-BxQm_7ex.js +1 -0
- package/dist/client/assets/{collection-display-button-Bvtt9j_H.js → collection-display-button-DgkDwQx3.js} +1 -1
- package/dist/client/assets/{collection-search-BHb176G9.js → collection-search-EDEWD1X9.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BBBMMDK4.js → collection-table-wrapper-tJUZOEkF.js} +1 -1
- package/dist/client/assets/{collection-tabs-CCdUJRcj.js → collection-tabs-Cq6azV_u.js} +1 -1
- package/dist/client/assets/{command-CGbsZOaN.js → command-DHmaE9JT.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DNPVnUn4.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-CRhRTOUc.js → connect-desktop-dialog-DGh-1tLq.js} +1 -1
- package/dist/client/assets/{connection-card-DGNqtPoP.js → connection-card-DT-riPtN.js} +1 -1
- package/dist/client/assets/connection-detail-DfM_VWgx.js +1 -0
- package/dist/client/assets/{connection-form-helpers-Bs8LNNlp.js → connection-form-helpers-DioUFOWc.js} +1 -1
- package/dist/client/assets/connections-bwhbNn_9.js +1 -0
- package/dist/client/assets/constants-B72Xmt_K.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-B7Qe588m.js → decopilot-sse-pool-BOi7-S8l.js} +1 -1
- package/dist/client/assets/{dialog-C2MVTIBt.js → dialog-C1_sXCgH.js} +1 -1
- package/dist/client/assets/{domain-settings-Dk68eaoE.js → domain-settings-BZ3H97uq.js} +1 -1
- package/dist/client/assets/{drawer-BGO4iAk0.js → drawer-BstQPSyC.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BPps0Iqr.js → dropdown-menu-BXGfrSiX.js} +1 -1
- package/dist/client/assets/{empty-state-BUKBmmAV.js → empty-state-CSs6-Bdi.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dq7vx8cX.js → extract-connection-data-mdwVf3Kr.js} +1 -1
- package/dist/client/assets/file-explorer-BCjGBw7c.js +2 -0
- package/dist/client/assets/{file-type-icon-DIgcp2MN.js → file-type-icon-C_PHmk0C.js} +1 -1
- package/dist/client/assets/{files-CIXCBIkO.js → files-DJf6oJKs.js} +1 -1
- package/dist/client/assets/{form-TSiFK-dI.js → form-BB8De_xV.js} +1 -1
- package/dist/client/assets/general-BgbMP2m7.js +1 -0
- package/dist/client/assets/github-repo-picker-aJftKcC0.js +1 -0
- package/dist/client/assets/{hooks-BKW8thdS.js → hooks-CksaF-ej.js} +6 -6
- package/dist/client/assets/{index-Btxmdruq.js → index-BTvzEEE4.js} +3 -3
- package/dist/client/assets/index-BYSbf1og.css +1 -0
- package/dist/client/assets/{index-BZQALusN.js → index-B_a3RFg9.js} +1 -1
- package/dist/client/assets/{index-9kwnfSCp.js → index-BgeQc437.js} +3 -3
- package/dist/client/assets/{index-DNvozpHG.js → index-BlHRIOF6.js} +1 -1
- package/dist/client/assets/{index-d52A49fX.js → index-ByOvX_ve.js} +4 -4
- package/dist/client/assets/{index-CIZOVv5V.js → index-C0ZQYTpQ.js} +1 -1
- package/dist/client/assets/{index-BibhmEoM.js → index-C0ZnJYy-.js} +1 -1
- package/dist/client/assets/{index-Bsex2T4n.js → index-C34RmICP.js} +3 -3
- package/dist/client/assets/index-CQvqUcGM.js +1 -0
- package/dist/client/assets/index-DDp5gOuw.js +1 -0
- package/dist/client/assets/index-PwHmdceA.js +519 -0
- package/dist/client/assets/{index-BlJ4j0DM.js → index-SAeZ5DI1.js} +1 -1
- package/dist/client/assets/{index-CKKQLGcV.js → index-_3KKuOg4.js} +1 -1
- package/dist/client/assets/{index-B09DUV7c.js → index-eWA8xKaL.js} +1 -1
- package/dist/client/assets/{index-redirect-BsNOVzi9.js → index-redirect-uNIA84_Q.js} +1 -1
- package/dist/client/assets/{input-B_5YyJ8y.js → input-Bt7D33rg.js} +1 -1
- package/dist/client/assets/{integration-icon-DXGEOTjP.js → integration-icon-C5KirdUg.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-YIBgjb89.js → invite-member-dialog-BuARwphh.js} +2 -2
- package/dist/client/assets/{label-CWqrShVu.js → label-BxgEeCbJ.js} +1 -1
- package/dist/client/assets/{login-Da99hiOC.js → login-CaG_4y_B.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CSUfdVCn.js → mcp-oauth-CL0sljW9.js} +1 -1
- package/dist/client/assets/members--hV2Q0Ot.js +1 -0
- package/dist/client/assets/monaco-editor-CbUVJEKg.js +9 -0
- package/dist/client/assets/{monitoring-stats-row-DixOHH_R.js → monitoring-stats-row-DFi_Kdkh.js} +1 -1
- package/dist/client/assets/{oauth-callback-BaDQ-n27.js → oauth-callback-DAhYaKj8.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-I3h8vdSk.js → oauth-callback-ai-provider-CR0F-hQD.js} +1 -1
- package/dist/client/assets/{onboarding-B1EOLElh.js → onboarding-BUFWneNv.js} +1 -1
- package/dist/client/assets/org-install-Bb2jIZ-L.js +1 -0
- package/dist/client/assets/{org-layout-NnaVwU9k.js → org-layout-D_gYV_Zs.js} +1 -1
- package/dist/client/assets/{organization-choice-C-TyyEjY.js → organization-choice-BvtQGOSW.js} +1 -1
- package/dist/client/assets/page-seo-form-BWWbOuxt.js +1 -0
- package/dist/client/assets/page-seo-sheet-98Jl6iTy.js +1 -0
- package/dist/client/assets/{popover-DlszYF1R.js → popover-DzPhoKNT.js} +1 -1
- package/dist/client/assets/post-editor-Dl6eFOA9.js +1 -0
- package/dist/client/assets/primitives-CHpgu7zx.js +1 -0
- package/dist/client/assets/profile-CuDAW9Ii.js +1 -0
- package/dist/client/assets/project-app-view-BkSNyja3.js +1 -0
- package/dist/client/assets/record-editor-D5qjtt77.js +1 -0
- package/dist/client/assets/registry-Dw9uBZ7-.js +2 -0
- package/dist/client/assets/{registry-layout-zFAhrTof.js → registry-layout-BkbFqKCh.js} +1 -1
- package/dist/client/assets/{require-capability-C135EIMf.js → require-capability-DGTSD8vx.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CEAeU4UY.js → required-auth-layout-BjrbsMWm.js} +1 -1
- package/dist/client/assets/{reset-password-D_zECCKz.js → reset-password-BiKRZoQ2.js} +1 -1
- package/dist/client/assets/reusable-new-chat-qqWu133U.js +1 -0
- package/dist/client/assets/roles-zCiQqsuK.js +1 -0
- package/dist/client/assets/{search-input-DccF25qw.js → search-input-kWxNIRnl.js} +1 -1
- package/dist/client/assets/secrets-viO9Xl5S.js +1 -0
- package/dist/client/assets/sections-editor-W7VOMkOG.js +2 -0
- package/dist/client/assets/{select-DdHVdWXn.js → select-8JaYnS6d.js} +1 -1
- package/dist/client/assets/select-model-B-2xubIJ.js +4 -0
- package/dist/client/assets/seo-editor-CFGBoPWr.js +1 -0
- package/dist/client/assets/settings-layout-DNdkL202.js +1 -0
- package/dist/client/assets/{settings-section-eWkjB3kv.js → settings-section-CAqTmyhS.js} +1 -1
- package/dist/client/assets/shell-controls-Yg88zbSN.js +1 -0
- package/dist/client/assets/shell-layout-k2JSKYlm.js +1 -0
- package/dist/client/assets/sidebar-C761eQb1.js +1 -0
- package/dist/client/assets/{skeleton-Bl9k4gft.js → skeleton-DSJYqmzp.js} +1 -1
- package/dist/client/assets/sso-CWcGb61Y.js +1 -0
- package/dist/client/assets/store-DxbT2BKV.js +1 -0
- package/dist/client/assets/store-registry-B_vQy0r8.js +2 -0
- package/dist/client/assets/{studio-tools-nA7ZTnFV.js → studio-tools-CgfSo7j_.js} +1 -1
- package/dist/client/assets/{switch-CuT_exNr.js → switch-DhJhR8Ba.js} +1 -1
- package/dist/client/assets/tab-id-yjGvxWDL.js +1 -0
- package/dist/client/assets/{table-CWyE2zgw.js → table-CDz46PoK.js} +1 -1
- package/dist/client/assets/{tabs-DRqPX6Mz.js → tabs-BUhcO-L3.js} +1 -1
- package/dist/client/assets/{textarea-B3Rf9sP3.js → textarea-BYx7whqS.js} +1 -1
- package/dist/client/assets/{toggle-group-BuLxG5r3.js → toggle-group-BZ189fjx.js} +1 -1
- package/dist/client/assets/toolbar-C5VXYU-N.js +1 -0
- package/dist/client/assets/{toolbar-icon-button-CwCDO4L5.js → toolbar-icon-button-DrS8O_Iq.js} +1 -1
- package/dist/client/assets/tools-list-DlkGTda2.js +1 -0
- package/dist/client/assets/tooltip-B3P4mjnJ.js +1 -0
- package/dist/client/assets/{types-B2Xs3OM7.js → types-CcSVLYhO.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CW0jtnuO.js → use-ai-providers-CprIzBUo.js} +1 -1
- package/dist/client/assets/{use-automations-CuWiOTtv.js → use-automations-2Be9XmPq.js} +1 -1
- package/dist/client/assets/{use-capability-C9whYnsG.js → use-capability-BPxQX6Oj.js} +1 -1
- package/dist/client/assets/use-clock-tick-BjAPnH4G.js +1 -0
- package/dist/client/assets/use-collections-b46PF-FB.js +1 -0
- package/dist/client/assets/{use-connection-BLVjIktc.js → use-connection-DeGbigio.js} +1 -1
- package/dist/client/assets/{use-copy-_bA4U2MU.js → use-copy-D_xDaGph.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DAOEgAsA.js → use-create-virtual-mcp-B-FWLpM6.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D34fr9f_.js → use-debounced-autosave-BuGW5-NP.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DxBLMeqg.js → use-debounced-value-CFIePpm0.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dk3_PQZu.js → use-decopilot-events-BLTRVndf.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CkaRxWAn.js → use-delete-connection-Dl2mZ81L.js} +1 -1
- package/dist/client/assets/{use-file-configs-Td4k8wTj.js → use-file-configs-BTnwV_7n.js} +1 -1
- package/dist/client/assets/use-infinite-scroll-ChaGSzFC.js +1 -0
- package/dist/client/assets/{use-join-requests-DoInaUWb.js → use-join-requests-BMDS7ZyH.js} +1 -1
- package/dist/client/assets/{use-mcp-client-QTh-uqf4.js → use-mcp-client-u24P-s4P.js} +2 -2
- package/dist/client/assets/{use-mcp-prompts-5W77PpYc.js → use-mcp-prompts-BDBVNTlN.js} +1 -1
- package/dist/client/assets/use-mcp-tools-CocIQ7qB.js +1 -0
- package/dist/client/assets/{use-members-Cc48Xacn.js → use-members-Bus4og0A.js} +1 -1
- package/dist/client/assets/{use-mobile-Cqur1PpI.js → use-mobile-C93OYfHB.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-DjAWkSGL.js +1 -0
- package/dist/client/assets/{use-org-auth-client-C5lRdd5o.js → use-org-auth-client-CA5gjmgW.js} +1 -1
- package/dist/client/assets/{use-org-sso-DGL7haeQ.js → use-org-sso-CFBLq8qg.js} +1 -1
- package/dist/client/assets/{use-organization-roles-UeKRVQhu.js → use-organization-roles-h9scR-Kp.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CnPdR5CP.js → use-organization-settings-EwmFXWWf.js} +1 -1
- package/dist/client/assets/{use-registry-connections-HQM1hA3o.js → use-registry-connections-D8Q8D5kz.js} +1 -1
- package/dist/client/assets/{use-secrets-D-GN3cJh.js → use-secrets-W7_VRgqz.js} +1 -1
- package/dist/client/assets/use-status-sounds-DJJd7nCb.js +1 -0
- package/dist/client/assets/{use-view-mode-BMlb6QOX.js → use-view-mode-B0A1elcL.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-Bc6ku1ke.js +1 -0
- package/dist/client/assets/useInfiniteQuery-CwXupu4y.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-ahqYuudo.js +1 -0
- package/dist/client/assets/variant-calendar-DdJwieRy.js +1 -0
- package/dist/client/assets/{view-mode-toggle-D0e_xb-Q.js → view-mode-toggle-BDMYTtyJ.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3 -3
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/agent-capabilities-Cpju5Yfe.js +0 -1
- package/dist/client/assets/agent-icon-BvZm1osM.js +0 -1
- package/dist/client/assets/agents-list-BzkaDxFg.js +0 -1
- package/dist/client/assets/ai-providers-DadR3aQt.js +0 -1
- package/dist/client/assets/app-editor-CAH73t0u.js +0 -1
- package/dist/client/assets/automation-runs-CmgFzJTt.js +0 -1
- package/dist/client/assets/automations-D21tUX_h.js +0 -1
- package/dist/client/assets/brand-context-DHuctVxS.js +0 -1
- package/dist/client/assets/buckets-CZdkIll2.js +0 -1
- package/dist/client/assets/bulk-category-panel-DBxbY94B.js +0 -1
- package/dist/client/assets/capability-load-error-D7uMbvO0.js +0 -1
- package/dist/client/assets/category-editor-DJYxfrMo.js +0 -1
- package/dist/client/assets/collection-detail-uY6XXgWz.js +0 -1
- package/dist/client/assets/commerce-onboarding-DtUMhwdU.js +0 -1
- package/dist/client/assets/connection-detail-DlI7-vLh.js +0 -1
- package/dist/client/assets/connections-Ci34jtNe.js +0 -1
- package/dist/client/assets/constants-nH3qQ_1f.js +0 -1
- package/dist/client/assets/content-blocks-o63cs2vh.js +0 -1
- package/dist/client/assets/decopilot--vqccpDb.js +0 -4
- package/dist/client/assets/file-explorer-BGhwIot0.js +0 -2
- package/dist/client/assets/general-D5as9e6z.js +0 -1
- package/dist/client/assets/github-repo-picker-B3tomRAJ.js +0 -1
- package/dist/client/assets/index-5uzKO7q6.css +0 -1
- package/dist/client/assets/index-C7DWYqRh.js +0 -1
- package/dist/client/assets/index-CEE6U8OI.js +0 -1
- package/dist/client/assets/index-ELtqDe0g.js +0 -513
- package/dist/client/assets/library-tab-BBr_dx-g.js +0 -7
- package/dist/client/assets/members-BboKmC5r.js +0 -1
- package/dist/client/assets/monaco-editor-xlUuBDU4.js +0 -9
- package/dist/client/assets/org-install-CDUCFQCm.js +0 -1
- package/dist/client/assets/page-seo-form-Cfv9ng9q.js +0 -1
- package/dist/client/assets/page-seo-sheet-CIF4tqJJ.js +0 -1
- package/dist/client/assets/post-editor-BiHws1oe.js +0 -1
- package/dist/client/assets/primitives-0HgpGbC7.js +0 -1
- package/dist/client/assets/profile-ZMZrPNFW.js +0 -1
- package/dist/client/assets/project-app-view-O-o90Cxo.js +0 -1
- package/dist/client/assets/record-editor-BZ3V6i3V.js +0 -1
- package/dist/client/assets/registry-DzfT-ESq.js +0 -2
- package/dist/client/assets/roles-DYzEztRG.js +0 -1
- package/dist/client/assets/scroll-area-Bsik7Uif.js +0 -188
- package/dist/client/assets/secrets-DJrAzRmE.js +0 -1
- package/dist/client/assets/sections-editor-i5xgzCTq.js +0 -2
- package/dist/client/assets/select-model-C49KT9p5.js +0 -1
- package/dist/client/assets/seo-editor-C38OT2eM.js +0 -1
- package/dist/client/assets/settings-layout-DePsodvD.js +0 -1
- package/dist/client/assets/sheet-DSSfro03.js +0 -1
- package/dist/client/assets/shell-controls-DMbQmeKU.js +0 -1
- package/dist/client/assets/shell-layout-DdmjIlR4.js +0 -1
- package/dist/client/assets/sidebar-BJwboMe2.js +0 -1
- package/dist/client/assets/sso-xj4rMylh.js +0 -1
- package/dist/client/assets/store-DlhSxr4k.js +0 -1
- package/dist/client/assets/store-registry-BayPiGW-.js +0 -2
- package/dist/client/assets/tab-id-Bgchl1bv.js +0 -1
- package/dist/client/assets/task-row-DzSs63v5.js +0 -1
- package/dist/client/assets/task-status-CNEAWeje.js +0 -1
- package/dist/client/assets/toolbar-CVjg3TEd.js +0 -1
- package/dist/client/assets/tools-list-Dzc5vr-A.js +0 -1
- package/dist/client/assets/tooltip-Bzas0fb8.js +0 -1
- package/dist/client/assets/use-clock-tick-B6ygxook.js +0 -1
- package/dist/client/assets/use-collections-BP4R8sI-.js +0 -1
- package/dist/client/assets/use-infinite-scroll-1VhU5Q3H.js +0 -1
- package/dist/client/assets/use-mcp-tools-BTYjbm6L.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-CaUSC1CF.js +0 -1
- package/dist/client/assets/use-status-sounds-DEhedUWx.js +0 -1
- package/dist/client/assets/use-virtual-mcp-n0IfHFn6.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DEG0qlSd.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DzP8_asj.js +0 -1
- package/dist/client/assets/useSuspenseQueries-CI8oYgcQ.js +0 -1
- package/dist/client/assets/variant-calendar-CIBbpgAR.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,j as t,E as P,r as j,a2 as w,B as S,t as y}from"./index-d52A49fX.js";import{i as k}from"./AlertCircle-D90xu5-8.js";import{s as z}from"./Plus-DkGwhdIW.js";import{s as E}from"./User01-DuGAbO5F.js";import{t as F}from"./Users01-e9Wb8IJU.js";import{e as $,d as I,c as O,a as A,b as R,D as T}from"./dialog-C2MVTIBt.js";import{I as N}from"./input-B_5YyJ8y.js";import{L as g}from"./label-CWqrShVu.js";import{d as B,S as V,a as L,b as q,c as C}from"./select-DdHVdWXn.js";import{S as H}from"./skeleton-Bl9k4gft.js";import{T as K}from"./textarea-B3Rf9sP3.js";import{P as b}from"./index-BZQALusN.js";import{c as W}from"./settings-section-eWkjB3kv.js";import{u as Y,a as G}from"./use-secrets-D-GN3cJh.js";import{R as J}from"./require-capability-C135EIMf.js";import"./X-DRR7RtBP.js";import"./tooltip-Bzas0fb8.js";import"./Check-BqH5cjqe.js";import"./ChevronDown-DhzhS3K5.js";import"./ChevronUp-DPJfOoQR.js";import"./sidebar-BJwboMe2.js";import"./LayoutLeft-CKcHwaHf.js";import"./use-mobile-Cqur1PpI.js";import"./sheet-DSSfro03.js";import"./card-CCFrbS6S.js";import"./ArrowUpRight-B1XPsNPZ.js";import"./studio-tools-nA7ZTnFV.js";import"./use-capability-C9whYnsG.js";import"./access-gate-Cf-kJrg7.js";import"./capability-load-error-D7uMbvO0.js";function M(s){const e=f.c(3),{error:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(k,{size:16}),e[0]=c):c=e[0];let n;return e[1]!==r.message?(n=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,t.jsxs("span",{className:"text-sm font-medium",children:["Failed to load secrets: ",r.message]})]}),e[1]=r.message,e[2]=n):n=e[2],n}function Q(s){const e=f.c(5),{scope:r}=s,c=r==="user"?E:F,n=r==="user"?"Private":"Organization";let i;e[0]!==c?(i=t.jsx(c,{size:12}),e[0]=c,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=t.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[i,n]}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function D(s){const e=f.c(20),{secret:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(w,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==r.name?(n=t.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=n):n=e[2];let i;e[3]!==r.scope?(i=t.jsx(Q,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let a;e[5]!==n||e[6]!==i?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[n,i]}),e[5]=n,e[6]=i,e[7]=a):a=e[7];let d;e[8]!==r.description?(d=r.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=d):d=e[9];let u;e[10]!==a||e[11]!==d?(u=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[c,t.jsxs("div",{className:"min-w-0",children:[a,d]})]}),e[10]=a,e[11]=d,e[12]=u):u=e[12];let l;e[13]!==r.createdAt?(l=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=l):l=e[14];let o;e[15]!==l?(o=t.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:l}),e[15]=l,e[16]=o):o=e[16];let x;return e[17]!==u||e[18]!==o?(x=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[u,o]}),e[17]=u,e[18]=o,e[19]=x):x=e[19],x}function U(s){const e=f.c(5),{onCreate:r}=s;let c,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(w,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No secrets yet"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Store API keys, tokens, and other sensitive values. Values are encrypted at rest and never returned over the API."})]}),e[0]=c,e[1]=n):(c=e[0],n=e[1]);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(z,{size:14}),e[2]=i):i=e[2];let a;return e[3]!==r?(a=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,t.jsxs(S,{onClick:r,size:"sm",className:"mt-2",children:[i,"New secret"]})]}),e[3]=r,e[4]=a):a=e[4],a}function _({open:s,onOpenChange:e}){const[r,c]=j.useState("organization"),[n,i]=j.useState(""),[a,d]=j.useState(""),[u,l]=j.useState(""),o=G();function x(){c("organization"),i(""),d(""),l("")}function p(){x(),e(!1)}async function h(m){if(m.preventDefault(),!(!n.trim()||!a))try{await o.mutateAsync({scope:r,name:n.trim(),value:a,description:u.trim()||void 0}),y.success(`Secret "${n.trim()}" created`),p()}catch(v){y.error(v instanceof Error?v.message:"Failed to create secret")}}return t.jsx($,{open:s,onOpenChange:m=>{m?e(m):p()},children:t.jsxs(I,{className:"sm:max-w-lg",children:[t.jsxs(O,{children:[t.jsx(A,{children:"New secret"}),t.jsx(R,{children:"Stored encrypted in the credential vault. Choose who can read it."})]}),t.jsxs("form",{onSubmit:h,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-scope",children:"Scope"}),t.jsxs(B,{value:r,onValueChange:m=>c(m),children:[t.jsx(V,{id:"secret-scope",children:t.jsx(L,{})}),t.jsxs(q,{children:[t.jsx(C,{value:"organization",children:"Organization — visible to all members"}),t.jsx(C,{value:"user",children:"Private — only visible to me"})]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-name",children:"Name"}),t.jsx(N,{id:"secret-name",value:n,onChange:m=>i(m.target.value),placeholder:"STRIPE_API_KEY",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Letters, digits, underscore, dot, hyphen. Case-insensitive within its scope."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-value",children:"Value"}),t.jsx(N,{id:"secret-value",type:"password",value:a,onChange:m=>d(m.target.value),autoComplete:"new-password",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-description",children:"Description (optional)"}),t.jsx(K,{id:"secret-description",value:u,onChange:m=>l(m.target.value),rows:2,placeholder:"What is this secret used for?"})]}),t.jsxs(T,{children:[t.jsx(S,{type:"button",variant:"outline",onClick:p,disabled:o.isPending,children:"Cancel"}),t.jsx(S,{type:"submit",disabled:o.isPending||!n.trim()||!a,children:o.isPending?"Creating…":"Create secret"})]})]})]})})}function X(){const s=f.c(21),e=Y(),[r,c]=j.useState(!1);if(e.length===0){let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(U,{onCreate:()=>c(!0)}),s[0]=l):l=s[0];let o;return s[1]!==r?(o=t.jsxs(t.Fragment,{children:[l,t.jsx(_,{open:r,onOpenChange:c})]}),s[1]=r,s[2]=o):o=s[2],o}let n,i,a;if(s[3]!==e){const l=e.filter(se),o=e.filter(te),x=e.length===1?"":"s";let p;s[7]!==e.length||s[8]!==x?(p=t.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," secret",x," stored"]}),s[7]=e.length,s[8]=x,s[9]=p):p=s[9];let h;s[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>c(!0),s[10]=h):h=s[10];let m;s[11]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs(S,{onClick:h,size:"sm",children:[t.jsx(z,{size:14}),"New secret"]}),s[11]=m):m=s[11],s[12]!==p?(n=t.jsxs("div",{className:"flex items-center justify-between",children:[p,m]}),s[12]=p,s[13]=n):n=s[13],i=l.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Organization"}),t.jsx("div",{children:l.map(ee)})]}):null,a=o.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Private to me"}),t.jsx("div",{children:o.map(Z)})]}):null,s[3]=e,s[4]=n,s[5]=i,s[6]=a}else n=s[4],i=s[5],a=s[6];let d;s[14]!==r?(d=t.jsx(_,{open:r,onOpenChange:c}),s[14]=r,s[15]=d):d=s[15];let u;return s[16]!==n||s[17]!==i||s[18]!==a||s[19]!==d?(u=t.jsxs(t.Fragment,{children:[n,i,a,d]}),s[16]=n,s[17]=i,s[18]=a,s[19]=d,s[20]=u):u=s[20],u}function Z(s){return t.jsx(D,{secret:s},s.id)}function ee(s){return t.jsx(D,{secret:s},s.id)}function te(s){return s.scope==="user"}function se(s){return s.scope==="organization"}function re(){const s=f.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(b.Title,{children:"Secrets"}),s[0]=e):e=s[0];let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(b,{children:t.jsx(b.Content,{children:t.jsx(b.Body,{children:t.jsxs(W,{children:[e,t.jsx(P,{fallback:ne,children:t.jsx(j.Suspense,{fallback:t.jsx(H,{className:"h-32 w-full"}),children:t.jsx(X,{})})})]})})})}),s[1]=r):r=s[1],r}function ne(s){const{error:e}=s;return t.jsx(M,{error:e??new Error("Failed to load secrets")})}function Oe(){const s=f.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(J,{capability:"secrets:manage",area:"secrets",children:t.jsx(re,{})}),s[0]=e):e=s[0],e}export{Oe as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as He,r as w,l as Be,j as n,B as Ge,i as zn,m as vs,t as W,K as Ss}from"./index-d52A49fX.js";import{r as xs,b as ys,c as bs,i as Hn,d as _s,e as js,G as ks,V as ws,g as Rs,h as Rt,j as Ds,k as Ns,l as Vs,m as Cs,n as Ps,o as Ts,p as As,q as Ms,t as Es,v as $t,w as Ot,x as Ks,y as ut,z as jt,A as $s,B as Os,C as Ye,D as Vn,S as Bs,M as Cn,E as kt,F as Bt,H as Ls,I as an,P as Fs,J as et,K as xt,L as Is,N as zs,O as Hs,Q as Us,R as Ws,T as Gs,U as dt,W as qs,X as Js,Y as Ys,Z as Pn,_ as wt,$ as Qs,a0 as Xs,a1 as Zs,a2 as er,a3 as tr,a4 as sn,a5 as Tn,a6 as An,a7 as yt,a8 as Lt,a9 as Mn,aa as nr,ab as ar,ac as rn,ad as sr,ae as rr,af as Un,ag as En,ah as or}from"./index-ELtqDe0g.js";import{t as ir}from"./ChevronDown-DhzhS3K5.js";import{s as Wn,a as lr}from"./Loading02-DaLVACu2.js";import{i as Gn}from"./ChevronRight-DntNgeBz.js";import{n as cr}from"./ChevronUp-DPJfOoQR.js";import{I as ln,G as qn,l as ur,J as dr,K as mr}from"./agent-icon-BvZm1osM.js";import{i as fr}from"./Globe01-D3NrpjPq.js";import{S as Ft}from"./scroll-area-Bsik7Uif.js";import{T as mt,a as ft,b as pt}from"./tooltip-Bzas0fb8.js";import{a as pr,c as hr,b as gr,D as vr,d as Sr,e as xr}from"./dialog-C2MVTIBt.js";import{I as yr}from"./input-B_5YyJ8y.js";import{a as Jn}from"./Copy01-YBIj7O7M.js";import{b as br}from"./ZoomOut-Chl8lvun.js";import{i as _r}from"./Settings02-COfrOHpp.js";import{s as jr}from"./Eye-o8ajkfvt.js";import{s as cn}from"./Plus-DkGwhdIW.js";import{s as Yn}from"./Trash01-myAGgKHr.js";import{i as kr}from"./Zap-CMZ9cCJz.js";import{c as it,b as Qn,a as Xn,D as Zn,d as wr}from"./dropdown-menu-BPps0Iqr.js";import{b as ea,c as It,K as ta,P as na,g as aa,h as sa,i as ra,f as Dt,D as oa,d as ia,S as la,v as ca,e as ua}from"./library-tab-BBr_dx-g.js";import{r as Kn,u as Rr,d as Dr,a as Nr,i as Vr,f as Cr,P as Pr,b as Tr,S as Ar}from"./page-seo-form-Cfv9ng9q.js";import{c as Mr}from"./Tool01-DJgxsN47.js";import{A as Er}from"./add-section-modal-COVSQJFG.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"./AlertCircle-D90xu5-8.js";import"./CheckCircle-CebfgxLq.js";import"./XCircle-Cz7czjsw.js";import"./XClose-eEYHZsPT.js";import"./integration-icon-DXGEOTjP.js";import"./shell-layout-DdmjIlR4.js";import"./avatar-BrhzNA4d.js";import"./User01-DuGAbO5F.js";import"./Users03-JTfAuK6m.js";import"./SearchLg-C9MBYrXH.js";import"./Stars02-sR281nUk.js";import"./FilterLines-CEBhmChB.js";import"./alert-dialog-wgrcUQ0O.js";import"./required-auth-layout-CEAeU4UY.js";import"./use-org-sso-DGL7haeQ.js";import"./task-row-DzSs63v5.js";import"./task-status-CNEAWeje.js";import"./Circle-umqkxNwx.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./agent-capabilities-Cpju5Yfe.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DGNqtPoP.js";import"./use-registry-connections-HQM1hA3o.js";import"./use-connection-BLVjIktc.js";import"./useInfiniteQuery-DEG0qlSd.js";import"./use-infinite-scroll-1VhU5Q3H.js";import"./extract-connection-data-Dq7vx8cX.js";import"./card-CCFrbS6S.js";import"./collection-search-BHb176G9.js";import"./SearchMd-Dhz0UROc.js";import"./collection-tabs-CCdUJRcj.js";import"./badge-B5li3mFX.js";import"./drawer-BGO4iAk0.js";import"./use-mobile-Cqur1PpI.js";import"./form-TSiFK-dI.js";import"./label-CWqrShVu.js";import"./select-DdHVdWXn.js";import"./Check-BqH5cjqe.js";import"./textarea-B3Rf9sP3.js";import"./Star01-twQgP5oO.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-clock-tick-B6ygxook.js";import"./connect-desktop-dialog-CRhRTOUc.js";import"./use-status-sounds-DEhedUWx.js";import"./question-004-sINsf4GQ.js";import"./empty-state-BUKBmmAV.js";import"./toolbar-CVjg3TEd.js";import"./index-Btxmdruq.js";import"./Palette-DHyTdFqR.js";import"./Stars01-C27kMlCK.js";import"./Upload01-m0ny4YmQ.js";import"./skeleton-Bl9k4gft.js";import"./file-type-icon-DIgcp2MN.js";import"./use-debounced-value-DxBLMeqg.js";import"./DotsVertical-DoxN78H8.js";import"./Key01-CwgjH_um.js";import"./X-DRR7RtBP.js";import"./popover-DlszYF1R.js";import"./LinkExternal01-DBFEHO3t.js";import"./index-9kwnfSCp.js";import"./LayoutLeft-CKcHwaHf.js";import"./Monitor01-lxPxQ2fk.js";import"./use-mcp-tools-BTYjbm6L.js";import"./types-B2Xs3OM7.js";import"./use-capability-C9whYnsG.js";import"./tabs-DRqPX6Mz.js";import"./tools-list-Dzc5vr-A.js";import"./switch-CuT_exNr.js";import"./Play-TOCBGzP9.js";import"./use-debounced-autosave-D34fr9f_.js";import"./index-BZQALusN.js";import"./sidebar-BJwboMe2.js";import"./sheet-DSSfro03.js";import"./checkbox-D2NBps_s.js";import"./search-input-DccF25qw.js";import"./use-mcp-prompts-5W77PpYc.js";import"./github-repo-picker-B3tomRAJ.js";import"./use-navigate-to-agent-CaUSC1CF.js";import"./github-installations-DzN1UQ4x.js";import"./Users01-e9Wb8IJU.js";import"./use-secrets-D-GN3cJh.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-CwCDO4L5.js";import"./command-CGbsZOaN.js";import"./index-BlJ4j0DM.js";import"./ZapSquare-Ch518nCD.js";import"./SwitchHorizontal01-Bu9ipsE_.js";import"./calendar-C0u4vRHU.js";import"./List-s8AZWxpk.js";import"./use-file-configs-Td4k8wTj.js";import"./monaco-editor-xlUuBDU4.js";import"./select-model-C49KT9p5.js";import"./decopilot--vqccpDb.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-eWkjB3kv.js";import"./ArrowUpRight-B1XPsNPZ.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"./Globe04-6xG6GU2e.js";import"./HardDrive-CDBenwE2.js";import"./Sun-DTFx5jn8.js";import"./Shield01-BrK-9cDf.js";import"./use-copy-_bA4U2MU.js";import"./content-blocks-o63cs2vh.js";import"./toggle-group-BuLxG5r3.js";function Kr(m){return m.schema?.definitions??m.schema?.$defs??{}}function $r(m,e){const r=Kr(e),c=r[btoa(m)];if(!c)return;let d=typeof c.image=="string"?c.image:void 0;if(!d&&Array.isArray(c.allOf)){const h=c.allOf.find(S=>typeof S.$ref=="string")?.$ref;if(typeof h=="string"){const S=h.replace("#/definitions/",""),p=r[S];d=typeof p?.image=="string"?p.image:void 0}}if(d?.includes("{{{"))return d}function Or(m,e){if(!e)return;const r=xs(m);if(!r)return;const c=$r(r.resolveType,e);if(!c)return;const d=ys(c,r.data);if(d)return bs(d)}const Br="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Lr="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function $n(m){return Array.from({length:m},(e,r)=>({id:crypto.randomUUID(),index:r}))}function da(m){return m.map((e,r)=>({...e,index:r}))}function Fr(m,e){if(e===m.length)return m;if(e<m.length)return da(m.slice(0,e));const r=Array.from({length:e-m.length},(c,d)=>({id:crypto.randomUUID(),index:m.length+d}));return[...m,...r]}function ma(m){const e=He.c(20),{section:r,raw:c,meta:d}=m,h=r.isSavedBlock===!0,S=r.isMultivariate===!0;let p;e[0]!==d||e[1]!==c?(p=c&&d?Or(c,d):void 0,e[0]=d,e[1]=c,e[2]=p):p=e[2];const v=p;let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(br,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[3]=g):g=e[3];let b;e[4]!==v?(b=v&&n.jsx("img",{src:v,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[4]=v,e[5]=b):b=e[5];let C;e[6]!==S||e[7]!==h?(C=h?{color:ks}:S?{color:"oklch(0.65 0.15 160)"}:void 0,e[6]=S,e[7]=h,e[8]=C):C=e[8];let R;e[9]!==C?(R=n.jsx(ln,{className:"h-4 w-4 shrink-0",style:C}),e[9]=C,e[10]=R):R=e[10];const _=r.isHidden&&"line-through opacity-50";let k;e[11]!==_?(k=Be("min-w-0 flex-1 truncate text-sm font-medium",_),e[11]=_,e[12]=k):k=e[12];let o;e[13]!==r.label||e[14]!==k?(o=n.jsx("span",{className:k,children:r.label}),e[13]=r.label,e[14]=k,e[15]=o):o=e[15];let D;return e[16]!==b||e[17]!==R||e[18]!==o?(D=n.jsxs(n.Fragment,{children:[g,b,R,o]}),e[16]=b,e[17]=R,e[18]=o,e[19]=D):D=e[19],D}function fa(m,e){const r=m.isSavedBlock===!0,c=m.isMultivariate===!0;return Be("group flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":r?Br:c?"text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]":"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Ir(m){const e=He.c(64),{section:r,raw:c,meta:d,sortableId:h,selected:S,onSelect:p,onDelete:v,onDuplicate:g,onMakeReusable:b,onToggleHidden:C,onToggleLazy:R,onAddVariant:_,onDetach:k}=m,o=c?Hn(c.__resolveType??""):!1;let D;e[0]!==r?(D=_s(r),e[0]=r,e[1]=D):D=e[1];const l=D;let Y;e[2]!==h?(Y={id:h,animateLayoutChanges:Gr},e[2]=h,e[3]=Y):Y=e[3];const{attributes:H,listeners:K,setNodeRef:u,transform:P,isDragging:se}=aa(Y);let T;e[4]!==P?(T=sa.Transform.toString(P?{...P,x:0}:null),e[4]=P,e[5]=T):T=e[5];const pe=se?0:void 0;let N;e[6]!==T||e[7]!==pe?(N={transform:T,opacity:pe},e[6]=T,e[7]=pe,e[8]=N):N=e[8];const ce=N;let B;e[9]!==r?(B=js(r),e[9]=r,e[10]=B):B=e[10];const te=B,oe="button",Ce=0;let E;e[11]!==p?(E=$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),p())},e[11]=p,e[12]=E):E=e[12];const ue=se?"cursor-grabbing":"cursor-pointer";let ie;e[13]!==r||e[14]!==S||e[15]!==ue?(ie=Be("touch-none transition-colors",ue,fa(r,S)),e[13]=r,e[14]=S,e[15]=ue,e[16]=ie):ie=e[16];let je;e[17]!==d||e[18]!==c||e[19]!==r?(je=n.jsx(ma,{section:r,raw:c,meta:d}),e[17]=d,e[18]=c,e[19]=r,e[20]=je):je=e[20];const M=!r.isMultivariate&&n.jsxs(mt,{children:[n.jsx(ft,{asChild:!0,children:n.jsx(Ge,{type:"button",variant:"ghost",size:"icon","aria-label":o?"Disable async render":"Enable async render",className:Be("h-7 w-7 shrink-0",o?"":"opacity-0 group-hover:opacity-100"),onClick:$=>{$.stopPropagation(),R()},onPointerDown:Wr,children:n.jsx(kr,{className:Be("h-3.5 w-3.5",o&&"text-yellow-500")})})}),n.jsx(pt,{side:"bottom",children:o?"Disable async render":"Enable async render"})]});let Ae;e[21]!==C||e[22]!==r.isHidden||e[23]!==r.isMultivariate?(Ae=!r.isMultivariate&&n.jsxs(mt,{children:[n.jsx(ft,{asChild:!0,children:n.jsx(Ge,{type:"button",variant:"ghost",size:"icon","aria-label":r.isHidden?"Show section":"Hide section",className:Be("h-7 w-7 shrink-0",r.isHidden?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:$=>{$.stopPropagation(),C()},onPointerDown:Ur,children:r.isHidden?n.jsx(_r,{className:"h-3.5 w-3.5"}):n.jsx(jr,{className:"h-3.5 w-3.5"})})}),n.jsx(pt,{side:"bottom",children:r.isHidden?"Show section":"Hide section"})]}),e[21]=C,e[22]=r.isHidden,e[23]=r.isMultivariate,e[24]=Ae):Ae=e[24];let X;e[25]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Qn,{asChild:!0,children:n.jsx(Ge,{type:"button",variant:"ghost",size:"icon","aria-label":"Section actions",className:"h-7 w-7 shrink-0 opacity-0 group-hover:opacity-100",onClick:Hr,onPointerDown:zr,children:n.jsx(qn,{className:"h-3.5 w-3.5"})})}),e[25]=X):X=e[25];let Ne;e[26]!==g?(Ne=$=>{$.stopPropagation(),g()},e[26]=g,e[27]=Ne):Ne=e[27];let ve;e[28]===Symbol.for("react.memo_cache_sentinel")?(ve=n.jsx(Jn,{className:"h-4 w-4"}),e[28]=ve):ve=e[28];let re;e[29]!==Ne?(re=n.jsxs(it,{onClick:Ne,children:[ve,"Duplicate"]}),e[29]=Ne,e[30]=re):re=e[30];let G;e[31]!==l||e[32]!==_?(G=l&&n.jsxs(it,{className:ws,onClick:$=>{$.stopPropagation(),_()},children:[n.jsx(Wn,{className:"h-4 w-4"}),"Add variant"]}),e[31]=l,e[32]=_,e[33]=G):G=e[33];let q;e[34]!==te||e[35]!==b?(q=te&&n.jsxs(it,{className:Lr,onClick:$=>{$.stopPropagation(),b()},children:[n.jsx(ln,{className:"h-4 w-4"}),"Make reusable"]}),e[34]=te,e[35]=b,e[36]=q):q=e[36];let ne;e[37]!==k||e[38]!==r.isMultivariate||e[39]!==r.isSavedBlock?(ne=r.isSavedBlock===!0&&!r.isMultivariate&&n.jsxs(it,{onClick:$=>{$.stopPropagation(),k()},children:[n.jsx(ln,{className:"h-4 w-4"}),"Detach"]}),e[37]=k,e[38]=r.isMultivariate,e[39]=r.isSavedBlock,e[40]=ne):ne=e[40];let le;e[41]!==v?(le=$=>{$.stopPropagation(),v()},e[41]=v,e[42]=le):le=e[42];let ke;e[43]===Symbol.for("react.memo_cache_sentinel")?(ke=n.jsx(Yn,{className:"h-4 w-4"}),e[43]=ke):ke=e[43];let Se;e[44]!==le?(Se=n.jsxs(it,{className:"text-destructive focus:text-destructive",onClick:le,children:[ke,"Delete"]}),e[44]=le,e[45]=Se):Se=e[45];let de;e[46]!==re||e[47]!==G||e[48]!==q||e[49]!==ne||e[50]!==Se?(de=n.jsxs(Xn,{children:[X,n.jsxs(Zn,{align:"end",className:"w-44",children:[re,G,q,ne,Se]})]}),e[46]=re,e[47]=G,e[48]=q,e[49]=ne,e[50]=Se,e[51]=de):de=e[51];let be;return e[52]!==H||e[53]!==K||e[54]!==p||e[55]!==u||e[56]!==ce||e[57]!==ie||e[58]!==je||e[59]!==M||e[60]!==Ae||e[61]!==de||e[62]!==E?(be=n.jsxs("div",{ref:u,style:ce,...H,...K,role:oe,tabIndex:Ce,onClick:p,onKeyDown:E,className:ie,children:[je,M,Ae,de]}),e[52]=H,e[53]=K,e[54]=p,e[55]=u,e[56]=ce,e[57]=ie,e[58]=je,e[59]=M,e[60]=Ae,e[61]=de,e[62]=E,e[63]=be):be=e[63],be}function zr(m){return m.stopPropagation()}function Hr(m){return m.stopPropagation()}function Ur(m){return m.stopPropagation()}function Wr(m){return m.stopPropagation()}function Gr(){return!1}function qr(m){const e=He.c(90),{listKey:r,rawSections:c,sections:d,meta:h,selectedIndex:S,onSelect:p,onReorder:v,onDelete:g,onDuplicate:b,onMakeReusable:C,onToggleHidden:R,onToggleLazy:_,onAddVariant:k,onDetach:o,onAddSection:D,canAddSection:l}=m,Y=l===void 0?!0:l;let H;e[0]!==d.length?(H=()=>$n(d.length),e[0]=d.length,e[1]=H):H=e[1];const[K,u]=w.useState(H),[P,se]=w.useState(null),[T,pe]=w.useState(r),[N,ce]=w.useState(d.length),B=w.useRef(!1);T!==r?(pe(r),ce(d.length),u($n(d.length))):N!==d.length&&(ce(d.length),u(L=>Fr(L,d.length)));let te;e[2]===Symbol.for("react.memo_cache_sentinel")?(te={activationConstraint:{distance:8}},e[2]=te):te=e[2];let oe;e[3]===Symbol.for("react.memo_cache_sentinel")?(oe={coordinateGetter:ra},e[3]=oe):oe=e[3];const Ce=ea(It(na,te),It(ta,oe));let E;e[4]!==K?(E=K.map(Jr),e[4]=K,e[5]=E):E=e[5];const ue=E;let ie;e[6]===Symbol.for("react.memo_cache_sentinel")?(ie=L=>{se(String(L.active.id))},e[6]=ie):ie=e[6];const je=ie;let M;e[7]!==ue||e[8]!==v?(M=L=>{se(null);const{active:ae,over:Q}=L;if(!Q||ae.id===Q.id)return;const Ie=ue.indexOf(String(ae.id)),he=ue.indexOf(String(Q.id));Ie===-1||he===-1||(u(Qe=>da(Dt([...Qe],Ie,he))),B.current=!0,requestAnimationFrame(()=>{B.current=!1}),v?.(Ie,he))},e[7]=ue,e[8]=v,e[9]=M):M=e[9];const Ae=M;let X;e[10]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{se(null)},e[10]=X):X=e[10];const Ne=X;let ve,re,G,q,ne,le,ke,Se,de,be,$,Z,we,Ee,Ke;if(e[11]!==P||e[12]!==Y||e[13]!==K||e[14]!==ue||e[15]!==Ae||e[16]!==h||e[17]!==D||e[18]!==k||e[19]!==g||e[20]!==o||e[21]!==b||e[22]!==C||e[23]!==p||e[24]!==R||e[25]!==_||e[26]!==c||e[27]!==d||e[28]!==S||e[29]!==Ce){Ee=Symbol.for("react.early_return_sentinel");e:{const L=ae=>{B.current||p(ae)};if(e[45]!==P||e[46]!==Y||e[47]!==K||e[48]!==D||e[49]!==c||e[50]!==d){const ae=P?K.find(Q=>Q.id===P):null;if(q=ae!=null?d[ae.index]:null,G=ae!=null?c[ae.index]:void 0,K.length===0){let Q;e[54]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No sections in this page."}),e[54]=Q):Q=e[54];const Ie=!Y;let he;e[55]===Symbol.for("react.memo_cache_sentinel")?(he=n.jsx(cn,{size:14}),e[55]=he):he=e[55];let Qe;e[56]!==D||e[57]!==Ie?(Qe=n.jsxs("div",{className:"space-y-2",children:[Q,n.jsxs(Ge,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:Ie,onClick:D,children:[he,"Add section"]})]}),e[56]=D,e[57]=Ie,e[58]=Qe):Qe=e[58],Ee=Qe;break e}we=Be(ae&&"cursor-grabbing"),e[45]=P,e[46]=Y,e[47]=K,e[48]=D,e[49]=c,e[50]=d,e[51]=G,e[52]=q,e[53]=we}else G=e[51],q=e[52],we=e[53];re=oa,Se=Ce,de=ia,be=je,$=Ae,Z=Ne,ve=la,le=ue,ke=ca,Ke="space-y-1",ne=K.map(ae=>{const Q=d[ae.index];return Q?n.jsx(Ir,{sortableId:ae.id,section:Q,raw:c[ae.index],meta:h,selected:S===ae.index,onSelect:()=>L(ae.index),onDelete:()=>g(ae.index),onDuplicate:()=>b(ae.index),onMakeReusable:()=>C(ae.index),onToggleHidden:()=>R(ae.index),onToggleLazy:()=>_(ae.index),onAddVariant:()=>k(ae.index),onDetach:()=>o(ae.index)},ae.id):null})}e[11]=P,e[12]=Y,e[13]=K,e[14]=ue,e[15]=Ae,e[16]=h,e[17]=D,e[18]=k,e[19]=g,e[20]=o,e[21]=b,e[22]=C,e[23]=p,e[24]=R,e[25]=_,e[26]=c,e[27]=d,e[28]=S,e[29]=Ce,e[30]=ve,e[31]=re,e[32]=G,e[33]=q,e[34]=ne,e[35]=le,e[36]=ke,e[37]=Se,e[38]=de,e[39]=be,e[40]=$,e[41]=Z,e[42]=we,e[43]=Ee,e[44]=Ke}else ve=e[30],re=e[31],G=e[32],q=e[33],ne=e[34],le=e[35],ke=e[36],Se=e[37],de=e[38],be=e[39],$=e[40],Z=e[41],we=e[42],Ee=e[43],Ke=e[44];if(Ee!==Symbol.for("react.early_return_sentinel"))return Ee;let Le;e[59]!==ne||e[60]!==Ke?(Le=n.jsx("div",{className:Ke,children:ne}),e[59]=ne,e[60]=Ke,e[61]=Le):Le=e[61];let Pe;e[62]!==ve||e[63]!==le||e[64]!==ke||e[65]!==Le?(Pe=n.jsx(ve,{items:le,strategy:ke,children:Le}),e[62]=ve,e[63]=le,e[64]=ke,e[65]=Le,e[66]=Pe):Pe=e[66];let $e;e[67]!==G||e[68]!==q||e[69]!==h?($e=q?n.jsx("div",{className:Be("cursor-grabbing shadow-lg ring-1 ring-border/60",fa(q,!1)),children:n.jsx(ma,{section:q,raw:G,meta:h})}):null,e[67]=G,e[68]=q,e[69]=h,e[70]=$e):$e=e[70];let Fe;e[71]!==$e?(Fe=n.jsx(ua,{dropAnimation:null,children:$e}),e[71]=$e,e[72]=Fe):Fe=e[72];let Me;e[73]!==re||e[74]!==Se||e[75]!==de||e[76]!==be||e[77]!==$||e[78]!==Z||e[79]!==Pe||e[80]!==Fe?(Me=n.jsxs(re,{sensors:Se,collisionDetection:de,onDragStart:be,onDragEnd:$,onDragCancel:Z,children:[Pe,Fe]}),e[73]=re,e[74]=Se,e[75]=de,e[76]=be,e[77]=$,e[78]=Z,e[79]=Pe,e[80]=Fe,e[81]=Me):Me=e[81];const xe=!Y;let Re;e[82]===Symbol.for("react.memo_cache_sentinel")?(Re=n.jsx(cn,{size:14}),e[82]=Re):Re=e[82];let me;e[83]!==D||e[84]!==xe?(me=n.jsxs(Ge,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:xe,onClick:D,children:[Re,"Add section"]}),e[83]=D,e[84]=xe,e[85]=me):me=e[85];let ee;return e[86]!==we||e[87]!==Me||e[88]!==me?(ee=n.jsxs("div",{className:we,children:[Me,me]}),e[86]=we,e[87]=Me,e[88]=me,e[89]=ee):ee=e[89],ee}function Jr(m){return m.id}function On(m){const e=He.c(38),{open:r,initialName:c,autoLabel:d,isPending:h,onSubmit:S,onOpenChange:p}=m,v=h===void 0?!1:h,[g,b]=w.useState(c),[C,R]=w.useState(r);r!==C&&(R(r),r&&b(c));let _;e[0]!==v||e[1]!==p?(_=oe=>{!oe&&!v&&p(!1)},e[0]=v,e[1]=p,e[2]=_):_=e[2];const k=_;let o;e[3]!==v||e[4]!==g||e[5]!==S?(o=async oe=>{oe.preventDefault(),!v&&await S(g.trim())},e[3]=v,e[4]=g,e[5]=S,e[6]=o):o=e[6];const D=o;let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(pr,{children:"Rename variant"}),e[7]=l):l=e[7];const Y=d||"the rule";let H;e[8]!==Y?(H=n.jsxs(hr,{children:[l,n.jsxs(gr,{children:["Save this matcher as a global block with a custom label. Leave empty to inline the matcher again and fall back to"," ",n.jsx("span",{className:"font-medium",children:Y}),"."]})]}),e[8]=Y,e[9]=H):H=e[9];let K;e[10]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx("label",{htmlFor:"variant-rename-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[10]=K):K=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=oe=>b(oe.target.value),e[11]=u):u=e[11];let P;e[12]!==d||e[13]!==v||e[14]!==g?(P=n.jsxs("div",{className:"space-y-1.5 py-4",children:[K,n.jsx(yr,{id:"variant-rename-name",value:g,onChange:u,placeholder:d,autoFocus:!0,disabled:v})]}),e[12]=d,e[13]=v,e[14]=g,e[15]=P):P=e[15];let se;e[16]!==p?(se=()=>p(!1),e[16]=p,e[17]=se):se=e[17];let T;e[18]!==v||e[19]!==se?(T=n.jsx(Ge,{type:"button",variant:"outline",onClick:se,disabled:v,children:"Cancel"}),e[18]=v,e[19]=se,e[20]=T):T=e[20];let pe;e[21]!==v?(pe=v?n.jsxs(n.Fragment,{children:[n.jsx(zn,{size:14,className:"animate-spin"}),"Saving…"]}):"Save",e[21]=v,e[22]=pe):pe=e[22];let N;e[23]!==v||e[24]!==pe?(N=n.jsx(Ge,{type:"submit",disabled:v,children:pe}),e[23]=v,e[24]=pe,e[25]=N):N=e[25];let ce;e[26]!==T||e[27]!==N?(ce=n.jsxs(vr,{children:[T,N]}),e[26]=T,e[27]=N,e[28]=ce):ce=e[28];let B;e[29]!==D||e[30]!==ce||e[31]!==H||e[32]!==P?(B=n.jsx(Sr,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:D,children:[H,P,ce]})}),e[29]=D,e[30]=ce,e[31]=H,e[32]=P,e[33]=B):B=e[33];let te;return e[34]!==k||e[35]!==r||e[36]!==B?(te=n.jsx(xr,{open:r,onOpenChange:k,children:B}),e[34]=k,e[35]=r,e[36]=B,e[37]=te):te=e[37],te}const Yr="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]",pa="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.2)]";function ha(m){const e=He.c(5),{rule:r,matchers:c}=m,d=r?.__resolveType??"";let h;if(e[0]!==c||e[1]!==d){const g=c.find(b=>b.resolveType===d)?.iconName??Rs(d);h=ur(g),e[0]=c,e[1]=d,e[2]=h}else h=e[2];const S=h;if(!S)return null;let p;return e[3]!==S?(p=n.jsx(S,{size:14,className:"shrink-0"}),e[3]=S,e[4]=p):p=e[4],p}function Bn(m){return m.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
2
|
-
`)}function on(m){return m.map((e,r)=>({id:crypto.randomUUID(),index:r,variant:e}))}function Qr(m){return m.map((e,r)=>({...e,index:r}))}function ga(m){const e=He.c(16),{label:r,effectiveRule:c,matchers:d,canDelete:h,dragging:S,onRename:p,onDuplicate:v,onDelete:g}=m;let b;e[0]!==c||e[1]!==d?(b=n.jsx(ha,{rule:c,matchers:d}),e[0]=c,e[1]=d,e[2]=b):b=e[2];let C;e[3]!==r?(C=n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:r}),e[3]=r,e[4]=C):C=e[4];let R;e[5]!==h||e[6]!==S||e[7]!==r||e[8]!==g||e[9]!==v||e[10]!==p?(R=!S&&n.jsxs(Xn,{children:[n.jsx(Qn,{asChild:!0,children:n.jsx(Ge,{type:"button",variant:"ghost",size:"icon","aria-label":`Actions for ${r}`,className:"size-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100",onClick:Zr,onPointerDown:Xr,children:n.jsx(qn,{size:14})})}),n.jsxs(Zn,{align:"end",className:"w-36",children:[n.jsxs(it,{onClick:k=>{k.stopPropagation(),p?.()},children:[n.jsx(Mr,{size:14}),"Rename"]}),n.jsxs(it,{onClick:k=>{k.stopPropagation(),v?.()},children:[n.jsx(Jn,{size:14}),"Duplicate"]}),n.jsx(wr,{}),n.jsxs(it,{variant:"destructive",disabled:!h,onClick:k=>{k.stopPropagation(),g?.()},children:[n.jsx(Yn,{size:14}),"Delete"]})]})]}),e[5]=h,e[6]=S,e[7]=r,e[8]=g,e[9]=v,e[10]=p,e[11]=R):R=e[11];let _;return e[12]!==b||e[13]!==C||e[14]!==R?(_=n.jsxs(n.Fragment,{children:[b,C,R]}),e[12]=b,e[13]=C,e[14]=R,e[15]=_):_=e[15],_}function Xr(m){return m.stopPropagation()}function Zr(m){return m.stopPropagation()}function eo(m){const e=He.c(33),{entry:r,sortableId:c,isActive:d,canDelete:h,decofile:S,meta:p,matchers:v,onSelect:g,onRename:b,onDuplicate:C,onDelete:R}=m;let _;e[0]!==c?(_={id:c,animateLayoutChanges:to},e[0]=c,e[1]=_):_=e[1];const{attributes:k,listeners:o,setNodeRef:D,transform:l,isDragging:Y}=aa(_);let H;e[2]!==l?(H=sa.Transform.toString(l?{...l,x:0}:null),e[2]=l,e[3]=H):H=e[3];const K=Y?0:void 0;let u;e[4]!==H||e[5]!==K?(u={transform:H,opacity:K},e[4]=H,e[5]=K,e[6]=u):u=e[6];const P=u,se=p??void 0;let T;e[7]!==S||e[8]!==r.variant.rule||e[9]!==se?(T=Rt(r.variant.rule,S,se),e[7]=S,e[8]=r.variant.rule,e[9]=se,e[10]=T):T=e[10];const pe=T;let N;e[11]!==g?(N=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),g())},e[11]=g,e[12]=N):N=e[12];const ce=Y?"cursor-grabbing":"cursor-pointer active:cursor-grabbing",B=d?pa:Yr;let te;e[13]!==ce||e[14]!==B?(te=Be("group flex select-none items-center gap-2 rounded-md px-2 py-2.5 transition-colors touch-none",ce,B),e[13]=ce,e[14]=B,e[15]=te):te=e[15];let oe;e[16]!==h||e[17]!==pe||e[18]!==r.variant.label||e[19]!==v||e[20]!==R||e[21]!==C||e[22]!==b?(oe=n.jsx(ga,{label:r.variant.label,effectiveRule:pe,matchers:v,canDelete:h,onRename:b,onDuplicate:C,onDelete:R}),e[16]=h,e[17]=pe,e[18]=r.variant.label,e[19]=v,e[20]=R,e[21]=C,e[22]=b,e[23]=oe):oe=e[23];let Ce;return e[24]!==k||e[25]!==o||e[26]!==g||e[27]!==D||e[28]!==P||e[29]!==te||e[30]!==oe||e[31]!==N?(Ce=n.jsx("div",{ref:D,style:P,...k,...o,onClick:g,onKeyDown:N,className:te,children:oe}),e[24]=k,e[25]=o,e[26]=g,e[27]=D,e[28]=P,e[29]=te,e[30]=oe,e[31]=N,e[32]=Ce):Ce=e[32],Ce}function to(){return!1}function no(m){const e=He.c(9),{variant:r,decofile:c,meta:d,matchers:h}=m,S=d??void 0;let p;e[0]!==c||e[1]!==S||e[2]!==r.rule?(p=Rt(r.rule,c,S),e[0]=c,e[1]=S,e[2]=r.rule,e[3]=p):p=e[3];const v=p;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=Be("flex items-center gap-2 rounded-md px-2 py-2.5 shadow-lg ring-1 ring-border/60 cursor-grabbing",pa),e[4]=g):g=e[4];let b;return e[5]!==v||e[6]!==h||e[7]!==r.label?(b=n.jsx("div",{className:g,children:n.jsx(ga,{label:r.label,effectiveRule:v,matchers:h,canDelete:!1,dragging:!0})}),e[5]=v,e[6]=h,e[7]=r.label,e[8]=b):b=e[8],b}function ao(m){const e=He.c(77),{listKey:r,variants:c,activeIndex:d,decofile:h,meta:S,matchers:p,onSelect:v,onReorder:g,onRename:b,onDuplicate:C,onDelete:R,onAdd:_}=m;let k;e[0]!==c?(k=()=>on(c),e[0]=c,e[1]=k):k=e[1];const[o,D]=w.useState(k),[l,Y]=w.useState(null),[H,K]=w.useState(r),[u,P]=w.useState(c.length);let se;e[2]!==c?(se=()=>Bn(c),e[2]=c,e[3]=se):se=e[3];const[T,pe]=w.useState(se),N=w.useRef(!1),ce=Bn(c);H!==r?(K(r),P(c.length),pe(ce),D(on(c))):u!==c.length?(P(c.length),pe(ce),D(on(c))):T!==ce&&(pe(ce),D(Me=>c.map((xe,Re)=>({id:Me[Re]?.id??crypto.randomUUID(),index:Re,variant:xe}))));let B;e[4]===Symbol.for("react.memo_cache_sentinel")?(B={activationConstraint:{distance:8}},e[4]=B):B=e[4];let te;e[5]===Symbol.for("react.memo_cache_sentinel")?(te={coordinateGetter:ra},e[5]=te):te=e[5];const oe=ea(It(na,B),It(ta,te));let Ce;e[6]!==o?(Ce=o.map(so),e[6]=o,e[7]=Ce):Ce=e[7];const E=Ce,ue=c.length>1;let ie;e[8]!==o?(ie=Me=>{const xe=String(Me.active.id);Y(o.find(Re=>Re.id===xe)??null)},e[8]=o,e[9]=ie):ie=e[9];const je=ie;let M;e[10]!==E||e[11]!==g?(M=Me=>{Y(null);const{active:xe,over:Re}=Me;if(!Re||xe.id===Re.id)return;const me=E.indexOf(String(xe.id)),ee=E.indexOf(String(Re.id));me===-1||ee===-1||(D(L=>Qr(Dt([...L],me,ee))),N.current=!0,requestAnimationFrame(()=>{N.current=!1}),g(me,ee))},e[10]=E,e[11]=g,e[12]=M):M=e[12];const Ae=M;let X;e[13]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{Y(null)},e[13]=X):X=e[13];const Ne=X;let ve,re,G,q,ne,le,ke,Se,de,be,$,Z,we;if(e[14]!==d||e[15]!==ue||e[16]!==h||e[17]!==o||e[18]!==E||e[19]!==Ae||e[20]!==je||e[21]!==p||e[22]!==S||e[23]!==_||e[24]!==R||e[25]!==C||e[26]!==b||e[27]!==v||e[28]!==oe){const Me=L=>{N.current||v(L)};$="space-y-1 border-b p-2";let xe;e[42]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variants"}),e[42]=xe):xe=e[42];let Re;e[43]===Symbol.for("react.memo_cache_sentinel")?(Re=n.jsx(cn,{size:14}),e[43]=Re):Re=e[43];let me;e[44]!==_?(me=n.jsx(ft,{asChild:!0,children:n.jsx(Ge,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-6",onClick:_,children:Re})}),e[44]=_,e[45]=me):me=e[45];let ee;e[46]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(pt,{children:"Add variant"}),e[46]=ee):ee=e[46],e[47]!==me?(Z=n.jsxs("div",{className:"flex items-center justify-between",children:[xe,n.jsxs(mt,{children:[me,ee]})]}),e[47]=me,e[48]=Z):Z=e[48],re=oa,le=oe,ke=ia,Se=je,de=Ae,be=Ne,ve=la,q=E,ne=ca,we="space-y-0.5",G=o.map(L=>n.jsx(eo,{sortableId:L.id,entry:L,isActive:L.index===d,canDelete:ue,decofile:h,meta:S,matchers:p,onSelect:()=>Me(L.index),onRename:()=>b(L.index),onDuplicate:()=>C(L.index),onDelete:()=>R(L.index)},L.id)),e[14]=d,e[15]=ue,e[16]=h,e[17]=o,e[18]=E,e[19]=Ae,e[20]=je,e[21]=p,e[22]=S,e[23]=_,e[24]=R,e[25]=C,e[26]=b,e[27]=v,e[28]=oe,e[29]=ve,e[30]=re,e[31]=G,e[32]=q,e[33]=ne,e[34]=le,e[35]=ke,e[36]=Se,e[37]=de,e[38]=be,e[39]=$,e[40]=Z,e[41]=we}else ve=e[29],re=e[30],G=e[31],q=e[32],ne=e[33],le=e[34],ke=e[35],Se=e[36],de=e[37],be=e[38],$=e[39],Z=e[40],we=e[41];let Ee;e[49]!==G||e[50]!==we?(Ee=n.jsx("div",{className:we,children:G}),e[49]=G,e[50]=we,e[51]=Ee):Ee=e[51];let Ke;e[52]!==ve||e[53]!==q||e[54]!==ne||e[55]!==Ee?(Ke=n.jsx(ve,{items:q,strategy:ne,children:Ee}),e[52]=ve,e[53]=q,e[54]=ne,e[55]=Ee,e[56]=Ke):Ke=e[56];let Le;e[57]!==l||e[58]!==h||e[59]!==p||e[60]!==S?(Le=l?n.jsx(no,{variant:l.variant,decofile:h,meta:S,matchers:p}):null,e[57]=l,e[58]=h,e[59]=p,e[60]=S,e[61]=Le):Le=e[61];let Pe;e[62]!==Le?(Pe=n.jsx(ua,{dropAnimation:null,children:Le}),e[62]=Le,e[63]=Pe):Pe=e[63];let $e;e[64]!==re||e[65]!==le||e[66]!==ke||e[67]!==Se||e[68]!==de||e[69]!==be||e[70]!==Ke||e[71]!==Pe?($e=n.jsxs(re,{sensors:le,collisionDetection:ke,onDragStart:Se,onDragEnd:de,onDragCancel:be,children:[Ke,Pe]}),e[64]=re,e[65]=le,e[66]=ke,e[67]=Se,e[68]=de,e[69]=be,e[70]=Ke,e[71]=Pe,e[72]=$e):$e=e[72];let Fe;return e[73]!==$||e[74]!==Z||e[75]!==$e?(Fe=n.jsxs("div",{className:$,children:[Z,$e]}),e[73]=$,e[74]=Z,e[75]=$e,e[76]=Fe):Fe=e[76],Fe}function so(m){return m.id}function Ln(m){const e=He.c(15),{schema:r,value:c,onChange:d,meta:h,decofile:S,onSaveReferencedBlock:p,sandbox:v}=m;let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[b,C]=w.useState(g);let R;e[1]!==b?(R=b.length>0&&n.jsxs("nav",{"aria-label":"Variant rule breadcrumb",className:"flex min-w-0 items-center gap-1 overflow-hidden text-xs",children:[n.jsx("button",{type:"button",onClick:()=>C([]),className:"flex shrink-0 items-center gap-0.5 rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",title:"Back to rule",children:n.jsx(lr,{className:"size-3.5"})}),b.map((o,D)=>{const l=D===b.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[D>0&&n.jsx(Gn,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>C(b.slice(0,D+1)),title:o,className:Be("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",l?"font-medium text-foreground":"text-muted-foreground"),children:o})]},`${o}-${D}`)})]}),e[1]=b,e[2]=R):R=e[2];let _;e[3]!==b||e[4]!==S||e[5]!==h||e[6]!==d||e[7]!==p||e[8]!==v||e[9]!==r||e[10]!==c?(_=n.jsx(Un,{schema:r,value:c,onChange:d,basePath:"",breadcrumbPath:b,onBreadcrumbChange:C,meta:h,decofile:S,onSaveReferencedBlock:p,sandbox:v}),e[3]=b,e[4]=S,e[5]=h,e[6]=d,e[7]=p,e[8]=v,e[9]=r,e[10]=c,e[11]=_):_=e[11];let k;return e[12]!==R||e[13]!==_?(k=n.jsxs("div",{className:"space-y-2",children:[R,_]}),e[12]=R,e[13]=_,e[14]=k):k=e[14],k}function Fn(m){const e=He.c(21),{activeSchema:r,formValue:c,formResetKey:d,onFormChange:h,onBreadcrumbChange:S,breadcrumbPath:p,emptyMessage:v,beforeForm:g,seoResolveType:b,siteDefaultSeo:C,meta:R,decofile:_,onSaveReferencedBlock:k,sandbox:o}=m;let D;e[0]!==p?(D=p===void 0?[]:p,e[0]=p,e[1]=D):D=e[1];const l=D;let Y;e[2]!==r||e[3]!==l||e[4]!==_||e[5]!==d||e[6]!==c||e[7]!==R||e[8]!==S||e[9]!==h||e[10]!==k||e[11]!==o||e[12]!==b||e[13]!==C?(Y=r&&c?b?n.jsx(Ar,{schema:r,resolveType:b,value:c,formResetKey:d,onChange:h,onBreadcrumbChange:S,siteDefaultSeo:C}):n.jsx(Un,{schema:r,value:c,onChange:h,basePath:"",breadcrumbPath:l,onBreadcrumbChange:S,meta:R,decofile:_,onSaveReferencedBlock:k,sandbox:o},d):null,e[2]=r,e[3]=l,e[4]=_,e[5]=d,e[6]=c,e[7]=R,e[8]=S,e[9]=h,e[10]=k,e[11]=o,e[12]=b,e[13]=C,e[14]=Y):Y=e[14];const H=Y;let K;e[15]!==v||e[16]!==H?(K=H??n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:v}),e[15]=v,e[16]=H,e[17]=K):K=e[17];let u;return e[18]!==g||e[19]!==K?(u=n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsxs("div",{className:"mx-auto max-w-2xl",children:[g,K]})}),e[18]=g,e[19]=K,e[20]=u):u=e[20],u}const ro="text-[oklch(0.45_0.15_160)] bg-[oklch(0.65_0.15_160/0.18)] dark:text-[oklch(0.78_0.15_160)] dark:bg-[oklch(0.65_0.15_160/0.22)]";function oo(m,e){return Is(m,e,et)}function io(m){const e=He.c(13),{pageKey:r,initialName:c,initialPath:d,onFieldChange:h}=m,[S,p]=w.useState(c),[v,g]=w.useState(d),[b,C]=w.useState(r);b!==r&&(C(r),p(c),g(d));let R;e[0]!==h?(R=l=>{p(l.target.value),h("name",l.target.value)},e[0]=h,e[1]=R):R=e[1];let _;e[2]!==S||e[3]!==R?(_=n.jsx("input",{type:"text",value:S,onChange:R,className:"w-full bg-transparent text-sm font-semibold truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"Page name"}),e[2]=S,e[3]=R,e[4]=_):_=e[4];let k;e[5]!==h?(k=l=>{g(l.target.value),h("path",l.target.value)},e[5]=h,e[6]=k):k=e[6];let o;e[7]!==v||e[8]!==k?(o=n.jsx("input",{type:"text",value:v,onChange:k,className:"w-full bg-transparent text-xs text-muted-foreground truncate outline-none border-none p-0 focus:ring-0 placeholder:text-muted-foreground",placeholder:"/path"}),e[7]=v,e[8]=k,e[9]=o):o=e[9];let D;return e[10]!==_||e[11]!==o?(D=n.jsxs("div",{className:"space-y-1",children:[_,o]}),e[10]=_,e[11]=o,e[12]=D):D=e[12],D}function In(m){const e=He.c(6),{onClick:r}=m;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Wn,{size:14}),e[0]=c):c=e[0];let d;e[1]!==r?(d=n.jsx(ft,{asChild:!0,children:n.jsx(Ge,{type:"button",variant:"ghost",size:"icon","aria-label":"Add variant",className:"size-7 shrink-0 text-[oklch(0.65_0.15_160)]",onClick:r,children:c})}),e[1]=r,e[2]=d):d=e[2];let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(pt,{side:"bottom",children:"Add variant"}),e[3]=h):h=e[3];let S;return e[4]!==d?(S=n.jsxs(mt,{children:[d,h]}),e[4]=d,e[5]=S):S=e[5],S}function Zl({orgSlug:m,virtualMcpId:e,branch:r,previewReady:c=!0,previewUrl:d,currentPath:h,activePageBlockKey:S=null,activeGlobalBlockKey:p=null,externalSelectedIndex:v,onSaved:g,initialEditSeo:b=!1,onExitSeo:C,onViewJsonFile:R,onVariantPreviewOverride:_}){const k=c?{orgSlug:m,virtualMcpId:e,branch:r,previewUrl:d}:null,{data:o,isLoading:D}=Ds(k),{data:l,isLoading:Y}=Ns(k),H=Vs(),K=H?.entity?.id===e?H.entity.metadata?.siteSlug??null:null,[u,P]=w.useState(null),[se,T]=w.useState(null),[pe,N]=w.useState(null),[ce,B]=w.useState(0),[te,oe]=w.useState(void 0),[Ce,E]=w.useState(null),[ue,ie]=w.useState(null),[je,M]=w.useState([]),[Ae,X]=w.useState(0),[Ne,ve]=w.useState(null),[re,G]=w.useState(null),[q,ne]=w.useState(null),[le,ke]=w.useState(!0),[Se,de]=w.useState(!1),[be,$]=w.useState(!1),[Z,we]=w.useState(b),[Ee,Ke]=w.useState(b);b&&!Ee&&(Ke(!0),we(!0),P(null),T(null),N(null),M([])),!b&&Ee&&Ke(!1);const[Le,Pe]=w.useState(null),[$e,Fe]=w.useState(void 0),[Me,xe]=w.useState([]),[Re,me]=w.useState(0),[ee,L]=w.useState(0),[ae,Q]=w.useState(null),[Ie,he]=w.useState(null),[Qe,un]=w.useState(null),va=vs(),Sa=`${m}/${e}/${r}`,zt=Cs({orgSlug:m,virtualMcpId:e,branch:r}),[xa,ya]=w.useState(h),[ba,_a]=w.useState(S),[ja,ka]=w.useState(p);(xa!==h||ba!==S||ja!==p)&&(queueMicrotask(()=>zt.flush()),ya(h),_a(S),ka(p),P(null),T(null),N(null),B(0),E(null),ie(null),L(0),Q(null),he(null),M([]),X(t=>t+1),we(!1),Pe(null),Fe(void 0),xe([]),me(t=>t+1));const ye=Ps({orgSlug:m,virtualMcpId:e,branch:r}),Nt=Qs((t,a)=>{ye.mutate({blockKey:t,data:a},{onSuccess:()=>g?.(),onError:s=>W.error(`Save failed: ${s.message}`)})}),Ht=Ts({orgSlug:m,virtualMcpId:e,branch:r}),[bt,Vt]=w.useState(!1),Ut=w.useRef(null),ht=w.useRef(null),gt=w.useRef(null),Wt=w.useRef({}),qe=w.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null});if(!c||D||Y)return n.jsx("div",{className:"h-full w-full flex items-center justify-center",children:n.jsx(zn,{size:20,className:"animate-spin text-muted-foreground"})});if(!o||!l)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Could not load site data."});const wa=As(o),_e=!!p,ze=_e?null:Ms(wa,h,S),j=_e?p:ze?.key??null,Gt=_e&&p?o[p]:void 0,dn=_e&&p&&Gt?Es(p,Gt):_e&&p?p:"",Ct=!_e&&j&&o[j]?o[j]:null,qt=Z&&o&&l&&j&&ze?Kn(o,{kind:"page",pageKey:j,pageName:String(ze.name??""),path:String(ze.path??"")},l):null,Ra=Z?Ct?.seo:void 0,Jt=$e!==void 0?$e:Ra,Da=Z?Rr(Jt):void 0,Na=qt?.seoTypeOptions??[],Va=Z&&l?Dr(l):"",mn=Le??Da??{},Yt=Z&&qt?Nr(mn,qt):null,Ca=Z&&Yt&&Vr(Jt)?$t(Yt,l):null,Pa=Z?Cr(o,l)?.seoData:void 0,Oe=_e?[{label:"Default",sections:[{__resolveType:p}]}]:oo(Ct?.sections,o??{}),Pt=Oe.length>1,Ve=Math.min(ce,Oe.length-1),tt=Oe[Ve],I=tt?.sections??[],Te=Ot(I,o),fn=!_e&&Ks(Ct?.sections);if(_e&&p&&Qe!==p){un(p);const t=I[0],a=Te[0];if(t&&a){P(0),L(0),M([]);const s=ut(t,a,o);s&&(T(s.data),N(s.resolveType),he(null),Q(null))}}!_e&&Qe!==null&&un(null),qe.current={rawSections:I,parsedSections:Te,decofile:o??{},activePageKey:j,pageVariants:Oe,variantIndex:Ve,sectionVariantIndex:ee,selectedSectionIndex:u};const Ta=()=>({multivariate:fn,index:Ve,variants:Oe.map(t=>({rule:t.rule}))}),pn=(t,a)=>{if(!_)return;if(!j||!fn||t.length<=1){_(null);return}const s=Mn(j,{multivariate:!0,index:a,variants:t},o,l);_(s.length>0?s:null)},vt=(t,a,s)=>{if(!_)return;if(!j){_(null);return}const i=Ta(),f=Mn(j,i,o,l);if(!t||a<0){_(f.length>0?f:null);return}const y=nr({pageKey:j,page:i,sectionIndex:a,sectionLazy:Te[a]?.isLazy??!1,mvObj:t,selectedVariantIndex:s,decofile:o,meta:l}),x=[...f,...y];_(x.length>0?x:null)},nt=(t,a,s,i=u??-1,f=!1)=>{const y=Ye(t,a);if(!y){T(null),N(null),he(null),Q(null),f&&vt(null,i,s);return}const V=Vn(y,et)[s];if(!V){T(null),N(null),he(null),Q(null),f&&vt(null,i,s);return}const J=zs(V.value,o);T(J?.data??null),N(J?.resolveType??null);const{resolveType:A,formValue:O}=jt(V.rule,o,l??void 0);he(A),Q(O),f&&vt(y,i,s)};if(v!==void 0&&v!==te&&(oe(v??null),typeof v=="number")){const t=I[v],a=Te[v];if(t&&a)if(P(v),L(0),M([]),X(s=>s+1),a.isMultivariate)nt(t,a,0,v);else{const s=ut(t,a,o);s?(T(s.data),N(s.resolveType)):(T(null),N(null)),he(null),Q(null)}}const Tt={orgSlug:m,virtualMcpId:e,branch:r,previewUrl:d??void 0,siteSlug:K},Qt=pe&&l?$t(pe,l):null,Ue=(t,a)=>{if(!j)return;const s=wt(o,j,t,Ve,Oe);ye.mutate({blockKey:j,data:s},{onSuccess:()=>a?.onSuccess?.()??g?.(),onError:i=>W.error(`Save failed: ${i.message}`)})},St=()=>{P(null),T(null),N(null),L(0),Q(null),he(null),M([]),X(t=>t+1)},Aa=(t,a)=>{Ut.current&&clearTimeout(Ut.current);const s=qe.current.sectionVariantIndex;Ut.current=setTimeout(()=>{const{rawSections:i,parsedSections:f,decofile:y,activePageKey:x,pageVariants:V,variantIndex:J}=qe.current,A=i[a];if(!A)return;const O=f[a];if(!O)return;if(O.isSavedBlock){const z=O.isLazy?A.section?.__resolveType??A.__resolveType:A.__resolveType;ye.mutate({blockKey:z,data:t},{onSuccess:()=>g?.(),onError:U=>W.error(`Save failed: ${U.message}`)});return}if(!x)return;const F={...y[x]},ge=[...i];if(O.isMultivariate){const z=Ye(A,O);if(!z||!x)return;const U=sr(z,s,t);ge[a]=dt(A,O,U)}else if(O.isHidden){const z=Hn(A.__resolveType),U=z?{...A.section}:{...A},De=Array.isArray(U.variants)?[...U.variants]:[];De[0]&&(De[0]={...De[0],value:t}),U.variants=De,z?ge[a]={...A,section:U}:ge[a]=U}else O.isLazy?ge[a]={...A,section:t}:ge[a]=t;if(V.length>1){const z=F.sections,U=[...z?.variants??[]];U[J]&&(U[J]={...U[J],value:ge}),F.sections={...z,variants:U}}else F.sections=ge;ye.mutate({blockKey:x,data:F},{onSuccess:()=>g?.(),onError:z=>W.error(`Save failed: ${z.message}`)})},rn)},Ma=t=>{P(t),L(0),M([]),X(f=>f+1);const a=I[t],s=Te[t];if(!a||!s)return;if(s.isMultivariate){nt(a,s,0,t);return}const i=ut(a,s,o);if(!i){T(null),N(null),he(null),Q(null),vt(null,t,0);return}T(i.data),N(i.resolveType),he(null),Q(null),vt(null,t,0)},hn=t=>{const a=t;T(a),u!==null&&Aa(a,u)},Xt=t=>{if(!j||!o||!l||!ze)return;const a={kind:"page",pageKey:j,pageName:String(ze.name??""),path:String(ze.path??"")},s=Kn(o,a,l);s&&zt.save(j,()=>{const i=va.getQueryData(Ss.decofile(Sa))?.[j];if(!i||typeof i!="object"||i===null||Array.isArray(i))return null;const f={...i,...Wt.current};return Wt.current={},t?.raw!==void 0?{...f,seo:t.raw}:t?.inner!==void 0?Tr(a,s,f,t.inner):f})},Ea=(t,a)=>{j&&(Wt.current[t]=a,Xt())},Ka=(t,a)=>{if(!j)return;const s=Dt([...I],t,a);u!==null&&(u===t?P(a):t<u&&a>=u?P(u-1):t>u&&a<=u&&P(u+1)),Ue(s)},$a=t=>{if(!j)return;const a=I.filter((s,i)=>i!==t);u===t?St():u!==null&&u>t&&P(u-1),Ue(a)},Oa=t=>{if(!j)return;const a=I[t];if(!a)return;const s=[...I];s.splice(t+1,0,tr(a)),u!==null&&u>t&&P(u+1),Ue(s)},Ba=t=>{if(!j)return;const a=I[t],s=Te[t];if(!a||!s||s.isMultivariate)return;const i=s.isHidden?Zs(a):er(a);if(!i)return;const f=[...I];f[t]=i,u===t&&St(),Ue(f)},La=t=>{if(!j)return;const a=I[t],s=Te[t];if(!a||!s||s.isMultivariate)return;const i=Xs(a);if(!i)return;const f=[...I];f[t]=i,u===t&&St(),Ue(f)},Fa=t=>{if(!j)return;const a=I[t],s=Te[t];if(!a||!s?.isSavedBlock)return;const i=ut(a,s,o);if(!i?.data)return;const{name:f,...y}=i.data,x=[...I];s.isLazy?x[t]={...a,section:y}:x[t]=y,u===t&&St(),Ue(x)},Ia=t=>{if(!j)return;const a=[...I,{__resolveType:t.resolveType}],s=a.length-1;Ue(a,{onSuccess:()=>{de(!1),P(s),L(0),M([]),X(x=>x+1);const i=a[s],f=Ot(a,o)[s];if(!i||!f)return;if(f.isMultivariate){nt(i,f,0);return}const y=ut(i,f,o);if(!y){T(null),N(null),he(null),Q(null);return}T(y.data),N(y.resolveType),he(null),Q(null)}})},za=t=>{if(u===null)return;const a=I[u],s=Te[u];!a||!s?.isMultivariate||(L(t),M([]),X(i=>i+1),nt(a,s,t,u,!0))},Ha=t=>{if(u===null||!j)return;const a=I[u],s=Te[u];if(!a||!s?.isMultivariate)return;const i=Ye(a,s);if(!i)return;const f=Js(i,t);if(!f){W.error("Cannot delete the only variant.");return}const y=[...I];y[u]=dt(a,s,f);const x=f.variants;let V=ee;t===ee?V=Math.min(t,x.length-1):t<ee&&(V=ee-1),L(V),M([]),X(J=>J+1),nt(y[u],s,V),Ue(y)},Ua=t=>{if(u===null||!j)return;const a=I[u],s=Te[u];if(!a||!s?.isMultivariate)return;const i=Ye(a,s);if(!i)return;const f=Ys(i,t),y=[...I];y[u]=dt(a,s,f);const x=t+1;L(x),M([]),X(V=>V+1),nt(y[u],s,x),Ue(y)},Wa=(t,a)=>{if(u===null||!j||t===a)return;const s=I[u],i=Te[u];if(!s||!i?.isMultivariate)return;const f=Ye(s,i);if(!f)return;const y=Gs(f,t,a),x=[...I];x[u]=dt(s,i,y);let V=ee;ee===t?V=a:t<ee&&a>=ee?V=ee-1:t>ee&&a<=ee&&(V=ee+1),L(V),nt(x[u],i,V),Ue(x)},Zt=t=>{const a=t??u;if(a===null||!j)return;const s=I[a],i=Te[a];if(!s||!i)return;const f=Hs(s,i);if(!f){W.error("This section cannot have variants.");return}const y=[...I];y[a]=f.section;const x=Ot(y,o)[a];if(!x?.isMultivariate){W.error("Could not add variant.");return}P(a),L(f.newVariantIndex),M([]),X(V=>V+1),nt(f.section,x,f.newVariantIndex,a),Ue(y)},Ga=()=>{if(u===null||!j)return;const t=I[u],a=Te[u];if(!t||!a?.isMultivariate)return;const s=Ye(t,a);if(!s)return;const i=qs(t,a,s);if(!i){W.error("Could not remove variants.");return}const f=[...I];f[u]=i;const y=Ot(f,o)[u];if(!y)return;L(0),he(null),Q(null),M([]),X(V=>V+1);const x=ut(i,y,o);x?(T(x.data),N(x.resolveType)):(T(null),N(null)),vt(null,u,0),Ue(f)},qa=async t=>{if(Ne===null||!j)return;const a=sn(t,o);if(a){W.error(a);return}const s=I[Ne],i=Te[Ne];if(!s||!i)return;const f=ut(s,i,o);if(!f){W.error("This section cannot be saved as global.");return}const y={...f.data,name:t};try{await ye.mutateAsync({blockKey:t,data:y});const x=[...I];x[Ne]={__resolveType:t},await ye.mutateAsync({blockKey:j,data:wt(o,j,x,Ve,Oe)}),u===Ne&&St(),ve(null),W.success(`Saved global block "${t}"`),g?.()}catch(x){W.error(x instanceof Error?x.message:"Failed to save global block")}},gn=tt?.rule;if(Pt&&u===null&&ue===null&&gn){const{resolveType:t,formValue:a}=jt(gn,o??{},l??void 0);ie(t),E(a)}const At=l?$s(l):[],vn=l&&o?Os(l,o):[],Ja=!_e&&!!(d&&l&&o),Sn=ue&&l?$t(ue,l):null,Mt=()=>{ht.current&&(clearTimeout(ht.current),ht.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null)},_t=async(t,a)=>{if(!(ar(a,t,l)>0))try{await Ht.mutateAsync({blockKey:t})}catch(s){W.error(s instanceof Error?s.message:"Could not delete matcher block")}},xn=t=>{ht.current&&clearTimeout(ht.current),ht.current=setTimeout(()=>{const{activePageKey:a,decofile:s,variantIndex:i}=qe.current;if(!a)return;const f={...s[a]},y={...f.sections},x=[...y.variants??[]],V=x[i],J=V?.rule;if(xt(J,s,l)){const A=J?.__resolveType??"",O=s[A],F=typeof O?.name=="string"?O.name:A,{__resolveType:ge,...z}=t;ye.mutate({blockKey:A,data:yt(ge??"",z,F)},{onSuccess:()=>g?.(),onError:U=>W.error(`Save failed: ${U.message}`)});return}V&&(x[i]={...V,rule:t}),f.sections={...y,variants:x},ye.mutate({blockKey:a,data:f},{onSuccess:()=>g?.(),onError:A=>W.error(`Save failed: ${A.message}`)})},rn)},Ya=t=>{ie(t);const a=t?{__resolveType:t}:{__resolveType:En};E({}),xn(a)},Qa=t=>{const a=t;E(a);const s=ue?{__resolveType:ue,...a}:{...a};xn(s)},Xa=async t=>{Mt();const{activePageKey:a,decofile:s,variantIndex:i}=qe.current;if(!a)return;const f=s[a],y=f?.sections;if(!y||typeof y!="object"||Array.isArray(y))return;const x=y;if(!Array.isArray(x.variants))return;const V=[...x.variants],J=V[i];if(!J)return;const A=kt(J.rule,s,l),O=Lt(t);V[i]={...J,rule:O};const F={...s,[a]:{...f,sections:{...x,variants:V}}},{resolveType:ge,formValue:z}=jt(O,F,l??void 0);ie(ge),E(z);try{await ye.mutateAsync({blockKey:a,data:F[a]}),A&&A!==t&&await _t(A,F),g?.()}catch(U){W.error(U instanceof Error?U.message:"Could not apply saved rule")}},yn=t=>{gt.current&&clearTimeout(gt.current);const{selectedSectionIndex:a,sectionVariantIndex:s}=qe.current;a!==null&&(gt.current=setTimeout(()=>{const{rawSections:i,parsedSections:f,decofile:y,activePageKey:x,pageVariants:V,variantIndex:J}=qe.current;if(!x)return;const A=i[a],O=f[a];if(!A||!O?.isMultivariate)return;const F=Ye(A,O);if(!F)return;const z=(F.variants??[])[s]?.rule;if(xt(z,y,l)){const fe=z?.__resolveType??"",We=y[fe],Xe=typeof We?.name=="string"?We.name:fe,{__resolveType:rt,...Ze}=t;ye.mutate({blockKey:fe,data:yt(rt??"",Ze,Xe)},{onSuccess:()=>g?.(),onError:ot=>W.error(`Save failed: ${ot.message}`)});return}const U=Pn(F,s,t),De=[...i];De[a]=dt(A,O,U);const Je=wt(y,x,De,J,V);ye.mutate({blockKey:x,data:Je},{onSuccess:()=>g?.(),onError:fe=>W.error(`Save failed: ${fe.message}`)})},rn))},Za=t=>{he(t),Q({}),yn(t?{__resolveType:t}:{__resolveType:En})},es=t=>{const a=t;Q(a);const s=Ie?{__resolveType:Ie,...a}:{...a};yn(s)},ts=async t=>{Mt();const{selectedSectionIndex:a,sectionVariantIndex:s,rawSections:i,parsedSections:f,decofile:y,activePageKey:x,pageVariants:V,variantIndex:J}=qe.current;if(a===null||!x)return;const A=i[a],O=f[a];if(!A||!O?.isMultivariate)return;const F=Ye(A,O);if(!F)return;const ge=F.variants??[],z=kt(ge[s]?.rule,y,l),U=Lt(t),De=Pn(F,s,U),Je=[...i];Je[a]=dt(A,O,De);const fe=wt(y,x,Je,J,V),We={...y,[x]:fe},{resolveType:Xe,formValue:rt}=jt(U,We,l??void 0);he(Xe),Q(rt);try{await ye.mutateAsync({blockKey:x,data:fe}),z&&z!==t&&await _t(z,We),g?.()}catch(Ze){W.error(Ze instanceof Error?Ze.message:"Could not apply saved rule")}};if(!_e&&!ze)return n.jsxs("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:["No page found for ",h]});if(_e&&!Gt)return n.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:"Global block not found"});const at=u!==null?Te[u]??null:null,bn=u!==null?I[u]:null,_n=bn&&at?.isMultivariate?Ye(bn,at):null,lt=_n?Vn(_n,et):[],en=Math.min(ee,Math.max(lt.length-1,0)),Et=lt[en]??null,ct=at?.isMultivariate===!0,jn=u!==null&&at!==null,Kt=jn&&(ct||!!(Qt&&se)),ns=Kt&&!_e&&at?.isSavedBlock===!0,st=_e||ns,as=_e?dn:at?.label??"",kn=Ie&&l?$t(Ie,l):null,tn=Kt&&(!_e||je.length>0)?_e?[dn,...je]:[ze.name,at.label,...ct&&Et?[Et.label]:[],...je]:[],ss=Z&&ze?[ze.name,"SEO",...Me]:[],wn=Z?ss:st?tn.length>0?tn:[as]:tn,Rn=()=>{if(!j)return;const t=o[j],a=Us(t.sections,I);if(!a)return;const s=Ws(a);ye.mutate({blockKey:j,data:{...t,sections:a}},{onSuccess:()=>{B(s),P(null),T(null),N(null),M([]),E(null),ie(null)},onError:i=>W.error(`Save failed: ${i.message}`)})},nn=(t,a,s)=>{if(!j)return;const i=o[j],f=i.sections;if(!f||typeof f!="object"||Array.isArray(f))return;const y=f;if(!Array.isArray(y.variants))return;const x=t([...y.variants]);if(!x)return;const V=rr(y,x),J={...o,[j]:{...i,sections:V}};ye.mutate({blockKey:j,data:J[j]},{onSuccess:()=>{a?.(),s&&_t(s,J)},onError:A=>W.error(`Save failed: ${A.message}`)})},rs=t=>{G(null),B(t),P(null),T(null),N(null),M([]);const a=Oe[t]?.rule,{resolveType:s,formValue:i}=jt(a,o??{},l??void 0);ie(s),E(i),pn(Oe.map(f=>({rule:f.rule})),t)},os=(t,a)=>{if(t===a)return;let s=Ve;Ve===t?s=a:t<Ve&&a>=Ve?s=Ve-1:t>Ve&&a<=Ve&&(s=Ve+1),B(s);const i=Dt(Oe.map(f=>({rule:f.rule})),t,a);pn(i,s),nn(f=>Dt(f,t,a))},is=t=>{const a=Oe[t]?.rule,s=kt(a,o??{},l??void 0);nn(i=>i.length<=1?null:(i.splice(t,1),i),()=>{Oe.length-1===1?B(0):t<Ve?B(Ve-1):t===Ve&&B(Math.max(0,t-1)),P(null),T(null),N(null),M([]),E(null),ie(null)},s)},ls=t=>{nn(a=>or(a,t),()=>{B(t+1),P(null),T(null),N(null),M([]),E(null),ie(null)})},cs=async(t,a)=>{Mt();const s=qe.current.activePageKey,i=qe.current.decofile;if(!s)return;const f=i[s],y=f.sections;if(!y||typeof y!="object"||Array.isArray(y))return;const x=y;if(!Array.isArray(x.variants))return;const V=[...x.variants],J=V[t];if(!J?.rule||typeof J.rule!="object"){W.error("This variant has no matcher rule to rename.");return}const A=J.rule,O=a.trim();Vt(!0);try{if(!O){if(!xt(A,i,l)){G(null);return}const Je=A.__resolveType??"";V[t]={...J,rule:Tn(A,i,l)};const fe={...i,[s]:{...f,sections:{...x,variants:V}}};await ye.mutateAsync({blockKey:s,data:fe[s]}),await _t(Je,fe),G(null),g?.();return}const F=An(A,i,l);if(!F){W.error("Could not read this variant's matcher rule.");return}if(F.blockKey){await ye.mutateAsync({blockKey:F.blockKey,data:yt(F.resolveType,F.data,O)}),G(null),g?.();return}const ge=an(O),z=sn(ge,i);if(z){W.error(z);return}const U=yt(F.resolveType,F.data,O);let De=null;try{await ye.mutateAsync({blockKey:ge,data:U}),De=ge,V[t]={...J,rule:Lt(ge)},await ye.mutateAsync({blockKey:s,data:{...f,sections:{...x,variants:V}}}),De=null}catch(Je){throw De&&await Ht.mutateAsync({blockKey:De}).catch(()=>{}),Je}G(null),W.success(`Saved matcher as global block "${O}"`),g?.()}catch(F){W.error(F instanceof Error?F.message:"Failed to rename variant")}finally{Vt(!1)}},us=async(t,a)=>{Mt();const{selectedSectionIndex:s,rawSections:i,parsedSections:f,decofile:y,activePageKey:x,pageVariants:V,variantIndex:J}=qe.current;if(s===null||!x)return;const A=i[s],O=f[s];if(!A||!O?.isMultivariate)return;const F=Ye(A,O);if(!F)return;const ge=F.variants??[],z=ge[t];if(!z?.rule||typeof z.rule!="object"){W.error("This variant has no matcher rule to rename.");return}const U=z.rule,De=a.trim();Vt(!0);const Je=async fe=>{const We={...F,variants:fe},Xe=[...i];Xe[s]=dt(A,O,We);const rt=wt(y,x,Xe,J,V);return await ye.mutateAsync({blockKey:x,data:rt}),{...y,[x]:rt}};try{if(!De){if(!xt(U,y,l)){ne(null);return}const ot=U.__resolveType??"",Nn=[...ge];Nn[t]={...z,rule:Tn(U,y,l)};const gs=await Je(Nn);await _t(ot,gs),ne(null),g?.();return}const fe=An(U,y,l);if(!fe){W.error("Could not read this variant's matcher rule.");return}if(fe.blockKey){await ye.mutateAsync({blockKey:fe.blockKey,data:yt(fe.resolveType,fe.data,De)}),ne(null),g?.();return}const We=an(De),Xe=sn(We,y);if(Xe){W.error(Xe);return}const rt=yt(fe.resolveType,fe.data,De);let Ze=null;try{await ye.mutateAsync({blockKey:We,data:rt}),Ze=We;const ot=[...ge];ot[t]={...z,rule:Lt(We)},await Je(ot),Ze=null}catch(ot){throw Ze&&await Ht.mutateAsync({blockKey:Ze}).catch(()=>{}),ot}ne(null),W.success(`Saved matcher as global block "${De}"`),g?.()}catch(fe){W.error(fe instanceof Error?fe.message:"Failed to rename variant")}finally{Vt(!1)}},Dn=()=>{St()},ds=t=>{Pe(t),Xt({inner:t})},ms=t=>{Fe(t),Xt({raw:t})},fs=()=>{Pe(null),xe([])},ps=()=>me(t=>t+1),hs=t=>{if(Z){if(t===0){zt.flush(),we(!1),Pe(null),Fe(void 0),xe([]),me(s=>s+1),C?.();return}if(t===1){xe([]),me(s=>s+1);return}xe(Me.slice(0,t-1)),me(s=>s+1);return}if(_e){M(je.slice(0,t)),X(s=>s+1);return}if(t===0){Dn();return}if(t===1){M([]),X(s=>s+1);return}if(ct&&t===2){M([]),X(s=>s+1);return}const a=ct?2:1;M(je.slice(0,t-a))};return n.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[n.jsx("div",{className:"shrink-0",children:st||Kt||Z?n.jsxs("div",{className:Be("border-b px-3 py-2.5",st&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!_e&&Pt&&tt&&n.jsxs("button",{type:"button",onClick:Dn,title:`Editing in variant: ${tt.label}`,className:Be("shrink-0 inline-flex items-center gap-1 rounded-md h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",ro),children:[n.jsx(ha,{rule:Rt(tt.rule,o??{},l??void 0),matchers:At}),n.jsx("span",{className:"max-w-[160px] truncate",children:tt.label})]}),n.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:wn.map((t,a)=>{const s=a===wn.length-1;return n.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[a>0&&n.jsx(Gn,{className:"size-3 shrink-0 text-muted-foreground/60"}),n.jsx("button",{type:"button",onClick:()=>hs(a),title:t,className:Be("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",s?st?"font-semibold text-global-section-fg dark:text-global-section-fg-dark":"font-medium text-foreground":st?"text-foreground/80":"text-muted-foreground",st?"hover:bg-global-section/15":"hover:bg-accent hover:text-accent-foreground"),children:t})]},`${t}-${a}`)})}),st&&n.jsxs(mt,{children:[n.jsx(ft,{asChild:!0,children:n.jsx("span",{className:"shrink-0 cursor-help",children:n.jsx(fr,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),n.jsx(pt,{side:"bottom",className:"max-w-[260px]",children:"A global section is a reusable block shared across your site. Editing it here updates it everywhere it's used."})]}),jn&&!ct&&!at?.isHidden&&j&&n.jsx(In,{onClick:()=>Zt()})]}),st&&n.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:"This is a global section. Changes apply everywhere this section is used across your site."})]}):n.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(io,{pageKey:j,initialName:ze.name,initialPath:ze.path,onFieldChange:Ea})}),n.jsxs(mt,{children:[n.jsx(ft,{asChild:!0,children:n.jsx(Ge,{type:"button",variant:"ghost",size:"icon","aria-label":"Edit SEO",className:"size-7 shrink-0",onClick:()=>we(!0),children:n.jsx(dr,{size:14})})}),n.jsx(pt,{side:"bottom",children:"Edit SEO"})]}),n.jsxs(mt,{children:[n.jsx(ft,{asChild:!0,children:n.jsx(Ge,{type:"button",variant:"ghost",size:"icon","aria-label":"View JSON",className:"size-7 shrink-0",onClick:()=>R&&j?R(j):$(!0),children:n.jsx(mr,{size:14})})}),n.jsx(pt,{side:"bottom",children:"View JSON"})]}),n.jsx(In,{onClick:Rn})]})}),Z?n.jsx(Ft,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:n.jsx("div",{className:"mx-auto max-w-2xl",children:Ct&&j?n.jsx(Pr,{rawSeo:Jt,innerSeo:mn,defaultResolveType:Va,seoSchema:Ca,activeResolveType:Yt,seoTypeOptions:Na,formResetKey:Re,siteDefaultSeo:Pa,onBreadcrumbChange:xe,onPersistRaw:ms,onInnerChange:ds,onClearForm:fs,onBumpFormKey:ps}):n.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"SEO schema not found for this site."})})})}):Kt?n.jsxs(Ft,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[ct&<.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(Bs,{listKey:`${j??""}:${u??""}`,variants:lt.map((t,a)=>({index:a,label:t.label})),selectedIndex:en,onSelect:za,onRename:ne,onDuplicate:Ua,onDelete:Ha,onRemoveAll:Ga,onReorder:Wa,onAdd:()=>Zt()}),ct&&n.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),n.jsx(Cn,{currentRt:Ie??"",currentLabel:Bt(Et?.rule,o??{},et,l??void 0),currentGlobalKey:kt(Et?.rule,o??{},l??void 0)??void 0,matchers:At,globals:vn,onSelect:Za,onSelectGlobal:ts}),kn&&ae&&n.jsx("div",{className:"pt-1",children:n.jsx(Ln,{schema:kn,value:ae,onChange:es,meta:l??void 0,decofile:o,onSaveReferencedBlock:Nt,sandbox:Tt},`${u??"none"}:${en}:${Ie??""}`)})]})]}),n.jsx(Fn,{activeSchema:Qt,formValue:se,formResetKey:Ae,onFormChange:hn,onBreadcrumbChange:M,breadcrumbPath:je,emptyMessage:"No editable fields for this variant.",meta:l,decofile:o,onSaveReferencedBlock:Nt,sandbox:Tt})]}):_e?n.jsx(Ft,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:n.jsx(Fn,{activeSchema:Qt,formValue:se,formResetKey:Ae,onFormChange:hn,onBreadcrumbChange:M,breadcrumbPath:je,emptyMessage:"No editable fields for this global block.",meta:l,decofile:o,onSaveReferencedBlock:Nt,sandbox:Tt})}):n.jsxs(Ft,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[Pt&&j&&n.jsx(ao,{listKey:j,variants:Oe,activeIndex:Ve,decofile:o??{},meta:l,matchers:At,onSelect:rs,onReorder:os,onRename:G,onDuplicate:ls,onDelete:is,onAdd:Rn}),Pt&&ue!==null&&n.jsxs("div",{className:Be("px-3 border-b",le?"pt-3 pb-5 space-y-3":"py-2"),children:[n.jsxs("button",{type:"button",onClick:()=>ke(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-sm py-0.5 hover:bg-muted/40","aria-expanded":le,children:[n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Variant rule"}),le?n.jsx(cr,{className:"size-3.5 shrink-0 text-muted-foreground"}):n.jsx(ir,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),le&&n.jsxs("div",{className:Be("space-y-3",bt&&"pointer-events-none opacity-50"),children:[n.jsx(Cn,{currentRt:ue,currentLabel:Bt(tt?.rule,o??{},et,l??void 0),currentGlobalKey:kt(tt?.rule,o??{},l??void 0)??void 0,matchers:At,globals:vn,onSelect:Ya,onSelectGlobal:Xa}),Sn&&Ce&&n.jsx("div",{className:"space-y-3",children:n.jsx(Ln,{schema:Sn,value:Ce,onChange:Qa,meta:l??void 0,decofile:o,onSaveReferencedBlock:Nt,sandbox:Tt},`${Ve}:${ue??""}`)})]})]}),n.jsx("div",{className:"p-2 pt-3",children:n.jsx(qr,{listKey:`${j??""}-${Ve}`,rawSections:I,sections:Te,meta:l,selectedIndex:u,onSelect:Ma,onReorder:Ka,onDelete:$a,onDuplicate:Oa,onMakeReusable:ve,onToggleHidden:Ba,onToggleLazy:La,onAddVariant:Zt,onDetach:Fa,onAddSection:()=>de(!0),canAddSection:Ja})})]}),n.jsx(Ls,{open:Ne!==null,onOpenChange:t=>{t||ve(null)},defaultBlockId:Ne!==null?an(Te[Ne]?.label??""):"",isPending:ye.isPending,onSubmit:qa}),d&&n.jsx(Er,{open:Se,onOpenChange:de,meta:l,decofile:o,previewBaseUrl:d,onSelect:Ia}),be&&j&&o&&n.jsx(Fs,{open:be,onOpenChange:$,pageKey:j,decofile:o}),re!==null&&n.jsx(On,{open:!0,initialName:xt(Oe[re]?.rule,o??{},l??void 0)?Bt(Oe[re]?.rule,o??{},et,l??void 0):"",autoLabel:et(Rt(Oe[re]?.rule,o??{},l??void 0)),isPending:bt,onSubmit:async t=>{await cs(re,t)},onOpenChange:t=>{!t&&!bt&&G(null)}}),q!==null&&n.jsx(On,{open:!0,initialName:xt(lt[q]?.rule,o??{},l??void 0)?Bt(lt[q]?.rule,o??{},et,l??void 0):"",autoLabel:et(Rt(lt[q]?.rule,o??{},l??void 0)),isPending:bt,onSubmit:async t=>{await us(q,t)},onOpenChange:t=>{!t&&!bt&&ne(null)}})]})}export{Zl as SectionsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as D,j as o,l as R,r as $,B as H}from"./index-d52A49fX.js";import{i as Q,a as W,d as J,e as K}from"./dialog-C2MVTIBt.js";import{g as V,b as Y,a as Z,D as ee}from"./drawer-BGO4iAk0.js";import{u as oe}from"./use-mobile-Cqur1PpI.js";import{b as A}from"./chat-context-XoGdeFE9.js";import{D as te,b as le,S as F,M as se}from"./decopilot--vqccpDb.js";import{a as G,b as z}from"./connect-desktop-dialog-CRhRTOUc.js";const de=[{tier:"fast",description:"Quicker responses"},{tier:"smart",description:"Balanced quality"},{tier:"thinking",description:"Deeper reasoning"}];function U(r){const e=D.c(10),{modelSet:t,selectedModelId:s,onSelect:d}=r;let l,c;if(e[0]!==t.logo||e[1]!==t.models||e[2]!==t.tiers||e[3]!==d||e[4]!==s){const a=Object.fromEntries(t.models.map(ne));l="flex flex-col p-2 w-[320px]",c=de.map(i=>{const{tier:p,description:m}=i,u=t.tiers[p];if(!u.modelId)return null;const x=a[u.modelId];if(!x)return null;const f=s===u.modelId;return o.jsxs("button",{type:"button",onClick:()=>d(x),className:R("flex items-center gap-3 px-3 py-2.5 rounded-lg text-left hover:bg-accent",f&&"bg-accent/50"),children:[o.jsx("img",{src:t.logo,alt:u.label,className:"size-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:u.label}),o.jsx("span",{className:"text-xs text-muted-foreground leading-tight",children:m})]})]},p)}),e[0]=t.logo,e[1]=t.models,e[2]=t.tiers,e[3]=d,e[4]=s,e[5]=l,e[6]=c}else l=e[5],c=e[6];let n;return e[7]!==l||e[8]!==c?(n=o.jsx("div",{className:l,children:c}),e[7]=l,e[8]=c,e[9]=n):n=e[9],n}function ne(r){return[r.modelId,r]}const ie=[{providerId:"claude-code",modelId:"claude-code:haiku",title:"Claude Code Haiku",description:"Fast and lightweight",capabilities:["text"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:sonnet",title:"Claude Code Sonnet 5",description:"Balanced performance",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus",title:"Claude Code Opus",description:"Most capable",capabilities:["text","reasoning"],limits:null,costs:null},{providerId:"claude-code",modelId:"claude-code:opus-1m",title:"Claude Code Opus 4.8 1M",description:"Most capable, 1M context window",capabilities:["text","reasoning"],limits:{contextWindow:1e6,maxOutputTokens:null},costs:null}],L="https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png",ce=[{providerId:"codex",modelId:"codex:gpt-5.6-sol",title:"GPT-5.6 Sol",description:"Frontier Codex model for deep reasoning, complex coding, and real-world work",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.6-terra",title:"GPT-5.6 Terra",description:"Balanced Codex model for everyday coding and agent work",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.6-luna",title:"GPT-5.6 Luna",description:"Fast Codex model for lightweight coding tasks and titles",capabilities:["text","reasoning"],logo:L,limits:null,costs:null},{providerId:"codex",modelId:"codex:gpt-5.3-codex-spark",title:"GPT-5.3 Codex Spark",description:"Ultra-fast coding model",capabilities:["text","reasoning"],logo:L,limits:null,costs:null}],re="https://decoims.com/decocms/93e4059c-e598-412b-87eb-54d72a946ec8/claude-stroke-rounded.svg",ae="https://decoims.com/decocms/9170ffd4-b9cc-4661-ad8f-ae2eea019e00/codex.svg",me={fast:{modelId:"claude-code:haiku",label:"Haiku 4.5",description:"Quicker responses",iconNode:o.jsx(G,{size:16})},smart:{modelId:"claude-code:sonnet",label:"Sonnet 5",description:"Balanced quality",iconNode:o.jsx(G,{size:16})},thinking:{modelId:"claude-code:opus-1m",label:"Opus 4.8 1M",description:"Deeper reasoning",iconNode:o.jsx(G,{size:16})}},pe={fast:{modelId:"codex:gpt-5.6-luna",label:"GPT-5.6 Luna",description:"Quicker responses",iconNode:o.jsx(z,{size:16})},smart:{modelId:"codex:gpt-5.6-terra",label:"GPT-5.6 Terra",description:"Balanced quality",iconNode:o.jsx(z,{size:16})},thinking:{modelId:"codex:gpt-5.6-sol",label:"GPT-5.6 Sol",description:"Deeper reasoning",iconNode:o.jsx(z,{size:16})}};function X(r){return r==="claude-code"?{logo:re,tiers:me,models:ie}:r==="codex"?{logo:ae,tiers:pe,models:ce}:null}function ue(r){const e=D.c(11),{onClose:t,agent:s}=r,d=A(),l=s??d.pendingHarnessId??"decopilot";let c;e[0]!==l?(c=X(l),e[0]=l,e[1]=c):c=e[1];const n=c;if(!n){let m;return e[2]!==t?(m=o.jsx(le,{onClose:t}),e[2]=t,e[3]=m):m=e[3],m}const a=d.selectedModel?.modelId??n.tiers[d.simpleModeTier].modelId;let i;e[4]!==t||e[5]!==d?(i=m=>{d.setModel({...m,keyId:void 0}),t()},e[4]=t,e[5]=d,e[6]=i):i=e[6];let p;return e[7]!==n||e[8]!==a||e[9]!==i?(p=o.jsx(U,{modelSet:n,selectedModelId:a,onSelect:i}),e[7]=n,e[8]=a,e[9]=i,e[10]=p):p=e[10],p}function fe(r){const e=D.c(13);let t,s;e[0]!==r?({agent:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let d;e[3]!==t?(d=t?X(t):null,e[3]=t,e[4]=d):d=e[4];const l=d;if(!l){let i;return e[5]!==s?(i=o.jsx(te,{...s}),e[5]=s,e[6]=i):i=e[6],i}const c=s.selectedModel?.modelId??l.tiers.smart.modelId;let n;e[7]!==s?(n=i=>{s.onModelChange(i),s.onClose()},e[7]=s,e[8]=n):n=e[8];let a;return e[9]!==l||e[10]!==c||e[11]!==n?(a=o.jsx(U,{modelSet:l,selectedModelId:c,onSelect:n}),e[9]=l,e[10]=c,e[11]=n,e[12]=a):a=e[12],a}function ve(r){const e=D.c(39),{variant:t,className:s,placeholder:d,model:l,isLoading:c,credentialId:n,onCredentialChange:a,onModelChange:i,filterModels:p,agent:m}=r,u=t===void 0?"borderless":t,x=d===void 0?"Select model":d,[f,k]=$.useState(!1),g=i!==void 0,q=oe(),B=u==="borderless"?"ghost":"outline",P=u==="borderless"&&"md:border-none";let h;e[0]!==s||e[1]!==P?(h=R("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",P,s),e[0]=s,e[1]=P,e[2]=h):h=e[2];let b;e[3]!==c||e[4]!==l||e[5]!==x||e[6]!==g?(b=g?o.jsx(F,{model:l??null,placeholder:x,isLoading:c}):o.jsx(ge,{placeholder:x}),e[3]=c,e[4]=l,e[5]=x,e[6]=g,e[7]=b):b=e[7];let w;e[8]!==B||e[9]!==h||e[10]!==b?(w=o.jsx(H,{variant:B,size:"sm",className:h,children:b}),e[8]=B,e[9]=h,e[10]=b,e[11]=w):w=e[11];const C=w;let O;e[12]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx(se,{}),e[12]=O):O=e[12];let y;e[13]!==m||e[14]!==n||e[15]!==p||e[16]!==l||e[17]!==a||e[18]!==i||e[19]!==g?(y=o.jsx($.Suspense,{fallback:O,children:g?o.jsx(fe,{onClose:()=>k(!1),agent:m,credentialId:n??null,onCredentialChange:a??xe,selectedModel:l??null,onModelChange:i,filterModels:p}):o.jsx(ue,{onClose:()=>k(!1),agent:m})}),e[13]=m,e[14]=n,e[15]=p,e[16]=l,e[17]=a,e[18]=i,e[19]=g,e[20]=y):y=e[20];const I=y;if(q){let M;e[21]!==C?(M=o.jsx(V,{asChild:!0,children:C}),e[21]=C,e[22]=M):M=e[22];let T;e[23]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(Y,{className:"sr-only",children:"Select model"}),e[23]=T):T=e[23];let v;e[24]!==I?(v=o.jsxs(Z,{className:"p-0 flex flex-col max-h-[95vh]",children:[T,o.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:I})]}),e[24]=I,e[25]=v):v=e[25];let _;return e[26]!==f||e[27]!==M||e[28]!==v?(_=o.jsxs(ee,{open:f,onOpenChange:k,children:[M,v]}),e[26]=f,e[27]=M,e[28]=v,e[29]=_):_=e[29],_}let S;e[30]!==C?(S=o.jsx(Q,{asChild:!0,children:C}),e[30]=C,e[31]=S):S=e[31];let N;e[32]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(W,{className:"sr-only",children:"Select model"}),e[32]=N):N=e[32];let j;e[33]!==I?(j=o.jsxs(J,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[N,I]}),e[33]=I,e[34]=j):j=e[34];let E;return e[35]!==f||e[36]!==S||e[37]!==j?(E=o.jsxs(K,{open:f,onOpenChange:k,children:[S,j]}),e[35]=f,e[36]=S,e[37]=j,e[38]=E):E=e[38],E}function xe(){}function ge(r){const e=D.c(4),{placeholder:t}=r,{selectedModel:s,isModelsLoading:d}=A();let l;return e[0]!==d||e[1]!==s||e[2]!==t?(l=o.jsx(F,{model:s,placeholder:t,isLoading:d}),e[0]=d,e[1]=s,e[2]=t,e[3]=l):l=e[3],l}export{ve as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,j as t,r as Q,B as je,i as be}from"./index-d52A49fX.js";import{i as Se}from"./ChevronRight-DntNgeBz.js";import{J as fe}from"./agent-icon-BvZm1osM.js";import{S as ue}from"./scroll-area-Bsik7Uif.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-Cfv9ng9q.js";import{c as xe,v as ze}from"./index-ELtqDe0g.js";import{b as ge}from"./Tool01-DJgxsN47.js";import"./AlertCircle-D90xu5-8.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"./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"./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"./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"./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 U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let b;return e[23]!==u||e[24]!==y||e[25]!==g?(b=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=b):b=e[26],b}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const b=i.description??ee;let _;e[17]!==y||e[18]!==b?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:b}),e[17]=y,e[18]=b,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let S;e[24]!==i.image?(S=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=S):S=e[25];let k;e[26]!==N||e[27]!==S||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,S]}),e[26]=N,e[27]=S,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function $i(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,b]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),b(Me));const{persistSeo:S,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==S||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),S(de)},e[8]=S,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==b?(H=()=>b(Ke),e[14]=b,e[15]=H):H=e[15];const re=H;let J;e[16]!==C||e[17]!==d?(J=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=J):J=e[18];const ae=J,P=o.kind==="page"?o.path:"/";let W;e[19]!==P||e[20]!==l||e[21]!==o.kind?(W=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=W):W=e[22];const ne=W,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",X=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(Se,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(be,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==S||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==X||e[57]!==me||e[58]!==R?(A=!c||!X&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:X?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),S(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=S,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=X,e[57]=me,e[58]=R,e[59]=A):A=e[59];let q;return e[60]!==I||e[61]!==A?(q=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=q):q=e[62],q}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{$i as SeoEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aW as J,r as A,aX as Q,aY as X,c as S,e as L,j as s,D as Y,l as k,a2 as F,T as B,v as I,M as T,a as E,i as K,O as U}from"./index-d52A49fX.js";import{j as V,k as Z,l as ee,S as q,a as w,b as M,d as P,c as R,f as se,g as te}from"./sidebar-BJwboMe2.js";import{a as re}from"./index-BZQALusN.js";import{n as le,b as ie,a as oe,c as ne,d as ae,i as G}from"./ZapSquare-Ch518nCD.js";import{t as ce,a as O}from"./Users03-JTfAuK6m.js";import{i as me}from"./HardDrive-CDBenwE2.js";import{i as fe}from"./Key01-CwgjH_um.js";import{i as de}from"./Shield01-BrK-9cDf.js";import{s as ue}from"./User01-DuGAbO5F.js";import{i as xe}from"./Zap-CMZ9cCJz.js";import{a as be}from"./use-capability-C9whYnsG.js";import{a as he}from"./use-join-requests-DoInaUWb.js";import{u as W}from"./use-mobile-Cqur1PpI.js";import{u as pe}from"./use-status-sounds-DEhedUWx.js";import{T as y}from"./toolbar-CVjg3TEd.js";import{S as ge,M as je}from"./shell-controls-DMbQmeKU.js";import"./LayoutLeft-CKcHwaHf.js";import"./sheet-DSSfro03.js";import"./X-DRR7RtBP.js";import"./tooltip-Bzas0fb8.js";import"./studio-tools-nA7ZTnFV.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-Dk3_PQZu.js";import"./decopilot-sse-pool-B7Qe588m.js";import"./backoff-CrEUbyZT.js";import"./toolbar-icon-button-CwCDO4L5.js";function D(e){const t=J({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return Q(n.stores.__store,l=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=X(r.current,e.select(l));return r.current=i,i}return e.select(l)}return l})}function H(){const e=S.c(21),{capabilities:t,isPrivileged:n,loading:r,error:l}=be(),i=he().length;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ce,{size:14}),e[0]=a):a=e[0];let o,c;if(e[1]!==t||e[2]!==l||e[3]!==n||e[4]!==i||e[5]!==r){c=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(le,{size:14}),e[8]=f):f=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ie,{size:14}),e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(fe,{size:14}),e[10]=m):m=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(me,{size:14}),e[11]=u):u=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(oe,{size:14}),e[12]=x):x=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(O,{size:14}),e[13]=p):p=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(xe,{size:14}),e[14]=h):h=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ne,{size:14}),e[15]=g):g=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ae,{size:14}),e[16]=b):b=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(O,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(de,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(F,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ue,{size:14}),e[20]=N):N=e[20];const z=[{label:"Organization",items:[{key:"general",label:"General",icon:a,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:f,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:d,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:m,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:u,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:x,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:p,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:h,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:b,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:i},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(r||l){c=z;break e}o=z.map(C=>({...C,items:C.items.filter($=>$.privilegedOnly?n:$.requires?n||t[$.requires]:!0)})).filter(_e)}e[1]=t,e[2]=l,e[3]=n,e[4]=i,e[5]=r,e[6]=o,e[7]=c}else o=e[6],c=e[7];return c!==Symbol.for("react.early_return_sentinel")?c:o}function _e(e){return e.items.length>0}function ye(){const e=S.c(19),t=H();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},e[0]=n):n=e[0];const{org:r}=L(n);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={select:ve},e[1]=l):l=e[1];const i=D(l);let a;e[2]!==r||e[3]!==i?(a=p=>{const h=p.replace("$org",r);return i.startsWith(h)},e[2]=r,e[3]=i,e[4]=a):a=e[4];const o=a;let c;if(e[5]!==t||e[6]!==o||e[7]!==r){let p;e[9]!==o||e[10]!==r?(p=(h,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[h.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:h.label}),s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:h.items.map(b=>s.jsx(P,{children:s.jsx(R,{asChild:!0,isActive:o(b.to),children:s.jsxs(B,{to:b.to,params:{org:r},onClick:()=>I("settings_nav_clicked",{section_key:b.key,section_label:b.label,group_label:h.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[b.icon,b.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:b.label})]})})},b.key))})})]},`${h.label}-${g}`),e[9]=o,e[10]=r,e[11]=p):p=e[11],c=t.map(p),e[5]=t,e[6]=o,e[7]=r,e[8]=c}else c=e[8];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=f):f=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[f,s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(R,{onClick:Se,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(G,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=d):d=e[13];let m;e[14]!==c?(m=s.jsxs(se,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[c,d]}),e[14]=c,e[15]=m):m=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.29.1"]})}),e[16]=u):u=e[16];let x;return e[17]!==m?(x=s.jsxs(te,{variant:"sidebar",children:[m,u]}),e[17]=m,e[18]=x):x=e[18],x}function Se(){I("signed_out",{source:"settings_sidebar"}),T(),E.signOut()}function ve(e){return e.location.pathname}function Ne(e){const t=S.c(21),{onClose:n}=e,r=H();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org"},t[0]=l):l=t[0];const{org:i}=L(l);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={select:$e},t[1]=a):a=t[1];const o=D(a);let c;t[2]!==i||t[3]!==o?(c=g=>{const b=g.replace("$org",i);return o.startsWith(b)},t[2]=i,t[3]=o,t[4]=c):c=t[4];const f=c;let d;if(t[5]!==r||t[6]!==f||t[7]!==n||t[8]!==i){let g;t[10]!==f||t[11]!==n||t[12]!==i?(g=(b,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[b.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:b.label}),b.items.map(j=>s.jsxs(B,{to:j.to,params:{org:i},onClick:n,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",f(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${b.label}-${_}`),t[10]=f,t[11]=n,t[12]=i,t[13]=g):g=t[13],d=r.map(g),t[5]=r,t[6]=f,t[7]=n,t[8]=i,t[9]=d}else d=t[9];let m;t[14]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=m):m=t[14];let u;t[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[m,s.jsxs("button",{type:"button",onClick:ke,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(G,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=u):u=t[15];let x;t[16]!==d?(x=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[d,u]}),t[16]=d,t[17]=x):x=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.29.1"]})}),t[18]=p):p=t[18];let h;return t[19]!==x?(h=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[x,p]}),t[19]=x,t[20]=h):h=t[20],h}function ke(){T(),E.signOut()}function $e(e){return e.location.pathname}function ze(){const e=S.c(4),t=W(),{org:n}=Y();pe(n.slug);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(K,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(A.Suspense,{fallback:r,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(re,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(U,{})})})})}),e[1]=l):l=e[1];const i=l;if(t){let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:i}),e[2]=o):o=e[2],o}let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:i})}),e[3]=a):a=e[3],a}function ss(){const e=S.c(21),t=W();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.LogoLink,{}),e[0]=n):n=e[0];let r;e[1]!==t?(r=t&&s.jsx(ge,{}),e[1]=t,e[2]=r):r=e[2];let l;e[3]!==r?(l=s.jsxs(y.LeftColumn,{children:[n,r]}),e[3]=r,e[4]=l):l=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(y.CenterSlot,{}),e[5]=i):i=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[6]=a):a=e[6];let o;e[7]!==l?(o=s.jsxs(y.Header,{children:[l,i,a]}),e[7]=l,e[8]=o):o=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c={"--sidebar-width-icon":"3.5rem"},e[9]=c):c=e[9];let f;e[10]!==t?(f=!t&&s.jsx(ye,{}),e[10]=t,e[11]=f):f=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(V,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(ze,{})}),e[12]=d):d=e[12];let m;e[13]!==f?(m=s.jsxs(Z,{className:"flex-1 bg-sidebar min-h-0",style:c,children:[f,d]}),e[13]=f,e[14]=m):m=e[14];let u;e[15]!==t?(u=t&&s.jsx(je,{renderSidebar:Ce}),e[15]=t,e[16]=u):u=e[16];let x;return e[17]!==u||e[18]!==o||e[19]!==m?(x=s.jsx(y.Provider,{children:s.jsx(ee,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[o,m,u]})})}),e[17]=u,e[18]=o,e[19]=m,e[20]=x):x=e[20],x}function Ce(e){const{onClose:t}=e;return s.jsx(Ne,{onClose:t})}export{ye as SettingsSidebar,Ne as SettingsSidebarMobile,ss as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as n,l as f,j as i,dk as N,cw as y,bM as S,dl as v,cx as $,dm as w,cy as C}from"./index-d52A49fX.js";import{i as k}from"./X-DRR7RtBP.js";function E(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx($,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(C,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function O(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(R,{}),e[6]=m):m=e[6];const x=p==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",b=p==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs(w,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{T as S,_ as a,P as b,O as c,E as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,j as a}from"./index-d52A49fX.js";import{S as p,c as b,d as S}from"./sheet-DSSfro03.js";import{u as d}from"./sidebar-BJwboMe2.js";import{i as h}from"./LayoutLeft-CKcHwaHf.js";import{T as u}from"./toolbar-icon-button-CwCDO4L5.js";function M(){const t=f.c(3),{toggleSidebar:e}=d();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(h,{size:16}),t[0]=o):o=t[0];let s;return t[1]!==e?(s=a.jsx(u,{onClick:e,"aria-label":"Toggle sidebar",children:o}),t[1]=e,t[2]=s):s=t[2],s}function _(t){const e=f.c(12),{renderSidebar:o}=t,{openMobile:s,setOpenMobile:i}=d();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(p,{className:"sr-only",children:"Navigation"}),e[0]=c):c=e[0];let n;e[1]!==i?(n=()=>i(!1),e[1]=i,e[2]=n):n=e[2];let r;e[3]!==o||e[4]!==n?(r=o({onClose:n}),e[3]=o,e[4]=n,e[5]=r):r=e[5];let l;e[6]!==r?(l=a.jsxs(b,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[c,r]}),e[6]=r,e[7]=l):l=e[7];let m;return e[8]!==s||e[9]!==i||e[10]!==l?(m=a.jsx(S,{open:s,onOpenChange:i,children:l}),e[8]=s,e[9]=i,e[10]=l,e[11]=m):m=e[11],m}export{_ as M,M as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as k,d as ee,j as n,B as C,bR as K,t as Y,a2 as pe,a as W,y as ke,q as ye,K as se,bS as Ne,bT as _e,L as B,r as H,k as te,bU as Ae,bV as Ce,b as Oe,D as Te,e as be,u as Ee,H as $e,aW as ze,bW as De,bX as ue,bY as Me,bZ as Ie,S as Le,O as Pe,b_ as Fe}from"./index-d52A49fX.js";import{A as oe}from"./avatar-BrhzNA4d.js";import{t as xe,a as Re}from"./Users03-JTfAuK6m.js";import{i as qe}from"./SearchLg-C9MBYrXH.js";import{i as Ue,s as Ge,a as D,n as He}from"./Stars02-sR281nUk.js";import{s as Ke}from"./XClose-eEYHZsPT.js";import{i as I}from"./CheckCircle-CebfgxLq.js";import{i as me}from"./FilterLines-CEBhmChB.js";import{i as G}from"./Zap-CMZ9cCJz.js";import{d as Be,c as We,a as Ye,e as Je}from"./dialog-C2MVTIBt.js";import{b as Qe,c as Ve,d as Xe,a as Ze,e as et,g as tt,f as nt}from"./alert-dialog-wgrcUQ0O.js";import{R as st}from"./required-auth-layout-CEAeU4UY.js";import{g as ot,c as it,A as at}from"./hooks-BKW8thdS.js";import{m as rt}from"./use-mcp-client-QTh-uqf4.js";import{a as lt,S as ct}from"./constants-nH3qQ_1f.js";import{q as dt}from"./tab-id-Bgchl1bv.js";import{d as ut}from"./use-organization-settings-CnPdR5CP.js";import{u as mt}from"./use-org-sso-DGL7haeQ.js";function ft(t){const e=k.c(27),{orgName:s,orgSlug:o,orgLogo:a,domain:r}=t;let i;e[0]!==o?(i={mutationFn:async()=>{const x=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:x=>{window.location.href=`/${x.slug??o}`},onError:gt},e[0]=o,e[1]=i):i=e[1];const l=ee(i),d=ht;let c;e[2]!==a||e[3]!==s?(c=a?n.jsx(oe,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[2]=a,e[3]=s,e[4]=c):c=e[4];let u;e[5]!==s?(u=n.jsxs("h3",{className:"text-lg font-medium",children:["Join ",s,"?"]}),e[5]=s,e[6]=u):u=e[6];let m;e[7]!==r?(m=n.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",n.jsxs("strong",{children:["@",r]})," email can join this organization."]}),e[7]=r,e[8]=m):m=e[8];let f;e[9]!==u||e[10]!==m?(f=n.jsxs("div",{className:"space-y-2",children:[u,m]}),e[9]=u,e[10]=m,e[11]=f):f=e[11];let y;e[12]!==l?(y=()=>l.mutate(),e[12]=l,e[13]=y):y=e[13];const g=l.isPending?"Joining…":`Enter ${s}`;let h;e[14]!==l.isPending||e[15]!==y||e[16]!==g?(h=n.jsx(C,{onClick:y,disabled:l.isPending,children:g}),e[14]=l.isPending,e[15]=y,e[16]=g,e[17]=h):h=e[17];let p;e[18]!==l.isPending?(p=n.jsx(C,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=p):p=e[19];let b;e[20]!==h||e[21]!==p?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,p]}),e[20]=h,e[21]=p,e[22]=b):b=e[22];let S;return e[23]!==b||e[24]!==c||e[25]!==f?(S=n.jsxs(K,{children:[c,f,b]}),e[23]=b,e[24]=c,e[25]=f,e[26]=S):S=e[26],S}function ht(){window.location.href="/"}function gt(t){Y.error(t instanceof Error?t.message:"Failed to join organization")}function fe(t){const e=k.c(17),{orgSlug:s,orgName:o,reason:a}=t,r=pt,i=a==="not-found",l=i?qe:pe,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==o||e[2]!==s?(c=i?n.jsxs(n.Fragment,{children:["We couldn't find an organization called ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:["You don't have access to ",n.jsx("strong",{children:o??s}),".",n.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=i,e[1]=o,e[2]=s,e[3]=c):c=e[3];const u=c;let m;e[4]!==l?(m=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=m):m=e[5];let f;e[6]!==d?(f=n.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=f):f=e[7];let y;e[8]!==u?(y=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[8]=u,e[9]=y):y=e[9];let g;e[10]!==f||e[11]!==y?(g=n.jsxs("div",{className:"space-y-2",children:[f,y]}),e[10]=f,e[11]=y,e[12]=g):g=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(C,{onClick:r,children:"Go to home"}),e[13]=h):h=e[13];let p;return e[14]!==m||e[15]!==g?(p=n.jsxs(K,{children:[m,g,h]}),e[14]=m,e[15]=g,e[16]=p):p=e[16],p}function pt(){window.location.href="/"}function yt(t){const e=k.c(39),{invitationId:s,orgName:o,orgSlug:a,orgLogo:r}=t;let i;e[0]!==s?(i=async()=>{const _=await W.organization.acceptInvitation({invitationId:s});if(_.error)throw new Error(_.error.message);return _.data},e[0]=s,e[1]=i):i=e[1];let l;e[2]!==a?(l=()=>{ke(),window.location.href=`/${a}`},e[2]=a,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:wt},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=ee(d);let u;e[7]!==s?(u=async()=>{const _=await W.organization.rejectInvitation({invitationId:s});if(_.error)throw new Error(_.error.message);return _.data},e[7]=s,e[8]=u):u=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=xt,e[9]=m):m=e[9];let f;e[10]!==u?(f={mutationFn:u,onSuccess:m,onError:bt},e[10]=u,e[11]=f):f=e[11];const y=ee(f),g=c.isPending||y.isPending;let h;e[12]!==r||e[13]!==o?(h=r?n.jsx(oe,{url:r,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ue,{className:"h-6 w-6 text-primary"})}),e[12]=r,e[13]=o,e[14]=h):h=e[14];let p;e[15]!==o?(p=n.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",n.jsx("strong",{children:o})]}),e[15]=o,e[16]=p):p=e[16];let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=b):b=e[17];let S;e[18]!==p?(S=n.jsxs("div",{className:"space-y-2",children:[p,b]}),e[18]=p,e[19]=S):S=e[19];let x;e[20]!==c?(x=()=>c.mutate(),e[20]=c,e[21]=x):x=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let N;e[22]!==g||e[23]!==x||e[24]!==v?(N=n.jsx(C,{onClick:x,disabled:g,children:v}),e[22]=g,e[23]=x,e[24]=v,e[25]=N):N=e[25];let T;e[26]!==y?(T=()=>y.mutate(),e[26]=y,e[27]=T):T=e[27];const $=y.isPending?"Declining…":"Decline";let w;e[28]!==g||e[29]!==T||e[30]!==$?(w=n.jsx(C,{variant:"ghost",onClick:T,disabled:g,children:$}),e[28]=g,e[29]=T,e[30]=$,e[31]=w):w=e[31];let E;e[32]!==N||e[33]!==w?(E=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,w]}),e[32]=N,e[33]=w,e[34]=E):E=e[34];let z;return e[35]!==S||e[36]!==E||e[37]!==h?(z=n.jsxs(K,{children:[h,S,E]}),e[35]=S,e[36]=E,e[37]=h,e[38]=z):z=e[38],z}function bt(t){Y.error(t instanceof Error?t.message:"Failed to decline invitation")}function xt(){Y.success("Invitation declined"),window.location.href="/"}function wt(t){Y.error(t instanceof Error?t.message:"Failed to accept invitation")}function St(t){const e=k.c(10),{orgName:s,orgLogo:o}=t;let a;e[0]!==o||e[1]!==s?(a=o?n.jsx(oe,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ge,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=s,e[2]=a):a=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=r):r=e[3];let i;e[4]!==s?(i=n.jsxs("div",{className:"space-y-2",children:[r,n.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",n.jsx("strong",{children:s})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=s,e[5]=i):i=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(C,{variant:"ghost",onClick:jt,children:"Go to home"}),e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==i?(d=n.jsxs(K,{children:[a,i,l]}),e[7]=a,e[8]=i,e[9]=d):d=e[9],d}function jt(){window.location.href="/"}function vt(t){const e=k.c(30),{orgName:s,orgSlug:o,orgLogo:a,domain:r}=t;let i;e[0]!==o?(i=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=_t,e[2]=l):l=e[2];let d;e[3]!==i?(d={mutationFn:i,onSuccess:l,onError:Nt},e[3]=i,e[4]=d):d=e[4];const c=ee(d);let u;e[5]!==a||e[6]!==s?(u=a?n.jsx(oe,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[5]=a,e[6]=s,e[7]=u):u=e[7];let m;e[8]!==s?(m=n.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",s,"?"]}),e[8]=s,e[9]=m):m=e[9];let f;e[10]!==r?(f=n.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",n.jsxs("strong",{children:["@",r]})," emails before you can join."]}),e[10]=r,e[11]=f):f=e[11];let y;e[12]!==m||e[13]!==f?(y=n.jsxs("div",{className:"space-y-2",children:[m,f]}),e[12]=m,e[13]=f,e[14]=y):y=e[14];let g;e[15]!==c?(g=()=>c.mutate(),e[15]=c,e[16]=g):g=e[16];const h=c.isPending?"Requesting…":"Request to join";let p;e[17]!==c.isPending||e[18]!==g||e[19]!==h?(p=n.jsx(C,{onClick:g,disabled:c.isPending,children:h}),e[17]=c.isPending,e[18]=g,e[19]=h,e[20]=p):p=e[20];let b;e[21]!==c.isPending?(b=n.jsx(C,{variant:"ghost",onClick:kt,disabled:c.isPending,children:"Go to home"}),e[21]=c.isPending,e[22]=b):b=e[22];let S;e[23]!==p||e[24]!==b?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,b]}),e[23]=p,e[24]=b,e[25]=S):S=e[25];let x;return e[26]!==S||e[27]!==u||e[28]!==y?(x=n.jsxs(K,{children:[u,y,S]}),e[26]=S,e[27]=u,e[28]=y,e[29]=x):x=e[29],x}function kt(){window.location.href="/"}function Nt(t){Y.error(t instanceof Error?t.message:"Failed to request access")}function _t(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function At(t){const e=k.c(7);let s;e[0]!==t?(s=se.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==t?(o=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=o):o=e[3];let a;return e[4]!==s||e[5]!==o?(a={queryKey:s,queryFn:o,refetchOnWindowFocus:!1},e[4]=s,e[5]=o,e[6]=a):a=e[6],ye(a)}function Ct({orgSlug:t}){const{data:e}=At(t);if(e.status!=="member"){Ne()?.org===t&&_e();const s=localStorage.getItem(B.lastOrgSlug())===t;if(s&&localStorage.removeItem(B.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(fe,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(yt,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(ft,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(vt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(St,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(fe,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Ot(t){const e=k.c(20),{release:s,onCtaClick:o,onLearnMoreClick:a}=t;let r;e[0]!==s.eyebrow?(r=s.eyebrow&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s.eyebrow}),e[0]=s.eyebrow,e[1]=r):r=e[1];let i;e[2]!==s.title?(i=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:s.title}),e[2]=s.title,e[3]=i):i=e[3];let l;e[4]!==r||e[5]!==i?(l=n.jsxs("div",{children:[r,i]}),e[4]=r,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==s.bullets?(d=s.bullets.map(Tt),e[7]=s.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=n.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let u;e[11]!==o||e[12]!==a||e[13]!==s.cta||e[14]!==s.learnMoreHref?(u=(s.cta||s.learnMoreHref)&&n.jsxs("div",{className:"flex items-center justify-between pt-1",children:[s.learnMoreHref?n.jsx("a",{href:s.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:a,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):n.jsx("span",{}),s.cta&&n.jsx(C,{asChild:!0,size:"sm",onClick:o,children:n.jsx("a",{href:s.cta.href,children:s.cta.label})})]}),e[11]=o,e[12]=a,e[13]=s.cta,e[14]=s.learnMoreHref,e[15]=u):u=e[15];let m;return e[16]!==l||e[17]!==c||e[18]!==u?(m=n.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,u]}),e[16]=l,e[17]=c,e[18]=u,e[19]=m):m=e[19],m}function Tt(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const we=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:D,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:I,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:G,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:D,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:I,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:G,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:I,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:D,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:G,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:D,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:I,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:D,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:I,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:D,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:me,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:I,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Re,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:G,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:I,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:D,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:me,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:D,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:He,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ne="studio.release-feed.v1",ce=new Set;let L="",P={},de=!1;function Et(){if(de)return L||"{}";try{return localStorage.getItem(ne)??"{}"}catch{return L||"{}"}}function Se(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function he(){const t=Et();return t!==L&&(L=t,P=Se(t)),P}function $t(t){ce.add(t);const e=s=>{if(!(s.key!==ne&&s.key!==null)){try{const o=localStorage.getItem(ne)??"{}",r={...Se(o),...P};P=r,L=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{ce.delete(t),window.removeEventListener("storage",e)}}function zt(t){P=t,L=JSON.stringify(t);try{localStorage.setItem(ne,L),de=!1}catch{de=!0}ce.forEach(e=>e())}function Dt(){const t=k.c(7),e=H.useSyncExternalStore($t,he,he);let s;t[0]!==e?(s=d=>!!e[d],t[0]=e,t[1]=s):s=t[1];const o=s,a=Mt;let r;t[2]!==e?(r=we.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let l;return t[4]!==o||t[5]!==i?(l={isSeen:o,markSeen:a,unseenCount:i},t[4]=o,t[5]=i,t[6]=l):l=t[6],l}function Mt(t){P[t]||zt({...P,[t]:{seenAt:new Date().toISOString()}})}const It=720*60*60*1e3,Lt=10080*60*1e3;function Pt(t){const[e,s,o]=t.split("-").map(Number);return!e||!s||!o?new Date(t).getTime():new Date(e,s-1,o).getTime()}function Ft(t){const e=we[0];if(!e)return null;const s=Pt(e.date),o=t-s;return o<0||o>It?null:e}function Rt(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function qt(t,e){const s=Rt(t);return s===null?!1:e-s>=Lt}function Ut(){const t=k.c(22),{data:e}=W.useSession(),{isSeen:s,markSeen:o}=Dt();let a,r,i;if(t[0]!==s||t[1]!==e?.user?.createdAt){i=Symbol.for("react.early_return_sentinel");e:{const g=Date.now();if(a=Ft(g),!a){i=null;break e}if(!qt(e?.user?.createdAt,g)){i=null;break e}r=s(a.id)}t[0]=s,t[1]=e?.user?.createdAt,t[2]=a,t[3]=r,t[4]=i}else a=t[2],r=t[3],i=t[4];if(i!==Symbol.for("react.early_return_sentinel"))return i;if(r)return null;let l;t[5]!==a.id||t[6]!==o?(l=()=>o(a.id),t[5]=a.id,t[6]=o,t[7]=l):l=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Ke,{size:14}),t[8]=d):d=t[8];let c;t[9]!==l?(c=n.jsx(C,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:l,children:d}),t[9]=l,t[10]=c):c=t[10];let u,m;t[11]!==a.id||t[12]!==o?(u=()=>o(a.id),m=()=>o(a.id),t[11]=a.id,t[12]=o,t[13]=u,t[14]=m):(u=t[13],m=t[14]);let f;t[15]!==a||t[16]!==u||t[17]!==m?(f=n.jsx(Ot,{release:a,onCtaClick:u,onLearnMoreClick:m}),t[15]=a,t[16]=u,t[17]=m,t[18]=f):f=t[18];let y;return t[19]!==c||t[20]!==f?(y=n.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[c,f]}),t[19]=c,t[20]=f,t[21]=y):y=t[21],y}const je=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),M=je?"⌘":"Ctrl",O={keyboardShortcuts:{keys:[M,"K"],description:"Keyboard shortcuts"},back:{keys:[M,"["],description:"Back to previous"},focusChatInput:{keys:[M,"L"],description:"Focus chat input"},saveAndFormat:{keys:[M,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[M,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[M,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",M,"S"],description:"New task"},toggleDaemon:{keys:[M,"D"],description:"Toggle daemon logs"}},Gt=[{label:"General",shortcuts:[O.keyboardShortcuts,O.back,O.newTask,O.toggleDaemon]},{label:"Editor",shortcuts:[O.saveAndFormat]},{label:"Chat",shortcuts:[O.focusChatInput,O.togglePlanMode,O.sendMessage,O.newLine]},{label:"Questions",shortcuts:[O.selectOption]},{label:"Monitoring",shortcuts:[O.applyFilter]}];function ge(t){return je?t.metaKey:t.ctrlKey}function Ht(t){const e=k.c(5),{open:s,onOpenChange:o}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(We,{children:n.jsx(Ye,{children:"Keyboard Shortcuts"})}),e[0]=a):a=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs(Be,{className:"sm:max-w-md",children:[a,n.jsx("div",{className:"flex flex-col gap-4",children:Gt.map(Kt)})]}),e[1]=r):r=e[1];let i;return e[2]!==o||e[3]!==s?(i=n.jsx(Je,{open:s,onOpenChange:o,children:r}),e[2]=o,e[3]=s,e[4]=i):i=e[4],i}function Kt(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Bt)})]},t.label)}function Bt(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Wt)})]},t.description)}function Wt(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Yt=300*1e3,Jt=2;function Qt(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Vt(){const t=k.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:se.appVersionCheck(),queryFn:Zt,refetchInterval:Yt,refetchIntervalInBackground:!0,staleTime:0},t[0]=e):e=t[0];const{data:s,dataUpdatedAt:o}=te(e),[a,r]=H.useState(0);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={version:null,count:0},t[1]=i):i=t[1];const[l,d]=H.useState(i);o!==a&&(r(o),d(y=>Qt(y,s,"4.29.1")));const c=l.count>=Jt;let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsxs(Qe,{children:[n.jsx(Ve,{children:"A new version is available"}),n.jsx(Xe,{children:"You're viewing an outdated version of this page. Refresh to get the latest updates."})]}),t[2]=u):u=t[2];let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(Ze,{children:[u,n.jsx(et,{children:n.jsx(tt,{onClick:Xt,children:"Refresh"})})]}),t[3]=m):m=t[3];let f;return t[4]!==c?(f=n.jsx(nt,{open:c,children:m}),t[4]=c,t[5]=f):f=t[5],f}function Xt(){return window.location.reload()}async function Zt(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function en({activeOrg:t}){return t&&(Ae(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ce()),null}function tn(t,e,s){if(!s)return null;const o=ot(t,e);return o?o.threads.get().find(r=>r.id===s)?.branch??null:null}function ve(t){return{queryKey:se.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function On(t){const e=k.c(10);let s;e[0]!==t?(s=ve(t),e[0]=t,e[1]=s):s=e[1];const o=te(s);let a;e[2]!==o.data?.prompts?(a=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=a):a=e[3];let r;e[4]!==o.data?.tiles?(r=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==o.isLoading||e[7]!==a||e[8]!==r?(i={isLoading:o.isLoading,prompts:a,tiles:r},e[6]=o.isLoading,e[7]=a,e[8]=r,e[9]=i):i=e[9],i}function nn(t){const e=k.c(17),{orgSlug:s,orgName:o,domain:a}=t;let r;e[0]!==s?(r=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=r):r=e[1];const i=r,l=sn;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let u;e[4]!==a||e[5]!==o?(u=o?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:o})," requires SSO authentication",a?` via ${a}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=a,e[5]=o,e[6]=u):u=e[6];let m;e[7]!==u?(m=n.jsxs("div",{className:"space-y-2",children:[c,n.jsx("p",{className:"text-sm text-muted-foreground",children:u})]}),e[7]=u,e[8]=m):m=e[8];let f;e[9]!==i?(f=n.jsx(C,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=f):f=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(C,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=y):y=e[11];let g;e[12]!==f?(g=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y]}),e[12]=f,e[13]=g):g=e[13];let h;return e[14]!==m||e[15]!==g?(h=n.jsxs(K,{children:[d,m,g]}),e[14]=m,e[15]=g,e[16]=h):h=e[16],h}function sn(){window.location.href="/"}function on(t){const e=k.c(8),{org:s,children:o}=t,r=ut(s.id,s.slug)?.enabled_plugins??null;let i;e[0]!==s.id||e[1]!==s.name||e[2]!==r?(i={id:s.id,organizationId:s.id,slug:"_org",name:s.name,enabledPlugins:r,ui:null},e[0]=s.id,e[1]=s.name,e[2]=r,e[3]=i):i=e[3];const l=i;let d;return e[4]!==o||e[5]!==s||e[6]!==l?(d=n.jsx(Fe,{org:s,project:l,children:o}),e[4]=o,e[5]=s,e[6]=l,e[7]=d):d=e[7],d}function an(){const t=Oe(),e=it(),{org:s,locator:o}=Te(),a=be({strict:!1}),r=Ee({strict:!1}),i=a.org??"",l=a.taskId??"",d=(h,p,b=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:h},search:p,replace:b}),c=(h,p=!0)=>d(l,h,p),u=h=>c(p=>({...p,chat:h?1:0})),m=(h,p,b)=>d(h,S=>{const x={chat:1};if(p?x.virtualmcpid=p:S.virtualmcpid&&(x.virtualmcpid=S.virtualmcpid),b?.main)x.main=b.main;else{const v=S.main;v&&typeof v=="string"&&!dt(v)&&(x.main=v)}return b?.autosend&&(x.autosend=at),x},!1);return{setChatOpen:u,setTaskId:m,createNewTask:async h=>{const p=crypto.randomUUID(),b=h??r.virtualmcpid??lt(s.id).id,x=b===r.virtualmcpid?tn(s.slug,o,l):null;try{await e?.create({id:p,virtual_mcp_id:b,...x?{branch:x}:{}})}catch{}m(p,b)},openTab:h=>d(l||crypto.randomUUID(),p=>({...p,main:h})),toggleMain:()=>c(h=>{if(h.main!==void 0&&h.main!=="0")return{...h,main:"0"};const b={...h};return delete b.main,b})}}function rn(){const t=k.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=$e(e)?.params.org;let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const{taskId:r}=be(a),[i,l]=H.useState(!1),d=ze(),c=o??"";let u;t[2]!==c?(u=ve(c),t[2]=c,t[3]=u):u=t[3];const m=!!o&&!r;let f;t[4]!==u||t[5]!==m?(f={...u,enabled:m},t[4]=u,t[5]=m,t[6]=f):f=t[6],te(f);const{data:y}=W.useSession(),g=y?.user?.id;let h;t[7]!==o||t[8]!==g?(h=o&&g?De(g,o):null,t[7]=o,t[8]=g,t[9]=h):h=t[9];const p=h;let b,S;t[10]!==d?(b=()=>{const j=A=>{if(ge(A)&&A.code==="KeyK"){A.preventDefault(),l(!0);return}ge(A)&&A.code==="BracketLeft"&&d.history.canGoBack()&&(A.preventDefault(),d.history.back())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},S=[d],t[10]=d,t[11]=b,t[12]=S):(b=t[11],S=t[12]),H.useEffect(b,S);let x;t[13]!==o?(x=se.activeOrganization(o),t[13]=o,t[14]=x):x=t[14];let v;t[15]!==o||t[16]!==g?(v=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await W.organization.getFullOrganization({query:{organizationSlug:o}}).finally(ln),A=ue(j);return j&&!A&&localStorage.setItem(B.lastOrgSlug(),o),g&&j&&Ie(g,o,j),j},t[15]=o,t[16]=g,t[17]=v):v=t[17];const N=p?p.data:void 0,T=p?.updatedAt;let $;t[18]!==v||t[19]!==N||t[20]!==T||t[21]!==x?($={queryKey:x,queryFn:v,initialData:N,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=N,t[20]=T,t[21]=x,t[22]=$):$=t[22];const{data:w}=ye($),E=w?.id,z=w?.slug,{data:_}=mt(E,z),ie=E??"",ae=z??"";let F;t[23]!==ie||t[24]!==ae?(F=rt({connectionId:ct,orgId:ie,orgSlug:ae}),t[23]=ie,t[24]=ae,t[25]=F):F=t[25];const re=!!E&&!!z;let J;if(t[26]!==F||t[27]!==re?(J={...F,enabled:re},t[26]=F,t[27]=re,t[28]=J):J=t[28],te(J),!w){let j;t[29]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Le,{}),t[29]=j):j=t[29];let A;return t[30]!==o?(A=n.jsx(H.Suspense,{fallback:j,children:n.jsx(Ct,{orgSlug:o})}),t[30]=o,t[31]=A):A=t[31],A}if(ue(w)){localStorage.getItem(B.lastOrgSlug())===o&&localStorage.removeItem(B.lastOrgSlug());let j;return t[32]!==w.name?(j=n.jsx(Me,{orgName:w.name}),t[32]=w.name,t[33]=j):j=t[33],j}if(_?.ssoRequired&&!_.authenticated){let j;return t[34]!==w.id||t[35]!==w.name||t[36]!==w.slug||t[37]!==_.domain?(j=n.jsx(nn,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:_.domain}),t[34]=w.id,t[35]=w.name,t[36]=w.slug,t[37]=_.domain,t[38]=j):j=t[38],j}const le=w.logo??null;let R;t[39]!==w||t[40]!==le?(R={...w,logo:le},t[39]=w,t[40]=le,t[41]=R):R=t[41];let q;t[42]!==w?(q=n.jsx(en,{activeOrg:w}),t[42]=w,t[43]=q):q=t[43];let Q,V;t[44]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(Pe,{}),V=n.jsx(Ut,{}),t[44]=Q,t[45]=V):(Q=t[44],V=t[45]);let U;t[46]!==i?(U=n.jsx(Ht,{open:i,onOpenChange:l}),t[46]=i,t[47]=U):U=t[47];let X;t[48]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Vt,{}),t[48]=X):X=t[48];let Z;return t[49]!==R||t[50]!==q||t[51]!==U?(Z=n.jsxs(on,{org:R,children:[q,Q,V,U,X]}),t[49]=R,t[50]=q,t[51]=U,t[52]=Z):Z=t[52],Z}function ln(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function cn(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(st,{children:n.jsx(rn,{})}),t[0]=e):e=t[0],e}const Tn=Object.freeze(Object.defineProperty({__proto__:null,default:cn,usePanelActions:an},Symbol.toStringTag,{value:"Module"}));export{O as K,we as R,Ot as a,an as b,On as c,ve as h,ge as i,tn as r,Tn as s,Dt as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,l as w,j as r,r as T,b9 as A,by as H,B as P}from"./index-d52A49fX.js";import{i as R}from"./LayoutLeft-CKcHwaHf.js";import{u as V}from"./use-mobile-Cqur1PpI.js";import{d as W,b as G,S as L,a as q,c as F}from"./sheet-DSSfro03.js";import{c as D,b as B,a as E,T as z}from"./tooltip-Bzas0fb8.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function le(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function re(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(G,{className:"sr-only",children:[r.jsx(L,{children:"Sidebar"}),r.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function ne(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function xe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function he(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{pe as S,be as a,me as b,he as c,xe as d,fe as e,ue as f,re as g,de as h,ce as i,oe as j,le as k,ie as l,ne as m,O as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as _,r as j,j as e,B as p,v as S,t as c,c as N}from"./index-d52A49fX.js";import{D as k}from"./domain-settings-Dk68eaoE.js";import{P as f}from"./index-BZQALusN.js";import{I as l}from"./input-B_5YyJ8y.js";import{S as z}from"./switch-CuT_exNr.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-DGL7haeQ.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-eWkjB3kv.js";import{s as L}from"./Trash01-myAGgKHr.js";import{R as q}from"./require-capability-C135EIMf.js";import"./studio-tools-nA7ZTnFV.js";import"./badge-B5li3mFX.js";import"./select-DdHVdWXn.js";import"./tooltip-Bzas0fb8.js";import"./Check-BqH5cjqe.js";import"./ChevronDown-DhzhS3K5.js";import"./ChevronUp-DPJfOoQR.js";import"./sidebar-BJwboMe2.js";import"./LayoutLeft-CKcHwaHf.js";import"./use-mobile-Cqur1PpI.js";import"./sheet-DSSfro03.js";import"./X-DRR7RtBP.js";import"./card-CCFrbS6S.js";import"./ArrowUpRight-B1XPsNPZ.js";import"./use-capability-C9whYnsG.js";import"./access-gate-Cf-kJrg7.js";import"./capability-load-error-D7uMbvO0.js";function B(){const{org:s}=_(),{data:a,isLoading:E}=P(s.id,s.slug),x=R(s.id,s.slug),h=A(s.id,s.slug),v=T(s.id,s.slug),[t,d]=j.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=j.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!t.issuer||!t.clientId||!t.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!t.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:t.issuer,clientId:t.clientId,clientSecret:t.clientSecret,discoveryEndpoint:t.discoveryEndpoint||void 0,scopes:t.scopes.split(/\s+/).filter(Boolean),domain:t.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:s.id,email_domain:t.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:s.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},D=async i=>{try{await v.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:s.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:D,disabled:v.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${s.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:t.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:t.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:t.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:t.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:t.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:t.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function pe(){const s=N.c(1);let a;return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(q,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),s[0]=a):a=s[0],a}export{pe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as D,j as s,E as le,r as K,D as ae,m as ce,b as de,e as me,B as Y,v as te,K as fe,d as ge,t as ie}from"./index-d52A49fX.js";import{i as ue}from"./AlertCircle-D90xu5-8.js";import{i as pe}from"./ChevronRight-DntNgeBz.js";import{s as xe}from"./Plus-DkGwhdIW.js";import{s as he}from"./Trash01-myAGgKHr.js";import{I as X}from"./input-B_5YyJ8y.js";import{S as oe}from"./switch-CuT_exNr.js";import{S as ye}from"./skeleton-Bl9k4gft.js";import{A as ne}from"./avatar-BrhzNA4d.js";import{P as je,a as Ce,b as ve}from"./popover-DlszYF1R.js";import{b as re}from"./use-connection-BLVjIktc.js";import{W as Z}from"./constants-nH3qQ_1f.js";import{P as G}from"./index-BZQALusN.js";import{u as Se}from"./use-registry-connections-HQM1hA3o.js";import{h as _e,i as be}from"./use-organization-settings-CnPdR5CP.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-eWkjB3kv.js";import{R as Re}from"./require-capability-C135EIMf.js";import"./User01-DuGAbO5F.js";import"./use-collections-BP4R8sI-.js";import"./use-mcp-client-QTh-uqf4.js";import"./auth-B8jeHTDK.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"./studio-tools-nA7ZTnFV.js";import"./card-CCFrbS6S.js";import"./ArrowUpRight-B1XPsNPZ.js";import"./use-capability-C9whYnsG.js";import"./access-gate-Cf-kJrg7.js";import"./capability-load-error-D7uMbvO0.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,v]=K.useState(""),[x,S]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>v(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>S(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:v}=t,x=de();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:h}=me(S);let f;e[1]!==r||e[2]!==v||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{v?x({to:v,params:{org:h}}):j(!r)},e[1]=r,e[2]=v,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(ve,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==v?(p=v&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=v,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=Se(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,v]=K.useState(!1);let x,S,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{v(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>v(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],S=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=S,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],S=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==S||t[52]!==f||t[53]!==d?(g=s.jsx(S,{title:f,children:d}),t[51]=S,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function pt(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{pt as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
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 m,b as n,e as c,j as t,i as p,r as l,ad as f}from"./index-d52A49fX.js";import{R as u}from"./require-capability-C135EIMf.js";import"./use-capability-C9whYnsG.js";import"./access-gate-Cf-kJrg7.js";import"./capability-load-error-D7uMbvO0.js";const g=l.lazy(()=>f(()=>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 j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function s(e){if(!e||!e.startsWith("automation:"))return null;const n=e.slice(11);return n?{id:n}:null}function o(e,n){return`app:${e}:${n}`}function f(e){if(!e||!e.startsWith("app:"))return null;const n=e.slice(4),t=n.indexOf(":");if(t<=0)return null;const i=n.slice(0,t),a=n.slice(t+1);return!i||!a?null:{connectionId:i,toolName:a}}function d(e){return`deck:${encodeURIComponent(e)}`}function p(e){if(!e||!e.startsWith("deck:"))return null;const n=e.slice(5);if(!n)return null;try{return{path:decodeURIComponent(n)}}catch{return null}}function m(e){return`file:${encodeURIComponent(e)}`}function T(e){if(!e||!e.startsWith("file:"))return null;const n=e.slice(5);if(!n)return null;try{return{key:decodeURIComponent(n)}}catch{return null}}function h(e){return`library-file:${encodeURIComponent(e)}`}function g(e){if(!e||!e.startsWith("library-file:"))return null;const n=e.slice(13);if(!n)return null;try{return{path:decodeURIComponent(n)}}catch{return null}}function y(e){return`code:${encodeURIComponent(e)}`}function b(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const n=e.slice(5);if(!n)return null;try{return{path:decodeURIComponent(n)}}catch{return null}}const u=["settings","automations","preview","blocks","code","content","git"],l=new Set(u);function v(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")}const r=new Set(["instructions","connections","layout","settings"]);function k(e){return!!e&&r.has(e)}function c(e){const n=e?.defaultMainView??null;if(!n||r.has(n.type))return"settings";if(l.has(n.type))return n.type;if(n.type==="ext-app"||n.type==="ext-apps"){if(n.id&&n.toolName)return o(n.id,n.toolName);const t=e?.tabs?.map(i=>i.id)??[];return n.id&&t.includes(n.id)?n.id:t[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function C(e){const n=c(e.metadata);if(e.mainParam==="0")return{mainOpen:!1,activeTab:n};if(e.mainParam===void 0){const t=e.metadata?.defaultMainView??null;return{mainOpen:!(t==null||t.type==="chat"),activeTab:n}}return r.has(e.mainParam)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:e.mainParam}}function I(e){return e.mainOpen&&e.clickedId===e.activeTab?e.clickedId==="blocks"?"preview":"0":e.clickedId}function S(e){return e.mainOpen?e.activeTab==="automations"?!0:s(e.activeTab)!==null:!1}function W(e){return e.mainOpen&&e.activeTab==="automations"?"0":"automations"}export{u as F,C as a,T as b,p as c,g as d,I as e,o as f,y as g,b as h,k as i,f as j,S as k,W as l,h as m,d as n,m as o,s as p,v as q,c as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,l as y,j as t,af as G}from"./index-d52A49fX.js";import{i as K}from"./Zap-CMZ9cCJz.js";import{T as U,a as V,b as W}from"./tooltip-Bzas0fb8.js";import{a as q}from"./use-virtual-mcp-n0IfHFn6.js";import{A as H}from"./agent-icon-BvZm1osM.js";import{g as J}from"./task-status-CNEAWeje.js";import{f as L}from"./format-time-Cy7tTmZp.js";import{a as O}from"./agent-capabilities-Cpju5Yfe.js";import{u as Q}from"./use-clock-tick-B6ygxook.js";function X(v){return v==="ephemeral"||v.startsWith("thread:")}function ae(v){const e=$.c(40),{task:s,isActive:b,onClick:o,onArchive:h,showAutomationBadge:I,showAgentIcon:w,hideStatusIdle:S,indented:B}=v,A=J(s.status),D=A.icon,j=s.metadata?.kind==="tool_call_run",i=q(j?void 0:s.virtual_mcp_id);let k;e[0]!==i?(k=O(i),e[0]=i,e[1]=k):k=e[1];const x=k;Q(6e4);const T=I||!!s.trigger_id,E=s.id,F="button",M=0;let r;e[2]!==o?(r=n=>{n.target===n.currentTarget&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),o())},e[2]=o,e[3]=r):r=e[3];const _=B?"-ml-4 pl-6":"pl-2",C=b?"bg-accent text-accent-foreground":"hover:bg-accent/60";let a;e[4]!==_||e[5]!==C?(a=y("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",_,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=_,e[5]=C,e[6]=a):a=e[6];let l;e[7]!==j||e[8]!==w||e[9]!==i?.icon||e[10]!==i?.title?(l=w&&!j&&t.jsx(H,{icon:i?.icon??null,name:i?.title??"?",size:"2xs"}),e[7]=j,e[8]=w,e[9]=i?.icon,e[10]=i?.title,e[11]=l):l=e[11];let c;e[12]!==T?(c=T&&t.jsx(K,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=T,e[13]=c):c=e[13];const z=s.title||"Untitled task";let d;e[14]!==z?(d=t.jsx("div",{className:"text-sm text-foreground truncate",children:z}),e[14]=z,e[15]=d):d=e[15];let u;e[16]!==c||e[17]!==d?(u=t.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[c,d]}),e[16]=c,e[17]=d,e[18]=u):u=e[18];let m;e[19]!==x||e[20]!==b||e[21]!==s.branch||e[22]!==s.updated_at?(m=s.updated_at&&t.jsxs("div",{className:y("flex items-center gap-1 text-[11px] min-w-0",b?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!X(s.branch)?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"truncate font-mono",children:s.branch}),t.jsx("span",{className:"shrink-0",children:"·"})]}):x?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"truncate",children:[x.owner,"/",x.name]}),t.jsx("span",{className:"shrink-0",children:"·"})]}):null,t.jsx("span",{className:"shrink-0",children:L(new Date(s.updated_at))})]}),e[19]=x,e[20]=b,e[21]=s.branch,e[22]=s.updated_at,e[23]=m):m=e[23];let p;e[24]!==u||e[25]!==m?(p=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,m]}),e[24]=u,e[25]=m,e[26]=p):p=e[26];const P="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!S&&t.jsx("span",{className:y("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",h&&"group-hover/row:opacity-0"),"aria-label":A.label,children:t.jsx(D,{size:14,className:y(A.iconClassName,s.status==="in_progress"&&"animate-spin")})});let f;e[27]!==h?(f=h&&t.jsxs(U,{children:[t.jsx(V,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":"Archive task",onClick:n=>{n.stopPropagation(),h()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:t.jsx(G,{size:14})})}),t.jsx(W,{side:"right",children:"Archive"})]}),e[27]=h,e[28]=f):f=e[28];let g;e[29]!==R||e[30]!==f?(g=t.jsxs("div",{className:P,children:[R,f]}),e[29]=R,e[30]=f,e[31]=g):g=e[31];let N;return e[32]!==o||e[33]!==p||e[34]!==g||e[35]!==r||e[36]!==a||e[37]!==l||e[38]!==s.id?(N=t.jsxs("div",{"data-task-id":E,role:F,tabIndex:M,onClick:o,onKeyDown:r,className:a,children:[l,p,g]}),e[32]=o,e[33]=p,e[34]=g,e[35]=r,e[36]=a,e[37]=l,e[38]=s.id,e[39]=N):N=e[39],N}export{ae as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as o}from"./AlertCircle-D90xu5-8.js";import{i as t}from"./CheckCircle-CebfgxLq.js";import{i as r}from"./Circle-umqkxNwx.js";import{ar as a}from"./agent-icon-BvZm1osM.js";import{i as n}from"./index-d52A49fX.js";import{a as i}from"./XCircle-Cz7czjsw.js";const l={requires_action:{label:"Needs review",verb:"Waiting for your review",icon:o,iconClassName:"text-orange-500",labelColor:"text-orange-600 dark:text-orange-400"},failed:{label:"Failed",verb:"Something went wrong",icon:i,iconClassName:"text-red-500",labelColor:"text-red-600 dark:text-red-400"},expired:{label:"Timed out",verb:"Stopped responding",icon:a,iconClassName:"text-amber-500",labelColor:"text-amber-600 dark:text-amber-400"},in_progress:{label:"Running",verb:"Agent is working",icon:n,iconClassName:"text-blue-500",labelColor:"text-blue-600 dark:text-blue-400"},completed:{label:"Done",verb:"Completed",icon:t,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},m={label:"Unknown",verb:"Unknown status",icon:r,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function x(e){return l[e??"completed"]??m}export{l as S,x as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c,r as m,j as r,l as x,e as $,ae as h,T as k,F as N,G as C}from"./index-d52A49fX.js";const T=m.createContext(null);function u(){const t=m.use(T);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function p(t){const e=c.c(8),{children:s}=t,[l,o]=m.useState(null),[n,a]=m.useState(null),[f,E]=m.useState(null),[b,S]=m.useState(null);let g;e[0]!==f||e[1]!==b||e[2]!==n||e[3]!==l?(g={togglesEl:l,setTogglesEl:o,tabsEl:n,setTabsEl:a,centerEl:f,setCenterEl:E,rightEl:b,setRightEl:S},e[0]=f,e[1]=b,e[2]=n,e[3]=l,e[4]=g):g=e[4];let d;return e[5]!==s||e[6]!==g?(d=r.jsx(T,{value:g,children:s}),e[5]=s,e[6]=g,e[7]=d):d=e[7],d}function i(t){const e=c.c(2),{children:s}=t;let l;return e[0]!==s?(l=r.jsx(p,{children:r.jsx("div",{className:"flex flex-col h-full min-h-0",children:s})}),e[0]=s,e[1]=l):l=e[1],l}function L(t){const e=c.c(10);let s,l,o;e[0]!==t?({children:s,className:l,...o}=t,e[0]=t,e[1]=s,e[2]=l,e[3]=o):(s=e[1],l=e[2],o=e[3]);let n;e[4]!==l?(n=x("app-titlebar wco-drag shrink-0 grid grid-cols-3 items-center pl-1 pr-2 pt-0.25 h-12 bg-sidebar",l),e[4]=l,e[5]=n):n=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=r.jsx("div",{className:n,...o,children:s}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a}function v(t){const e=c.c(2),{children:s}=t;let l;return e[0]!==s?(l=r.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:s}),e[0]=s,e[1]=l):l=e[1],l}function y(t){const e=c.c(2),{children:s}=t;let l;return e[0]!==s?(l=r.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:s}),e[0]=s,e[1]=l):l=e[1],l}function R(){const t=c.c(7),s=N().logo??C,l=typeof s=="string"?s:s.light,o=typeof s=="string"?s:s.dark;let n;t[0]!==l?(n=r.jsx("img",{src:l,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=l,t[1]=n):n=t[1];let a;t[2]!==o?(a=r.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=o,t[3]=a):a=t[3];let f;return t[4]!==n||t[5]!==a?(f=r.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[n,a]}),t[4]=n,t[5]=a,t[6]=f):f=t[6],f}function j(){const t=c.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(m.Suspense,{fallback:r.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:r.jsx(R,{})}),t[0]=e):e=t[0],e}function w(){const t=c.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=$(e);let l;t[1]!==s?(l={org:s},t[1]=s,t[2]=l):l=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(j,{}),t[3]=o):o=t[3];let n;return t[4]!==l?(n=r.jsx(k,{to:"/$org",params:l,"aria-label":"Back to home",title:"Back to home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:o}),t[4]=l,t[5]=n):n=t[5],n}function P(){const t=c.c(2),{setCenterEl:e}=u();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=s):s=t[1],s}function _(t){const e=c.c(3),{children:s}=t,{centerEl:l}=u();if(!l)return null;let o;return e[0]!==l||e[1]!==s?(o=h.createPortal(s,l),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function z(t){const e=c.c(5),{className:s}=t,{setTabsEl:l}=u();let o;e[0]!==s?(o=x("shrink-0 flex items-center",s),e[0]=s,e[1]=o):o=e[1];let n;return e[2]!==l||e[3]!==o?(n=r.jsx("div",{ref:l,className:o}),e[2]=l,e[3]=o,e[4]=n):n=e[4],n}function B(t){const e=c.c(3),{children:s}=t,{tabsEl:l}=u();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=h.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function D(t){const e=c.c(5),{className:s}=t,{setTogglesEl:l}=u();let o;e[0]!==s?(o=x("contents",s),e[0]=s,e[1]=o):o=e[1];let n;return e[2]!==l||e[3]!==o?(n=r.jsx("div",{ref:l,className:o}),e[2]=l,e[3]=o,e[4]=n):n=e[4],n}function F(t){const e=c.c(3),{children:s}=t,{togglesEl:l}=u();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=h.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function G(){const t=c.c(2),{setRightEl:e}=u();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=s):s=t[1],s}function H(t){const e=c.c(3),{children:s}=t,{rightEl:l}=u();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=h.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}i.Provider=p;i.Header=L;i.LeftColumn=v;i.RightColumn=y;i.Logo=j;i.LogoLink=w;i.CenterSlot=P;i.Center=_;i.TabsSlot=z;i.Tabs=B;i.TogglesSlot=D;i.Toggles=F;i.RightSlot=G;i.Right=H;export{i as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as h,D as I,K as T,q as b,W as C,a0 as k,j as o}from"./index-d52A49fX.js";import{i as N}from"./mcp-oauth-CSUfdVCn.js";import{B as x}from"./badge-B5li3mFX.js";import{T as y,a as j,b as g,c as S}from"./tooltip-Bzas0fb8.js";import{g as _}from"./types-B2Xs3OM7.js";import{s as $}from"./Eye-o8ajkfvt.js";import{s as A}from"./Star01-twQgP5oO.js";import{ap as w}from"./agent-icon-BvZm1osM.js";function D(m){const e=h.c(11),{connectionId:a}=m,{org:r}=I();let i,t,l;e[0]!==a||e[1]!==r.slug?(i=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin),l=b,t=T.isMCPAuthenticated(i.href,null),e[0]=a,e[1]=r.slug,e[2]=i,e[3]=t,e[4]=l):(i=e[2],t=e[3],l=e[4]);let s;e[5]!==i||e[6]!==r.id?(s=()=>N({url:i.href,token:null,orgId:r.id}),e[5]=i,e[6]=r.id,e[7]=s):s=e[7];let n;e[8]!==t||e[9]!==s?(n={queryKey:t,queryFn:s},e[8]=t,e[9]=s,e[10]=n):n=e[10];const{data:c}=l(n);return c}const H=[{key:"readOnlyHint",label:"Read-only",Icon:$,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:C,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:k,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function M(m){const e=h.c(18),{annotations:a,_meta:r}=m;let i;e[0]!==r?(i=_(r),e[0]=r,e[1]=i):i=e[1];const t=!!i;let l,s,n,c,u;if(e[2]!==a||e[3]!==t){u=Symbol.for("react.early_return_sentinel");e:{const f=a?H.filter(v=>a[v.key]===!0):[];if(f.length===0&&!t){u=null;break e}l=S,s="flex gap-1 flex-nowrap",e[9]!==t?(n=t&&o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:o.jsx(w,{})})}),o.jsx(g,{children:"Interactive"})]}),e[9]=t,e[10]=n):n=e[10],c=f.map(P)}e[2]=a,e[3]=t,e[4]=l,e[5]=s,e[6]=n,e[7]=c,e[8]=u}else l=e[4],s=e[5],n=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==s||e[12]!==n||e[13]!==c?(d=o.jsxs("div",{className:s,children:[n,c]}),e[11]=s,e[12]=n,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==l||e[16]!==d?(p=o.jsx(l,{children:d}),e[15]=l,e[16]=d,e[17]=p):p=e[17],p}function P(m){const{label:e,Icon:a,variant:r}=m;return o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:r,className:"size-6 p-1",children:o.jsx(a,{})})}),o.jsx(g,{children:e})]},e)}export{M as T,D as u};
|