@decocms/mesh 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-D6b9Ralv.js → AlertCircle-UV2YLKfw.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CmZRAub5.js → ArrowLeft-Bo1zW5a5.js} +1 -1
- package/dist/client/assets/{ChevronDown-xjFrqe8j.js → ChevronDown-BuQcxwsy.js} +1 -1
- package/dist/client/assets/{Clock-Bqlp1mni.js → Clock-B51_sCE5.js} +1 -1
- package/dist/client/assets/{Code01-B3S249hz.js → Code01-COrL2KWf.js} +1 -1
- package/dist/client/assets/{Copy01-D0tR5TRJ.js → Copy01-CcOk5Vyi.js} +1 -1
- package/dist/client/assets/{CpuChip02-BJZ8c2R6.js → CpuChip02-B8Tu4CiG.js} +1 -1
- package/dist/client/assets/{DotsVertical-0Pg6f15X.js → DotsVertical-_UkGhQVK.js} +1 -1
- package/dist/client/assets/{File06-BzST8Ux5.js → File06-CgE3h2vo.js} +1 -1
- package/dist/client/assets/{FlipBackward-J5E6LFga.js → FlipBackward-DXc4GWLk.js} +1 -1
- package/dist/client/assets/{GitBranch01-C9tViAi-.js → GitBranch01-DBsFEMsq.js} +1 -1
- package/dist/client/assets/{Grid01-DETN8WPx.js → Grid01-CLbgmuVr.js} +1 -1
- package/dist/client/assets/{Inbox01-DxqBKn7H.js → Inbox01-DgSjP6hG.js} +1 -1
- package/dist/client/assets/{Key01-B-GFSqTW.js → Key01-BsCw827b.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D-pWR4LA.js → LinkExternal01-Bl5rOTzQ.js} +1 -1
- package/dist/client/assets/{Loading01-CpvGD3vr.js → Loading01-C2ksDpEt.js} +1 -1
- package/dist/client/assets/{Lock01-DbWcWM_K.js → Lock01-BIHbxbWE.js} +1 -1
- package/dist/client/assets/{Play-D0iqjftf.js → Play-DxjuBGS7.js} +1 -1
- package/dist/client/assets/{Plus-Df5PHguC.js → Plus-BDj50EVa.js} +1 -1
- package/dist/client/assets/{SearchMd-BSF-Glwf.js → SearchMd-CKdsPsqz.js} +1 -1
- package/dist/client/assets/{Terminal-Cw0wmZeh.js → Terminal-BwX7P6RS.js} +1 -1
- package/dist/client/assets/{Trash01-DPFHmwKr.js → Trash01-DNU9uNwt.js} +1 -1
- package/dist/client/assets/{X-D8XIiJvQ.js → X-pU_u37Iz.js} +1 -1
- package/dist/client/assets/{XClose-B_hUkeVk.js → XClose-SfMOaf6D.js} +1 -1
- package/dist/client/assets/{alert-dialog-CbCWAnT3.js → alert-dialog-CbhzAS7b.js} +1 -1
- package/dist/client/assets/{auth-PKeXnxbM.js → auth-DjB4aOCE.js} +1 -1
- package/dist/client/assets/{auth-catchall-Wppyfaii.js → auth-catchall-CHAul5qz.js} +1 -1
- package/dist/client/assets/{avatar-g2HizpCv.js → avatar-CZrcyeqb.js} +1 -1
- package/dist/client/assets/{badge-DpuZDXUE.js → badge-GM-n9TE1.js} +1 -1
- package/dist/client/assets/{button-hWHuMvle.js → button-B9HNAPP6.js} +1 -1
- package/dist/client/assets/{card-Cdw91ud0.js → card-D6CF4i3v.js} +1 -1
- package/dist/client/assets/{checkbox-C8hkq1Ob.js → checkbox-DLYTyq9a.js} +1 -1
- package/dist/client/assets/{collection-detail-BhlzVbA_.js → collection-detail-_Tw8YDDY.js} +1 -1
- package/dist/client/assets/{collection-display-button-DJTB2EUg.js → collection-display-button-tbfhud8k.js} +1 -1
- package/dist/client/assets/{collection-header-BxKOSRWd.js → collection-header-Cv7lAkNH.js} +1 -1
- package/dist/client/assets/{collection-page-BDy0PpkC.js → collection-page-Bg1UNTkP.js} +1 -1
- package/dist/client/assets/{collection-search-BoabZo7c.js → collection-search-BgOxfgou.js} +1 -1
- package/dist/client/assets/{collection-tab-y3dKzpme.js → collection-tab-4L43TT9J.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BERroKt9.js → collection-table-wrapper-DegTG_T4.js} +1 -1
- package/dist/client/assets/{connection-card-si8Xv84Q.js → connection-card-BJF-kL9j.js} +1 -1
- package/dist/client/assets/{connection-detail-D8qvOGFn.js → connection-detail-D_wtu6D8.js} +1 -1
- package/dist/client/assets/{connections-D7K8Q8og.js → connections-DirB2r4F.js} +1 -1
- package/dist/client/assets/constants-Ckw8iQUO.js +1 -0
- package/dist/client/assets/{core-BAd4uKi4.js → core-CSMo4fzz.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-D4tz0eZI.js → create-organization-dialog-CGDDUatO.js} +1 -1
- package/dist/client/assets/{dialog-HUu8pjnY.js → dialog-CCmlVGnK.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DG5cxUDL.js → dropdown-menu-BNOIctyJ.js} +1 -1
- package/dist/client/assets/{empty-state-m_IydCcr.js → empty-state-BIS2GBnR.js} +1 -1
- package/dist/client/assets/{env-vars-editor-kSmLn72b.js → env-vars-editor-kEDm71oV.js} +1 -1
- package/dist/client/assets/{error-boundary-B-QcFATa.js → error-boundary-DVqJkudG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CjCzbgf3.js → extract-connection-data-BPV3Twxi.js} +1 -1
- package/dist/client/assets/{form-B-xqHHYa.js → form-OVEOWxNI.js} +1 -1
- package/dist/client/assets/{formatDistanceToNow-B3w53gnj.js → formatDistanceToNow-pk1RpQoc.js} +1 -1
- package/dist/client/assets/gateway-detail-DqWIjAMm.js +1 -0
- package/dist/client/assets/{gateways-Bfk7wW4H.js → gateways-DwbRk56u.js} +1 -1
- package/dist/client/assets/{home-B2CMLWdT.js → home-D7jYpOqT.js} +1 -1
- package/dist/client/assets/{index-CXiBzYKD.js → index-BqoLdBFx.js} +5 -5
- package/dist/client/assets/{index-BI-brnHc.js → index-DRgm4wsq.js} +1 -1
- package/dist/client/assets/{index-Bs52vOb7.js → index-EVjqiZUJ.js} +1 -1
- package/dist/client/assets/{index-B9HSZhdB.js → index-W2PGgyyR.js} +3 -3
- package/dist/client/assets/{input-DcZE4UoL.js → input-G2fnG2Am.js} +1 -1
- package/dist/client/assets/json-DDD6Row0.js +1 -0
- package/dist/client/assets/{json-syntax-highlighter-Czp62O9j.js → json-syntax-highlighter-5HHiCQwG.js} +2 -2
- package/dist/client/assets/{layout-B5ADxfcB.js → layout-C1WQ7ubd.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-Z2qArbl8.js → lazy-highlighter-gomy7BJ2.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DZPXAcMr.js → localstorage-keys-C7zY1qXE.js} +1 -1
- package/dist/client/assets/{login-BX781KlF.js → login-CNVSskHM.js} +1 -1
- package/dist/client/assets/{mcp-oauth-PzyAfNM8.js → mcp-oauth-B9-FMvyy.js} +1 -1
- package/dist/client/assets/{members-D9riafGS.js → members-D9y943hC.js} +1 -1
- package/dist/client/assets/{monitoring-Bz-yKjJ1.js → monitoring-B2Eowpst.js} +1 -1
- package/dist/client/assets/{oauth-callback-CTNcTDd4.js → oauth-callback-C9UIbZ-R.js} +1 -1
- package/dist/client/assets/{page-DF6IrrZD.js → page-CmG23RGG.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-CJEwje2A.js → pin-to-sidebar-button-kIhCob0d.js} +1 -1
- package/dist/client/assets/{popover-DOwrFuly.js → popover-jnuYpBZT.js} +1 -1
- package/dist/client/assets/prism-light-BxhKKeMb.js +1 -0
- package/dist/client/assets/{resizable-C0OMnsnz.js → resizable-B0c0PvIq.js} +1 -1
- package/dist/client/assets/{resource-tabs-BBkx9rqd.js → resource-tabs-CNEwNeyY.js} +1 -1
- package/dist/client/assets/{responsive-select-Bl1ZcUtI.js → responsive-select-CbIQ3s6D.js} +1 -1
- package/dist/client/assets/{select-l2DSo1hq.js → select-COLfHq-y.js} +1 -1
- package/dist/client/assets/{settings-CWXxNDHw.js → settings-DOpKEQAr.js} +1 -1
- package/dist/client/assets/shell-layout-CI9EgG7K.js +19 -0
- package/dist/client/assets/{spinner-BtMKC1U7.js → spinner-B9kBQs3j.js} +1 -1
- package/dist/client/assets/{store-_81OANVP.js → store-DpLZ5FU6.js} +1 -1
- package/dist/client/assets/{store-app-detail-CuCWq6-w.js → store-app-detail-xc3wtURh.js} +1 -1
- package/dist/client/assets/{switch-BOFMRhtg.js → switch-C-Yt5sTX.js} +1 -1
- package/dist/client/assets/{textarea-BoUne3Q6.js → textarea-D6uzyks1.js} +1 -1
- package/dist/client/assets/thread-history-popover-DE_WsWCk.js +98 -0
- package/dist/client/assets/{tools-list-D5n3plgQ.js → tools-list-rJQU-ng4.js} +1 -1
- package/dist/client/assets/{tooltip-DxQ-KPX4.js → tooltip-BabForVg.js} +1 -1
- package/dist/client/assets/{types-8dJFzoWN.js → types-B3wbhOpL.js} +1 -1
- package/dist/client/assets/{use-binding-Ccb4SpbZ.js → use-binding-C31DnFYr.js} +1 -1
- package/dist/client/assets/{use-connection-BfQqOvPU.js → use-connection-C-N1BXWJ.js} +1 -1
- package/dist/client/assets/{use-connection-resources-BuPCYNbb.js → use-connection-resources-FL0VBcE3.js} +1 -1
- package/dist/client/assets/{use-gateway-BWSXRpvE.js → use-gateway-D5soST08.js} +1 -1
- package/dist/client/assets/{use-list-state-qFWsDnqD.js → use-list-state-BodSR4m6.js} +1 -1
- package/dist/client/assets/{use-mcp-40LwnzhO.js → use-mcp-CBrtsEiS.js} +1 -1
- package/dist/client/assets/{use-members-BorgQnCE.js → use-members-yEwnFG6a.js} +1 -1
- package/dist/client/assets/{use-mobile-v3aq_7jb.js → use-mobile-Du3kakPh.js} +1 -1
- package/dist/client/assets/{use-organization-settings-QpyD7U2T.js → use-organization-settings-CWMStVDZ.js} +1 -1
- package/dist/client/assets/{use-tool-call-CLKWIhEj.js → use-tool-call-CgT1f90a.js} +1 -1
- package/dist/client/assets/useQuery-CEb80N_r.js +1 -0
- package/dist/client/assets/{useSuspenseInfiniteQuery-DUZsUnhN.js → useSuspenseInfiniteQuery-DkBr4fim.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C9GLUxuG.js → view-mode-toggle-CN5ovLjl.js} +1 -1
- package/dist/client/assets/{well-known-mcp-D13f-8h2.js → well-known-mcp-VNRT0JrW.js} +1 -1
- package/dist/client/assets/workflow-BHsXMy7t.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/constants-CxHW24vL.js +0 -1
- package/dist/client/assets/gateway-detail-Dz5K97Qu.js +0 -1
- package/dist/client/assets/index-7USdUZHF.js +0 -98
- package/dist/client/assets/json-RSU7hrk4.js +0 -1
- package/dist/client/assets/prism-light-xse74Nms.js +0 -1
- package/dist/client/assets/shell-layout-CWj_6Hth.js +0 -19
- package/dist/client/assets/useQuery-DE63pAfU.js +0 -1
- package/dist/client/assets/workflow-DJAFzntg.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as T,c as U,j as t,f as Ye,d as dt,b as mt,v as ut,_ as Oe,w as qe,g as ft,as as ht,x as xt,y as pt,a as gt,t as Be}from"./index-B9HSZhdB.js";import{E as jt}from"./SearchMd-BSF-Glwf.js";import{E as Le}from"./error-boundary-B-QcFATa.js";import{I as $e,u as He}from"./use-connection-BfQqOvPU.js";import{T as bt,S as vt}from"./switch-BOFMRhtg.js";import{C as Ke}from"./checkbox-C8hkq1Ob.js";import{c as ie,B as Q}from"./button-hWHuMvle.js";import{i as yt}from"./ArrowLeft-CmZRAub5.js";import{C as St}from"./collection-search-BoabZo7c.js";import{I as Ue}from"./input-DcZE4UoL.js";import{s as Qe}from"./Plus-Df5PHguC.js";import{i as Ct}from"./X-D8XIiJvQ.js";import{b as wt,a as Nt}from"./use-gateway-BWSXRpvE.js";import{u as _t,a as It}from"./use-connection-resources-BuPCYNbb.js";import{u as Ze,a as re,c as ae,b as ce,T as de,i as Je}from"./tooltip-DxQ-KPX4.js";import{a as kt}from"./Copy01-D0tR5TRJ.js";import{i as We}from"./CpuChip02-BJZ8c2R6.js";import{i as Tt}from"./FlipBackward-J5E6LFga.js";import{i as Xe}from"./LinkExternal01-D-pWR4LA.js";import{i as Ae}from"./Loading01-CpvGD3vr.js";import{F as ke,a as $t,b as Pe,d as ze,f as Me,c as et}from"./form-B-xqHHYa.js";import{S as tt,a as st,b as nt,c as ot,d as Te}from"./select-l2DSo1hq.js";import{R as Pt}from"./resource-tabs-BBkx9rqd.js";import{s as zt}from"./slugify-CEUa2lfQ.js";import{P as Mt}from"./pin-to-sidebar-button-CJEwje2A.js";import{a as Rt,V as Et,b as At}from"./layout-B5ADxfcB.js";import{C as te,b as Ft,c as Gt,u as Dt,U as Vt,d as Ot,I as Bt,M as Lt}from"./index-7USdUZHF.js";import{u as lt,L as it}from"./localstorage-keys-DZPXAcMr.js";import{f as Ut}from"./formatDistanceToNow-B3w53gnj.js";import"./ChevronDown-xjFrqe8j.js";import"./badge-DpuZDXUE.js";import"./use-organization-settings-QpyD7U2T.js";import"./use-binding-Ccb4SpbZ.js";import"./auth-PKeXnxbM.js";import"./AlertCircle-D6b9Ralv.js";import"./Grid01-DETN8WPx.js";import"./responsive-select-Bl1ZcUtI.js";import"./use-mobile-v3aq_7jb.js";import"./textarea-BoUne3Q6.js";import"./Terminal-Cw0wmZeh.js";import"./connection-card-si8Xv84Q.js";import"./card-Cdw91ud0.js";import"./json-syntax-highlighter-Czp62O9j.js";import"./alert-dialog-CbCWAnT3.js";import"./File06-BzST8Ux5.js";import"./useQuery-DE63pAfU.js";const rt=({size:n=24,color:e="currentColor",...s})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},T.createElement("path",{d:"M12 20h9M3 20h1.675c.489 0 .733 0 .964-.055.204-.05.399-.13.578-.24.201-.123.374-.296.72-.642L19.5 6.5a2.121 2.121 0 0 0-3-3L3.937 16.063c-.346.346-.519.519-.642.72a2 2 0 0 0-.24.578c-.055.23-.055.475-.055.965V20Z"}));rt.displayName="Edit03";const at=({size:n=24,color:e="currentColor",...s})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},T.createElement("path",{d:"M7 3v3.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C7.76 8 8.04 8 8.6 8h6.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C17 7.24 17 6.96 17 6.4V4m0 17v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));at.displayName="Save01";const Wt=T.memo(function(e){const s=U.c(20),{connection:o,isSelected:l,hasItemsEnabled:r,activeItemsCount:m,totalItemsCount:g,onSelect:d,onToggle:a}=e,c=l?"bg-accent/50":"hover:bg-muted/50";let f;s[0]!==c?(f=ie("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",c),s[0]=c,s[1]=f):f=s[1];let x;s[2]!==o.icon||s[3]!==o.title?(x=t.jsx($e,{icon:o.icon,name:o.title,size:"xs"}),s[2]=o.icon,s[3]=o.title,s[4]=x):x=s[4];let i;s[5]!==o.title?(i=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.title})}),s[5]=o.title,s[6]=i):i=s[6];let p;s[7]!==d||s[8]!==x||s[9]!==i?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:d,children:[x,i]}),s[7]=d,s[8]=x,s[9]=i,s[10]=p):p=s[10];let h;s[11]!==m||s[12]!==r||s[13]!==a||s[14]!==g?(h=g>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[m,"/",g]}),t.jsx(Ke,{checked:r,onCheckedChange:a,onClick:Jt})]}),s[11]=m,s[12]=r,s[13]=a,s[14]=g,s[15]=h):h=s[15];let v;return s[16]!==f||s[17]!==p||s[18]!==h?(v=t.jsxs("div",{className:f,children:[p,h]}),s[16]=f,s[17]=p,s[18]=h,s[19]=v):v=s[19],v}),qt=T.memo(function(e){const s=U.c(18),{connectionId:o,item:l,isSelected:r,onToggle:m}=e,g=`item-${o}-${l.id}`,d=r?"text-foreground":"text-muted-foreground";let a;s[0]!==d?(a=ie("text-sm font-medium",d),s[0]=d,s[1]=a):a=s[1];let c;s[2]!==l.name||s[3]!==a?(c=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:a,children:l.name})}),s[2]=l.name,s[3]=a,s[4]=c):c=s[4];let f;s[5]!==l.description?(f=l.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description}),s[5]=l.description,s[6]=f):f=s[6];let x;s[7]!==c||s[8]!==f?(x=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,f]}),s[7]=c,s[8]=f,s[9]=x):x=s[9];const i=`item-${o}-${l.id}`;let p;s[10]!==r||s[11]!==m||s[12]!==i?(p=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(Ke,{id:i,checked:r,onCheckedChange:m,onClick:Yt})}),s[10]=r,s[11]=m,s[12]=i,s[13]=p):p=s[13];let h;return s[14]!==g||s[15]!==x||s[16]!==p?(h=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:g,children:[x,p]}),s[14]=g,s[15]=x,s[16]=p,s[17]=h):h=s[17],h});function ct({itemSet:n,onItemSetChange:e,getItems:s,itemLabel:o,emptyItemsMessage:l,extraContent:r}){const[m,g]=T.useState(""),d=T.useDeferredValue(m),[a,c]=T.useState("all"),[f,x]=T.useState(!1),i=T.useRef(new Set(Object.keys(n))),p=He({searchTerm:d.trim()||void 0}),h=i.current,v=[...h.values()].map(u=>p.find(S=>S.id===u)).filter(u=>u!==void 0),w=p.filter(u=>!h.has(u.id)),N=[...v,...w],j=u=>{const S=n[u];return S!==void 0&&S.length>0},C=N.filter(u=>{if(a==="all")return!0;const S=j(u.id);return a==="selected"?S:a==="unselected"?!S:!0}),[b,_]=T.useState(N[0]?.id??null),y=b?N.find(u=>u.id===b)??null:null,M=y?s(y):[],R=(u,S)=>n[u]?.includes(S)??!1,W=(u,S)=>{const I=n[u]??[],G=I.includes(S),k={...n};if(G){const $=I.filter(E=>E!==S);$.length===0?delete k[u]:k[u]=$}else k[u]=[...I,S];e(k)},V=u=>{const S=N.find(A=>A.id===u);if(!S)return;const I=s(S);if(I.length===0)return;const G=n[u]??[],k=I.map(A=>A.id),$=G.length>0&&k.every(A=>G.includes(A)),E={...n};$?delete E[u]:(E[u]=k,_(u)),e(E)},z=u=>{_(u),x(!0)},q=()=>{x(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:ie("w-full md:w-80 border-r border-border flex flex-col",f&&"hidden md:flex"),children:[t.jsx(St,{value:m,onChange:g,placeholder:"Search MCP Servers..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>c("all"),className:ie("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",a==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>c("selected"),className:ie("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",a==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>c("unselected"),className:ie("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",a==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:C.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:m?"No connections found":a==="selected"?"No servers selected":a==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:C.map(u=>{const I=s(u).length,G=n[u.id]?.length??0;return t.jsx(Wt,{connection:u,isSelected:b===u.id,hasItemsEnabled:j(u.id),activeItemsCount:G,totalItemsCount:I,onSelect:()=>z(u.id),onToggle:()=>V(u.id)},u.id)})})})]}),t.jsx("div",{className:ie("flex-1 flex-col",f?"flex":"hidden md:flex"),children:y?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[t.jsx(Q,{variant:"ghost",size:"sm",onClick:q,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(yt,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx($e,{icon:y.icon,name:y.title,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:y.title}),y.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:y.description})]})]})]}),r,t.jsx("div",{className:"flex-1 overflow-auto p-4",children:M.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:l||`This connection has no ${o} available`}):t.jsx("div",{className:"space-y-2",children:M.map(u=>t.jsx(qt,{connectionId:y.id,item:u,isSelected:R(y.id,u.id),onToggle:()=>W(y.id,u.id)},u.id))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Select a connection to view its ",o]})})})]})}function Jt(n){return n.stopPropagation()}function Yt(n){return n.stopPropagation()}function Ht(n){const e=U.c(6),{promptSet:s,onPromptSetChange:o,connectionPrompts:l}=n;let r;e[0]!==l?(r=d=>(l.get(d.id)??[]).map(Kt),e[0]=l,e[1]=r):r=e[1];const m=r;let g;return e[2]!==m||e[3]!==o||e[4]!==s?(g=t.jsx(ct,{itemSet:s,onItemSetChange:o,getItems:m,itemLabel:"prompts",emptyItemsMessage:"This connection has no prompts available"}),e[2]=m,e[3]=o,e[4]=s,e[5]=g):g=e[5],g}function Kt(n){return{id:n.name,name:n.name,description:n.description}}function Qt(n){return n.includes("*")}function Zt(n){const e=U.c(27),{patterns:s,onAddPattern:o,onRemovePattern:l}=n,[r,m]=T.useState("");let g;e[0]!==r||e[1]!==o||e[2]!==s?(g=()=>{const x=r.trim();x&&!s.includes(x)&&(o(x),m(""))},e[0]=r,e[1]=o,e[2]=s,e[3]=g):g=e[3];const d=g;let a;e[4]!==d?(a=x=>{x.key==="Enter"&&(x.preventDefault(),d())},e[4]=d,e[5]=a):a=e[5];const c=a;let f;if(e[6]!==d||e[7]!==c||e[8]!==r||e[9]!==l||e[10]!==s){const x=s.filter(Qt);let i;e[12]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("code",{children:"*"}),e[12]=i):i=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{className:"text-xs text-muted-foreground",children:["Add URI patterns to match multiple resources. Use ",i," for single segment and ",t.jsx("code",{children:"**"})," for multiple segments."]}),e[13]=p):p=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=_=>m(_.target.value),e[14]=h):h=e[14];let v;e[15]!==c||e[16]!==r?(v=t.jsx(Ue,{value:r,onChange:h,onKeyDown:c,placeholder:"e.g., file:///**/*.ts or db://users/*",className:"flex-1 text-sm"}),e[15]=c,e[16]=r,e[17]=v):v=e[17];let w;e[18]!==r?(w=r.trim(),e[18]=r,e[19]=w):w=e[19];const N=!w;let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(Qe,{size:16}),e[20]=j):j=e[20];let C;e[21]!==d||e[22]!==N?(C=t.jsx(Q,{type:"button",variant:"outline",size:"sm",onClick:d,disabled:N,children:j}),e[21]=d,e[22]=N,e[23]=C):C=e[23];let b;e[24]!==C||e[25]!==v?(b=t.jsxs("div",{className:"flex gap-2",children:[v,C]}),e[24]=C,e[25]=v,e[26]=b):b=e[26],f=t.jsxs("div",{className:"border-b border-border p-4 space-y-3",children:[p,b,x.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(_=>t.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-muted rounded-md text-xs",children:[t.jsx("code",{className:"text-foreground",children:_}),t.jsx("button",{type:"button",onClick:()=>l(_),className:"text-muted-foreground hover:text-foreground",children:t.jsx(Ct,{size:12})})]},_))})]}),e[6]=d,e[7]=c,e[8]=r,e[9]=l,e[10]=s,e[11]=f}else f=e[11];return f}function Xt(n){const e=U.c(23),{resourceSet:s,onResourceSetChange:o,connectionResources:l}=n,[r]=T.useState(null);let m;e[0]!==l?(m=j=>(l.get(j.id)??[]).map(es),e[0]=l,e[1]=m):m=e[1];const g=m;let d;e[2]!==o||e[3]!==s?(d=(j,C)=>{const b=s[j]??[];b.includes(C)||o({...s,[j]:[...b,C]})},e[2]=o,e[3]=s,e[4]=d):d=e[4];const a=d;let c;e[5]!==o||e[6]!==s?(c=(j,C)=>{const _=(s[j]??[]).filter(y=>y!==C);if(_.length===0){const y={...s};delete y[j],o(y)}else o({...s,[j]:_})},e[5]=o,e[6]=s,e[7]=c):c=e[7];const f=c;let x;e[8]!==o?(x=j=>{o(j)},e[8]=o,e[9]=x):x=e[9];const i=x;let p;e[10]!==s||e[11]!==r?(p=r?s[r]??[]:[],e[10]=s,e[11]=r,e[12]=p):p=e[12];const h=p;let v;e[13]!==a||e[14]!==f||e[15]!==r||e[16]!==h?(v=r?t.jsx(Zt,{patterns:h,onAddPattern:j=>a(r,j),onRemovePattern:j=>f(r,j)}):null,e[13]=a,e[14]=f,e[15]=r,e[16]=h,e[17]=v):v=e[17];const w=v;let N;return e[18]!==w||e[19]!==g||e[20]!==i||e[21]!==s?(N=t.jsx("div",{className:"h-full",children:t.jsx(ct,{itemSet:s,onItemSetChange:i,getItems:g,itemLabel:"resources",emptyItemsMessage:"This connection has no resources available",extraContent:w})}),e[18]=w,e[19]=g,e[20]=i,e[21]=s,e[22]=N):N=e[22],N}function es(n){return{id:n.uri,name:n.name||n.uri,description:n.description||n.uri}}const ts="You are a helpful assistant. Please try answering the user's questions using your available tools.";function ss(n){const e=U.c(3),{gatewayId:s,onSelect:o}=n,{data:l}=Ot(s);if(l.length===0)return null;let r;return e[0]!==o||e[1]!==l?(r=t.jsx(Bt,{prompts:l,onSelect:o,className:"mt-6"}),e[0]=o,e[1]=l,e[2]=r):r=e[2],r}function ns(n,e){return n.find(e)??n[0]}function os(n,e,s,o){const l=U.c(9),r=null,[m,g]=lt(n,r);let d;l[0]!==s||l[1]!==m?(d=x=>m?s(x,m):!1,l[0]=s,l[1]=m,l[2]=d):d=l[2];let a;l[3]!==e||l[4]!==d?(a=ns(e,d),l[3]=e,l[4]=d,l[5]=a):a=l[5];const c=a;let f;return l[6]!==c||l[7]!==g?(f=[c,g],l[6]=c,l[7]=g,l[8]=f):f=l[8],f}function ls(n){const s=new TextEncoder().encode(n),o=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(o)}function is(n){const e=U.c(52),{serverName:s,gatewayUrl:o}=n,[l,r]=T.useState(!1),[m,g]=T.useState(null),d=zt(s);let a,c,f,x;if(e[0]!==o||e[1]!==d){const O={type:"http",url:o},L={[d]:O};a=JSON.stringify(L,null,2);const H=ne=>JSON.stringify({...O,headers:{"x-mesh-client":ne}},null,2),K=ls(H("Cursor"));c=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(d)}&config=${encodeURIComponent(K)}`;const J=H("Claude Code");f=d;let se;e[6]===Symbol.for("react.memo_cache_sentinel")?(se=/'/g,e[6]=se):se=e[6],x=J.replace(se,"'\\''"),e[0]=o,e[1]=d,e[2]=a,e[3]=c,e[4]=f,e[5]=x}else a=e[2],c=e[3],f=e[4],x=e[5];const i=`claude mcp add "${f}" --config '${x}'`;let p;e[7]!==a?(p=async()=>{await navigator.clipboard.writeText(a),r(!0),Be.success("Configuration copied to clipboard"),setTimeout(()=>r(!1),2e3)},e[7]=a,e[8]=p):p=e[8];const h=p;let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=async(O,L)=>{await navigator.clipboard.writeText(O),g(L),Be.success(`${L} command copied`),setTimeout(()=>g(null),2e3)},e[9]=v):v=e[9];const w=v,N=rs;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Install in your IDE"})}),e[10]=j):j=e[10];let C;e[11]!==l?(C=l?t.jsx(Je,{size:14}):t.jsx(kt,{size:14}),e[11]=l,e[12]=C):C=e[12];let b;e[13]!==h||e[14]!==C?(b=t.jsx(ce,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:h,children:C})}),e[13]=h,e[14]=C,e[15]=b):b=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(de,{children:"Copy configuration"}),e[16]=_):_=e[16];let y;e[17]!==b?(y=t.jsx("div",{className:"absolute top-2 right-2",children:t.jsx(re,{children:t.jsxs(ae,{children:[b,_]})})}),e[17]=b,e[18]=y):y=e[18];let M;e[19]!==a||e[20]!==h?(M=t.jsx("pre",{className:"text-xs font-mono text-foreground overflow-auto max-h-40 whitespace-pre-wrap wrap-break-word cursor-pointer",onClick:h,children:a}),e[19]=a,e[20]=h,e[21]=M):M=e[21];let R;e[22]!==M||e[23]!==y?(R=t.jsxs("div",{className:"relative flex flex-col gap-2 p-3 bg-muted/50 rounded-lg",children:[y,M]}),e[22]=M,e[23]=y,e[24]=R):R=e[24];let W;e[25]!==c?(W=()=>N(c),e[25]=c,e[26]=W):W=e[26];let V,z;e[27]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),z=t.jsx("span",{className:"text-sm font-medium",children:"Cursor"}),e[27]=V,e[28]=z):(V=e[27],z=e[28]);let q;e[29]!==W?(q=t.jsx(ce,{asChild:!0,children:t.jsxs(Q,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:W,children:[V,z]})}),e[29]=W,e[30]=q):q=e[30];let u;e[31]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(de,{children:"Add to Cursor"}),e[31]=u):u=e[31];let S;e[32]!==q?(S=t.jsx(re,{children:t.jsxs(ae,{children:[q,u]})}),e[32]=q,e[33]=S):S=e[33];let I;e[34]!==i?(I=()=>w(i,"Claude"),e[34]=i,e[35]=I):I=e[35];let G,k;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),k=t.jsx("span",{className:"text-sm font-medium",children:"Claude Code"}),e[36]=G,e[37]=k):(G=e[36],k=e[37]);let $;e[38]!==m?($=m==="Claude"&&t.jsx(Je,{size:14,className:"ml-2 text-green-500"}),e[38]=m,e[39]=$):$=e[39];let E;e[40]!==I||e[41]!==$?(E=t.jsx(ce,{asChild:!0,children:t.jsxs(Q,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:I,children:[G,k,$]})}),e[40]=I,e[41]=$,e[42]=E):E=e[42];let A;e[43]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(de,{children:"Add to Claude Code"}),e[43]=A):A=e[43];let B;e[44]!==E?(B=t.jsx(re,{children:t.jsxs(ae,{children:[E,A]})}),e[44]=E,e[45]=B):B=e[45];let D;e[46]!==S||e[47]!==B?(D=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[S,B]}),e[46]=S,e[47]=B,e[48]=D):D=e[48];let Y;return e[49]!==R||e[50]!==D?(Y=t.jsxs("div",{className:"flex flex-col gap-4",children:[j,R,D]}),e[49]=R,e[50]=D,e[51]=Y):Y=e[51],Y}function rs(n){window.open(n,"_blank")}const as=ut({title:qe().min(1,"Name is required").max(255),description:qe().nullable(),status:Oe(["active","inactive"]),tool_selection_mode:Oe(["inclusion","exclusion"]),tool_selection_strategy:Oe(["passthrough","smart_tool_selection","code_execution"])});function cs(n,e){const s={};for(const o of n.connections)if(o.selected_tools===null){const l=e.get(o.connection_id)??[];l.length>0&&(s[o.connection_id]=l)}else o.selected_tools.length>0&&(s[o.connection_id]=o.selected_tools);return s}function ds(n){const e={};for(const s of n.connections)s.selected_resources!==null&&s.selected_resources!==void 0&&s.selected_resources.length>0&&(e[s.connection_id]=s.selected_resources);return e}function ms(n){const e={};for(const s of n.connections)s.selected_prompts!==null&&s.selected_prompts!==void 0&&s.selected_prompts.length>0&&(e[s.connection_id]=s.selected_prompts);return e}function us(n,e,s,o){const l=new Set([...Object.keys(n),...Object.keys(e),...Object.keys(s)]);return Array.from(l).map(r=>{const m=n[r]??[],g=o.get(r)??[],d=g.length>0&&g.every(a=>m.includes(a));return{connection_id:r,selected_tools:m.length===0||d?null:m,selected_resources:e[r]??null,selected_prompts:s[r]??null}})}function fs(n){const e=U.c(91),{gateway:s,activeThreadId:o,setActiveThreadId:l}=n,{data:r}=gt.useSession(),m=r?.user,g=Ft(),{locator:d}=Ze();let a;e[0]!==d?(a=it.chatSelectedModel(d),e[0]=d,e[1]=a):a=e[1];const[c,f]=os(a,g,hs);let x;e[2]!==o?(x={threadId:o,systemPrompt:ts},e[2]=o,e[3]=x):x=e[3];const i=Gt(x),{inputValue:p,setInputValue:h,branchContext:v,clearBranch:w}=Dt(),{isEmpty:N}=i,j=!!c;let C;e[4]!==o||e[5]!==i||e[6]!==w||e[7]!==s.id||e[8]!==j||e[9]!==c||e[10]!==h||e[11]!==m?.image||e[12]!==m?.name?(C=async ee=>{if(!j||!c){Be.error("No model configured");return}h(""),w();const fe={created_at:new Date().toISOString(),thread_id:o,model:{id:c.id,connectionId:c.connectionId,provider:c.provider??void 0,limits:c.limits??void 0},gateway:{id:s.id},user:{avatar:m?.image??void 0,name:m?.name??"you"}};await i.sendMessage(ee,fe)},e[4]=o,e[5]=i,e[6]=w,e[7]=s.id,e[8]=j,e[9]=c,e[10]=h,e[11]=m?.image,e[12]=m?.name,e[13]=C):C=e[13];const b=C;let _;e[14]!==f?(_=ee=>{f(ee)},e[14]=f,e[15]=_):_=e[15];const y=_;let M;e[16]!==v||e[17]!==w||e[18]!==l||e[19]!==h?(M=()=>{v&&(l(v.originalThreadId),w(),h(""))},e[16]=v,e[17]=w,e[18]=l,e[19]=h,e[20]=M):M=e[20];const R=M,W=s.title||"Gateway";let V;e[21]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(We,{size:32}),e[21]=V):V=e[21];let z;e[22]!==s.icon||e[23]!==W?(z=t.jsx($e,{icon:s.icon,name:W,size:"lg",fallbackIcon:V,className:"size-[60px]! rounded-[18px]!"}),e[22]=s.icon,e[23]=W,e[24]=z):z=e[24];const q=s.title||"Gateway Chat";let u;e[25]!==q?(u=t.jsx("h3",{className:"text-xl font-medium text-foreground",children:q}),e[25]=q,e[26]=u):u=e[26];let S;e[27]!==s.description?(S=s.description?t.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:s.description}):null,e[27]=s.description,e[28]=S):S=e[28];let I;e[29]!==u||e[30]!==S||e[31]!==z?(I=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[z,u,S]}),e[29]=u,e[30]=S,e[31]=z,e[32]=I):I=e[32];let G;e[33]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("div",{className:"flex justify-center mt-6",children:t.jsx(Ae,{size:20,className:"animate-spin text-muted-foreground"})}),e[33]=G):G=e[33];let k;e[34]!==b?(k=ee=>{b(ee.description??ee.name)},e[34]=b,e[35]=k):k=e[35];let $;e[36]!==s.id||e[37]!==k?($=t.jsx(Le,{fallback:null,children:t.jsx(T.Suspense,{fallback:G,children:t.jsx(ss,{gatewayId:s.id,onSelect:k})})}),e[36]=s.id,e[37]=k,e[38]=$):$=e[38];let E;e[39]!==I||e[40]!==$?(E=t.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-4 text-center",children:[I,$]}),e[39]=I,e[40]=$,e[41]=E):E=e[41];const A=E;let B;e[42]!==i.messages||e[43]!==i.status||e[44]!==A||e[45]!==N?(B=t.jsx(te.Main,{className:"h-full relative overflow-hidden",children:N?t.jsx(te.EmptyState,{children:A}):t.jsx(te.Messages,{messages:i.messages,status:i.status,minHeightOffset:240})}),e[42]=i.messages,e[43]=i.status,e[44]=A,e[45]=N,e[46]=B):B=e[46];let D;e[47]!==i.error||e[48]!==b?(D=()=>{i.error&&b(`I encountered this error: ${i.error.message}. Can you help me fix it?`)},e[47]=i.error,e[48]=b,e[49]=D):D=e[49];let Y;e[50]!==i.clearError||e[51]!==i.error||e[52]!==D?(Y=t.jsx(te.ErrorBanner,{error:i.error,onFixInChat:D,onDismiss:i.clearError}),e[50]=i.clearError,e[51]=i.error,e[52]=D,e[53]=Y):Y=e[53];let O;e[54]!==b?(O=()=>{b("Please continue.")},e[54]=b,e[55]=O):O=e[55];let L;e[56]!==i.clearFinishReason||e[57]!==i.finishReason||e[58]!==O?(L=t.jsx(te.FinishReasonWarning,{finishReason:i.finishReason,onContinue:O,onDismiss:i.clearFinishReason}),e[56]=i.clearFinishReason,e[57]=i.finishReason,e[58]=O,e[59]=L):L=e[59];let H;e[60]!==v||e[61]!==w||e[62]!==R||e[63]!==h?(H=t.jsx(te.BranchPreview,{branchContext:v,clearBranchContext:w,onGoToOriginalMessage:R,setInputValue:h}),e[60]=v,e[61]=w,e[62]=R,e[63]=h,e[64]=H):H=e[64];let K;e[65]!==b||e[66]!==p?(K=async()=>{p.trim()&&await b(p.trim())},e[65]=b,e[66]=p,e[67]=K):K=e[67];const J=!j,se=i.status==="submitted"||i.status==="streaming",ne=c?"Ask anything or @ for context":"Select a model to start chatting",me=c??void 0;let X;e[68]!==y||e[69]!==me?(X=t.jsx(Lt,{selectedModel:me,onModelChange:y,placeholder:"Model",variant:"borderless"}),e[68]=y,e[69]=me,e[70]=X):X=e[70];let Z;e[71]!==i.messages?(Z=t.jsx(Vt,{messages:i.messages}),e[71]=i.messages,e[72]=Z):Z=e[72];let oe;e[73]!==i.stop||e[74]!==p||e[75]!==h||e[76]!==K||e[77]!==J||e[78]!==se||e[79]!==ne||e[80]!==X||e[81]!==Z?(oe=t.jsxs(te.Input,{value:p,onChange:h,onSubmit:K,onStop:i.stop,disabled:J,isStreaming:se,placeholder:ne,children:[X,Z]}),e[73]=i.stop,e[74]=p,e[75]=h,e[76]=K,e[77]=J,e[78]=se,e[79]=ne,e[80]=X,e[81]=Z,e[82]=oe):oe=e[82];let F;e[83]!==Y||e[84]!==L||e[85]!==H||e[86]!==oe?(F=t.jsx(te.Footer,{children:t.jsxs("div",{className:"max-w-2xl mx-auto w-full min-w-0 flex flex-col gap-2",children:[Y,L,H,oe]})}),e[83]=Y,e[84]=L,e[85]=H,e[86]=oe,e[87]=F):F=e[87];let le;return e[88]!==B||e[89]!==F?(le=t.jsxs(te,{children:[B,F]}),e[88]=B,e[89]=F,e[90]=le):le=e[90],le}function hs(n,e){return n.id===e.id&&n.connectionId===e.connectionId}function xs(n){const e=U.c(2);let s;return e[0]!==n?(s=t.jsx(te.Provider,{children:t.jsx(fs,{...n})}),e[0]=n,e[1]=s):s=e[1],s}function ps(n){const e=U.c(41),{form:s,gateway:o,icon:l}=n;let r;e[0]!==s?(r=s.watch("title")||"Gateway",e[0]=s,e[1]=r):r=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(We,{}),e[2]=m):m=e[2];let g;e[3]!==l||e[4]!==r?(g=t.jsx($e,{icon:l,name:r,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=l,e[4]=r,e[5]=g):g=e[5];let d;e[6]!==s.control?(d=t.jsx(ke,{control:s.control,name:"status",render:ys}),e[6]=s.control,e[7]=d):d=e[7];let a;e[8]!==g||e[9]!==d?(a=t.jsxs("div",{className:"flex items-start justify-between",children:[g,d]}),e[8]=g,e[9]=d,e[10]=a):a=e[10];let c;e[11]!==s.control?(c=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(ke,{control:s.control,name:"title",render:vs}),t.jsx(ke,{control:s.control,name:"description",render:bs})]}),e[11]=s.control,e[12]=c):c=e[12];let f;e[13]!==a||e[14]!==c?(f=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[a,c]}),e[13]=a,e[14]=c,e[15]=f):f=e[15];let x;e[16]!==s.control?(x=t.jsxs("div",{className:"flex flex-col gap-4 p-5",children:[t.jsx(ke,{control:s.control,name:"tool_selection_mode",render:js}),t.jsx(ke,{control:s.control,name:"tool_selection_strategy",render:gs})]}),e[16]=s.control,e[17]=x):x=e[17];let i;e[18]!==f||e[19]!==x?(i=t.jsxs("div",{className:"flex flex-col",children:[f,x]}),e[18]=f,e[19]=x,e[20]=i):i=e[20];let p;e[21]!==s||e[22]!==i?(p=t.jsx("div",{className:"lg:border-r border-b lg:border-b-0 border-border overflow-auto",children:t.jsx($t,{...s,children:i})}),e[21]=s,e[22]=i,e[23]=p):p=e[23];let h;e[24]!==o.id||e[25]!==o.title?(h=o.title||`gateway-${o.id.slice(0,8)}`,e[24]=o.id,e[25]=o.title,e[26]=h):h=e[26];const v=`${window.location.origin}/mcp/gateway/${o.id}`;let w;e[27]!==h||e[28]!==v?(w=t.jsx("div",{className:"p-5",children:t.jsx(is,{serverName:h,gatewayUrl:v})}),e[27]=h,e[28]=v,e[29]=w):w=e[29];let N;e[30]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"flex-1 text-sm text-foreground",children:"Last Updated"}),e[30]=N):N=e[30];let j;e[31]!==o.updated_at?(j=o.updated_at?Ut(new Date(o.updated_at),{addSuffix:!1}):"Unknown",e[31]=o.updated_at,e[32]=j):j=e[32];let C;e[33]!==j?(C=t.jsxs("div",{className:"flex items-center gap-4 p-5 border-t border-border",children:[N,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:j})]}),e[33]=j,e[34]=C):C=e[34];let b;e[35]!==w||e[36]!==C?(b=t.jsxs("div",{className:"flex flex-col overflow-auto",children:[w,C]}),e[35]=w,e[36]=C,e[37]=b):b=e[37];let _;return e[38]!==p||e[39]!==b?(_=t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] h-full",children:[p,b]}),e[38]=p,e[39]=b,e[40]=_):_=e[40],_}function gs(n){const{field:e}=n;return t.jsxs(Pe,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(et,{className:"mb-0",children:"Gateway Strategy"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(re,{children:t.jsxs(ae,{children:[t.jsx(ce,{asChild:!0,children:t.jsx(Q,{type:"button",variant:"ghost",size:"icon",className:"size-7","aria-label":"Gateway strategy help",children:t.jsx(Xe,{size:14,className:"text-muted-foreground"})})}),t.jsx(de,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Passthrough:"})," Pass tools through as-is (default)."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Smart Tool Selection:"})," ","Intelligent tool selection behavior."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Code Execution:"})," Code execution behavior."]})]})})]})}),t.jsxs(tt,{value:e.value,onValueChange:e.onChange,children:[t.jsx(ze,{children:t.jsx(st,{className:"w-[180px]",children:t.jsx(nt,{})})}),t.jsxs(ot,{children:[t.jsx(Te,{value:"passthrough",children:"Passthrough"}),t.jsx(Te,{value:"smart_tool_selection",children:"Smart Tool Selection"}),t.jsx(Te,{value:"code_execution",children:"Code Execution"})]})]})]})]}),t.jsx(Me,{})]})}function js(n){const{field:e}=n;return t.jsxs(Pe,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(et,{className:"mb-0",children:"Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(re,{children:t.jsxs(ae,{children:[t.jsx(ce,{asChild:!0,children:t.jsx(Q,{type:"button",variant:"ghost",size:"icon",className:"size-7","aria-label":"Selection mode help",children:t.jsx(Xe,{size:14,className:"text-muted-foreground"})})}),t.jsx(de,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Include:"})," Only selected items are exposed."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Exclude:"})," All items except selected ones are exposed."]})]})})]})}),t.jsxs(tt,{value:e.value,onValueChange:e.onChange,children:[t.jsx(ze,{children:t.jsx(st,{className:"w-[180px]",children:t.jsx(nt,{})})}),t.jsxs(ot,{children:[t.jsx(Te,{value:"inclusion",children:"Include Selected"}),t.jsx(Te,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(Me,{})]})}function bs(n){const{field:e}=n;return t.jsxs(Pe,{className:"w-full space-y-0",children:[t.jsx(ze,{children:t.jsx(Ue,{...e,value:e.value||"",className:"h-auto text-base text-muted-foreground leading-6 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),t.jsx(Me,{})]})}function vs(n){const{field:e}=n;return t.jsxs(Pe,{className:"w-full space-y-0",children:[t.jsx(ze,{children:t.jsx(Ue,{...e,className:"h-auto text-lg! font-medium leading-7 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Gateway Name"})}),t.jsx(Me,{})]})}function ys(n){const{field:e}=n;return t.jsxs(Pe,{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:e.value==="active"?"Active":"Inactive"}),t.jsx(ze,{children:t.jsx(vt,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(Me,{})]})}function Ss(n){const e=U.c(96),{gateway:s,gatewayId:o,requestedTabId:l}=n,m=ft().location.href,g=ht();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={from:"/$org/gateways/$gatewayId"},e[0]=d):d=e[0];const a=Ye(d),c=Nt(),{locator:f}=Ze(),[x,i]=T.useState("chat");let p;e[1]!==o||e[2]!==f?(p=it.gatewayChatActiveThread(f,o),e[1]=o,e[2]=f,e[3]=p):p=e[3];const[h,v]=lt(p,Ns);let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w={},e[4]=w):w=e[4];const N=He(w);let j;e[5]!==N?(j=N.map(ws),e[5]=N,e[6]=j):j=e[6];const C=j,{promptsMap:b}=_t(C),{resourcesMap:_}=It(C);let y;if(e[7]!==N){y=new Map;for(const P of N)P.tools&&P.tools.length>0&&y.set(P.id,P.tools.map(Cs));e[7]=N,e[8]=y}else y=e[8];let M;e[9]!==y||e[10]!==s?(M=()=>cs(s,y),e[9]=y,e[10]=s,e[11]=M):M=e[11];const[R,W]=T.useState(M);let V;e[12]!==s?(V=()=>ds(s),e[12]=s,e[13]=V):V=e[13];const[z,q]=T.useState(V);let u;e[14]!==s?(u=()=>ms(s),e[14]=s,e[15]=u):u=e[15];const[S,I]=T.useState(u),[G,k]=T.useState(!1);let $;e[16]===Symbol.for("react.memo_cache_sentinel")?($=P=>{W(P),k(!0)},e[16]=$):$=e[16];const E=$;let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=P=>{q(P),k(!0)},e[17]=A):A=e[17];const B=A;let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=P=>{I(P),k(!0)},e[18]=D):D=e[18];const Y=D;let O;e[19]===Symbol.for("react.memo_cache_sentinel")?(O=xt(as),e[19]=O):O=e[19];const L=s.tool_selection_mode??"inclusion",H=s.tool_selection_strategy??"passthrough";let K;e[20]!==s.description||e[21]!==s.status||e[22]!==s.title||e[23]!==L||e[24]!==H?(K={resolver:O,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:L,tool_selection_strategy:H}},e[20]=s.description,e[21]=s.status,e[22]=s.title,e[23]=L,e[24]=H,e[25]=K):K=e[25];const J=pt(K),ne=J.formState.isDirty||G;let me;e[26]!==c.update||e[27]!==y||e[28]!==J||e[29]!==o||e[30]!==S||e[31]!==z||e[32]!==R?(me=async()=>{const P=J.getValues(),Ve=us(R,z,S,y);await c.update.mutateAsync({id:o,data:{title:P.title,description:P.description,status:P.status,tool_selection_mode:P.tool_selection_mode,tool_selection_strategy:P.tool_selection_strategy,connections:Ve}}),J.reset(P),k(!1),i("chat")},e[26]=c.update,e[27]=y,e[28]=J,e[29]=o,e[30]=S,e[31]=z,e[32]=R,e[33]=me):me=e[33];const X=me;let Z;e[34]===Symbol.for("react.memo_cache_sentinel")?(Z=[{id:"settings",label:"Settings"},{id:"tools",label:"Tools"},{id:"resources",label:"Resources"},{id:"prompts",label:"Prompts"}],e[34]=Z):Z=e[34];const oe=Z,F=oe.some(P=>P.id===l)?l:"settings";let le;e[35]!==a?(le=P=>{a({search:Ve=>({...Ve,tab:P}),replace:!0})},e[35]=a,e[36]=le):le=e[36];const ee=le,fe=c.update.isPending,ue=x==="edit";let he;e[37]!==g.history?(he=()=>g.history.back(),e[37]=g.history,e[38]=he):he=e[38];let xe;e[39]!==F||e[40]!==s.description||e[41]!==s.icon||e[42]!==s.title||e[43]!==ee||e[44]!==ue?(xe=t.jsx(Rt,{children:ue?t.jsx(Pt,{tabs:oe,activeTab:F,onTabChange:ee}):t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx($e,{icon:s.icon,name:s.title||"Gateway",size:"xs",fallbackIcon:t.jsx(We,{size:12})}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.title}),s.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:s.description})]}):null]})]})}),e[39]=F,e[40]=s.description,e[41]=s.icon,e[42]=s.title,e[43]=ee,e[44]=ue,e[45]=xe):xe=e[45];const Fe=s.icon??"cpu_chip";let pe;e[46]!==s.title||e[47]!==Fe||e[48]!==m?(pe=t.jsx(Mt,{title:s.title,url:m,icon:Fe}),e[46]=s.title,e[47]=Fe,e[48]=m,e[49]=pe):pe=e[49];let ge;e[50]!==X||e[51]!==ne||e[52]!==ue||e[53]!==fe||e[54]!==v?(ge=ue?t.jsxs(t.Fragment,{children:[t.jsx(re,{children:t.jsxs(ae,{delayDuration:0,children:[t.jsx(ce,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(Q,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:fe,onClick:()=>i("chat"),"aria-label":"Cancel",children:t.jsx(Tt,{size:14})})})}),t.jsx(de,{side:"bottom",children:"Cancel"})]})}),ne&&t.jsx(re,{children:t.jsxs(ae,{delayDuration:0,children:[t.jsx(ce,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(Q,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:fe,onClick:X,"aria-label":"Save",children:fe?t.jsx(Ae,{size:14,className:"animate-spin"}):t.jsx(at,{size:14})})})}),t.jsx(de,{side:"bottom",children:"Save"})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx(re,{children:t.jsxs(ae,{children:[t.jsx(ce,{asChild:!0,children:t.jsx(Q,{type:"button",onClick:()=>v(crypto.randomUUID()),"aria-label":"New thread",variant:"outline",size:"icon",className:"size-7 border border-input",children:t.jsx(Qe,{size:16})})}),t.jsx(de,{children:"New thread"})]})}),t.jsx(re,{children:t.jsxs(ae,{children:[t.jsx(ce,{asChild:!0,children:t.jsx(Q,{type:"button",onClick:()=>i("edit"),"aria-label":"Edit",variant:"outline",size:"icon",className:"size-7 border border-input",children:t.jsx(rt,{size:16})})}),t.jsx(de,{children:"Edit Settings"})]})})]}),e[50]=X,e[51]=ne,e[52]=ue,e[53]=fe,e[54]=v,e[55]=ge):ge=e[55];let je;e[56]!==pe||e[57]!==ge?(je=t.jsxs(Et,{children:[pe,ge]}),e[56]=pe,e[57]=ge,e[58]=je):je=e[58];const Ge=ue?"opacity-0 pointer-events-none hidden":"opacity-100";let be;e[59]!==Ge?(be=ie("h-full transition-opacity duration-200 ease-out",Ge),e[59]=Ge,e[60]=be):be=e[60];let ve;e[61]!==h||e[62]!==s||e[63]!==v?(ve=t.jsx(xs,{gateway:s,activeThreadId:h,setActiveThreadId:v}),e[61]=h,e[62]=s,e[63]=v,e[64]=ve):ve=e[64];let ye;e[65]!==be||e[66]!==ve?(ye=t.jsx("div",{className:be,children:ve}),e[65]=be,e[66]=ve,e[67]=ye):ye=e[67];const De=ue?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none hidden";let Se;e[68]!==De?(Se=ie("h-full overflow-auto transition-opacity duration-200 ease-out",De),e[68]=De,e[69]=Se):Se=e[69];let Re;e[70]===Symbol.for("react.memo_cache_sentinel")?(Re=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Ae,{size:32,className:"animate-spin text-muted-foreground"})}),e[70]=Re):Re=e[70];let Ce;e[71]!==F||e[72]!==b||e[73]!==_||e[74]!==J||e[75]!==s||e[76]!==S||e[77]!==z||e[78]!==R?(Ce=F==="settings"?t.jsx(ps,{form:J,gateway:s,icon:s.icon}):F==="tools"?t.jsx(bt,{toolSet:R,onToolSetChange:E}):F==="resources"?t.jsx(Xt,{resourceSet:z,onResourceSetChange:B,connectionResources:_}):F==="prompts"?t.jsx(Ht,{promptSet:S,onPromptSetChange:Y,connectionPrompts:b}):null,e[71]=F,e[72]=b,e[73]=_,e[74]=J,e[75]=s,e[76]=S,e[77]=z,e[78]=R,e[79]=Ce):Ce=e[79];let we;e[80]!==Ce?(we=t.jsx(T.Suspense,{fallback:Re,children:Ce}),e[80]=Ce,e[81]=we):we=e[81];let Ne;e[82]!==F||e[83]!==we?(Ne=t.jsx(Le,{children:we},F),e[82]=F,e[83]=we,e[84]=Ne):Ne=e[84];let _e;e[85]!==Se||e[86]!==Ne?(_e=t.jsx("div",{className:Se,children:Ne}),e[85]=Se,e[86]=Ne,e[87]=_e):_e=e[87];let Ie;e[88]!==ye||e[89]!==_e?(Ie=t.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:t.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-hidden",children:[ye,_e]})}),e[88]=ye,e[89]=_e,e[90]=Ie):Ie=e[90];let Ee;return e[91]!==he||e[92]!==xe||e[93]!==je||e[94]!==Ie?(Ee=t.jsxs(At,{onBack:he,children:[xe,je,Ie]}),e[91]=he,e[92]=xe,e[93]=je,e[94]=Ie,e[95]=Ee):Ee=e[95],Ee}function Cs(n){return n.name}function ws(n){return n.id}function Ns(n){return n||crypto.randomUUID()}function _s(){const n=U.c(10);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/gateways/$gatewayId"},n[0]=e):e=n[0];const s=Ye(e);let o;n[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/gateways/$gatewayId"},n[1]=o):o=n[1];const{gatewayId:l,org:r}=dt(o);let m;n[2]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/shell/$org/gateways/$gatewayId"},n[2]=m):m=n[2];const d=mt(m).tab||"settings",a=wt(l);if(!a){let f;return n[3]!==s||n[4]!==r?(f=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(jt,{title:"Gateway not found",description:"This gateway may have been deleted or you may not have access.",actions:t.jsx(Q,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:r}}),children:"Back to gateways"})})}),n[3]=s,n[4]=r,n[5]=f):f=n[5],f}let c;return n[6]!==a||n[7]!==l||n[8]!==d?(c=t.jsx(Ss,{gateway:a,gatewayId:l,requestedTabId:d}),n[6]=a,n[7]=l,n[8]=d,n[9]=c):c=n[9],c}function Is(){const n=U.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Le,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ae,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(_s,{})})}),n[0]=e):e=n[0],e}function yn(){const n=U.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Is,{}),n[0]=e):e=n[0],e}export{yn as default};
|