@decocms/mesh 2.111.1 → 2.112.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DoLIsJyW.js → AlertCircle-XhRNrbr6.js} +1 -1
- package/dist/client/assets/{AlertOctagon-DrqBF9u9.js → AlertOctagon-jelEMdnc.js} +1 -1
- package/dist/client/assets/{AlertTriangle-D_RCNZgn.js → AlertTriangle-CIxU1Krl.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CiECeG_6.js → ArrowLeft-C8lAfmna.js} +1 -1
- package/dist/client/assets/{ArrowUp-D9nucysD.js → ArrowUp-DIB1JjtE.js} +1 -1
- package/dist/client/assets/{Check-S3QhFxnB.js → Check-B5DUxQ7l.js} +1 -1
- package/dist/client/assets/{CheckCircle-BwSnxBGS.js → CheckCircle-CTKbvECl.js} +1 -1
- package/dist/client/assets/{CheckDone01-CcIaZNG6.js → CheckDone01-BphBp83K.js} +1 -1
- package/dist/client/assets/{ChevronDown-Db867kLo.js → ChevronDown-gAOoAGjG.js} +1 -1
- package/dist/client/assets/{ChevronRight-Dn7uUDPs.js → ChevronRight-Bs6Fdikt.js} +1 -1
- package/dist/client/assets/{Clock-CNXDMvsO.js → Clock-CWVBk0le.js} +1 -1
- package/dist/client/assets/{Code01-BRM8aMAT.js → Code01-ZkI7Pkw_.js} +1 -1
- package/dist/client/assets/{Container-B6JgNenI.js → Container-DinJV2Fk.js} +1 -1
- package/dist/client/assets/{Copy01-Cz2LFET8.js → Copy01-DD_krz0-.js} +1 -1
- package/dist/client/assets/{Dataflow03-CNT7oou1.js → Dataflow03-B40GGc4m.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-Cgwm8-n8.js → DotsHorizontal-DhLIU4fX.js} +1 -1
- package/dist/client/assets/{DotsVertical-CSBkyg8i.js → DotsVertical-CbTymtSi.js} +1 -1
- package/dist/client/assets/{Download01-Cplkmc8p.js → Download01--hFG7PiW.js} +1 -1
- package/dist/client/assets/{Edit01-DYicIkWQ.js → Edit01-Bips0y6M.js} +1 -1
- package/dist/client/assets/{Eye-6Ugv08pC.js → Eye-CswTeoGK.js} +1 -1
- package/dist/client/assets/{File02-Bko0cFfB.js → File02-327uvonI.js} +1 -1
- package/dist/client/assets/{File06-BERqL6Fz.js → File06-DrZu2kHZ.js} +1 -1
- package/dist/client/assets/{FilterLines-BTJMwq10.js → FilterLines-ClcMNTtR.js} +1 -1
- package/dist/client/assets/{Globe01-DdCBcsNU.js → Globe01-Of6NyzJJ.js} +1 -1
- package/dist/client/assets/{Globe02-B9FSl_3I.js → Globe02-ZEr5qFT1.js} +1 -1
- package/dist/client/assets/{Grid01-B_PE8zxd.js → Grid01-DDpfnq7D.js} +1 -1
- package/dist/client/assets/{Home02-Bl0W4A5J.js → Home02-C4IyasLW.js} +1 -1
- package/dist/client/assets/{Image01-DEKpS11Y.js → Image01-CSvb6EtO.js} +1 -1
- package/dist/client/assets/{Inbox01-C-CAM8QG.js → Inbox01-C2d3kzod.js} +1 -1
- package/dist/client/assets/{InfoCircle-Zv-wvxDb.js → InfoCircle-C3UsXxmT.js} +1 -1
- package/dist/client/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
- package/dist/client/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
- package/dist/client/assets/{Key01-B1PK93o9.js → Key01-5UoHohuK.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BId4gOUM.js → LinkExternal01-Ch97RTDv.js} +1 -1
- package/dist/client/assets/{List-DfbDeCub.js → List-BnwrdBow.js} +1 -1
- package/dist/client/assets/{Loading01-COGPPF9I.js → Loading01-CMdu9ggl.js} +1 -1
- package/dist/client/assets/{Lock01-BPPfzo34.js → Lock01-0UpXUb4F.js} +1 -1
- package/dist/client/assets/{Pin01-Bx2RBqOD.js → Pin01-CzeUj5XD.js} +1 -1
- package/dist/client/assets/{Play-BP_ciIH7.js → Play-B2yaDRk7.js} +1 -1
- package/dist/client/assets/{Plus-Dn_ZYrS1.js → Plus-CaXzOU_N.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-B7z9uQII.js → RefreshCcw01-DkghEus_.js} +1 -1
- package/dist/client/assets/{RefreshCw01-CPKmAUk2.js → RefreshCw01-DpQtrD8f.js} +1 -1
- package/dist/client/assets/{Save01-Qq5qb528.js → Save01-BuKRZy5X.js} +1 -1
- package/dist/client/assets/{SearchMd-DIkP8YKo.js → SearchMd-Dnl-cdC8.js} +1 -1
- package/dist/client/assets/{Settings01-B-WT0IxN.js → Settings01-DZMOzFkI.js} +1 -1
- package/dist/client/assets/{Settings02-DRbF4dIT.js → Settings02-ChgSGaxE.js} +1 -1
- package/dist/client/assets/{Share07-BBrh8f7d.js → Share07-_sl_Dz3M.js} +1 -1
- package/dist/client/assets/{Terminal-CvHx7ePC.js → Terminal-DDmgiQpi.js} +1 -1
- package/dist/client/assets/{Tool01-DzgOQmpP.js → Tool01-D-IdstL2.js} +1 -1
- package/dist/client/assets/{Trash01-WFk1BiIk.js → Trash01-BfqMFxjX.js} +1 -1
- package/dist/client/assets/{Upload01-D8o9vD2v.js → Upload01-zXtYkYrq.js} +1 -1
- package/dist/client/assets/{Users03-DtQKjU9B.js → Users03-Cu53ZD5s.js} +1 -1
- package/dist/client/assets/{X-Dq4EFl2D.js → X-CxFonwYL.js} +1 -1
- package/dist/client/assets/{XCircle-CzZOufLC.js → XCircle-CIdz2YXd.js} +1 -1
- package/dist/client/assets/{XClose-DPdmkjsZ.js → XClose-xfYVS1lo.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-EkH7eVR6.js → agent-connections-preview-DEUSr6Cy.js} +1 -1
- package/dist/client/assets/{agent-detail-CWz5J_eL.js → agent-detail-TlZZxQYG.js} +1 -1
- package/dist/client/assets/{agents-Et1wCjfE.js → agents-AiuLKM0H.js} +1 -1
- package/dist/client/assets/{alert-dialog-CQNMYc-v.js → alert-dialog-B7u4fJIr.js} +1 -1
- package/dist/client/assets/{auth-catchall-DfMquSqQ.js → auth-catchall-BhmFmXKJ.js} +1 -1
- package/dist/client/assets/{avatar-OnZE5--2.js → avatar-DuxyT3Pu.js} +1 -1
- package/dist/client/assets/{badge-ii0tjSSJ.js → badge-DrTmNp-A.js} +1 -1
- package/dist/client/assets/{binder-Du921zu4.js → binder-gonW8bT4.js} +1 -1
- package/dist/client/assets/{breadcrumb-Rmu7tdMX.js → breadcrumb-COETN7p_.js} +1 -1
- package/dist/client/assets/{button-CbQ7DCWa.js → button-BwVHfdAu.js} +1 -1
- package/dist/client/assets/{card-7oHUrTQa.js → card-DDW-bHuH.js} +1 -1
- package/dist/client/assets/{checkbox-BCu_09z1.js → checkbox-BKJZntr9.js} +1 -1
- package/dist/client/assets/{circle-alert-CqCXYpDP.js → circle-alert-Bq-gcogv.js} +1 -1
- package/dist/client/assets/{collection-detail-D2nXhta9.js → collection-detail-D8GWyZBl.js} +1 -1
- package/dist/client/assets/{collection-tab-CET_05lh.js → collection-tab-BG5M-dm_.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-2RrlQ59w.js → collection-table-wrapper-Dy0CKNCd.js} +1 -1
- package/dist/client/assets/{collection-tabs-CbdBhx59.js → collection-tabs-DJgYpKEv.js} +1 -1
- package/dist/client/assets/{command-iyW3cM1y.js → command-qPWw11V6.js} +1 -1
- package/dist/client/assets/{connect-CBwRD__r.js → connect-D9w1piIf.js} +1 -1
- package/dist/client/assets/{connection-card-A6Y0-8tD.js → connection-card-Cak97ZNN.js} +1 -1
- package/dist/client/assets/{connection-detail-qjLhmk4b.js → connection-detail-LJhMQTz9.js} +1 -1
- package/dist/client/assets/{connections-CUDeqQFL.js → connections-i8tS1d6n.js} +1 -1
- package/dist/client/assets/{constants-CbGbN-bq.js → constants-B3FMsdmP.js} +1 -1
- package/dist/client/assets/constants-C0akpyo-.js +1 -0
- package/dist/client/assets/{create-organization-dialog-B4JPfugS.js → create-organization-dialog-BUJzKNNB.js} +1 -1
- package/dist/client/assets/{create-project-dialog-B3hWtETJ.js → create-project-dialog-DUMjTb25.js} +1 -1
- package/dist/client/assets/{dialog-BftOyiW8.js → dialog-D_9eqXMo.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Bdruc0LS.js → dropdown-menu-D_spLGNE.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CJPYq1E9.js → dynamic-plugin-layout-BIPoiWWy.js} +1 -1
- package/dist/client/assets/{empty-state-iavkw9Sy.js → empty-state-BCRjE2uF.js} +1 -1
- package/dist/client/assets/{empty-state-BvtPC2JZ.js → empty-state-MBrI-omO.js} +1 -1
- package/dist/client/assets/{env-vars-editor-BlICVcO7.js → env-vars-editor-B1Xbq54B.js} +1 -1
- package/dist/client/assets/{error-boundary-DbifhZLk.js → error-boundary-BROAyAix.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Cpvk8KCW.js → extract-connection-data-CqgzVGf8.js} +1 -1
- package/dist/client/assets/{file-browser-CznowODa.js → file-browser-Beq9lJxT.js} +2 -2
- package/dist/client/assets/{form-kIMczIod.js → form-BfuMlkTR.js} +1 -1
- package/dist/client/assets/{grid-view-CZzLJe_1.js → grid-view-5vVCK2xS.js} +1 -1
- package/dist/client/assets/{home-DU3nKgfd.js → home-CPVbzqd_.js} +1 -1
- package/dist/client/assets/{index-Br0JHFBh.js → index-A91v4mp1.js} +3 -3
- package/dist/client/assets/{index-D1JD9SKG.js → index-B7dOXiYU.js} +1 -1
- package/dist/client/assets/{index-DcQ5sTOJ.js → index-Bbd9gE-H.js} +1 -1
- package/dist/client/assets/index-BuV4a8T9.css +1 -0
- package/dist/client/assets/{index-CgLKT4HX.js → index-CFnTWCh4.js} +1 -1
- package/dist/client/assets/{index-BKChsiEY.js → index-CNSnnj9S.js} +1 -1
- package/dist/client/assets/{index-elk3AqGN.js → index-CP4hShu9.js} +1 -1
- package/dist/client/assets/{index-1EvwrjEK.js → index-C_WdBNBN.js} +1 -1
- package/dist/client/assets/{index-CWy3VNFy.js → index-DVjKsWSu.js} +1 -1
- package/dist/client/assets/{index-DHAcJcPj.js → index-nFTvw1tI.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DIFSvrKE.js → infiniteQueryObserver-DVcoEENh.js} +1 -1
- package/dist/client/assets/{input-B3t3VT3u.js → input-CxOgBoT3.js} +1 -1
- package/dist/client/assets/{integration-icon-CVBsh-Zs.js → integration-icon-C3HDJ2TY.js} +1 -1
- package/dist/client/assets/{label-DHX0KdeP.js → label-BoJA4HkT.js} +1 -1
- package/dist/client/assets/{layout-eO8gkDCj.js → layout-CuKSOlIC.js} +1 -1
- package/dist/client/assets/{localstorage-keys-eULgt2wB.js → localstorage-keys-Dn_jSKL-.js} +1 -1
- package/dist/client/assets/{login-B0ud7EVm.js → login-BNl690HG.js} +1 -1
- package/dist/client/assets/{markdown-DtPTbOTE.js → markdown-BkUdPjkx.js} +2 -2
- package/dist/client/assets/{mcp-oauth-CpFb-L7c.js → mcp-oauth-Dt4-rUXm.js} +1 -1
- package/dist/client/assets/{mcp-server-card-CoT0PTO9.js → mcp-server-card-U-lSIhgm.js} +1 -1
- package/dist/client/assets/mcp-server-detail-DYk7B3rv.js +2 -0
- package/dist/client/assets/{members-D3ElmXjg.js → members-CABhPfRV.js} +1 -1
- package/dist/client/assets/{monitoring-Nxcq5oB9.js → monitoring-Cm7y1d8p.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-DRylzEmc.js → monitoring-dashboard-edit-qVEuiigR.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-B3T80Yjv.js → monitoring-dashboard-view-DW6QMD13.js} +1 -1
- package/dist/client/assets/{oauth-callback-Val20iMZ.js → oauth-callback-ileqGyoZ.js} +1 -1
- package/dist/client/assets/{page-D_v6m4Pr.js → page-BZF2VXJu.js} +1 -1
- package/dist/client/assets/{page-Dms6Czox.js → page-ybGO2jgH.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DRbpl38Q.js → plugin-empty-state-Bq6_b7Cz.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-B-vBKNzd.js → plugin-empty-state-DAfwhyPk.js} +1 -1
- package/dist/client/assets/{plugin-header-AwQ6cOg1.js → plugin-header-DEy4Hr_U.js} +1 -1
- package/dist/client/assets/{plugin-header-DYZlCpnn.js → plugin-header-DkKbccNU.js} +1 -1
- package/dist/client/assets/{popover-HxdJo3dm.js → popover-CF2TdbiE.js} +1 -1
- package/dist/client/assets/{project-layout-qIbLyGZX.js → project-layout-B1avAp7b.js} +1 -1
- package/dist/client/assets/{project-settings-BeVIDFf9.js → project-settings-Btk8xeAy.js} +1 -1
- package/dist/client/assets/{projects-list-BjL8NaHG.js → projects-list-DMhmswnD.js} +1 -1
- package/dist/client/assets/{readme-viewer-vnx5rDw6.js → readme-viewer-wWMdmSqj.js} +1 -1
- package/dist/client/assets/{registry-layout-WuO9TH_S.js → registry-layout-CgNXCQ8v.js} +1 -1
- package/dist/client/assets/{registry-utils-mZa7EPE6.js → registry-utils-BXVj71aF.js} +1 -1
- package/dist/client/assets/{reports-layout-DjeSH-kp.js → reports-layout-CtgxbeBK.js} +1 -1
- package/dist/client/assets/{reset-password-ClXGnQiX.js → reset-password-BaBjJZfQ.js} +1 -1
- package/dist/client/assets/{resizable-CJDB5L0X.js → resizable-ChpcyL5Y.js} +1 -1
- package/dist/client/assets/{save-actions-LAHxFAqs.js → save-actions-DC7zhX7-.js} +1 -1
- package/dist/client/assets/{scroll-area-CeAJ4NF3.js → scroll-area-BaIhqG4r.js} +1 -1
- package/dist/client/assets/{select-sypu_AhE.js → select-B6rKXsfc.js} +1 -1
- package/dist/client/assets/{shell-layout-BDvmGEL7.js → shell-layout-BctJ13P1.js} +3 -3
- package/dist/client/assets/{spinner-DPlnADS1.js → spinner-CcoEa3b9.js} +1 -1
- package/dist/client/assets/{store-invite-Dw9Zaz-G.js → store-invite-CQCJJnAO.js} +1 -1
- package/dist/client/assets/{switch-95aIlIMH.js → switch-BeRTUjS0.js} +1 -1
- package/dist/client/assets/{table-wyA99zKl.js → table-iuhYISyO.js} +1 -1
- package/dist/client/assets/{tasks-X-PfUw7v.js → tasks-CYkaWkqX.js} +1 -1
- package/dist/client/assets/{textarea-CT8KbD1I.js → textarea-BAuUjr4Q.js} +1 -1
- package/dist/client/assets/{time-range-picker-CNJYDtra.js → time-range-picker-eFbN-3aR.js} +1 -1
- package/dist/client/assets/{toggle-group-BJnoTfdt.js → toggle-group-B5HhnFXA.js} +1 -1
- package/dist/client/assets/{tools-list-BrgpYoyZ.js → tools-list-8fvDTjv1.js} +1 -1
- package/dist/client/assets/{tooltip-bAMcLRcm.js → tooltip-Du6t3RoA.js} +1 -1
- package/dist/client/assets/{topbar-portal-jn5x1lJu.js → topbar-portal-BuFWeBh-.js} +1 -1
- package/dist/client/assets/{typewriter-title-CQeuHhF0.js → typewriter-title-BOswp8Th.js} +1 -1
- package/dist/client/assets/{use-binding-8x0ZE0RF.js → use-binding-CVULPMto.js} +1 -1
- package/dist/client/assets/{use-connection-lRtb-dW8.js → use-connection-BviJ1yCA.js} +1 -1
- package/dist/client/assets/{use-copy-8Yxy3jLU.js → use-copy-CkHia13h.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-kva18e3q.js → use-create-virtual-mcp-C6vZBSXs.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-LlckRpuG.js → use-deco-chat-open-CzMYj8gX.js} +2 -2
- package/dist/client/assets/{use-install-from-registry-j5Q_nWiS.js → use-install-from-registry-DrHczTGv.js} +1 -1
- package/dist/client/assets/{use-list-state-DfmA8olb.js → use-list-state-Drh8hMrA.js} +1 -1
- package/dist/client/assets/{use-llm-Cr1Z1Gxr.js → use-llm-BwfFz3E8.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CxxmKVuE.js → use-mcp-prompts-CI86ktsa.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C-C_kr8F.js → use-mcp-tools-DfJINiT3.js} +1 -1
- package/dist/client/assets/{use-mobile-DSbkVmdY.js → use-mobile-DlTIaaTa.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C4i7nm0z.js → use-organization-settings-CchQJgkM.js} +1 -1
- package/dist/client/assets/{use-project-CR6llBuk.js → use-project-BLiHTdd1.js} +1 -1
- package/dist/client/assets/{use-view-mode-DksNkDRA.js → use-view-mode-Cwnk8Sqo.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-HsjM23zB.js → use-virtual-mcp-BJ0m1D68.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C-DtlzDI.js +1 -0
- package/dist/client/assets/{useMutation-CN6je47m.js → useMutation-BL36wQaU.js} +1 -1
- package/dist/client/assets/useQuery-Boh1HTvu.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-B0DuzCDK.js +1 -0
- package/dist/client/assets/{workflow-DtsP3jQC.js → workflow-C5veKW3B.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +117 -117
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +97 -97
- package/package.json +1 -1
- package/dist/client/assets/constants-BzDs-B8B.js +0 -1
- package/dist/client/assets/index-wH_SO4wu.css +0 -1
- package/dist/client/assets/mcp-server-detail-DAenYDZ3.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Bjfi7Hup.js +0 -1
- package/dist/client/assets/useQuery-C1TQ4FwZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BkBY75Qo.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as M,c as K,u as de,z as Be,bA as et,j as s,t as W,bE as an}from"./index-Br0JHFBh.js";import{B as F,c as J}from"./button-CbQ7DCWa.js";import{i as bt}from"./CheckCircle-BwSnxBGS.js";import{n as on}from"./Container-B6JgNenI.js";import{t as cn}from"./Settings01-B-WT0IxN.js";import{u as Ge}from"./useQuery-C1TQ4FwZ.js";import{u as Me}from"./useMutation-CN6je47m.js";import{a as be,u as ge,j as gs}from"./constants-CbGbN-bq.js";import{u as dn}from"./useInfiniteQuery-Bjfi7Hup.js";import{B as U}from"./badge-ii0tjSSJ.js";import{I as ye}from"./input-B3t3VT3u.js";import{a as kt,c as We,D as St,b as Rt,h as ls,i as as,g as mn}from"./dropdown-menu-Bdruc0LS.js";import{e as js,a as ys,b as Tt,T as Ae,d as bs,c as Le}from"./table-wyA99zKl.js";import{a as os,T as un}from"./toggle-group-BJnoTfdt.js";import{u as xn}from"./use-view-mode-DksNkDRA.js";import{i as Xt}from"./DotsVertical-CSBkyg8i.js";import{i as hn}from"./FilterLines-BTJMwq10.js";import{i as vs}from"./Globe01-DdCBcsNU.js";import{i as mt}from"./Loading01-COGPPF9I.js";import{i as Ns}from"./SearchMd-DIkP8YKo.js";import{b as It,c as Mt,d as Pt,e as Et,a as Dt,D as $t}from"./dialog-BftOyiW8.js";import{i as jt}from"./AlertCircle-DoLIsJyW.js";import{n as pn}from"./Download01-Cplkmc8p.js";import{i as cs}from"./Upload01-D8o9vD2v.js";import{c as Lt,b as zt,d as Ot,A as Ut,g as qt,e as Ft,a as Bt,f as Gt}from"./alert-dialog-CQNMYc-v.js";import{C as ne}from"./card-7oHUrTQa.js";import{s as vt}from"./Trash01-WFk1BiIk.js";import{L as ie}from"./label-DHX0KdeP.js";import{n as fn,S as ws,a as Cs,b as _s,c as ks,d as Ct}from"./select-sypu_AhE.js";import{S as _t}from"./switch-95aIlIMH.js";import{T as At}from"./textarea-CT8KbD1I.js";import{i as gn}from"./ArrowLeft-CiECeG_6.js";import{i as jn,u as Ht,t as yn}from"./use-copy-8Yxy3jLU.js";import{s as es}from"./RefreshCcw01-B7z9uQII.js";import{i as bn}from"./X-Dq4EFl2D.js";import{t as Ss}from"./ChevronDown-Db867kLo.js";import{s as Rs}from"./Eye-6Ugv08pC.js";import{n as vn}from"./LinkExternal01-BId4gOUM.js";import{i as Nn}from"./XCircle-CzZOufLC.js";import{h as Ts,e as Is}from"./use-connection-lRtb-dW8.js";import{b as wn,P as Cn,a as _n}from"./popover-HxdJo3dm.js";import{i as Wt}from"./Check-S3QhFxnB.js";import{a as Jt}from"./Copy01-Cz2LFET8.js";import{i as kn,a as Sn}from"./Save01-Qq5qb528.js";import{i as Rn}from"./Key01-B1PK93o9.js";import{s as Tn}from"./Plus-Dn_ZYrS1.js";import{a as In,b as Mn,T as Pn}from"./tooltip-bAMcLRcm.js";import{a as En,i as Dn}from"./mcp-oauth-CpFb-L7c.js";import{i as $n}from"./Play-BP_ciIH7.js";import"./infiniteQueryObserver-DIFSvrKE.js";import"./ChevronRight-Dn7uUDPs.js";import"./use-mobile-DSbkVmdY.js";import"./index-elk3AqGN.js";const Ms=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M10.743 5.092C11.149 5.032 11.569 5 12 5c5.105 0 8.455 4.505 9.58 6.287.137.215.205.323.243.49a1.16 1.16 0 0 1 0 .447c-.038.166-.107.274-.244.492-.3.474-.757 1.141-1.363 1.865M6.724 6.715c-2.162 1.467-3.63 3.504-4.303 4.57-.137.217-.205.325-.243.492a1.173 1.173 0 0 0 0 .446c.038.167.106.274.242.49C3.546 14.495 6.895 19 12 19c2.059 0 3.832-.732 5.289-1.723M3 3l18 18M9.88 9.879a3 3 0 1 0 4.243 4.243"}));Ms.displayName="EyeOff";const Ps=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.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:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m12.708 18.364-1.415 1.414a5 5 0 1 1-7.07-7.07l1.413-1.415m12.728 1.414 1.415-1.414a5 5 0 0 0-7.071-7.071l-1.415 1.414M8.5 15.5l7-7"}));Es.displayName="Link01";const Ds=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.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"}),M.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"}));Ds.displayName="StopSquare";const ts=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.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"}));ts.displayName="Tool02";const G={all:["private-registry"],items:()=>[...G.all,"items"],itemsList:(t,e,n,r)=>[...G.items(),"list",{search:t,tags:e,categories:n,limit:r}],item:t=>[...G.items(),"item",t],filters:()=>[...G.all,"filters"],registryConfig:()=>[...G.all,"registry-config"],registryConfigByPlugin:(t,e)=>[...G.registryConfig(),t,e],publishRequests:()=>[...G.all,"publish-requests"],publishRequestsByOrg:t=>[...G.publishRequests(),"org",t],publishRequestsList:t=>[...G.publishRequests(),"list",{status:t??"all"}],publishRequestsListByOrg:(t,e)=>[...G.publishRequestsByOrg(t),"list",{status:e??"all"}],publishRequestsCount:()=>[...G.publishRequests(),"count"],publishRequestsCountByOrg:t=>[...G.publishRequestsByOrg(t),"count"],publishApiKeys:()=>[...G.all,"publish-api-keys"],monitor:()=>[...G.all,"monitor"],monitorRuns:()=>[...G.monitor(),"runs"],monitorRunsList:t=>[...G.monitorRuns(),"list",{status:t??"all"}],monitorRun:t=>[...G.monitorRuns(),"run",t??"none"],monitorResults:()=>[...G.monitor(),"results"],monitorResultsList:(t,e)=>[...G.monitorResults(),"list",{runId:t??"none",status:e??"all"}],monitorConnections:()=>[...G.monitor(),"connections"],monitorConnectionAuthProbe:t=>[...G.monitorConnections(),"auth-probe",t]};async function ze(t,e,n){const r=await t.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 An(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>ze(o,"REGISTRY_MONITOR_RUN_START",{config:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await Promise.all([e.invalidateQueries({queryKey:G.monitorRuns()}),e.invalidateQueries({queryKey:G.monitorResults()})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Ln(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>ze(o,"REGISTRY_MONITOR_RUN_CANCEL",{runId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async(c,m)=>{await Promise.all([e.invalidateQueries({queryKey:G.monitorRuns()}),e.invalidateQueries({queryKey:G.monitorRun(m)})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Qt(t){const e=K.c(10),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=ge(r);let l;e[2]!==t?(l=G.monitorRunsList(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>ze(o,"REGISTRY_MONITOR_RUN_LIST",{status:t,limit:100}),e[4]=o,e[5]=t,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],Ge(i)}function ss(t){const e=K.c(11),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=ge(r);let l;e[2]!==t?(l=G.monitorRun(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>ze(o,"REGISTRY_MONITOR_RUN_GET",{runId:t}),e[4]=o,e[5]=t,e[6]=a):a=e[6];const i=!!t;let c;return e[7]!==l||e[8]!==a||e[9]!==i?(c={queryKey:l,queryFn:a,enabled:i,refetchInterval:zn},e[7]=l,e[8]=a,e[9]=i,e[10]=c):c=e[10],Ge(c)}function zn(t){return t.state.data?.run?.status==="running"?5e3:!1}function Nt(t,e,n){const r=K.c(14),{org:o}=de();let l;r[0]!==o.id?(l={connectionId:be,orgId:o.id},r[0]=o.id,r[1]=l):l=r[1];const a=ge(l);let i;r[2]!==t||r[3]!==e?(i=G.monitorResultsList(t,e),r[2]=t,r[3]=e,r[4]=i):i=r[4];let c;r[5]!==a||r[6]!==t||r[7]!==e?(c=async()=>ze(a,"REGISTRY_MONITOR_RESULT_LIST",{runId:t,status:e,limit:200,offset:0}),r[5]=a,r[6]=t,r[7]=e,r[8]=c):c=r[8];const m=!!t,x=n==="running"?2500:!1;let h;return r[9]!==i||r[10]!==c||r[11]!==m||r[12]!==x?(h={queryKey:i,queryFn:c,enabled:m,staleTime:5e3,refetchInterval:x},r[9]=i,r[10]=c,r[11]=m,r[12]=x,r[13]=h):h=r[13],Ge(h)}function $s(){const t=K.c(5),{org:e}=de();let n;t[0]!==e.id?(n={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=ge(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=G.monitorConnections(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>ze(r,"REGISTRY_MONITOR_CONNECTION_LIST",{}),staleTime:1e4},t[3]=r,t[4]=l):l=t[4],Ge(l)}function On(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async()=>ze(o,"REGISTRY_MONITOR_CONNECTION_SYNC",{}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Un(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>{const{connectionId:m,authStatus:x}=c;return ze(o,"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",{connectionId:m,authStatus:x})},t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}const ds={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 As(){const t=K.c(33),{org:e,project:n}=de();let r;t[0]!==e.id?(r={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=r):r=t[1];const o=ge(r),l=Be();let a;t[2]!==n.id?(a=G.registryConfigByPlugin(n.id??"",et),t[2]=n.id,t[3]=a):a=t[3];let i;t[4]!==o||t[5]!==n.id?(i=async()=>ze(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:et}),t[4]=o,t[5]=n.id,t[6]=i):i=t[6];const c=!!n.id;let m;t[7]!==a||t[8]!==i||t[9]!==c?(m={queryKey:a,queryFn:i,enabled:c},t[7]=a,t[8]=i,t[9]=c,t[10]=m):m=t[10];const x=Ge(m),h=x.data?.config?.settings,f=h&&typeof h=="object"?h.testConfig:void 0,d=typeof(h?h.monitorMode??h.testMode:void 0)=="string";let y;t[11]!==f?(y=f??{},t[11]=f,t[12]=y):y=t[12];let g;t[13]!==d||t[14]!==h||t[15]!==f?(g=d&&!f?h:{},t[13]=d,t[14]=h,t[15]=f,t[16]=g):g=t[16];let C;t[17]!==y||t[18]!==g?(C={...ds,...y,...g},t[17]=y,t[18]=g,t[19]=C):C=t[19];const _=C;let v;t[20]!==o||t[21]!==n.id?(v=async k=>{const N=(await ze(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:et}))?.config?.settings??{};return ze(o,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:n.id,pluginId:et,settings:{...N,testConfig:{...ds,...N.testConfig??{},...k}}})},t[20]=o,t[21]=n.id,t[22]=v):v=t[22];let b;t[23]!==n.id||t[24]!==l?(b=async()=>{await l.invalidateQueries({queryKey:G.registryConfigByPlugin(n.id??"",et)})},t[23]=n.id,t[24]=l,t[25]=b):b=t[25];let S;t[26]!==v||t[27]!==b?(S={mutationFn:v,onSuccess:b},t[26]=v,t[27]=b,t[28]=S):S=t[28];const u=Me(S);let j;return t[29]!==x.isLoading||t[30]!==u||t[31]!==_?(j={settings:_,isLoading:x.isLoading,saveMutation:u},t[29]=x.isLoading,t[30]=u,t[31]=_,t[32]=j):j=t[32],j}function qn(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>ze(o,"REGISTRY_MONITOR_SCHEDULE_SET",c),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Fn(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>ze(o,"REGISTRY_MONITOR_SCHEDULE_CANCEL",{scheduleEventId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Bn(){const t=K.c(3),e=Qt("completed"),n=e.data?.items?.[0]?.id,r=e.data?.items?.[0]?.status,o=Nt(n,"failed",r),l=o.data?.items?.length??0,a=e.isLoading||o.isLoading;let i;return t[0]!==l||t[1]!==a?(i={brokenCount:l,isLoading:a},t[0]=l,t[1]=a,t[2]=i):i=t[2],i}const Gn=24;function Qn(t){return t.trim()}async function Pe(t,e,n){const r=await t.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(t){const e=K.c(19),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=ge(r);let l,a,i,c;e[2]!==t.categories||e[3]!==t.limit||e[4]!==t.search||e[5]!==t.tags?(a=Qn(t.search),l=t.limit??Gn,c=dn,i=G.itemsList(a,t.tags,t.categories,l),e[2]=t.categories,e[3]=t.limit,e[4]=t.search,e[5]=t.tags,e[6]=l,e[7]=a,e[8]=i,e[9]=c):(l=e[6],a=e[7],i=e[8],c=e[9]);let m;e[10]!==o||e[11]!==l||e[12]!==t.categories||e[13]!==t.tags||e[14]!==a?(m=async h=>{const{pageParam:f}=h,p=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 Pe(o,"REGISTRY_ITEM_LIST",{cursor:f,limit:l,tags:t.tags.length?t.tags:void 0,categories:t.categories.length?t.categories:void 0,where:p})},e[10]=o,e[11]=l,e[12]=t.categories,e[13]=t.tags,e[14]=a,e[15]=m):m=e[15];let x;return e[16]!==i||e[17]!==m?(x={queryKey:i,queryFn:m,initialPageParam:void 0,getNextPageParam:Kn,staleTime:3e4},e[16]=i,e[17]=m,e[18]=x):x=e[18],c(x)}function Kn(t){return t.nextCursor}function Vn(){const t=K.c(8),{org:e}=de();let n;t[0]!==e.id?(n={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=ge(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=G.filters(),t[2]=o):o=t[2];let l;t[3]!==r?(l=async()=>Pe(r,"REGISTRY_ITEM_FILTERS",{}),t[3]=r,t[4]=l):l=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a={tags:[],categories:[]},t[5]=a):a=t[5];let i;return t[6]!==l?(i={queryKey:o,queryFn:l,placeholderData:a,staleTime:6e4},t[6]=l,t[7]=i):i=t[7],Ge(i)}function ns(){const t=K.c(29),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:G.items()}),e.invalidateQueries({queryKey:G.filters()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async b=>(await Pe(o,"REGISTRY_ITEM_CREATE",{data:b})).item,t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=Me(c);let x;t[9]!==o?(x=async b=>{const{id:S,data:u}=b;return(await Pe(o,"REGISTRY_ITEM_UPDATE",{id:S,data:u})).item},t[9]=o,t[10]=x):x=t[10];let h;t[11]!==a||t[12]!==x?(h={mutationFn:x,onSuccess:a},t[11]=a,t[12]=x,t[13]=h):h=t[13];const f=Me(h);let p;t[14]!==o?(p=async b=>(await Pe(o,"REGISTRY_ITEM_DELETE",{id:b})).item,t[14]=o,t[15]=p):p=t[15];let d;t[16]!==a||t[17]!==p?(d={mutationFn:p,onSuccess:a},t[16]=a,t[17]=p,t[18]=d):d=t[18];const y=Me(d);let g;t[19]!==o?(g=async b=>Pe(o,"REGISTRY_ITEM_BULK_CREATE",{items:b}),t[19]=o,t[20]=g):g=t[20];let C;t[21]!==a||t[22]!==g?(C={mutationFn:g,onSuccess:a},t[21]=a,t[22]=g,t[23]=C):C=t[23];const _=Me(C);let v;return t[24]!==_||t[25]!==m||t[26]!==y||t[27]!==f?(v={createMutation:m,updateMutation:f,deleteMutation:y,bulkCreateMutation:_},t[24]=_,t[25]=m,t[26]=y,t[27]=f,t[28]=v):v=t[28],v}function Kt(t){const e=K.c(34),{org:n,project:r}=de();let o;e[0]!==n.id?(o={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const l=ge(o),a=Be();let i;e[2]!==t||e[3]!==r.id?(i=G.registryConfigByPlugin(r.id??"",t),e[2]=t,e[3]=r.id,e[4]=i):i=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==r.id?(c=async()=>Pe(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}),e[5]=l,e[6]=t,e[7]=r.id,e[8]=c):c=e[8];const m=!!r.id;let x;e[9]!==i||e[10]!==c||e[11]!==m?(x={queryKey:i,queryFn:c,enabled:m,staleTime:6e4},e[9]=i,e[10]=c,e[11]=m,e[12]=x):x=e[12];const h=Ge(x);let f;e[13]!==l||e[14]!==t||e[15]!==r.id?(f=async k=>{const N=(await Pe(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}))?.config?.settings??{};return Pe(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:r.id,pluginId:t,settings:{...N,...k}})},e[13]=l,e[14]=t,e[15]=r.id,e[16]=f):f=e[16];let p;e[17]!==t||e[18]!==r.id||e[19]!==a?(p=async()=>{await a.invalidateQueries({queryKey:G.registryConfigByPlugin(r.id??"",t)})},e[17]=t,e[18]=r.id,e[19]=a,e[20]=p):p=e[20];let d;e[21]!==f||e[22]!==p?(d={mutationFn:f,onSuccess:p},e[21]=f,e[22]=p,e[23]=d):d=e[23];const y=Me(d),g=h.data?.config?.settings?.registryName??"Private Registry",C=h.data?.config?.settings?.registryIcon??"",_=h.data?.config?.settings?.llmConnectionId??"",v=h.data?.config?.settings?.llmModelId??"",b=h.data?.config?.settings?.acceptPublishRequests??!1,S=h.data?.config?.settings?.requireApiToken??!1,u=h.data?.config?.settings?.storePrivateOnly??!1;let j;return e[24]!==b||e[25]!==h.isLoading||e[26]!==C||e[27]!==_||e[28]!==v||e[29]!==g||e[30]!==S||e[31]!==y||e[32]!==u?(j={registryName:g,registryIcon:C,registryLLMConnectionId:_,registryLLMModelId:v,acceptPublishRequests:b,requireApiToken:S,storePrivateOnly:u,isLoadingConfig:h.isLoading,saveRegistryConfigMutation:y},e[24]=b,e[25]=h.isLoading,e[26]=C,e[27]=_,e[28]=v,e[29]=g,e[30]=S,e[31]=y,e[32]=u,e[33]=j):j=e[33],j}function Yn(t){const e=K.c(11),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=ge(r);let l;e[2]!==n.id||e[3]!==t?(l=G.publishRequestsListByOrg(n.id,t),e[2]=n.id,e[3]=t,e[4]=l):l=e[4];let a;e[5]!==o||e[6]!==t?(a=async()=>Pe(o,"REGISTRY_PUBLISH_REQUEST_LIST",{status:t}),e[5]=o,e[6]=t,e[7]=a):a=e[7];let i;return e[8]!==l||e[9]!==a?(i={queryKey:l,queryFn:a,staleTime:3e4,refetchOnMount:!0},e[8]=l,e[9]=a,e[10]=i):i=e[10],Ge(i)}function Hn(){const t=K.c(9),{org:e}=de();let n;t[0]!==e.id?(n={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=ge(n);let o;t[2]!==e.id?(o=G.publishRequestsCountByOrg(e.id),t[2]=e.id,t[3]=o):o=t[3];let l;t[4]!==r?(l=async()=>Pe(r,"REGISTRY_PUBLISH_REQUEST_COUNT",{}),t[4]=r,t[5]=l):l=t[5];let a;return t[6]!==o||t[7]!==l?(a={queryKey:o,queryFn:l,staleTime:3e4},t[6]=o,t[7]=l,t[8]=a):a=t[8],Ge(a)}function Wn(){const t=K.c(17),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:G.publishRequests()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async d=>Pe(o,"REGISTRY_PUBLISH_REQUEST_REVIEW",d),t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=Me(c);let x;t[9]!==o?(x=async d=>Pe(o,"REGISTRY_PUBLISH_REQUEST_DELETE",{id:d}),t[9]=o,t[10]=x):x=t[10];let h;t[11]!==a||t[12]!==x?(h={mutationFn:x,onSuccess:a},t[11]=a,t[12]=x,t[13]=h):h=t[13];const f=Me(h);let p;return t[14]!==f||t[15]!==m?(p={reviewMutation:m,deleteMutation:f},t[14]=f,t[15]=m,t[16]=p):p=t[16],p}function Jn(){const t=K.c(5),{org:e}=de();let n;t[0]!==e.id?(n={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=ge(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=G.publishApiKeys(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>Pe(r,"REGISTRY_PUBLISH_API_KEY_LIST",{}),staleTime:3e4},t[3]=r,t[4]=l):l=t[4],Ge(l)}function Zn(){const t=K.c(19),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async d=>Pe(o,"REGISTRY_PUBLISH_API_KEY_GENERATE",{name:d}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.publishApiKeys()})},t[4]=e,t[5]=a):a=t[5];let i;t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8];const c=Me(i);let m;t[9]!==o?(m=async d=>Pe(o,"REGISTRY_PUBLISH_API_KEY_REVOKE",{keyId:d}),t[9]=o,t[10]=m):m=t[10];let x;t[11]!==e?(x=async()=>{await e.invalidateQueries({queryKey:G.publishApiKeys()})},t[11]=e,t[12]=x):x=t[12];let h;t[13]!==m||t[14]!==x?(h={mutationFn:m,onSuccess:x},t[13]=m,t[14]=x,t[15]=h):h=t[15];const f=Me(h);let p;return t[16]!==c||t[17]!==f?(p={generateMutation:c,revokeMutation:f},t[16]=c,t[17]=f,t[18]=p):p=t[18],p}function ms(t){return t?t.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function us(t){const e=[];let n="",r=!1;for(let o=0;o<t.length;o+=1){const l=t[o],a=t[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 Xn=["id","title"],er=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function tr(t){const e=t.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=us(e[0]??""),r=new Map,o=[];n.forEach((m,x)=>{const h=m.toLowerCase().trim();h&&r.set(h,x)});for(const m of Xn)r.has(m)||o.push({line:1,message:`Missing required column: "${m}"`});for(const m of n){const x=m.toLowerCase().trim();x&&!er.includes(x)&&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,x)=>{const h=r.get(x);return typeof h=="number"?m[h]??"":""},a=[],i=new Set;let c=0;for(let m=1;m<e.length;m+=1){const x=us(e[m]??""),h=l(x,"id").trim(),f=l(x,"title").trim();if(!h){o.push({line:m+1,message:"Missing id — row skipped"}),c+=1;continue}if(!f){o.push({line:m+1,message:`Missing title for id="${h}" — row skipped`}),c+=1;continue}if(i.has(h)){o.push({line:m+1,message:`Duplicate id="${h}" — row skipped`}),c+=1;continue}i.add(h);const p=l(x,"description").trim(),d=l(x,"remote_url").trim(),g=l(x,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",C=ms(l(x,"tags")),_=ms(l(x,"categories")),v=l(x,"is_public").trim().toLowerCase(),b=v==="true"||v==="1"||v==="yes";a.push({id:h,title:f,description:p||null,is_public:b,_meta:{"mcp.mesh":{...C.length>0?{tags:C}:{},..._.length>0?{categories:_}:{}}},server:{name:h,title:f,description:p||void 0,remotes:d?[{type:g,url:d}]:[]}})}return{items:a,warnings:o,skipped:c}}const sr=`id,title,description,remote_url,remote_type,tags,categories,is_public
|
|
1
|
+
import{r as M,c as K,u as de,z as Be,bA as et,j as s,t as W,bE as an}from"./index-A91v4mp1.js";import{B as F,c as J}from"./button-BwVHfdAu.js";import{i as bt}from"./CheckCircle-CTKbvECl.js";import{n as on}from"./Container-DinJV2Fk.js";import{t as cn}from"./Settings01-DZMOzFkI.js";import{u as Ge}from"./useQuery-Boh1HTvu.js";import{u as Me}from"./useMutation-BL36wQaU.js";import{a as be,u as ge,j as gs}from"./constants-B3FMsdmP.js";import{u as dn}from"./useInfiniteQuery-C-DtlzDI.js";import{B as U}from"./badge-DrTmNp-A.js";import{I as ye}from"./input-CxOgBoT3.js";import{a as kt,c as We,D as St,b as Rt,h as ls,i as as,g as mn}from"./dropdown-menu-D_spLGNE.js";import{e as js,a as ys,b as Tt,T as Ae,d as bs,c as Le}from"./table-iuhYISyO.js";import{a as os,T as un}from"./toggle-group-B5HhnFXA.js";import{u as xn}from"./use-view-mode-Cwnk8Sqo.js";import{i as Xt}from"./DotsVertical-CbTymtSi.js";import{i as hn}from"./FilterLines-ClcMNTtR.js";import{i as vs}from"./Globe01-Of6NyzJJ.js";import{i as mt}from"./Loading01-CMdu9ggl.js";import{i as Ns}from"./SearchMd-Dnl-cdC8.js";import{b as It,c as Mt,d as Pt,e as Et,a as Dt,D as $t}from"./dialog-D_9eqXMo.js";import{i as jt}from"./AlertCircle-XhRNrbr6.js";import{n as pn}from"./Download01--hFG7PiW.js";import{i as cs}from"./Upload01-zXtYkYrq.js";import{c as Lt,b as zt,d as Ot,A as Ut,g as qt,e as Ft,a as Bt,f as Gt}from"./alert-dialog-B7u4fJIr.js";import{C as ne}from"./card-DDW-bHuH.js";import{s as vt}from"./Trash01-BfqMFxjX.js";import{L as ie}from"./label-BoJA4HkT.js";import{n as fn,S as ws,a as Cs,b as _s,c as ks,d as Ct}from"./select-B6rKXsfc.js";import{S as _t}from"./switch-BeRTUjS0.js";import{T as At}from"./textarea-BAuUjr4Q.js";import{i as gn}from"./ArrowLeft-C8lAfmna.js";import{i as jn,u as Ht,t as yn}from"./use-copy-CkHia13h.js";import{s as es}from"./RefreshCcw01-DkghEus_.js";import{i as bn}from"./X-CxFonwYL.js";import{t as Ss}from"./ChevronDown-gAOoAGjG.js";import{s as Rs}from"./Eye-CswTeoGK.js";import{n as vn}from"./LinkExternal01-Ch97RTDv.js";import{i as Nn}from"./XCircle-CIdz2YXd.js";import{h as Ts,e as Is}from"./use-connection-BviJ1yCA.js";import{b as wn,P as Cn,a as _n}from"./popover-CF2TdbiE.js";import{i as Wt}from"./Check-B5DUxQ7l.js";import{a as Jt}from"./Copy01-DD_krz0-.js";import{i as kn,a as Sn}from"./Save01-BuKRZy5X.js";import{i as Rn}from"./Key01-5UoHohuK.js";import{s as Tn}from"./Plus-CaXzOU_N.js";import{a as In,b as Mn,T as Pn}from"./tooltip-Du6t3RoA.js";import{a as En,i as Dn}from"./mcp-oauth-Dt4-rUXm.js";import{i as $n}from"./Play-B2yaDRk7.js";import"./infiniteQueryObserver-DVcoEENh.js";import"./ChevronRight-Bs6Fdikt.js";import"./use-mobile-DlTIaaTa.js";import"./index-CP4hShu9.js";const Ms=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M10.743 5.092C11.149 5.032 11.569 5 12 5c5.105 0 8.455 4.505 9.58 6.287.137.215.205.323.243.49a1.16 1.16 0 0 1 0 .447c-.038.166-.107.274-.244.492-.3.474-.757 1.141-1.363 1.865M6.724 6.715c-2.162 1.467-3.63 3.504-4.303 4.57-.137.217-.205.325-.243.492a1.173 1.173 0 0 0 0 .446c.038.167.106.274.242.49C3.546 14.495 6.895 19 12 19c2.059 0 3.832-.732 5.289-1.723M3 3l18 18M9.88 9.879a3 3 0 1 0 4.243 4.243"}));Ms.displayName="EyeOff";const Ps=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.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:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m12.708 18.364-1.415 1.414a5 5 0 1 1-7.07-7.07l1.413-1.415m12.728 1.414 1.415-1.414a5 5 0 0 0-7.071-7.071l-1.415 1.414M8.5 15.5l7-7"}));Es.displayName="Link01";const Ds=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.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"}),M.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"}));Ds.displayName="StopSquare";const ts=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.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"}));ts.displayName="Tool02";const G={all:["private-registry"],items:()=>[...G.all,"items"],itemsList:(t,e,n,r)=>[...G.items(),"list",{search:t,tags:e,categories:n,limit:r}],item:t=>[...G.items(),"item",t],filters:()=>[...G.all,"filters"],registryConfig:()=>[...G.all,"registry-config"],registryConfigByPlugin:(t,e)=>[...G.registryConfig(),t,e],publishRequests:()=>[...G.all,"publish-requests"],publishRequestsByOrg:t=>[...G.publishRequests(),"org",t],publishRequestsList:t=>[...G.publishRequests(),"list",{status:t??"all"}],publishRequestsListByOrg:(t,e)=>[...G.publishRequestsByOrg(t),"list",{status:e??"all"}],publishRequestsCount:()=>[...G.publishRequests(),"count"],publishRequestsCountByOrg:t=>[...G.publishRequestsByOrg(t),"count"],publishApiKeys:()=>[...G.all,"publish-api-keys"],monitor:()=>[...G.all,"monitor"],monitorRuns:()=>[...G.monitor(),"runs"],monitorRunsList:t=>[...G.monitorRuns(),"list",{status:t??"all"}],monitorRun:t=>[...G.monitorRuns(),"run",t??"none"],monitorResults:()=>[...G.monitor(),"results"],monitorResultsList:(t,e)=>[...G.monitorResults(),"list",{runId:t??"none",status:e??"all"}],monitorConnections:()=>[...G.monitor(),"connections"],monitorConnectionAuthProbe:t=>[...G.monitorConnections(),"auth-probe",t]};async function ze(t,e,n){const r=await t.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 An(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>ze(o,"REGISTRY_MONITOR_RUN_START",{config:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await Promise.all([e.invalidateQueries({queryKey:G.monitorRuns()}),e.invalidateQueries({queryKey:G.monitorResults()})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Ln(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>ze(o,"REGISTRY_MONITOR_RUN_CANCEL",{runId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async(c,m)=>{await Promise.all([e.invalidateQueries({queryKey:G.monitorRuns()}),e.invalidateQueries({queryKey:G.monitorRun(m)})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Qt(t){const e=K.c(10),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=ge(r);let l;e[2]!==t?(l=G.monitorRunsList(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>ze(o,"REGISTRY_MONITOR_RUN_LIST",{status:t,limit:100}),e[4]=o,e[5]=t,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],Ge(i)}function ss(t){const e=K.c(11),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=ge(r);let l;e[2]!==t?(l=G.monitorRun(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>ze(o,"REGISTRY_MONITOR_RUN_GET",{runId:t}),e[4]=o,e[5]=t,e[6]=a):a=e[6];const i=!!t;let c;return e[7]!==l||e[8]!==a||e[9]!==i?(c={queryKey:l,queryFn:a,enabled:i,refetchInterval:zn},e[7]=l,e[8]=a,e[9]=i,e[10]=c):c=e[10],Ge(c)}function zn(t){return t.state.data?.run?.status==="running"?5e3:!1}function Nt(t,e,n){const r=K.c(14),{org:o}=de();let l;r[0]!==o.id?(l={connectionId:be,orgId:o.id},r[0]=o.id,r[1]=l):l=r[1];const a=ge(l);let i;r[2]!==t||r[3]!==e?(i=G.monitorResultsList(t,e),r[2]=t,r[3]=e,r[4]=i):i=r[4];let c;r[5]!==a||r[6]!==t||r[7]!==e?(c=async()=>ze(a,"REGISTRY_MONITOR_RESULT_LIST",{runId:t,status:e,limit:200,offset:0}),r[5]=a,r[6]=t,r[7]=e,r[8]=c):c=r[8];const m=!!t,x=n==="running"?2500:!1;let h;return r[9]!==i||r[10]!==c||r[11]!==m||r[12]!==x?(h={queryKey:i,queryFn:c,enabled:m,staleTime:5e3,refetchInterval:x},r[9]=i,r[10]=c,r[11]=m,r[12]=x,r[13]=h):h=r[13],Ge(h)}function $s(){const t=K.c(5),{org:e}=de();let n;t[0]!==e.id?(n={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=ge(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=G.monitorConnections(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>ze(r,"REGISTRY_MONITOR_CONNECTION_LIST",{}),staleTime:1e4},t[3]=r,t[4]=l):l=t[4],Ge(l)}function On(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async()=>ze(o,"REGISTRY_MONITOR_CONNECTION_SYNC",{}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Un(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>{const{connectionId:m,authStatus:x}=c;return ze(o,"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",{connectionId:m,authStatus:x})},t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}const ds={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 As(){const t=K.c(33),{org:e,project:n}=de();let r;t[0]!==e.id?(r={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=r):r=t[1];const o=ge(r),l=Be();let a;t[2]!==n.id?(a=G.registryConfigByPlugin(n.id??"",et),t[2]=n.id,t[3]=a):a=t[3];let i;t[4]!==o||t[5]!==n.id?(i=async()=>ze(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:et}),t[4]=o,t[5]=n.id,t[6]=i):i=t[6];const c=!!n.id;let m;t[7]!==a||t[8]!==i||t[9]!==c?(m={queryKey:a,queryFn:i,enabled:c},t[7]=a,t[8]=i,t[9]=c,t[10]=m):m=t[10];const x=Ge(m),h=x.data?.config?.settings,f=h&&typeof h=="object"?h.testConfig:void 0,d=typeof(h?h.monitorMode??h.testMode:void 0)=="string";let y;t[11]!==f?(y=f??{},t[11]=f,t[12]=y):y=t[12];let g;t[13]!==d||t[14]!==h||t[15]!==f?(g=d&&!f?h:{},t[13]=d,t[14]=h,t[15]=f,t[16]=g):g=t[16];let C;t[17]!==y||t[18]!==g?(C={...ds,...y,...g},t[17]=y,t[18]=g,t[19]=C):C=t[19];const _=C;let v;t[20]!==o||t[21]!==n.id?(v=async k=>{const N=(await ze(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:et}))?.config?.settings??{};return ze(o,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:n.id,pluginId:et,settings:{...N,testConfig:{...ds,...N.testConfig??{},...k}}})},t[20]=o,t[21]=n.id,t[22]=v):v=t[22];let b;t[23]!==n.id||t[24]!==l?(b=async()=>{await l.invalidateQueries({queryKey:G.registryConfigByPlugin(n.id??"",et)})},t[23]=n.id,t[24]=l,t[25]=b):b=t[25];let S;t[26]!==v||t[27]!==b?(S={mutationFn:v,onSuccess:b},t[26]=v,t[27]=b,t[28]=S):S=t[28];const u=Me(S);let j;return t[29]!==x.isLoading||t[30]!==u||t[31]!==_?(j={settings:_,isLoading:x.isLoading,saveMutation:u},t[29]=x.isLoading,t[30]=u,t[31]=_,t[32]=j):j=t[32],j}function qn(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>ze(o,"REGISTRY_MONITOR_SCHEDULE_SET",c),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Fn(){const t=K.c(9),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async c=>ze(o,"REGISTRY_MONITOR_SCHEDULE_CANCEL",{scheduleEventId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],Me(i)}function Bn(){const t=K.c(3),e=Qt("completed"),n=e.data?.items?.[0]?.id,r=e.data?.items?.[0]?.status,o=Nt(n,"failed",r),l=o.data?.items?.length??0,a=e.isLoading||o.isLoading;let i;return t[0]!==l||t[1]!==a?(i={brokenCount:l,isLoading:a},t[0]=l,t[1]=a,t[2]=i):i=t[2],i}const Gn=24;function Qn(t){return t.trim()}async function Pe(t,e,n){const r=await t.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(t){const e=K.c(19),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=ge(r);let l,a,i,c;e[2]!==t.categories||e[3]!==t.limit||e[4]!==t.search||e[5]!==t.tags?(a=Qn(t.search),l=t.limit??Gn,c=dn,i=G.itemsList(a,t.tags,t.categories,l),e[2]=t.categories,e[3]=t.limit,e[4]=t.search,e[5]=t.tags,e[6]=l,e[7]=a,e[8]=i,e[9]=c):(l=e[6],a=e[7],i=e[8],c=e[9]);let m;e[10]!==o||e[11]!==l||e[12]!==t.categories||e[13]!==t.tags||e[14]!==a?(m=async h=>{const{pageParam:f}=h,p=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 Pe(o,"REGISTRY_ITEM_LIST",{cursor:f,limit:l,tags:t.tags.length?t.tags:void 0,categories:t.categories.length?t.categories:void 0,where:p})},e[10]=o,e[11]=l,e[12]=t.categories,e[13]=t.tags,e[14]=a,e[15]=m):m=e[15];let x;return e[16]!==i||e[17]!==m?(x={queryKey:i,queryFn:m,initialPageParam:void 0,getNextPageParam:Kn,staleTime:3e4},e[16]=i,e[17]=m,e[18]=x):x=e[18],c(x)}function Kn(t){return t.nextCursor}function Vn(){const t=K.c(8),{org:e}=de();let n;t[0]!==e.id?(n={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=ge(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=G.filters(),t[2]=o):o=t[2];let l;t[3]!==r?(l=async()=>Pe(r,"REGISTRY_ITEM_FILTERS",{}),t[3]=r,t[4]=l):l=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a={tags:[],categories:[]},t[5]=a):a=t[5];let i;return t[6]!==l?(i={queryKey:o,queryFn:l,placeholderData:a,staleTime:6e4},t[6]=l,t[7]=i):i=t[7],Ge(i)}function ns(){const t=K.c(29),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:G.items()}),e.invalidateQueries({queryKey:G.filters()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async b=>(await Pe(o,"REGISTRY_ITEM_CREATE",{data:b})).item,t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=Me(c);let x;t[9]!==o?(x=async b=>{const{id:S,data:u}=b;return(await Pe(o,"REGISTRY_ITEM_UPDATE",{id:S,data:u})).item},t[9]=o,t[10]=x):x=t[10];let h;t[11]!==a||t[12]!==x?(h={mutationFn:x,onSuccess:a},t[11]=a,t[12]=x,t[13]=h):h=t[13];const f=Me(h);let p;t[14]!==o?(p=async b=>(await Pe(o,"REGISTRY_ITEM_DELETE",{id:b})).item,t[14]=o,t[15]=p):p=t[15];let d;t[16]!==a||t[17]!==p?(d={mutationFn:p,onSuccess:a},t[16]=a,t[17]=p,t[18]=d):d=t[18];const y=Me(d);let g;t[19]!==o?(g=async b=>Pe(o,"REGISTRY_ITEM_BULK_CREATE",{items:b}),t[19]=o,t[20]=g):g=t[20];let C;t[21]!==a||t[22]!==g?(C={mutationFn:g,onSuccess:a},t[21]=a,t[22]=g,t[23]=C):C=t[23];const _=Me(C);let v;return t[24]!==_||t[25]!==m||t[26]!==y||t[27]!==f?(v={createMutation:m,updateMutation:f,deleteMutation:y,bulkCreateMutation:_},t[24]=_,t[25]=m,t[26]=y,t[27]=f,t[28]=v):v=t[28],v}function Kt(t){const e=K.c(34),{org:n,project:r}=de();let o;e[0]!==n.id?(o={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const l=ge(o),a=Be();let i;e[2]!==t||e[3]!==r.id?(i=G.registryConfigByPlugin(r.id??"",t),e[2]=t,e[3]=r.id,e[4]=i):i=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==r.id?(c=async()=>Pe(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}),e[5]=l,e[6]=t,e[7]=r.id,e[8]=c):c=e[8];const m=!!r.id;let x;e[9]!==i||e[10]!==c||e[11]!==m?(x={queryKey:i,queryFn:c,enabled:m,staleTime:6e4},e[9]=i,e[10]=c,e[11]=m,e[12]=x):x=e[12];const h=Ge(x);let f;e[13]!==l||e[14]!==t||e[15]!==r.id?(f=async k=>{const N=(await Pe(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}))?.config?.settings??{};return Pe(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:r.id,pluginId:t,settings:{...N,...k}})},e[13]=l,e[14]=t,e[15]=r.id,e[16]=f):f=e[16];let p;e[17]!==t||e[18]!==r.id||e[19]!==a?(p=async()=>{await a.invalidateQueries({queryKey:G.registryConfigByPlugin(r.id??"",t)})},e[17]=t,e[18]=r.id,e[19]=a,e[20]=p):p=e[20];let d;e[21]!==f||e[22]!==p?(d={mutationFn:f,onSuccess:p},e[21]=f,e[22]=p,e[23]=d):d=e[23];const y=Me(d),g=h.data?.config?.settings?.registryName??"Private Registry",C=h.data?.config?.settings?.registryIcon??"",_=h.data?.config?.settings?.llmConnectionId??"",v=h.data?.config?.settings?.llmModelId??"",b=h.data?.config?.settings?.acceptPublishRequests??!1,S=h.data?.config?.settings?.requireApiToken??!1,u=h.data?.config?.settings?.storePrivateOnly??!1;let j;return e[24]!==b||e[25]!==h.isLoading||e[26]!==C||e[27]!==_||e[28]!==v||e[29]!==g||e[30]!==S||e[31]!==y||e[32]!==u?(j={registryName:g,registryIcon:C,registryLLMConnectionId:_,registryLLMModelId:v,acceptPublishRequests:b,requireApiToken:S,storePrivateOnly:u,isLoadingConfig:h.isLoading,saveRegistryConfigMutation:y},e[24]=b,e[25]=h.isLoading,e[26]=C,e[27]=_,e[28]=v,e[29]=g,e[30]=S,e[31]=y,e[32]=u,e[33]=j):j=e[33],j}function Yn(t){const e=K.c(11),{org:n}=de();let r;e[0]!==n.id?(r={connectionId:be,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=ge(r);let l;e[2]!==n.id||e[3]!==t?(l=G.publishRequestsListByOrg(n.id,t),e[2]=n.id,e[3]=t,e[4]=l):l=e[4];let a;e[5]!==o||e[6]!==t?(a=async()=>Pe(o,"REGISTRY_PUBLISH_REQUEST_LIST",{status:t}),e[5]=o,e[6]=t,e[7]=a):a=e[7];let i;return e[8]!==l||e[9]!==a?(i={queryKey:l,queryFn:a,staleTime:3e4,refetchOnMount:!0},e[8]=l,e[9]=a,e[10]=i):i=e[10],Ge(i)}function Hn(){const t=K.c(9),{org:e}=de();let n;t[0]!==e.id?(n={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=ge(n);let o;t[2]!==e.id?(o=G.publishRequestsCountByOrg(e.id),t[2]=e.id,t[3]=o):o=t[3];let l;t[4]!==r?(l=async()=>Pe(r,"REGISTRY_PUBLISH_REQUEST_COUNT",{}),t[4]=r,t[5]=l):l=t[5];let a;return t[6]!==o||t[7]!==l?(a={queryKey:o,queryFn:l,staleTime:3e4},t[6]=o,t[7]=l,t[8]=a):a=t[8],Ge(a)}function Wn(){const t=K.c(17),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:G.publishRequests()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async d=>Pe(o,"REGISTRY_PUBLISH_REQUEST_REVIEW",d),t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=Me(c);let x;t[9]!==o?(x=async d=>Pe(o,"REGISTRY_PUBLISH_REQUEST_DELETE",{id:d}),t[9]=o,t[10]=x):x=t[10];let h;t[11]!==a||t[12]!==x?(h={mutationFn:x,onSuccess:a},t[11]=a,t[12]=x,t[13]=h):h=t[13];const f=Me(h);let p;return t[14]!==f||t[15]!==m?(p={reviewMutation:m,deleteMutation:f},t[14]=f,t[15]=m,t[16]=p):p=t[16],p}function Jn(){const t=K.c(5),{org:e}=de();let n;t[0]!==e.id?(n={connectionId:be,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=ge(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=G.publishApiKeys(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>Pe(r,"REGISTRY_PUBLISH_API_KEY_LIST",{}),staleTime:3e4},t[3]=r,t[4]=l):l=t[4],Ge(l)}function Zn(){const t=K.c(19),e=Be(),{org:n}=de();let r;t[0]!==n.id?(r={connectionId:be,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=ge(r);let l;t[2]!==o?(l=async d=>Pe(o,"REGISTRY_PUBLISH_API_KEY_GENERATE",{name:d}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:G.publishApiKeys()})},t[4]=e,t[5]=a):a=t[5];let i;t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8];const c=Me(i);let m;t[9]!==o?(m=async d=>Pe(o,"REGISTRY_PUBLISH_API_KEY_REVOKE",{keyId:d}),t[9]=o,t[10]=m):m=t[10];let x;t[11]!==e?(x=async()=>{await e.invalidateQueries({queryKey:G.publishApiKeys()})},t[11]=e,t[12]=x):x=t[12];let h;t[13]!==m||t[14]!==x?(h={mutationFn:m,onSuccess:x},t[13]=m,t[14]=x,t[15]=h):h=t[15];const f=Me(h);let p;return t[16]!==c||t[17]!==f?(p={generateMutation:c,revokeMutation:f},t[16]=c,t[17]=f,t[18]=p):p=t[18],p}function ms(t){return t?t.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function us(t){const e=[];let n="",r=!1;for(let o=0;o<t.length;o+=1){const l=t[o],a=t[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 Xn=["id","title"],er=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function tr(t){const e=t.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=us(e[0]??""),r=new Map,o=[];n.forEach((m,x)=>{const h=m.toLowerCase().trim();h&&r.set(h,x)});for(const m of Xn)r.has(m)||o.push({line:1,message:`Missing required column: "${m}"`});for(const m of n){const x=m.toLowerCase().trim();x&&!er.includes(x)&&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,x)=>{const h=r.get(x);return typeof h=="number"?m[h]??"":""},a=[],i=new Set;let c=0;for(let m=1;m<e.length;m+=1){const x=us(e[m]??""),h=l(x,"id").trim(),f=l(x,"title").trim();if(!h){o.push({line:m+1,message:"Missing id — row skipped"}),c+=1;continue}if(!f){o.push({line:m+1,message:`Missing title for id="${h}" — row skipped`}),c+=1;continue}if(i.has(h)){o.push({line:m+1,message:`Duplicate id="${h}" — row skipped`}),c+=1;continue}i.add(h);const p=l(x,"description").trim(),d=l(x,"remote_url").trim(),g=l(x,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",C=ms(l(x,"tags")),_=ms(l(x,"categories")),v=l(x,"is_public").trim().toLowerCase(),b=v==="true"||v==="1"||v==="yes";a.push({id:h,title:f,description:p||null,is_public:b,_meta:{"mcp.mesh":{...C.length>0?{tags:C}:{},..._.length>0?{categories:_}:{}}},server:{name:h,title:f,description:p||void 0,remotes:d?[{type:g,url:d}]:[]}})}return{items:a,warnings:o,skipped:c}}const sr=`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 nr(){const t=new Blob([sr],{type:"text/csv;charset=utf-8"}),e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="registry-import-template.csv",n.click(),URL.revokeObjectURL(e)}function rr(t){const e=K.c(63),{open:n,onOpenChange:r,isImporting:o,onImport:l}=t,a=o===void 0?!1:o,[i,c]=M.useState(null),[m,x]=M.useState(null),[h,f]=M.useState(null),p=M.useRef(null);let d;e[0]!==r?(d=ue=>{r(ue),ue||(c(null),x(null),f(null),p.current&&(p.current.value=""))},e[0]=r,e[1]=d):d=e[1];const y=d;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=async ue=>{if(!ue)return;f(ue.name),x(null);const ve=await ue.text();c(tr(ve))},e[2]=g):g=e[2];const C=g;let _;e[3]!==l||e[4]!==i?(_=async()=>{if(!i?.items.length)return;const ue=await l(i.items);x(ue)},e[3]=l,e[4]=i,e[5]=_):_=e[5];const v=_;let b;e[6]!==i?.items?(b=i?.items??[],e[6]=i?.items,e[7]=b):b=e[7];const S=b;let u;e[8]!==i?.warnings?(u=i?.warnings??[],e[8]=i?.warnings,e[9]=u):u=e[9];const j=u;let k;e[10]!==j?(k=j.some(or),e[10]=j,e[11]=k):k=e[11];const T=k,N=m!==null;let R;e[12]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsxs(It,{children:[s.jsx(Mt,{children:"Import MCP Servers from CSV"}),s.jsx(Pt,{children:"Upload a CSV file to bulk-import MCP servers into the registry."})]}),e[12]=R):R=e[12];let w;e[13]===Symbol.for("react.memo_cache_sentinel")?(w=()=>p.current?.click(),e[13]=w):w=e[13];let P;e[14]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(cs,{size:14}),e[14]=P):P=e[14];const D=h?"Change file":"Choose CSV file";let I;e[15]!==a||e[16]!==D?(I=s.jsxs(F,{variant:"outline",size:"sm",className:"gap-1.5",onClick:w,disabled:a,children:[P,D]}),e[15]=a,e[16]=D,e[17]=I):I=e[17];let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("input",{ref:p,type:"file",accept:".csv,text/csv",className:"hidden",onChange:ue=>C(ue.target.files?.[0]??null)}),e[18]=E):E=e[18];let $;e[19]!==h?($=h&&s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:h}),e[19]=h,e[20]=$):$=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx("div",{className:"flex-1"}),e[21]=z):z=e[21];let L;e[22]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsxs(F,{variant:"ghost",size:"sm",className:"gap-1.5 text-xs text-muted-foreground",onClick:nr,children:[s.jsx(pn,{size:14}),"Download template"]}),e[22]=L):L=e[22];let q;e[23]!==I||e[24]!==$?(q=s.jsxs("div",{className:"flex items-center gap-3",children:[I,E,$,z,L]}),e[23]=I,e[24]=$,e[25]=q):q=e[25];let V;e[26]!==j?(V=j.length>0&&s.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:j.map(ar)}),e[26]=j,e[27]=V):V=e[27];let Y;e[28]!==S||e[29]!==i?(Y=S.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:"Preview"}),s.jsxs(U,{variant:"secondary",children:[S.length," items"]}),i?.skipped?s.jsxs(U,{variant:"outline",className:"text-yellow-600",children:[i.skipped," skipped"]}):null]}),s.jsx("div",{className:"border rounded-lg overflow-hidden",children:s.jsx("div",{className:"max-h-[300px] overflow-y-auto",children:s.jsxs(js,{children:[s.jsx(ys,{children:s.jsxs(Tt,{children:[s.jsx(Ae,{className:"w-[140px]",children:"ID"}),s.jsx(Ae,{children:"Title"}),s.jsx(Ae,{children:"Remote URL"}),s.jsx(Ae,{className:"w-[80px] text-center",children:"Public"}),s.jsx(Ae,{children:"Tags"})]})}),s.jsx(bs,{children:S.map(lr)})]})})})]}),e[28]=S,e[29]=i,e[30]=Y):Y=e[30];let X;e[31]!==m?(X=m&&s.jsxs("div",{className:"rounded-lg border p-3 grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(bt,{size:16,className:"text-emerald-600"}),"Imported ",m.created," item(s) successfully"]}),m.errors.length>0&&s.jsx("div",{className:"grid gap-1 mt-1",children:m.errors.map(ir)})]}),e[31]=m,e[32]=X):X=e[32];let Z;e[33]!==N||e[34]!==i?(Z=!i&&!N&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[s.jsx(cs,{size:32,className:"text-muted-foreground/40 mb-3"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a CSV file or download the template to get started."}),s.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Required columns: ",s.jsx("code",{children:"id"}),", ",s.jsx("code",{children:"title"}),". Optional:"," ",s.jsx("code",{children:"description"}),", ",s.jsx("code",{children:"remote_url"}),","," ",s.jsx("code",{children:"remote_type"}),", ",s.jsx("code",{children:"tags"}),","," ",s.jsx("code",{children:"categories"}),", ",s.jsx("code",{children:"is_public"}),"."]}),s.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Use ",s.jsx("code",{children:"|"})," or ",s.jsx("code",{children:";"})," to separate multiple tags/categories within a cell."]})]}),e[33]=N,e[34]=i,e[35]=Z):Z=e[35];let te;e[36]!==q||e[37]!==V||e[38]!==Y||e[39]!==X||e[40]!==Z?(te=s.jsxs("div",{className:"flex-1 overflow-y-auto grid gap-4 pr-1",children:[q,V,Y,X,Z]}),e[36]=q,e[37]=V,e[38]=Y,e[39]=X,e[40]=Z,e[41]=te):te=e[41];let se;e[42]!==y?(se=()=>y(!1),e[42]=y,e[43]=se):se=e[43];const he=N?"Done":"Cancel";let re;e[44]!==se||e[45]!==he?(re=s.jsx(F,{variant:"outline",onClick:se,children:he}),e[44]=se,e[45]=he,e[46]=re):re=e[46];let ae;e[47]!==v||e[48]!==T||e[49]!==N||e[50]!==a||e[51]!==S.length?(ae=!N&&s.jsx(F,{onClick:v,disabled:a||S.length===0||T,children:a?"Importing...":`Import ${S.length} item(s)`}),e[47]=v,e[48]=T,e[49]=N,e[50]=a,e[51]=S.length,e[52]=ae):ae=e[52];let oe;e[53]!==re||e[54]!==ae?(oe=s.jsxs(Et,{className:"gap-2 sm:gap-0",children:[re,ae]}),e[53]=re,e[54]=ae,e[55]=oe):oe=e[55];let me;e[56]!==te||e[57]!==oe?(me=s.jsxs(Dt,{className:"sm:max-w-3xl max-h-[85vh] flex flex-col",children:[R,te,oe]}),e[56]=te,e[57]=oe,e[58]=me):me=e[58];let ce;return e[59]!==y||e[60]!==n||e[61]!==me?(ce=s.jsx($t,{open:n,onOpenChange:y,children:me}),e[59]=y,e[60]=n,e[61]=me,e[62]=ce):ce=e[62],ce}function ir(t){return s.jsxs("p",{className:"text-xs text-destructive flex items-start gap-1.5",children:[s.jsx(jt,{size:12,className:"shrink-0 mt-0.5"}),s.jsxs("span",{children:[s.jsx("span",{className:"font-mono",children:t.id}),": ",t.error]})]},t.id)}function lr(t){return s.jsxs(Tt,{children:[s.jsx(Le,{className:"font-mono text-xs",children:t.id}),s.jsx(Le,{className:"text-sm",children:t.title}),s.jsx(Le,{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:t.server.remotes?.[0]?.url??s.jsx("span",{className:"italic",children:"none"})}),s.jsx(Le,{className:"text-center",children:t.is_public?s.jsx(U,{variant:"secondary",className:"text-[10px] bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-400",children:"Yes"}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"No"})}),s.jsx(Le,{className:"text-xs text-muted-foreground",children:(t._meta?.["mcp.mesh"]?.tags??[]).join(", ")||"-"})]},t.id)}function ar(t,e){return s.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-400 flex items-start gap-1.5",children:[s.jsx(jt,{size:12,className:"shrink-0 mt-0.5"}),s.jsxs("span",{children:[t.line>0&&s.jsxs("span",{className:"font-mono text-[10px] mr-1",children:["Line ",t.line,":"]}),t.message]})]},`${t.line}-${e}`)}function or(t){return t.message.startsWith("Missing required column:")}function cr(t){const e=K.c(19),{open:n,onOpenChange:r,title:o,isDeleting:l,onConfirm:a}=t,i=l===void 0?!1:l;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Lt,{children:"Delete registry item?"}),e[0]=c):c=e[0];let m;e[1]!==o?(m=s.jsxs(zt,{children:[c,s.jsxs(Ot,{children:["This action cannot be undone. Item ",s.jsx("strong",{children:o})," will be permanently removed from this private registry."]})]}),e[1]=o,e[2]=m):m=e[2];let x;e[3]!==i?(x=s.jsx(Ut,{disabled:i,children:"Cancel"}),e[3]=i,e[4]=x):x=e[4];const h=i?"Deleting...":"Delete";let f;e[5]!==i||e[6]!==a||e[7]!==h?(f=s.jsx(qt,{disabled:i,onClick:a,children:h}),e[5]=i,e[6]=a,e[7]=h,e[8]=f):f=e[8];let p;e[9]!==x||e[10]!==f?(p=s.jsxs(Ft,{children:[x,f]}),e[9]=x,e[10]=f,e[11]=p):p=e[11];let d;e[12]!==m||e[13]!==p?(d=s.jsxs(Bt,{children:[m,p]}),e[12]=m,e[13]=p,e[14]=d):d=e[14];let y;return e[15]!==r||e[16]!==n||e[17]!==d?(y=s.jsx(Gt,{open:n,onOpenChange:r,children:d}),e[15]=r,e[16]=n,e[17]=d,e[18]=y):y=e[18],y}function dr(t){const[e]=t.id.split("/");return e??"provider"}function mr(t){return t._meta?.["mcp.mesh"]?.tags??[]}function ur(t){return t._meta?.["mcp.mesh"]?.categories??[]}function xr(t){return t.server?.icons?.[0]?.src??null}function hr(t){const e=K.c(56),{item:n,onEdit:r,onDelete:o}=t;let l;e[0]!==n?(l=xr(n),e[0]=n,e[1]=l):l=e[1];const a=l;let i;e[2]!==n?(i=[...mr(n),...ur(n)],e[2]=n,e[3]=i):i=e[3];const c=i;let m;e[4]!==c?(m=c.slice(0,3),e[4]=c,e[5]=m):m=e[5];const x=m,h=Math.max(0,c.length-x.length);let f;e[6]!==a||e[7]!==n.title?(f=s.jsx("div",{className:"size-10 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0 flex items-center justify-center",children:a?s.jsx("img",{src:a,alt:n.title,className:"h-full w-full object-cover",loading:"lazy"}):s.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n.title.charAt(0).toUpperCase()})}),e[6]=a,e[7]=n.title,e[8]=f):f=e[8];let p;e[9]!==n.title?(p=s.jsx("p",{className:"font-medium truncate",children:n.title}),e[9]=n.title,e[10]=p):p=e[10];let d;e[11]!==n?(d=dr(n),e[11]=n,e[12]=d):d=e[12];let y;e[13]!==d?(y=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:d}),e[13]=d,e[14]=y):y=e[14];let g;e[15]!==n.is_public?(g=n.is_public?s.jsxs(U,{variant:"default",className:"gap-1",children:[s.jsx(vs,{size:10}),"Public"]}):s.jsx(U,{variant:"secondary",children:"Private"}),e[15]=n.is_public,e[16]=g):g=e[16];let C;e[17]!==y||e[18]!==g?(C=s.jsxs("div",{className:"flex items-center gap-2",children:[y,g]}),e[17]=y,e[18]=g,e[19]=C):C=e[19];let _;e[20]!==p||e[21]!==C?(_=s.jsxs("div",{className:"min-w-0 flex-1",children:[p,C]}),e[20]=p,e[21]=C,e[22]=_):_=e[22];let v;e[23]!==_||e[24]!==f?(v=s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[f,_]}),e[23]=_,e[24]=f,e[25]=v):v=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(kt,{asChild:!0,children:s.jsx(F,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(Xt,{size:18})})}),e[26]=b):b=e[26];let S;e[27]!==n||e[28]!==r?(S=s.jsx(We,{onClick:()=>r(n),children:"Edit"}),e[27]=n,e[28]=r,e[29]=S):S=e[29];let u;e[30]!==n||e[31]!==o?(u=()=>o(n),e[30]=n,e[31]=o,e[32]=u):u=e[32];let j;e[33]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(vt,{size:14}),e[33]=j):j=e[33];let k;e[34]!==u?(k=s.jsxs(We,{variant:"destructive",onClick:u,children:[j,"Delete"]}),e[34]=u,e[35]=k):k=e[35];let T;e[36]!==S||e[37]!==k?(T=s.jsxs(St,{children:[b,s.jsxs(Rt,{align:"end",children:[S,k]})]}),e[36]=S,e[37]=k,e[38]=T):T=e[38];let N;e[39]!==v||e[40]!==T?(N=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[v,T]}),e[39]=v,e[40]=T,e[41]=N):N=e[41];const R=n._meta?.["mcp.mesh"]?.short_description||n.description||n.server.description||"No description provided.";let w;e[42]!==R?(w=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 min-h-10",children:R}),e[42]=R,e[43]=w):w=e[43];let P;e[44]!==n.id||e[45]!==x?(P=x.map($=>s.jsx(U,{variant:"secondary",children:$},`${n.id}-badge-${$}`)),e[44]=n.id,e[45]=x,e[46]=P):P=e[46];let D;e[47]!==h?(D=h>0&&s.jsxs(U,{variant:"outline",children:["+",h]}),e[47]=h,e[48]=D):D=e[48];let I;e[49]!==P||e[50]!==D?(I=s.jsxs("div",{className:"flex flex-wrap gap-1",children:[P,D]}),e[49]=P,e[50]=D,e[51]=I):I=e[51];let E;return e[52]!==N||e[53]!==w||e[54]!==I?(E=s.jsxs(ne,{className:"p-4 gap-4 transition-colors hover:bg-muted/50",children:[N,w,I]}),e[52]=N,e[53]=w,e[54]=I,e[55]=E):E=e[55],E}function zs(t){const e=K.c(27),{value:n,onChange:r,onFileUpload:o,error:l,isUploading:a}=t,i=a===void 0?!1:a,[c,m]=M.useState(!1),[x,h]=M.useState(!1),f=M.useRef(null);let p;e[0]!==i?(p=R=>{R.preventDefault(),i||m(!0)},e[0]=i,e[1]=p):p=e[1];const d=p;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=R=>{R.preventDefault(),m(!1)},e[2]=y):y=e[2];const g=y;let C;e[3]!==i||e[4]!==o?(C=async R=>{if(R.preventDefault(),m(!1),i)return;const w=R.dataTransfer.files[0];w&&await o(w)},e[3]=i,e[4]=o,e[5]=C):C=e[5];const _=C;let v;e[6]!==i||e[7]!==o?(v=async R=>{const w=R.target.files?.[0];w&&!i&&await o(w),R.target.value=""},e[6]=i,e[7]=o,e[8]=v):v=e[8];const b=v,S=n.length>0;let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ie,{children:"Image"}),e[9]=u):u=e[9];let j;e[10]!==d||e[11]!==_||e[12]!==S||e[13]!==c||e[14]!==i||e[15]!==r||e[16]!==x||e[17]!==n?(j=S?s.jsx("div",{className:"relative group min-h-[180px] rounded-xl border border-border overflow-hidden bg-muted/10",children:s.jsxs("div",{className:"flex items-center gap-3 p-3 h-full",children:[s.jsx("div",{className:"size-20 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0",children:s.jsx("img",{src:n,alt:"Preview",className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>f.current?.click(),disabled:i,children:[s.jsx(es,{className:"size-3"}),"Change"]}),s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 text-destructive hover:text-destructive",onClick:()=>{r(""),h(!1)},disabled:i,children:[s.jsx(vt,{className:"size-3"}),"Remove"]})]})]})]})}):i?s.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:[s.jsx(mt,{className:"size-8 animate-spin text-muted-foreground"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Uploading image..."})]}):s.jsxs("div",{className:J("relative min-h-[180px] rounded-xl border-2 border-dashed transition-colors cursor-pointer flex flex-col",c?"border-primary bg-primary/5":"border-border hover:border-muted-foreground/40 hover:bg-muted/30"),onDragOver:d,onDragLeave:g,onDrop:_,onClick:()=>f.current?.click(),children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-6 px-4 flex-1",children:[s.jsx("div",{className:J("size-10 rounded-lg flex items-center justify-center transition-colors",c?"bg-primary/10 text-primary":"bg-muted/50 text-muted-foreground"),children:s.jsx(Ps,{size:20})}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:c?"Drop image here":"Click or drag to upload"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"PNG, JPG, SVG up to 2MB"})]})]}),x?s.jsx("div",{className:"border-t border-border px-3 py-2",onClick:pr,children:s.jsx(ye,{placeholder:"https://example.com/logo.png",value:n,className:"text-xs h-8",onChange:R=>r(R.target.value)})}):s.jsx("div",{className:"border-t border-border px-4 py-2",children:s.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:R=>{R.stopPropagation(),h(!0)},children:[s.jsx(Es,{className:"size-3"}),"Or paste an image URL"]})})]}),e[10]=d,e[11]=_,e[12]=S,e[13]=c,e[14]=i,e[15]=r,e[16]=x,e[17]=n,e[18]=j):j=e[18];let k;e[19]!==b?(k=s.jsx("input",{ref:f,type:"file",accept:"image/*",className:"hidden",onChange:b}),e[19]=b,e[20]=k):k=e[20];let T;e[21]!==l?(T=l&&s.jsx("p",{className:"text-xs text-destructive",children:l}),e[21]=l,e[22]=T):T=e[22];let N;return e[23]!==j||e[24]!==k||e[25]!==T?(N=s.jsxs("div",{className:"grid gap-1.5",children:[u,j,k,T]}),e[23]=j,e[24]=k,e[25]=T,e[26]=N):N=e[26],N}function pr(t){return t.stopPropagation()}function Os(){const[t,e]=M.useState("idle"),[n,r]=M.useState(null),{org:o}=de(),l=ge({connectionId:be,orgId:o.id});return{discover:async(c,m)=>{if(!c)return null;e("loading"),r(null);try{const x=await l.callTool({name:"REGISTRY_DISCOVER_TOOLS",arguments:{url:c,type:m==="sse"?"sse":"http"}}),h=x.structuredContent??x;if(x.isError){const f=x.content?.find(p=>p.type==="text")?.text??"Tool returned an error";return r(f),e("error"),null}return h.error?fr(h.error)?(r(h.error),e("auth_required"),null):(r(h.error),e("error"),null):!h.tools||h.tools.length===0?(r("No tools found on this MCP server."),e("error"),null):(e("success"),h.tools)}catch(x){const h=x instanceof Error?x.message:String(x);return r(h||"Could not discover tools."),e("error"),null}},discoverStatus:t,discoverError:n,resetDiscover:()=>{e("idle"),r(null)}}}function fr(t){const e=t.toLowerCase();return e.includes("authentication")||e.includes("unauthorized")||e.includes("credentials")}function gr(t){const e=K.c(54),{tools:n,onChange:r,remoteUrl:o,remoteType:l,externalDiscoverStatus:a,externalDiscoverError:i}=t,[c,m]=M.useState(n.length>0),{discover:x,discoverStatus:h,discoverError:f,resetDiscover:p}=Os(),d=a??h,y=i??f;let g;e[0]!==x||e[1]!==r||e[2]!==l||e[3]!==o?(g=async()=>{if(!o)return;const L=await x(o,l??"http");L&&(r(L),m(!0))},e[0]=x,e[1]=r,e[2]=l,e[3]=o,e[4]=g):g=e[4];const C=g;let _;e[5]!==r||e[6]!==p?(_=()=>{r([]),p()},e[5]=r,e[6]=p,e[7]=_):_=e[7];const v=_;let b;e[8]!==c?(b=()=>m(!c),e[8]=c,e[9]=b):b=e[9];let S,u;e[10]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ts,{size:14,className:"text-muted-foreground"}),u=s.jsx("span",{children:"Tools"}),e[10]=S,e[11]=u):(S=e[10],u=e[11]);let j;e[12]!==n.length?(j=n.length>0&&s.jsx(U,{variant:"secondary",className:"text-xs px-1.5 py-0",children:n.length}),e[12]=n.length,e[13]=j):j=e[13];let k;e[14]!==c?(k=c?s.jsx(fn,{size:14,className:"text-muted-foreground"}):s.jsx(Ss,{size:14,className:"text-muted-foreground"}),e[14]=c,e[15]=k):k=e[15];let T;e[16]!==b||e[17]!==j||e[18]!==k?(T=s.jsxs("button",{type:"button",className:"flex items-center gap-2 text-sm font-medium cursor-pointer",onClick:b,children:[S,u,j,k]}),e[16]=b,e[17]=j,e[18]=k,e[19]=T):T=e[19];let N;e[20]!==v||e[21]!==n.length?(N=n.length>0&&s.jsxs(F,{type:"button",variant:"ghost",size:"sm",className:"h-7 text-xs gap-1.5 text-muted-foreground",onClick:v,children:[s.jsx(vt,{size:12}),"Clear"]}),e[20]=v,e[21]=n.length,e[22]=N):N=e[22];let R;e[23]!==d||e[24]!==C||e[25]!==o||e[26]!==n.length?(R=o&&s.jsxs(F,{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:C,disabled:d==="loading",children:[d==="loading"?s.jsx(mt,{size:12,className:"animate-spin"}):s.jsx(es,{size:12}),d==="loading"?"Discovering...":n.length>0?"Refresh":"Auto-discover"]}),e[23]=d,e[24]=C,e[25]=o,e[26]=n.length,e[27]=R):R=e[27];let w;e[28]!==R||e[29]!==N?(w=s.jsxs("div",{className:"flex items-center gap-2",children:[N,R]}),e[28]=R,e[29]=N,e[30]=w):w=e[30];let P;e[31]!==w||e[32]!==T?(P=s.jsxs("div",{className:"flex items-center justify-between",children:[T,w]}),e[31]=w,e[32]=T,e[33]=P):P=e[33];let D;e[34]!==d||e[35]!==n.length?(D=d==="success"&&s.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:[s.jsx(bt,{size:14,className:"shrink-0"}),s.jsxs("span",{children:["Discovered ",n.length," tool",n.length!==1?"s":""," ","successfully."]})]}),e[34]=d,e[35]=n.length,e[36]=D):D=e[36];let I;e[37]!==y||e[38]!==d?(I=d==="error"&&y&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[s.jsx(jt,{size:14,className:"shrink-0"}),s.jsx("span",{children:y})]}),e[37]=y,e[38]=d,e[39]=I):I=e[39];let E;e[40]!==c||e[41]!==n?(E=c&&n.length>0&&s.jsx("div",{className:"rounded-xl border border-border divide-y divide-border overflow-hidden max-h-48 overflow-y-auto",children:n.map(jr)}),e[40]=c,e[41]=n,e[42]=E):E=e[42];let $;e[43]!==d||e[44]!==c||e[45]!==o||e[46]!==n.length?($=c&&n.length===0&&d==="idle"&&s.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]=d,e[44]=c,e[45]=o,e[46]=n.length,e[47]=$):$=e[47];let z;return e[48]!==P||e[49]!==D||e[50]!==I||e[51]!==E||e[52]!==$?(z=s.jsxs("div",{className:"space-y-3",children:[P,D,I,E,$]}),e[48]=P,e[49]=D,e[50]=I,e[51]=E,e[52]=$,e[53]=z):z=e[53],z}function jr(t){return s.jsx("div",{className:"flex items-center gap-3 px-3 py-2",children:s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-mono truncate",children:t.name}),t.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.description})]})},t.name)}function Us(t){const{org:e}=de(),[n,r]=M.useState(!1),l=typeof window<"u"&&window.location.hostname==="localhost"?`${e.id}_dev-assets`:null,a=ge({connectionId:l??"noop",orgId:e.id});return{uploadImage:async(c,m)=>{if(!l)return W.error("Image upload requires an object-storage connection. Configure one in plugin settings."),null;if(!c.type.startsWith("image/"))return W.error("Only image files are supported"),null;if(c.size>5*1024*1024)return W.error("Image size must be less than 5MB"),null;r(!0);try{const x=await a.callTool({name:"PUT_PRESIGNED_URL",arguments:{key:m,contentType:c.type}}),h=x.structuredContent?.url||x.url;if(!h)throw new Error("Failed to get presigned URL");const f=await fetch(h,{method:"PUT",body:c,headers:{"Content-Type":c.type}});if(!f.ok)throw new Error(`Upload failed: ${f.statusText}`);const p=await a.callTool({name:"GET_PRESIGNED_URL",arguments:{key:m,expiresIn:31536e3}}),d=p.structuredContent?.url||p.url;if(!d)throw new Error("Failed to get public URL");return d}catch(x){return console.error("Image upload failed:",x),W.error(x instanceof Error?x.message:"Failed to upload image. Please try again."),null}finally{r(!1)}},isUploading:n}}function yr(){const{org:t}=de(),[e,n]=M.useState(null),r=M.useRef(0),o=ge({connectionId:be,orgId:t.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 c=i.content?.find(m=>m.type==="text")?.text??"Failed to generate content";throw new Error(c)}return i.structuredContent??i}finally{r.current-=1,r.current===0&&n(null)}},loadingType:e,isGenerating:e!==null}}const br=new Set(["http","sse","stdio"]),vr=/^[a-z0-9]+(?:[/-][a-z0-9._-]+)*$/,xs=["internal","automation","support","sales","ops","ai"],qs=["productivity","communication","customer-support","development","data","operations"],Nr=["Essentials","Details","Advanced"],ht="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 hs(t){return t.replace(/^https?:\/\//i,"").trim()}function pt(t){const e=t.trim();return e?/^https?:\/\//i.test(e)?e:`https://${e}`:""}function lt(t){return t.trim().toLowerCase()}function yt(t){return Array.from(new Set(t.map(lt).filter(e=>e.length>0)))}function dt(t){return t.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function wr(t){const e=K.c(4),{current:n}=t;let r;e[0]!==n?(r=Nr.map((l,a)=>{const i=a+1,c=i===n,m=i<n;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[a>0&&s.jsx("div",{className:J("w-4 h-px",m?"bg-primary":"bg-border")}),s.jsxs("div",{className:J("flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs transition-colors",c?"bg-primary/10 text-primary font-medium":m?"text-primary":"text-muted-foreground"),children:[s.jsx("span",{className:J("size-5 rounded-full inline-flex items-center justify-center text-[10px] font-semibold shrink-0",c?"bg-primary text-primary-foreground":m?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"),children:i}),s.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=s.jsx("div",{className:"flex items-center gap-1.5",children:r}),e[2]=r,e[3]=o):o=e[3],o}function Cr(t){const e=K.c(28),{id:n,label:r,values:o,availableOptions:l,placeholder:a,onChange:i}=t,[c,m]=M.useState(""),[x,h]=M.useState(!1);let f,p,d,y,g;if(e[0]!==l||e[1]!==n||e[2]!==c||e[3]!==x||e[4]!==r||e[5]!==i||e[6]!==a||e[7]!==o){const v=yt(l),b=yt(o),S=new Set(b),u=lt(c),j=v.filter(I=>!S.has(I)).filter(I=>u?I.includes(u):!0).slice(0,8),k=I=>{const E=lt(I);!E||S.has(E)||i([...b,E])},T=I=>{i(b.filter(E=>E!==I))},N=()=>{const I=c.split(/[,\n;]/).map(lt).filter(Boolean);if(I.length===0)return;const E=[...b];for(const $ of I)E.includes($)||E.push($);i(E),m("")},R=u;y="grid gap-2",e[13]!==n||e[14]!==r?(g=s.jsx(ie,{htmlFor:n,children:r}),e[13]=n,e[14]=r,e[15]=g):g=e[15],f="relative";let w;e[16]!==n?(w=()=>{const I=document.getElementById(n);I instanceof HTMLInputElement&&I.focus()},e[16]=n,e[17]=w):w=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=()=>h(!0),e[18]=P):P=e[18];let D;e[19]===Symbol.for("react.memo_cache_sentinel")?(D=I=>m(I.target.value),e[19]=D):D=e[19],p=s.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:w,children:s.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[b.map(I=>s.jsxs(U,{variant:"secondary",className:"gap-1",children:[I,s.jsx("button",{type:"button",onClick:E=>{E.preventDefault(),E.stopPropagation(),T(I)},children:s.jsx(bn,{size:12})})]},`${n}-${I}`)),s.jsx("input",{id:n,className:"flex-1 min-w-[120px] bg-transparent outline-none border-none text-sm",placeholder:b.length?"":a,value:c,onFocus:P,onBlur:()=>{h(!1),N()},onChange:D,onKeyDown:I=>{if(I.key==="Enter"||I.key===","){I.preventDefault(),N();return}I.key==="Backspace"&&!c&&b.length&&T(b[b.length-1]??"")}})]})}),d=x&&s.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:j.length>0?j.map(I=>s.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:kr,onClick:()=>{k(I),m("")},children:I},`${n}-suggestion-${I}`)):R?s.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:_r,onClick:()=>{k(R),m("")},children:['Create "',R,'"']}):s.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]=c,e[3]=x,e[4]=r,e[5]=i,e[6]=a,e[7]=o,e[8]=f,e[9]=p,e[10]=d,e[11]=y,e[12]=g}else f=e[8],p=e[9],d=e[10],y=e[11],g=e[12];let C;e[20]!==f||e[21]!==p||e[22]!==d?(C=s.jsxs("div",{className:f,children:[p,d]}),e[20]=f,e[21]=p,e[22]=d,e[23]=C):C=e[23];let _;return e[24]!==y||e[25]!==g||e[26]!==C?(_=s.jsxs("div",{className:y,children:[g,C]}),e[24]=y,e[25]=g,e[26]=C,e[27]=_):_=e[27],_}function _r(t){return t.preventDefault()}function kr(t){return t.preventDefault()}function Sr({id:t,value:e,availableOptions:n,onChange:r}){const[o,l]=M.useState(e),[a,i]=M.useState(!1),c=M.useRef(e);c.current!==e&&(c.current=e,l(e));const m=yt([...qs,...n,e]).filter(Boolean),x=lt(o),h=m.filter(p=>x?p.includes(x):!0).slice(0,8),f=p=>{const d=lt(p);r(d),l(d),i(!1)};return s.jsxs("div",{className:"grid gap-2",children:[s.jsx(ie,{htmlFor:t,children:"Category"}),s.jsxs("div",{className:"relative",children:[s.jsx(ye,{id:t,className:"h-9 text-sm",placeholder:"Select or create category",value:o,onFocus:()=>{l(e),i(!0)},onBlur:()=>{f(o)},onChange:p=>l(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),f(o))}}),e&&s.jsx("button",{type:"button",className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground hover:text-foreground",onMouseDown:p=>p.preventDefault(),onClick:()=>{r(""),l("")},children:"clear"}),a&&s.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:h.length>0?h.map(p=>s.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:d=>d.preventDefault(),onClick:()=>f(p),children:p},`${t}-${p}`)):x?s.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:p=>p.preventDefault(),onClick:()=>f(x),children:['Create "',x,'"']}):s.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:"Type to search or create."})})]})]})}function Rr({open:t,onOpenChange:e,item:n,draft:r,availableTags:o=[],availableCategories:l=[],defaultLLMConnectionId:a="",defaultLLMModelId:i="",isSubmitting:c=!1,onSubmit:m}){const{org:x}=de(),{uploadImage:h,isUploading:f}=Us(),{generate:p,loadingType:d}=yr(),{discover:y,discoverStatus:g,discoverError:C,resetDiscover:_}=Os(),v=!!n,b=r?._meta?.["mcp.mesh"],S=n?.title??r?.title??"",u=n?.id?.split("/")[0]??r?.id?.split("/")[0]??"",j=n?.description??r?.description??"",k=n?._meta?.["mcp.mesh"]?.short_description??b?.short_description??"",T=n?._meta?.["mcp.mesh"]?.owner??b?.owner??"",N=n?.server?.repository?.url??r?.server?.repository?.url??"",R=n?._meta?.["mcp.mesh"]?.readme??b?.readme??"",w=n?._meta?.["mcp.mesh"]?.readme_url??b?.readme_url??"",P=hs(n?.server?.remotes?.[0]?.url??r?.server?.remotes?.[0]?.url??""),D=n?.server?.remotes?.[0]?.type??r?.server?.remotes?.[0]?.type??"http",I=n?._meta?.["mcp.mesh"]?.tags??b?.tags??[],E=n?._meta?.["mcp.mesh"]?.categories?.[0]??b?.categories?.[0]??"",$=n?.server?.icons?.[0]?.src??r?.server?.icons?.[0]?.src??"",z=n?._meta?.["mcp.mesh"]?.tools??b?.tools??[],L=n?.is_public??r?.is_public??!1,[q,V]=M.useState(1),[Y,X]=M.useState(S),[Z,te]=M.useState(u),[se,he]=M.useState(j),[re,ae]=M.useState(k),[oe,me]=M.useState(T),[ce,ue]=M.useState(N),[ve,Se]=M.useState(R),[je,Ie]=M.useState(w),[xe,Ne]=M.useState(R?"content":"link"),[le,_e]=M.useState(P),[H,fe]=M.useState(D),[Re,O]=M.useState(I),[ee,Te]=M.useState(E),[we,Ue]=M.useState($),[Ce,Je]=M.useState(z),[Ze,at]=M.useState(L),[pe,Oe]=M.useState({}),Ee=!!(a&&i),Xe=()=>{V(1),X(S),te(u),he(j),ae(k),me(T),ue(N),Se(R),Ie(w),Ne(R?"content":"link"),_e(P),fe(D),O(I),Te(E),Ue($),Je(z),at(L),Oe({}),_(),qe.current="",De.current&&(clearTimeout(De.current),De.current=null)},ut=async A=>{if(!A)return;const B=v?n?.id:`${Z}/${Y}`.toLowerCase(),$e=dt(B||"temp"),Ve=A.name.split(".").pop()||"png",Ye=`registry/${x.id}/${$e}/icon.${Ve}`,ct=await h(A,Ye);ct?(Ue(ct),Oe(He=>({...He,imageUrl:void 0}))):Oe(He=>({...He,imageUrl:"Failed to upload image. Please try again."}))},De=M.useRef(null),qe=M.useRef(""),tt=M.useRef(H);tt.current=H;const ot=A=>{!A&&De.current&&(clearTimeout(De.current),De.current=null),e(A),A||Xe()},st=async()=>{const A=pt(le);if(!A)return;qe.current=A;const B=await y(A,tt.current);B&&Je(B)},nt=A=>{De.current&&clearTimeout(De.current);const B=pt(A);!B||B===qe.current||A.includes(".")&&(De.current=setTimeout(async()=>{qe.current=B;const $e=await y(B,tt.current);$e&&Je($e)},800))},Qe=()=>Ee?{llmConnectionId:a,modelId:i}:null,Ke=()=>({name:Y.trim(),provider:Z.trim(),url:pt(le),owner:oe.trim(),repositoryUrl:ce.trim(),description:se.trim(),shortDescription:re.trim(),tags:Re,categories:ee?[ee]:[],availableTags:[...xs,...o],availableCategories:[...qs,...l],tools:Ce}),rt=async()=>{const A=Qe();if(!A)return;const B=await p({...A,type:"description",context:Ke()});B.result&&he(B.result.slice(0,1500))},it=async()=>{const A=Qe();if(!A)return;const B=await p({...A,type:"short_description",context:Ke()});B.result&&ae(B.result.slice(0,160))},Q=async()=>{const A=Qe();if(!A)return;const B=await p({...A,type:"tags",context:Ke()});B.items?.length&&O(yt(B.items))},ke=async()=>{const A=Qe();if(!A)return;const B=await p({...A,type:"categories",context:Ke()});B.items?.[0]&&Te(lt(B.items[0]))},xt=async()=>{const A=Qe();if(!A)return;const B=await p({...A,type:"readme",context:Ke()});B.result&&(Se(B.result.slice(0,5e4)),Ne("content"))},rs=A=>{const B={};if(A===1){const $e=dt(Z),Ve=dt(Y),Ye=`${$e}/${Ve}`;Y.trim()||(B.title="Name is required."),v||($e?Ve?vr.test(Ye)||(B.provider="Use lowercase letters/numbers and separators '/' or '-'."):B.title="Name must contain valid characters.":B.provider="Provider is required.");const ct=pt(le),He=H.trim().toLowerCase();if(He!=="stdio"&&ct)try{const ft=new URL(ct);["http:","https:"].includes(ft.protocol)||(B.remoteUrl="Remote URL must be http(s).")}catch{B.remoteUrl="Remote URL is invalid."}if(He&&!br.has(He)&&(B.remoteType="Remote type must be: http, sse or stdio."),we.trim()&&!we.trim().startsWith("data:image/"))try{const Vt=new URL(we.trim());["http:","https:"].includes(Vt.protocol)||(B.imageUrl="Image URL must be http(s).")}catch{B.imageUrl="Image URL is invalid."}}if(A===2&&(se.length>1500&&(B.description="Description must be 1500 characters or less."),re.trim().length>160&&(B.shortDescription="Short description must be 160 characters or less.")),A===3){const $e=je.trim();if($e)try{const Ye=new URL($e);["http:","https:"].includes(Ye.protocol)||(B.readmeUrl="README URL must be http(s).")}catch{B.readmeUrl="README URL is invalid."}ve.trim().length>5e4&&(B.readme="README must be 50 000 characters or less.");const Ve=ce.trim();if(Ve)try{const Ye=new URL(Ve);["http:","https:"].includes(Ye.protocol)||(B.repositoryUrl="Repository URL must be http(s).")}catch{B.repositoryUrl="Repository URL is invalid."}}return Oe(B),Object.values(B).every($e=>$e===void 0)},Vs=()=>{rs(q)&&q<3&&V(q+1)},Ys=()=>{q>1&&V(q-1)},Hs=async()=>{if(!rs(3))return;const A=Y.trim(),B=dt(Z),$e=dt(A),Ve=`${B}/${$e}`,Ye=pt(le),ct=H.trim().toLowerCase(),He=we.trim(),ft=ce.trim(),Vt=re.trim(),Xs=ve.trim(),en=je.trim(),tn=yt(Re),sn=ee?[lt(ee)]:[],nn=n?n.server?.name??n.id:"",rn=(v?nn:Ve).trim(),Yt=se.trim(),ln=oe.trim(),is={title:A,description:Yt.length>0?Yt:null,is_public:Ze,_meta:{"mcp.mesh":{tags:tn,categories:sn,short_description:Vt||null,owner:ln||null,readme:Xs||null,readme_url:en||null,...Ce.length>0?{tools:Ce}:{}}},server:{name:rn,title:A,description:Yt||void 0,icons:He?[{src:He}]:[],repository:ft?{url:ft}:void 0,remotes:Ye?[{type:ct||"http",url:Ye}]:[]}};if(v&&n){await m({id:n.id,data:is}),e(!1);return}await m({id:Ve,...is}),e(!1),Xe()},Ws=s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"row-span-2 grid gap-3 content-start",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(ie,{htmlFor:"registry-item-provider",children:"Provider"}),s.jsx(ye,{id:"registry-item-provider",className:"h-9 text-sm",placeholder:"acme",value:Z,onChange:A=>te(A.target.value),disabled:v}),!v&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Item ID:"," ",s.jsx("span",{className:"font-mono",children:`${dt(Z)||"provider"}/${dt(Y)||"name"}`})]}),pe.provider&&s.jsx("p",{className:"text-xs text-destructive",children:pe.provider})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(ie,{htmlFor:"registry-item-title",children:"Name"}),s.jsx(ye,{id:"registry-item-title",className:"h-9 text-sm",placeholder:"Internal MCP",value:Y,onChange:A=>X(A.target.value)}),pe.title&&s.jsx("p",{className:"text-xs text-destructive",children:pe.title})]})]}),s.jsx("div",{className:"row-span-2 content-start",children:s.jsx(zs,{value:we,onChange:A=>{Ue(A),Oe(B=>({...B,imageUrl:void 0}))},onFileUpload:ut,error:pe.imageUrl,isUploading:f})}),s.jsxs("div",{className:"col-span-2 grid gap-1.5",children:[s.jsx(ie,{htmlFor:"registry-remote-url",children:"Remote URL"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex-1 flex items-center rounded-xl border border-input px-3",children:[s.jsx("span",{className:"text-xs font-semibold text-muted-foreground mr-1",children:"https://"}),s.jsx("input",{id:"registry-remote-url",className:"flex-1 h-9 bg-transparent outline-none text-sm",placeholder:"example.com/mcp",value:le,onChange:A=>{const B=hs(A.target.value);_e(B),nt(B)}})]}),s.jsxs(ws,{value:H,onValueChange:fe,children:[s.jsx(Cs,{id:"registry-remote-type",className:"w-[90px] h-9 shrink-0",children:s.jsx(_s,{placeholder:"Type"})}),s.jsxs(ks,{children:[s.jsx(Ct,{value:"http",children:"http"}),s.jsx(Ct,{value:"sse",children:"sse"}),s.jsx(Ct,{value:"stdio",children:"stdio"})]})]})]}),pe.remoteUrl&&s.jsx("p",{className:"text-xs text-destructive",children:pe.remoteUrl}),pe.remoteType&&s.jsx("p",{className:"text-xs text-destructive",children:pe.remoteType})]}),le.trim()&&s.jsxs("div",{className:"col-span-2 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:J(ht,"gap-1.5"),onClick:st,disabled:g==="loading",children:[g==="loading"?s.jsx(mt,{size:12,className:"animate-spin"}):s.jsx(es,{size:12}),g==="loading"?"Discovering tools...":Ce.length>0?"Re-discover tools":"Discover tools from URL"]}),Ce.length>0&&g!=="loading"&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[Ce.length," tool",Ce.length!==1?"s":""," loaded"]})]}),g==="success"&&Ce.length>0&&s.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:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-green-600 dark:text-green-400",children:[s.jsx(bt,{size:14,className:"shrink-0"}),s.jsxs("span",{className:"font-medium",children:[Ce.length," tool",Ce.length!==1?"s":""," discovered"]})]}),s.jsxs("div",{className:"flex flex-wrap gap-1",children:[Ce.slice(0,8).map(A=>s.jsx(U,{variant:"secondary",className:"text-[10px] px-1.5 py-0 font-mono",children:A.name},A.name)),Ce.length>8&&s.jsxs("span",{className:"text-[10px] text-muted-foreground self-center",children:["+",Ce.length-8," more"]})]}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:"These tools will enrich AI-generated descriptions, tags and categories in the next step."})]}),g==="auth_required"&&C&&s.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:[s.jsx(jt,{size:14,className:"shrink-0"}),s.jsx("span",{children:"This server requires authentication. The connection is valid but tools cannot be listed without credentials."})]}),g==="error"&&C&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[s.jsx(jt,{size:14,className:"shrink-0"}),s.jsx("span",{children:C})]})]})]}),Js=s.jsxs("div",{className:"grid gap-3",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(ie,{htmlFor:"registry-item-short-description",children:"Short Description"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:[re.length,"/160"]}),Ee&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ht,disabled:d==="short_description",onClick:it,children:d==="short_description"?"Generating...":"AI Generate"})]})]}),s.jsx(ye,{id:"registry-item-short-description",className:"h-9 text-sm",placeholder:"Short summary for the store card",value:re,maxLength:160,onChange:A=>ae(A.target.value)}),pe.shortDescription&&s.jsx("p",{className:"text-xs text-destructive",children:pe.shortDescription})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(ie,{htmlFor:"registry-item-description",children:"Description"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:[se.length,"/1500"]}),Ee&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ht,disabled:d==="description",onClick:rt,children:d==="description"?"Generating...":"AI Generate"})]})]}),s.jsx(At,{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:se,onChange:A=>he(A.target.value)}),pe.description&&s.jsx("p",{className:"text-xs text-destructive",children:pe.description})]}),s.jsx("div",{className:"border-t border-border"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"grid content-start gap-2",children:[s.jsx(Sr,{id:"registry-category",value:ee,availableOptions:l,onChange:Te}),Ee&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:J(ht,"justify-self-start"),disabled:d==="categories",onClick:ke,children:d==="categories"?"Suggesting...":"AI Suggest"})]}),s.jsxs("div",{className:"grid content-start gap-2",children:[s.jsx(Cr,{id:"registry-tags",label:"Tags",values:Re,availableOptions:[...xs,...o],placeholder:"Type and press Enter or comma",onChange:O}),Ee&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:J(ht,"justify-self-start"),disabled:d==="tags",onClick:Q,children:d==="tags"?"Suggesting...":"AI Suggest"})]})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[s.jsxs("div",{className:"grid gap-0.5",children:[s.jsx(ie,{htmlFor:"registry-is-public",className:"text-sm",children:"Public"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Make this MCP visible in the public store URL."})]}),s.jsx(_t,{id:"registry-is-public",checked:Ze,onCheckedChange:at})]})]}),Zs=s.jsxs("div",{className:"grid gap-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(ie,{htmlFor:"registry-item-owner",children:"Owner (optional)"}),s.jsx(ye,{id:"registry-item-owner",className:"h-9 text-sm",placeholder:"Team, company, or responsible person",value:oe,onChange:A=>me(A.target.value)})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(ie,{htmlFor:"registry-item-repository-url",children:"Repository URL (optional)"}),s.jsx(ye,{id:"registry-item-repository-url",className:"h-9 text-sm",placeholder:"https://github.com/org/repo",value:ce,onChange:A=>ue(A.target.value)}),pe.repositoryUrl&&s.jsx("p",{className:"text-xs text-destructive",children:pe.repositoryUrl})]})]}),s.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(ie,{children:"README"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[ve.length,"/50000"]})]}),s.jsx("div",{className:"inline-flex rounded-lg border border-border p-0.5",children:(Ee?["link","content","generate"]:["link","content"]).map(A=>s.jsx("button",{type:"button",className:J("px-2.5 py-1 text-xs rounded-md",xe===A?"bg-primary text-primary-foreground":"text-muted-foreground"),onClick:()=>Ne(A),children:A==="link"?"Link":A==="content"?"Content":"Generate"},A))}),xe==="link"&&s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(ye,{className:"h-9 text-sm",placeholder:"https://raw.githubusercontent.com/org/repo/main/README.md",value:je,onChange:A=>Ie(A.target.value)}),pe.readmeUrl&&s.jsx("p",{className:"text-xs text-destructive",children:pe.readmeUrl})]}),xe==="content"&&s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(At,{className:"text-sm max-h-48 overflow-y-auto resize-none",placeholder:`# README
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-A91v4mp1.js";import{c as s}from"./constants-B3FMsdmP.js";function m(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_LIST");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_LIST");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_LIST"));return i?i.name:""}function o(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_FILTERS");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_FILTERS");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_FILTERS"));return i?i.name:""}function I(t,r){if(!t)return"";const e=t.find(f=>f.name===`COLLECTION_REGISTRY_APP${r}`);if(e)return e.name;const i={_GET:"REGISTRY_ITEM_GET",_VERSIONS:"REGISTRY_ITEM_VERSIONS",_SEARCH:"REGISTRY_ITEM_SEARCH"},n=t.find(f=>f.name===i[r]);if(n)return n.name;const a=t.find(f=>f.name.startsWith("COLLECTION_REGISTRY_APP_")&&f.name.endsWith(r));return a?a.name:""}function R(t){if(!t)return[];const r=[];for(const e of t){let i=[];if(Array.isArray(e))i=e;else if(typeof e=="object"&&e!==null){const n=Object.keys(e).find(a=>Array.isArray(e[a]));n&&(i=e[n])}r.push(...i)}return r}const c={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function E(t){return t?c[t]??t.toUpperCase():null}function _(t){return t?t.match(/schemas\/([\d-]+)/)?.[1]??null:null}function S(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const r=Object.keys(t).find(e=>Array.isArray(t[e]));if(r)return t[r]}return[]}async function d(t,r,e,i){const n=await s({connectionId:t,orgId:r});try{const a=await n.callTool({name:e,arguments:i});return a.structuredContent??a}finally{await n.close().catch(console.error)}}export{R as a,o as b,d as c,I as d,S as e,m as f,E as g,_ as h};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as ee,c as A,j as s,bC as le,z as ye,t as ce,u as we,a as Te,b as ze,bD as ke}from"./index-Br0JHFBh.js";import{c as Re}from"./binder-Du921zu4.js";import{u as ue}from"./useQuery-C1TQ4FwZ.js";import{h as Ie}from"./use-connection-lRtb-dW8.js";import{a as Pe,u as Me,j as Ee}from"./constants-CbGbN-bq.js";import{u as de,P as Le}from"./topbar-portal-jn5x1lJu.js";import{i as ie}from"./Loading01-COGPPF9I.js";import{t as De}from"./Settings01-B-WT0IxN.js";import{i as Ae}from"./Check-S3QhFxnB.js";import{t as Be}from"./ChevronDown-Db867kLo.js";import{c as X,B as me}from"./button-CbQ7DCWa.js";import{i as fe}from"./AlertCircle-DoLIsJyW.js";import{i as xe}from"./ArrowLeft-CiECeG_6.js";import{n as oe}from"./CheckDone01-CcIaZNG6.js";import{s as Ne}from"./Clock-CNXDMvsO.js";import{a as Fe}from"./Copy01-Cz2LFET8.js";import{n as ve}from"./Inbox01-C-CAM8QG.js";import{i as Oe}from"./CheckCircle-BwSnxBGS.js";import{i as qe}from"./InfoCircle-Zv-wvxDb.js";import{i as Ue}from"./XCircle-CzZOufLC.js";import{u as _e}from"./useMutation-CN6je47m.js";import{T as Ve,b as Se,c as Ge,a as Ke,d as He,e as Qe}from"./table-wyA99zKl.js";import{M as We}from"./markdown-DtPTbOTE.js";import{i as Je,n as Ye}from"./ArrowUp-D9nucysD.js";import{B as Xe}from"./badge-ii0tjSSJ.js";import{b as Ze,c as et,d as tt,a as st,C as lt}from"./card-7oHUrTQa.js";import{c as pe,d as re,a as ge,b as he,S as je}from"./select-sypu_AhE.js";import"./index-elk3AqGN.js";const Ce=({size:t=24,color:e="currentColor",...l})=>ee.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},ee.createElement("path",{d:"M5 12h14"}));Ce.displayName="Minus";const ne={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function nt(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(le,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function it(t){const e=A.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:c}=t,[o,a]=ee.useState(!1),i=ee.useRef(null);let f;if(e[0]!==l||e[1]!==n){let r;e[3]!==n?(r=N=>N.id===n,e[3]=n,e[4]=r):r=e[4],f=l.find(r),e[0]=l,e[1]=n,e[2]=f}else f=e[2];const d=f;let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=r=>{i.current?.contains(r.relatedTarget)||a(!1)},e[5]=m):m=e[5];const x=m;if(l.length===1){let r;e[6]!==d?(r=d?.icon?s.jsx("img",{src:d.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),e[6]=d,e[7]=r):r=e[7];const N=d?.title||"Reports";let j;e[8]!==N?(j=s.jsx("span",{children:N}),e[8]=N,e[9]=j):j=e[9];let C;return e[10]!==r||e[11]!==j?(C=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[r,j]}),e[10]=r,e[11]=j,e[12]=C):C=e[12],C}let u;e[13]!==o?(u=()=>a(!o),e[13]=o,e[14]=u):u=e[14];let p;e[15]!==d?(p=d?.icon?s.jsx("img",{src:d.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),e[15]=d,e[16]=p):p=e[16];const g=d?.title||"Select source";let b;e[17]!==g?(b=s.jsx("span",{children:g}),e[17]=g,e[18]=b):b=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Be,{size:14}),e[19]=S):S=e[19];let v;e[20]!==u||e[21]!==p||e[22]!==b?(v=s.jsxs("button",{type:"button",onClick:u,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[p,b,S]}),e[20]=u,e[21]=p,e[22]=b,e[23]=v):v=e[23];let y;e[24]!==l||e[25]!==o||e[26]!==c||e[27]!==n?(y=o&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(r=>s.jsxs("button",{type:"button",onClick:()=>{c(r.id),a(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[r.icon?s.jsx("img",{src:r.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:r.title}),r.id===n&&s.jsx(Ae,{size:14,className:"text-primary"})]},r.id))}),e[24]=l,e[25]=o,e[26]=c,e[27]=n,e[28]=y):y=e[28];let _;return e[29]!==v||e[30]!==y?(_=s.jsxs("div",{className:"relative",ref:i,onBlur:x,children:[v,y]}),e[29]=v,e[30]=y,e[31]=_):_=e[31],_}function ot(t){const e=A.c(2);let l;return e[0]!==t?(l=s.jsx(it,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ae={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:Oe},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:fe},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:Ue},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:qe}};function $e(t){const e=A.c(10),{status:l,size:n}=t,c=n===void 0?"default":n,o=ae[l]??ae.info,a=o.icon,i=c==="sm",f=i?"px-2 py-0.5":"px-2.5 py-1";let d;e[0]!==o.color||e[1]!==f?(d=X("inline-flex items-center gap-1 rounded-full border text-xs font-medium",f,o.color),e[0]=o.color,e[1]=f,e[2]=d):d=e[2];const m=i?12:14;let x;e[3]!==a||e[4]!==m?(x=s.jsx(a,{size:m}),e[3]=a,e[4]=m,e[5]=x):x=e[5];let u;return e[6]!==o.label||e[7]!==d||e[8]!==x?(u=s.jsxs("span",{className:d,children:[x,o.label]}),e[6]=o.label,e[7]=d,e[8]=x,e[9]=u):u=e[9],u}function be(t){const e=A.c(11),{connectionId:l,toolCaller:n}=de();let c;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(c=ne.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=c):c=e[3];let o;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(o=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=o):o=e[7];let a;return e[8]!==c||e[9]!==o?(a={queryKey:c,queryFn:o,staleTime:6e4},e[8]=c,e[9]=o,e[10]=a):a=e[10],ue(a)}function rt(t){const e=A.c(10),{connectionId:l,toolCaller:n}=de();let c;e[0]!==l||e[1]!==t?(c=ne.report(l,t),e[0]=l,e[1]=t,e[2]=c):c=e[2];let o;e[3]!==t||e[4]!==n?(o=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=o):o=e[5];const a=!!t;let i;return e[6]!==c||e[7]!==o||e[8]!==a?(i={queryKey:c,queryFn:o,enabled:a,staleTime:6e4},e[6]=c,e[7]=o,e[8]=a,e[9]=i):i=e[9],ue(i)}const at={passing:"text-emerald-600 dark:text-emerald-400",warning:"text-amber-600 dark:text-amber-400",failing:"text-red-600 dark:text-red-400",info:"text-blue-600 dark:text-blue-400"},ct={passing:"bg-emerald-500/10 border-emerald-500/20",warning:"bg-amber-500/10 border-amber-500/20",failing:"bg-red-500/10 border-red-500/20",info:"bg-blue-500/10 border-blue-500/20"};function dt(t){const e=A.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(We,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function mt(t){const e=A.c(11),{current:l,previous:n}=t,c=typeof l=="number"?l:parseFloat(l),o=typeof n=="number"?n:parseFloat(n);if(isNaN(c)||isNaN(o))return null;const a=c-o;if(a===0){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("span",{className:"inline-flex items-center gap-0.5 text-xs text-muted-foreground",children:[s.jsx(Ce,{size:12}),"no change"]}),e[0]=g):g=e[0],g}const i=a>0;let f;e[1]!==a?(f=a.toFixed(1),e[1]=a,e[2]=f):f=e[2];const d=`${i?"+":""}${f}`,m=i?"text-red-500":"text-emerald-500";let x;e[3]!==m?(x=X("inline-flex items-center gap-0.5 text-xs",m),e[3]=m,e[4]=x):x=e[4];let u;e[5]!==i?(u=i?s.jsx(Je,{size:12}):s.jsx(Ye,{size:12}),e[5]=i,e[6]=u):u=e[6];let p;return e[7]!==d||e[8]!==x||e[9]!==u?(p=s.jsxs("span",{className:x,children:[u,d]}),e[7]=d,e[8]=x,e[9]=u,e[10]=p):p=e[10],p}function ut(t){const e=A.c(22),{metric:l}=t,n=l.status?at[l.status]:"text-foreground",c=l.status?ct[l.status]:"bg-muted/50 border-border";let o;e[0]!==c?(o=X("flex flex-col gap-1 rounded-lg border p-4",c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==l.label?(a=s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:l.label}),e[2]=l.label,e[3]=a):a=e[3];let i;e[4]!==n?(i=X("text-2xl font-semibold tabular-nums",n),e[4]=n,e[5]=i):i=e[5];let f;e[6]!==l.value||e[7]!==i?(f=s.jsx("span",{className:i,children:l.value}),e[6]=l.value,e[7]=i,e[8]=f):f=e[8];let d;e[9]!==l.unit?(d=l.unit&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l.unit}),e[9]=l.unit,e[10]=d):d=e[10];let m;e[11]!==f||e[12]!==d?(m=s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[f,d]}),e[11]=f,e[12]=d,e[13]=m):m=e[13];let x;e[14]!==l.previousValue||e[15]!==l.value?(x=l.previousValue!==void 0&&s.jsx(mt,{current:l.value,previous:l.previousValue}),e[14]=l.previousValue,e[15]=l.value,e[16]=x):x=e[16];let u;return e[17]!==o||e[18]!==a||e[19]!==m||e[20]!==x?(u=s.jsxs("div",{className:o,children:[a,m,x]}),e[17]=o,e[18]=a,e[19]=m,e[20]=x,e[21]=u):u=e[21],u}function ft(t){const e=A.c(9),{title:l,items:n}=t;let c;e[0]!==l?(c=l&&s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[0]=l,e[1]=c):c=e[1];let o;e[2]!==n?(o=n.map(xt),e[2]=n,e[3]=o):o=e[3];let a;e[4]!==o?(a=s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:o}),e[4]=o,e[5]=a):a=e[5];let i;return e[6]!==c||e[7]!==a?(i=s.jsxs("div",{className:"space-y-3",children:[c,a]}),e[6]=c,e[7]=a,e[8]=i):i=e[8],i}function xt(t,e){return s.jsx(ut,{metric:t},`${t.label}-${e}`)}function pt(t){const e=A.c(16),{title:l,columns:n,rows:c}=t;let o;e[0]!==l?(o=l&&s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[0]=l,e[1]=o):o=e[1];let a;e[2]!==n?(a=n.map(jt),e[2]=n,e[3]=a):a=e[3];let i;e[4]!==a?(i=s.jsx(Ke,{children:s.jsx(Se,{children:a})}),e[4]=a,e[5]=i):i=e[5];let f;e[6]!==c?(f=c.map(gt),e[6]=c,e[7]=f):f=e[7];let d;e[8]!==f?(d=s.jsx(He,{children:f}),e[8]=f,e[9]=d):d=e[9];let m;e[10]!==i||e[11]!==d?(m=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(Qe,{children:[i,d]})}),e[10]=i,e[11]=d,e[12]=m):m=e[12];let x;return e[13]!==o||e[14]!==m?(x=s.jsxs("div",{className:"space-y-3",children:[o,m]}),e[13]=o,e[14]=m,e[15]=x):x=e[15],x}function gt(t,e){return s.jsx(Se,{children:t.map(ht)},e)}function ht(t,e){return s.jsx(Ge,{children:t??s.jsx("span",{className:"text-muted-foreground",children:"-"})},e)}function jt(t){return s.jsx(Ve,{children:t},t)}function bt(t){const e=A.c(9),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(dt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(ft,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(pt,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}default:return null}}function yt(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Nt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
|
|
1
|
+
import{r as ee,c as A,j as s,bC as le,z as ye,t as ce,u as we,a as Te,b as ze,bD as ke}from"./index-A91v4mp1.js";import{c as Re}from"./binder-gonW8bT4.js";import{u as ue}from"./useQuery-Boh1HTvu.js";import{h as Ie}from"./use-connection-BviJ1yCA.js";import{a as Pe,u as Me,j as Ee}from"./constants-B3FMsdmP.js";import{u as de,P as Le}from"./topbar-portal-BuFWeBh-.js";import{i as ie}from"./Loading01-CMdu9ggl.js";import{t as De}from"./Settings01-DZMOzFkI.js";import{i as Ae}from"./Check-B5DUxQ7l.js";import{t as Be}from"./ChevronDown-gAOoAGjG.js";import{c as X,B as me}from"./button-BwVHfdAu.js";import{i as fe}from"./AlertCircle-XhRNrbr6.js";import{i as xe}from"./ArrowLeft-C8lAfmna.js";import{n as oe}from"./CheckDone01-BphBp83K.js";import{s as Ne}from"./Clock-CWVBk0le.js";import{a as Fe}from"./Copy01-DD_krz0-.js";import{n as ve}from"./Inbox01-C2d3kzod.js";import{i as Oe}from"./CheckCircle-CTKbvECl.js";import{i as qe}from"./InfoCircle-C3UsXxmT.js";import{i as Ue}from"./XCircle-CIdz2YXd.js";import{u as _e}from"./useMutation-BL36wQaU.js";import{T as Ve,b as Se,c as Ge,a as Ke,d as He,e as Qe}from"./table-iuhYISyO.js";import{M as We}from"./markdown-BkUdPjkx.js";import{i as Je,n as Ye}from"./ArrowUp-DIB1JjtE.js";import{B as Xe}from"./badge-DrTmNp-A.js";import{b as Ze,c as et,d as tt,a as st,C as lt}from"./card-DDW-bHuH.js";import{c as pe,d as re,a as ge,b as he,S as je}from"./select-B6rKXsfc.js";import"./index-CP4hShu9.js";const Ce=({size:t=24,color:e="currentColor",...l})=>ee.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},ee.createElement("path",{d:"M5 12h14"}));Ce.displayName="Minus";const ne={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function nt(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(le,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function it(t){const e=A.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:c}=t,[o,a]=ee.useState(!1),i=ee.useRef(null);let f;if(e[0]!==l||e[1]!==n){let r;e[3]!==n?(r=N=>N.id===n,e[3]=n,e[4]=r):r=e[4],f=l.find(r),e[0]=l,e[1]=n,e[2]=f}else f=e[2];const d=f;let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=r=>{i.current?.contains(r.relatedTarget)||a(!1)},e[5]=m):m=e[5];const x=m;if(l.length===1){let r;e[6]!==d?(r=d?.icon?s.jsx("img",{src:d.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),e[6]=d,e[7]=r):r=e[7];const N=d?.title||"Reports";let j;e[8]!==N?(j=s.jsx("span",{children:N}),e[8]=N,e[9]=j):j=e[9];let C;return e[10]!==r||e[11]!==j?(C=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[r,j]}),e[10]=r,e[11]=j,e[12]=C):C=e[12],C}let u;e[13]!==o?(u=()=>a(!o),e[13]=o,e[14]=u):u=e[14];let p;e[15]!==d?(p=d?.icon?s.jsx("img",{src:d.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),e[15]=d,e[16]=p):p=e[16];const g=d?.title||"Select source";let b;e[17]!==g?(b=s.jsx("span",{children:g}),e[17]=g,e[18]=b):b=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Be,{size:14}),e[19]=S):S=e[19];let v;e[20]!==u||e[21]!==p||e[22]!==b?(v=s.jsxs("button",{type:"button",onClick:u,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[p,b,S]}),e[20]=u,e[21]=p,e[22]=b,e[23]=v):v=e[23];let y;e[24]!==l||e[25]!==o||e[26]!==c||e[27]!==n?(y=o&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(r=>s.jsxs("button",{type:"button",onClick:()=>{c(r.id),a(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[r.icon?s.jsx("img",{src:r.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:r.title}),r.id===n&&s.jsx(Ae,{size:14,className:"text-primary"})]},r.id))}),e[24]=l,e[25]=o,e[26]=c,e[27]=n,e[28]=y):y=e[28];let _;return e[29]!==v||e[30]!==y?(_=s.jsxs("div",{className:"relative",ref:i,onBlur:x,children:[v,y]}),e[29]=v,e[30]=y,e[31]=_):_=e[31],_}function ot(t){const e=A.c(2);let l;return e[0]!==t?(l=s.jsx(it,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ae={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:Oe},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:fe},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:Ue},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:qe}};function $e(t){const e=A.c(10),{status:l,size:n}=t,c=n===void 0?"default":n,o=ae[l]??ae.info,a=o.icon,i=c==="sm",f=i?"px-2 py-0.5":"px-2.5 py-1";let d;e[0]!==o.color||e[1]!==f?(d=X("inline-flex items-center gap-1 rounded-full border text-xs font-medium",f,o.color),e[0]=o.color,e[1]=f,e[2]=d):d=e[2];const m=i?12:14;let x;e[3]!==a||e[4]!==m?(x=s.jsx(a,{size:m}),e[3]=a,e[4]=m,e[5]=x):x=e[5];let u;return e[6]!==o.label||e[7]!==d||e[8]!==x?(u=s.jsxs("span",{className:d,children:[x,o.label]}),e[6]=o.label,e[7]=d,e[8]=x,e[9]=u):u=e[9],u}function be(t){const e=A.c(11),{connectionId:l,toolCaller:n}=de();let c;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(c=ne.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=c):c=e[3];let o;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(o=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=o):o=e[7];let a;return e[8]!==c||e[9]!==o?(a={queryKey:c,queryFn:o,staleTime:6e4},e[8]=c,e[9]=o,e[10]=a):a=e[10],ue(a)}function rt(t){const e=A.c(10),{connectionId:l,toolCaller:n}=de();let c;e[0]!==l||e[1]!==t?(c=ne.report(l,t),e[0]=l,e[1]=t,e[2]=c):c=e[2];let o;e[3]!==t||e[4]!==n?(o=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=o):o=e[5];const a=!!t;let i;return e[6]!==c||e[7]!==o||e[8]!==a?(i={queryKey:c,queryFn:o,enabled:a,staleTime:6e4},e[6]=c,e[7]=o,e[8]=a,e[9]=i):i=e[9],ue(i)}const at={passing:"text-emerald-600 dark:text-emerald-400",warning:"text-amber-600 dark:text-amber-400",failing:"text-red-600 dark:text-red-400",info:"text-blue-600 dark:text-blue-400"},ct={passing:"bg-emerald-500/10 border-emerald-500/20",warning:"bg-amber-500/10 border-amber-500/20",failing:"bg-red-500/10 border-red-500/20",info:"bg-blue-500/10 border-blue-500/20"};function dt(t){const e=A.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(We,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function mt(t){const e=A.c(11),{current:l,previous:n}=t,c=typeof l=="number"?l:parseFloat(l),o=typeof n=="number"?n:parseFloat(n);if(isNaN(c)||isNaN(o))return null;const a=c-o;if(a===0){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("span",{className:"inline-flex items-center gap-0.5 text-xs text-muted-foreground",children:[s.jsx(Ce,{size:12}),"no change"]}),e[0]=g):g=e[0],g}const i=a>0;let f;e[1]!==a?(f=a.toFixed(1),e[1]=a,e[2]=f):f=e[2];const d=`${i?"+":""}${f}`,m=i?"text-red-500":"text-emerald-500";let x;e[3]!==m?(x=X("inline-flex items-center gap-0.5 text-xs",m),e[3]=m,e[4]=x):x=e[4];let u;e[5]!==i?(u=i?s.jsx(Je,{size:12}):s.jsx(Ye,{size:12}),e[5]=i,e[6]=u):u=e[6];let p;return e[7]!==d||e[8]!==x||e[9]!==u?(p=s.jsxs("span",{className:x,children:[u,d]}),e[7]=d,e[8]=x,e[9]=u,e[10]=p):p=e[10],p}function ut(t){const e=A.c(22),{metric:l}=t,n=l.status?at[l.status]:"text-foreground",c=l.status?ct[l.status]:"bg-muted/50 border-border";let o;e[0]!==c?(o=X("flex flex-col gap-1 rounded-lg border p-4",c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==l.label?(a=s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:l.label}),e[2]=l.label,e[3]=a):a=e[3];let i;e[4]!==n?(i=X("text-2xl font-semibold tabular-nums",n),e[4]=n,e[5]=i):i=e[5];let f;e[6]!==l.value||e[7]!==i?(f=s.jsx("span",{className:i,children:l.value}),e[6]=l.value,e[7]=i,e[8]=f):f=e[8];let d;e[9]!==l.unit?(d=l.unit&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l.unit}),e[9]=l.unit,e[10]=d):d=e[10];let m;e[11]!==f||e[12]!==d?(m=s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[f,d]}),e[11]=f,e[12]=d,e[13]=m):m=e[13];let x;e[14]!==l.previousValue||e[15]!==l.value?(x=l.previousValue!==void 0&&s.jsx(mt,{current:l.value,previous:l.previousValue}),e[14]=l.previousValue,e[15]=l.value,e[16]=x):x=e[16];let u;return e[17]!==o||e[18]!==a||e[19]!==m||e[20]!==x?(u=s.jsxs("div",{className:o,children:[a,m,x]}),e[17]=o,e[18]=a,e[19]=m,e[20]=x,e[21]=u):u=e[21],u}function ft(t){const e=A.c(9),{title:l,items:n}=t;let c;e[0]!==l?(c=l&&s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[0]=l,e[1]=c):c=e[1];let o;e[2]!==n?(o=n.map(xt),e[2]=n,e[3]=o):o=e[3];let a;e[4]!==o?(a=s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:o}),e[4]=o,e[5]=a):a=e[5];let i;return e[6]!==c||e[7]!==a?(i=s.jsxs("div",{className:"space-y-3",children:[c,a]}),e[6]=c,e[7]=a,e[8]=i):i=e[8],i}function xt(t,e){return s.jsx(ut,{metric:t},`${t.label}-${e}`)}function pt(t){const e=A.c(16),{title:l,columns:n,rows:c}=t;let o;e[0]!==l?(o=l&&s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[0]=l,e[1]=o):o=e[1];let a;e[2]!==n?(a=n.map(jt),e[2]=n,e[3]=a):a=e[3];let i;e[4]!==a?(i=s.jsx(Ke,{children:s.jsx(Se,{children:a})}),e[4]=a,e[5]=i):i=e[5];let f;e[6]!==c?(f=c.map(gt),e[6]=c,e[7]=f):f=e[7];let d;e[8]!==f?(d=s.jsx(He,{children:f}),e[8]=f,e[9]=d):d=e[9];let m;e[10]!==i||e[11]!==d?(m=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(Qe,{children:[i,d]})}),e[10]=i,e[11]=d,e[12]=m):m=e[12];let x;return e[13]!==o||e[14]!==m?(x=s.jsxs("div",{className:"space-y-3",children:[o,m]}),e[13]=o,e[14]=m,e[15]=x):x=e[15],x}function gt(t,e){return s.jsx(Se,{children:t.map(ht)},e)}function ht(t,e){return s.jsx(Ge,{children:t??s.jsx("span",{className:"text-muted-foreground",children:"-"})},e)}function jt(t){return s.jsx(Ve,{children:t},t)}function bt(t){const e=A.c(9),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(dt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(ft,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(pt,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}default:return null}}function yt(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Nt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
|
|
2
2
|
`)),e.push("");for(const n of t.sections)switch(n.type){case"markdown":e.push(n.content),e.push("");break;case"metrics":{n.title&&(e.push(`## ${n.title}`),e.push(""));const c=["Metric","Value","Previous","Status"],o=n.items.some(a=>a.unit);e.push(`| ${c.join(" | ")} |`),e.push(`| ${c.map(()=>"---").join(" | ")} |`);for(const a of n.items){const i=o&&a.unit?`${a.value} ${a.unit}`:`${a.value}`,f=a.previousValue!=null?o&&a.unit?`${a.previousValue} ${a.unit}`:`${a.previousValue}`:"—",d=a.status??"—";e.push(`| ${a.label} | ${i} | ${f} | ${d} |`)}e.push("");break}case"table":{n.title&&(e.push(`## ${n.title}`),e.push("")),e.push(`| ${n.columns.join(" | ")} |`),e.push(`| ${n.columns.map(()=>"---").join(" | ")} |`);for(const c of n.rows)e.push(`| ${c.map(o=>o==null?"—":`${o}`).join(" | ")} |`);e.push("");break}}return e.join(`
|
|
3
3
|
`).trim()}function vt(t){const e=A.c(88),{reportId:l,onBack:n}=t,{connectionId:c,toolCaller:o}=de(),a=ye(),{data:i,isLoading:f,error:d}=rt(l),m=i?.lifecycleStatus==="dismissed";let x;e[0]!==m||e[1]!==l||e[2]!==o?(x=async()=>o("REPORTS_UPDATE_STATUS",{reportId:l,lifecycleStatus:m?"read":"dismissed"}),e[0]=m,e[1]=l,e[2]=o,e[3]=x):x=e[3];let u;e[4]!==c||e[5]!==m||e[6]!==n||e[7]!==a?(u=()=>{ce.success(m?"Report restored to inbox":"Report marked as done"),a.invalidateQueries({queryKey:ne.reportsList(c)}),n()},e[4]=c,e[5]=m,e[6]=n,e[7]=a,e[8]=u):u=e[8];let p;e[9]!==x||e[10]!==u?(p={mutationFn:x,onSuccess:u,onError:Ct},e[9]=x,e[10]=u,e[11]=p):p=e[11];const g=_e(p);if(f){let D;return e[12]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ie,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading report..."})]}),e[12]=D):D=e[12],D}if(d||!i){let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(fe,{size:48,className:"text-destructive mb-4"}),e[13]=D):D=e[13];const J=d?"Error loading report":"Report not found";let U;e[14]!==J?(U=s.jsx("h3",{className:"text-lg font-medium mb-2",children:J}),e[14]=J,e[15]=U):U=e[15];const se=d?.message??"The requested report could not be found.";let Y;e[16]!==se?(Y=s.jsx("p",{className:"text-muted-foreground text-center mb-4",children:se}),e[16]=se,e[17]=Y):Y=e[17];let K;e[18]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(xe,{size:14,className:"mr-1"}),e[18]=K):K=e[18];let H;e[19]!==n?(H=s.jsxs(me,{variant:"outline",onClick:n,children:[K,"Back to reports"]}),e[19]=n,e[20]=H):H=e[20];let F;return e[21]!==H||e[22]!==U||e[23]!==Y?(F=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[D,U,Y,H]}),e[21]=H,e[22]=U,e[23]=Y,e[24]=F):F=e[24],F}let b;e[25]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(xe,{size:14}),e[25]=b):b=e[25];let S;e[26]!==n?(S=s.jsxs("button",{type:"button",onClick:n,className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[b,"Reports"]}),e[26]=n,e[27]=S):S=e[27];let v;e[28]!==i?(v=()=>{const D=Nt(i);navigator.clipboard.writeText(D).then(St)},e[28]=i,e[29]=v):v=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Fe,{size:14}),e[30]=y):y=e[30];let _;e[31]!==v?(_=s.jsxs(me,{variant:"outline",size:"sm",className:"gap-1.5",onClick:v,children:[y,"Copy as Markdown"]}),e[31]=v,e[32]=_):_=e[32];let r;e[33]!==g?(r=()=>g.mutate(),e[33]=g,e[34]=r):r=e[34];let N;e[35]!==m||e[36]!==g.isPending?(N=g.isPending?s.jsx(ie,{size:14,className:"animate-spin"}):m?s.jsx(ve,{size:14}):s.jsx(oe,{size:14}),e[35]=m,e[36]=g.isPending,e[37]=N):N=e[37];const j=m?"Move to inbox":"Mark as done";let C;e[38]!==g.isPending||e[39]!==N||e[40]!==j||e[41]!==r?(C=s.jsxs(me,{variant:"outline",size:"sm",className:"gap-1.5",onClick:r,disabled:g.isPending,children:[N,j]}),e[38]=g.isPending,e[39]=N,e[40]=j,e[41]=r,e[42]=C):C=e[42];let $;e[43]!==C||e[44]!==_?($=s.jsxs("div",{className:"flex items-center gap-2",children:[_,C]}),e[43]=C,e[44]=_,e[45]=$):$=e[45];let z;e[46]!==$||e[47]!==S?(z=s.jsxs("div",{className:"flex items-center justify-between",children:[S,$]}),e[46]=$,e[47]=S,e[48]=z):z=e[48];let w;e[49]!==i.title?(w=s.jsx("h1",{className:"text-xl font-semibold leading-tight",children:i.title}),e[49]=i.title,e[50]=w):w=e[50];let k;e[51]!==i.summary?(k=s.jsx("p",{className:"text-sm text-muted-foreground",children:i.summary}),e[51]=i.summary,e[52]=k):k=e[52];let P;e[53]!==w||e[54]!==k?(P=s.jsxs("div",{className:"space-y-1 min-w-0",children:[w,k]}),e[53]=w,e[54]=k,e[55]=P):P=e[55];let M;e[56]!==i.status?(M=s.jsx($e,{status:i.status}),e[56]=i.status,e[57]=M):M=e[57];let R;e[58]!==P||e[59]!==M?(R=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[P,M]}),e[58]=P,e[59]=M,e[60]=R):R=e[60];let T;e[61]!==i.category?(T=s.jsx("span",{className:"capitalize",children:i.category}),e[61]=i.category,e[62]=T):T=e[62];let I;e[63]!==i.source?(I=i.source&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-border",children:"|"}),s.jsx("span",{children:i.source})]}),e[63]=i.source,e[64]=I):I=e[64];let E;e[65]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{className:"text-border",children:"|"}),e[65]=E):E=e[65];let B;e[66]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Ne,{size:12}),e[66]=B):B=e[66];let L;e[67]!==i.updatedAt?(L=yt(i.updatedAt),e[67]=i.updatedAt,e[68]=L):L=e[68];let h;e[69]!==L?(h=s.jsxs("span",{className:"inline-flex items-center gap-1",children:[B,L]}),e[69]=L,e[70]=h):h=e[70];let O;e[71]!==T||e[72]!==I||e[73]!==h?(O=s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[T,I,E,h]}),e[71]=T,e[72]=I,e[73]=h,e[74]=O):O=e[74];let Q;e[75]!==z||e[76]!==R||e[77]!==O?(Q=s.jsxs("div",{className:"border-b border-border px-6 py-4 space-y-3",children:[z,R,O]}),e[75]=z,e[76]=R,e[77]=O,e[78]=Q):Q=e[78];let q;e[79]!==i.sections?(q=i.sections??[],e[79]=i.sections,e[80]=q):q=e[80];let V;e[81]!==q?(V=q.map(_t),e[81]=q,e[82]=V):V=e[82];let W;e[83]!==V?(W=s.jsx("div",{className:"flex-1 px-6 py-6 space-y-8",children:V}),e[83]=V,e[84]=W):W=e[84];let G;return e[85]!==Q||e[86]!==W?(G=s.jsxs("div",{className:"flex flex-col h-full overflow-y-auto",children:[Q,W]}),e[85]=Q,e[86]=W,e[87]=G):G=e[87],G}function _t(t,e){return s.jsx(bt,{section:t},e)}function St(){ce.success("Copied report as Markdown")}function Ct(t){ce.error(`Failed to update report: ${t.message}`)}function $t(t){const e=Date.now()-new Date(t).getTime(),l=Math.floor(e/6e4);if(l<1)return"just now";if(l<60)return`${l}m ago`;const n=Math.floor(l/60);if(n<24)return`${n}h ago`;const c=Math.floor(n/24);return c<30?`${c}d ago`:new Date(t).toLocaleDateString()}function wt(t){const e=A.c(57),{report:l,isDoneTab:n,onSelect:c,onDismiss:o}=t,a=!l.lifecycleStatus||l.lifecycleStatus==="unread",i=n?"opacity-60":"hover:shadow-md";let f;e[0]!==i?(f=X("group relative cursor-pointer transition-shadow",i),e[0]=i,e[1]=f):f=e[1];let d;e[2]!==c||e[3]!==l.id?(d=()=>c(l.id),e[2]=c,e[3]=l.id,e[4]=d):d=e[4];let m;e[5]!==a?(m=a&&s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 rounded-l-xl bg-primary"}),e[5]=a,e[6]=m):m=e[6];const x=a&&"font-bold";let u;e[7]!==x?(u=X("text-sm leading-snug line-clamp-2",x),e[7]=x,e[8]=u):u=e[8];let p;e[9]!==l.title||e[10]!==u?(p=s.jsx(Ze,{className:u,children:l.title}),e[9]=l.title,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==l.status?(g=s.jsx($e,{status:l.status,size:"sm"}),e[12]=l.status,e[13]=g):g=e[13];const b=n?"Restore to inbox":"Mark as done",S=n?"text-muted-foreground hover:text-foreground hover:bg-accent":"text-muted-foreground/0 group-hover:text-muted-foreground hover:!text-emerald-600 hover:bg-emerald-500/10";let v;e[14]!==S?(v=X("rounded-md p-1 transition-colors",S),e[14]=S,e[15]=v):v=e[15];let y;e[16]!==n||e[17]!==o||e[18]!==l.id?(y=E=>{E.stopPropagation(),o(l.id,!n)},e[16]=n,e[17]=o,e[18]=l.id,e[19]=y):y=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(oe,{size:14}),e[20]=_):_=e[20];let r;e[21]!==v||e[22]!==y||e[23]!==b?(r=s.jsx("button",{type:"button",title:b,className:v,onClick:y,children:_}),e[21]=v,e[22]=y,e[23]=b,e[24]=r):r=e[24];let N;e[25]!==r||e[26]!==g?(N=s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[g,r]}),e[25]=r,e[26]=g,e[27]=N):N=e[27];let j;e[28]!==N||e[29]!==p?(j=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[p,N]}),e[28]=N,e[29]=p,e[30]=j):j=e[30];let C;e[31]!==l.summary?(C=s.jsx(et,{className:"mt-1 line-clamp-2 text-xs",children:l.summary}),e[31]=l.summary,e[32]=C):C=e[32];let $;e[33]!==j||e[34]!==C?($=s.jsxs(tt,{className:"pb-2 pt-5 px-5",children:[j,C]}),e[33]=j,e[34]=C,e[35]=$):$=e[35];let z;e[36]!==l.category?(z=s.jsx("span",{className:"inline-flex items-center gap-1 capitalize",children:l.category}),e[36]=l.category,e[37]=z):z=e[37];let w;e[38]!==l.source?(w=l.source&&s.jsx("span",{className:"inline-flex items-center gap-1 text-muted-foreground/70",children:l.source}),e[38]=l.source,e[39]=w):w=e[39];let k;e[40]!==z||e[41]!==w?(k=s.jsxs("div",{className:"flex items-center gap-3",children:[z,w]}),e[40]=z,e[41]=w,e[42]=k):k=e[42];let P;e[43]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Ne,{size:12}),e[43]=P):P=e[43];let M;e[44]!==l.updatedAt?(M=$t(l.updatedAt),e[44]=l.updatedAt,e[45]=M):M=e[45];let R;e[46]!==M?(R=s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[P,M]})}),e[46]=M,e[47]=R):R=e[47];let T;e[48]!==k||e[49]!==R?(T=s.jsx(st,{className:"px-5 pb-5",children:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[k,R]})}),e[48]=k,e[49]=R,e[50]=T):T=e[50];let I;return e[51]!==$||e[52]!==f||e[53]!==T||e[54]!==d||e[55]!==m?(I=s.jsxs(lt,{className:f,onClick:d,children:[m,$,T]}),e[51]=$,e[52]=f,e[53]=T,e[54]=d,e[55]=m,e[56]=I):I=e[56],I}function Tt(t){const e=A.c(24),{category:l,status:n,categories:c,onCategoryChange:o,onStatusChange:a}=t,i=l??"__all__";let f;e[0]!==o?(f=j=>o(j==="__all__"?void 0:j),e[0]=o,e[1]=f):f=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ge,{size:"sm",children:s.jsx(he,{placeholder:"All categories"})}),e[2]=d):d=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(re,{value:"__all__",children:"All categories"}),e[3]=m):m=e[3];let x;e[4]!==c?(x=c.map(kt),e[4]=c,e[5]=x):x=e[5];let u;e[6]!==x?(u=s.jsxs(pe,{children:[m,x]}),e[6]=x,e[7]=u):u=e[7];let p;e[8]!==i||e[9]!==f||e[10]!==u?(p=s.jsxs(je,{value:i,onValueChange:f,children:[d,u]}),e[8]=i,e[9]=f,e[10]=u,e[11]=p):p=e[11];const g=n??"__all__";let b;e[12]!==a?(b=j=>a(j==="__all__"?void 0:j),e[12]=a,e[13]=b):b=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ge,{size:"sm",children:s.jsx(he,{placeholder:"All statuses"})}),e[14]=S):S=e[14];let v,y;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(re,{value:"__all__",children:"All statuses"}),y=Object.keys(ae),e[15]=v,e[16]=y):(v=e[15],y=e[16]);let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(pe,{children:[v,y.map(zt)]}),e[17]=_):_=e[17];let r;e[18]!==g||e[19]!==b?(r=s.jsxs(je,{value:g,onValueChange:b,children:[S,_]}),e[18]=g,e[19]=b,e[20]=r):r=e[20];let N;return e[21]!==r||e[22]!==p?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[p,r]}),e[21]=r,e[22]=p,e[23]=N):N=e[23],N}function zt(t){return s.jsx(re,{value:t,children:ae[t].label},t)}function kt(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function Rt(t){const e=A.c(51),{onSelectReport:l}=t,[n,c]=ee.useState("inbox"),[o,a]=ee.useState(),[i,f]=ee.useState(),{connectionId:d,toolCaller:m}=de(),x=ye();let u;e[0]!==o||e[1]!==i?(u={category:o,status:i},e[0]=o,e[1]=i,e[2]=u):u=e[2];const{data:p,isLoading:g,error:b}=be(u),S=p?.reports??[],v=S.filter(Lt),y=S.filter(Et),_=n==="inbox"?v:y,r=v.filter(Mt).length,{data:N}=be();let j;e[3]!==N?.reports?(j=[...new Set((N?.reports??[]).map(Pt))].sort(),e[3]=N?.reports,e[4]=j):j=e[4];const C=j;let $;e[5]!==m?($=async F=>{const{reportId:Z,lifecycleStatus:te}=F;return m("REPORTS_UPDATE_STATUS",{reportId:Z,lifecycleStatus:te})},e[5]=m,e[6]=$):$=e[6];let z;e[7]!==d||e[8]!==x?(z=()=>{x.invalidateQueries({queryKey:ne.reportsList(d)})},e[7]=d,e[8]=x,e[9]=z):z=e[9];let w;e[10]!==$||e[11]!==z?(w={mutationFn:$,onSuccess:z,onError:It},e[10]=$,e[11]=z,e[12]=w):w=e[12];const k=_e(w);let P;e[13]!==k?(P=(F,Z)=>{k.mutate({reportId:F,lifecycleStatus:Z?"dismissed":"read"})},e[13]=k,e[14]=P):P=e[14];const M=P;if(b){let F,Z;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(fe,{size:48,className:"text-destructive mb-4"}),Z=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading reports"}),e[15]=F,e[16]=Z):(F=e[15],Z=e[16]);let te;return e[17]!==b.message?(te=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[F,Z,s.jsx("p",{className:"text-muted-foreground text-center",children:b.message})]}),e[17]=b.message,e[18]=te):te=e[18],te}const R="flex flex-col h-full";let T;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=()=>c("inbox"),e[19]=T):T=e[19];const I=n==="inbox"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let E;e[20]!==I?(E=X("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",I),e[20]=I,e[21]=E):E=e[21];let B;e[22]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ve,{size:14}),e[22]=B):B=e[22];let L;e[23]!==g||e[24]!==r?(L=!g&&r>0&&s.jsx(Xe,{variant:"default",className:"text-[10px] px-1.5 py-0 h-4",children:r}),e[23]=g,e[24]=r,e[25]=L):L=e[25];let h;e[26]!==E||e[27]!==L?(h=s.jsxs("button",{type:"button",onClick:T,className:E,children:[B,"Inbox",L]}),e[26]=E,e[27]=L,e[28]=h):h=e[28];let O;e[29]===Symbol.for("react.memo_cache_sentinel")?(O=()=>c("done"),e[29]=O):O=e[29];const Q=n==="done"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let q;e[30]!==Q?(q=X("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",Q),e[30]=Q,e[31]=q):q=e[31];let V;e[32]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(oe,{size:14}),e[32]=V):V=e[32];const W=!g&&y.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:y.length});let G;e[33]!==q||e[34]!==W?(G=s.jsxs("button",{type:"button",onClick:O,className:q,children:[V,"Done",W]}),e[33]=q,e[34]=W,e[35]=G):G=e[35];let D;e[36]!==h||e[37]!==G?(D=s.jsxs("div",{className:"flex items-center gap-1",children:[h,G]}),e[36]=h,e[37]=G,e[38]=D):D=e[38];let J;e[39]!==C||e[40]!==o||e[41]!==i?(J=s.jsx(Tt,{category:o,status:i,categories:C,onCategoryChange:a,onStatusChange:f}),e[39]=C,e[40]=o,e[41]=i,e[42]=J):J=e[42];let U;e[43]!==D||e[44]!==J?(U=s.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-border",children:[D,J]}),e[43]=D,e[44]=J,e[45]=U):U=e[45];const se="flex-1 overflow-y-auto p-6",Y=g?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ie,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading reports..."})]}):_.length===0?s.jsx("div",{className:"flex flex-col items-center justify-center h-full text-center",children:n==="done"?s.jsxs(s.Fragment,{children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No dismissed reports"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:"Reports you mark as done will appear here."})]}):s.jsxs(s.Fragment,{children:[s.jsx(le,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:o||i?"No reports match filters":"Inbox is empty"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:o||i?"Try adjusting your filters.":"Reports will appear here once the connected MCP server provides them."})]})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:_.map(F=>s.jsx(wt,{report:F,isDoneTab:n==="done",onSelect:l,onDismiss:M},F.id))});let K;e[46]!==Y?(K=s.jsx("div",{className:se,children:Y}),e[46]=Y,e[47]=K):K=e[47];let H;return e[48]!==U||e[49]!==K?(H=s.jsxs("div",{className:R,children:[U,K]}),e[48]=U,e[49]=K,e[50]=H):H=e[50],H}function It(t){ce.error(`Failed to update report: ${t.message}`)}function Pt(t){return t.category}function Mt(t){return!t.lifecycleStatus||t.lifecycleStatus==="unread"}function Et(t){return t.lifecycleStatus==="dismissed"}function Lt(t){return t.lifecycleStatus!=="dismissed"}function Dt(t){return t?t.filter(e=>Re(e,ke)):[]}function xs(){const t=A.c(58),{org:e,project:l}=we();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const c=Te(n),o=ze(),a=Ie(),i=c.reportId??null;let f;t[1]!==o?(f=h=>{o({search:h?{reportId:h}:{},replace:!0})},t[1]=o,t[2]=f):f=t[2];const d=f;let m;t[3]!==e.id?(m={connectionId:Pe,orgId:e.id},t[3]=e.id,t[4]=m):m=t[4];const x=Me(m);let u;t[5]!==l.id?(u=ne.pluginConfig(l.id??"","reports"),t[5]=l.id,t[6]=u):u=t[6];let p;t[7]!==l.id||t[8]!==x?(p=async()=>{const h=await x.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:"reports"}});return h.structuredContent??h},t[7]=l.id,t[8]=x,t[9]=p):p=t[9];const g=!!l.id;let b;t[10]!==u||t[11]!==p||t[12]!==g?(b={queryKey:u,queryFn:p,enabled:g},t[10]=u,t[11]=p,t[12]=g,t[13]=b):b=t[13];const{data:S,isLoading:v}=ue(b);let y,_;if(t[14]!==a||t[15]!==S?.config?.connectionId){_=Dt(a);const h=S?.config?.connectionId;y=h?_.find(O=>O.id===h):null,t[14]=a,t[15]=S?.config?.connectionId,t[16]=y,t[17]=_}else y=t[16],_=t[17];const r=y,N=r?.id;let j;t[18]!==e.id||t[19]!==N?(j={connectionId:N,orgId:e.id},t[18]=e.id,t[19]=N,t[20]=j):j=t[20];const C=Ee(j);let $;t[21]!==e.id||t[22]!==e.name||t[23]!==e.slug?($={id:e.id,slug:e.slug,name:e.name},t[21]=e.id,t[22]=e.name,t[23]=e.slug,t[24]=$):$=t[24];const z=$;if(v){let h;return t[25]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ie,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),t[25]=h):h=t[25],h}if(_.length===0){let h;return t[26]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(nt,{}),t[26]=h):h=t[26],h}if(!r){let h;return t[27]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(De,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]})}),t[27]=h):h=t[27],h}let w;t[28]!==r.app_id||t[29]!==r.app_name||t[30]!==r.description||t[31]!==r.icon||t[32]!==r.id||t[33]!==r.metadata||t[34]!==r.title||t[35]!==r.tools?(w={id:r.id,title:r.title,icon:r.icon,description:r.description,app_name:r.app_name,app_id:r.app_id,tools:r.tools,metadata:r.metadata},t[28]=r.app_id,t[29]=r.app_name,t[30]=r.description,t[31]=r.icon,t[32]=r.id,t[33]=r.metadata,t[34]=r.title,t[35]=r.tools,t[36]=w):w=t[36];let k;t[37]!==C?(k=(h,O)=>C?C.callTool({name:h,arguments:O}).then(Bt):Promise.reject(new Error("MCP client is not available")),t[37]=C,t[38]=k):k=t[38];const P=k;let M;t[39]!==r.id||t[40]!==z||t[41]!==w||t[42]!==P?(M={connectionId:r.id,connection:w,toolCaller:P,org:z,session:null},t[39]=r.id,t[40]=z,t[41]=w,t[42]=P,t[43]=M):M=t[43];const R=M;let T;t[44]!==R.connection?(T=[R.connection],t[44]=R.connection,t[45]=T):T=t[45];let I;t[46]!==r.id||t[47]!==T?(I=s.jsx("div",{className:"flex items-center px-6 py-3 border-b border-border",children:s.jsx(ot,{connections:T,selectedConnectionId:r.id,onConnectionChange:At})}),t[46]=r.id,t[47]=T,t[48]=I):I=t[48];let E;t[49]!==i||t[50]!==d?(E=s.jsx("div",{className:"flex-1 overflow-hidden",children:i?s.jsx(vt,{reportId:i,onBack:()=>d(null)}):s.jsx(Rt,{onSelectReport:d})}),t[49]=i,t[50]=d,t[51]=E):E=t[51];let B;t[52]!==I||t[53]!==E?(B=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[I,E]}),t[52]=I,t[53]=E,t[54]=B):B=t[54];let L;return t[55]!==R||t[56]!==B?(L=s.jsx(Le,{value:R,children:B}),t[55]=R,t[56]=B,t[57]=L):L=t[57],L}function At(){}function Bt(t){return t.structuredContent??t}export{xs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as q,a as Y,b as A,r as B,j as s,d as G}from"./index-
|
|
1
|
+
import{c as q,a as Y,b as A,r as B,j as s,d as G}from"./index-A91v4mp1.js";import{u as K}from"./useMutation-BL36wQaU.js";import{B as z}from"./button-BwVHfdAu.js";import{I as L}from"./input-CxOgBoT3.js";function Q(){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 p;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?(p=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]=p):p=e[34];let g;e[35]!==a||e[36]!==t?(g=!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]=g):g=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==p||e[43]!==g?(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,p,g]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=p,e[43]=g,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{Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,b5 as Pn,c as He,j as he}from"./index-Br0JHFBh.js";import{c as Je}from"./button-CbQ7DCWa.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:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=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}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.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(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.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 De=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),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=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 Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(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"),Nn(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,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(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 Me(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=$n?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 Ne(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 $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,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 N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),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(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,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(),N=f.useRef({}),D=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,N.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(D.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:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.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:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.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:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,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,N.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]),M=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 $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.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:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,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?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.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:$}=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:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&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 N.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:M,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,M,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 N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=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 Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("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"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,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]:D,[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 Qn(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 et(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 nt(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{nt as R,et as a,Qn as b};
|
|
1
|
+
import{r as f,b5 as Pn,c as He,j as he}from"./index-A91v4mp1.js";import{c as Je}from"./button-BwVHfdAu.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:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=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}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.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(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.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 De=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),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=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 Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(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"),Nn(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,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(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 Me(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=$n?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 Ne(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 $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,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 N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),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(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,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(),N=f.useRef({}),D=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,N.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(D.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:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.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:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.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:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,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,N.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]),M=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 $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.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:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,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?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.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:$}=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:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&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 N.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:M,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,M,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 N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=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 Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("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"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,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]:D,[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 Qn(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 et(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 nt(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{nt as R,et as a,Qn as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,j as s}from"./index-
|
|
1
|
+
import{c as p,j as s}from"./index-A91v4mp1.js";import{B as v}from"./button-BwVHfdAu.js";import{i as j,a as S}from"./Save01-BuKRZy5X.js";import{i as z}from"./Loading01-CMdu9ggl.js";function y(x){const e=p.c(15),{onSave:c,onUndo:d,isDirty:b,isSaving:i,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=s.jsx(j,{size:14}),e[0]=r):r=e[0];let t;e[1]!==i||e[2]!==d||e[3]!==o?(t=s.jsxs(v,{variant:"outline",size:"sm",onClick:d,disabled:i,"aria-label":o,children:[r,o]}),e[1]=i,e[2]=d,e[3]=o,e[4]=t):t=e[4];let a;e[5]!==i?(a=i?s.jsx(z,{size:14,className:"animate-spin"}):s.jsx(S,{size:14}),e[5]=i,e[6]=a):a=e[6];let l;e[7]!==i||e[8]!==c||e[9]!==n||e[10]!==a?(l=s.jsxs(v,{variant:"default",size:"sm",onClick:c,disabled:i,"aria-label":n,children:[a,n]}),e[7]=i,e[8]=c,e[9]=n,e[10]=a,e[11]=l):l=e[11];let m;return e[12]!==t||e[13]!==l?(m=s.jsxs(s.Fragment,{children:[t,l]}),e[12]=t,e[13]=l,e[14]=m):m=e[14],m}export{y as S};
|