decocms 3.73.1 → 3.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DMqR3m0L.js → AlertCircle-Ccspj6_x.js} +1 -1
- package/dist/client/assets/ArrowRight-DjM-WAe8.js +1 -0
- package/dist/client/assets/{ArrowUpRight-DeYzuaJ8.js → ArrowUpRight-tJm1fmd7.js} +1 -1
- package/dist/client/assets/Check-D3J8f8u-.js +1 -0
- package/dist/client/assets/{CheckCircle-D6b8lFUP.js → CheckCircle-2NPq-6dO.js} +1 -1
- package/dist/client/assets/{ChevronDown-CYFvWHpZ.js → ChevronDown-Dilz0yBl.js} +1 -1
- package/dist/client/assets/{ChevronLeft-DXSAgzPw.js → ChevronLeft-CJ5DBM3M.js} +1 -1
- package/dist/client/assets/{ChevronRight-Dj41DV2U.js → ChevronRight-KEtpzT4P.js} +1 -1
- package/dist/client/assets/ChevronUp-B5x1falF.js +1 -0
- package/dist/client/assets/{DotsVertical-y5lMfVOQ.js → DotsVertical-BM5d8Pc7.js} +1 -1
- package/dist/client/assets/{Eye-D3THRXh6.js → Eye-hHNCwVZ1.js} +1 -1
- package/dist/client/assets/{FilterLines-BPeCeYIz.js → FilterLines-DfVdVEBp.js} +1 -1
- package/dist/client/assets/{Globe01-BquIL2vg.js → Globe01-DD8UM4Hn.js} +1 -1
- package/dist/client/assets/{Globe04-BBRZWdJY.js → Globe04-CHjKQaGv.js} +1 -1
- package/dist/client/assets/{HardDrive-DmtpWveq.js → HardDrive-ClhqImrT.js} +1 -1
- package/dist/client/assets/{Key01-Lcx9qTy7.js → Key01-BYHEvjL0.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CkiSxkS_.js → LayoutLeft-BNwcfVCc.js} +1 -1
- package/dist/client/assets/{LinkExternal01-jwO28Eeb.js → LinkExternal01-BqsD3A6i.js} +1 -1
- package/dist/client/assets/{Monitor01-L6hrk62b.js → Monitor01-BqllG5YD.js} +1 -1
- package/dist/client/assets/{Palette-ClNyQOQA.js → Palette-CdtyN2t7.js} +1 -1
- package/dist/client/assets/{Play-C6QgiUls.js → Play-DpX5JUyA.js} +1 -1
- package/dist/client/assets/{Plus-_82_8sq8.js → Plus-BaLwS14l.js} +1 -1
- package/dist/client/assets/{SearchMd-C3Pmxf99.js → SearchMd-CJ_dFCp5.js} +1 -1
- package/dist/client/assets/{Settings02-B7hO-Tma.js → Settings02-Cg6Yp6Ig.js} +1 -1
- package/dist/client/assets/{Shield01-RDE62wRx.js → Shield01-DYwaNnY3.js} +1 -1
- package/dist/client/assets/{Star01-BfSEPDRT.js → Star01-D42mJCl7.js} +1 -1
- package/dist/client/assets/{Stars01-W6Wl0Pse.js → Stars01-CrB442jN.js} +1 -1
- package/dist/client/assets/{Stars02-9vF61uFx.js → Stars02-C2akJW-A.js} +1 -1
- package/dist/client/assets/{Sun-BxuJFhF6.js → Sun-CgYYfF85.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-yw5VS97V.js → SwitchHorizontal01-y3DhestF.js} +1 -1
- package/dist/client/assets/{Tool01-B4SsemMS.js → Tool01-CI_6KMgQ.js} +1 -1
- package/dist/client/assets/{Trash01-CG0gTYx7.js → Trash01-Cd_0JhhN.js} +1 -1
- package/dist/client/assets/{Upload01-BlvGy5d-.js → Upload01-ijsbLMSK.js} +1 -1
- package/dist/client/assets/{User01-CTuKNCEa.js → User01-BI5RuTWy.js} +1 -1
- package/dist/client/assets/{Users01-KXiCgru2.js → Users01-LhAUtJ2l.js} +1 -1
- package/dist/client/assets/{Users03-BOvyNEV4.js → Users03-CJf6bBEA.js} +1 -1
- package/dist/client/assets/{X-CKIhVHQk.js → X-BmA2kYv-.js} +1 -1
- package/dist/client/assets/XCircle-CSVmVGl-.js +1 -0
- package/dist/client/assets/{XClose-Ig7y9gcI.js → XClose-BGGuhSdx.js} +1 -1
- package/dist/client/assets/{Zap-w60sxAoc.js → Zap-C5OGTH44.js} +1 -1
- package/dist/client/assets/{ZapSquare-C7yt7KfQ.js → ZapSquare-Bh6-lHaM.js} +1 -1
- package/dist/client/assets/{ZoomOut-DVSwpwUz.js → ZoomOut-xDQo2yr7.js} +1 -1
- package/dist/client/assets/{access-gate-CEtgmlCt.js → access-gate-C-eMG1Ta.js} +1 -1
- package/dist/client/assets/add-section-modal-DNNafM9O.js +1 -0
- package/dist/client/assets/agent-icon-Bcqwo2Wq.js +1 -0
- package/dist/client/assets/agents-list-obMS8uxZ.js +1 -0
- package/dist/client/assets/ai-providers-apfL_rjp.js +1 -0
- package/dist/client/assets/{alert-DIqgQstn.js → alert-B1Ln6zZV.js} +1 -1
- package/dist/client/assets/{alert-dialog-BuJSufuR.js → alert-dialog-BZRM5ze7.js} +3 -3
- package/dist/client/assets/app-editor-C0jI2dDZ.js +1 -0
- package/dist/client/assets/{auth-catchall-CHUZWWSw.js → auth-catchall-s-1qzuNO.js} +1 -1
- package/dist/client/assets/auth-entry-CW5gsTiA.js +1 -0
- package/dist/client/assets/{auth-tkqpBHf1.js → auth-rl3GT7t8.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DRR0KEkj.js → auth-split-layout-BC0lphRW.js} +1 -1
- package/dist/client/assets/{automation-list-row-40GibzkL.js → automation-list-row-DefMjeyu.js} +1 -1
- package/dist/client/assets/{automation-runs-BEntIYkJ.js → automation-runs-C-Da4MEd.js} +1 -1
- package/dist/client/assets/automations-CbOSvhEe.js +1 -0
- package/dist/client/assets/{avatar-DfTXVgX9.js → avatar-CXZnLPEU.js} +1 -1
- package/dist/client/assets/backoff-CrEUbyZT.js +1 -0
- package/dist/client/assets/{badge-an9iff2c.js → badge-DSiiJMKS.js} +1 -1
- package/dist/client/assets/{block-document-DZEmtfok.js → block-document-DR_-i1iv.js} +1 -1
- package/dist/client/assets/{brand-context-BhD6vM0G.js → brand-context-D385RFi4.js} +1 -1
- package/dist/client/assets/buckets-CfLzGo42.js +1 -0
- package/dist/client/assets/{calendar-tEWC6_XV.js → calendar-CdvLiXTi.js} +1 -1
- package/dist/client/assets/{capability-load-error-BXEh1mp-.js → capability-load-error-Cc0Imt5p.js} +1 -1
- package/dist/client/assets/{card-Ckx3Kwvj.js → card-DSDTRgoU.js} +1 -1
- package/dist/client/assets/category-editor-sMElZzN1.js +1 -0
- package/dist/client/assets/chat-context-DnaexSAo.js +21 -0
- package/dist/client/assets/checkbox-CL_5fiO_.js +1 -0
- package/dist/client/assets/{cli-auth-success-DWLJa27h.js → cli-auth-success-DV-qTae_.js} +1 -1
- package/dist/client/assets/collection-detail-CtoW7iVa.js +1 -0
- package/dist/client/assets/collection-display-button-Boq8hl8Q.js +1 -0
- package/dist/client/assets/{collection-search-CCzYANV5.js → collection-search-2g11_WBH.js} +1 -1
- package/dist/client/assets/{collection-tabs-CBstOc4r.js → collection-tabs-CDMyDuFK.js} +1 -1
- package/dist/client/assets/{command-pIEd50-L.js → command-Bw_f0kDn.js} +1 -1
- package/dist/client/assets/commerce-onboarding-LL_9usA-.js +1 -0
- package/dist/client/assets/connect-desktop-dialog-Dybq2Hx1.js +1 -0
- package/dist/client/assets/{connection-card-CqvtHNnU.js → connection-card-DA1t_KQo.js} +1 -1
- package/dist/client/assets/connection-detail-C3h6Iqqu.js +1 -0
- package/dist/client/assets/{connection-form-helpers-ByFrPc9N.js → connection-form-helpers-BqK6S8Yx.js} +1 -1
- package/dist/client/assets/connections-BdIG1myf.js +1 -0
- package/dist/client/assets/context-menu-KaWlIbj1.js +1 -0
- package/dist/client/assets/{decopilot-D6xQ1qh2.js → decopilot-fUgUe2Eh.js} +1 -1
- package/dist/client/assets/decopilot-sse-pool-Dl1x5tdf.js +1 -0
- package/dist/client/assets/delay-CnY5UFtP.js +1 -0
- package/dist/client/assets/dialog-CQ6B0IwC.js +1 -0
- package/dist/client/assets/{domain-settings-DIU6G_-3.js → domain-settings-BvzKBAZm.js} +1 -1
- package/dist/client/assets/drawer-mbT59SGx.js +1 -0
- package/dist/client/assets/dropdown-menu-bs6nmOyP.js +1 -0
- package/dist/client/assets/{empty-state-BrSxZrfZ.js → empty-state-crYivviN.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CBzjCfJ2.js → extract-connection-data-D-Y4GRfE.js} +1 -1
- package/dist/client/assets/file-explorer-iYX8uF4-.js +2 -0
- package/dist/client/assets/{file-type-icon-BOPDPlds.js → file-type-icon-D0ASmNXK.js} +1 -1
- package/dist/client/assets/{files-cbAPSaRo.js → files-ENTpyfhv.js} +1 -1
- package/dist/client/assets/{form-BZY9ZRz4.js → form-O9DEtf_L.js} +1 -1
- package/dist/client/assets/general-BJWZpnpu.js +1 -0
- package/dist/client/assets/{github-repo-picker-CrW8szfE.js → github-repo-picker-CHTvfJAD.js} +1 -1
- package/dist/client/assets/{hooks-DLdyjUhZ.js → hooks-CSfRJCjt.js} +6 -6
- package/dist/client/assets/image-field-BdcHkDRx.js +1 -0
- package/dist/client/assets/{import-from-deco-dialog-BVpWCCC9.js → import-from-deco-dialog-Bz8FE0_9.js} +2 -2
- package/dist/client/assets/{index-CqHy6432.js → index-7a12TwCl.js} +10 -10
- package/dist/client/assets/{index-BBz_54sx.js → index-B4I34F6K.js} +1 -1
- package/dist/client/assets/{index-CszBxeF9.js → index-BFeGPSf0.js} +1 -1
- package/dist/client/assets/{index-BwhwNs2D.js → index-BK1jVztm.js} +4 -4
- package/dist/client/assets/{index-CE8AoMpS.js → index-BPuJ390n.js} +1 -1
- package/dist/client/assets/{index-DexxTctJ.js → index-BRnQ22g3.js} +1 -1
- package/dist/client/assets/index-B_6khNsr.js +1 -0
- package/dist/client/assets/{index-xsAZnQ1t.js → index-BsWl8UuV.js} +1 -1
- package/dist/client/assets/index-C9uGIJ2-.js +1 -0
- package/dist/client/assets/{index-BY2TC4bG.js → index-CGoh8mx2.js} +2 -2
- package/dist/client/assets/{index-C3Ab2DJ2.js → index-D0U_smqt.js} +29 -29
- package/dist/client/assets/{index-BQXvSs-s.js → index-DHLJyA5u.js} +3 -3
- package/dist/client/assets/{index-C4w1u5Cz.js → index-D_UY8Zf9.js} +1 -1
- package/dist/client/assets/{index-WHuW26DU.js → index-DvTimAjS.js} +12 -12
- package/dist/client/assets/{index-redirect-DHc9uFFV.js → index-redirect-CPy0Z1T_.js} +1 -1
- package/dist/client/assets/{input-BmmiCY6T.js → input-Ccm3ShdT.js} +1 -1
- package/dist/client/assets/{integration-icon-CFvT6ZpF.js → integration-icon-BjRqMG3n.js} +1 -1
- package/dist/client/assets/label-KRKjsQLR.js +1 -0
- package/dist/client/assets/login-B5WUG2bv.js +1 -0
- package/dist/client/assets/{mcp-oauth-BGmk7Mi5.js → mcp-oauth-Ccqa98JF.js} +1 -1
- package/dist/client/assets/{members-DO2LVAyy.js → members-BwXKPt6c.js} +2 -2
- package/dist/client/assets/{monaco-editor-yw8USVwR.js → monaco-editor-DztiaMte.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BuR-EBQ0.js → monitoring-stats-row-DY_Jk7Qu.js} +1 -1
- package/dist/client/assets/{oauth-callback-wtZvQiOu.js → oauth-callback-B5Sy5Cax.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-17H-B-SW.js → oauth-callback-ai-provider-DFLSFrMH.js} +1 -1
- package/dist/client/assets/onboarding-tnqH6jke.js +1 -0
- package/dist/client/assets/{org-install-e7rNwps-.js → org-install-CMfEhUPU.js} +1 -1
- package/dist/client/assets/org-layout-DWTGapvu.js +1 -0
- package/dist/client/assets/organization-choice-BhcilQzG.js +1 -0
- package/dist/client/assets/{page-seo-form-BgMsVAcV.js → page-seo-form-CworrxTj.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CU9OHYe8.js +1 -0
- package/dist/client/assets/popover-CQIMDVug.js +1 -0
- package/dist/client/assets/post-editor-BgM1RATm.js +1 -0
- package/dist/client/assets/preview-dialog-CJENsRWm.js +5 -0
- package/dist/client/assets/{primitives-BcfJna5s.js → primitives-qIzOEfAk.js} +1 -1
- package/dist/client/assets/profile-B0-E7bKd.js +1 -0
- package/dist/client/assets/project-app-view-CMI1MfV-.js +1 -0
- package/dist/client/assets/record-editor-DGdCVdoZ.js +1 -0
- package/dist/client/assets/registry-D-K5v381.js +2 -0
- package/dist/client/assets/{registry-layout-t_GwGR-W.js → registry-layout-Cy0i7eVL.js} +4 -4
- package/dist/client/assets/require-capability-D9TOSbgf.js +1 -0
- package/dist/client/assets/required-auth-layout-D9FVCOQl.js +1 -0
- package/dist/client/assets/{reset-password-CPoVJQh2.js → reset-password-m90-iQba.js} +1 -1
- package/dist/client/assets/roles-m5faIEUW.js +1 -0
- package/dist/client/assets/save-referenced-block-CtS93Zrw.js +1 -0
- package/dist/client/assets/save-status-Dr27404A.js +1 -0
- package/dist/client/assets/{schema-form-D8_e7uDj.js → schema-form-Bpex2GV2.js} +1 -1
- package/dist/client/assets/{scroll-area-DwqNfKe5.js → scroll-area-DbztbmuO.js} +7 -7
- package/dist/client/assets/{search-input-DjHO_xeh.js → search-input-C742tJr8.js} +1 -1
- package/dist/client/assets/secrets-DbY4hLUu.js +1 -0
- package/dist/client/assets/{sections-editor-D8YHUjur.js → sections-editor-DJuNcR6f.js} +2 -2
- package/dist/client/assets/select-COSJe-70.js +1 -0
- package/dist/client/assets/{select-model-4ZBcZdkE.js → select-model-Cv_gN_vr.js} +1 -1
- package/dist/client/assets/seo-editor-ynZ80zTU.js +1 -0
- package/dist/client/assets/settings-layout-D5cpx9f5.js +1 -0
- package/dist/client/assets/{settings-section-Dxa_AxFP.js → settings-section-C-zTpCRT.js} +1 -1
- package/dist/client/assets/{sheet-COdJ-0Qy.js → sheet-CuyenB5M.js} +1 -1
- package/dist/client/assets/shell-controls-fwD6Be98.js +1 -0
- package/dist/client/assets/shell-layout-BhblvLd4.js +1 -0
- package/dist/client/assets/shell-route-loading-ClsKn-Oj.js +1 -0
- package/dist/client/assets/{sidebar-DCgpgzJu.js → sidebar-BYFEz6-7.js} +1 -1
- package/dist/client/assets/skeleton-DHas8e4O.js +1 -0
- package/dist/client/assets/{sortable.esm-LmSoSdxy.js → sortable.esm-CtBH0PGw.js} +1 -1
- package/dist/client/assets/sso-BFO9vLZv.js +1 -0
- package/dist/client/assets/{store-Dj11zgxF.js → store-C9F0E0yc.js} +1 -1
- package/dist/client/assets/store-registry-D8kCyVob.js +2 -0
- package/dist/client/assets/studio-tools-DO12gBMa.js +1 -0
- package/dist/client/assets/switch-By8vCxNg.js +1 -0
- package/dist/client/assets/table-BgkbBxMz.js +1 -0
- package/dist/client/assets/{tabs-BcUIMPwc.js → tabs-DPoZSyfS.js} +1 -1
- package/dist/client/assets/{task-status-BfQltC__.js → task-status-D9k3BLzM.js} +1 -1
- package/dist/client/assets/textarea-DQwh6y_K.js +1 -0
- package/dist/client/assets/{toggle-group-Cp4C3_lM.js → toggle-group-CW5GRzAp.js} +1 -1
- package/dist/client/assets/{toolbar-DyjTkAru.js → toolbar-1QmqWl6-.js} +1 -1
- package/dist/client/assets/tooltip-DO1R3Vmb.js +1 -0
- package/dist/client/assets/{types-7ak1Ve40.js → types-pBNKtzBp.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CC3uGtbf.js → use-ai-providers-qobt2OiH.js} +1 -1
- package/dist/client/assets/{use-automations-D2hKtMe8.js → use-automations-BwoNV2me.js} +1 -1
- package/dist/client/assets/use-capability-C09ZF9_G.js +1 -0
- package/dist/client/assets/{use-clock-tick-SbPzFjh0.js → use-clock-tick-_1lW4UqP.js} +1 -1
- package/dist/client/assets/{use-collections-DrlB7sAG.js → use-collections-DRgt6Bb8.js} +1 -1
- package/dist/client/assets/use-connection-XfA-QrSw.js +1 -0
- package/dist/client/assets/use-copy-DyplBFAe.js +1 -0
- package/dist/client/assets/use-create-virtual-mcp-BJFWHgGz.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-C4B5942u.js → use-debounced-autosave-DqciCJ__.js} +1 -1
- package/dist/client/assets/use-deco-credits-CyoNix9p.js +1 -0
- package/dist/client/assets/{use-delete-connection-C_lUSAxo.js → use-delete-connection-CweyK7E_.js} +1 -1
- package/dist/client/assets/use-file-configs-OLHA7dwa.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-CaTJY2LS.js → use-infinite-scroll-BbUZw7ju.js} +1 -1
- package/dist/client/assets/{use-join-requests-Bf6--Yng.js → use-join-requests-CHh2Zrhx.js} +1 -1
- package/dist/client/assets/use-mcp-client-DilmxmKU.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-5xEBY9_7.js → use-mcp-prompts-D2ueJ3CD.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CYtQa-6Z.js → use-mcp-tools-uucJgbkt.js} +1 -1
- package/dist/client/assets/{use-members-BWyLHt4a.js → use-members-Y5iRty7v.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-HvaD8xDj.js +1 -0
- package/dist/client/assets/{use-org-auth-client-Blpkj8FB.js → use-org-auth-client-Dl_7zTlg.js} +1 -1
- package/dist/client/assets/{use-org-sso-CEQ82hSZ.js → use-org-sso-9Z0u5sV3.js} +1 -1
- package/dist/client/assets/{use-organization-roles-lBgqu0F4.js → use-organization-roles-C8kGFpoE.js} +1 -1
- package/dist/client/assets/use-organization-settings-B5vS3xHV.js +1 -0
- package/dist/client/assets/{use-registry-connections-CK9xDmAR.js → use-registry-connections-DhFpf503.js} +1 -1
- package/dist/client/assets/use-secrets-DtlQfYRK.js +1 -0
- package/dist/client/assets/{use-status-sounds-C5Tq4YPI.js → use-status-sounds-BSqGti4P.js} +1 -1
- package/dist/client/assets/{use-view-mode-Dz9A7efZ.js → use-view-mode-Cc4A86jX.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Bc7GdFZa.js → use-virtual-mcp-cixi9WNo.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C4arjVN1.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DTlBviqw.js +1 -0
- package/dist/client/assets/variant-calendar-BtDF6xbX.js +1 -0
- package/dist/client/assets/view-mode-toggle-BNmCyKXO.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +509 -506
- package/dist/server/server.js +318 -318
- package/package.json +1 -1
- package/dist/client/assets/ChevronUp-CiXMtnii.js +0 -1
- package/dist/client/assets/XCircle-DRGwo6Em.js +0 -1
- package/dist/client/assets/add-section-modal-CwlL6ayr.js +0 -1
- package/dist/client/assets/agent-icon-D5EbntAT.js +0 -1
- package/dist/client/assets/agents-list-DOj0Fh6v.js +0 -1
- package/dist/client/assets/ai-providers-D2FalLjO.js +0 -1
- package/dist/client/assets/app-editor-DH47BAx3.js +0 -1
- package/dist/client/assets/automations-C8R4Fvhm.js +0 -1
- package/dist/client/assets/buckets-BNXQ-vfY.js +0 -1
- package/dist/client/assets/category-editor-511TL03p.js +0 -1
- package/dist/client/assets/chat-context-BNtznWGC.js +0 -21
- package/dist/client/assets/checkbox-I3IyJWnj.js +0 -1
- package/dist/client/assets/collection-detail-CqdkHGGR.js +0 -1
- package/dist/client/assets/collection-display-button-C3NMWQ0u.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-BgIjMJ8k.js +0 -1
- package/dist/client/assets/connection-detail-BljhUTi8.js +0 -1
- package/dist/client/assets/connections-BxfE7CNZ.js +0 -1
- package/dist/client/assets/context-menu-CUB1yHM7.js +0 -1
- package/dist/client/assets/decopilot-sse-pool-BkzSWgw-.js +0 -1
- package/dist/client/assets/dialog-CyIn0DRx.js +0 -1
- package/dist/client/assets/drawer-DFg9xgM4.js +0 -1
- package/dist/client/assets/dropdown-menu-kPcoeCiJ.js +0 -1
- package/dist/client/assets/file-explorer-DqjZVlFC.js +0 -2
- package/dist/client/assets/general-DiEcrxnP.js +0 -1
- package/dist/client/assets/image-field-CodUWKZv.js +0 -1
- package/dist/client/assets/index-CE5zniob.js +0 -1
- package/dist/client/assets/index-DCOB_mfs.js +0 -1
- package/dist/client/assets/label-DitP_QKf.js +0 -1
- package/dist/client/assets/login-B5Epw0z9.js +0 -1
- package/dist/client/assets/onboarding-BoQhKI2i.js +0 -1
- package/dist/client/assets/org-layout-BMfkaVCj.js +0 -1
- package/dist/client/assets/page-seo-sheet-DeiY4L_a.js +0 -1
- package/dist/client/assets/popover-BcAFMnrn.js +0 -1
- package/dist/client/assets/post-editor-B7uc8ZWG.js +0 -1
- package/dist/client/assets/preview-dialog-CWq_MXwm.js +0 -5
- package/dist/client/assets/profile-D0fa1gEu.js +0 -1
- package/dist/client/assets/project-app-view-CXpwRwLv.js +0 -1
- package/dist/client/assets/record-editor-Ct33qGpE.js +0 -1
- package/dist/client/assets/registry-BIqKm9sP.js +0 -2
- package/dist/client/assets/require-capability-CoJVffIR.js +0 -1
- package/dist/client/assets/required-auth-layout-B3CS-pLH.js +0 -1
- package/dist/client/assets/roles-Kqs8iopc.js +0 -1
- package/dist/client/assets/save-referenced-block-rb2uyE9z.js +0 -1
- package/dist/client/assets/save-status-C9PbQUEN.js +0 -1
- package/dist/client/assets/secrets-Dlj_raMe.js +0 -1
- package/dist/client/assets/select-Di6xzzYo.js +0 -1
- package/dist/client/assets/seo-editor-C9cdDir2.js +0 -1
- package/dist/client/assets/settings-layout-DR15Rbl6.js +0 -1
- package/dist/client/assets/shell-controls-Cw8j2a_F.js +0 -1
- package/dist/client/assets/shell-layout-DmxTk-Cg.js +0 -1
- package/dist/client/assets/shell-route-loading-DW_liPbt.js +0 -1
- package/dist/client/assets/skeleton-CZ9pOveV.js +0 -1
- package/dist/client/assets/sso-BJQWPrvg.js +0 -1
- package/dist/client/assets/store-registry-BXdj_bIJ.js +0 -2
- package/dist/client/assets/studio-tools-DRut7Wwk.js +0 -1
- package/dist/client/assets/switch-sHkW6RUp.js +0 -1
- package/dist/client/assets/table-BUxYcsuG.js +0 -1
- package/dist/client/assets/textarea-D8B22gmM.js +0 -1
- package/dist/client/assets/tooltip-2IhfImXT.js +0 -1
- package/dist/client/assets/use-capability-CU6DCnG3.js +0 -1
- package/dist/client/assets/use-connection-Dffadu_t.js +0 -1
- package/dist/client/assets/use-copy-Btaqep1K.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-D6wTKoFC.js +0 -1
- package/dist/client/assets/use-deco-credits-16Jb7c03.js +0 -1
- package/dist/client/assets/use-file-configs-qOKR17qO.js +0 -1
- package/dist/client/assets/use-mcp-client-BdKIOTso.js +0 -10
- package/dist/client/assets/use-navigate-to-agent-BTMo9com.js +0 -1
- package/dist/client/assets/use-organization-settings--a-kmsBC.js +0 -1
- package/dist/client/assets/use-secrets-B008jqWi.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Ca6dlOLl.js +0 -1
- package/dist/client/assets/useRouterState-DgLuS94C.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CZbIaY66.js +0 -1
- package/dist/client/assets/variant-calendar-DgzKgoL6.js +0 -1
- package/dist/client/assets/view-mode-toggle-Cc6sYskX.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as Q,j as t,b as me,l as H,a as se,r as M,m as pe,K as he,B as ie,c as Z,n as de}from"./index-C3Ab2DJ2.js";import{R as xe}from"./required-auth-layout-B3CS-pLH.js";import{A as ee}from"./auth-split-layout-DRR0KEkj.js";import{A as ne}from"./avatar-DfTXVgX9.js";import{I as be}from"./input-BmmiCY6T.js";import{L as je}from"./label-DitP_QKf.js";import{S as ye}from"./switch-sHkW6RUp.js";import{t as Ne,a as ve}from"./Users03-BOvyNEV4.js";import{i as we}from"./CheckCircle-D6b8lFUP.js";import{t as Se}from"./Globe04-BBRZWdJY.js";import{a as ze}from"./Palette-ClNyQOQA.js";import{i as ke}from"./Upload01-BlvGy5d-.js";import"./useRouterState-DgLuS94C.js";import"./User01-CTuKNCEa.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function re(r){return r.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Ve(){const r=Q.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Ce,{})}),r[0]=e):e=r[0],e}function oe(r){const e=Q.c(13),{title:l,description:c,logoUrl:u,logoFallback:a}=r;let s;e[0]!==a||e[1]!==u?(s=t.jsx("div",{children:u?t.jsx(ne,{url:u,fallback:a??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=a,e[1]=u,e[2]=s):s=e[2];let o;e[3]!==l?(o=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:l}),e[3]=l,e[4]=o):o=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let p;e[7]!==o||e[8]!==n?(p=t.jsxs("div",{className:"space-y-2",children:[o,n]}),e[7]=o,e[8]=n,e[9]=p):p=e[9];let i;return e[10]!==s||e[11]!==p?(i=t.jsxs("div",{className:"grid gap-10",children:[s,p]}),e[10]=s,e[11]=p,e[12]=i):i=e[12],i}function Ce(){const r=Q.c(4),{data:e,isPending:l}=me.useSession();if(l){let s;return r[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(ee,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(H,{size:14,className:"animate-spin text-muted-foreground"})})}),r[0]=s):s=r[0],s}const c=e?.user?.email??"",u=e?.user?.name;let a;return r[1]!==u||r[2]!==c?(a=t.jsx(Ee,{email:c,userName:u}),r[1]=u,r[2]=c,r[3]=a):a=r[3],a}function Ee(r){const e=Q.c(64),{email:l,userName:c}=r;let u,a,s,o,n,p;if(e[0]!==l||e[1]!==c){s=l.split("@")[1]?.toLowerCase()??"",o=!!s&&!_e.has(s);const f=s.split(".")[0]??"";a=f.charAt(0).toUpperCase()+f.slice(1);let g;e[8]!==a||e[9]!==o||e[10]!==c?(g=o?a:c?.split(" ")[0]??"",e[8]=a,e[9]=o,e[10]=c,e[11]=g):g=e[11],u=g,p=pe,n=he.domainLookup(s),e[0]=l,e[1]=c,e[2]=u,e[3]=a,e[4]=s,e[5]=o,e[6]=n,e[7]=p}else u=e[2],a=e[3],s=e[4],o=e[5],n=e[6],p=e[7];let i;e[12]!==o||e[13]!==n?(i={queryKey:n,queryFn:Ae,enabled:o},e[12]=o,e[13]=n,e[14]=i):i=e[14];const{data:j,isLoading:d}=p(i);let N;e[15]===Symbol.for("react.memo_cache_sentinel")?(N={mutationFn:Re},e[15]=N):N=e[15];const m=se(N);let T;e[16]===Symbol.for("react.memo_cache_sentinel")?(T=new Set,e[16]=T):T=e[16];const[_,F]=M.useState(T);let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C={mutationFn:Pe,onSuccess:f=>{F(g=>new Set(g).add(f))}},e[17]=C):C=e[17];const h=se(C),[J,b]=M.useState(!1);if(d){let f;e[18]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(H,{size:14,className:"animate-spin text-muted-foreground"}),e[18]=f):f=e[18];let g;return e[19]!==s?(g=t.jsx(ee,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[f,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",s,"..."]})]})}),e[19]=s,e[20]=g):g=e[20],g}let L;e[21]!==j?.organizations?(L=j?.organizations??[],e[21]=j?.organizations,e[22]=L):L=e[22];const z=L,k=z.some(Oe),R=m.variables??null;if(J){let f;e[23]!==c?(f=c?.split(" ")[0]??"",e[23]=c,e[24]=f):f=e[24];let g;e[25]===Symbol.for("react.memo_cache_sentinel")?(g=()=>b(!1),e[25]=g):g=e[25];let y;return e[26]!==a||e[27]!==s||e[28]!==o||e[29]!==f?(y=t.jsx(le,{isCorporateEmail:o,emailDomain:s,domainLabel:a,defaultName:f,allowDomainClaim:!1,onBack:g}),e[26]=a,e[27]=s,e[28]=o,e[29]=f,e[30]=y):y=e[30],y}if(z.length>0){const f=k?z.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",g=k?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let y;e[31]!==f||e[32]!==g?(y=t.jsx(oe,{title:f,description:g}),e[31]=f,e[32]=g,e[33]=y):y=e[33];let E;if(e[34]!==s||e[35]!==m||e[36]!==z||e[37]!==R||e[38]!==h||e[39]!==_){let D;e[41]!==s||e[42]!==m||e[43]!==R||e[44]!==h||e[45]!==_?(D=v=>{const V=m.isPending&&R===v.slug,U=h.isPending&&h.variables===v.slug,I=_.has(v.slug);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(ne,{url:v.logo??`https://www.google.com/s2/favicons?domain=${s}&sz=128`,fallback:v.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:v.name}),t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",s]})]}),v.joinMode==="auto"?t.jsx(ie,{size:"default",onClick:()=>m.mutate(v.slug),disabled:m.isPending,children:V?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(H,{size:14,className:"animate-spin"})," ","Joining..."]}):"Join"}):I?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(ie,{size:"default",variant:"outline",onClick:()=>h.mutate(v.slug),disabled:h.isPending,children:U?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(H,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"})]},v.id)},e[41]=s,e[42]=m,e[43]=R,e[44]=h,e[45]=_,e[46]=D):D=e[46],E=z.map(D),e[34]=s,e[35]=m,e[36]=z,e[37]=R,e[38]=h,e[39]=_,e[40]=E}else E=e[40];let O;e[47]!==E?(O=t.jsx("div",{className:"grid gap-2",children:E}),e[47]=E,e[48]=O):O=e[48];let S;e[49]!==m.error?(S=m.error&&t.jsx("p",{className:"text-xs text-destructive",children:m.error instanceof Error?m.error.message:"Failed to join organization"}),e[49]=m.error,e[50]=S):S=e[50];let A;e[51]!==h.error?(A=h.error&&t.jsx("p",{className:"text-xs text-destructive",children:h.error instanceof Error?h.error.message:"Failed to request access"}),e[51]=h.error,e[52]=A):A=e[52];let P;e[53]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>b(!0),children:"Create a new organization instead"}),e[53]=P):P=e[53];let $;return e[54]!==y||e[55]!==O||e[56]!==S||e[57]!==A?($=t.jsx(ee,{children:t.jsxs("div",{className:"grid gap-10",children:[y,O,S,A,P]})}),e[54]=y,e[55]=O,e[56]=S,e[57]=A,e[58]=$):$=e[58],$}let q;return e[59]!==u||e[60]!==a||e[61]!==s||e[62]!==o?(q=t.jsx(le,{isCorporateEmail:o,emailDomain:s,domainLabel:a,defaultName:u}),e[59]=u,e[60]=a,e[61]=s,e[62]=o,e[63]=q):q=e[63],q}function Oe(r){return r.joinMode==="auto"}async function Pe(r){const e=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),l=await e.json();if(!e.ok||!l.success)throw new Error(l.error||"Failed to request access");return l.alreadyMember&&l.slug&&(window.location.href=`/${l.slug}`),r}async function Re(r){const e=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),l=await e.json();if(!e.ok||!l.success)throw new Error(l.error||"Failed to join organization");window.location.href=`/${l.slug}`}async function Ae(){return(await fetch("/api/auth/custom/domain-lookup",{credentials:"include"})).json()}function le(r){const e=Q.c(70),{isCorporateEmail:l,emailDomain:c,domainLabel:u,defaultName:a,allowDomainClaim:s,onBack:o}=r,n=s===void 0?!0:s,p=l&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[i,j]=M.useState(a),[d,N]=M.useState(p),[m,T]=M.useState(!0),[_,F]=M.useState(null);let C;e[0]!==m||e[1]!==d||e[2]!==i?(C=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i.trim()||void 0,logo:d??void 0,claimDomain:m})}),w=await x.json();if(!x.ok||!w.success)throw new Error(w.error||"Failed to set up organization");return w},e[0]=m,e[1]=d,e[2]=i,e[3]=C):C=e[3];let h;e[4]!==m?(h=x=>{if(!x.slug)return;const w=ue.filter(ge=>m||!ge.claimOnly).length,X=fe*(w-1)+800;F(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},X)},e[4]=m,e[5]=h):h=e[5];let J;e[6]!==C||e[7]!==h?(J={mutationFn:C,onSuccess:h},e[6]=C,e[7]=h,e[8]=J):J=e[8];const b=se(J);let L;e[9]!==d||e[10]!==i?(L={mutationFn:async()=>{const x=i.trim(),w=re(x);if(!w)throw new Error("Invalid organization name");const X=await me.organization.create({name:x,slug:w,...d?{logo:d}:{}});if(X?.error)throw new Error(X.error.message||"Failed to create organization");window.location.href=`/${X?.data?.slug??w}`}},e[9]=d,e[10]=i,e[11]=L):L=e[11];const z=se(L);if(b.isPending||_){let x;e[12]!==u||e[13]!==i?(x=i.trim()||u,e[12]=u,e[13]=i,e[14]=x):x=e[14];let w;return e[15]!==m||e[16]!==c||e[17]!==d||e[18]!==x?(w=t.jsx(ee,{children:t.jsx(qe,{orgName:x,domain:c,claimDomain:m,logoUrl:d})}),e[15]=m,e[16]=c,e[17]=d,e[18]=x,e[19]=w):w=e[19],w}const k=z.isPending;let R;e[20]!==i?(R=re(i.trim()),e[20]=i,e[21]=R):R=e[21];const q=!!R,f=b.error||z.error||null;let g;e[22]!==n||e[23]!==q||e[24]!==z||e[25]!==b||e[26]!==l?(g=x=>{x.preventDefault(),q&&(l&&n?b.mutate():z.mutate())},e[22]=n,e[23]=q,e[24]=z,e[25]=b,e[26]=l,e[27]=g):g=e[27];const y=g;let E;e[28]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(oe,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=E):E=e[28];let O;e[29]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=O):O=e[29];let S;e[30]!==a||e[31]!==i?(S=(i.trim()||a||"?").charAt(0).toUpperCase(),e[30]=a,e[31]=i,e[32]=S):S=e[32];const A=k||b.isPending;let P;e[33]!==d||e[34]!==S||e[35]!==A?(P=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[O,t.jsx(Fe,{value:d,fallback:S,onChange:N,disabled:A})]}),e[33]=d,e[34]=S,e[35]=A,e[36]=P):P=e[36];let $;e[37]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(je,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=$):$=e[37];let D;e[38]===Symbol.for("react.memo_cache_sentinel")?(D=x=>j(x.target.value),e[38]=D):D=e[38];const v=a||"My Organization",V=k||b.isPending;let U;e[39]!==i||e[40]!==v||e[41]!==V?(U=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[$,t.jsx(be,{id:"org-name",value:i,onChange:D,placeholder:v,disabled:V,className:"h-10 max-w-[220px]"})]}),e[39]=i,e[40]=v,e[41]=V,e[42]=U):U=e[42];let I;e[43]!==n||e[44]!==m||e[45]!==b.isPending||e[46]!==c||e[47]!==l||e[48]!==k?(I=l&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ye,{checked:m,onCheckedChange:T,disabled:k||b.isPending})]}),e[43]=n,e[44]=m,e[45]=b.isPending,e[46]=c,e[47]=l,e[48]=k,e[49]=I):I=e[49];let B;e[50]!==P||e[51]!==U||e[52]!==I?(B=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[P,U,I]}),e[50]=P,e[51]=U,e[52]=I,e[53]=B):B=e[53];let Y;e[54]!==f?(Y=f&&t.jsx("p",{className:"text-xs text-destructive",children:f instanceof Error?f.message:"Failed to create organization"}),e[54]=f,e[55]=Y):Y=e[55];const ae=!q||k||b.isPending;let K;e[56]!==b.isPending||e[57]!==k?(K=k||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(H,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=k,e[58]=K):K=e[58];let G;e[59]!==ae||e[60]!==K?(G=t.jsx(ie,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:K}),e[59]=ae,e[60]=K,e[61]=G):G=e[61];let W;e[62]!==o?(W=o&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:o,children:"See available organizations"}),e[62]=o,e[63]=W):W=e[63];let te;return e[64]!==y||e[65]!==B||e[66]!==Y||e[67]!==G||e[68]!==W?(te=t.jsx(ee,{children:t.jsxs("form",{onSubmit:y,className:"grid gap-10",children:[E,B,Y,G,W]})}),e[64]=y,e[65]=B,e[66]=Y,e[67]=G,e[68]=W,e[69]=te):te=e[69],te}function Fe(r){const e=Q.c(14),{value:l,fallback:c,onChange:u,disabled:a}=r,s=M.useRef(null);let o;e[0]!==u?(o=T=>{const _=T.target.files?.[0];if(!_)return;if(_.size>2097152){de.error("Image must be smaller than 2MB"),s.current&&(s.current.value="");return}const F=new FileReader;F.onerror=Le,F.onloadend=()=>{F.result&&u(F.result),s.current&&(s.current.value="")},F.readAsDataURL(_)},e[0]=u,e[1]=o):o=e[1];const n=o;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>s.current?.click(),e[2]=p):p=e[2];let i;e[3]!==a||e[4]!==n?(i=t.jsx("input",{ref:s,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:a}),e[3]=a,e[4]=n,e[5]=i):i=e[5];const j=l??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(ne,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ke,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let m;return e[10]!==a||e[11]!==i||e[12]!==d?(m=t.jsxs("button",{type:"button",onClick:p,disabled:a,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[i,d,N]}),e[10]=a,e[11]=i,e[12]=d,e[13]=m):m=e[13],m}function Le(){return de.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:Se,label:"Claiming email domain",claimOnly:!0},{icon:ve,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ze,label:"Extracting brand context",claimOnly:!1}],fe=1500,ce=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function qe({orgName:r,domain:e,claimDomain:l,logoUrl:c}){const u=ue.filter(n=>l||!n.claimOnly),[a,s]=M.useState(0),o=M.useRef(!1);if(!o.current){o.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>s(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(oe,{title:`Setting up ${r}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:r.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,p)=>{const i=n.icon,j=p===a,d=p<a,N=ce[p%ce.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:Z("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:Z("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(H,{size:16,className:Z("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(i,{size:16,className:Z("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:Z("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Ve as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as o,j as r,O as s}from"./index-C3Ab2DJ2.js";function m(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as it,r as E,j as e,l as rt}from"./index-C3Ab2DJ2.js";import{S as mt,b as pt,c as st,d as at}from"./sheet-COdJ-0Qy.js";import{S as nt}from"./scroll-area-DwqNfKe5.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-BgMsVAcV.js";import{m as xt}from"./index-WHuW26DU.js";import"./X-CKIhVHQk.js";import"./agent-icon-D5EbntAT.js";import"./AlertCircle-DMqR3m0L.js";import"./Tool01-B4SsemMS.js";import"./SwitchHorizontal01-yw5VS97V.js";import"./Settings02-B7hO-Tma.js";import"./XCircle-DRGwo6Em.js";import"./ArrowUpRight-DeYzuaJ8.js";import"./ZapSquare-C7yt7KfQ.js";import"./Users03-BOvyNEV4.js";import"./CheckCircle-D6b8lFUP.js";import"./ChevronUp-CiXMtnii.js";import"./ChevronDown-CYFvWHpZ.js";import"./ChevronLeft-DXSAgzPw.js";import"./ChevronRight-Dj41DV2U.js";import"./DotsVertical-y5lMfVOQ.js";import"./Stars02-9vF61uFx.js";import"./Eye-D3THRXh6.js";import"./ZoomOut-DVSwpwUz.js";import"./Globe01-BquIL2vg.js";import"./FilterLines-BPeCeYIz.js";import"./Star01-BfSEPDRT.js";import"./Globe04-BBRZWdJY.js";import"./HardDrive-DmtpWveq.js";import"./Key01-Lcx9qTy7.js";import"./LayoutLeft-CkiSxkS_.js";import"./LinkExternal01-jwO28Eeb.js";import"./Monitor01-L6hrk62b.js";import"./Sun-BxuJFhF6.js";import"./Palette-ClNyQOQA.js";import"./Play-C6QgiUls.js";import"./Plus-_82_8sq8.js";import"./SearchMd-C3Pmxf99.js";import"./Shield01-RDE62wRx.js";import"./Stars01-W6Wl0Pse.js";import"./Trash01-CG0gTYx7.js";import"./Upload01-BlvGy5d-.js";import"./User01-CTuKNCEa.js";import"./Users01-KXiCgru2.js";import"./XClose-Ig7y9gcI.js";import"./Zap-w60sxAoc.js";import"./use-clock-tick-SbPzFjh0.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Btaqep1K.js";import"./tooltip-2IhfImXT.js";import"./file-type-icon-BOPDPlds.js";import"./dialog-CyIn0DRx.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-7ak1Ve40.js";import"./use-mcp-client-BdKIOTso.js";import"./auth-tkqpBHf1.js";import"./chat-context-BNtznWGC.js";import"./hooks-DLdyjUhZ.js";import"./decopilot-sse-pool-BkzSWgw-.js";import"./use-virtual-mcp-Bc7GdFZa.js";import"./use-collections-DrlB7sAG.js";import"./use-ai-providers-CC3uGtbf.js";import"./studio-tools-DRut7Wwk.js";import"./use-organization-settings--a-kmsBC.js";import"./shell-layout-DmxTk-Cg.js";import"./avatar-DfTXVgX9.js";import"./required-auth-layout-B3CS-pLH.js";import"./useRouterState-DgLuS94C.js";import"./use-org-sso-CEQ82hSZ.js";import"./integration-icon-CFvT6ZpF.js";import"./use-navigate-to-agent-BTMo9com.js";import"./use-connection-Dffadu_t.js";import"./use-mcp-prompts-5xEBY9_7.js";import"./form-BZY9ZRz4.js";import"./label-DitP_QKf.js";import"./input-BmmiCY6T.js";import"./select-Di6xzzYo.js";import"./switch-sHkW6RUp.js";import"./schema-form-D8_e7uDj.js";import"./calendar-tEWC6_XV.js";import"./popover-BcAFMnrn.js";import"./textarea-D8B22gmM.js";import"./sortable.esm-LmSoSdxy.js";import"./dropdown-menu-kPcoeCiJ.js";import"./image-field-CodUWKZv.js";import"./skeleton-CZ9pOveV.js";import"./tabs-BcUIMPwc.js";import"./use-file-configs-qOKR17qO.js";import"./useInfiniteQuery-Ca6dlOLl.js";import"./use-infinite-scroll-CaTJY2LS.js";import"./command-pIEd50-L.js";import"./index-DexxTctJ.js";import"./index-BY2TC4bG.js";import"./drawer-DFg9xgM4.js";import"./collection-search-CCzYANV5.js";import"./toggle-group-Cp4C3_lM.js";import"./use-deco-credits-16Jb7c03.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CqvtHNnU.js";import"./use-registry-connections-CK9xDmAR.js";import"./extract-connection-data-CBzjCfJ2.js";import"./card-Ckx3Kwvj.js";import"./collection-tabs-CBstOc4r.js";import"./badge-an9iff2c.js";import"./connection-form-helpers-ByFrPc9N.js";import"./useSuspenseInfiniteQuery-CZbIaY66.js";import"./mcp-oauth-BGmk7Mi5.js";import"./connect-desktop-dialog-BgIjMJ8k.js";import"./decopilot-D6xQ1qh2.js";import"./checkbox-I3IyJWnj.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dxa_AxFP.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C5Tq4YPI.js";import"./empty-state-BrSxZrfZ.js";import"./toolbar-DyjTkAru.js";import"./preview-dialog-CWq_MXwm.js";import"./index-xsAZnQ1t.js";import"./use-mcp-tools-CYtQa-6Z.js";import"./use-capability-CU6DCnG3.js";import"./shell-route-loading-DW_liPbt.js";import"./index-C4w1u5Cz.js";import"./alert-dialog-BuJSufuR.js";import"./use-debounced-autosave-C4B5942u.js";import"./index-CszBxeF9.js";import"./sidebar-DCgpgzJu.js";import"./search-input-DjHO_xeh.js";import"./github-repo-picker-CrW8szfE.js";import"./use-secrets-B008jqWi.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-Cc6sYskX.js";import"./select-model-4ZBcZdkE.js";import"./use-automations-D2hKtMe8.js";import"./monaco-editor-yw8USVwR.js";import"./automation-runs-BEntIYkJ.js";import"./table-BUxYcsuG.js";import"./use-members-BWyLHt4a.js";import"./use-org-auth-client-Blpkj8FB.js";import"./task-status-BfQltC__.js";import"./automation-list-row-40GibzkL.js";function ei(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,B=m.kind==="site"&&o&&n,H=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{ei as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,_ as $,j as c,$ as L,ai as z,V as A,P as _,M as P,J as j,U as w,Z as G,Q as E,cI as H,cJ as K,T as J,cK as U,cL as V,cM as W,W as Z,X as Q,Y as X,e as R,c as Y}from"./index-C3Ab2DJ2.js";var C="Popover",[b]=J(C,[E]),g=E(),[q,d]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=g(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(q,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",B=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=g(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});B.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(S,o),s=g(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":k(n.open),...r,ref:a,onClick:P(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(j,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};M.displayName=O;var v="PopoverContent",D=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});D.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),m=g(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Q,{"data-state":k(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),I="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(I,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=I;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=g(o);return c.jsx(X,{...n,...r,ref:e})});ce.displayName=ae;function k(t){return t?"open":"closed"}var ie=N,pe=y,le=M,ue=D;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Y("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(u=c.jsx(le,{children:c.jsx(ue,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}export{fe as P,ve as a,Pe as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as Q,j as r,B as W,r as X,c as Z}from"./index-C3Ab2DJ2.js";import{t as ee}from"./ChevronDown-CYFvWHpZ.js";import{n as te}from"./LinkExternal01-jwO28Eeb.js";import{Q as oe}from"./agent-icon-D5EbntAT.js";import{e as re,f as le,d as ie}from"./scroll-area-DwqNfKe5.js";import{I as Y}from"./input-BmmiCY6T.js";import{L as K}from"./label-DitP_QKf.js";import{M as se}from"./automation-runs-BEntIYkJ.js";import{T as ae}from"./textarea-D8B22gmM.js";import{I as ne}from"./image-field-CodUWKZv.js";import{g as me}from"./schema-form-D8_e7uDj.js";import{ak as pe,al as ce,am as fe,an as ue}from"./index-WHuW26DU.js";import{u as de,s as U,I as ge,R as xe,A as he}from"./primitives-BcfJna5s.js";import{S as ye}from"./save-status-C9PbQUEN.js";import{a as ve,B as je,b as be}from"./block-document-DZEmtfok.js";import"./AlertCircle-DMqR3m0L.js";import"./Tool01-B4SsemMS.js";import"./SwitchHorizontal01-yw5VS97V.js";import"./Settings02-B7hO-Tma.js";import"./XCircle-DRGwo6Em.js";import"./ArrowUpRight-DeYzuaJ8.js";import"./ZapSquare-C7yt7KfQ.js";import"./Users03-BOvyNEV4.js";import"./CheckCircle-D6b8lFUP.js";import"./ChevronUp-CiXMtnii.js";import"./ChevronLeft-DXSAgzPw.js";import"./ChevronRight-Dj41DV2U.js";import"./DotsVertical-y5lMfVOQ.js";import"./Stars02-9vF61uFx.js";import"./Eye-D3THRXh6.js";import"./ZoomOut-DVSwpwUz.js";import"./Globe01-BquIL2vg.js";import"./FilterLines-BPeCeYIz.js";import"./Star01-BfSEPDRT.js";import"./Globe04-BBRZWdJY.js";import"./HardDrive-DmtpWveq.js";import"./Key01-Lcx9qTy7.js";import"./LayoutLeft-CkiSxkS_.js";import"./Monitor01-L6hrk62b.js";import"./Sun-BxuJFhF6.js";import"./Palette-ClNyQOQA.js";import"./Play-C6QgiUls.js";import"./Plus-_82_8sq8.js";import"./SearchMd-C3Pmxf99.js";import"./Shield01-RDE62wRx.js";import"./Stars01-W6Wl0Pse.js";import"./Trash01-CG0gTYx7.js";import"./Upload01-BlvGy5d-.js";import"./User01-CTuKNCEa.js";import"./Users01-KXiCgru2.js";import"./XClose-Ig7y9gcI.js";import"./X-CKIhVHQk.js";import"./Zap-w60sxAoc.js";import"./use-clock-tick-SbPzFjh0.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Btaqep1K.js";import"./tooltip-2IhfImXT.js";import"./file-type-icon-BOPDPlds.js";import"./dialog-CyIn0DRx.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-7ak1Ve40.js";import"./use-mcp-client-BdKIOTso.js";import"./auth-tkqpBHf1.js";import"./chat-context-BNtznWGC.js";import"./hooks-DLdyjUhZ.js";import"./decopilot-sse-pool-BkzSWgw-.js";import"./use-virtual-mcp-Bc7GdFZa.js";import"./use-collections-DrlB7sAG.js";import"./use-ai-providers-CC3uGtbf.js";import"./studio-tools-DRut7Wwk.js";import"./use-organization-settings--a-kmsBC.js";import"./shell-layout-DmxTk-Cg.js";import"./avatar-DfTXVgX9.js";import"./required-auth-layout-B3CS-pLH.js";import"./useRouterState-DgLuS94C.js";import"./use-org-sso-CEQ82hSZ.js";import"./sheet-COdJ-0Qy.js";import"./integration-icon-CFvT6ZpF.js";import"./use-navigate-to-agent-BTMo9com.js";import"./use-connection-Dffadu_t.js";import"./use-mcp-prompts-5xEBY9_7.js";import"./form-BZY9ZRz4.js";import"./select-Di6xzzYo.js";import"./useInfiniteQuery-Ca6dlOLl.js";import"./use-infinite-scroll-CaTJY2LS.js";import"./card-Ckx3Kwvj.js";import"./table-BUxYcsuG.js";import"./empty-state-BrSxZrfZ.js";import"./use-members-BWyLHt4a.js";import"./use-org-auth-client-Blpkj8FB.js";import"./task-status-BfQltC__.js";import"./use-automations-D2hKtMe8.js";import"./useSuspenseInfiniteQuery-CZbIaY66.js";import"./badge-an9iff2c.js";import"./checkbox-I3IyJWnj.js";import"./command-pIEd50-L.js";import"./index-DexxTctJ.js";import"./popover-BcAFMnrn.js";import"./dropdown-menu-kPcoeCiJ.js";import"./skeleton-CZ9pOveV.js";import"./tabs-BcUIMPwc.js";import"./use-file-configs-qOKR17qO.js";import"./calendar-tEWC6_XV.js";import"./switch-sHkW6RUp.js";import"./sortable.esm-LmSoSdxy.js";import"./index-BY2TC4bG.js";import"./drawer-DFg9xgM4.js";import"./collection-search-CCzYANV5.js";import"./toggle-group-Cp4C3_lM.js";import"./use-deco-credits-16Jb7c03.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CqvtHNnU.js";import"./use-registry-connections-CK9xDmAR.js";import"./extract-connection-data-CBzjCfJ2.js";import"./collection-tabs-CBstOc4r.js";import"./connection-form-helpers-ByFrPc9N.js";import"./mcp-oauth-BGmk7Mi5.js";import"./connect-desktop-dialog-BgIjMJ8k.js";import"./decopilot-D6xQ1qh2.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dxa_AxFP.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C5Tq4YPI.js";import"./toolbar-DyjTkAru.js";import"./preview-dialog-CWq_MXwm.js";import"./index-xsAZnQ1t.js";import"./use-mcp-tools-CYtQa-6Z.js";import"./use-capability-CU6DCnG3.js";import"./shell-route-loading-DW_liPbt.js";import"./index-C4w1u5Cz.js";import"./alert-dialog-BuJSufuR.js";import"./use-debounced-autosave-C4B5942u.js";import"./index-CszBxeF9.js";import"./sidebar-DCgpgzJu.js";import"./search-input-DjHO_xeh.js";import"./github-repo-picker-CrW8szfE.js";import"./use-secrets-B008jqWi.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-Cc6sYskX.js";import"./select-model-4ZBcZdkE.js";import"./monaco-editor-yw8USVwR.js";import"./automation-list-row-40GibzkL.js";const q=f=>typeof f=="string"?f:"",Ce=/\/blog\.tsx?$/;function Se(f){for(const[e,t]of Object.entries(f)){if(e.includes("/")||!t||typeof t!="object"||Array.isArray(t))continue;const l=t;if(typeof l.__resolveType!="string"||!Ce.test(l.__resolveType))continue;const o=q(l.pageSlug);if(o)return o}return null}function _e(f){const e=f.categories;if(!Array.isArray(e)||e.length===0)return"";const t=e[0];return q(t?.slug)}function ke(f,e){let t=f;if(/:category\??/.test(t)){if(!e.category)return null;t=t.replace(/:category\??/g,encodeURIComponent(e.category))}if(/:slug\??/.test(t)){if(!e.slug)return null;t=t.replace(/:slug\??/g,encodeURIComponent(e.slug))}return t}function Ne({decofile:f,post:e,previewBaseUrl:t}){if(!t)return null;const l=Se(f);if(!l)return null;const o=ke(l,{category:_e(e),slug:q(e.slug)});if(!o)return null;try{return new URL(o,t).href}catch{return null}}function Pe(f){return Array.isArray(f)?f.map(e=>({key:U(e?.key),value:U(e?.value)})):[]}function fr(f){const e=Q.c(68),{orgSlug:t,virtualMcpId:l,branch:o,blockKey:s,block:S,decofile:m,meta:v,previewBaseUrl:x}=f;let j;e[0]!==o||e[1]!==t||e[2]!==l?(j={orgSlug:t,virtualMcpId:l,branch:o},e[0]=o,e[1]=t,e[2]=l,e[3]=j):j=e[3];const i=pe(j);let u;e[4]!==S?(u=ce(S,"posts"),e[4]=S,e[5]=u):u=e[5];const d=u;let b;e[6]!==s||e[7]!==i?(b=M=>{i.mutate({blockKey:s,data:fe(s,"posts",M)})},e[6]=s,e[7]=i,e[8]=b):b=e[8];const[a,R]=de(d,b);let _;e[9]!==a||e[10]!==R?(_=(M,J)=>R({...a,[M]:J}),e[9]=a,e[10]=R,e[11]=_):_=e[11];const p=_;let k;e[12]!==m||e[13]!==a||e[14]!==x?(k=Ne({decofile:m,post:a,previewBaseUrl:x}),e[12]=m,e[13]=a,e[14]=x,e[15]=k):k=e[15];const h=k;let n;e[16]!==a.title?(n=U(a.title)||"Untitled post",e[16]=a.title,e[17]=n):n=e[17];let c;e[18]!==n?(c=r.jsx("span",{className:"truncate text-sm font-medium",children:n}),e[18]=n,e[19]=c):c=e[19];let g;e[20]!==i.isError||e[21]!==i.isPending?(g=r.jsx(ye,{isPending:i.isPending,isError:i.isError}),e[20]=i.isError,e[21]=i.isPending,e[22]=g):g=e[22];const C=!h,z=h?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let N;e[23]!==h?(N=()=>{h&&window.open(h,"_blank","noopener,noreferrer")},e[23]=h,e[24]=N):N=e[24];let I;e[25]===Symbol.for("react.memo_cache_sentinel")?(I=r.jsx(te,{size:14}),e[25]=I):I=e[25];let L;e[26]!==z||e[27]!==N||e[28]!==C?(L=r.jsxs(W,{type:"button",variant:"outline",size:"sm",disabled:C,title:z,onClick:N,children:[I,"See preview"]}),e[26]=z,e[27]=N,e[28]=C,e[29]=L):L=e[29];let P;e[30]!==L||e[31]!==g?(P=r.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[g,L]}),e[30]=L,e[31]=g,e[32]=P):P=e[32];let B;e[33]!==P||e[34]!==c?(B=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,P]}),e[33]=P,e[34]=c,e[35]=B):B=e[35];let T;e[36]!==a.title?(T=U(a.title),e[36]=a.title,e[37]=T):T=e[37];let w;e[38]!==p?(w=M=>p("title",M),e[38]=p,e[39]=w):w=e[39];let A;e[40]!==T||e[41]!==w?(A=r.jsx(ge,{value:T,onChange:w,placeholder:"Post title",className:"py-1 text-3xl font-bold text-foreground"}),e[40]=T,e[41]=w,e[42]=A):A=e[42];let E;e[43]!==m||e[44]!==a||e[45]!==p?(E=r.jsx(Be,{post:a,decofile:m,onChange:p}),e[43]=m,e[44]=a,e[45]=p,e[46]=E):E=e[46];let $;e[47]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx("div",{className:"mt-6 border-t"}),e[47]=$):$=e[47];let F;e[48]!==a.sections?(F=ve(a.sections),e[48]=a.sections,e[49]=F):F=e[49];let O;e[50]!==p?(O=M=>p("sections",M),e[50]=p,e[51]=O):O=e[51];let y;e[52]!==v||e[53]!==F||e[54]!==O?(y=r.jsx(je,{value:F,onChange:O,meta:v,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."}),e[52]=v,e[53]=F,e[54]=O,e[55]=y):y=e[55];let D;e[56]!==A||e[57]!==E||e[58]!==y?(D=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:r.jsxs("div",{className:"mx-auto max-w-3xl px-8 py-8",children:[A,E,$,y]})}),e[56]=A,e[57]=E,e[58]=y,e[59]=D):D=e[59];let V;e[60]!==B||e[61]!==D?(V=r.jsxs("div",{className:"flex h-full flex-col",children:[B,D]}),e[60]=B,e[61]=D,e[62]=V):V=e[62];let G;return e[63]!==o||e[64]!==t||e[65]!==V||e[66]!==l?(G=r.jsx(be,{orgSlug:t,virtualMcpId:l,branch:o,children:V}),e[63]=o,e[64]=t,e[65]=V,e[66]=l,e[67]=G):G=e[67],G}function Be(f){const e=Q.c(69),{post:t,decofile:l,onChange:o}=f,[s,S]=X.useState(!1);let m,v;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(oe,{size:15}),v=r.jsx("span",{className:"flex-1 text-left",children:"Post settings"}),e[0]=m,e[1]=v):(m=e[0],v=e[1]);const x=s&&"rotate-180";let j;e[2]!==x?(j=Z("transition-transform",x),e[2]=x,e[3]=j):j=e[3];let i;e[4]!==j?(i=r.jsx(re,{asChild:!0,children:r.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[m,v,r.jsx(ee,{size:15,className:j})]})}),e[4]=j,e[5]=i):i=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(K,{htmlFor:"post-excerpt",children:"Excerpt"}),e[6]=u):u=e[6];let d;e[7]!==t.excerpt?(d=U(t.excerpt),e[7]=t.excerpt,e[8]=d):d=e[8];let b;e[9]!==o?(b=y=>o("excerpt",y.target.value),e[9]=o,e[10]=b):b=e[10];let a;e[11]!==d||e[12]!==b?(a=r.jsxs("div",{className:"space-y-2",children:[u,r.jsx(ae,{id:"post-excerpt",value:d,onChange:b,rows:2})]}),e[11]=d,e[12]=b,e[13]=a):a=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=r.jsx(K,{htmlFor:"post-slug",children:"Slug"}),e[14]=R):R=e[14];let _;e[15]!==t.slug?(_=U(t.slug),e[15]=t.slug,e[16]=_):_=e[16];let p;e[17]!==o?(p=y=>o("slug",y.target.value),e[17]=o,e[18]=p):p=e[18];let k;e[19]!==_||e[20]!==p?(k=r.jsxs("div",{className:"space-y-2",children:[R,r.jsx(Y,{id:"post-slug",value:_,onChange:p,placeholder:"my-post",className:"h-10"})]}),e[19]=_,e[20]=p,e[21]=k):k=e[21];let h;e[22]===Symbol.for("react.memo_cache_sentinel")?(h={type:"string",format:"date",title:"Date"},e[22]=h):h=e[22];let n;e[23]!==t.date?(n=U(t.date),e[23]=t.date,e[24]=n):n=e[24];let c;e[25]!==o?(c=y=>o("date",y),e[25]=o,e[26]=c):c=e[26];let g;e[27]!==n||e[28]!==c?(g=r.jsx(me,{schema:h,value:n,onChange:c,path:"post-date",label:"Date"}),e[27]=n,e[28]=c,e[29]=g):g=e[29];let C;e[30]!==k||e[31]!==g?(C=r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[k,g]}),e[30]=k,e[31]=g,e[32]=C):C=e[32];let z;e[33]===Symbol.for("react.memo_cache_sentinel")?(z={type:"string",format:"image-uri",title:"Cover image"},e[33]=z):z=e[33];let N;e[34]!==o?(N=y=>o("image",y),e[34]=o,e[35]=N):N=e[35];let I;e[36]!==t.image||e[37]!==N?(I=r.jsx(ne,{schema:z,value:t.image,onChange:N,path:"post-image",label:"Cover image"}),e[36]=t.image,e[37]=N,e[38]=I):I=e[38];let L;e[39]===Symbol.for("react.memo_cache_sentinel")?(L=["email"],e[39]=L):L=e[39];let P;e[40]!==o?(P=y=>o("authors",y),e[40]=o,e[41]=P):P=e[41];let B;e[42]!==l||e[43]!==t.authors||e[44]!==P?(B=r.jsx(H,{label:"Authors",decofile:l,kind:"authors",valueField:"email",extraFields:L,selected:t.authors,onChange:P}),e[42]=l,e[43]=t.authors,e[44]=P,e[45]=B):B=e[45];let T;e[46]===Symbol.for("react.memo_cache_sentinel")?(T=["slug"],e[46]=T):T=e[46];let w;e[47]!==o?(w=y=>o("categories",y),e[47]=o,e[48]=w):w=e[48];let A;e[49]!==l||e[50]!==t.categories||e[51]!==w?(A=r.jsx(H,{label:"Categories",decofile:l,kind:"categories",valueField:"slug",extraFields:T,selected:t.categories,onChange:w}),e[49]=l,e[50]=t.categories,e[51]=w,e[52]=A):A=e[52];let E;e[53]!==o?(E=y=>o("extraProps",y),e[53]=o,e[54]=E):E=e[54];let $;e[55]!==t.extraProps||e[56]!==E?($=r.jsx(we,{value:t.extraProps,onChange:E}),e[55]=t.extraProps,e[56]=E,e[57]=$):$=e[57];let F;e[58]!==C||e[59]!==I||e[60]!==B||e[61]!==A||e[62]!==$||e[63]!==a?(F=r.jsxs(le,{className:"space-y-5 px-2 pt-4",children:[a,C,I,B,A,$]}),e[58]=C,e[59]=I,e[60]=B,e[61]=A,e[62]=$,e[63]=a,e[64]=F):F=e[64];let O;return e[65]!==s||e[66]!==F||e[67]!==i?(O=r.jsxs(ie,{open:s,onOpenChange:S,className:"mt-4",children:[i,F]}),e[65]=s,e[66]=F,e[67]=i,e[68]=O):O=e[68],O}function we(f){const e=Q.c(15),{value:t,onChange:l}=f;let o,s,S,m;if(e[0]!==l||e[1]!==t){o=Pe(t);const j=(i,u)=>l(o.map((d,b)=>b===i?{...d,...u}:d));s="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(K,{children:"Extra props"}),e[6]=S):S=e[6],m=o.length>0&&r.jsx("ul",{className:"space-y-2",children:o.map((i,u)=>r.jsxs("li",{className:"group/item flex items-center gap-2",children:[r.jsx(Y,{value:i.key,onChange:d=>j(u,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),r.jsx(Y,{value:i.value,onChange:d=>j(u,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),r.jsx(xe,{label:"Remove prop",onClick:()=>l(o.filter((d,b)=>b!==u))})]},u))}),e[0]=l,e[1]=t,e[2]=o,e[3]=s,e[4]=S,e[5]=m}else o=e[2],s=e[3],S=e[4],m=e[5];let v;e[7]!==o||e[8]!==l?(v=r.jsx(he,{label:"Add prop",onClick:()=>l([...o,{key:"",value:""}])}),e[7]=o,e[8]=l,e[9]=v):v=e[9];let x;return e[10]!==s||e[11]!==S||e[12]!==m||e[13]!==v?(x=r.jsxs("div",{className:s,children:[S,m,v]}),e[10]=s,e[11]=S,e[12]=m,e[13]=v,e[14]=x):x=e[14],x}function H(f){const e=Q.c(31),{label:t,decofile:l,kind:o,valueField:s,extraFields:S,selected:m,onChange:v}=f;let x,j,i;if(e[0]!==l||e[1]!==o||e[2]!==s){x=ue(l,o);let h;e[6]!==s?(h=(c,g)=>U(c[s])||g,e[6]=s,e[7]=h):h=e[7],i=h;let n;e[8]!==i?(n=c=>{const{key:g,payload:C}=c;return{value:i(C,g),label:U(C.name)||i(C,g)}},e[8]=i,e[9]=n):n=e[9],j=x.map(n),e[0]=l,e[1]=o,e[2]=s,e[3]=x,e[4]=j,e[5]=i}else x=e[3],j=e[4],i=e[5];const u=j;let d;if(e[10]!==m||e[11]!==s){const h=Array.isArray(m)?m:[];let n;e[13]!==s?(n=c=>U(c[s]),e[13]=s,e[14]=n):n=e[14],d=h.map(n).filter(Boolean),e[10]=m,e[11]=s,e[12]=d}else d=e[12];const b=d;let a;e[15]!==S||e[16]!==v||e[17]!==x||e[18]!==s||e[19]!==i?(a=h=>{v(h.map(n=>{const c=x.find(C=>{const{key:z,payload:N}=C;return i(N,z)===n});if(!c)return{name:n,[s]:n};const g={name:U(c.payload.name)};for(const C of S)g[C]=c.payload[C]??n;return g}))},e[15]=S,e[16]=v,e[17]=x,e[18]=s,e[19]=i,e[20]=a):a=e[20];const R=a;let _;e[21]!==t?(_=r.jsx(K,{children:t}),e[21]=t,e[22]=_):_=e[22];let p;e[23]!==b||e[24]!==R||e[25]!==t||e[26]!==u?(p=u.length===0?r.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",t.toLowerCase()," yet — create some in the"," ",t.toLowerCase()," collection."]}):r.jsx(se,{options:u,defaultValue:b,onValueChange:R,placeholder:`Select ${t.toLowerCase()}`,maxCount:4}),e[23]=b,e[24]=R,e[25]=t,e[26]=u,e[27]=p):p=e[27];let k;return e[28]!==_||e[29]!==p?(k=r.jsxs("div",{className:"space-y-2",children:[_,p]}),e[28]=_,e[29]=p,e[30]=k):k=e[30],k}export{fr as PostEditor};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{r as g,aK as ln,e as A,c as ve,j as c,p as se,F as st,a as Ie,K as Y,m as be,a$ as an,z as cn,l as un,B as ee,ac as dn,n as Me,ae as fn,L as pn,g as mn}from"./index-C3Ab2DJ2.js";import{c as hn,f as xn,g as gn,b as yn,d as wn,a as vn,h as bn}from"./ZoomOut-DVSwpwUz.js";import{D as Sn,a as Ze,c as kt,d as Pt}from"./dialog-CyIn0DRx.js";import{b as ue,T as de,a as fe}from"./tooltip-2IhfImXT.js";import{n as Fe,i as Ct}from"./Globe01-BquIL2vg.js";import{n as $t}from"./LinkExternal01-jwO28Eeb.js";import{s as zn}from"./XClose-Ig7y9gcI.js";import{S as _e}from"./skeleton-CZ9pOveV.js";import{l as jn,F as kn}from"./index-xsAZnQ1t.js";import{F as et,M as Pn}from"./file-type-icon-BOPDPlds.js";import{D as Cn,a as $n,b as En,c as dt}from"./dropdown-menu-kPcoeCiJ.js";import{i as Nn}from"./LayoutLeft-CkiSxkS_.js";import{I as In}from"./input-BmmiCY6T.js";import{a as Mn,P as Rn,b as Dn}from"./popover-BcAFMnrn.js";import{i as Ln}from"./ChevronUp-CiXMtnii.js";import{a as _n}from"./Eye-D3THRXh6.js";import{i as An}from"./Key01-Lcx9qTy7.js";const We=g.createContext(null);We.displayName="PanelGroupContext";const V={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},rt=10,ye=g.useLayoutEffect,ft=ln.useId,Tn=typeof ft=="function"?ft:()=>null;let Fn=0;function it(n=null){const e=Tn(),t=g.useRef(n||e||null);return t.current===null&&(t.current=""+Fn++),n??t.current}function Et({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:l,minSize:a,onCollapse:u,onExpand:p,onResize:d,order:f,style:x,tagName:m="div",...z}){const v=g.useContext(We);if(v===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:y,expandPanel:P,getPanelSize:M,getPanelStyle:k,groupId:W,isPanelCollapsed:N,reevaluatePanelConstraints:w,registerPanel:K,resizePanel:q,unregisterPanel:U}=v,T=it(o),D=g.useRef({callbacks:{onCollapse:u,onExpand:p,onResize:d},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:l,minSize:a},id:T,idIsFromProps:o!==void 0,order:f});g.useRef({didLogMissingDefaultSizeWarning:!1}),ye(()=>{const{callbacks:_,constraints:L}=D.current,F={...L};D.current.id=T,D.current.idIsFromProps=o!==void 0,D.current.order=f,_.onCollapse=u,_.onExpand=p,_.onResize=d,L.collapsedSize=t,L.collapsible=s,L.defaultSize=r,L.maxSize=l,L.minSize=a,(F.collapsedSize!==L.collapsedSize||F.collapsible!==L.collapsible||F.maxSize!==L.maxSize||F.minSize!==L.minSize)&&w(D.current,F)}),ye(()=>{const _=D.current;return K(_),()=>{U(_)}},[f,T,K,U]),g.useImperativeHandle(i,()=>({collapse:()=>{y(D.current)},expand:_=>{P(D.current,_)},getId(){return T},getSize(){return M(D.current)},isCollapsed(){return N(D.current)},isExpanded(){return!N(D.current)},resize:_=>{q(D.current,_)}}),[y,P,M,N,T,q]);const X=k(D.current,r);return g.createElement(m,{...z,children:n,className:e,id:T,style:{...X,...x},[V.groupId]:W,[V.panel]:"",[V.panelCollapsible]:s||void 0,[V.panelId]:T,[V.panelSize]:parseFloat(""+X.flexGrow).toFixed(1)})}const Nt=g.forwardRef((n,e)=>g.createElement(Et,{...n,forwardedRef:e}));Et.displayName="Panel";Nt.displayName="forwardRef(Panel)";let tt=null,Te=-1,he=null;function Hn(n,e){if(e){const t=(e&Lt)!==0,s=(e&_t)!==0,r=(e&At)!==0,i=(e&Tt)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Un(){he!==null&&(document.head.removeChild(he),tt=null,he=null,Te=-1)}function Ve(n,e){var t,s;const r=Hn(n,e);if(tt!==r){if(tt=r,he===null&&(he=document.createElement("style"),document.head.appendChild(he)),Te>=0){var i;(i=he.sheet)===null||i===void 0||i.removeRule(Te)}Te=(t=(s=he.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function It(n){return n.type==="keydown"}function Mt(n){return n.type.startsWith("pointer")}function Rt(n){return n.type.startsWith("mouse")}function qe(n){if(Mt(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Rt(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function On(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Wn(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function qn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:ht(n),b:ht(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;E(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:mt(pt(t.a)),b:mt(pt(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let l=i.length;for(;l--;){const a=i[l];if(a===o.a)return 1;if(a===o.b)return-1}}return Math.sign(r.a-r.b)}const Bn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Kn(n){var e;const t=getComputedStyle((e=Dt(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Gn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Kn(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Bn.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function pt(n){let e=n.length;for(;e--;){const t=n[e];if(E(t,"Missing node"),Gn(t))return t}return null}function mt(n){return n&&Number(getComputedStyle(n).zIndex)||0}function ht(n){const e=[];for(;n;)e.push(n),n=Dt(n);return e}function Dt(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Lt=1,_t=2,At=4,Tt=8,Vn=On()==="coarse";let ie=[],Pe=!1,ge=new Map,Be=new Map;const Re=new Set;function Xn(n,e,t,s,r){var i;const{ownerDocument:o}=e,l={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},a=(i=ge.get(o))!==null&&i!==void 0?i:0;return ge.set(o,a+1),Re.add(l),He(),function(){var p;Be.delete(n),Re.delete(l);const d=(p=ge.get(o))!==null&&p!==void 0?p:1;if(ge.set(o,d-1),He(),d===1&&ge.delete(o),ie.includes(l)){const f=ie.indexOf(l);f>=0&&ie.splice(f,1),lt(),r("up",!0,null)}}}function Qn(n){const{target:e}=n,{x:t,y:s}=qe(n);Pe=!0,ot({target:e,x:t,y:s}),He(),ie.length>0&&(Ue("down",n),n.preventDefault(),Ft(e)||n.stopImmediatePropagation())}function Xe(n){const{x:e,y:t}=qe(n);if(Pe&&n.buttons===0&&(Pe=!1,Ue("up",n)),!Pe){const{target:s}=n;ot({target:s,x:e,y:t})}Ue("move",n),lt(),ie.length>0&&n.preventDefault()}function Qe(n){const{target:e}=n,{x:t,y:s}=qe(n);Be.clear(),Pe=!1,ie.length>0&&(n.preventDefault(),Ft(e)||n.stopImmediatePropagation()),Ue("up",n),ot({target:e,x:t,y:s}),lt(),He()}function Ft(n){let e=n;for(;e;){if(e.hasAttribute(V.resizeHandle))return!0;e=e.parentElement}return!1}function ot({target:n,x:e,y:t}){ie.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Re.forEach(r=>{const{element:i,hitAreaMargins:o}=r,l=i.getBoundingClientRect(),{bottom:a,left:u,right:p,top:d}=l,f=Vn?o.coarse:o.fine;if(e>=u-f&&e<=p+f&&t>=d-f&&t<=a+f){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&qn(s,i)>0){let m=s,z=!1;for(;m&&!m.contains(i);){if(Wn(m.getBoundingClientRect(),l)){z=!0;break}m=m.parentElement}if(z)return}ie.push(r)}})}function Je(n,e){Be.set(n,e)}function lt(){let n=!1,e=!1;ie.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;Be.forEach(s=>{t|=s}),n&&e?Ve("intersection",t):n?Ve("horizontal",t):e?Ve("vertical",t):Un()}let Ye=new AbortController;function He(){Ye.abort(),Ye=new AbortController;const n={capture:!0,signal:Ye.signal};Re.size&&(Pe?(ie.length>0&&ge.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",Qe,n),s.addEventListener("pointerleave",Xe,n),s.addEventListener("pointermove",Xe,n))}),window.addEventListener("pointerup",Qe,n),window.addEventListener("pointercancel",Qe,n)):ge.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Qn,n),s.addEventListener("pointermove",Xe,n))}))}function Ue(n,e){Re.forEach(t=>{const{setResizeHandlerState:s}=t,r=ie.includes(t);s(n,r,e)})}function Jn(){const[n,e]=g.useState(0);return g.useCallback(()=>e(t=>t+1),[])}function E(n,e){if(!n)throw console.error(e),Error(e)}function we(n,e,t=rt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function pe(n,e,t=rt){return we(n,e,t)===0}function te(n,e,t){return we(n,e,t)===0}function Yn(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!te(r,i,t))return!1}return!0}function ke({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];E(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:l=0}=s;if(we(t,l)<0)if(i){const a=(r+l)/2;we(t,a)<0?t=r:t=l}else t=l;return t=Math.min(o,t),t=parseFloat(t.toFixed(rt)),t}function Ee({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(te(n,0))return e;const o=[...e],[l,a]=s;E(l!=null,"Invalid first pivot index"),E(a!=null,"Invalid second pivot index");let u=0;if(i==="keyboard"){{const d=n<0?a:l,f=t[d];E(f,`Panel constraints not found for index ${d}`);const{collapsedSize:x=0,collapsible:m,minSize:z=0}=f;if(m){const v=e[d];if(E(v!=null,`Previous layout not found for panel index ${d}`),te(v,x)){const y=z-v;we(y,Math.abs(n))>0&&(n=n<0?0-y:y)}}}{const d=n<0?l:a,f=t[d];E(f,`No panel constraints found for index ${d}`);const{collapsedSize:x=0,collapsible:m,minSize:z=0}=f;if(m){const v=e[d];if(E(v!=null,`Previous layout not found for panel index ${d}`),te(v,z)){const y=v-x;we(y,Math.abs(n))>0&&(n=n<0?0-y:y)}}}}{const d=n<0?1:-1;let f=n<0?a:l,x=0;for(;;){const z=e[f];E(z!=null,`Previous layout not found for panel index ${f}`);const y=ke({panelConstraints:t,panelIndex:f,size:100})-z;if(x+=y,f+=d,f<0||f>=t.length)break}const m=Math.min(Math.abs(n),Math.abs(x));n=n<0?0-m:m}{let f=n<0?l:a;for(;f>=0&&f<t.length;){const x=Math.abs(n)-Math.abs(u),m=e[f];E(m!=null,`Previous layout not found for panel index ${f}`);const z=m-x,v=ke({panelConstraints:t,panelIndex:f,size:z});if(!te(m,v)&&(u+=m-v,o[f]=v,u.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?f--:f++}}if(Yn(r,o))return r;{const d=n<0?a:l,f=e[d];E(f!=null,`Previous layout not found for panel index ${d}`);const x=f+u,m=ke({panelConstraints:t,panelIndex:d,size:x});if(o[d]=m,!te(m,x)){let z=x-m,y=n<0?a:l;for(;y>=0&&y<t.length;){const P=o[y];E(P!=null,`Previous layout not found for panel index ${y}`);const M=P+z,k=ke({panelConstraints:t,panelIndex:y,size:M});if(te(P,k)||(z-=k-P,o[y]=k),te(z,0))break;n>0?y--:y++}}}const p=o.reduce((d,f)=>f+d,0);return te(p,100)?o:r}function Zn({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const l=t[0];E(l!=null,"No pivot index found"),e.forEach((d,f)=>{const{constraints:x}=d,{maxSize:m=100,minSize:z=0}=x;f===l?(s=z,r=m):(i+=z,o+=m)});const a=Math.min(r,100-i),u=Math.max(s,100-o),p=n[l];return{valueMax:a,valueMin:u,valueNow:p}}function De(n,e=document){return Array.from(e.querySelectorAll(`[${V.resizeHandleId}][data-panel-group-id="${n}"]`))}function Ht(n,e,t=document){const r=De(n,t).findIndex(i=>i.getAttribute(V.resizeHandleId)===e);return r??null}function Ut(n,e,t){const s=Ht(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Ot(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Ke(n,e=document){const t=e.querySelector(`[${V.resizeHandleId}="${n}"]`);return t||null}function es(n,e,t,s=document){var r,i,o,l;const a=Ke(e,s),u=De(n,s),p=a?u.indexOf(a):-1,d=(r=(i=t[p])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,f=(o=(l=t[p+1])===null||l===void 0?void 0:l.id)!==null&&o!==void 0?o:null;return[d,f]}function ts({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){g.useRef({didWarnAboutMissingResizeHandle:!1}),ye(()=>{if(!i)return;const l=De(t,i);for(let a=0;a<r.length-1;a++){const{valueMax:u,valueMin:p,valueNow:d}=Zn({layout:s,panelsArray:r,pivotIndices:[a,a+1]}),f=l[a];if(f!=null){const x=r[a];E(x,`No panel data found for index "${a}"`),f.setAttribute("aria-controls",x.id),f.setAttribute("aria-valuemax",""+Math.round(u)),f.setAttribute("aria-valuemin",""+Math.round(p)),f.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{l.forEach((a,u)=>{a.removeAttribute("aria-controls"),a.removeAttribute("aria-valuemax"),a.removeAttribute("aria-valuemin"),a.removeAttribute("aria-valuenow")})}},[t,s,r,i]),g.useEffect(()=>{if(!i)return;const l=e.current;E(l,"Eager values not found");const{panelDataArray:a}=l,u=Ot(t,i);E(u!=null,`No group found for id "${t}"`);const p=De(t,i);E(p,`No resize handles found for group id "${t}"`);const d=p.map(f=>{const x=f.getAttribute(V.resizeHandleId);E(x,"Resize handle element has no handle id attribute");const[m,z]=es(t,x,a,i);if(m==null||z==null)return()=>{};const v=y=>{if(!y.defaultPrevented)switch(y.key){case"Enter":{y.preventDefault();const P=a.findIndex(M=>M.id===m);if(P>=0){const M=a[P];E(M,`No panel data found for index ${P}`);const k=s[P],{collapsedSize:W=0,collapsible:N,minSize:w=0}=M.constraints;if(k!=null&&N){const K=Ee({delta:te(k,W)?w-W:W-k,initialLayout:s,panelConstraints:a.map(q=>q.constraints),pivotIndices:Ut(t,x,i),prevLayout:s,trigger:"keyboard"});s!==K&&o(K)}}break}}};return f.addEventListener("keydown",v),()=>{f.removeEventListener("keydown",v)}});return()=>{d.forEach(f=>f())}},[i,n,e,t,s,r,o])}function xt(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function Wt(n,e){const t=n==="horizontal",{x:s,y:r}=qe(e);return t?s:r}function ns(n,e,t,s,r){const i=t==="horizontal",o=Ke(e,r);E(o,`No resize handle element found for id "${e}"`);const l=o.getAttribute(V.groupId);E(l,"Resize handle element has no group id attribute");let{initialCursorPosition:a}=s;const u=Wt(t,n),p=Ot(l,r);E(p,`No group element found for id "${l}"`);const d=p.getBoundingClientRect(),f=i?d.width:d.height;return(u-a)/f*100}function ss(n,e,t,s,r,i){if(It(n)){const o=t==="horizontal";let l=0;n.shiftKey?l=100:r!=null?l=r:l=10;let a=0;switch(n.key){case"ArrowDown":a=o?0:l;break;case"ArrowLeft":a=o?-l:0;break;case"ArrowRight":a=o?l:0;break;case"ArrowUp":a=o?0:-l;break;case"End":a=100;break;case"Home":a=-100;break}return a}else return s==null?0:ns(n,e,t,s,i)}function rs({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];E(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;l!=null&&(s++,e[i]=l,r-=l)}for(let i=0;i<n.length;i++){const o=t[i];E(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;if(l!=null)continue;const a=n.length-s,u=r/a;s++,e[i]=u,r-=u}return e}function Se(n,e,t){e.forEach((s,r)=>{const i=n[r];E(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:l,id:a}=i,{collapsedSize:u=0,collapsible:p}=l,d=t[a];if(d==null||s!==d){t[a]=s;const{onCollapse:f,onExpand:x,onResize:m}=o;m&&m(s,d),p&&(f||x)&&(x&&(d==null||pe(d,u))&&!pe(s,u)&&x(),f&&(d==null||!pe(d,u))&&pe(s,u)&&f())}})}function Ae(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function is({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let l;return o==null?l=n!=null?n.toPrecision(i):"1":s.length===1?l="1":l=o.toPrecision(i),{flexBasis:0,flexGrow:l,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function os(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function gt(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function qt(n){return`react-resizable-panels:${n}`}function Bt(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function Kt(n,e){try{const t=qt(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function ls(n,e,t){var s,r;const i=(s=Kt(n,t))!==null&&s!==void 0?s:{},o=Bt(e);return(r=i[o])!==null&&r!==void 0?r:null}function as(n,e,t,s,r){var i;const o=qt(n),l=Bt(e),a=(i=Kt(n,r))!==null&&i!==void 0?i:{};a[l]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(a))}catch(u){console.error(u)}}function yt({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!te(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];E(o!=null,`No layout data found for index ${i}`);const l=100/s*o;t[i]=l}let r=0;for(let i=0;i<e.length;i++){const o=t[i];E(o!=null,`No layout data found for index ${i}`);const l=ke({panelConstraints:e,panelIndex:i,size:o});o!=l&&(r+=o-l,t[i]=l)}if(!te(r,0))for(let i=0;i<e.length;i++){const o=t[i];E(o!=null,`No layout data found for index ${i}`);const l=o+r,a=ke({panelConstraints:e,panelIndex:i,size:l});if(o!==a&&(r-=a-o,t[i]=a,te(r,0)))break}return t}const cs=100,Ne={getItem:n=>(gt(Ne),Ne.getItem(n)),setItem:(n,e)=>{gt(Ne),Ne.setItem(n,e)}},wt={};function Gt({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:l=null,storage:a=Ne,style:u,tagName:p="div",...d}){const f=it(i),x=g.useRef(null),[m,z]=g.useState(null),[v,y]=g.useState([]),P=Jn(),M=g.useRef({}),k=g.useRef(new Map),W=g.useRef(0),N=g.useRef({autoSaveId:n,direction:s,dragState:m,id:f,keyboardResizeBy:l,onLayout:o,storage:a}),w=g.useRef({layout:v,panelDataArray:[],panelDataArrayChanged:!1});g.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),g.useImperativeHandle(r,()=>({getId:()=>N.current.id,getLayout:()=>{const{layout:h}=w.current;return h},setLayout:h=>{const{onLayout:j}=N.current,{layout:I,panelDataArray:C}=w.current,b=yt({layout:h,panelConstraints:C.map($=>$.constraints)});xt(I,b)||(y(b),w.current.layout=b,j&&j(b),Se(C,b,M.current))}}),[]),ye(()=>{N.current.autoSaveId=n,N.current.direction=s,N.current.dragState=m,N.current.id=f,N.current.onLayout=o,N.current.storage=a}),ts({committedValuesRef:N,eagerValuesRef:w,groupId:f,layout:v,panelDataArray:w.current.panelDataArray,setLayout:y,panelGroupElement:x.current}),g.useEffect(()=>{const{panelDataArray:h}=w.current;if(n){if(v.length===0||v.length!==h.length)return;let j=wt[n];j==null&&(j=os(as,cs),wt[n]=j);const I=[...h],C=new Map(k.current);j(n,I,C,v,a)}},[n,v,a]),g.useEffect(()=>{});const K=g.useCallback(h=>{const{onLayout:j}=N.current,{layout:I,panelDataArray:C}=w.current;if(h.constraints.collapsible){const b=C.map(ae=>ae.constraints),{collapsedSize:$=0,panelSize:O,pivotIndices:Q}=xe(C,h,I);if(E(O!=null,`Panel size not found for panel "${h.id}"`),!pe(O,$)){k.current.set(h.id,O);const ce=ze(C,h)===C.length-1?O-$:$-O,G=Ee({delta:ce,initialLayout:I,panelConstraints:b,pivotIndices:Q,prevLayout:I,trigger:"imperative-api"});Ae(I,G)||(y(G),w.current.layout=G,j&&j(G),Se(C,G,M.current))}}},[]),q=g.useCallback((h,j)=>{const{onLayout:I}=N.current,{layout:C,panelDataArray:b}=w.current;if(h.constraints.collapsible){const $=b.map(re=>re.constraints),{collapsedSize:O=0,panelSize:Q=0,minSize:ae=0,pivotIndices:ce}=xe(b,h,C),G=j??ae;if(pe(Q,O)){const re=k.current.get(h.id),Ce=re!=null&&re>=G?re:G,Ge=ze(b,h)===b.length-1?Q-Ce:Ce-Q,Z=Ee({delta:Ge,initialLayout:C,panelConstraints:$,pivotIndices:ce,prevLayout:C,trigger:"imperative-api"});Ae(C,Z)||(y(Z),w.current.layout=Z,I&&I(Z),Se(b,Z,M.current))}}},[]),U=g.useCallback(h=>{const{layout:j,panelDataArray:I}=w.current,{panelSize:C}=xe(I,h,j);return E(C!=null,`Panel size not found for panel "${h.id}"`),C},[]),T=g.useCallback((h,j)=>{const{panelDataArray:I}=w.current,C=ze(I,h);return is({defaultSize:j,dragState:m,layout:v,panelData:I,panelIndex:C})},[m,v]),D=g.useCallback(h=>{const{layout:j,panelDataArray:I}=w.current,{collapsedSize:C=0,collapsible:b,panelSize:$}=xe(I,h,j);return E($!=null,`Panel size not found for panel "${h.id}"`),b===!0&&pe($,C)},[]),X=g.useCallback(h=>{const{layout:j,panelDataArray:I}=w.current,{collapsedSize:C=0,collapsible:b,panelSize:$}=xe(I,h,j);return E($!=null,`Panel size not found for panel "${h.id}"`),!b||we($,C)>0},[]),_=g.useCallback(h=>{const{panelDataArray:j}=w.current;j.push(h),j.sort((I,C)=>{const b=I.order,$=C.order;return b==null&&$==null?0:b==null?-1:$==null?1:b-$}),w.current.panelDataArrayChanged=!0,P()},[P]);ye(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:h,onLayout:j,storage:I}=N.current,{layout:C,panelDataArray:b}=w.current;let $=null;if(h){const Q=ls(h,b,I);Q&&(k.current=new Map(Object.entries(Q.expandToSizes)),$=Q.layout)}$==null&&($=rs({panelDataArray:b}));const O=yt({layout:$,panelConstraints:b.map(Q=>Q.constraints)});xt(C,O)||(y(O),w.current.layout=O,j&&j(O),Se(b,O,M.current))}}),ye(()=>{const h=w.current;return()=>{h.layout=[]}},[]);const L=g.useCallback(h=>{let j=!1;const I=x.current;return I&&window.getComputedStyle(I,null).getPropertyValue("direction")==="rtl"&&(j=!0),function(b){b.preventDefault();const $=x.current;if(!$)return()=>null;const{direction:O,dragState:Q,id:ae,keyboardResizeBy:ce,onLayout:G}=N.current,{layout:re,panelDataArray:Ce}=w.current,{initialLayout:Le}=Q??{},Ge=Ut(ae,h,$);let Z=ss(b,h,O,Q,ce,$);const ct=O==="horizontal";ct&&j&&(Z=-Z);const rn=Ce.map(on=>on.constraints),$e=Ee({delta:Z,initialLayout:Le??re,panelConstraints:rn,pivotIndices:Ge,prevLayout:re,trigger:It(b)?"keyboard":"mouse-or-touch"}),ut=!Ae(re,$e);(Mt(b)||Rt(b))&&W.current!=Z&&(W.current=Z,!ut&&Z!==0?ct?Je(h,Z<0?Lt:_t):Je(h,Z<0?At:Tt):Je(h,0)),ut&&(y($e),w.current.layout=$e,G&&G($e),Se(Ce,$e,M.current))}},[]),F=g.useCallback((h,j)=>{const{onLayout:I}=N.current,{layout:C,panelDataArray:b}=w.current,$=b.map(re=>re.constraints),{panelSize:O,pivotIndices:Q}=xe(b,h,C);E(O!=null,`Panel size not found for panel "${h.id}"`);const ce=ze(b,h)===b.length-1?O-j:j-O,G=Ee({delta:ce,initialLayout:C,panelConstraints:$,pivotIndices:Q,prevLayout:C,trigger:"imperative-api"});Ae(C,G)||(y(G),w.current.layout=G,I&&I(G),Se(b,G,M.current))},[]),H=g.useCallback((h,j)=>{const{layout:I,panelDataArray:C}=w.current,{collapsedSize:b=0,collapsible:$}=j,{collapsedSize:O=0,collapsible:Q,maxSize:ae=100,minSize:ce=0}=h.constraints,{panelSize:G}=xe(C,h,I);G!=null&&($&&Q&&pe(G,b)?pe(b,O)||F(h,O):G<ce?F(h,ce):G>ae&&F(h,ae))},[F]),J=g.useCallback((h,j)=>{const{direction:I}=N.current,{layout:C}=w.current;if(!x.current)return;const b=Ke(h,x.current);E(b,`Drag handle element not found for id "${h}"`);const $=Wt(I,j);z({dragHandleId:h,dragHandleRect:b.getBoundingClientRect(),initialCursorPosition:$,initialLayout:C})},[]),ne=g.useCallback(()=>{z(null)},[]),B=g.useCallback(h=>{const{panelDataArray:j}=w.current,I=ze(j,h);I>=0&&(j.splice(I,1),delete M.current[h.id],w.current.panelDataArrayChanged=!0,P())},[P]),S=g.useMemo(()=>({collapsePanel:K,direction:s,dragState:m,expandPanel:q,getPanelSize:U,getPanelStyle:T,groupId:f,isPanelCollapsed:D,isPanelExpanded:X,reevaluatePanelConstraints:H,registerPanel:_,registerResizeHandle:L,resizePanel:F,startDragging:J,stopDragging:ne,unregisterPanel:B,panelGroupElement:x.current}),[K,m,s,q,U,T,f,D,X,H,_,L,F,J,ne,B]),R={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return g.createElement(We.Provider,{value:S},g.createElement(p,{...d,children:e,className:t,id:i,ref:x,style:{...R,...u},[V.group]:"",[V.groupDirection]:s,[V.groupId]:f}))}const Vt=g.forwardRef((n,e)=>g.createElement(Gt,{...n,forwardedRef:e}));Gt.displayName="PanelGroup";Vt.displayName="forwardRef(PanelGroup)";function ze(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function xe(n,e,t){const s=ze(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function us({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){g.useEffect(()=>{if(n||t==null||s==null)return;const r=Ke(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const l=r.getAttribute(V.groupId);E(l,`No group element found for id "${l}"`);const a=De(l,s),u=Ht(l,e,s);E(u!==null,`No resize element found for id "${e}"`);const p=o.shiftKey?u>0?u-1:a.length-1:u+1<a.length?u+1:0;a[p].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function Xt({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:l,onFocus:a,onPointerDown:u,onPointerUp:p,style:d={},tabIndex:f=0,tagName:x="div",...m}){var z,v;const y=g.useRef(null),P=g.useRef({onClick:o,onDragging:l,onPointerDown:u,onPointerUp:p});g.useEffect(()=>{P.current.onClick=o,P.current.onDragging=l,P.current.onPointerDown=u,P.current.onPointerUp=p});const M=g.useContext(We);if(M===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:k,groupId:W,registerResizeHandle:N,startDragging:w,stopDragging:K,panelGroupElement:q}=M,U=it(r),[T,D]=g.useState("inactive"),[X,_]=g.useState(!1),[L,F]=g.useState(null),H=g.useRef({state:T});ye(()=>{H.current.state=T}),g.useEffect(()=>{if(t)F(null);else{const S=N(U);F(()=>S)}},[t,U,N]);const J=(z=s?.coarse)!==null&&z!==void 0?z:15,ne=(v=s?.fine)!==null&&v!==void 0?v:5;g.useEffect(()=>{if(t||L==null)return;const S=y.current;E(S,"Element ref not attached");let R=!1;return Xn(U,S,k,{coarse:J,fine:ne},(j,I,C)=>{if(!I){D("inactive");return}switch(j){case"down":{D("drag"),R=!1,E(C,'Expected event to be defined for "down" action'),w(U,C);const{onDragging:b,onPointerDown:$}=P.current;b?.(!0),$?.();break}case"move":{const{state:b}=H.current;R=!0,b!=="drag"&&D("hover"),E(C,'Expected event to be defined for "move" action'),L(C);break}case"up":{D("hover"),K();const{onClick:b,onDragging:$,onPointerUp:O}=P.current;$?.(!1),O?.(),R||b?.();break}}})},[J,k,t,ne,N,U,L,w,K]),us({disabled:t,handleId:U,resizeHandler:L,panelGroupElement:q});const B={touchAction:"none",userSelect:"none"};return g.createElement(x,{...m,children:n,className:e,id:r,onBlur:()=>{_(!1),i?.()},onFocus:()=>{_(!0),a?.()},ref:y,role:"separator",style:{...B,...d},tabIndex:f,[V.groupDirection]:k,[V.groupId]:W,[V.resizeHandle]:"",[V.resizeHandleActive]:T==="drag"?"pointer":X?"keyboard":void 0,[V.resizeHandleEnabled]:!t,[V.resizeHandleId]:U,[V.resizeHandleState]:T})}Xt.displayName="PanelResizeHandle";function dr(n){const e=A.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ve("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=c.jsx(Vt,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function fr(n){const e=A.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx(Nt,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function pr(n){const e=A.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ve("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&c.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:c.jsx(hn,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let l;return e[8]!==s||e[9]!==i||e[10]!==o?(l=c.jsx(Xt,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=l):l=e[11],l}function Qt(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function oe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function le(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function mr(n,e){const t=A.c(11),{org:s}=se();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Y.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await le(oe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(ds),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:an,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],be(o)}function ds(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function Jt(n,e,t){const s=A.c(15),{org:r}=se();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Y.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let l;s[4]!==t?(l=t?.refetchIntervalWhenAbsent?p=>p.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=l):l=s[5];let a;s[6]!==r.slug||s[7]!==e||s[8]!==n?(a=async()=>{const p=await fetch(oe(r.slug,n??"","stat",{path:e}));if(p.status===404)return null;if(!p.ok)throw new Error(`HTTP ${p.status}`);return(await p.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=a):a=s[9];let u;return s[10]!==i||s[11]!==o||s[12]!==l||s[13]!==a?(u={queryKey:i,enabled:o,refetchInterval:l,queryFn:a},s[10]=i,s[11]=o,s[12]=l,s[13]=a,s[14]=u):u=s[14],be(u)}function hr(n){const e=A.c(9),{org:t}=se();let s;e[0]!==t.id||e[1]!==n?(s=Y.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await le(oe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],be(i)}function xr(n,e){const t=A.c(9),s=n===void 0?60:n,{org:r}=se();let i;t[0]!==r.id?(i=Y.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let l;t[2]!==s||t[3]!==r.slug?(l=async()=>(await(await le(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=l):l=t[4];let a;return t[5]!==i||t[6]!==o||t[7]!==l?(a={queryKey:i,enabled:o,queryFn:l},t[5]=i,t[6]=o,t[7]=l,t[8]=a):a=t[8],be(a)}function gr(n){const e=A.c(8),{org:t}=se();let s;e[0]!==t.id?(s=Y.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const l=await le(`/api/${encodeURIComponent(t.slug)}/fs/public-sets`),{sets:a}=await l.json(),u=["home",...a.map(ps)];return(await Promise.all(u.map(async d=>{const f=await le(oe(t.slug,d,"list",{path:""})),{entries:x}=await f.json();return x.filter(fs).map(m=>({volume:d,path:m.path}))}))).flat()},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],be(o)}function fs(n){return n.kind==="dir"&&n.hasSkill}function ps(n){return`public-${n}`}function yr(){const n=A.c(7),{org:e}=se();let t;n[0]!==e.id?(t=Y.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await le(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],be(r)}function ms(n){const e=A.c(3),{org:t}=se();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>oe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function wr(){const n=A.c(2),{org:e}=se();let t;return n[0]!==e.slug?(t=(s,r)=>oe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function hs(n){const e=A.c(3),{org:t}=se();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await le(oe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],Ie(s)}function xs(n){const e=A.c(18),{org:t}=se(),s=st();let r;e[0]!==t||e[1]!==n?(r=async u=>(await(await le(oe(t.slug,n,"public",{path:u.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:u.mode,password:u.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async u=>{const p=Y.orgFsStat(t.id,n,u.path);await s.cancelQueries({queryKey:p});const d=s.getQueryData(p),f=u.mode!=="private";return s.setQueryData(p,x=>x&&{...x,readPublic:f,effectivePublic:f,shareMode:u.mode}),{key:p,previous:d}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(u,p,d)=>{d&&s.setQueryData(d.key,d.previous)},e[7]=s,e[8]=o):o=e[8];let l;e[9]!==t||e[10]!==s||e[11]!==n?(l=(u,p,d)=>{s.invalidateQueries({queryKey:Y.orgFsStat(t.id,n,d.path)}),s.invalidateQueries({queryKey:Y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Y.orgFsRecent(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=l):l=e[12];let a;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==l?(a={mutationFn:r,onMutate:i,onError:o,onSettled:l},e[13]=r,e[14]=i,e[15]=o,e[16]=l,e[17]=a):a=e[17],Ie(a)}function vr(n){const e=A.c(26),{org:t}=se(),s=st();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Y.orgFsRecent(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async v=>{for(const y of v.files){const P=v.dir?`${v.dir}/${y.name}`:y.name;await le(oe(t.slug,n,"file",{path:P}),{method:"PUT",headers:{"content-type":y.type||"application/octet-stream"},body:y})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let l;e[7]!==i||e[8]!==o?(l={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=l):l=e[9];const a=Ie(l);let u;e[10]!==t||e[11]!==n?(u=async v=>{await le(oe(t.slug,n,"dir",{path:v}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=u):u=e[12];let p;e[13]!==i||e[14]!==u?(p={mutationFn:u,onSuccess:i},e[13]=i,e[14]=u,e[15]=p):p=e[15];const d=Ie(p);let f;e[16]!==t||e[17]!==n?(f=async v=>{await le(oe(t.slug,n,"file",{path:v}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=f):f=e[18];let x;e[19]!==i||e[20]!==f?(x={mutationFn:f,onSuccess:i},e[19]=i,e[20]=f,e[21]=x):x=e[21];const m=Ie(x);let z;return e[22]!==d||e[23]!==m||e[24]!==a?(z={upload:a,mkdir:d,remove:m},e[22]=d,e[23]=m,e[24]=a,e[25]=z):z=e[25],z}function gs(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function ys(n){if(gs(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function ws(n){try{return decodeURIComponent(n)}catch{return n}}function vs(n){return ys(n),encodeURIComponent(n)}function bs(n){return`.deco/blocks/${vs(n)}.json`}function br(n){return`/${bs(n)}`}const Sr=1e4,Ss=3;function nt(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function at(n){return n.startsWith("/")?n.slice(1):n}function Oe(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function zs(n){const e=Oe(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function zr(n,e){const t=e.replace(/^\/+|\/+$/g,"");return Oe(t?`${n==="/"?"":n}/${t}`:n)}function jr(n,e){return e==="directory"?n:zs(n)}function kr(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function js(n){const e=at(n);return e?e.split("/").filter(Boolean).length:0}function Pr(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Cr(n,e){return js(n)>=Ss&&!e.has(n)}function $r(n,e,t=[]){const s=at(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function Er(n){const e=at(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return ws(s)}function ks(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Nr(n){const e=nt(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Ir(n,e=[]){const t={children:[]},s=i=>{const l=nt(i).split("/").filter(Boolean);let a=t,u="";for(const p of l){u+=`/${p}`;let d=a.children.find(f=>f.name===p);d?d.kind==="file"&&(d.kind="directory"):(d={name:p,path:u,kind:"directory",children:[]},a.children.push(d)),a=d}};for(const i of n){const l=nt(i).split("/").filter(Boolean);let a=t,u="";l.forEach((p,d)=>{u+=`/${p}`;const f=d===l.length-1;let x=a.children.find(m=>m.name===p);x||(x={name:p,path:u,kind:f?"file":"directory",children:[]},a.children.push(x)),a=x})}for(const i of e)s(Oe(i));const r=i=>{i.sort((o,l)=>o.kind!==l.kind?o.kind==="directory"?-1:1:o.name.localeCompare(l.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function Ps(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...Ps(r.children,e,t+1)));return s}function Mr(n){return n.split(`
|
|
2
|
-
`).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
|
|
3
|
-
`)}jn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function Cs(n){const e=A.c(11),{value:t,filename:s}=n,[r]=cn(),i=r.theme==="dark"||r.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==s?(o=ks(s),e[0]=s,e[1]=o):o=e[1];const l=i?"vs-dark":"light";let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx("div",{className:"flex h-full w-full items-center justify-center",children:c.jsx(un,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let u,p;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={enabled:!1},p={top:12,bottom:12},e[3]=u,e[4]=p):(u=e[3],p=e[4]);let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:u,padding:p,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=d):d=e[5];let f;return e[6]!==s||e[7]!==o||e[8]!==l||e[9]!==t?(f=c.jsx(kn,{path:s,language:o,value:t,theme:l,loading:a,options:d},s),e[6]=s,e[7]=o,e[8]=l,e[9]=t,e[10]=f):f=e[10],f}function Yt(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const $s=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Es=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),vt=2*1024*1024;function Ns(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return $s.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=vt?"markdown":"download":Es.has(t)&&e<=vt?"text":"download"}function Zt(){const n=A.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=c.jsx(_e,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx("div",{className:"flex h-full w-full items-center justify-center",children:c.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx(_e,{className:"h-3 w-full"}),c.jsx(_e,{className:"h-3 w-5/6"}),c.jsx(_e,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function en(n){const e=A.c(20),{file:t,note:s}=n;let r;e[0]!==t.filename?(r=c.jsx(et,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=r):r=e[1];let i;e[2]!==t.filename?(i=c.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let o;e[4]!==t.size?(o=Yt(t.size),e[4]=t.size,e[5]=o):o=e[5];const l=s?` · ${s}`:"";let a;e[6]!==o||e[7]!==l?(a=c.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,l]}),e[6]=o,e[7]=l,e[8]=a):a=e[8];let u;e[9]!==i||e[10]!==a?(u=c.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,a]}),e[9]=i,e[10]=a,e[11]=u):u=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=c.jsx(Fe,{size:14}),e[12]=p):p=e[12];let d;e[13]!==t.downloadUrl||e[14]!==t.filename?(d=c.jsx(ee,{asChild:!0,variant:"outline",size:"sm",children:c.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[p,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=d):d=e[15];let f;return e[16]!==r||e[17]!==u||e[18]!==d?(f=c.jsx("div",{className:"flex h-full w-full items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[r,u,d]})}),e[16]=r,e[17]=u,e[18]=d,e[19]=f):f=e[19],f}function bt(n){const e=A.c(16),{file:t,markdown:s}=n;let r;e[0]!==t.downloadUrl?(r=Y.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=r):r=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const d=await fetch(t.downloadUrl,{credentials:"include"});if(!d.ok)throw new Error(`fetch failed: ${d.status}`);return d.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==r||e[5]!==i?(o={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=o):o=e[6];const{data:l,isPending:a,isError:u}=be(o);if(a){let d;return e[7]===Symbol.for("react.memo_cache_sentinel")?(d=c.jsx(Zt,{}),e[7]=d):d=e[7],d}if(u||l===void 0){let d;return e[8]!==t?(d=c.jsx(en,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=d):d=e[9],d}if(s){const d=`file-preview-${t.key}`;let f;return e[10]!==l||e[11]!==d?(f=c.jsx("div",{className:"h-full overflow-y-auto",children:c.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:c.jsx(Pn,{id:d,text:l})})}),e[10]=l,e[11]=d,e[12]=f):f=e[12],f}let p;return e[13]!==l||e[14]!==t.filename?(p=c.jsx(Cs,{value:l,filename:t.filename}),e[13]=l,e[14]=t.filename,e[15]=p):p=e[15],p}function Is(n){const e=A.c(15),{file:t}=n;switch(Ns(t.filename,t.size)){case"image":{let r;return e[0]!==t.downloadUrl||e[1]!==t.filename?(r=c.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:c.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=r):r=e[2],r}case"pdf":{let r;return e[3]!==t.downloadUrl||e[4]!==t.filename?(r=c.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=r):r=e[5],r}case"html":{let r;return e[6]!==t.downloadUrl||e[7]!==t.filename?(r=c.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=r):r=e[8],r}case"markdown":{let r;return e[9]!==t?(r=c.jsx(bt,{file:t,markdown:!0}),e[9]=t,e[10]=r):r=e[10],r}case"text":{let r;return e[11]!==t?(r=c.jsx(bt,{file:t,markdown:!1}),e[11]=t,e[12]=r):r=e[12],r}default:{let r;return e[13]!==t?(r=c.jsx(en,{file:t}),e[13]=t,e[14]=r):r=e[14],r}}}function Ms(n){const e=A.c(40),{readUrl:t,editor:s,downloadName:r,trailing:i}=n;let o;e[0]!==t?(o=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=o):o=e[1];const l=o;let a;e[2]!==s?(a=s.deckDetected&&c.jsxs(ue,{children:[c.jsx(de,{asChild:!0,children:c.jsx(ee,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:c.jsx(Nn,{size:14})})}),c.jsx(fe,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=a):a=e[3];let u;e[4]!==l?(u=()=>window.open(l,"_blank","noopener"),e[4]=l,e[5]=u):u=e[5];let p;e[6]!==l?(p=c.jsx("span",{className:"truncate",children:l}),e[6]=l,e[7]=p):p=e[7];let d;e[8]!==l||e[9]!==u||e[10]!==p?(d=c.jsx("button",{type:"button",onClick:u,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:l,children:p}),e[8]=l,e[9]=u,e[10]=p,e[11]=d):d=e[11];let f;e[12]!==s.agentUpdated||e[13]!==s.reload?(f=s.agentUpdated&&c.jsxs(ue,{children:[c.jsx(de,{asChild:!0,children:c.jsxs(ee,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[c.jsx(dn,{size:12}),"Agent updated — reload"]})}),c.jsx(fe,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=s.agentUpdated,e[13]=s.reload,e[14]=f):f=e[14];let x;e[15]!==s.saving?(x=s.saving&&c.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=s.saving,e[16]=x):x=e[16];let m;e[17]!==s?(m=s.deckDetected&&s.writable&&c.jsxs(ue,{children:[c.jsx(de,{asChild:!0,children:c.jsx(ee,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:ve(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:c.jsx(xn,{size:14})})}),c.jsx(fe,{side:"bottom",children:s.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=s,e[18]=m):m=e[18];let z;e[19]!==l||e[20]!==r||e[21]!==s.deckDetected?(z=s.deckDetected?c.jsxs(Cn,{children:[c.jsx($n,{asChild:!0,children:c.jsx(ee,{variant:"ghost",size:"icon","aria-label":"Download",children:c.jsx(Fe,{size:14})})}),c.jsxs(En,{align:"end",children:[c.jsxs(dt,{onClick:()=>window.open(`${l}#print`,"_blank","noopener"),children:[c.jsx(gn,{size:14}),"Export as PDF"]}),c.jsx(dt,{asChild:!0,children:c.jsxs("a",{href:l,download:r,children:[c.jsx(yn,{size:14}),"Download HTML"]})})]})]}):c.jsxs(ue,{children:[c.jsx(de,{asChild:!0,children:c.jsx(ee,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:c.jsx("a",{href:l,download:r,children:c.jsx(Fe,{size:14})})})}),c.jsx(fe,{side:"bottom",children:"Download"})]}),e[19]=l,e[20]=r,e[21]=s.deckDetected,e[22]=z):z=e[22];let v;e[23]!==l?(v=()=>window.open(l,"_blank","noopener"),e[23]=l,e[24]=v):v=e[24];let y;e[25]===Symbol.for("react.memo_cache_sentinel")?(y=c.jsx($t,{size:14}),e[25]=y):y=e[25];let P;e[26]!==v?(P=c.jsx(de,{asChild:!0,children:c.jsx(ee,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:v,children:y})}),e[26]=v,e[27]=P):P=e[27];let M;e[28]===Symbol.for("react.memo_cache_sentinel")?(M=c.jsx(fe,{side:"bottom",children:"Open in new tab"}),e[28]=M):M=e[28];let k;e[29]!==P?(k=c.jsxs(ue,{children:[P,M]}),e[29]=P,e[30]=k):k=e[30];let W;return e[31]!==k||e[32]!==a||e[33]!==d||e[34]!==f||e[35]!==x||e[36]!==m||e[37]!==z||e[38]!==i?(W=c.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[a,d,f,x,m,z,k,i]}),e[31]=k,e[32]=a,e[33]=d,e[34]=f,e[35]=x,e[36]=m,e[37]=z,e[38]=i,e[39]=W):W=e[39],W}const je=1;function Rs(n){if(typeof n!="object"||n===null||n.v!==je||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class me extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function tn(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function Ds(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?tn(t).length:null}function Ls(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new me("no <deck-viewer> element in source","no-viewer");const r=tn(s),i=e.kind==="move"?e.from:e.at,o=r[i];if(!o)throw new me(`slide index ${i} out of range (${r.length})`,"stale-index");switch(e.kind){case"remove":{if(r.length<=1)throw new me("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const a=o.cloneNode(!0);a.removeAttribute("id");for(const u of a.querySelectorAll("[id]"))u.removeAttribute("id");o.after(a);break}case"move":{if(e.to<0||e.to>=r.length)throw new me(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const a=e.to<e.from?r[e.to]:r[e.to].nextSibling;s.insertBefore(o,a)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new me(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const u=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!u)throw new me("replace html has no root element","bad-op");o.replaceWith(t.importNode(u,!0));break}default:throw new me(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
|
-
`:""}${t.documentElement.outerHTML}
|
|
5
|
-
`}const St="home",_s=400,As=800;function Ts(n){const e=n.savePath!==void 0,{org:t}=se(),s=st(),r=hs(St),[i,o]=g.useState(!1),[l,a]=g.useState(!1),[u,p]=g.useState(!1),[d,f]=g.useState(!1),[x,m]=g.useState(!1),[z,v]=g.useState(!1),[y,P]=g.useState(null),[M,k]=g.useState(null),[W,N]=g.useState(0),[w]=g.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),K=i||z||x,q=()=>{n.savePath!==void 0&&(s.invalidateQueries({queryKey:Y.orgFsStat(t.id,St,n.savePath)}),s.invalidateQueries({queryKey:Y.orgFsRecent(t.id)}))},U=S=>{w.iframe?.contentWindow?.postMessage(S,"*")},T=()=>{w.source=null,f(!1),M&&P(M),N(S=>S+1),q()};n.statMarker!==M&&(k(n.statMarker),n.statMarker!==null&&(y===null?P(n.statMarker):w.selfMarkers.has(n.statMarker)||n.statMarker!==y&&(K?f(!0):(w.source=null,P(n.statMarker)))));const D=async()=>{w.saveTimer=null;const S=w.source;if(S===null){v(!1);return}m(!0);try{const R=await r.mutateAsync({path:n.savePath,body:S});w.selfMarkers.add(Qt(R)),q()}catch(R){console.error("[deck-editor] save failed",R),Me.error("Couldn't save deck edits — reloading the preview."),H.current.reload()}finally{m(!1),v(!1)}},X=S=>{v(!0),w.saveTimer&&clearTimeout(w.saveTimer),w.saveTimer=setTimeout(()=>{H.current.flushSave()},S)},_=(S,R,h)=>{U({v:je,type:"ack",opId:S,ok:R,error:h})},L=async S=>{if(!e){_(S.opId,!1,"read-only preview");return}try{if(w.source===null){const h=await fetch(n.readUrl,{credentials:"include"});if(!h.ok)throw new Error(`HTTP ${h.status}`);w.source=await h.text()}const R=Ds(w.source);if(R===null||R!==S.witness.childCount)throw new me(`slide count drifted (source ${R}, iframe ${S.witness.childCount})`,"stale-index");w.source=Ls(w.source,S.op),_(S.opId,!0),X(S.op.kind==="replace"?As:_s)}catch(R){console.error("[deck-editor] op failed",S.op,R),_(S.opId,!1,R instanceof Error?R.message:String(R)),Me.error("That edit couldn't be saved — reloading the preview."),H.current.reload()}},F=S=>{if(!w.iframe||S.source!==w.iframe.contentWindow)return;const R=Rs(S.data);if(R){if(R.type==="ready"){a(!0),H.current.editMode?U({v:je,type:"set-edit-mode",enabled:!0}):H.current.railOpen&&U({v:je,type:"set-rail",open:!0});return}R.type==="op"&&(w.queue=w.queue.then(()=>H.current.handleOp(R)).catch(()=>{}))}},H=g.useRef({onMessage:F,handleOp:L,flushSave:D,reload:T,editMode:i,railOpen:u});H.current={onMessage:F,handleOp:L,flushSave:D,reload:T,editMode:i,railOpen:u};const[J]=g.useState(()=>{let S=null;return R=>{if(R){w.iframe=R;const h=j=>H.current.onMessage(j);window.addEventListener("message",h),S=()=>window.removeEventListener("message",h)}else S?.(),S=null,w.iframe=null}}),ne=S=>{p(S),U({v:je,type:"set-rail",open:S})},B=S=>{o(S),U({v:je,type:"set-edit-mode",enabled:S}),S&&p(!0),!S&&d&&!z&&!x&&T()};return{iframeRef:J,deckDetected:l,writable:e,displayedMarker:y===null?null:`${y}.${W}`,editMode:i,setEditMode:B,railOpen:u,setRailOpen:ne,saving:x,agentUpdated:d,reload:T,postToIframe:U}}const Fs=300;function Hs({readUrl:n,marker:e,title:t,savePath:s,trailing:r}){const i=Ts({readUrl:n,statMarker:e,savePath:s}),[o,l]=g.useState(null);if(i.displayedMarker===null)return null;const a=n.includes("?")?"&":"?",u=`${n}${a}v=${encodeURIComponent(i.displayedMarker)}`,p=o===u;return c.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[c.jsx(Ms,{readUrl:n,editor:i,downloadName:t.split("/").pop()??t,trailing:r}),c.jsx("div",{className:"relative flex-1",children:c.jsx("iframe",{ref:i.iframeRef,src:u,onLoad:()=>l(u),sandbox:"allow-scripts",className:ve("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",p?"opacity-100":"opacity-0"),style:{transitionDuration:`${Fs}ms`},title:t},u)})]})}const Us=[{mode:"private",label:"Org only",Icon:fn},{mode:"public",label:"Public",Icon:Ct},{mode:"password",label:"Password",Icon:An}];function nn(n){const e=A.c(38),{volume:t,path:s,kind:r,shareMode:i,effectivePublic:o,url:l}=n,a=xs(t),{data:u}=Jt(t,s),p=u?.shareMode??i,f=(u?.effectivePublic??o)&&p==="private",x=r==="dir",m=x?"folder":"file",[z,v]=g.useState(!1),[y,P]=g.useState(""),[M,k]=g.useState(!1);let W;e[0]!==s||e[1]!==a||e[2]!==m?(W=(B,S)=>{a.mutate({path:s,mode:B,password:S},{onSuccess:()=>{v(!1),P(""),Me.success(B==="private"?`This ${m} is now org-only`:B==="public"?`Anyone with the link can now view this ${m}`:`This ${m} is now password-protected`)},onError:Os})},e[0]=s,e[1]=a,e[2]=m,e[3]=W):W=e[3];const N=W;let w;e[4]!==N?(w=B=>{if(B==="password"){v(!0);return}v(!1),N(B)},e[4]=N,e[5]=w):w=e[5];const K=w,q=z?"password":p;let U;e[6]!==l?(U=async()=>{l&&(await navigator.clipboard.writeText(l),k(!0),Me.success("Link copied to clipboard"),setTimeout(()=>k(!1),2e3))},e[6]=l,e[7]=U):U=e[7];const T=U;let D;e[8]!==M||e[9]!==T||e[10]!==l?(D=l?c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[c.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:l}),c.jsx(ee,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:T,"aria-label":"Copy link",children:M?c.jsx(Ln,{size:12,className:"text-green-600"}):c.jsx(_n,{size:12})})]}):null,e[8]=M,e[9]=T,e[10]=l,e[11]=D):D=e[11];const X=D;if(f){let B;e[12]===Symbol.for("react.memo_cache_sentinel")?(B=c.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:c.jsx(Ct,{size:16})}),e[12]=B):B=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=c.jsx("span",{className:"text-sm font-medium text-foreground",children:"Shared via a parent folder"}),e[13]=S):S=e[13];const R=x?"files in this folder":"this file";let h;e[14]!==R?(h=c.jsxs("div",{className:"flex items-start gap-3",children:[B,c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[S,c.jsxs("span",{className:"text-xs text-muted-foreground",children:["Anyone with the link can view"," ",R,". Manage sharing on the parent folder."]})]})]}),e[14]=R,e[15]=h):h=e[15];let j;return e[16]!==X||e[17]!==h?(j=c.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[h,X]}),e[16]=X,e[17]=h,e[18]=j):j=e[18],j}let _;e[19]!==q||e[20]!==K||e[21]!==a.isPending?(_=Us.map(B=>{const{mode:S,label:R,Icon:h}=B;return c.jsxs("button",{type:"button",disabled:a.isPending,onClick:()=>K(S),className:ve("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",q===S?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[c.jsx(h,{size:15}),R]},S)}),e[19]=q,e[20]=K,e[21]=a.isPending,e[22]=_):_=e[22];let L;e[23]!==_?(L=c.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-lg bg-muted p-1",children:_}),e[23]=_,e[24]=L):L=e[24];const F=q==="private"?`Only members of your organization can open ${x?"these files":"this link"}.`:q==="public"?x?"Anyone on the internet can view files in this folder via their link.":"Anyone on the internet with the link can view this file.":`Anyone with the link AND the password can view ${x?"files in this folder":"this file"}.`;let H;e[25]!==F?(H=c.jsx("p",{className:"text-xs text-muted-foreground",children:F}),e[25]=F,e[26]=H):H=e[26];let J;e[27]!==q||e[28]!==N||e[29]!==p||e[30]!==y||e[31]!==a.isPending?(J=q==="password"&&c.jsxs("form",{className:"flex items-center gap-2",onSubmit:B=>{B.preventDefault(),y&&N("password",y)},children:[c.jsx(In,{type:"password",value:y,onChange:B=>P(B.target.value),placeholder:p==="password"?"New password":"Password",autoComplete:"new-password",className:"h-8 text-xs"}),c.jsx(ee,{type:"submit",size:"sm",className:"shrink-0",disabled:!y||a.isPending,children:p==="password"?"Update":"Set"})]}),e[27]=q,e[28]=N,e[29]=p,e[30]=y,e[31]=a.isPending,e[32]=J):J=e[32];let ne;return e[33]!==X||e[34]!==L||e[35]!==H||e[36]!==J?(ne=c.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[L,H,J,X]}),e[33]=X,e[34]=L,e[35]=H,e[36]=J,e[37]=ne):ne=e[37],ne}function Os(n){return Me.error(n instanceof Error?n.message:"Failed to update sharing")}function zt(n){const e=A.c(7),{volume:t,path:s,shareMode:r,effectivePublic:i,url:o}=n;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsxs(ue,{children:[c.jsx(de,{asChild:!0,children:c.jsx(Mn,{asChild:!0,children:c.jsx(ee,{variant:"ghost",size:"icon","aria-label":"Share",children:c.jsx(wn,{size:14})})})}),c.jsx(fe,{side:"bottom",children:"Share"})]}),e[0]=l):l=e[0];let a;return e[1]!==i||e[2]!==s||e[3]!==r||e[4]!==o||e[5]!==t?(a=c.jsxs(Rn,{children:[l,c.jsx(Dn,{align:"end",className:"w-80 p-3",children:c.jsx(nn,{volume:t,path:s,kind:"file",shareMode:r,effectivePublic:i,url:o})})]}),e[1]=i,e[2]=s,e[3]=r,e[4]=o,e[5]=t,e[6]=a):a=e[6],a}function Rr(n){const e=A.c(11),{target:t,onOpenChange:s}=n,r=!!t,i=t?.kind==="dir"?"folder":"file";let o;e[0]!==i?(o=c.jsx(Sn,{children:c.jsxs(Ze,{children:["Share ",i]})}),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==t?(l=t&&c.jsx(nn,{...t}),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==l?(a=c.jsxs(kt,{className:"sm:max-w-md",children:[o,l]}),e[4]=o,e[5]=l,e[6]=a):a=e[6];let u;return e[7]!==s||e[8]!==r||e[9]!==a?(u=c.jsx(Pt,{open:r,onOpenChange:s,children:a}),e[7]=s,e[8]=r,e[9]=a,e[10]=u):u=e[10],u}function Ws(n){const e=n?n.split("/").filter(Boolean):[],t=e[0]==="public",s=t?e[1]??null:null,r=t?s?`public-${s}`:null:e[0]??null,i=(t?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:r,dirPath:i,isPublic:t,publicSet:s,readOnly:t}}function Dr(n,e){return n.isPublic&&n.publicSet?`public/${n.publicSet}/${e}`:n.volume?`${n.volume}/${e}`:e}function qs(n){const e=n.lastIndexOf("/");return e===-1?n:n.slice(e+1)}function Bs(n){const e=A.c(11),{org:t,previewPath:s}=n;let r;e[0]!==s?(r=s.split("/").slice(0,-1).join("/"),e[0]=s,e[1]=r):r=e[1];const i=r;let o;e[2]!==t?(o={org:t},e[2]=t,e[3]=o):o=e[3];let l;e[4]!==i||e[5]!==s?(l={path:i,preview:s},e[4]=i,e[5]=s,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(vn,{size:14}),e[7]=a):a=e[7];let u;return e[8]!==o||e[9]!==l?(u=c.jsx(ee,{variant:"ghost",size:"sm",asChild:!0,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:c.jsxs(pn,{to:"/$org/files",params:o,search:l,children:[a,"See in library"]})}),e[8]=o,e[9]=l,e[10]=u):u=e[10],u}const Ks=n=>/\.html?$/i.test(n);function jt(n){const e=A.c(6),{onClose:t}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=c.jsx(zn,{size:14}),e[0]=s):s=e[0];let r;e[1]!==t?(r=c.jsx(de,{asChild:!0,children:c.jsx(ee,{variant:"ghost",size:"icon",onClick:t,children:s})}),e[1]=t,e[2]=r):r=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(fe,{side:"bottom",children:"Close"}),e[3]=i):i=e[3];let o;return e[4]!==r?(o=c.jsxs(ue,{children:[r,i]}),e[4]=r,e[5]=o):o=e[5],o}function sn(n){const e=A.c(37),{previewPath:t,onClose:s,showSeeInLibrary:r,variant:i}=n,o=r===void 0?!1:r;let l;e[0]!==t?(l=Ws(t),e[0]=t,e[1]=l):l=e[1];const a=l,{volume:u,dirPath:p}=a,{data:d,isPending:f}=Jt(u,p),x=ms(u??""),m=qs(p);let z;e[2]===Symbol.for("react.memo_cache_sentinel")?(z={strict:!1},e[2]=z):z=e[2];const{org:v}=mn(z),y=i==="dialog";let P;e[3]!==v||e[4]!==t||e[5]!==o?(P=o&&v?c.jsx(Bs,{org:v,previewPath:t}):null,e[3]=v,e[4]=t,e[5]=o,e[6]=P):P=e[6];const M=P,k=d&&d.kind==="file"?{key:t,filename:m,size:d.size,downloadUrl:x(d.path)}:null;if(k&&d&&Ks(m)){const U=k.downloadUrl;let T;e[7]!==d?(T=Qt(d),e[7]=d,e[8]=T):T=e[8];const D=u??"",X=d.shareMode??"private",_=d.effectivePublic??!1,L=window.location.origin+k.downloadUrl;let F;e[9]!==p||e[10]!==L||e[11]!==D||e[12]!==X||e[13]!==_?(F=c.jsx(zt,{volume:D,path:p,shareMode:X,effectivePublic:_,url:L}),e[9]=p,e[10]=L,e[11]=D,e[12]=X,e[13]=_,e[14]=F):F=e[14];let H;e[15]!==y||e[16]!==s?(H=y?c.jsx("div",{className:"w-8 shrink-0"}):c.jsx(jt,{onClose:s}),e[15]=y,e[16]=s,e[17]=H):H=e[17];let J;return e[18]!==M||e[19]!==F||e[20]!==H?(J=c.jsxs(c.Fragment,{children:[F,M,H]}),e[18]=M,e[19]=F,e[20]=H,e[21]=J):J=e[21],c.jsxs(c.Fragment,{children:[y&&c.jsx(Ze,{className:"sr-only",children:m}),c.jsx(Hs,{readUrl:U,marker:T,title:m,savePath:u==="home"?p:void 0,trailing:J},t)]})}const W=y?"h-11 py-1 pr-12 pl-2":"h-9 px-2";let N;e[22]!==W?(N=ve("flex shrink-0 items-center gap-1 border-b border-border/60",W),e[22]=W,e[23]=N):N=e[23];let w;e[24]!==d?.effectivePublic||e[25]!==d?.shareMode||e[26]!==k||e[27]!==p||e[28]!==u?(w=k&&c.jsxs(c.Fragment,{children:[c.jsx(zt,{volume:u??"",path:p,shareMode:d?.shareMode??"private",effectivePublic:d?.effectivePublic??!1,url:window.location.origin+k.downloadUrl}),c.jsxs(ue,{children:[c.jsx(de,{asChild:!0,children:c.jsx(ee,{variant:"ghost",size:"icon",asChild:!0,children:c.jsx("a",{href:k.downloadUrl,download:k.filename,children:c.jsx(Fe,{size:14})})})}),c.jsx(fe,{side:"bottom",children:"Download"})]}),c.jsxs(ue,{children:[c.jsx(de,{asChild:!0,children:c.jsx(ee,{variant:"ghost",size:"icon",onClick:()=>window.open(k.downloadUrl,"_blank","noopener"),children:c.jsx($t,{size:14})})}),c.jsx(fe,{side:"bottom",children:"Open in new tab"})]})]}),e[24]=d?.effectivePublic,e[25]=d?.shareMode,e[26]=k,e[27]=p,e[28]=u,e[29]=w):w=e[29];let K;e[30]!==y||e[31]!==s?(K=!y&&c.jsx(jt,{onClose:s}),e[30]=y,e[31]=s,e[32]=K):K=e[32];let q;return e[33]!==k||e[34]!==m||e[35]!==f?(q=c.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:k?c.jsx(Is,{file:k}):f?c.jsx(Zt,{}):c.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[c.jsx(et,{filename:m,className:"h-7.5 w-6"}),c.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})}),e[33]=k,e[34]=m,e[35]=f,e[36]=q):q=e[36],c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:N,children:[c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[c.jsx(et,{filename:m,className:"h-4.5 w-3.5 shrink-0"}),y?c.jsx(Ze,{className:"truncate text-xs font-medium text-foreground",children:m}):c.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:m}),k&&c.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Yt(k.size)})]}),M,w,K]}),q]})}function Lr(n){const e=A.c(4),{previewPath:t,onClose:s,showSeeInLibrary:r}=n,i=r===void 0?!1:r;let o;return e[0]!==s||e[1]!==t||e[2]!==i?(o=c.jsx("div",{className:"flex h-full w-full flex-col bg-background",children:c.jsx(sn,{previewPath:t,onClose:s,showSeeInLibrary:i,variant:"panel"})}),e[0]=s,e[1]=t,e[2]=i,e[3]=o):o=e[3],o}function Gs(n){const e=A.c(5),{icon:t}=n;if(t.kind==="component"){const{Component:r}=t;let i;return e[0]!==r?(i=c.jsx(r,{className:"size-4"}),e[0]=r,e[1]=i):i=e[1],i}if(t.kind==="url"){let r;return e[2]!==t.src?(r=c.jsx("img",{src:t.src,alt:"",className:"size-4 rounded-sm object-cover"}),e[2]=t.src,e[3]=r):r=e[3],r}let s;return e[4]===Symbol.for("react.memo_cache_sentinel")?(s=c.jsx(bn,{className:"size-4"}),e[4]=s):s=e[4],s}function _r(n){const e=A.c(13),{title:t,icon:s,active:r,onClick:i}=n,o=r?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let l;e[0]!==o?(l=ve("shrink-0 flex items-center gap-1.5 h-8 rounded-md px-2","[transition:background-color_180ms_ease,color_180ms_ease]",o),e[0]=o,e[1]=l):l=e[1];let a;e[2]!==s?(a=c.jsx("span",{className:"flex size-5 items-center justify-center shrink-0",children:c.jsx(Gs,{icon:s})}),e[2]=s,e[3]=a):a=e[3];let u;e[4]!==t?(u=c.jsx("span",{className:"whitespace-nowrap text-sm font-medium leading-none",children:t}),e[4]=t,e[5]=u):u=e[5];let p;return e[6]!==r||e[7]!==i||e[8]!==l||e[9]!==a||e[10]!==u||e[11]!==t?(p=c.jsxs("button",{type:"button",onClick:i,"aria-pressed":r,"aria-label":t,className:l,children:[a,u]}),e[6]=r,e[7]=i,e[8]=l,e[9]=a,e[10]=u,e[11]=t,e[12]=p):p=e[12],p}function Ar(n){const e=A.c(9),{previewPath:t,onClose:s,showSeeInLibrary:r}=n,i=r===void 0?!1:r;let o;e[0]!==s?(o=u=>{u||s()},e[0]=s,e[1]=o):o=e[1];let l;e[2]!==s||e[3]!==t||e[4]!==i?(l=c.jsx(kt,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:c.jsx(sn,{previewPath:t,onClose:s,showSeeInLibrary:i,variant:"dialog"})}),e[2]=s,e[3]=t,e[4]=i,e[5]=l):l=e[5];let a;return e[6]!==o||e[7]!==l?(a=c.jsx(Pt,{open:!0,onOpenChange:o,children:l}),e[6]=o,e[7]=l,e[8]=a):a=e[8],a}export{Nr as A,Ir as B,Ps as C,jr as D,Ss as E,Zt as F,at as G,Hs as H,Oe as I,Cr as J,Mr as K,Lr as L,kr as M,zs as N,zr as O,$r as P,Er as Q,fr as R,Rr as S,Gs as T,Pr as U,wr as a,xr as b,gr as c,bs as d,br as e,Is as f,ks as g,Yt as h,Jt as i,ms as j,Qt as k,zt as l,pr as m,dr as n,_r as o,Ar as p,Ws as q,qs as r,hs as s,mr as t,vr as u,yr as v,Dr as w,hr as x,ys as y,Sr as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as L,j as t,b as D,x as R,ad as q,z as B,t as N,n as T}from"./index-C3Ab2DJ2.js";import{P as z}from"./index-CszBxeF9.js";import{A as U}from"./avatar-DfTXVgX9.js";import{S as I}from"./switch-sHkW6RUp.js";import{d as G,b as Y,a as $,S as K}from"./select-Di6xzzYo.js";import{T as O,a as V}from"./toggle-group-Cp4C3_lM.js";import{I as H}from"./input-BmmiCY6T.js";import{i as J}from"./Monitor01-L6hrk62b.js";import{n as M,a as Q}from"./Sun-BxuJFhF6.js";import{i as W}from"./Play-C6QgiUls.js";import{u as X}from"./use-debounced-autosave-C4B5942u.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-BBz_54sx.js";import{c as te,b as A,S as E,a as F}from"./settings-section-Dxa_AxFP.js";import"./sidebar-DCgpgzJu.js";import"./LayoutLeft-CkiSxkS_.js";import"./tooltip-2IhfImXT.js";import"./sheet-COdJ-0Qy.js";import"./X-CKIhVHQk.js";import"./User01-CTuKNCEa.js";import"./ChevronUp-CiXMtnii.js";import"./ChevronDown-CYFvWHpZ.js";import"./card-Ckx3Kwvj.js";import"./ArrowUpRight-DeYzuaJ8.js";function se(){const e=L.c(19),{data:s,isPending:o}=D.useSession(),v=s?.user,p=v?.image,h=v?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const g=n.control._formState.dirtyFields;if(Object.keys(g).length===0)return;const a=n.getValues(),f=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await D.updateUser({name:a.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:d}=X(_);if(o)return null;const b=v?.name??"U";let i;e[4]!==b||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(U,{url:p,fallback:b,shape:"circle",size:"base"})}),e[4]=b,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==d||e[8]!==x?(l=g=>{const{field:a}=g;return t.jsx(H,{id:"display-name",...a,onChange:f=>{a.onChange(f),x()},onBlur:()=>{a.onBlur(),d()},onKeyDown:f=>{f.key==="Enter"&&d()},placeholder:"Your name",className:"w-[280px]"})},e[7]=d,e[8]=x,e[9]=l):l=e[9];let m;e[10]!==n.control||e[11]!==l?(m=t.jsx(A,{title:"Display name",action:t.jsx(q,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=m):m=e[12];const j=v?.email;let r;e[13]!==j?(r=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:j})}),e[13]=j,e[14]=r):r=e[14];let u;return e[15]!==i||e[16]!==m||e[17]!==r?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,m,r]})}),e[15]=i,e[16]=m,e[17]=r,e[18]=u):u=e[18],u}function oe(){const e=L.c(48),[s,o]=B();let v;e[0]!==o?(v=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.error("Notifications denied. Please enable them in your browser settings."),o(re);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=v):v=e[1];const p=v;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(V,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(V,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(V,{value:"system","aria-label":"System theme",children:t.jsx(J,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(O,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let d;e[10]!==p||e[11]!==s.enableNotifications?(d=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=d):d=e[12];let b;e[13]!==p||e[14]!==s.enableNotifications?(b=t.jsx(I,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=b):b=e[15];let i;e[16]!==d||e[17]!==b?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:d,action:b}),e[16]=d,e[17]=b,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let m;e[22]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=m):m=e[22];let j;e[23]!==o?(j=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=j):j=e[24];let r;e[25]!==s.enableSounds||e[26]!==j?(r=t.jsxs("div",{className:"flex items-center gap-2",children:[m,t.jsx(I,{checked:s.enableSounds,onCheckedChange:j})]}),e[25]=s.enableSounds,e[26]=j,e[27]=r):r=e[27];let u;e[28]!==r||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:r}),e[28]=r,e[29]=l,e[30]=u):u=e[30];let g;e[31]!==o?(g=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=g):g=e[32];let a;e[33]!==s.toolApprovalLevel?(a={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=a):a=e[34];let f;e[35]!==a?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:a})}),e[35]=a,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==g||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:g,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=g,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function re(e){return{...e,enableNotifications:!1}}function ae(){const e=L.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(z,{children:t.jsx(z.Content,{children:t.jsx(z.Body,{children:t.jsxs(te,{children:[t.jsx(z.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function Te(){const e=L.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(ae,{}),e[0]=s):s=e[0],s}export{Te as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as $,p as H,j as v}from"./index-C3Ab2DJ2.js";import{j as L,g as E,s as y}from"./scroll-area-DwqNfKe5.js";import{p as O,u as k}from"./use-mcp-client-BdKIOTso.js";import{b as q,c as B}from"./use-mcp-tools-CYtQa-6Z.js";import{u as Y}from"./index-WHuW26DU.js";import{c as G}from"./content-blocks-o63cs2vh.js";import{g as K,M as V,a as w}from"./types-7ak1Ve40.js";import{u as z,b as F}from"./chat-context-BNtznWGC.js";import{b as J}from"./shell-layout-DmxTk-Cg.js";import"./agent-icon-D5EbntAT.js";import"./AlertCircle-DMqR3m0L.js";import"./Tool01-B4SsemMS.js";import"./SwitchHorizontal01-yw5VS97V.js";import"./Settings02-B7hO-Tma.js";import"./XCircle-DRGwo6Em.js";import"./ArrowUpRight-DeYzuaJ8.js";import"./ZapSquare-C7yt7KfQ.js";import"./Users03-BOvyNEV4.js";import"./CheckCircle-D6b8lFUP.js";import"./ChevronUp-CiXMtnii.js";import"./ChevronDown-CYFvWHpZ.js";import"./ChevronLeft-DXSAgzPw.js";import"./ChevronRight-Dj41DV2U.js";import"./DotsVertical-y5lMfVOQ.js";import"./Stars02-9vF61uFx.js";import"./Eye-D3THRXh6.js";import"./ZoomOut-DVSwpwUz.js";import"./Globe01-BquIL2vg.js";import"./FilterLines-BPeCeYIz.js";import"./Star01-BfSEPDRT.js";import"./Globe04-BBRZWdJY.js";import"./HardDrive-DmtpWveq.js";import"./Key01-Lcx9qTy7.js";import"./LayoutLeft-CkiSxkS_.js";import"./LinkExternal01-jwO28Eeb.js";import"./Monitor01-L6hrk62b.js";import"./Sun-BxuJFhF6.js";import"./Palette-ClNyQOQA.js";import"./Play-C6QgiUls.js";import"./Plus-_82_8sq8.js";import"./SearchMd-C3Pmxf99.js";import"./Shield01-RDE62wRx.js";import"./Stars01-W6Wl0Pse.js";import"./Trash01-CG0gTYx7.js";import"./Upload01-BlvGy5d-.js";import"./User01-CTuKNCEa.js";import"./Users01-KXiCgru2.js";import"./XClose-Ig7y9gcI.js";import"./X-CKIhVHQk.js";import"./Zap-w60sxAoc.js";import"./use-clock-tick-SbPzFjh0.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Btaqep1K.js";import"./tooltip-2IhfImXT.js";import"./file-type-icon-BOPDPlds.js";import"./dialog-CyIn0DRx.js";import"./tab-id-BptcWVWa.js";import"./hooks-DLdyjUhZ.js";import"./decopilot-sse-pool-BkzSWgw-.js";import"./studio-tools-DRut7Wwk.js";import"./sheet-COdJ-0Qy.js";import"./integration-icon-CFvT6ZpF.js";import"./use-virtual-mcp-Bc7GdFZa.js";import"./use-collections-DrlB7sAG.js";import"./use-navigate-to-agent-BTMo9com.js";import"./use-connection-Dffadu_t.js";import"./use-mcp-prompts-5xEBY9_7.js";import"./form-BZY9ZRz4.js";import"./label-DitP_QKf.js";import"./input-BmmiCY6T.js";import"./select-Di6xzzYo.js";import"./auth-tkqpBHf1.js";import"./index-BY2TC4bG.js";import"./drawer-DFg9xgM4.js";import"./collection-search-CCzYANV5.js";import"./tabs-BcUIMPwc.js";import"./toggle-group-Cp4C3_lM.js";import"./use-deco-credits-16Jb7c03.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CqvtHNnU.js";import"./use-registry-connections-CK9xDmAR.js";import"./use-organization-settings--a-kmsBC.js";import"./useInfiniteQuery-Ca6dlOLl.js";import"./use-infinite-scroll-CaTJY2LS.js";import"./extract-connection-data-CBzjCfJ2.js";import"./card-Ckx3Kwvj.js";import"./collection-tabs-CBstOc4r.js";import"./badge-an9iff2c.js";import"./textarea-D8B22gmM.js";import"./connection-form-helpers-ByFrPc9N.js";import"./useSuspenseInfiniteQuery-CZbIaY66.js";import"./mcp-oauth-BGmk7Mi5.js";import"./use-ai-providers-CC3uGtbf.js";import"./connect-desktop-dialog-BgIjMJ8k.js";import"./decopilot-D6xQ1qh2.js";import"./checkbox-I3IyJWnj.js";import"./skeleton-CZ9pOveV.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-DfTXVgX9.js";import"./settings-section-Dxa_AxFP.js";import"./popover-BcAFMnrn.js";import"./command-pIEd50-L.js";import"./index-DexxTctJ.js";import"./dropdown-menu-kPcoeCiJ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C5Tq4YPI.js";import"./empty-state-BrSxZrfZ.js";import"./toolbar-DyjTkAru.js";import"./preview-dialog-CWq_MXwm.js";import"./index-xsAZnQ1t.js";import"./use-capability-CU6DCnG3.js";import"./shell-route-loading-DW_liPbt.js";import"./index-C4w1u5Cz.js";import"./alert-dialog-BuJSufuR.js";import"./switch-sHkW6RUp.js";import"./use-debounced-autosave-C4B5942u.js";import"./index-CszBxeF9.js";import"./sidebar-DCgpgzJu.js";import"./search-input-DjHO_xeh.js";import"./github-repo-picker-CrW8szfE.js";import"./use-secrets-B008jqWi.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-Cc6sYskX.js";import"./select-model-4ZBcZdkE.js";import"./use-automations-D2hKtMe8.js";import"./monaco-editor-yw8USVwR.js";import"./automation-runs-BEntIYkJ.js";import"./table-BUxYcsuG.js";import"./use-members-BWyLHt4a.js";import"./use-org-auth-client-Blpkj8FB.js";import"./task-status-BfQltC__.js";import"./automation-list-row-40GibzkL.js";import"./required-auth-layout-B3CS-pLH.js";import"./useRouterState-DgLuS94C.js";import"./use-org-sso-CEQ82hSZ.js";const Q={};function W(A){const t=$.c(37),{client:r,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=A,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),e=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==r||t[3]!==o.name||t[4]!==s?(c={client:r,toolName:o.name,toolArguments:s},t[2]=r,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:i}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=y(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const S=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=G(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const b=_;let P;t[18]!==S?(P={tool:S},t[18]=S,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==e?(T=C=>u(e,C),t[20]=u,t[21]=e,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==e?(R=()=>n(e),t[23]=n,t[24]=e,t[25]=R):R=t[25];let j;return t[26]!==r||t[27]!==b||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==i?(j=v.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:i,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:r,onMessage:b,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=r,t[27]=b,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=i,t[36]=j):j=t[36],j}function _e(A){const t=$.c(24),{connectionId:r,toolName:h,args:o}=A,{org:p}=H(),l=Y();let M;t[0]!==r||t[1]!==l?(M=O(r)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=r,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==r||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:r,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=r,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=k(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let e,a,m;t[10]!==h||t[11]!==g.tools?(e=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===e)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(y(i.name,x)===e)return!0;const d=y(e,x);return d!==e&&i.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=e,t[13]=a,t[14]=m):(e=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==e?(i=v.jsx("div",{className:"flex items-center justify-center h-full w-full",children:v.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',e,'" not found or has no UI']})}),t[15]=e,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==r||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=v.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:r,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=r,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{_e as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as F,j as r}from"./index-C3Ab2DJ2.js";import{I as T}from"./input-BmmiCY6T.js";import{L as C}from"./label-DitP_QKf.js";import{T as L}from"./textarea-D8B22gmM.js";import{I as A}from"./image-field-CodUWKZv.js";import{ak as R,al as D,am as J}from"./index-WHuW26DU.js";import{u as K,s as P}from"./primitives-BcfJna5s.js";import{S as M}from"./save-status-C9PbQUEN.js";import"./Tool01-B4SsemMS.js";import"./Trash01-CG0gTYx7.js";import"./Upload01-BlvGy5d-.js";import"./AlertCircle-DMqR3m0L.js";import"./ChevronUp-CiXMtnii.js";import"./Eye-D3THRXh6.js";import"./DotsVertical-y5lMfVOQ.js";import"./agent-icon-D5EbntAT.js";import"./SwitchHorizontal01-yw5VS97V.js";import"./Settings02-B7hO-Tma.js";import"./XCircle-DRGwo6Em.js";import"./ArrowUpRight-DeYzuaJ8.js";import"./ZapSquare-C7yt7KfQ.js";import"./Users03-BOvyNEV4.js";import"./CheckCircle-D6b8lFUP.js";import"./ChevronDown-CYFvWHpZ.js";import"./ChevronLeft-DXSAgzPw.js";import"./ChevronRight-Dj41DV2U.js";import"./Stars02-9vF61uFx.js";import"./ZoomOut-DVSwpwUz.js";import"./Globe01-BquIL2vg.js";import"./FilterLines-BPeCeYIz.js";import"./Star01-BfSEPDRT.js";import"./Globe04-BBRZWdJY.js";import"./HardDrive-DmtpWveq.js";import"./Key01-Lcx9qTy7.js";import"./LayoutLeft-CkiSxkS_.js";import"./LinkExternal01-jwO28Eeb.js";import"./Monitor01-L6hrk62b.js";import"./Sun-BxuJFhF6.js";import"./Palette-ClNyQOQA.js";import"./Play-C6QgiUls.js";import"./Plus-_82_8sq8.js";import"./SearchMd-C3Pmxf99.js";import"./Shield01-RDE62wRx.js";import"./Stars01-W6Wl0Pse.js";import"./User01-CTuKNCEa.js";import"./Users01-KXiCgru2.js";import"./XClose-Ig7y9gcI.js";import"./X-CKIhVHQk.js";import"./Zap-w60sxAoc.js";import"./dialog-CyIn0DRx.js";import"./dropdown-menu-kPcoeCiJ.js";import"./skeleton-CZ9pOveV.js";import"./tabs-BcUIMPwc.js";import"./use-file-configs-qOKR17qO.js";import"./studio-tools-DRut7Wwk.js";import"./useInfiniteQuery-Ca6dlOLl.js";import"./use-infinite-scroll-CaTJY2LS.js";import"./index-BY2TC4bG.js";import"./chat-context-BNtznWGC.js";import"./hooks-DLdyjUhZ.js";import"./use-mcp-client-BdKIOTso.js";import"./auth-tkqpBHf1.js";import"./decopilot-sse-pool-BkzSWgw-.js";import"./use-virtual-mcp-Bc7GdFZa.js";import"./use-collections-DrlB7sAG.js";import"./use-ai-providers-CC3uGtbf.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings--a-kmsBC.js";import"./scroll-area-DwqNfKe5.js";import"./use-clock-tick-SbPzFjh0.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Btaqep1K.js";import"./tooltip-2IhfImXT.js";import"./file-type-icon-BOPDPlds.js";import"./content-blocks-o63cs2vh.js";import"./types-7ak1Ve40.js";import"./shell-layout-DmxTk-Cg.js";import"./avatar-DfTXVgX9.js";import"./required-auth-layout-B3CS-pLH.js";import"./useRouterState-DgLuS94C.js";import"./use-org-sso-CEQ82hSZ.js";import"./sheet-COdJ-0Qy.js";import"./integration-icon-CFvT6ZpF.js";import"./use-navigate-to-agent-BTMo9com.js";import"./use-connection-Dffadu_t.js";import"./use-mcp-prompts-5xEBY9_7.js";import"./form-BZY9ZRz4.js";import"./select-Di6xzzYo.js";import"./drawer-DFg9xgM4.js";import"./collection-search-CCzYANV5.js";import"./toggle-group-Cp4C3_lM.js";import"./use-deco-credits-16Jb7c03.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CqvtHNnU.js";import"./use-registry-connections-CK9xDmAR.js";import"./extract-connection-data-CBzjCfJ2.js";import"./card-Ckx3Kwvj.js";import"./collection-tabs-CBstOc4r.js";import"./badge-an9iff2c.js";import"./connection-form-helpers-ByFrPc9N.js";import"./useSuspenseInfiniteQuery-CZbIaY66.js";import"./mcp-oauth-BGmk7Mi5.js";import"./connect-desktop-dialog-BgIjMJ8k.js";import"./decopilot-D6xQ1qh2.js";import"./checkbox-I3IyJWnj.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dxa_AxFP.js";import"./popover-BcAFMnrn.js";import"./command-pIEd50-L.js";import"./index-DexxTctJ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C5Tq4YPI.js";import"./empty-state-BrSxZrfZ.js";import"./toolbar-DyjTkAru.js";import"./preview-dialog-CWq_MXwm.js";import"./index-xsAZnQ1t.js";import"./use-mcp-tools-CYtQa-6Z.js";import"./use-capability-CU6DCnG3.js";import"./shell-route-loading-DW_liPbt.js";import"./index-C4w1u5Cz.js";import"./alert-dialog-BuJSufuR.js";import"./switch-sHkW6RUp.js";import"./use-debounced-autosave-C4B5942u.js";import"./index-CszBxeF9.js";import"./sidebar-DCgpgzJu.js";import"./search-input-DjHO_xeh.js";import"./github-repo-picker-CrW8szfE.js";import"./use-secrets-B008jqWi.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-Cc6sYskX.js";import"./select-model-4ZBcZdkE.js";import"./use-automations-D2hKtMe8.js";import"./monaco-editor-yw8USVwR.js";import"./automation-runs-BEntIYkJ.js";import"./table-BUxYcsuG.js";import"./use-members-BWyLHt4a.js";import"./use-org-auth-client-Blpkj8FB.js";import"./task-status-BfQltC__.js";import"./automation-list-row-40GibzkL.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function vr(S){const t=F.c(34),{orgSlug:v,virtualMcpId:j,branch:f,kind:p,blockKey:g,block:w}=S;let y;t[0]!==f||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:f},t[0]=f,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=R(y);let d;t[4]!==w||t[5]!==p?(d=D(w,p),t[4]=w,t[5]=p,t[6]=d):d=t[6];const B=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=K(B,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(M,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(A,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{vr as RecordEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-t_GwGR-W.js","assets/index-C3Ab2DJ2.js","assets/index-BITgxoqa.css","assets/XCircle-DRGwo6Em.js","assets/CheckCircle-D6b8lFUP.js","assets/Settings02-B7hO-Tma.js","assets/use-mcp-client-BdKIOTso.js","assets/auth-tkqpBHf1.js","assets/useInfiniteQuery-Ca6dlOLl.js","assets/use-infinite-scroll-CaTJY2LS.js","assets/studio-tools-DRut7Wwk.js","assets/badge-an9iff2c.js","assets/input-BmmiCY6T.js","assets/dropdown-menu-kPcoeCiJ.js","assets/ChevronUp-CiXMtnii.js","assets/ChevronRight-Dj41DV2U.js","assets/DotsVertical-y5lMfVOQ.js","assets/table-BUxYcsuG.js","assets/toggle-group-Cp4C3_lM.js","assets/use-view-mode-Dz9A7efZ.js","assets/tooltip-2IhfImXT.js","assets/FilterLines-BPeCeYIz.js","assets/Globe01-BquIL2vg.js","assets/SearchMd-C3Pmxf99.js","assets/dialog-CyIn0DRx.js","assets/X-CKIhVHQk.js","assets/AlertCircle-DMqR3m0L.js","assets/Upload01-BlvGy5d-.js","assets/alert-dialog-BuJSufuR.js","assets/card-Ckx3Kwvj.js","assets/Trash01-CG0gTYx7.js","assets/label-DitP_QKf.js","assets/select-Di6xzzYo.js","assets/ChevronDown-CYFvWHpZ.js","assets/switch-sHkW6RUp.js","assets/textarea-D8B22gmM.js","assets/checkbox-I3IyJWnj.js","assets/Eye-D3THRXh6.js","assets/LinkExternal01-jwO28Eeb.js","assets/use-copy-Btaqep1K.js","assets/Key01-Lcx9qTy7.js","assets/Plus-_82_8sq8.js","assets/mcp-oauth-BGmk7Mi5.js","assets/Play-C6QgiUls.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as i,j as e,r as s,l as a,ak as o}from"./index-C3Ab2DJ2.js";import{R as l}from"./require-capability-CoJVffIR.js";import"./use-capability-CU6DCnG3.js";import"./access-gate-CEtgmlCt.js";import"./capability-load-error-BXEh1mp-.js";const m=s.lazy(()=>o(()=>import("./registry-layout-t_GwGR-W.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])));function f(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(l,{capability:"registry:manage",area:"the registry",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(m,{})})}),r[0]=t):t=r[0],t}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as p,j as m}from"./index-C3Ab2DJ2.js";import{u as l}from"./use-capability-CU6DCnG3.js";import{A as u}from"./access-gate-CEtgmlCt.js";function b(n){const t=p.c(6),{capability:c,area:e,children:i}=n,{granted:a,loading:o,error:s}=l(c);let r;return t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==o?(r=m.jsx(u,{granted:a,loading:o,error:s,area:e,children:i}),t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as c,j as i,A as a,S as u,h as m,k as f,N as h}from"./index-C3Ab2DJ2.js";import{u as x}from"./useRouterState-DgLuS94C.js";function g(){const t=c.c(5),s=x().location.href;let n;t[0]!==s?(n=s==="/login"||s.startsWith("/login?"),t[0]=s,t[1]=n):n=t[1];const r=n;let o;if(t[2]!==s||t[3]!==r){const l=r?{}:{next:s};o=i.jsx(h,{to:"/login",search:l,replace:!0}),t[2]=s,t[3]=r,t[4]=o}else o=t[4];return o}function j(t){const e=c.c(6),{children:s}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(a,{children:i.jsx(u,{})}),e[0]=n):n=e[0];let r;e[1]!==s?(r=i.jsx(m,{children:s}),e[1]=s,e[2]=r):r=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(f,{children:i.jsx(g,{})}),e[3]=o):o=e[3];let l;return e[4]!==r?(l=i.jsxs(i.Fragment,{children:[n,r,o]}),e[4]=r,e[5]=l):l=e[5],l}export{j as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as $,p as Ne,K as re,b3 as dt,m as Oe,j as s,c as K,l as fe,B as ne,e as q,s as Pe,aB as Ie,v as se,aD as De,aE as ke,F as $e,x as mt,w as ut,a as Fe,n as he,t as Re,ae as Ke,a6 as ft,a1 as ht,f as gt,d as xt}from"./index-C3Ab2DJ2.js";import{u as pt,C as bt}from"./use-organization-roles-lBgqu0F4.js";import{u as je}from"./use-org-auth-client-Blpkj8FB.js";import{B as ge}from"./badge-an9iff2c.js";import{f as Qe,a as qe,b as He,c as Ze,d as Xe,A as Je,e as We,g as et}from"./alert-dialog-BuJSufuR.js";import{D as Tt,a as Et,b as _t,c as It}from"./dropdown-menu-kPcoeCiJ.js";import{a as Nt}from"./DotsVertical-y5lMfVOQ.js";import{s as Ae}from"./Plus-_82_8sq8.js";import{s as St}from"./Trash01-CG0gTYx7.js";import{P as te}from"./index-CszBxeF9.js";import{E as Ge}from"./empty-state-BrSxZrfZ.js";import{S as ve}from"./search-input-DjHO_xeh.js";import{P as tt,D as st}from"./ai-providers-logos-DD3qZ33J.js";import{I as ye}from"./integration-icon-CFvT6ZpF.js";import{u as Ct}from"./use-infinite-scroll-CaTJY2LS.js";import{C as we}from"./checkbox-I3IyJWnj.js";import{i as At}from"./Settings02-B7hO-Tma.js";import{u as Ot}from"./useSuspenseInfiniteQuery-CZbIaY66.js";import{u as Rt,S as jt}from"./use-mcp-client-BdKIOTso.js";import{C as vt}from"./collection-search-CCzYANV5.js";import{u as nt}from"./use-members-BWyLHt4a.js";import{u as yt}from"./use-connection-Dffadu_t.js";import{u as wt,d as Mt}from"./use-ai-providers-CC3uGtbf.js";import{A as lt}from"./avatar-DfTXVgX9.js";import{S as xe}from"./switch-sHkW6RUp.js";import{c as pe,b as be,T as Te,a as Ee}from"./tooltip-2IhfImXT.js";import{S as Ue,a as Be,b as Ve}from"./settings-section-Dxa_AxFP.js";import{t as Lt}from"./ChevronDown-CYFvWHpZ.js";import{i as Pt}from"./ChevronRight-Dj41DV2U.js";import{i as ze}from"./X-CKIhVHQk.js";import{a as Dt}from"./use-capability-CU6DCnG3.js";import{A as kt}from"./access-gate-CEtgmlCt.js";import"./table-BUxYcsuG.js";import"./SwitchHorizontal01-yw5VS97V.js";import"./ChevronUp-CiXMtnii.js";import"./sidebar-DCgpgzJu.js";import"./LayoutLeft-CkiSxkS_.js";import"./sheet-COdJ-0Qy.js";import"./SearchMd-C3Pmxf99.js";import"./XCircle-DRGwo6Em.js";import"./agent-icon-D5EbntAT.js";import"./AlertCircle-DMqR3m0L.js";import"./Tool01-B4SsemMS.js";import"./ArrowUpRight-DeYzuaJ8.js";import"./ZapSquare-C7yt7KfQ.js";import"./Users03-BOvyNEV4.js";import"./CheckCircle-D6b8lFUP.js";import"./ChevronLeft-DXSAgzPw.js";import"./Stars02-9vF61uFx.js";import"./Eye-D3THRXh6.js";import"./ZoomOut-DVSwpwUz.js";import"./Globe01-BquIL2vg.js";import"./FilterLines-BPeCeYIz.js";import"./Star01-BfSEPDRT.js";import"./Globe04-BBRZWdJY.js";import"./HardDrive-DmtpWveq.js";import"./Key01-Lcx9qTy7.js";import"./LinkExternal01-jwO28Eeb.js";import"./Monitor01-L6hrk62b.js";import"./Sun-BxuJFhF6.js";import"./Palette-ClNyQOQA.js";import"./Play-C6QgiUls.js";import"./Shield01-RDE62wRx.js";import"./Stars01-W6Wl0Pse.js";import"./Upload01-BlvGy5d-.js";import"./User01-CTuKNCEa.js";import"./Users01-KXiCgru2.js";import"./XClose-Ig7y9gcI.js";import"./Zap-w60sxAoc.js";import"./auth-tkqpBHf1.js";import"./use-collections-DrlB7sAG.js";import"./studio-tools-DRut7Wwk.js";import"./card-Ckx3Kwvj.js";import"./capability-load-error-BXEh1mp-.js";const Me="basic-usage",Le=[{id:Me,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","LINK_CURRENT_GET","LINK_DISCONNECT","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","THREAD_BACKGROUND_TOOL_START","THREAD_SUBTASK_DELIVER"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...Le.find(t=>t.id===Me)?.tools??[]];const Gt=["agents:manage","connections:manage"];new Set(Le.filter(t=>Gt.includes(t.id)).flatMap(t=>t.tools));function Ut(){const t=new Map;for(const e of Le){if(e.id===Me)continue;const n=t.get(e.section)??[];n.push(e),t.set(e.section,n)}return Array.from(t.entries()).map(([e,n])=>({section:e,capabilities:n}))}function Bt(t,e,n){return n?!0:t.tools.every(l=>e.includes(l))}function Vt(t,e,n){if(n){const i=new Set(e);for(const r of t.tools)i.add(r);return Array.from(i)}const l=new Set(e);for(const i of t.tools)l.delete(i);return Array.from(l)}function zt(t){const e=q.c(21),{connection:n,isSelected:l,hasToolsEnabled:i,activeToolsCount:r,totalToolsCount:d,onSelect:h,onToggle:c}=t,g=l?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==g?(f=K("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",g),e[0]=g,e[1]=f):f=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let x;e[5]!==n.title?(x=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),e[5]=n.title,e[6]=x):x=e[6];let o;e[7]!==h||e[8]!==a||e[9]!==x?(o=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:h,children:[a,x]}),e[7]=h,e[8]=a,e[9]=x,e[10]=o):o=e[10];let m;e[11]!==r||e[12]!==n.tools||e[13]!==i||e[14]!==c||e[15]!==d?(m=n.tools&&n.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[r,"/",d]}),s.jsx(we,{checked:i,onCheckedChange:c,onClick:Yt})]}),e[11]=r,e[12]=n.tools,e[13]=i,e[14]=c,e[15]=d,e[16]=m):m=e[16];let N;return e[17]!==f||e[18]!==o||e[19]!==m?(N=s.jsxs("div",{className:f,children:[o,m]}),e[17]=f,e[18]=o,e[19]=m,e[20]=N):N=e[20],N}function Yt(t){return t.stopPropagation()}function $t(t){const e=q.c(18),{connectionId:n,tool:l,isSelected:i,onToggle:r}=t,d=`tool-${n}-${l.name}`,h=i?"text-foreground":"text-muted-foreground";let c;e[0]!==h?(c=K("text-sm font-medium",h),e[0]=h,e[1]=c):c=e[1];let g;e[2]!==c||e[3]!==l.name?(g=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:c,children:l.name})}),e[2]=c,e[3]=l.name,e[4]=g):g=e[4];let f;e[5]!==l.description?(f=l.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description}),e[5]=l.description,e[6]=f):f=e[6];let a;e[7]!==g||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,f]}),e[7]=g,e[8]=f,e[9]=a):a=e[9];const x=`tool-${n}-${l.name}`;let o;e[10]!==i||e[11]!==r||e[12]!==x?(o=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(we,{id:x,checked:i,onCheckedChange:r,onClick:Ft})}),e[10]=i,e[11]=r,e[12]=x,e[13]=o):o=e[13];let m;return e[14]!==d||e[15]!==a||e[16]!==o?(m=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:d,children:[a,o]}),e[14]=d,e[15]=a,e[16]=o,e[17]=m):m=e[17],m}function Ft(t){return t.stopPropagation()}function Kt({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:n,searchQuery:l}){const[i,r]=$.useState(""),d=l!==void 0?l:i,h=$.useDeferredValue(d),[c,g]=$.useState("all"),[f,a]=$.useState(!1),x=$.useRef(new Set(Object.keys(t))),{org:o}=Ne(),m=Rt({connectionId:jt,orgId:o.id,orgSlug:o.slug}),N=100,E=h.trim(),T=E?{operator:"or",conditions:[{field:["title"],operator:"contains",value:E},{field:["description"],operator:"contains",value:E}]}:void 0,S=!!n,C={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:0,...S&&{include_virtual:!0}},v=JSON.stringify(C),{data:_,fetchNextPage:O,hasNextPage:p,isFetchingNextPage:R}=Ot({queryKey:re.collectionListInfinite(m,o.id,"","CONNECTIONS",v),queryFn:async({pageParam:b=0})=>(await m.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:b,...S&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(b,D)=>{if(b?.hasMore)return D.reduce((Q,H)=>Q+(H?.items?.length??0),0)},staleTime:3e4}),I=_?.pages.flatMap(b=>b?.items??[])??[],j=Ct(O,p??!1,R),u=n?I.filter(b=>b.connection_type!=="VIRTUAL"?!0:dt(b.connection_url)!==n):I,w=x.current,A=[...w.values()].map(b=>u.find(D=>D.id===b)).filter(b=>b!==void 0),k=u.filter(b=>!w.has(b.id)),G=[...A,...k],U=b=>{const D=t[b];return D!==void 0&&D.length>0},B=G.filter(b=>{if(c==="all")return!0;const D=U(b.id);return c==="selected"?D:c==="unselected"?!D:!0}),[M,z]=$.useState(G[0]?.id??null),y=M?G.find(b=>b.id===M)??null:null,{data:L,isFetching:Y}=Oe({queryKey:re.collectionItem(m,o.id,"","CONNECTIONS",M??""),queryFn:async()=>M?(await m.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:M}})).structuredContent?.item??null:null,enabled:!!M,staleTime:3e4}),F=L?.tools??[],X=(b,D)=>t[b]?.includes(D)??!1,J=(b,D)=>{const Q=t[b]??[],H=Q.includes(D),W={...t};if(H){const Z=Q.filter(ee=>ee!==D);Z.length===0?delete W[b]:W[b]=Z}else W[b]=[...Q,D];e(W)},le=b=>{const D=b===M?F:[];if(!D.length)return;const Q=t[b]??[],H=D.map(ee=>ee.name),W=Q.length>0&&H.every(ee=>Q.includes(ee)),Z={...t};W?delete Z[b]:(Z[b]=H,z(b)),e(Z)},oe=b=>{z(b),a(!0)},ie=()=>{a(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:K("w-full md:w-80 border-r border-border flex flex-col",f&&"hidden md:flex"),children:[l===void 0&&s.jsx(vt,{value:i,onChange:r,placeholder:"Search MCP Servers..."}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>g("all"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),s.jsx("button",{onClick:()=>g("selected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),s.jsx("button",{onClick:()=>g("unselected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:B.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:d?"No connections found":c==="selected"?"No servers selected":c==="unselected"?"No unselected servers":"No connections available"}):s.jsxs("div",{className:"p-2 space-y-1",children:[B.map(b=>{const D=M===b.id,Q=D?F.length:0,H=t[b.id]?.length??0;return s.jsx(zt,{connection:{...b,tools:D?F:b.tools},isSelected:D,hasToolsEnabled:U(b.id),activeToolsCount:H,totalToolsCount:Q,onSelect:()=>oe(b.id),onToggle:()=>le(b.id)},b.id)}),s.jsx("div",{ref:j,className:"h-4"}),R&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:K("flex-1 flex-col",f?"flex":"hidden md:flex"),children:y?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ne,{variant:"ghost",size:"sm",onClick:ie,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(At,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(ye,{icon:y.icon,name:y.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:y.title}),y.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:y.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:Y?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})}):F.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):s.jsx("div",{className:"space-y-2",children:F.map(b=>s.jsx($t,{connectionId:y.id,tool:b,isSelected:X(y.id,b.name),onToggle:()=>J(y.id,b.name)},b.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}const Se=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],Qt={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function qt(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Se.length;return Se[n]??Se[0]}function Ht(t,e){return Qt[t]??"bg-neutral-400"}const Zt=Pe({role:Pe({id:se().optional(),slug:se().optional(),label:se()}),allowAllStaticPermissions:ke(),staticPermissions:Ie(se()),toolSet:De(se(),Ie(se())),allowAllModels:ke(),modelSet:De(se(),Ie(se())),memberIds:Ie(se())});function ot(t){return t?t.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"?"}function Ye(t,e,n){const l=s.jsx(xe,{checked:t,disabled:e,onCheckedChange:n});return e?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:l})}),s.jsx(Ee,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):l}function Xt(t){const e=q.c(28),{allowAllStaticPermissions:n,staticPermissions:l,onAllowAllChange:i,onPermissionsChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d;let g;e[0]!==h?(g=h.trim().toLowerCase(),e[0]=h,e[1]=g):g=e[1];const f=$.useDeferredValue(g);let a;if(e[2]!==n||e[3]!==f||e[4]!==i||e[5]!==r||e[6]!==c||e[7]!==h||e[8]!==l){const x=Ut(),o=(v,_)=>{if(!c){if(n&&_){const O=x.flatMap(es).flatMap(Wt);i(!1),r(O.filter(p=>!v.tools.includes(p)));return}n||r(Vt(v,l,!_))}};let m;e[10]!==f?(m=v=>{const{section:_,capabilities:O}=v;return{section:_,capabilities:O.filter(p=>!f||p.label.toLowerCase().includes(f)||p.description.toLowerCase().includes(f))}},e[10]=f,e[11]=m):m=e[11];const N=x.map(m).filter(Jt);let E;e[12]!==n||e[13]!==i||e[14]!==r?(E=()=>{i(!n),r([])},e[12]=n,e[13]=i,e[14]=r,e[15]=E):E=e[15];let T;e[16]!==n||e[17]!==c||e[18]!==E?(T=Ye(n,c,E),e[16]=n,e[17]=c,e[18]=E,e[19]=T):T=e[19];let S;e[20]!==n||e[21]!==i||e[22]!==r||e[23]!==c?(S=c?void 0:()=>{i(!n),r([])},e[20]=n,e[21]=i,e[22]=r,e[23]=c,e[24]=S):S=e[24];let C;e[25]!==T||e[26]!==S?(C=s.jsx(Ue,{title:"General",children:s.jsx(Be,{children:s.jsx(Ve,{title:"All organization permissions",description:"Grant full access to all features below",action:T,onClick:S})})}),e[25]=T,e[26]=S,e[27]=C):C=e[27],a=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[C,N.length===0&&f?s.jsxs("p",{className:"text-sm text-muted-foreground py-4",children:["No permissions match “",h,"”"]}):N.map(v=>{const{section:_,capabilities:O}=v;return s.jsx(Ue,{title:_,children:s.jsx(Be,{children:O.map(p=>{const R=Bt(p,l,n);return s.jsx(Ve,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[p.label,p.dangerous&&s.jsx(ft,{size:12,className:"text-amber-500 shrink-0"})]}),description:p.description,action:Ye(R,c,()=>o(p,R)),onClick:c?void 0:()=>o(p,R)},p.id)})})},_)})]})}),e[2]=n,e[3]=f,e[4]=i,e[5]=r,e[6]=c,e[7]=h,e[8]=l,e[9]=a}else a=e[9];return a}function Jt(t){return t.capabilities.length>0}function Wt(t){return t.tools}function es(t){return t.capabilities}const it={anthropic:"Anthropic",openrouter:"OpenRouter"},ts={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function ss(t,e){const n=t.indexOf("/"),l=n>0?t.slice(0,n):e;return l.startsWith("~")?l.slice(1):l}function ns(t){return ts[t]??it[t]??t}function ls(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const rt=30;function os(t){const e=q.c(44),{connectionId:n,subProviderId:l,subProviderName:i,groupLogo:r,models:d,allConnectionModelIds:h,selectedModels:c,allowAllModels:g,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:x,readOnly:o,defaultExpanded:m}=t,[N,E]=$.useState(m),T=m||N,S=E,[C,v]=$.useState(rt);let _;e[0]!==f||e[1]!==g||e[2]!==c?(_=j=>g||f||c.includes("*")||c.includes(j),e[0]=f,e[1]=g,e[2]=c,e[3]=_):_=e[3];const O=_;let p;if(e[4]!==O||e[5]!==d){let j;e[7]!==O?(j=u=>O(u.id),e[7]=O,e[8]=j):j=e[8],p=d.filter(j),e[4]=O,e[5]=d,e[6]=p}else p=e[6];const R=p.length;let I;if(e[9]!==h||e[10]!==g||e[11]!==n||e[12]!==R||e[13]!==T||e[14]!==r||e[15]!==O||e[16]!==d||e[17]!==x||e[18]!==a||e[19]!==o||e[20]!==l||e[21]!==i||e[22]!==C){const j=d.slice(0,C),u=d.length>C;let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=()=>S(cs),e[24]=w):w=e[24];const A=r??tt[l]??st;let k;e[25]!==i||e[26]!==A?(k=s.jsx(ye,{icon:A,name:i,size:"sm"}),e[25]=i,e[26]=A,e[27]=k):k=e[27];let G;e[28]!==i?(G=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[28]=i,e[29]=G):G=e[29];let U;e[30]!==k||e[31]!==G?(U=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[k,G]}),e[30]=k,e[31]=G,e[32]=U):U=e[32];let B;e[33]!==R||e[34]!==d.length?(B=s.jsxs(ge,{variant:"secondary",className:"text-xs text-muted-foreground",children:[R,"/",d.length," enabled"]}),e[33]=R,e[34]=d.length,e[35]=B):B=e[35];let M;e[36]!==T?(M=T?s.jsx(Lt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Pt,{size:16,className:"text-muted-foreground shrink-0"}),e[36]=T,e[37]=M):M=e[37];let z;e[38]!==M||e[39]!==B?(z=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[B,M]}),e[38]=M,e[39]=B,e[40]=z):z=e[40];let y;e[41]!==z||e[42]!==U?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:w,children:[U,z]}),e[41]=z,e[42]=U,e[43]=y):y=e[43],I=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[y,T&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[j.map(L=>{const Y=O(L.id),F=()=>{if(!o){if(g){x(n,h,L.id);return}a(n,L.id)}};return s.jsxs("div",{className:K("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!o&&"hover:bg-muted/50 cursor-pointer"),onClick:F,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:L.title})}),s.jsx("div",{onClick:as,children:o?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:Y,disabled:!0,onCheckedChange:rs})})}),s.jsx(Ee,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:Y,onCheckedChange:F})})]},L.id)}),u&&s.jsxs("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>v(is),children:["Show more (",d.length-C," remaining)"]})]})]}),e[9]=h,e[10]=g,e[11]=n,e[12]=R,e[13]=T,e[14]=r,e[15]=O,e[16]=d,e[17]=x,e[18]=a,e[19]=o,e[20]=l,e[21]=i,e[22]=C,e[23]=I}else I=e[23];return I}function is(t){return t+rt}function rs(){}function as(t){return t.stopPropagation()}function cs(t){return!t}function ds(t){const e=q.c(33),{connection:n,selectedModels:l,allowAllModels:i,onToggleModel:r,onExitAllowAll:d,allConnectionModelsSelected:h,searchQuery:c,readOnly:g}=t,f=Mt(n.id);let a,x,o,m,N;if(e[0]!==h||e[1]!==i||e[2]!==n.id||e[3]!==n.label||e[4]!==n.providerId||e[5]!==d||e[6]!==r||e[7]!==f||e[8]!==g||e[9]!==c||e[10]!==l){N=Symbol.for("react.early_return_sentinel");e:{let S;e[16]!==n.label?(S=A=>({...A,id:A.modelId,provider:n.label}),e[16]=n.label,e[17]=S):S=e[17];const C=f.filter(hs).map(S),v=c.trim().toLowerCase(),_=v?C.filter(A=>A.title.toLowerCase().includes(v)||A.id.toLowerCase().includes(v)||A.provider?.toLowerCase().includes(v)):C;if(_.length===0){N=null;break e}const O=new Map;for(const A of _){const k=ss(A.id,n.providerId),G=O.get(k)??{models:[],logo:null};G.models.push({id:A.id,title:ls(A.title),logo:A.logo}),!G.logo&&A.logo&&(G.logo=A.logo),O.set(k,G)}const p=Array.from(O.entries()).map(fs).sort(us),R=p.length===1||v.length>0;o="flex flex-col gap-3";const I=tt[n.providerId]??st;let j;e[18]!==n.providerId||e[19]!==I?(j=s.jsx("img",{src:I,alt:n.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=n.providerId,e[19]=I,e[20]=j):j=e[20];const u=it[n.providerId]??n.providerId;let w;e[21]!==u?(w=s.jsx("h4",{className:"text-sm font-medium",children:u}),e[21]=u,e[22]=w):w=e[22],e[23]!==w||e[24]!==j?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[j,w]}),e[23]=w,e[24]=j,e[25]=m):m=e[25],a="flex flex-col gap-3",x=p.map(A=>s.jsx(os,{connectionId:n.id,subProviderId:A.id,subProviderName:A.name,groupLogo:A.logo,models:A.models,allConnectionModelIds:C.map(ms),selectedModels:l,allowAllModels:i,allConnectionModelsSelected:h,onToggleModel:r,onExitAllowAll:d,readOnly:g,defaultExpanded:R},A.id))}e[0]=h,e[1]=i,e[2]=n.id,e[3]=n.label,e[4]=n.providerId,e[5]=d,e[6]=r,e[7]=f,e[8]=g,e[9]=c,e[10]=l,e[11]=a,e[12]=x,e[13]=o,e[14]=m,e[15]=N}else a=e[11],x=e[12],o=e[13],m=e[14],N=e[15];if(N!==Symbol.for("react.early_return_sentinel"))return N;let E;e[26]!==a||e[27]!==x?(E=s.jsx("div",{className:a,children:x}),e[26]=a,e[27]=x,e[28]=E):E=e[28];let T;return e[29]!==o||e[30]!==m||e[31]!==E?(T=s.jsxs("div",{className:o,children:[m,E]}),e[29]=o,e[30]=m,e[31]=E,e[32]=T):T=e[32],T}function ms(t){return t.id}function us(t,e){return t.name.localeCompare(e.name)}function fs(t){const[e,n]=t;return{id:e,name:ns(e),logo:n.logo,models:n.models}}function hs(t,e,n){return n.findIndex(l=>l.modelId===t.modelId)===e}function gs(t){const e=q.c(35),{allowAllModels:n,modelSet:l,onAllowAllChange:i,onModelSetChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d,g=$.useDeferredValue(h),f=wt();let a;e[0]!==l||e[1]!==r?(a=(p,R)=>{const I=l[p]??[],j={...l};if(I.includes(R)){const u=I.filter(w=>w!==R);u.length===0?delete j[p]:j[p]=u}else j[p]=[...I,R];r(j)},e[0]=l,e[1]=r,e[2]=a):a=e[2];const x=a;let o;e[3]!==l||e[4]!==i||e[5]!==r?(o=(p,R,I)=>{i(!1),r({...l,[p]:R.filter(j=>j!==I)})},e[3]=l,e[4]=i,e[5]=r,e[6]=o):o=e[6];const m=o,N=!c&&"hover:bg-muted/50 cursor-pointer";let E;e[7]!==N?(E=K("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",N),e[7]=N,e[8]=E):E=e[8];let T;e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==c?(T=()=>{if(c)return;const p=!n;i(p),p&&r({})},e[9]=n,e[10]=i,e[11]=r,e[12]=c,e[13]=T):T=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("span",{className:"text-sm font-medium",children:"All models"}),e[14]=S):S=e[14];let C;e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==c?(C=s.jsx("div",{onClick:ps,children:c?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:n,disabled:!0,onCheckedChange:xs})})}),s.jsx(Ee,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:n,onCheckedChange:p=>{i(p),p&&r({})}})}),e[15]=n,e[16]=i,e[17]=r,e[18]=c,e[19]=C):C=e[19];let v;e[20]!==E||e[21]!==T||e[22]!==C?(v=s.jsxs("div",{className:E,onClick:T,children:[S,C]}),e[20]=E,e[21]=T,e[22]=C,e[23]=v):v=e[23];let _;e[24]!==f||e[25]!==n||e[26]!==g||e[27]!==m||e[28]!==l||e[29]!==c||e[30]!==x?(_=f.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No LLM connections configured"}):f.map(p=>s.jsx($.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(fe,{className:"size-4 animate-spin"}),"Loading models..."]}),children:s.jsx(ds,{connection:p,selectedModels:l[p.id]??[],allowAllModels:n,onToggleModel:x,onExitAllowAll:m,allConnectionModelsSelected:(l[p.id]??[]).includes("*"),searchQuery:g,readOnly:c})},p.id)),e[24]=f,e[25]=n,e[26]=g,e[27]=m,e[28]=l,e[29]=c,e[30]=x,e[31]=_):_=e[31];let O;return e[32]!==_||e[33]!==v?(O=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[v,_]}),e[32]=_,e[33]=v,e[34]=O):O=e[34],O}function xs(){}function ps(t){return t.stopPropagation()}function bs(t){const e=q.c(52),{open:n,onOpenChange:l,selectedMemberIds:i,onAddMembers:r}=t,[d,h]=$.useState(""),c=$.useDeferredValue(d);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[f,a]=$.useState(g),{data:x}=nt();let o,m,N,E,T,S,C,v,_,O,p;if(e[1]!==x?.data?.members||e[2]!==c||e[3]!==r||e[4]!==l||e[5]!==n||e[6]!==f||e[7]!==d||e[8]!==i){const U=x?.data?.members??[];let B;e[20]!==c?(B=y=>{const L=c.toLowerCase();return y.user?.name?.toLowerCase().includes(L)||y.user?.email?.toLowerCase().includes(L)},e[20]=c,e[21]=B):B=e[21];const M=U.filter(B);let z;e[22]!==r||e[23]!==l||e[24]!==f?(z=()=>{r(f),a([]),l(!1)},e[22]=r,e[23]=l,e[24]=f,e[25]=z):z=e[25],N=z,m=Qe,O=n,p=l,o=qe,v="sm:max-w-md p-0",e[26]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(He,{className:"px-6 pt-6",children:[s.jsx(Ze,{children:"Add Members to Role"}),s.jsx(Xe,{children:"Select members to add to this role."})]}),e[26]=_):_=e[26],S="flex flex-col h-80",e[27]!==d?(C=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(ve,{value:d,onChange:h,placeholder:"Search members...",className:"w-full"})}),e[27]=d,e[28]=C):C=e[28],E="flex-1 overflow-auto",T=M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:d?"No members found":"No members available"})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:M.map(y=>{const L=y.role!=="owner",Y=i.includes(y.id),F=f.includes(y.id);return s.jsxs("label",{className:K("flex items-center gap-3 p-2 rounded-lg",!L||Y?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(we,{checked:F||Y,onCheckedChange:()=>{!L||Y||a(X=>X.includes(y.id)?X.filter(J=>J!==y.id):[...X,y.id])},disabled:!L||Y}),s.jsx(lt,{url:y.user?.image??void 0,fallback:ot(y.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:y.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y.user?.email})]}),!L&&s.jsx(ge,{variant:"secondary",className:"shrink-0",children:"Owner"}),Y&&L&&s.jsx(ge,{variant:"outline",className:"shrink-0",children:"Added"})]},y.id)})}),e[1]=x?.data?.members,e[2]=c,e[3]=r,e[4]=l,e[5]=n,e[6]=f,e[7]=d,e[8]=i,e[9]=o,e[10]=m,e[11]=N,e[12]=E,e[13]=T,e[14]=S,e[15]=C,e[16]=v,e[17]=_,e[18]=O,e[19]=p}else o=e[9],m=e[10],N=e[11],E=e[12],T=e[13],S=e[14],C=e[15],v=e[16],_=e[17],O=e[18],p=e[19];let R;e[29]!==E||e[30]!==T?(R=s.jsx("div",{className:E,children:T}),e[29]=E,e[30]=T,e[31]=R):R=e[31];let I;e[32]!==R||e[33]!==S||e[34]!==C?(I=s.jsxs("div",{className:S,children:[C,R]}),e[32]=R,e[33]=S,e[34]=C,e[35]=I):I=e[35];let j;e[36]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Je,{children:"Cancel"}),e[36]=j):j=e[36];const u=f.length===0,w=f.length>0&&`(${f.length})`;let A;e[37]!==N||e[38]!==u||e[39]!==w?(A=s.jsxs(We,{className:"px-6 pb-6",children:[j,s.jsxs(et,{onClick:N,disabled:u,children:["Add ",w]})]}),e[37]=N,e[38]=u,e[39]=w,e[40]=A):A=e[40];let k;e[41]!==o||e[42]!==I||e[43]!==A||e[44]!==v||e[45]!==_?(k=s.jsxs(o,{className:v,children:[_,I,A]}),e[41]=o,e[42]=I,e[43]=A,e[44]=v,e[45]=_,e[46]=k):k=e[46];let G;return e[47]!==m||e[48]!==k||e[49]!==O||e[50]!==p?(G=s.jsx(m,{open:O,onOpenChange:p,children:k}),e[47]=m,e[48]=k,e[49]=O,e[50]=p,e[51]=G):G=e[51],G}function Ts(t){const e=q.c(29),{memberIds:n,onMemberIdsChange:l,readOnly:i,readOnlyMessage:r,searchQuery:d,addMemberDialogOpen:h,onAddMemberDialogOpenChange:c}=t,g=i===void 0?!1:i,f=r===void 0?"Owner membership cannot be changed":r,a=$.useDeferredValue(d),{data:x}=nt();let o,m,N;if(e[0]!==x?.data?.members||e[1]!==a||e[2]!==n||e[3]!==l||e[4]!==g||e[5]!==f||e[6]!==d){const v=x?.data?.members??[];let _;e[10]!==n?(_=I=>n.includes(I.id),e[10]=n,e[11]=_):_=e[11];const O=v.filter(_);let p;e[12]!==a?(p=I=>{const j=a.toLowerCase();return I.user?.name?.toLowerCase().includes(j)||I.user?.email?.toLowerCase().includes(j)},e[12]=a,e[13]=p):p=e[13];const R=O.filter(p);N="flex flex-col h-full",o="flex-1 overflow-auto",m=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:"No members"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add members to grant them the configured permissions."})]})}):R.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:['No members match "',d,'"']})}):s.jsx("div",{className:"p-4 space-y-2",children:R.map(I=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(lt,{url:I.user?.image??void 0,fallback:ot(I.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:I.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.user?.email})]}),g?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsx(ne,{variant:"ghost",size:"sm",disabled:!0,children:s.jsx(ze,{size:16})})})}),s.jsx(Ee,{children:s.jsx("p",{children:f})})]})}):s.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>l(n.filter(j=>j!==I.id)),children:s.jsx(ze,{size:16})})]},I.id))}),e[0]=x?.data?.members,e[1]=a,e[2]=n,e[3]=l,e[4]=g,e[5]=f,e[6]=d,e[7]=o,e[8]=m,e[9]=N}else o=e[7],m=e[8],N=e[9];let E;e[14]!==o||e[15]!==m?(E=s.jsx("div",{className:o,children:m}),e[14]=o,e[15]=m,e[16]=E):E=e[16];let T;e[17]!==n||e[18]!==l?(T=v=>l([...n,...v]),e[17]=n,e[18]=l,e[19]=T):T=e[19];let S;e[20]!==h||e[21]!==n||e[22]!==c||e[23]!==T?(S=s.jsx(bs,{open:h,onOpenChange:c,selectedMemberIds:n,onAddMembers:T}),e[20]=h,e[21]=n,e[22]=c,e[23]=T,e[24]=S):S=e[24];let C;return e[25]!==N||e[26]!==E||e[27]!==S?(C=s.jsxs("div",{className:N,children:[E,S]}),e[25]=N,e[26]=E,e[27]=S,e[28]=C):C=e[28],C}function Es(t){const e=q.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=s.jsx($.Suspense,{fallback:n,children:s.jsx(Ts,{...t})}),e[1]=t,e[2]=l):l=e[2],l}const _s={owner:[],admin:[],user:[]};function Is(t,e,n,l){const i=t==="owner"||t==="admin";return{role:{id:n?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:_s[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(r=>r.role===t).map(r=>r.id)}}function Ns(t,e,n){const l=t.permission||{},i=l.self||[],r=i.includes("*"),d=r?[]:i.filter(a=>a!=="*"),h={};for(const[a,x]of Object.entries(l))if(!(a==="self"||a==="models"))if(a==="*")for(const o of n)h[o.id]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x;else{const o=n.find(m=>m.id===a);o&&(h[a]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x)}const c=l.models||[],g=c.length===0||c.includes("*:*"),f={};if(!g)for(const a of c){const x=a.indexOf(":");if(x===-1)continue;const o=a.slice(0,x),m=a.slice(x+1);f[o]||(f[o]=[]),f[o].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:r,staticPermissions:d,toolSet:h,allowAllModels:g,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Ss(t,e){const n={};t.allowAllStaticPermissions?n.self=["*"]:t.staticPermissions.length>0&&(n.self=t.staticPermissions);for(const[l,i]of Object.entries(t.toolSet))if(i.length>0){const d=e.find(h=>h.id===l)?.tools?.map(h=>h.name)??[];n[l]=d.length>0&&d.every(h=>i.includes(h))?["*"]:i}if(t.allowAllModels)n.models=["*:*"];else{const l=[];for(const[i,r]of Object.entries(t.modelSet))for(const d of r)l.push(`${i}:${d}`);l.length>0&&(n.models=l)}return n}function Cs(t,e,n){return t.kind==="builtin"?Is(t.role,e,void 0):t.kind==="custom"?Ns(t.role,e,n):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function As(t){const e=q.c(6),{readOnly:n,readOnlyMessage:l,onOpen:i}=t,r=l===void 0?"Owner membership cannot be changed":l;if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ne,{variant:"outline",size:"sm",disabled:!0,children:[s.jsx(Ae,{size:16}),"Add Member"]})})}),e[0]=c):c=e[0];let g;return e[1]!==r?(g=s.jsx(pe,{children:s.jsxs(be,{children:[c,s.jsx(Ee,{children:s.jsx("p",{children:r})})]})}),e[1]=r,e[2]=g):g=e[2],g}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ae,{size:16}),e[3]=d):d=e[3];let h;return e[4]!==i?(h=s.jsxs(ne,{variant:"outline",size:"sm",onClick:i,children:[d,"Add Member"]}),e[4]=i,e[5]=h):h=e[5],h}function Os(t){const e=q.c(14),{locator:n}=Ne(),l=je(),i=yt();let r;e[0]!==n?(r=re.members(n),e[0]=n,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>l.organization.listMembers(),e[2]=l,e[3]=d):d=e[3];let h;e[4]!==r||e[5]!==d?(h={queryKey:r,queryFn:d},e[4]=r,e[5]=d,e[6]=h):h=e[6];const{data:c,isPending:g}=Oe(h);if(g||!i){let o;return e[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=o):o=e[7],o}let f;e[8]!==c?.data?.members?(f=c?.data?.members??[],e[8]=c?.data?.members,e[9]=f):f=e[9];const a=f;let x;return e[10]!==i||e[11]!==a||e[12]!==t?(x=s.jsx(Rs,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=x):x=e[13],x}function Rs({target:t,onBack:e,onSaved:n,members:l,connections:i}){const{locator:r}=Ne(),d=je(),h=$e(),c=t.kind==="builtin",g=t.kind==="builtin"&&t.role==="owner",f=t.kind==="new",[a,x]=$.useState(c?"org":"mcp"),o=mt({resolver:ut(Zt),defaultValues:Cs(t,l,i)}),m=o.formState.isValid,N=o.formState.isDirty,E=Fe({mutationFn:async u=>{const w=Ss(u,i),A=u.role.slug||u.role.label.toLowerCase().replace(/\s+/g,"-"),k=(u.role.slug==="owner"||u.role.slug==="admin"||u.role.slug==="user")&&!u.role.id,G=async(U,B)=>{const M=l.filter(L=>L.role===(B??U)).map(L=>L.id),z=u.memberIds.filter(L=>!M.includes(L)),y=M.filter(L=>!u.memberIds.includes(L));for(const L of z){const Y=await d.organization.updateMemberRole({memberId:L,role:[U]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}for(const L of y){const Y=await d.organization.updateMemberRole({memberId:L,role:["user"]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}};if(k)return await G(u.role.slug),u;if(u.role.id){const U=u.role.label.toLowerCase().replace(/\s+/g,"-"),B=u.role.slug,M=U!==B,z=await d.organization.updateRole({roleId:u.role.id,data:{permission:w,...M?{roleName:U}:{}}});if(z?.error)throw new Error(z.error.message??"Something went wrong");return await G(M?U:B,M?B:void 0),M?{...u,role:{...u.role,slug:U}}:u}else{const U=await d.organization.createRole({role:A,permission:w});if(U?.error)throw new Error(U.error.message??"Something went wrong");for(const B of u.memberIds){const M=await d.organization.updateMemberRole({memberId:B,role:[A]});if(M?.error)throw new Error(M.error.message)}return{...u,role:{...u.role,id:U.data?.roleData?.id,slug:A}}}},onSuccess:(u,w)=>{h.invalidateQueries({queryKey:re.members(r)}),h.invalidateQueries({queryKey:re.organizationRoles(r)});const A=!w.role.id&&!w.role.slug,k=w.role.slug==="owner"&&!w.role.id;Re(k?"role_members_updated":A?"role_created":"role_updated",{role_slug:w.role.slug??null}),he.success(k?"Members updated successfully!":A?"Role created successfully!":"Role updated successfully!"),o.reset(u),n(u.role.id)},onError:u=>{he.error(u instanceof Error?u.message:"Failed to save role")}}),T=o.handleSubmit(u=>{if(!u.role.label.trim()){he.error("Role name is required"),o.setFocus("role.label");return}E.mutate(u)}),S=!g,C=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",v=[...g?[]:[{id:"mcp",label:"MCP Permissions"}],{id:"org",label:"Organization Permissions"},{id:"models",label:"Models"},{id:"members",label:"Members"}],[_,O]=$.useState(""),[p,R]=$.useState(!1),I=u=>{x(u),O("")},j={mcp:"Search MCP servers...",org:"Search permissions...",models:"Search models...",members:"Search members..."};return s.jsx(te,{children:s.jsxs(te.Content,{className:K("flex flex-col",a!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(te.Title,{actions:S&&s.jsxs(s.Fragment,{children:[s.jsx(ne,{variant:"outline",size:"sm",onClick:e,disabled:E.isPending,children:"Cancel"}),s.jsx(ne,{size:"sm",onClick:T,disabled:E.isPending||!m||!N,children:E.isPending?"Saving...":f?"Create Role":"Save Changes"})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",t.kind==="builtin"?Ht(t.role):qt(o.watch("role.label")))}),g&&s.jsx(Ke,{size:16,className:"text-muted-foreground shrink-0"}),f||t.kind==="custom"?s.jsx("input",{...o.register("role.label"),placeholder:"Role name",className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:f}):s.jsx("span",{className:"truncate",children:C})]})}),s.jsx("div",{className:"flex items-center gap-2",children:v.map(u=>s.jsx("button",{type:"button",onClick:()=>I(u.id),className:K("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",a===u.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:u.label},u.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(ve,{value:_,onChange:O,placeholder:j[a]??"Search...",className:"w-full md:w-[375px]"}),a==="members"&&s.jsx(As,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>R(!0)})]})]})}),s.jsx("div",{className:K("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",a!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:K(a!=="org"&&"h-full overflow-hidden",a!=="models"&&a!=="org"&&"border border-border rounded-xl bg-card"),children:[a==="mcp"&&!g&&s.jsx(Kt,{toolSet:o.watch("toolSet"),onToolSetChange:u=>o.setValue("toolSet",u,{shouldDirty:!0}),searchQuery:_}),a==="org"&&s.jsx(Xt,{allowAllStaticPermissions:o.watch("allowAllStaticPermissions"),staticPermissions:o.watch("staticPermissions"),onAllowAllChange:u=>o.setValue("allowAllStaticPermissions",u,{shouldDirty:!0}),onPermissionsChange:u=>o.setValue("staticPermissions",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="models"&&s.jsx(gs,{allowAllModels:o.watch("allowAllModels"),modelSet:o.watch("modelSet"),onAllowAllChange:u=>o.setValue("allowAllModels",u,{shouldDirty:!0}),onModelSetChange:u=>o.setValue("modelSet",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="members"&&s.jsx(Es,{memberIds:o.watch("memberIds"),onMemberIdsChange:u=>o.setValue("memberIds",u,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?"User is the default role — members can't be removed from it; assign another role to change their access":"Owner membership cannot be changed",searchQuery:_,addMemberDialogOpen:p,onAddMemberDialogOpenChange:R})]})})]})})}function js(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function vs(t){const e=q.c(6),{area:n,children:l}=t,{isPrivileged:i,loading:r,error:d}=Dt();let h;return e[0]!==n||e[1]!==l||e[2]!==d||e[3]!==i||e[4]!==r?(h=s.jsx(kt,{granted:i,loading:r,error:d,area:n,children:l}),e[0]=n,e[1]=l,e[2]=d,e[3]=i,e[4]=r,e[5]=h):h=e[5],h}const ys=[{role:"owner",label:"Owner",color:"bg-red-500"},{role:"admin",label:"Admin",color:"bg-blue-500"},{role:"user",label:"User",color:"bg-green-500"}],Ce=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"];function ws(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Ce.length;return Ce[n]??Ce[0]}const Ms={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ls(t,e){return e?Ms[t]??"bg-neutral-400":ws(t)}function Ps(){const t=q.c(77),[e,n]=$.useState(""),[l,i]=$.useState(null),r=gt();let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[0]=d):d=t[0];const{role:h}=xt(d),{locator:c}=Ne(),g=je(),f=$e(),{customRoles:a,refetch:x}=pt();let o;t[1]!==r?(o=P=>r({to:".",search:V=>({...V,role:P})}),t[1]=r,t[2]=o):o=t[2];const m=o;let N;e:{if(!h){N=null;break e}if(h==="new"){N={kind:"new"};break e}if(h.startsWith("builtin-")){N={kind:"builtin",role:h.slice(8)};break e}let P;t[3]!==h?(P=ae=>ae.id===h,t[3]=h,t[4]=P):P=t[4];const V=a.find(P);N=V?{kind:"custom",role:V}:null}const E=N;let T;t[5]!==c?(T=re.members(c),t[5]=c,t[6]=T):T=t[6];let S;t[7]!==g?(S=()=>g.organization.listMembers(),t[7]=g,t[8]=S):S=t[8];let C;t[9]!==T||t[10]!==S?(C={queryKey:T,queryFn:S},t[9]=T,t[10]=S,t[11]=C):C=t[11];const{data:v}=Oe(C);let _;t[12]!==v?.data?.members?(_=v?.data?.members??[],t[12]=v?.data?.members,t[13]=_):_=t[13];const O=_;let p;t[14]!==O?(p=P=>O.filter(V=>V.role===P).length,t[14]=O,t[15]=p):p=t[15];const R=p;let I;if(t[16]!==a||t[17]!==R||t[18]!==e){let P;t[20]!==R?(P=ce=>({kind:"builtin",role:{...ce,memberCount:R(ce.role)}}),t[20]=R,t[21]=P):P=t[21];const V=ys.map(P);let ae;t[22]!==R?(ae=ce=>({kind:"custom",role:{...ce,memberCount:R(ce.role)}}),t[22]=R,t[23]=ae):ae=t[23];const at=a.map(ae);if(I=[...V,...at],e){const ce=e.toLowerCase();I=I.filter(ct=>ct.role.label.toLowerCase().includes(ce))}t[16]=a,t[17]=R,t[18]=e,t[19]=I}else I=t[19];let j;t[24]!==g?(j=async P=>{const V=await g.organization.deleteRole({roleId:P});if(V?.error)throw new Error(V.error.message);return V?.data},t[24]=g,t[25]=j):j=t[25];const u=Fe({mutationFn:j,onSuccess:(P,V)=>{Re("role_deleted",{role_id:V}),f.invalidateQueries({queryKey:re.members(c)}),f.invalidateQueries({queryKey:re.organizationRoles(c)}),he.success("Role deleted successfully!"),x(),E?.kind==="custom"&&E.role.id===V&&m(void 0)},onError:zs});let w,A,k,G;t[26]===Symbol.for("react.memo_cache_sentinel")?(G={id:"role",header:"Role",render:Vs,cellClassName:"flex-1 min-w-0",sortable:!0},w={id:"type",header:"Type",render:Bs,cellClassName:"w-28 shrink-0"},A={id:"permissions",header:"Permissions",render:Us,cellClassName:"flex-1 min-w-0"},k={id:"members",header:"Members",render:Gs,cellClassName:"w-24 shrink-0"},t[26]=w,t[27]=A,t[28]=k,t[29]=G):(w=t[26],A=t[27],k=t[28],G=t[29]);let U;t[30]===Symbol.for("react.memo_cache_sentinel")?(U=[G,w,A,k,{id:"actions",header:"",render:P=>P.kind==="builtin"?null:s.jsxs(Tt,{children:[s.jsx(Et,{asChild:!0,children:s.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ks,children:s.jsx(Nt,{size:16})})}),s.jsx(_t,{align:"end",onClick:Ds,children:s.jsxs(It,{variant:"destructive",onClick:()=>{const V=P.role;V.id&&i({id:V.id,label:V.label})},children:[s.jsx(St,{size:16}),"Delete"]})})]}),cellClassName:"w-12 shrink-0"}],t[30]=U):U=t[30];const B=U;let M;t[31]!==m?(M=P=>{if(P.kind==="builtin")m(`builtin-${P.role.role}`);else{const V=P.role;m(V.id)}},t[31]=m,t[32]=M):M=t[32];const z=M;if(E){let P;t[33]!==m?(P=()=>m(void 0),t[33]=m,t[34]=P):P=t[34];let V;return t[35]!==x||t[36]!==m?(V=()=>{x(),m(void 0)},t[35]=x,t[36]=m,t[37]=V):V=t[37],s.jsx(Os,{target:E,onBack:P,onSaved:V},js(E))}let y;t[38]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(te.Title,{children:"Roles"}),t[38]=y):y=t[38];let L;t[39]===Symbol.for("react.memo_cache_sentinel")?(L=P=>{P.key==="Escape"&&(n(""),P.target.blur())},t[39]=L):L=t[39];let Y;t[40]!==e?(Y=s.jsx(ve,{value:e,onChange:n,placeholder:"Search roles...",className:"w-full md:w-[375px]",onKeyDown:L}),t[40]=e,t[41]=Y):Y=t[41];let F;t[42]!==m?(F=()=>m("new"),t[42]=m,t[43]=F):F=t[43];let X;t[44]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(Ae,{size:16}),t[44]=X):X=t[44];let J;t[45]!==F?(J=s.jsxs(ne,{onClick:F,children:[X,"Create Role"]}),t[45]=F,t[46]=J):J=t[46];let le;t[47]!==Y||t[48]!==J?(le=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[Y,J]}),t[47]=Y,t[48]=J,t[49]=le):le=t[49];let oe;t[50]!==e?(oe=e?s.jsx(Ge,{title:"No roles found",description:`No roles match "${e}"`}):s.jsx(Ge,{title:"No roles",description:"Create a role to get started."}),t[50]=e,t[51]=oe):oe=t[51];let ie;t[52]!==I||t[53]!==B||t[54]!==z||t[55]!==oe?(ie=s.jsx(bt,{columns:B,data:I,isLoading:!1,onRowClick:z,emptyState:oe}),t[52]=I,t[53]=B,t[54]=z,t[55]=oe,t[56]=ie):ie=t[56];let b;t[57]!==le||t[58]!==ie?(b=s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[y,le,ie]})})}),t[57]=le,t[58]=ie,t[59]=b):b=t[59];const D=l!==null;let Q;t[60]===Symbol.for("react.memo_cache_sentinel")?(Q=P=>!P&&i(null),t[60]=Q):Q=t[60];let H;t[61]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Ze,{children:"Delete Role"}),t[61]=H):H=t[61];const W=l?.label;let Z;t[62]!==W?(Z=s.jsxs(He,{children:[H,s.jsxs(Xe,{children:['Are you sure you want to delete the "',W,'" role? This action cannot be undone.']})]}),t[62]=W,t[63]=Z):Z=t[63];let ee;t[64]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Je,{children:"Cancel"}),t[64]=ee):ee=t[64];let de;t[65]!==u||t[66]!==l?(de=s.jsxs(We,{children:[ee,s.jsx(et,{onClick:()=>{l?.id&&u.mutate(l.id),i(null)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[65]=u,t[66]=l,t[67]=de):de=t[67];let me;t[68]!==Z||t[69]!==de?(me=s.jsxs(qe,{children:[Z,de]}),t[68]=Z,t[69]=de,t[70]=me):me=t[70];let ue;t[71]!==D||t[72]!==me?(ue=s.jsx(Qe,{open:D,onOpenChange:Q,children:me}),t[71]=D,t[72]=me,t[73]=ue):ue=t[73];let _e;return t[74]!==b||t[75]!==ue?(_e=s.jsxs(te,{children:[b,ue]}),t[74]=b,t[75]=ue,t[76]=_e):_e=t[76],_e}function Ds(t){return t.stopPropagation()}function ks(t){return t.stopPropagation()}function Gs(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Us(t){if(t.kind==="builtin")return t.role.role==="owner"||t.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:"Full access"}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"Basic access"});const e=t.role,n=[];return e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:n.length>0?n.join(", "):"No permissions"})}function Bs(t){return t.kind==="builtin"?s.jsx(ge,{variant:"secondary",className:"text-xs",children:"Built-in"}):s.jsx(ge,{variant:"outline",className:"text-xs",children:"Custom"})}function Vs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",Ls(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(Ke,{size:12,className:"text-muted-foreground shrink-0"})]})}function zs(t,e){Re("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),he.error(t instanceof Error?t.message:"Failed to delete role")}function Ys(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load roles"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ht,{fallback:e,children:s.jsx($.Suspense,{fallback:s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ps,{})})}),t[1]=n):n=t[1],n}function ml(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vs,{area:"roles",children:s.jsx(Ys,{})}),t[0]=e):e=t[0],e}export{ml as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{y as c}from"./preview-dialog-CWq_MXwm.js";function t(r){return(e,a)=>{c(e),r(e,a)}}export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as m,j as s,l as o}from"./index-C3Ab2DJ2.js";import{i as c}from"./AlertCircle-DMqR3m0L.js";import{i as l}from"./ChevronUp-CiXMtnii.js";function u(i){const e=m.c(3),{isPending:a,isError:n}=i;if(n){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[s.jsx(c,{size:13}),"Couldn't save"]}),e[0]=t):t=e[0],t}if(a){let t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[s.jsx(o,{size:13,className:"animate-spin"}),"Saving…"]}),e[1]=t):t=e[1],t}let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/70",children:[s.jsx(l,{size:13}),"Saved"]}),e[2]=r):r=e[2],r}export{u as S};
|