decocms 2.178.0 → 2.178.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-DOAxiEBN.js → AlertCircle-12chRuly.js} +1 -1
- package/dist/client/assets/{AlignLeft-CRMPlioa.js → AlignLeft-_LT9deOt.js} +1 -1
- package/dist/client/assets/{ArrowDown-xJyK-tRR.js → ArrowDown-7rbX3zqZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B-tpcvF0.js → ArrowLeft-erI8s3G2.js} +1 -1
- package/dist/client/assets/{ArrowUp-BO7WH9Uq.js → ArrowUp-DoIG5eQh.js} +1 -1
- package/dist/client/assets/{Building02-D30T2TCD.js → Building02-Dr7IyBdv.js} +1 -1
- package/dist/client/assets/{Check-BTP9VTUM.js → Check-DW8AVFkq.js} +1 -1
- package/dist/client/assets/{CheckCircle-DoZ7ERyW.js → CheckCircle-hBpanOsI.js} +1 -1
- package/dist/client/assets/{CheckSquare-Dbh9CJyx.js → CheckSquare-Cr3IzSXp.js} +1 -1
- package/dist/client/assets/{CheckVerified02-CyloHbYs.js → CheckVerified02-r17ymUCs.js} +1 -1
- package/dist/client/assets/{ChevronDown-CLapIRmf.js → ChevronDown-BIRGQoZ5.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CMUbV0KP.js → ChevronLeft-D-e7F7Gj.js} +1 -1
- package/dist/client/assets/{ChevronRight-DWZgTrde.js → ChevronRight-DsjLlugM.js} +1 -1
- package/dist/client/assets/{ChevronUp-DGOtRvEF.js → ChevronUp-Bi3NMXzv.js} +1 -1
- package/dist/client/assets/{Clock-BYjyd9hX.js → Clock-D4xJnA3P.js} +1 -1
- package/dist/client/assets/{Code01-BkNgeom6.js → Code01-YGq5QwlZ.js} +1 -1
- package/dist/client/assets/{Container-D7IaxBn4.js → Container-DHyMOW_p.js} +1 -1
- package/dist/client/assets/{Copy01-BJ5f3Ft8.js → Copy01-DkcjIGiS.js} +1 -1
- package/dist/client/assets/{Dataflow03-DE7FXw07.js → Dataflow03-CD3eo8oO.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BFhhKBhk.js → DotsHorizontal-CjYGc80C.js} +1 -1
- package/dist/client/assets/{DotsVertical-CmyZ1eER.js → DotsVertical-2nyye7GD.js} +1 -1
- package/dist/client/assets/{Download01-C0zy7iAO.js → Download01-BvtNZalG.js} +1 -1
- package/dist/client/assets/{Edit01-BsJ32les.js → Edit01-CoeKfJ-u.js} +1 -1
- package/dist/client/assets/{Edit05-BD2d2k-5.js → Edit05-CbbEzOoe.js} +1 -1
- package/dist/client/assets/{Eye-B3PAdhmZ.js → Eye-hBqNQHpc.js} +1 -1
- package/dist/client/assets/{EyeOff-_G9JY6d-.js → EyeOff-CJoTkAtN.js} +1 -1
- package/dist/client/assets/{File02-CAND2NHE.js → File02-D19u2hUl.js} +1 -1
- package/dist/client/assets/{File06-Bvs2lp94.js → File06-Bp4ioOvR.js} +1 -1
- package/dist/client/assets/{FilterLines-D-lo1vJH.js → FilterLines-Dvk7BhWf.js} +1 -1
- package/dist/client/assets/{Globe01-jlGiKRJ-.js → Globe01-B8Ib7knn.js} +1 -1
- package/dist/client/assets/{Globe02-DpkPR1qQ.js → Globe02-wRhoc1N5.js} +1 -1
- package/dist/client/assets/{Grid01-Bootsry8.js → Grid01-C5e9ReQ4.js} +1 -1
- package/dist/client/assets/{Home02-Cn5GN0Zh.js → Home02-JZJR9jmQ.js} +1 -1
- package/dist/client/assets/{Image01-BGiNuXLR.js → Image01-DjoSkYp_.js} +1 -1
- package/dist/client/assets/{Inbox01-QN0h6e9y.js → Inbox01-ClVaT7W5.js} +1 -1
- package/dist/client/assets/{InfoCircle-BlKvj0NG.js → InfoCircle-DzyfpQes.js} +1 -1
- package/dist/client/assets/{Key01-p6odXPoE.js → Key01-qNySmY39.js} +1 -1
- package/dist/client/assets/{LayersTwo01-Dj6OMOTN.js → LayersTwo01-dfSlQT0y.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Bl9wlb-l.js → LayoutLeft-B2KZfn2n.js} +1 -1
- package/dist/client/assets/{Link01-GDNtvq6w.js → Link01-Cz_ZRKoB.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cmp1Jq7T.js → LinkExternal01-CKvCiQnV.js} +1 -1
- package/dist/client/assets/{List-BFzJ8d3-.js → List-NLa0AhO4.js} +1 -1
- package/dist/client/assets/{Loading01-Bgt2pWQu.js → Loading01-Bb8FCosd.js} +1 -1
- package/dist/client/assets/{Lock01-CrtAKCVY.js → Lock01-CnZITIks.js} +1 -1
- package/dist/client/assets/{Play-C6mSLsW0.js → Play-Bw5lQw7j.js} +1 -1
- package/dist/client/assets/{Plus-Bah3bfIq.js → Plus-CajZ9VfC.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-D6TQ-sWU.js → RefreshCcw01-B_NTitRE.js} +1 -1
- package/dist/client/assets/{Save01-DMdPXvfp.js → Save01-8oEsqMkJ.js} +1 -1
- package/dist/client/assets/{SearchMd-CbNARIB_.js → SearchMd-eZWeU0sP.js} +1 -1
- package/dist/client/assets/{Settings01-ncSo0UF1.js → Settings01-ClPVpLPy.js} +1 -1
- package/dist/client/assets/{Shield01-jjVa8gNb.js → Shield01-N4ace-oo.js} +1 -1
- package/dist/client/assets/{Terminal-BkHJq74m.js → Terminal-CGwuP-_5.js} +1 -1
- package/dist/client/assets/{Tool01-CCSFIqz9.js → Tool01-D1m8i7Ez.js} +1 -1
- package/dist/client/assets/{Trash01-DJLT0hlL.js → Trash01-B_4PTwjI.js} +1 -1
- package/dist/client/assets/{Upload01-CrylBwgE.js → Upload01-CLIOr3Tj.js} +1 -1
- package/dist/client/assets/{Users03-ClHTtWuU.js → Users03-Bv-hUQkl.js} +1 -1
- package/dist/client/assets/{X-Dr3IGE6q.js → X-LzehymHS.js} +1 -1
- package/dist/client/assets/{XClose-CM_PUH0D.js → XClose-CcNXqPQc.js} +1 -1
- package/dist/client/assets/{Zap-DNAzZ691.js → Zap-BFN1DqIC.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-D9yVR2mI.js → agent-connections-preview-3pYXfstj.js} +1 -1
- package/dist/client/assets/{agent-detail-D9yhjqjE.js → agent-detail-DMK-u3yi.js} +1 -1
- package/dist/client/assets/{agents-UYgbyoc-.js → agents-Wfe5dNfh.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-CKXeyPmY.js → ai-providers-logos-CCp39UCk.js} +1 -1
- package/dist/client/assets/{alert-dialog-CGRFjIvo.js → alert-dialog-B_ae3oRt.js} +1 -1
- package/dist/client/assets/{auth-catchall-DJtyBhDQ.js → auth-catchall-DAx9m28t.js} +1 -1
- package/dist/client/assets/{automation-detail-Da-KIL0v.js → automation-detail-DfFkGT_5.js} +1 -1
- package/dist/client/assets/{automations-BBeFyOp2.js → automations-A8NOzTSS.js} +1 -1
- package/dist/client/assets/{avatar-B6y4oqG6.js → avatar-B2yArl-q.js} +1 -1
- package/dist/client/assets/{badge-BWsagPlP.js → badge-DtRom7JO.js} +1 -1
- package/dist/client/assets/{binder-BfA1Jrrc.js → binder-D4cqx_Kx.js} +1 -1
- package/dist/client/assets/{breadcrumb-D8mb9kpq.js → breadcrumb-C2RG4nAQ.js} +1 -1
- package/dist/client/assets/{card-C0MItTW_.js → card-B8qDZGCZ.js} +1 -1
- package/dist/client/assets/{checkbox-DUU3Nuea.js → checkbox-B1rexahu.js} +1 -1
- package/dist/client/assets/{collapsible-CtLdTa6t.js → collapsible-BtjeaBAE.js} +1 -1
- package/dist/client/assets/{collection-detail-DPIki4up.js → collection-detail-BaBGI9i2.js} +1 -1
- package/dist/client/assets/{collection-display-button-DdFInvSR.js → collection-display-button-CpVZ4wHm.js} +1 -1
- package/dist/client/assets/{collection-search-CGfzh4mC.js → collection-search-BYV7N3mr.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DLe2aR6i.js → collection-table-wrapper-CHFJQd21.js} +1 -1
- package/dist/client/assets/{collection-tabs-DAHXpc2n.js → collection-tabs-CJEa3dRy.js} +1 -1
- package/dist/client/assets/{command-C4HnUxgr.js → command-Drksh_DO.js} +1 -1
- package/dist/client/assets/{connection-card-DRd8H1I5.js → connection-card-Bak2l1_M.js} +1 -1
- package/dist/client/assets/{connection-detail-MKWBWpRr.js → connection-detail-BKy2ZsS6.js} +1 -1
- package/dist/client/assets/{connections-CIQDC3QM.js → connections-Dxf4eIOE.js} +1 -1
- package/dist/client/assets/{constants-C6R-Odkq.js → constants-D7qXOYRn.js} +1 -1
- package/dist/client/assets/{context-BFTRA5vP.js → context-DxQMlFKC.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Bez2nZe0.js → create-organization-dialog-CNWB-72r.js} +1 -1
- package/dist/client/assets/{create-project-dialog-MCGuKGij.js → create-project-dialog-BeIY4Oy9.js} +1 -1
- package/dist/client/assets/{danger-D1zng7LS.js → danger-YWbxrjNq.js} +1 -1
- package/dist/client/assets/{danger-zone-DbcRzYYG.js → danger-zone-DGg0ZzSy.js} +1 -1
- package/dist/client/assets/{dependencies-B8EkZe-H.js → dependencies-DtAVTWu-.js} +1 -1
- package/dist/client/assets/{dialog-Bw5T2ogY.js → dialog-ChXYvlDt.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dan8nMb8.js → dropdown-menu-BxlQMXgW.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BDxV3RAS.js → dynamic-plugin-layout-JpZTv0Ay.js} +1 -1
- package/dist/client/assets/{editable-task-title-wfBXYVIh.js → editable-task-title-Cm-uIwFs.js} +1 -1
- package/dist/client/assets/{empty-state-CoA3_x_6.js → empty-state-qLM_bVsv.js} +1 -1
- package/dist/client/assets/{empty-state-C1iyyf7G.js → empty-state-xIvMMy-_.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CxyeKMFS.js → env-vars-editor-Yss1wn0m.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C8ZedtM3.js → extract-connection-data-48N591A_.js} +1 -1
- package/dist/client/assets/{file-browser-CShFs9BG.js → file-browser-BbqpPFZK.js} +2 -2
- package/dist/client/assets/{form-B1LLlQBa.js → form-CaFPTMVC.js} +1 -1
- package/dist/client/assets/{general-Dnfj_B7U.js → general-DI9irVIQ.js} +1 -1
- package/dist/client/assets/{generate-id-WpAuYSZF.js → generate-id-BiV6m8fS.js} +1 -1
- package/dist/client/assets/{grid-view-PzYdekcz.js → grid-view-DurgUMuo.js} +1 -1
- package/dist/client/assets/{home-CKa-gWjN.js → home-CspK560n.js} +1 -1
- package/dist/client/assets/{index-lUO5B2Do.js → index-ChUIqRBi.js} +1 -1
- package/dist/client/assets/{index-D-AXXJqO.js → index-CqWJIMlG.js} +1 -1
- package/dist/client/assets/{index-CgSAwZ8g.js → index-CqtWW-Tq.js} +1 -1
- package/dist/client/assets/{index-DtZLm-Fz.js → index-CqyqI90F.js} +1 -1
- package/dist/client/assets/{index-BaVHKLOw.js → index-De1iYnQy.js} +1 -1
- package/dist/client/assets/{index-De7oAufQ.js → index-NjMxPJgF.js} +3 -3
- package/dist/client/assets/{index-BkxamE0W.js → index-TV8hw8s3.js} +1 -1
- package/dist/client/assets/{index-CVayrapI.js → index-YL7q5tyF.js} +1 -1
- package/dist/client/assets/{index-BFJo8BQ3.js → index-YRudAQp7.js} +1 -1
- package/dist/client/assets/{index-J5pIXVfD.js → index-yiVP4brl.js} +1 -1
- package/dist/client/assets/{index-OdE2HBl6.js → index-zWpUeKAz.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C7xXp1jr.js → infiniteQueryObserver-JZ0YxCW-.js} +1 -1
- package/dist/client/assets/{input-_VKm0O_1.js → input-B89sozd8.js} +1 -1
- package/dist/client/assets/{integration-icon-BkY1vh6I.js → integration-icon-BPVDVJvP.js} +1 -1
- package/dist/client/assets/{label-BhDDQ3-n.js → label-DkiEYJcU.js} +1 -1
- package/dist/client/assets/{layout-BIFV7MZL.js → layout-Cqn-h1Jz.js} +1 -1
- package/dist/client/assets/{layout-CZKgiZuG.js → layout-DcmGLVHZ.js} +1 -1
- package/dist/client/assets/{login-uo65TNIo.js → login-qT_ItpIx.js} +1 -1
- package/dist/client/assets/{logo-upload-CXS8-AgL.js → logo-upload-CoGaedUC.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BcsrfZJp.js → mcp-app-renderer-By1mQEU9.js} +1 -1
- package/dist/client/assets/{mcp-server-card-Bp6C5W6n.js → mcp-server-card-B3Nrrgyk.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-Ctbkl5jL.js → mcp-server-detail-DMfy0V9h.js} +2 -2
- package/dist/client/assets/{members-DCfL7gNX.js → members-Q81LXZu1.js} +1 -1
- package/dist/client/assets/{monaco-editor-DPC7_J-G.js → monaco-editor-ZB27PMAe.js} +1 -1
- package/dist/client/assets/{monitoring-ByXLzXVV.js → monitoring-C31A03PZ.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-YR1gT6FF.js → monitoring-dashboard-edit-Dfi8Jxeb.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-BbtnIBfa.js → monitoring-dashboard-view-CxjxBHLW.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Df9ANyzv.js → monitoring-stats-row-CAn-8pVZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-DAQSPrcu.js → oauth-callback-B8DRnSok.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BM5LYNPq.js → oauth-callback-ai-provider-CsTCxPAY.js} +1 -1
- package/dist/client/assets/{org-ai-providers-6KYO-veN.js → org-ai-providers-DaYyItUL.js} +1 -1
- package/dist/client/assets/{page-JhhtSWZh.js → page-BjLk0DX_.js} +1 -1
- package/dist/client/assets/{page-30eMAMiN.js → page-C2I5Nlmu.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Cl2I2geD.js → plugin-empty-state-K02oXRNN.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-R2BzERoW.js → plugin-empty-state-l30u7dec.js} +1 -1
- package/dist/client/assets/{plugin-header-Bakz3z0e.js → plugin-header-B_wkRb4Y.js} +1 -1
- package/dist/client/assets/{plugin-header-aEsNVQjp.js → plugin-header-CE-BhILm.js} +1 -1
- package/dist/client/assets/plugins-6p4XZdw1.js +1 -0
- package/dist/client/assets/{popover-D_qGIJiq.js → popover-Br8QkMK3.js} +1 -1
- package/dist/client/assets/{project-app-view-BFgEphLV.js → project-app-view-CRe7LVZk.js} +1 -1
- package/dist/client/assets/{project-layout-C8oyOOGc.js → project-layout-Bg1hlIaM.js} +1 -1
- package/dist/client/assets/{project-plugins-BVt_WzcU.js → project-plugins-BHOZZsH7.js} +1 -1
- package/dist/client/assets/{projects-list-C02pKlJj.js → projects-list-i4ZvUqtI.js} +1 -1
- package/dist/client/assets/{registry-layout-C-yQnDXG.js → registry-layout-DQV7LhSo.js} +1 -1
- package/dist/client/assets/{registry-utils-Dqc_kCiP.js → registry-utils-cjX9P5J9.js} +1 -1
- package/dist/client/assets/{reset-password-Cqvt_aDI.js → reset-password-Cgcrl5ZG.js} +1 -1
- package/dist/client/assets/{resizable-CO0Uh73H.js → resizable-Nu1SqaJD.js} +1 -1
- package/dist/client/assets/{save-actions-ju1vjafj.js → save-actions-CVl6VtT2.js} +1 -1
- package/dist/client/assets/{scroll-area-DL2xzsPP.js → scroll-area-BTJQ86Ry.js} +1 -1
- package/dist/client/assets/{select-B4liIMVc.js → select-Dx3T3-4n.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-CuflMlTt.js → select-virtual-mcp-BS537pmy.js} +1 -1
- package/dist/client/assets/{sheet-Cjr3EcYH.js → sheet-C3HM0Uwr.js} +1 -1
- package/dist/client/assets/{shell-layout-DfTROeX_.js → shell-layout-Bco0BFOl.js} +2 -2
- package/dist/client/assets/{sidebar-settings-BljNzJVO.js → sidebar-settings-JhN4X_jg.js} +1 -1
- package/dist/client/assets/{skeleton-Bt7MRTvB.js → skeleton-Cjm8s7CT.js} +1 -1
- package/dist/client/assets/{spinner-Cse1gKnw.js → spinner-Dzx7B3Jl.js} +1 -1
- package/dist/client/assets/{store-invite-D8XeTZbu.js → store-invite-BPcFU0aw.js} +1 -1
- package/dist/client/assets/{switch-DHS6rwq-.js → switch-CA_oYDia.js} +1 -1
- package/dist/client/assets/{table-BPkNFl3F.js → table-C-1rP_rt.js} +1 -1
- package/dist/client/assets/{tabs-D9xzXdQn.js → tabs-BSOe8gLq.js} +1 -1
- package/dist/client/assets/{task-status-DPcRgg7n.js → task-status-DYx9R7EL.js} +24 -24
- package/dist/client/assets/tasks-D1X8oLa3.js +1 -0
- package/dist/client/assets/{tasks-panel-i3VUreUx.js → tasks-panel-BJ3TfA-_.js} +1 -1
- package/dist/client/assets/{textarea-C_pKpP9s.js → textarea-DIJzFUWn.js} +1 -1
- package/dist/client/assets/{time-range-picker-BuykPBni.js → time-range-picker-CGBh-D6p.js} +1 -1
- package/dist/client/assets/{toggle-group-VpRSF_Gl.js → toggle-group-DlZGDyPQ.js} +1 -1
- package/dist/client/assets/{tools-list-DDFWIxxm.js → tools-list-D-T64862.js} +1 -1
- package/dist/client/assets/{tooltip-C4rlkzSj.js → tooltip-BJMSu0c2.js} +1 -1
- package/dist/client/assets/{topbar-portal-CF1YRovU.js → topbar-portal-ChPXVsi1.js} +1 -1
- package/dist/client/assets/{types-DQbIwrMI.js → types-BHeMLyAV.js} +1 -1
- package/dist/client/assets/{use-automations-C1HgdvUZ.js → use-automations-Bmw3x7Dk.js} +1 -1
- package/dist/client/assets/{use-collections-CN-KZdhF.js → use-collections-C0cYiFfV.js} +1 -1
- package/dist/client/assets/{use-connection-C4RNTGYe.js → use-connection-CHFdKnsr.js} +1 -1
- package/dist/client/assets/{use-copy-Cyun7kVE.js → use-copy-xhdji_Bl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-4JnIm_fY.js → use-create-virtual-mcp-B7odZ_c3.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B1b4xMpn.js → use-infinite-scroll-CPhZNIw7.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-CytyaLQX.js → use-install-from-registry-BzwuBLOx.js} +1 -1
- package/dist/client/assets/{use-list-state-CCkxYz8q.js → use-list-state-CbsN6RbJ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BGZnglwN.js → use-mcp-prompts-Bel4H4rh.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-DSKOWSEO.js → use-mcp-resources-qGdymfRz.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C2aTDAuJ.js → use-mcp-tools-BCZI_Wqc.js} +1 -1
- package/dist/client/assets/{use-members-DjL_-1xN.js → use-members-B4ncWtMV.js} +1 -1
- package/dist/client/assets/{use-mobile-CMHMyYVi.js → use-mobile-DOUfTohp.js} +1 -1
- package/dist/client/assets/{use-project-DxPDjIre.js → use-project-b5C3lq5-.js} +1 -1
- package/dist/client/assets/{use-store-discovery-BBXrVOcG.js → use-store-discovery-B402mTHd.js} +1 -1
- package/dist/client/assets/{use-view-mode-CXln2RGt.js → use-view-mode-ss3eRodO.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-AdVimCkX.js → use-virtual-mcp-BP6aaUzw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BXDrDvlH.js +1 -0
- package/dist/client/assets/{useMutation-BDzOMrvq.js → useMutation-68NxhXCf.js} +1 -1
- package/dist/client/assets/useQuery-BYBCFxgb.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-X3jXt04i.js +1 -0
- package/dist/client/assets/{user-DSh4pFej.js → user-iDZRuimU.js} +1 -1
- package/dist/client/assets/{workflow-mIahQD3R.js → workflow-CrrTPehP.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/node_modules/pg-cloudflare/README.md +112 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.js +6 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +31 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.js +152 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +1 -0
- package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +3 -0
- package/dist/server/node_modules/pg-cloudflare/package.json +39 -0
- package/dist/server/node_modules/pg-cloudflare/src/empty.ts +3 -0
- package/dist/server/node_modules/pg-cloudflare/src/index.ts +166 -0
- package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +25 -0
- package/dist/server/node_modules/pg-connection-string/LICENSE +21 -0
- package/dist/server/node_modules/pg-connection-string/README.md +105 -0
- package/dist/server/node_modules/pg-connection-string/esm/index.mjs +8 -0
- package/dist/server/node_modules/pg-connection-string/index.d.ts +36 -0
- package/dist/server/node_modules/pg-connection-string/index.js +231 -0
- package/dist/server/node_modules/pg-connection-string/package.json +52 -0
- package/dist/server/node_modules/pg-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/pg-pool/LICENSE +21 -0
- package/dist/server/node_modules/pg-pool/README.md +357 -0
- package/dist/server/node_modules/pg-pool/esm/index.mjs +5 -0
- package/dist/server/node_modules/pg-pool/index.js +517 -0
- package/dist/server/node_modules/pg-pool/package.json +51 -0
- package/dist/server/node_modules/pg-protocol/LICENSE +21 -0
- package/dist/server/node_modules/pg-protocol/README.md +3 -0
- package/dist/server/node_modules/pg-protocol/dist/b.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js +23 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +15 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +16 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +530 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/index.d.ts +6 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js +15 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +162 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js +160 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +252 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +24 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js +324 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js +189 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/esm/index.js +11 -0
- package/dist/server/node_modules/pg-protocol/package.json +45 -0
- package/dist/server/node_modules/pg-protocol/src/b.ts +25 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +85 -0
- package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +575 -0
- package/dist/server/node_modules/pg-protocol/src/index.ts +11 -0
- package/dist/server/node_modules/pg-protocol/src/messages.ts +262 -0
- package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +276 -0
- package/dist/server/node_modules/pg-protocol/src/parser.ts +413 -0
- package/dist/server/node_modules/pg-protocol/src/serializer.ts +274 -0
- package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
- package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
- package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +1 -0
- package/dist/server/node_modules/pg-types/.travis.yml +7 -0
- package/dist/server/node_modules/pg-types/Makefile +14 -0
- package/dist/server/node_modules/pg-types/README.md +75 -0
- package/dist/server/node_modules/pg-types/index.d.ts +137 -0
- package/dist/server/node_modules/pg-types/index.js +47 -0
- package/dist/server/node_modules/pg-types/index.test-d.ts +21 -0
- package/dist/server/node_modules/pg-types/lib/arrayParser.js +11 -0
- package/dist/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
- package/dist/server/node_modules/pg-types/lib/builtins.js +73 -0
- package/dist/server/node_modules/pg-types/lib/textParsers.js +215 -0
- package/dist/server/node_modules/pg-types/package.json +42 -0
- package/dist/server/node_modules/pg-types/test/index.js +24 -0
- package/dist/server/node_modules/pg-types/test/types.js +597 -0
- package/dist/server/node_modules/pgpass/README.md +74 -0
- package/dist/server/node_modules/pgpass/lib/helper.js +233 -0
- package/dist/server/node_modules/pgpass/lib/index.js +23 -0
- package/dist/server/node_modules/pgpass/package.json +41 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/plugins-CJOgdAgY.js +0 -1
- package/dist/client/assets/tasks-CAcIEtSF.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Dw4aF3nd.js +0 -1
- package/dist/client/assets/useQuery-CTePvczf.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-All2JJwt.js +0 -1
- package/dist/server/node_modules/pg/README.md +0 -95
- package/dist/server/node_modules/pg/esm/index.mjs +0 -20
- package/dist/server/node_modules/pg/lib/client.js +0 -743
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
- package/dist/server/node_modules/pg/lib/connection.js +0 -221
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -91
- package/dist/server/node_modules/pg/lib/index.js +0 -73
- package/dist/server/node_modules/pg/lib/native/client.js +0 -323
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -252
- package/dist/server/node_modules/pg/lib/result.js +0 -109
- package/dist/server/node_modules/pg/lib/stream.js +0 -83
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -217
- package/dist/server/node_modules/pg/package.json +0 -76
- /package/dist/server/node_modules/{pg → pg-cloudflare}/LICENSE +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bL as M,r as B,c as H,u as T,D as U,j as r,Q as F,e as G,B as I,O as Z}from"./index-De7oAufQ.js";import{a as q}from"./use-project-DxPDjIre.js";import{P as A}from"./index-BaVHKLOw.js";import{C as J}from"./collection-search-CGfzh4mC.js";import{A as K}from"./avatar-B6y4oqG6.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as W}from"./empty-state-C1iyyf7G.js";import{C as X}from"./create-project-dialog-MCGuKGij.js";import{s as R}from"./Plus-Bah3bfIq.js";import{B as Y,a as ee,b as te,c as se}from"./breadcrumb-D8mb9kpq.js";import"./useQuery-CTePvczf.js";import"./constants-C6R-Odkq.js";import"./useMutation-BDzOMrvq.js";import"./tooltip-C4rlkzSj.js";import"./index-DtZLm-Fz.js";import"./Loading01-Bgt2pWQu.js";import"./SearchMd-CbNARIB_.js";import"./input-_VKm0O_1.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-Bw5T2ogY.js";import"./X-Dr3IGE6q.js";import"./form-B1LLlQBa.js";import"./label-BhDDQ3-n.js";import"./textarea-C_pKpP9s.js";import"./Check-BTP9VTUM.js";import"./ChevronRight-DWZgTrde.js";const re=M("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),V=({size:t=24,color:e="currentColor",...s})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},B.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7.5 4.5 5 5M16 14a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));V.displayName="FolderClosed";function le(t){const e=H.c(58),{project:s,onSettingsClick:d}=t,{org:l}=T(),c=s.ui?.themeColor??"#60a5fa",j=s.ui?.bannerColor??c,m=s.ui?.banner?`url(${s.ui.banner})`:void 0;let i;e[0]!==j||e[1]!==m?(i={backgroundColor:j,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=j,e[1]=m,e[2]=i):i=e[2];const S=i;let u;e[3]!==l.slug||e[4]!==s.slug?(u={org:l.slug,project:s.slug},e[3]=l.slug,e[4]=s.slug,e[5]=u):u=e[5];let f;e[6]!==d?(f=O=>{O.preventDefault(),O.stopPropagation(),d?.(O)},e[6]=d,e[7]=f):f=e[7];let x,b;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=U("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),b=r.jsx(re,{className:"size-3.5 text-white"}),e[8]=x,e[9]=b):(x=e[8],b=e[9]);let g;e[10]!==f?(g=r.jsx("button",{type:"button",onClick:f,className:x,children:b}),e[10]=f,e[11]=g):g=e[11];let a;e[12]!==S||e[13]!==g?(a=r.jsx("div",{className:"h-20 relative",style:S,children:g}),e[12]=S,e[13]=g,e[14]=a):a=e[14];let n;e[15]!==s.name||e[16]!==s.ui||e[17]!==c?(n=s.ui?.icon?r.jsx("img",{src:s.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):r.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:c},children:r.jsx("span",{className:"text-sm font-medium text-white",children:s.name.charAt(0).toUpperCase()})}),e[15]=s.name,e[16]=s.ui,e[17]=c,e[18]=n):n=e[18];let h;e[19]!==s.name?(h=r.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:s.name}),e[19]=s.name,e[20]=h):h=e[20];let p;e[21]!==s.updatedAt?(p=Q(new Date(s.updatedAt),{addSuffix:!0}),e[21]=s.updatedAt,e[22]=p):p=e[22];let C;e[23]!==p?(C=r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",p]}),e[23]=p,e[24]=C):C=e[24];let w;e[25]!==h||e[26]!==C?(w=r.jsxs("div",{className:"flex flex-col",children:[h,C]}),e[25]=h,e[26]=C,e[27]=w):w=e[27];let v;e[28]!==n||e[29]!==w?(v=r.jsxs("div",{className:"flex flex-col gap-4",children:[n,w]}),e[28]=n,e[29]=w,e[30]=v):v=e[30];let _;e[31]!==s.boundConnections?(_=s.boundConnections.slice(0,4).map(oe),e[31]=s.boundConnections,e[32]=_):_=e[32];let N;e[33]!==s.boundConnections.length?(N=s.boundConnections.length>4&&r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",s.boundConnections.length-4]})}),e[33]=s.boundConnections.length,e[34]=N):N=e[34];let z;e[35]!==_||e[36]!==N?(z=r.jsxs("div",{className:"flex pr-2",children:[_,N]}),e[35]=_,e[36]=N,e[37]=z):z=e[37];const P=l.logo??void 0;let k;e[38]!==l.name||e[39]!==P?(k=r.jsx(K,{url:P,fallback:l.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=l.name,e[39]=P,e[40]=k):k=e[40];let y;e[41]!==l.name?(y=r.jsx("span",{className:"truncate max-w-20",children:l.name}),e[41]=l.name,e[42]=y):y=e[42];let o;e[43]!==k||e[44]!==y?(o=r.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[k,y]}),e[43]=k,e[44]=y,e[45]=o):o=e[45];let L;e[46]!==z||e[47]!==o?(L=r.jsxs("div",{className:"flex items-center justify-between mt-4",children:[z,o]}),e[46]=z,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==v||e[50]!==L?($=r.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[v,L]}),e[49]=v,e[50]=L,e[51]=$):$=e[51];let E;e[52]!==$||e[53]!==a?(E=r.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[a,$]}),e[52]=$,e[53]=a,e[54]=E):E=e[54];let D;return e[55]!==E||e[56]!==u?(D=r.jsx(F,{to:"/$org/$project",params:u,className:"block group",children:E}),e[55]=E,e[56]=u,e[57]=D):D=e[57],D}function oe(t){return r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsx(ie,{connection:t})},t.id)}function ie(t){const e=H.c(13),{connection:s}=t;if(s.icon){let m;e[0]!==s.icon||e[1]!==s.title?(m=r.jsx("img",{src:s.icon,alt:s.title,className:"size-4 object-cover"}),e[0]=s.icon,e[1]=s.title,e[2]=m):m=e[2];let i;return e[3]!==s.title||e[4]!==m?(i=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:s.title,children:m}),e[3]=s.title,e[4]=m,e[5]=i):i=e[5],i}const d=s.title;let l;e[6]!==s.title?(l=s.title.charAt(0).toUpperCase(),e[6]=s.title,e[7]=l):l=e[7];let c;e[8]!==l?(c=r.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:l}),e[8]=l,e[9]=c):c=e[9];let j;return e[10]!==s.title||e[11]!==c?(j=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:d,children:c}),e[10]=s.title,e[11]=c,e[12]=j):j=e[12],j}function Be(){const t=H.c(39),{org:e}=T(),{data:s,isLoading:d}=q(e.id),[l,c]=B.useState(""),[j,m]=B.useState(!1),i=G();let S,u,f,x,b,g,a,n;if(t[0]!==d||t[1]!==i||t[2]!==e.slug||t[3]!==s||t[4]!==l){const w=s?.filter(ne)?.filter(o=>o.name.toLowerCase().includes(l.toLowerCase())||o.description?.toLowerCase().includes(l.toLowerCase()))??[];let v;t[13]!==i||t[14]!==e.slug?(v=o=>{i({to:"/$org/$project/settings/general",params:{org:e.slug,project:o}})},t[13]=i,t[14]=e.slug,t[15]=v):v=t[15];const _=v;let N;t[16]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{m(!0)},t[16]=N):N=t[16];const z=N;u=A;let P;t[17]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(A.Header.Left,{children:r.jsx(Y,{children:r.jsx(ee,{children:r.jsx(te,{children:r.jsx(se,{children:"Projects"})})})})}),t[17]=P):P=t[17];let k;t[18]===Symbol.for("react.memo_cache_sentinel")?(k=!1,t[18]=k):k=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsxs(A.Header,{children:[P,r.jsxs(A.Header.Right,{children:[k,r.jsxs(I,{onClick:z,size:"sm",children:[r.jsx(R,{size:14}),"Create Project"]})]})]}),t[19]=a):a=t[19];let y;t[20]===Symbol.for("react.memo_cache_sentinel")?(y=o=>{o.key==="Escape"&&(c(""),o.target.blur())},t[20]=y):y=t[20],t[21]!==l?(n=r.jsx(J,{value:l,onChange:c,placeholder:"Search for a project...",onKeyDown:y}),t[21]=l,t[22]=n):n=t[22],S=A.Content,f="@container",t[23]!==d?(x=d&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(ae)})}),t[23]=d,t[24]=x):x=t[24],b=!d&&w.length===0&&r.jsx("div",{className:"flex items-center h-full",children:r.jsx(W,{image:r.jsx(V,{size:48,className:"text-muted-foreground"}),title:l?"No projects found":"No projects yet",description:l?`No projects match "${l}"`:"Create a project to get started.",actions:!l&&r.jsxs(I,{size:"sm",onClick:z,children:[r.jsx(R,{size:14}),"Create Project"]})})}),g=!d&&w.length>0&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:w.map(o=>r.jsx(le,{project:o,onSettingsClick:()=>_(o.slug)},o.id))})}),t[0]=d,t[1]=i,t[2]=e.slug,t[3]=s,t[4]=l,t[5]=S,t[6]=u,t[7]=f,t[8]=x,t[9]=b,t[10]=g,t[11]=a,t[12]=n}else S=t[5],u=t[6],f=t[7],x=t[8],b=t[9],g=t[10],a=t[11],n=t[12];let h;t[25]!==S||t[26]!==f||t[27]!==x||t[28]!==b||t[29]!==g?(h=r.jsxs(S,{className:f,children:[x,b,g]}),t[25]=S,t[26]=f,t[27]=x,t[28]=b,t[29]=g,t[30]=h):h=t[30];let p;t[31]!==j?(p=r.jsx(X,{open:j,onOpenChange:m}),t[31]=j,t[32]=p):p=t[32];let C;return t[33]!==u||t[34]!==a||t[35]!==n||t[36]!==h||t[37]!==p?(C=r.jsxs(u,{children:[a,n,h,p]}),t[33]=u,t[34]=a,t[35]=n,t[36]=h,t[37]=p,t[38]=C):C=t[38],C}function ae(t,e){return r.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ne(t){return t.slug!==Z}export{Be as default};
|
|
1
|
+
import{bL as M,r as B,c as H,u as T,D as U,j as r,Q as F,e as G,B as I,O as Z}from"./index-NjMxPJgF.js";import{a as q}from"./use-project-b5C3lq5-.js";import{P as A}from"./index-De1iYnQy.js";import{C as J}from"./collection-search-BYV7N3mr.js";import{A as K}from"./avatar-B2yArl-q.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as W}from"./empty-state-xIvMMy-_.js";import{C as X}from"./create-project-dialog-BeIY4Oy9.js";import{s as R}from"./Plus-CajZ9VfC.js";import{B as Y,a as ee,b as te,c as se}from"./breadcrumb-C2RG4nAQ.js";import"./useQuery-BYBCFxgb.js";import"./constants-D7qXOYRn.js";import"./useMutation-68NxhXCf.js";import"./tooltip-BJMSu0c2.js";import"./index-CqyqI90F.js";import"./Loading01-Bb8FCosd.js";import"./SearchMd-eZWeU0sP.js";import"./input-B89sozd8.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-ChXYvlDt.js";import"./X-LzehymHS.js";import"./form-CaFPTMVC.js";import"./label-DkiEYJcU.js";import"./textarea-DIJzFUWn.js";import"./Check-DW8AVFkq.js";import"./ChevronRight-DsjLlugM.js";const re=M("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),V=({size:t=24,color:e="currentColor",...s})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},B.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7.5 4.5 5 5M16 14a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));V.displayName="FolderClosed";function le(t){const e=H.c(58),{project:s,onSettingsClick:d}=t,{org:l}=T(),c=s.ui?.themeColor??"#60a5fa",j=s.ui?.bannerColor??c,m=s.ui?.banner?`url(${s.ui.banner})`:void 0;let i;e[0]!==j||e[1]!==m?(i={backgroundColor:j,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=j,e[1]=m,e[2]=i):i=e[2];const S=i;let u;e[3]!==l.slug||e[4]!==s.slug?(u={org:l.slug,project:s.slug},e[3]=l.slug,e[4]=s.slug,e[5]=u):u=e[5];let f;e[6]!==d?(f=O=>{O.preventDefault(),O.stopPropagation(),d?.(O)},e[6]=d,e[7]=f):f=e[7];let x,b;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=U("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),b=r.jsx(re,{className:"size-3.5 text-white"}),e[8]=x,e[9]=b):(x=e[8],b=e[9]);let g;e[10]!==f?(g=r.jsx("button",{type:"button",onClick:f,className:x,children:b}),e[10]=f,e[11]=g):g=e[11];let a;e[12]!==S||e[13]!==g?(a=r.jsx("div",{className:"h-20 relative",style:S,children:g}),e[12]=S,e[13]=g,e[14]=a):a=e[14];let n;e[15]!==s.name||e[16]!==s.ui||e[17]!==c?(n=s.ui?.icon?r.jsx("img",{src:s.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):r.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:c},children:r.jsx("span",{className:"text-sm font-medium text-white",children:s.name.charAt(0).toUpperCase()})}),e[15]=s.name,e[16]=s.ui,e[17]=c,e[18]=n):n=e[18];let h;e[19]!==s.name?(h=r.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:s.name}),e[19]=s.name,e[20]=h):h=e[20];let p;e[21]!==s.updatedAt?(p=Q(new Date(s.updatedAt),{addSuffix:!0}),e[21]=s.updatedAt,e[22]=p):p=e[22];let C;e[23]!==p?(C=r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",p]}),e[23]=p,e[24]=C):C=e[24];let w;e[25]!==h||e[26]!==C?(w=r.jsxs("div",{className:"flex flex-col",children:[h,C]}),e[25]=h,e[26]=C,e[27]=w):w=e[27];let v;e[28]!==n||e[29]!==w?(v=r.jsxs("div",{className:"flex flex-col gap-4",children:[n,w]}),e[28]=n,e[29]=w,e[30]=v):v=e[30];let _;e[31]!==s.boundConnections?(_=s.boundConnections.slice(0,4).map(oe),e[31]=s.boundConnections,e[32]=_):_=e[32];let N;e[33]!==s.boundConnections.length?(N=s.boundConnections.length>4&&r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",s.boundConnections.length-4]})}),e[33]=s.boundConnections.length,e[34]=N):N=e[34];let z;e[35]!==_||e[36]!==N?(z=r.jsxs("div",{className:"flex pr-2",children:[_,N]}),e[35]=_,e[36]=N,e[37]=z):z=e[37];const P=l.logo??void 0;let k;e[38]!==l.name||e[39]!==P?(k=r.jsx(K,{url:P,fallback:l.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=l.name,e[39]=P,e[40]=k):k=e[40];let y;e[41]!==l.name?(y=r.jsx("span",{className:"truncate max-w-20",children:l.name}),e[41]=l.name,e[42]=y):y=e[42];let o;e[43]!==k||e[44]!==y?(o=r.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[k,y]}),e[43]=k,e[44]=y,e[45]=o):o=e[45];let L;e[46]!==z||e[47]!==o?(L=r.jsxs("div",{className:"flex items-center justify-between mt-4",children:[z,o]}),e[46]=z,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==v||e[50]!==L?($=r.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[v,L]}),e[49]=v,e[50]=L,e[51]=$):$=e[51];let E;e[52]!==$||e[53]!==a?(E=r.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[a,$]}),e[52]=$,e[53]=a,e[54]=E):E=e[54];let D;return e[55]!==E||e[56]!==u?(D=r.jsx(F,{to:"/$org/$project",params:u,className:"block group",children:E}),e[55]=E,e[56]=u,e[57]=D):D=e[57],D}function oe(t){return r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsx(ie,{connection:t})},t.id)}function ie(t){const e=H.c(13),{connection:s}=t;if(s.icon){let m;e[0]!==s.icon||e[1]!==s.title?(m=r.jsx("img",{src:s.icon,alt:s.title,className:"size-4 object-cover"}),e[0]=s.icon,e[1]=s.title,e[2]=m):m=e[2];let i;return e[3]!==s.title||e[4]!==m?(i=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:s.title,children:m}),e[3]=s.title,e[4]=m,e[5]=i):i=e[5],i}const d=s.title;let l;e[6]!==s.title?(l=s.title.charAt(0).toUpperCase(),e[6]=s.title,e[7]=l):l=e[7];let c;e[8]!==l?(c=r.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:l}),e[8]=l,e[9]=c):c=e[9];let j;return e[10]!==s.title||e[11]!==c?(j=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:d,children:c}),e[10]=s.title,e[11]=c,e[12]=j):j=e[12],j}function Be(){const t=H.c(39),{org:e}=T(),{data:s,isLoading:d}=q(e.id),[l,c]=B.useState(""),[j,m]=B.useState(!1),i=G();let S,u,f,x,b,g,a,n;if(t[0]!==d||t[1]!==i||t[2]!==e.slug||t[3]!==s||t[4]!==l){const w=s?.filter(ne)?.filter(o=>o.name.toLowerCase().includes(l.toLowerCase())||o.description?.toLowerCase().includes(l.toLowerCase()))??[];let v;t[13]!==i||t[14]!==e.slug?(v=o=>{i({to:"/$org/$project/settings/general",params:{org:e.slug,project:o}})},t[13]=i,t[14]=e.slug,t[15]=v):v=t[15];const _=v;let N;t[16]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{m(!0)},t[16]=N):N=t[16];const z=N;u=A;let P;t[17]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(A.Header.Left,{children:r.jsx(Y,{children:r.jsx(ee,{children:r.jsx(te,{children:r.jsx(se,{children:"Projects"})})})})}),t[17]=P):P=t[17];let k;t[18]===Symbol.for("react.memo_cache_sentinel")?(k=!1,t[18]=k):k=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsxs(A.Header,{children:[P,r.jsxs(A.Header.Right,{children:[k,r.jsxs(I,{onClick:z,size:"sm",children:[r.jsx(R,{size:14}),"Create Project"]})]})]}),t[19]=a):a=t[19];let y;t[20]===Symbol.for("react.memo_cache_sentinel")?(y=o=>{o.key==="Escape"&&(c(""),o.target.blur())},t[20]=y):y=t[20],t[21]!==l?(n=r.jsx(J,{value:l,onChange:c,placeholder:"Search for a project...",onKeyDown:y}),t[21]=l,t[22]=n):n=t[22],S=A.Content,f="@container",t[23]!==d?(x=d&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(ae)})}),t[23]=d,t[24]=x):x=t[24],b=!d&&w.length===0&&r.jsx("div",{className:"flex items-center h-full",children:r.jsx(W,{image:r.jsx(V,{size:48,className:"text-muted-foreground"}),title:l?"No projects found":"No projects yet",description:l?`No projects match "${l}"`:"Create a project to get started.",actions:!l&&r.jsxs(I,{size:"sm",onClick:z,children:[r.jsx(R,{size:14}),"Create Project"]})})}),g=!d&&w.length>0&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:w.map(o=>r.jsx(le,{project:o,onSettingsClick:()=>_(o.slug)},o.id))})}),t[0]=d,t[1]=i,t[2]=e.slug,t[3]=s,t[4]=l,t[5]=S,t[6]=u,t[7]=f,t[8]=x,t[9]=b,t[10]=g,t[11]=a,t[12]=n}else S=t[5],u=t[6],f=t[7],x=t[8],b=t[9],g=t[10],a=t[11],n=t[12];let h;t[25]!==S||t[26]!==f||t[27]!==x||t[28]!==b||t[29]!==g?(h=r.jsxs(S,{className:f,children:[x,b,g]}),t[25]=S,t[26]=f,t[27]=x,t[28]=b,t[29]=g,t[30]=h):h=t[30];let p;t[31]!==j?(p=r.jsx(X,{open:j,onOpenChange:m}),t[31]=j,t[32]=p):p=t[32];let C;return t[33]!==u||t[34]!==a||t[35]!==n||t[36]!==h||t[37]!==p?(C=r.jsxs(u,{children:[a,n,h,p]}),t[33]=u,t[34]=a,t[35]=n,t[36]=h,t[37]=p,t[38]=C):C=t[38],C}function ae(t,e){return r.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ne(t){return t.slug!==Z}export{Be as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as I,c as X,u as de,w as Le,bU as Ke,j as t,B as G,D as ee,v as H,ce as pn,a as fn,i as gn}from"./index-De7oAufQ.js";import{i as it}from"./CheckCircle-DoZ7ERyW.js";import{n as jn}from"./Container-D7IaxBn4.js";import{t as vn}from"./Settings01-ncSo0UF1.js";import{u as Fe}from"./useQuery-CTePvczf.js";import{u as Ce}from"./useMutation-BDzOMrvq.js";import{a as pe,u as he,f as gs}from"./constants-C6R-Odkq.js";import{u as js}from"./useInfiniteQuery-Dw4aF3nd.js";import{B as F}from"./badge-BWsagPlP.js";import{I as xe}from"./input-_VKm0O_1.js";import{a as Tt,c as Ee,D as It,b as Mt,g as rs,l as is,h as bn}from"./dropdown-menu-Dan8nMb8.js";import{T as vs,a as bs,b as Pt,c as Ie,d as ys,e as Me}from"./table-BPkNFl3F.js";import{T as yn,a as ls}from"./toggle-group-VpRSF_Gl.js";import{u as Nn}from"./use-view-mode-CXln2RGt.js";import{i as Ht}from"./DotsVertical-CmyZ1eER.js";import{i as wn}from"./FilterLines-D-lo1vJH.js";import{i as Ns}from"./Globe01-jlGiKRJ-.js";import{i as et}from"./Loading01-Bgt2pWQu.js";import{i as ws}from"./SearchMd-CbNARIB_.js";import{b as Et,c as Dt,d as $t,e as At,a as Lt,D as Ot}from"./dialog-Bw5T2ogY.js";import{i as xt}from"./AlertCircle-DOAxiEBN.js";import{n as Cn}from"./Download01-C0zy7iAO.js";import{i as as}from"./Upload01-CrylBwgE.js";import{c as ht,b as pt,d as ft,A as gt,h as jt,e as vt,a as bt,f as yt}from"./alert-dialog-CGRFjIvo.js";import{C as oe}from"./card-C0MItTW_.js";import{i as os}from"./CheckVerified02-CyloHbYs.js";import{s as wt}from"./Trash01-DJLT0hlL.js";import{L as re}from"./label-BhDDQ3-n.js";import{S as Cs,a as _s,b as ks,c as Ss,d as Rt}from"./select-B4liIMVc.js";import{S as Xe}from"./switch-DHS6rwq-.js";import{T as zt}from"./textarea-C_pKpP9s.js";import{i as _n}from"./ArrowLeft-B-tpcvF0.js";import{a as kn,i as Sn,u as Qt,t as Rn}from"./use-copy-Cyun7kVE.js";import{s as Wt}from"./RefreshCcw01-D6TQ-sWU.js";import{i as Tn}from"./X-Dr3IGE6q.js";import{i as In}from"./Link01-GDNtvq6w.js";import{t as Rs}from"./ChevronDown-CLapIRmf.js";import{n as Mn}from"./ChevronUp-DGOtRvEF.js";import{C as Pn}from"./checkbox-DUU3Nuea.js";import{s as Ts}from"./Eye-B3PAdhmZ.js";import{n as En}from"./LinkExternal01-Cmp1Jq7T.js";import{e as Is}from"./use-collections-CN-KZdhF.js";import{b as Ms}from"./use-connection-C4RNTGYe.js";import{b as Dn,P as $n,a as An}from"./popover-D_qGIJiq.js";import{i as Vt}from"./Check-BTP9VTUM.js";import{a as Kt}from"./Copy01-BJ5f3Ft8.js";import{i as Ln}from"./EyeOff-_G9JY6d-.js";import{i as On,a as zn}from"./Save01-DMdPXvfp.js";import{i as Un}from"./Key01-p6odXPoE.js";import{s as qn}from"./Plus-Bah3bfIq.js";import{a as Fn,b as Bn,T as Gn}from"./tooltip-C4rlkzSj.js";import{i as Qn}from"./Play-C6mSLsW0.js";import"./infiniteQueryObserver-C7xXp1jr.js";import"./ChevronRight-DWZgTrde.js";import"./use-mobile-CMHMyYVi.js";import"./index-DtZLm-Fz.js";const Ps=({size:s=24,color:e="currentColor",...n})=>I.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},I.createElement("path",{d:"M12.5 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H17c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C21 18.395 21 17.93 21 17m-2-9V2m-3 3h6M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4.49 3.418-8.459 7.69c-.476.433-.714.649-.735.836a.5.5 0 0 0 .167.431C6.105 21 6.426 21 7.07 21h9.387c1.44 0 2.159 0 2.724-.242a3 3 0 0 0 1.578-1.578c.242-.565.242-1.285.242-2.724 0-.484 0-.726-.053-.952a2.001 2.001 0 0 0-.374-.778c-.143-.182-.332-.333-.71-.636l-2.797-2.237c-.379-.303-.568-.454-.776-.508a1 1 0 0 0-.557.018c-.205.066-.384.23-.743.555Z"}));Ps.displayName="ImagePlus";const Es=({size:s=24,color:e="currentColor",...n})=>I.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},I.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}),I.createElement("path",{d:"M8 9.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 8 9.04 8 9.6 8h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 8.76 16 9.04 16 9.6v4.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C15.24 16 14.96 16 14.4 16H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 15.24 8 14.96 8 14.4V9.6Z"}));Es.displayName="StopSquare";const Jt=({size:s=24,color:e="currentColor",...n})=>I.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},I.createElement("path",{d:"m6 6 4.5 4.5M6 6H3L2 3l1-1 3 1v3Zm13.259-3.259-2.628 2.628c-.396.396-.594.594-.668.822a1 1 0 0 0 0 .618c.074.228.272.426.668.822l.238.238c.396.396.594.594.822.668a1 1 0 0 0 .618 0c.228-.074.426-.272.822-.668L21.59 5.41a5.5 5.5 0 0 1-6.16 7.485c-.485-.096-.729-.144-.876-.13a.836.836 0 0 0-.373.114c-.13.07-.261.201-.523.463L6.5 20.5a2.121 2.121 0 0 1-3-3l7.157-7.157c.262-.262.393-.393.463-.524a.836.836 0 0 0 .113-.372c.015-.148-.033-.39-.129-.877a5.5 5.5 0 0 1 8.155-5.83ZM12 15l5.5 5.5a2.121 2.121 0 0 0 3-3l-4.525-4.525a5.475 5.475 0 0 1-.934-.17c-.39-.107-.816-.03-1.101.255L12 15Z"}));Jt.displayName="Tool02";const W={all:["private-registry"],items:()=>[...W.all,"items"],itemsList:(s,e,n,r)=>[...W.items(),"list",{search:s,tags:e,categories:n,limit:r}],item:s=>[...W.items(),"item",s],filters:()=>[...W.all,"filters"],registryConfig:()=>[...W.all,"registry-config"],registryConfigByPlugin:(s,e)=>[...W.registryConfig(),s,e],publishRequests:()=>[...W.all,"publish-requests"],publishRequestsByOrg:s=>[...W.publishRequests(),"org",s],publishRequestsList:(s,e,n)=>[...W.publishRequests(),"list",{status:s??"all",sortBy:e??"created_at",sortDirection:n??"desc"}],publishRequestsListByOrg:(s,e,n,r)=>[...W.publishRequestsByOrg(s),"list",{status:e??"all",sortBy:n??"created_at",sortDirection:r??"desc"}],publishRequestsCount:()=>[...W.publishRequests(),"count"],publishRequestsCountByOrg:s=>[...W.publishRequestsByOrg(s),"count"],publishApiKeys:()=>[...W.all,"publish-api-keys"],monitor:()=>[...W.all,"monitor"],monitorRuns:()=>[...W.monitor(),"runs"],monitorRunsList:s=>[...W.monitorRuns(),"list",{status:s??"all"}],monitorRun:s=>[...W.monitorRuns(),"run",s??"none"],monitorResults:()=>[...W.monitor(),"results"],monitorResultsList:(s,e)=>[...W.monitorResults(),"list",{runId:s??"none",status:e??"all"}],monitorConnections:()=>[...W.monitor(),"connections"],monitorConnectionAuthProbe:s=>[...W.monitorConnections(),"auth-probe",s]};async function Pe(s,e,n){const r=await s.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function Vn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>Pe(o,"REGISTRY_MONITOR_RUN_START",{config:d}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await Promise.all([e.invalidateQueries({queryKey:W.monitorRuns()}),e.invalidateQueries({queryKey:W.monitorResults()})])},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Kn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>Pe(o,"REGISTRY_MONITOR_RUN_CANCEL",{runId:d}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async(d,m)=>{await Promise.all([e.invalidateQueries({queryKey:W.monitorRuns()}),e.invalidateQueries({queryKey:W.monitorRun(m)})])},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Ut(s){const e=X.c(10),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=he(r);let l;e[2]!==s?(l=W.monitorRunsList(s),e[2]=s,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==s?(a=async()=>Pe(o,"REGISTRY_MONITOR_RUN_LIST",{status:s,limit:100}),e[4]=o,e[5]=s,e[6]=a):a=e[6];let i;return e[7]!==l||e[8]!==a?(i={queryKey:l,queryFn:a,staleTime:5e3},e[7]=l,e[8]=a,e[9]=i):i=e[9],Fe(i)}function Zt(s){const e=X.c(11),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=he(r);let l;e[2]!==s?(l=W.monitorRun(s),e[2]=s,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==s?(a=async()=>Pe(o,"REGISTRY_MONITOR_RUN_GET",{runId:s}),e[4]=o,e[5]=s,e[6]=a):a=e[6];const i=!!s;let d;return e[7]!==l||e[8]!==a||e[9]!==i?(d={queryKey:l,queryFn:a,enabled:i,refetchInterval:Yn},e[7]=l,e[8]=a,e[9]=i,e[10]=d):d=e[10],Fe(d)}function Yn(s){return s.state.data?.run?.status==="running"?5e3:!1}function Ct(s,e,n){const r=X.c(14),{org:o}=de();let l;r[0]!==o.id?(l={connectionId:pe,orgId:o.id},r[0]=o.id,r[1]=l):l=r[1];const a=he(l);let i;r[2]!==s||r[3]!==e?(i=W.monitorResultsList(s,e),r[2]=s,r[3]=e,r[4]=i):i=r[4];let d;r[5]!==a||r[6]!==s||r[7]!==e?(d=async()=>Pe(a,"REGISTRY_MONITOR_RESULT_LIST",{runId:s,status:e,limit:200,offset:0}),r[5]=a,r[6]=s,r[7]=e,r[8]=d):d=r[8];const m=!!s,u=n==="running"?2500:!1;let x;return r[9]!==i||r[10]!==d||r[11]!==m||r[12]!==u?(x={queryKey:i,queryFn:d,enabled:m,staleTime:5e3,refetchInterval:u},r[9]=i,r[10]=d,r[11]=m,r[12]=u,r[13]=x):x=r[13],Fe(x)}function Ds(){const s=X.c(5),{org:e}=de();let n;s[0]!==e.id?(n={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=n):n=s[1];const r=he(n);let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=W.monitorConnections(),s[2]=o):o=s[2];let l;return s[3]!==r?(l={queryKey:o,queryFn:async()=>Pe(r,"REGISTRY_MONITOR_CONNECTION_LIST",{}),staleTime:1e4},s[3]=r,s[4]=l):l=s[4],Fe(l)}function Hn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async()=>Pe(o,"REGISTRY_MONITOR_CONNECTION_SYNC",{}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.monitorConnections()})},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Wn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>{const{connectionId:m,authStatus:u}=d;return Pe(o,"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",{connectionId:m,authStatus:u})},s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.monitorConnections()})},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}const cs={monitorMode:"health_check",onFailure:"none",schedule:"manual",cronExpression:"",scheduleEventId:"",perMcpTimeoutMs:3e4,perToolTimeoutMs:1e4,maxAgentSteps:15,testPublicOnly:!1,testPrivateOnly:!1,includePendingRequests:!1,agentContext:"",llmConnectionId:"",llmModelId:""};function $s(){const s=X.c(33),{org:e,project:n}=de();let r;s[0]!==e.id?(r={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=r):r=s[1];const o=he(r),l=Le();let a;s[2]!==n.id?(a=W.registryConfigByPlugin(n.id??"",Ke),s[2]=n.id,s[3]=a):a=s[3];let i;s[4]!==o||s[5]!==n.id?(i=async()=>Pe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:Ke}),s[4]=o,s[5]=n.id,s[6]=i):i=s[6];const d=!!n.id;let m;s[7]!==a||s[8]!==i||s[9]!==d?(m={queryKey:a,queryFn:i,enabled:d},s[7]=a,s[8]=i,s[9]=d,s[10]=m):m=s[10];const u=Fe(m),x=u.data?.config?.settings,p=x&&typeof x=="object"?x.testConfig:void 0,c=typeof(x?x.monitorMode??x.testMode:void 0)=="string";let v;s[11]!==p?(v=p??{},s[11]=p,s[12]=v):v=s[12];let b;s[13]!==c||s[14]!==x||s[15]!==p?(b=c&&!p?x:{},s[13]=c,s[14]=x,s[15]=p,s[16]=b):b=s[16];let k;s[17]!==v||s[18]!==b?(k={...cs,...v,...b},s[17]=v,s[18]=b,s[19]=k):k=s[19];const S=k;let y;s[20]!==o||s[21]!==n.id?(y=async R=>{const C=(await Pe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:Ke}))?.config?.settings??{};return Pe(o,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:n.id,pluginId:Ke,settings:{...C,testConfig:{...cs,...C.testConfig??{},...R}}})},s[20]=o,s[21]=n.id,s[22]=y):y=s[22];let f;s[23]!==n.id||s[24]!==l?(f=async()=>{await l.invalidateQueries({queryKey:W.registryConfigByPlugin(n.id??"",Ke)})},s[23]=n.id,s[24]=l,s[25]=f):f=s[25];let M;s[26]!==y||s[27]!==f?(M={mutationFn:y,onSuccess:f},s[26]=y,s[27]=f,s[28]=M):M=s[28];const g=Ce(M);let w;return s[29]!==u.isLoading||s[30]!==g||s[31]!==S?(w={settings:S,isLoading:u.isLoading,saveMutation:g},s[29]=u.isLoading,s[30]=g,s[31]=S,s[32]=w):w=s[32],w}function Jn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>Pe(o,"REGISTRY_MONITOR_SCHEDULE_SET",d),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.registryConfig()})},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Zn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>Pe(o,"REGISTRY_MONITOR_SCHEDULE_CANCEL",{scheduleEventId:d}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.registryConfig()})},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Xn(){const s=X.c(3),e=Ut("completed"),n=e.data?.items?.[0]?.id,r=e.data?.items?.[0]?.status,o=Ct(n,"failed",r),l=o.data?.items?.length??0,a=e.isLoading||o.isLoading;let i;return s[0]!==l||s[1]!==a?(i={brokenCount:l,isLoading:a},s[0]=l,s[1]=a,s[2]=i):i=s[2],i}const As=24;function er(s){return s.trim()}async function _e(s,e,n){const r=await s.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function Ls(s){const e=X.c(19),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=he(r);let l,a,i,d;e[2]!==s.categories||e[3]!==s.limit||e[4]!==s.search||e[5]!==s.tags?(a=er(s.search),l=s.limit??As,d=js,i=W.itemsList(a,s.tags,s.categories,l),e[2]=s.categories,e[3]=s.limit,e[4]=s.search,e[5]=s.tags,e[6]=l,e[7]=a,e[8]=i,e[9]=d):(l=e[6],a=e[7],i=e[8],d=e[9]);let m;e[10]!==o||e[11]!==l||e[12]!==s.categories||e[13]!==s.tags||e[14]!==a?(m=async x=>{const{pageParam:p}=x,h=a.length>0?{operator:"or",conditions:[{field:["title"],operator:"contains",value:a},{field:["description"],operator:"contains",value:a},{field:["id"],operator:"contains",value:a},{field:["server","name"],operator:"contains",value:a}]}:void 0;return _e(o,"REGISTRY_ITEM_LIST",{cursor:p,limit:l,tags:s.tags.length?s.tags:void 0,categories:s.categories.length?s.categories:void 0,where:h})},e[10]=o,e[11]=l,e[12]=s.categories,e[13]=s.tags,e[14]=a,e[15]=m):m=e[15];let u;return e[16]!==i||e[17]!==m?(u={queryKey:i,queryFn:m,initialPageParam:void 0,getNextPageParam:tr,staleTime:3e4},e[16]=i,e[17]=m,e[18]=u):u=e[18],d(u)}function tr(s){return s.nextCursor}function sr(){const s=X.c(8),{org:e}=de();let n;s[0]!==e.id?(n={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=n):n=s[1];const r=he(n);let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=W.filters(),s[2]=o):o=s[2];let l;s[3]!==r?(l=async()=>_e(r,"REGISTRY_ITEM_FILTERS",{}),s[3]=r,s[4]=l):l=s[4];let a;s[5]===Symbol.for("react.memo_cache_sentinel")?(a={tags:[],categories:[]},s[5]=a):a=s[5];let i;return s[6]!==l?(i={queryKey:o,queryFn:l,placeholderData:a,staleTime:6e4},s[6]=l,s[7]=i):i=s[7],Fe(i)}function Xt(){const s=X.c(29),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:W.items()}),e.invalidateQueries({queryKey:W.filters()})])},s[2]=e,s[3]=l):l=s[3];const a=l;let i;s[4]!==o?(i=async f=>(await _e(o,"REGISTRY_ITEM_CREATE",{data:f})).item,s[4]=o,s[5]=i):i=s[5];let d;s[6]!==a||s[7]!==i?(d={mutationFn:i,onSuccess:a},s[6]=a,s[7]=i,s[8]=d):d=s[8];const m=Ce(d);let u;s[9]!==o?(u=async f=>{const{id:M,data:g}=f;return(await _e(o,"REGISTRY_ITEM_UPDATE",{id:M,data:g})).item},s[9]=o,s[10]=u):u=s[10];let x;s[11]!==a||s[12]!==u?(x={mutationFn:u,onSuccess:a},s[11]=a,s[12]=u,s[13]=x):x=s[13];const p=Ce(x);let h;s[14]!==o?(h=async f=>(await _e(o,"REGISTRY_ITEM_DELETE",{id:f})).item,s[14]=o,s[15]=h):h=s[15];let c;s[16]!==a||s[17]!==h?(c={mutationFn:h,onSuccess:a},s[16]=a,s[17]=h,s[18]=c):c=s[18];const v=Ce(c);let b;s[19]!==o?(b=async f=>_e(o,"REGISTRY_ITEM_BULK_CREATE",{items:f}),s[19]=o,s[20]=b):b=s[20];let k;s[21]!==a||s[22]!==b?(k={mutationFn:b,onSuccess:a},s[21]=a,s[22]=b,s[23]=k):k=s[23];const S=Ce(k);let y;return s[24]!==S||s[25]!==m||s[26]!==v||s[27]!==p?(y={createMutation:m,updateMutation:p,deleteMutation:v,bulkCreateMutation:S},s[24]=S,s[25]=m,s[26]=v,s[27]=p,s[28]=y):y=s[28],y}function qt(s){const e=X.c(37),{org:n,project:r}=de();let o;e[0]!==n.id?(o={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const l=he(o),a=Le();let i;e[2]!==s||e[3]!==r.id?(i=W.registryConfigByPlugin(r.id??"",s),e[2]=s,e[3]=r.id,e[4]=i):i=e[4];let d;e[5]!==l||e[6]!==s||e[7]!==r.id?(d=async()=>_e(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:s}),e[5]=l,e[6]=s,e[7]=r.id,e[8]=d):d=e[8];const m=!!r.id;let u;e[9]!==i||e[10]!==d||e[11]!==m?(u={queryKey:i,queryFn:d,enabled:m,staleTime:6e4},e[9]=i,e[10]=d,e[11]=m,e[12]=u):u=e[12];const x=Fe(u);let p;e[13]!==l||e[14]!==s||e[15]!==r.id?(p=async A=>{const P=(await _e(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:s}))?.config?.settings??{};return _e(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:r.id,pluginId:s,settings:{...P,...A}})},e[13]=l,e[14]=s,e[15]=r.id,e[16]=p):p=e[16];let h;e[17]!==s||e[18]!==r.id||e[19]!==a?(h=async()=>{await a.invalidateQueries({queryKey:W.registryConfigByPlugin(r.id??"",s)})},e[17]=s,e[18]=r.id,e[19]=a,e[20]=h):h=e[20];let c;e[21]!==p||e[22]!==h?(c={mutationFn:p,onSuccess:h},e[21]=p,e[22]=h,e[23]=c):c=e[23];const v=Ce(c),b=x.data?.config?.settings?.registryName??"Private Registry",k=x.data?.config?.settings?.registryIcon??"",S=x.data?.config?.settings?.llmConnectionId??"",y=x.data?.config?.settings?.llmModelId??"",f=x.data?.config?.settings?.acceptPublishRequests??!1,M=x.data?.config?.settings?.requireApiToken??!1,g=x.data?.config?.settings?.storePrivateOnly??!1,w=x.data?.config?.settings?.rateLimitEnabled??!0,E=x.data?.config?.settings?.rateLimitWindow==="minute"?"minute":"hour",C=x.data?.config?.settings?.rateLimitMax,T=typeof C=="number"&&C>=1?Math.floor(C):100;let N;return e[24]!==f||e[25]!==x.isLoading||e[26]!==w||e[27]!==T||e[28]!==E||e[29]!==k||e[30]!==S||e[31]!==y||e[32]!==b||e[33]!==M||e[34]!==v||e[35]!==g?(N={registryName:b,registryIcon:k,registryLLMConnectionId:S,registryLLMModelId:y,acceptPublishRequests:f,requireApiToken:M,storePrivateOnly:g,rateLimitEnabled:w,rateLimitWindow:E,rateLimitMax:T,isLoadingConfig:x.isLoading,saveRegistryConfigMutation:v},e[24]=f,e[25]=x.isLoading,e[26]=w,e[27]=T,e[28]=E,e[29]=k,e[30]=S,e[31]=y,e[32]=b,e[33]=M,e[34]=v,e[35]=g,e[36]=N):N=e[36],N}function nr(s){const e=X.c(15),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=he(r);let l;e[2]!==n.id||e[3]!==s.sortBy||e[4]!==s.sortDirection||e[5]!==s.status?(l=W.publishRequestsListByOrg(n.id,s.status,s.sortBy,s.sortDirection),e[2]=n.id,e[3]=s.sortBy,e[4]=s.sortDirection,e[5]=s.status,e[6]=l):l=e[6];let a;e[7]!==o||e[8]!==s.sortBy||e[9]!==s.sortDirection||e[10]!==s.status?(a=async d=>{const{pageParam:m}=d;return _e(o,"REGISTRY_PUBLISH_REQUEST_LIST",{status:s.status,sortBy:s.sortBy,sortDirection:s.sortDirection,limit:As,offset:m})},e[7]=o,e[8]=s.sortBy,e[9]=s.sortDirection,e[10]=s.status,e[11]=a):a=e[11];let i;return e[12]!==l||e[13]!==a?(i={queryKey:l,queryFn:a,initialPageParam:0,getNextPageParam:rr,staleTime:3e4,refetchOnMount:!0},e[12]=l,e[13]=a,e[14]=i):i=e[14],js(i)}function rr(s,e){const n=e.reduce(ir,0);return n<s.totalCount?n:void 0}function ir(s,e){return s+e.items.length}function lr(){const s=X.c(9),{org:e}=de();let n;s[0]!==e.id?(n={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=n):n=s[1];const r=he(n);let o;s[2]!==e.id?(o=W.publishRequestsCountByOrg(e.id),s[2]=e.id,s[3]=o):o=s[3];let l;s[4]!==r?(l=async()=>_e(r,"REGISTRY_PUBLISH_REQUEST_COUNT",{}),s[4]=r,s[5]=l):l=s[5];let a;return s[6]!==o||s[7]!==l?(a={queryKey:o,queryFn:l,staleTime:3e4},s[6]=o,s[7]=l,s[8]=a):a=s[8],Fe(a)}function ar(){const s=X.c(17),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:W.publishRequests()})])},s[2]=e,s[3]=l):l=s[3];const a=l;let i;s[4]!==o?(i=async c=>_e(o,"REGISTRY_PUBLISH_REQUEST_REVIEW",c),s[4]=o,s[5]=i):i=s[5];let d;s[6]!==a||s[7]!==i?(d={mutationFn:i,onSuccess:a},s[6]=a,s[7]=i,s[8]=d):d=s[8];const m=Ce(d);let u;s[9]!==o?(u=async c=>_e(o,"REGISTRY_PUBLISH_REQUEST_DELETE",{id:c}),s[9]=o,s[10]=u):u=s[10];let x;s[11]!==a||s[12]!==u?(x={mutationFn:u,onSuccess:a},s[11]=a,s[12]=u,s[13]=x):x=s[13];const p=Ce(x);let h;return s[14]!==p||s[15]!==m?(h={reviewMutation:m,deleteMutation:p},s[14]=p,s[15]=m,s[16]=h):h=s[16],h}function or(){const s=X.c(5),{org:e}=de();let n;s[0]!==e.id?(n={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=n):n=s[1];const r=he(n);let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=W.publishApiKeys(),s[2]=o):o=s[2];let l;return s[3]!==r?(l={queryKey:o,queryFn:async()=>_e(r,"REGISTRY_PUBLISH_API_KEY_LIST",{}),staleTime:3e4},s[3]=r,s[4]=l):l=s[4],Fe(l)}function cr(){const s=X.c(19),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async c=>_e(o,"REGISTRY_PUBLISH_API_KEY_GENERATE",{name:c}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.publishApiKeys()})},s[4]=e,s[5]=a):a=s[5];let i;s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8];const d=Ce(i);let m;s[9]!==o?(m=async c=>_e(o,"REGISTRY_PUBLISH_API_KEY_REVOKE",{keyId:c}),s[9]=o,s[10]=m):m=s[10];let u;s[11]!==e?(u=async()=>{await e.invalidateQueries({queryKey:W.publishApiKeys()})},s[11]=e,s[12]=u):u=s[12];let x;s[13]!==m||s[14]!==u?(x={mutationFn:m,onSuccess:u},s[13]=m,s[14]=u,s[15]=x):x=s[15];const p=Ce(x);let h;return s[16]!==d||s[17]!==p?(h={generateMutation:d,revokeMutation:p},s[16]=d,s[17]=p,s[18]=h):h=s[18],h}function ds(s){return s?s.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function ms(s){const e=[];let n="",r=!1;for(let o=0;o<s.length;o+=1){const l=s[o],a=s[o+1];if(l==='"'){r&&a==='"'?(n+='"',o+=1):r=!r;continue}if(l===","&&!r){e.push(n.trim()),n="";continue}n+=l}return e.push(n.trim()),e}const dr=["id","title"],mr=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function ur(s){const e=s.split(/\r?\n/).map(m=>m.trim()).filter(Boolean);if(e.length<2)return{items:[],warnings:[{line:0,message:"CSV must have a header row and at least one data row"}],skipped:0};const n=ms(e[0]??""),r=new Map,o=[];n.forEach((m,u)=>{const x=m.toLowerCase().trim();x&&r.set(x,u)});for(const m of dr)r.has(m)||o.push({line:1,message:`Missing required column: "${m}"`});for(const m of n){const u=m.toLowerCase().trim();u&&!mr.includes(u)&&o.push({line:1,message:`Unknown column "${m}" will be ignored`})}if(!r.has("id")||!r.has("title"))return{items:[],warnings:o,skipped:0};const l=(m,u)=>{const x=r.get(u);return typeof x=="number"?m[x]??"":""},a=[],i=new Set;let d=0;for(let m=1;m<e.length;m+=1){const u=ms(e[m]??""),x=l(u,"id").trim(),p=l(u,"title").trim();if(!x){o.push({line:m+1,message:"Missing id — row skipped"}),d+=1;continue}if(!p){o.push({line:m+1,message:`Missing title for id="${x}" — row skipped`}),d+=1;continue}if(i.has(x)){o.push({line:m+1,message:`Duplicate id="${x}" — row skipped`}),d+=1;continue}i.add(x);const h=l(u,"description").trim(),c=l(u,"remote_url").trim(),b=l(u,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",k=ds(l(u,"tags")),S=ds(l(u,"categories")),y=l(u,"is_public").trim().toLowerCase(),f=y==="true"||y==="1"||y==="yes";a.push({id:x,title:p,description:h||null,is_public:f,_meta:{"mcp.mesh":{...k.length>0?{tags:k}:{},...S.length>0?{categories:S}:{}}},server:{name:x,title:p,description:h||void 0,remotes:c?[{type:b,url:c}]:[]}})}return{items:a,warnings:o,skipped:d}}const xr=`id,title,description,remote_url,remote_type,tags,categories,is_public
|
|
1
|
+
import{r as I,c as X,u as de,w as Le,bU as Ke,j as t,B as G,D as ee,v as H,ce as pn,a as fn,i as gn}from"./index-NjMxPJgF.js";import{i as it}from"./CheckCircle-hBpanOsI.js";import{n as jn}from"./Container-DHyMOW_p.js";import{t as vn}from"./Settings01-ClPVpLPy.js";import{u as Fe}from"./useQuery-BYBCFxgb.js";import{u as Ce}from"./useMutation-68NxhXCf.js";import{a as pe,u as he,f as gs}from"./constants-D7qXOYRn.js";import{u as js}from"./useInfiniteQuery-BXDrDvlH.js";import{B as F}from"./badge-DtRom7JO.js";import{I as xe}from"./input-B89sozd8.js";import{a as Tt,c as Ee,D as It,b as Mt,g as rs,l as is,h as bn}from"./dropdown-menu-BxlQMXgW.js";import{T as vs,a as bs,b as Pt,c as Ie,d as ys,e as Me}from"./table-C-1rP_rt.js";import{T as yn,a as ls}from"./toggle-group-DlZGDyPQ.js";import{u as Nn}from"./use-view-mode-ss3eRodO.js";import{i as Ht}from"./DotsVertical-2nyye7GD.js";import{i as wn}from"./FilterLines-Dvk7BhWf.js";import{i as Ns}from"./Globe01-B8Ib7knn.js";import{i as et}from"./Loading01-Bb8FCosd.js";import{i as ws}from"./SearchMd-eZWeU0sP.js";import{b as Et,c as Dt,d as $t,e as At,a as Lt,D as Ot}from"./dialog-ChXYvlDt.js";import{i as xt}from"./AlertCircle-12chRuly.js";import{n as Cn}from"./Download01-BvtNZalG.js";import{i as as}from"./Upload01-CLIOr3Tj.js";import{c as ht,b as pt,d as ft,A as gt,h as jt,e as vt,a as bt,f as yt}from"./alert-dialog-B_ae3oRt.js";import{C as oe}from"./card-B8qDZGCZ.js";import{i as os}from"./CheckVerified02-r17ymUCs.js";import{s as wt}from"./Trash01-B_4PTwjI.js";import{L as re}from"./label-DkiEYJcU.js";import{S as Cs,a as _s,b as ks,c as Ss,d as Rt}from"./select-Dx3T3-4n.js";import{S as Xe}from"./switch-CA_oYDia.js";import{T as zt}from"./textarea-DIJzFUWn.js";import{i as _n}from"./ArrowLeft-erI8s3G2.js";import{a as kn,i as Sn,u as Qt,t as Rn}from"./use-copy-xhdji_Bl.js";import{s as Wt}from"./RefreshCcw01-B_NTitRE.js";import{i as Tn}from"./X-LzehymHS.js";import{i as In}from"./Link01-Cz_ZRKoB.js";import{t as Rs}from"./ChevronDown-BIRGQoZ5.js";import{n as Mn}from"./ChevronUp-Bi3NMXzv.js";import{C as Pn}from"./checkbox-B1rexahu.js";import{s as Ts}from"./Eye-hBqNQHpc.js";import{n as En}from"./LinkExternal01-CKvCiQnV.js";import{e as Is}from"./use-collections-C0cYiFfV.js";import{b as Ms}from"./use-connection-CHFdKnsr.js";import{b as Dn,P as $n,a as An}from"./popover-Br8QkMK3.js";import{i as Vt}from"./Check-DW8AVFkq.js";import{a as Kt}from"./Copy01-DkcjIGiS.js";import{i as Ln}from"./EyeOff-CJoTkAtN.js";import{i as On,a as zn}from"./Save01-8oEsqMkJ.js";import{i as Un}from"./Key01-qNySmY39.js";import{s as qn}from"./Plus-CajZ9VfC.js";import{a as Fn,b as Bn,T as Gn}from"./tooltip-BJMSu0c2.js";import{i as Qn}from"./Play-Bw5lQw7j.js";import"./infiniteQueryObserver-JZ0YxCW-.js";import"./ChevronRight-DsjLlugM.js";import"./use-mobile-DOUfTohp.js";import"./index-CqyqI90F.js";const Ps=({size:s=24,color:e="currentColor",...n})=>I.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},I.createElement("path",{d:"M12.5 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H17c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C21 18.395 21 17.93 21 17m-2-9V2m-3 3h6M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4.49 3.418-8.459 7.69c-.476.433-.714.649-.735.836a.5.5 0 0 0 .167.431C6.105 21 6.426 21 7.07 21h9.387c1.44 0 2.159 0 2.724-.242a3 3 0 0 0 1.578-1.578c.242-.565.242-1.285.242-2.724 0-.484 0-.726-.053-.952a2.001 2.001 0 0 0-.374-.778c-.143-.182-.332-.333-.71-.636l-2.797-2.237c-.379-.303-.568-.454-.776-.508a1 1 0 0 0-.557.018c-.205.066-.384.23-.743.555Z"}));Ps.displayName="ImagePlus";const Es=({size:s=24,color:e="currentColor",...n})=>I.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},I.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}),I.createElement("path",{d:"M8 9.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 8 9.04 8 9.6 8h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 8.76 16 9.04 16 9.6v4.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C15.24 16 14.96 16 14.4 16H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 15.24 8 14.96 8 14.4V9.6Z"}));Es.displayName="StopSquare";const Jt=({size:s=24,color:e="currentColor",...n})=>I.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},I.createElement("path",{d:"m6 6 4.5 4.5M6 6H3L2 3l1-1 3 1v3Zm13.259-3.259-2.628 2.628c-.396.396-.594.594-.668.822a1 1 0 0 0 0 .618c.074.228.272.426.668.822l.238.238c.396.396.594.594.822.668a1 1 0 0 0 .618 0c.228-.074.426-.272.822-.668L21.59 5.41a5.5 5.5 0 0 1-6.16 7.485c-.485-.096-.729-.144-.876-.13a.836.836 0 0 0-.373.114c-.13.07-.261.201-.523.463L6.5 20.5a2.121 2.121 0 0 1-3-3l7.157-7.157c.262-.262.393-.393.463-.524a.836.836 0 0 0 .113-.372c.015-.148-.033-.39-.129-.877a5.5 5.5 0 0 1 8.155-5.83ZM12 15l5.5 5.5a2.121 2.121 0 0 0 3-3l-4.525-4.525a5.475 5.475 0 0 1-.934-.17c-.39-.107-.816-.03-1.101.255L12 15Z"}));Jt.displayName="Tool02";const W={all:["private-registry"],items:()=>[...W.all,"items"],itemsList:(s,e,n,r)=>[...W.items(),"list",{search:s,tags:e,categories:n,limit:r}],item:s=>[...W.items(),"item",s],filters:()=>[...W.all,"filters"],registryConfig:()=>[...W.all,"registry-config"],registryConfigByPlugin:(s,e)=>[...W.registryConfig(),s,e],publishRequests:()=>[...W.all,"publish-requests"],publishRequestsByOrg:s=>[...W.publishRequests(),"org",s],publishRequestsList:(s,e,n)=>[...W.publishRequests(),"list",{status:s??"all",sortBy:e??"created_at",sortDirection:n??"desc"}],publishRequestsListByOrg:(s,e,n,r)=>[...W.publishRequestsByOrg(s),"list",{status:e??"all",sortBy:n??"created_at",sortDirection:r??"desc"}],publishRequestsCount:()=>[...W.publishRequests(),"count"],publishRequestsCountByOrg:s=>[...W.publishRequestsByOrg(s),"count"],publishApiKeys:()=>[...W.all,"publish-api-keys"],monitor:()=>[...W.all,"monitor"],monitorRuns:()=>[...W.monitor(),"runs"],monitorRunsList:s=>[...W.monitorRuns(),"list",{status:s??"all"}],monitorRun:s=>[...W.monitorRuns(),"run",s??"none"],monitorResults:()=>[...W.monitor(),"results"],monitorResultsList:(s,e)=>[...W.monitorResults(),"list",{runId:s??"none",status:e??"all"}],monitorConnections:()=>[...W.monitor(),"connections"],monitorConnectionAuthProbe:s=>[...W.monitorConnections(),"auth-probe",s]};async function Pe(s,e,n){const r=await s.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function Vn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>Pe(o,"REGISTRY_MONITOR_RUN_START",{config:d}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await Promise.all([e.invalidateQueries({queryKey:W.monitorRuns()}),e.invalidateQueries({queryKey:W.monitorResults()})])},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Kn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>Pe(o,"REGISTRY_MONITOR_RUN_CANCEL",{runId:d}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async(d,m)=>{await Promise.all([e.invalidateQueries({queryKey:W.monitorRuns()}),e.invalidateQueries({queryKey:W.monitorRun(m)})])},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Ut(s){const e=X.c(10),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=he(r);let l;e[2]!==s?(l=W.monitorRunsList(s),e[2]=s,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==s?(a=async()=>Pe(o,"REGISTRY_MONITOR_RUN_LIST",{status:s,limit:100}),e[4]=o,e[5]=s,e[6]=a):a=e[6];let i;return e[7]!==l||e[8]!==a?(i={queryKey:l,queryFn:a,staleTime:5e3},e[7]=l,e[8]=a,e[9]=i):i=e[9],Fe(i)}function Zt(s){const e=X.c(11),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=he(r);let l;e[2]!==s?(l=W.monitorRun(s),e[2]=s,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==s?(a=async()=>Pe(o,"REGISTRY_MONITOR_RUN_GET",{runId:s}),e[4]=o,e[5]=s,e[6]=a):a=e[6];const i=!!s;let d;return e[7]!==l||e[8]!==a||e[9]!==i?(d={queryKey:l,queryFn:a,enabled:i,refetchInterval:Yn},e[7]=l,e[8]=a,e[9]=i,e[10]=d):d=e[10],Fe(d)}function Yn(s){return s.state.data?.run?.status==="running"?5e3:!1}function Ct(s,e,n){const r=X.c(14),{org:o}=de();let l;r[0]!==o.id?(l={connectionId:pe,orgId:o.id},r[0]=o.id,r[1]=l):l=r[1];const a=he(l);let i;r[2]!==s||r[3]!==e?(i=W.monitorResultsList(s,e),r[2]=s,r[3]=e,r[4]=i):i=r[4];let d;r[5]!==a||r[6]!==s||r[7]!==e?(d=async()=>Pe(a,"REGISTRY_MONITOR_RESULT_LIST",{runId:s,status:e,limit:200,offset:0}),r[5]=a,r[6]=s,r[7]=e,r[8]=d):d=r[8];const m=!!s,u=n==="running"?2500:!1;let x;return r[9]!==i||r[10]!==d||r[11]!==m||r[12]!==u?(x={queryKey:i,queryFn:d,enabled:m,staleTime:5e3,refetchInterval:u},r[9]=i,r[10]=d,r[11]=m,r[12]=u,r[13]=x):x=r[13],Fe(x)}function Ds(){const s=X.c(5),{org:e}=de();let n;s[0]!==e.id?(n={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=n):n=s[1];const r=he(n);let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=W.monitorConnections(),s[2]=o):o=s[2];let l;return s[3]!==r?(l={queryKey:o,queryFn:async()=>Pe(r,"REGISTRY_MONITOR_CONNECTION_LIST",{}),staleTime:1e4},s[3]=r,s[4]=l):l=s[4],Fe(l)}function Hn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async()=>Pe(o,"REGISTRY_MONITOR_CONNECTION_SYNC",{}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.monitorConnections()})},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Wn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>{const{connectionId:m,authStatus:u}=d;return Pe(o,"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",{connectionId:m,authStatus:u})},s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.monitorConnections()})},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}const cs={monitorMode:"health_check",onFailure:"none",schedule:"manual",cronExpression:"",scheduleEventId:"",perMcpTimeoutMs:3e4,perToolTimeoutMs:1e4,maxAgentSteps:15,testPublicOnly:!1,testPrivateOnly:!1,includePendingRequests:!1,agentContext:"",llmConnectionId:"",llmModelId:""};function $s(){const s=X.c(33),{org:e,project:n}=de();let r;s[0]!==e.id?(r={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=r):r=s[1];const o=he(r),l=Le();let a;s[2]!==n.id?(a=W.registryConfigByPlugin(n.id??"",Ke),s[2]=n.id,s[3]=a):a=s[3];let i;s[4]!==o||s[5]!==n.id?(i=async()=>Pe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:Ke}),s[4]=o,s[5]=n.id,s[6]=i):i=s[6];const d=!!n.id;let m;s[7]!==a||s[8]!==i||s[9]!==d?(m={queryKey:a,queryFn:i,enabled:d},s[7]=a,s[8]=i,s[9]=d,s[10]=m):m=s[10];const u=Fe(m),x=u.data?.config?.settings,p=x&&typeof x=="object"?x.testConfig:void 0,c=typeof(x?x.monitorMode??x.testMode:void 0)=="string";let v;s[11]!==p?(v=p??{},s[11]=p,s[12]=v):v=s[12];let b;s[13]!==c||s[14]!==x||s[15]!==p?(b=c&&!p?x:{},s[13]=c,s[14]=x,s[15]=p,s[16]=b):b=s[16];let k;s[17]!==v||s[18]!==b?(k={...cs,...v,...b},s[17]=v,s[18]=b,s[19]=k):k=s[19];const S=k;let y;s[20]!==o||s[21]!==n.id?(y=async R=>{const C=(await Pe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:Ke}))?.config?.settings??{};return Pe(o,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:n.id,pluginId:Ke,settings:{...C,testConfig:{...cs,...C.testConfig??{},...R}}})},s[20]=o,s[21]=n.id,s[22]=y):y=s[22];let f;s[23]!==n.id||s[24]!==l?(f=async()=>{await l.invalidateQueries({queryKey:W.registryConfigByPlugin(n.id??"",Ke)})},s[23]=n.id,s[24]=l,s[25]=f):f=s[25];let M;s[26]!==y||s[27]!==f?(M={mutationFn:y,onSuccess:f},s[26]=y,s[27]=f,s[28]=M):M=s[28];const g=Ce(M);let w;return s[29]!==u.isLoading||s[30]!==g||s[31]!==S?(w={settings:S,isLoading:u.isLoading,saveMutation:g},s[29]=u.isLoading,s[30]=g,s[31]=S,s[32]=w):w=s[32],w}function Jn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>Pe(o,"REGISTRY_MONITOR_SCHEDULE_SET",d),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.registryConfig()})},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Zn(){const s=X.c(9),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async d=>Pe(o,"REGISTRY_MONITOR_SCHEDULE_CANCEL",{scheduleEventId:d}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.registryConfig()})},s[4]=e,s[5]=a):a=s[5];let i;return s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8],Ce(i)}function Xn(){const s=X.c(3),e=Ut("completed"),n=e.data?.items?.[0]?.id,r=e.data?.items?.[0]?.status,o=Ct(n,"failed",r),l=o.data?.items?.length??0,a=e.isLoading||o.isLoading;let i;return s[0]!==l||s[1]!==a?(i={brokenCount:l,isLoading:a},s[0]=l,s[1]=a,s[2]=i):i=s[2],i}const As=24;function er(s){return s.trim()}async function _e(s,e,n){const r=await s.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function Ls(s){const e=X.c(19),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=he(r);let l,a,i,d;e[2]!==s.categories||e[3]!==s.limit||e[4]!==s.search||e[5]!==s.tags?(a=er(s.search),l=s.limit??As,d=js,i=W.itemsList(a,s.tags,s.categories,l),e[2]=s.categories,e[3]=s.limit,e[4]=s.search,e[5]=s.tags,e[6]=l,e[7]=a,e[8]=i,e[9]=d):(l=e[6],a=e[7],i=e[8],d=e[9]);let m;e[10]!==o||e[11]!==l||e[12]!==s.categories||e[13]!==s.tags||e[14]!==a?(m=async x=>{const{pageParam:p}=x,h=a.length>0?{operator:"or",conditions:[{field:["title"],operator:"contains",value:a},{field:["description"],operator:"contains",value:a},{field:["id"],operator:"contains",value:a},{field:["server","name"],operator:"contains",value:a}]}:void 0;return _e(o,"REGISTRY_ITEM_LIST",{cursor:p,limit:l,tags:s.tags.length?s.tags:void 0,categories:s.categories.length?s.categories:void 0,where:h})},e[10]=o,e[11]=l,e[12]=s.categories,e[13]=s.tags,e[14]=a,e[15]=m):m=e[15];let u;return e[16]!==i||e[17]!==m?(u={queryKey:i,queryFn:m,initialPageParam:void 0,getNextPageParam:tr,staleTime:3e4},e[16]=i,e[17]=m,e[18]=u):u=e[18],d(u)}function tr(s){return s.nextCursor}function sr(){const s=X.c(8),{org:e}=de();let n;s[0]!==e.id?(n={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=n):n=s[1];const r=he(n);let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=W.filters(),s[2]=o):o=s[2];let l;s[3]!==r?(l=async()=>_e(r,"REGISTRY_ITEM_FILTERS",{}),s[3]=r,s[4]=l):l=s[4];let a;s[5]===Symbol.for("react.memo_cache_sentinel")?(a={tags:[],categories:[]},s[5]=a):a=s[5];let i;return s[6]!==l?(i={queryKey:o,queryFn:l,placeholderData:a,staleTime:6e4},s[6]=l,s[7]=i):i=s[7],Fe(i)}function Xt(){const s=X.c(29),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:W.items()}),e.invalidateQueries({queryKey:W.filters()})])},s[2]=e,s[3]=l):l=s[3];const a=l;let i;s[4]!==o?(i=async f=>(await _e(o,"REGISTRY_ITEM_CREATE",{data:f})).item,s[4]=o,s[5]=i):i=s[5];let d;s[6]!==a||s[7]!==i?(d={mutationFn:i,onSuccess:a},s[6]=a,s[7]=i,s[8]=d):d=s[8];const m=Ce(d);let u;s[9]!==o?(u=async f=>{const{id:M,data:g}=f;return(await _e(o,"REGISTRY_ITEM_UPDATE",{id:M,data:g})).item},s[9]=o,s[10]=u):u=s[10];let x;s[11]!==a||s[12]!==u?(x={mutationFn:u,onSuccess:a},s[11]=a,s[12]=u,s[13]=x):x=s[13];const p=Ce(x);let h;s[14]!==o?(h=async f=>(await _e(o,"REGISTRY_ITEM_DELETE",{id:f})).item,s[14]=o,s[15]=h):h=s[15];let c;s[16]!==a||s[17]!==h?(c={mutationFn:h,onSuccess:a},s[16]=a,s[17]=h,s[18]=c):c=s[18];const v=Ce(c);let b;s[19]!==o?(b=async f=>_e(o,"REGISTRY_ITEM_BULK_CREATE",{items:f}),s[19]=o,s[20]=b):b=s[20];let k;s[21]!==a||s[22]!==b?(k={mutationFn:b,onSuccess:a},s[21]=a,s[22]=b,s[23]=k):k=s[23];const S=Ce(k);let y;return s[24]!==S||s[25]!==m||s[26]!==v||s[27]!==p?(y={createMutation:m,updateMutation:p,deleteMutation:v,bulkCreateMutation:S},s[24]=S,s[25]=m,s[26]=v,s[27]=p,s[28]=y):y=s[28],y}function qt(s){const e=X.c(37),{org:n,project:r}=de();let o;e[0]!==n.id?(o={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const l=he(o),a=Le();let i;e[2]!==s||e[3]!==r.id?(i=W.registryConfigByPlugin(r.id??"",s),e[2]=s,e[3]=r.id,e[4]=i):i=e[4];let d;e[5]!==l||e[6]!==s||e[7]!==r.id?(d=async()=>_e(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:s}),e[5]=l,e[6]=s,e[7]=r.id,e[8]=d):d=e[8];const m=!!r.id;let u;e[9]!==i||e[10]!==d||e[11]!==m?(u={queryKey:i,queryFn:d,enabled:m,staleTime:6e4},e[9]=i,e[10]=d,e[11]=m,e[12]=u):u=e[12];const x=Fe(u);let p;e[13]!==l||e[14]!==s||e[15]!==r.id?(p=async A=>{const P=(await _e(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:s}))?.config?.settings??{};return _e(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:r.id,pluginId:s,settings:{...P,...A}})},e[13]=l,e[14]=s,e[15]=r.id,e[16]=p):p=e[16];let h;e[17]!==s||e[18]!==r.id||e[19]!==a?(h=async()=>{await a.invalidateQueries({queryKey:W.registryConfigByPlugin(r.id??"",s)})},e[17]=s,e[18]=r.id,e[19]=a,e[20]=h):h=e[20];let c;e[21]!==p||e[22]!==h?(c={mutationFn:p,onSuccess:h},e[21]=p,e[22]=h,e[23]=c):c=e[23];const v=Ce(c),b=x.data?.config?.settings?.registryName??"Private Registry",k=x.data?.config?.settings?.registryIcon??"",S=x.data?.config?.settings?.llmConnectionId??"",y=x.data?.config?.settings?.llmModelId??"",f=x.data?.config?.settings?.acceptPublishRequests??!1,M=x.data?.config?.settings?.requireApiToken??!1,g=x.data?.config?.settings?.storePrivateOnly??!1,w=x.data?.config?.settings?.rateLimitEnabled??!0,E=x.data?.config?.settings?.rateLimitWindow==="minute"?"minute":"hour",C=x.data?.config?.settings?.rateLimitMax,T=typeof C=="number"&&C>=1?Math.floor(C):100;let N;return e[24]!==f||e[25]!==x.isLoading||e[26]!==w||e[27]!==T||e[28]!==E||e[29]!==k||e[30]!==S||e[31]!==y||e[32]!==b||e[33]!==M||e[34]!==v||e[35]!==g?(N={registryName:b,registryIcon:k,registryLLMConnectionId:S,registryLLMModelId:y,acceptPublishRequests:f,requireApiToken:M,storePrivateOnly:g,rateLimitEnabled:w,rateLimitWindow:E,rateLimitMax:T,isLoadingConfig:x.isLoading,saveRegistryConfigMutation:v},e[24]=f,e[25]=x.isLoading,e[26]=w,e[27]=T,e[28]=E,e[29]=k,e[30]=S,e[31]=y,e[32]=b,e[33]=M,e[34]=v,e[35]=g,e[36]=N):N=e[36],N}function nr(s){const e=X.c(15),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:pe,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=he(r);let l;e[2]!==n.id||e[3]!==s.sortBy||e[4]!==s.sortDirection||e[5]!==s.status?(l=W.publishRequestsListByOrg(n.id,s.status,s.sortBy,s.sortDirection),e[2]=n.id,e[3]=s.sortBy,e[4]=s.sortDirection,e[5]=s.status,e[6]=l):l=e[6];let a;e[7]!==o||e[8]!==s.sortBy||e[9]!==s.sortDirection||e[10]!==s.status?(a=async d=>{const{pageParam:m}=d;return _e(o,"REGISTRY_PUBLISH_REQUEST_LIST",{status:s.status,sortBy:s.sortBy,sortDirection:s.sortDirection,limit:As,offset:m})},e[7]=o,e[8]=s.sortBy,e[9]=s.sortDirection,e[10]=s.status,e[11]=a):a=e[11];let i;return e[12]!==l||e[13]!==a?(i={queryKey:l,queryFn:a,initialPageParam:0,getNextPageParam:rr,staleTime:3e4,refetchOnMount:!0},e[12]=l,e[13]=a,e[14]=i):i=e[14],js(i)}function rr(s,e){const n=e.reduce(ir,0);return n<s.totalCount?n:void 0}function ir(s,e){return s+e.items.length}function lr(){const s=X.c(9),{org:e}=de();let n;s[0]!==e.id?(n={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=n):n=s[1];const r=he(n);let o;s[2]!==e.id?(o=W.publishRequestsCountByOrg(e.id),s[2]=e.id,s[3]=o):o=s[3];let l;s[4]!==r?(l=async()=>_e(r,"REGISTRY_PUBLISH_REQUEST_COUNT",{}),s[4]=r,s[5]=l):l=s[5];let a;return s[6]!==o||s[7]!==l?(a={queryKey:o,queryFn:l,staleTime:3e4},s[6]=o,s[7]=l,s[8]=a):a=s[8],Fe(a)}function ar(){const s=X.c(17),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:W.publishRequests()})])},s[2]=e,s[3]=l):l=s[3];const a=l;let i;s[4]!==o?(i=async c=>_e(o,"REGISTRY_PUBLISH_REQUEST_REVIEW",c),s[4]=o,s[5]=i):i=s[5];let d;s[6]!==a||s[7]!==i?(d={mutationFn:i,onSuccess:a},s[6]=a,s[7]=i,s[8]=d):d=s[8];const m=Ce(d);let u;s[9]!==o?(u=async c=>_e(o,"REGISTRY_PUBLISH_REQUEST_DELETE",{id:c}),s[9]=o,s[10]=u):u=s[10];let x;s[11]!==a||s[12]!==u?(x={mutationFn:u,onSuccess:a},s[11]=a,s[12]=u,s[13]=x):x=s[13];const p=Ce(x);let h;return s[14]!==p||s[15]!==m?(h={reviewMutation:m,deleteMutation:p},s[14]=p,s[15]=m,s[16]=h):h=s[16],h}function or(){const s=X.c(5),{org:e}=de();let n;s[0]!==e.id?(n={connectionId:pe,orgId:e.id},s[0]=e.id,s[1]=n):n=s[1];const r=he(n);let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=W.publishApiKeys(),s[2]=o):o=s[2];let l;return s[3]!==r?(l={queryKey:o,queryFn:async()=>_e(r,"REGISTRY_PUBLISH_API_KEY_LIST",{}),staleTime:3e4},s[3]=r,s[4]=l):l=s[4],Fe(l)}function cr(){const s=X.c(19),e=Le(),{org:n}=de();let r;s[0]!==n.id?(r={connectionId:pe,orgId:n.id},s[0]=n.id,s[1]=r):r=s[1];const o=he(r);let l;s[2]!==o?(l=async c=>_e(o,"REGISTRY_PUBLISH_API_KEY_GENERATE",{name:c}),s[2]=o,s[3]=l):l=s[3];let a;s[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:W.publishApiKeys()})},s[4]=e,s[5]=a):a=s[5];let i;s[6]!==l||s[7]!==a?(i={mutationFn:l,onSuccess:a},s[6]=l,s[7]=a,s[8]=i):i=s[8];const d=Ce(i);let m;s[9]!==o?(m=async c=>_e(o,"REGISTRY_PUBLISH_API_KEY_REVOKE",{keyId:c}),s[9]=o,s[10]=m):m=s[10];let u;s[11]!==e?(u=async()=>{await e.invalidateQueries({queryKey:W.publishApiKeys()})},s[11]=e,s[12]=u):u=s[12];let x;s[13]!==m||s[14]!==u?(x={mutationFn:m,onSuccess:u},s[13]=m,s[14]=u,s[15]=x):x=s[15];const p=Ce(x);let h;return s[16]!==d||s[17]!==p?(h={generateMutation:d,revokeMutation:p},s[16]=d,s[17]=p,s[18]=h):h=s[18],h}function ds(s){return s?s.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function ms(s){const e=[];let n="",r=!1;for(let o=0;o<s.length;o+=1){const l=s[o],a=s[o+1];if(l==='"'){r&&a==='"'?(n+='"',o+=1):r=!r;continue}if(l===","&&!r){e.push(n.trim()),n="";continue}n+=l}return e.push(n.trim()),e}const dr=["id","title"],mr=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function ur(s){const e=s.split(/\r?\n/).map(m=>m.trim()).filter(Boolean);if(e.length<2)return{items:[],warnings:[{line:0,message:"CSV must have a header row and at least one data row"}],skipped:0};const n=ms(e[0]??""),r=new Map,o=[];n.forEach((m,u)=>{const x=m.toLowerCase().trim();x&&r.set(x,u)});for(const m of dr)r.has(m)||o.push({line:1,message:`Missing required column: "${m}"`});for(const m of n){const u=m.toLowerCase().trim();u&&!mr.includes(u)&&o.push({line:1,message:`Unknown column "${m}" will be ignored`})}if(!r.has("id")||!r.has("title"))return{items:[],warnings:o,skipped:0};const l=(m,u)=>{const x=r.get(u);return typeof x=="number"?m[x]??"":""},a=[],i=new Set;let d=0;for(let m=1;m<e.length;m+=1){const u=ms(e[m]??""),x=l(u,"id").trim(),p=l(u,"title").trim();if(!x){o.push({line:m+1,message:"Missing id — row skipped"}),d+=1;continue}if(!p){o.push({line:m+1,message:`Missing title for id="${x}" — row skipped`}),d+=1;continue}if(i.has(x)){o.push({line:m+1,message:`Duplicate id="${x}" — row skipped`}),d+=1;continue}i.add(x);const h=l(u,"description").trim(),c=l(u,"remote_url").trim(),b=l(u,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",k=ds(l(u,"tags")),S=ds(l(u,"categories")),y=l(u,"is_public").trim().toLowerCase(),f=y==="true"||y==="1"||y==="yes";a.push({id:x,title:p,description:h||null,is_public:f,_meta:{"mcp.mesh":{...k.length>0?{tags:k}:{},...S.length>0?{categories:S}:{}}},server:{name:x,title:p,description:h||void 0,remotes:c?[{type:b,url:c}]:[]}})}return{items:a,warnings:o,skipped:d}}const xr=`id,title,description,remote_url,remote_type,tags,categories,is_public
|
|
2
2
|
my-mcp-server,My MCP Server,A useful MCP server,https://example.com/mcp,http,ai|tools,productivity,true
|
|
3
3
|
another-server,Another Server,Another useful server,https://example2.com/mcp,http,data|analytics,data-processing,false`;function hr(){const s=new Blob([xr],{type:"text/csv;charset=utf-8"}),e=URL.createObjectURL(s),n=document.createElement("a");n.href=e,n.download="registry-import-template.csv",n.click(),URL.revokeObjectURL(e)}function pr(s){const e=X.c(63),{open:n,onOpenChange:r,isImporting:o,onImport:l}=s,a=o===void 0?!1:o,[i,d]=I.useState(null),[m,u]=I.useState(null),[x,p]=I.useState(null),h=I.useRef(null);let c;e[0]!==r?(c=Z=>{r(Z),Z||(d(null),u(null),p(null),h.current&&(h.current.value=""))},e[0]=r,e[1]=c):c=e[1];const v=c;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=async Z=>{if(!Z)return;p(Z.name),u(null);const ce=await Z.text();d(ur(ce))},e[2]=b):b=e[2];const k=b;let S;e[3]!==l||e[4]!==i?(S=async()=>{if(!i?.items.length)return;const Z=await l(i.items);u(Z)},e[3]=l,e[4]=i,e[5]=S):S=e[5];const y=S;let f;e[6]!==i?.items?(f=i?.items??[],e[6]=i?.items,e[7]=f):f=e[7];const M=f;let g;e[8]!==i?.warnings?(g=i?.warnings??[],e[8]=i?.warnings,e[9]=g):g=e[9];const w=g;let R;e[10]!==w?(R=w.some(vr),e[10]=w,e[11]=R):R=e[11];const E=R,C=m!==null;let T;e[12]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsxs(Et,{children:[t.jsx(Dt,{children:"Import MCP Servers from CSV"}),t.jsx($t,{children:"Upload a CSV file to bulk-import MCP servers into the registry."})]}),e[12]=T):T=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=()=>h.current?.click(),e[13]=N):N=e[13];let A;e[14]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(as,{size:14}),e[14]=A):A=e[14];const L=x?"Change file":"Choose CSV file";let P;e[15]!==a||e[16]!==L?(P=t.jsxs(G,{variant:"outline",size:"sm",className:"gap-1.5",onClick:N,disabled:a,children:[A,L]}),e[15]=a,e[16]=L,e[17]=P):P=e[17];let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("input",{ref:h,type:"file",accept:".csv,text/csv",className:"hidden",onChange:Z=>k(Z.target.files?.[0]??null)}),e[18]=D):D=e[18];let $;e[19]!==x?($=x&&t.jsx("span",{className:"text-sm text-muted-foreground truncate",children:x}),e[19]=x,e[20]=$):$=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"flex-1"}),e[21]=z):z=e[21];let O;e[22]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(G,{variant:"ghost",size:"sm",className:"gap-1.5 text-xs text-muted-foreground",onClick:hr,children:[t.jsx(Cn,{size:14}),"Download template"]}),e[22]=O):O=e[22];let B;e[23]!==P||e[24]!==$?(B=t.jsxs("div",{className:"flex items-center gap-3",children:[P,D,$,z,O]}),e[23]=P,e[24]=$,e[25]=B):B=e[25];let Q;e[26]!==w?(Q=w.length>0&&t.jsx("div",{className:"rounded-lg border border-yellow-200 bg-yellow-50 dark:border-yellow-900 dark:bg-yellow-950/30 p-3 grid gap-1",children:w.map(jr)}),e[26]=w,e[27]=Q):Q=e[27];let j;e[28]!==M||e[29]!==i?(j=M.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm font-medium",children:"Preview"}),t.jsxs(F,{variant:"secondary",children:[M.length," items"]}),i?.skipped?t.jsxs(F,{variant:"outline",className:"text-yellow-600",children:[i.skipped," skipped"]}):null]}),t.jsx("div",{className:"border rounded-lg overflow-hidden",children:t.jsx("div",{className:"max-h-[300px] overflow-y-auto",children:t.jsxs(vs,{children:[t.jsx(bs,{children:t.jsxs(Pt,{children:[t.jsx(Ie,{className:"w-[140px]",children:"ID"}),t.jsx(Ie,{children:"Title"}),t.jsx(Ie,{children:"Remote URL"}),t.jsx(Ie,{className:"w-[80px] text-center",children:"Public"}),t.jsx(Ie,{children:"Tags"})]})}),t.jsx(ys,{children:M.map(gr)})]})})})]}),e[28]=M,e[29]=i,e[30]=j):j=e[30];let U;e[31]!==m?(U=m&&t.jsxs("div",{className:"rounded-lg border p-3 grid gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[t.jsx(it,{size:16,className:"text-emerald-600"}),"Imported ",m.created," item(s) successfully"]}),m.errors.length>0&&t.jsx("div",{className:"grid gap-1 mt-1",children:m.errors.map(fr)})]}),e[31]=m,e[32]=U):U=e[32];let K;e[33]!==C||e[34]!==i?(K=!i&&!C&&t.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[t.jsx(as,{size:32,className:"text-muted-foreground/40 mb-3"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a CSV file or download the template to get started."}),t.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Required columns: ",t.jsx("code",{children:"id"}),", ",t.jsx("code",{children:"title"}),". Optional:"," ",t.jsx("code",{children:"description"}),", ",t.jsx("code",{children:"remote_url"}),","," ",t.jsx("code",{children:"remote_type"}),", ",t.jsx("code",{children:"tags"}),","," ",t.jsx("code",{children:"categories"}),", ",t.jsx("code",{children:"is_public"}),"."]}),t.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Use ",t.jsx("code",{children:"|"})," or ",t.jsx("code",{children:";"})," to separate multiple tags/categories within a cell."]})]}),e[33]=C,e[34]=i,e[35]=K):K=e[35];let te;e[36]!==B||e[37]!==Q||e[38]!==j||e[39]!==U||e[40]!==K?(te=t.jsxs("div",{className:"flex-1 overflow-y-auto grid gap-4 pr-1",children:[B,Q,j,U,K]}),e[36]=B,e[37]=Q,e[38]=j,e[39]=U,e[40]=K,e[41]=te):te=e[41];let se;e[42]!==v?(se=()=>v(!1),e[42]=v,e[43]=se):se=e[43];const le=C?"Done":"Cancel";let ae;e[44]!==se||e[45]!==le?(ae=t.jsx(G,{variant:"outline",onClick:se,children:le}),e[44]=se,e[45]=le,e[46]=ae):ae=e[46];let me;e[47]!==y||e[48]!==E||e[49]!==C||e[50]!==a||e[51]!==M.length?(me=!C&&t.jsx(G,{onClick:y,disabled:a||M.length===0||E,children:a?"Importing...":`Import ${M.length} item(s)`}),e[47]=y,e[48]=E,e[49]=C,e[50]=a,e[51]=M.length,e[52]=me):me=e[52];let ue;e[53]!==ae||e[54]!==me?(ue=t.jsxs(At,{className:"gap-2 sm:gap-0",children:[ae,me]}),e[53]=ae,e[54]=me,e[55]=ue):ue=e[55];let _;e[56]!==te||e[57]!==ue?(_=t.jsxs(Lt,{className:"sm:max-w-3xl max-h-[85vh] flex flex-col",children:[T,te,ue]}),e[56]=te,e[57]=ue,e[58]=_):_=e[58];let J;return e[59]!==v||e[60]!==n||e[61]!==_?(J=t.jsx(Ot,{open:n,onOpenChange:v,children:_}),e[59]=v,e[60]=n,e[61]=_,e[62]=J):J=e[62],J}function fr(s){return t.jsxs("p",{className:"text-xs text-destructive flex items-start gap-1.5",children:[t.jsx(xt,{size:12,className:"shrink-0 mt-0.5"}),t.jsxs("span",{children:[t.jsx("span",{className:"font-mono",children:s.id}),": ",s.error]})]},s.id)}function gr(s){return t.jsxs(Pt,{children:[t.jsx(Me,{className:"font-mono text-xs",children:s.id}),t.jsx(Me,{className:"text-sm",children:s.title}),t.jsx(Me,{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:s.server.remotes?.[0]?.url??t.jsx("span",{className:"italic",children:"none"})}),t.jsx(Me,{className:"text-center",children:s.is_public?t.jsx(F,{variant:"secondary",className:"text-[10px] bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-400",children:"Yes"}):t.jsx("span",{className:"text-xs text-muted-foreground",children:"No"})}),t.jsx(Me,{className:"text-xs text-muted-foreground",children:(s._meta?.["mcp.mesh"]?.tags??[]).join(", ")||"-"})]},s.id)}function jr(s,e){return t.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-400 flex items-start gap-1.5",children:[t.jsx(xt,{size:12,className:"shrink-0 mt-0.5"}),t.jsxs("span",{children:[s.line>0&&t.jsxs("span",{className:"font-mono text-[10px] mr-1",children:["Line ",s.line,":"]}),s.message]})]},`${s.line}-${e}`)}function vr(s){return s.message.startsWith("Missing required column:")}function br(s){const e=X.c(19),{open:n,onOpenChange:r,title:o,isDeleting:l,onConfirm:a}=s,i=l===void 0?!1:l;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(ht,{children:"Delete registry item?"}),e[0]=d):d=e[0];let m;e[1]!==o?(m=t.jsxs(pt,{children:[d,t.jsxs(ft,{children:["This action cannot be undone. Item ",t.jsx("strong",{children:o})," will be permanently removed from this private registry."]})]}),e[1]=o,e[2]=m):m=e[2];let u;e[3]!==i?(u=t.jsx(gt,{disabled:i,children:"Cancel"}),e[3]=i,e[4]=u):u=e[4];const x=i?"Deleting...":"Delete";let p;e[5]!==i||e[6]!==a||e[7]!==x?(p=t.jsx(jt,{disabled:i,onClick:a,children:x}),e[5]=i,e[6]=a,e[7]=x,e[8]=p):p=e[8];let h;e[9]!==u||e[10]!==p?(h=t.jsxs(vt,{children:[u,p]}),e[9]=u,e[10]=p,e[11]=h):h=e[11];let c;e[12]!==m||e[13]!==h?(c=t.jsxs(bt,{children:[m,h]}),e[12]=m,e[13]=h,e[14]=c):c=e[14];let v;return e[15]!==r||e[16]!==n||e[17]!==c?(v=t.jsx(yt,{open:n,onOpenChange:r,children:c}),e[15]=r,e[16]=n,e[17]=c,e[18]=v):v=e[18],v}function yr(s){const[e]=s.id.split("/");return e??"provider"}function Nr(s){return s._meta?.["mcp.mesh"]?.tags??[]}function wr(s){return s._meta?.["mcp.mesh"]?.categories??[]}function Cr(s){return s.server?.icons?.[0]?.src??null}function _r(s){const e=X.c(77),{item:n,onEdit:r,onDelete:o,onToggleVerified:l,onToggleOfficial:a}=s;let i;e[0]!==n?(i=Cr(n),e[0]=n,e[1]=i):i=e[1];const d=i,m=n._meta?.["mcp.mesh"]?.verified===!0,u=n._meta?.["mcp.mesh"]?.official===!0;let x;e[2]!==n?(x=[...Nr(n),...wr(n)],e[2]=n,e[3]=x):x=e[3];const p=x;let h;e[4]!==p?(h=p.slice(0,3),e[4]=p,e[5]=h):h=e[5];const c=h,v=Math.max(0,p.length-c.length);let b;e[6]!==d||e[7]!==n.title?(b=t.jsx("div",{className:"size-10 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0 flex items-center justify-center",children:d?t.jsx("img",{src:d,alt:n.title,className:"h-full w-full object-cover",loading:"lazy"}):t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n.title.charAt(0).toUpperCase()})}),e[6]=d,e[7]=n.title,e[8]=b):b=e[8];let k;e[9]!==n.title?(k=t.jsx("p",{className:"font-medium truncate",children:n.title}),e[9]=n.title,e[10]=k):k=e[10];let S;e[11]!==n?(S=yr(n),e[11]=n,e[12]=S):S=e[12];let y;e[13]!==S?(y=t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:S}),e[13]=S,e[14]=y):y=e[14];let f;e[15]!==n.is_public?(f=n.is_public?t.jsxs(F,{variant:"default",className:"gap-1",children:[t.jsx(Ns,{size:10}),"Public"]}):t.jsx(F,{variant:"secondary",children:"Private"}),e[15]=n.is_public,e[16]=f):f=e[16];let M;e[17]!==u?(M=u&&t.jsxs(F,{variant:"outline",className:"gap-1 text-primary",children:[t.jsx(os,{size:10}),"Official"]}),e[17]=u,e[18]=M):M=e[18];let g;e[19]!==u||e[20]!==m?(g=!u&&m&&t.jsxs(F,{variant:"outline",className:"gap-1 text-success",children:[t.jsx(os,{size:10}),"Verified"]}),e[19]=u,e[20]=m,e[21]=g):g=e[21];let w;e[22]!==g||e[23]!==y||e[24]!==f||e[25]!==M?(w=t.jsxs("div",{className:"flex items-center gap-2",children:[y,f,M,g]}),e[22]=g,e[23]=y,e[24]=f,e[25]=M,e[26]=w):w=e[26];let R;e[27]!==w||e[28]!==k?(R=t.jsxs("div",{className:"min-w-0 flex-1",children:[k,w]}),e[27]=w,e[28]=k,e[29]=R):R=e[29];let E;e[30]!==R||e[31]!==b?(E=t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b,R]}),e[30]=R,e[31]=b,e[32]=E):E=e[32];let C;e[33]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Tt,{asChild:!0,children:t.jsx(G,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(Ht,{size:18})})}),e[33]=C):C=e[33];let T;e[34]!==n||e[35]!==r?(T=t.jsx(Ee,{onClick:()=>r(n),children:"Edit"}),e[34]=n,e[35]=r,e[36]=T):T=e[36];let N;e[37]!==n||e[38]!==l?(N=()=>l(n),e[37]=n,e[38]=l,e[39]=N):N=e[39];const A=m?"Unmark as Verified":"Mark as Verified";let L;e[40]!==N||e[41]!==A?(L=t.jsx(Ee,{onClick:N,children:A}),e[40]=N,e[41]=A,e[42]=L):L=e[42];let P;e[43]!==n||e[44]!==a?(P=()=>a(n),e[43]=n,e[44]=a,e[45]=P):P=e[45];const D=u?"Unmark as Official":"Mark as Official";let $;e[46]!==P||e[47]!==D?($=t.jsx(Ee,{onClick:P,children:D}),e[46]=P,e[47]=D,e[48]=$):$=e[48];let z;e[49]!==n||e[50]!==o?(z=()=>o(n),e[49]=n,e[50]=o,e[51]=z):z=e[51];let O;e[52]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(wt,{size:14}),e[52]=O):O=e[52];let B;e[53]!==z?(B=t.jsxs(Ee,{variant:"destructive",onClick:z,children:[O,"Delete"]}),e[53]=z,e[54]=B):B=e[54];let Q;e[55]!==T||e[56]!==L||e[57]!==$||e[58]!==B?(Q=t.jsxs(It,{children:[C,t.jsxs(Mt,{align:"end",children:[T,L,$,B]})]}),e[55]=T,e[56]=L,e[57]=$,e[58]=B,e[59]=Q):Q=e[59];let j;e[60]!==E||e[61]!==Q?(j=t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[E,Q]}),e[60]=E,e[61]=Q,e[62]=j):j=e[62];const U=n._meta?.["mcp.mesh"]?.short_description||n.description||n.server.description||"No description provided.";let K;e[63]!==U?(K=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 min-h-10",children:U}),e[63]=U,e[64]=K):K=e[64];let te;e[65]!==n.id||e[66]!==c?(te=c.map(me=>t.jsx(F,{variant:"secondary",children:me},`${n.id}-badge-${me}`)),e[65]=n.id,e[66]=c,e[67]=te):te=e[67];let se;e[68]!==v?(se=v>0&&t.jsxs(F,{variant:"outline",children:["+",v]}),e[68]=v,e[69]=se):se=e[69];let le;e[70]!==te||e[71]!==se?(le=t.jsxs("div",{className:"flex flex-wrap gap-1",children:[te,se]}),e[70]=te,e[71]=se,e[72]=le):le=e[72];let ae;return e[73]!==j||e[74]!==K||e[75]!==le?(ae=t.jsxs(oe,{className:"p-4 gap-4 transition-colors hover:bg-muted/50",children:[j,K,le]}),e[73]=j,e[74]=K,e[75]=le,e[76]=ae):ae=e[76],ae}function Os(s){const e=X.c(27),{value:n,onChange:r,onFileUpload:o,error:l,isUploading:a}=s,i=a===void 0?!1:a,[d,m]=I.useState(!1),[u,x]=I.useState(!1),p=I.useRef(null);let h;e[0]!==i?(h=T=>{T.preventDefault(),i||m(!0)},e[0]=i,e[1]=h):h=e[1];const c=h;let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=T=>{T.preventDefault(),m(!1)},e[2]=v):v=e[2];const b=v;let k;e[3]!==i||e[4]!==o?(k=async T=>{if(T.preventDefault(),m(!1),i)return;const N=T.dataTransfer.files[0];N&&await o(N)},e[3]=i,e[4]=o,e[5]=k):k=e[5];const S=k;let y;e[6]!==i||e[7]!==o?(y=async T=>{const N=T.target.files?.[0];N&&!i&&await o(N),T.target.value=""},e[6]=i,e[7]=o,e[8]=y):y=e[8];const f=y,M=n.length>0;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(re,{children:"Image"}),e[9]=g):g=e[9];let w;e[10]!==c||e[11]!==S||e[12]!==M||e[13]!==d||e[14]!==i||e[15]!==r||e[16]!==u||e[17]!==n?(w=M?t.jsx("div",{className:"relative group min-h-[180px] rounded-xl border border-border overflow-hidden bg-muted/10",children:t.jsxs("div",{className:"flex items-center gap-3 p-3 h-full",children:[t.jsx("div",{className:"size-20 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0",children:t.jsx("img",{src:n,alt:"Preview",className:"w-full h-full object-cover"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n}),t.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[t.jsxs(G,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>p.current?.click(),disabled:i,children:[t.jsx(Wt,{className:"size-3"}),"Change"]}),t.jsxs(G,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 text-destructive hover:text-destructive",onClick:()=>{r(""),x(!1)},disabled:i,children:[t.jsx(wt,{className:"size-3"}),"Remove"]})]})]})]})}):i?t.jsxs("div",{className:"relative min-h-[180px] rounded-xl border border-border bg-muted/10 flex flex-col items-center justify-center gap-3",children:[t.jsx(et,{className:"size-8 animate-spin text-muted-foreground"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Uploading image..."})]}):t.jsxs("div",{className:ee("relative min-h-[180px] rounded-xl border-2 border-dashed transition-colors cursor-pointer flex flex-col",d?"border-primary bg-primary/5":"border-border hover:border-muted-foreground/40 hover:bg-muted/30"),onDragOver:c,onDragLeave:b,onDrop:S,onClick:()=>p.current?.click(),children:[t.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-6 px-4 flex-1",children:[t.jsx("div",{className:ee("size-10 rounded-lg flex items-center justify-center transition-colors",d?"bg-primary/10 text-primary":"bg-muted/50 text-muted-foreground"),children:t.jsx(Ps,{size:20})}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:d?"Drop image here":"Click or drag to upload"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"PNG, JPG, SVG up to 2MB"})]})]}),u?t.jsx("div",{className:"border-t border-border px-3 py-2",onClick:kr,children:t.jsx(xe,{placeholder:"https://example.com/logo.png",value:n,className:"text-xs h-8",onChange:T=>r(T.target.value)})}):t.jsx("div",{className:"border-t border-border px-4 py-2",children:t.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors w-full justify-center",onClick:T=>{T.stopPropagation(),x(!0)},children:[t.jsx(In,{className:"size-3"}),"Or paste an image URL"]})})]}),e[10]=c,e[11]=S,e[12]=M,e[13]=d,e[14]=i,e[15]=r,e[16]=u,e[17]=n,e[18]=w):w=e[18];let R;e[19]!==f?(R=t.jsx("input",{ref:p,type:"file",accept:"image/*",className:"hidden",onChange:f}),e[19]=f,e[20]=R):R=e[20];let E;e[21]!==l?(E=l&&t.jsx("p",{className:"text-xs text-destructive",children:l}),e[21]=l,e[22]=E):E=e[22];let C;return e[23]!==w||e[24]!==R||e[25]!==E?(C=t.jsxs("div",{className:"grid gap-1.5",children:[g,w,R,E]}),e[23]=w,e[24]=R,e[25]=E,e[26]=C):C=e[26],C}function kr(s){return s.stopPropagation()}function zs(){const[s,e]=I.useState("idle"),[n,r]=I.useState(null),{org:o}=de(),l=he({connectionId:pe,orgId:o.id});return{discover:async(d,m)=>{if(!d)return null;e("loading"),r(null);try{const u=await l.callTool({name:"REGISTRY_DISCOVER_TOOLS",arguments:{url:d,type:m==="sse"?"sse":"http"}}),x=u.structuredContent??u;if(u.isError){const p=u.content?.find(h=>h.type==="text")?.text??"Tool returned an error";return r(p),e("error"),null}return x.error?Sr(x.error)?(r(x.error),e("auth_required"),null):(r(x.error),e("error"),null):!x.tools||x.tools.length===0?(r("No tools found on this MCP server."),e("error"),null):(e("success"),x.tools)}catch(u){const x=u instanceof Error?u.message:String(u);return r(x||"Could not discover tools."),e("error"),null}},discoverStatus:s,discoverError:n,resetDiscover:()=>{e("idle"),r(null)}}}function Sr(s){const e=s.toLowerCase();return e.includes("authentication")||e.includes("unauthorized")||e.includes("credentials")}function Rr(s){const e=X.c(54),{tools:n,onChange:r,remoteUrl:o,remoteType:l,externalDiscoverStatus:a,externalDiscoverError:i}=s,[d,m]=I.useState(n.length>0),{discover:u,discoverStatus:x,discoverError:p,resetDiscover:h}=zs(),c=a??x,v=i??p;let b;e[0]!==u||e[1]!==r||e[2]!==l||e[3]!==o?(b=async()=>{if(!o)return;const O=await u(o,l??"http");O&&(r(O),m(!0))},e[0]=u,e[1]=r,e[2]=l,e[3]=o,e[4]=b):b=e[4];const k=b;let S;e[5]!==r||e[6]!==h?(S=()=>{r([]),h()},e[5]=r,e[6]=h,e[7]=S):S=e[7];const y=S;let f;e[8]!==d?(f=()=>m(!d),e[8]=d,e[9]=f):f=e[9];let M,g;e[10]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(Jt,{size:14,className:"text-muted-foreground"}),g=t.jsx("span",{children:"Tools"}),e[10]=M,e[11]=g):(M=e[10],g=e[11]);let w;e[12]!==n.length?(w=n.length>0&&t.jsx(F,{variant:"secondary",className:"text-xs px-1.5 py-0",children:n.length}),e[12]=n.length,e[13]=w):w=e[13];let R;e[14]!==d?(R=d?t.jsx(Mn,{size:14,className:"text-muted-foreground"}):t.jsx(Rs,{size:14,className:"text-muted-foreground"}),e[14]=d,e[15]=R):R=e[15];let E;e[16]!==f||e[17]!==w||e[18]!==R?(E=t.jsxs("button",{type:"button",className:"flex items-center gap-2 text-sm font-medium cursor-pointer",onClick:f,children:[M,g,w,R]}),e[16]=f,e[17]=w,e[18]=R,e[19]=E):E=e[19];let C;e[20]!==y||e[21]!==n.length?(C=n.length>0&&t.jsxs(G,{type:"button",variant:"ghost",size:"sm",className:"h-7 text-xs gap-1.5 text-muted-foreground",onClick:y,children:[t.jsx(wt,{size:12}),"Clear"]}),e[20]=y,e[21]=n.length,e[22]=C):C=e[22];let T;e[23]!==c||e[24]!==k||e[25]!==o||e[26]!==n.length?(T=o&&t.jsxs(G,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 border-green-500/30 text-green-600 dark:text-green-400 shadow-[0_0_8px_rgba(34,197,94,0.3)] hover:shadow-[0_0_14px_rgba(34,197,94,0.5)] hover:border-green-500/50 transition-all",onClick:k,disabled:c==="loading",children:[c==="loading"?t.jsx(et,{size:12,className:"animate-spin"}):t.jsx(Wt,{size:12}),c==="loading"?"Discovering...":n.length>0?"Refresh":"Auto-discover"]}),e[23]=c,e[24]=k,e[25]=o,e[26]=n.length,e[27]=T):T=e[27];let N;e[28]!==T||e[29]!==C?(N=t.jsxs("div",{className:"flex items-center gap-2",children:[C,T]}),e[28]=T,e[29]=C,e[30]=N):N=e[30];let A;e[31]!==N||e[32]!==E?(A=t.jsxs("div",{className:"flex items-center justify-between",children:[E,N]}),e[31]=N,e[32]=E,e[33]=A):A=e[33];let L;e[34]!==c||e[35]!==n.length?(L=c==="success"&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-950/30 rounded-lg px-3 py-2",children:[t.jsx(it,{size:14,className:"shrink-0"}),t.jsxs("span",{children:["Discovered ",n.length," tool",n.length!==1?"s":""," ","successfully."]})]}),e[34]=c,e[35]=n.length,e[36]=L):L=e[36];let P;e[37]!==v||e[38]!==c?(P=c==="error"&&v&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[t.jsx(xt,{size:14,className:"shrink-0"}),t.jsx("span",{children:v})]}),e[37]=v,e[38]=c,e[39]=P):P=e[39];let D;e[40]!==d||e[41]!==n?(D=d&&n.length>0&&t.jsx("div",{className:"rounded-xl border border-border divide-y divide-border overflow-hidden max-h-48 overflow-y-auto",children:n.map(Tr)}),e[40]=d,e[41]=n,e[42]=D):D=e[42];let $;e[43]!==c||e[44]!==d||e[45]!==o||e[46]!==n.length?($=d&&n.length===0&&c==="idle"&&t.jsx("p",{className:"text-xs text-muted-foreground px-1",children:o?'Click "Auto-discover" to load tools from the MCP server.':"Add a Remote URL first, then tools can be auto-discovered."}),e[43]=c,e[44]=d,e[45]=o,e[46]=n.length,e[47]=$):$=e[47];let z;return e[48]!==A||e[49]!==L||e[50]!==P||e[51]!==D||e[52]!==$?(z=t.jsxs("div",{className:"space-y-3",children:[A,L,P,D,$]}),e[48]=A,e[49]=L,e[50]=P,e[51]=D,e[52]=$,e[53]=z):z=e[53],z}function Tr(s){return t.jsx("div",{className:"flex items-center gap-3 px-3 py-2",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-mono truncate",children:s.name}),s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description})]})},s.name)}function Us(s){const{org:e}=de(),[n,r]=I.useState(!1),l=typeof window<"u"&&window.location.hostname==="localhost"?`${e.id}_dev-assets`:null,a=he({connectionId:l??"noop",orgId:e.id});return{uploadImage:async(d,m)=>{if(!l)return H.error("Image upload requires an object-storage connection. Configure one in plugin settings."),null;if(!d.type.startsWith("image/"))return H.error("Only image files are supported"),null;if(d.size>5*1024*1024)return H.error("Image size must be less than 5MB"),null;r(!0);try{const u=await a.callTool({name:"PUT_PRESIGNED_URL",arguments:{key:m,contentType:d.type}}),x=u.structuredContent?.url||u.url;if(!x)throw new Error("Failed to get presigned URL");const p=await fetch(x,{method:"PUT",body:d,headers:{"Content-Type":d.type}});if(!p.ok)throw new Error(`Upload failed: ${p.statusText}`);const h=await a.callTool({name:"GET_PRESIGNED_URL",arguments:{key:m,expiresIn:31536e3}}),c=h.structuredContent?.url||h.url;if(!c)throw new Error("Failed to get public URL");return c}catch(u){return console.error("Image upload failed:",u),H.error(u instanceof Error?u.message:"Failed to upload image. Please try again."),null}finally{r(!1)}},isUploading:n}}function Ir(){const{org:s}=de(),[e,n]=I.useState(null),r=I.useRef(0),o=he({connectionId:pe,orgId:s.id});return{generate:async a=>{r.current+=1,n(a.type);try{const i=await o.callTool({name:"REGISTRY_AI_GENERATE",arguments:a});if(i.isError){const d=i.content?.find(m=>m.type==="text")?.text??"Failed to generate content";throw new Error(d)}return i.structuredContent??i}finally{r.current-=1,r.current===0&&n(null)}},loadingType:e,isGenerating:e!==null}}const Mr=new Set(["http","sse","stdio"]),Pr=/^[a-z0-9]+(?:[/-][a-z0-9._-]+)*$/,us=["internal","automation","support","sales","ops","ai"],qs=["productivity","communication","customer-support","development","data","operations"],Er=["Essentials","Details","Advanced"],nt="h-7 text-xs border-green-500/30 text-green-600 dark:text-green-400 shadow-[0_0_8px_rgba(34,197,94,0.3)] hover:shadow-[0_0_14px_rgba(34,197,94,0.5)] hover:border-green-500/50 transition-all";function xs(s){return s.replace(/^https?:\/\//i,"").trim()}function rt(s){const e=s.trim();return e?/^https?:\/\//i.test(e)?e:`https://${e}`:""}function Ye(s){return s.trim().toLowerCase()}function Nt(s){return Array.from(new Set(s.map(Ye).filter(e=>e.length>0)))}function Ze(s){return s.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function Dr(s){const e=X.c(4),{current:n}=s;let r;e[0]!==n?(r=Er.map((l,a)=>{const i=a+1,d=i===n,m=i<n;return t.jsxs("div",{className:"flex items-center gap-1.5",children:[a>0&&t.jsx("div",{className:ee("w-4 h-px",m?"bg-primary":"bg-border")}),t.jsxs("div",{className:ee("flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs transition-colors",d?"bg-primary/10 text-primary font-medium":m?"text-primary":"text-muted-foreground"),children:[t.jsx("span",{className:ee("size-5 rounded-full inline-flex items-center justify-center text-[10px] font-semibold shrink-0",d?"bg-primary text-primary-foreground":m?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"),children:i}),t.jsx("span",{className:"hidden sm:inline",children:l})]})]},l)}),e[0]=n,e[1]=r):r=e[1];let o;return e[2]!==r?(o=t.jsx("div",{className:"flex items-center gap-1.5",children:r}),e[2]=r,e[3]=o):o=e[3],o}function $r(s){const e=X.c(28),{id:n,label:r,values:o,availableOptions:l,placeholder:a,onChange:i}=s,[d,m]=I.useState(""),[u,x]=I.useState(!1);let p,h,c,v,b;if(e[0]!==l||e[1]!==n||e[2]!==d||e[3]!==u||e[4]!==r||e[5]!==i||e[6]!==a||e[7]!==o){const y=Nt(l),f=Nt(o),M=new Set(f),g=Ye(d),w=y.filter(P=>!M.has(P)).filter(P=>g?P.includes(g):!0).slice(0,8),R=P=>{const D=Ye(P);!D||M.has(D)||i([...f,D])},E=P=>{i(f.filter(D=>D!==P))},C=()=>{const P=d.split(/[,\n;]/).map(Ye).filter(Boolean);if(P.length===0)return;const D=[...f];for(const $ of P)D.includes($)||D.push($);i(D),m("")},T=g;v="grid gap-2",e[13]!==n||e[14]!==r?(b=t.jsx(re,{htmlFor:n,children:r}),e[13]=n,e[14]=r,e[15]=b):b=e[15],p="relative";let N;e[16]!==n?(N=()=>{const P=document.getElementById(n);P instanceof HTMLInputElement&&P.focus()},e[16]=n,e[17]=N):N=e[17];let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=()=>x(!0),e[18]=A):A=e[18];let L;e[19]===Symbol.for("react.memo_cache_sentinel")?(L=P=>m(P.target.value),e[19]=L):L=e[19],h=t.jsx("div",{className:"min-h-9 w-full rounded-xl border border-input bg-background px-2.5 py-1.5 text-sm focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",onClick:N,children:t.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[f.map(P=>t.jsxs(F,{variant:"secondary",className:"gap-1",children:[P,t.jsx("button",{type:"button",onClick:D=>{D.preventDefault(),D.stopPropagation(),E(P)},children:t.jsx(Tn,{size:12})})]},`${n}-${P}`)),t.jsx("input",{id:n,className:"flex-1 min-w-[120px] bg-transparent outline-none border-none text-sm",placeholder:f.length?"":a,value:d,onFocus:A,onBlur:()=>{x(!1),C()},onChange:L,onKeyDown:P=>{if(P.key==="Enter"||P.key===","){P.preventDefault(),C();return}P.key==="Backspace"&&!d&&f.length&&E(f[f.length-1]??"")}})]})}),c=u&&t.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:w.length>0?w.map(P=>t.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:Lr,onClick:()=>{R(P),m("")},children:P},`${n}-suggestion-${P}`)):T?t.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:Ar,onClick:()=>{R(T),m("")},children:['Create "',T,'"']}):t.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:"Type to search or create."})}),e[0]=l,e[1]=n,e[2]=d,e[3]=u,e[4]=r,e[5]=i,e[6]=a,e[7]=o,e[8]=p,e[9]=h,e[10]=c,e[11]=v,e[12]=b}else p=e[8],h=e[9],c=e[10],v=e[11],b=e[12];let k;e[20]!==p||e[21]!==h||e[22]!==c?(k=t.jsxs("div",{className:p,children:[h,c]}),e[20]=p,e[21]=h,e[22]=c,e[23]=k):k=e[23];let S;return e[24]!==v||e[25]!==b||e[26]!==k?(S=t.jsxs("div",{className:v,children:[b,k]}),e[24]=v,e[25]=b,e[26]=k,e[27]=S):S=e[27],S}function Ar(s){return s.preventDefault()}function Lr(s){return s.preventDefault()}function Or({id:s,value:e,availableOptions:n,onChange:r}){const[o,l]=I.useState(e),[a,i]=I.useState(!1),d=I.useRef(e);d.current!==e&&(d.current=e,l(e));const m=Nt([...qs,...n,e]).filter(Boolean),u=Ye(o),x=m.filter(h=>u?h.includes(u):!0).slice(0,8),p=h=>{const c=Ye(h);r(c),l(c),i(!1)};return t.jsxs("div",{className:"grid gap-2",children:[t.jsx(re,{htmlFor:s,children:"Category"}),t.jsxs("div",{className:"relative",children:[t.jsx(xe,{id:s,className:"h-9 text-sm",placeholder:"Select or create category",value:o,onFocus:()=>{l(e),i(!0)},onBlur:()=>{p(o)},onChange:h=>l(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),p(o))}}),e&&t.jsx("button",{type:"button",className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground hover:text-foreground",onMouseDown:h=>h.preventDefault(),onClick:()=>{r(""),l("")},children:"clear"}),a&&t.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:x.length>0?x.map(h=>t.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:c=>c.preventDefault(),onClick:()=>p(h),children:h},`${s}-${h}`)):u?t.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:h=>h.preventDefault(),onClick:()=>p(u),children:['Create "',u,'"']}):t.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:"Type to search or create."})})]})]})}function zr({open:s,onOpenChange:e,item:n,draft:r,availableTags:o=[],availableCategories:l=[],defaultLLMConnectionId:a="",defaultLLMModelId:i="",isSubmitting:d=!1,onSubmit:m}){const{org:u}=de(),{uploadImage:x,isUploading:p}=Us(),{generate:h,loadingType:c}=Ir(),{discover:v,discoverStatus:b,discoverError:k,resetDiscover:S}=zs(),y=!!n,f=r?._meta?.["mcp.mesh"],M=n?.title??r?.title??"",g=n?.id?.split("/")[0]??r?.id?.split("/")[0]??"",w=n?.description??r?.description??"",R=n?._meta?.["mcp.mesh"]?.short_description??f?.short_description??"",E=n?._meta?.["mcp.mesh"]?.owner??f?.owner??"",C=n?.server?.repository?.url??r?.server?.repository?.url??"",T=n?._meta?.["mcp.mesh"]?.readme??f?.readme??"",N=n?._meta?.["mcp.mesh"]?.readme_url??f?.readme_url??"",A=xs(n?.server?.remotes?.[0]?.url??r?.server?.remotes?.[0]?.url??""),L=n?.server?.remotes?.[0]?.type??r?.server?.remotes?.[0]?.type??"http",P=n?._meta?.["mcp.mesh"]?.tags??f?.tags??[],D=n?._meta?.["mcp.mesh"]?.categories?.[0]??f?.categories?.[0]??"",$=n?.server?.icons?.[0]?.src??r?.server?.icons?.[0]?.src??"",z=n?._meta?.["mcp.mesh"]?.tools??f?.tools??[],O=n?.is_public??r?.is_public??!1,B=n?._meta?.["mcp.mesh"]?.verified??f?.verified??!1,Q=n?._meta?.["mcp.mesh"]?.official??f?.official??!1,[j,U]=I.useState(1),[K,te]=I.useState(M),[se,le]=I.useState(g),[ae,me]=I.useState(w),[ue,_]=I.useState(R),[J,Z]=I.useState(E),[ce,fe]=I.useState(C),[ke,ye]=I.useState(T),[ie,De]=I.useState(N),[Te,$e]=I.useState(T?"content":"link"),[ne,je]=I.useState(A),[Ne,be]=I.useState(L),[Oe,Ae]=I.useState(P),[Se,Be]=I.useState(D),[He,lt]=I.useState($),[we,tt]=I.useState(z),[V,ge]=I.useState(O),[st,Ge]=I.useState(B),[_t,at]=I.useState(Q),[ve,ot]=I.useState({}),We=!!(a&&i),es=()=>{U(1),te(M),le(g),me(w),_(R),Z(E),fe(C),ye(T),De(N),$e(T?"content":"link"),je(A),be(L),Ae(P),Be(D),lt($),tt(z),ge(O),Ge(B),at(Q),ot({}),S(),kt.current="",Qe.current&&(clearTimeout(Qe.current),Qe.current=null)},Ks=async q=>{if(!q)return;const Y=y?n?.id:`${se}/${K}`.toLowerCase(),Re=Ze(Y||"temp"),ze=q.name.split(".").pop()||"png",Ue=`registry/${u.id}/${Re}/icon.${ze}`,Je=await x(q,Ue);Je?(lt(Je),ot(qe=>({...qe,imageUrl:void 0}))):ot(qe=>({...qe,imageUrl:"Failed to upload image. Please try again."}))},Qe=I.useRef(null),kt=I.useRef(""),Ft=I.useRef(Ne);Ft.current=Ne;const ts=q=>{!q&&Qe.current&&(clearTimeout(Qe.current),Qe.current=null),e(q),q||es()},Ys=async()=>{const q=rt(ne);if(!q)return;kt.current=q;const Y=await v(q,Ft.current);Y&&tt(Y)},Hs=q=>{Qe.current&&clearTimeout(Qe.current);const Y=rt(q);!Y||Y===kt.current||q.includes(".")&&(Qe.current=setTimeout(async()=>{kt.current=Y;const Re=await v(Y,Ft.current);Re&&tt(Re)},800))},ct=()=>We?{llmConnectionId:a,modelId:i}:null,dt=()=>({name:K.trim(),provider:se.trim(),url:rt(ne),owner:J.trim(),repositoryUrl:ce.trim(),description:ae.trim(),shortDescription:ue.trim(),tags:Oe,categories:Se?[Se]:[],availableTags:[...us,...o],availableCategories:[...qs,...l],tools:we}),Ws=async()=>{const q=ct();if(!q)return;const Y=await h({...q,type:"description",context:dt()});Y.result&&me(Y.result.slice(0,1500))},Js=async()=>{const q=ct();if(!q)return;const Y=await h({...q,type:"short_description",context:dt()});Y.result&&_(Y.result.slice(0,160))},Zs=async()=>{const q=ct();if(!q)return;const Y=await h({...q,type:"tags",context:dt()});Y.items?.length&&Ae(Nt(Y.items))},Xs=async()=>{const q=ct();if(!q)return;const Y=await h({...q,type:"categories",context:dt()});Y.items?.[0]&&Be(Ye(Y.items[0]))},en=async()=>{const q=ct();if(!q)return;const Y=await h({...q,type:"readme",context:dt()});Y.result&&(ye(Y.result.slice(0,5e4)),$e("content"))},ss=q=>{const Y={};if(q===1){const Re=Ze(se),ze=Ze(K),Ue=`${Re}/${ze}`;K.trim()||(Y.title="Name is required."),y||(Re?ze?Pr.test(Ue)||(Y.provider="Use lowercase letters/numbers and separators '/' or '-'."):Y.title="Name must contain valid characters.":Y.provider="Provider is required.");const Je=rt(ne),qe=Ne.trim().toLowerCase();if(qe!=="stdio"&&Je)try{const mt=new URL(Je);["http:","https:"].includes(mt.protocol)||(Y.remoteUrl="Remote URL must be http(s).")}catch{Y.remoteUrl="Remote URL is invalid."}if(qe&&!Mr.has(qe)&&(Y.remoteType="Remote type must be: http, sse or stdio."),He.trim()&&!He.trim().startsWith("data:image/"))try{const Bt=new URL(He.trim());["http:","https:"].includes(Bt.protocol)||(Y.imageUrl="Image URL must be http(s).")}catch{Y.imageUrl="Image URL is invalid."}}if(q===2&&(ae.length>1500&&(Y.description="Description must be 1500 characters or less."),ue.trim().length>160&&(Y.shortDescription="Short description must be 160 characters or less.")),q===3){const Re=ie.trim();if(Re)try{const Ue=new URL(Re);["http:","https:"].includes(Ue.protocol)||(Y.readmeUrl="README URL must be http(s).")}catch{Y.readmeUrl="README URL is invalid."}ke.trim().length>5e4&&(Y.readme="README must be 50 000 characters or less.");const ze=ce.trim();if(ze)try{const Ue=new URL(ze);["http:","https:"].includes(Ue.protocol)||(Y.repositoryUrl="Repository URL must be http(s).")}catch{Y.repositoryUrl="Repository URL is invalid."}}return ot(Y),Object.values(Y).every(Re=>Re===void 0)},tn=()=>{ss(j)&&j<3&&U(j+1)},sn=()=>{j>1&&U(j-1)},nn=async()=>{if(!ss(3))return;const q=K.trim(),Y=Ze(se),Re=Ze(q),ze=`${Y}/${Re}`,Ue=rt(ne),Je=Ne.trim().toLowerCase(),qe=He.trim(),mt=ce.trim(),Bt=ue.trim(),on=ke.trim(),cn=ie.trim(),dn=Nt(Oe),mn=Se?[Ye(Se)]:[],un=n?n.server?.name??n.id:"",xn=(y?un:ze).trim(),Gt=ae.trim(),hn=J.trim(),ns={title:q,description:Gt.length>0?Gt:null,is_public:V,_meta:{"mcp.mesh":{verified:st,official:_t,tags:dn,categories:mn,short_description:Bt||null,owner:hn||null,readme:on||null,readme_url:cn||null,...we.length>0?{tools:we}:{}}},server:{name:xn,title:q,description:Gt||void 0,icons:qe?[{src:qe}]:[],repository:mt?{url:mt}:void 0,remotes:Ue?[{type:Je||"http",url:Ue}]:[]}};if(y&&n){await m({id:n.id,data:ns}),e(!1);return}await m({id:ze,...ns}),e(!1),es()},rn=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"row-span-2 grid gap-3 content-start",children:[t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(re,{htmlFor:"registry-item-provider",children:"Provider"}),t.jsx(xe,{id:"registry-item-provider",className:"h-9 text-sm",placeholder:"acme",value:se,onChange:q=>le(q.target.value),disabled:y}),!y&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Item ID:"," ",t.jsx("span",{className:"font-mono",children:`${Ze(se)||"provider"}/${Ze(K)||"name"}`})]}),ve.provider&&t.jsx("p",{className:"text-xs text-destructive",children:ve.provider})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(re,{htmlFor:"registry-item-title",children:"Name"}),t.jsx(xe,{id:"registry-item-title",className:"h-9 text-sm",placeholder:"Internal MCP",value:K,onChange:q=>te(q.target.value)}),ve.title&&t.jsx("p",{className:"text-xs text-destructive",children:ve.title})]})]}),t.jsx("div",{className:"row-span-2 content-start",children:t.jsx(Os,{value:He,onChange:q=>{lt(q),ot(Y=>({...Y,imageUrl:void 0}))},onFileUpload:Ks,error:ve.imageUrl,isUploading:p})}),t.jsxs("div",{className:"col-span-2 grid gap-1.5",children:[t.jsx(re,{htmlFor:"registry-remote-url",children:"Remote URL"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("div",{className:"flex-1 flex items-center rounded-xl border border-input px-3",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground mr-1",children:"https://"}),t.jsx("input",{id:"registry-remote-url",className:"flex-1 h-9 bg-transparent outline-none text-sm",placeholder:"example.com/mcp",value:ne,onChange:q=>{const Y=xs(q.target.value);je(Y),Hs(Y)}})]}),t.jsxs(Cs,{value:Ne,onValueChange:be,children:[t.jsx(_s,{id:"registry-remote-type",className:"w-[90px] h-9 shrink-0",children:t.jsx(ks,{placeholder:"Type"})}),t.jsxs(Ss,{children:[t.jsx(Rt,{value:"http",children:"http"}),t.jsx(Rt,{value:"sse",children:"sse"}),t.jsx(Rt,{value:"stdio",children:"stdio"})]})]})]}),ve.remoteUrl&&t.jsx("p",{className:"text-xs text-destructive",children:ve.remoteUrl}),ve.remoteType&&t.jsx("p",{className:"text-xs text-destructive",children:ve.remoteType})]}),ne.trim()&&t.jsxs("div",{className:"col-span-2 space-y-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs(G,{type:"button",variant:"outline",size:"sm",className:ee(nt,"gap-1.5"),onClick:Ys,disabled:b==="loading",children:[b==="loading"?t.jsx(et,{size:12,className:"animate-spin"}):t.jsx(Wt,{size:12}),b==="loading"?"Discovering tools...":we.length>0?"Re-discover tools":"Discover tools from URL"]}),we.length>0&&b!=="loading"&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[we.length," tool",we.length!==1?"s":""," loaded"]})]}),b==="success"&&we.length>0&&t.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-50 dark:bg-green-950/20 px-3 py-2 space-y-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2 text-xs text-green-600 dark:text-green-400",children:[t.jsx(it,{size:14,className:"shrink-0"}),t.jsxs("span",{className:"font-medium",children:[we.length," tool",we.length!==1?"s":""," discovered"]})]}),t.jsxs("div",{className:"flex flex-wrap gap-1",children:[we.slice(0,8).map(q=>t.jsx(F,{variant:"secondary",className:"text-[10px] px-1.5 py-0 font-mono",children:q.name},q.name)),we.length>8&&t.jsxs("span",{className:"text-[10px] text-muted-foreground self-center",children:["+",we.length-8," more"]})]}),t.jsx("p",{className:"text-[10px] text-muted-foreground",children:"These tools will enrich AI-generated descriptions, tags and categories in the next step."})]}),b==="auth_required"&&k&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-950/20 border border-amber-500/20 rounded-lg px-3 py-2",children:[t.jsx(xt,{size:14,className:"shrink-0"}),t.jsx("span",{children:"This server requires authentication. The connection is valid but tools cannot be listed without credentials."})]}),b==="error"&&k&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[t.jsx(xt,{size:14,className:"shrink-0"}),t.jsx("span",{children:k})]})]})]}),ln=t.jsxs("div",{className:"grid gap-3",children:[t.jsxs("div",{className:"grid gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(re,{htmlFor:"registry-item-short-description",children:"Short Description"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:[ue.length,"/160"]}),We&&t.jsx(G,{type:"button",variant:"outline",size:"sm",className:nt,disabled:c==="short_description",onClick:Js,children:c==="short_description"?"Generating...":"AI Generate"})]})]}),t.jsx(xe,{id:"registry-item-short-description",className:"h-9 text-sm",placeholder:"Short summary for the store card",value:ue,maxLength:160,onChange:q=>_(q.target.value)}),ve.shortDescription&&t.jsx("p",{className:"text-xs text-destructive",children:ve.shortDescription})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(re,{htmlFor:"registry-item-description",children:"Description"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:[ae.length,"/1500"]}),We&&t.jsx(G,{type:"button",variant:"outline",size:"sm",className:nt,disabled:c==="description",onClick:Ws,children:c==="description"?"Generating...":"AI Generate"})]})]}),t.jsx(zt,{id:"registry-item-description",className:"text-sm max-h-28 overflow-y-auto resize-none",placeholder:"Brief description of this MCP server",rows:2,value:ae,onChange:q=>me(q.target.value)}),ve.description&&t.jsx("p",{className:"text-xs text-destructive",children:ve.description})]}),t.jsx("div",{className:"border-t border-border"}),t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"grid content-start gap-2",children:[t.jsx(Or,{id:"registry-category",value:Se,availableOptions:l,onChange:Be}),We&&t.jsx(G,{type:"button",variant:"outline",size:"sm",className:ee(nt,"justify-self-start"),disabled:c==="categories",onClick:Xs,children:c==="categories"?"Suggesting...":"AI Suggest"})]}),t.jsxs("div",{className:"grid content-start gap-2",children:[t.jsx($r,{id:"registry-tags",label:"Tags",values:Oe,availableOptions:[...us,...o],placeholder:"Type and press Enter or comma",onChange:Ae}),We&&t.jsx(G,{type:"button",variant:"outline",size:"sm",className:ee(nt,"justify-self-start"),disabled:c==="tags",onClick:Zs,children:c==="tags"?"Suggesting...":"AI Suggest"})]})]}),t.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[t.jsxs("div",{className:"grid gap-0.5",children:[t.jsx(re,{htmlFor:"registry-is-public",className:"text-sm",children:"Public"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Make this MCP visible in the public store URL."})]}),t.jsx(Xe,{id:"registry-is-public",checked:V,onCheckedChange:ge})]}),t.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[t.jsxs("div",{className:"grid gap-0.5",children:[t.jsx(re,{htmlFor:"registry-is-verified",className:"text-sm",children:"Verified"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Curated and approved by deco."})]}),t.jsx(Xe,{id:"registry-is-verified",checked:st,onCheckedChange:Ge})]}),t.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[t.jsxs("div",{className:"grid gap-0.5",children:[t.jsx(re,{htmlFor:"registry-is-official",className:"text-sm",children:"Official"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Made and hosted by the service provider."})]}),t.jsx(Xe,{id:"registry-is-official",checked:_t,onCheckedChange:at})]})]}),an=t.jsxs("div",{className:"grid gap-3",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(re,{htmlFor:"registry-item-owner",children:"Owner (optional)"}),t.jsx(xe,{id:"registry-item-owner",className:"h-9 text-sm",placeholder:"Team, company, or responsible person",value:J,onChange:q=>Z(q.target.value)})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(re,{htmlFor:"registry-item-repository-url",children:"Repository URL (optional)"}),t.jsx(xe,{id:"registry-item-repository-url",className:"h-9 text-sm",placeholder:"https://github.com/org/repo",value:ce,onChange:q=>fe(q.target.value)}),ve.repositoryUrl&&t.jsx("p",{className:"text-xs text-destructive",children:ve.repositoryUrl})]})]}),t.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(re,{children:"README"}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:[ke.length,"/50000"]})]}),t.jsx("div",{className:"inline-flex rounded-lg border border-border p-0.5",children:(We?["link","content","generate"]:["link","content"]).map(q=>t.jsx("button",{type:"button",className:ee("px-2.5 py-1 text-xs rounded-md",Te===q?"bg-primary text-primary-foreground":"text-muted-foreground"),onClick:()=>$e(q),children:q==="link"?"Link":q==="content"?"Content":"Generate"},q))}),Te==="link"&&t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(xe,{className:"h-9 text-sm",placeholder:"https://raw.githubusercontent.com/org/repo/main/README.md",value:ie,onChange:q=>De(q.target.value)}),ve.readmeUrl&&t.jsx("p",{className:"text-xs text-destructive",children:ve.readmeUrl})]}),Te==="content"&&t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(zt,{className:"text-sm max-h-48 overflow-y-auto resize-none",placeholder:`# README
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v}from"./binder-BfA1Jrrc.js";import{bV as _,bQ as O,o,n as e,av as f,ax as d,bW as c,bX as L,bY as C,bm as s,ay as g,bi as u,bl as b,bj as i,aw as R,bZ as G,b_ as P,b$ as x,c0 as M,c1 as w,c2 as B,c3 as I}from"./index-De7oAufQ.js";import{c as D}from"./constants-C6R-Odkq.js";const k=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:o({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),W=_("assistant",k),U=[...W],T=G(()=>u([P(),e(),s(),b(),f(e(),T),d(T)])),m=f(e(),f(e(),T)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=o({type:i("text"),text:e().describe("The text content"),providerOptions:m}),Y=o({type:i("text"),text:e().describe("The text content"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),F=e().describe("File data as URL string"),A=o({type:i("file"),filename:e().optional().describe("Optional filename of the file"),data:F,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:m}),j=o({type:i("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),q=o({type:i("reasoning"),text:e().describe("The reasoning text"),providerOptions:m}),V=o({type:i("reasoning"),text:e().describe("The reasoning text"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),$=o({type:i("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:b().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:m}),H=o({type:i("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:b().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),J=u([o({type:i("text"),value:e()}),o({type:i("json"),value:T}),o({type:i("error-text"),value:e()}),o({type:i("error-json"),value:T}),o({type:i("content"),value:d(u([o({type:i("text"),text:e().describe("Text content")}),o({type:i("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))}),o({type:i("execution-denied"),reason:e().optional()}),e().describe("Raw or JSON-serialized output (e.g. from AI SDK mapToolResultOutput)")]),N=o({type:i("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:J.describe("Result of the tool call"),result:R().describe("Unknown result of the tool call"),providerOptions:m}),K=o({type:i("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:c().describe("Result of the tool call (JSON-serializable)"),isError:b().optional().describe("Whether the result is an error or error message"),providerExecuted:b().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),z=u([o({type:i("source"),sourceType:i("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),o({type:i("source"),sourceType:i("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:c().optional().describe("Additional provider-specific metadata")})]),X=o({role:i("system"),content:e().describe("System message content"),providerOptions:m}),Z=o({role:i("user"),content:d(u([E,A])).describe("User message content parts (text or file)"),providerOptions:m}),Q=o({role:i("assistant"),content:d(u([E,A,q,$,N])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:m}),ee=o({role:i("tool"),content:d(N).describe("Tool message content (tool results)"),providerOptions:m}),te=u([X,Z,Q,ee]),oe=d(te).describe("A list of messages forming the prompt"),ae=o({prompt:oe.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:s().optional().describe("Maximum number of tokens to generate"),temperature:s().optional().describe("Temperature setting. The range depends on the provider and model"),topP:s().optional().describe("Nucleus sampling parameter"),topK:s().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:s().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:s().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:s().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:d(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([o({type:i("text")}),o({type:i("json"),schema:c().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:d(c()).optional().describe("The tools that are available for the model"),toolChoice:c().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:b().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:c().optional().describe("Abort signal for cancelling the operation"),providerOptions:c().optional().describe("Additional provider-specific options")}),ne=o({content:d(u([Y,j,V,H,K,z])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:g(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:C({inputTokens:s().optional(),outputTokens:s().optional(),totalTokens:s().optional(),reasoningTokens:s().optional()}).describe("Usage information for the language model call"),providerMetadata:c().optional().describe("Additional provider-specific metadata"),request:o({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:o({id:e().optional().describe("ID for the generated response"),timestamp:L().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:f(e(),e()).optional().describe("Response headers"),body:c().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:d(c()).describe("Warnings for the call, e.g. unsupported settings")});o({stream:c().describe("ReadableStream of LanguageModelV2StreamPart"),request:o({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:o({headers:f(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const re=o({supportedUrls:f(e(),d(e())).describe("Supported URL patterns by media type for the provider")});o({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:d(e()),limits:o({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:o({input:s(),output:s()}).nullable(),provider:g(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const S=o({modelId:e().describe("The ID of the model"),callOptions:ae}),ie=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:d(e()),limits:o({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:o({input:s(),output:s()}).nullable(),provider:g(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),se=_("llm",ie,{readOnly:!0}),le=[{name:"LLM_METADATA",inputSchema:o({modelId:e().describe("The ID of the model")}),outputSchema:re},{name:"LLM_DO_STREAM",inputSchema:S,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:S,outputSchema:ne},...se],ce=o({scopes:d(e()).describe("List of scopes available"),stateSchema:f(e(),R()).describe("JSON Schema (draft-07) defining the state structure")}),de=[{name:"MCP_CONFIGURATION",inputSchema:o({}),outputSchema:ce}],pe=o({}).strict(),ue=o({billing:o({mode:g(["prepaid","postpaid"]),limitPeriod:g(["daily","weekly","monthly"]).nullable()}),limit:o({total:s().nullable(),remaining:s().nullable(),reset:e().nullable()}),usage:o({total:s(),daily:s(),weekly:s(),monthly:s()}),alert:o({enabled:b(),threshold_usd:s(),email:e().nullable()}),connectionId:e()}),me=[{name:"GATEWAY_USAGE",inputSchema:pe,outputSchema:ue},{name:"GATEWAY_SET_LIMIT",inputSchema:o({}),outputSchema:o({}),opt:!0},{name:"GATEWAY_SET_ALERT",inputSchema:o({}),outputSchema:o({}),opt:!0}],y={LLMS:le,WORKFLOW:B,WORKFLOW_EXECUTION:w,ASSISTANTS:U,MCP:de,AI_GATEWAY_BILLING:me,EVENT_BUS:M,TRIGGER:x},he={"@deco/event-bus":"EVENT_BUS","@deco/llm":"LLMS","@deco/trigger":"TRIGGER"};function Re(t){if(t)return he[t]}function fe(t){return t.map(a=>({name:a.name,inputSchema:a.inputSchema?(()=>{try{return I(a.inputSchema)}catch(n){return console.error(`Failed to convert input schema for ${a.name}:`,n),o({})}})():o({}),outputSchema:a.outputSchema?(()=>{try{return I(a.outputSchema)}catch(n){return console.error(`Failed to convert output schema for ${a.name}:`,n),o({})}})():o({})}))}function be(t,a){const n=t.tools;if(!n||n.length===0)return!1;const l=n.map(p=>({name:p.name,inputSchema:p.inputSchema})),r=a.map(p=>({name:p.name,inputSchema:p.inputSchema,opt:p.opt}));return v(r).isImplementedBy(l)}function Ee({connections:t,binding:a}){const n=(()=>{if(a){if(typeof a=="string"){const l=a.toUpperCase(),r=y[l];if(!r){console.warn(`[useBindingConnections] Unknown binding "${a}". Available bindings: ${Object.keys(y).join(", ")}. Returning all connections without filtering.`);return}return r}if(a.length===0){console.warn("[useBindingConnections] Empty binding array provided. Returning all connections without filtering.");return}return fe(a)}})();return t?n?t.filter(l=>be(l,n)):t:[]}function ge(t){if(!t||t.length===0)return[];const a=/^COLLECTION_(.+)_LIST$/,n=[];for(const l of t){const r=l.name.match(a);r?.[1]&&n.push(r[1])}return n}function Te(t){return!t||t.length===0?!1:t.some(a=>a.name==="REGISTRY_ITEM_LIST"||a.name==="COLLECTION_REGISTRY_APP_LIST"?!0:a.name.startsWith("COLLECTION_REGISTRY_APP_"))}function Ae(t){return t?t.filter(a=>ge(a.tools).includes("REGISTRY_APP")||Te(a.tools)):[]}function Ie(t){if(!t)return null;const a=typeof t=="string"?t:t.url;if(!a)return null;const n=a.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function Ne(t){const a=Ie(t);if(!a)return null;const n=`https://github.com/${a.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function ve(t){if(!t)return"";const a=t.find(r=>r.name==="COLLECTION_REGISTRY_APP_LIST");if(a)return a.name;const n=t.find(r=>r.name==="REGISTRY_ITEM_LIST");if(n)return n.name;const l=t.find(r=>r.name.startsWith("COLLECTION_REGISTRY_APP_")&&r.name.endsWith("_LIST"));return l?l.name:""}function Le(t){if(!t)return"";const a=t.find(r=>r.name==="COLLECTION_REGISTRY_APP_FILTERS");if(a)return a.name;const n=t.find(r=>r.name==="REGISTRY_ITEM_FILTERS");if(n)return n.name;const l=t.find(r=>r.name.startsWith("COLLECTION_REGISTRY_APP_")&&r.name.endsWith("_FILTERS"));return l?l.name:""}function Ce(t,a){if(!t)return"";const n=t.find(p=>p.name===`COLLECTION_REGISTRY_APP${a}`);if(n)return n.name;const l={_GET:"REGISTRY_ITEM_GET",_VERSIONS:"REGISTRY_ITEM_VERSIONS",_SEARCH:"REGISTRY_ITEM_SEARCH"},r=t.find(p=>p.name===l[a]);if(r)return r.name;const h=t.find(p=>p.name.startsWith("COLLECTION_REGISTRY_APP_")&&p.name.endsWith(a));return h?h.name:""}function Ge(t){if(!t)return[];const a=[];for(const n of t){let l=[];if(Array.isArray(n))l=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(h=>Array.isArray(n[h]));r&&(l=n[r])}a.push(...l)}return a}const Se={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function Pe(t){return t?Se[t]??t.toUpperCase():null}function xe(t){return t?t.match(/schemas\/([\d-]+)/)?.[1]??null:null}function Me(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const a=Object.keys(t).find(n=>Array.isArray(t[n]));if(a)return t[a]}return[]}async function we(t,a,n,l){const r=await D({connectionId:t,orgId:a});try{const h=await r.callTool({name:n,arguments:l});return h.structuredContent??h}finally{await r.close().catch(console.error)}}export{Ge as a,Pe as b,we as c,Ee as d,Me as e,ve as f,Ne as g,be as h,Le as i,Ie as j,Ce as k,xe as l,Re as r,Ae as u};
|
|
1
|
+
import{a as v}from"./binder-D4cqx_Kx.js";import{bV as _,bQ as O,o,n as e,av as f,ax as d,bW as c,bX as L,bY as C,bm as s,ay as g,bi as u,bl as b,bj as i,aw as R,bZ as G,b_ as P,b$ as x,c0 as M,c1 as w,c2 as B,c3 as I}from"./index-NjMxPJgF.js";import{c as D}from"./constants-D7qXOYRn.js";const k=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:o({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),W=_("assistant",k),U=[...W],T=G(()=>u([P(),e(),s(),b(),f(e(),T),d(T)])),m=f(e(),f(e(),T)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=o({type:i("text"),text:e().describe("The text content"),providerOptions:m}),Y=o({type:i("text"),text:e().describe("The text content"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),F=e().describe("File data as URL string"),A=o({type:i("file"),filename:e().optional().describe("Optional filename of the file"),data:F,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:m}),j=o({type:i("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),q=o({type:i("reasoning"),text:e().describe("The reasoning text"),providerOptions:m}),V=o({type:i("reasoning"),text:e().describe("The reasoning text"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),$=o({type:i("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:b().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:m}),H=o({type:i("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:b().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),J=u([o({type:i("text"),value:e()}),o({type:i("json"),value:T}),o({type:i("error-text"),value:e()}),o({type:i("error-json"),value:T}),o({type:i("content"),value:d(u([o({type:i("text"),text:e().describe("Text content")}),o({type:i("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))}),o({type:i("execution-denied"),reason:e().optional()}),e().describe("Raw or JSON-serialized output (e.g. from AI SDK mapToolResultOutput)")]),N=o({type:i("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:J.describe("Result of the tool call"),result:R().describe("Unknown result of the tool call"),providerOptions:m}),K=o({type:i("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:c().describe("Result of the tool call (JSON-serializable)"),isError:b().optional().describe("Whether the result is an error or error message"),providerExecuted:b().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),z=u([o({type:i("source"),sourceType:i("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),o({type:i("source"),sourceType:i("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:c().optional().describe("Additional provider-specific metadata")})]),X=o({role:i("system"),content:e().describe("System message content"),providerOptions:m}),Z=o({role:i("user"),content:d(u([E,A])).describe("User message content parts (text or file)"),providerOptions:m}),Q=o({role:i("assistant"),content:d(u([E,A,q,$,N])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:m}),ee=o({role:i("tool"),content:d(N).describe("Tool message content (tool results)"),providerOptions:m}),te=u([X,Z,Q,ee]),oe=d(te).describe("A list of messages forming the prompt"),ae=o({prompt:oe.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:s().optional().describe("Maximum number of tokens to generate"),temperature:s().optional().describe("Temperature setting. The range depends on the provider and model"),topP:s().optional().describe("Nucleus sampling parameter"),topK:s().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:s().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:s().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:s().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:d(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([o({type:i("text")}),o({type:i("json"),schema:c().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:d(c()).optional().describe("The tools that are available for the model"),toolChoice:c().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:b().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:c().optional().describe("Abort signal for cancelling the operation"),providerOptions:c().optional().describe("Additional provider-specific options")}),ne=o({content:d(u([Y,j,V,H,K,z])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:g(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:C({inputTokens:s().optional(),outputTokens:s().optional(),totalTokens:s().optional(),reasoningTokens:s().optional()}).describe("Usage information for the language model call"),providerMetadata:c().optional().describe("Additional provider-specific metadata"),request:o({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:o({id:e().optional().describe("ID for the generated response"),timestamp:L().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:f(e(),e()).optional().describe("Response headers"),body:c().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:d(c()).describe("Warnings for the call, e.g. unsupported settings")});o({stream:c().describe("ReadableStream of LanguageModelV2StreamPart"),request:o({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:o({headers:f(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const re=o({supportedUrls:f(e(),d(e())).describe("Supported URL patterns by media type for the provider")});o({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:d(e()),limits:o({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:o({input:s(),output:s()}).nullable(),provider:g(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const S=o({modelId:e().describe("The ID of the model"),callOptions:ae}),ie=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:d(e()),limits:o({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:o({input:s(),output:s()}).nullable(),provider:g(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),se=_("llm",ie,{readOnly:!0}),le=[{name:"LLM_METADATA",inputSchema:o({modelId:e().describe("The ID of the model")}),outputSchema:re},{name:"LLM_DO_STREAM",inputSchema:S,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:S,outputSchema:ne},...se],ce=o({scopes:d(e()).describe("List of scopes available"),stateSchema:f(e(),R()).describe("JSON Schema (draft-07) defining the state structure")}),de=[{name:"MCP_CONFIGURATION",inputSchema:o({}),outputSchema:ce}],pe=o({}).strict(),ue=o({billing:o({mode:g(["prepaid","postpaid"]),limitPeriod:g(["daily","weekly","monthly"]).nullable()}),limit:o({total:s().nullable(),remaining:s().nullable(),reset:e().nullable()}),usage:o({total:s(),daily:s(),weekly:s(),monthly:s()}),alert:o({enabled:b(),threshold_usd:s(),email:e().nullable()}),connectionId:e()}),me=[{name:"GATEWAY_USAGE",inputSchema:pe,outputSchema:ue},{name:"GATEWAY_SET_LIMIT",inputSchema:o({}),outputSchema:o({}),opt:!0},{name:"GATEWAY_SET_ALERT",inputSchema:o({}),outputSchema:o({}),opt:!0}],y={LLMS:le,WORKFLOW:B,WORKFLOW_EXECUTION:w,ASSISTANTS:U,MCP:de,AI_GATEWAY_BILLING:me,EVENT_BUS:M,TRIGGER:x},he={"@deco/event-bus":"EVENT_BUS","@deco/llm":"LLMS","@deco/trigger":"TRIGGER"};function Re(t){if(t)return he[t]}function fe(t){return t.map(a=>({name:a.name,inputSchema:a.inputSchema?(()=>{try{return I(a.inputSchema)}catch(n){return console.error(`Failed to convert input schema for ${a.name}:`,n),o({})}})():o({}),outputSchema:a.outputSchema?(()=>{try{return I(a.outputSchema)}catch(n){return console.error(`Failed to convert output schema for ${a.name}:`,n),o({})}})():o({})}))}function be(t,a){const n=t.tools;if(!n||n.length===0)return!1;const l=n.map(p=>({name:p.name,inputSchema:p.inputSchema})),r=a.map(p=>({name:p.name,inputSchema:p.inputSchema,opt:p.opt}));return v(r).isImplementedBy(l)}function Ee({connections:t,binding:a}){const n=(()=>{if(a){if(typeof a=="string"){const l=a.toUpperCase(),r=y[l];if(!r){console.warn(`[useBindingConnections] Unknown binding "${a}". Available bindings: ${Object.keys(y).join(", ")}. Returning all connections without filtering.`);return}return r}if(a.length===0){console.warn("[useBindingConnections] Empty binding array provided. Returning all connections without filtering.");return}return fe(a)}})();return t?n?t.filter(l=>be(l,n)):t:[]}function ge(t){if(!t||t.length===0)return[];const a=/^COLLECTION_(.+)_LIST$/,n=[];for(const l of t){const r=l.name.match(a);r?.[1]&&n.push(r[1])}return n}function Te(t){return!t||t.length===0?!1:t.some(a=>a.name==="REGISTRY_ITEM_LIST"||a.name==="COLLECTION_REGISTRY_APP_LIST"?!0:a.name.startsWith("COLLECTION_REGISTRY_APP_"))}function Ae(t){return t?t.filter(a=>ge(a.tools).includes("REGISTRY_APP")||Te(a.tools)):[]}function Ie(t){if(!t)return null;const a=typeof t=="string"?t:t.url;if(!a)return null;const n=a.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function Ne(t){const a=Ie(t);if(!a)return null;const n=`https://github.com/${a.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function ve(t){if(!t)return"";const a=t.find(r=>r.name==="COLLECTION_REGISTRY_APP_LIST");if(a)return a.name;const n=t.find(r=>r.name==="REGISTRY_ITEM_LIST");if(n)return n.name;const l=t.find(r=>r.name.startsWith("COLLECTION_REGISTRY_APP_")&&r.name.endsWith("_LIST"));return l?l.name:""}function Le(t){if(!t)return"";const a=t.find(r=>r.name==="COLLECTION_REGISTRY_APP_FILTERS");if(a)return a.name;const n=t.find(r=>r.name==="REGISTRY_ITEM_FILTERS");if(n)return n.name;const l=t.find(r=>r.name.startsWith("COLLECTION_REGISTRY_APP_")&&r.name.endsWith("_FILTERS"));return l?l.name:""}function Ce(t,a){if(!t)return"";const n=t.find(p=>p.name===`COLLECTION_REGISTRY_APP${a}`);if(n)return n.name;const l={_GET:"REGISTRY_ITEM_GET",_VERSIONS:"REGISTRY_ITEM_VERSIONS",_SEARCH:"REGISTRY_ITEM_SEARCH"},r=t.find(p=>p.name===l[a]);if(r)return r.name;const h=t.find(p=>p.name.startsWith("COLLECTION_REGISTRY_APP_")&&p.name.endsWith(a));return h?h.name:""}function Ge(t){if(!t)return[];const a=[];for(const n of t){let l=[];if(Array.isArray(n))l=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(h=>Array.isArray(n[h]));r&&(l=n[r])}a.push(...l)}return a}const Se={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function Pe(t){return t?Se[t]??t.toUpperCase():null}function xe(t){return t?t.match(/schemas\/([\d-]+)/)?.[1]??null:null}function Me(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const a=Object.keys(t).find(n=>Array.isArray(t[n]));if(a)return t[a]}return[]}async function we(t,a,n,l){const r=await D({connectionId:t,orgId:a});try{const h=await r.callTool({name:n,arguments:l});return h.structuredContent??h}finally{await r.close().catch(console.error)}}export{Ge as a,Pe as b,we as c,Ee as d,Me as e,ve as f,Ne as g,be as h,Le as i,Ie as j,Ce as k,xe as l,Re as r,Ae as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as q,d as Y,e as A,r as B,j as s,B as z,f as G}from"./index-
|
|
1
|
+
import{c as q,d as Y,e as A,r as B,j as s,B as z,f as G}from"./index-NjMxPJgF.js";import{u as K}from"./useMutation-68NxhXCf.js";import{I as L}from"./input-B89sozd8.js";function J(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=K(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let f;e[22]!==a||e[23]!==t?(f=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=f):f=e[24];let g;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(g=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=g):g=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==g||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,f,g,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=g,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await G.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{J as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,bh as Pn,c as He,D as Je,j as he}from"./index-De7oAufQ.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={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"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:M,getPanelStyle:$,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),D=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=D.current,B={...H};D.current.id=G,D.current.idIsFromProps=l!==void 0,D.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(D.current,B)}),ne(()=>{const _=D.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(D.current)},expand:_=>{L(D.current,_)},getId(){return G},getSize(){return M(D.current)},isCollapsed(){return R(D.current)},isExpanded(){return!R(D.current)},resize:_=>{q(D.current,_)}}),[S,L,M,R,G,q]);const Y=$(D.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let $e=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),$e=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if($e!==i){if($e=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(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 kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Dn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Mn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Dn(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"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Mn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,Nn=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function $n(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function De(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=Nn?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Me(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let Ne=new AbortController;function Pe(){Ne.abort(),Ne=new AbortController;const n={capture:!0,signal:Ne.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",De,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",De,n),window.addEventListener("pointercancel",De,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const M=L+C,$=le({panelConstraints:t,panelIndex:S,size:M});if(j(L,$)||(C-=$-L,l[S]=$),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(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 r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(M=>M.id===z);if(L>=0){const M=s[L];x(M,`No panel data found for index ${L}`);const $=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=M.constraints;if($!=null&&R){const F=ge({delta:j($,V)?P-V:V-$,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(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 gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(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 Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(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 mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),M=f.useRef({}),$=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,M.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map($.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:N}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){$.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:N,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,M.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:N=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X(N,I)){const K=$.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?N-de:de-N,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,M.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),D=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const N=Zn(c,d,b);N&&($.current=new Map(Object.entries(N.expandToSizes)),y=N.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map(N=>N.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,M.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:N,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=N??{},Le=dn(Z,c,y);let T=Fn(d,c,I,N,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Me(c,T<0?ln:an):Me(c,T<0?sn:un):Me(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,M.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:N}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:N,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,M.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:N,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&N&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete M.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:D,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,D,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const M=f.useContext(Ee);if(M===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:$,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=M,W=Ge(i),[G,D]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return $n(W,re,$,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){D("inactive");return}switch(m){case"down":{D("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&D("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{D("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,$,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:$,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Yn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function Qn(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function et(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("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]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{Qn as R,et as a,Yn as b};
|
|
1
|
+
import{r as f,bh as Pn,c as He,D as Je,j as he}from"./index-NjMxPJgF.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={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"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:M,getPanelStyle:$,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),D=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=D.current,B={...H};D.current.id=G,D.current.idIsFromProps=l!==void 0,D.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(D.current,B)}),ne(()=>{const _=D.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(D.current)},expand:_=>{L(D.current,_)},getId(){return G},getSize(){return M(D.current)},isCollapsed(){return R(D.current)},isExpanded(){return!R(D.current)},resize:_=>{q(D.current,_)}}),[S,L,M,R,G,q]);const Y=$(D.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let $e=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),$e=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if($e!==i){if($e=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(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 kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Dn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Mn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Dn(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"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Mn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,Nn=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function $n(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function De(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=Nn?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Me(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let Ne=new AbortController;function Pe(){Ne.abort(),Ne=new AbortController;const n={capture:!0,signal:Ne.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",De,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",De,n),window.addEventListener("pointercancel",De,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const M=L+C,$=le({panelConstraints:t,panelIndex:S,size:M});if(j(L,$)||(C-=$-L,l[S]=$),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(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 r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(M=>M.id===z);if(L>=0){const M=s[L];x(M,`No panel data found for index ${L}`);const $=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=M.constraints;if($!=null&&R){const F=ge({delta:j($,V)?P-V:V-$,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(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 gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(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 Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(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 mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),M=f.useRef({}),$=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,M.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map($.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:N}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){$.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:N,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,M.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:N=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X(N,I)){const K=$.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?N-de:de-N,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,M.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),D=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const N=Zn(c,d,b);N&&($.current=new Map(Object.entries(N.expandToSizes)),y=N.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map(N=>N.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,M.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:N,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=N??{},Le=dn(Z,c,y);let T=Fn(d,c,I,N,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Me(c,T<0?ln:an):Me(c,T<0?sn:un):Me(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,M.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:N}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:N,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,M.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:N,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&N&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete M.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:D,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,D,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const M=f.useContext(Ee);if(M===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:$,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=M,W=Ge(i),[G,D]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return $n(W,re,$,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){D("inactive");return}switch(m){case"down":{D("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&D("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{D("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,$,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:$,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Yn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function Qn(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function et(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("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]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{Qn as R,et as a,Yn as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,j as i,B as v}from"./index-
|
|
1
|
+
import{c as j,j as i,B as v}from"./index-NjMxPJgF.js";import{i as p,a as S}from"./Save01-8oEsqMkJ.js";import{i as z}from"./Loading01-Bb8FCosd.js";function k(x){const e=j.c(15),{onSave:m,onUndo:d,isDirty:b,isSaving:s,saveLabel:f,undoLabel:u}=x,n=f===void 0?"Save":f,o=u===void 0?"Undo":u;if(!b)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(p,{size:14}),e[0]=r):r=e[0];let t;e[1]!==s||e[2]!==d||e[3]!==o?(t=i.jsxs(v,{variant:"outline",size:"sm",onClick:d,disabled:s,"aria-label":o,children:[r,o]}),e[1]=s,e[2]=d,e[3]=o,e[4]=t):t=e[4];let a;e[5]!==s?(a=s?i.jsx(z,{size:14,className:"animate-spin"}):i.jsx(S,{size:14}),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==s||e[8]!==m||e[9]!==n||e[10]!==a?(l=i.jsxs(v,{variant:"default",size:"sm",onClick:m,disabled:s,"aria-label":n,children:[a,n]}),e[7]=s,e[8]=m,e[9]=n,e[10]=a,e[11]=l):l=e[11];let c;return e[12]!==t||e[13]!==l?(c=i.jsxs(i.Fragment,{children:[t,l]}),e[12]=t,e[13]=l,e[14]=c):c=e[14],c}export{k as S};
|