@decocms/mesh 1.0.0-alpha.19 → 1.0.0-alpha.20
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/README.md +2 -3
- package/dist/client/assets/{alert-dialog-BWlSDWeK.js → alert-dialog-6yQ_ytNz.js} +3 -3
- package/dist/client/assets/{auth-DNx6G3kk.js → auth-CSz5ame9.js} +1 -1
- package/dist/client/assets/{auth-catchall-DEBHeqih.js → auth-catchall-CJDp3FDD.js} +1 -1
- package/dist/client/assets/{avatar-BE4yUJKP.js → avatar-D9WKKc2H.js} +1 -1
- package/dist/client/assets/{badge-D1_SzxO5.js → badge-BxwpfgK4.js} +1 -1
- package/dist/client/assets/{button-BN_zWXnf.js → button-C-_NjPPs.js} +1 -1
- package/dist/client/assets/{card-6GjFVmi6.js → card-5q0yQ-4E.js} +1 -1
- package/dist/client/assets/{checkbox-Ddv4lDVe.js → checkbox-CniIxwAN.js} +1 -1
- package/dist/client/assets/{circle-alert-Cd33B5N6.js → circle-alert-DWlc7ruY.js} +1 -1
- package/dist/client/assets/{collection-detail-BVEPn-2g.js → collection-detail-F3buxrPU.js} +1 -1
- package/dist/client/assets/collection-display-button-CYjIv9ET.js +1 -0
- package/dist/client/assets/collection-header-BElwf-Gz.js +1 -0
- package/dist/client/assets/{collection-page-Q6RNGv5C.js → collection-page-B6r2HLtn.js} +1 -1
- package/dist/client/assets/{collection-search-DRvKW-m6.js → collection-search-OBebmCrY.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-pohJqEDN.js → collection-table-wrapper-CWTQ_xvQ.js} +1 -1
- package/dist/client/assets/connection-card-DMTXuLLY.js +1 -0
- package/dist/client/assets/{connection-detail-CUm3upXk.js → connection-detail-ButZpcgF.js} +1 -1
- package/dist/client/assets/connections-wbTmJe7J.js +1 -0
- package/dist/client/assets/{create-organization-dialog-DJBTViXu.js → create-organization-dialog-B024WWuD.js} +1 -1
- package/dist/client/assets/{dialog-fLfI7M0R.js → dialog-v2GF-04Y.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DLU49g1s.js → dropdown-menu-BMFf3tlf.js} +1 -1
- package/dist/client/assets/{empty-state-BzOX9EED.js → empty-state-DodoFFAj.js} +1 -1
- package/dist/client/assets/{error-boundary-D2G9VNgl.js → error-boundary-Cy_msdg7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C-h71gs0.js → extract-connection-data-BlicUoX6.js} +1 -1
- package/dist/client/assets/{form-DBnbAoFC.js → form-WEgfE5pE.js} +1 -1
- package/dist/client/assets/gateway-detail-CfQ0095F.js +1 -0
- package/dist/client/assets/{gateways-DZxsdiyu.js → gateways-CUtt8cOw.js} +1 -1
- package/dist/client/assets/{home-YhKf26x_.js → home-CXur84Cq.js} +1 -1
- package/dist/client/assets/{icon-DR1spsQB.js → icon-BWVVSGuI.js} +1 -1
- package/dist/client/assets/{index-y5VrHE-k.js → index-C3nlWW5L.js} +1 -1
- package/dist/client/assets/index-CEo77-MZ.js +118 -0
- package/dist/client/assets/{index-C0T6ZAhQ.js → index-CZk1llWx.js} +1 -1
- package/dist/client/assets/{index-JzoFd-IB.js → index-D49hLMyP.js} +1 -1
- package/dist/client/assets/index-yMf3L_oA.css +1 -0
- package/dist/client/assets/{input-CcvqgZcX.js → input-5ozmLchN.js} +1 -1
- package/dist/client/assets/layout-DLv0sB-y.js +1 -0
- package/dist/client/assets/{lazy-highlighter-BSQ1zjWm.js → lazy-highlighter-bi9pmmha.js} +1 -1
- package/dist/client/assets/{localstorage-keys-Z7g5bnTn.js → localstorage-keys-yS7s4iFl.js} +1 -1
- package/dist/client/assets/{login-itVUOHeo.js → login-DobNRNrA.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BXs8Us6i.js → mcp-oauth-37Mxf9Z0.js} +1 -1
- package/dist/client/assets/members-zAFo6qid.js +3 -0
- package/dist/client/assets/monitoring-CNFmTfT0.js +1 -0
- package/dist/client/assets/monitoring-stats-row-DB9E7eLj.js +42 -0
- package/dist/client/assets/{oauth-callback-DAHrWM48.js → oauth-callback-T5DmL3Ao.js} +1 -1
- package/dist/client/assets/page-BIqETU0M.js +21 -0
- package/dist/client/assets/page-BZV40eAE.css +1 -0
- package/dist/client/assets/{popover-pxHCkQCT.js → popover-BCVOzsms.js} +1 -1
- package/dist/client/assets/{prism-ChIE02BQ.js → prism-iL5zefv5.js} +1 -1
- package/dist/client/assets/{resource-tabs-O3UgRbzl.js → resource-tabs-DhcI51JE.js} +1 -1
- package/dist/client/assets/{schema-Ds6vBzkt.js → schema-DcHM5DMj.js} +1 -1
- package/dist/client/assets/{select-DmtIA5gb.js → select-DFzO4KN0.js} +1 -1
- package/dist/client/assets/{settings-MfgRanQ8.js → settings-D0vYaEZr.js} +1 -1
- package/dist/client/assets/{shell-layout-CLztFOn5.js → shell-layout-D34ddYiL.js} +5 -5
- package/dist/client/assets/{spinner-CSfjXmps.js → spinner-DnJmPtgh.js} +1 -1
- package/dist/client/assets/store-C5PNHQD9.js +1 -0
- package/dist/client/assets/store-app-detail-D3a6jhJ2.js +1 -0
- package/dist/client/assets/{switch-BZhZuO_s.js → switch-G-S3tsxP.js} +1 -1
- package/dist/client/assets/{textarea-ChlVYzjs.js → textarea-DpLnh_Mr.js} +1 -1
- package/dist/client/assets/{tool-set-selector-G8wTCLog.js → tool-set-selector-Yam11D5m.js} +1 -1
- package/dist/client/assets/{tooltip-D_78gfFh.js → tooltip-Bdp6F_4z.js} +1 -1
- package/dist/client/assets/{upload-B-eQsTwv.js → upload-BJHCH8vW.js} +1 -1
- package/dist/client/assets/{use-binding-Bb2paZzF.js → use-binding-BZj4JXob.js} +2 -2
- package/dist/client/assets/{use-connection-DxtpeU7L.js → use-connection-_IstvAFb.js} +1 -1
- package/dist/client/assets/{use-gateway-q9TGaBqh.js → use-gateway-pw5jbc7Q.js} +1 -1
- package/dist/client/assets/{use-list-state-DAjBDT6m.js → use-list-state-DKMQTiNs.js} +1 -1
- package/dist/client/assets/use-mcp-Dj_7v_nd.js +1 -0
- package/dist/client/assets/{use-members-CWZ6LTt7.js → use-members-fC3DA3xN.js} +1 -1
- package/dist/client/assets/{use-mobile-MtwUZMiZ.js → use-mobile-D6cBfH0_.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DdMFS3RF.js → use-organization-settings-DdaiS6Jy.js} +1 -1
- package/dist/client/assets/{use-tool-call-BRFgmS8T.js → use-tool-call--kgIN5TM.js} +1 -1
- package/dist/client/assets/useQuery-DVO6EBFl.js +1 -0
- package/dist/client/assets/utils-ANvY6Qf5.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3 -3
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +2 -2
- package/package.json +3 -1
- package/dist/client/assets/collection-display-button-D2Zl4v_d.js +0 -1
- package/dist/client/assets/collection-header-C0Jrsz0s.js +0 -1
- package/dist/client/assets/connection-card-DsobEce7.js +0 -1
- package/dist/client/assets/connections-D43mp84Z.js +0 -1
- package/dist/client/assets/gateway-detail-CwiZdxYg.js +0 -1
- package/dist/client/assets/index-XU02Lc4Q.css +0 -1
- package/dist/client/assets/index-YfohaNt1.js +0 -118
- package/dist/client/assets/layout-BlUr8W2A.js +0 -1
- package/dist/client/assets/members-BT9zPsL2.js +0 -1
- package/dist/client/assets/monitoring-DQPV_C4N.js +0 -1
- package/dist/client/assets/monitoring-stats-row-CP625QzH.js +0 -42
- package/dist/client/assets/page-Dcuv0l3T.js +0 -1
- package/dist/client/assets/store-DAkjxR6I.js +0 -1
- package/dist/client/assets/store-app-detail-DwCGQM9s.js +0 -1
- package/dist/client/assets/use-mcp-CcUDnETM.js +0 -1
- package/dist/client/assets/useQuery-CJPC8H_4.js +0 -1
- package/dist/client/assets/utils-pyyeDP1p.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,at as ve,j as o,c as Y,a5 as he}from"./index-YfohaNt1.js";import{c as oe,b as De,I as Me}from"./use-connection-DxtpeU7L.js";import{C as Ye}from"./collection-header-C0Jrsz0s.js";import{C as qe}from"./collection-page-Q6RNGv5C.js";import{E as fe}from"./error-boundary-D2G9VNgl.js";import{u as le}from"./use-tool-call-BRFgmS8T.js";import{u as Q}from"./tooltip-D_78gfFh.js";import{B as re}from"./button-BN_zWXnf.js";import{I as ne}from"./icon-DR1spsQB.js";import{c as T,p as ee,a as Je,i as Qe,s as F,b as et,d as tt,e as Re,f as at,g as rt,h as z,j as nt,k as ot,l as lt,m as st,n as Le,o as it,q as ct,r as dt,t as mt,u as ut,v as ft,w as Ke,x as pt,y as be,z as Ge,R as gt,S as vt,D as $e,A as Be,B as q,C as ht,L as Z,Z as ze,E as bt,F as yt,J as xt,G as Pt,H as Se,I as ye,P as St,K as jt,M as At,N as It,O as Ot,Q as _t,T as Nt,U as Tt,V as kt,W as Et,X as wt,Y as Ct,_ as je,$ as ae,a0 as pe,a1 as Ae,a2 as Dt,a3 as J,a4 as Mt,a5 as Rt,a6 as Lt,a7 as Kt,a8 as Gt,a9 as $t,aa as Bt,ab as zt,ac as Wt,ad as Ft,ae as Vt,af as Ht,ag as Ut,ah as se,ai as Xt,aj as Zt,ak as Yt}from"./monitoring-stats-row-CP625QzH.js";import{B as qt}from"./badge-D1_SzxO5.js";import"./utils-pyyeDP1p.js";import"./collection-display-button-D2Zl4v_d.js";import"./dropdown-menu-DLU49g1s.js";import"./index-y5VrHE-k.js";function ie(){const e=new Date,t=new Date;t.setHours(e.getHours()-24),t.setSeconds(0,0);const a=new Date(e);return a.setHours(a.getHours()+1),a.setSeconds(0,0),{startDate:t.toISOString(),endDate:a.toISOString()}}var We=e=>e.graphicalItems.polarItems,Jt=T([ee,Je],Qe),ce=T([We,F,Jt],et),Qt=T([ce],tt),de=T([Qt,Re],at),ea=T([de,F,ce],rt);T([de,F,ce],(e,t,a)=>a.length>0?e.flatMap(r=>a.flatMap(n=>{var l,d=z(r,(l=t.dataKey)!==null&&l!==void 0?l:n.dataKey);return{value:d,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:z(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var Ie=()=>{},ta=T([de,F,ce,nt,ee],ot),aa=T([F,lt,st,Ie,ta,Ie,Le,ee],it),Fe=T([F,Le,de,ea,ct,ee,aa],dt),ra=T([Fe,F,mt],ut);T([F,Fe,ra,ee],ft);function Oe(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function _e(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Oe(Object(a),!0).forEach(function(r){na(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Oe(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function na(e,t,a){return(t=oa(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function oa(e){var t=la(e,"string");return typeof t=="symbol"?t:t+""}function la(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var r=a.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sa=(e,t)=>t,xe=T([We,sa],(e,t)=>e.filter(a=>a.type==="pie").find(a=>a.id===t)),ia=[],Pe=(e,t,a)=>a?.length===0?ia:a,Ve=T([Re,xe,Pe],(e,t,a)=>{var{chartData:r}=e;if(t!=null){var n;if(t?.data!=null&&t.data.length>0?n=t.data:n=r,(!n||!n.length)&&a!=null&&(n=a.map(l=>_e(_e({},t.presentationProps),l.props))),n!=null)return n}}),ca=T([Ve,xe,Pe],(e,t,a)=>{if(!(e==null||t==null))return e.map((r,n)=>{var l,d=z(r,t.nameKey,t.name),c;return a!=null&&(l=a[n])!==null&&l!==void 0&&(l=l.props)!==null&&l!==void 0&&l.fill?c=a[n].props.fill:typeof r=="object"&&r!=null&&"fill"in r?c=r.fill:c=t.fill,{value:Ke(d,t.dataKey),color:c,payload:r,type:t.legendType}})}),da=T([Ve,xe,Pe,pt],(e,t,a,r)=>{if(!(t==null||e==null))return Ea({offset:r,pieSettings:t,displayedData:e,cells:a})}),ma=["key"],ua=["onMouseEnter","onClick","onMouseLeave"],fa=["id"],pa=["id"];function Ne(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function I(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Ne(Object(a),!0).forEach(function(r){ga(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Ne(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function ga(e,t,a){return(t=va(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function va(e){var t=ha(e,"string");return typeof t=="symbol"?t:t+""}function ha(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var r=a.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},W.apply(null,arguments)}function me(e,t){if(e==null)return{};var a,r,n=ba(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)a=l[r],t.indexOf(a)===-1&&{}.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function ba(e,t){if(e==null)return{};var a={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;a[r]=e[r]}return a}function ya(e){var t=i.useMemo(()=>Be(e.children,ye),[e.children]),a=q(r=>ca(r,e.id,t));return a==null?null:i.createElement(ht,{legendPayload:a})}var xa=i.memo(e=>{var{dataKey:t,nameKey:a,sectors:r,stroke:n,strokeWidth:l,fill:d,name:c,hide:u,tooltipType:m,id:f}=e,g={dataDefinedOnItem:r.map(s=>s.tooltipPayload),positions:r.map(s=>s.tooltipPosition),settings:{stroke:n,strokeWidth:l,fill:d,dataKey:t,nameKey:a,name:Ke(c,t),hide:u,type:m,color:d,unit:"",graphicalItemId:f}};return i.createElement(bt,{tooltipEntrySettings:g})}),Pa=(e,t)=>e>t?"start":e<t?"end":"middle",Sa=(e,t,a)=>typeof t=="function"?J(t(e),a,a*.8):J(t,a,a*.8),ja=(e,t,a)=>{var{top:r,left:n,width:l,height:d}=t,c=Dt(l,d),u=n+J(e.cx,l,l/2),m=r+J(e.cy,d,d/2),f=J(e.innerRadius,c,0),g=Sa(a,e.outerRadius,c),s=e.maxRadius||Math.sqrt(l*l+d*d)/2;return{cx:u,cy:m,innerRadius:f,outerRadius:g,maxRadius:s}},Aa=(e,t)=>{var a=ae(t-e),r=Math.min(Math.abs(t-e),360);return a*r};function Ia(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var Oa=(e,t)=>{if(i.isValidElement(e))return i.cloneElement(e,t);if(typeof e=="function")return e(t);var a=ve("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:r}=t,n=me(t,ma);return i.createElement(Mt,W({},n,{type:"linear",className:a}))},_a=(e,t,a)=>{if(i.isValidElement(e))return i.cloneElement(e,t);var r=a;if(typeof e=="function"&&(r=e(t),i.isValidElement(r)))return r;var n=ve("recharts-pie-label-text",Ia(e));return i.createElement(Rt,W({},t,{alignmentBaseline:"middle",className:n}),r)};function Na(e){var{sectors:t,props:a,showLabels:r}=e,{label:n,labelLine:l,dataKey:d}=a;if(!r||!n||!t)return null;var c=Ge(a),u=Ae(n),m=Ae(l),f=typeof n=="object"&&"offsetRadius"in n&&typeof n.offsetRadius=="number"&&n.offsetRadius||20,g=t.map((s,v)=>{var b=(s.startAngle+s.endAngle)/2,h=pe(s.cx,s.cy,s.outerRadius+f,b),y=I(I(I(I({},c),s),{},{stroke:"none"},u),{},{index:v,textAnchor:Pa(h.x,s.cx)},h),p=I(I(I(I({},c),s),{},{fill:"none",stroke:s.fill},m),{},{index:v,points:[pe(s.cx,s.cy,s.outerRadius,b),h],key:"line"});return i.createElement(ze,{zIndex:$e.label,key:"label-".concat(s.startAngle,"-").concat(s.endAngle,"-").concat(s.midAngle,"-").concat(v)},i.createElement(Z,null,l&&Oa(l,p),_a(n,y,z(s,d))))});return i.createElement(Z,{className:"recharts-pie-labels"},g)}function Ta(e){var{sectors:t,props:a,showLabels:r}=e,{label:n}=a;return typeof n=="object"&&n!=null&&"position"in n?i.createElement(Ct,{label:n}):i.createElement(Na,{sectors:t,props:a,showLabels:r})}function ka(e){var{sectors:t,activeShape:a,inactiveShape:r,allOtherPieProps:n,shape:l,id:d}=e,c=q(jt),u=q(At),m=q(It),{onMouseEnter:f,onClick:g,onMouseLeave:s}=n,v=me(n,ua),b=Ot(f,n.dataKey,d),h=_t(s),y=Nt(g,n.dataKey,d);return t==null||t.length===0?null:i.createElement(i.Fragment,null,t.map((p,P)=>{if(p?.startAngle===0&&p?.endAngle===0&&t.length!==1)return null;var N=m==null||m===d,S=String(P)===c&&(u==null||n.dataKey===u)&&N,O=c?r:null,j=a&&S?a:O,x=I(I({},p),{},{stroke:p.stroke,tabIndex:-1,[kt]:P,[Tt]:d});return i.createElement(Z,W({key:"sector-".concat(p?.startAngle,"-").concat(p?.endAngle,"-").concat(p.midAngle,"-").concat(P),tabIndex:-1,className:"recharts-pie-sector"},Et(v,p,P),{onMouseEnter:b(p,P),onMouseLeave:h(p,P),onClick:y(p,P)}),i.createElement(wt,W({option:l??j,index:P,shapeType:"sector",isActive:S},x)))}))}function Ea(e){var t,{pieSettings:a,displayedData:r,cells:n,offset:l}=e,{cornerRadius:d,startAngle:c,endAngle:u,dataKey:m,nameKey:f,tooltipType:g}=a,s=Math.abs(a.minAngle),v=Aa(c,u),b=Math.abs(v),h=r.length<=1?0:(t=a.paddingAngle)!==null&&t!==void 0?t:0,y=r.filter(j=>z(j,m,0)!==0).length,p=(b>=360?y:y-1)*h,P=b-y*s-p,N=r.reduce((j,x)=>{var _=z(x,m,0);return j+(je(_)?_:0)},0),S;if(N>0){var O;S=r.map((j,x)=>{var _=z(j,m,0),w=z(j,f,x),k=ja(a,l,j),L=(je(_)?_:0)/N,M,C=I(I({},j),n&&n[x]&&n[x].props);x?M=O.endAngle+ae(v)*h*(_!==0?1:0):M=c;var R=M+ae(v)*((_!==0?s:0)+L*P),D=(M+R)/2,E=(k.innerRadius+k.outerRadius)/2,K=[{name:w,value:_,payload:C,dataKey:m,type:g,graphicalItemId:a.id}],$=pe(k.cx,k.cy,E,D);return O=I(I(I(I({},a.presentationProps),{},{percent:L,cornerRadius:typeof d=="string"?parseFloat(d):d,name:w,tooltipPayload:K,midAngle:D,middleRadius:E,tooltipPosition:$},C),k),{},{value:_,dataKey:m,startAngle:M,endAngle:R,payload:C,paddingAngle:ae(v)*h}),O})}return S}function wa(e){var{showLabels:t,sectors:a,children:r}=e,n=i.useMemo(()=>!t||!a?[]:a.map(l=>({value:l.value,payload:l.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:l.cx,cy:l.cy,innerRadius:l.innerRadius,outerRadius:l.outerRadius,startAngle:l.startAngle,endAngle:l.endAngle,clockWise:!1},fill:l.fill})),[a,t]);return i.createElement(St,{value:t?n:void 0},r)}function Ca(e){var{props:t,previousSectorsRef:a,id:r}=e,{sectors:n,isAnimationActive:l,animationBegin:d,animationDuration:c,animationEasing:u,activeShape:m,inactiveShape:f,onAnimationStart:g,onAnimationEnd:s}=t,v=yt(t,"recharts-pie-"),b=a.current,[h,y]=i.useState(!1),p=i.useCallback(()=>{typeof s=="function"&&s(),y(!1)},[s]),P=i.useCallback(()=>{typeof g=="function"&&g(),y(!0)},[g]);return i.createElement(wa,{showLabels:!h,sectors:n},i.createElement(xt,{animationId:v,begin:d,duration:c,isActive:l,easing:u,onAnimationStart:P,onAnimationEnd:p,key:v},N=>{var S=[],O=n&&n[0],j=O?.startAngle;return n?.forEach((x,_)=>{var w=b&&b[_],k=_>0?Pt(x,"paddingAngle",0):0;if(w){var L=Se(w.endAngle-w.startAngle,x.endAngle-x.startAngle,N),M=I(I({},x),{},{startAngle:j+k,endAngle:j+L+k});S.push(M),j=M.endAngle}else{var{endAngle:C,startAngle:R}=x,D=Se(0,C-R,N),E=I(I({},x),{},{startAngle:j+k,endAngle:j+D+k});S.push(E),j=E.endAngle}}),a.current=S,i.createElement(Z,null,i.createElement(ka,{sectors:S,activeShape:m,inactiveShape:f,allOtherPieProps:t,shape:t.shape,id:r}))}),i.createElement(Ta,{showLabels:!h,sectors:n,props:t}),t.children)}var Da={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:$e.area};function Ma(e){var{id:t}=e,a=me(e,fa),{hide:r,className:n,rootTabIndex:l}=e,d=i.useMemo(()=>Be(e.children,ye),[e.children]),c=q(f=>da(f,t,d)),u=i.useRef(null),m=ve("recharts-pie",n);return r||c==null?(u.current=null,i.createElement(Z,{tabIndex:l,className:m})):i.createElement(ze,{zIndex:e.zIndex},i.createElement(xa,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:c,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t}),i.createElement(Z,{tabIndex:l,className:m},i.createElement(Ca,{props:I(I({},a),{},{sectors:c}),previousSectorsRef:u,id:t})))}function He(e){var t=be(e,Da),{id:a}=t,r=me(t,pa),n=Ge(r);return i.createElement(gt,{id:a,type:"pie"},l=>i.createElement(i.Fragment,null,i.createElement(vt,{type:"pie",id:l,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:n,maxRadius:t.maxRadius}),i.createElement(ya,W({},r,{id:l})),i.createElement(Ma,W({},r,{id:l}))))}He.displayName="Pie";function Ra(e){var t=Lt();return i.useEffect(()=>{t(Kt(e))},[t,e]),null}var La=["layout"];function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},ge.apply(null,arguments)}function Ka(e,t){if(e==null)return{};var a,r,n=Ga(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)a=l[r],t.indexOf(a)===-1&&{}.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Ga(e,t){if(e==null)return{};var a={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;a[r]=e[r]}return a}var $a={top:5,right:5,bottom:5,left:5},Ue={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:$a,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Ba=i.forwardRef(function(t,a){var r,n=be(t.categoricalChartProps,Ue),{layout:l}=n,d=Ka(n,La),{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:m,tooltipPayloadSearcher:f}=t,g={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:m,tooltipPayloadSearcher:f,eventEmitter:void 0};return i.createElement(Gt,{preloadedState:{options:g},reduxStoreName:(r=n.id)!==null&&r!==void 0?r:c},i.createElement($t,{chartData:n.data}),i.createElement(Bt,{layout:l,margin:n.margin}),i.createElement(zt,{baseValue:void 0,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),i.createElement(Ra,{cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius}),i.createElement(Wt,ge({},d,{ref:a})))});function Te(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function ke(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Te(Object(a),!0).forEach(function(r){za(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Te(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function za(e,t,a){return(t=Wa(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Wa(e){var t=Fa(e,"string");return typeof t=="symbol"?t:t+""}function Fa(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var r=a.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Va=["item"],Ha=ke(ke({},Ue),{},{layout:"centric",startAngle:0,endAngle:360}),Ua=i.forwardRef((e,t)=>{var a=be(e,Ha);return i.createElement(Ba,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Va,tooltipPayloadSearcher:Ft,categoricalChartProps:a,ref:t})});function Xa(e,t){const r=(t.getTime()-e.getTime())/24,n=Array.from({length:24},(u,m)=>{const f=new Date(e.getTime()+m*r),g=Math.floor(Math.random()*15)+5,s=m<20?g:g+Math.floor(Math.random()*20),v=Math.random()>.85?Math.floor(Math.random()*3):0,b=s>0?v/s*100:0,h=Math.floor(Math.random()*300)+100;return{t:f.toISOString(),ts:f.getTime(),label:f.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),calls:s,errors:v,errorRate:b,p95:h}}),l=n.reduce((u,m)=>u+m.calls,0),d=n.reduce((u,m)=>u+m.errors,0),c=Math.floor(n.reduce((u,m)=>u+m.p95,0)/n.length);return{totalCalls:l,totalErrors:d,avgDurationMs:c,data:n}}function Za(){const{locator:e}=Q(),t=oe(),a=ie(),{data:r}=le({toolCaller:t,toolName:"MONITORING_LOGS_LIST",toolInputParams:{...a,limit:750,offset:0},scope:e,staleTime:3e4}),n=r?.logs??[],l=new Date(a.startDate),d=new Date(a.endDate),c=n.length===0?Xa(l,d):Ht(n,{startDate:l,endDate:d},24,r?.total);return o.jsx(Ut,{stats:c,chartHeight:"h-[103px]",showDateLabels:!0,dateRange:{startDate:l,endDate:d}})}const Ee={Content:Za,Skeleton:Vt};function Xe(e){return(e?.totalCalls??0)>0}function Ya(){const e=Y.c(35),{org:t,locator:a}=Q(),r=he();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=oe(),e[0]=n):n=e[0];const l=n,d=De()??[];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c={...ie(),limit:8,offset:0},e[1]=c):c=e[1];const u=c;let m;e[2]!==a?(m={toolCaller:l,toolName:"MONITORING_LOGS_LIST",toolInputParams:u,scope:a,staleTime:3e4},e[2]=a,e[3]=m):m=e[3];const{data:f}=le(m);let g;e[4]!==f?.logs?(g=f?.logs??[],e[4]=f?.logs,e[5]=g):g=e[5];const s=g,v=new Map(d.map(qa));let b;e[6]!==r||e[7]!==t.slug?(b=A=>{r({to:"/$org/monitoring",params:{org:t.slug},search:{connections:A.connectionId,tool:A.toolName}})},e[6]=r,e[7]=t.slug,e[8]=b):b=e[8];const h=b;let y;e[9]!==r||e[10]!==t.slug?(y=()=>{r({to:"/$org/monitoring",params:{org:t.slug}})},e[9]=r,e[10]=t.slug,e[11]=y):y=e[11];const p=y;let P;e[12]===Symbol.for("react.memo_cache_sentinel")?(P={id:"1",toolName:"Google Drive",connectionId:"mock1",connectionTitle:"Google Drive",timestamp:new Date().toISOString(),durationMs:200,isError:!0},e[12]=P):P=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N={id:"2",toolName:"Google Sheets",connectionId:"mock2",connectionTitle:"Google Sheets",timestamp:new Date().toISOString(),durationMs:200,isError:!1},e[13]=N):N=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S={id:"3",toolName:"Google Slides",connectionId:"mock3",connectionTitle:"Google Slides",timestamp:new Date().toISOString(),durationMs:200,isError:!1},e[14]=S):S=e[14];let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O={id:"4",toolName:"Gmail",connectionId:"mock4",connectionTitle:"Gmail",timestamp:new Date().toISOString(),durationMs:200,isError:!1},e[15]=O):O=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j={id:"5",toolName:"Google Calendar",connectionId:"mock5",connectionTitle:"Google Calendar",timestamp:new Date().toISOString(),durationMs:200,isError:!1},e[16]=j):j=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x={id:"6",toolName:"Discord",connectionId:"mock6",connectionTitle:"Discord",timestamp:new Date().toISOString(),durationMs:200,isError:!1},e[17]=x):x=e[17];let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_={id:"7",toolName:"VTEX",connectionId:"mock7",connectionTitle:"VTEX",timestamp:new Date().toISOString(),durationMs:200,isError:!1},e[18]=_):_=e[18];let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=[P,N,S,O,j,x,_,{id:"8",toolName:"Google Docs",connectionId:"mock8",connectionTitle:"Google Docs",timestamp:new Date().toISOString(),durationMs:200,isError:!1}],e[19]=w):w=e[19];const k=w,L=s.length===0?k:s,M=s.length===0,C=A=>{const G=v.get(A.connectionId),B=new Date(A.timestamp).toLocaleString("en-US",{month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"});return o.jsxs("div",{className:"flex items-center h-16 border-t border-border/60 hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>!M&&h(A),children:[o.jsx("div",{className:"flex items-center justify-center w-16 px-4",children:o.jsx(Me,{icon:G?.icon||null,name:A.connectionTitle,size:"xs",className:"shadow-sm"})}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx("span",{className:"text-xs font-medium text-foreground truncate block",children:A.toolName})}),o.jsxs("div",{className:"flex items-center gap-2 px-5 text-xs whitespace-nowrap",children:[o.jsxs("span",{className:"text-muted-foreground",children:[A.durationMs,"ms"]}),o.jsx("span",{className:"text-foreground",children:B})]}),o.jsx("div",{className:"flex items-center pr-5",children:o.jsx(qt,{variant:A.isError?"destructive":"success",className:"text-xs px-2 py-1",children:A.isError?"Error":"OK"})})]},A.id)};let R;e[20]===Symbol.for("react.memo_cache_sentinel")?(R=o.jsx("p",{className:"text-sm text-muted-foreground",children:"Recent Activity"}),e[20]=R):R=e[20];let D;e[21]!==p||e[22]!==s.length||e[23]!==f?(D=f&&f.total>s.length?o.jsxs(re,{variant:"ghost",size:"sm",onClick:p,children:["See all",o.jsx(ne,{name:"chevron_right",size:16})]}):null,e[21]=p,e[22]=s.length,e[23]=f,e[24]=D):D=e[24];let E;if(e[25]!==L||e[26]!==C){let A;e[28]!==C?(A=G=>C(G),e[28]=C,e[29]=A):A=e[29],E=L.map(A),e[25]=L,e[26]=C,e[27]=E}else E=e[27];let K;e[30]!==E?(K=o.jsx("div",{className:"w-full h-full overflow-auto ",children:E}),e[30]=E,e[31]=K):K=e[31];let $;return e[32]!==D||e[33]!==K?($=o.jsx(se,{title:R,action:D,noPadding:!0,children:K}),e[32]=D,e[33]=K,e[34]=$):$=e[34],$}function qa(e){return[e.id,e]}function Ja(){const e=Y.c(3);let t,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx("p",{className:"text-sm text-muted-foreground",children:"Recent Activity"}),a=o.jsx("div",{className:"h-7 w-20 rounded bg-muted animate-pulse"}),e[0]=t,e[1]=a):(t=e[0],a=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(se,{title:t,action:a,children:o.jsx("div",{className:"space-y-2",children:[...Array(6)].map(Qa)})}),e[2]=r):r=e[2],r}function Qa(e,t){return o.jsx("div",{className:"h-12 rounded-xl bg-muted animate-pulse"},t)}const we=Object.assign(Ya,{Skeleton:Ja});function er(e,t){const a=new Map;for(const r of e){const n=r.toolName||"Unknown",l=a.get(n);a.set(n,{calls:(l?.calls??0)+1,connectionId:l?.connectionId||r.connectionId})}return[...a.entries()].map(([r,{calls:n,connectionId:l}])=>({tool:r,calls:n,connectionId:l})).sort((r,n)=>n.calls-r.calls).slice(0,t)}function tr(){const e=Y.c(28),{locator:t}=Q();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=oe(),e[0]=a):a=e[0];const r=a;let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=ie(),e[1]=n):n=e[1];const l=n,d=De()??[];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={...l,limit:750,offset:0},e[2]=c):c=e[2];let u;e[3]!==t?(u={toolCaller:r,toolName:"MONITORING_LOGS_LIST",toolInputParams:c,scope:t,staleTime:3e4},e[3]=t,e[4]=u):u=e[4];const{data:m}=le(u),f=m?.logs??[];let s=er(f,6).map(or);f.length===0&&(s=[{key:"t1",tool:"COLLECTION_AGENT_LIST",calls:210,connectionId:"mock1"},{key:"t2",tool:"COLLECTION_LLM_LIST",calls:82,connectionId:"mock2"},{key:"t3",tool:"COLLECTION_REGISTRY_APPS_LIST",calls:15,connectionId:"mock3"},{key:"t4",tool:"COLLECTION_REGISTRY_TOOLS_LIST",calls:15,connectionId:"mock4"},{key:"t5",tool:"MCP_CONFIGURATION",calls:8,connectionId:"mock5"},{key:"t6",tool:"LLM_DO_STREAM",calls:1,connectionId:"mock6"}]);const v=Object.fromEntries(s.map(nr)),b=new Map(d.map(rr)),h=se;let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("p",{className:"text-sm text-muted-foreground",children:"Top Tools (24h)"}),e[5]=y):y=e[5];const p=!0,P="w-full",N="flex items-center justify-center py-4 shrink-0",S=Xt,O="h-[200px] w-[200px] aspect-auto",j=Ua;let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(Zt,{content:o.jsx(Yt,{indicator:"dot",nameKey:"key"})}),e[6]=x):x=e[6];const _=He,w=s,k="calls",L="key",M="50%",C="50%",R=52,D=82,E=2,K="var(--color-border)",$=1,A=s.map(ar);let G;e[7]!==_||e[8]!==A||e[9]!==s?(G=o.jsx(_,{data:w,dataKey:k,nameKey:L,cx:M,cy:C,innerRadius:R,outerRadius:D,paddingAngle:E,stroke:K,strokeWidth:$,children:A}),e[7]=_,e[8]=A,e[9]=s,e[10]=G):G=e[10];let V;e[11]!==j||e[12]!==G||e[13]!==x?(V=o.jsxs(j,{children:[x,G]}),e[11]=j,e[12]=G,e[13]=x,e[14]=V):V=e[14];let B;e[15]!==S||e[16]!==v||e[17]!==V?(B=o.jsx("div",{className:N,children:o.jsx(S,{className:O,config:v,children:V})}),e[15]=S,e[16]=v,e[17]=V,e[18]=B):B=e[18];const ue=s.map(X=>{const Ze=b.get(X.connectionId||"");return o.jsxs("div",{className:"flex items-center h-16 border-t border-border/60 hover:bg-muted/40 transition-colors",children:[o.jsxs("div",{className:"flex items-center w-20 pl-4 gap-2",children:[o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:v[X.key]?.color},"aria-hidden":"true"}),o.jsx("div",{className:"w-6 h-6 shrink-0 flex items-center justify-center",children:o.jsx(Me,{icon:Ze?.icon||null,name:X.tool,size:"xs",className:"shadow-sm"})})]}),o.jsx("div",{className:"flex-1 min-w-0 px-4",children:o.jsx("span",{className:"text-xs font-medium text-foreground truncate block",children:X.tool})}),o.jsx("div",{className:"flex items-center pr-5",children:o.jsx("span",{className:"font-mono text-xs text-foreground tabular-nums",children:X.calls})})]},X.key)});let H;e[19]!==ue?(H=o.jsx("div",{className:"w-full",children:ue}),e[19]=ue,e[20]=H):H=e[20];let U;e[21]!==B||e[22]!==H?(U=o.jsxs("div",{className:P,children:[B,H]}),e[21]=B,e[22]=H,e[23]=U):U=e[23];let te;return e[24]!==h||e[25]!==U||e[26]!==y?(te=o.jsx(h,{title:y,noPadding:p,children:U}),e[24]=h,e[25]=U,e[26]=y,e[27]=te):te=e[27],te}function ar(e){return o.jsx(ye,{fill:`var(--color-${e.key})`},e.key)}function rr(e){return[e.id,e]}function nr(e,t){return[e.key,{label:e.tool,color:`var(--chart-${t%5+1})`}]}function or(e,t){return{key:`t${t+1}`,tool:e.tool,calls:e.calls,connectionId:e.connectionId}}function lr(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(se,{title:o.jsx("p",{className:"text-sm text-muted-foreground",children:"Top Tools (24h)"}),children:o.jsx("div",{className:"h-[260px] w-full rounded-xl bg-muted animate-pulse"})}),e[0]=t):t=e[0],t}const Ce=Object.assign(tr,{Skeleton:lr});function sr(){const e=Y.c(21),{org:t,locator:a}=Q(),r=he();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=oe(),e[0]=n):n=e[0];const l=n;let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=ie(),e[1]=d):d=e[1];const c=d;let u;e[2]!==a?(u={toolCaller:l,toolName:"MONITORING_STATS",toolInputParams:c,scope:a,staleTime:6e4,refetchInterval:ir},e[2]=a,e[3]=u):u=e[3];const{data:m}=le(u),f=Xe(m);let g;e[4]!==r||e[5]!==t.slug?(g=()=>{r({to:"/$org/mcps",params:{org:t.slug},search:{action:"create"}})},e[4]=r,e[5]=t.slug,e[6]=g):g=e[6];const s=g;let v;e[7]!==r||e[8]!==t.slug?(v=()=>{r({to:"/$org/store",params:{org:t.slug}})},e[7]=r,e[8]=t.slug,e[9]=v):v=e[9];const b=v;if(f)return null;let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("div",{className:"p-2",children:o.jsx("div",{className:"bg-muted border border-border rounded-lg h-[250px] overflow-hidden relative flex items-center justify-center",children:o.jsx("img",{src:"/empty-state-home.png",alt:"MCP Mesh illustration",className:"w-full h-full object-cover"})})}),e[10]=h):h=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsxs("div",{className:"px-6 py-6 space-y-2",children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Welcome to your MCP Mesh"}),o.jsx("p",{className:"text-sm text-muted-foreground leading-normal",children:"Connect your first MCP server to unlock real-time metrics, activity logs, and analytics right here on your home."})]}),e[11]=y):y=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(ne,{name:"shopping_bag",size:16}),e[12]=p):p=e[12];let P;e[13]!==b?(P=o.jsxs(re,{onClick:b,size:"sm",className:"h-9",children:[p,"Browse Store"]}),e[13]=b,e[14]=P):P=e[14];let N;e[15]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(ne,{name:"add",size:16}),e[15]=N):N=e[15];let S;e[16]!==s?(S=o.jsxs(re,{variant:"outline",onClick:s,size:"sm",className:"h-9",children:[N,"Connect MCP Server"]}),e[16]=s,e[17]=S):S=e[17];let O;return e[18]!==S||e[19]!==P?(O=o.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4 bg-background/80 backdrop-blur-[3px] z-10",children:o.jsxs("div",{className:"max-w-md w-full bg-background rounded-xl border border-border shadow-lg pointer-events-auto overflow-hidden",children:[h,y,o.jsxs("div",{className:"border-t border-border px-4 py-4 flex items-center justify-center gap-2",children:[P,S]})]})}),e[18]=S,e[19]=P,e[20]=O):O=e[20],O}function ir(e){return Xe(e.state.data)?!1:1e3}function Ar(){const e=Y.c(18),{org:t}=Q(),a=he();let r;e[0]!==a||e[1]!==t.slug?(r=()=>{a({to:"/$org/mcps",params:{org:t.slug},search:{action:"create"}})},e[0]=a,e[1]=t.slug,e[2]=r):r=e[2];const n=r;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(sr,{}),e[3]=l):l=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(ne,{name:"add",size:16}),e[4]=d):d=e[4];let c;e[5]!==n?(c=o.jsxs(re,{variant:"outline",size:"sm",className:"h-7 px-3",onClick:n,children:[d,"Connect MCP Server"]}),e[5]=n,e[6]=c):c=e[6];let u;e[7]!==t.name||e[8]!==c?(u=o.jsx(Ye,{title:t.name,ctaButton:c}),e[7]=t.name,e[8]=c,e[9]=u):u=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load monitoring stats"}),e[10]=m):m=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("div",{className:"lg:col-span-6",children:o.jsx(fe,{fallback:m,children:o.jsx(i.Suspense,{fallback:o.jsx(Ee.Skeleton,{}),children:o.jsx(Ee.Content,{})})})}),e[11]=f):f=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load recent activity"}),e[12]=g):g=e[12];let s;e[13]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"lg:col-span-3 min-h-0 overflow-hidden",children:o.jsx(fe,{fallback:g,children:o.jsx(i.Suspense,{fallback:o.jsx(we.Skeleton,{}),children:o.jsx(we,{})})})}),e[13]=s):s=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load top tools"}),e[14]=v):v=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx("div",{className:"flex-1 overflow-auto relative",children:o.jsx("div",{className:"h-full",children:o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-6 lg:grid-rows-[auto_1fr] gap-[0.5px] bg-border h-full",children:[f,s,o.jsx("div",{className:"lg:col-span-3 min-h-0 overflow-hidden",children:o.jsx(fe,{fallback:v,children:o.jsx(i.Suspense,{fallback:o.jsx(Ce.Skeleton,{}),children:o.jsx(Ce,{})})})})]})})}),e[15]=b):b=e[15];let h;return e[16]!==u?(h=o.jsxs(qe,{children:[l,u,b]}),e[16]=u,e[17]=h):h=e[17],h}export{Ar as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b1 as V,b2 as D,b3 as W,b4 as Q,b5 as U,b6 as H,c as M,j as s,r as O,a5 as G,a2 as Y,a as q,b7 as J,ao as Z}from"./index-YfohaNt1.js";import{g as X,a as ee}from"./well-known-mcp-Dq2j3ucM.js";import{C as te}from"./collection-header-C0Jrsz0s.js";import{I as se,a as ie,c as ne,d as B,b as re}from"./use-connection-DxtpeU7L.js";import{a as le,T as oe,b as ae,u as A}from"./tooltip-D_78gfFh.js";import{s as ce}from"./slugify-CEUa2lfQ.js";import{I as T}from"./icon-DR1spsQB.js";import{C as de}from"./collection-search-DRvKW-m6.js";import{C as me}from"./card-6GjFVmi6.js";import{g as fe,f as ue,a as he}from"./registry-utils-ulDDT0d8.js";import{e as xe}from"./app-name-gTETL9So.js";import{d as pe,a as ge,S as ve,b as je,c as Ne}from"./select-DmtIA5gb.js";import{C as ye}from"./connection-card-DsobEce7.js";import{B as Ce}from"./button-BN_zWXnf.js";import{E as we}from"./empty-state-BzOX9EED.js";import{a as be}from"./use-binding-Bb2paZzF.js";import{L as Se,u as Pe}from"./localstorage-keys-Z7g5bnTn.js";import"./collection-display-button-D2Zl4v_d.js";import"./dropdown-menu-DLU49g1s.js";import"./utils-pyyeDP1p.js";import"./input-CcvqgZcX.js";import"./badge-D1_SzxO5.js";import"./auth-DNx6G3kk.js";import"./useQuery-CJPC8H_4.js";var Re=class extends V{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:D()})}getOptimisticResult(t){return t.behavior=D(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){const{state:n}=t,c=super.createResult(t,e),{isFetching:l,isRefetching:h,isError:d,isRefetchError:m}=c,a=n.fetchMeta?.fetchMore?.direction,i=d&&a==="forward",r=l&&a==="forward",o=d&&a==="backward",f=l&&a==="backward";return{...c,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Q(e,n.data),hasPreviousPage:W(e,n.data),isFetchNextPageError:i,isFetchingNextPage:r,isFetchPreviousPageError:o,isFetchingPreviousPage:f,isRefetchError:m&&!i&&!o,isRefetching:h&&!r&&!f}}};function Ie(t,e){return U({...t,enabled:!0,suspense:!0,throwOnError:H},Re,e)}function Ee(t){const e=t.title||t.server.title||t.id||"Unnamed Item",n=t.server.description||null,c=t.server.icons?.[0]?.src||fe(t.server.repository)||null,l=t._meta?.["mcp.mesh"]?.verified??!1,h=t.server.version,m=(t.server.remotes?.length??0)>0;let a=e,i=null;if(e.includes("/")){const r=e.split("/");r.length>=2&&(i=r[0]||null,a=xe(e))}if(!i){const r=t._meta?.["mcp.mesh"]?.scopeName,o=t._meta?.["mcp.mesh"]?.appName;r&&o?i=`${r}/${o}`:r&&(i=r)}return{icon:c,scopeName:i,displayName:a,description:n,version:h||null,isVerified:l,canInstall:m}}function ke(t){const e=M.c(45),{icon:n,scopeName:c,displayName:l,description:h,version:d,isVerified:m,canInstall:a,onClick:i}=t;let r;e[0]!==l||e[1]!==n?(r=s.jsx(se,{icon:n,name:l,size:"md",className:"shadow-sm"}),e[0]=l,e[1]=n,e[2]=r):r=e[2];let o;e[3]!==l?(o=s.jsx("span",{className:"truncate",children:l}),e[3]=l,e[4]=o):o=e[4];let f;e[5]!==m?(f=m&&s.jsx(T,{name:"verified",size:16,className:"text-success shrink-0"}),e[5]=m,e[6]=f):f=e[6];let p;e[7]!==a?(p=!a&&s.jsx(T,{name:"lock",size:16,className:"text-muted-foreground shrink-0",title:"This MCP Server cannot be connected"}),e[7]=a,e[8]=p):p=e[8];let u;e[9]!==o||e[10]!==f||e[11]!==p?(u=s.jsx(le,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2 text-base font-semibold min-w-0",children:[o,f,p]})}),e[9]=o,e[10]=f,e[11]=p,e[12]=u):u=e[12];let g;e[13]!==l?(g=s.jsx("p",{children:l}),e[13]=l,e[14]=g):g=e[14];let N;e[15]!==a?(N=!a&&s.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[15]=a,e[16]=N):N=e[16];let y;e[17]!==g||e[18]!==N?(y=s.jsxs(oe,{children:[g,N]}),e[17]=g,e[18]=N,e[19]=y):y=e[19];let R;e[20]!==u||e[21]!==y?(R=s.jsxs(ae,{children:[u,y]}),e[20]=u,e[21]=y,e[22]=R):R=e[22];let C;e[23]!==c?(C=c&&s.jsx("span",{className:"truncate",children:c}),e[23]=c,e[24]=C):C=e[24];let b;e[25]!==c||e[26]!==d?(b=d&&s.jsxs(s.Fragment,{children:[c&&s.jsx("span",{children:"•"}),s.jsxs("span",{className:"shrink-0",children:["v",d]})]}),e[25]=c,e[26]=d,e[27]=b):b=e[27];let S;e[28]!==C||e[29]!==b?(S=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[C,b]}),e[28]=C,e[29]=b,e[30]=S):S=e[30];let v;e[31]!==S||e[32]!==R?(v=s.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:s.jsxs("div",{className:"min-w-0 flex-1",children:[R,S]})}),e[31]=S,e[32]=R,e[33]=v):v=e[33];let x;e[34]!==r||e[35]!==v?(x=s.jsxs("div",{className:"flex gap-3",children:[r,v]}),e[34]=r,e[35]=v,e[36]=x):x=e[36];const I=h||"No description available";let P;e[37]!==I?(P=s.jsx("div",{className:"grid grid-cols-1 gap-1 min-w-0",children:s.jsx("div",{className:"text-base text-muted-foreground line-clamp-2",children:I})}),e[37]=I,e[38]=P):P=e[38];let E;e[39]!==x||e[40]!==P?(E=s.jsxs("div",{className:"flex flex-col gap-4 h-full relative",children:[x,P]}),e[39]=x,e[40]=P,e[41]=E):E=e[41];let j;return e[42]!==i||e[43]!==E?(j=s.jsx(me,{className:"p-6 cursor-pointer hover:shadow-md transition-shadow",onClick:i,children:E}),e[42]=i,e[43]=E,e[44]=j):j=e[44],j}function z(t){const e=M.c(12),{items:n,title:c,onItemClick:l}=t;if(n.length===0)return null;let h;e[0]!==c?(h=c&&s.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:s.jsx("h2",{className:"text-lg font-medium",children:c})}),e[0]=c,e[1]=h):h=e[1];let d;if(e[2]!==n||e[3]!==l){let i;e[5]!==l?(i=r=>{const o=Ee(r);return s.jsx(ke,{...o,onClick:()=>l(r)},r.id)},e[5]=l,e[6]=i):i=e[6],d=n.map(i),e[2]=n,e[3]=l,e[4]=d}else d=e[4];let m;e[7]!==d?(m=s.jsx("div",{className:"grid grid-cols-4 gap-4",children:d}),e[7]=d,e[8]=m):m=e[8];let a;return e[9]!==h||e[10]!==m?(a=s.jsxs("div",{className:"flex flex-col gap-4",children:[h,m]}),e[9]=h,e[10]=m,e[11]=a):a=e[11],a}function Te(t,e){if(!e)return t;const n=e.toLowerCase();return t.filter(c=>(c.name||c.title||"").toLowerCase().includes(n)||(c.description||c.server.description||"").toLowerCase().includes(n))}function Me(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0||t.server._meta?.["mcp.mesh"]?.verified===!0}function Le(t){const e=M.c(32),{items:n,isLoadingMore:c,registryId:l,hasMore:h,onLoadMore:d}=t,m=c===void 0?!1:c,a=h===void 0?!1:h,[i,r]=O.useState(""),o=G(),{org:f}=A(),p=O.useRef(null);let u,g,N;e[0]!==n||e[1]!==i?(u=Te(n,i),N=u.filter(Me),g=u.filter(j=>!N.find(k=>k.id===j.id)),e[0]=n,e[1]=i,e[2]=u,e[3]=g,e[4]=N):(u=e[2],g=e[3],N=e[4]);const y=g;let R;e[5]!==o||e[6]!==f.slug||e[7]!==l?(R=j=>{const k=ce(j.name||j.title||j.server.title||""),L=j.server.name;o({to:"/$org/store/$appName",params:{org:f.slug,appName:k},search:{registryId:l,serverName:L}})},e[5]=o,e[6]=f.slug,e[7]=l,e[8]=R):R=e[8];const C=R;let b;e[9]!==a||e[10]!==m||e[11]!==d||e[12]!==i?(b=j=>{if(!a||!d||i||m)return;const k=j.currentTarget;k.scrollHeight-k.scrollTop-k.clientHeight<200&&d()},e[9]=a,e[10]=m,e[11]=d,e[12]=i,e[13]=b):b=e[13];const S=b;let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=j=>{j.key==="Enter"&&r(j.currentTarget.value)},e[14]=v):v=e[14];let x;e[15]!==i?(x=s.jsx(de,{value:i,onChange:r,placeholder:"Search for an MCP Server...",onKeyDown:v}),e[15]=i,e[16]=x):x=e[16];let I;e[17]!==y||e[18]!==u||e[19]!==C||e[20]!==a||e[21]!==m||e[22]!==n.length||e[23]!==i||e[24]!==N?(I=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:n.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(T,{name:"inbox",size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):i&&u.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(T,{name:"search",size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[N.length>0&&s.jsx(z,{items:N,title:"Verified",onItemClick:C}),y.length>0&&s.jsx(z,{items:y,title:N.length>0?"All":"",onItemClick:C}),a&&!i&&m&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(T,{name:"progress_activity",size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[17]=y,e[18]=u,e[19]=C,e[20]=a,e[21]=m,e[22]=n.length,e[23]=i,e[24]=N,e[25]=I):I=e[25];let P;e[26]!==S||e[27]!==I?(P=s.jsx("div",{ref:p,className:"flex-1 overflow-y-auto",onScroll:S,children:I}),e[26]=S,e[27]=I,e[28]=P):P=e[28];let E;return e[29]!==x||e[30]!==P?(E=s.jsxs("div",{className:"flex flex-col h-full",children:[x,P]}),e[29]=x,e[30]=P,e[31]=E):E=e[31],E}const F=24;function $e(t){const e=M.c(27),{registryId:n}=t,c=ie(n);let l,h,d,m;if(e[0]!==c?.tools||e[1]!==n){if(l=ue(c?.tools),!l)throw new Error("This registry does not support listing store items.");let x;e[6]!==n?(x=ne(n),e[6]=n,e[7]=x):x=e[7],m=x,d=Ie,h=Y.toolCall(n,l,JSON.stringify({limit:F})),e[0]=c?.tools,e[1]=n,e[2]=l,e[3]=h,e[4]=d,e[5]=m}else l=e[2],h=e[3],d=e[4],m=e[5];let a;e[8]!==l||e[9]!==m?(a=async x=>{const{pageParam:I}=x;return await m(l,I?{cursor:I,limit:F}:{limit:F})},e[8]=l,e[9]=m,e[10]=a):a=e[10];let i;e[11]!==h||e[12]!==a?(i={queryKey:h,queryFn:a,initialPageParam:void 0,getNextPageParam:Ke,staleTime:36e5},e[11]=h,e[12]=a,e[13]=i):i=e[13];const{data:r,fetchNextPage:o,hasNextPage:f,isFetchingNextPage:p}=d(i);let u;e:{if(!r?.pages||r.pages.length===0){u=null;break e}const x=r.pages[0];if(typeof x=="object"&&x!==null&&"totalCount"in x&&typeof x.totalCount=="number"){u=x.totalCount;break e}u=null}const g=u,N=r?.pages;let y;e[14]!==N?(y=he(N),e[14]=N,e[15]=y):y=e[15];const R=y;let C;e[16]!==o||e[17]!==f||e[18]!==p?(C=()=>{f&&!p&&o()},e[16]=o,e[17]=f,e[18]=p,e[19]=C):C=e[19];const b=C,S=f??!1;let v;return e[20]!==R||e[21]!==b||e[22]!==p||e[23]!==n||e[24]!==S||e[25]!==g?(v=s.jsx(Le,{items:R,isLoadingMore:p,registryId:n,hasMore:S,onLoadMore:b,totalCount:g}),e[20]=R,e[21]=b,e[22]=p,e[23]=n,e[24]=S,e[25]=g,e[26]=v):v=e[26],v}function Ke(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function _e(t){const e=M.c(15),{registries:n,value:c,onValueChange:l,onAddWellKnown:h,wellKnownRegistries:d,placeholder:m}=t,a=m===void 0?"Select a registry...":m;let i;e[0]!==a?(i=s.jsx(ge,{className:"w-[200px] h-8!",children:s.jsx(ve,{placeholder:a})}),e[0]=a,e[1]=i):i=e[1];let r;e[2]!==n?(r=n.map(Fe),e[2]=n,e[3]=r):r=e[3];let o;e[4]!==h||e[5]!==d?(o=d.length>0&&s.jsxs("div",{className:"border-t border-border pt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),d.map(u=>s.jsxs("button",{onClick:g=>{g.preventDefault(),g.stopPropagation(),h(u)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-xl py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[u.icon?s.jsx("img",{src:u.icon,alt:u.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:u.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:u.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(T,{name:"add",size:16})})]},u.id??u.title))]}),e[4]=h,e[5]=d,e[6]=o):o=e[6];let f;e[7]!==r||e[8]!==o?(f=s.jsxs(je,{children:[r,o]}),e[7]=r,e[8]=o,e[9]=f):f=e[9];let p;return e[10]!==l||e[11]!==i||e[12]!==f||e[13]!==c?(p=s.jsxs(Ne,{value:c,onValueChange:l,children:[i,f]}),e[10]=l,e[11]=i,e[12]=f,e[13]=c,e[14]=p):p=e[14],p}function Fe(t){return s.jsx(pe,{className:"cursor-pointer",value:t.id??t.name,children:s.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?s.jsx("img",{src:t.icon,alt:t.name,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:t.name})]})},t.id??t.name)}function Oe(t){const e=M.c(13),{registries:n,onConnected:c}=t,l=n.length===1;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:423,height:279,className:"max-w-full h-auto"}),e[0]=h):h=e[0];const d=l?"Connect to registry":"Connect to a store",m=l?"Connect to discover and use MCP Servers from the community.":"Choose a registry to discover and connect MCP Servers from the community.",a=`grid gap-4 w-full ${l?"grid-cols-1 justify-items-center":"grid-cols-1 md:grid-cols-2"}`;let i;if(e[1]!==c||e[2]!==n){let f;e[4]!==c?(f=(p,u)=>{const g=p.id??`registry-${u}`;return s.jsx(Ae,{registry:{...p,id:g},onConnected:c},g)},e[4]=c,e[5]=f):f=e[5],i=n.map(f),e[1]=c,e[2]=n,e[3]=i}else i=e[3];let r;e[6]!==a||e[7]!==i?(r=s.jsx("div",{className:a,children:i}),e[6]=a,e[7]=i,e[8]=r):r=e[8];let o;return e[9]!==d||e[10]!==m||e[11]!==r?(o=s.jsx(we,{image:h,title:d,description:m,descriptionClassName:"max-w-[500px]",actionsClassName:"w-full max-w-2xl",actions:r}),e[9]=d,e[10]=m,e[11]=r,e[12]=o):o=e[12],o}function Ae(t){const e=M.c(15),{registry:n,onConnected:c}=t,l=B(),{org:h}=A(),{data:d}=q.useSession(),m=!!h&&!!d?.user?.id;let a;e[0]!==l.create||e[1]!==m||e[2]!==c||e[3]!==n?(a=async()=>{if(!m)return;const u=await l.create.mutateAsync(n);c?.(u.id)},e[0]=l.create,e[1]=m,e[2]=c,e[3]=n,e[4]=a):a=e[4];const i=a,r=!m||l.create.isPending;let o;e[5]!==l.create.isPending?(o=l.create.isPending?s.jsxs(s.Fragment,{children:[s.jsx(T,{name:"progress_activity",className:"animate-spin"}),"Connecting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(T,{name:"add"}),"Connect"]}),e[5]=l.create.isPending,e[6]=o):o=e[6];let f;e[7]!==i||e[8]!==r||e[9]!==o?(f=s.jsx(Ce,{variant:"outline",className:"w-full",disabled:r,onClick:i,children:o}),e[7]=i,e[8]=r,e[9]=o,e[10]=f):f=e[10];let p;return e[11]!==i||e[12]!==n||e[13]!==f?(p=s.jsx(ye,{connection:n,onClick:i,footer:f,className:"transition-all hover:border-primary/50 hover:shadow-md"}),e[11]=i,e[12]=n,e[13]=f,e[14]=p):p=e[14],p}function ut(){const t=M.c(37),{org:e}=A(),n=re(),c=B(),l=J(),h=l.location.pathname.includes("/store/")&&l.location.pathname.split("/").length>3,d=be(n);let m;t[0]!==d?(m=d.map(Be),t[0]=d,t[1]=m):m=t[1];const a=m;let i;t[2]!==e.slug?(i=Se.selectedRegistry(e.slug),t[2]=e.slug,t[3]=i):i=t[3];const[r,o]=Pe(i,ze);let f;if(t[4]!==d||t[5]!==r){let w;t[7]!==r?(w=_=>_.id===r,t[7]=r,t[8]=w):w=t[8],f=d.find(w),t[4]=d,t[5]=r,t[6]=f}else f=t[6];const u=f?.id||d[0]?.id||"";let g;t[9]===Symbol.for("react.memo_cache_sentinel")?(g=[X()],t[9]=g):g=t[9];const N=g;let y;t[10]===Symbol.for("react.memo_cache_sentinel")?(y=[ee()],t[10]=y):y=t[10];const R=y;let C;t[11]!==c.create||t[12]!==o?(C=async w=>{const _=await c.create.mutateAsync(w);o(_.id)},t[11]=c.create,t[12]=o,t[13]=C):C=t[13];const b=C;let S;t[14]!==d?(S=new Set(d.map(De)),t[14]=d,t[15]=S):S=t[15];const v=S;let x;t[16]!==v?(x=N.filter(w=>w.id&&!v.has(w.id)),t[16]=v,t[17]=x):x=t[17];const I=x;let P;t[18]!==v?(P=R.filter(w=>w.id&&!v.has(w.id)),t[18]=v,t[19]=P):P=t[19];const E=P;if(h){let w;return t[20]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Z,{}),t[20]=w):w=t[20],w}let j;t[21]!==b?(j=async w=>b(w),t[21]=b,t[22]=j):j=t[22];let k;t[23]!==I||t[24]!==u||t[25]!==a||t[26]!==o||t[27]!==j?(k=s.jsx(te,{title:"Store",ctaButton:s.jsx(_e,{wellKnownRegistries:I,registries:a,value:u,onValueChange:o,onAddWellKnown:j,placeholder:"Select store..."})}),t[23]=I,t[24]=u,t[25]=a,t[26]=o,t[27]=j,t[28]=k):k=t[28];let L;t[29]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(T,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[29]=L):L=t[29];let $;t[30]!==E||t[31]!==u||t[32]!==o?($=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(O.Suspense,{fallback:L,children:u?s.jsx($e,{registryId:u}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(Oe,{registries:E,onConnected:w=>{o(w)}})})})}),t[30]=E,t[31]=u,t[32]=o,t[33]=$):$=t[33];let K;return t[34]!==k||t[35]!==$?(K=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[k,$]}),t[34]=k,t[35]=$,t[36]=K):K=t[36],K}function De(t){return t.id}function ze(){return""}function Be(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{ut as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as E,j as s,r as le,a5 as be,d as Ne,b as we,a as Ce,a6 as ge}from"./index-YfohaNt1.js";import{I as L}from"./icon-DR1spsQB.js";import{B as xe}from"./button-BN_zWXnf.js";import{b as Te,D as _e,a as ke,c as Se}from"./dropdown-menu-DLU49g1s.js";import{E as Ie}from"./empty-state-BzOX9EED.js";import{R as Ae,T as Le,a as Ee}from"./resource-tabs-O3UgRbzl.js";import{d as Ue,b as De,a as Me,c as Ve}from"./use-connection-DxtpeU7L.js";import{a as Pe}from"./use-binding-Bb2paZzF.js";import{u as Re}from"./use-tool-call-BRFgmS8T.js";import{u as Be}from"./use-mcp-CcUDnETM.js";import{u as ve}from"./tooltip-D_78gfFh.js";import{e as $e}from"./extract-connection-data-C-h71gs0.js";import{s as ze}from"./slugify-CEUa2lfQ.js";import{f as Oe,e as He,b as Fe,c as Ge,g as We}from"./registry-utils-ulDDT0d8.js";import{e as Ke}from"./app-name-gTETL9So.js";import"./utils-pyyeDP1p.js";import"./useQuery-CJPC8H_4.js";import"./collection-display-button-D2Zl4v_d.js";import"./collection-search-DRvKW-m6.js";import"./input-CcvqgZcX.js";import"./collection-table-wrapper-pohJqEDN.js";import"./card-6GjFVmi6.js";import"./layout-BlUr8W2A.js";import"./badge-D1_SzxO5.js";import"./auth-DNx6G3kk.js";import"./generate-id-Dyweu44Y.js";function qe(t){const e=E.c(3),{message:r}=t,n=r===void 0?"Loading app details...":r;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(L,{name:"progress_activity",size:48,className:"animate-spin mb-4"}),e[0]=o):o=e[0];let i;return e[1]!==n?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[o,s.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),e[1]=n,e[2]=i):i=e[2],i}function Je(t){const e=E.c(9),{error:r,onBack:n}=t,o=r instanceof Error?r.message:r;let i,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(L,{name:"error",size:48,className:"text-destructive mb-4"}),a=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading app"}),e[0]=i,e[1]=a):(i=e[0],a=e[1]);let c;e[2]!==o?(c=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:o}),e[2]=o,e[3]=c):c=e[3];let l;e[4]!==n?(l=s.jsx("button",{onClick:n,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back"}),e[4]=n,e[5]=l):l=e[5];let f;return e[6]!==c||e[7]!==l?(f=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[i,a,c,l]}),e[6]=c,e[7]=l,e[8]=f):f=e[8],f}function Qe(t){const e=E.c(5),{onBack:r}=t;let n,o,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(L,{name:"search_off",size:48,className:"text-muted-foreground mb-4"}),o=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"App not found"}),i=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The app you're looking for doesn't exist in this store."}),e[0]=n,e[1]=o,e[2]=i):(n=e[0],o=e[1],i=e[2]);let a;return e[3]!==r?(a=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,o,i,s.jsx("button",{onClick:r,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back to Store"})]}),e[3]=r,e[4]=a):a=e[4],a}function Xe(t){const e=E.c(3),{onBack:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(L,{name:"arrow_back",size:20}),e[0]=n):n=e[0];let o;return e[1]!==r?(o=s.jsx("div",{className:"shrink-0 bg-background border-b border-border px-4 py-3",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs("button",{onClick:r,className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[n,"Back"]})})}),e[1]=r,e[2]=o):o=e[2],o}function Ye(t){const e=E.c(32),{data:r,itemVersions:n,onInstall:o,canInstall:i,isInstalling:a}=t,c=i===void 0?!0:i,l=a===void 0?!1:a,[f,u]=le.useState(0);let x;e[0]!==o?(x=d=>{u(d),o(d)},e[0]=o,e[1]=x):x=e[1];const p=x;let h;e[2]!==r.icon||e[3]!==r.name?(h=r.icon?s.jsx("img",{src:r.icon,alt:r.name,crossOrigin:"anonymous",referrerPolicy:"no-referrer",onError:d=>{const v=d.target;v.style.display="none";const I=v.parentElement;I&&(I.innerHTML=r.name.substring(0,2).toUpperCase())},className:"w-full h-full object-cover rounded-2xl"}):r.name.substring(0,2).toUpperCase(),e[2]=r.icon,e[3]=r.name,e[4]=h):h=e[4];let g;e[5]!==h?(g=s.jsx("div",{className:"shrink-0 w-16 h-16 rounded-2xl bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-3xl font-bold text-primary overflow-hidden",children:h}),e[5]=h,e[6]=g):g=e[6];let b;e[7]!==r.name?(b=s.jsx("h1",{className:"text-3xl font-bold",children:r.name}),e[7]=r.name,e[8]=b):b=e[8];let w;e[9]!==r.verified?(w=r.verified&&s.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[9]=r.verified,e[10]=w):w=e[10];let C;e[11]!==b||e[12]!==w?(C=s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b,w]}),e[11]=b,e[12]=w,e[13]=C):C=e[13];let T;e[14]!==r.description?(T=r.description&&s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:r.description}),e[14]=r.description,e[15]=T):T=e[15];let _;e[16]!==C||e[17]!==T?(_=s.jsxs("div",{className:"flex-1 min-w-0",children:[C,T]}),e[16]=C,e[17]=T,e[18]=_):_=e[18];let k;e[19]!==c||e[20]!==p||e[21]!==l||e[22]!==n||e[23]!==o||e[24]!==f?(k=c?s.jsx("div",{className:"shrink-0",children:n.length>1?s.jsxs("div",{className:"flex",children:[s.jsxs(xe,{variant:"brand",onClick:()=>p(0),disabled:l,className:"shrink-0 rounded-r-none cursor-pointer",children:[s.jsx(L,{name:"add",size:20}),l?"Connecting...":"Connect MCP Server"]}),s.jsxs(Te,{children:[s.jsx(_e,{asChild:!0,children:s.jsx(xe,{variant:"brand",disabled:l,className:"shrink-0 rounded-l-none px-2 border-l-2 border-l-white/50 cursor-pointer",children:s.jsx(L,{name:"expand_more",size:20})})}),s.jsx(ke,{align:"end",className:"w-56",children:n.map((d,v)=>{const I=d._meta?.["io.modelcontextprotocol.registry/official"];return s.jsx(Se,{onClick:()=>p(v),disabled:l,className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-start justify-between gap-2 w-full",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"font-medium text-sm",children:["v",d.server?.version||"unknown"]}),I?.isLatest&&s.jsx("div",{className:"text-xs text-primary font-semibold mt-1",children:"LATEST"})]}),v===f&&s.jsx(L,{name:"check_circle",size:16,className:"text-primary shrink-0 mt-1"})]})},v)})})]})]}):s.jsxs(xe,{variant:"brand",onClick:()=>o(),disabled:n.length===0||l,className:"shrink-0",children:[s.jsx(L,{name:"add",size:20}),l?"Connecting...":"Connect MCP Server"]})}):s.jsx("div",{className:"shrink-0 px-4 py-2 text-sm text-muted-foreground bg-muted rounded-lg",children:"Cannot be connected"}),e[19]=c,e[20]=p,e[21]=l,e[22]=n,e[23]=o,e[24]=f,e[25]=k):k=e[25];let N;e[26]!==_||e[27]!==k?(N=s.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[_,k]}),e[26]=_,e[27]=k,e[28]=N):N=e[28];let S;return e[29]!==N||e[30]!==g?(S=s.jsxs("div",{className:"pl-10 flex items-start gap-6 pb-12 pr-10 border-b border-border",children:[g,N]}),e[29]=N,e[30]=g,e[31]=S):S=e[31],S}function Ze(t){if(!t)return"—";try{const e=new Date(t);return isNaN(e.getTime())?"—":e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function et(t){const e=E.c(48),{data:r,publisherInfo:n,selectedItem:o}=t;let i;e[0]!==r.description?(i=r.description&&s.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[s.jsx("h2",{className:"text-lg font-medium mb-3",children:"Overview"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:r.description})]}),e[0]=r.description,e[1]=i):i=e[1];let a;e[2]!==r.publisher||e[3]!==n.logo?(a=n.logo?s.jsx("img",{src:n.logo,alt:r.publisher,crossOrigin:"anonymous",referrerPolicy:"no-referrer",onError:I=>{const X=I.target;X.style.display="none";const M=X.parentElement;if(M){const y=r.publisher==="io.modelcontextprotocol.registry/official"?"OR":r.publisher.substring(0,2).toUpperCase();M.innerHTML=y}},className:"w-full h-full object-cover"}):r.publisher==="io.modelcontextprotocol.registry/official"?"OR":r.publisher.substring(0,2).toUpperCase(),e[2]=r.publisher,e[3]=n.logo,e[4]=a):a=e[4];let c;e[5]!==a?(c=s.jsx("div",{className:"w-12 h-12 rounded-lg bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-sm font-semibold text-primary shrink-0 overflow-hidden",children:a}),e[5]=a,e[6]=c):c=e[6];let l;e[7]!==r.publisher?(l=r.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":r.publisher.charAt(0).toUpperCase()+r.publisher.slice(1),e[7]=r.publisher,e[8]=l):l=e[8];let f;e[9]!==l?(f=s.jsx("div",{className:"font-medium",children:l}),e[9]=l,e[10]=f):f=e[10];let u;e[11]!==n.count?(u=n.count>0?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:"/globe.svg",alt:"globe",className:"w-3 h-3"}),s.jsxs("span",{children:[n.count," ",n.count===1?"published app":"published apps"]})]}):"Publisher",e[11]=n.count,e[12]=u):u=e[12];let x;e[13]!==u?(x=s.jsx("div",{className:"text-xs text-muted-foreground flex items-center gap-1",children:u}),e[13]=u,e[14]=x):x=e[14];let p;e[15]!==f||e[16]!==x?(p=s.jsxs("div",{children:[f,x]}),e[15]=f,e[16]=x,e[17]=p):p=e[17];let h;e[18]!==c||e[19]!==p?(h=s.jsx("div",{className:"px-5 border-b border-border",children:s.jsxs("div",{className:"flex items-center gap-3 py-5",children:[c,p]})}),e[18]=c,e[19]=p,e[20]=h):h=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("h2",{className:"text-lg font-medium mb-3",children:"Technical Details"}),e[21]=g):g=e[21];let b;e[22]!==r.version?(b=r.version&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Version"}),s.jsxs("span",{className:"text-foreground font-medium",children:["v",r.version]})]}),e[22]=r.version,e[23]=b):b=e[23];let w;e[24]!==r.connectionType?(w=r.connectionType&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Connection Type"}),s.jsx("span",{className:"text-foreground font-medium",children:r.connectionType})]}),e[24]=r.connectionType,e[25]=w):w=e[25];let C;e[26]!==r.schemaVersion?(C=r.schemaVersion&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Schema Version"}),s.jsx("span",{className:"text-foreground font-medium",children:r.schemaVersion})]}),e[26]=r.schemaVersion,e[27]=C):C=e[27];let T;e[28]!==r.websiteUrl?(T=r.websiteUrl&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Website"}),s.jsxs("a",{href:r.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1",children:[s.jsx("span",{children:"Visit"}),s.jsx(L,{name:"open_in_new",size:14})]})]}),e[28]=r.websiteUrl,e[29]=T):T=e[29];let _;e[30]!==r.repository?(_=r.repository?.url&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Source"}),s.jsxs("a",{href:r.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1",children:[s.jsx("span",{children:"GitHub"}),s.jsx(L,{name:"open_in_new",size:14})]})]}),e[30]=r.repository,e[31]=_):_=e[31];let k;e[32]!==b||e[33]!==w||e[34]!==C||e[35]!==T||e[36]!==_?(k=s.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[g,b,w,C,T,_]}),e[32]=b,e[33]=w,e[34]=C,e[35]=T,e[36]=_,e[37]=k):k=e[37];let N;e[38]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[38]=N):N=e[38];let S;e[39]!==o.updated_at?(S=Ze(o.updated_at),e[39]=o.updated_at,e[40]=S):S=e[40];let d;e[41]!==S?(d=s.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[N,s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:S})]}),e[41]=S,e[42]=d):d=e[42];let v;return e[43]!==i||e[44]!==k||e[45]!==d||e[46]!==h?(v=s.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,h,k,d]}),e[43]=i,e[44]=k,e[45]=d,e[46]=h,e[47]=v):v=e[47],v}function tt(t){const e=E.c(18),{data:r,availableTabs:n,effectiveActiveTabId:o,effectiveTools:i,isLoadingTools:a,onTabChange:c}=t,l=a===void 0?!1:a;let f;e[0]!==i?(f=i.map(st),e[0]=i,e[1]=f):f=e[1];const u=f;let x;e[2]!==n||e[3]!==o||e[4]!==c?(x=n.length>0&&s.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:s.jsx(Ae,{tabs:n,activeTab:o,onTabChange:c})}),e[2]=n,e[3]=o,e[4]=c,e[5]=x):x=e[5];let p;e[6]!==o||e[7]!==i.length||e[8]!==l||e[9]!==u?(p=o==="tools"&&s.jsx("div",{className:"flex flex-col flex-1",children:l?s.jsxs("div",{className:"flex items-center justify-center p-8",children:[s.jsx(L,{name:"progress_activity",size:24,className:"animate-spin"}),s.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):i.length>0?s.jsx(Le,{tools:u,showToolbar:!1,emptyMessage:"This app doesn't have any tools."}):s.jsx(Ie,{image:null,title:"No tools available",description:"This app doesn't have any tools."})}),e[6]=o,e[7]=i.length,e[8]=l,e[9]=u,e[10]=p):p=e[10];let h;e[11]!==r?.repository||e[12]!==o?(h=o==="readme"&&s.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:s.jsx(Ee,{repository:r?.repository})}),e[11]=r?.repository,e[12]=o,e[13]=h):h=e[13];let g;return e[14]!==x||e[15]!==p||e[16]!==h?(g=s.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[x,p,h]}),e[14]=x,e[15]=p,e[16]=h,e[17]=g):g=e[17],g}function st(t){const e=t;return{name:e.name||"",description:e.description||void 0}}function rt(t,e){if(!t||!e)return;const r=e.toLowerCase();return t.find(n=>n.app_name?.toLowerCase()===r||n.app_id?.toLowerCase()===r||n.title.toLowerCase()===r)||t.find(n=>n.title.toLowerCase().includes(r))}function ot(t,e,r,n,o){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:n?.icon||void 0,count:o??t.length};const i=e.toLowerCase(),a=t.filter(l=>(l._meta?.["io.modelcontextprotocol.registry/official"]?"io.modelcontextprotocol.registry/official":l.publisher||l._meta?.["mcp.mesh"]?.scopeName||"Unknown").toLowerCase()===i);return{logo:r?.icon||a[0]?.publisher_logo||a[0]?.icon||void 0,count:a.length}}function nt(t){const e=t.server._meta?.["mcp.mesh/publisher-provided"],r=t._meta?.["mcp.mesh"],n=t._meta?.["io.modelcontextprotocol.registry/official"],o=t.server,i=Fe(o.remotes?.[0]?.type),a=Ge(o.$schema),c=n?"io.modelcontextprotocol.registry/official":t.publisher||r?.scopeName||"Unknown",l=We(o.repository),f=t.icon||t.image||t.logo||o.icons?.[0]?.src||l||null,u=t.name||t.title||t.server?.title||"Unnamed Item";return{name:Ke(u),description:t.description||t.summary||t.server?.description||"",icon:f,verified:t.verified||r?.verified,publisher:c,version:o.version||null,websiteUrl:o.websiteUrl||null,repository:o.repository||null,schemaVersion:a??null,connectionType:i,connectionUrl:null,remoteUrl:null,tools:t.tools||o.tools||e?.tools||[],models:t.models||o.models||e?.models||[],emails:t.emails||o.emails||e?.emails||[],analytics:t.analytics||o.analytics||e?.analytics,cdn:t.cdn||o.cdn||e?.cdn}}class it extends le.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){console.error("Store app detail error:",e,r)}render(){return this.state.hasError?s.jsx(Je,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function lt(){const t=E.c(70),{org:e}=ve(),r=be();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{appName:o}=Ne(n);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{registryId:a,serverName:c}=we(i),[l,f]=le.useState("readme"),u=Ue(),x=De(),{data:p}=Ce.useSession(),h=Pe(x),g=a||h[0]?.id||"",b=Me(g),w=Oe(b?.tools),C=b?.tools&&b.tools.find(ft)?.name||"",T=b?.tools&&b.tools.find(mt)?.name||"",_=Ve(g),k=!!c;let N,S;k?(N=C||T,S={name:c}):(N=w,S={});const{data:d}=Re({toolCaller:_,toolName:N,toolInputParams:S,scope:g});let v=[],I=[],X=null;if(d){if(Array.isArray(d))v=d;else if(typeof d=="object"&&d!==null)if("totalCount"in d&&typeof d.totalCount=="number"&&(X=d.totalCount),"item"in d&&d.item){const m=d.item,A=m.id||"",V=m.server,P=m._meta;let D;t[2]!==m.title||t[3]!==A||t[4]!==V||t[5]!==P?(D=[{id:A,title:m.title,server:V,_meta:P}],t[2]=m.title,t[3]=A,t[4]=V,t[5]=P,t[6]=D):D=t[6],v=D}else{let m;"versions"in d&&Array.isArray(d.versions)?m="versions":"servers"in d&&Array.isArray(d.servers)?m="servers":m=Object.keys(d).find(A=>Array.isArray(d[A])),m&&(v=d[m],(m==="versions"||N?.includes("VERSIONS"))&&(I=v))}}let M;t[7]!==o?(M=m=>{const A=m.name||m.title||m.server.title||"";return ze(A)===o},t[7]=o,t[8]=M):M=t[8];let y=v.find(M);if(!y&&c){let m;t[9]!==c?(m=A=>A.server.name===c||A.name===c||A.title===c,t[9]=c,t[10]=m):m=t[10],y=v.find(m)}const j=y?nt(y):null,ae=(j?.tools?.length||0)>0,ce=y?.server?.remotes?.[0]?.url||null,Y=!ae&&!!ce,Z=Be({url:Y?ce:""}),ee=Y&&Z.state==="connecting";let te;t[11]!==Z||t[12]!==Y?(te=Y&&Z.state==="ready"?(Z.tools||[]).map(dt):[],t[11]=Z,t[12]=Y,t[13]=te):te=t[13];const he=te,R=ae?j?.tools||[]:he,ye=rt(x,j?.publisher),de=j?ot(v,j.publisher,ye,b??null,X):{count:0},je=j?.repository?He(j.repository):null,me=!!j?.repository&&!!je;let B;t[14]!==me?(B={id:"readme",label:"README",visible:me},t[14]=me,t[15]=B):B=t[15];const fe=ae||he.length>0||ee&&!!ce;let $;t[16]!==R.length||t[17]!==fe?($={id:"tools",label:"Tools",count:R.length,visible:fe},t[16]=R.length,t[17]=fe,t[18]=$):$=t[18];let se;t[19]!==B||t[20]!==$?(se=[B,$].filter(ct),t[19]=B,t[20]=$,t[21]=se):se=t[21];const U=se;let re;t[22]!==l||t[23]!==U?(re=U.find(m=>m.id===l)?l:U.find(at)?.id||U[0]?.id||"overview",t[22]=l,t[23]=U,t[24]=re):re=t[24];const pe=re;let oe;t[25]!==u||t[26]!==I||t[27]!==r||t[28]!==e||t[29]!==y||t[30]!==p?(oe=async m=>{const A=I[m??0]||y;if(!A||!e||!p?.user?.id)return;const V=$e(A,e.id,p.user.id);if(!V.connection_url){ge.error("This MCP Server cannot be connected: no connection URL available");return}try{const{id:P}=await u.create.mutateAsync(V);r({to:"/$org/mcps/$connectionId",params:{org:e.slug,connectionId:P}})}catch(P){const D=P;ge.error(`Failed to connect MCP Server: ${D instanceof Error?D.message:String(D)}`)}},t[25]=u,t[26]=I,t[27]=r,t[28]=e,t[29]=y,t[30]=p,t[31]=oe):oe=t[31];const ue=oe;let ne;t[32]!==r||t[33]!==e.slug?(ne=()=>{r({to:"/$org/store",params:{org:e.slug}})},t[32]=r,t[33]=e.slug,t[34]=ne):ne=t[34];const z=ne;if(!y){let m;return t[35]!==z?(m=s.jsx(Qe,{onBack:z}),t[35]=z,t[36]=m):m=t[36],m}if(!j)return null;const O=(y?.server?.remotes?.length??0)>0;let H;t[37]!==z?(H=s.jsx(Xe,{onBack:z}),t[37]=z,t[38]=H):H=t[38];let F;t[39]!==O?(F=!O&&s.jsxs("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-900",children:[s.jsx(L,{name:"info",size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t[39]=O,t[40]=F):F=t[40];let G;t[41]!==I||t[42]!==y?(G=I.length>0?I:[y],t[41]=I,t[42]=y,t[43]=G):G=t[43];let W;t[44]!==u.create.isPending||t[45]!==O||t[46]!==j||t[47]!==ue||t[48]!==G?(W=s.jsx(Ye,{data:j,itemVersions:G,onInstall:ue,canInstall:O,isInstalling:u.create.isPending}),t[44]=u.create.isPending,t[45]=O,t[46]=j,t[47]=ue,t[48]=G,t[49]=W):W=t[49];let K;t[50]!==j||t[51]!==de||t[52]!==y?(K=s.jsx(et,{data:j,publisherInfo:de,selectedItem:y}),t[50]=j,t[51]=de,t[52]=y,t[53]=K):K=t[53];let q;t[54]!==U||t[55]!==j||t[56]!==pe||t[57]!==R||t[58]!==ee?(q=s.jsx(tt,{data:j,availableTabs:U,effectiveActiveTabId:pe,effectiveTools:R,isLoadingTools:ee,onTabChange:f}),t[54]=U,t[55]=j,t[56]=pe,t[57]=R,t[58]=ee,t[59]=q):q=t[59];let J;t[60]!==K||t[61]!==q?(J=s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[K,q]}),t[60]=K,t[61]=q,t[62]=J):J=t[62];let Q;t[63]!==F||t[64]!==W||t[65]!==J?(Q=s.jsx("div",{className:"flex-1 overflow-y-auto pt-10 h-full",children:s.jsx("div",{className:"h-full",children:s.jsxs("div",{className:"max-w-7xl mx-auto h-full",children:[F,W,J]})})}),t[63]=F,t[64]=W,t[65]=J,t[66]=Q):Q=t[66];let ie;return t[67]!==H||t[68]!==Q?(ie=s.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[H,Q]}),t[67]=H,t[68]=Q,t[69]=ie):ie=t[69],ie}function at(t){return t.id==="readme"}function ct(t){return t.visible}function dt(t){return{name:t.name,description:t.description}}function mt(t){return t.name.endsWith("_GET")}function ft(t){return t.name.endsWith("_VERSIONS")}function Bt(){const t=E.c(6),{org:e}=ve(),r=be();let n;t[0]!==r||t[1]!==e.slug?(n=()=>{r({to:"/$org/store",params:{org:e.slug}})},t[0]=r,t[1]=e.slug,t[2]=n):n=t[2];const o=n;let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(le.Suspense,{fallback:s.jsx(qe,{}),children:s.jsx(lt,{})}),t[3]=i):i=t[3];let a;return t[4]!==o?(a=s.jsx(it,{onBack:o,children:i}),t[4]=o,t[5]=a):a=t[5],a}export{Bt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as E,a2 as b}from"./index-YfohaNt1.js";import{u as j}from"./useQuery-CJPC8H_4.js";function T(g){const e=E.c(18),{url:o,token:r,enabled:w}=g,$=w===void 0?!0:w;let i;e[0]!==r||e[1]!==o?(i=b.mcpTools(o,r),e[0]=r,e[1]=o,e[2]=i):i=e[2];let s;e[3]!==r||e[4]!==o?(s=async()=>{if(!o)return[];const m={"Content-Type":"application/json",Accept:"application/json"};r&&(m.Authorization=`Bearer ${r}`);const u=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-mcp",version:"1.0.0"}}})});if(!u.ok)throw new Error(`MCP initialization failed: ${u.status}`);const h=await u.json();if(h.error)throw new Error(`MCP initialization error: ${h.error.message} (code: ${h.error.code})`);const y=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"tools/list",params:{}})});if(!y.ok)throw new Error(`Failed to list tools: ${y.status}`);const l=await y.json();if(l.error)throw new Error(`Failed to list tools: ${l.error.message} (code: ${l.error.code})`);return l.result?.tools||[]},e[3]=r,e[4]=o,e[5]=s):s=e[5];const d=$&&!!o;let a;e[6]!==i||e[7]!==s||e[8]!==d?(a={queryKey:i,queryFn:s,enabled:d,staleTime:3e4,retry:!1},e[6]=i,e[7]=s,e[8]=d,e[9]=a):a=e[9];const t=j(a),f=o?t.isLoading?"connecting":t.isError?"error":"ready":"disconnected";let n;e[10]!==t.data?(n=t.data||[],e[10]=t.data,e[11]=n):n=e[11];const p=t.error;let c;return e[12]!==t.isLoading||e[13]!==t.refetch||e[14]!==f||e[15]!==n||e[16]!==p?(c={tools:n,state:f,error:p,isLoading:t.isLoading,refetch:t.refetch},e[12]=t.isLoading,e[13]=t.refetch,e[14]=f,e[15]=n,e[16]=p,e[17]=c):c=e[17],c}export{T as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b5 as u,b1 as s}from"./index-YfohaNt1.js";function o(e,r){return u(e,s,r)}export{o as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bp as t,at as a}from"./index-YfohaNt1.js";function e(...r){return t(a(r))}export{e as c};
|