decocms 2.162.1 → 2.162.2
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-7lB7fro0.js → AlertCircle-CLSQ0NLi.js} +1 -1
- package/dist/client/assets/{AlignLeft-CWbftioK.js → AlignLeft-DGT5YesK.js} +1 -1
- package/dist/client/assets/{ArrowDown-Ce-Md5NR.js → ArrowDown-BeNMpJ4E.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DNGwlp4M.js → ArrowLeft-ZgtBxTyN.js} +1 -1
- package/dist/client/assets/{ArrowUp-B9ucqKIV.js → ArrowUp-WkRPF3Cl.js} +1 -1
- package/dist/client/assets/{Check-Cvo-Mj0S.js → Check-D30Nw_2C.js} +1 -1
- package/dist/client/assets/{CheckCircle-BhnUN_-o.js → CheckCircle-4PmUxEXj.js} +1 -1
- package/dist/client/assets/{CheckDone01-Dh2K_VwC.js → CheckDone01-BYS-dKbQ.js} +1 -1
- package/dist/client/assets/{CheckVerified02-B23tFeT2.js → CheckVerified02-C_5D8neO.js} +1 -1
- package/dist/client/assets/{ChevronDown-DYWNve60.js → ChevronDown-C7zTxlHE.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CIJS6SFa.js → ChevronLeft-Ov3NE9c_.js} +1 -1
- package/dist/client/assets/{ChevronRight-B4xXvXUl.js → ChevronRight-BJe7e-X2.js} +1 -1
- package/dist/client/assets/{Clock-Di0Vpv60.js → Clock--mEiDXe5.js} +1 -1
- package/dist/client/assets/{Code01-CeoOPe4L.js → Code01-BOUu51ck.js} +1 -1
- package/dist/client/assets/{Container-BvytClvz.js → Container-BXYdiT-J.js} +1 -1
- package/dist/client/assets/{Copy01-DEyL4hmF.js → Copy01-xLxETA4z.js} +1 -1
- package/dist/client/assets/{Dataflow03-BwgEkxHj.js → Dataflow03-FtQ0Yhj_.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BdKjLiyh.js → DotsHorizontal-Dprv0d9t.js} +1 -1
- package/dist/client/assets/{DotsVertical-BOqBGvRn.js → DotsVertical-C9TpfjSq.js} +1 -1
- package/dist/client/assets/{Download01-D8lTpA1-.js → Download01-TaBKKGTy.js} +1 -1
- package/dist/client/assets/{Edit01-olXvAtAZ.js → Edit01-BE5Wu5ID.js} +1 -1
- package/dist/client/assets/{Edit05-vNRWQV-M.js → Edit05-CHAqfRrN.js} +1 -1
- package/dist/client/assets/{Eye-DQ2cNQ7_.js → Eye-CmzbjCht.js} +1 -1
- package/dist/client/assets/{File02-o3tqw3TU.js → File02-DDGW2KdF.js} +1 -1
- package/dist/client/assets/{File06-CHaNuqmq.js → File06-u0e892jj.js} +1 -1
- package/dist/client/assets/{FilterLines-hoXV8gL3.js → FilterLines-peoUm3Kp.js} +1 -1
- package/dist/client/assets/{Globe01-DGfi10DG.js → Globe01-CttWHoLh.js} +1 -1
- package/dist/client/assets/{Globe02-2YlWazS5.js → Globe02-BaK8gLi7.js} +1 -1
- package/dist/client/assets/{Grid01-41ZWwZ8C.js → Grid01-MfVmgqVA.js} +1 -1
- package/dist/client/assets/{Hash02-CY2safPs.js → Hash02-BBdDXKgB.js} +1 -1
- package/dist/client/assets/{Home02-3xprgDGx.js → Home02-CD_MJrmZ.js} +1 -1
- package/dist/client/assets/{Image01-D8nsgOa4.js → Image01-NW_uhHHO.js} +1 -1
- package/dist/client/assets/{Inbox01-DreXa4ow.js → Inbox01-DUegC4zX.js} +1 -1
- package/dist/client/assets/{InfoCircle-DWkOumoB.js → InfoCircle-BdKgGvOW.js} +1 -1
- package/dist/client/assets/{Key01-DsUMZZb4.js → Key01-VhvVpwde.js} +1 -1
- package/dist/client/assets/{LayersTwo01-CozGeYpA.js → LayersTwo01-DY3gWhYo.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BxnBHF6O.js → LayoutLeft-CTT2u70-.js} +1 -1
- package/dist/client/assets/{Link01-BW7OJP9H.js → Link01-Bm8fkbw8.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B9scdF6U.js → LinkExternal01-D38J8WFf.js} +1 -1
- package/dist/client/assets/{List-BWlMAKKi.js → List-DBox7Fud.js} +1 -1
- package/dist/client/assets/{Loading01-DwU5xHXm.js → Loading01-DoI38kJv.js} +1 -1
- package/dist/client/assets/{Lock01-Culpb3mN.js → Lock01-BpzLUKPy.js} +1 -1
- package/dist/client/assets/{Play-DuD9KGGY.js → Play-Cff6s-Do.js} +1 -1
- package/dist/client/assets/{Plus-Dhm20gcZ.js → Plus-vjPXrbll.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-CKrNRsn6.js → RefreshCcw01-C1dtrtd7.js} +1 -1
- package/dist/client/assets/{Save01-CSAj2bS1.js → Save01-DrnHDSfN.js} +1 -1
- package/dist/client/assets/{SearchMd-DwqVVEmk.js → SearchMd-BpeHWO8y.js} +1 -1
- package/dist/client/assets/{Settings01-DL_2jKIF.js → Settings01-C_OWZaLW.js} +1 -1
- package/dist/client/assets/{Shield01-BNl_AxVr.js → Shield01-Blnh5_zF.js} +1 -1
- package/dist/client/assets/{Terminal-BxC2jtAF.js → Terminal-CUOLHPPn.js} +1 -1
- package/dist/client/assets/{Trash01-CleP0qGT.js → Trash01-Bfnjcg6w.js} +1 -1
- package/dist/client/assets/{Upload01-Bpm7zuzQ.js → Upload01-DA4ZJJnb.js} +1 -1
- package/dist/client/assets/{Users03-BKRGqc64.js → Users03-CiI7Y2pI.js} +1 -1
- package/dist/client/assets/{X-BkXzJkvJ.js → X-LrH2dki2.js} +1 -1
- package/dist/client/assets/{XCircle-CQ0cwRmR.js → XCircle-KlbMEvQq.js} +1 -1
- package/dist/client/assets/{XClose-d8Jjie9z.js → XClose-T4dQr9IP.js} +1 -1
- package/dist/client/assets/{Zap-BTobxj-V.js → Zap-Cx7CJpzQ.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-DAX-YxCn.js → agent-connections-preview-99IZ2JVi.js} +1 -1
- package/dist/client/assets/{agent-detail-Dd9g04cA.js → agent-detail-CQafIKIf.js} +1 -1
- package/dist/client/assets/{agents-BFg1anO6.js → agents-BBhRTRP7.js} +1 -1
- package/dist/client/assets/{alert-dialog-CR2Y_gWg.js → alert-dialog-ZI_d17Kf.js} +1 -1
- package/dist/client/assets/{auth-catchall-3qDVsVQ3.js → auth-catchall-B_kUtzsk.js} +1 -1
- package/dist/client/assets/{avatar-D_V-3wap.js → avatar-DMHAVN2G.js} +1 -1
- package/dist/client/assets/{badge-BsrlHJ_x.js → badge-ChDtoe7k.js} +1 -1
- package/dist/client/assets/{binder-B2J3jrRf.js → binder-BSp18fmP.js} +1 -1
- package/dist/client/assets/{breadcrumb-oFROyAn_.js → breadcrumb-DBcowLTl.js} +1 -1
- package/dist/client/assets/{card-EygHFK51.js → card-ChLHZaFH.js} +1 -1
- package/dist/client/assets/{chart-Bmnx76NN.js → chart-DOQ1KDh7.js} +1 -1
- package/dist/client/assets/{checkbox-CvzFKjZ3.js → checkbox-D_aK0Mdh.js} +1 -1
- package/dist/client/assets/{circle-alert-jB_R9VIQ.js → circle-alert-BHkFRl9i.js} +1 -1
- package/dist/client/assets/{collapsible-lu3Iy-S0.js → collapsible-CtdNMvGE.js} +1 -1
- package/dist/client/assets/{collection-detail-Bt1GArvb.js → collection-detail-CmmN6I8A.js} +1 -1
- package/dist/client/assets/{collection-display-button-YC_aXzYK.js → collection-display-button-Bv7DhR9w.js} +1 -1
- package/dist/client/assets/{collection-search-BdCpnSfc.js → collection-search-DnArRJMW.js} +1 -1
- package/dist/client/assets/{collection-tab-C2v1k0qS.js → collection-tab-CC0q_OnK.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DhJA7hQ9.js → collection-table-wrapper-CEwU2e2W.js} +1 -1
- package/dist/client/assets/{collection-tabs-CioUgcWn.js → collection-tabs-CZLvOfkH.js} +1 -1
- package/dist/client/assets/{command-Dr9ELOIm.js → command-DLB128Pb.js} +1 -1
- package/dist/client/assets/{connect-DvWhgY7R.js → connect-CI9IzyBL.js} +1 -1
- package/dist/client/assets/{connection-card-uFTSOaWH.js → connection-card-ByscPAIj.js} +1 -1
- package/dist/client/assets/{connection-detail-C1eD5ISP.js → connection-detail-uL7h2miw.js} +1 -1
- package/dist/client/assets/{connection-status-CUgTWSPZ.js → connection-status-BLpLQzSg.js} +1 -1
- package/dist/client/assets/{connections-Da_AzXLe.js → connections-DMFM3gUy.js} +1 -1
- package/dist/client/assets/constants-CUyJcaN8.js +1 -0
- package/dist/client/assets/{constants-CJKNcVO0.js → constants-OpiJAgZI.js} +1 -1
- package/dist/client/assets/{context-iluKjV89.js → context-7Kd5bp6X.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BiPFmP0t.js → create-organization-dialog-BneQWVKs.js} +1 -1
- package/dist/client/assets/{create-project-dialog-CZRaXDOF.js → create-project-dialog-DcUDVcZj.js} +1 -1
- package/dist/client/assets/{danger-CS7q8T7g.js → danger-DbvicEY-.js} +1 -1
- package/dist/client/assets/{danger-zone-Arlo0D2G.js → danger-zone-CsqhCbO1.js} +1 -1
- package/dist/client/assets/{decopilot-events-C1rn4nxl.js → decopilot-events-BAhRgxLp.js} +1 -1
- package/dist/client/assets/{dependencies-C1u7sWiw.js → dependencies-Ds_GH7yM.js} +1 -1
- package/dist/client/assets/{dialog-De2kjp-7.js → dialog-DXMtLbOt.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CBXVfpi8.js → dropdown-menu-Bv41z45k.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-D7aWriCh.js → dynamic-plugin-layout-CA3PBJG1.js} +1 -1
- package/dist/client/assets/{editable-task-title-Dw21XHnW.js → editable-task-title-BUHTazHh.js} +1 -1
- package/dist/client/assets/{empty-state-CCFoZ2I0.js → empty-state-D2gP2QeK.js} +1 -1
- package/dist/client/assets/{env-vars-editor-QlY_vLwo.js → env-vars-editor-DXU1-vnq.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Drlb76Zi.js → extract-connection-data-CYsp_UMA.js} +1 -1
- package/dist/client/assets/{file-browser-CgJoRnNX.js → file-browser-DkGVcDoL.js} +2 -2
- package/dist/client/assets/{form-Do17Zmtj.js → form-Ndm9rRCe.js} +1 -1
- package/dist/client/assets/{general-BNTVDu8S.js → general-opBI2uJ9.js} +1 -1
- package/dist/client/assets/{grid-view-C25yp3XL.js → grid-view-CSu6RixN.js} +1 -1
- package/dist/client/assets/{home-CugPrCQk.js → home-B8vvircu.js} +1 -1
- package/dist/client/assets/{icon-picker-BRAO_6f7.js → icon-picker-8kNIyP1o.js} +1 -1
- package/dist/client/assets/{index-BWWyL373.js → index-BUZqKnhc.js} +1 -1
- package/dist/client/assets/{index-CWkZVTaB.js → index-C_qyq-0C.js} +1 -1
- package/dist/client/assets/{index-CkH3mWvs.js → index-CzhqcVNy.js} +3 -3
- package/dist/client/assets/{index-Bd2o7ApL.js → index-D0IWyB7F.js} +1 -1
- package/dist/client/assets/{index-BcCLyj5B.js → index-Dq7847Un.js} +1 -1
- package/dist/client/assets/{index-DYwRYhsj.js → index-DvM0KkHv.js} +1 -1
- package/dist/client/assets/{index-DJbhPUvH.js → index-NVV58uyB.js} +1 -1
- package/dist/client/assets/{index-DJaJOTT1.js → index-reo4wb4o.js} +1 -1
- package/dist/client/assets/{index-B-OdNlE7.js → index-u3QgiiTa.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DAaNXBsl.js → infiniteQueryObserver-B0sfe0Pc.js} +1 -1
- package/dist/client/assets/{input-Byroc8t4.js → input-CaHgq6JC.js} +1 -1
- package/dist/client/assets/{integration-icon-mwS0bnEH.js → integration-icon-C_O5yvdg.js} +1 -1
- package/dist/client/assets/{label-D4oI89DS.js → label-ZRpbI7Sm.js} +1 -1
- package/dist/client/assets/{layout-DoVjZIrn.js → layout-Di7S7mGF.js} +1 -1
- package/dist/client/assets/{layout-DDl2Bvjj.js → layout-_gy6ZrEk.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DueMZIFu.js → localstorage-keys-CL6qU9e5.js} +1 -1
- package/dist/client/assets/{login-l7LPfl41.js → login-DzHv8Qa0.js} +1 -1
- package/dist/client/assets/{markdown-C5HDJBhu.js → markdown-CjmEcbPS.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CcbaBTO3.js → mcp-app-renderer-DjshzOV0.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DMYKZy5B.js → mcp-server-card-CbhtCiCR.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-CaijVFsh.js → mcp-server-detail-Dm6C4rJd.js} +2 -2
- package/dist/client/assets/{members-DHOUb6ci.js → members-D0WpzrAD.js} +1 -1
- package/dist/client/assets/{monaco-editor-BQLItIWK.js → monaco-editor-860lh9IG.js} +1 -1
- package/dist/client/assets/{monitoring-Dts7enDX.js → monitoring-B8ASHaBh.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-BpdxPDCL.js → monitoring-dashboard-edit-CKffDTQw.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-9-ODb2Fv.js → monitoring-dashboard-view-C1XkuilW.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dz0IDrwc.js → oauth-callback-CsPyZ3bv.js} +1 -1
- package/dist/client/assets/{page-B20oyWAL.js → page-BGclLydc.js} +1 -1
- package/dist/client/assets/{page-COrqn5gB.js → page-BWVa1qSI.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-BFvuO_ih.js → plugin-empty-state-BXMB-ve6.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-amtzTfj5.js → plugin-empty-state-aV5T7nJZ.js} +1 -1
- package/dist/client/assets/{plugin-header-Ck-AR7F4.js → plugin-header-CMg87EDN.js} +1 -1
- package/dist/client/assets/{plugin-header-BBKvfeNU.js → plugin-header-DorQWEZ4.js} +1 -1
- package/dist/client/assets/plugins-BYjlWQ4G.js +1 -0
- package/dist/client/assets/{popover-abKtRKyZ.js → popover-DMD8_Cbp.js} +1 -1
- package/dist/client/assets/{project-app-view-4HfAYNAZ.js → project-app-view-BucEC3T-.js} +1 -1
- package/dist/client/assets/{project-layout-CabGF5OL.js → project-layout-DdxzQdxw.js} +1 -1
- package/dist/client/assets/{project-plugins-Cj7LCQq3.js → project-plugins-FyEUKPb1.js} +1 -1
- package/dist/client/assets/{projects-list-BGSS1A6G.js → projects-list-lWISZLY6.js} +1 -1
- package/dist/client/assets/{readme-viewer-CZC-Af79.js → readme-viewer-BRyijqWE.js} +1 -1
- package/dist/client/assets/{registry-layout-1no55Xfs.js → registry-layout-A5khdaYw.js} +1 -1
- package/dist/client/assets/{registry-utils-BKh1htsU.js → registry-utils-sGbNqghw.js} +1 -1
- package/dist/client/assets/{reports-layout-ClnQzTBD.js → reports-layout-Ds-X2DgZ.js} +1 -1
- package/dist/client/assets/{reset-password-_UXSoKqO.js → reset-password-DUyo7dJf.js} +1 -1
- package/dist/client/assets/{resizable-CRr1U4c3.js → resizable-DLaWW8z1.js} +1 -1
- package/dist/client/assets/{save-actions-DIgvk5ux.js → save-actions-KKLUna-U.js} +1 -1
- package/dist/client/assets/{scroll-area-CW7MZrxV.js → scroll-area-uvPGOSmX.js} +1 -1
- package/dist/client/assets/{select-CHbDIpjW.js → select-DhCocnGM.js} +1 -1
- package/dist/client/assets/{shell-layout-BcxWQVeI.js → shell-layout-CUgayftW.js} +2 -2
- package/dist/client/assets/{sidebar-settings-Bcsu8-RD.js → sidebar-settings-DWw0y5k_.js} +1 -1
- package/dist/client/assets/{skeleton-BnHZ2SKu.js → skeleton-LSt15V1C.js} +1 -1
- package/dist/client/assets/{spinner-BA1OKCJn.js → spinner-CI9QBd79.js} +1 -1
- package/dist/client/assets/{store-invite-igZB1w5t.js → store-invite-CFRAOscU.js} +1 -1
- package/dist/client/assets/{switch-CEp85hk1.js → switch-CsOlnIJv.js} +1 -1
- package/dist/client/assets/{table-FycIVL0n.js → table-xcvICYfC.js} +1 -1
- package/dist/client/assets/{tabs-eovXpXHz.js → tabs-d2vBhIp6.js} +1 -1
- package/dist/client/assets/tasks-CoQZ2sIy.js +1 -0
- package/dist/client/assets/{tasks-panel-BvevXbhl.js → tasks-panel-bZwhdQBY.js} +1 -1
- package/dist/client/assets/{textarea-xLi2sLqg.js → textarea-CqsgYI_z.js} +1 -1
- package/dist/client/assets/{time-range-picker-BlOSKVgs.js → time-range-picker-CnM7cuGo.js} +1 -1
- package/dist/client/assets/{toggle-group-CaTS_Qlx.js → toggle-group-BrCJ8OSl.js} +1 -1
- package/dist/client/assets/{tools-list-DtBpx3vZ.js → tools-list-BJgQvAAh.js} +1 -1
- package/dist/client/assets/{tooltip-BgxYg-1x.js → tooltip-B-2Ty_iR.js} +1 -1
- package/dist/client/assets/{topbar-portal-CSUXfJuZ.js → topbar-portal-CVzUAi-D.js} +1 -1
- package/dist/client/assets/{types-DtFKQumZ.js → types-DiJR_Oxi.js} +1 -1
- package/dist/client/assets/{use-binding-BakZcpgb.js → use-binding-CHcWA4CU.js} +1 -1
- package/dist/client/assets/{use-collections-Dn1-4HmN.js → use-collections-C8v6HwyA.js} +1 -1
- package/dist/client/assets/{use-connection-lSmwmnH7.js → use-connection-CkLGBugg.js} +1 -1
- package/dist/client/assets/{use-copy-Bomw0PO-.js → use-copy-BNKFNH2y.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BCc2b51u.js → use-create-virtual-mcp-BvTxfE8g.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-DNLztiY9.js → use-install-from-registry-rEwcMxvA.js} +1 -1
- package/dist/client/assets/{use-list-state-DsP3P__2.js → use-list-state-Dt9uCsOl.js} +1 -1
- package/dist/client/assets/{use-llm-CaWI-EbM.js → use-llm-CfPWCeJ7.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DgbJlfFv.js → use-mcp-prompts-DJolbe2G.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DnT4wYwM.js → use-mcp-tools-_SrEx2Yc.js} +1 -1
- package/dist/client/assets/{use-members-BeqtA6Mf.js → use-members-Bg7suFno.js} +1 -1
- package/dist/client/assets/{use-mobile-DvJypPyV.js → use-mobile-Ccj9Yl8E.js} +1 -1
- package/dist/client/assets/{use-preferences-BtbUN2Ab.js → use-preferences-CBTWTfUK.js} +1 -1
- package/dist/client/assets/{use-project-C6Plluwk.js → use-project-O2tBNyfQ.js} +1 -1
- package/dist/client/assets/{use-settings-modal-BYuaItl2.js → use-settings-modal-Cb5fjZOk.js} +1 -1
- package/dist/client/assets/{use-view-mode-DlkH6B2z.js → use-view-mode-DltmabmA.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Cd9Q7Ljj.js → use-virtual-mcp-CelTUOdD.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-7fuF9QDV.js +1 -0
- package/dist/client/assets/{useMutation-T3cHavFN.js → useMutation-BLMqKfMt.js} +1 -1
- package/dist/client/assets/useQuery-BtUsJRrm.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BB0K0DXv.js +1 -0
- package/dist/client/assets/{user-CVY-7wwJ.js → user-BIDniHYV.js} +1 -1
- package/dist/client/assets/{workflow-JfVjNsvD.js → workflow-BPBBOx7S.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/constants-8yG-REbY.js +0 -1
- package/dist/client/assets/plugins-BL4zfVGs.js +0 -1
- package/dist/client/assets/tasks-zO_D9agi.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DlMqKbZ8.js +0 -1
- package/dist/client/assets/useQuery-CrhfJFci.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D7mXok6B.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as V,n as K,c as Q,u as Y,w as Z,O as H,q as W,t as X,j as n,K as U,x as ee}from"./index-
|
|
1
|
+
import{o as V,n as K,c as Q,u as Y,w as Z,O as H,q as W,t as X,j as n,K as U,x as ee}from"./index-CzhqcVNy.js";import{u as ne}from"./useMutation-BLMqKfMt.js";import{a as oe,u as te}from"./constants-OpiJAgZI.js";import{I as $}from"./input-CaHgq6JC.js";import{T as re}from"./textarea-CqsgYI_z.js";import{F as L,d as B,a as se,b as O,c as A,e as z,f as k}from"./form-Ndm9rRCe.js";import{D as le}from"./danger-zone-CsqhCbO1.js";import"./label-ZRpbI7Sm.js";import"./alert-dialog-ZI_d17Kf.js";const ie=V({name:K().min(1,"Name is required").max(200,"Name is too long"),description:K().max(1e3,"Description is too long").nullable(),themeColor:K().nullable()});function ae(){const e=Q.c(63),{org:r,project:o}=Y(),y=Z(),P=o.slug===H;let v;e[0]!==r.id?(v={connectionId:oe,orgId:r.id},e[0]=r.id,e[1]=v):v=e[1];const G=te(v);let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=W(ie),e[2]=S):S=e[2];const M=o.name??"",q=o.description??"",R=o.ui?.themeColor??"#60a5fa";let F;e[3]!==M||e[4]!==q||e[5]!==R?(F={resolver:S,values:{name:M,description:q,themeColor:R}},e[3]=M,e[4]=q,e[5]=R,e[6]=F):F=e[6];const t=X(F);let c;e[7]!==G||e[8]!==o.id||e[9]!==o.ui?.banner||e[10]!==o.ui?.bannerColor||e[11]!==o.ui?.icon?(c=async l=>{const s=await G.callTool({name:"PROJECT_UPDATE",arguments:{projectId:o.id,name:l.name,description:l.description||null,ui:{themeColor:l.themeColor||null,banner:o.ui?.banner??null,bannerColor:o.ui?.bannerColor??null,icon:o.ui?.icon??null}}});return s.structuredContent??s},e[7]=G,e[8]=o.id,e[9]=o.ui?.banner,e[10]=o.ui?.bannerColor,e[11]=o.ui?.icon,e[12]=c):c=e[12];let d;e[13]!==t||e[14]!==r.id||e[15]!==o.slug||e[16]!==y?(d=()=>{y.invalidateQueries({queryKey:U.project(r.id,o.slug)}),y.invalidateQueries({queryKey:U.projects(r.id)}),t.reset(t.getValues())},e[13]=t,e[14]=r.id,e[15]=o.slug,e[16]=y,e[17]=d):d=e[17];let N;e[18]!==c||e[19]!==d?(N={mutationFn:c,onSuccess:d,onError:ce},e[18]=c,e[19]=d,e[20]=N):N=e[20];const i=ne(N);let E;e[21]!==i?(E=async l=>{await i.mutateAsync(l)},e[21]=i,e[22]=E):E=e[22];const m=E;let I;e[23]!==t||e[24]!==m?(I=l=>{l(),t.handleSubmit(m)()},e[23]=t,e[24]=m,e[25]=I):I=e[25];const a=I;let u;e[26]!==t||e[27]!==m?(u=t.handleSubmit(m),e[26]=t,e[27]=m,e[28]=u):u=e[28];let f;e[29]!==P||e[30]!==i.isPending||e[31]!==a?(f=l=>{const{field:s}=l;return n.jsxs(O,{children:[n.jsx(A,{children:"Project Name"}),n.jsx(B,{children:n.jsx($,{placeholder:"My Project",...s,onBlur:()=>a(s.onBlur),disabled:P||i.isPending})}),P&&n.jsx(z,{children:"The organization admin project name cannot be changed."}),n.jsx(k,{})]})},e[29]=P,e[30]=i.isPending,e[31]=a,e[32]=f):f=e[32];let x;e[33]!==t.control||e[34]!==f?(x=n.jsx(L,{control:t.control,name:"name",render:f}),e[33]=t.control,e[34]=f,e[35]=x):x=e[35];let D;e[36]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(A,{children:"Slug"}),e[36]=D):D=e[36];let j;e[37]!==o.slug?(j=n.jsx(B,{children:n.jsx($,{value:o.slug,disabled:!0,className:"bg-muted"})}),e[37]=o.slug,e[38]=j):j=e[38];let T;e[39]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(z,{children:"The project slug cannot be changed after creation."}),e[39]=T):T=e[39];let p;e[40]!==j?(p=n.jsxs(O,{children:[D,j,T]}),e[40]=j,e[41]=p):p=e[41];let h;e[42]!==i.isPending||e[43]!==a?(h=l=>{const{field:s}=l;return n.jsxs(O,{children:[n.jsx(A,{children:"Description"}),n.jsx(B,{children:n.jsx(re,{placeholder:"Optional project description...",rows:3,...s,value:s.value??"",onBlur:()=>a(s.onBlur),disabled:i.isPending})}),n.jsx(k,{})]})},e[42]=i.isPending,e[43]=a,e[44]=h):h=e[44];let g;e[45]!==t.control||e[46]!==h?(g=n.jsx(L,{control:t.control,name:"description",render:h}),e[45]=t.control,e[46]=h,e[47]=g):g=e[47];let b;e[48]!==i.isPending||e[49]!==a?(b=l=>{const{field:s}=l;return n.jsxs(O,{children:[n.jsx(A,{children:"Color"}),n.jsx(B,{children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:s.value??"#60a5fa"},children:n.jsx("input",{type:"color",value:s.value??"#60a5fa",onChange:J=>s.onChange(J.target.value),onBlur:()=>a(s.onBlur),disabled:i.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),n.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:s.value??"#60a5fa"})]})}),n.jsx(k,{})]})},e[48]=i.isPending,e[49]=a,e[50]=b):b=e[50];let C;e[51]!==t.control||e[52]!==b?(C=n.jsx(L,{control:t.control,name:"themeColor",render:b}),e[51]=t.control,e[52]=b,e[53]=C):C=e[53];let _;e[54]!==u||e[55]!==x||e[56]!==p||e[57]!==g||e[58]!==C?(_=n.jsxs("form",{onSubmit:u,className:"space-y-6",children:[x,p,g,C]}),e[54]=u,e[55]=x,e[56]=p,e[57]=g,e[58]=C,e[59]=_):_=e[59];let w;return e[60]!==t||e[61]!==_?(w=n.jsx("div",{className:"flex flex-col",children:n.jsx(se,{...t,children:_})}),e[60]=t,e[61]=_,e[62]=w):w=e[62],w}function ce(e){ee.error("Failed to update project: "+(e instanceof Error?e.message:"Unknown error"))}function de(){const e=Q.c(2);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),e[0]=r):r=e[0];let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs("div",{className:"flex flex-col",children:[r,n.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[n.jsx(ae,{}),n.jsx(le,{})]})]}),e[1]=o):o=e[1],o}function Ce(){const e=Q.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(de,{}),e[0]=r):r=e[0],r}export{Ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,c as M,z as L,j as s,w as q,x as w,B as E,ar as H}from"./index-CkH3mWvs.js";import{u as D}from"./topbar-portal-CSUXfJuZ.js";import{K as R,u as Z,g as I,s as Q,a as W,f as U}from"./file-browser-CgJoRnNX.js";import{i as S}from"./AlertCircle-7lB7fro0.js";import{n as A}from"./Download01-D8lTpA1-.js";import{i as $}from"./File02-o3tqw3TU.js";import{i as J}from"./File06-CHaNuqmq.js";import{a as P}from"./Image01-D8nsgOa4.js";import{i as T}from"./Loading01-DwU5xHXm.js";import{s as V}from"./Trash01-CleP0qGT.js";import{i as Y}from"./Upload01-Bpm7zuzQ.js";import{u as _}from"./useMutation-T3cHavFN.js";import{u as X}from"./useQuery-CrhfJFci.js";import"./useInfiniteQuery-DlMqKbZ8.js";import"./infiniteQueryObserver-DAaNXBsl.js";import"./checkbox-CvzFKjZ3.js";import"./Check-Cvo-Mj0S.js";import"./ChevronRight-B4xXvXUl.js";import"./Grid01-41ZWwZ8C.js";import"./Home02-3xprgDGx.js";import"./List-BWlMAKKi.js";const B=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 8 15.04 8 15.6 8h4.13M20 9.988V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));B.displayName="File04";const G=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M8 15v3m8-5v5m-4-7.5V18m8-8.012V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));G.displayName="File07";const K=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M14 17.5l2.5-2.5-2.5-2.5m-4 0L7.5 15l2.5 2.5m10-7.512V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));K.displayName="FileCode01";const O=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M22 8.931c0-.605 0-.908-.12-1.049a.5.5 0 0 0-.42-.173c-.183.014-.397.228-.826.657L17 12l3.634 3.634c.429.429.643.643.827.657a.5.5 0 0 0 .42-.173c.119-.14.119-.444.119-1.05V8.932ZM2 9.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 5 5.12 5 6.8 5h5.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C17 7.28 17 8.12 17 9.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C14.72 19 13.88 19 12.2 19H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 16.72 2 15.88 2 14.2V9.8Z"}));O.displayName="VideoRecorder";function ee(i){const e=M.c(5),[t,g]=v.useState(!1),c=v.useRef(null),d=v.useRef(!1);let n;e[0]!==i?(n=u=>{c.current&&(c.current.disconnect(),c.current=null),u&&!d.current&&(c.current=new IntersectionObserver(y=>{const[a]=y;a?.isIntersecting&&!d.current&&(d.current=!0,g(!0),c.current?.disconnect(),c.current=null)},i),c.current.observe(u))},e[0]=i,e[1]=n):n=e[1];const l=n;let h;return e[2]!==t||e[3]!==l?(h=[t,l],e[2]=t,e[3]=l,e[4]=h):h=e[4],h}function te(i){const e=M.c(24),{objectKey:t,alt:g,className:c}=i,d=c===void 0?"":c,{connectionId:n,toolCaller:l}=D();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={rootMargin:"100px",threshold:0},e[0]=h):h=e[0];const[u,y]=ee(h);let a;e[1]!==n||e[2]!==t?(a=R.imagePreview(n,t),e[1]=n,e[2]=t,e[3]=a):a=e[3];let f;e[4]!==t||e[5]!==l?(f=async()=>{const{url:m}=await l("GET_PRESIGNED_URL",{key:t});return m},e[4]=t,e[5]=l,e[6]=f):f=e[6];let k;e[7]!==u||e[8]!==a||e[9]!==f?(k={queryKey:a,queryFn:f,enabled:u,staleTime:3e5,gcTime:6e5},e[7]=u,e[8]=a,e[9]=f,e[10]=k):k=e[10];const{data:b,isLoading:x,error:j}=X(k);let p;e[11]!==d?(p=L("relative w-full h-full flex items-center justify-center overflow-hidden",d),e[11]=d,e[12]=p):p=e[12];let r;e[13]!==g||e[14]!==j||e[15]!==b||e[16]!==x||e[17]!==u||e[18]!==t?(r=!u||x?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:x?s.jsx(T,{size:24,className:"animate-spin"}):s.jsx(P,{size:48})}):j?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:s.jsx(S,{size:24})}):b?s.jsx("img",{src:b,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[13]=g,e[14]=j,e[15]=b,e[16]=x,e[17]=u,e[18]=t,e[19]=r):r=e[19];let o;return e[20]!==y||e[21]!==p||e[22]!==r?(o=s.jsx("div",{ref:y,className:p,children:r}),e[20]=y,e[21]=p,e[22]=r,e[23]=o):o=e[23],o}const z=12,se={Image01:P,VideoRecorder:O,Music01:$,File02:$,File04:B,File06:J,File07:G,FileCode01:K,Folder:H};function re(i){const e=i.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico"].includes(e||"")}function oe(i){const e=M.c(41),{item:t,onNavigate:g,onDownload:c,onDelete:d}=i;let n;e[0]!==t.key?(n=I(t.key),e[0]=t.key,e[1]=n):n=e[1];const l=n,h=t.isFolder?"Folder":W(t.key),u=se[h]||$;let y;e[2]!==t.isFolder||e[3]!==t.key?(y=!t.isFolder&&re(t.key),e[2]=t.isFolder,e[3]=t.key,e[4]=y):y=e[4];const a=y;let f;e[5]!==t.isFolder||e[6]!==t.key||e[7]!==g?(f=()=>t.isFolder?g(t.key):void 0,e[5]=t.isFolder,e[6]=t.key,e[7]=g,e[8]=f):f=e[8];const k=!a&&"p-4",b=t.isFolder?"cursor-pointer":"cursor-default";let x;e[9]!==k||e[10]!==b?(x=L("flex flex-col items-center justify-center w-full h-full",k,b),e[9]=k,e[10]=b,e[11]=x):x=e[11];let j;e[12]!==u||e[13]!==a||e[14]!==t.isFolder||e[15]!==t.key||e[16]!==l?(j=a?s.jsx("div",{className:"absolute inset-0",children:s.jsx(te,{objectKey:t.key,alt:l})}):s.jsx(u,{size:48,className:L(t.isFolder?"text-amber-500":"text-muted-foreground")}),e[12]=u,e[13]=a,e[14]=t.isFolder,e[15]=t.key,e[16]=l,e[17]=j):j=e[17];let p;e[18]!==a||e[19]!==t.isFolder||e[20]!==t.size||e[21]!==l?(p=a?s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2 pt-6",children:[s.jsx("span",{className:"text-sm text-white text-center line-clamp-1 block",children:l}),s.jsx("span",{className:"text-xs text-white/70 text-center block",children:U(t.size)})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"mt-3 text-sm text-center line-clamp-2 px-2",children:l}),!t.isFolder&&s.jsx("span",{className:"mt-1 text-xs text-muted-foreground",children:U(t.size)})]}),e[18]=a,e[19]=t.isFolder,e[20]=t.size,e[21]=l,e[22]=p):p=e[22];let r;e[23]!==f||e[24]!==x||e[25]!==j||e[26]!==p?(r=s.jsxs("button",{type:"button",onClick:f,className:x,children:[j,p]}),e[23]=f,e[24]=x,e[25]=j,e[26]=p,e[27]=r):r=e[27];let o;e[28]!==t.isFolder||e[29]!==t.key||e[30]!==d||e[31]!==c?(o=!t.isFolder&&s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0",onClick:F=>{F.stopPropagation(),c(t.key)},children:s.jsx(A,{size:14})}),s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})]}),e[28]=t.isFolder,e[29]=t.key,e[30]=d,e[31]=c,e[32]=o):o=e[32];let m;e[33]!==t.isFolder||e[34]!==t.key||e[35]!==d?(m=t.isFolder&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})}),e[33]=t.isFolder,e[34]=t.key,e[35]=d,e[36]=m):m=e[36];let N;return e[37]!==o||e[38]!==m||e[39]!==r?(N=s.jsxs("div",{className:"group relative aspect-square bg-muted/30 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/50 transition-colors overflow-hidden",children:[r,o,m]}),e[37]=o,e[38]=m,e[39]=r,e[40]=N):N=e[40],N}function we({prefix:i,flat:e,onNavigate:t}){const g=v.useRef(null),c=q(),{connectionId:d,toolCaller:n}=D(),{objects:l,isLoading:h,isFetchingMore:u,hasMore:y,loadMore:a,error:f}=Z({prefix:i,flat:e,pageSize:z}),k=_({mutationFn:async r=>{const o=i+r.name,{url:m}=await n("PUT_PRESIGNED_URL",{key:o,contentType:r.type||"application/octet-stream"}),N=await fetch(m,{method:"PUT",body:r,headers:{"Content-Type":r.type||"application/octet-stream"}});if(!N.ok)throw new Error(`Upload failed: ${N.statusText}`);return o},onSuccess:r=>{w.success(`Uploaded ${I(r)}`),c.invalidateQueries({queryKey:R.objects(d,i,e,z)})},onError:r=>{w.error(`Upload failed: ${r.message}`)}}),b=_({mutationFn:async r=>r.length===1&&r[0]?n("DELETE_OBJECT",{key:r[0]}):n("DELETE_OBJECTS",{keys:r}),onSuccess:()=>{w.success("Deleted successfully"),c.invalidateQueries({queryKey:R.objects(d,i,e,z)})},onError:r=>{w.error(`Delete failed: ${r.message}`)}}),x=async r=>{try{const{url:o}=await n("GET_PRESIGNED_URL",{key:r}),m=await fetch(o);if(!m.ok)throw new Error(`Failed to fetch file: ${m.statusText}`);const N=await m.blob(),F=URL.createObjectURL(N),C=document.createElement("a");C.href=F,C.download=I(r),document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(F)}catch(o){w.error(`Download failed: ${o instanceof Error?o.message:"Unknown error"}`)}},j=r=>{const o=r.target.files;if(o){for(const m of Array.from(o))k.mutate(m);r.target.value=""}},p=r=>{if(!y||u)return;const o=r.currentTarget;o.scrollHeight-o.scrollTop-o.clientHeight<200&&a()};return f?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(S,{size:48,className:"text-destructive mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),s.jsx("p",{className:"text-muted-foreground text-center",children:f.message})]}):s.jsx("div",{className:"flex-1 overflow-y-auto p-4",onScroll:p,children:h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Q,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),s.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:j}),s.jsxs(E,{variant:"outline",onClick:()=>g.current?.click(),children:[s.jsx(Y,{size:14,className:"mr-1"}),"Upload files"]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:l.map(r=>s.jsx(oe,{item:r,onNavigate:t,onDownload:x,onDelete:o=>b.mutate([o])},r.key))}),u&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(T,{size:24,className:"animate-spin text-muted-foreground"})})]})})}export{we as default};
|
|
1
|
+
import{r as v,c as M,z as L,j as s,w as q,x as w,B as E,ar as H}from"./index-CzhqcVNy.js";import{u as D}from"./topbar-portal-CVzUAi-D.js";import{K as R,u as Z,g as I,s as Q,a as W,f as U}from"./file-browser-DkGVcDoL.js";import{i as S}from"./AlertCircle-CLSQ0NLi.js";import{n as A}from"./Download01-TaBKKGTy.js";import{i as $}from"./File02-DDGW2KdF.js";import{i as J}from"./File06-u0e892jj.js";import{a as P}from"./Image01-NW_uhHHO.js";import{i as T}from"./Loading01-DoI38kJv.js";import{s as V}from"./Trash01-Bfnjcg6w.js";import{i as Y}from"./Upload01-DA4ZJJnb.js";import{u as _}from"./useMutation-BLMqKfMt.js";import{u as X}from"./useQuery-BtUsJRrm.js";import"./useInfiniteQuery-7fuF9QDV.js";import"./infiniteQueryObserver-B0sfe0Pc.js";import"./checkbox-D_aK0Mdh.js";import"./Check-D30Nw_2C.js";import"./ChevronRight-BJe7e-X2.js";import"./Grid01-MfVmgqVA.js";import"./Home02-CD_MJrmZ.js";import"./List-DBox7Fud.js";const B=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 8 15.04 8 15.6 8h4.13M20 9.988V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));B.displayName="File04";const G=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M8 15v3m8-5v5m-4-7.5V18m8-8.012V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));G.displayName="File07";const K=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M14 17.5l2.5-2.5-2.5-2.5m-4 0L7.5 15l2.5 2.5m10-7.512V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));K.displayName="FileCode01";const O=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M22 8.931c0-.605 0-.908-.12-1.049a.5.5 0 0 0-.42-.173c-.183.014-.397.228-.826.657L17 12l3.634 3.634c.429.429.643.643.827.657a.5.5 0 0 0 .42-.173c.119-.14.119-.444.119-1.05V8.932ZM2 9.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 5 5.12 5 6.8 5h5.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C17 7.28 17 8.12 17 9.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C14.72 19 13.88 19 12.2 19H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 16.72 2 15.88 2 14.2V9.8Z"}));O.displayName="VideoRecorder";function ee(i){const e=M.c(5),[t,g]=v.useState(!1),c=v.useRef(null),d=v.useRef(!1);let n;e[0]!==i?(n=u=>{c.current&&(c.current.disconnect(),c.current=null),u&&!d.current&&(c.current=new IntersectionObserver(y=>{const[a]=y;a?.isIntersecting&&!d.current&&(d.current=!0,g(!0),c.current?.disconnect(),c.current=null)},i),c.current.observe(u))},e[0]=i,e[1]=n):n=e[1];const l=n;let h;return e[2]!==t||e[3]!==l?(h=[t,l],e[2]=t,e[3]=l,e[4]=h):h=e[4],h}function te(i){const e=M.c(24),{objectKey:t,alt:g,className:c}=i,d=c===void 0?"":c,{connectionId:n,toolCaller:l}=D();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={rootMargin:"100px",threshold:0},e[0]=h):h=e[0];const[u,y]=ee(h);let a;e[1]!==n||e[2]!==t?(a=R.imagePreview(n,t),e[1]=n,e[2]=t,e[3]=a):a=e[3];let f;e[4]!==t||e[5]!==l?(f=async()=>{const{url:m}=await l("GET_PRESIGNED_URL",{key:t});return m},e[4]=t,e[5]=l,e[6]=f):f=e[6];let k;e[7]!==u||e[8]!==a||e[9]!==f?(k={queryKey:a,queryFn:f,enabled:u,staleTime:3e5,gcTime:6e5},e[7]=u,e[8]=a,e[9]=f,e[10]=k):k=e[10];const{data:b,isLoading:x,error:j}=X(k);let p;e[11]!==d?(p=L("relative w-full h-full flex items-center justify-center overflow-hidden",d),e[11]=d,e[12]=p):p=e[12];let r;e[13]!==g||e[14]!==j||e[15]!==b||e[16]!==x||e[17]!==u||e[18]!==t?(r=!u||x?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:x?s.jsx(T,{size:24,className:"animate-spin"}):s.jsx(P,{size:48})}):j?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:s.jsx(S,{size:24})}):b?s.jsx("img",{src:b,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[13]=g,e[14]=j,e[15]=b,e[16]=x,e[17]=u,e[18]=t,e[19]=r):r=e[19];let o;return e[20]!==y||e[21]!==p||e[22]!==r?(o=s.jsx("div",{ref:y,className:p,children:r}),e[20]=y,e[21]=p,e[22]=r,e[23]=o):o=e[23],o}const z=12,se={Image01:P,VideoRecorder:O,Music01:$,File02:$,File04:B,File06:J,File07:G,FileCode01:K,Folder:H};function re(i){const e=i.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico"].includes(e||"")}function oe(i){const e=M.c(41),{item:t,onNavigate:g,onDownload:c,onDelete:d}=i;let n;e[0]!==t.key?(n=I(t.key),e[0]=t.key,e[1]=n):n=e[1];const l=n,h=t.isFolder?"Folder":W(t.key),u=se[h]||$;let y;e[2]!==t.isFolder||e[3]!==t.key?(y=!t.isFolder&&re(t.key),e[2]=t.isFolder,e[3]=t.key,e[4]=y):y=e[4];const a=y;let f;e[5]!==t.isFolder||e[6]!==t.key||e[7]!==g?(f=()=>t.isFolder?g(t.key):void 0,e[5]=t.isFolder,e[6]=t.key,e[7]=g,e[8]=f):f=e[8];const k=!a&&"p-4",b=t.isFolder?"cursor-pointer":"cursor-default";let x;e[9]!==k||e[10]!==b?(x=L("flex flex-col items-center justify-center w-full h-full",k,b),e[9]=k,e[10]=b,e[11]=x):x=e[11];let j;e[12]!==u||e[13]!==a||e[14]!==t.isFolder||e[15]!==t.key||e[16]!==l?(j=a?s.jsx("div",{className:"absolute inset-0",children:s.jsx(te,{objectKey:t.key,alt:l})}):s.jsx(u,{size:48,className:L(t.isFolder?"text-amber-500":"text-muted-foreground")}),e[12]=u,e[13]=a,e[14]=t.isFolder,e[15]=t.key,e[16]=l,e[17]=j):j=e[17];let p;e[18]!==a||e[19]!==t.isFolder||e[20]!==t.size||e[21]!==l?(p=a?s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2 pt-6",children:[s.jsx("span",{className:"text-sm text-white text-center line-clamp-1 block",children:l}),s.jsx("span",{className:"text-xs text-white/70 text-center block",children:U(t.size)})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"mt-3 text-sm text-center line-clamp-2 px-2",children:l}),!t.isFolder&&s.jsx("span",{className:"mt-1 text-xs text-muted-foreground",children:U(t.size)})]}),e[18]=a,e[19]=t.isFolder,e[20]=t.size,e[21]=l,e[22]=p):p=e[22];let r;e[23]!==f||e[24]!==x||e[25]!==j||e[26]!==p?(r=s.jsxs("button",{type:"button",onClick:f,className:x,children:[j,p]}),e[23]=f,e[24]=x,e[25]=j,e[26]=p,e[27]=r):r=e[27];let o;e[28]!==t.isFolder||e[29]!==t.key||e[30]!==d||e[31]!==c?(o=!t.isFolder&&s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0",onClick:F=>{F.stopPropagation(),c(t.key)},children:s.jsx(A,{size:14})}),s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})]}),e[28]=t.isFolder,e[29]=t.key,e[30]=d,e[31]=c,e[32]=o):o=e[32];let m;e[33]!==t.isFolder||e[34]!==t.key||e[35]!==d?(m=t.isFolder&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})}),e[33]=t.isFolder,e[34]=t.key,e[35]=d,e[36]=m):m=e[36];let N;return e[37]!==o||e[38]!==m||e[39]!==r?(N=s.jsxs("div",{className:"group relative aspect-square bg-muted/30 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/50 transition-colors overflow-hidden",children:[r,o,m]}),e[37]=o,e[38]=m,e[39]=r,e[40]=N):N=e[40],N}function we({prefix:i,flat:e,onNavigate:t}){const g=v.useRef(null),c=q(),{connectionId:d,toolCaller:n}=D(),{objects:l,isLoading:h,isFetchingMore:u,hasMore:y,loadMore:a,error:f}=Z({prefix:i,flat:e,pageSize:z}),k=_({mutationFn:async r=>{const o=i+r.name,{url:m}=await n("PUT_PRESIGNED_URL",{key:o,contentType:r.type||"application/octet-stream"}),N=await fetch(m,{method:"PUT",body:r,headers:{"Content-Type":r.type||"application/octet-stream"}});if(!N.ok)throw new Error(`Upload failed: ${N.statusText}`);return o},onSuccess:r=>{w.success(`Uploaded ${I(r)}`),c.invalidateQueries({queryKey:R.objects(d,i,e,z)})},onError:r=>{w.error(`Upload failed: ${r.message}`)}}),b=_({mutationFn:async r=>r.length===1&&r[0]?n("DELETE_OBJECT",{key:r[0]}):n("DELETE_OBJECTS",{keys:r}),onSuccess:()=>{w.success("Deleted successfully"),c.invalidateQueries({queryKey:R.objects(d,i,e,z)})},onError:r=>{w.error(`Delete failed: ${r.message}`)}}),x=async r=>{try{const{url:o}=await n("GET_PRESIGNED_URL",{key:r}),m=await fetch(o);if(!m.ok)throw new Error(`Failed to fetch file: ${m.statusText}`);const N=await m.blob(),F=URL.createObjectURL(N),C=document.createElement("a");C.href=F,C.download=I(r),document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(F)}catch(o){w.error(`Download failed: ${o instanceof Error?o.message:"Unknown error"}`)}},j=r=>{const o=r.target.files;if(o){for(const m of Array.from(o))k.mutate(m);r.target.value=""}},p=r=>{if(!y||u)return;const o=r.currentTarget;o.scrollHeight-o.scrollTop-o.clientHeight<200&&a()};return f?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(S,{size:48,className:"text-destructive mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),s.jsx("p",{className:"text-muted-foreground text-center",children:f.message})]}):s.jsx("div",{className:"flex-1 overflow-y-auto p-4",onScroll:p,children:h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Q,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),s.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:j}),s.jsxs(E,{variant:"outline",onClick:()=>g.current?.click(),children:[s.jsx(Y,{size:14,className:"mr-1"}),"Upload files"]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:l.map(r=>s.jsx(oe,{item:r,onNavigate:t,onDownload:x,onDelete:o=>b.mutate([o])},r.key))}),u&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(T,{size:24,className:"animate-spin text-muted-foreground"})})]})})}export{we as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,z as y,j as s,f as _,r as C,B as $,bK as O,e as E,w as F,x as w,y as R,S as D,N as H}from"./index-CkH3mWvs.js";import{C as k}from"./card-EygHFK51.js";import{A as G}from"./avatar-D_V-3wap.js";import{i as Q}from"./AlertCircle-7lB7fro0.js";import{i as q}from"./Check-Cvo-Mj0S.js";import{s as B}from"./Plus-Dhm20gcZ.js";import{i as T}from"./SearchMd-DwqVVEmk.js";import{s as M}from"./XClose-d8Jjie9z.js";import{I as U}from"./input-Byroc8t4.js";import{C as P}from"./create-organization-dialog-BiPFmP0t.js";import"./alert-dialog-CR2Y_gWg.js";import"./form-Do17Zmtj.js";import"./label-D4oI89DS.js";import"./spinner-BA1OKCJn.js";import"./useMutation-T3cHavFN.js";function K(t){const e=f.c(10),{children:n,className:l,onNavigate:i,showHoverRing:a}=t,c=a===void 0?!1:a;let o;e[0]!==i?(o=p=>{i&&i(p)},e[0]=i,e[1]=o):o=e[1];const m=o,x=i&&"cursor-pointer",r=c&&"hover:ring-2 hover:ring-primary";let d;e[2]!==l||e[3]!==x||e[4]!==r?(d=y("group transition-all flex flex-col gap-0",x,r,l),e[2]=l,e[3]=x,e[4]=r,e[5]=d):d=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==d?(g=s.jsx(k,{className:d,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=d,e[9]=g):g=e[9],g}function V(t){const e=f.c(7),{url:n,fallback:l,shape:i,size:a,objectFit:c,className:o}=t,m=i===void 0?"square":i,x=a===void 0?"lg":a,r=c===void 0?"contain":c;let d;return e[0]!==o||e[1]!==l||e[2]!==r||e[3]!==m||e[4]!==x||e[5]!==n?(d=s.jsx(G,{url:n,fallback:l,shape:m,size:x,objectFit:r,className:o}),e[0]=o,e[1]=l,e[2]=r,e[3]=m,e[4]=x,e[5]=n,e[6]=d):d=e[6],d}function X(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Y(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("font-medium truncate",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("p",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function J(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("h3",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function W(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex flex-col gap-[2px]",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Z(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex justify-between items-start",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function ee(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function te(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function se(){const t=f.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-between items-start",children:s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-[2px]",children:[s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),s.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(k,{className:"group transition-colors flex flex-col",children:[n,s.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const u=Object.assign(K,{Avatar:V,AvatarSection:Z,Header:X,Title:Y,Subtitle:J,Content:W,Footer:ee,Badge:te,Skeleton:se}),ie={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},le={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},ne={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},ae={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},re={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},oe={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function L(t){const e=f.c(13),{children:n,columns:l,gap:i,className:a}=t;let c;e[0]!==l?(c=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=c):c=e[1];const o=c,x=ie[i===void 0?4:i],r=o.sm&&le[o.sm],d=o.md&&ne[o.md],g=o.lg&&ae[o.lg],p=o.xl&&re[o.xl],v=o["2xl"]&&oe[o["2xl"]];let N;e[2]!==a||e[3]!==x||e[4]!==r||e[5]!==d||e[6]!==g||e[7]!==p||e[8]!==v?(N=y("w-full grid",x,r,d,g,p,v,a),e[2]=a,e[3]=x,e[4]=r,e[5]=d,e[6]=g,e[7]=p,e[8]=v,e[9]=N):N=e[9];const b=N;let h;return e[10]!==n||e[11]!==b?(h=s.jsx("div",{className:b,children:n}),e[10]=n,e[11]=b,e[12]=h):h=e[12],h}function ce(t){const e=f.c(9),{count:n,columns:l,gap:i,className:a}=t,c=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,x=i===void 0?4:i;let r;e[2]!==c?(r=Array.from({length:c}).map(de),e[2]=c,e[3]=r):r=e[3];let d;return e[4]!==a||e[5]!==m||e[6]!==x||e[7]!==r?(d=s.jsx(L,{columns:m,gap:x,className:a,children:r}),e[4]=a,e[5]=m,e[6]=x,e[7]=r,e[8]=d):d=e[8],d}function de(t,e){return s.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),s.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const I=Object.assign(L,{Skeleton:ce});function me({invitation:t}){const[e,n]=C.useState(!1),[l,i]=C.useState(!1),a=F(),c=E(),o=async()=>{n(!0);try{const r=await _.organization.acceptInvitation({invitationId:t.id});if(r.error)w.error(r.error.message),n(!1);else{const d=await _.organization.setActive({organizationId:t.organizationId});d?.data?.slug?(w.success("Invitation accepted!"),c({to:"/$org",params:{org:d.data.slug}})):(w.success("Invitation accepted! Redirecting..."),c({to:"/"}))}}catch{w.error("Failed to accept invitation"),n(!1)}},m=async()=>{i(!0);try{const r=await _.organization.rejectInvitation({invitationId:t.id});r.error?(w.error(r.error.message),i(!1)):(w.success("Invitation rejected"),await a.invalidateQueries(),i(!1))}catch{w.error("Failed to reject invitation"),i(!1)}},x=t.organizationName||t.organizationId;return s.jsxs(u,{className:"border-dashed",children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:"",fallback:x,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsx(u.Subtitle,{children:"You've been invited to join"}),s.jsx(u.Title,{children:x})]})]}),s.jsx(u.Footer,{className:"border-t border-dashed",children:s.jsxs("div",{className:"flex h-3.5 items-center gap-2 w-full",children:[s.jsx($,{onClick:o,disabled:e||l,className:"flex-1",size:"sm",children:e?"Accepting...":s.jsxs(s.Fragment,{children:[s.jsx(q,{size:16}),"Accept"]})}),s.jsx($,{variant:"outline",onClick:m,disabled:e||l,className:"flex-1",size:"sm",children:l?"Declining...":s.jsxs(s.Fragment,{children:[s.jsx(M,{size:16}),"Decline"]})})]})})]})}function xe({query:t}){const e=C.useContext(O),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).filter(c=>c.status==="pending"&&new Date(c.expiresAt)>new Date),a=t?(()=>{const c=t.toLowerCase();return i.filter(o=>o.organizationName?.toLowerCase().includes(c)||o.organizationId.toLowerCase().includes(c))})():i;return a.length===0?null:s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-lg font-medium pb-2 border-b border-border/50 mb-6 px-2",children:"Invitations"}),s.jsx(I,{columns:{sm:2,md:3,lg:4},children:a.map(c=>s.jsx(me,{invitation:c},c.id))})]})}function ue(t){const e=f.c(14),{query:n}=t,{data:l}=_.useListOrganizations(),i=E();let a;e[0]!==l||e[1]!==n?(a=l?n?(()=>{const r=n.toLowerCase();return l.filter(d=>d.name.toLowerCase().includes(r)||d.slug.toLowerCase().includes(r))})():l:[],e[0]=l,e[1]=n,e[2]=a):a=e[2];const c=a;if(!l||l.length===0){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=r):r=e[3],r}if(c.length===0){let r;return e[4]!==n?(r=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=r):r=e[5],r}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==c||e[8]!==i){let r;e[10]!==i?(r=d=>s.jsxs(u,{onNavigate:()=>i({to:"/$org",params:{org:d.slug}}),children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:d.logo||"",fallback:d.name,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsxs(u.Subtitle,{children:["@",d.slug]}),s.jsx(u.Title,{children:d.name})]})]}),s.jsx(u.Footer,{children:s.jsxs("div",{className:"flex h-3.5 items-center text-xs text-muted-foreground",children:["Created:"," ",new Date(d.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},d.id),e[10]=i,e[11]=r):r=e[11],m=c.map(r),e[7]=c,e[8]=i,e[9]=m}else m=e[9];let x;return e[12]!==m?(x=s.jsx(I,{columns:o,children:m}),e[12]=m,e[13]=x):x=e[13],x}function fe(t){const e=f.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Q,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[l,s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=i):i=e[2],i}function ge(){const t=f.c(27),{error:e,isPending:n}=_.useListOrganizations(),[l,i]=C.useState(""),[a,c]=C.useState(!1),o=C.useDeferredValue(l);if(n){let j;return t[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx("div",{className:"@container",children:s.jsx(I.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})}),t[0]=j):j=t[0],j}if(e){let j;return t[1]!==e?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx(fe,{error:e})}),t[1]=e,t[2]=j):j=t[2],j}let m;t[3]!==o?(m=s.jsx(C.Suspense,{fallback:null,children:s.jsx(xe,{query:o})}),t[3]=o,t[4]=m):m=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"text-lg font-medium",children:"My organizations"}),t[5]=x):x=t[5];let r;t[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(T,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t[6]=r):r=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=j=>i(j.target.value),t[7]=d):d=t[7];let g;t[8]!==l?(g=s.jsxs("div",{className:"relative",children:[r,s.jsx(U,{className:"pl-8 h-8 w-52 border-none shadow-none focus-visible:ring-0",placeholder:"Search organizations...",value:l,onChange:d})]}),t[8]=l,t[9]=g):g=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs($,{size:"sm",onClick:()=>c(!0),children:[s.jsx(B,{size:16}),s.jsx("span",{children:"New organization"})]}),t[10]=p):p=t[10];let v;t[11]!==g?(v=s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/50 mb-6 px-2",children:[x,s.jsxs("div",{className:"flex items-center gap-3",children:[g,p]})]}),t[11]=g,t[12]=v):v=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(I.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[13]=N):N=t[13];let b;t[14]!==o?(b=s.jsx(C.Suspense,{fallback:N,children:s.jsx(ue,{query:o})}),t[14]=o,t[15]=b):b=t[15];let h;t[16]!==v||t[17]!==b?(h=s.jsxs("div",{children:[v,b]}),t[16]=v,t[17]=b,t[18]=h):h=t[18];let S;t[19]!==m||t[20]!==h?(S=s.jsxs("div",{className:"@container",children:[m,h]}),t[19]=m,t[20]=h,t[21]=S):S=t[21];let z;t[22]!==a?(z=s.jsx(P,{open:a,onOpenChange:c}),t[22]=a,t[23]=z):z=t[23];let A;return t[24]!==S||t[25]!==z?(A=s.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[S,z]}),t[24]=S,t[25]=z,t[26]=A):A=t[26],A}function Ee(){const t=f.c(4),e=R(),{data:n,isPending:l}=_.useListOrganizations();if(e.localMode){if(l){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(D,{}),t[0]=c):c=t[0],c}const a=n?.[0];if(a?.slug){const c=`/${a.slug}/org-admin`;let o;return t[1]!==c?(o=s.jsx(H,{to:c,replace:!0}),t[1]=c,t[2]=o):o=t[2],o}}let i;return t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"min-h-full",children:s.jsx(ge,{})}),t[3]=i):i=t[3],i}export{Ee as default};
|
|
1
|
+
import{c as f,z as y,j as s,f as _,r as C,B as $,bK as O,e as E,w as F,x as w,y as R,S as D,N as H}from"./index-CzhqcVNy.js";import{C as k}from"./card-ChLHZaFH.js";import{A as G}from"./avatar-DMHAVN2G.js";import{i as Q}from"./AlertCircle-CLSQ0NLi.js";import{i as q}from"./Check-D30Nw_2C.js";import{s as B}from"./Plus-vjPXrbll.js";import{i as T}from"./SearchMd-BpeHWO8y.js";import{s as M}from"./XClose-T4dQr9IP.js";import{I as U}from"./input-CaHgq6JC.js";import{C as P}from"./create-organization-dialog-BneQWVKs.js";import"./alert-dialog-ZI_d17Kf.js";import"./form-Ndm9rRCe.js";import"./label-ZRpbI7Sm.js";import"./spinner-CI9QBd79.js";import"./useMutation-BLMqKfMt.js";function K(t){const e=f.c(10),{children:n,className:l,onNavigate:i,showHoverRing:a}=t,c=a===void 0?!1:a;let o;e[0]!==i?(o=p=>{i&&i(p)},e[0]=i,e[1]=o):o=e[1];const m=o,x=i&&"cursor-pointer",r=c&&"hover:ring-2 hover:ring-primary";let d;e[2]!==l||e[3]!==x||e[4]!==r?(d=y("group transition-all flex flex-col gap-0",x,r,l),e[2]=l,e[3]=x,e[4]=r,e[5]=d):d=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==d?(g=s.jsx(k,{className:d,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=d,e[9]=g):g=e[9],g}function V(t){const e=f.c(7),{url:n,fallback:l,shape:i,size:a,objectFit:c,className:o}=t,m=i===void 0?"square":i,x=a===void 0?"lg":a,r=c===void 0?"contain":c;let d;return e[0]!==o||e[1]!==l||e[2]!==r||e[3]!==m||e[4]!==x||e[5]!==n?(d=s.jsx(G,{url:n,fallback:l,shape:m,size:x,objectFit:r,className:o}),e[0]=o,e[1]=l,e[2]=r,e[3]=m,e[4]=x,e[5]=n,e[6]=d):d=e[6],d}function X(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Y(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("font-medium truncate",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("p",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function J(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("h3",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function W(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex flex-col gap-[2px]",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Z(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex justify-between items-start",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function ee(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function te(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function se(){const t=f.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-between items-start",children:s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-[2px]",children:[s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),s.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(k,{className:"group transition-colors flex flex-col",children:[n,s.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const u=Object.assign(K,{Avatar:V,AvatarSection:Z,Header:X,Title:Y,Subtitle:J,Content:W,Footer:ee,Badge:te,Skeleton:se}),ie={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},le={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},ne={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},ae={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},re={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},oe={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function L(t){const e=f.c(13),{children:n,columns:l,gap:i,className:a}=t;let c;e[0]!==l?(c=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=c):c=e[1];const o=c,x=ie[i===void 0?4:i],r=o.sm&&le[o.sm],d=o.md&&ne[o.md],g=o.lg&&ae[o.lg],p=o.xl&&re[o.xl],v=o["2xl"]&&oe[o["2xl"]];let N;e[2]!==a||e[3]!==x||e[4]!==r||e[5]!==d||e[6]!==g||e[7]!==p||e[8]!==v?(N=y("w-full grid",x,r,d,g,p,v,a),e[2]=a,e[3]=x,e[4]=r,e[5]=d,e[6]=g,e[7]=p,e[8]=v,e[9]=N):N=e[9];const b=N;let h;return e[10]!==n||e[11]!==b?(h=s.jsx("div",{className:b,children:n}),e[10]=n,e[11]=b,e[12]=h):h=e[12],h}function ce(t){const e=f.c(9),{count:n,columns:l,gap:i,className:a}=t,c=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,x=i===void 0?4:i;let r;e[2]!==c?(r=Array.from({length:c}).map(de),e[2]=c,e[3]=r):r=e[3];let d;return e[4]!==a||e[5]!==m||e[6]!==x||e[7]!==r?(d=s.jsx(L,{columns:m,gap:x,className:a,children:r}),e[4]=a,e[5]=m,e[6]=x,e[7]=r,e[8]=d):d=e[8],d}function de(t,e){return s.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),s.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const I=Object.assign(L,{Skeleton:ce});function me({invitation:t}){const[e,n]=C.useState(!1),[l,i]=C.useState(!1),a=F(),c=E(),o=async()=>{n(!0);try{const r=await _.organization.acceptInvitation({invitationId:t.id});if(r.error)w.error(r.error.message),n(!1);else{const d=await _.organization.setActive({organizationId:t.organizationId});d?.data?.slug?(w.success("Invitation accepted!"),c({to:"/$org",params:{org:d.data.slug}})):(w.success("Invitation accepted! Redirecting..."),c({to:"/"}))}}catch{w.error("Failed to accept invitation"),n(!1)}},m=async()=>{i(!0);try{const r=await _.organization.rejectInvitation({invitationId:t.id});r.error?(w.error(r.error.message),i(!1)):(w.success("Invitation rejected"),await a.invalidateQueries(),i(!1))}catch{w.error("Failed to reject invitation"),i(!1)}},x=t.organizationName||t.organizationId;return s.jsxs(u,{className:"border-dashed",children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:"",fallback:x,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsx(u.Subtitle,{children:"You've been invited to join"}),s.jsx(u.Title,{children:x})]})]}),s.jsx(u.Footer,{className:"border-t border-dashed",children:s.jsxs("div",{className:"flex h-3.5 items-center gap-2 w-full",children:[s.jsx($,{onClick:o,disabled:e||l,className:"flex-1",size:"sm",children:e?"Accepting...":s.jsxs(s.Fragment,{children:[s.jsx(q,{size:16}),"Accept"]})}),s.jsx($,{variant:"outline",onClick:m,disabled:e||l,className:"flex-1",size:"sm",children:l?"Declining...":s.jsxs(s.Fragment,{children:[s.jsx(M,{size:16}),"Decline"]})})]})})]})}function xe({query:t}){const e=C.useContext(O),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).filter(c=>c.status==="pending"&&new Date(c.expiresAt)>new Date),a=t?(()=>{const c=t.toLowerCase();return i.filter(o=>o.organizationName?.toLowerCase().includes(c)||o.organizationId.toLowerCase().includes(c))})():i;return a.length===0?null:s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-lg font-medium pb-2 border-b border-border/50 mb-6 px-2",children:"Invitations"}),s.jsx(I,{columns:{sm:2,md:3,lg:4},children:a.map(c=>s.jsx(me,{invitation:c},c.id))})]})}function ue(t){const e=f.c(14),{query:n}=t,{data:l}=_.useListOrganizations(),i=E();let a;e[0]!==l||e[1]!==n?(a=l?n?(()=>{const r=n.toLowerCase();return l.filter(d=>d.name.toLowerCase().includes(r)||d.slug.toLowerCase().includes(r))})():l:[],e[0]=l,e[1]=n,e[2]=a):a=e[2];const c=a;if(!l||l.length===0){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=r):r=e[3],r}if(c.length===0){let r;return e[4]!==n?(r=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=r):r=e[5],r}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==c||e[8]!==i){let r;e[10]!==i?(r=d=>s.jsxs(u,{onNavigate:()=>i({to:"/$org",params:{org:d.slug}}),children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:d.logo||"",fallback:d.name,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsxs(u.Subtitle,{children:["@",d.slug]}),s.jsx(u.Title,{children:d.name})]})]}),s.jsx(u.Footer,{children:s.jsxs("div",{className:"flex h-3.5 items-center text-xs text-muted-foreground",children:["Created:"," ",new Date(d.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},d.id),e[10]=i,e[11]=r):r=e[11],m=c.map(r),e[7]=c,e[8]=i,e[9]=m}else m=e[9];let x;return e[12]!==m?(x=s.jsx(I,{columns:o,children:m}),e[12]=m,e[13]=x):x=e[13],x}function fe(t){const e=f.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Q,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[l,s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=i):i=e[2],i}function ge(){const t=f.c(27),{error:e,isPending:n}=_.useListOrganizations(),[l,i]=C.useState(""),[a,c]=C.useState(!1),o=C.useDeferredValue(l);if(n){let j;return t[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx("div",{className:"@container",children:s.jsx(I.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})}),t[0]=j):j=t[0],j}if(e){let j;return t[1]!==e?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx(fe,{error:e})}),t[1]=e,t[2]=j):j=t[2],j}let m;t[3]!==o?(m=s.jsx(C.Suspense,{fallback:null,children:s.jsx(xe,{query:o})}),t[3]=o,t[4]=m):m=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"text-lg font-medium",children:"My organizations"}),t[5]=x):x=t[5];let r;t[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(T,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t[6]=r):r=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=j=>i(j.target.value),t[7]=d):d=t[7];let g;t[8]!==l?(g=s.jsxs("div",{className:"relative",children:[r,s.jsx(U,{className:"pl-8 h-8 w-52 border-none shadow-none focus-visible:ring-0",placeholder:"Search organizations...",value:l,onChange:d})]}),t[8]=l,t[9]=g):g=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs($,{size:"sm",onClick:()=>c(!0),children:[s.jsx(B,{size:16}),s.jsx("span",{children:"New organization"})]}),t[10]=p):p=t[10];let v;t[11]!==g?(v=s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/50 mb-6 px-2",children:[x,s.jsxs("div",{className:"flex items-center gap-3",children:[g,p]})]}),t[11]=g,t[12]=v):v=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(I.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[13]=N):N=t[13];let b;t[14]!==o?(b=s.jsx(C.Suspense,{fallback:N,children:s.jsx(ue,{query:o})}),t[14]=o,t[15]=b):b=t[15];let h;t[16]!==v||t[17]!==b?(h=s.jsxs("div",{children:[v,b]}),t[16]=v,t[17]=b,t[18]=h):h=t[18];let S;t[19]!==m||t[20]!==h?(S=s.jsxs("div",{className:"@container",children:[m,h]}),t[19]=m,t[20]=h,t[21]=S):S=t[21];let z;t[22]!==a?(z=s.jsx(P,{open:a,onOpenChange:c}),t[22]=a,t[23]=z):z=t[23];let A;return t[24]!==S||t[25]!==z?(A=s.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[S,z]}),t[24]=S,t[25]=z,t[26]=A):A=t[26],A}function Ee(){const t=f.c(4),e=R(),{data:n,isPending:l}=_.useListOrganizations();if(e.localMode){if(l){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(D,{}),t[0]=c):c=t[0],c}const a=n?.[0];if(a?.slug){const c=`/${a.slug}/org-admin`;let o;return t[1]!==c?(o=s.jsx(H,{to:c,replace:!0}),t[1]=c,t[2]=o):o=t[2],o}}let i;return t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"min-h-full",children:s.jsx(ge,{})}),t[3]=i):i=t[3],i}export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as X,r as F,z as K,j as t,B as T}from"./index-
|
|
1
|
+
import{c as X,r as F,z as K,j as t,B as T}from"./index-CzhqcVNy.js";import{I as Z}from"./input-CaHgq6JC.js";import{b as q,P as G,a as H}from"./popover-DMD8_Cbp.js";import{S as J}from"./scroll-area-uvPGOSmX.js";import{n as Q}from"./Container-BXYdiT-J.js";import{i as V}from"./Edit05-CHAqfRrN.js";import{i as W}from"./Link01-Bm8fkbw8.js";import{s as ee}from"./XClose-T4dQr9IP.js";const te=0,se=38;function re(){const i=[];for(let e=te;e<=se;e++)i.push(`/icons/capy-${e}.png`);return i}const le={sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},oe=re();function xe(i){const e=X.c(53),{value:r,onChange:o,name:c,size:S,className:I,fallbackIcon:a}=i,m=S===void 0?"lg":S,[s,n]=F.useState(""),[U,w]=F.useState(!1);let A;e[0]!==o?(A=l=>{o(l),w(!1),n("")},e[0]=o,e[1]=A):A=e[1];const $=A;let _;e[2]!==s||e[3]!==o?(_=()=>{const l=s.trim();l&&(o(l),w(!1),n(""))},e[2]=s,e[3]=o,e[4]=_):_=e[4];const f=_;let k;e[5]!==o?(k=()=>{o(null),w(!1),n("")},e[5]=o,e[6]=k):k=e[6];const D=k,L=le[m];let d;e[7]!==I||e[8]!==L?(d=K("relative group rounded-lg border border-border shrink-0 overflow-hidden cursor-pointer",L,I),e[7]=I,e[8]=L,e[9]=d):d=e[9];const M=r??"no-icon";let u;e[10]!==a||e[11]!==c||e[12]!==M||e[13]!==r?(u=t.jsx(ie,{icon:r,name:c,fallbackIcon:a},M),e[10]=a,e[11]=c,e[12]=M,e[13]=r,e[14]=u):u=e[14];let z;e[15]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(V,{size:16,className:"text-white"})}),e[15]=z):z=e[15];let p;e[16]!==d||e[17]!==u?(p=t.jsx(q,{asChild:!0,children:t.jsxs("button",{type:"button",className:d,children:[u,z]})}),e[16]=d,e[17]=u,e[18]=p):p=e[18];let P;e[19]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("span",{className:"text-sm font-medium",children:"Choose icon"}),e[19]=P):P=e[19];let h;e[20]!==D||e[21]!==r?(h=r&&t.jsxs(T,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs text-muted-foreground",onClick:D,children:[t.jsx(ee,{size:12}),"Remove"]}),e[20]=D,e[21]=r,e[22]=h):h=e[22];let x;e[23]!==h?(x=t.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[P,h]}),e[23]=h,e[24]=x):x=e[24];let b;e[25]!==$||e[26]!==r?(b=oe.map(l=>t.jsx("button",{type:"button",onClick:()=>$(l),className:K("h-9 w-9 rounded-md overflow-hidden border transition-colors hover:border-primary cursor-pointer",r===l?"border-primary ring-1 ring-primary":"border-transparent"),children:t.jsx("img",{src:l,alt:"",className:"h-full w-full object-cover",loading:"lazy"})},l)),e[25]=$,e[26]=r,e[27]=b):b=e[27];let g;e[28]!==b?(g=t.jsx(J,{className:"h-48",children:t.jsx("div",{className:"grid grid-cols-7 gap-1 p-2",children:b})}),e[28]=b,e[29]=g):g=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(W,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=E):E=e[30];let R;e[31]===Symbol.for("react.memo_cache_sentinel")?(R=l=>n(l.target.value),e[31]=R):R=e[31];let j;e[32]!==f?(j=l=>{l.key==="Enter"&&(l.preventDefault(),f())},e[32]=f,e[33]=j):j=e[33];let v;e[34]!==s||e[35]!==j?(v=t.jsx(Z,{value:s,onChange:R,placeholder:"Paste image URL...",className:"h-7 text-xs",onKeyDown:j}),e[34]=s,e[35]=j,e[36]=v):v=e[36];let O;e[37]!==s?(O=s.trim(),e[37]=s,e[38]=O):O=e[38];const Y=!O;let y;e[39]!==f||e[40]!==Y?(y=t.jsx(T,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs shrink-0",onClick:f,disabled:Y,children:"Apply"}),e[39]=f,e[40]=Y,e[41]=y):y=e[41];let N;e[42]!==v||e[43]!==y?(N=t.jsxs("div",{className:"flex items-center gap-1.5 p-2 border-t border-border",children:[E,v,y]}),e[42]=v,e[43]=y,e[44]=N):N=e[44];let C;e[45]!==x||e[46]!==g||e[47]!==N?(C=t.jsx(G,{align:"start",className:"w-80 p-0",onOpenAutoFocus:ne,children:t.jsxs("div",{className:"flex flex-col",children:[x,g,N]})}),e[45]=x,e[46]=g,e[47]=N,e[48]=C):C=e[48];let B;return e[49]!==U||e[50]!==p||e[51]!==C?(B=t.jsxs(H,{open:U,onOpenChange:w,children:[p,C]}),e[49]=U,e[50]=p,e[51]=C,e[52]=B):B=e[52],B}function ne(i){return i.preventDefault()}function ie(i){const e=X.c(8),{icon:r,name:o,fallbackIcon:c}=i,[S,I]=F.useState(!1);if(!r||S){let s;e[0]!==c?(s=c??t.jsx(Q,{size:24,className:"text-muted-foreground"}),e[0]=c,e[1]=s):s=e[1];let n;return e[2]!==s?(n=t.jsx("div",{className:"h-full w-full flex items-center justify-center bg-muted/20",children:s}),e[2]=s,e[3]=n):n=e[3],n}let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=()=>I(!0),e[4]=a):a=e[4];let m;return e[5]!==r||e[6]!==o?(m=t.jsx("img",{src:r,alt:o,className:"h-full w-full object-cover",onError:a}),e[5]=r,e[6]=o,e[7]=m):m=e[7],m}export{xe as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bP as _}from"./index-
|
|
1
|
+
import{bP as _}from"./index-CzhqcVNy.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const P=_(g);export{P as R,g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as i,L as n,O as l,P as u,V as C,a as c,h as P,i as p,b as m,p as M,s as L,u as d}from"./index-
|
|
1
|
+
import{C as i,L as n,O as l,P as u,V as C,a as c,h as P,i as p,b as m,p as M,s as L,u as d}from"./index-CzhqcVNy.js";import{E,b as T,a as O,c as S,u as x,d as y,e as R}from"./use-collections-C8v6HwyA.js";import{u as b,a as f,b as A}from"./use-connection-CkLGBugg.js";import{S as e}from"./constants-OpiJAgZI.js";import{K as I,a as V,W as D,c as K,g as U,b as W,d as w,e as Q,f as N,i as Y,u as j,h as F}from"./constants-OpiJAgZI.js";import{u as k,a as v,b as B,c as H,d as J}from"./use-mcp-tools-_SrEx2Yc.js";import{A as z,D as X,l as Z,r as $,u as ss,a as es,b as as}from"./decopilot-events-BAhRgxLp.js";import{g as os,l as rs,u as is,a as ns}from"./use-mcp-prompts-DJolbe2G.js";import{u as us,a as Cs,b as cs}from"./use-virtual-mcp-CelTUOdD.js";import{a as ps,c as ms,e as Ms,g as Ls}from"./usage-B8eRkRZY.js";import"./useMutation-BLMqKfMt.js";import"./useQuery-BtUsJRrm.js";export{z as ALL_DECOPILOT_EVENT_TYPES,i as ConnectionEntitySchema,X as DECOPILOT_EVENTS,E as EMPTY_COLLECTION_LIST_RESULT,I as KEYS,n as Locator,l as ORG_ADMIN_PROJECT_SLUG,u as ProjectContextProvider,V as SELF_MCP_ALIAS_ID,e as StreamableHTTPClientTransport,C as VirtualMCPEntitySchema,D as WellKnownOrgMCPId,ps as addUsage,c as authenticateMcp,T as buildCollectionQueryKey,O as buildOrderByExpression,S as buildWhereExpression,ms as calculateUsageStats,K as createMCPClient,Ms as emptyUsageStats,Ls as getCostFromUsage,U as getDecopilotId,os as getPrompt,W as getWellKnownCommunityRegistryConnection,w as getWellKnownDecopilotVirtualMCP,Q as getWellKnownOpenRouterConnection,N as getWellKnownRegistryConnection,P as handleOAuthCallback,p as isConnectionAuthenticated,Y as isDecopilot,m as isStdioParameters,rs as listPrompts,Z as listResources,M as parseVirtualUrl,$ as readResource,L as setOAuthRedirectOrigin,x as useCollectionActions,y as useCollectionItem,R as useCollectionList,b as useConnection,f as useConnectionActions,A as useConnections,j as useMCPClient,F as useMCPClientOptional,is as useMCPPromptsList,ns as useMCPPromptsListQuery,ss as useMCPReadResource,es as useMCPResourcesList,as as useMCPResourcesListQuery,k as useMCPToolCall,v as useMCPToolCallMutation,B as useMCPToolCallQuery,H as useMCPToolsList,J as useMCPToolsListQuery,d as useProjectContext,us as useVirtualMCP,Cs as useVirtualMCPActions,cs as useVirtualMCPs};
|