@decocms/mesh 2.127.1 → 2.128.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-gTiRcsL2.js → AlertCircle-Bi6qVvrN.js} +1 -1
- package/dist/client/assets/{AlertOctagon-CCh30giC.js → AlertOctagon-Fcp3y8nF.js} +1 -1
- package/dist/client/assets/{AlertTriangle-BtlWEVub.js → AlertTriangle-DFZ90wgN.js} +1 -1
- package/dist/client/assets/{ArrowDown-CzYdDuHD.js → ArrowDown-DADN3olT.js} +1 -1
- package/dist/client/assets/{ArrowLeft-wb84lLAu.js → ArrowLeft-AtFbPu15.js} +1 -1
- package/dist/client/assets/{ArrowUp-CdWHzWi2.js → ArrowUp-Cfyg5juo.js} +1 -1
- package/dist/client/assets/{Check-DeEBcLrH.js → Check-Cm2iUQXG.js} +1 -1
- package/dist/client/assets/{CheckCircle-DJDu6IBy.js → CheckCircle-DbniBHxr.js} +1 -1
- package/dist/client/assets/{CheckDone01-BpcL38Sf.js → CheckDone01-875P-Irn.js} +1 -1
- package/dist/client/assets/{CheckVerified02-ChzJ2czs.js → CheckVerified02-D6HcNS_s.js} +1 -1
- package/dist/client/assets/{ChevronDown-CpMv-ZCm.js → ChevronDown-BufhPURG.js} +1 -1
- package/dist/client/assets/{ChevronRight-CnxoKS9T.js → ChevronRight-Ddi-3F9S.js} +1 -1
- package/dist/client/assets/{Clock-2a7XM267.js → Clock-Bvm7X8ou.js} +1 -1
- package/dist/client/assets/{Code01-B6d_3DvF.js → Code01-B6JRytqX.js} +1 -1
- package/dist/client/assets/{Container-KLxmLuBM.js → Container-B3EmXRhZ.js} +1 -1
- package/dist/client/assets/{Copy01-CLunLJKI.js → Copy01-B3XYrA0z.js} +1 -1
- package/dist/client/assets/{Dataflow03-0MI9TZIt.js → Dataflow03-Ca2mwTsX.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-SZFJ10nV.js → DotsHorizontal-C7JLP9tS.js} +1 -1
- package/dist/client/assets/{DotsVertical-D6pC-fy1.js → DotsVertical-CSadjG67.js} +1 -1
- package/dist/client/assets/{Download01-GBGLtbUj.js → Download01--BNFvyry.js} +1 -1
- package/dist/client/assets/{Edit01-DY0U7OhY.js → Edit01-DKSRjmBx.js} +1 -1
- package/dist/client/assets/{Eye-B15TPEDO.js → Eye-DOWXmHLb.js} +1 -1
- package/dist/client/assets/{File02-BVAawntr.js → File02-CbipvW6f.js} +1 -1
- package/dist/client/assets/{File06-UyeJp3Yn.js → File06-Bcrb96z7.js} +1 -1
- package/dist/client/assets/{FilterLines-k9tJPeT3.js → FilterLines-BY0QAs50.js} +1 -1
- package/dist/client/assets/{Globe01-DDofBfsO.js → Globe01-DL4AD3PJ.js} +1 -1
- package/dist/client/assets/{Globe02-3loTulSB.js → Globe02-YF4Iol6V.js} +1 -1
- package/dist/client/assets/{Grid01-Dq0Wc8TI.js → Grid01-DWFyhMlk.js} +1 -1
- package/dist/client/assets/{Hash02-Dx1qpCPI.js → Hash02-lVbQabr3.js} +1 -1
- package/dist/client/assets/{Home02-DzbZfXTm.js → Home02-CBgwN5B0.js} +1 -1
- package/dist/client/assets/{Image01-Cqm-HpUD.js → Image01-BWp0soXg.js} +1 -1
- package/dist/client/assets/{Inbox01-Cy78a0Mb.js → Inbox01-DjPYutLV.js} +1 -1
- package/dist/client/assets/{InfoCircle-QHkAEzxn.js → InfoCircle-Ba_35fj3.js} +1 -1
- package/dist/client/assets/{Key01-Bds3RsgX.js → Key01-DkL0Aa6F.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BK1BxQbv.js → LinkExternal01-B0dtroaL.js} +1 -1
- package/dist/client/assets/{List-HJgoVtkr.js → List-DvkRrNFX.js} +1 -1
- package/dist/client/assets/{Loading01-77NTYviO.js → Loading01-Du7SSOFL.js} +1 -1
- package/dist/client/assets/{Lock01-CE-Og3pM.js → Lock01-B_Ca_7Fy.js} +1 -1
- package/dist/client/assets/{Play-DfC4hRc3.js → Play-DsN2Vu-9.js} +1 -1
- package/dist/client/assets/{Plus-DG0waRPt.js → Plus-GyEYmH7H.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DgNkgC_r.js → RefreshCcw01-CSeua2ip.js} +1 -1
- package/dist/client/assets/{RefreshCw01-fyFGfvzx.js → RefreshCw01-BSAySLXB.js} +1 -1
- package/dist/client/assets/{Rows03-CaAivaF3.js → Rows03-kYzPV04j.js} +1 -1
- package/dist/client/assets/{Save01-BMHaog3F.js → Save01-CoeneoQw.js} +1 -1
- package/dist/client/assets/{SearchMd-D25_gEXb.js → SearchMd-CST_zdt_.js} +1 -1
- package/dist/client/assets/{Settings01-CLue_Mcp.js → Settings01-DAlQl5Hv.js} +1 -1
- package/dist/client/assets/{Shield01-BanwMIAb.js → Shield01-D18Lmcuo.js} +1 -1
- package/dist/client/assets/{Terminal-xe5z4JeI.js → Terminal-BoJXcgsb.js} +1 -1
- package/dist/client/assets/{Tool01-CXc6Z6rX.js → Tool01-BqSsATCJ.js} +1 -1
- package/dist/client/assets/{Trash01-CZXAnYkd.js → Trash01-DTBe8XH-.js} +1 -1
- package/dist/client/assets/{Upload01-vyULtK9J.js → Upload01-TqbNCyR0.js} +1 -1
- package/dist/client/assets/{Users03-C8GZAEof.js → Users03-C58KX3if.js} +1 -1
- package/dist/client/assets/{X-C5YHEo86.js → X-CiUv7JeK.js} +1 -1
- package/dist/client/assets/{XCircle-CDdOtTVY.js → XCircle-c-fGPkxr.js} +1 -1
- package/dist/client/assets/{XClose-gSM6r0nZ.js → XClose-BOJUsKo6.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-053rFYJI.js → agent-connections-preview-0VaJpHmY.js} +1 -1
- package/dist/client/assets/{agent-detail-BRL8VrWb.js → agent-detail-DfofQqg_.js} +1 -1
- package/dist/client/assets/{agents-XOoh8M4L.js → agents-LlXNozr1.js} +1 -1
- package/dist/client/assets/{alert-dialog-O2Rm7jj8.js → alert-dialog-W67uPDui.js} +1 -1
- package/dist/client/assets/{auth-catchall-B6Oq1x96.js → auth-catchall-B8ChPBfo.js} +1 -1
- package/dist/client/assets/{avatar-De7anvsN.js → avatar-C22lLmXV.js} +1 -1
- package/dist/client/assets/{badge-DX_NRCrB.js → badge-wZkXx6tq.js} +1 -1
- package/dist/client/assets/{binder-BWaLB8kX.js → binder-CO5VHJsz.js} +1 -1
- package/dist/client/assets/{breadcrumb-D8hXSONO.js → breadcrumb-BlLFCMoF.js} +1 -1
- package/dist/client/assets/{button-tfLPNtWJ.js → button-BShrPPQB.js} +1 -1
- package/dist/client/assets/{card-DOAEt50g.js → card-BO4jLXoP.js} +1 -1
- package/dist/client/assets/{chart-RH6Sn5GP.js → chart-DoLzE0dq.js} +1 -1
- package/dist/client/assets/{checkbox-BD8R4oHK.js → checkbox-CJOukTQl.js} +1 -1
- package/dist/client/assets/{circle-alert-_oaneE91.js → circle-alert-xgiobPeL.js} +1 -1
- package/dist/client/assets/{collection-detail-D3RC4AUZ.js → collection-detail-BrigopIz.js} +1 -1
- package/dist/client/assets/{collection-search-DP3VOxDY.js → collection-search-epuaoKsC.js} +1 -1
- package/dist/client/assets/{collection-tab-CCzVdmvm.js → collection-tab-BDHVvxwA.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C55HnOv6.js → collection-table-wrapper-BHfH8h7S.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cv57OrJk.js → collection-tabs-D_RAhYU-.js} +1 -1
- package/dist/client/assets/{command-ZBXly572.js → command-SkTjLnr0.js} +1 -1
- package/dist/client/assets/{connect-qtHdHJ1I.js → connect-CLzKNZX3.js} +1 -1
- package/dist/client/assets/{connection-card-B8Vrz1b8.js → connection-card-Cs2JqhzD.js} +1 -1
- package/dist/client/assets/{connection-detail-Y3K5lv0z.js → connection-detail-DXegMwIj.js} +1 -1
- package/dist/client/assets/{connections-B17jR1OX.js → connections-UdkE9Odl.js} +1 -1
- package/dist/client/assets/constants-BMvsKHXz.js +1 -0
- package/dist/client/assets/{constants-CL8_8_oj.js → constants-t4cYcaOj.js} +1 -1
- package/dist/client/assets/{context-D9CqM7rN.js → context-CADU4rSF.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-B8wTHjKM.js → create-organization-dialog-C6fo5Hef.js} +1 -1
- package/dist/client/assets/{create-project-dialog-B1EyAEHx.js → create-project-dialog-DeWiYUJP.js} +1 -1
- package/dist/client/assets/{deco-constants-Co7853uN.js → deco-constants-DwNVBkXd.js} +1 -1
- package/dist/client/assets/{dialog-Dy_XRMC3.js → dialog-DZ73hYD2.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C1ZnNlCc.js → dropdown-menu-BlYEF8_O.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CPqFU1lA.js → dynamic-plugin-layout-Cj_NN8Sa.js} +1 -1
- package/dist/client/assets/{editable-thread-title-BgZLa0-S.js → editable-thread-title-CZzMY2v8.js} +1 -1
- package/dist/client/assets/{empty-state-2QYaEyOm.js → empty-state-Fw_Jw9KM.js} +1 -1
- package/dist/client/assets/{env-vars-editor-A2uVLiWO.js → env-vars-editor-BfORkosV.js} +1 -1
- package/dist/client/assets/{error-boundary--iNQ8gta.js → error-boundary-B8Qhob-A.js} +1 -1
- package/dist/client/assets/{extract-connection-data-nDbN7_tg.js → extract-connection-data-DsHfycl1.js} +1 -1
- package/dist/client/assets/{file-browser-qHIX-iyB.js → file-browser-DdVjHr4m.js} +2 -2
- package/dist/client/assets/{form-Bu9G0YBm.js → form-C6Ox6-3I.js} +1 -1
- package/dist/client/assets/{grid-view-3WScGepR.js → grid-view-BHRg_Pme.js} +1 -1
- package/dist/client/assets/{home-DOnU6BAd.js → home-Du3a56yX.js} +1 -1
- package/dist/client/assets/{index-CVuBarxG.js → index--aNT0bd8.js} +1 -1
- package/dist/client/assets/{index-U9Vr21E9.js → index-4ixjLWXM.js} +1 -1
- package/dist/client/assets/{index-CFLaQxUg.js → index-BJmUOuV4.js} +1 -1
- package/dist/client/assets/{index-D10n-K36.js → index-BfJ-GPYf.js} +1 -1
- package/dist/client/assets/{index-iz89DtPg.js → index-CFFAW6El.js} +1 -1
- package/dist/client/assets/{index-DA_wRLZy.js → index-CV_imPUN.js} +1 -1
- package/dist/client/assets/{index-CWe8J-Hq.js → index-DGcrprcR.js} +3 -3
- package/dist/client/assets/{index-DcxptXfK.js → index-ayuCOtc0.js} +1 -1
- package/dist/client/assets/{index-Ch6ga_lY.js → index-bJmmgjqx.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-sdc9LyR0.js → infiniteQueryObserver-BxKDZ2ST.js} +1 -1
- package/dist/client/assets/{input-CNUW7CdE.js → input-DvTN1BP6.js} +1 -1
- package/dist/client/assets/{integration-icon-B1ucSrYo.js → integration-icon-CgBX_ks3.js} +1 -1
- package/dist/client/assets/{label-C9M8nB_D.js → label-qeOE7dIh.js} +1 -1
- package/dist/client/assets/{layout-Du0jhu2u.js → layout-odhQDxBs.js} +1 -1
- package/dist/client/assets/{localstorage-keys-B08XCBrR.js → localstorage-keys-BQX8_0BZ.js} +1 -1
- package/dist/client/assets/{login-BGeMc3UY.js → login-GKelMg3g.js} +1 -1
- package/dist/client/assets/{markdown-Beha7Jtr.js → markdown-BhF_-YvH.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Bf5n92Z6.js → mcp-oauth-D01_ndal.js} +1 -1
- package/dist/client/assets/{mcp-server-card-C5AWkI-Y.js → mcp-server-card-BHBeZkJo.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-CASakw41.js → mcp-server-detail-BatwHSxN.js} +2 -2
- package/dist/client/assets/{members-Cgz_wHue.js → members-rpOiHXHk.js} +1 -1
- package/dist/client/assets/{monitoring-CvEepsfe.js → monitoring-CvC6-eq5.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-C4comU_8.js → monitoring-dashboard-edit-DADoyJ7_.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-Bud5sv4I.js → monitoring-dashboard-view-BWj6ZaV3.js} +1 -1
- package/dist/client/assets/{oauth-callback-CmYqc2L-.js → oauth-callback-B5gL7lCI.js} +1 -1
- package/dist/client/assets/{page-C7OrtuJw.js → page-C58nJ-Li.js} +1 -1
- package/dist/client/assets/{page-BXuLYm2j.js → page-DkE_PS55.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-9JYg72Wv.js → plugin-empty-state-X7uea6VR.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-BAAh8fxn.js → plugin-empty-state-q2whEGVP.js} +1 -1
- package/dist/client/assets/{plugin-header-BRkpYFNK.js → plugin-header-C7DE0ct4.js} +1 -1
- package/dist/client/assets/{plugin-header-nW9lSeM6.js → plugin-header-Ch-I_bTw.js} +1 -1
- package/dist/client/assets/{popover-DB2HonEp.js → popover-Nu95EjX8.js} +1 -1
- package/dist/client/assets/{project-layout-L7QwsEuW.js → project-layout-DcWSPHT9.js} +1 -1
- package/dist/client/assets/{projects-list-wc8x0cwK.js → projects-list-NJsuEVXb.js} +1 -1
- package/dist/client/assets/{ranking-layout-BeNFgd62.js → ranking-layout-B5Zz2w8q.js} +1 -1
- package/dist/client/assets/{readme-viewer-CKXEsoh1.js → readme-viewer-Z343YQu7.js} +1 -1
- package/dist/client/assets/{registry-layout-yPgoCDfX.js → registry-layout-e-LPyvS8.js} +1 -1
- package/dist/client/assets/{registry-utils-Bq5Vnmys.js → registry-utils-COvjQkiO.js} +1 -1
- package/dist/client/assets/{reports-layout-BKMF4kWc.js → reports-layout-BCFMfUZH.js} +1 -1
- package/dist/client/assets/{reset-password-BMbQ83jF.js → reset-password-BcvesDFp.js} +1 -1
- package/dist/client/assets/{resizable-uz-qXPzp.js → resizable-kfZDbkMy.js} +1 -1
- package/dist/client/assets/{save-actions-cJA22Jt2.js → save-actions-Df_NW4BN.js} +1 -1
- package/dist/client/assets/{scroll-area-ypfKFEm3.js → scroll-area-BJuQHCIp.js} +1 -1
- package/dist/client/assets/{select-DC-MYgCv.js → select-DQBmlhEf.js} +1 -1
- package/dist/client/assets/{shell-layout-DltVhPnc.js → shell-layout-CH02Na8I.js} +2 -2
- package/dist/client/assets/{skeleton-jyQZqxOG.js → skeleton-DQ8ccdHg.js} +1 -1
- package/dist/client/assets/{spinner-UfnawxyY.js → spinner-BX-oePRV.js} +1 -1
- package/dist/client/assets/{store-invite-DVl_Lais.js → store-invite-hqcnYITt.js} +1 -1
- package/dist/client/assets/{switch-KuerVPFw.js → switch-DPh6dtI2.js} +1 -1
- package/dist/client/assets/{table-8RrK86eW.js → table-Dr59BlIZ.js} +1 -1
- package/dist/client/assets/{tabs-BkMV4XdU.js → tabs-Cai1peX-.js} +1 -1
- package/dist/client/assets/{tasks-Djw2Obnw.js → tasks-CamivDB8.js} +1 -1
- package/dist/client/assets/{textarea-BKS8B-0-.js → textarea-CMZ8dKCK.js} +1 -1
- package/dist/client/assets/{time-range-picker-CAS1lrUx.js → time-range-picker-DI74vKx1.js} +1 -1
- package/dist/client/assets/{toggle-group-5L2C16rQ.js → toggle-group-CwM-3IQt.js} +1 -1
- package/dist/client/assets/{tools-list-zUY0nGjI.js → tools-list-B9j_bdvI.js} +1 -1
- package/dist/client/assets/{tooltip-CnmABkU-.js → tooltip-B4YNhEm3.js} +1 -1
- package/dist/client/assets/{topbar-portal-KPVzjsXQ.js → topbar-portal-D-2YmoLb.js} +1 -1
- package/dist/client/assets/{types-BRllmd3O.js → types-B4eKYkCD.js} +1 -1
- package/dist/client/assets/{use-binding-B-iUklfM.js → use-binding-B4TEVgwJ.js} +1 -1
- package/dist/client/assets/{use-connection-uvGXb5bB.js → use-connection-xUIwVn2H.js} +1 -1
- package/dist/client/assets/{use-copy-BPEj9iD9.js → use-copy-BUl6Sk74.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CDu5HI2i.js → use-create-virtual-mcp-Cor7Xu1g.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-BPzhNEVE.js → use-deco-chat-open-B8cuCwuQ.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-BIorpWqD.js → use-install-from-registry-DlSusZM8.js} +1 -1
- package/dist/client/assets/{use-list-state-hbtjFpq8.js → use-list-state-EBDuQbGr.js} +1 -1
- package/dist/client/assets/{use-llm-D1Sybk2o.js → use-llm-CuiygiQa.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-D_mlcnc9.js → use-mcp-prompts-DaJitUnA.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BHU8SNYs.js → use-mcp-tools-CQfFVFT8.js} +1 -1
- package/dist/client/assets/{use-members-BuLKK-kU.js → use-members-CmtCKeEg.js} +1 -1
- package/dist/client/assets/{use-mobile-o_stuDvp.js → use-mobile-D-DrP5e0.js} +1 -1
- package/dist/client/assets/{use-project-C7KV4vtq.js → use-project-kKLsM3W2.js} +1 -1
- package/dist/client/assets/{use-settings-modal-DKUpDKHN.js → use-settings-modal-Clf9xo0e.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bxxsqow8.js → use-view-mode-DptZS1vf.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BwOE6c59.js → use-virtual-mcp-BpLVEDAn.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DLMQEeqg.js +1 -0
- package/dist/client/assets/{useMutation-Cwew6NK8.js → useMutation-DDPkMzlm.js} +1 -1
- package/dist/client/assets/useQuery-AhBFUcM2.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CuoTdKGU.js +1 -0
- package/dist/client/assets/{workflow-CnuxFv4B.js → workflow-LLeHyMBS.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/constants-F73UdIpY.js +0 -1
- package/dist/client/assets/useInfiniteQuery-C6n3MmqB.js +0 -1
- package/dist/client/assets/useQuery-BHHN8tIv.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-LTF73aNG.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as m,b1 as We,bP as sn,cc as on,c as Q,j as n,u as Ze,m as ln,b as qt,n as cn,K as nt,t as St,O as aa,a as un}from"./index-CWe8J-Hq.js";import{E as Vt,C as dn}from"./collection-search-DP3VOxDY.js";import{P as pe}from"./index-CVuBarxG.js";import{B as mn,a as fn,b as pn,c as vn}from"./breadcrumb-D8hXSONO.js";import{E as Ht}from"./error-boundary--iNQ8gta.js";import{E as hn,i as gn,d as xn,e as tr,b as yn,M as bn,T as jn,p as Qe,s as Re,a as rr}from"./time-range-picker-CAS1lrUx.js";import{I as st}from"./integration-icon-B1ucSrYo.js";import{B as it}from"./badge-DX_NRCrB.js";import{c as Ne,B as ge}from"./button-tfLPNtWJ.js";import{t as Et}from"./ChevronDown-CpMv-ZCm.js";import{i as Pn}from"./ChevronRight-CnxoKS9T.js";import{c as me,b as Tt,d as wn,e as Nn,a as On,T as he}from"./table-8RrK86eW.js";import{as as Sn,at as Je,a2 as Ae,i as He,au as na,r as qe,V as gt,av as sa,X as xt,aw as V,Y as H,ax as ze,ay as ot,az as lt,aA as ke,aB as ar,O as Ke,a3 as In,a9 as Gt,aC as kn,aD as Cn,aE as An,aF as En,_ as Fe,a5 as Mt,w as Tn,l as ue,m as Ie,aG as Mn,p as Oe,v as Se,z as Ut,x as Dn,y as ct,B as ia,D as yt,c as bt,R as oa,S as la,C as ca,F as jt,G as ua,H as da,K as ma,L as _n,I as fa,d as Ge,M as Ln,N as $n,Z as Pt,P as pa,Q as Bn,T as wt,U as nr,a0 as va,a1 as ha,k as ga,a4 as Rn,aH as zn,ad as Kn,n as Fn,q as Ee,t as Te,aI as xa,aJ as Wn,aK as qn,A as sr,aL as Vn,aM as ir,E as Hn,aN as Gn,aO as ya,aP as Un,aQ as ba,aR as Zn,aS as Yn,aT as or,aU as Xn,$ as Qn,am as ja,an as Pa,aq as wa,ar as Jn,ao as Na,ap as es}from"./chart-RH6Sn5GP.js";import{u as Zt,a as Yt,W as ts}from"./constants-CL8_8_oj.js";import{i as rs}from"./DotsVertical-D6pC-fy1.js";import{s as Oa}from"./Plus-DG0waRPt.js";import{s as Sa}from"./Trash01-CZXAnYkd.js";import{C as as}from"./connection-card-B8Vrz1b8.js";import{D as ns,a as ss,b as is,c as lr}from"./dropdown-menu-C1ZnNlCc.js";import{f as os,a as ls,b as cs,c as us,d as ds,e as ms,A as fs,g as ps}from"./alert-dialog-O2Rm7jj8.js";import{u as vs}from"./use-members-BuLKK-kU.js";import{u as hs}from"./useSuspenseInfiniteQuery-LTF73aNG.js";import{h as Ia}from"./use-connection-uvGXb5bB.js";import{b as gs}from"./use-virtual-mcp-BwOE6c59.js";import{i as xs}from"./Code01-B6d_3DvF.js";import{n as Dt}from"./Container-KLxmLuBM.js";import{i as ys}from"./FilterLines-k9tJPeT3.js";import{c as bs}from"./Grid01-Dq0Wc8TI.js";import{I as It}from"./input-CNUW7CdE.js";import{C as cr}from"./checkbox-BD8R4oHK.js";import{f as js,c as Ps,a as ur,d as ws,C as Ns,e as Os}from"./command-ZBXly572.js";import{P as ka,a as Ca,b as Aa}from"./popover-DB2HonEp.js";import{S as dr,a as mr,b as fr,c as pr,d as et}from"./select-DC-MYgCv.js";import{T as Ss}from"./textarea-BKS8B-0-.js";import{T as Is,a as ks,b as Cs}from"./tooltip-CnmABkU-.js";import{C as As}from"./collection-tabs-Cv57OrJk.js";import{S as Es}from"./switch-KuerVPFw.js";import{L as Ts}from"./label-C9M8nB_D.js";import{u as Ms}from"./use-mcp-tools-BHU8SNYs.js";import"./Loading01-77NTYviO.js";import"./SearchMd-D25_gEXb.js";import"./use-mobile-o_stuDvp.js";import"./X-C5YHEo86.js";import"./AlertTriangle-BtlWEVub.js";import"./Check-DeEBcLrH.js";import"./Copy01-CLunLJKI.js";import"./Download01-GBGLtbUj.js";import"./Key01-Bds3RsgX.js";import"./Play-DfC4hRc3.js";import"./scroll-area-ypfKFEm3.js";import"./spinner-UfnawxyY.js";import"./Clock-2a7XM267.js";import"./index-DA_wRLZy.js";import"./card-DOAEt50g.js";import"./infiniteQueryObserver-sdc9LyR0.js";import"./useMutation-Cwew6NK8.js";import"./index-iz89DtPg.js";import"./index-D10n-K36.js";import"./useQuery-BHHN8tIv.js";const _t=({size:t=24,color:e="currentColor",...r})=>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",...r},m.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));_t.displayName="BarChart07";const Ea=({size:t=24,color:e="currentColor",...r})=>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",...r},m.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ea.displayName="PauseCircle";const Ta=({size:t=24,color:e="currentColor",...r})=>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",...r},m.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),m.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Ta.displayName="PlayCircle";const Ma=Math.cos,ut=Math.sin,de=Math.sqrt,dt=Math.PI,Nt=2*dt,Xt={draw(t,e){const r=de(e/dt);t.moveTo(r,0),t.arc(0,0,r,0,Nt)}},Ds={draw(t,e){const r=de(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Da=de(1/3),_s=Da*2,Ls={draw(t,e){const r=de(e/_s),a=r*Da;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},$s={draw(t,e){const r=de(e),a=-r/2;t.rect(a,a,r,r)}},Bs=.8908130915292852,_a=ut(dt/10)/ut(7*dt/10),Rs=ut(Nt/10)*_a,zs=-Ma(Nt/10)*_a,Ks={draw(t,e){const r=de(e*Bs),a=Rs*r,i=zs*r;t.moveTo(0,-r),t.lineTo(a,i);for(let s=1;s<5;++s){const o=Nt*s/5,l=Ma(o),c=ut(o);t.lineTo(c*r,-l*r),t.lineTo(l*a-c*i,c*a+l*i)}t.closePath()}},kt=de(3),Fs={draw(t,e){const r=-de(e/(kt*3));t.moveTo(0,r*2),t.lineTo(-kt*r,-r),t.lineTo(kt*r,-r),t.closePath()}},ne=-.5,se=de(3)/2,Lt=1/de(12),Ws=(Lt/2+1)*3,qs={draw(t,e){const r=de(e/Ws),a=r/2,i=r*Lt,s=a,o=r*Lt+r,l=-s,c=o;t.moveTo(a,i),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(ne*a-se*i,se*a+ne*i),t.lineTo(ne*s-se*o,se*s+ne*o),t.lineTo(ne*l-se*c,se*l+ne*c),t.lineTo(ne*a+se*i,ne*i-se*a),t.lineTo(ne*s+se*o,ne*o-se*s),t.lineTo(ne*l+se*c,ne*c-se*l),t.closePath()}};function Vs(t,e){let r=null,a=Sn(i);t=typeof t=="function"?t:Je(t||Xt),e=typeof e=="function"?e:Je(e===void 0?64:+e);function i(){let s;if(r||(r=s=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),s)return r=null,s+""||null}return i.type=function(s){return arguments.length?(t=typeof s=="function"?s:Je(s),i):t},i.size=function(s){return arguments.length?(e=typeof s=="function"?s:Je(+s),i):e},i.context=function(s){return arguments.length?(r=s??null,i):r},i}var Hs=["type","size","sizeType"];function $t(){return $t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},$t.apply(null,arguments)}function vr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vr(Object(r),!0).forEach(function(a){Gs(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Gs(t,e,r){return(e=Us(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Us(t){var e=Zs(t,"string");return typeof e=="symbol"?e:e+""}function Zs(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ys(t,e){if(t==null)return{};var r,a,i=Xs(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Xs(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var La={symbolCircle:Xt,symbolCross:Ds,symbolDiamond:Ls,symbolSquare:$s,symbolStar:Ks,symbolTriangle:Fs,symbolWye:qs},Qs=Math.PI/180,Js=t=>{var e="symbol".concat(na(t));return La[e]||Xt},ei=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*Qs;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ti=(t,e)=>{La["symbol".concat(na(t))]=e},$a=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,i=Ys(t,Hs),s=hr(hr({},i),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var l=()=>{var f=Js(o),g=Vs().type(f).size(ei(r,a,o)),y=g();if(y!==null)return y},{className:c,cx:u,cy:d}=s,v=Ae(s);return He(u)&&He(d)&&He(r)?m.createElement("path",$t({},v,{className:We("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:l()})):null};$a.registerSymbol=ti;var ri=["radius"],ai=["radius"],gr,xr,yr,br,jr,Pr,wr,Nr,Or,Sr;function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(a){ni(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ni(t,e,r){return(e=si(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function si(t){var e=ii(t,"string");return typeof e=="symbol"?e:e+""}function ii(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},mt.apply(null,arguments)}function Cr(t,e){if(t==null)return{};var r,a,i=oi(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function oi(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function fe(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Ar=(t,e,r,a,i)=>{var s=ze(r),o=ze(a),l=Math.min(Math.abs(s)/2,Math.abs(o)/2),c=o>=0?1:-1,u=s>=0?1:-1,d=o>=0&&s>=0||o<0&&s<0?1:0,v;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],g=0,y=4;g<y;g++){var x,b=(x=i[g])!==null&&x!==void 0?x:0;f[g]=b>l?l:b}v=V(gr||(gr=fe(["M",",",""])),t,e+c*f[0]),f[0]>0&&(v+=V(xr||(xr=fe(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,t+u*f[0],e)),v+=V(yr||(yr=fe(["L ",",",""])),t+r-u*f[1],e),f[1]>0&&(v+=V(br||(br=fe(["A ",",",",0,0,",`,
|
|
1
|
+
import{r as m,b1 as We,bP as sn,cc as on,c as Q,j as n,u as Ze,m as ln,b as qt,n as cn,K as nt,t as St,O as aa,a as un}from"./index-DGcrprcR.js";import{E as Vt,C as dn}from"./collection-search-epuaoKsC.js";import{P as pe}from"./index--aNT0bd8.js";import{B as mn,a as fn,b as pn,c as vn}from"./breadcrumb-BlLFCMoF.js";import{E as Ht}from"./error-boundary-B8Qhob-A.js";import{E as hn,i as gn,d as xn,e as tr,b as yn,M as bn,T as jn,p as Qe,s as Re,a as rr}from"./time-range-picker-DI74vKx1.js";import{I as st}from"./integration-icon-CgBX_ks3.js";import{B as it}from"./badge-wZkXx6tq.js";import{c as Ne,B as ge}from"./button-BShrPPQB.js";import{t as Et}from"./ChevronDown-BufhPURG.js";import{i as Pn}from"./ChevronRight-Ddi-3F9S.js";import{c as me,b as Tt,d as wn,e as Nn,a as On,T as he}from"./table-Dr59BlIZ.js";import{as as Sn,at as Je,a2 as Ae,i as He,au as na,r as qe,V as gt,av as sa,X as xt,aw as V,Y as H,ax as ze,ay as ot,az as lt,aA as ke,aB as ar,O as Ke,a3 as In,a9 as Gt,aC as kn,aD as Cn,aE as An,aF as En,_ as Fe,a5 as Mt,w as Tn,l as ue,m as Ie,aG as Mn,p as Oe,v as Se,z as Ut,x as Dn,y as ct,B as ia,D as yt,c as bt,R as oa,S as la,C as ca,F as jt,G as ua,H as da,K as ma,L as _n,I as fa,d as Ge,M as Ln,N as $n,Z as Pt,P as pa,Q as Bn,T as wt,U as nr,a0 as va,a1 as ha,k as ga,a4 as Rn,aH as zn,ad as Kn,n as Fn,q as Ee,t as Te,aI as xa,aJ as Wn,aK as qn,A as sr,aL as Vn,aM as ir,E as Hn,aN as Gn,aO as ya,aP as Un,aQ as ba,aR as Zn,aS as Yn,aT as or,aU as Xn,$ as Qn,am as ja,an as Pa,aq as wa,ar as Jn,ao as Na,ap as es}from"./chart-DoLzE0dq.js";import{u as Zt,a as Yt,W as ts}from"./constants-t4cYcaOj.js";import{i as rs}from"./DotsVertical-CSadjG67.js";import{s as Oa}from"./Plus-GyEYmH7H.js";import{s as Sa}from"./Trash01-DTBe8XH-.js";import{C as as}from"./connection-card-Cs2JqhzD.js";import{D as ns,a as ss,b as is,c as lr}from"./dropdown-menu-BlYEF8_O.js";import{f as os,a as ls,b as cs,c as us,d as ds,e as ms,A as fs,g as ps}from"./alert-dialog-W67uPDui.js";import{u as vs}from"./use-members-CmtCKeEg.js";import{u as hs}from"./useSuspenseInfiniteQuery-CuoTdKGU.js";import{h as Ia}from"./use-connection-xUIwVn2H.js";import{b as gs}from"./use-virtual-mcp-BpLVEDAn.js";import{i as xs}from"./Code01-B6JRytqX.js";import{n as Dt}from"./Container-B3EmXRhZ.js";import{i as ys}from"./FilterLines-BY0QAs50.js";import{c as bs}from"./Grid01-DWFyhMlk.js";import{I as It}from"./input-DvTN1BP6.js";import{C as cr}from"./checkbox-CJOukTQl.js";import{f as js,c as Ps,a as ur,d as ws,C as Ns,e as Os}from"./command-SkTjLnr0.js";import{P as ka,a as Ca,b as Aa}from"./popover-Nu95EjX8.js";import{S as dr,a as mr,b as fr,c as pr,d as et}from"./select-DQBmlhEf.js";import{T as Ss}from"./textarea-CMZ8dKCK.js";import{T as Is,a as ks,b as Cs}from"./tooltip-B4YNhEm3.js";import{C as As}from"./collection-tabs-D_RAhYU-.js";import{S as Es}from"./switch-DPh6dtI2.js";import{L as Ts}from"./label-qeOE7dIh.js";import{u as Ms}from"./use-mcp-tools-CQfFVFT8.js";import"./Loading01-Du7SSOFL.js";import"./SearchMd-CST_zdt_.js";import"./use-mobile-D-DrP5e0.js";import"./X-CiUv7JeK.js";import"./AlertTriangle-DFZ90wgN.js";import"./Check-Cm2iUQXG.js";import"./Copy01-B3XYrA0z.js";import"./Download01--BNFvyry.js";import"./Key01-DkL0Aa6F.js";import"./Play-DsN2Vu-9.js";import"./scroll-area-BJuQHCIp.js";import"./spinner-BX-oePRV.js";import"./Clock-Bvm7X8ou.js";import"./index-CV_imPUN.js";import"./card-BO4jLXoP.js";import"./infiniteQueryObserver-BxKDZ2ST.js";import"./useMutation-DDPkMzlm.js";import"./index-CFFAW6El.js";import"./index-BfJ-GPYf.js";import"./useQuery-AhBFUcM2.js";const _t=({size:t=24,color:e="currentColor",...r})=>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",...r},m.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));_t.displayName="BarChart07";const Ea=({size:t=24,color:e="currentColor",...r})=>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",...r},m.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ea.displayName="PauseCircle";const Ta=({size:t=24,color:e="currentColor",...r})=>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",...r},m.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),m.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Ta.displayName="PlayCircle";const Ma=Math.cos,ut=Math.sin,de=Math.sqrt,dt=Math.PI,Nt=2*dt,Xt={draw(t,e){const r=de(e/dt);t.moveTo(r,0),t.arc(0,0,r,0,Nt)}},Ds={draw(t,e){const r=de(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Da=de(1/3),_s=Da*2,Ls={draw(t,e){const r=de(e/_s),a=r*Da;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},$s={draw(t,e){const r=de(e),a=-r/2;t.rect(a,a,r,r)}},Bs=.8908130915292852,_a=ut(dt/10)/ut(7*dt/10),Rs=ut(Nt/10)*_a,zs=-Ma(Nt/10)*_a,Ks={draw(t,e){const r=de(e*Bs),a=Rs*r,i=zs*r;t.moveTo(0,-r),t.lineTo(a,i);for(let s=1;s<5;++s){const o=Nt*s/5,l=Ma(o),c=ut(o);t.lineTo(c*r,-l*r),t.lineTo(l*a-c*i,c*a+l*i)}t.closePath()}},kt=de(3),Fs={draw(t,e){const r=-de(e/(kt*3));t.moveTo(0,r*2),t.lineTo(-kt*r,-r),t.lineTo(kt*r,-r),t.closePath()}},ne=-.5,se=de(3)/2,Lt=1/de(12),Ws=(Lt/2+1)*3,qs={draw(t,e){const r=de(e/Ws),a=r/2,i=r*Lt,s=a,o=r*Lt+r,l=-s,c=o;t.moveTo(a,i),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(ne*a-se*i,se*a+ne*i),t.lineTo(ne*s-se*o,se*s+ne*o),t.lineTo(ne*l-se*c,se*l+ne*c),t.lineTo(ne*a+se*i,ne*i-se*a),t.lineTo(ne*s+se*o,ne*o-se*s),t.lineTo(ne*l+se*c,ne*c-se*l),t.closePath()}};function Vs(t,e){let r=null,a=Sn(i);t=typeof t=="function"?t:Je(t||Xt),e=typeof e=="function"?e:Je(e===void 0?64:+e);function i(){let s;if(r||(r=s=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),s)return r=null,s+""||null}return i.type=function(s){return arguments.length?(t=typeof s=="function"?s:Je(s),i):t},i.size=function(s){return arguments.length?(e=typeof s=="function"?s:Je(+s),i):e},i.context=function(s){return arguments.length?(r=s??null,i):r},i}var Hs=["type","size","sizeType"];function $t(){return $t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},$t.apply(null,arguments)}function vr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vr(Object(r),!0).forEach(function(a){Gs(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Gs(t,e,r){return(e=Us(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Us(t){var e=Zs(t,"string");return typeof e=="symbol"?e:e+""}function Zs(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ys(t,e){if(t==null)return{};var r,a,i=Xs(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Xs(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var La={symbolCircle:Xt,symbolCross:Ds,symbolDiamond:Ls,symbolSquare:$s,symbolStar:Ks,symbolTriangle:Fs,symbolWye:qs},Qs=Math.PI/180,Js=t=>{var e="symbol".concat(na(t));return La[e]||Xt},ei=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*Qs;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ti=(t,e)=>{La["symbol".concat(na(t))]=e},$a=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,i=Ys(t,Hs),s=hr(hr({},i),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var l=()=>{var f=Js(o),g=Vs().type(f).size(ei(r,a,o)),y=g();if(y!==null)return y},{className:c,cx:u,cy:d}=s,v=Ae(s);return He(u)&&He(d)&&He(r)?m.createElement("path",$t({},v,{className:We("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:l()})):null};$a.registerSymbol=ti;var ri=["radius"],ai=["radius"],gr,xr,yr,br,jr,Pr,wr,Nr,Or,Sr;function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(a){ni(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ni(t,e,r){return(e=si(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function si(t){var e=ii(t,"string");return typeof e=="symbol"?e:e+""}function ii(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},mt.apply(null,arguments)}function Cr(t,e){if(t==null)return{};var r,a,i=oi(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function oi(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function fe(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Ar=(t,e,r,a,i)=>{var s=ze(r),o=ze(a),l=Math.min(Math.abs(s)/2,Math.abs(o)/2),c=o>=0?1:-1,u=s>=0?1:-1,d=o>=0&&s>=0||o<0&&s<0?1:0,v;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],g=0,y=4;g<y;g++){var x,b=(x=i[g])!==null&&x!==void 0?x:0;f[g]=b>l?l:b}v=V(gr||(gr=fe(["M",",",""])),t,e+c*f[0]),f[0]>0&&(v+=V(xr||(xr=fe(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,t+u*f[0],e)),v+=V(yr||(yr=fe(["L ",",",""])),t+r-u*f[1],e),f[1]>0&&(v+=V(br||(br=fe(["A ",",",",0,0,",`,
|
|
2
2
|
`,",",""])),f[1],f[1],d,t+r,e+c*f[1])),v+=V(jr||(jr=fe(["L ",",",""])),t+r,e+a-c*f[2]),f[2]>0&&(v+=V(Pr||(Pr=fe(["A ",",",",0,0,",`,
|
|
3
3
|
`,",",""])),f[2],f[2],d,t+r-u*f[2],e+a)),v+=V(wr||(wr=fe(["L ",",",""])),t+u*f[3],e+a),f[3]>0&&(v+=V(Nr||(Nr=fe(["A ",",",",0,0,",`,
|
|
4
4
|
`,",",""])),f[3],f[3],d,t,e+a-c*f[3])),v+="Z"}else if(l>0&&i===+i&&i>0){var h=Math.min(l,i);v=V(Or||(Or=fe(["M ",",",`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as N,c as we,e as Te,j as t,u as Ee,m as Me,n as Re,K as ve,aE as ze,t as pe}from"./index-CWe8J-Hq.js";import{E as Ae}from"./error-boundary--iNQ8gta.js";import{h as Le}from"./use-connection-uvGXb5bB.js";import{u as Oe,a as We}from"./constants-CL8_8_oj.js";import{B as re}from"./button-tfLPNtWJ.js";import{I as le}from"./input-CNUW7CdE.js";import{I as ke}from"./integration-icon-B1ucSrYo.js";import{C as $e}from"./checkbox-BD8R4oHK.js";import{b as Ve,P as Ue,a as Ge}from"./popover-DB2HonEp.js";import{t as Fe}from"./ChevronDown-CpMv-ZCm.js";import{S as je,a as be,b as ye,c as Ne,d as w,n as He}from"./select-DC-MYgCv.js";import{s as Ke}from"./Hash02-Dx1qpCPI.js";import{i as qe}from"./Play-DfC4hRc3.js";import{s as Qe}from"./Plus-DG0waRPt.js";import{s as Ie}from"./RefreshCw01-fyFGfvzx.js";import{s as Je}from"./Trash01-CZXAnYkd.js";import{T as Ye,a as Se}from"./toggle-group-5L2C16rQ.js";import{a as Ze,V as Xe}from"./layout-Du0jhu2u.js";import{S as et}from"./save-actions-cJA22Jt2.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-D8hXSONO.js";import"./AlertTriangle-BtlWEVub.js";import"./useMutation-Cwew6NK8.js";import"./Container-KLxmLuBM.js";import"./Check-DeEBcLrH.js";import"./index-D10n-K36.js";import"./index-CVuBarxG.js";import"./use-mobile-o_stuDvp.js";import"./X-C5YHEo86.js";import"./tooltip-CnmABkU-.js";import"./Save01-BMHaog3F.js";import"./Loading01-77NTYviO.js";import"./ChevronRight-CnxoKS9T.js";const Be=({size:l=24,color:e="currentColor",...s})=>N.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},N.createElement("path",{d:"M16 10H3m17-4H3m17 8H3m13 4H3"}));Be.displayName="AlignLeft";const _e=({size:l=24,color:e="currentColor",...s})=>N.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},N.createElement("path",{d:"M8 15v2m4-6v6m4-10v10m-8.2 4h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 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 21Z"}));_e.displayName="BarChartSquare02";function De(l){return{id:l.id,name:l.name,type:l.type,sourcePath:l.source.path,sourceFrom:l.source.from,aggregationFn:l.aggregation.fn,groupBy:l.aggregation.groupBy||"",interval:l.aggregation.interval||""}}function it(l){return{id:l.id,name:l.name,type:l.type,source:{path:l.sourcePath,from:l.sourceFrom},aggregation:{fn:l.aggregationFn,groupBy:l.type==="table"&&l.groupBy?l.groupBy:void 0,interval:l.type==="timeseries"&&l.interval?l.interval:void 0}}}const Ce={id:crypto.randomUUID(),name:"",type:"metric",sourcePath:"$.usage.total_tokens",sourceFrom:"output",aggregationFn:"sum",groupBy:"",interval:""};function nt(l){const e=we.c(36),{result:s,widget:o}=l;if(s.error){let i;return e[0]!==s.error?(i=t.jsx("div",{className:"text-sm text-destructive bg-destructive/10 rounded p-3",children:s.error}),e[0]=s.error,e[1]=i):i=e[1],i}if(o.type==="metric"){const i=s.value??0;let d;e[2]!==i?(d=i>=1e6?`${(i/1e6).toFixed(2)}M`:i>=1e3?`${(i/1e3).toFixed(2)}K`:typeof i=="number"?i.toFixed(2):String(i),e[2]=i,e[3]=d):d=e[3];const c=d;let m;e[4]!==c?(m=t.jsx("div",{className:"text-3xl font-bold tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];const h=s.matchedRecords??0;let x;e[6]!==h?(x=t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[h," records matched"]}),e[6]=h,e[7]=x):x=e[7];let f;return e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"text-center py-4",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10],f}if(o.type==="table"&&s.groups){let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("thead",{className:"bg-muted/50 sticky top-0",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-1.5 text-xs font-medium",children:"Key"}),t.jsx("th",{className:"text-right px-3 py-1.5 text-xs font-medium",children:"Value"})]})}),e[11]=i):i=e[11];let d;e[12]!==s.groups?(d=s.groups.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:"px-3 py-4 text-center text-muted-foreground text-xs",children:"No data"})}):s.groups.slice(0,10).map(ct),e[12]=s.groups,e[13]=d):d=e[13];let c;e[14]!==d?(c=t.jsxs("table",{className:"w-full text-sm",children:[i,t.jsx("tbody",{children:d})]}),e[14]=d,e[15]=c):c=e[15];let m;e[16]!==s.groups.length?(m=s.groups.length>10&&t.jsxs("div",{className:"text-xs text-muted-foreground text-center py-2",children:["+",s.groups.length-10," more rows"]}),e[16]=s.groups.length,e[17]=m):m=e[17];let h;return e[18]!==c||e[19]!==m?(h=t.jsxs("div",{className:"max-h-[200px] overflow-auto",children:[c,m]}),e[18]=c,e[19]=m,e[20]=h):h=e[20],h}if(o.type==="timeseries"&&s.timeseries){let i;e[21]!==s.timeseries?(i=Math.max(...s.timeseries.map(ot),1),e[21]=s.timeseries,e[22]=i):i=e[22];const d=i;let c;if(e[23]!==d||e[24]!==s.timeseries){let f;e[26]!==d?(f=(u,S)=>t.jsx("div",{className:"flex-1 bg-primary/80 rounded-t",style:{height:`${u.value/d*100}%`,minHeight:u.value>0?"2px":"0px"},title:`${new Date(u.timestamp).toLocaleString()}: ${u.value}`},S),e[26]=d,e[27]=f):f=e[27],c=s.timeseries.slice(-24).map(f),e[23]=d,e[24]=s.timeseries,e[25]=c}else c=e[25];let m;e[28]!==c?(m=t.jsx("div",{className:"flex items-end gap-0.5 h-[80px]",children:c}),e[28]=c,e[29]=m):m=e[29];let h;e[30]!==s.timeseries.length?(h=t.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[s.timeseries.length," data points"]}),e[30]=s.timeseries.length,e[31]=h):h=e[31];let x;return e[32]!==m||e[33]!==h?(x=t.jsxs("div",{className:"py-2",children:[m,h]}),e[32]=m,e[33]=h,e[34]=x):x=e[34],x}let j;return e[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"No preview data"}),e[35]=j):j=e[35],j}function ot(l){return l.value}function ct(l,e){return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:l.key}),t.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-xs",children:l.value.toLocaleString()})]},e)}function mt(l){const e=we.c(113),{widget:s,onChange:o,onRemove:j,canRemove:i,onMoveUp:d,onMoveDown:c,canMoveUp:m,canMoveDown:h,onPreview:x,previewResult:f,isPreviewing:u}=l,S=!m;let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(He,{size:14}),e[0]=z):z=e[0];let D;e[1]!==d||e[2]!==S?(D=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d,disabled:S,children:z}),e[1]=d,e[2]=S,e[3]=D):D=e[3];const ae=!h;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Fe,{size:14}),e[4]=g):g=e[4];let p;e[5]!==c||e[6]!==ae?(p=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,disabled:ae,children:g}),e[5]=c,e[6]=ae,e[7]=p):p=e[7];let k;e[8]!==D||e[9]!==p?(k=t.jsxs("div",{className:"flex items-center gap-0.5",children:[D,p]}),e[8]=D,e[9]=p,e[10]=k):k=e[10];let C;e[11]!==s.type?(C=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.type}),e[11]=s.type,e[12]=C):C=e[12];let F;e[13]!==s.name?(F=s.name&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground",children:"·"}),t.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e[13]=s.name,e[14]=F):F=e[14];let B;e[15]!==k||e[16]!==C||e[17]!==F?(B=t.jsxs("div",{className:"flex items-center gap-2",children:[k,C,F]}),e[15]=k,e[16]=C,e[17]=F,e[18]=B):B=e[18];let P;e[19]!==u?(P=u?t.jsx(Ie,{size:14,className:"animate-spin"}):t.jsx(qe,{size:14}),e[19]=u,e[20]=P):P=e[20];let _;e[21]!==u||e[22]!==x||e[23]!==P?(_=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:x,disabled:u,children:P}),e[21]=u,e[22]=x,e[23]=P,e[24]=_):_=e[24];const A=!i,ie=i?"visible":"hidden";let T;e[25]!==ie?(T={visibility:ie},e[25]=ie,e[26]=T):T=e[26];let L;e[27]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(Je,{size:14}),e[27]=L):L=e[27];let E;e[28]!==j||e[29]!==A||e[30]!==T?(E=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,disabled:A,style:T,children:L}),e[28]=j,e[29]=A,e[30]=T,e[31]=E):E=e[31];let M;e[32]!==_||e[33]!==E?(M=t.jsxs("div",{className:"flex items-center gap-1",children:[_,E]}),e[32]=_,e[33]=E,e[34]=M):M=e[34];let R;e[35]!==B||e[36]!==M?(R=t.jsxs("div",{className:"flex items-center justify-between px-4 h-11 border-b bg-muted/30",children:[B,M]}),e[35]=B,e[36]=M,e[37]=R):R=e[37];let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Widget Name"}),e[38]=r):r=e[38];let a;e[39]!==o||e[40]!==s?(a=b=>o({...s,name:b.target.value}),e[39]=o,e[40]=s,e[41]=a):a=e[41];let n;e[42]!==a||e[43]!==s.name?(n=t.jsxs("div",{children:[r,t.jsx(le,{placeholder:"e.g., Total Tokens",value:s.name,onChange:a})]}),e[42]=a,e[43]=s.name,e[44]=n):n=e[44];let v;e[45]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Type"}),e[45]=v):v=e[45];let y;e[46]!==o||e[47]!==s?(y=b=>{b&&o({...s,type:b,groupBy:b==="table"?s.groupBy:"",interval:b==="timeseries"?s.interval||"1h":""})},e[46]=o,e[47]=s,e[48]=y):y=e[48];let I;e[49]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{value:"metric",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Metric",children:t.jsx(Ke,{size:14})}),e[49]=I):I=e[49];let O;e[50]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(Se,{value:"timeseries",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Timeseries",children:t.jsx(_e,{size:14})}),e[50]=O):O=e[50];let ne;e[51]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Se,{value:"table",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Table",children:t.jsx(Be,{size:14})}),e[51]=ne):ne=e[51];let W;e[52]!==y||e[53]!==s.type?(W=t.jsxs("div",{children:[v,t.jsxs(Ye,{type:"single",variant:"outline",size:"sm",value:s.type,onValueChange:y,className:"w-full h-10",children:[I,O,ne]})]}),e[52]=y,e[53]=s.type,e[54]=W):W=e[54];let $;e[55]!==n||e[56]!==W?($=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n,W]}),e[55]=n,e[56]=W,e[57]=$):$=e[57];let oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"JSONPath Expression"}),e[58]=oe):oe=e[58];let V;e[59]!==o||e[60]!==s?(V=b=>o({...s,sourcePath:b.target.value}),e[59]=o,e[60]=s,e[61]=V):V=e[61];let U;e[62]!==V||e[63]!==s.sourcePath?(U=t.jsx(le,{placeholder:"$.usage.total_tokens",value:s.sourcePath,onChange:V,className:"font-mono text-sm"}),e[62]=V,e[63]=s.sourcePath,e[64]=U):U=e[64];let G;e[65]!==s.sourceFrom?(G=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Path to extract from tool call ",s.sourceFrom]}),e[65]=s.sourceFrom,e[66]=G):G=e[66];let H;e[67]!==U||e[68]!==G?(H=t.jsxs("div",{children:[oe,U,G]}),e[67]=U,e[68]=G,e[69]=H):H=e[69];let ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Extract From"}),e[70]=ce):ce=e[70];let K;e[71]!==o||e[72]!==s?(K=b=>o({...s,sourceFrom:b}),e[71]=o,e[72]=s,e[73]=K):K=e[73];let me;e[74]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(be,{children:t.jsx(ye,{})}),e[74]=me):me=e[74];let de;e[75]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsxs(Ne,{children:[t.jsx(w,{value:"output",children:"Output"}),t.jsx(w,{value:"input",children:"Input"})]}),e[75]=de):de=e[75];let q;e[76]!==K||e[77]!==s.sourceFrom?(q=t.jsxs("div",{children:[ce,t.jsxs(je,{value:s.sourceFrom,onValueChange:K,children:[me,de]})]}),e[76]=K,e[77]=s.sourceFrom,e[78]=q):q=e[78];let ue;e[79]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Aggregation"}),e[79]=ue):ue=e[79];let Q;e[80]!==o||e[81]!==s?(Q=b=>o({...s,aggregationFn:b}),e[80]=o,e[81]=s,e[82]=Q):Q=e[82];let he;e[83]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(be,{children:t.jsx(ye,{})}),e[83]=he):he=e[83];let xe;e[84]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsxs(Ne,{children:[t.jsx(w,{value:"sum",children:"Sum"}),t.jsx(w,{value:"avg",children:"Average"}),t.jsx(w,{value:"min",children:"Minimum"}),t.jsx(w,{value:"max",children:"Maximum"}),t.jsx(w,{value:"count",children:"Count"}),t.jsx(w,{value:"last",children:"Last"})]}),e[84]=xe):xe=e[84];let J;e[85]!==Q||e[86]!==s.aggregationFn?(J=t.jsxs("div",{children:[ue,t.jsxs(je,{value:s.aggregationFn,onValueChange:Q,children:[he,xe]})]}),e[85]=Q,e[86]=s.aggregationFn,e[87]=J):J=e[87];let Y;e[88]!==q||e[89]!==J?(Y=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[q,J]}),e[88]=q,e[89]=J,e[90]=Y):Y=e[90];let Z;e[91]!==o||e[92]!==s?(Z=s.type==="table"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Group By (JSONPath)"}),t.jsx(le,{placeholder:"$.model",value:s.groupBy,onChange:b=>o({...s,groupBy:b.target.value}),className:"font-mono text-sm"})]}),e[91]=o,e[92]=s,e[93]=Z):Z=e[93];let X;e[94]!==o||e[95]!==s?(X=s.type==="timeseries"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Time Interval"}),t.jsxs(je,{value:s.interval||"1h",onValueChange:b=>o({...s,interval:b}),children:[t.jsx(be,{children:t.jsx(ye,{})}),t.jsxs(Ne,{children:[t.jsx(w,{value:"15m",children:"15 minutes"}),t.jsx(w,{value:"1h",children:"1 hour"}),t.jsx(w,{value:"1d",children:"1 day"})]})]})]}),e[94]=o,e[95]=s,e[96]=X):X=e[96];let ee;e[97]!==$||e[98]!==H||e[99]!==Y||e[100]!==Z||e[101]!==X?(ee=t.jsxs("div",{className:"space-y-4",children:[$,H,Y,Z,X]}),e[97]=$,e[98]=H,e[99]=Y,e[100]=Z,e[101]=X,e[102]=ee):ee=e[102];let fe;e[103]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("div",{className:"px-3 py-2 border-b text-xs font-medium text-muted-foreground",children:"Preview (last 24h)"}),e[103]=fe):fe=e[103];let te;e[104]!==f||e[105]!==s?(te=t.jsxs("div",{className:"border rounded-lg bg-muted/20 flex flex-col",children:[fe,t.jsx("div",{className:"p-3 flex-1 flex items-center justify-center",children:f?t.jsx(nt,{result:f,widget:s}):t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:'Click "Preview" to test your aggregation'})})]}),e[104]=f,e[105]=s,e[106]=te):te=e[106];let se;e[107]!==ee||e[108]!==te?(se=t.jsx("div",{className:"p-4",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[ee,te]})}),e[107]=ee,e[108]=te,e[109]=se):se=e[109];let ge;return e[110]!==R||e[111]!==se?(ge=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden",children:[R,se]}),e[110]=R,e[111]=se,e[112]=ge):ge=e[112],ge}function dt({dashboardId:l}){const{org:e,project:s,locator:o}=Ee(),j=Me(),i=Oe({connectionId:We,orgId:e.id}),d=Le(),{data:c}=Re({queryKey:ve.monitoringDashboardDetails(o,l),queryFn:async()=>{if(!i)throw new Error("MCP client not available");const r=await i.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:l}});return r.structuredContent??r}}),[m,h]=N.useState(c?.name??""),[x,f]=N.useState(c?.description??""),[u,S]=N.useState(c?.widgets?.map(De)??[{...Ce}]),[z,D]=N.useState(!1),[ae,g]=N.useState(!1),[p,k]=N.useState(c?.filters?.connectionIds??[]),[C,F]=N.useState(c?.filters?.toolNames?.[0]??""),[B,P]=N.useState({}),[_,A]=N.useState(new Set),ie=()=>{S([...u,{...Ce,id:crypto.randomUUID()}]),g(!0)},T=r=>{S(u.filter((a,n)=>n!==r)),g(!0)},L=(r,a)=>{const n=[...u];n[r]=a,S(n),g(!0),P(v=>{const y={...v};return delete y[a.id],y})},E=async r=>{if(i){A(a=>new Set(a).add(r.id));try{const a=new Date,n=new Date(a.getTime()-1440*60*1e3),v={};p.length>0&&(v.connectionIds=p),C.trim()&&(v.toolNames=[C.trim()]);const I=(await i.callTool({name:"MONITORING_WIDGET_PREVIEW",arguments:{widget:{type:r.type,source:{path:r.sourcePath,from:r.sourceFrom},aggregation:{fn:r.aggregationFn,groupBy:r.type==="table"&&r.groupBy?r.groupBy:void 0,interval:r.type==="timeseries"&&r.interval?r.interval:void 0},filter:Object.keys(v).length>0?v:void 0},timeRange:{startDate:n.toISOString(),endDate:a.toISOString()}}})).structuredContent;P(O=>({...O,[r.id]:{value:I?.value,groups:I?.groups,timeseries:I?.timeseries,matchedRecords:I?.matchedRecords??0}}))}catch(a){console.error("Preview failed:",a),P(n=>({...n,[r.id]:{error:"Preview failed. Check your JSONPath expression."}}))}finally{A(a=>{const n=new Set(a);return n.delete(r.id),n})}}},M=async()=>{if(i){if(!m.trim()){pe.error("Please enter a dashboard name");return}if(u.some(r=>!r.name.trim())){pe.error("Please enter a name for all widgets");return}D(!0);try{const r={};p.length>0&&(r.connectionIds=p),C.trim()&&(r.toolNames=[C.trim()]),await i.callTool({name:"MONITORING_DASHBOARD_UPDATE",arguments:{id:l,name:m.trim(),description:x.trim()||null,filters:Object.keys(r).length>0?r:null,widgets:u.map(it)}}),pe.success("Dashboard saved"),g(!1),j.invalidateQueries({queryKey:ve.monitoringDashboards(o)}),j.invalidateQueries({queryKey:ve.monitoringDashboardDetails(o,l)})}catch(r){pe.error("Failed to save dashboard"),console.error(r)}finally{D(!1)}}};if(!c)return t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"});const R=t.jsx(tt,{children:t.jsxs(st,{children:[t.jsx(Pe,{children:t.jsx(rt,{asChild:!0,children:t.jsx(ze,{to:"/$org/$project/monitoring",params:{org:e.slug,project:s.slug},search:{tab:"dashboards"},children:"Monitoring"})})}),t.jsx(lt,{}),t.jsx(Pe,{children:t.jsxs(at,{children:["Edit ",c.name]})})]})});return t.jsxs(Ze,{breadcrumb:R,children:[t.jsx(Xe,{children:t.jsx(et,{onSave:M,onUndo:()=>{h(c?.name??""),f(c?.description??""),S(c?.widgets?.map(De)??[{...Ce}]),k(c?.filters?.connectionIds??[]),F(c?.filters?.toolNames?.[0]??""),g(!1)},isDirty:ae,isSaving:z})}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Dashboard Name"}),t.jsx(le,{placeholder:"e.g., LLM Usage Overview",value:m,onChange:r=>{h(r.target.value),g(!0)}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Description"}),t.jsx(le,{placeholder:"What does this dashboard show?",value:x,onChange:r=>{f(r.target.value),g(!0)}})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[t.jsxs("h2",{className:"text-sm font-medium mb-3",children:["Dashboard Filters",t.jsx("span",{className:"text-muted-foreground font-normal ml-2",children:"(applied to all widgets)"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Servers"}),t.jsxs(Ve,{children:[t.jsx(Ue,{asChild:!0,children:t.jsxs(re,{variant:"outline",className:"w-full justify-between font-normal",children:[t.jsx("span",{className:"flex items-center gap-2 truncate",children:p.length===0?t.jsx("span",{className:"text-muted-foreground",children:"All servers"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"flex items-center -space-x-1",children:p.slice(0,3).map(r=>{const a=(d??[]).find(n=>n.id===r);return a?t.jsx(ke,{icon:a.icon,name:a.title||a.id,size:"xs"},r):null})}),t.jsxs("span",{children:[p.length," server",p.length!==1?"s":""]})]})}),t.jsx(Fe,{size:14,className:"text-muted-foreground shrink-0"})]})}),t.jsxs(Ge,{align:"start",className:"w-72 p-1",children:[t.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:(d??[]).map(r=>{const a=p.includes(r.id);return t.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full rounded-md px-2 py-2 text-sm hover:bg-muted transition-colors",onClick:()=>{k(n=>a?n.filter(v=>v!==r.id):[...n,r.id]),g(!0)},children:[t.jsx($e,{checked:a}),t.jsx(ke,{icon:r.icon,name:r.title||r.id,size:"xs"}),t.jsx("span",{className:"truncate",children:r.title||r.id})]},r.id)})}),p.length>0&&t.jsx("div",{className:"border-t p-1",children:t.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:text-foreground py-1.5 transition-colors",onClick:()=>{k([]),g(!0)},children:"Clear selection"})})]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Tool Name Filter"}),t.jsx(le,{placeholder:"e.g., openai_chat",value:C,onChange:r=>{F(r.target.value),g(!0)},className:"font-mono text-sm"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Filter to specific tool names (partial match)"})]})]})]}),t.jsxs("div",{className:"mt-12",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Widgets"}),t.jsxs(re,{variant:"outline",size:"sm",onClick:ie,children:[t.jsx(Qe,{size:14,className:"mr-1.5"}),"Add Widget"]})]}),t.jsx("div",{className:"space-y-4",children:u.map((r,a)=>t.jsx(mt,{widget:r,onChange:n=>L(a,n),onRemove:()=>T(a),canRemove:u.length>1,onMoveUp:()=>{const n=[...u],v=n[a-1],y=n[a];n[a-1]=y,n[a]=v,S(n),g(!0)},onMoveDown:()=>{const n=[...u],v=n[a],y=n[a+1];n[a]=y,n[a+1]=v,S(n),g(!0)},canMoveUp:a>0,canMoveDown:a<u.length-1,onPreview:()=>E(r),previewResult:B[r.id]??null,isPreviewing:_.has(r.id)},r.id))})]})]})})]})}function Ut(){const l=we.c(5);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const{dashboardId:s}=Te(e);let o;l[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard editor"}),l[1]=o):o=l[1];let j;l[2]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),l[2]=j):j=l[2];let i;return l[3]!==s?(i=t.jsx(Ae,{fallback:o,children:t.jsx(N.Suspense,{fallback:j,children:t.jsx(dt,{dashboardId:s})})}),l[3]=s,l[4]=i):i=l[4],i}export{Ut as default};
|
|
1
|
+
import{r as N,c as we,e as Te,j as t,u as Ee,m as Me,n as Re,K as ve,aE as ze,t as pe}from"./index-DGcrprcR.js";import{E as Ae}from"./error-boundary-B8Qhob-A.js";import{h as Le}from"./use-connection-xUIwVn2H.js";import{u as Oe,a as We}from"./constants-t4cYcaOj.js";import{B as re}from"./button-BShrPPQB.js";import{I as le}from"./input-DvTN1BP6.js";import{I as ke}from"./integration-icon-CgBX_ks3.js";import{C as $e}from"./checkbox-CJOukTQl.js";import{b as Ve,P as Ue,a as Ge}from"./popover-Nu95EjX8.js";import{t as Fe}from"./ChevronDown-BufhPURG.js";import{S as je,a as be,b as ye,c as Ne,d as w,n as He}from"./select-DQBmlhEf.js";import{s as Ke}from"./Hash02-lVbQabr3.js";import{i as qe}from"./Play-DsN2Vu-9.js";import{s as Qe}from"./Plus-GyEYmH7H.js";import{s as Ie}from"./RefreshCw01-BSAySLXB.js";import{s as Je}from"./Trash01-DTBe8XH-.js";import{T as Ye,a as Se}from"./toggle-group-CwM-3IQt.js";import{a as Ze,V as Xe}from"./layout-odhQDxBs.js";import{S as et}from"./save-actions-Df_NW4BN.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-BlLFCMoF.js";import"./AlertTriangle-DFZ90wgN.js";import"./useMutation-DDPkMzlm.js";import"./Container-B3EmXRhZ.js";import"./Check-Cm2iUQXG.js";import"./index-BfJ-GPYf.js";import"./index--aNT0bd8.js";import"./use-mobile-D-DrP5e0.js";import"./X-CiUv7JeK.js";import"./tooltip-B4YNhEm3.js";import"./Save01-CoeneoQw.js";import"./Loading01-Du7SSOFL.js";import"./ChevronRight-Ddi-3F9S.js";const Be=({size:l=24,color:e="currentColor",...s})=>N.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},N.createElement("path",{d:"M16 10H3m17-4H3m17 8H3m13 4H3"}));Be.displayName="AlignLeft";const _e=({size:l=24,color:e="currentColor",...s})=>N.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},N.createElement("path",{d:"M8 15v2m4-6v6m4-10v10m-8.2 4h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 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 21Z"}));_e.displayName="BarChartSquare02";function De(l){return{id:l.id,name:l.name,type:l.type,sourcePath:l.source.path,sourceFrom:l.source.from,aggregationFn:l.aggregation.fn,groupBy:l.aggregation.groupBy||"",interval:l.aggregation.interval||""}}function it(l){return{id:l.id,name:l.name,type:l.type,source:{path:l.sourcePath,from:l.sourceFrom},aggregation:{fn:l.aggregationFn,groupBy:l.type==="table"&&l.groupBy?l.groupBy:void 0,interval:l.type==="timeseries"&&l.interval?l.interval:void 0}}}const Ce={id:crypto.randomUUID(),name:"",type:"metric",sourcePath:"$.usage.total_tokens",sourceFrom:"output",aggregationFn:"sum",groupBy:"",interval:""};function nt(l){const e=we.c(36),{result:s,widget:o}=l;if(s.error){let i;return e[0]!==s.error?(i=t.jsx("div",{className:"text-sm text-destructive bg-destructive/10 rounded p-3",children:s.error}),e[0]=s.error,e[1]=i):i=e[1],i}if(o.type==="metric"){const i=s.value??0;let d;e[2]!==i?(d=i>=1e6?`${(i/1e6).toFixed(2)}M`:i>=1e3?`${(i/1e3).toFixed(2)}K`:typeof i=="number"?i.toFixed(2):String(i),e[2]=i,e[3]=d):d=e[3];const c=d;let m;e[4]!==c?(m=t.jsx("div",{className:"text-3xl font-bold tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];const h=s.matchedRecords??0;let x;e[6]!==h?(x=t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[h," records matched"]}),e[6]=h,e[7]=x):x=e[7];let f;return e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"text-center py-4",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10],f}if(o.type==="table"&&s.groups){let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("thead",{className:"bg-muted/50 sticky top-0",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-1.5 text-xs font-medium",children:"Key"}),t.jsx("th",{className:"text-right px-3 py-1.5 text-xs font-medium",children:"Value"})]})}),e[11]=i):i=e[11];let d;e[12]!==s.groups?(d=s.groups.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:"px-3 py-4 text-center text-muted-foreground text-xs",children:"No data"})}):s.groups.slice(0,10).map(ct),e[12]=s.groups,e[13]=d):d=e[13];let c;e[14]!==d?(c=t.jsxs("table",{className:"w-full text-sm",children:[i,t.jsx("tbody",{children:d})]}),e[14]=d,e[15]=c):c=e[15];let m;e[16]!==s.groups.length?(m=s.groups.length>10&&t.jsxs("div",{className:"text-xs text-muted-foreground text-center py-2",children:["+",s.groups.length-10," more rows"]}),e[16]=s.groups.length,e[17]=m):m=e[17];let h;return e[18]!==c||e[19]!==m?(h=t.jsxs("div",{className:"max-h-[200px] overflow-auto",children:[c,m]}),e[18]=c,e[19]=m,e[20]=h):h=e[20],h}if(o.type==="timeseries"&&s.timeseries){let i;e[21]!==s.timeseries?(i=Math.max(...s.timeseries.map(ot),1),e[21]=s.timeseries,e[22]=i):i=e[22];const d=i;let c;if(e[23]!==d||e[24]!==s.timeseries){let f;e[26]!==d?(f=(u,S)=>t.jsx("div",{className:"flex-1 bg-primary/80 rounded-t",style:{height:`${u.value/d*100}%`,minHeight:u.value>0?"2px":"0px"},title:`${new Date(u.timestamp).toLocaleString()}: ${u.value}`},S),e[26]=d,e[27]=f):f=e[27],c=s.timeseries.slice(-24).map(f),e[23]=d,e[24]=s.timeseries,e[25]=c}else c=e[25];let m;e[28]!==c?(m=t.jsx("div",{className:"flex items-end gap-0.5 h-[80px]",children:c}),e[28]=c,e[29]=m):m=e[29];let h;e[30]!==s.timeseries.length?(h=t.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[s.timeseries.length," data points"]}),e[30]=s.timeseries.length,e[31]=h):h=e[31];let x;return e[32]!==m||e[33]!==h?(x=t.jsxs("div",{className:"py-2",children:[m,h]}),e[32]=m,e[33]=h,e[34]=x):x=e[34],x}let j;return e[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"No preview data"}),e[35]=j):j=e[35],j}function ot(l){return l.value}function ct(l,e){return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:l.key}),t.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-xs",children:l.value.toLocaleString()})]},e)}function mt(l){const e=we.c(113),{widget:s,onChange:o,onRemove:j,canRemove:i,onMoveUp:d,onMoveDown:c,canMoveUp:m,canMoveDown:h,onPreview:x,previewResult:f,isPreviewing:u}=l,S=!m;let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(He,{size:14}),e[0]=z):z=e[0];let D;e[1]!==d||e[2]!==S?(D=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d,disabled:S,children:z}),e[1]=d,e[2]=S,e[3]=D):D=e[3];const ae=!h;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Fe,{size:14}),e[4]=g):g=e[4];let p;e[5]!==c||e[6]!==ae?(p=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,disabled:ae,children:g}),e[5]=c,e[6]=ae,e[7]=p):p=e[7];let k;e[8]!==D||e[9]!==p?(k=t.jsxs("div",{className:"flex items-center gap-0.5",children:[D,p]}),e[8]=D,e[9]=p,e[10]=k):k=e[10];let C;e[11]!==s.type?(C=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.type}),e[11]=s.type,e[12]=C):C=e[12];let F;e[13]!==s.name?(F=s.name&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground",children:"·"}),t.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e[13]=s.name,e[14]=F):F=e[14];let B;e[15]!==k||e[16]!==C||e[17]!==F?(B=t.jsxs("div",{className:"flex items-center gap-2",children:[k,C,F]}),e[15]=k,e[16]=C,e[17]=F,e[18]=B):B=e[18];let P;e[19]!==u?(P=u?t.jsx(Ie,{size:14,className:"animate-spin"}):t.jsx(qe,{size:14}),e[19]=u,e[20]=P):P=e[20];let _;e[21]!==u||e[22]!==x||e[23]!==P?(_=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:x,disabled:u,children:P}),e[21]=u,e[22]=x,e[23]=P,e[24]=_):_=e[24];const A=!i,ie=i?"visible":"hidden";let T;e[25]!==ie?(T={visibility:ie},e[25]=ie,e[26]=T):T=e[26];let L;e[27]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(Je,{size:14}),e[27]=L):L=e[27];let E;e[28]!==j||e[29]!==A||e[30]!==T?(E=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,disabled:A,style:T,children:L}),e[28]=j,e[29]=A,e[30]=T,e[31]=E):E=e[31];let M;e[32]!==_||e[33]!==E?(M=t.jsxs("div",{className:"flex items-center gap-1",children:[_,E]}),e[32]=_,e[33]=E,e[34]=M):M=e[34];let R;e[35]!==B||e[36]!==M?(R=t.jsxs("div",{className:"flex items-center justify-between px-4 h-11 border-b bg-muted/30",children:[B,M]}),e[35]=B,e[36]=M,e[37]=R):R=e[37];let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Widget Name"}),e[38]=r):r=e[38];let a;e[39]!==o||e[40]!==s?(a=b=>o({...s,name:b.target.value}),e[39]=o,e[40]=s,e[41]=a):a=e[41];let n;e[42]!==a||e[43]!==s.name?(n=t.jsxs("div",{children:[r,t.jsx(le,{placeholder:"e.g., Total Tokens",value:s.name,onChange:a})]}),e[42]=a,e[43]=s.name,e[44]=n):n=e[44];let v;e[45]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Type"}),e[45]=v):v=e[45];let y;e[46]!==o||e[47]!==s?(y=b=>{b&&o({...s,type:b,groupBy:b==="table"?s.groupBy:"",interval:b==="timeseries"?s.interval||"1h":""})},e[46]=o,e[47]=s,e[48]=y):y=e[48];let I;e[49]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{value:"metric",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Metric",children:t.jsx(Ke,{size:14})}),e[49]=I):I=e[49];let O;e[50]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(Se,{value:"timeseries",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Timeseries",children:t.jsx(_e,{size:14})}),e[50]=O):O=e[50];let ne;e[51]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Se,{value:"table",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Table",children:t.jsx(Be,{size:14})}),e[51]=ne):ne=e[51];let W;e[52]!==y||e[53]!==s.type?(W=t.jsxs("div",{children:[v,t.jsxs(Ye,{type:"single",variant:"outline",size:"sm",value:s.type,onValueChange:y,className:"w-full h-10",children:[I,O,ne]})]}),e[52]=y,e[53]=s.type,e[54]=W):W=e[54];let $;e[55]!==n||e[56]!==W?($=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n,W]}),e[55]=n,e[56]=W,e[57]=$):$=e[57];let oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"JSONPath Expression"}),e[58]=oe):oe=e[58];let V;e[59]!==o||e[60]!==s?(V=b=>o({...s,sourcePath:b.target.value}),e[59]=o,e[60]=s,e[61]=V):V=e[61];let U;e[62]!==V||e[63]!==s.sourcePath?(U=t.jsx(le,{placeholder:"$.usage.total_tokens",value:s.sourcePath,onChange:V,className:"font-mono text-sm"}),e[62]=V,e[63]=s.sourcePath,e[64]=U):U=e[64];let G;e[65]!==s.sourceFrom?(G=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Path to extract from tool call ",s.sourceFrom]}),e[65]=s.sourceFrom,e[66]=G):G=e[66];let H;e[67]!==U||e[68]!==G?(H=t.jsxs("div",{children:[oe,U,G]}),e[67]=U,e[68]=G,e[69]=H):H=e[69];let ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Extract From"}),e[70]=ce):ce=e[70];let K;e[71]!==o||e[72]!==s?(K=b=>o({...s,sourceFrom:b}),e[71]=o,e[72]=s,e[73]=K):K=e[73];let me;e[74]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(be,{children:t.jsx(ye,{})}),e[74]=me):me=e[74];let de;e[75]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsxs(Ne,{children:[t.jsx(w,{value:"output",children:"Output"}),t.jsx(w,{value:"input",children:"Input"})]}),e[75]=de):de=e[75];let q;e[76]!==K||e[77]!==s.sourceFrom?(q=t.jsxs("div",{children:[ce,t.jsxs(je,{value:s.sourceFrom,onValueChange:K,children:[me,de]})]}),e[76]=K,e[77]=s.sourceFrom,e[78]=q):q=e[78];let ue;e[79]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Aggregation"}),e[79]=ue):ue=e[79];let Q;e[80]!==o||e[81]!==s?(Q=b=>o({...s,aggregationFn:b}),e[80]=o,e[81]=s,e[82]=Q):Q=e[82];let he;e[83]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(be,{children:t.jsx(ye,{})}),e[83]=he):he=e[83];let xe;e[84]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsxs(Ne,{children:[t.jsx(w,{value:"sum",children:"Sum"}),t.jsx(w,{value:"avg",children:"Average"}),t.jsx(w,{value:"min",children:"Minimum"}),t.jsx(w,{value:"max",children:"Maximum"}),t.jsx(w,{value:"count",children:"Count"}),t.jsx(w,{value:"last",children:"Last"})]}),e[84]=xe):xe=e[84];let J;e[85]!==Q||e[86]!==s.aggregationFn?(J=t.jsxs("div",{children:[ue,t.jsxs(je,{value:s.aggregationFn,onValueChange:Q,children:[he,xe]})]}),e[85]=Q,e[86]=s.aggregationFn,e[87]=J):J=e[87];let Y;e[88]!==q||e[89]!==J?(Y=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[q,J]}),e[88]=q,e[89]=J,e[90]=Y):Y=e[90];let Z;e[91]!==o||e[92]!==s?(Z=s.type==="table"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Group By (JSONPath)"}),t.jsx(le,{placeholder:"$.model",value:s.groupBy,onChange:b=>o({...s,groupBy:b.target.value}),className:"font-mono text-sm"})]}),e[91]=o,e[92]=s,e[93]=Z):Z=e[93];let X;e[94]!==o||e[95]!==s?(X=s.type==="timeseries"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Time Interval"}),t.jsxs(je,{value:s.interval||"1h",onValueChange:b=>o({...s,interval:b}),children:[t.jsx(be,{children:t.jsx(ye,{})}),t.jsxs(Ne,{children:[t.jsx(w,{value:"15m",children:"15 minutes"}),t.jsx(w,{value:"1h",children:"1 hour"}),t.jsx(w,{value:"1d",children:"1 day"})]})]})]}),e[94]=o,e[95]=s,e[96]=X):X=e[96];let ee;e[97]!==$||e[98]!==H||e[99]!==Y||e[100]!==Z||e[101]!==X?(ee=t.jsxs("div",{className:"space-y-4",children:[$,H,Y,Z,X]}),e[97]=$,e[98]=H,e[99]=Y,e[100]=Z,e[101]=X,e[102]=ee):ee=e[102];let fe;e[103]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("div",{className:"px-3 py-2 border-b text-xs font-medium text-muted-foreground",children:"Preview (last 24h)"}),e[103]=fe):fe=e[103];let te;e[104]!==f||e[105]!==s?(te=t.jsxs("div",{className:"border rounded-lg bg-muted/20 flex flex-col",children:[fe,t.jsx("div",{className:"p-3 flex-1 flex items-center justify-center",children:f?t.jsx(nt,{result:f,widget:s}):t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:'Click "Preview" to test your aggregation'})})]}),e[104]=f,e[105]=s,e[106]=te):te=e[106];let se;e[107]!==ee||e[108]!==te?(se=t.jsx("div",{className:"p-4",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[ee,te]})}),e[107]=ee,e[108]=te,e[109]=se):se=e[109];let ge;return e[110]!==R||e[111]!==se?(ge=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden",children:[R,se]}),e[110]=R,e[111]=se,e[112]=ge):ge=e[112],ge}function dt({dashboardId:l}){const{org:e,project:s,locator:o}=Ee(),j=Me(),i=Oe({connectionId:We,orgId:e.id}),d=Le(),{data:c}=Re({queryKey:ve.monitoringDashboardDetails(o,l),queryFn:async()=>{if(!i)throw new Error("MCP client not available");const r=await i.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:l}});return r.structuredContent??r}}),[m,h]=N.useState(c?.name??""),[x,f]=N.useState(c?.description??""),[u,S]=N.useState(c?.widgets?.map(De)??[{...Ce}]),[z,D]=N.useState(!1),[ae,g]=N.useState(!1),[p,k]=N.useState(c?.filters?.connectionIds??[]),[C,F]=N.useState(c?.filters?.toolNames?.[0]??""),[B,P]=N.useState({}),[_,A]=N.useState(new Set),ie=()=>{S([...u,{...Ce,id:crypto.randomUUID()}]),g(!0)},T=r=>{S(u.filter((a,n)=>n!==r)),g(!0)},L=(r,a)=>{const n=[...u];n[r]=a,S(n),g(!0),P(v=>{const y={...v};return delete y[a.id],y})},E=async r=>{if(i){A(a=>new Set(a).add(r.id));try{const a=new Date,n=new Date(a.getTime()-1440*60*1e3),v={};p.length>0&&(v.connectionIds=p),C.trim()&&(v.toolNames=[C.trim()]);const I=(await i.callTool({name:"MONITORING_WIDGET_PREVIEW",arguments:{widget:{type:r.type,source:{path:r.sourcePath,from:r.sourceFrom},aggregation:{fn:r.aggregationFn,groupBy:r.type==="table"&&r.groupBy?r.groupBy:void 0,interval:r.type==="timeseries"&&r.interval?r.interval:void 0},filter:Object.keys(v).length>0?v:void 0},timeRange:{startDate:n.toISOString(),endDate:a.toISOString()}}})).structuredContent;P(O=>({...O,[r.id]:{value:I?.value,groups:I?.groups,timeseries:I?.timeseries,matchedRecords:I?.matchedRecords??0}}))}catch(a){console.error("Preview failed:",a),P(n=>({...n,[r.id]:{error:"Preview failed. Check your JSONPath expression."}}))}finally{A(a=>{const n=new Set(a);return n.delete(r.id),n})}}},M=async()=>{if(i){if(!m.trim()){pe.error("Please enter a dashboard name");return}if(u.some(r=>!r.name.trim())){pe.error("Please enter a name for all widgets");return}D(!0);try{const r={};p.length>0&&(r.connectionIds=p),C.trim()&&(r.toolNames=[C.trim()]),await i.callTool({name:"MONITORING_DASHBOARD_UPDATE",arguments:{id:l,name:m.trim(),description:x.trim()||null,filters:Object.keys(r).length>0?r:null,widgets:u.map(it)}}),pe.success("Dashboard saved"),g(!1),j.invalidateQueries({queryKey:ve.monitoringDashboards(o)}),j.invalidateQueries({queryKey:ve.monitoringDashboardDetails(o,l)})}catch(r){pe.error("Failed to save dashboard"),console.error(r)}finally{D(!1)}}};if(!c)return t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"});const R=t.jsx(tt,{children:t.jsxs(st,{children:[t.jsx(Pe,{children:t.jsx(rt,{asChild:!0,children:t.jsx(ze,{to:"/$org/$project/monitoring",params:{org:e.slug,project:s.slug},search:{tab:"dashboards"},children:"Monitoring"})})}),t.jsx(lt,{}),t.jsx(Pe,{children:t.jsxs(at,{children:["Edit ",c.name]})})]})});return t.jsxs(Ze,{breadcrumb:R,children:[t.jsx(Xe,{children:t.jsx(et,{onSave:M,onUndo:()=>{h(c?.name??""),f(c?.description??""),S(c?.widgets?.map(De)??[{...Ce}]),k(c?.filters?.connectionIds??[]),F(c?.filters?.toolNames?.[0]??""),g(!1)},isDirty:ae,isSaving:z})}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Dashboard Name"}),t.jsx(le,{placeholder:"e.g., LLM Usage Overview",value:m,onChange:r=>{h(r.target.value),g(!0)}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Description"}),t.jsx(le,{placeholder:"What does this dashboard show?",value:x,onChange:r=>{f(r.target.value),g(!0)}})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[t.jsxs("h2",{className:"text-sm font-medium mb-3",children:["Dashboard Filters",t.jsx("span",{className:"text-muted-foreground font-normal ml-2",children:"(applied to all widgets)"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Servers"}),t.jsxs(Ve,{children:[t.jsx(Ue,{asChild:!0,children:t.jsxs(re,{variant:"outline",className:"w-full justify-between font-normal",children:[t.jsx("span",{className:"flex items-center gap-2 truncate",children:p.length===0?t.jsx("span",{className:"text-muted-foreground",children:"All servers"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"flex items-center -space-x-1",children:p.slice(0,3).map(r=>{const a=(d??[]).find(n=>n.id===r);return a?t.jsx(ke,{icon:a.icon,name:a.title||a.id,size:"xs"},r):null})}),t.jsxs("span",{children:[p.length," server",p.length!==1?"s":""]})]})}),t.jsx(Fe,{size:14,className:"text-muted-foreground shrink-0"})]})}),t.jsxs(Ge,{align:"start",className:"w-72 p-1",children:[t.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:(d??[]).map(r=>{const a=p.includes(r.id);return t.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full rounded-md px-2 py-2 text-sm hover:bg-muted transition-colors",onClick:()=>{k(n=>a?n.filter(v=>v!==r.id):[...n,r.id]),g(!0)},children:[t.jsx($e,{checked:a}),t.jsx(ke,{icon:r.icon,name:r.title||r.id,size:"xs"}),t.jsx("span",{className:"truncate",children:r.title||r.id})]},r.id)})}),p.length>0&&t.jsx("div",{className:"border-t p-1",children:t.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:text-foreground py-1.5 transition-colors",onClick:()=>{k([]),g(!0)},children:"Clear selection"})})]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Tool Name Filter"}),t.jsx(le,{placeholder:"e.g., openai_chat",value:C,onChange:r=>{F(r.target.value),g(!0)},className:"font-mono text-sm"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Filter to specific tool names (partial match)"})]})]})]}),t.jsxs("div",{className:"mt-12",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Widgets"}),t.jsxs(re,{variant:"outline",size:"sm",onClick:ie,children:[t.jsx(Qe,{size:14,className:"mr-1.5"}),"Add Widget"]})]}),t.jsx("div",{className:"space-y-4",children:u.map((r,a)=>t.jsx(mt,{widget:r,onChange:n=>L(a,n),onRemove:()=>T(a),canRemove:u.length>1,onMoveUp:()=>{const n=[...u],v=n[a-1],y=n[a];n[a-1]=y,n[a]=v,S(n),g(!0)},onMoveDown:()=>{const n=[...u],v=n[a],y=n[a+1];n[a]=y,n[a+1]=v,S(n),g(!0)},canMoveUp:a>0,canMoveDown:a<u.length-1,onPreview:()=>E(r),previewResult:B[r.id]??null,isPreviewing:_.has(r.id)},r.id))})]})]})})]})}function Ut(){const l=we.c(5);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const{dashboardId:s}=Te(e);let o;l[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard editor"}),l[1]=o):o=l[1];let j;l[2]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),l[2]=j):j=l[2];let i;return l[3]!==s?(i=t.jsx(Ae,{fallback:o,children:t.jsx(N.Suspense,{fallback:j,children:t.jsx(dt,{dashboardId:s})})}),l[3]=s,l[4]=i):i=l[4],i}export{Ut as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t,c as D,m as xe,u as fe,n as ne,K as oe,aE as ge,e as pe,b as he}from"./index-
|
|
1
|
+
import{r as $,j as t,c as D,m as xe,u as fe,n as ne,K as oe,aE as ge,e as pe,b as he}from"./index-DGcrprcR.js";import{a as je,u as be}from"./constants-t4cYcaOj.js";import{B as R}from"./button-BShrPPQB.js";import{p as ee,a as ce,s as ye,b as ve,e as me,i as Ne,T as we}from"./time-range-picker-DI74vKx1.js";import{s as re}from"./RefreshCw01-BSAySLXB.js";import{E as ke}from"./error-boundary-B8Qhob-A.js";import{V as Se,a as Ce}from"./layout-odhQDxBs.js";import{b as de,c as $e,d as Fe,e as Re,B as De,a as Te}from"./breadcrumb-BlLFCMoF.js";import{B as _e}from"./badge-wZkXx6tq.js";import{I as ue}from"./input-DvTN1BP6.js";import{b as Pe,P as Ie,a as Me}from"./popover-Nu95EjX8.js";import{S as ze,a as Be,b as Ee,c as Oe,d as Ae}from"./select-DQBmlhEf.js";import{T as Ke}from"./textarea-CMZ8dKCK.js";import{T as Le,a as Ve,b as qe}from"./tooltip-B4YNhEm3.js";import{i as Qe}from"./Code01-B6JRytqX.js";import{i as We}from"./FilterLines-BY0QAs50.js";import{c as Ge}from"./Grid01-DWFyhMlk.js";import{s as He}from"./Plus-GyEYmH7H.js";import{s as Ye}from"./Trash01-DTBe8XH-.js";import{s as Ue}from"./XClose-BOJUsKo6.js";import"./Check-Cm2iUQXG.js";import"./Copy01-B3XYrA0z.js";import"./Download01--BNFvyry.js";import"./Key01-DkL0Aa6F.js";import"./Play-DsN2Vu-9.js";import"./scroll-area-BJuQHCIp.js";import"./spinner-BX-oePRV.js";import"./ChevronDown-BufhPURG.js";import"./Clock-Bvm7X8ou.js";import"./ChevronRight-Ddi-3F9S.js";import"./AlertTriangle-DFZ90wgN.js";import"./index--aNT0bd8.js";import"./use-mobile-D-DrP5e0.js";import"./X-CiUv7JeK.js";import"./index-BfJ-GPYf.js";const Je=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Xe({value:s,onChange:e}){const[r,i]=$.useState(!1),[l,n]=$.useState("raw"),[c,o]=$.useState(s),[m,d]=$.useState(ee(s)),g=$.useRef(s);g.current!==s&&(g.current=s,o(s),d(ee(s)));const f=()=>{e(c.filter(a=>a.key.trim()))},p=()=>{const a=ce(m);o(a),e(a)},j=()=>{if(l==="raw"){const a=ce(m);o(a),n("form")}else d(ee(c)),n("raw")},v=(a,x)=>{const u=[...c],h=u[a];h&&(u[a]={key:x.key??h.key,operator:x.operator??h.operator,value:x.value??h.value},o(u))},b=()=>{o([...c,{key:"",operator:"eq",value:""}])},w=a=>{const x=c.filter((u,h)=>h!==a);o(x),d(ee(x)),e(x.filter(u=>u.key.trim()))},y=()=>{o([]),d(""),e([]),i(!1)},k=s.filter(a=>a.key.trim()).length;return t.jsxs("div",{className:"flex items-center gap-1.5",children:[s.filter(a=>a.key.trim()).map((a,x)=>{const u=a.operator==="exists"?`${a.key}?`:a.operator==="contains"?`${a.key}~${a.value}`:a.operator==="in"?`${a.key}@${a.value}`:`${a.key}=${a.value}`;return t.jsxs(_e,{variant:"secondary",className:"gap-1 pl-2 pr-1 h-7 text-xs font-mono font-normal cursor-default",children:[u,t.jsx("button",{type:"button",className:"ml-0.5 rounded-full p-0.5 hover:bg-muted-foreground/20 transition-colors",onClick:()=>{const h=s.filter((C,F)=>F!==x);e(h)},children:t.jsx(Ue,{size:12})})]},`${a.key}-${x}`)}),t.jsxs(Pe,{open:r,onOpenChange:i,children:[t.jsx(Ie,{asChild:!0,children:t.jsxs(R,{variant:"outline",size:"sm",className:"h-7 px-2 gap-1.5",children:[t.jsx(We,{className:"h-3.5 w-3.5 text-muted-foreground"}),k===0?t.jsx("span",{className:"text-sm",children:"Filter"}):t.jsx("span",{className:"text-sm",children:k})]})}),t.jsxs(Me,{className:"w-[380px] p-4",align:"end",sideOffset:4,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h4",{className:"text-sm font-medium",children:"Property Filters"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:j,children:l==="raw"?t.jsx(Ge,{size:14}):t.jsx(Qe,{size:14})})}),t.jsx(qe,{children:l==="raw"?"Switch to form view":"Switch to raw text"})]})]}),l==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(Ke,{placeholder:`Paste property filters here:
|
|
2
2
|
thread_id=abc123
|
|
3
3
|
user~test
|
|
4
4
|
debug?`,value:m,onChange:a=>d(a.target.value),onBlur:p,onKeyDown:a=>{a.key==="Enter"&&a.metaKey&&p()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[c.map((a,x)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",x+1]}),t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>w(x),children:t.jsx(Ye,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(ue,{placeholder:"Key (e.g., thread_id)",value:a.key,onChange:u=>v(x,{key:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"flex-1 font-mono text-sm"}),t.jsxs(ze,{value:a.operator,onValueChange:u=>{const h=[...c],C=h[x];C&&(h[x]={...C,operator:u,value:u==="exists"?"":C.value},o(h),e(h.filter(F=>F.key.trim())))},children:[t.jsx(Be,{className:"w-28",children:t.jsx(Ee,{})}),t.jsx(Oe,{children:Je.map(u=>t.jsx(Ae,{value:u.value,children:u.label},u.value))})]})]}),a.operator!=="exists"&&t.jsx(ue,{placeholder:"Value",value:a.value,onChange:u=>v(x,{value:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"w-full font-mono text-sm"})]},x)),t.jsxs(R,{variant:"outline",size:"sm",className:"w-full",onClick:b,children:[t.jsx(He,{size:14,className:"mr-1.5"}),"Add filter"]})]}),k>0&&t.jsx(R,{variant:"ghost",size:"sm",className:"w-full mt-3 text-muted-foreground",onClick:y,children:"Clear all filters"})]})]})]})}function G(s,e){return e||Number.isInteger(s)?s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString():s>=1e6?`${(s/1e6).toFixed(2)}M`:s>=1e3?`${(s/1e3).toFixed(2)}K`:s.toFixed(2)}function ae(s){return{sum:"Total",avg:"Average",min:"Minimum",max:"Maximum",count:"Count",last:"Latest"}[s]??s}function le(s){const e=D.c(7),{name:r,subtitle:i}=s;let l;e[0]!==r?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:r}),e[0]=r,e[1]=l):l=e[1];let n;e[2]!==i?(n=t.jsx("div",{className:"text-xs text-muted-foreground",children:i}),e[2]=i,e[3]=n):n=e[3];let c;return e[4]!==l||e[5]!==n?(c=t.jsxs("div",{className:"px-4 py-3",children:[l,n]}),e[4]=l,e[5]=n,e[6]=c):c=e[6],c}function Ze(s){const e=D.c(13),{widget:r,result:i}=s,l=i?.value??0,n=r.aggregation.fn==="count",c=r.name;let o;e[0]!==r.aggregation.fn?(o=ae(r.aggregation.fn),e[0]=r.aggregation.fn,e[1]=o):o=e[1];let m;e[2]!==o||e[3]!==r.name?(m=t.jsx(le,{name:c,subtitle:o}),e[2]=o,e[3]=r.name,e[4]=m):m=e[4];let d;e[5]!==n||e[6]!==l?(d=G(l,n),e[5]=n,e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=t.jsx("div",{className:"px-4 pb-4 mt-auto",children:t.jsx("div",{className:"text-4xl font-bold tabular-nums",children:d})}),e[8]=d,e[9]=g):g=e[9];let f;return e[10]!==m||e[11]!==g?(f=t.jsxs("div",{className:"border rounded-lg bg-card flex flex-col h-full",children:[m,g]}),e[10]=m,e[11]=g,e[12]=f):f=e[12],f}function et(s){const e=D.c(15),{widget:r,result:i}=s;let l,n;e[0]!==i?.groups?(l=i?.groups??[],n=Math.max(...l.map(tt),1),e[0]=i?.groups,e[1]=l,e[2]=n):(l=e[1],n=e[2]);const c=n;let o;e[3]!==r.aggregation.fn||e[4]!==r.aggregation.groupBy?(o=r.aggregation.groupBy?`Grouped by ${r.aggregation.groupBy}`:ae(r.aggregation.fn),e[3]=r.aggregation.fn,e[4]=r.aggregation.groupBy,e[5]=o):o=e[5];let m;e[6]!==o||e[7]!==r.name?(m=t.jsx(le,{name:r.name,subtitle:o}),e[6]=o,e[7]=r.name,e[8]=m):m=e[8];let d;e[9]!==l||e[10]!==c?(d=t.jsx("div",{className:"max-h-[300px] overflow-auto",children:l.length===0?t.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"No data available for this query"}):t.jsx("div",{className:"divide-y",children:l.map(f=>t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2",children:[t.jsx("span",{className:"text-sm truncate flex-1 min-w-0",children:f.key||"(empty)"}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 w-32",children:[t.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:t.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${f.value/c*100}%`}})}),t.jsx("span",{className:"text-xs tabular-nums text-muted-foreground w-10 text-right",children:G(f.value,!0)})]})]},f.key))})}),e[9]=l,e[10]=c,e[11]=d):d=e[11];let g;return e[12]!==m||e[13]!==d?(g=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden flex flex-col h-full",children:[m,d]}),e[12]=m,e[13]=d,e[14]=g):g=e[14],g}function tt(s){return s.value}function st(s){const e=D.c(37),{widget:r,result:i}=s;let l,n,c,o,m,d,g,f,p;if(e[0]!==i?.timeseries||e[1]!==r.aggregation.fn||e[2]!==r.aggregation.interval||e[3]!==r.name){p=i?.timeseries??[],n=Math.max(...p.map(at),1);const a=p.reduce(rt,0);l=r.aggregation.fn==="count",f="border rounded-lg bg-card overflow-hidden flex flex-col h-full",d="flex items-start justify-between pr-4";const x=r.name;let u;e[13]!==r.aggregation.fn?(u=ae(r.aggregation.fn),e[13]=r.aggregation.fn,e[14]=u):u=e[14];const h=`${u} per ${r.aggregation.interval}`;e[15]!==h||e[16]!==r.name?(g=t.jsx(le,{name:x,subtitle:h}),e[15]=h,e[16]=r.name,e[17]=g):g=e[17],m="text-right pt-3",c="text-lg font-semibold tabular-nums leading-tight",o=G(a,l),e[0]=i?.timeseries,e[1]=r.aggregation.fn,e[2]=r.aggregation.interval,e[3]=r.name,e[4]=l,e[5]=n,e[6]=c,e[7]=o,e[8]=m,e[9]=d,e[10]=g,e[11]=f,e[12]=p}else l=e[4],n=e[5],c=e[6],o=e[7],m=e[8],d=e[9],g=e[10],f=e[11],p=e[12];let j;e[18]!==c||e[19]!==o?(j=t.jsx("div",{className:c,children:o}),e[18]=c,e[19]=o,e[20]=j):j=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"text-xs text-muted-foreground",children:"total"}),e[21]=v):v=e[21];let b;e[22]!==m||e[23]!==j?(b=t.jsxs("div",{className:m,children:[j,v]}),e[22]=m,e[23]=j,e[24]=b):b=e[24];let w;e[25]!==d||e[26]!==g||e[27]!==b?(w=t.jsxs("div",{className:d,children:[g,b]}),e[25]=d,e[26]=g,e[27]=b,e[28]=w):w=e[28];let y;e[29]!==l||e[30]!==n||e[31]!==p?(y=t.jsx("div",{className:"px-4 pb-3 flex-1 flex flex-col min-h-0",children:p.length===0?t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"No data available"}):t.jsxs("div",{className:"flex-1 flex flex-col",children:[t.jsx("div",{className:"text-[10px] text-muted-foreground mb-1 tabular-nums",children:G(n,l)}),t.jsx("div",{className:"flex items-end gap-[2px] flex-1",children:p.map((a,x)=>t.jsx("div",{className:"group relative flex-1 bg-primary/70 rounded-t transition-all hover:bg-primary cursor-default",style:{height:`${a.value/n*100}%`,minHeight:a.value>0?"3px":"0px"},children:t.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 hidden group-hover:block z-10 pointer-events-none",children:t.jsx("div",{className:"bg-foreground text-background text-[10px] px-1.5 py-0.5 rounded whitespace-nowrap tabular-nums",children:G(a.value,l)})})},x))}),t.jsx("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1.5 tabular-nums",children:p.length>0&&(()=>{const a=new Date(p[0].timestamp),x=new Date(p[p.length-1].timestamp),C=x.getTime()-a.getTime()>864e5?{month:"short",day:"numeric"}:{hour:"2-digit",minute:"2-digit"};return t.jsxs(t.Fragment,{children:[t.jsx("span",{children:a.toLocaleString([],C)}),t.jsx("span",{children:x.toLocaleString([],C)})]})})()})]})}),e[29]=l,e[30]=n,e[31]=p,e[32]=y):y=e[32];let k;return e[33]!==w||e[34]!==y||e[35]!==f?(k=t.jsxs("div",{className:f,children:[w,y]}),e[33]=w,e[34]=y,e[35]=f,e[36]=k):k=e[36],k}function rt(s,e){return s+e.value}function at(s){return s.value}function lt(s){const e=D.c(81),{dashboardId:r,timeRange:i,propertyFilters:l,onEdit:n,onRefresh:c,onTimeRangeChange:o,onPropertyFiltersChange:m}=s,{org:d,project:g,locator:f}=fe();let p;e[0]!==d.id?(p={connectionId:je,orgId:d.id},e[0]=d.id,e[1]=p):p=e[1];const j=be(p);let v;e[2]!==r||e[3]!==f?(v=oe.monitoringDashboardDetails(f,r),e[2]=r,e[3]=f,e[4]=v):v=e[4];let b;e[5]!==j||e[6]!==r?(b=async()=>{if(!j)throw new Error("MCP client not available");const N=await j.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:r}});return N.structuredContent??N},e[5]=j,e[6]=r,e[7]=b):b=e[7];let w;e[8]!==v||e[9]!==b?(w={queryKey:v,queryFn:b},e[8]=v,e[9]=b,e[10]=w):w=e[10];const{data:y}=ne(w);let k,a,x;if(e[11]!==r||e[12]!==f||e[13]!==l||e[14]!==i.from||e[15]!==i.to){const N=l.filter(ot),S=ye(N);k=N.length>0?ve(N):void 0,x=ne,a=oe.monitoringDashboardQuery(f,r,i.from,i.to,S||void 0),e[11]=r,e[12]=f,e[13]=l,e[14]=i.from,e[15]=i.to,e[16]=k,e[17]=a,e[18]=x}else k=e[16],a=e[17],x=e[18];let u;e[19]!==k||e[20]!==j||e[21]!==r||e[22]!==i.from||e[23]!==i.to?(u=async()=>{if(!j)throw new Error("MCP client not available");const N=me(i.from),S=me(i.to),W=N.date||new Date(Date.now()-864e5),se=S.date||new Date,ie=await j.callTool({name:"MONITORING_DASHBOARD_QUERY",arguments:{dashboardId:r,timeRange:{startDate:W.toISOString(),endDate:se.toISOString()},...k?{propertyFilters:k}:{}}});return ie.structuredContent??ie},e[19]=k,e[20]=j,e[21]=r,e[22]=i.from,e[23]=i.to,e[24]=u):u=e[24];let h;e[25]!==a||e[26]!==u?(h={queryKey:a,queryFn:u,refetchInterval:3e4},e[25]=a,e[26]=u,e[27]=h):h=e[27];const{data:C,isRefetching:F}=x(h);if(!y){let N;return e[28]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"}),e[28]=N):N=e[28],N}let H;e[29]!==C?.results?(H=new Map(C?.results?.map(nt)??[]),e[29]=C?.results,e[30]=H):H=e[30];const Q=H;let T;e[31]!==d.slug||e[32]!==g.slug?(T={org:d.slug,project:g.slug},e[31]=d.slug,e[32]=g.slug,e[33]=T):T=e[33];let Y;e[34]===Symbol.for("react.memo_cache_sentinel")?(Y={tab:"dashboards"},e[34]=Y):Y=e[34];let _;e[35]!==T?(_=t.jsx(de,{children:t.jsx(Fe,{asChild:!0,children:t.jsx(ge,{to:"/$org/$project/monitoring",params:T,search:Y,children:"Monitoring"})})}),e[35]=T,e[36]=_):_=e[36];let U;e[37]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx(Re,{}),e[37]=U):U=e[37];let P;e[38]!==y.name?(P=t.jsx(de,{children:t.jsx($e,{children:y.name})}),e[38]=y.name,e[39]=P):P=e[39];let J;e[40]!==_||e[41]!==P?(J=t.jsx(De,{children:t.jsxs(Te,{children:[_,U,P]})}),e[40]=_,e[41]=P,e[42]=J):J=e[42];const te=J;let I;e[43]!==n?(I=n&&t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:n,children:t.jsx(Ne,{size:14})}),e[43]=n,e[44]=I):I=e[44];let X;e[45]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(re,{size:14}),e[45]=X):X=e[45];let M;e[46]!==c?(M=t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:c,children:X}),e[46]=c,e[47]=M):M=e[47];let z;e[48]!==m||e[49]!==l?(z=t.jsx(Xe,{value:l,onChange:m}),e[48]=m,e[49]=l,e[50]=z):z=e[50];let B;e[51]!==i.from||e[52]!==i.to?(B={from:i.from,to:i.to},e[51]=i.from,e[52]=i.to,e[53]=B):B=e[53];let E;e[54]!==o||e[55]!==B?(E=t.jsx(we,{value:B,onChange:o,className:"min-w-0"}),e[54]=o,e[55]=B,e[56]=E):E=e[56];let O;e[57]!==I||e[58]!==M||e[59]!==z||e[60]!==E?(O=t.jsxs(Se,{children:[I,M,z,E]}),e[57]=I,e[58]=M,e[59]=z,e[60]=E,e[61]=O):O=e[61];let A;e[62]!==y.description?(A=y.description&&t.jsx("div",{className:"mb-6",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:y.description})}),e[62]=y.description,e[63]=A):A=e[63];let K;if(e[64]!==y.widgets||e[65]!==Q){let N;e[67]!==Q?(N=S=>{const W=Q.get(S.id),se=S.type==="metric"?"":"col-span-2";return t.jsxs("div",{className:se,children:[S.type==="metric"&&t.jsx(Ze,{widget:S,result:W}),S.type==="table"&&t.jsx(et,{widget:S,result:W}),S.type==="timeseries"&&t.jsx(st,{widget:S,result:W})]},S.id)},e[67]=Q,e[68]=N):N=e[68],K=y.widgets.map(N),e[64]=y.widgets,e[65]=Q,e[66]=K}else K=e[66];let L;e[69]!==K?(L=t.jsx("div",{className:"grid grid-cols-5 gap-4",ref:it,children:K}),e[69]=K,e[70]=L):L=e[70];let V;e[71]!==F?(V=F&&t.jsxs("div",{className:"fixed bottom-4 right-4 bg-background border rounded-lg px-3 py-2 shadow-lg flex items-center gap-2 text-sm",children:[t.jsx(re,{size:14,className:"animate-spin"}),"Refreshing..."]}),e[71]=F,e[72]=V):V=e[72];let q;e[73]!==A||e[74]!==L||e[75]!==V?(q=t.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[A,L,V]}),e[73]=A,e[74]=L,e[75]=V,e[76]=q):q=e[76];let Z;return e[77]!==te||e[78]!==O||e[79]!==q?(Z=t.jsxs(Ce,{breadcrumb:te,children:[O,q]}),e[77]=te,e[78]=O,e[79]=q,e[80]=Z):Z=e[80],Z}function it(s){if(!s)return;const e=()=>{const i=(s.clientWidth-64)/5;s.style.gridAutoRows=`${i}px`};e(),new ResizeObserver(e).observe(s)}function nt(s){return[s.widgetId,s]}function ot(s){return s.key.trim()}function ct(s){const e=D.c(13),{dashboardId:r,onEdit:i}=s,l=xe();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"now-24h",to:"now"},e[0]=n):n=e[0];const[c,o]=$.useState(n);let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[1]=m):m=e[1];const[d,g]=$.useState(m);let f;e[2]!==r||e[3]!==l?(f=()=>{l.invalidateQueries({predicate:w=>w.queryKey[0]==="monitoringDashboardQuery"&&w.queryKey[2]===r})},e[2]=r,e[3]=l,e[4]=f):f=e[4];const p=f;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard"}),e[5]=j):j=e[5];let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(re,{size:24,className:"animate-spin text-muted-foreground"})}),e[6]=v):v=e[6];let b;return e[7]!==r||e[8]!==p||e[9]!==i||e[10]!==d||e[11]!==c?(b=t.jsx(ke,{fallback:j,children:t.jsx($.Suspense,{fallback:v,children:t.jsx(lt,{dashboardId:r,timeRange:c,propertyFilters:d,onEdit:i,onRefresh:p,onTimeRangeChange:o,onPropertyFiltersChange:g})})}),e[7]=r,e[8]=p,e[9]=i,e[10]=d,e[11]=c,e[12]=b):b=e[12],b}function Qt(){const s=D.c(9);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},s[0]=e):e=s[0];const{dashboardId:r}=pe(e),{org:i,project:l}=fe(),n=he();let c;s[1]!==r||s[2]!==n||s[3]!==i.slug||s[4]!==l.slug?(c=()=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:i.slug,project:l.slug,dashboardId:r}})},s[1]=r,s[2]=n,s[3]=i.slug,s[4]=l.slug,s[5]=c):c=s[5];const o=c;let m;return s[6]!==r||s[7]!==o?(m=t.jsx(ct,{dashboardId:r,onEdit:o}),s[6]=r,s[7]=o,s[8]=m):m=s[8],m}export{Qt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-
|
|
1
|
+
import{r as i,j as e}from"./index-DGcrprcR.js";import{i as n}from"./Loading01-Du7SSOFL.js";import{h as l}from"./mcp-oauth-D01_ndal.js";function h(){const[s,c]=i.useState(null),[r,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":r?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):r?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Q,r as q,u as re,K as oe,bU as we,j as t,b as me,O as de,d as Ie,bV as Te,bW as ne,aD as Re}from"./index-CWe8J-Hq.js";import{P as X}from"./index-CVuBarxG.js";import{B as Pe,a as $e,b as ke,c as ze}from"./breadcrumb-D8hXSONO.js";import{i as ue}from"./AlertTriangle-BtlWEVub.js";import{i as fe}from"./FilterLines-k9tJPeT3.js";import{n as xe}from"./Inbox01-Cy78a0Mb.js";import{i as se}from"./Loading01-77NTYviO.js";import{s as ge}from"./RefreshCw01-fyFGfvzx.js";import{i as pe}from"./SearchMd-D25_gEXb.js";import{u as he}from"./useQuery-BHHN8tIv.js";import{u as Le}from"./useInfiniteQuery-C6n3MmqB.js";import{a as Fe,f as Ee,b as Oe}from"./registry-utils-Bq5Vnmys.js";import{u as je,W as Ke,a as _e,h as Ae,b as Me}from"./constants-CL8_8_oj.js";import{f as Be,g as ye,h as De}from"./use-connection-uvGXb5bB.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{C as Ge,E as Ve}from"./collection-search-DP3VOxDY.js";import{M as ae}from"./mcp-server-card-C5AWkI-Y.js";import{c as ie,B as Y}from"./button-tfLPNtWJ.js";import{I as Ue}from"./input-CNUW7CdE.js";import{b as ve,P as be,a as Ne}from"./popover-DB2HonEp.js";import{i as Ce}from"./Check-DeEBcLrH.js";import{t as Se}from"./ChevronDown-CpMv-ZCm.js";import{s as te}from"./XClose-gSM6r0nZ.js";import{s as qe}from"./Plus-DG0waRPt.js";import{u as He}from"./use-binding-B-iUklfM.js";import{L as Je,u as Qe}from"./localstorage-keys-B08XCBrR.js";import{E as Ye}from"./error-boundary--iNQ8gta.js";import"./use-mobile-o_stuDvp.js";import"./X-C5YHEo86.js";import"./tooltip-CnmABkU-.js";import"./index-D10n-K36.js";import"./ChevronRight-CnxoKS9T.js";import"./infiniteQueryObserver-sdc9LyR0.js";import"./useMutation-Cwew6NK8.js";import"./CheckVerified02-ChzJ2czs.js";import"./Globe02-3loTulSB.js";import"./Lock01-CE-Og3pM.js";import"./Terminal-xe5z4JeI.js";import"./card-DOAEt50g.js";import"./integration-icon-B1ucSrYo.js";import"./Container-KLxmLuBM.js";import"./github-icon-Dp3wHhYE.js";import"./binder-BWaLB8kX.js";function Ze(s,e){const r=Q.c(4),[l,m]=q.useState(s),n=q.useRef(null),o=q.useRef(!0);let c,a;return r[0]!==e||r[1]!==s?(c=()=>{if(o.current){o.current=!1;return}return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{m(s)},e),()=>{n.current&&clearTimeout(n.current)}},a=[s,e],r[0]=e,r[1]=s,r[2]=c,r[3]=a):(c=r[2],a=r[3]),q.useEffect(c,a),l}function Xe(s){const e=Q.c(14),r=q.useRef(null),l=`scroll-position:${s}`,m=q.useRef(null);let n;e[0]!==l?(n=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=n):n=e[1];const o=n;let c;e[2]!==l?(c=()=>{if(m.current===l)return;const j=sessionStorage.getItem(l);if(j&&r.current){const S=Number.parseInt(j,10);r.current.scrollTop=S}m.current=l},e[2]=l,e[3]=c):c=e[3];const a=c;let g;e[4]!==a||e[5]!==l?(g=()=>{m.current!==l&&a()},e[4]=a,e[5]=l,e[6]=g):g=e[6];const I=g;let i;e[7]!==a||e[8]!==l?(i=j=>{r.current=j,j&&m.current!==l&&requestAnimationFrame(()=>{a()})},e[7]=a,e[8]=l,e[9]=i):i=e[9];const p=i;let d;return e[10]!==I||e[11]!==o||e[12]!==p?(d={scrollRef:p,saveScrollPosition:o,handleScroll:I},e[10]=I,e[11]=o,e[12]=p,e[13]=d):d=e[13],d}const et=24;function tt(s){const e=Q.c(54),{registryId:r,listToolName:l,filtersToolName:m,search:n}=s,{org:o}=re();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[a,g]=q.useState(c);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I=[],e[1]=I):I=e[1];const[i,p]=q.useState(I),d=r||null;let j;e[2]!==o.id||e[3]!==d?(j={connectionId:d,orgId:o.id},e[2]=o.id,e[3]=d,e[4]=j):j=e[4];const S=je(j),R=!!m;let b;e[5]!==m||e[6]!==r?(b=oe.toolCall(r,m||"no-filters","{}"),e[5]=m,e[6]=r,e[7]=b):b=e[7];let N;e[8]!==S||e[9]!==m?(N=async()=>{if(!m)return{tags:[],categories:[]};const f=await S.callTool({name:m,arguments:{}});return f.structuredContent??f},e[8]=S,e[9]=m,e[10]=N):N=e[10];let P;e[11]!==b||e[12]!==N?(P={queryKey:b,queryFn:N,staleTime:36e5,retry:2},e[11]=b,e[12]=N,e[13]=P):P=e[13];const{data:$}=he(P);let h,C,k;if(e[14]!==l||e[15]!==r||e[16]!==n||e[17]!==i||e[18]!==a){const f=n?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:n},{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}:void 0;h={limit:et,...a.length>0&&{tags:a},...i.length>0&&{categories:i},...f&&{where:f}},k=Le,C=oe.toolCall(r,l,JSON.stringify(h)),e[14]=l,e[15]=r,e[16]=n,e[17]=i,e[18]=a,e[19]=h,e[20]=C,e[21]=k}else h=e[19],C=e[20],k=e[21];let v;e[22]!==S||e[23]!==h||e[24]!==l?(v=async f=>{const{pageParam:Z}=f,le=Z?{...h,cursor:Z}:h,ee=await S.callTool({name:l,arguments:le});return ee.structuredContent??ee},e[22]=S,e[23]=h,e[24]=l,e[25]=v):v=e[25];let z;e[26]!==v||e[27]!==C?(z={queryKey:C,queryFn:v,initialPageParam:void 0,getNextPageParam:st,staleTime:36e5,placeholderData:we,retry:2},e[26]=v,e[27]=C,e[28]=z):z=e[28];const{data:w,fetchNextPage:x,hasNextPage:y,isFetchingNextPage:u,isFetching:T,isLoading:L,error:F}=k(z);let K;e:{if(!w?.pages||w.pages.length===0){K=null;break e}const f=w.pages[0];if(typeof f=="object"&&f!==null&&"totalCount"in f&&typeof f.totalCount=="number"){K=f.totalCount;break e}K=null}const _=K,E=w?.pages;let W;e[29]!==E?(W=Fe(E),e[29]=E,e[30]=W):W=e[30];const H=W;let G;e[31]!==n||e[32]!==i.length||e[33]!==a.length?(G=a.length>0||i.length>0||!!n?.trim(),e[31]=n,e[32]=i.length,e[33]=a.length,e[34]=G):G=e[34];const D=G,B=T&&!u&&!L&&D;let A;e[35]!==x||e[36]!==y||e[37]!==u?(A=()=>{y&&!u&&x()},e[35]=x,e[36]=y,e[37]=u,e[38]=A):A=e[38];const V=A,O=y??!1,M=R?$?.tags:void 0,U=R?$?.categories:void 0;let J;return e[39]!==D||e[40]!==T||e[41]!==u||e[42]!==B||e[43]!==L||e[44]!==H||e[45]!==F||e[46]!==V||e[47]!==i||e[48]!==a||e[49]!==O||e[50]!==M||e[51]!==U||e[52]!==_?(J={items:H,totalCount:_,hasMore:O,isLoadingMore:u,isFiltering:B,isInitialLoading:L,isFetching:T,error:F,loadMore:V,availableTags:M,availableCategories:U,selectedTags:a,selectedCategories:i,setSelectedTags:g,setSelectedCategories:p,hasActiveFilters:D},e[39]=D,e[40]=T,e[41]=u,e[42]=B,e[43]=L,e[44]=H,e[45]=F,e[46]=V,e[47]=i,e[48]=a,e[49]=O,e[50]=M,e[51]=U,e[52]=_,e[53]=J):J=e[53],J}function st(s){if(typeof s=="object"&&s!==null){const e=s.nextCursor||s.cursor;if(e)return e}}function rt(s,e){return[...s].sort((r,l)=>l.count-r.count).slice(0,e)}function ce(s){const e=Q.c(52),{label:r,items:l,selectedItems:m,onToggle:n,onClear:o}=s,[c,a]=q.useState(""),[g,I]=q.useState(!1);let i,p,d,j,S,R,b,N,P,$,h;if(e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==g||e[4]!==c||e[5]!==m){const x=[...c?l.filter(E=>E.value.toLowerCase().includes(c.toLowerCase())):l].sort(lt);d=m.length,p=ve,P=g,$=I;let y;e[17]!==r?(y=t.jsx("span",{children:r}),e[17]=r,e[18]=y):y=e[18];let u;e[19]!==d?(u=d>0&&t.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:d}),e[19]=d,e[20]=u):u=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(Se,{size:14,className:"opacity-50"}),e[21]=T):T=e[21],e[22]!==u||e[23]!==y?(h=t.jsx(be,{asChild:!0,children:t.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[y,u,T]})}),e[22]=u,e[23]=y,e[24]=h):h=e[24],i=Ne,R="w-64 p-0",b="start";let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(pe,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=L):L=e[25];let F;e[26]!==r?(F=r.toLowerCase(),e[26]=r,e[27]=F):F=e[27];const K=`Search ${F}...`;let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=E=>a(E.target.value),e[28]=_):_=e[28],e[29]!==c||e[30]!==K?(N=t.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:t.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[L,t.jsx(Ue,{type:"text",placeholder:K,value:c,onChange:_,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=c,e[30]=K,e[31]=N):N=e[31],j="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",S=x.length===0?t.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):x.map(E=>{const W=m.includes(E.value);return t.jsxs("button",{onClick:()=>n(E.value),className:ie("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",W?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[t.jsxs("span",{className:"truncate flex items-center gap-2",children:[W&&t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0"}),E.value]}),t.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:E.count})]},E.value)}),e[0]=l,e[1]=r,e[2]=n,e[3]=g,e[4]=c,e[5]=m,e[6]=i,e[7]=p,e[8]=d,e[9]=j,e[10]=S,e[11]=R,e[12]=b,e[13]=N,e[14]=P,e[15]=$,e[16]=h}else i=e[6],p=e[7],d=e[8],j=e[9],S=e[10],R=e[11],b=e[12],N=e[13],P=e[14],$=e[15],h=e[16];let C;e[32]!==j||e[33]!==S?(C=t.jsx("div",{className:j,children:S}),e[32]=j,e[33]=S,e[34]=C):C=e[34];let k;e[35]!==r||e[36]!==o||e[37]!==d?(k=d>0&&t.jsx("div",{className:"p-2 border-t border-border",children:t.jsxs(Y,{variant:"ghost",size:"sm",onClick:o,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=o,e[37]=d,e[38]=k):k=e[38];let v;e[39]!==i||e[40]!==k||e[41]!==R||e[42]!==b||e[43]!==N||e[44]!==C?(v=t.jsxs(i,{className:R,align:b,children:[N,C,k]}),e[39]=i,e[40]=k,e[41]=R,e[42]=b,e[43]=N,e[44]=C,e[45]=v):v=e[45];let z;return e[46]!==p||e[47]!==v||e[48]!==P||e[49]!==$||e[50]!==h?(z=t.jsxs(p,{open:P,onOpenChange:$,children:[h,v]}),e[46]=p,e[47]=v,e[48]=P,e[49]=$,e[50]=h,e[51]=z):z=e[51],z}function lt(s,e){return e.count-s.count}function nt(s){const e=Q.c(67),{availableTags:r,availableCategories:l,selectedTags:m,selectedCategories:n,onTagChange:o,onCategoryChange:c}=s,a=r&&r.length>0||l&&l.length>0,g=m.length>0||n.length>0;if(!a)return null;let I;e[0]!==o||e[1]!==m?(I=y=>{m.includes(y)?o(m.filter(u=>u!==y)):o([...m,y])},e[0]=o,e[1]=m,e[2]=I):I=e[2];const i=I;let p;e[3]!==c||e[4]!==n?(p=y=>{n.includes(y)?c(n.filter(u=>u!==y)):c([...n,y])},e[3]=c,e[4]=n,e[5]=p):p=e[5];const d=p;let j;e[6]!==c||e[7]!==o?(j=()=>{o([]),c([])},e[6]=c,e[7]=o,e[8]=j):j=e[8];const S=j;let R,b,N,P,$,h,C;if(e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==o||e[13]!==n||e[14]!==m||e[15]!==d||e[16]!==i){const y=l?rt(l,6):[];R=n,b=m,C=new Set(y.map(ot)),$="flex items-center border-b border-border";let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:t.jsx(fe,{size:16})}),e[24]=u):u=e[24];let T;e[25]!==l||e[26]!==c||e[27]!==n||e[28]!==d?(T=l&&l.length>0&&t.jsx(ce,{label:"Categories",items:l,selectedItems:n,onToggle:d,onClear:()=>c([])}),e[25]=l,e[26]=c,e[27]=n,e[28]=d,e[29]=T):T=e[29];let L;e[30]!==r||e[31]!==o||e[32]!==m||e[33]!==i?(L=r&&r.length>0&&t.jsx(ce,{label:"Tags",items:r,selectedItems:m,onToggle:i,onClear:()=>o([])}),e[30]=r,e[31]=o,e[32]=m,e[33]=i,e[34]=L):L=e[34],e[35]!==L||e[36]!==T?(h=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[u,T,L]}),e[35]=L,e[36]=T,e[37]=h):h=e[37],N="flex items-center gap-3 flex-wrap px-5 py-3";let F;e[38]!==n||e[39]!==d?(F=K=>{const _=n.includes(K.value);return t.jsxs("div",{onClick:()=>d(K.value),className:ie("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",_?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[t.jsx("span",{children:K.value}),_&&t.jsx("span",{onClick:E=>{E.stopPropagation(),d(K.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},K.value)},e[38]=n,e[39]=d,e[40]=F):F=e[40],P=y.map(F),e[9]=l,e[10]=r,e[11]=c,e[12]=o,e[13]=n,e[14]=m,e[15]=d,e[16]=i,e[17]=R,e[18]=b,e[19]=N,e[20]=P,e[21]=$,e[22]=h,e[23]=C}else R=e[17],b=e[18],N=e[19],P=e[20],$=e[21],h=e[22],C=e[23];let k;if(e[41]!==R||e[42]!==d||e[43]!==C){let y;e[45]!==C?(y=T=>!C.has(T),e[45]=C,e[46]=y):y=e[46];let u;e[47]!==d?(u=T=>t.jsxs("div",{onClick:()=>d(T),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:T}),t.jsx("span",{onClick:L=>{L.stopPropagation(),d(T)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`cat-${T}`),e[47]=d,e[48]=u):u=e[48],k=R.filter(y).map(u),e[41]=R,e[42]=d,e[43]=C,e[44]=k}else k=e[44];let v;if(e[49]!==b||e[50]!==i){let y;e[52]!==i?(y=u=>t.jsxs("div",{onClick:()=>i(u),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:u}),t.jsx("span",{onClick:T=>{T.stopPropagation(),i(u)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`tag-${u}`),e[52]=i,e[53]=y):y=e[53],v=b.map(y),e[49]=b,e[50]=i,e[51]=v}else v=e[51];let z;e[54]!==S||e[55]!==g?(z=g&&t.jsxs(Y,{variant:"ghost",size:"sm",onClick:S,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[t.jsx(te,{size:14}),"Clear all"]}),e[54]=S,e[55]=g,e[56]=z):z=e[56];let w;e[57]!==z||e[58]!==N||e[59]!==P||e[60]!==k||e[61]!==v?(w=t.jsxs("div",{className:N,children:[P,k,v,z]}),e[57]=z,e[58]=N,e[59]=P,e[60]=k,e[61]=v,e[62]=w):w=e[62];let x;return e[63]!==w||e[64]!==$||e[65]!==h?(x=t.jsxs("div",{className:$,children:[h,w]}),e[63]=w,e[64]=$,e[65]=h,e[66]=x):x=e[66],x}function ot(s){return s.value}function it(s,e){if(!e)return s;const r=e.toLowerCase();return s.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function at(s){return s.verified===!0||s._meta?.["mcp.mesh"]?.verified===!0}function ct(s){const e=Q.c(55),{registryId:r,listToolName:l,filtersToolName:m,storePrivateOnly:n}=s,[o,c]=q.useState(""),a=Ze(o,300),g=me(),{org:I}=re(),{scrollRef:i,saveScrollPosition:p,handleScroll:d}=Xe(`store-discovery:${r}`);let j;e[0]!==a||e[1]!==m||e[2]!==l||e[3]!==r?(j={registryId:r,listToolName:l,filtersToolName:m,search:a},e[0]=a,e[1]=m,e[2]=l,e[3]=r,e[4]=j):j=e[4];const{items:S,hasMore:R,isLoadingMore:b,isInitialLoading:N,isFetching:P,error:$,loadMore:h,availableTags:C,availableCategories:k,selectedTags:v,selectedCategories:z,setSelectedTags:w,setSelectedCategories:x,hasActiveFilters:y}=tt(j);let u,T,L,F;if(e[5]!==a||e[6]!==P||e[7]!==N||e[8]!==S||e[9]!==o||e[10]!==n){const O=o?it(S,o):S;F=n?O.filter(dt):O,u=(o!==a||P)&&!N&&!!o,L=F.filter(at),T=F.filter(M=>!L.find(U=>U.id===M.id)),e[5]=a,e[6]=P,e[7]=N,e[8]=S,e[9]=o,e[10]=n,e[11]=u,e[12]=T,e[13]=L,e[14]=F}else u=e[11],T=e[12],L=e[13],F=e[14];const K=T;let _;e[15]!==g||e[16]!==I.slug||e[17]!==r||e[18]!==p?(_=O=>{p();const M=We(O.name||O.title||O.server?.title||""),U=typeof O.id=="string"&&O.id.includes("/"),J=typeof O.server?.name=="string"&&O.server.name.includes("/"),f=U&&!J?O.id:O.server?.name||O.id||"";g({to:"/$org/$project/store/$appName",params:{org:I.slug,project:de,appName:M},search:{registryId:r,serverName:f}})},e[15]=g,e[16]=I.slug,e[17]=r,e[18]=p,e[19]=_):_=e[19];const E=_;let W;e[20]!==d||e[21]!==R||e[22]!==b||e[23]!==h?(W=O=>{if(d(),!R||b)return;const M=O.currentTarget;M.scrollHeight-M.scrollTop-M.clientHeight<200&&h()},e[20]=d,e[21]=R,e[22]=b,e[23]=h,e[24]=W):W=e[24];const H=W;let G;e[25]!==u||e[26]!==o?(G=t.jsx(Ge,{value:o,onChange:c,placeholder:"Search for an MCP Server...",isSearching:u}),e[25]=u,e[26]=o,e[27]=G):G=e[27];let D;e[28]!==k||e[29]!==C||e[30]!==z||e[31]!==v||e[32]!==x||e[33]!==w?(D=t.jsx(nt,{availableTags:C,availableCategories:k,selectedTags:v,selectedCategories:z,onTagChange:w,onCategoryChange:x}),e[28]=k,e[29]=C,e[30]=z,e[31]=v,e[32]=x,e[33]=w,e[34]=D):D=e[34];let B;e[35]!==K||e[36]!==$||e[37]!==E||e[38]!==y||e[39]!==R||e[40]!==N||e[41]!==b||e[42]!==u||e[43]!==o||e[44]!==L||e[45]!==F?(B=t.jsx("div",{className:"p-5",children:t.jsx("div",{children:$&&!N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"size-8 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),$.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:$.message})]}),t.jsxs(Y,{variant:"outline",size:"sm",onClick:mt,children:[t.jsx(ge,{className:"size-4"}),"Try again"]})]}):N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):F.length===0&&!y?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(xe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),t.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):F.length===0&&y&&!o?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(fe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):o&&F.length===0&&!u?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(pe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):t.jsxs("div",{className:"flex flex-col gap-8",children:[u&&F.length===0&&t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),L.length>0&&t.jsx(ae,{items:L,title:"Verified",onItemClick:E}),K.length>0&&t.jsx(ae,{items:K,title:L.length>0?"All":"",onItemClick:E}),R&&b&&t.jsx("div",{className:"flex justify-center py-8",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(se,{size:20,className:"animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[35]=K,e[36]=$,e[37]=E,e[38]=y,e[39]=R,e[40]=N,e[41]=b,e[42]=u,e[43]=o,e[44]=L,e[45]=F,e[46]=B):B=e[46];let A;e[47]!==H||e[48]!==i||e[49]!==B?(A=t.jsx("div",{ref:i,className:"flex-1 overflow-y-auto",onScroll:H,children:B}),e[47]=H,e[48]=i,e[49]=B,e[50]=A):A=e[50];let V;return e[51]!==G||e[52]!==D||e[53]!==A?(V=t.jsxs("div",{className:"flex flex-col h-full",children:[G,D,A]}),e[51]=G,e[52]=D,e[53]=A,e[54]=V):V=e[54],V}function mt(){return window.location.reload()}function dt(s){return s.is_public!==!0}function ut(s){const e=Q.c(11),{registryId:r,storePrivateOnly:l}=s,m=Be(r),n=m?.tools;let o;e[0]!==n?(o=Ee(n),e[0]=n,e[1]=o):o=e[1];const c=o;if(!c){let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"bg-muted p-3 rounded-full",children:t.jsx(xe,{className:"size-8 text-muted-foreground"})}),e[2]=d):d=e[2];let j;return e[3]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[d,t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=j):j=e[3],j}const a=m?.tools;let g;e[4]!==a?(g=Oe(a),e[4]=a,e[5]=g):g=e[5];const i=g||void 0;let p;return e[6]!==c||e[7]!==r||e[8]!==l||e[9]!==i?(p=t.jsx(ct,{registryId:r,listToolName:c,filtersToolName:i,storePrivateOnly:l}),e[6]=c,e[7]=r,e[8]=l,e[9]=i,e[10]=p):p=e[10],p}function ft(s){const e=Q.c(43),{registries:r,value:l,onValueChange:m,onAddWellKnown:n,wellKnownRegistries:o,placeholder:c}=s,a=c===void 0?"Select a registry...":c,[g,I]=q.useState(!1);let i,p,d,j,S,R,b,N;if(e[0]!==g||e[1]!==a||e[2]!==r||e[3]!==l){let w;e[12]!==l?(w=y=>y.id===l,e[12]=l,e[13]=w):w=e[13];const x=r.find(w);p=ve,b=g,N=I,i=be,R=!0,d="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(j=ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=j):j=e[14],S=x?t.jsxs("span",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}):t.jsx("span",{className:"text-muted-foreground",children:a}),e[0]=g,e[1]=a,e[2]=r,e[3]=l,e[4]=i,e[5]=p,e[6]=d,e[7]=j,e[8]=S,e[9]=R,e[10]=b,e[11]=N}else i=e[4],p=e[5],d=e[6],j=e[7],S=e[8],R=e[9],b=e[10],N=e[11];let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Se,{className:"size-4 opacity-50"}),e[15]=P):P=e[15];let $;e[16]!==d||e[17]!==j||e[18]!==S?($=t.jsxs("button",{type:d,className:j,children:[S,P]}),e[16]=d,e[17]=j,e[18]=S,e[19]=$):$=e[19];let h;e[20]!==i||e[21]!==R||e[22]!==$?(h=t.jsx(i,{asChild:R,children:$}),e[20]=i,e[21]=R,e[22]=$,e[23]=h):h=e[23];let C;if(e[24]!==m||e[25]!==r||e[26]!==l){let w;e[28]!==m||e[29]!==l?(w=x=>t.jsxs("button",{type:"button",onClick:()=>{m(x.id??x.name),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}),l===(x.id??x.name)&&t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t.jsx(Ce,{className:"size-4"})})]},x.id??x.name),e[28]=m,e[29]=l,e[30]=w):w=e[30],C=r.map(w),e[24]=m,e[25]=r,e[26]=l,e[27]=C}else C=e[27];let k;e[31]!==n||e[32]!==o?(k=o.length>0&&t.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[t.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),o.map(w=>t.jsxs("button",{type:"button",onClick:()=>{n(w),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[w.icon?t.jsx("img",{src:w.icon,alt:w.title,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:w.title.slice(0,1).toUpperCase()}),t.jsx("span",{className:"flex-1",children:w.title})]}),t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:t.jsx(qe,{size:16})})]},w.id??w.title))]}),e[31]=n,e[32]=o,e[33]=k):k=e[33];let v;e[34]!==C||e[35]!==k?(v=t.jsxs(Ne,{align:"end",className:"w-auto min-w-[200px] p-1",children:[C,k]}),e[34]=C,e[35]=k,e[36]=v):v=e[36];let z;return e[37]!==p||e[38]!==h||e[39]!==v||e[40]!==b||e[41]!==N?(z=t.jsxs(p,{open:b,onOpenChange:N,children:[h,v]}),e[37]=p,e[38]=h,e[39]=v,e[40]=b,e[41]=N,e[42]=z):z=e[42],z}function xt({registries:s,onConnected:e}){const r=ye(),{org:{slug:l}}=re(),{data:m}=Ie.useSession(),n=me(),[o,c]=q.useState(!1),a=s[0],g=async()=>{if(!(!a||!m?.user?.id)){c(!0);try{const i=await r.create.mutateAsync(a);e?.(i.id)}finally{c(!1)}}},I=()=>{n({to:"/$org/$project/mcps",params:{org:l,project:de},search:{action:"create"}})};return t.jsx(Ve,{image:t.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:t.jsxs(t.Fragment,{children:[t.jsxs(Y,{variant:"outline",onClick:g,disabled:o||!a,children:[a?.icon&&t.jsx("img",{src:a.icon,alt:"",className:"size-4"}),o?"Installing...":"Install Registry"]}),t.jsx(Y,{variant:"outline",onClick:I,children:"Custom Connection"})]})})}function gt(s){const e=Q.c(15),{error:r,onRetry:l,registryName:m}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"h-6 w-6 text-destructive"})}),e[0]=n):n=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=o):o=e[1];let c;e[2]!==m?(c=t.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",t.jsx("strong",{children:m})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=m,e[3]=c):c=e[3];let a;e[4]!==r?(a=r?.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=a):a=e[5];let g;e[6]!==c||e[7]!==a?(g=t.jsxs("div",{className:"space-y-2",children:[o,c,a]}),e[6]=c,e[7]=a,e[8]=g):g=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ge,{className:"size-4"}),e[9]=I):I=e[9];let i;e[10]!==l?(i=t.jsxs(Y,{variant:"outline",size:"sm",onClick:l,children:[I,"Try again"]}),e[10]=l,e[11]=i):i=e[11];let p;return e[12]!==g||e[13]!==i?(p=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[n,g,i]}),e[12]=g,e[13]=i,e[14]=p):p=e[14],p}function is(){const s=Q.c(49),{org:e,project:r}=re(),l=De(),m=ye(),n=Te(),o=n.location.pathname.includes("/store/")&&n.location.pathname.split("/").length>3,c=He(l);let a;s[0]!==e.id?(a=Ke.SELF(e.id),s[0]=e.id,s[1]=a):a=s[1];const g=a,I=r.enabledPlugins,i=I==null||I.includes(ne),p=c.filter(f=>f.id!==g?!0:i);let d;s[2]!==g?(d=f=>f.id===g,s[2]=g,s[3]=d):d=s[3];const j=p.some(d);let S;s[4]!==e.id?(S={connectionId:_e,orgId:e.id},s[4]=e.id,s[5]=S):S=s[5];const R=je(S);let b;s[6]!==r.id||s[7]!==R?(b=async()=>{const f=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:ne}});return f.structuredContent??f},s[6]=r.id,s[7]=R,s[8]=b):b=s[8];const{data:N}=he({queryKey:oe.projectPluginConfig(r.id??"",ne),queryFn:b,enabled:j&&!!r.id,staleTime:6e4}),P=N?.config?.settings;let $;s[9]!==P||s[10]!==g?($=f=>f.id===g&&P?{id:f.id,name:P.registryName||f.title,icon:P.registryIcon||f.icon||void 0}:{id:f.id,name:f.title,icon:f.icon||void 0},s[9]=P,s[10]=g,s[11]=$):$=s[11];const h=p.map($);let C;s[12]!==e.slug?(C=Je.selectedRegistry(e.slug),s[12]=e.slug,s[13]=C):C=s[13];const[k,v]=Qe(C,ht);let z;s[14]!==k?(z=f=>f.id===k,s[14]=k,s[15]=z):z=s[15];const x=p.find(z)?.id||p[0]?.id||"",y=x===g&&P?.storePrivateOnly===!0;let u;s[16]!==e.id?(u=Ae(e.id),s[16]=e.id,s[17]=u):u=s[17];let T;s[18]!==u?(T=[u],s[18]=u,s[19]=T):T=s[19];const L=T;let F;s[20]===Symbol.for("react.memo_cache_sentinel")?(F=[Me()],s[20]=F):F=s[20];const K=F;let _;s[21]!==m.create||s[22]!==v?(_=async f=>{const Z=await m.create.mutateAsync(f);v(Z.id)},s[21]=m.create,s[22]=v,s[23]=_):_=s[23];const E=_,W=new Set(p.map(pt)),H=L.filter(f=>f.id&&!W.has(f.id)),G=K.filter(f=>f.id&&!W.has(f.id));if(o){let f;return s[24]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Re,{}),s[24]=f):f=s[24],f}let D;s[25]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(X.Header.Left,{children:t.jsx(Pe,{children:t.jsx($e,{children:t.jsx(ke,{children:t.jsx(ze,{children:"Store"})})})})}),s[25]=D):D=s[25];let B;s[26]!==E?(B=async f=>E(f),s[26]=E,s[27]=B):B=s[27];let A;s[28]!==H||s[29]!==x||s[30]!==h||s[31]!==v||s[32]!==B?(A=t.jsxs(X.Header,{children:[D,t.jsx(X.Header.Right,{children:t.jsx(ft,{wellKnownRegistries:H,registries:h,value:x,onValueChange:v,onAddWellKnown:B,placeholder:"Select store..."})})]}),s[28]=H,s[29]=x,s[30]=h,s[31]=v,s[32]=B,s[33]=A):A=s[33];let V;s[34]!==x||s[35]!==h?(V=f=>{const{error:Z,resetError:le}=f;return t.jsx(gt,{error:Z,onRetry:le,registryName:h.find(ee=>ee.id===x)?.name??"registry"})},s[34]=x,s[35]=h,s[36]=V):V=s[36];let O;s[37]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),s[37]=O):O=s[37];let M;s[38]!==G||s[39]!==x||s[40]!==v||s[41]!==y?(M=t.jsx(q.Suspense,{fallback:O,children:x?t.jsx(ut,{registryId:x,storePrivateOnly:y}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(xt,{registries:G,onConnected:f=>{v(f)}})})}),s[38]=G,s[39]=x,s[40]=v,s[41]=y,s[42]=M):M=s[42];let U;s[43]!==V||s[44]!==M?(U=t.jsx(X.Content,{children:t.jsx(Ye,{fallback:V,children:M})}),s[43]=V,s[44]=M,s[45]=U):U=s[45];let J;return s[46]!==A||s[47]!==U?(J=t.jsxs(X,{children:[A,U]}),s[46]=A,s[47]=U,s[48]=J):J=s[48],J}function pt(s){return s.id}function ht(s){return s??""}export{is as default};
|
|
1
|
+
import{c as Q,r as q,u as re,K as oe,bU as we,j as t,b as me,O as de,d as Ie,bV as Te,bW as ne,aD as Re}from"./index-DGcrprcR.js";import{P as X}from"./index--aNT0bd8.js";import{B as Pe,a as $e,b as ke,c as ze}from"./breadcrumb-BlLFCMoF.js";import{i as ue}from"./AlertTriangle-DFZ90wgN.js";import{i as fe}from"./FilterLines-BY0QAs50.js";import{n as xe}from"./Inbox01-DjPYutLV.js";import{i as se}from"./Loading01-Du7SSOFL.js";import{s as ge}from"./RefreshCw01-BSAySLXB.js";import{i as pe}from"./SearchMd-CST_zdt_.js";import{u as he}from"./useQuery-AhBFUcM2.js";import{u as Le}from"./useInfiniteQuery-DLMQEeqg.js";import{a as Fe,f as Ee,b as Oe}from"./registry-utils-COvjQkiO.js";import{u as je,W as Ke,a as _e,h as Ae,b as Me}from"./constants-t4cYcaOj.js";import{f as Be,g as ye,h as De}from"./use-connection-xUIwVn2H.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{C as Ge,E as Ve}from"./collection-search-epuaoKsC.js";import{M as ae}from"./mcp-server-card-BHBeZkJo.js";import{c as ie,B as Y}from"./button-BShrPPQB.js";import{I as Ue}from"./input-DvTN1BP6.js";import{b as ve,P as be,a as Ne}from"./popover-Nu95EjX8.js";import{i as Ce}from"./Check-Cm2iUQXG.js";import{t as Se}from"./ChevronDown-BufhPURG.js";import{s as te}from"./XClose-BOJUsKo6.js";import{s as qe}from"./Plus-GyEYmH7H.js";import{u as He}from"./use-binding-B4TEVgwJ.js";import{L as Je,u as Qe}from"./localstorage-keys-BQX8_0BZ.js";import{E as Ye}from"./error-boundary-B8Qhob-A.js";import"./use-mobile-D-DrP5e0.js";import"./X-CiUv7JeK.js";import"./tooltip-B4YNhEm3.js";import"./index-BfJ-GPYf.js";import"./ChevronRight-Ddi-3F9S.js";import"./infiniteQueryObserver-BxKDZ2ST.js";import"./useMutation-DDPkMzlm.js";import"./CheckVerified02-D6HcNS_s.js";import"./Globe02-YF4Iol6V.js";import"./Lock01-B_Ca_7Fy.js";import"./Terminal-BoJXcgsb.js";import"./card-BO4jLXoP.js";import"./integration-icon-CgBX_ks3.js";import"./Container-B3EmXRhZ.js";import"./github-icon-Dp3wHhYE.js";import"./binder-CO5VHJsz.js";function Ze(s,e){const r=Q.c(4),[l,m]=q.useState(s),n=q.useRef(null),o=q.useRef(!0);let c,a;return r[0]!==e||r[1]!==s?(c=()=>{if(o.current){o.current=!1;return}return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{m(s)},e),()=>{n.current&&clearTimeout(n.current)}},a=[s,e],r[0]=e,r[1]=s,r[2]=c,r[3]=a):(c=r[2],a=r[3]),q.useEffect(c,a),l}function Xe(s){const e=Q.c(14),r=q.useRef(null),l=`scroll-position:${s}`,m=q.useRef(null);let n;e[0]!==l?(n=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=n):n=e[1];const o=n;let c;e[2]!==l?(c=()=>{if(m.current===l)return;const j=sessionStorage.getItem(l);if(j&&r.current){const S=Number.parseInt(j,10);r.current.scrollTop=S}m.current=l},e[2]=l,e[3]=c):c=e[3];const a=c;let g;e[4]!==a||e[5]!==l?(g=()=>{m.current!==l&&a()},e[4]=a,e[5]=l,e[6]=g):g=e[6];const I=g;let i;e[7]!==a||e[8]!==l?(i=j=>{r.current=j,j&&m.current!==l&&requestAnimationFrame(()=>{a()})},e[7]=a,e[8]=l,e[9]=i):i=e[9];const p=i;let d;return e[10]!==I||e[11]!==o||e[12]!==p?(d={scrollRef:p,saveScrollPosition:o,handleScroll:I},e[10]=I,e[11]=o,e[12]=p,e[13]=d):d=e[13],d}const et=24;function tt(s){const e=Q.c(54),{registryId:r,listToolName:l,filtersToolName:m,search:n}=s,{org:o}=re();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[a,g]=q.useState(c);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I=[],e[1]=I):I=e[1];const[i,p]=q.useState(I),d=r||null;let j;e[2]!==o.id||e[3]!==d?(j={connectionId:d,orgId:o.id},e[2]=o.id,e[3]=d,e[4]=j):j=e[4];const S=je(j),R=!!m;let b;e[5]!==m||e[6]!==r?(b=oe.toolCall(r,m||"no-filters","{}"),e[5]=m,e[6]=r,e[7]=b):b=e[7];let N;e[8]!==S||e[9]!==m?(N=async()=>{if(!m)return{tags:[],categories:[]};const f=await S.callTool({name:m,arguments:{}});return f.structuredContent??f},e[8]=S,e[9]=m,e[10]=N):N=e[10];let P;e[11]!==b||e[12]!==N?(P={queryKey:b,queryFn:N,staleTime:36e5,retry:2},e[11]=b,e[12]=N,e[13]=P):P=e[13];const{data:$}=he(P);let h,C,k;if(e[14]!==l||e[15]!==r||e[16]!==n||e[17]!==i||e[18]!==a){const f=n?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:n},{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}:void 0;h={limit:et,...a.length>0&&{tags:a},...i.length>0&&{categories:i},...f&&{where:f}},k=Le,C=oe.toolCall(r,l,JSON.stringify(h)),e[14]=l,e[15]=r,e[16]=n,e[17]=i,e[18]=a,e[19]=h,e[20]=C,e[21]=k}else h=e[19],C=e[20],k=e[21];let v;e[22]!==S||e[23]!==h||e[24]!==l?(v=async f=>{const{pageParam:Z}=f,le=Z?{...h,cursor:Z}:h,ee=await S.callTool({name:l,arguments:le});return ee.structuredContent??ee},e[22]=S,e[23]=h,e[24]=l,e[25]=v):v=e[25];let z;e[26]!==v||e[27]!==C?(z={queryKey:C,queryFn:v,initialPageParam:void 0,getNextPageParam:st,staleTime:36e5,placeholderData:we,retry:2},e[26]=v,e[27]=C,e[28]=z):z=e[28];const{data:w,fetchNextPage:x,hasNextPage:y,isFetchingNextPage:u,isFetching:T,isLoading:L,error:F}=k(z);let K;e:{if(!w?.pages||w.pages.length===0){K=null;break e}const f=w.pages[0];if(typeof f=="object"&&f!==null&&"totalCount"in f&&typeof f.totalCount=="number"){K=f.totalCount;break e}K=null}const _=K,E=w?.pages;let W;e[29]!==E?(W=Fe(E),e[29]=E,e[30]=W):W=e[30];const H=W;let G;e[31]!==n||e[32]!==i.length||e[33]!==a.length?(G=a.length>0||i.length>0||!!n?.trim(),e[31]=n,e[32]=i.length,e[33]=a.length,e[34]=G):G=e[34];const D=G,B=T&&!u&&!L&&D;let A;e[35]!==x||e[36]!==y||e[37]!==u?(A=()=>{y&&!u&&x()},e[35]=x,e[36]=y,e[37]=u,e[38]=A):A=e[38];const V=A,O=y??!1,M=R?$?.tags:void 0,U=R?$?.categories:void 0;let J;return e[39]!==D||e[40]!==T||e[41]!==u||e[42]!==B||e[43]!==L||e[44]!==H||e[45]!==F||e[46]!==V||e[47]!==i||e[48]!==a||e[49]!==O||e[50]!==M||e[51]!==U||e[52]!==_?(J={items:H,totalCount:_,hasMore:O,isLoadingMore:u,isFiltering:B,isInitialLoading:L,isFetching:T,error:F,loadMore:V,availableTags:M,availableCategories:U,selectedTags:a,selectedCategories:i,setSelectedTags:g,setSelectedCategories:p,hasActiveFilters:D},e[39]=D,e[40]=T,e[41]=u,e[42]=B,e[43]=L,e[44]=H,e[45]=F,e[46]=V,e[47]=i,e[48]=a,e[49]=O,e[50]=M,e[51]=U,e[52]=_,e[53]=J):J=e[53],J}function st(s){if(typeof s=="object"&&s!==null){const e=s.nextCursor||s.cursor;if(e)return e}}function rt(s,e){return[...s].sort((r,l)=>l.count-r.count).slice(0,e)}function ce(s){const e=Q.c(52),{label:r,items:l,selectedItems:m,onToggle:n,onClear:o}=s,[c,a]=q.useState(""),[g,I]=q.useState(!1);let i,p,d,j,S,R,b,N,P,$,h;if(e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==g||e[4]!==c||e[5]!==m){const x=[...c?l.filter(E=>E.value.toLowerCase().includes(c.toLowerCase())):l].sort(lt);d=m.length,p=ve,P=g,$=I;let y;e[17]!==r?(y=t.jsx("span",{children:r}),e[17]=r,e[18]=y):y=e[18];let u;e[19]!==d?(u=d>0&&t.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:d}),e[19]=d,e[20]=u):u=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(Se,{size:14,className:"opacity-50"}),e[21]=T):T=e[21],e[22]!==u||e[23]!==y?(h=t.jsx(be,{asChild:!0,children:t.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[y,u,T]})}),e[22]=u,e[23]=y,e[24]=h):h=e[24],i=Ne,R="w-64 p-0",b="start";let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(pe,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=L):L=e[25];let F;e[26]!==r?(F=r.toLowerCase(),e[26]=r,e[27]=F):F=e[27];const K=`Search ${F}...`;let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=E=>a(E.target.value),e[28]=_):_=e[28],e[29]!==c||e[30]!==K?(N=t.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:t.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[L,t.jsx(Ue,{type:"text",placeholder:K,value:c,onChange:_,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=c,e[30]=K,e[31]=N):N=e[31],j="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",S=x.length===0?t.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):x.map(E=>{const W=m.includes(E.value);return t.jsxs("button",{onClick:()=>n(E.value),className:ie("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",W?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[t.jsxs("span",{className:"truncate flex items-center gap-2",children:[W&&t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0"}),E.value]}),t.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:E.count})]},E.value)}),e[0]=l,e[1]=r,e[2]=n,e[3]=g,e[4]=c,e[5]=m,e[6]=i,e[7]=p,e[8]=d,e[9]=j,e[10]=S,e[11]=R,e[12]=b,e[13]=N,e[14]=P,e[15]=$,e[16]=h}else i=e[6],p=e[7],d=e[8],j=e[9],S=e[10],R=e[11],b=e[12],N=e[13],P=e[14],$=e[15],h=e[16];let C;e[32]!==j||e[33]!==S?(C=t.jsx("div",{className:j,children:S}),e[32]=j,e[33]=S,e[34]=C):C=e[34];let k;e[35]!==r||e[36]!==o||e[37]!==d?(k=d>0&&t.jsx("div",{className:"p-2 border-t border-border",children:t.jsxs(Y,{variant:"ghost",size:"sm",onClick:o,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=o,e[37]=d,e[38]=k):k=e[38];let v;e[39]!==i||e[40]!==k||e[41]!==R||e[42]!==b||e[43]!==N||e[44]!==C?(v=t.jsxs(i,{className:R,align:b,children:[N,C,k]}),e[39]=i,e[40]=k,e[41]=R,e[42]=b,e[43]=N,e[44]=C,e[45]=v):v=e[45];let z;return e[46]!==p||e[47]!==v||e[48]!==P||e[49]!==$||e[50]!==h?(z=t.jsxs(p,{open:P,onOpenChange:$,children:[h,v]}),e[46]=p,e[47]=v,e[48]=P,e[49]=$,e[50]=h,e[51]=z):z=e[51],z}function lt(s,e){return e.count-s.count}function nt(s){const e=Q.c(67),{availableTags:r,availableCategories:l,selectedTags:m,selectedCategories:n,onTagChange:o,onCategoryChange:c}=s,a=r&&r.length>0||l&&l.length>0,g=m.length>0||n.length>0;if(!a)return null;let I;e[0]!==o||e[1]!==m?(I=y=>{m.includes(y)?o(m.filter(u=>u!==y)):o([...m,y])},e[0]=o,e[1]=m,e[2]=I):I=e[2];const i=I;let p;e[3]!==c||e[4]!==n?(p=y=>{n.includes(y)?c(n.filter(u=>u!==y)):c([...n,y])},e[3]=c,e[4]=n,e[5]=p):p=e[5];const d=p;let j;e[6]!==c||e[7]!==o?(j=()=>{o([]),c([])},e[6]=c,e[7]=o,e[8]=j):j=e[8];const S=j;let R,b,N,P,$,h,C;if(e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==o||e[13]!==n||e[14]!==m||e[15]!==d||e[16]!==i){const y=l?rt(l,6):[];R=n,b=m,C=new Set(y.map(ot)),$="flex items-center border-b border-border";let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:t.jsx(fe,{size:16})}),e[24]=u):u=e[24];let T;e[25]!==l||e[26]!==c||e[27]!==n||e[28]!==d?(T=l&&l.length>0&&t.jsx(ce,{label:"Categories",items:l,selectedItems:n,onToggle:d,onClear:()=>c([])}),e[25]=l,e[26]=c,e[27]=n,e[28]=d,e[29]=T):T=e[29];let L;e[30]!==r||e[31]!==o||e[32]!==m||e[33]!==i?(L=r&&r.length>0&&t.jsx(ce,{label:"Tags",items:r,selectedItems:m,onToggle:i,onClear:()=>o([])}),e[30]=r,e[31]=o,e[32]=m,e[33]=i,e[34]=L):L=e[34],e[35]!==L||e[36]!==T?(h=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[u,T,L]}),e[35]=L,e[36]=T,e[37]=h):h=e[37],N="flex items-center gap-3 flex-wrap px-5 py-3";let F;e[38]!==n||e[39]!==d?(F=K=>{const _=n.includes(K.value);return t.jsxs("div",{onClick:()=>d(K.value),className:ie("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",_?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[t.jsx("span",{children:K.value}),_&&t.jsx("span",{onClick:E=>{E.stopPropagation(),d(K.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},K.value)},e[38]=n,e[39]=d,e[40]=F):F=e[40],P=y.map(F),e[9]=l,e[10]=r,e[11]=c,e[12]=o,e[13]=n,e[14]=m,e[15]=d,e[16]=i,e[17]=R,e[18]=b,e[19]=N,e[20]=P,e[21]=$,e[22]=h,e[23]=C}else R=e[17],b=e[18],N=e[19],P=e[20],$=e[21],h=e[22],C=e[23];let k;if(e[41]!==R||e[42]!==d||e[43]!==C){let y;e[45]!==C?(y=T=>!C.has(T),e[45]=C,e[46]=y):y=e[46];let u;e[47]!==d?(u=T=>t.jsxs("div",{onClick:()=>d(T),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:T}),t.jsx("span",{onClick:L=>{L.stopPropagation(),d(T)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`cat-${T}`),e[47]=d,e[48]=u):u=e[48],k=R.filter(y).map(u),e[41]=R,e[42]=d,e[43]=C,e[44]=k}else k=e[44];let v;if(e[49]!==b||e[50]!==i){let y;e[52]!==i?(y=u=>t.jsxs("div",{onClick:()=>i(u),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:u}),t.jsx("span",{onClick:T=>{T.stopPropagation(),i(u)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`tag-${u}`),e[52]=i,e[53]=y):y=e[53],v=b.map(y),e[49]=b,e[50]=i,e[51]=v}else v=e[51];let z;e[54]!==S||e[55]!==g?(z=g&&t.jsxs(Y,{variant:"ghost",size:"sm",onClick:S,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[t.jsx(te,{size:14}),"Clear all"]}),e[54]=S,e[55]=g,e[56]=z):z=e[56];let w;e[57]!==z||e[58]!==N||e[59]!==P||e[60]!==k||e[61]!==v?(w=t.jsxs("div",{className:N,children:[P,k,v,z]}),e[57]=z,e[58]=N,e[59]=P,e[60]=k,e[61]=v,e[62]=w):w=e[62];let x;return e[63]!==w||e[64]!==$||e[65]!==h?(x=t.jsxs("div",{className:$,children:[h,w]}),e[63]=w,e[64]=$,e[65]=h,e[66]=x):x=e[66],x}function ot(s){return s.value}function it(s,e){if(!e)return s;const r=e.toLowerCase();return s.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function at(s){return s.verified===!0||s._meta?.["mcp.mesh"]?.verified===!0}function ct(s){const e=Q.c(55),{registryId:r,listToolName:l,filtersToolName:m,storePrivateOnly:n}=s,[o,c]=q.useState(""),a=Ze(o,300),g=me(),{org:I}=re(),{scrollRef:i,saveScrollPosition:p,handleScroll:d}=Xe(`store-discovery:${r}`);let j;e[0]!==a||e[1]!==m||e[2]!==l||e[3]!==r?(j={registryId:r,listToolName:l,filtersToolName:m,search:a},e[0]=a,e[1]=m,e[2]=l,e[3]=r,e[4]=j):j=e[4];const{items:S,hasMore:R,isLoadingMore:b,isInitialLoading:N,isFetching:P,error:$,loadMore:h,availableTags:C,availableCategories:k,selectedTags:v,selectedCategories:z,setSelectedTags:w,setSelectedCategories:x,hasActiveFilters:y}=tt(j);let u,T,L,F;if(e[5]!==a||e[6]!==P||e[7]!==N||e[8]!==S||e[9]!==o||e[10]!==n){const O=o?it(S,o):S;F=n?O.filter(dt):O,u=(o!==a||P)&&!N&&!!o,L=F.filter(at),T=F.filter(M=>!L.find(U=>U.id===M.id)),e[5]=a,e[6]=P,e[7]=N,e[8]=S,e[9]=o,e[10]=n,e[11]=u,e[12]=T,e[13]=L,e[14]=F}else u=e[11],T=e[12],L=e[13],F=e[14];const K=T;let _;e[15]!==g||e[16]!==I.slug||e[17]!==r||e[18]!==p?(_=O=>{p();const M=We(O.name||O.title||O.server?.title||""),U=typeof O.id=="string"&&O.id.includes("/"),J=typeof O.server?.name=="string"&&O.server.name.includes("/"),f=U&&!J?O.id:O.server?.name||O.id||"";g({to:"/$org/$project/store/$appName",params:{org:I.slug,project:de,appName:M},search:{registryId:r,serverName:f}})},e[15]=g,e[16]=I.slug,e[17]=r,e[18]=p,e[19]=_):_=e[19];const E=_;let W;e[20]!==d||e[21]!==R||e[22]!==b||e[23]!==h?(W=O=>{if(d(),!R||b)return;const M=O.currentTarget;M.scrollHeight-M.scrollTop-M.clientHeight<200&&h()},e[20]=d,e[21]=R,e[22]=b,e[23]=h,e[24]=W):W=e[24];const H=W;let G;e[25]!==u||e[26]!==o?(G=t.jsx(Ge,{value:o,onChange:c,placeholder:"Search for an MCP Server...",isSearching:u}),e[25]=u,e[26]=o,e[27]=G):G=e[27];let D;e[28]!==k||e[29]!==C||e[30]!==z||e[31]!==v||e[32]!==x||e[33]!==w?(D=t.jsx(nt,{availableTags:C,availableCategories:k,selectedTags:v,selectedCategories:z,onTagChange:w,onCategoryChange:x}),e[28]=k,e[29]=C,e[30]=z,e[31]=v,e[32]=x,e[33]=w,e[34]=D):D=e[34];let B;e[35]!==K||e[36]!==$||e[37]!==E||e[38]!==y||e[39]!==R||e[40]!==N||e[41]!==b||e[42]!==u||e[43]!==o||e[44]!==L||e[45]!==F?(B=t.jsx("div",{className:"p-5",children:t.jsx("div",{children:$&&!N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"size-8 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),$.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:$.message})]}),t.jsxs(Y,{variant:"outline",size:"sm",onClick:mt,children:[t.jsx(ge,{className:"size-4"}),"Try again"]})]}):N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):F.length===0&&!y?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(xe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),t.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):F.length===0&&y&&!o?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(fe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):o&&F.length===0&&!u?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(pe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):t.jsxs("div",{className:"flex flex-col gap-8",children:[u&&F.length===0&&t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),L.length>0&&t.jsx(ae,{items:L,title:"Verified",onItemClick:E}),K.length>0&&t.jsx(ae,{items:K,title:L.length>0?"All":"",onItemClick:E}),R&&b&&t.jsx("div",{className:"flex justify-center py-8",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(se,{size:20,className:"animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[35]=K,e[36]=$,e[37]=E,e[38]=y,e[39]=R,e[40]=N,e[41]=b,e[42]=u,e[43]=o,e[44]=L,e[45]=F,e[46]=B):B=e[46];let A;e[47]!==H||e[48]!==i||e[49]!==B?(A=t.jsx("div",{ref:i,className:"flex-1 overflow-y-auto",onScroll:H,children:B}),e[47]=H,e[48]=i,e[49]=B,e[50]=A):A=e[50];let V;return e[51]!==G||e[52]!==D||e[53]!==A?(V=t.jsxs("div",{className:"flex flex-col h-full",children:[G,D,A]}),e[51]=G,e[52]=D,e[53]=A,e[54]=V):V=e[54],V}function mt(){return window.location.reload()}function dt(s){return s.is_public!==!0}function ut(s){const e=Q.c(11),{registryId:r,storePrivateOnly:l}=s,m=Be(r),n=m?.tools;let o;e[0]!==n?(o=Ee(n),e[0]=n,e[1]=o):o=e[1];const c=o;if(!c){let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"bg-muted p-3 rounded-full",children:t.jsx(xe,{className:"size-8 text-muted-foreground"})}),e[2]=d):d=e[2];let j;return e[3]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[d,t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=j):j=e[3],j}const a=m?.tools;let g;e[4]!==a?(g=Oe(a),e[4]=a,e[5]=g):g=e[5];const i=g||void 0;let p;return e[6]!==c||e[7]!==r||e[8]!==l||e[9]!==i?(p=t.jsx(ct,{registryId:r,listToolName:c,filtersToolName:i,storePrivateOnly:l}),e[6]=c,e[7]=r,e[8]=l,e[9]=i,e[10]=p):p=e[10],p}function ft(s){const e=Q.c(43),{registries:r,value:l,onValueChange:m,onAddWellKnown:n,wellKnownRegistries:o,placeholder:c}=s,a=c===void 0?"Select a registry...":c,[g,I]=q.useState(!1);let i,p,d,j,S,R,b,N;if(e[0]!==g||e[1]!==a||e[2]!==r||e[3]!==l){let w;e[12]!==l?(w=y=>y.id===l,e[12]=l,e[13]=w):w=e[13];const x=r.find(w);p=ve,b=g,N=I,i=be,R=!0,d="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(j=ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=j):j=e[14],S=x?t.jsxs("span",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}):t.jsx("span",{className:"text-muted-foreground",children:a}),e[0]=g,e[1]=a,e[2]=r,e[3]=l,e[4]=i,e[5]=p,e[6]=d,e[7]=j,e[8]=S,e[9]=R,e[10]=b,e[11]=N}else i=e[4],p=e[5],d=e[6],j=e[7],S=e[8],R=e[9],b=e[10],N=e[11];let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Se,{className:"size-4 opacity-50"}),e[15]=P):P=e[15];let $;e[16]!==d||e[17]!==j||e[18]!==S?($=t.jsxs("button",{type:d,className:j,children:[S,P]}),e[16]=d,e[17]=j,e[18]=S,e[19]=$):$=e[19];let h;e[20]!==i||e[21]!==R||e[22]!==$?(h=t.jsx(i,{asChild:R,children:$}),e[20]=i,e[21]=R,e[22]=$,e[23]=h):h=e[23];let C;if(e[24]!==m||e[25]!==r||e[26]!==l){let w;e[28]!==m||e[29]!==l?(w=x=>t.jsxs("button",{type:"button",onClick:()=>{m(x.id??x.name),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}),l===(x.id??x.name)&&t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t.jsx(Ce,{className:"size-4"})})]},x.id??x.name),e[28]=m,e[29]=l,e[30]=w):w=e[30],C=r.map(w),e[24]=m,e[25]=r,e[26]=l,e[27]=C}else C=e[27];let k;e[31]!==n||e[32]!==o?(k=o.length>0&&t.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[t.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),o.map(w=>t.jsxs("button",{type:"button",onClick:()=>{n(w),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[w.icon?t.jsx("img",{src:w.icon,alt:w.title,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:w.title.slice(0,1).toUpperCase()}),t.jsx("span",{className:"flex-1",children:w.title})]}),t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:t.jsx(qe,{size:16})})]},w.id??w.title))]}),e[31]=n,e[32]=o,e[33]=k):k=e[33];let v;e[34]!==C||e[35]!==k?(v=t.jsxs(Ne,{align:"end",className:"w-auto min-w-[200px] p-1",children:[C,k]}),e[34]=C,e[35]=k,e[36]=v):v=e[36];let z;return e[37]!==p||e[38]!==h||e[39]!==v||e[40]!==b||e[41]!==N?(z=t.jsxs(p,{open:b,onOpenChange:N,children:[h,v]}),e[37]=p,e[38]=h,e[39]=v,e[40]=b,e[41]=N,e[42]=z):z=e[42],z}function xt({registries:s,onConnected:e}){const r=ye(),{org:{slug:l}}=re(),{data:m}=Ie.useSession(),n=me(),[o,c]=q.useState(!1),a=s[0],g=async()=>{if(!(!a||!m?.user?.id)){c(!0);try{const i=await r.create.mutateAsync(a);e?.(i.id)}finally{c(!1)}}},I=()=>{n({to:"/$org/$project/mcps",params:{org:l,project:de},search:{action:"create"}})};return t.jsx(Ve,{image:t.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:t.jsxs(t.Fragment,{children:[t.jsxs(Y,{variant:"outline",onClick:g,disabled:o||!a,children:[a?.icon&&t.jsx("img",{src:a.icon,alt:"",className:"size-4"}),o?"Installing...":"Install Registry"]}),t.jsx(Y,{variant:"outline",onClick:I,children:"Custom Connection"})]})})}function gt(s){const e=Q.c(15),{error:r,onRetry:l,registryName:m}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"h-6 w-6 text-destructive"})}),e[0]=n):n=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=o):o=e[1];let c;e[2]!==m?(c=t.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",t.jsx("strong",{children:m})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=m,e[3]=c):c=e[3];let a;e[4]!==r?(a=r?.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=a):a=e[5];let g;e[6]!==c||e[7]!==a?(g=t.jsxs("div",{className:"space-y-2",children:[o,c,a]}),e[6]=c,e[7]=a,e[8]=g):g=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ge,{className:"size-4"}),e[9]=I):I=e[9];let i;e[10]!==l?(i=t.jsxs(Y,{variant:"outline",size:"sm",onClick:l,children:[I,"Try again"]}),e[10]=l,e[11]=i):i=e[11];let p;return e[12]!==g||e[13]!==i?(p=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[n,g,i]}),e[12]=g,e[13]=i,e[14]=p):p=e[14],p}function is(){const s=Q.c(49),{org:e,project:r}=re(),l=De(),m=ye(),n=Te(),o=n.location.pathname.includes("/store/")&&n.location.pathname.split("/").length>3,c=He(l);let a;s[0]!==e.id?(a=Ke.SELF(e.id),s[0]=e.id,s[1]=a):a=s[1];const g=a,I=r.enabledPlugins,i=I==null||I.includes(ne),p=c.filter(f=>f.id!==g?!0:i);let d;s[2]!==g?(d=f=>f.id===g,s[2]=g,s[3]=d):d=s[3];const j=p.some(d);let S;s[4]!==e.id?(S={connectionId:_e,orgId:e.id},s[4]=e.id,s[5]=S):S=s[5];const R=je(S);let b;s[6]!==r.id||s[7]!==R?(b=async()=>{const f=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:ne}});return f.structuredContent??f},s[6]=r.id,s[7]=R,s[8]=b):b=s[8];const{data:N}=he({queryKey:oe.projectPluginConfig(r.id??"",ne),queryFn:b,enabled:j&&!!r.id,staleTime:6e4}),P=N?.config?.settings;let $;s[9]!==P||s[10]!==g?($=f=>f.id===g&&P?{id:f.id,name:P.registryName||f.title,icon:P.registryIcon||f.icon||void 0}:{id:f.id,name:f.title,icon:f.icon||void 0},s[9]=P,s[10]=g,s[11]=$):$=s[11];const h=p.map($);let C;s[12]!==e.slug?(C=Je.selectedRegistry(e.slug),s[12]=e.slug,s[13]=C):C=s[13];const[k,v]=Qe(C,ht);let z;s[14]!==k?(z=f=>f.id===k,s[14]=k,s[15]=z):z=s[15];const x=p.find(z)?.id||p[0]?.id||"",y=x===g&&P?.storePrivateOnly===!0;let u;s[16]!==e.id?(u=Ae(e.id),s[16]=e.id,s[17]=u):u=s[17];let T;s[18]!==u?(T=[u],s[18]=u,s[19]=T):T=s[19];const L=T;let F;s[20]===Symbol.for("react.memo_cache_sentinel")?(F=[Me()],s[20]=F):F=s[20];const K=F;let _;s[21]!==m.create||s[22]!==v?(_=async f=>{const Z=await m.create.mutateAsync(f);v(Z.id)},s[21]=m.create,s[22]=v,s[23]=_):_=s[23];const E=_,W=new Set(p.map(pt)),H=L.filter(f=>f.id&&!W.has(f.id)),G=K.filter(f=>f.id&&!W.has(f.id));if(o){let f;return s[24]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Re,{}),s[24]=f):f=s[24],f}let D;s[25]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(X.Header.Left,{children:t.jsx(Pe,{children:t.jsx($e,{children:t.jsx(ke,{children:t.jsx(ze,{children:"Store"})})})})}),s[25]=D):D=s[25];let B;s[26]!==E?(B=async f=>E(f),s[26]=E,s[27]=B):B=s[27];let A;s[28]!==H||s[29]!==x||s[30]!==h||s[31]!==v||s[32]!==B?(A=t.jsxs(X.Header,{children:[D,t.jsx(X.Header.Right,{children:t.jsx(ft,{wellKnownRegistries:H,registries:h,value:x,onValueChange:v,onAddWellKnown:B,placeholder:"Select store..."})})]}),s[28]=H,s[29]=x,s[30]=h,s[31]=v,s[32]=B,s[33]=A):A=s[33];let V;s[34]!==x||s[35]!==h?(V=f=>{const{error:Z,resetError:le}=f;return t.jsx(gt,{error:Z,onRetry:le,registryName:h.find(ee=>ee.id===x)?.name??"registry"})},s[34]=x,s[35]=h,s[36]=V):V=s[36];let O;s[37]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),s[37]=O):O=s[37];let M;s[38]!==G||s[39]!==x||s[40]!==v||s[41]!==y?(M=t.jsx(q.Suspense,{fallback:O,children:x?t.jsx(ut,{registryId:x,storePrivateOnly:y}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(xt,{registries:G,onConnected:f=>{v(f)}})})}),s[38]=G,s[39]=x,s[40]=v,s[41]=y,s[42]=M):M=s[42];let U;s[43]!==V||s[44]!==M?(U=t.jsx(X.Content,{children:t.jsx(Ye,{fallback:V,children:M})}),s[43]=V,s[44]=M,s[45]=U):U=s[45];let J;return s[46]!==A||s[47]!==U?(J=t.jsxs(X,{children:[A,U]}),s[46]=A,s[47]=U,s[48]=J):J=s[48],J}function pt(s){return s.id}function ht(s){return s??""}export{is as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as b,c as y,j as s,u as se,d as ie,t as re}from"./index-CWe8J-Hq.js";import{V as le,C as g}from"./index-U9Vr21E9.js";import{E as oe,i as ne,T as ae,t as ce}from"./editable-thread-title-BgZLa0-S.js";import{E as me}from"./error-boundary--iNQ8gta.js";import{u as U,b as de}from"./context-D9CqM7rN.js";import{I as J}from"./integration-icon-B1ucSrYo.js";import{P as fe,a as pe,b as ue}from"./popover-DB2HonEp.js";import{S as K}from"./skeleton-jyQZqxOG.js";import{c as Q,B as W}from"./button-tfLPNtWJ.js";import{i as he,d as xe}from"./constants-CL8_8_oj.js";import{b as ge}from"./use-virtual-mcp-BwOE6c59.js";import{i as je}from"./ChevronRight-CnxoKS9T.js";import{t as X}from"./Users03-C8GZAEof.js";import{P as V}from"./index-CVuBarxG.js";import{a as Z,b as q,T as G}from"./tooltip-CnmABkU-.js";import{s as be}from"./Plus-DG0waRPt.js";import"./spinner-UfnawxyY.js";import"./use-mcp-prompts-D_mlcnc9.js";import"./useQuery-BHHN8tIv.js";import"./dialog-Dy_XRMC3.js";import"./X-C5YHEo86.js";import"./form-Bu9G0YBm.js";import"./label-C9M8nB_D.js";import"./input-CNUW7CdE.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-CdWHzWi2.js";import"./ChevronDown-CpMv-ZCm.js";import"./Edit01-DY0U7OhY.js";import"./XCircle-CDdOtTVY.js";import"./AlertCircle-gTiRcsL2.js";import"./AlertTriangle-BtlWEVub.js";import"./tabs-BkMV4XdU.js";import"./ArrowLeft-wb84lLAu.js";import"./use-copy-BPEj9iD9.js";import"./badge-DX_NRCrB.js";import"./use-deco-chat-open-BPzhNEVE.js";import"./localstorage-keys-B08XCBrR.js";import"./useMutation-Cwew6NK8.js";import"./Check-DeEBcLrH.js";import"./Code01-B6d_3DvF.js";import"./SearchMd-D25_gEXb.js";import"./use-create-virtual-mcp-CDu5HI2i.js";import"./deco-constants-Co7853uN.js";import"./Copy01-CLunLJKI.js";import"./marked.esm-BaswSlok.js";import"./markdown-Beha7Jtr.js";import"./types-BRllmd3O.js";import"./Eye-B15TPEDO.js";import"./Globe02-3loTulSB.js";import"./RefreshCw01-fyFGfvzx.js";import"./XClose-gSM6r0nZ.js";import"./select-DC-MYgCv.js";import"./index-D10n-K36.js";import"./collection-search-DP3VOxDY.js";import"./Loading01-77NTYviO.js";import"./use-connection-uvGXb5bB.js";import"./generate-id-Dyweu44Y.js";import"./Clock-2a7XM267.js";import"./Trash01-CZXAnYkd.js";import"./decopilot-events-Brt4gAR6.js";import"./use-llm-D1Sybk2o.js";import"./use-binding-B-iUklfM.js";import"./binder-BWaLB8kX.js";import"./File06-UyeJp3Yn.js";import"./Grid01-Dq0Wc8TI.js";import"./Image01-Cqm-HpUD.js";import"./RefreshCcw01-DgNkgC_r.js";import"./Settings01-CLue_Mcp.js";import"./useSuspenseInfiniteQuery-LTF73aNG.js";import"./infiniteQueryObserver-sdc9LyR0.js";import"./Container-KLxmLuBM.js";import"./use-mobile-o_stuDvp.js";const Y=({size:e=24,color:t="currentColor",...i})=>b.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},b.createElement("path",{d:"m8.59 13.51 6.83 3.98m-.01-10.98-6.82 3.98M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm12 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Y.displayName="Share07";function ye(e){const t=y.c(15),{agent:i}=e,{setVirtualMcpId:u}=U();let o;t[0]!==i.id||t[1]!==u?(o=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=o):o=t[2];const r=o;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=Q("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const d=`Select agent ${i.title}`;let l;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(X,{size:20}),t[4]=l):l=t[4];let c;t[5]!==i.icon||t[6]!==i.title?(c=s.jsx(J,{icon:i.icon,name:i.title,fallbackIcon:l}),t[5]=i.icon,t[6]=i.title,t[7]=c):c=t[7];let a;t[8]!==i.title?(a=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=a):a=t[9];let n;return t[10]!==r||t[11]!==d||t[12]!==c||t[13]!==a?(n=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":d,children:[c,a]}),t[10]=r,t[11]=d,t[12]=c,t[13]=a,t[14]=n):n=t[14],n}function Ne(e){const t=y.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:o}=e,[r,m]=b.useState(!1),d=b.useRef(null);let l,c;t[0]!==r?(l=()=>{r&&setTimeout(()=>{d.current?.focus()},0)},c=[r],t[0]=r,t[1]=l,t[2]=c):(l=t[1],c=t[2]),b.useEffect(l,c);let a;t[3]!==o?(a=N=>{o(N),m(!1)},t[3]=o,t[4]=a):a=t[4];const n=a;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=Q("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=f):f=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(fe,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(je,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let h;t[7]!==n||t[8]!==u||t[9]!==i?(h=s.jsx(pe,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(le,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:n,searchInputRef:d})}),t[7]=n,t[8]=u,t[9]=i,t[10]=h):h=t[10];let j;return t[11]!==r||t[12]!==h?(j=s.jsxs(ue,{open:r,onOpenChange:m,children:[p,h]}),t[11]=r,t[12]=h,t[13]=j):j=t[13],j}function Se(){const e=y.c(20),t=ge(),{selectedVirtualMcp:i,setVirtualMcpId:u}=U();let o,r,m,d,l,c;if(e[0]!==t){l=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(Ce).slice(0,6);if(h.length===0){l=null;break e}c=t.map(ve),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=d):d=e[7],o="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=h.map(_e)}e[0]=t,e[1]=o,e[2]=r,e[3]=m,e[4]=d,e[5]=l,e[6]=c}else o=e[1],r=e[2],m=e[3],d=e[4],l=e[5],c=e[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;const a=i?.id??null;let n;e[8]!==u||e[9]!==a||e[10]!==c?(n=s.jsx(Ne,{virtualMcps:c,selectedVirtualMcpId:a,onVirtualMcpChange:u}),e[8]=u,e[9]=a,e[10]=c,e[11]=n):n=e[11];let f;e[12]!==o||e[13]!==r||e[14]!==n?(f=s.jsxs("div",{className:o,children:[r,n]}),e[12]=o,e[13]=r,e[14]=n,e[15]=f):f=e[15];let p;return e[16]!==m||e[17]!==d||e[18]!==f?(p=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=p):p=e[19],p}function _e(e){return s.jsx(ye,{agent:e},e.id??"default")}function ve(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function Ce(e){return e.id!==null&&!he(e.id)}function we(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(K,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(ke)})]}),e[1]=i):i=e[1],i}function ke(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(K,{className:"size-6 rounded-md shrink-0"}),s.jsx(K,{className:"h-4 w-full"})]},t)}function Te(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(b.Suspense,{fallback:s.jsx(we,{}),children:s.jsx(Se,{})}),e[0]=t):t=e[0],t}function Me(){const e=new Date().getHours();return e>=5&&e<12?"Morning":e>=12&&e<17?"Afternoon":e>=17&&e<22?"Evening":"Night"}function ze(){const e=y.c(54),{org:t}=se(),{data:i}=ie.useSession(),{modelsConnections:u,isChatEmpty:o,activeThreadId:r,createThread:m,switchToThread:d,threads:l,selectedVirtualMcp:c}=de();let a;if(e[0]!==r||e[1]!==l){let x;e[3]!==r?(x=te=>te.id===r,e[3]=r,e[4]=x):x=e[4],a=l.find(x),e[0]=r,e[1]=l,e[2]=a}else a=e[2];const n=a,[f,p]=b.useState(!1);let h;e[5]!==i?.user?.name?(h=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=h):h=e[6];const j=h;let N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N=Me(),e[7]=N):N=e[7];const ee=N;let $;e[8]!==t.id?($=xe(t.id),e[8]=t.id,e[9]=$):$=e[9];const A=c??$;if(u.length===0){let x;return e[10]!==t?(x=s.jsx("div",{className:"flex flex-col size-full bg-background items-center justify-center",children:s.jsx(g.NoLlmBindingEmptyState,{org:t})}),e[10]=t,e[11]=x):x=e[11],x}let S;e[12]!==n?(S=n?.title&&s.jsx(oe,{threadId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[12]=n,e[13]=S):S=e[13];let _;e[14]!==S?(_=s.jsx(V.Header.Left,{className:"gap-2",children:S}),e[14]=S,e[15]=_):_=e[15];let v;e[16]!==m?(v=()=>m(),e[16]=m,e[17]=v):v=e[17];let H;e[18]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(be,{size:16}),e[18]=H):H=e[18];let C;e[19]!==o||e[20]!==v?(C=s.jsx(Z,{asChild:!0,children:s.jsx(W,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:v,disabled:o,"aria-label":"New chat",children:H})}),e[19]=o,e[20]=v,e[21]=C):C=e[21];let L;e[22]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(q,{children:"New chat"}),e[22]=L):L=e[22];let w;e[23]!==C?(w=s.jsxs(G,{children:[C,L]}),e[23]=C,e[24]=w):w=e[24];let R;e[25]===Symbol.for("react.memo_cache_sentinel")?(R=()=>p(!0),e[25]=R):R=e[25];let B;e[26]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsxs(G,{children:[s.jsx(Z,{asChild:!0,children:s.jsx(W,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:R,"aria-label":"Chat history",children:s.jsx(ne,{size:16})})}),s.jsx(q,{children:"Chat history"})]}),e[26]=B):B=e[26];let O;e[27]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Y,{size:16}),e[27]=O):O=e[27];let k;e[28]!==o?(k=s.jsx(Z,{asChild:!0,children:s.jsx(W,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ie,disabled:o,"aria-label":"Share chat",children:O})}),e[28]=o,e[29]=k):k=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(q,{children:"Share chat"}),e[30]=D):D=e[30];let T;e[31]!==k?(T=s.jsxs(G,{children:[k,D]}),e[31]=k,e[32]=T):T=e[32];let M;e[33]!==w||e[34]!==T?(M=s.jsxs(V.Header.Right,{className:"gap-1",children:[w,B,T]}),e[33]=w,e[34]=T,e[35]=M):M=e[35];let z;e[36]!==M||e[37]!==_?(z=s.jsxs(V.Header,{className:"flex-none z-10 bg-background",children:[_,M]}),e[36]=M,e[37]=_,e[38]=z):z=e[38];let I;e[39]!==A||e[40]!==o||e[41]!==j?(I=o?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx(J,{icon:A.icon,name:A.title,size:"md",fallbackIcon:s.jsx(X,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-lg font-medium text-foreground",children:[ee," ",j,","]}),s.jsx("p",{className:"text-base text-muted-foreground opacity-50 mb-0",children:"What are we building today?"})]}),s.jsx("div",{className:"w-full -mt-1",children:s.jsx(g.Input,{})}),s.jsx(g.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(Te,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(g.Main,{children:s.jsx(g.Messages,{})}),s.jsx(g.Footer,{children:s.jsx(g.Input,{})})]}),e[39]=A,e[40]=o,e[41]=j,e[42]=I):I=e[42];let E;e[43]!==d?(E=async x=>{await d(x),p(!1)},e[43]=d,e[44]=E):E=e[44];let P;e[45]!==r||e[46]!==f||e[47]!==E||e[48]!==l?(P=s.jsx(ae,{open:f,onOpenChange:p,threads:l,activeThreadId:r,onThreadSelect:E}),e[45]=r,e[46]=f,e[47]=E,e[48]=l,e[49]=P):P=e[49];let F;return e[50]!==z||e[51]!==I||e[52]!==P?(F=s.jsxs(g,{children:[z,I,P]}),e[50]=z,e[51]=I,e[52]=P,e[53]=F):F=e[53],F}function Ie(){re.info("Share feature coming soon")}function Ee(e){const t=y.c(14),{error:i,onRetry:u}=e,o=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(V.Header,{className:"flex-none",children:[s.jsx(V.Header.Left,{className:"gap-2"}),s.jsx(V.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(ce,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const d=o?"Unable to load models":"Something went wrong";let l;t[2]!==d?(l=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=l):l=t[3];const c=o?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let a;t[4]!==c?(a=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=a):a=t[5];let n;t[6]!==l||t[7]!==a?(n=s.jsxs("div",{className:"space-y-2",children:[l,a]}),t[6]=l,t[7]=a,t[8]=n):n=t[8];let f;t[9]!==u?(f=s.jsx(W,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=f):f=t[10];let p;return t[11]!==n||t[12]!==f?(p=s.jsxs(g,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,n,f]})})]}),t[11]=n,t[12]=f,t[13]=p):p=t[13],p}function Yt(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(me,{fallback:Pe,children:s.jsx(b.Suspense,{fallback:s.jsx(g.Skeleton,{}),children:s.jsx(ze,{})})}),e[0]=t):t=e[0],t}function Pe(e){const{error:t,resetError:i}=e;return s.jsx(Ee,{error:t,onRetry:i})}export{Yt as default};
|
|
1
|
+
import{r as b,c as y,j as s,u as se,d as ie,t as re}from"./index-DGcrprcR.js";import{V as le,C as g}from"./index-4ixjLWXM.js";import{E as oe,i as ne,T as ae,t as ce}from"./editable-thread-title-CZzMY2v8.js";import{E as me}from"./error-boundary-B8Qhob-A.js";import{u as U,b as de}from"./context-CADU4rSF.js";import{I as J}from"./integration-icon-CgBX_ks3.js";import{P as fe,a as pe,b as ue}from"./popover-Nu95EjX8.js";import{S as K}from"./skeleton-DQ8ccdHg.js";import{c as Q,B as W}from"./button-BShrPPQB.js";import{i as he,d as xe}from"./constants-t4cYcaOj.js";import{b as ge}from"./use-virtual-mcp-BpLVEDAn.js";import{i as je}from"./ChevronRight-Ddi-3F9S.js";import{t as X}from"./Users03-C58KX3if.js";import{P as V}from"./index--aNT0bd8.js";import{a as Z,b as q,T as G}from"./tooltip-B4YNhEm3.js";import{s as be}from"./Plus-GyEYmH7H.js";import"./spinner-BX-oePRV.js";import"./use-mcp-prompts-DaJitUnA.js";import"./useQuery-AhBFUcM2.js";import"./dialog-DZ73hYD2.js";import"./X-CiUv7JeK.js";import"./form-C6Ox6-3I.js";import"./label-qeOE7dIh.js";import"./input-DvTN1BP6.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-Cfyg5juo.js";import"./ChevronDown-BufhPURG.js";import"./Edit01-DKSRjmBx.js";import"./XCircle-c-fGPkxr.js";import"./AlertCircle-Bi6qVvrN.js";import"./AlertTriangle-DFZ90wgN.js";import"./tabs-Cai1peX-.js";import"./ArrowLeft-AtFbPu15.js";import"./use-copy-BUl6Sk74.js";import"./badge-wZkXx6tq.js";import"./use-deco-chat-open-B8cuCwuQ.js";import"./localstorage-keys-BQX8_0BZ.js";import"./useMutation-DDPkMzlm.js";import"./Check-Cm2iUQXG.js";import"./Code01-B6JRytqX.js";import"./SearchMd-CST_zdt_.js";import"./use-create-virtual-mcp-Cor7Xu1g.js";import"./deco-constants-DwNVBkXd.js";import"./Copy01-B3XYrA0z.js";import"./marked.esm-BaswSlok.js";import"./markdown-BhF_-YvH.js";import"./types-B4eKYkCD.js";import"./Eye-DOWXmHLb.js";import"./Globe02-YF4Iol6V.js";import"./RefreshCw01-BSAySLXB.js";import"./XClose-BOJUsKo6.js";import"./select-DQBmlhEf.js";import"./index-BfJ-GPYf.js";import"./collection-search-epuaoKsC.js";import"./Loading01-Du7SSOFL.js";import"./use-connection-xUIwVn2H.js";import"./generate-id-Dyweu44Y.js";import"./Clock-Bvm7X8ou.js";import"./Trash01-DTBe8XH-.js";import"./decopilot-events-Brt4gAR6.js";import"./use-llm-CuiygiQa.js";import"./use-binding-B4TEVgwJ.js";import"./binder-CO5VHJsz.js";import"./File06-Bcrb96z7.js";import"./Grid01-DWFyhMlk.js";import"./Image01-BWp0soXg.js";import"./RefreshCcw01-CSeua2ip.js";import"./Settings01-DAlQl5Hv.js";import"./useSuspenseInfiniteQuery-CuoTdKGU.js";import"./infiniteQueryObserver-BxKDZ2ST.js";import"./Container-B3EmXRhZ.js";import"./use-mobile-D-DrP5e0.js";const Y=({size:e=24,color:t="currentColor",...i})=>b.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},b.createElement("path",{d:"m8.59 13.51 6.83 3.98m-.01-10.98-6.82 3.98M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm12 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Y.displayName="Share07";function ye(e){const t=y.c(15),{agent:i}=e,{setVirtualMcpId:u}=U();let o;t[0]!==i.id||t[1]!==u?(o=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=o):o=t[2];const r=o;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=Q("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const d=`Select agent ${i.title}`;let l;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(X,{size:20}),t[4]=l):l=t[4];let c;t[5]!==i.icon||t[6]!==i.title?(c=s.jsx(J,{icon:i.icon,name:i.title,fallbackIcon:l}),t[5]=i.icon,t[6]=i.title,t[7]=c):c=t[7];let a;t[8]!==i.title?(a=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=a):a=t[9];let n;return t[10]!==r||t[11]!==d||t[12]!==c||t[13]!==a?(n=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":d,children:[c,a]}),t[10]=r,t[11]=d,t[12]=c,t[13]=a,t[14]=n):n=t[14],n}function Ne(e){const t=y.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:o}=e,[r,m]=b.useState(!1),d=b.useRef(null);let l,c;t[0]!==r?(l=()=>{r&&setTimeout(()=>{d.current?.focus()},0)},c=[r],t[0]=r,t[1]=l,t[2]=c):(l=t[1],c=t[2]),b.useEffect(l,c);let a;t[3]!==o?(a=N=>{o(N),m(!1)},t[3]=o,t[4]=a):a=t[4];const n=a;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=Q("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=f):f=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(fe,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(je,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let h;t[7]!==n||t[8]!==u||t[9]!==i?(h=s.jsx(pe,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(le,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:n,searchInputRef:d})}),t[7]=n,t[8]=u,t[9]=i,t[10]=h):h=t[10];let j;return t[11]!==r||t[12]!==h?(j=s.jsxs(ue,{open:r,onOpenChange:m,children:[p,h]}),t[11]=r,t[12]=h,t[13]=j):j=t[13],j}function Se(){const e=y.c(20),t=ge(),{selectedVirtualMcp:i,setVirtualMcpId:u}=U();let o,r,m,d,l,c;if(e[0]!==t){l=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(Ce).slice(0,6);if(h.length===0){l=null;break e}c=t.map(ve),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=d):d=e[7],o="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=h.map(_e)}e[0]=t,e[1]=o,e[2]=r,e[3]=m,e[4]=d,e[5]=l,e[6]=c}else o=e[1],r=e[2],m=e[3],d=e[4],l=e[5],c=e[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;const a=i?.id??null;let n;e[8]!==u||e[9]!==a||e[10]!==c?(n=s.jsx(Ne,{virtualMcps:c,selectedVirtualMcpId:a,onVirtualMcpChange:u}),e[8]=u,e[9]=a,e[10]=c,e[11]=n):n=e[11];let f;e[12]!==o||e[13]!==r||e[14]!==n?(f=s.jsxs("div",{className:o,children:[r,n]}),e[12]=o,e[13]=r,e[14]=n,e[15]=f):f=e[15];let p;return e[16]!==m||e[17]!==d||e[18]!==f?(p=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=p):p=e[19],p}function _e(e){return s.jsx(ye,{agent:e},e.id??"default")}function ve(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function Ce(e){return e.id!==null&&!he(e.id)}function we(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(K,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(ke)})]}),e[1]=i):i=e[1],i}function ke(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(K,{className:"size-6 rounded-md shrink-0"}),s.jsx(K,{className:"h-4 w-full"})]},t)}function Te(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(b.Suspense,{fallback:s.jsx(we,{}),children:s.jsx(Se,{})}),e[0]=t):t=e[0],t}function Me(){const e=new Date().getHours();return e>=5&&e<12?"Morning":e>=12&&e<17?"Afternoon":e>=17&&e<22?"Evening":"Night"}function ze(){const e=y.c(54),{org:t}=se(),{data:i}=ie.useSession(),{modelsConnections:u,isChatEmpty:o,activeThreadId:r,createThread:m,switchToThread:d,threads:l,selectedVirtualMcp:c}=de();let a;if(e[0]!==r||e[1]!==l){let x;e[3]!==r?(x=te=>te.id===r,e[3]=r,e[4]=x):x=e[4],a=l.find(x),e[0]=r,e[1]=l,e[2]=a}else a=e[2];const n=a,[f,p]=b.useState(!1);let h;e[5]!==i?.user?.name?(h=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=h):h=e[6];const j=h;let N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N=Me(),e[7]=N):N=e[7];const ee=N;let $;e[8]!==t.id?($=xe(t.id),e[8]=t.id,e[9]=$):$=e[9];const A=c??$;if(u.length===0){let x;return e[10]!==t?(x=s.jsx("div",{className:"flex flex-col size-full bg-background items-center justify-center",children:s.jsx(g.NoLlmBindingEmptyState,{org:t})}),e[10]=t,e[11]=x):x=e[11],x}let S;e[12]!==n?(S=n?.title&&s.jsx(oe,{threadId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[12]=n,e[13]=S):S=e[13];let _;e[14]!==S?(_=s.jsx(V.Header.Left,{className:"gap-2",children:S}),e[14]=S,e[15]=_):_=e[15];let v;e[16]!==m?(v=()=>m(),e[16]=m,e[17]=v):v=e[17];let H;e[18]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(be,{size:16}),e[18]=H):H=e[18];let C;e[19]!==o||e[20]!==v?(C=s.jsx(Z,{asChild:!0,children:s.jsx(W,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:v,disabled:o,"aria-label":"New chat",children:H})}),e[19]=o,e[20]=v,e[21]=C):C=e[21];let L;e[22]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(q,{children:"New chat"}),e[22]=L):L=e[22];let w;e[23]!==C?(w=s.jsxs(G,{children:[C,L]}),e[23]=C,e[24]=w):w=e[24];let R;e[25]===Symbol.for("react.memo_cache_sentinel")?(R=()=>p(!0),e[25]=R):R=e[25];let B;e[26]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsxs(G,{children:[s.jsx(Z,{asChild:!0,children:s.jsx(W,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:R,"aria-label":"Chat history",children:s.jsx(ne,{size:16})})}),s.jsx(q,{children:"Chat history"})]}),e[26]=B):B=e[26];let O;e[27]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Y,{size:16}),e[27]=O):O=e[27];let k;e[28]!==o?(k=s.jsx(Z,{asChild:!0,children:s.jsx(W,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ie,disabled:o,"aria-label":"Share chat",children:O})}),e[28]=o,e[29]=k):k=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(q,{children:"Share chat"}),e[30]=D):D=e[30];let T;e[31]!==k?(T=s.jsxs(G,{children:[k,D]}),e[31]=k,e[32]=T):T=e[32];let M;e[33]!==w||e[34]!==T?(M=s.jsxs(V.Header.Right,{className:"gap-1",children:[w,B,T]}),e[33]=w,e[34]=T,e[35]=M):M=e[35];let z;e[36]!==M||e[37]!==_?(z=s.jsxs(V.Header,{className:"flex-none z-10 bg-background",children:[_,M]}),e[36]=M,e[37]=_,e[38]=z):z=e[38];let I;e[39]!==A||e[40]!==o||e[41]!==j?(I=o?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx(J,{icon:A.icon,name:A.title,size:"md",fallbackIcon:s.jsx(X,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-lg font-medium text-foreground",children:[ee," ",j,","]}),s.jsx("p",{className:"text-base text-muted-foreground opacity-50 mb-0",children:"What are we building today?"})]}),s.jsx("div",{className:"w-full -mt-1",children:s.jsx(g.Input,{})}),s.jsx(g.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(Te,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(g.Main,{children:s.jsx(g.Messages,{})}),s.jsx(g.Footer,{children:s.jsx(g.Input,{})})]}),e[39]=A,e[40]=o,e[41]=j,e[42]=I):I=e[42];let E;e[43]!==d?(E=async x=>{await d(x),p(!1)},e[43]=d,e[44]=E):E=e[44];let P;e[45]!==r||e[46]!==f||e[47]!==E||e[48]!==l?(P=s.jsx(ae,{open:f,onOpenChange:p,threads:l,activeThreadId:r,onThreadSelect:E}),e[45]=r,e[46]=f,e[47]=E,e[48]=l,e[49]=P):P=e[49];let F;return e[50]!==z||e[51]!==I||e[52]!==P?(F=s.jsxs(g,{children:[z,I,P]}),e[50]=z,e[51]=I,e[52]=P,e[53]=F):F=e[53],F}function Ie(){re.info("Share feature coming soon")}function Ee(e){const t=y.c(14),{error:i,onRetry:u}=e,o=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(V.Header,{className:"flex-none",children:[s.jsx(V.Header.Left,{className:"gap-2"}),s.jsx(V.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(ce,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const d=o?"Unable to load models":"Something went wrong";let l;t[2]!==d?(l=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=l):l=t[3];const c=o?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let a;t[4]!==c?(a=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=a):a=t[5];let n;t[6]!==l||t[7]!==a?(n=s.jsxs("div",{className:"space-y-2",children:[l,a]}),t[6]=l,t[7]=a,t[8]=n):n=t[8];let f;t[9]!==u?(f=s.jsx(W,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=f):f=t[10];let p;return t[11]!==n||t[12]!==f?(p=s.jsxs(g,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,n,f]})})]}),t[11]=n,t[12]=f,t[13]=p):p=t[13],p}function Yt(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(me,{fallback:Pe,children:s.jsx(b.Suspense,{fallback:s.jsx(g.Skeleton,{}),children:s.jsx(ze,{})})}),e[0]=t):t=e[0],t}function Pe(e){const{error:t,resetError:i}=e;return s.jsx(Ee,{error:t,onRetry:i})}export{Yt as default};
|
package/dist/client/assets/{plugin-empty-state-9JYg72Wv.js → plugin-empty-state-X7uea6VR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,j as t,_ as o}from"./index-
|
|
1
|
+
import{c as n,j as t,_ as o}from"./index-DGcrprcR.js";function c(){const s=n.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(o,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
|
package/dist/client/assets/{plugin-empty-state-BAAh8fxn.js → plugin-empty-state-q2whEGVP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as t}from"./index-
|
|
1
|
+
import{c as s,j as t}from"./index-DGcrprcR.js";import{e as r}from"./Dataflow03-Ca2mwTsX.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as _,j as s,r as S,_ as y}from"./index-
|
|
1
|
+
import{c as _,j as s,r as S,_ as y}from"./index-DGcrprcR.js";import{i as R}from"./Check-Cm2iUQXG.js";import{t as k}from"./ChevronDown-BufhPURG.js";function E(x){const e=_.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const w=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,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:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&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(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:w,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=_.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,j as s,r as w}from"./index-
|
|
1
|
+
import{c as S,j as s,r as w}from"./index-DGcrprcR.js";import{i as R}from"./Check-Cm2iUQXG.js";import{t as _}from"./ChevronDown-BufhPURG.js";import{e as y}from"./Dataflow03-Ca2mwTsX.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,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:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&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(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
|